Amit Aviram has uploaded a new change for review.
Change subject: ImageUpload-api ......................................................................
ImageUpload-api
Change-Id: Iddf676fb15c88e126811a25e5e97609c6d937422 Bug-Url: https://bugzilla.redhat.com/?????? Signed-off-by: Amit Aviram aaviram@redhat.com --- M client/vdsClient.py M vdsm.spec.in M vdsm/API.py M vdsm/rpc/BindingXMLRPC.py M vdsm/rpc/vdsmapi-schema.json 5 files changed, 60 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/70/41870/1
diff --git a/client/vdsClient.py b/client/vdsClient.py index 375fa1a..fe03aa7 100755 --- a/client/vdsClient.py +++ b/client/vdsClient.py @@ -1585,6 +1585,19 @@ return stats['status']['code'], stats['status']['message'] return 0, ''
+ def do_startImageTransferSession(self, args): + ticket = args[0] + op = args[1] + spId = args[2] + sdId = args[3] + imgId = args[4] + volId = args[5] + stats = self.s.startImageTransferSession(ticket, op, spId, sdId, + imgId, volId) + if stats['status']['code']: + return stats['status']['code'], stats['status']['message'] + return 0, '' + def do_getVmsInfo(self, args): spUUID = args[0] if len(args) >= 2: @@ -2535,6 +2548,11 @@ ' <enabled = true/false>', 'Enable or disable Hosted Engine HA' ' maintenance')), + 'startImageTransferSession': (serv.do_startImageTransferSession, + ('<ticketUUID> <op>', + '<spUUID> <sdUUID> ', + '<imgUUID> <volUUID> ', + 'Start an image transfer session.')), 'deleteImage': (serv.deleteImage, ('<sdUUID> <spUUID> <imgUUID> [<postZero>] [<force>]', 'Delete Image folder with all volumes.', diff --git a/vdsm.spec.in b/vdsm.spec.in index 456a2d9..82fbe9b 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -293,7 +293,7 @@
# GlusterFS client-side RPMs needed for Gluster SD %if 0%{?with_gluster} -Requires: glusterfs >= 3.6.999 +Requires: glusterfs >= 3.5 Requires: glusterfs-cli Requires: glusterfs-api Requires: glusterfs-fuse diff --git a/vdsm/API.py b/vdsm/API.py index 3cdc465..bb41d39 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -1662,6 +1662,14 @@ return errCode['haErr'] return {'status': doneCode}
+ def startImageTransferSession(self, ticket, op, spId, sdId, + imgId, volId): + self.log.info("ImageUploadSessionStart!!: \nticket:%s\nop:%s\n" + "spId:%s\nsdId:%s\nimgId:%s\nvolId:%s", ticket, + op, spId, sdId, imgId, volId) + + return {'status': doneCode} + # take a rough estimate on how much free mem is available for new vm # memTotal = memFree + memCached + mem_used_by_non_qemu + resident . # simply returning (memFree + memCached) is not good enough, as the diff --git a/vdsm/rpc/BindingXMLRPC.py b/vdsm/rpc/BindingXMLRPC.py index 9a1da99..3e92879 100644 --- a/vdsm/rpc/BindingXMLRPC.py +++ b/vdsm/rpc/BindingXMLRPC.py @@ -603,6 +603,12 @@ api = API.Global() return api.setHaMaintenanceMode(mode, enabled)
+ def startImageTransferSession(self, ticket, op, spId, sdId, + imgId, volId): + api = API.Global() + return api.startImageTransferSession(ticket, op, spId, + sdId, imgId, volId) + def domainActivate(self, sdUUID, spUUID, options=None): domain = API.StorageDomain(sdUUID) return domain.activate(spUUID) @@ -1025,6 +1031,7 @@ (self.setMOMPolicy, 'setMOMPolicy'), (self.setMOMPolicyParameters, 'setMOMPolicyParameters'), (self.setHaMaintenanceMode, 'setHaMaintenanceMode'), + (self.startImageTransferSession, 'startImageTransferSession'), (self.vmHotplugDisk, 'hotplugDisk'), (self.vmHotunplugDisk, 'hotunplugDisk'), (self.vmHotplugNic, 'hotplugNic'), diff --git a/vdsm/rpc/vdsmapi-schema.json b/vdsm/rpc/vdsmapi-schema.json index 0c73078..959c24d 100644 --- a/vdsm/rpc/vdsmapi-schema.json +++ b/vdsm/rpc/vdsmapi-schema.json @@ -574,6 +574,8 @@ {'enum': 'HaMaintenanceMode', 'data': ['GLOBAL', 'LOCAL']}
+ + ## # @Host.setHaMaintenanceMode: # @@ -589,6 +591,30 @@ 'data': {'mode': 'HaMaintenanceMode', 'enabled': 'bool'}}
## +# @Host.startImageTransferSession: +# +# Start an image upload session +# +# @ticket: ticket +# +# @op: op +# +# @spId: op +# +# @sdId: op +# +# @imgId: op +# +# @volId: op +# +# Since: 4.14.0 +## +{'command': {'class': 'Host', 'name': 'startImageTransferSession'}, + 'data': {'ticket': 'UUID', 'op': 'str', 'spId': 'UUID', + 'sdId': 'UUID', 'imgId': 'UUID', 'volId': 'UUID'}} + + +## # @TaskDetails: # # A collection of information about a task.
automation@ovirt.org has posted comments on this change.
Change subject: ImageUpload-api ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: ImageUpload-api draft ......................................................................
Patch Set 2:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: ImageUpload-api ......................................................................
Patch Set 3:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: ImageUpload-vdsm side ......................................................................
Patch Set 4:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: ImageUpload-vdsm side ......................................................................
Patch Set 5:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: ImageUpload-vdsm side ......................................................................
Patch Set 6:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: api, storage: Upload Image ......................................................................
Patch Set 7:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: api, storage: Upload Image ......................................................................
Patch Set 8:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: api, storage: Upload Image ......................................................................
Patch Set 9:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
vdsm-patches@lists.fedorahosted.org