Juan Hernandez has uploaded a new change for review. Change subject: sdk: Regenerate against the latest API ......................................................................
sdk: Regenerate against the latest API This patch regenerates the SDK using the latest API obtained from the engine built from commit 71d093. Relevant changes: - Add "UsageMessage" class to represent detailed error messages returned by the engine. - Document "async" and "grace_period.expire" parameters of relevant actions. - Added "stop_time" attribute to VM class. Change-Id: I465ac39e428b0bbd9f0ecd4552e035fbc051e8e7 Signed-off-by: Juan Hernandez <[email protected]> --- M src/ovirtsdk/api.py M src/ovirtsdk/infrastructure/brokers.py M src/ovirtsdk/xml/params.py 3 files changed, 210 insertions(+), 12 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-sdk refs/changes/08/23108/1 diff --git a/src/ovirtsdk/api.py b/src/ovirtsdk/api.py index 0230377..fbbf537 100644 --- a/src/ovirtsdk/api.py +++ b/src/ovirtsdk/api.py @@ -20,7 +20,7 @@ ############ GENERATED CODE ############ ######################################## -'''Generated at: 2013-12-24 11:16:42.676341''' +'''Generated at: 2014-01-09 19:55:43.384213''' import types import urlparse diff --git a/src/ovirtsdk/infrastructure/brokers.py b/src/ovirtsdk/infrastructure/brokers.py index 693292e..e9189d9 100644 --- a/src/ovirtsdk/infrastructure/brokers.py +++ b/src/ovirtsdk/infrastructure/brokers.py @@ -20,7 +20,7 @@ ############ GENERATED CODE ############ ######################################## -'''Generated at: 2013-12-24 11:16:42.674331''' +'''Generated at: 2014-01-09 19:55:43.383562''' from ovirtsdk.xml import params @@ -230,6 +230,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -254,6 +256,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -280,6 +284,8 @@ @param action.resolution_type: string [@param action.host.id|name: string] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -444,6 +450,8 @@ { @ivar brick.name: string } + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -472,6 +480,8 @@ { @ivar brick.name: string } + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -500,6 +510,8 @@ { @ivar brick.name: string } + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -526,6 +538,8 @@ [@param action.fix_layout: boolean] [@param action.force: boolean] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -550,6 +564,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -576,6 +592,8 @@ @param action.option.name: string @param action.force: boolean + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -602,6 +620,8 @@ @param action.option.name: string @param action.option.value: string + @param action.async: boolean + @param action.grace_period.expiry: long [@param correlation_id: any string] @return Action: @@ -627,6 +647,8 @@ @type Action: [@param action.force: boolean] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -652,6 +674,8 @@ @type Action: [@param action.force: boolean] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -676,6 +700,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -743,6 +769,8 @@ @param action.brick.server_id: string @param action.brick.brick_dir: string [@param action.force: boolean] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -1723,7 +1751,8 @@ @type Action: [@param action.force: boolean] - [@param async: boolean (true|false)] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return None: @@ -4412,6 +4441,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -4436,6 +4467,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -4508,6 +4541,8 @@ @type Action: @param storagedomain.id|name: string + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -7049,7 +7084,8 @@ @type Action: [@param action.force: boolean] - [@param async: boolean (true|false)] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return None: @@ -7165,6 +7201,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -7208,6 +7246,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -7228,6 +7268,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -7249,6 +7291,8 @@ @type Action: @param action.fence_type: string + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -7269,6 +7313,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -7299,6 +7345,8 @@ [@param action.ssh.user.user_name: string] [@param action.ssh.user.password: string] [@param action.image: string] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -7320,6 +7368,8 @@ @type Action: @param action.iscsi.address: string + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -7342,6 +7392,8 @@ @param action.iscsi.address: string @param action.iscsi.target: string + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -7599,6 +7651,7 @@ @type Action: [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -7912,6 +7965,8 @@ [@param host_nic.name|id: string] } [@ivar host_nic.override_configuration: boolean] + [@ivar action.async: boolean] + [@ivar action.grace_period.expiry: long] } [@param action.checkConnectivity: boolean] [@param action.connectivityTimeout: int] @@ -8714,6 +8769,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -8736,6 +8793,8 @@ @param action.status.state: string [@param action.force: boolean] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -8781,6 +8840,8 @@ [@param action.force: boolean] [@param action.status.state: string] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -10700,6 +10761,8 @@ @type Action: @param storagedomain.id|name: string + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -11833,6 +11896,8 @@ { [@ivar disk.id: string] } + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -12137,6 +12202,7 @@ { [@ivar disk.id: string] } + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -12977,7 +13043,8 @@ [@param action.storage_domain.id: string] [@param action.force: boolean] - [@param async: boolean (true|false)] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return None: @@ -13030,6 +13097,8 @@ @type Action: @param storagedomain.id|name: string + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -14756,7 +14825,8 @@ [@param action.force: boolean] [@param action.vm.disks.detach_only: boolean] - [@param async: boolean (true|false)] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return None: @@ -14878,6 +14948,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -14970,6 +15042,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -15063,6 +15137,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -15083,6 +15159,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -15104,6 +15182,8 @@ @type Action: [@param action.ticket.value: string] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -15472,7 +15552,8 @@ @type Action: @param action.detach: boolean - [@param async: boolean (true|false)] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return None: @@ -15535,6 +15616,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -15559,6 +15642,8 @@ ''' @type Action: + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -15584,6 +15669,8 @@ @type Action: @param storagedomain.id|name: string + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -16976,6 +17063,8 @@ @type Action: [@param action.restore_memory: boolean] + [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: @@ -18386,6 +18475,7 @@ @type Action: [@param action.async: boolean] + [@param action.grace_period.expiry: long] [@param correlation_id: any string] @return Action: diff --git a/src/ovirtsdk/xml/params.py b/src/ovirtsdk/xml/params.py index 96ad352..31407e7 100644 --- a/src/ovirtsdk/xml/params.py +++ b/src/ovirtsdk/xml/params.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # -# Generated Tue Dec 24 11:16:27 2013 by generateDS.py version 2.9a. +# Generated Thu Jan 9 19:55:31 2014 by generateDS.py version 2.9a. # import sys @@ -1132,6 +1132,97 @@ detail_ = self.gds_validate_string(detail_, node, 'detail') self.detail = detail_ # end class Fault + + +class UsageMessage(GeneratedsSuper): + subclass = None + superclass = None + def __init__(self, message=None, detailedLink=None): + self.message = message + self.detailedLink = detailedLink + def factory(*args_, **kwargs_): + if UsageMessage.subclass: + return UsageMessage.subclass(*args_, **kwargs_) + else: + return UsageMessage(*args_, **kwargs_) + factory = staticmethod(factory) + def get_message(self): return self.message + def set_message(self, message): self.message = message + def get_detailedLink(self): return self.detailedLink + def set_detailedLink(self, detailedLink): self.detailedLink = detailedLink + def hasContent_(self): + if ( + self.message is not None or + self.detailedLink is not None + ): + return True + else: + return False + def export(self, outfile, level, namespace_='', name_='UsageMessage', namespacedef_='', pretty_print=True): + if pretty_print: + eol_ = '\n' + else: + eol_ = '' + showIndent(outfile, level, pretty_print) + outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) + already_processed = set() + self.exportAttributes(outfile, level, already_processed, namespace_, name_='UsageMessage') + if self.hasContent_(): + outfile.write('>%s' % (eol_, )) + self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print) + showIndent(outfile, level, pretty_print) + outfile.write('</%s%s>%s' % (namespace_, name_, eol_)) + else: + outfile.write('/>%s' % (eol_, )) + def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='UsageMessage'): + pass + def exportChildren(self, outfile, level, namespace_='', name_='UsageMessage', fromsubclass_=False, pretty_print=True): + if pretty_print: + eol_ = '\n' + else: + eol_ = '' + if self.message is not None: + showIndent(outfile, level, pretty_print) + outfile.write('<%smessage>%s</%smessage>%s' % (namespace_, self.gds_format_string(quote_xml(self.message).encode(ExternalEncoding), input_name='message'), namespace_, eol_)) + if self.detailedLink is not None: + self.detailedLink.export(outfile, level, namespace_, name_='detailedLink', pretty_print=pretty_print) + def exportLiteral(self, outfile, level, name_='UsageMessage'): + level += 1 + already_processed = set() + self.exportLiteralAttributes(outfile, level, already_processed, name_) + if self.hasContent_(): + self.exportLiteralChildren(outfile, level, name_) + def exportLiteralAttributes(self, outfile, level, already_processed, name_): + pass + def exportLiteralChildren(self, outfile, level, name_): + if self.message is not None: + showIndent(outfile, level) + outfile.write('message=%s,\n' % quote_python(self.message).encode(ExternalEncoding)) + if self.detailedLink is not None: + showIndent(outfile, level) + outfile.write('detailedLink=model_.detailedLink(\n') + self.detailedLink.exportLiteral(outfile, level) + showIndent(outfile, level) + outfile.write('),\n') + def build(self, node): + already_processed = set() + self.buildAttributes(node, node.attrib, already_processed) + for child in node: + nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] + self.buildChildren(child, node, nodeName_) + def buildAttributes(self, node, attrs, already_processed): + pass + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + if nodeName_ == 'message': + message_ = child_.text + message_ = self.gds_validate_string(message_, node, 'message') + self.message = message_ + elif nodeName_ == 'detailedLink': + class_obj_ = self.get_class_obj_(child_, DetailedLink) + obj_ = class_obj_.factory() + obj_.build(child_) + self.set_detailedLink(obj_) +# end class UsageMessage class GracePeriod(GeneratedsSuper): @@ -16625,7 +16716,7 @@ class VM(BaseResource): subclass = None superclass = BaseResource - def __init__(self, actions=None, href=None, id=None, name=None, description=None, comment=None, creation_status=None, link=None, type_=None, status=None, memory=None, cpu=None, cpu_shares=None, os=None, high_availability=None, display=None, host=None, cluster=None, template=None, storage_domain=None, start_time=None, creation_time=None, origin=None, stateless=None, delete_protected=None, console=None, timezone=None, domain=None, custom_properties=None, payloads=None, statistics=None, disks=None, initialization=None, nics=None, tags=None, snapshots=None, placement_policy=None, memory_policy=None, guest_info=None, quota=None, usb=None, tunnel_migration=None, virtio_scsi=None, permissions=None, vmpool=None, cdroms=None, floppies=None, reported_devices=None, watchdogs=None, extensiontype_=None): + def __init__(self, actions=None, href=None, id=None, name=None, description=None, comment=None, creation_status=None, link=None, type_=None, status=None, memory=None, cpu=None, cpu_shares=None, os=None, high_availability=None, display=None, host=None, cluster=None, template=None, storage_domain=None, start_time=None, stop_time=None, creation_time=None, origin=None, stateless=None, delete_protected=None, console=None, timezone=None, domain=None, custom_properties=None, payloads=None, statistics=None, disks=None, initialization=None, nics=None, tags=None, snapshots=None, placement_policy=None, memory_policy=None, guest_info=None, quota=None, usb=None, tunnel_migration=None, virtio_scsi=None, permissions=None, vmpool=None, cdroms=None, floppies=None, reported_devices=None, watchdogs=None, extensiontype_=None): super(VM, self).__init__(actions, href, id, name, description, comment, creation_status, link, extensiontype_, ) self.type_ = type_ self.status = status @@ -16640,6 +16731,7 @@ self.template = template self.storage_domain = storage_domain self.start_time = start_time + self.stop_time = stop_time self.creation_time = creation_time self.origin = origin self.stateless = stateless @@ -16701,6 +16793,8 @@ def set_storage_domain(self, storage_domain): self.storage_domain = storage_domain def get_start_time(self): return self.start_time def set_start_time(self, start_time): self.start_time = start_time + def get_stop_time(self): return self.stop_time + def set_stop_time(self, stop_time): self.stop_time = stop_time def get_creation_time(self): return self.creation_time def set_creation_time(self, creation_time): self.creation_time = creation_time def get_origin(self): return self.origin @@ -16774,6 +16868,7 @@ self.template is not None or self.storage_domain is not None or self.start_time is not None or + self.stop_time is not None or self.creation_time is not None or self.origin is not None or self.stateless is not None or @@ -16865,6 +16960,9 @@ if self.start_time is not None: showIndent(outfile, level, pretty_print) outfile.write('<%sstart_time>%s</%sstart_time>%s' % (namespace_, self.gds_format_datetime(self.start_time, input_name='start_time'), namespace_, eol_)) + if self.stop_time is not None: + showIndent(outfile, level, pretty_print) + outfile.write('<%sstop_time>%s</%sstop_time>%s' % (namespace_, self.gds_format_datetime(self.stop_time, input_name='stop_time'), namespace_, eol_)) if self.creation_time is not None: showIndent(outfile, level, pretty_print) outfile.write('<%screation_time>%s</%screation_time>%s' % (namespace_, self.gds_format_datetime(self.creation_time, input_name='creation_time'), namespace_, eol_)) @@ -17003,6 +17101,9 @@ if self.start_time is not None: showIndent(outfile, level) outfile.write('start_time=datetime_.strptime("%s", "%%Y-%%m-%%dT%%H:%%M:%%S"),\n' % self.gds_format_datetime(self.start_time, input_name='start_time')) + if self.stop_time is not None: + showIndent(outfile, level) + outfile.write('stop_time=datetime_.strptime("%s", "%%Y-%%m-%%dT%%H:%%M:%%S"),\n' % self.gds_format_datetime(self.stop_time, input_name='stop_time')) if self.creation_time is not None: showIndent(outfile, level) outfile.write('creation_time=datetime_.strptime("%s", "%%Y-%%m-%%dT%%H:%%M:%%S"),\n' % self.gds_format_datetime(self.creation_time, input_name='creation_time')) @@ -17226,6 +17327,10 @@ sval_ = child_.text dval_ = self.gds_parse_datetime(sval_, node, 'start_time') self.start_time = dval_ + elif nodeName_ == 'stop_time': + sval_ = child_.text + dval_ = self.gds_parse_datetime(sval_, node, 'stop_time') + self.stop_time = dval_ elif nodeName_ == 'creation_time': sval_ = child_.text dval_ = self.gds_parse_datetime(sval_, node, 'creation_time') @@ -20094,8 +20199,8 @@ class Snapshot(VM): subclass = None superclass = VM - def __init__(self, actions=None, href=None, id=None, name=None, description=None, comment=None, creation_status=None, link=None, type_=None, status=None, memory=None, cpu=None, cpu_shares=None, os=None, high_availability=None, display=None, host=None, cluster=None, template=None, storage_domain=None, start_time=None, creation_time=None, origin=None, stateless=None, delete_protected=None, console=None, timezone=None, domain=None, custom_properties=None, payloads=None, statistics=None, disks=None, initialization=None, nics=None, tags=None, snapshots=None, placement_policy=None, memory_policy=None, guest_info=None, quota=None, usb=None, tunnel_migration=None, virtio_scsi=None, permissions=None, vmpool=None, cdroms=None, floppies=None, reported_devices=None, watchdogs=None, vm=None, date=None, snapshot_status=None, persist_memorystate=None): - super(Snapshot, self).__init__(actions, href, id, name, description, comment, creation_status, link, type_, status, memory, cpu, cpu_shares, os, high_availability, display, host, cluster, template, storage_domain, start_time, creation_time, origin, stateless, delete_protected, console, timezone, domain, custom_properties, payloads, statistics, disks, initialization, nics, tags, snapshots, placement_policy, memory_policy, guest_info, quota, usb, tunnel_migration, virtio_scsi, permissions, vmpool, cdroms, floppies, reported_devices, watchdogs, ) + def __init__(self, actions=None, href=None, id=None, name=None, description=None, comment=None, creation_status=None, link=None, type_=None, status=None, memory=None, cpu=None, cpu_shares=None, os=None, high_availability=None, display=None, host=None, cluster=None, template=None, storage_domain=None, start_time=None, stop_time=None, creation_time=None, origin=None, stateless=None, delete_protected=None, console=None, timezone=None, domain=None, custom_properties=None, payloads=None, statistics=None, disks=None, initialization=None, nics=None, tags=None, snapshots=None, placement_policy=None, memory_policy=None, guest_info=None, quota=None, usb=None, tunnel_migration=None, virtio_scsi=None, permissions=None, vmpool=None, cdroms=None, floppies=None, reported_devices=None, watchdogs=None, vm=None, date=None, snapshot_status=None, persist_memorystate=None): + super(Snapshot, self).__init__(actions, href, id, name, description, comment, creation_status, link, type_, status, memory, cpu, cpu_shares, os, high_availability, display, host, cluster, template, storage_domain, start_time, stop_time, creation_time, origin, stateless, delete_protected, console, timezone, domain, custom_properties, payloads, statistics, disks, initialization, nics, tags, snapshots, placement_policy, memory_policy, guest_info, quota, usb, tunnel_migration, virtio_scsi, permissions, vmpool, cdroms, floppies, reported_devices, watchdogs, ) self.vm = vm self.date = date self.snapshot_status = snapshot_status @@ -29323,6 +29428,7 @@ 'payloads': Payloads, 'authorized_keys': AuthorizedKeys, 'permission': Permission, + 'usage_message': UsageMessage, 'logical_unit': LogicalUnit, 'boot_devices': BootDevices, 'reported_device': ReportedDevice, @@ -29845,6 +29951,7 @@ "TransparentHugePages", "TransportTypes", "Url", + "UsageMessage", "Usages", "Usb", "User", @@ -30085,6 +30192,7 @@ "transparent_hugepages" : TransparentHugePages, "transport_types" : TransportTypes, "url" : Url, + "usage_message" : UsageMessage, "usages" : Usages, "usb" : Usb, "user" : User, @@ -30124,4 +30232,4 @@ """ return _rootClassMap.get(rootTag) -# End NOT_GENERATED \ No newline at end of file +# End NOT_GENERATED -- To view, visit http://gerrit.ovirt.org/23108 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I465ac39e428b0bbd9f0ecd4552e035fbc051e8e7 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
