Adam Litke has uploaded a new change for review.
Change subject: rest-api: Model volumes ......................................................................
rest-api: Model volumes
API Implemented: ---------------- /api/storagedomains/<sdUUID>/volumes * Manipulate all volumes associated with a storage domain /api/storagedomains/<sdUUID>/images/<imgUUID/volumes * Manipulate all volumes associated with an image
Actions: .../volumes/create - Create a new volume .../volumes/<id>/delete - Delete a volume
Not all available functionality is implemented yet (eg. creating child volumes.) Remaining functionality can be added in subsequent patches.
Change-Id: Ic5a34e02c84c3668dff883b3a618d420edcf60be Signed-off-by: Adam Litke agl@us.ibm.com --- M vdsm/rest/Controller.py M vdsm/rest/templates/Makefile.am M vdsm/rest/templates/api.xsd M vdsm/rest/templates/rsdl.xml A vdsm/rest/templates/volume.json.x A vdsm/rest/templates/volume.xml.x A vdsm/rest/templates/volumes.json.x A vdsm/rest/templates/volumes.xml.x 8 files changed, 402 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/53/3753/1 -- To view, visit http://gerrit.ovirt.org/3753 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5a34e02c84c3668dff883b3a618d420edcf60be Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com
Mark Wu has posted comments on this change.
Change subject: rest-api: Model volumes ......................................................................
Patch Set 6: I would prefer that you didn't submit this
(1 inline comment)
Sorry for not raising this problem earlier. I just notice this problem when I did some test yesterday.
.................................................... File vdsm/rest/Controller.py Line 362: role = Volume.ROLES.get(self.info['voltype'].lower(), None) According to the definition of createVolume: def create(self, size, volFormat, preallocate, diskType, desc, srcImgUUID, srcVolUUID): return self._irs.createVolume(self._sdUUID, self._spUUID, self._imgUUID, size, volFormat, preallocate, diskType, self._UUID, desc, srcImgUUID, srcVolUUID)
I think the parameter 'diskType' is misused here. What the api expects is diskType:
# Disk type UNKNOWN_DISK_TYPE = 0 SYSTEM_DISK_TYPE = 1 DATA_DISK_TYPE = 2 SHARED_DISK_TYPE = 3 SWAP_DISK_TYPE = 4 TEMP_DISK_TYPE = 5
, not the volume role, which is only used in copyImage() to create a template. In other cases, we needn't care about the volume role. vdsm can set it properly: new created volume except template is always leaf node. If another volume created based on it, its role will be changed to internal. And the role of template is shared, which is set on creation. That's my understanding.
-- To view, visit http://gerrit.ovirt.org/3753 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic5a34e02c84c3668dff883b3a618d420edcf60be Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Adam Litke has posted comments on this change.
Change subject: rest-api: Model volumes ......................................................................
Patch Set 6: (1 inline comment)
.................................................... File vdsm/rest/Controller.py Line 362: role = Volume.ROLES.get(self.info['voltype'].lower(), None) Yes, correct. Thanks for pointing it out.
-- To view, visit http://gerrit.ovirt.org/3753 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic5a34e02c84c3668dff883b3a618d420edcf60be Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Adam Litke has posted comments on this change.
Change subject: rest-api: Model volumes ......................................................................
Patch Set 8: Verified
-- To view, visit http://gerrit.ovirt.org/3753 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic5a34e02c84c3668dff883b3a618d420edcf60be Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: rest-api: Model volumes ......................................................................
Patch Set 8: Looks good to me, approved
This has waited for a serious review for way too long. I am taking this series under the assumption that if serious changes to the REST API are still acceptable.
-- To view, visit http://gerrit.ovirt.org/3753 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ic5a34e02c84c3668dff883b3a618d420edcf60be Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: rest-api: Model volumes ......................................................................
rest-api: Model volumes
API Implemented: ---------------- /api/storagedomains/<sdUUID>/volumes * Manipulate all volumes associated with a storage domain /api/storagedomains/<sdUUID>/images/<imgUUID/volumes * Manipulate all volumes associated with an image
Actions: .../volumes/create - Create a new volume .../volumes/<id>/delete - Delete a volume
Not all available functionality is implemented yet (eg. creating child volumes.) Remaining functionality can be added in subsequent patches.
Change-Id: Ic5a34e02c84c3668dff883b3a618d420edcf60be Signed-off-by: Adam Litke agl@us.ibm.com --- M vdsm/rest/Controller.py M vdsm/rest/templates/Makefile.am M vdsm/rest/templates/api.xsd M vdsm/rest/templates/rsdl.xml A vdsm/rest/templates/volume.json.x A vdsm/rest/templates/volume.xml.x A vdsm/rest/templates/volumes.json.x A vdsm/rest/templates/volumes.xml.x 8 files changed, 426 insertions(+), 0 deletions(-)
Approvals: Adam Litke: Verified Dan Kenigsberg: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/3753 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: Ic5a34e02c84c3668dff883b3a618d420edcf60be Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
vdsm-patches@lists.fedorahosted.org