REST-API: Disks collection should support copy/move disk. I.e: /api/disks/{disk:id}/copy /api/disks/{disk:id}/move
*** Bug 956661 has been marked as a duplicate of this bug. ***
ovirt 3.4.0 alpha has been released
I can see that the copy and move exist, but I'm not sure what should be the body of copy/move requests. <disk href= "/api/disks/3b88ab6e-82e7-41bc-99ab-985cda686089" id="3b88ab6e-82e7-41bc-99ab-985cda686089"> <actions> <link href= "/api/disks/3b88ab6e-82e7-41bc-99ab-985cda686089/export" rel="export"/> <link href= "/api/disks/3b88ab6e-82e7-41bc-99ab-985cda686089/move" rel="move"/> <link href= "/api/disks/3b88ab6e-82e7-41bc-99ab-985cda686089/copy" rel="copy"/> </actions> <name>mbourvin</name> <link href= "/api/disks/3b88ab6e-82e7-41bc-99ab-985cda686089/permissions" rel="permissions"/> <link href= "/api/disks/3b88ab6e-82e7-41bc-99ab-985cda686089/statistics" rel="statistics"/> <alias>mbourvin</alias> <image_id>61218b42-a5ae-4c7f-88e5-5b4550c0cfa0</image_id> <storage_domains> <storage_domain id="46485cb0-fcb5-43e7-9143-329f669da75f"/> </storage_domains> <size>1073741824</size> <provisioned_size>1073741824</provisioned_size> <actual_size>1073741824</actual_size> <status> <state>ok</state> </status> <interface>virtio</interface> <format>raw</format> <sparse>false</sparse> <bootable>false</bootable> <shareable>false</shareable> <wipe_after_delete>false</wipe_after_delete> <propagate_errors>false</propagate_errors> </disk>
You trying to copy/move the disk from one storage domain to another, so you have to provide the id of the target storage domain, for example: <action> <storage_domain id="e0d636c4-10c3-44be-a0ce-26cb59c1631b"/> </action>
Verified: URL: https://10.35.163.52/api/disks/3b88ab6e-82e7-41bc-99ab-985cda686089/move BODY: <action> <storage_domain id="d024b726-afa7-4b52-b5d1-b2f51ef3b5fc"/> </action> RESPONSE: <action> <storage_domain id="d024b726-afa7-4b52-b5d1-b2f51ef3b5fc"/> <status> <state>complete</state> </status> </action> URL: https://10.35.163.52/api/disks/9ba595ff-aa24-4f72-a9d9-795206a3c85f/copy BODY: <action> <storage_domain id="d024b726-afa7-4b52-b5d1-b2f51ef3b5fc"/> </action> RESPONSE: <action href= "/api/disks/9ba595ff-aa24-4f72-a9d9-795206a3c85f/copy/f2ab732b-6531-4641-8076-1f952eaa5eb8" id="f2ab732b-6531-4641-8076-1f952eaa5eb8"> <link href= "/api/disks/9ba595ff-aa24-4f72-a9d9-795206a3c85f" rel="parent"/> <link href= "/api/disks/9ba595ff-aa24-4f72-a9d9-795206a3c85f/copy" rel="replay"/> <async>true</async> <storage_domain id="d024b726-afa7-4b52-b5d1-b2f51ef3b5fc"/> <job href= "/api/jobs/1abed289-fd30-49f2-980c-2a55d8222905" id="1abed289-fd30-49f2-980c-2a55d8222905"/> <status> <state>pending</state> </status> </action>
Closing as part of 3.4.0