Bug 911348 - REST-API: Allow copy/move disk from disks collection
Summary: REST-API: Allow copy/move disk from disks collection
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.4.0
Assignee: Sergey Gotliv
QA Contact: Meital Bourvine
URL:
Whiteboard: storage
: 956661 (view as bug list)
Depends On:
Blocks: rhev3.4beta 1142926
TreeView+ depends on / blocked
 
Reported: 2013-02-14 19:48 UTC by Daniel Erez
Modified: 2016-02-10 17:52 UTC (History)
11 users (show)

Fixed In Version: ovirt-3.4.0-alpha1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:
Embargoed:
sgotliv: needinfo+
dyasny: Triaged+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 13973 0 None None None Never

Description Daniel Erez 2013-02-14 19:48:30 UTC
REST-API: Disks collection should support copy/move disk.
I.e:
/api/disks/{disk:id}/copy
/api/disks/{disk:id}/move

Comment 1 Michael Pasternak 2013-04-25 12:21:25 UTC
*** Bug 956661 has been marked as a duplicate of this bug. ***

Comment 3 Sandro Bonazzola 2014-01-14 08:44:54 UTC
ovirt 3.4.0 alpha has been released

Comment 4 Meital Bourvine 2014-02-02 12:11:57 UTC
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>

Comment 5 Sergey Gotliv 2014-02-02 12:18:47 UTC
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>

Comment 6 Meital Bourvine 2014-02-02 13:24:00 UTC
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>

Comment 7 Itamar Heim 2014-06-12 14:11:29 UTC
Closing as part of 3.4.0


Note You need to log in before you can comment on or make changes to this bug.