填写Ovirt API中的字段

时间:2019-07-19 12:48:34

标签: php json api ovirt

我正在跟踪此链接。

https://ovirt.org/documentation/admin-guide/chap-Backups_and_Migration.html#backing-up-and-restoring-virtual-machines-using-the-backup-and-restore-api

我得到了

的回复

获取/ api / vms / 4ef8b995-ae58-49d6-8980-ef0fa6688d92 / snapshots / 1b94ca4e-8c03-4166-8d29-2b831e24b90e / disks HTTP / 1.1  接受:application / xml  内容类型:application / xml

Identify disk id "Array
(
    [disk] => Array
        (
            [0] => Array
                (
                    [actual_size] => 0
                    [alias] => GlanceDisk-8700235
                    [format] => cow
                    [image_id] => a42bda58-7556-4ebe-a54d-03dc0a3b1f54
                    [propagate_errors] => false
                    [provisioned_size] => 8589934592
                    [read_only] => false
                    [shareable] => false
                    [sparse] => true
                    [status] => ok
                    [storage_type] => image
                    [wipe_after_delete] => false
                    [snapshot] => Array
                        (
                            [id] => 1b94ca4e-8c03-4166-8d29-2b831e24b90e
                        )

                    [storage_domains] => Array
                        (
                            [storage_domain] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => ad6aea6d-ff90-457f-98eb-99380949e23a
                                        )

                                )

                        )

                    [name] => GlanceDisk-8700235
                    [description] => CentOS 7 Generic Cloud Image v1711 for x86_64 (8700235)
                    [id] => dded245b-4a73-48b4-a1b4-ba98c37490ad
                )

        )

)
"

在此api的下一步中,我必须给POST请求提供什么值

 POST /api/vms/22222222-2222-2222-2222-222222222222/disks/ HTTP/1.1
 Accept: application/xml
 Content-type: application/xml

 <disk id="11111111-1111-1111-1111-111111111111">
     <snapshot id="11111111-1111-1111-1111-111111111111"/>
     <active>true</active>
 </disk>

替换 1)vms === >> 22222222-2222-2222-2222-222222222222 2)磁盘ID 11111111-1111-1111-1111-111111111111 3)快照ID 11111111-1111-1111-1111-111111111111

0 个答案:

没有答案