#!/usr/bin/env python # # Generated Thu Jul 13 11:36:46 2017 by generateDS.py. # import sys import getopt from string import lower as str_lower from xml.dom import minidom from xml.dom import Node # # If you have installed IPython you can uncomment and use the following. # IPython is available from http://ipython.scipy.org/. # ## from IPython.Shell import IPShellEmbed ## args = '' ## ipshell = IPShellEmbed(args, ## banner = 'Dropping into IPython', ## exit_msg = 'Leaving Interpreter, back to program.') # Then use the following line where and when you want to drop into the # IPython shell: # ipshell(' -- Entering ipshell.\nHit Ctrl-D to exit') # # Support/utility functions. # def showIndent(outfile, level): for idx in range(level): outfile.write(' ') def quote_xml(inStr): s1 = (isinstance(inStr, basestring) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') s1 = s1.replace('>', '>') return s1 def quote_attrib(inStr): s1 = (isinstance(inStr, basestring) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('"', '"') s1 = s1.replace('<', '<') s1 = s1.replace('>', '>') return s1 def quote_python(inStr): s1 = inStr if s1.find("'") == -1: if s1.find('\n') == -1: return "'%s'" % s1 else: return "'''%s'''" % s1 else: if s1.find('"') != -1: s1 = s1.replace('"', '\\"') if s1.find('\n') == -1: return '"%s"' % s1 else: return '"""%s"""' % s1 class MixedContainer: # Constants for category: CategoryNone = 0 CategoryText = 1 CategorySimple = 2 CategoryComplex = 3 # Constants for content_type: TypeNone = 0 TypeText = 1 TypeString = 2 TypeInteger = 3 TypeFloat = 4 TypeDecimal = 5 TypeDouble = 6 TypeBoolean = 7 def __init__(self, category, content_type, name, value): self.category = category self.content_type = content_type self.name = name self.value = value def getCategory(self): return self.category def getContenttype(self, content_type): return self.content_type def getValue(self): return self.value def getName(self): return self.name def export(self, outfile, level, name): if self.category == MixedContainer.CategoryText: outfile.write(self.value) elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex self.value.export(outfile, level, name) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s' % (self.name, self.value, self.name)) elif self.content_type == MixedContainer.TypeInteger or \ self.content_type == MixedContainer.TypeBoolean: outfile.write('<%s>%d' % (self.name, self.value, self.name)) elif self.content_type == MixedContainer.TypeFloat or \ self.content_type == MixedContainer.TypeDecimal: outfile.write('<%s>%f' % (self.name, self.value, self.name)) elif self.content_type == MixedContainer.TypeDouble: outfile.write('<%s>%g' % (self.name, self.value, self.name)) def exportLiteral(self, outfile, level, name): if self.category == MixedContainer.CategoryText: showIndent(outfile, level) outfile.write('MixedContainer(%d, %d, "%s", "%s"),\n' % \ (self.category, self.content_type, self.name, self.value)) elif self.category == MixedContainer.CategorySimple: showIndent(outfile, level) outfile.write('MixedContainer(%d, %d, "%s", "%s"),\n' % \ (self.category, self.content_type, self.name, self.value)) else: # category == MixedContainer.CategoryComplex showIndent(outfile, level) outfile.write('MixedContainer(%d, %d, "%s",\n' % \ (self.category, self.content_type, self.name,)) self.value.exportLiteral(outfile, level + 1) showIndent(outfile, level) outfile.write(')\n') class _MemberSpec(object): def __init__(self, name='', data_type='', container=0): self.name = name self.data_type = data_type self.container = container def set_name(self, name): self.name = name def get_name(self): return self.name def set_data_type(self, data_type): self.data_type = data_type def get_data_type(self): return self.data_type def set_container(self, container): self.container = container def get_container(self): return self.container # # Data representation classes. # class PlainData: subclass = None superclass = None def __init__(self, plain_data=''): self.plain_data = plain_data def factory(*args_, **kwargs_): if PlainData.subclass: return PlainData.subclass(*args_, **kwargs_) else: return PlainData(*args_, **kwargs_) factory = staticmethod(factory) def get_plain_data(self): return self.plain_data def set_plain_data(self, plain_data): self.plain_data = plain_data def export(self, outfile, level, namespace_='', name_='PlainData'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='PlainData') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='PlainData'): pass def exportChildren(self, outfile, level, namespace_='', name_='PlainData'): showIndent(outfile, level) outfile.write('<%splain-data>%s\n' % (namespace_, quote_xml(self.get_plain_data()), namespace_)) def exportLiteral(self, outfile, level, name_='PlainData'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('plain_data=%s,\n' % quote_python(self.get_plain_data())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'plain-data': plain_data_ = '' for text__content_ in child_.childNodes: plain_data_ += text__content_.nodeValue self.plain_data = plain_data_ # end class PlainData class plain_data: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if plain_data.subclass: return plain_data.subclass(*args_, **kwargs_) else: return plain_data(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='plain-data'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='plain-data') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='plain-data'): pass def exportChildren(self, outfile, level, namespace_='', name_='plain-data'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='plain-data'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class plain_data class RestoreTaskResult: subclass = None superclass = None def __init__(self, task_id='', conflicts_description=None, dump_validity_error=None, dump_overview=None): self.task_id = task_id self.conflicts_description = conflicts_description if dump_validity_error is None: self.dump_validity_error = [] else: self.dump_validity_error = dump_validity_error self.dump_overview = dump_overview def factory(*args_, **kwargs_): if RestoreTaskResult.subclass: return RestoreTaskResult.subclass(*args_, **kwargs_) else: return RestoreTaskResult(*args_, **kwargs_) factory = staticmethod(factory) def get_conflicts_description(self): return self.conflicts_description def set_conflicts_description(self, conflicts_description): self.conflicts_description = conflicts_description def get_dump_validity_error(self): return self.dump_validity_error def set_dump_validity_error(self, dump_validity_error): self.dump_validity_error = dump_validity_error def add_dump_validity_error(self, value): self.dump_validity_error.append(value) def insert_dump_validity_error(self, index, value): self.dump_validity_error[index] = value def validate_DumpValidityError(self, value): # validate type DumpValidityError pass def get_dump_overview(self): return self.dump_overview def set_dump_overview(self, dump_overview): self.dump_overview = dump_overview def get_task_id(self): return self.task_id def set_task_id(self, task_id): self.task_id = task_id def export(self, outfile, level, namespace_='', name_='RestoreTaskResult'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='RestoreTaskResult') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='RestoreTaskResult'): if self.get_task_id() is not None: outfile.write(' task-id="%s"' % (quote_attrib(self.get_task_id()), )) def exportChildren(self, outfile, level, namespace_='', name_='RestoreTaskResult'): if self.conflicts_description: self.conflicts_description.export(outfile, level, namespace_, name_='conflicts-description', ) for dump_validity_error_ in self.get_dump_validity_error(): dump_validity_error_.export(outfile, level, namespace_, name_='dump-validity-error') if self.dump_overview: self.dump_overview.export(outfile, level, namespace_, name_='dump-overview', ) def exportLiteral(self, outfile, level, name_='RestoreTaskResult'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('task_id = "%s",\n' % (self.get_task_id(),)) def exportLiteralChildren(self, outfile, level, name_): if self.conflicts_description: showIndent(outfile, level) outfile.write('conflicts_description=ConflictsDescription(\n') self.conflicts_description.exportLiteral(outfile, level, name_='conflicts_description') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('dump_validity_error=[\n') level += 1 for dump_validity_error in self.dump_validity_error: showIndent(outfile, level) outfile.write('DumpValidityError(\n') dump_validity_error.exportLiteral(outfile, level, name_='dump_validity_error') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') if self.dump_overview: showIndent(outfile, level) outfile.write('dump_overview=DumpOverview(\n') self.dump_overview.exportLiteral(outfile, level, name_='dump_overview') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('task-id'): self.task_id = attrs.get('task-id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'conflicts-description': obj_ = ConflictsDescription.factory() obj_.build(child_) self.set_conflicts_description(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-validity-error': obj_ = DumpValidityError.factory() obj_.build(child_) self.dump_validity_error.append(obj_) self.validate_DumpValidityError(self.dump_validity_error) # validate type DumpValidityError elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-overview': obj_ = DumpOverview.factory() obj_.build(child_) self.set_dump_overview(obj_) # end class RestoreTaskResult class DumpValidityError: subclass = None superclass = None def __init__(self, typexx='', valueOf_=''): self.typexx = typexx self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if DumpValidityError.subclass: return DumpValidityError.subclass(*args_, **kwargs_) else: return DumpValidityError(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='DumpValidityError'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpValidityError') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpValidityError'): if self.get_type() is not None: outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) def exportChildren(self, outfile, level, namespace_='', name_='DumpValidityError'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='DumpValidityError'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('type'): self.typexx = attrs.get('type').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class DumpValidityError class ResourceUsageReasonDescription: subclass = None superclass = None def __init__(self, resource_class='', requested_value='', resource_type='', available_value='', plesk_object_identifier=None): self.resource_class = resource_class self.requested_value = requested_value self.resource_type = resource_type self.available_value = available_value self.plesk_object_identifier = plesk_object_identifier def factory(*args_, **kwargs_): if ResourceUsageReasonDescription.subclass: return ResourceUsageReasonDescription.subclass(*args_, **kwargs_) else: return ResourceUsageReasonDescription(*args_, **kwargs_) factory = staticmethod(factory) def get_plesk_object_identifier(self): return self.plesk_object_identifier def set_plesk_object_identifier(self, plesk_object_identifier): self.plesk_object_identifier = plesk_object_identifier def get_resource_class(self): return self.resource_class def set_resource_class(self, resource_class): self.resource_class = resource_class def get_requested_value(self): return self.requested_value def set_requested_value(self, requested_value): self.requested_value = requested_value def get_resource_type(self): return self.resource_type def set_resource_type(self, resource_type): self.resource_type = resource_type def get_available_value(self): return self.available_value def set_available_value(self, available_value): self.available_value = available_value def export(self, outfile, level, namespace_='', name_='ResourceUsageReasonDescription'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResourceUsageReasonDescription') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResourceUsageReasonDescription'): if self.get_resource_class() is not None: outfile.write(' resource-class="%s"' % (quote_attrib(self.get_resource_class()), )) if self.get_requested_value() is not None: outfile.write(' requested-value="%s"' % (quote_attrib(self.get_requested_value()), )) if self.get_resource_type() is not None: outfile.write(' resource-type="%s"' % (quote_attrib(self.get_resource_type()), )) if self.get_available_value() is not None: outfile.write(' available-value="%s"' % (quote_attrib(self.get_available_value()), )) def exportChildren(self, outfile, level, namespace_='', name_='ResourceUsageReasonDescription'): if self.get_plesk_object_identifier() != None : if self.plesk_object_identifier: self.plesk_object_identifier.export(outfile, level, namespace_, name_='plesk-object-identifier') def exportLiteral(self, outfile, level, name_='ResourceUsageReasonDescription'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('resource_class = "%s",\n' % (self.get_resource_class(),)) showIndent(outfile, level) outfile.write('requested_value = "%s",\n' % (self.get_requested_value(),)) showIndent(outfile, level) outfile.write('resource_type = "%s",\n' % (self.get_resource_type(),)) showIndent(outfile, level) outfile.write('available_value = "%s",\n' % (self.get_available_value(),)) def exportLiteralChildren(self, outfile, level, name_): if self.plesk_object_identifier: showIndent(outfile, level) outfile.write('plesk_object_identifier=PleskObjectIdentifier(\n') self.plesk_object_identifier.exportLiteral(outfile, level, name_='plesk_object_identifier') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('resource-class'): self.resource_class = attrs.get('resource-class').value if attrs.get('requested-value'): self.requested_value = attrs.get('requested-value').value if attrs.get('resource-type'): self.resource_type = attrs.get('resource-type').value if attrs.get('available-value'): self.available_value = attrs.get('available-value').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'plesk-object-identifier': obj_ = PleskObjectIdentifier.factory() obj_.build(child_) self.set_plesk_object_identifier(obj_) # end class ResourceUsageReasonDescription class UniqueResourceReasonDescription: subclass = None superclass = None def __init__(self, resource_class='', resource_type='', value='', plesk_object_identifier=None): self.resource_class = resource_class self.resource_type = resource_type self.value = value self.plesk_object_identifier = plesk_object_identifier def factory(*args_, **kwargs_): if UniqueResourceReasonDescription.subclass: return UniqueResourceReasonDescription.subclass(*args_, **kwargs_) else: return UniqueResourceReasonDescription(*args_, **kwargs_) factory = staticmethod(factory) def get_plesk_object_identifier(self): return self.plesk_object_identifier def set_plesk_object_identifier(self, plesk_object_identifier): self.plesk_object_identifier = plesk_object_identifier def get_resource_class(self): return self.resource_class def set_resource_class(self, resource_class): self.resource_class = resource_class def get_resource_type(self): return self.resource_type def set_resource_type(self, resource_type): self.resource_type = resource_type def get_value(self): return self.value def set_value(self, value): self.value = value def export(self, outfile, level, namespace_='', name_='UniqueResourceReasonDescription'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='UniqueResourceReasonDescription') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='UniqueResourceReasonDescription'): if self.get_resource_class() is not None: outfile.write(' resource-class="%s"' % (quote_attrib(self.get_resource_class()), )) if self.get_resource_type() is not None: outfile.write(' resource-type="%s"' % (quote_attrib(self.get_resource_type()), )) if self.get_value() is not None: outfile.write(' value="%s"' % (quote_attrib(self.get_value()), )) def exportChildren(self, outfile, level, namespace_='', name_='UniqueResourceReasonDescription'): if self.get_plesk_object_identifier() != None : if self.plesk_object_identifier: self.plesk_object_identifier.export(outfile, level, namespace_, name_='plesk-object-identifier') def exportLiteral(self, outfile, level, name_='UniqueResourceReasonDescription'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('resource_class = "%s",\n' % (self.get_resource_class(),)) showIndent(outfile, level) outfile.write('resource_type = "%s",\n' % (self.get_resource_type(),)) showIndent(outfile, level) outfile.write('value = "%s",\n' % (self.get_value(),)) def exportLiteralChildren(self, outfile, level, name_): if self.plesk_object_identifier: showIndent(outfile, level) outfile.write('plesk_object_identifier=PleskObjectIdentifier(\n') self.plesk_object_identifier.exportLiteral(outfile, level, name_='plesk_object_identifier') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('resource-class'): self.resource_class = attrs.get('resource-class').value if attrs.get('resource-type'): self.resource_type = attrs.get('resource-type').value if attrs.get('value'): self.value = attrs.get('value').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'plesk-object-identifier': obj_ = PleskObjectIdentifier.factory() obj_.build(child_) self.set_plesk_object_identifier(obj_) # end class UniqueResourceReasonDescription class TimingReasonDescription: subclass = None superclass = None def __init__(self, plesk_owner_guid='', backup_vendor_guid='', plesk_vendor_guid='', backup_owner_guid='', plesk_object_identifier=None): self.plesk_owner_guid = plesk_owner_guid self.backup_vendor_guid = backup_vendor_guid self.plesk_vendor_guid = plesk_vendor_guid self.backup_owner_guid = backup_owner_guid self.plesk_object_identifier = plesk_object_identifier def factory(*args_, **kwargs_): if TimingReasonDescription.subclass: return TimingReasonDescription.subclass(*args_, **kwargs_) else: return TimingReasonDescription(*args_, **kwargs_) factory = staticmethod(factory) def get_plesk_object_identifier(self): return self.plesk_object_identifier def set_plesk_object_identifier(self, plesk_object_identifier): self.plesk_object_identifier = plesk_object_identifier def get_plesk_owner_guid(self): return self.plesk_owner_guid def set_plesk_owner_guid(self, plesk_owner_guid): self.plesk_owner_guid = plesk_owner_guid def get_backup_vendor_guid(self): return self.backup_vendor_guid def set_backup_vendor_guid(self, backup_vendor_guid): self.backup_vendor_guid = backup_vendor_guid def get_plesk_vendor_guid(self): return self.plesk_vendor_guid def set_plesk_vendor_guid(self, plesk_vendor_guid): self.plesk_vendor_guid = plesk_vendor_guid def get_backup_owner_guid(self): return self.backup_owner_guid def set_backup_owner_guid(self, backup_owner_guid): self.backup_owner_guid = backup_owner_guid def export(self, outfile, level, namespace_='', name_='TimingReasonDescription'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='TimingReasonDescription') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='TimingReasonDescription'): if self.get_plesk_owner_guid() is not None: outfile.write(' plesk-owner-guid="%s"' % (quote_attrib(self.get_plesk_owner_guid()), )) if self.get_backup_vendor_guid() is not None: outfile.write(' backup-vendor-guid="%s"' % (quote_attrib(self.get_backup_vendor_guid()), )) if self.get_plesk_vendor_guid() is not None: outfile.write(' plesk-vendor-guid="%s"' % (quote_attrib(self.get_plesk_vendor_guid()), )) if self.get_backup_owner_guid() is not None: outfile.write(' backup-owner-guid="%s"' % (quote_attrib(self.get_backup_owner_guid()), )) def exportChildren(self, outfile, level, namespace_='', name_='TimingReasonDescription'): if self.get_plesk_object_identifier() != None : if self.plesk_object_identifier: self.plesk_object_identifier.export(outfile, level, namespace_, name_='plesk-object-identifier') def exportLiteral(self, outfile, level, name_='TimingReasonDescription'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('plesk_owner_guid = "%s",\n' % (self.get_plesk_owner_guid(),)) showIndent(outfile, level) outfile.write('backup_vendor_guid = "%s",\n' % (self.get_backup_vendor_guid(),)) showIndent(outfile, level) outfile.write('plesk_vendor_guid = "%s",\n' % (self.get_plesk_vendor_guid(),)) showIndent(outfile, level) outfile.write('backup_owner_guid = "%s",\n' % (self.get_backup_owner_guid(),)) def exportLiteralChildren(self, outfile, level, name_): if self.plesk_object_identifier: showIndent(outfile, level) outfile.write('plesk_object_identifier=PleskObjectIdentifier(\n') self.plesk_object_identifier.exportLiteral(outfile, level, name_='plesk_object_identifier') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('plesk-owner-guid'): self.plesk_owner_guid = attrs.get('plesk-owner-guid').value if attrs.get('backup-vendor-guid'): self.backup_vendor_guid = attrs.get('backup-vendor-guid').value if attrs.get('plesk-vendor-guid'): self.plesk_vendor_guid = attrs.get('plesk-vendor-guid').value if attrs.get('backup-owner-guid'): self.backup_owner_guid = attrs.get('backup-owner-guid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'plesk-object-identifier': obj_ = PleskObjectIdentifier.factory() obj_.build(child_) self.set_plesk_object_identifier(obj_) # end class TimingReasonDescription class ConfigurationReasonDescription: subclass = None superclass = None def __init__(self, required_resource_description=None, plesk_object_identifier=None): self.required_resource_description = required_resource_description if plesk_object_identifier is None: self.plesk_object_identifier = [] else: self.plesk_object_identifier = plesk_object_identifier def factory(*args_, **kwargs_): if ConfigurationReasonDescription.subclass: return ConfigurationReasonDescription.subclass(*args_, **kwargs_) else: return ConfigurationReasonDescription(*args_, **kwargs_) factory = staticmethod(factory) def get_required_resource_description(self): return self.required_resource_description def set_required_resource_description(self, required_resource_description): self.required_resource_description = required_resource_description def get_plesk_object_identifier(self): return self.plesk_object_identifier def set_plesk_object_identifier(self, plesk_object_identifier): self.plesk_object_identifier = plesk_object_identifier def add_plesk_object_identifier(self, value): self.plesk_object_identifier.append(value) def insert_plesk_object_identifier(self, index, value): self.plesk_object_identifier[index] = value def export(self, outfile, level, namespace_='', name_='ConfigurationReasonDescription'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConfigurationReasonDescription') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConfigurationReasonDescription'): pass def exportChildren(self, outfile, level, namespace_='', name_='ConfigurationReasonDescription'): if self.required_resource_description: self.required_resource_description.export(outfile, level, namespace_, name_='required-resource-description', ) for plesk_object_identifier_ in self.get_plesk_object_identifier(): plesk_object_identifier_.export(outfile, level, namespace_, name_='plesk-object-identifier') def exportLiteral(self, outfile, level, name_='ConfigurationReasonDescription'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.required_resource_description: showIndent(outfile, level) outfile.write('required_resource_description=RequiredResourceDescription(\n') self.required_resource_description.exportLiteral(outfile, level, name_='required_resource_description') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('plesk_object_identifier=[\n') level += 1 for plesk_object_identifier in self.plesk_object_identifier: showIndent(outfile, level) outfile.write('PleskObjectIdentifier(\n') plesk_object_identifier.exportLiteral(outfile, level, name_='plesk_object_identifier') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'required-resource-description': obj_ = RequiredResourceDescription.factory() obj_.build(child_) self.set_required_resource_description(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'plesk-object-identifier': obj_ = PleskObjectIdentifier.factory() obj_.build(child_) self.plesk_object_identifier.append(obj_) # end class ConfigurationReasonDescription class RequiredResourceDescription: subclass = None superclass = None def __init__(self, ip=None, database=None, db_server=None, site_app=None, service_plan=None, subscription=None, component=None): self.ip = ip self.database = database self.db_server = db_server self.site_app = site_app self.service_plan = service_plan self.subscription = subscription self.component = component def factory(*args_, **kwargs_): if RequiredResourceDescription.subclass: return RequiredResourceDescription.subclass(*args_, **kwargs_) else: return RequiredResourceDescription(*args_, **kwargs_) factory = staticmethod(factory) def get_ip(self): return self.ip def set_ip(self, ip): self.ip = ip def get_database(self): return self.database def set_database(self, database): self.database = database def get_db_server(self): return self.db_server def set_db_server(self, db_server): self.db_server = db_server def get_site_app(self): return self.site_app def set_site_app(self, site_app): self.site_app = site_app def get_service_plan(self): return self.service_plan def set_service_plan(self, service_plan): self.service_plan = service_plan def get_subscription(self): return self.subscription def set_subscription(self, subscription): self.subscription = subscription def get_component(self): return self.component def set_component(self, component): self.component = component def export(self, outfile, level, namespace_='', name_='RequiredResourceDescription'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='RequiredResourceDescription') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='RequiredResourceDescription'): pass def exportChildren(self, outfile, level, namespace_='', name_='RequiredResourceDescription'): if self.ip: self.ip.export(outfile, level, namespace_, name_='ip', ) if self.database: self.database.export(outfile, level, namespace_, name_='database', ) if self.db_server: self.db_server.export(outfile, level, namespace_, name_='db-server', ) if self.site_app: self.site_app.export(outfile, level, namespace_, name_='site-app', ) if self.service_plan: self.service_plan.export(outfile, level, namespace_, name_='service-plan', ) if self.subscription: self.subscription.export(outfile, level, namespace_, name_='subscription', ) if self.component: self.component.export(outfile, level, namespace_, name_='component', ) def exportLiteral(self, outfile, level, name_='RequiredResourceDescription'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.ip: showIndent(outfile, level) outfile.write('ip=Ip(\n') self.ip.exportLiteral(outfile, level, name_='ip') showIndent(outfile, level) outfile.write('),\n') if self.database: showIndent(outfile, level) outfile.write('database=Database(\n') self.database.exportLiteral(outfile, level, name_='database') showIndent(outfile, level) outfile.write('),\n') if self.db_server: showIndent(outfile, level) outfile.write('db_server=DbServer(\n') self.db_server.exportLiteral(outfile, level, name_='db_server') showIndent(outfile, level) outfile.write('),\n') if self.site_app: showIndent(outfile, level) outfile.write('site_app=SiteApp(\n') self.site_app.exportLiteral(outfile, level, name_='site_app') showIndent(outfile, level) outfile.write('),\n') if self.service_plan: showIndent(outfile, level) outfile.write('service_plan=ServicePlan(\n') self.service_plan.exportLiteral(outfile, level, name_='service_plan') showIndent(outfile, level) outfile.write('),\n') if self.subscription: showIndent(outfile, level) outfile.write('subscription=Subscription(\n') self.subscription.exportLiteral(outfile, level, name_='subscription') showIndent(outfile, level) outfile.write('),\n') if self.component: showIndent(outfile, level) outfile.write('component=ComponentType(\n') self.component.exportLiteral(outfile, level, name_='component') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'ip': obj_ = Ip.factory() obj_.build(child_) self.set_ip(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'database': obj_ = Database.factory() obj_.build(child_) self.set_database(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'db-server': obj_ = DbServer.factory() obj_.build(child_) self.set_db_server(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'site-app': obj_ = SiteApp.factory() obj_.build(child_) self.set_site_app(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'service-plan': obj_ = ServicePlan.factory() obj_.build(child_) self.set_service_plan(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'subscription': obj_ = Subscription.factory() obj_.build(child_) self.set_subscription(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'component': obj_ = ComponentType.factory() obj_.build(child_) self.set_component(obj_) # end class RequiredResourceDescription class Subscription: subclass = None superclass = None def __init__(self, guid='', valueOf_=''): self.guid = guid self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if Subscription.subclass: return Subscription.subclass(*args_, **kwargs_) else: return Subscription(*args_, **kwargs_) factory = staticmethod(factory) def get_guid(self): return self.guid def set_guid(self, guid): self.guid = guid def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='Subscription'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Subscription') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Subscription'): outfile.write(' guid="%s"' % (quote_attrib(self.get_guid()), )) def exportChildren(self, outfile, level, namespace_='', name_='Subscription'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='Subscription'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('guid = "%s",\n' % (self.get_guid(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('guid'): self.guid = attrs.get('guid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class Subscription class ServicePlan: subclass = None superclass = None def __init__(self, guid='', valueOf_=''): self.guid = guid self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ServicePlan.subclass: return ServicePlan.subclass(*args_, **kwargs_) else: return ServicePlan(*args_, **kwargs_) factory = staticmethod(factory) def get_guid(self): return self.guid def set_guid(self, guid): self.guid = guid def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ServicePlan'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ServicePlan') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ServicePlan'): outfile.write(' guid="%s"' % (quote_attrib(self.get_guid()), )) def exportChildren(self, outfile, level, namespace_='', name_='ServicePlan'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ServicePlan'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('guid = "%s",\n' % (self.get_guid(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('guid'): self.guid = attrs.get('guid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ServicePlan class Ip: subclass = None superclass = None def __init__(self, typexx='', value='', valueOf_=''): self.typexx = typexx self.value = value self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if Ip.subclass: return Ip.subclass(*args_, **kwargs_) else: return Ip(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_value(self): return self.value def set_value(self, value): self.value = value def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='Ip'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Ip') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Ip'): if self.get_type() is not None: outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) if self.get_value() is not None: outfile.write(' value="%s"' % (quote_attrib(self.get_value()), )) def exportChildren(self, outfile, level, namespace_='', name_='Ip'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='Ip'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) showIndent(outfile, level) outfile.write('value = "%s",\n' % (self.get_value(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('type'): self.typexx = attrs.get('type').value if attrs.get('value'): self.value = attrs.get('value').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class Ip class Database: subclass = None superclass = None def __init__(self, typexx='', name='', valueOf_=''): self.typexx = typexx self.name = name self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if Database.subclass: return Database.subclass(*args_, **kwargs_) else: return Database(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_name(self): return self.name def set_name(self, name): self.name = name def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='Database'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Database') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Database'): if self.get_type() is not None: outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='Database'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='Database'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('type'): self.typexx = attrs.get('type').value if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class Database class DbServer: subclass = None superclass = None def __init__(self, host='', typexx='', port='', valueOf_=''): self.host = host self.typexx = typexx self.port = port self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if DbServer.subclass: return DbServer.subclass(*args_, **kwargs_) else: return DbServer(*args_, **kwargs_) factory = staticmethod(factory) def get_host(self): return self.host def set_host(self, host): self.host = host def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_port(self): return self.port def set_port(self, port): self.port = port def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='DbServer'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DbServer') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DbServer'): if self.get_host() is not None: outfile.write(' host="%s"' % (quote_attrib(self.get_host()), )) if self.get_type() is not None: outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) if self.get_port() is not None: outfile.write(' port="%s"' % (quote_attrib(self.get_port()), )) def exportChildren(self, outfile, level, namespace_='', name_='DbServer'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='DbServer'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('host = "%s",\n' % (self.get_host(),)) showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) showIndent(outfile, level) outfile.write('port = "%s",\n' % (self.get_port(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('host'): self.host = attrs.get('host').value if attrs.get('type'): self.typexx = attrs.get('type').value if attrs.get('port'): self.port = attrs.get('port').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class DbServer class SiteApp: subclass = None superclass = None def __init__(self, version='', name='', valueOf_=''): self.version = version self.name = name self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if SiteApp.subclass: return SiteApp.subclass(*args_, **kwargs_) else: return SiteApp(*args_, **kwargs_) factory = staticmethod(factory) def get_version(self): return self.version def set_version(self, version): self.version = version def get_name(self): return self.name def set_name(self, name): self.name = name def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='SiteApp'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='SiteApp') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='SiteApp'): if self.get_version() is not None: outfile.write(' version="%s"' % (quote_attrib(self.get_version()), )) if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='SiteApp'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='SiteApp'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('version = "%s",\n' % (self.get_version(),)) showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('version'): self.version = attrs.get('version').value if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class SiteApp class ResourceUsage: subclass = None superclass = None def __init__(self, reason_description=None, resolve_options=None): self.reason_description = reason_description self.resolve_options = resolve_options def factory(*args_, **kwargs_): if ResourceUsage.subclass: return ResourceUsage.subclass(*args_, **kwargs_) else: return ResourceUsage(*args_, **kwargs_) factory = staticmethod(factory) def get_reason_description(self): return self.reason_description def set_reason_description(self, reason_description): self.reason_description = reason_description def get_resolve_options(self): return self.resolve_options def set_resolve_options(self, resolve_options): self.resolve_options = resolve_options def export(self, outfile, level, namespace_='', name_='ResourceUsage'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResourceUsage') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResourceUsage'): pass def exportChildren(self, outfile, level, namespace_='', name_='ResourceUsage'): if self.reason_description: self.reason_description.export(outfile, level, namespace_, name_='reason-description', ) if self.resolve_options: self.resolve_options.export(outfile, level, namespace_, name_='resolve-options', ) def exportLiteral(self, outfile, level, name_='ResourceUsage'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.reason_description: showIndent(outfile, level) outfile.write('reason_description=ResourceUsageReasonDescription(\n') self.reason_description.exportLiteral(outfile, level, name_='reason_description') showIndent(outfile, level) outfile.write('),\n') if self.resolve_options: showIndent(outfile, level) outfile.write('resolve_options=ResolveOptions(\n') self.resolve_options.exportLiteral(outfile, level, name_='resolve_options') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'reason-description': obj_ = ResourceUsageReasonDescription.factory() obj_.build(child_) self.set_reason_description(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resolve-options': obj_ = ResolveOptions.factory() obj_.build(child_) self.set_resolve_options(obj_) # end class ResourceUsage class UniqueResource: subclass = None superclass = None def __init__(self, reason_description=None, resolve_options=None): self.reason_description = reason_description self.resolve_options = resolve_options def factory(*args_, **kwargs_): if UniqueResource.subclass: return UniqueResource.subclass(*args_, **kwargs_) else: return UniqueResource(*args_, **kwargs_) factory = staticmethod(factory) def get_reason_description(self): return self.reason_description def set_reason_description(self, reason_description): self.reason_description = reason_description def get_resolve_options(self): return self.resolve_options def set_resolve_options(self, resolve_options): self.resolve_options = resolve_options def export(self, outfile, level, namespace_='', name_='UniqueResource'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='UniqueResource') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='UniqueResource'): pass def exportChildren(self, outfile, level, namespace_='', name_='UniqueResource'): if self.reason_description: self.reason_description.export(outfile, level, namespace_, name_='reason-description', ) if self.resolve_options: self.resolve_options.export(outfile, level, namespace_, name_='resolve-options', ) def exportLiteral(self, outfile, level, name_='UniqueResource'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.reason_description: showIndent(outfile, level) outfile.write('reason_description=UniqueResourceReasonDescription(\n') self.reason_description.exportLiteral(outfile, level, name_='reason_description') showIndent(outfile, level) outfile.write('),\n') if self.resolve_options: showIndent(outfile, level) outfile.write('resolve_options=ResolveOptions(\n') self.resolve_options.exportLiteral(outfile, level, name_='resolve_options') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'reason-description': obj_ = UniqueResourceReasonDescription.factory() obj_.build(child_) self.set_reason_description(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resolve-options': obj_ = ResolveOptions.factory() obj_.build(child_) self.set_resolve_options(obj_) # end class UniqueResource class Timing: subclass = None superclass = None def __init__(self, reason_description=None, resolve_options=None): self.reason_description = reason_description self.resolve_options = resolve_options def factory(*args_, **kwargs_): if Timing.subclass: return Timing.subclass(*args_, **kwargs_) else: return Timing(*args_, **kwargs_) factory = staticmethod(factory) def get_reason_description(self): return self.reason_description def set_reason_description(self, reason_description): self.reason_description = reason_description def get_resolve_options(self): return self.resolve_options def set_resolve_options(self, resolve_options): self.resolve_options = resolve_options def export(self, outfile, level, namespace_='', name_='Timing'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Timing') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Timing'): pass def exportChildren(self, outfile, level, namespace_='', name_='Timing'): if self.reason_description: self.reason_description.export(outfile, level, namespace_, name_='reason-description', ) if self.resolve_options: self.resolve_options.export(outfile, level, namespace_, name_='resolve-options', ) def exportLiteral(self, outfile, level, name_='Timing'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.reason_description: showIndent(outfile, level) outfile.write('reason_description=TimingReasonDescription(\n') self.reason_description.exportLiteral(outfile, level, name_='reason_description') showIndent(outfile, level) outfile.write('),\n') if self.resolve_options: showIndent(outfile, level) outfile.write('resolve_options=ResolveOptions(\n') self.resolve_options.exportLiteral(outfile, level, name_='resolve_options') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'reason-description': obj_ = TimingReasonDescription.factory() obj_.build(child_) self.set_reason_description(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resolve-options': obj_ = ResolveOptions.factory() obj_.build(child_) self.set_resolve_options(obj_) # end class Timing class Configuration: subclass = None superclass = None def __init__(self, reason_description=None, resolve_options=None): self.reason_description = reason_description self.resolve_options = resolve_options def factory(*args_, **kwargs_): if Configuration.subclass: return Configuration.subclass(*args_, **kwargs_) else: return Configuration(*args_, **kwargs_) factory = staticmethod(factory) def get_reason_description(self): return self.reason_description def set_reason_description(self, reason_description): self.reason_description = reason_description def get_resolve_options(self): return self.resolve_options def set_resolve_options(self, resolve_options): self.resolve_options = resolve_options def export(self, outfile, level, namespace_='', name_='Configuration'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Configuration') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Configuration'): pass def exportChildren(self, outfile, level, namespace_='', name_='Configuration'): if self.reason_description: self.reason_description.export(outfile, level, namespace_, name_='reason-description', ) if self.resolve_options: self.resolve_options.export(outfile, level, namespace_, name_='resolve-options', ) def exportLiteral(self, outfile, level, name_='Configuration'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.reason_description: showIndent(outfile, level) outfile.write('reason_description=ConfigurationReasonDescription(\n') self.reason_description.exportLiteral(outfile, level, name_='reason_description') showIndent(outfile, level) outfile.write('),\n') if self.resolve_options: showIndent(outfile, level) outfile.write('resolve_options=ResolveOptions(\n') self.resolve_options.exportLiteral(outfile, level, name_='resolve_options') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'reason-description': obj_ = ConfigurationReasonDescription.factory() obj_.build(child_) self.set_reason_description(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resolve-options': obj_ = ResolveOptions.factory() obj_.build(child_) self.set_resolve_options(obj_) # end class Configuration class ConflictType: subclass = None superclass = None def __init__(self, resource_usage=None, unique_resource=None, timing=None, configuration=None, business_model=None): self.resource_usage = resource_usage self.unique_resource = unique_resource self.timing = timing self.configuration = configuration self.business_model = business_model def factory(*args_, **kwargs_): if ConflictType.subclass: return ConflictType.subclass(*args_, **kwargs_) else: return ConflictType(*args_, **kwargs_) factory = staticmethod(factory) def get_resource_usage(self): return self.resource_usage def set_resource_usage(self, resource_usage): self.resource_usage = resource_usage def get_unique_resource(self): return self.unique_resource def set_unique_resource(self, unique_resource): self.unique_resource = unique_resource def get_timing(self): return self.timing def set_timing(self, timing): self.timing = timing def get_configuration(self): return self.configuration def set_configuration(self, configuration): self.configuration = configuration def get_business_model(self): return self.business_model def set_business_model(self, business_model): self.business_model = business_model def export(self, outfile, level, namespace_='', name_='ConflictType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConflictType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConflictType'): pass def exportChildren(self, outfile, level, namespace_='', name_='ConflictType'): if self.resource_usage: self.resource_usage.export(outfile, level, namespace_, name_='resource-usage', ) if self.unique_resource: self.unique_resource.export(outfile, level, namespace_, name_='unique-resource', ) if self.timing: self.timing.export(outfile, level, namespace_, name_='timing', ) if self.configuration: self.configuration.export(outfile, level, namespace_, name_='configuration', ) if self.business_model: self.business_model.export(outfile, level, namespace_, name_='business-model', ) def exportLiteral(self, outfile, level, name_='ConflictType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.resource_usage: showIndent(outfile, level) outfile.write('resource_usage=ResourceUsage(\n') self.resource_usage.exportLiteral(outfile, level, name_='resource_usage') showIndent(outfile, level) outfile.write('),\n') if self.unique_resource: showIndent(outfile, level) outfile.write('unique_resource=UniqueResource(\n') self.unique_resource.exportLiteral(outfile, level, name_='unique_resource') showIndent(outfile, level) outfile.write('),\n') if self.timing: showIndent(outfile, level) outfile.write('timing=Timing(\n') self.timing.exportLiteral(outfile, level, name_='timing') showIndent(outfile, level) outfile.write('),\n') if self.configuration: showIndent(outfile, level) outfile.write('configuration=Configuration(\n') self.configuration.exportLiteral(outfile, level, name_='configuration') showIndent(outfile, level) outfile.write('),\n') if self.business_model: showIndent(outfile, level) outfile.write('business_model=BusinessModel(\n') self.business_model.exportLiteral(outfile, level, name_='business_model') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resource-usage': obj_ = ResourceUsage.factory() obj_.build(child_) self.set_resource_usage(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'unique-resource': obj_ = UniqueResource.factory() obj_.build(child_) self.set_unique_resource(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'timing': obj_ = Timing.factory() obj_.build(child_) self.set_timing(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'configuration': obj_ = Configuration.factory() obj_.build(child_) self.set_configuration(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'business-model': obj_ = BusinessModel.factory() obj_.build(child_) self.set_business_model(obj_) # end class ConflictType class ConflictingObjects: subclass = None superclass = None def __init__(self, node=None): if node is None: self.node = [] else: self.node = node def factory(*args_, **kwargs_): if ConflictingObjects.subclass: return ConflictingObjects.subclass(*args_, **kwargs_) else: return ConflictingObjects(*args_, **kwargs_) factory = staticmethod(factory) def get_node(self): return self.node def set_node(self, node): self.node = node def add_node(self, value): self.node.append(value) def insert_node(self, index, value): self.node[index] = value def validate_TransformNode(self, value): # validate type TransformNode pass def export(self, outfile, level, namespace_='', name_='ConflictingObjects'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConflictingObjects') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConflictingObjects'): pass def exportChildren(self, outfile, level, namespace_='', name_='ConflictingObjects'): for node_ in self.get_node(): node_.export(outfile, level, namespace_, name_='node') def exportLiteral(self, outfile, level, name_='ConflictingObjects'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('node=[\n') level += 1 for node in self.node: showIndent(outfile, level) outfile.write('TransformNode(\n') node.exportLiteral(outfile, level, name_='node') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'node': obj_ = TransformNode.factory() obj_.build(child_) self.node.append(obj_) self.validate_TransformNode(self.node) # validate type TransformNode # end class ConflictingObjects class TransformNode: subclass = None superclass = None def __init__(self, children_processing_type='', name='', context=None, attributes=None): self.children_processing_type = children_processing_type self.name = name self.context = context self.attributes = attributes def factory(*args_, **kwargs_): if TransformNode.subclass: return TransformNode.subclass(*args_, **kwargs_) else: return TransformNode(*args_, **kwargs_) factory = staticmethod(factory) def get_context(self): return self.context def set_context(self, context): self.context = context def get_attributes(self): return self.attributes def set_attributes(self, attributes): self.attributes = attributes def get_children_processing_type(self): return self.children_processing_type def set_children_processing_type(self, children_processing_type): self.children_processing_type = children_processing_type def get_name(self): return self.name def set_name(self, name): self.name = name def export(self, outfile, level, namespace_='', name_='TransformNode'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='TransformNode') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='TransformNode'): if self.get_children_processing_type() is not None: outfile.write(' children-processing-type="%s"' % (quote_attrib(self.get_children_processing_type()), )) outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='TransformNode'): if self.get_context() != None : if self.context: self.context.export(outfile, level, namespace_, name_='context') if self.get_attributes() != None : if self.attributes: self.attributes.export(outfile, level, namespace_, name_='attributes') def exportLiteral(self, outfile, level, name_='TransformNode'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('children_processing_type = "%s",\n' % (self.get_children_processing_type(),)) showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): if self.context: showIndent(outfile, level) outfile.write('context=Context(\n') self.context.exportLiteral(outfile, level, name_='context') showIndent(outfile, level) outfile.write('),\n') if self.attributes: showIndent(outfile, level) outfile.write('attributes=Attributes(\n') self.attributes.exportLiteral(outfile, level, name_='attributes') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('children-processing-type'): self.children_processing_type = attrs.get('children-processing-type').value if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'context': obj_ = Context.factory() obj_.build(child_) self.set_context(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'attributes': obj_ = Attributes.factory() obj_.build(child_) self.set_attributes(obj_) # end class TransformNode class Context: subclass = None superclass = None def __init__(self, path=None): if path is None: self.path = [] else: self.path = path def factory(*args_, **kwargs_): if Context.subclass: return Context.subclass(*args_, **kwargs_) else: return Context(*args_, **kwargs_) factory = staticmethod(factory) def get_path(self): return self.path def set_path(self, path): self.path = path def add_path(self, value): self.path.append(value) def insert_path(self, index, value): self.path[index] = value def export(self, outfile, level, namespace_='', name_='Context'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Context') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Context'): pass def exportChildren(self, outfile, level, namespace_='', name_='Context'): for path_ in self.get_path(): showIndent(outfile, level) outfile.write('<%spath>%s\n' % (namespace_, quote_xml(path_), namespace_)) def exportLiteral(self, outfile, level, name_='Context'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('path=[\n') level += 1 for path in self.path: showIndent(outfile, level) outfile.write('%s,\n' % quote_python(path)) level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'path': path_ = '' for text__content_ in child_.childNodes: path_ += text__content_.nodeValue self.path.append(path_) # end class Context class path: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if path.subclass: return path.subclass(*args_, **kwargs_) else: return path(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='path'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='path') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='path'): pass def exportChildren(self, outfile, level, namespace_='', name_='path'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='path'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class path class Attributes: subclass = None superclass = None def __init__(self, attribute=None): if attribute is None: self.attribute = [] else: self.attribute = attribute def factory(*args_, **kwargs_): if Attributes.subclass: return Attributes.subclass(*args_, **kwargs_) else: return Attributes(*args_, **kwargs_) factory = staticmethod(factory) def get_attribute(self): return self.attribute def set_attribute(self, attribute): self.attribute = attribute def add_attribute(self, value): self.attribute.append(value) def insert_attribute(self, index, value): self.attribute[index] = value def export(self, outfile, level, namespace_='', name_='Attributes'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Attributes') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Attributes'): pass def exportChildren(self, outfile, level, namespace_='', name_='Attributes'): for attribute_ in self.get_attribute(): attribute_.export(outfile, level, namespace_, name_='attribute') def exportLiteral(self, outfile, level, name_='Attributes'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('attribute=[\n') level += 1 for attribute in self.attribute: showIndent(outfile, level) outfile.write('Attribute(\n') attribute.exportLiteral(outfile, level, name_='attribute') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'attribute': obj_ = Attribute.factory() obj_.build(child_) self.attribute.append(obj_) # end class Attributes class Attribute: subclass = None superclass = None def __init__(self, name='', value='', valueOf_='', mixedclass_=None, content_=None): self.name = name self.value = value if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if Attribute.subclass: return Attribute.subclass(*args_, **kwargs_) else: return Attribute(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_value(self): return self.value def set_value(self, value): self.value = value def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='Attribute'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Attribute') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Attribute'): if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) if self.get_value() is not None: outfile.write(' value="%s"' % (quote_attrib(self.get_value()), )) def exportChildren(self, outfile, level, namespace_='', name_='Attribute'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='Attribute'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) showIndent(outfile, level) outfile.write('value = "%s",\n' % (self.get_value(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('name'): self.name = attrs.get('name').value if attrs.get('value'): self.value = attrs.get('value').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class Attribute class ConflictOverviewReasonParam: subclass = None superclass = None def __init__(self, name='', value='', valueOf_=''): self.name = name self.value = value self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ConflictOverviewReasonParam.subclass: return ConflictOverviewReasonParam.subclass(*args_, **kwargs_) else: return ConflictOverviewReasonParam(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_value(self): return self.value def set_value(self, value): self.value = value def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ConflictOverviewReasonParam'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConflictOverviewReasonParam') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConflictOverviewReasonParam'): outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) if self.get_value() is not None: outfile.write(' value="%s"' % (quote_attrib(self.get_value()), )) def exportChildren(self, outfile, level, namespace_='', name_='ConflictOverviewReasonParam'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ConflictOverviewReasonParam'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) showIndent(outfile, level) outfile.write('value = "%s",\n' % (self.get_value(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('name'): self.name = attrs.get('name').value if attrs.get('value'): self.value = attrs.get('value').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ConflictOverviewReasonParam class ConflictOverviewReason: subclass = None superclass = None def __init__(self, message='', resolver_message='', param=None): self.message = message self.resolver_message = resolver_message if param is None: self.param = [] else: self.param = param def factory(*args_, **kwargs_): if ConflictOverviewReason.subclass: return ConflictOverviewReason.subclass(*args_, **kwargs_) else: return ConflictOverviewReason(*args_, **kwargs_) factory = staticmethod(factory) def get_message(self): return self.message def set_message(self, message): self.message = message def get_resolver_message(self): return self.resolver_message def set_resolver_message(self, resolver_message): self.resolver_message = resolver_message def get_param(self): return self.param def set_param(self, param): self.param = param def add_param(self, value): self.param.append(value) def insert_param(self, index, value): self.param[index] = value def export(self, outfile, level, namespace_='', name_='ConflictOverviewReason'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConflictOverviewReason') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConflictOverviewReason'): pass def exportChildren(self, outfile, level, namespace_='', name_='ConflictOverviewReason'): showIndent(outfile, level) outfile.write('<%smessage>%s\n' % (namespace_, quote_xml(self.get_message()), namespace_)) showIndent(outfile, level) outfile.write('<%sresolver-message>%s\n' % (namespace_, quote_xml(self.get_resolver_message()), namespace_)) for param_ in self.get_param(): param_.export(outfile, level, namespace_, name_='param') def exportLiteral(self, outfile, level, name_='ConflictOverviewReason'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('message=%s,\n' % quote_python(self.get_message())) showIndent(outfile, level) outfile.write('resolver_message=%s,\n' % quote_python(self.get_resolver_message())) showIndent(outfile, level) outfile.write('param=[\n') level += 1 for param in self.param: showIndent(outfile, level) outfile.write('ConflictOverviewReasonParam(\n') param.exportLiteral(outfile, level, name_='param') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'message': message_ = '' for text__content_ in child_.childNodes: message_ += text__content_.nodeValue self.message = message_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resolver-message': resolver_message_ = '' for text__content_ in child_.childNodes: resolver_message_ += text__content_.nodeValue self.resolver_message = resolver_message_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'param': obj_ = ConflictOverviewReasonParam.factory() obj_.build(child_) self.param.append(obj_) # end class ConflictOverviewReason class resolver_message: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if resolver_message.subclass: return resolver_message.subclass(*args_, **kwargs_) else: return resolver_message(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='resolver-message'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='resolver-message') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='resolver-message'): pass def exportChildren(self, outfile, level, namespace_='', name_='resolver-message'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='resolver-message'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class resolver_message class ConflictOverviewReasons: subclass = None superclass = None def __init__(self, reason=None): if reason is None: self.reason = [] else: self.reason = reason def factory(*args_, **kwargs_): if ConflictOverviewReasons.subclass: return ConflictOverviewReasons.subclass(*args_, **kwargs_) else: return ConflictOverviewReasons(*args_, **kwargs_) factory = staticmethod(factory) def get_reason(self): return self.reason def set_reason(self, reason): self.reason = reason def add_reason(self, value): self.reason.append(value) def insert_reason(self, index, value): self.reason[index] = value def export(self, outfile, level, namespace_='', name_='ConflictOverviewReasons'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConflictOverviewReasons') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConflictOverviewReasons'): pass def exportChildren(self, outfile, level, namespace_='', name_='ConflictOverviewReasons'): for reason_ in self.get_reason(): reason_.export(outfile, level, namespace_, name_='reason') def exportLiteral(self, outfile, level, name_='ConflictOverviewReasons'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('reason=[\n') level += 1 for reason in self.reason: showIndent(outfile, level) outfile.write('ConflictOverviewReason(\n') reason.exportLiteral(outfile, level, name_='reason') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'reason': obj_ = ConflictOverviewReason.factory() obj_.build(child_) self.reason.append(obj_) # end class ConflictOverviewReasons class ConflictOverviewObject: subclass = None superclass = None def __init__(self, message='', name='', typexx='', owner_name='', reasons=None): self.message = message self.name = name self.typexx = typexx self.owner_name = owner_name self.reasons = reasons def factory(*args_, **kwargs_): if ConflictOverviewObject.subclass: return ConflictOverviewObject.subclass(*args_, **kwargs_) else: return ConflictOverviewObject(*args_, **kwargs_) factory = staticmethod(factory) def get_message(self): return self.message def set_message(self, message): self.message = message def get_name(self): return self.name def set_name(self, name): self.name = name def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_owner_name(self): return self.owner_name def set_owner_name(self, owner_name): self.owner_name = owner_name def get_reasons(self): return self.reasons def set_reasons(self, reasons): self.reasons = reasons def export(self, outfile, level, namespace_='', name_='ConflictOverviewObject'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConflictOverviewObject') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConflictOverviewObject'): pass def exportChildren(self, outfile, level, namespace_='', name_='ConflictOverviewObject'): showIndent(outfile, level) outfile.write('<%smessage>%s\n' % (namespace_, quote_xml(self.get_message()), namespace_)) showIndent(outfile, level) outfile.write('<%sname>%s\n' % (namespace_, quote_xml(self.get_name()), namespace_)) showIndent(outfile, level) outfile.write('<%stype>%s\n' % (namespace_, quote_xml(self.get_type()), namespace_)) if self.get_owner_name() != None : if self.get_owner_name() != "" : showIndent(outfile, level) outfile.write('<%sowner-name>%s\n' % (namespace_, quote_xml(self.get_owner_name()), namespace_)) if self.reasons: self.reasons.export(outfile, level, namespace_, name_='reasons', ) def exportLiteral(self, outfile, level, name_='ConflictOverviewObject'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('message=%s,\n' % quote_python(self.get_message())) showIndent(outfile, level) outfile.write('name=%s,\n' % quote_python(self.get_name())) showIndent(outfile, level) outfile.write('typexx=%s,\n' % quote_python(self.get_type())) showIndent(outfile, level) outfile.write('owner_name=%s,\n' % quote_python(self.get_owner_name())) if self.reasons: showIndent(outfile, level) outfile.write('reasons=ConflictOverviewReasons(\n') self.reasons.exportLiteral(outfile, level, name_='reasons') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'message': message_ = '' for text__content_ in child_.childNodes: message_ += text__content_.nodeValue self.message = message_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': type_ = '' for text__content_ in child_.childNodes: type_ += text__content_.nodeValue self.typexx = type_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'owner-name': owner_name_ = '' for text__content_ in child_.childNodes: owner_name_ += text__content_.nodeValue self.owner_name = owner_name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'reasons': obj_ = ConflictOverviewReasons.factory() obj_.build(child_) self.set_reasons(obj_) # end class ConflictOverviewObject class ConflictOverview: subclass = None superclass = None def __init__(self, object=None): if object is None: self.object = [] else: self.object = object def factory(*args_, **kwargs_): if ConflictOverview.subclass: return ConflictOverview.subclass(*args_, **kwargs_) else: return ConflictOverview(*args_, **kwargs_) factory = staticmethod(factory) def get_object(self): return self.object def set_object(self, object): self.object = object def add_object(self, value): self.object.append(value) def insert_object(self, index, value): self.object[index] = value def export(self, outfile, level, namespace_='', name_='ConflictOverview'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConflictOverview') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConflictOverview'): pass def exportChildren(self, outfile, level, namespace_='', name_='ConflictOverview'): for object_ in self.get_object(): object_.export(outfile, level, namespace_, name_='object') def exportLiteral(self, outfile, level, name_='ConflictOverview'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('object=[\n') level += 1 for object in self.object: showIndent(outfile, level) outfile.write('ConflictOverviewObject(\n') object.exportLiteral(outfile, level, name_='object') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'object': obj_ = ConflictOverviewObject.factory() obj_.build(child_) self.object.append(obj_) # end class ConflictOverview class Conflict: subclass = None superclass = None def __init__(self, guid='', id='', typexx=None, conflicting_objects=None, overview=None): self.guid = guid self.id = id self.typexx = typexx self.conflicting_objects = conflicting_objects self.overview = overview def factory(*args_, **kwargs_): if Conflict.subclass: return Conflict.subclass(*args_, **kwargs_) else: return Conflict(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_conflicting_objects(self): return self.conflicting_objects def set_conflicting_objects(self, conflicting_objects): self.conflicting_objects = conflicting_objects def get_overview(self): return self.overview def set_overview(self, overview): self.overview = overview def get_guid(self): return self.guid def set_guid(self, guid): self.guid = guid def get_id(self): return self.id def set_id(self, id): self.id = id def export(self, outfile, level, namespace_='', name_='Conflict'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Conflict') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Conflict'): if self.get_guid() is not None: outfile.write(' guid="%s"' % (quote_attrib(self.get_guid()), )) if self.get_id() is not None: outfile.write(' id="%s"' % (quote_attrib(self.get_id()), )) def exportChildren(self, outfile, level, namespace_='', name_='Conflict'): if self.typexx: self.typexx.export(outfile, level, namespace_, name_='type', ) if self.conflicting_objects: self.conflicting_objects.export(outfile, level, namespace_, name_='conflicting-objects', ) if self.get_overview() != None : if self.overview: self.overview.export(outfile, level, namespace_, name_='overview') def exportLiteral(self, outfile, level, name_='Conflict'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('guid = "%s",\n' % (self.get_guid(),)) showIndent(outfile, level) outfile.write('id = "%s",\n' % (self.get_id(),)) def exportLiteralChildren(self, outfile, level, name_): if self.typexx: showIndent(outfile, level) outfile.write('typexx=ConflictType(\n') self.typexx.exportLiteral(outfile, level, name_='type') showIndent(outfile, level) outfile.write('),\n') if self.conflicting_objects: showIndent(outfile, level) outfile.write('conflicting_objects=ConflictingObjects(\n') self.conflicting_objects.exportLiteral(outfile, level, name_='conflicting_objects') showIndent(outfile, level) outfile.write('),\n') if self.overview: showIndent(outfile, level) outfile.write('overview=ConflictOverview(\n') self.overview.exportLiteral(outfile, level, name_='overview') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('guid'): self.guid = attrs.get('guid').value if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': obj_ = ConflictType.factory() obj_.build(child_) self.set_type(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'conflicting-objects': obj_ = ConflictingObjects.factory() obj_.build(child_) self.set_conflicting_objects(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'overview': obj_ = ConflictOverview.factory() obj_.build(child_) self.set_overview(obj_) # end class Conflict class ConflictsDescription: subclass = None superclass = None def __init__(self, conflict=None): if conflict is None: self.conflict = [] else: self.conflict = conflict def factory(*args_, **kwargs_): if ConflictsDescription.subclass: return ConflictsDescription.subclass(*args_, **kwargs_) else: return ConflictsDescription(*args_, **kwargs_) factory = staticmethod(factory) def get_conflict(self): return self.conflict def set_conflict(self, conflict): self.conflict = conflict def add_conflict(self, value): self.conflict.append(value) def insert_conflict(self, index, value): self.conflict[index] = value def export(self, outfile, level, namespace_='', name_='ConflictsDescription'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConflictsDescription') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConflictsDescription'): pass def exportChildren(self, outfile, level, namespace_='', name_='ConflictsDescription'): for conflict_ in self.get_conflict(): conflict_.export(outfile, level, namespace_, name_='conflict') def exportLiteral(self, outfile, level, name_='ConflictsDescription'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('conflict=[\n') level += 1 for conflict in self.conflict: showIndent(outfile, level) outfile.write('Conflict(\n') conflict.exportLiteral(outfile, level, name_='conflict') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'conflict': obj_ = Conflict.factory() obj_.build(child_) self.conflict.append(obj_) # end class ConflictsDescription class PleskObjectIdentifier: subclass = None superclass = None def __init__(self, typexx='', database_id='', guid=''): self.typexx = typexx self.database_id = database_id self.guid = guid def factory(*args_, **kwargs_): if PleskObjectIdentifier.subclass: return PleskObjectIdentifier.subclass(*args_, **kwargs_) else: return PleskObjectIdentifier(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_database_id(self): return self.database_id def set_database_id(self, database_id): self.database_id = database_id def get_guid(self): return self.guid def set_guid(self, guid): self.guid = guid def export(self, outfile, level, namespace_='', name_='PleskObjectIdentifier'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='PleskObjectIdentifier') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='PleskObjectIdentifier'): pass def exportChildren(self, outfile, level, namespace_='', name_='PleskObjectIdentifier'): showIndent(outfile, level) outfile.write('<%stype>%s\n' % (namespace_, quote_xml(self.get_type()), namespace_)) showIndent(outfile, level) outfile.write('<%sdatabase-id>%s\n' % (namespace_, quote_xml(self.get_database_id()), namespace_)) if self.get_guid() != None : if self.get_guid() != "" : showIndent(outfile, level) outfile.write('<%sguid>%s\n' % (namespace_, quote_xml(self.get_guid()), namespace_)) def exportLiteral(self, outfile, level, name_='PleskObjectIdentifier'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx=%s,\n' % quote_python(self.get_type())) showIndent(outfile, level) outfile.write('database_id=%s,\n' % quote_python(self.get_database_id())) showIndent(outfile, level) outfile.write('guid=%s,\n' % quote_python(self.get_guid())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': type_ = '' for text__content_ in child_.childNodes: type_ += text__content_.nodeValue self.typexx = type_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'database-id': database_id_ = '' for text__content_ in child_.childNodes: database_id_ += text__content_.nodeValue self.database_id = database_id_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'guid': guid_ = '' for text__content_ in child_.childNodes: guid_ += text__content_.nodeValue self.guid = guid_ # end class PleskObjectIdentifier class typexx: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if typexx.subclass: return typexx.subclass(*args_, **kwargs_) else: return typexx(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='type'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='type') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='type'): pass def exportChildren(self, outfile, level, namespace_='', name_='type'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='type'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class typexx class database_id: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if database_id.subclass: return database_id.subclass(*args_, **kwargs_) else: return database_id(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='database-id'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='database-id') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='database-id'): pass def exportChildren(self, outfile, level, namespace_='', name_='database-id'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='database-id'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class database_id class guid: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if guid.subclass: return guid.subclass(*args_, **kwargs_) else: return guid(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='guid'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='guid') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='guid'): pass def exportChildren(self, outfile, level, namespace_='', name_='guid'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='guid'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class guid class ResolveParameter: subclass = None superclass = None def __init__(self, name='', valueOf_=''): self.name = name self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ResolveParameter.subclass: return ResolveParameter.subclass(*args_, **kwargs_) else: return ResolveParameter(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ResolveParameter'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResolveParameter') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResolveParameter'): if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='ResolveParameter'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ResolveParameter'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ResolveParameter class ResolveParameters: subclass = None superclass = None def __init__(self, parameter=None): self.parameter = parameter def factory(*args_, **kwargs_): if ResolveParameters.subclass: return ResolveParameters.subclass(*args_, **kwargs_) else: return ResolveParameters(*args_, **kwargs_) factory = staticmethod(factory) def get_parameter(self): return self.parameter def set_parameter(self, parameter): self.parameter = parameter def export(self, outfile, level, namespace_='', name_='ResolveParameters'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResolveParameters') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResolveParameters'): pass def exportChildren(self, outfile, level, namespace_='', name_='ResolveParameters'): if self.parameter: self.parameter.export(outfile, level, namespace_, name_='parameter', ) def exportLiteral(self, outfile, level, name_='ResolveParameters'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.parameter: showIndent(outfile, level) outfile.write('parameter=ResolveParameter(\n') self.parameter.exportLiteral(outfile, level, name_='parameter') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'parameter': obj_ = parameter.factory() obj_.build(child_) self.set_parameter(obj_) # end class ResolveParameters class ResolveOption: subclass = None superclass = None def __init__(self, name='', parameters=None): self.name = name self.parameters = parameters def factory(*args_, **kwargs_): if ResolveOption.subclass: return ResolveOption.subclass(*args_, **kwargs_) else: return ResolveOption(*args_, **kwargs_) factory = staticmethod(factory) def get_parameters(self): return self.parameters def set_parameters(self, parameters): self.parameters = parameters def get_name(self): return self.name def set_name(self, name): self.name = name def export(self, outfile, level, namespace_='', name_='ResolveOption'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResolveOption') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResolveOption'): if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='ResolveOption'): if self.get_parameters() != None : if self.parameters: self.parameters.export(outfile, level, namespace_, name_='parameters') def exportLiteral(self, outfile, level, name_='ResolveOption'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): if self.parameters: showIndent(outfile, level) outfile.write('parameters=ResolveParameters(\n') self.parameters.exportLiteral(outfile, level, name_='parameters') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'parameters': obj_ = ResolveParameters.factory() obj_.build(child_) self.set_parameters(obj_) # end class ResolveOption class ResolveOptions: subclass = None superclass = None def __init__(self, option=None): if option is None: self.option = [] else: self.option = option def factory(*args_, **kwargs_): if ResolveOptions.subclass: return ResolveOptions.subclass(*args_, **kwargs_) else: return ResolveOptions(*args_, **kwargs_) factory = staticmethod(factory) def get_option(self): return self.option def set_option(self, option): self.option = option def add_option(self, value): self.option.append(value) def insert_option(self, index, value): self.option[index] = value def validate_ResolveOption(self, value): # validate type ResolveOption pass def export(self, outfile, level, namespace_='', name_='ResolveOptions'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResolveOptions') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResolveOptions'): pass def exportChildren(self, outfile, level, namespace_='', name_='ResolveOptions'): for option_ in self.get_option(): option_.export(outfile, level, namespace_, name_='option') def exportLiteral(self, outfile, level, name_='ResolveOptions'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('option=[\n') level += 1 for option in self.option: showIndent(outfile, level) outfile.write('ResolveOption(\n') option.exportLiteral(outfile, level, name_='option') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'option': obj_ = ResolveOption.factory() obj_.build(child_) self.option.append(obj_) self.validate_ResolveOption(self.option) # validate type ResolveOption # end class ResolveOptions class Response: subclass = None superclass = None def __init__(self, errcode='', errmsg='', data=None): self.errcode = errcode self.errmsg = errmsg self.data = data def factory(*args_, **kwargs_): if Response.subclass: return Response.subclass(*args_, **kwargs_) else: return Response(*args_, **kwargs_) factory = staticmethod(factory) def get_errcode(self): return self.errcode def set_errcode(self, errcode): self.errcode = errcode def get_errmsg(self): return self.errmsg def set_errmsg(self, errmsg): self.errmsg = errmsg def get_data(self): return self.data def set_data(self, data): self.data = data def export(self, outfile, level, namespace_='', name_='Response'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Response') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Response'): pass def exportChildren(self, outfile, level, namespace_='', name_='Response'): showIndent(outfile, level) outfile.write('<%serrcode>%s\n' % (namespace_, quote_xml(self.get_errcode()), namespace_)) if self.get_errmsg() != None : if self.get_errmsg() != "" : showIndent(outfile, level) outfile.write('<%serrmsg>%s\n' % (namespace_, quote_xml(self.get_errmsg()), namespace_)) if self.get_data() != None : if self.data: self.data.export(outfile, level, namespace_, name_='data') def exportLiteral(self, outfile, level, name_='Response'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('errcode=%s,\n' % quote_python(self.get_errcode())) showIndent(outfile, level) outfile.write('errmsg=%s,\n' % quote_python(self.get_errmsg())) if self.data: showIndent(outfile, level) outfile.write('data=Data(\n') self.data.exportLiteral(outfile, level, name_='data') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'errcode': errcode_ = '' for text__content_ in child_.childNodes: errcode_ += text__content_.nodeValue self.errcode = errcode_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'errmsg': errmsg_ = '' for text__content_ in child_.childNodes: errmsg_ += text__content_.nodeValue self.errmsg = errmsg_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'data': obj_ = Data.factory() obj_.build(child_) self.set_data(obj_) # end class Response class errcode: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if errcode.subclass: return errcode.subclass(*args_, **kwargs_) else: return errcode(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='errcode'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='errcode') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='errcode'): pass def exportChildren(self, outfile, level, namespace_='', name_='errcode'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='errcode'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class errcode class errmsg: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if errmsg.subclass: return errmsg.subclass(*args_, **kwargs_) else: return errmsg(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='errmsg'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='errmsg') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='errmsg'): pass def exportChildren(self, outfile, level, namespace_='', name_='errmsg'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='errmsg'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class errmsg class DumpVolume: subclass = None superclass = None def __init__(self, size='', valueOf_='', mixedclass_=None, content_=None): self.size = size if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if DumpVolume.subclass: return DumpVolume.subclass(*args_, **kwargs_) else: return DumpVolume(*args_, **kwargs_) factory = staticmethod(factory) def get_size(self): return self.size def set_size(self, size): self.size = size def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='DumpVolume'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpVolume') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpVolume'): if self.get_size() is not None: outfile.write(' size="%s"' % (quote_attrib(self.get_size()), )) def exportChildren(self, outfile, level, namespace_='', name_='DumpVolume'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='DumpVolume'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('size = "%s",\n' % (self.get_size(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('size'): self.size = attrs.get('size').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class DumpVolume class Dump: subclass = None superclass = None def __init__(self, dump_format='', encryption_type='', description='', owner_guid='', dump_version='', increment_base='', verification_string='', owner_type=None, dump_original_version='', creation_date='', isFull='', content_included='', fullname='', size='', name='', backup_object=None, dump_status=None, volumes=None, related_dumps=None): self.dump_format = dump_format self.encryption_type = encryption_type self.description = description self.owner_guid = owner_guid self.dump_version = dump_version self.increment_base = increment_base self.verification_string = verification_string self.owner_type = owner_type self.dump_original_version = dump_original_version self.creation_date = creation_date self.isFull = isFull self.content_included = content_included self.fullname = fullname self.size = size self.name = name self.backup_object = backup_object if dump_status is None: self.dump_status = [] else: self.dump_status = dump_status self.volumes = volumes self.related_dumps = related_dumps def factory(*args_, **kwargs_): if Dump.subclass: return Dump.subclass(*args_, **kwargs_) else: return Dump(*args_, **kwargs_) factory = staticmethod(factory) def get_backup_object(self): return self.backup_object def set_backup_object(self, backup_object): self.backup_object = backup_object def get_dump_status(self): return self.dump_status def set_dump_status(self, dump_status): self.dump_status = dump_status def add_dump_status(self, value): self.dump_status.append(value) def insert_dump_status(self, index, value): self.dump_status[index] = value def get_volumes(self): return self.volumes def set_volumes(self, volumes): self.volumes = volumes def get_related_dumps(self): return self.related_dumps def set_related_dumps(self, related_dumps): self.related_dumps = related_dumps def get_dump_format(self): return self.dump_format def set_dump_format(self, dump_format): self.dump_format = dump_format def get_encryption_type(self): return self.encryption_type def set_encryption_type(self, encryption_type): self.encryption_type = encryption_type def get_description(self): return self.description def set_description(self, description): self.description = description def get_owner_guid(self): return self.owner_guid def set_owner_guid(self, owner_guid): self.owner_guid = owner_guid def get_dump_version(self): return self.dump_version def set_dump_version(self, dump_version): self.dump_version = dump_version def get_increment_base(self): return self.increment_base def set_increment_base(self, increment_base): self.increment_base = increment_base def get_verification_string(self): return self.verification_string def set_verification_string(self, verification_string): self.verification_string = verification_string def get_owner_type(self): return self.owner_type def set_owner_type(self, owner_type): self.owner_type = owner_type def get_dump_original_version(self): return self.dump_original_version def set_dump_original_version(self, dump_original_version): self.dump_original_version = dump_original_version def get_creation_date(self): return self.creation_date def set_creation_date(self, creation_date): self.creation_date = creation_date def get_isFull(self): return self.isFull def set_isFull(self, isFull): self.isFull = isFull def get_content_included(self): return self.content_included def set_content_included(self, content_included): self.content_included = content_included def get_fullname(self): return self.fullname def set_fullname(self, fullname): self.fullname = fullname def get_size(self): return self.size def set_size(self, size): self.size = size def get_name(self): return self.name def set_name(self, name): self.name = name def export(self, outfile, level, namespace_='', name_='Dump'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Dump') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Dump'): if self.get_dump_format() is not None: outfile.write(' dump-format="%s"' % (quote_attrib(self.get_dump_format()), )) if self.get_encryption_type() is not None: outfile.write(' encryption-type="%s"' % (quote_attrib(self.get_encryption_type()), )) if self.get_description() is not None: outfile.write(' description="%s"' % (quote_attrib(self.get_description()), )) if self.get_owner_guid() is not None: outfile.write(' owner-guid="%s"' % (quote_attrib(self.get_owner_guid()), )) if self.get_dump_version() is not None: outfile.write(' dump-version="%s"' % (quote_attrib(self.get_dump_version()), )) if self.get_increment_base() is not None: outfile.write(' increment-base="%s"' % (quote_attrib(self.get_increment_base()), )) if self.get_verification_string() is not None: outfile.write(' verification-string="%s"' % (quote_attrib(self.get_verification_string()), )) if self.get_owner_type() is not None: outfile.write(' owner-type="%s"' % str(self.get_owner_type())) if self.get_dump_original_version() is not None: outfile.write(' dump-original-version="%s"' % (quote_attrib(self.get_dump_original_version()), )) if self.get_creation_date() is not None: outfile.write(' creation-date="%s"' % (quote_attrib(self.get_creation_date()), )) if self.get_isFull() is not None: outfile.write(' isFull="%s"' % (quote_attrib(self.get_isFull()), )) if self.get_content_included() is not None: outfile.write(' content-included="%s"' % (quote_attrib(self.get_content_included()), )) if self.get_fullname() is not None: outfile.write(' fullname="%s"' % (quote_attrib(self.get_fullname()), )) if self.get_size() is not None: outfile.write(' size="%s"' % (quote_attrib(self.get_size()), )) if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='Dump'): if self.get_backup_object() != None : if self.backup_object: self.backup_object.export(outfile, level, namespace_, name_='backup-object') for dump_status_ in self.get_dump_status(): dump_status_.export(outfile, level, namespace_, name_='dump-status') if self.get_volumes() != None : if self.volumes: self.volumes.export(outfile, level, namespace_, name_='volumes') if self.get_related_dumps() != None : if self.related_dumps: self.related_dumps.export(outfile, level, namespace_, name_='related-dumps') def exportLiteral(self, outfile, level, name_='Dump'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('dump_format = "%s",\n' % (self.get_dump_format(),)) showIndent(outfile, level) outfile.write('encryption_type = "%s",\n' % (self.get_encryption_type(),)) showIndent(outfile, level) outfile.write('description = "%s",\n' % (self.get_description(),)) showIndent(outfile, level) outfile.write('owner_guid = "%s",\n' % (self.get_owner_guid(),)) showIndent(outfile, level) outfile.write('dump_version = "%s",\n' % (self.get_dump_version(),)) showIndent(outfile, level) outfile.write('increment_base = "%s",\n' % (self.get_increment_base(),)) showIndent(outfile, level) outfile.write('verification_string = "%s",\n' % (self.get_verification_string(),)) showIndent(outfile, level) outfile.write('owner_type = "%s",\n' % (self.get_owner_type(),)) showIndent(outfile, level) outfile.write('dump_original_version = "%s",\n' % (self.get_dump_original_version(),)) showIndent(outfile, level) outfile.write('creation_date = "%s",\n' % (self.get_creation_date(),)) showIndent(outfile, level) outfile.write('isFull = "%s",\n' % (self.get_isFull(),)) showIndent(outfile, level) outfile.write('content_included = "%s",\n' % (self.get_content_included(),)) showIndent(outfile, level) outfile.write('fullname = "%s",\n' % (self.get_fullname(),)) showIndent(outfile, level) outfile.write('size = "%s",\n' % (self.get_size(),)) showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): if self.backup_object: showIndent(outfile, level) outfile.write('backup_object=backup_object(\n') self.backup_object.exportLiteral(outfile, level, name_='backup_object') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('dump_status=[\n') level += 1 for dump_status in self.dump_status: showIndent(outfile, level) outfile.write('DumpStatusFull(\n') dump_status.exportLiteral(outfile, level, name_='dump_status') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') if self.volumes: showIndent(outfile, level) outfile.write('volumes=volumes(\n') self.volumes.exportLiteral(outfile, level) showIndent(outfile, level) outfile.write('),\n') if self.related_dumps: showIndent(outfile, level) outfile.write('related_dumps=related_dumps(\n') self.related_dumps.exportLiteral(outfile, level, name_='related_dumps') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('dump-format'): self.dump_format = attrs.get('dump-format').value if attrs.get('encryption-type'): self.encryption_type = attrs.get('encryption-type').value if attrs.get('description'): self.description = attrs.get('description').value if attrs.get('owner-guid'): self.owner_guid = attrs.get('owner-guid').value if attrs.get('dump-version'): self.dump_version = attrs.get('dump-version').value if attrs.get('increment-base'): self.increment_base = attrs.get('increment-base').value if attrs.get('verification-string'): self.verification_string = attrs.get('verification-string').value if attrs.get('owner-type'): self.owner_type = attrs.get('owner-type').value if attrs.get('dump-original-version'): self.dump_original_version = attrs.get('dump-original-version').value if attrs.get('creation-date'): self.creation_date = attrs.get('creation-date').value if attrs.get('isFull'): self.isFull = attrs.get('isFull').value if attrs.get('content-included'): self.content_included = attrs.get('content-included').value if attrs.get('fullname'): self.fullname = attrs.get('fullname').value if attrs.get('size'): self.size = attrs.get('size').value if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'backup-object': obj_ = backup_object.factory() obj_.build(child_) self.set_backup_object(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-status': obj_ = DumpStatusFull.factory() obj_.build(child_) self.dump_status.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'volumes': obj_ = volumes.factory() obj_.build(child_) self.set_volumes(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'related-dumps': obj_ = related_dumps.factory() obj_.build(child_) self.set_related_dumps(obj_) # end class Dump class backup_object: subclass = None superclass = None def __init__(self, guid='', typexx=None, name='', valueOf_=''): self.guid = guid self.typexx = typexx self.name = name self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if backup_object.subclass: return backup_object.subclass(*args_, **kwargs_) else: return backup_object(*args_, **kwargs_) factory = staticmethod(factory) def get_guid(self): return self.guid def set_guid(self, guid): self.guid = guid def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_name(self): return self.name def set_name(self, name): self.name = name def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='backup-object'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='backup-object') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='backup-object'): if self.get_guid() is not None: outfile.write(' guid="%s"' % (quote_attrib(self.get_guid()), )) if self.get_type() is not None: outfile.write(' type="%s"' % str(self.get_type())) if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='backup-object'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='backup-object'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('guid = "%s",\n' % (self.get_guid(),)) showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('guid'): self.guid = attrs.get('guid').value if attrs.get('type'): self.typexx = attrs.get('type').value if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class backup_object class volumes: subclass = None superclass = None def __init__(self, volume=None): if volume is None: self.volume = [] else: self.volume = volume def factory(*args_, **kwargs_): if volumes.subclass: return volumes.subclass(*args_, **kwargs_) else: return volumes(*args_, **kwargs_) factory = staticmethod(factory) def get_volume(self): return self.volume def set_volume(self, volume): self.volume = volume def add_volume(self, value): self.volume.append(value) def insert_volume(self, index, value): self.volume[index] = value def export(self, outfile, level, namespace_='', name_='volumes'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='volumes') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='volumes'): pass def exportChildren(self, outfile, level, namespace_='', name_='volumes'): for volume_ in self.get_volume(): volume_.export(outfile, level, namespace_, name_='volume') def exportLiteral(self, outfile, level, name_='volumes'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('volume=[\n') level += 1 for volume in self.volume: showIndent(outfile, level) outfile.write('DumpVolume(\n') volume.exportLiteral(outfile, level, name_='volume') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'volume': obj_ = DumpVolume.factory() obj_.build(child_) self.volume.append(obj_) # end class volumes class related_dumps: subclass = None superclass = None def __init__(self, related_dump=None): if related_dump is None: self.related_dump = [] else: self.related_dump = related_dump def factory(*args_, **kwargs_): if related_dumps.subclass: return related_dumps.subclass(*args_, **kwargs_) else: return related_dumps(*args_, **kwargs_) factory = staticmethod(factory) def get_related_dump(self): return self.related_dump def set_related_dump(self, related_dump): self.related_dump = related_dump def add_related_dump(self, value): self.related_dump.append(value) def insert_related_dump(self, index, value): self.related_dump[index] = value def export(self, outfile, level, namespace_='', name_='related-dumps'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='related-dumps') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='related-dumps'): pass def exportChildren(self, outfile, level, namespace_='', name_='related-dumps'): for related_dump_ in self.get_related_dump(): showIndent(outfile, level) outfile.write('<%srelated-dump>%s\n' % (namespace_, quote_xml(related_dump_), namespace_)) def exportLiteral(self, outfile, level, name_='related-dumps'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('related_dump=[\n') level += 1 for related_dump in self.related_dump: showIndent(outfile, level) outfile.write('%s,\n' % quote_python(related_dump)) level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'related-dump': related_dump_ = '' for text__content_ in child_.childNodes: related_dump_ += text__content_.nodeValue self.related_dump.append(related_dump_) # end class related_dumps class DumpList: subclass = None superclass = None def __init__(self, skipped_files_count='', dump=None): self.skipped_files_count = skipped_files_count if dump is None: self.dump = [] else: self.dump = dump def factory(*args_, **kwargs_): if DumpList.subclass: return DumpList.subclass(*args_, **kwargs_) else: return DumpList(*args_, **kwargs_) factory = staticmethod(factory) def get_dump(self): return self.dump def set_dump(self, dump): self.dump = dump def add_dump(self, value): self.dump.append(value) def insert_dump(self, index, value): self.dump[index] = value def validate_Dump(self, value): # validate type Dump pass def get_skipped_files_count(self): return self.skipped_files_count def set_skipped_files_count(self, skipped_files_count): self.skipped_files_count = skipped_files_count def export(self, outfile, level, namespace_='', name_='DumpList'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpList') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpList'): if self.get_skipped_files_count() is not None: outfile.write(' skipped-files-count="%s"' % (quote_attrib(self.get_skipped_files_count()), )) def exportChildren(self, outfile, level, namespace_='', name_='DumpList'): for dump_ in self.get_dump(): dump_.export(outfile, level, namespace_, name_='dump') def exportLiteral(self, outfile, level, name_='DumpList'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('skipped_files_count = "%s",\n' % (self.get_skipped_files_count(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('dump=[\n') level += 1 for dump in self.dump: showIndent(outfile, level) outfile.write('Dump(\n') dump.exportLiteral(outfile, level, name_='dump') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('skipped-files-count'): self.skipped_files_count = attrs.get('skipped-files-count').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump': obj_ = Dump.factory() obj_.build(child_) self.dump.append(obj_) self.validate_Dump(self.dump) # validate type Dump # end class DumpList class Task: subclass = None superclass = None def __init__(self, task_id='', name='', mail_to='', owner_guid='', task_type='', task_pid='', owner_type=None, backup_profile_name='', creation_date='', fullname='', task_status=None, dumps_storage_credentials=None, additional_info=None): self.task_id = task_id self.name = name self.mail_to = mail_to self.owner_guid = owner_guid self.task_type = task_type self.task_pid = task_pid self.owner_type = owner_type self.backup_profile_name = backup_profile_name self.creation_date = creation_date self.fullname = fullname self.task_status = task_status self.dumps_storage_credentials = dumps_storage_credentials self.additional_info = additional_info def factory(*args_, **kwargs_): if Task.subclass: return Task.subclass(*args_, **kwargs_) else: return Task(*args_, **kwargs_) factory = staticmethod(factory) def get_task_status(self): return self.task_status def set_task_status(self, task_status): self.task_status = task_status def get_dumps_storage_credentials(self): return self.dumps_storage_credentials def set_dumps_storage_credentials(self, dumps_storage_credentials): self.dumps_storage_credentials = dumps_storage_credentials def validate_DumpsStorageCredentials(self, value): # validate type DumpsStorageCredentials pass def get_additional_info(self): return self.additional_info def set_additional_info(self, additional_info): self.additional_info = additional_info def get_task_id(self): return self.task_id def set_task_id(self, task_id): self.task_id = task_id def get_name(self): return self.name def set_name(self, name): self.name = name def get_mail_to(self): return self.mail_to def set_mail_to(self, mail_to): self.mail_to = mail_to def get_owner_guid(self): return self.owner_guid def set_owner_guid(self, owner_guid): self.owner_guid = owner_guid def get_task_type(self): return self.task_type def set_task_type(self, task_type): self.task_type = task_type def get_task_pid(self): return self.task_pid def set_task_pid(self, task_pid): self.task_pid = task_pid def get_owner_type(self): return self.owner_type def set_owner_type(self, owner_type): self.owner_type = owner_type def get_backup_profile_name(self): return self.backup_profile_name def set_backup_profile_name(self, backup_profile_name): self.backup_profile_name = backup_profile_name def get_creation_date(self): return self.creation_date def set_creation_date(self, creation_date): self.creation_date = creation_date def get_fullname(self): return self.fullname def set_fullname(self, fullname): self.fullname = fullname def export(self, outfile, level, namespace_='', name_='Task'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Task') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Task'): if self.get_task_id() is not None: outfile.write(' task-id="%s"' % (quote_attrib(self.get_task_id()), )) if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) if self.get_mail_to() is not None: outfile.write(' mail-to="%s"' % (quote_attrib(self.get_mail_to()), )) if self.get_owner_guid() is not None: outfile.write(' owner-guid="%s"' % (quote_attrib(self.get_owner_guid()), )) if self.get_task_type() is not None: outfile.write(' task-type="%s"' % (quote_attrib(self.get_task_type()), )) if self.get_task_pid() is not None: outfile.write(' task-pid="%s"' % (quote_attrib(self.get_task_pid()), )) if self.get_owner_type() is not None: outfile.write(' owner-type="%s"' % str(self.get_owner_type())) if self.get_backup_profile_name() is not None: outfile.write(' backup-profile-name="%s"' % (quote_attrib(self.get_backup_profile_name()), )) if self.get_creation_date() is not None: outfile.write(' creation-date="%s"' % (quote_attrib(self.get_creation_date()), )) if self.get_fullname() is not None: outfile.write(' fullname="%s"' % (quote_attrib(self.get_fullname()), )) def exportChildren(self, outfile, level, namespace_='', name_='Task'): if self.task_status: self.task_status.export(outfile, level, namespace_, name_='task-status', ) if self.get_dumps_storage_credentials() != None : if self.dumps_storage_credentials: self.dumps_storage_credentials.export(outfile, level, namespace_, name_='dumps-storage-credentials') if self.get_additional_info() != None : if self.additional_info: self.additional_info.export(outfile, level, namespace_, name_='additional-info') def exportLiteral(self, outfile, level, name_='Task'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('task_id = "%s",\n' % (self.get_task_id(),)) showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) showIndent(outfile, level) outfile.write('mail_to = "%s",\n' % (self.get_mail_to(),)) showIndent(outfile, level) outfile.write('owner_guid = "%s",\n' % (self.get_owner_guid(),)) showIndent(outfile, level) outfile.write('task_type = "%s",\n' % (self.get_task_type(),)) showIndent(outfile, level) outfile.write('task_pid = "%s",\n' % (self.get_task_pid(),)) showIndent(outfile, level) outfile.write('owner_type = "%s",\n' % (self.get_owner_type(),)) showIndent(outfile, level) outfile.write('backup_profile_name = "%s",\n' % (self.get_backup_profile_name(),)) showIndent(outfile, level) outfile.write('creation_date = "%s",\n' % (self.get_creation_date(),)) showIndent(outfile, level) outfile.write('fullname = "%s",\n' % (self.get_fullname(),)) def exportLiteralChildren(self, outfile, level, name_): if self.task_status: showIndent(outfile, level) outfile.write('task_status=TaskStatus(\n') self.task_status.exportLiteral(outfile, level, name_='task_status') showIndent(outfile, level) outfile.write('),\n') if self.dumps_storage_credentials: showIndent(outfile, level) outfile.write('dumps_storage_credentials=DumpsStorageCredentials(\n') self.dumps_storage_credentials.exportLiteral(outfile, level, name_='dumps_storage_credentials') showIndent(outfile, level) outfile.write('),\n') if self.additional_info: showIndent(outfile, level) outfile.write('additional_info=MigrationTaskInfo(\n') self.additional_info.exportLiteral(outfile, level, name_='additional_info') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('task-id'): self.task_id = attrs.get('task-id').value if attrs.get('name'): self.name = attrs.get('name').value if attrs.get('mail-to'): self.mail_to = attrs.get('mail-to').value if attrs.get('owner-guid'): self.owner_guid = attrs.get('owner-guid').value if attrs.get('task-type'): self.task_type = attrs.get('task-type').value if attrs.get('task-pid'): self.task_pid = attrs.get('task-pid').value if attrs.get('owner-type'): self.owner_type = attrs.get('owner-type').value if attrs.get('backup-profile-name'): self.backup_profile_name = attrs.get('backup-profile-name').value if attrs.get('creation-date'): self.creation_date = attrs.get('creation-date').value if attrs.get('fullname'): self.fullname = attrs.get('fullname').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'task-status': obj_ = TaskStatus.factory() obj_.build(child_) self.set_task_status(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dumps-storage-credentials': obj_ = DumpsStorageCredentials.factory() obj_.build(child_) self.set_dumps_storage_credentials(obj_) self.validate_DumpsStorageCredentials(self.dumps_storage_credentials) # validate type DumpsStorageCredentials elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'additional-info': obj_ = MigrationTaskInfo.factory() obj_.build(child_) self.set_additional_info(obj_) # end class Task class SessionStep: subclass = None superclass = None def __init__(self, id='', valueOf_=''): self.id = id self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if SessionStep.subclass: return SessionStep.subclass(*args_, **kwargs_) else: return SessionStep(*args_, **kwargs_) factory = staticmethod(factory) def get_id(self): return self.id def set_id(self, id): self.id = id def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='SessionStep'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='SessionStep') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='SessionStep'): if self.get_id() is not None: outfile.write(' id="%s"' % (quote_attrib(self.get_id()), )) def exportChildren(self, outfile, level, namespace_='', name_='SessionStep'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='SessionStep'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('id = "%s",\n' % (self.get_id(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class SessionStep class SessionSteps: subclass = None superclass = None def __init__(self, step=None): if step is None: self.step = [] else: self.step = step def factory(*args_, **kwargs_): if SessionSteps.subclass: return SessionSteps.subclass(*args_, **kwargs_) else: return SessionSteps(*args_, **kwargs_) factory = staticmethod(factory) def get_step(self): return self.step def set_step(self, step): self.step = step def add_step(self, value): self.step.append(value) def insert_step(self, index, value): self.step[index] = value def validate_SessionStep(self, value): # validate type SessionStep pass def export(self, outfile, level, namespace_='', name_='SessionSteps'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='SessionSteps') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='SessionSteps'): pass def exportChildren(self, outfile, level, namespace_='', name_='SessionSteps'): for step_ in self.get_step(): step_.export(outfile, level, namespace_, name_='step') def exportLiteral(self, outfile, level, name_='SessionSteps'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('step=[\n') level += 1 for step in self.step: showIndent(outfile, level) outfile.write('SessionStep(\n') step.exportLiteral(outfile, level, name_='step') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'step': obj_ = SessionStep.factory() obj_.build(child_) self.step.append(obj_) self.validate_SessionStep(self.step) # validate type SessionStep # end class SessionSteps class Session: subclass = None superclass = None def __init__(self, session_id='', creation_date='', steps_passed=None, additional_info=None): self.session_id = session_id self.creation_date = creation_date self.steps_passed = steps_passed self.additional_info = additional_info def factory(*args_, **kwargs_): if Session.subclass: return Session.subclass(*args_, **kwargs_) else: return Session(*args_, **kwargs_) factory = staticmethod(factory) def get_steps_passed(self): return self.steps_passed def set_steps_passed(self, steps_passed): self.steps_passed = steps_passed def get_additional_info(self): return self.additional_info def set_additional_info(self, additional_info): self.additional_info = additional_info def get_session_id(self): return self.session_id def set_session_id(self, session_id): self.session_id = session_id def get_creation_date(self): return self.creation_date def set_creation_date(self, creation_date): self.creation_date = creation_date def export(self, outfile, level, namespace_='', name_='Session'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Session') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Session'): if self.get_session_id() is not None: outfile.write(' session-id="%s"' % (quote_attrib(self.get_session_id()), )) if self.get_creation_date() is not None: outfile.write(' creation-date="%s"' % (quote_attrib(self.get_creation_date()), )) def exportChildren(self, outfile, level, namespace_='', name_='Session'): if self.get_steps_passed() != None : if self.steps_passed: self.steps_passed.export(outfile, level, namespace_, name_='steps-passed') if self.additional_info: self.additional_info.export(outfile, level, namespace_, name_='additional-info', ) def exportLiteral(self, outfile, level, name_='Session'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('session_id = "%s",\n' % (self.get_session_id(),)) showIndent(outfile, level) outfile.write('creation_date = "%s",\n' % (self.get_creation_date(),)) def exportLiteralChildren(self, outfile, level, name_): if self.steps_passed: showIndent(outfile, level) outfile.write('steps_passed=SessionSteps(\n') self.steps_passed.exportLiteral(outfile, level, name_='steps_passed') showIndent(outfile, level) outfile.write('),\n') if self.additional_info: showIndent(outfile, level) outfile.write('additional_info=MigrationTaskInfo(\n') self.additional_info.exportLiteral(outfile, level, name_='additional_info') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('session-id'): self.session_id = attrs.get('session-id').value if attrs.get('creation-date'): self.creation_date = attrs.get('creation-date').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'steps-passed': obj_ = SessionSteps.factory() obj_.build(child_) self.set_steps_passed(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'additional-info': obj_ = MigrationTaskInfo.factory() obj_.build(child_) self.set_additional_info(obj_) # end class Session class TaskList: subclass = None superclass = None def __init__(self, task=None): if task is None: self.task = [] else: self.task = task def factory(*args_, **kwargs_): if TaskList.subclass: return TaskList.subclass(*args_, **kwargs_) else: return TaskList(*args_, **kwargs_) factory = staticmethod(factory) def get_task(self): return self.task def set_task(self, task): self.task = task def add_task(self, value): self.task.append(value) def insert_task(self, index, value): self.task[index] = value def export(self, outfile, level, namespace_='', name_='TaskList'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='TaskList') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='TaskList'): pass def exportChildren(self, outfile, level, namespace_='', name_='TaskList'): for task_ in self.get_task(): task_.export(outfile, level, namespace_, name_='task') def exportLiteral(self, outfile, level, name_='TaskList'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('task=[\n') level += 1 for task in self.task: showIndent(outfile, level) outfile.write('Task(\n') task.exportLiteral(outfile, level, name_='task') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'task': obj_ = Task.factory() obj_.build(child_) self.task.append(obj_) # end class TaskList class SessionList: subclass = None superclass = None def __init__(self, session=None): if session is None: self.session = [] else: self.session = session def factory(*args_, **kwargs_): if SessionList.subclass: return SessionList.subclass(*args_, **kwargs_) else: return SessionList(*args_, **kwargs_) factory = staticmethod(factory) def get_session(self): return self.session def set_session(self, session): self.session = session def add_session(self, value): self.session.append(value) def insert_session(self, index, value): self.session[index] = value def export(self, outfile, level, namespace_='', name_='SessionList'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='SessionList') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='SessionList'): pass def exportChildren(self, outfile, level, namespace_='', name_='SessionList'): for session_ in self.get_session(): session_.export(outfile, level, namespace_, name_='session') def exportLiteral(self, outfile, level, name_='SessionList'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('session=[\n') level += 1 for session in self.session: showIndent(outfile, level) outfile.write('Session(\n') session.exportLiteral(outfile, level, name_='session') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'session': obj_ = Session.factory() obj_.build(child_) self.session.append(obj_) # end class SessionList class Metainformation: subclass = None superclass = None def __init__(self, record=None): if record is None: self.record = [] else: self.record = record def factory(*args_, **kwargs_): if Metainformation.subclass: return Metainformation.subclass(*args_, **kwargs_) else: return Metainformation(*args_, **kwargs_) factory = staticmethod(factory) def get_record(self): return self.record def set_record(self, record): self.record = record def add_record(self, value): self.record.append(value) def insert_record(self, index, value): self.record[index] = value def export(self, outfile, level, namespace_='', name_='Metainformation'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Metainformation') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Metainformation'): pass def exportChildren(self, outfile, level, namespace_='', name_='Metainformation'): for record_ in self.get_record(): record_.export(outfile, level, namespace_, name_='record') def exportLiteral(self, outfile, level, name_='Metainformation'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('record=[\n') level += 1 for record in self.record: showIndent(outfile, level) outfile.write('Record(\n') record.exportLiteral(outfile, level, name_='record') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'record': obj_ = Record.factory() obj_.build(child_) self.record.append(obj_) # end class Metainformation class Record: subclass = None superclass = None def __init__(self, name='', valueOf_='', mixedclass_=None, content_=None): self.name = name if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if Record.subclass: return Record.subclass(*args_, **kwargs_) else: return Record(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='Record'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Record') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Record'): outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='Record'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='Record'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class Record class ObjectsToSelect: subclass = None superclass = None def __init__(self, object=None): if object is None: self.object = [] else: self.object = object def factory(*args_, **kwargs_): if ObjectsToSelect.subclass: return ObjectsToSelect.subclass(*args_, **kwargs_) else: return ObjectsToSelect(*args_, **kwargs_) factory = staticmethod(factory) def get_object(self): return self.object def set_object(self, object): self.object = object def add_object(self, value): self.object.append(value) def insert_object(self, index, value): self.object[index] = value def export(self, outfile, level, namespace_='', name_='ObjectsToSelect'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ObjectsToSelect') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ObjectsToSelect'): pass def exportChildren(self, outfile, level, namespace_='', name_='ObjectsToSelect'): for object_ in self.get_object(): object_.export(outfile, level, namespace_, name_='object') def exportLiteral(self, outfile, level, name_='ObjectsToSelect'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('object=[\n') level += 1 for object in self.object: showIndent(outfile, level) outfile.write('Object(\n') object.exportLiteral(outfile, level, name_='object') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'object': obj_ = Object.factory() obj_.build(child_) self.object.append(obj_) # end class ObjectsToSelect class ObjectAttributes: subclass = None superclass = None def __init__(self, owner_guid='', guid='', id='', name=''): self.owner_guid = owner_guid self.guid = guid self.id = id self.name = name def factory(*args_, **kwargs_): if ObjectAttributes.subclass: return ObjectAttributes.subclass(*args_, **kwargs_) else: return ObjectAttributes(*args_, **kwargs_) factory = staticmethod(factory) def get_owner_guid(self): return self.owner_guid def set_owner_guid(self, owner_guid): self.owner_guid = owner_guid def get_guid(self): return self.guid def set_guid(self, guid): self.guid = guid def get_id(self): return self.id def set_id(self, id): self.id = id def get_name(self): return self.name def set_name(self, name): self.name = name def export(self, outfile, level, namespace_='', name_='ObjectAttributes'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ObjectAttributes') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ObjectAttributes'): pass def exportChildren(self, outfile, level, namespace_='', name_='ObjectAttributes'): if self.get_owner_guid() != None : if self.get_owner_guid() != "" : showIndent(outfile, level) outfile.write('<%sowner-guid>%s\n' % (namespace_, quote_xml(self.get_owner_guid()), namespace_)) if self.get_guid() != None : if self.get_guid() != "" : showIndent(outfile, level) outfile.write('<%sguid>%s\n' % (namespace_, quote_xml(self.get_guid()), namespace_)) if self.get_id() != None : if self.get_id() != "" : showIndent(outfile, level) outfile.write('<%sid>%s\n' % (namespace_, quote_xml(self.get_id()), namespace_)) if self.get_name() != None : if self.get_name() != "" : showIndent(outfile, level) outfile.write('<%sname>%s\n' % (namespace_, quote_xml(self.get_name()), namespace_)) def exportLiteral(self, outfile, level, name_='ObjectAttributes'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('owner_guid=%s,\n' % quote_python(self.get_owner_guid())) showIndent(outfile, level) outfile.write('guid=%s,\n' % quote_python(self.get_guid())) showIndent(outfile, level) outfile.write('id=%s,\n' % quote_python(self.get_id())) showIndent(outfile, level) outfile.write('name=%s,\n' % quote_python(self.get_name())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'owner-guid': owner_guid_ = '' for text__content_ in child_.childNodes: owner_guid_ += text__content_.nodeValue self.owner_guid = owner_guid_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'guid': guid_ = '' for text__content_ in child_.childNodes: guid_ += text__content_.nodeValue self.guid = guid_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'id': id_ = '' for text__content_ in child_.childNodes: id_ += text__content_.nodeValue self.id = id_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ # end class ObjectAttributes class owner_guid: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if owner_guid.subclass: return owner_guid.subclass(*args_, **kwargs_) else: return owner_guid(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='owner-guid'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='owner-guid') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='owner-guid'): pass def exportChildren(self, outfile, level, namespace_='', name_='owner-guid'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='owner-guid'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class owner_guid class id: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if id.subclass: return id.subclass(*args_, **kwargs_) else: return id(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='id'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='id') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='id'): pass def exportChildren(self, outfile, level, namespace_='', name_='id'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='id'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class id class name: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if name.subclass: return name.subclass(*args_, **kwargs_) else: return name(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='name'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='name') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='name'): pass def exportChildren(self, outfile, level, namespace_='', name_='name'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='name'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class name class DumpOverview: subclass = None superclass = None def __init__(self, session_id='', metainformation=None, objects_to_select=None): self.session_id = session_id self.metainformation = metainformation self.objects_to_select = objects_to_select def factory(*args_, **kwargs_): if DumpOverview.subclass: return DumpOverview.subclass(*args_, **kwargs_) else: return DumpOverview(*args_, **kwargs_) factory = staticmethod(factory) def get_metainformation(self): return self.metainformation def set_metainformation(self, metainformation): self.metainformation = metainformation def get_objects_to_select(self): return self.objects_to_select def set_objects_to_select(self, objects_to_select): self.objects_to_select = objects_to_select def get_session_id(self): return self.session_id def set_session_id(self, session_id): self.session_id = session_id def export(self, outfile, level, namespace_='', name_='DumpOverview'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpOverview') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpOverview'): outfile.write(' session-id="%s"' % (quote_attrib(self.get_session_id()), )) def exportChildren(self, outfile, level, namespace_='', name_='DumpOverview'): if self.metainformation: self.metainformation.export(outfile, level, namespace_, name_='metainformation', ) if self.objects_to_select: self.objects_to_select.export(outfile, level, namespace_, name_='objects-to-select', ) def exportLiteral(self, outfile, level, name_='DumpOverview'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('session_id = "%s",\n' % (self.get_session_id(),)) def exportLiteralChildren(self, outfile, level, name_): if self.metainformation: showIndent(outfile, level) outfile.write('metainformation=Metainformation(\n') self.metainformation.exportLiteral(outfile, level, name_='metainformation') showIndent(outfile, level) outfile.write('),\n') if self.objects_to_select: showIndent(outfile, level) outfile.write('objects_to_select=ObjectsToSelect(\n') self.objects_to_select.exportLiteral(outfile, level, name_='objects_to_select') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('session-id'): self.session_id = attrs.get('session-id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'metainformation': obj_ = Metainformation.factory() obj_.build(child_) self.set_metainformation(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'objects-to-select': obj_ = ObjectsToSelect.factory() obj_.build(child_) self.set_objects_to_select(obj_) # end class DumpOverview class ObjectDisplay: subclass = None superclass = None def __init__(self, conflict_id='', typexx='', name='', planned_action='', valueOf_=''): self.conflict_id = conflict_id self.typexx = typexx self.name = name self.planned_action = planned_action self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ObjectDisplay.subclass: return ObjectDisplay.subclass(*args_, **kwargs_) else: return ObjectDisplay(*args_, **kwargs_) factory = staticmethod(factory) def get_conflict_id(self): return self.conflict_id def set_conflict_id(self, conflict_id): self.conflict_id = conflict_id def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_name(self): return self.name def set_name(self, name): self.name = name def get_planned_action(self): return self.planned_action def set_planned_action(self, planned_action): self.planned_action = planned_action def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ObjectDisplay'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ObjectDisplay') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ObjectDisplay'): if self.get_conflict_id() is not None: outfile.write(' conflict-id="%s"' % (quote_attrib(self.get_conflict_id()), )) if self.get_type() is not None: outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) if self.get_planned_action() is not None: outfile.write(' planned-action="%s"' % (quote_attrib(self.get_planned_action()), )) def exportChildren(self, outfile, level, namespace_='', name_='ObjectDisplay'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ObjectDisplay'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('conflict_id = "%s",\n' % (self.get_conflict_id(),)) showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) showIndent(outfile, level) outfile.write('planned_action = "%s",\n' % (self.get_planned_action(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('conflict-id'): self.conflict_id = attrs.get('conflict-id').value if attrs.get('type'): self.typexx = attrs.get('type').value if attrs.get('name'): self.name = attrs.get('name').value if attrs.get('planned-action'): self.planned_action = attrs.get('planned-action').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ObjectDisplay class ObjectSelect: subclass = None superclass = None def __init__(self, path='', nodename='', attributes=None): self.path = path self.nodename = nodename self.attributes = attributes def factory(*args_, **kwargs_): if ObjectSelect.subclass: return ObjectSelect.subclass(*args_, **kwargs_) else: return ObjectSelect(*args_, **kwargs_) factory = staticmethod(factory) def get_attributes(self): return self.attributes def set_attributes(self, attributes): self.attributes = attributes def get_path(self): return self.path def set_path(self, path): self.path = path def get_nodename(self): return self.nodename def set_nodename(self, nodename): self.nodename = nodename def export(self, outfile, level, namespace_='', name_='ObjectSelect'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ObjectSelect') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ObjectSelect'): if self.get_path() is not None: outfile.write(' path="%s"' % (quote_attrib(self.get_path()), )) if self.get_nodename() is not None: outfile.write(' nodename="%s"' % (quote_attrib(self.get_nodename()), )) def exportChildren(self, outfile, level, namespace_='', name_='ObjectSelect'): if self.get_attributes() != None : if self.attributes: self.attributes.export(outfile, level, namespace_, name_='attributes') def exportLiteral(self, outfile, level, name_='ObjectSelect'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('path = "%s",\n' % (self.get_path(),)) showIndent(outfile, level) outfile.write('nodename = "%s",\n' % (self.get_nodename(),)) def exportLiteralChildren(self, outfile, level, name_): if self.attributes: showIndent(outfile, level) outfile.write('attributes=ObjectAttributes(\n') self.attributes.exportLiteral(outfile, level, name_='attributes') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('path'): self.path = attrs.get('path').value if attrs.get('nodename'): self.nodename = attrs.get('nodename').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'attributes': obj_ = ObjectAttributes.factory() obj_.build(child_) self.set_attributes(obj_) # end class ObjectSelect class Objects: subclass = None superclass = None def __init__(self, object=None): if object is None: self.object = [] else: self.object = object def factory(*args_, **kwargs_): if Objects.subclass: return Objects.subclass(*args_, **kwargs_) else: return Objects(*args_, **kwargs_) factory = staticmethod(factory) def get_object(self): return self.object def set_object(self, object): self.object = object def add_object(self, value): self.object.append(value) def insert_object(self, index, value): self.object[index] = value def export(self, outfile, level, namespace_='', name_='Objects'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Objects') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Objects'): pass def exportChildren(self, outfile, level, namespace_='', name_='Objects'): for object_ in self.get_object(): object_.export(outfile, level, namespace_, name_='object') def exportLiteral(self, outfile, level, name_='Objects'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('object=[\n') level += 1 for object in self.object: showIndent(outfile, level) outfile.write('Object(\n') object.exportLiteral(outfile, level, name_='object') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'object': obj_ = Object.factory() obj_.build(child_) self.object.append(obj_) # end class Objects class Object: subclass = None superclass = None def __init__(self, display=None, select=None, objects=None): self.display = display self.select = select self.objects = objects def factory(*args_, **kwargs_): if Object.subclass: return Object.subclass(*args_, **kwargs_) else: return Object(*args_, **kwargs_) factory = staticmethod(factory) def get_display(self): return self.display def set_display(self, display): self.display = display def get_select(self): return self.select def set_select(self, select): self.select = select def get_objects(self): return self.objects def set_objects(self, objects): self.objects = objects def export(self, outfile, level, namespace_='', name_='Object'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Object') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Object'): pass def exportChildren(self, outfile, level, namespace_='', name_='Object'): if self.display: self.display.export(outfile, level, namespace_, name_='display', ) if self.select: self.select.export(outfile, level, namespace_, name_='select', ) if self.get_objects() != None : if self.objects: self.objects.export(outfile, level, namespace_, name_='objects') def exportLiteral(self, outfile, level, name_='Object'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.display: showIndent(outfile, level) outfile.write('display=ObjectDisplay(\n') self.display.exportLiteral(outfile, level, name_='display') showIndent(outfile, level) outfile.write('),\n') if self.select: showIndent(outfile, level) outfile.write('select=ObjectSelect(\n') self.select.exportLiteral(outfile, level, name_='select') showIndent(outfile, level) outfile.write('),\n') if self.objects: showIndent(outfile, level) outfile.write('objects=Objects(\n') self.objects.exportLiteral(outfile, level, name_='objects') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'display': obj_ = ObjectDisplay.factory() obj_.build(child_) self.set_display(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'select': obj_ = ObjectSelect.factory() obj_.build(child_) self.set_select(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'objects': obj_ = Objects.factory() obj_.build(child_) self.set_objects(obj_) # end class Object class TaskId: subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if TaskId.subclass: return TaskId.subclass(*args_, **kwargs_) else: return TaskId(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='TaskId'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='TaskId') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='TaskId'): pass def exportChildren(self, outfile, level, namespace_='', name_='TaskId'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='TaskId'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class TaskId class TaskLog: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if TaskLog.subclass: return TaskLog.subclass(*args_, **kwargs_) else: return TaskLog(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='TaskLog'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='TaskLog') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='TaskLog'): pass def exportChildren(self, outfile, level, namespace_='', name_='TaskLog'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='TaskLog'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class TaskLog class DstTemporaryDirectory: subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if DstTemporaryDirectory.subclass: return DstTemporaryDirectory.subclass(*args_, **kwargs_) else: return DstTemporaryDirectory(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='DstTemporaryDirectory'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DstTemporaryDirectory') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DstTemporaryDirectory'): pass def exportChildren(self, outfile, level, namespace_='', name_='DstTemporaryDirectory'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='DstTemporaryDirectory'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class DstTemporaryDirectory class DumpName: subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if DumpName.subclass: return DumpName.subclass(*args_, **kwargs_) else: return DumpName(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='DumpName'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpName') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpName'): pass def exportChildren(self, outfile, level, namespace_='', name_='DumpName'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='DumpName'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class DumpName class DownloadSpeed: subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if DownloadSpeed.subclass: return DownloadSpeed.subclass(*args_, **kwargs_) else: return DownloadSpeed(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='DownloadSpeed'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DownloadSpeed') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DownloadSpeed'): pass def exportChildren(self, outfile, level, namespace_='', name_='DownloadSpeed'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='DownloadSpeed'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class DownloadSpeed class ObjTypeReseller: subclass = None superclass = None def __init__(self, name='', contact='', ip=None, clients=None, domains=None, information=None): self.name = name self.contact = contact if ip is None: self.ip = [] else: self.ip = ip self.clients = clients self.domains = domains self.information = information def factory(*args_, **kwargs_): if ObjTypeReseller.subclass: return ObjTypeReseller.subclass(*args_, **kwargs_) else: return ObjTypeReseller(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_contact(self): return self.contact def set_contact(self, contact): self.contact = contact def get_ip(self): return self.ip def set_ip(self, ip): self.ip = ip def add_ip(self, value): self.ip.append(value) def insert_ip(self, index, value): self.ip[index] = value def get_clients(self): return self.clients def set_clients(self, clients): self.clients = clients def get_domains(self): return self.domains def set_domains(self, domains): self.domains = domains def get_information(self): return self.information def set_information(self, information): self.information = information def export(self, outfile, level, namespace_='', name_='ObjTypeReseller'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ObjTypeReseller') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ObjTypeReseller'): pass def exportChildren(self, outfile, level, namespace_='', name_='ObjTypeReseller'): showIndent(outfile, level) outfile.write('<%sname>%s\n' % (namespace_, quote_xml(self.get_name()), namespace_)) if self.get_contact() != None : if self.get_contact() != "" : showIndent(outfile, level) outfile.write('<%scontact>%s\n' % (namespace_, quote_xml(self.get_contact()), namespace_)) for ip_ in self.get_ip(): ip_.export(outfile, level, namespace_, name_='ip') if self.get_clients() != None : if self.clients: self.clients.export(outfile, level, namespace_, name_='clients') if self.get_domains() != None : if self.domains: self.domains.export(outfile, level, namespace_, name_='domains') if self.get_information() != None : if self.information: self.information.export(outfile, level, namespace_, name_='information') def exportLiteral(self, outfile, level, name_='ObjTypeReseller'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name=%s,\n' % quote_python(self.get_name())) showIndent(outfile, level) outfile.write('contact=%s,\n' % quote_python(self.get_contact())) showIndent(outfile, level) outfile.write('ip=[\n') level += 1 for ip in self.ip: showIndent(outfile, level) outfile.write('IPMapping(\n') ip.exportLiteral(outfile, level, name_='ip') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') if self.clients: showIndent(outfile, level) outfile.write('clients=clients(\n') self.clients.exportLiteral(outfile, level) showIndent(outfile, level) outfile.write('),\n') if self.domains: showIndent(outfile, level) outfile.write('domains=domains(\n') self.domains.exportLiteral(outfile, level) showIndent(outfile, level) outfile.write('),\n') if self.information: showIndent(outfile, level) outfile.write('information=InformationType(\n') self.information.exportLiteral(outfile, level, name_='information') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'contact': contact_ = '' for text__content_ in child_.childNodes: contact_ += text__content_.nodeValue self.contact = contact_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'ip': obj_ = IPMapping.factory() obj_.build(child_) self.ip.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'clients': obj_ = clients.factory() obj_.build(child_) self.set_clients(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'domains': obj_ = domains.factory() obj_.build(child_) self.set_domains(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'information': obj_ = InformationType.factory() obj_.build(child_) self.set_information(obj_) # end class ObjTypeReseller class contact: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if contact.subclass: return contact.subclass(*args_, **kwargs_) else: return contact(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='contact'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='contact') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='contact'): pass def exportChildren(self, outfile, level, namespace_='', name_='contact'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='contact'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class contact class clients: subclass = None superclass = None def __init__(self, client=None): if client is None: self.client = [] else: self.client = client def factory(*args_, **kwargs_): if clients.subclass: return clients.subclass(*args_, **kwargs_) else: return clients(*args_, **kwargs_) factory = staticmethod(factory) def get_client(self): return self.client def set_client(self, client): self.client = client def add_client(self, value): self.client.append(value) def insert_client(self, index, value): self.client[index] = value def export(self, outfile, level, namespace_='', name_='clients'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='clients') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='clients'): pass def exportChildren(self, outfile, level, namespace_='', name_='clients'): for client_ in self.get_client(): client_.export(outfile, level, namespace_, name_='client') def exportLiteral(self, outfile, level, name_='clients'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('client=[\n') level += 1 for client in self.client: showIndent(outfile, level) outfile.write('ObjTypeClient(\n') client.exportLiteral(outfile, level, name_='client') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'client': obj_ = ObjTypeClient.factory() obj_.build(child_) self.client.append(obj_) # end class clients class domains: subclass = None superclass = None def __init__(self, domain=None): if domain is None: self.domain = [] else: self.domain = domain def factory(*args_, **kwargs_): if domains.subclass: return domains.subclass(*args_, **kwargs_) else: return domains(*args_, **kwargs_) factory = staticmethod(factory) def get_domain(self): return self.domain def set_domain(self, domain): self.domain = domain def add_domain(self, value): self.domain.append(value) def insert_domain(self, index, value): self.domain[index] = value def export(self, outfile, level, namespace_='', name_='domains'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='domains') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='domains'): pass def exportChildren(self, outfile, level, namespace_='', name_='domains'): for domain_ in self.get_domain(): domain_.export(outfile, level, namespace_, name_='domain') def exportLiteral(self, outfile, level, name_='domains'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('domain=[\n') level += 1 for domain in self.domain: showIndent(outfile, level) outfile.write('ObjTypeDomain(\n') domain.exportLiteral(outfile, level, name_='domain') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'domain': obj_ = ObjTypeDomain.factory() obj_.build(child_) self.domain.append(obj_) # end class domains class ObjTypeClient: subclass = None superclass = None def __init__(self, name='', contact='', ip=None, domains=None, information=None, vendor_login=''): self.name = name self.contact = contact if ip is None: self.ip = [] else: self.ip = ip self.domains = domains self.information = information self.vendor_login = vendor_login def factory(*args_, **kwargs_): if ObjTypeClient.subclass: return ObjTypeClient.subclass(*args_, **kwargs_) else: return ObjTypeClient(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_contact(self): return self.contact def set_contact(self, contact): self.contact = contact def get_ip(self): return self.ip def set_ip(self, ip): self.ip = ip def add_ip(self, value): self.ip.append(value) def insert_ip(self, index, value): self.ip[index] = value def get_domains(self): return self.domains def set_domains(self, domains): self.domains = domains def get_information(self): return self.information def set_information(self, information): self.information = information def get_vendor_login(self): return self.vendor_login def set_vendor_login(self, vendor_login): self.vendor_login = vendor_login def export(self, outfile, level, namespace_='', name_='ObjTypeClient'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ObjTypeClient') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ObjTypeClient'): pass def exportChildren(self, outfile, level, namespace_='', name_='ObjTypeClient'): showIndent(outfile, level) outfile.write('<%sname>%s\n' % (namespace_, quote_xml(self.get_name()), namespace_)) if self.get_contact() != None : if self.get_contact() != "" : showIndent(outfile, level) outfile.write('<%scontact>%s\n' % (namespace_, quote_xml(self.get_contact()), namespace_)) for ip_ in self.get_ip(): ip_.export(outfile, level, namespace_, name_='ip') if self.get_domains() != None : if self.domains: self.domains.export(outfile, level, namespace_, name_='domains') if self.get_information() != None : if self.information: self.information.export(outfile, level, namespace_, name_='information') if self.get_vendor_login() != None : if self.get_vendor_login() != "" : showIndent(outfile, level) outfile.write('<%svendor-login>%s\n' % (namespace_, quote_xml(self.get_vendor_login()), namespace_)) def exportLiteral(self, outfile, level, name_='ObjTypeClient'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name=%s,\n' % quote_python(self.get_name())) showIndent(outfile, level) outfile.write('contact=%s,\n' % quote_python(self.get_contact())) showIndent(outfile, level) outfile.write('ip=[\n') level += 1 for ip in self.ip: showIndent(outfile, level) outfile.write('IPMapping(\n') ip.exportLiteral(outfile, level, name_='ip') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') if self.domains: showIndent(outfile, level) outfile.write('domains=domains(\n') self.domains.exportLiteral(outfile, level) showIndent(outfile, level) outfile.write('),\n') if self.information: showIndent(outfile, level) outfile.write('information=InformationType(\n') self.information.exportLiteral(outfile, level, name_='information') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('vendor_login=%s,\n' % quote_python(self.get_vendor_login())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'contact': contact_ = '' for text__content_ in child_.childNodes: contact_ += text__content_.nodeValue self.contact = contact_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'ip': obj_ = IPMapping.factory() obj_.build(child_) self.ip.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'domains': obj_ = domains.factory() obj_.build(child_) self.set_domains(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'information': obj_ = InformationType.factory() obj_.build(child_) self.set_information(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'vendor-login': vendor_login_ = '' for text__content_ in child_.childNodes: vendor_login_ += text__content_.nodeValue self.vendor_login = vendor_login_ # end class ObjTypeClient class vendor_login: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if vendor_login.subclass: return vendor_login.subclass(*args_, **kwargs_) else: return vendor_login(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='vendor-login'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='vendor-login') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='vendor-login'): pass def exportChildren(self, outfile, level, namespace_='', name_='vendor-login'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='vendor-login'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class vendor_login class ObjTypeDomain: subclass = None superclass = None def __init__(self, exists_on_target='', auxiliary=False, name='', ip=None, resource_usage=None, information=None, capability_info=None): self.exists_on_target = exists_on_target self.auxiliary = auxiliary self.name = name if ip is None: self.ip = [] else: self.ip = ip self.resource_usage = resource_usage self.information = information self.capability_info = capability_info def factory(*args_, **kwargs_): if ObjTypeDomain.subclass: return ObjTypeDomain.subclass(*args_, **kwargs_) else: return ObjTypeDomain(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_ip(self): return self.ip def set_ip(self, ip): self.ip = ip def add_ip(self, value): self.ip.append(value) def insert_ip(self, index, value): self.ip[index] = value def get_resource_usage(self): return self.resource_usage def set_resource_usage(self, resource_usage): self.resource_usage = resource_usage def get_information(self): return self.information def set_information(self, information): self.information = information def get_capability_info(self): return self.capability_info def set_capability_info(self, capability_info): self.capability_info = capability_info def get_exists_on_target(self): return self.exists_on_target def set_exists_on_target(self, exists_on_target): self.exists_on_target = exists_on_target def get_auxiliary(self): return self.auxiliary def set_auxiliary(self, auxiliary): self.auxiliary = auxiliary def export(self, outfile, level, namespace_='', name_='ObjTypeDomain'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ObjTypeDomain') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ObjTypeDomain'): if self.get_exists_on_target() is not None: outfile.write(' exists-on-target="%s"' % (quote_attrib(self.get_exists_on_target()), )) if self.get_auxiliary() is not None: outfile.write(' auxiliary="%s"' % str_lower(str(self.get_auxiliary()))) def exportChildren(self, outfile, level, namespace_='', name_='ObjTypeDomain'): showIndent(outfile, level) outfile.write('<%sname>%s\n' % (namespace_, quote_xml(self.get_name()), namespace_)) for ip_ in self.get_ip(): ip_.export(outfile, level, namespace_, name_='ip') if self.get_resource_usage() != None : if self.resource_usage: self.resource_usage.export(outfile, level, namespace_, name_='resource-usage') if self.get_information() != None : if self.information: self.information.export(outfile, level, namespace_, name_='information') if self.get_capability_info() != None : if self.capability_info: self.capability_info.export(outfile, level, namespace_, name_='capability-info') def exportLiteral(self, outfile, level, name_='ObjTypeDomain'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('exists_on_target = "%s",\n' % (self.get_exists_on_target(),)) showIndent(outfile, level) outfile.write('auxiliary = "%s",\n' % (self.get_auxiliary(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name=%s,\n' % quote_python(self.get_name())) showIndent(outfile, level) outfile.write('ip=[\n') level += 1 for ip in self.ip: showIndent(outfile, level) outfile.write('IPMapping(\n') ip.exportLiteral(outfile, level, name_='ip') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') if self.resource_usage: showIndent(outfile, level) outfile.write('resource_usage=ResourceUsageType(\n') self.resource_usage.exportLiteral(outfile, level, name_='resource_usage') showIndent(outfile, level) outfile.write('),\n') if self.information: showIndent(outfile, level) outfile.write('information=InformationType(\n') self.information.exportLiteral(outfile, level, name_='information') showIndent(outfile, level) outfile.write('),\n') if self.capability_info: showIndent(outfile, level) outfile.write('capability_info=AgentCapabilityInfoType(\n') self.capability_info.exportLiteral(outfile, level, name_='capability_info') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('exists-on-target'): self.exists_on_target = attrs.get('exists-on-target').value if attrs.get('auxiliary'): if attrs.get('auxiliary').value in ('true', '1'): self.auxiliary = True elif attrs.get('auxiliary').value in ('false', '0'): self.auxiliary = False else: raise ValueError('Bad boolean attribute (auxiliary)') def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'ip': obj_ = IPMapping.factory() obj_.build(child_) self.ip.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resource-usage': obj_ = ResourceUsageType.factory() obj_.build(child_) self.set_resource_usage(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'information': obj_ = InformationType.factory() obj_.build(child_) self.set_information(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'capability-info': obj_ = AgentCapabilityInfoType.factory() obj_.build(child_) self.set_capability_info(obj_) # end class ObjTypeDomain class DumpTransformerOptionName: subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if DumpTransformerOptionName.subclass: return DumpTransformerOptionName.subclass(*args_, **kwargs_) else: return DumpTransformerOptionName(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='DumpTransformerOptionName'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpTransformerOptionName') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpTransformerOptionName'): pass def exportChildren(self, outfile, level, namespace_='', name_='DumpTransformerOptionName'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='DumpTransformerOptionName'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class DumpTransformerOptionName class DumpTransformerOptionValue: subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if DumpTransformerOptionValue.subclass: return DumpTransformerOptionValue.subclass(*args_, **kwargs_) else: return DumpTransformerOptionValue(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='DumpTransformerOptionValue'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpTransformerOptionValue') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpTransformerOptionValue'): pass def exportChildren(self, outfile, level, namespace_='', name_='DumpTransformerOptionValue'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='DumpTransformerOptionValue'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class DumpTransformerOptionValue class DumpTransformerOption: subclass = None superclass = None def __init__(self, name=None, value=None): self.name = name self.value = value def factory(*args_, **kwargs_): if DumpTransformerOption.subclass: return DumpTransformerOption.subclass(*args_, **kwargs_) else: return DumpTransformerOption(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_value(self): return self.value def set_value(self, value): self.value = value def export(self, outfile, level, namespace_='', name_='DumpTransformerOption'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpTransformerOption') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpTransformerOption'): pass def exportChildren(self, outfile, level, namespace_='', name_='DumpTransformerOption'): if self.name: self.name.export(outfile, level, namespace_, name_='name', ) if self.value: self.value.export(outfile, level, namespace_, name_='value', ) def exportLiteral(self, outfile, level, name_='DumpTransformerOption'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.name: showIndent(outfile, level) outfile.write('name=DumpTransformerOptionName(\n') self.name.exportLiteral(outfile, level, name_='name') showIndent(outfile, level) outfile.write('),\n') if self.value: showIndent(outfile, level) outfile.write('value=DumpTransformerOptionValue(\n') self.value.exportLiteral(outfile, level, name_='value') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': obj_ = DumpTransformerOptionName.factory() obj_.build(child_) self.set_name(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'value': obj_ = DumpTransformerOptionValue.factory() obj_.build(child_) self.set_value(obj_) # end class DumpTransformerOption class DumpTransformerOptions: subclass = None superclass = None def __init__(self, dump_transformer_option=None): if dump_transformer_option is None: self.dump_transformer_option = [] else: self.dump_transformer_option = dump_transformer_option def factory(*args_, **kwargs_): if DumpTransformerOptions.subclass: return DumpTransformerOptions.subclass(*args_, **kwargs_) else: return DumpTransformerOptions(*args_, **kwargs_) factory = staticmethod(factory) def get_dump_transformer_option(self): return self.dump_transformer_option def set_dump_transformer_option(self, dump_transformer_option): self.dump_transformer_option = dump_transformer_option def add_dump_transformer_option(self, value): self.dump_transformer_option.append(value) def insert_dump_transformer_option(self, index, value): self.dump_transformer_option[index] = value def export(self, outfile, level, namespace_='', name_='DumpTransformerOptions'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpTransformerOptions') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpTransformerOptions'): pass def exportChildren(self, outfile, level, namespace_='', name_='DumpTransformerOptions'): for dump_transformer_option_ in self.get_dump_transformer_option(): dump_transformer_option_.export(outfile, level, namespace_, name_='dump-transformer-option') def exportLiteral(self, outfile, level, name_='DumpTransformerOptions'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('dump_transformer_option=[\n') level += 1 for dump_transformer_option in self.dump_transformer_option: showIndent(outfile, level) outfile.write('DumpTransformerOption(\n') dump_transformer_option.exportLiteral(outfile, level, name_='dump_transformer_option') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-transformer-option': obj_ = DumpTransformerOption.factory() obj_.build(child_) self.dump_transformer_option.append(obj_) # end class DumpTransformerOptions class MigrationParameters: subclass = None superclass = None def __init__(self, filter='', content_transport='', compression_level='', dump_transformer_options=None): self.filter = filter self.content_transport = content_transport self.compression_level = compression_level self.dump_transformer_options = dump_transformer_options def factory(*args_, **kwargs_): if MigrationParameters.subclass: return MigrationParameters.subclass(*args_, **kwargs_) else: return MigrationParameters(*args_, **kwargs_) factory = staticmethod(factory) def get_dump_transformer_options(self): return self.dump_transformer_options def set_dump_transformer_options(self, dump_transformer_options): self.dump_transformer_options = dump_transformer_options def get_filter(self): return self.filter def set_filter(self, filter): self.filter = filter def get_content_transport(self): return self.content_transport def set_content_transport(self, content_transport): self.content_transport = content_transport def get_compression_level(self): return self.compression_level def set_compression_level(self, compression_level): self.compression_level = compression_level def export(self, outfile, level, namespace_='', name_='MigrationParameters'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationParameters') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationParameters'): if self.get_filter() is not None: outfile.write(' filter="%s"' % (quote_attrib(self.get_filter()), )) if self.get_content_transport() is not None: outfile.write(' content-transport="%s"' % (quote_attrib(self.get_content_transport()), )) if self.get_compression_level() is not None: outfile.write(' compression-level="%s"' % (quote_attrib(self.get_compression_level()), )) def exportChildren(self, outfile, level, namespace_='', name_='MigrationParameters'): if self.get_dump_transformer_options() != None : if self.dump_transformer_options: self.dump_transformer_options.export(outfile, level, namespace_, name_='dump-transformer-options') def exportLiteral(self, outfile, level, name_='MigrationParameters'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('filter = "%s",\n' % (self.get_filter(),)) showIndent(outfile, level) outfile.write('content_transport = "%s",\n' % (self.get_content_transport(),)) showIndent(outfile, level) outfile.write('compression_level = "%s",\n' % (self.get_compression_level(),)) def exportLiteralChildren(self, outfile, level, name_): if self.dump_transformer_options: showIndent(outfile, level) outfile.write('dump_transformer_options=DumpTransformerOptions(\n') self.dump_transformer_options.exportLiteral(outfile, level, name_='dump_transformer_options') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('filter'): self.filter = attrs.get('filter').value if attrs.get('content-transport'): self.content_transport = attrs.get('content-transport').value if attrs.get('compression-level'): self.compression_level = attrs.get('compression-level').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-transformer-options': obj_ = DumpTransformerOptions.factory() obj_.build(child_) self.set_dump_transformer_options(obj_) # end class MigrationParameters class MigrationObjectList: subclass = None superclass = None def __init__(self, migration_session_id='', parameters=None, reseller=None, client=None, domain=None, admin_info=None, server=None): self.migration_session_id = migration_session_id self.parameters = parameters if reseller is None: self.reseller = [] else: self.reseller = reseller if client is None: self.client = [] else: self.client = client if domain is None: self.domain = [] else: self.domain = domain self.admin_info = admin_info self.server = server def factory(*args_, **kwargs_): if MigrationObjectList.subclass: return MigrationObjectList.subclass(*args_, **kwargs_) else: return MigrationObjectList(*args_, **kwargs_) factory = staticmethod(factory) def get_parameters(self): return self.parameters def set_parameters(self, parameters): self.parameters = parameters def validate_MigrationParameters(self, value): # validate type MigrationParameters pass def get_reseller(self): return self.reseller def set_reseller(self, reseller): self.reseller = reseller def add_reseller(self, value): self.reseller.append(value) def insert_reseller(self, index, value): self.reseller[index] = value def get_client(self): return self.client def set_client(self, client): self.client = client def add_client(self, value): self.client.append(value) def insert_client(self, index, value): self.client[index] = value def get_domain(self): return self.domain def set_domain(self, domain): self.domain = domain def add_domain(self, value): self.domain.append(value) def insert_domain(self, index, value): self.domain[index] = value def get_admin_info(self): return self.admin_info def set_admin_info(self, admin_info): self.admin_info = admin_info def get_server(self): return self.server def set_server(self, server): self.server = server def get_migration_session_id(self): return self.migration_session_id def set_migration_session_id(self, migration_session_id): self.migration_session_id = migration_session_id def export(self, outfile, level, namespace_='', name_='MigrationObjectList'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationObjectList') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationObjectList'): if self.get_migration_session_id() is not None: outfile.write(' migration-session-id="%s"' % (quote_attrib(self.get_migration_session_id()), )) def exportChildren(self, outfile, level, namespace_='', name_='MigrationObjectList'): if self.get_parameters() != None : if self.parameters: self.parameters.export(outfile, level, namespace_, name_='parameters') for reseller_ in self.get_reseller(): reseller_.export(outfile, level, namespace_, name_='reseller') for client_ in self.get_client(): client_.export(outfile, level, namespace_, name_='client') for domain_ in self.get_domain(): domain_.export(outfile, level, namespace_, name_='domain') if self.get_admin_info() != None : if self.admin_info: self.admin_info.export(outfile, level, namespace_, name_='admin-info') if self.get_server() != None : if self.server: self.server.export(outfile, level, namespace_, name_='server') def exportLiteral(self, outfile, level, name_='MigrationObjectList'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('migration_session_id = "%s",\n' % (self.get_migration_session_id(),)) def exportLiteralChildren(self, outfile, level, name_): if self.parameters: showIndent(outfile, level) outfile.write('parameters=MigrationParameters(\n') self.parameters.exportLiteral(outfile, level, name_='parameters') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('reseller=[\n') level += 1 for reseller in self.reseller: showIndent(outfile, level) outfile.write('ObjTypeReseller(\n') reseller.exportLiteral(outfile, level, name_='reseller') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('client=[\n') level += 1 for client in self.client: showIndent(outfile, level) outfile.write('ObjTypeClient(\n') client.exportLiteral(outfile, level, name_='client') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('domain=[\n') level += 1 for domain in self.domain: showIndent(outfile, level) outfile.write('ObjTypeDomain(\n') domain.exportLiteral(outfile, level, name_='domain') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') if self.admin_info: showIndent(outfile, level) outfile.write('admin_info=ObjAdminInfoType(\n') self.admin_info.exportLiteral(outfile, level, name_='admin_info') showIndent(outfile, level) outfile.write('),\n') if self.server: showIndent(outfile, level) outfile.write('server=ObjServerType(\n') self.server.exportLiteral(outfile, level, name_='server') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('migration-session-id'): self.migration_session_id = attrs.get('migration-session-id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'parameters': obj_ = MigrationParameters.factory() obj_.build(child_) self.set_parameters(obj_) self.validate_MigrationParameters(self.parameters) # validate type MigrationParameters elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'reseller': obj_ = ObjTypeReseller.factory() obj_.build(child_) self.reseller.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'client': obj_ = ObjTypeClient.factory() obj_.build(child_) self.client.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'domain': obj_ = ObjTypeDomain.factory() obj_.build(child_) self.domain.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'admin-info': obj_ = ObjAdminInfoType.factory() obj_.build(child_) self.set_admin_info(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'server': obj_ = ObjServerType.factory() obj_.build(child_) self.set_server(obj_) # end class MigrationObjectList class MigrationObjectAdminInfo: subclass = None superclass = None def __init__(self, information=None): self.information = information def factory(*args_, **kwargs_): if MigrationObjectAdminInfo.subclass: return MigrationObjectAdminInfo.subclass(*args_, **kwargs_) else: return MigrationObjectAdminInfo(*args_, **kwargs_) factory = staticmethod(factory) def get_information(self): return self.information def set_information(self, information): self.information = information def export(self, outfile, level, namespace_='', name_='MigrationObjectAdminInfo'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationObjectAdminInfo') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationObjectAdminInfo'): pass def exportChildren(self, outfile, level, namespace_='', name_='MigrationObjectAdminInfo'): if self.get_information() != None : if self.information: self.information.export(outfile, level, namespace_, name_='information') def exportLiteral(self, outfile, level, name_='MigrationObjectAdminInfo'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.information: showIndent(outfile, level) outfile.write('information=InformationType(\n') self.information.exportLiteral(outfile, level, name_='information') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'information': obj_ = InformationType.factory() obj_.build(child_) self.set_information(obj_) # end class MigrationObjectAdminInfo class MigrationObjectServerLicense: subclass = None superclass = None def __init__(self, check='', valueOf_=''): self.check = check self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if MigrationObjectServerLicense.subclass: return MigrationObjectServerLicense.subclass(*args_, **kwargs_) else: return MigrationObjectServerLicense(*args_, **kwargs_) factory = staticmethod(factory) def get_check(self): return self.check def set_check(self, check): self.check = check def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='MigrationObjectServerLicense'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationObjectServerLicense') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationObjectServerLicense'): if self.get_check() is not None: outfile.write(' check="%s"' % (quote_attrib(self.get_check()), )) def exportChildren(self, outfile, level, namespace_='', name_='MigrationObjectServerLicense'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='MigrationObjectServerLicense'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('check = "%s",\n' % (self.get_check(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('check'): self.check = attrs.get('check').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class MigrationObjectServerLicense class MigrationObjectServer: subclass = None superclass = None def __init__(self, check='', information=None, license=None, capability_info=None): self.check = check self.information = information self.license = license self.capability_info = capability_info def factory(*args_, **kwargs_): if MigrationObjectServer.subclass: return MigrationObjectServer.subclass(*args_, **kwargs_) else: return MigrationObjectServer(*args_, **kwargs_) factory = staticmethod(factory) def get_information(self): return self.information def set_information(self, information): self.information = information def get_license(self): return self.license def set_license(self, license): self.license = license def get_capability_info(self): return self.capability_info def set_capability_info(self, capability_info): self.capability_info = capability_info def get_check(self): return self.check def set_check(self, check): self.check = check def export(self, outfile, level, namespace_='', name_='MigrationObjectServer'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationObjectServer') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationObjectServer'): if self.get_check() is not None: outfile.write(' check="%s"' % (quote_attrib(self.get_check()), )) def exportChildren(self, outfile, level, namespace_='', name_='MigrationObjectServer'): if self.get_information() != None : if self.information: self.information.export(outfile, level, namespace_, name_='information') if self.get_license() != None : if self.license: self.license.export(outfile, level, namespace_, name_='license') if self.get_capability_info() != None : if self.capability_info: self.capability_info.export(outfile, level, namespace_, name_='capability-info') def exportLiteral(self, outfile, level, name_='MigrationObjectServer'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('check = "%s",\n' % (self.get_check(),)) def exportLiteralChildren(self, outfile, level, name_): if self.information: showIndent(outfile, level) outfile.write('information=InformationType(\n') self.information.exportLiteral(outfile, level, name_='information') showIndent(outfile, level) outfile.write('),\n') if self.license: showIndent(outfile, level) outfile.write('license=MigrationObjectServerLicense(\n') self.license.exportLiteral(outfile, level, name_='license') showIndent(outfile, level) outfile.write('),\n') if self.capability_info: showIndent(outfile, level) outfile.write('capability_info=AgentCapabilityInfoType(\n') self.capability_info.exportLiteral(outfile, level, name_='capability_info') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('check'): self.check = attrs.get('check').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'information': obj_ = InformationType.factory() obj_.build(child_) self.set_information(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'license': obj_ = MigrationObjectServerLicense.factory() obj_.build(child_) self.set_license(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'capability-info': obj_ = AgentCapabilityInfoType.factory() obj_.build(child_) self.set_capability_info(obj_) # end class MigrationObjectServer class Data: subclass = None superclass = None def __init__(self, restore_task_result=None, dump_overview=None, conflicts_description=None, task_id=None, task_list=None, session_list=None, task_status=None, task_log=None, dump_list=None, check_dump_result=None, scout_result=None, quick_info=None, migration_objects_list=None, dump=None, agent_credentials=None, migration_ip_mapping=None, migration_db_mapping=None, migration_owners=None, migration_restore_policy=None, migration_selected_objects=None, dst_temporary_directory=None, config_parameters=None, migration_capability_info=None, migration_download_speed=None, child_dumps_list=None, dump_name=None, plain_data=None, repository_check_errors=None): self.restore_task_result = restore_task_result self.dump_overview = dump_overview self.conflicts_description = conflicts_description self.task_id = task_id self.task_list = task_list self.session_list = session_list self.task_status = task_status self.task_log = task_log self.dump_list = dump_list self.check_dump_result = check_dump_result self.scout_result = scout_result self.quick_info = quick_info self.migration_objects_list = migration_objects_list self.dump = dump self.agent_credentials = agent_credentials self.migration_ip_mapping = migration_ip_mapping self.migration_db_mapping = migration_db_mapping self.migration_owners = migration_owners self.migration_restore_policy = migration_restore_policy self.migration_selected_objects = migration_selected_objects self.dst_temporary_directory = dst_temporary_directory self.config_parameters = config_parameters self.migration_capability_info = migration_capability_info self.migration_download_speed = migration_download_speed self.child_dumps_list = child_dumps_list self.dump_name = dump_name self.plain_data = plain_data self.repository_check_errors = repository_check_errors def factory(*args_, **kwargs_): if Data.subclass: return Data.subclass(*args_, **kwargs_) else: return Data(*args_, **kwargs_) factory = staticmethod(factory) def get_restore_task_result(self): return self.restore_task_result def set_restore_task_result(self, restore_task_result): self.restore_task_result = restore_task_result def get_dump_overview(self): return self.dump_overview def set_dump_overview(self, dump_overview): self.dump_overview = dump_overview def get_conflicts_description(self): return self.conflicts_description def set_conflicts_description(self, conflicts_description): self.conflicts_description = conflicts_description def get_task_id(self): return self.task_id def set_task_id(self, task_id): self.task_id = task_id def get_task_list(self): return self.task_list def set_task_list(self, task_list): self.task_list = task_list def get_session_list(self): return self.session_list def set_session_list(self, session_list): self.session_list = session_list def get_task_status(self): return self.task_status def set_task_status(self, task_status): self.task_status = task_status def get_task_log(self): return self.task_log def set_task_log(self, task_log): self.task_log = task_log def get_dump_list(self): return self.dump_list def set_dump_list(self, dump_list): self.dump_list = dump_list def get_check_dump_result(self): return self.check_dump_result def set_check_dump_result(self, check_dump_result): self.check_dump_result = check_dump_result def get_scout_result(self): return self.scout_result def set_scout_result(self, scout_result): self.scout_result = scout_result def get_quick_info(self): return self.quick_info def set_quick_info(self, quick_info): self.quick_info = quick_info def get_migration_objects_list(self): return self.migration_objects_list def set_migration_objects_list(self, migration_objects_list): self.migration_objects_list = migration_objects_list def get_dump(self): return self.dump def set_dump(self, dump): self.dump = dump def validate_Dump(self, value): # validate type Dump pass def get_agent_credentials(self): return self.agent_credentials def set_agent_credentials(self, agent_credentials): self.agent_credentials = agent_credentials def get_migration_ip_mapping(self): return self.migration_ip_mapping def set_migration_ip_mapping(self, migration_ip_mapping): self.migration_ip_mapping = migration_ip_mapping def get_migration_db_mapping(self): return self.migration_db_mapping def set_migration_db_mapping(self, migration_db_mapping): self.migration_db_mapping = migration_db_mapping def get_migration_owners(self): return self.migration_owners def set_migration_owners(self, migration_owners): self.migration_owners = migration_owners def get_migration_restore_policy(self): return self.migration_restore_policy def set_migration_restore_policy(self, migration_restore_policy): self.migration_restore_policy = migration_restore_policy def get_migration_selected_objects(self): return self.migration_selected_objects def set_migration_selected_objects(self, migration_selected_objects): self.migration_selected_objects = migration_selected_objects def get_dst_temporary_directory(self): return self.dst_temporary_directory def set_dst_temporary_directory(self, dst_temporary_directory): self.dst_temporary_directory = dst_temporary_directory def get_config_parameters(self): return self.config_parameters def set_config_parameters(self, config_parameters): self.config_parameters = config_parameters def get_migration_capability_info(self): return self.migration_capability_info def set_migration_capability_info(self, migration_capability_info): self.migration_capability_info = migration_capability_info def get_migration_download_speed(self): return self.migration_download_speed def set_migration_download_speed(self, migration_download_speed): self.migration_download_speed = migration_download_speed def get_child_dumps_list(self): return self.child_dumps_list def set_child_dumps_list(self, child_dumps_list): self.child_dumps_list = child_dumps_list def get_dump_name(self): return self.dump_name def set_dump_name(self, dump_name): self.dump_name = dump_name def get_plain_data(self): return self.plain_data def set_plain_data(self, plain_data): self.plain_data = plain_data def get_repository_check_errors(self): return self.repository_check_errors def set_repository_check_errors(self, repository_check_errors): self.repository_check_errors = repository_check_errors def export(self, outfile, level, namespace_='', name_='Data'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Data') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Data'): pass def exportChildren(self, outfile, level, namespace_='', name_='Data'): if self.restore_task_result: self.restore_task_result.export(outfile, level, namespace_, name_='restore-task-result', ) if self.dump_overview: self.dump_overview.export(outfile, level, namespace_, name_='dump-overview', ) if self.conflicts_description: self.conflicts_description.export(outfile, level, namespace_, name_='conflicts-description', ) if self.task_id: self.task_id.export(outfile, level, namespace_, name_='task-id', ) if self.task_list: self.task_list.export(outfile, level, namespace_, name_='task-list', ) if self.session_list: self.session_list.export(outfile, level, namespace_, name_='session-list', ) if self.task_status: self.task_status.export(outfile, level, namespace_, name_='task-status', ) if self.task_log: self.task_log.export(outfile, level, namespace_, name_='task-log', ) if self.dump_list: self.dump_list.export(outfile, level, namespace_, name_='dump-list', ) if self.check_dump_result: self.check_dump_result.export(outfile, level, namespace_, name_='check-dump-result', ) if self.scout_result: self.scout_result.export(outfile, level, namespace_, name_='scout-result', ) if self.quick_info: self.quick_info.export(outfile, level, namespace_, name_='quick-info', ) if self.migration_objects_list: self.migration_objects_list.export(outfile, level, namespace_, name_='migration-objects-list', ) if self.dump: self.dump.export(outfile, level, namespace_, name_='dump', ) if self.agent_credentials: self.agent_credentials.export(outfile, level, namespace_, name_='agent-credentials', ) if self.migration_ip_mapping: self.migration_ip_mapping.export(outfile, level, namespace_, name_='migration-ip-mapping', ) if self.migration_db_mapping: self.migration_db_mapping.export(outfile, level, namespace_, name_='migration-db-mapping', ) if self.migration_owners: self.migration_owners.export(outfile, level, namespace_, name_='migration-owners', ) if self.migration_restore_policy: self.migration_restore_policy.export(outfile, level, namespace_, name_='migration-restore-policy', ) if self.migration_selected_objects: self.migration_selected_objects.export(outfile, level, namespace_, name_='migration-selected-objects', ) if self.dst_temporary_directory: self.dst_temporary_directory.export(outfile, level, namespace_, name_='dst-temporary-directory', ) if self.config_parameters: self.config_parameters.export(outfile, level, namespace_, name_='config-parameters', ) if self.migration_capability_info: self.migration_capability_info.export(outfile, level, namespace_, name_='migration-capability-info', ) if self.migration_download_speed: self.migration_download_speed.export(outfile, level, namespace_, name_='migration-download-speed', ) if self.child_dumps_list: self.child_dumps_list.export(outfile, level, namespace_, name_='child-dumps-list', ) if self.dump_name: self.dump_name.export(outfile, level, namespace_, name_='dump-name', ) if self.plain_data: self.plain_data.export(outfile, level, namespace_, name_='plain-data', ) if self.repository_check_errors: self.repository_check_errors.export(outfile, level, namespace_, name_='repository-check-errors', ) def exportLiteral(self, outfile, level, name_='Data'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.restore_task_result: showIndent(outfile, level) outfile.write('restore_task_result=RestoreTaskResult(\n') self.restore_task_result.exportLiteral(outfile, level, name_='restore_task_result') showIndent(outfile, level) outfile.write('),\n') if self.dump_overview: showIndent(outfile, level) outfile.write('dump_overview=DumpOverview(\n') self.dump_overview.exportLiteral(outfile, level, name_='dump_overview') showIndent(outfile, level) outfile.write('),\n') if self.conflicts_description: showIndent(outfile, level) outfile.write('conflicts_description=ConflictsDescription(\n') self.conflicts_description.exportLiteral(outfile, level, name_='conflicts_description') showIndent(outfile, level) outfile.write('),\n') if self.task_id: showIndent(outfile, level) outfile.write('task_id=TaskId(\n') self.task_id.exportLiteral(outfile, level, name_='task_id') showIndent(outfile, level) outfile.write('),\n') if self.task_list: showIndent(outfile, level) outfile.write('task_list=TaskList(\n') self.task_list.exportLiteral(outfile, level, name_='task_list') showIndent(outfile, level) outfile.write('),\n') if self.session_list: showIndent(outfile, level) outfile.write('session_list=SessionList(\n') self.session_list.exportLiteral(outfile, level, name_='session_list') showIndent(outfile, level) outfile.write('),\n') if self.task_status: showIndent(outfile, level) outfile.write('task_status=TaskStatus(\n') self.task_status.exportLiteral(outfile, level, name_='task_status') showIndent(outfile, level) outfile.write('),\n') if self.task_log: showIndent(outfile, level) outfile.write('task_log=TaskLog(\n') self.task_log.exportLiteral(outfile, level, name_='task_log') showIndent(outfile, level) outfile.write('),\n') if self.dump_list: showIndent(outfile, level) outfile.write('dump_list=DumpList(\n') self.dump_list.exportLiteral(outfile, level, name_='dump_list') showIndent(outfile, level) outfile.write('),\n') if self.check_dump_result: showIndent(outfile, level) outfile.write('check_dump_result=CheckDumpResult(\n') self.check_dump_result.exportLiteral(outfile, level, name_='check_dump_result') showIndent(outfile, level) outfile.write('),\n') if self.scout_result: showIndent(outfile, level) outfile.write('scout_result=ScoutResult(\n') self.scout_result.exportLiteral(outfile, level, name_='scout_result') showIndent(outfile, level) outfile.write('),\n') if self.quick_info: showIndent(outfile, level) outfile.write('quick_info=QuickInfo(\n') self.quick_info.exportLiteral(outfile, level, name_='quick_info') showIndent(outfile, level) outfile.write('),\n') if self.migration_objects_list: showIndent(outfile, level) outfile.write('migration_objects_list=MigrationObjectList(\n') self.migration_objects_list.exportLiteral(outfile, level, name_='migration_objects_list') showIndent(outfile, level) outfile.write('),\n') if self.dump: showIndent(outfile, level) outfile.write('dump=Dump(\n') self.dump.exportLiteral(outfile, level, name_='dump') showIndent(outfile, level) outfile.write('),\n') if self.agent_credentials: showIndent(outfile, level) outfile.write('agent_credentials=AgentCredentials(\n') self.agent_credentials.exportLiteral(outfile, level, name_='agent_credentials') showIndent(outfile, level) outfile.write('),\n') if self.migration_ip_mapping: showIndent(outfile, level) outfile.write('migration_ip_mapping=IPMapping(\n') self.migration_ip_mapping.exportLiteral(outfile, level, name_='migration_ip_mapping') showIndent(outfile, level) outfile.write('),\n') if self.migration_db_mapping: showIndent(outfile, level) outfile.write('migration_db_mapping=DBMapping(\n') self.migration_db_mapping.exportLiteral(outfile, level, name_='migration_db_mapping') showIndent(outfile, level) outfile.write('),\n') if self.migration_owners: showIndent(outfile, level) outfile.write('migration_owners=OwnersMapping(\n') self.migration_owners.exportLiteral(outfile, level, name_='migration_owners') showIndent(outfile, level) outfile.write('),\n') if self.migration_restore_policy: showIndent(outfile, level) outfile.write('migration_restore_policy=ConflictResolutionRules(\n') self.migration_restore_policy.exportLiteral(outfile, level, name_='migration_restore_policy') showIndent(outfile, level) outfile.write('),\n') if self.migration_selected_objects: showIndent(outfile, level) outfile.write('migration_selected_objects=MigrationObjectList(\n') self.migration_selected_objects.exportLiteral(outfile, level, name_='migration_selected_objects') showIndent(outfile, level) outfile.write('),\n') if self.dst_temporary_directory: showIndent(outfile, level) outfile.write('dst_temporary_directory=DstTemporaryDirectory(\n') self.dst_temporary_directory.exportLiteral(outfile, level, name_='dst_temporary_directory') showIndent(outfile, level) outfile.write('),\n') if self.config_parameters: showIndent(outfile, level) outfile.write('config_parameters=ConfigParameters(\n') self.config_parameters.exportLiteral(outfile, level, name_='config_parameters') showIndent(outfile, level) outfile.write('),\n') if self.migration_capability_info: showIndent(outfile, level) outfile.write('migration_capability_info=MigrationCapabilityInfo(\n') self.migration_capability_info.exportLiteral(outfile, level, name_='migration_capability_info') showIndent(outfile, level) outfile.write('),\n') if self.migration_download_speed: showIndent(outfile, level) outfile.write('migration_download_speed=DownloadSpeed(\n') self.migration_download_speed.exportLiteral(outfile, level, name_='migration_download_speed') showIndent(outfile, level) outfile.write('),\n') if self.child_dumps_list: showIndent(outfile, level) outfile.write('child_dumps_list=ChildDumpsList(\n') self.child_dumps_list.exportLiteral(outfile, level, name_='child_dumps_list') showIndent(outfile, level) outfile.write('),\n') if self.dump_name: showIndent(outfile, level) outfile.write('dump_name=DumpName(\n') self.dump_name.exportLiteral(outfile, level, name_='dump_name') showIndent(outfile, level) outfile.write('),\n') if self.plain_data: showIndent(outfile, level) outfile.write('plain_data=PlainData(\n') self.plain_data.exportLiteral(outfile, level, name_='plain_data') showIndent(outfile, level) outfile.write('),\n') if self.repository_check_errors: showIndent(outfile, level) outfile.write('repository_check_errors=RepositoryCheckErrors(\n') self.repository_check_errors.exportLiteral(outfile, level, name_='repository_check_errors') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'restore-task-result': obj_ = RestoreTaskResult.factory() obj_.build(child_) self.set_restore_task_result(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-overview': obj_ = DumpOverview.factory() obj_.build(child_) self.set_dump_overview(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'conflicts-description': obj_ = ConflictsDescription.factory() obj_.build(child_) self.set_conflicts_description(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'task-id': obj_ = TaskId.factory() obj_.build(child_) self.set_task_id(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'task-list': obj_ = TaskList.factory() obj_.build(child_) self.set_task_list(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'session-list': obj_ = SessionList.factory() obj_.build(child_) self.set_session_list(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'task-status': obj_ = TaskStatus.factory() obj_.build(child_) self.set_task_status(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'task-log': obj_ = TaskLog.factory() obj_.build(child_) self.set_task_log(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-list': obj_ = DumpList.factory() obj_.build(child_) self.set_dump_list(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'check-dump-result': obj_ = CheckDumpResult.factory() obj_.build(child_) self.set_check_dump_result(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'scout-result': obj_ = ScoutResult.factory() obj_.build(child_) self.set_scout_result(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'quick-info': obj_ = QuickInfo.factory() obj_.build(child_) self.set_quick_info(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'migration-objects-list': obj_ = MigrationObjectList.factory() obj_.build(child_) self.set_migration_objects_list(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump': obj_ = Dump.factory() obj_.build(child_) self.set_dump(obj_) self.validate_Dump(self.dump) # validate type Dump elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'agent-credentials': obj_ = AgentCredentials.factory() obj_.build(child_) self.set_agent_credentials(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'migration-ip-mapping': obj_ = IPMapping.factory() obj_.build(child_) self.set_migration_ip_mapping(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'migration-db-mapping': obj_ = DBMapping.factory() obj_.build(child_) self.set_migration_db_mapping(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'migration-owners': obj_ = OwnersMapping.factory() obj_.build(child_) self.set_migration_owners(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'migration-restore-policy': obj_ = ConflictResolutionRules.factory() obj_.build(child_) self.set_migration_restore_policy(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'migration-selected-objects': obj_ = MigrationObjectList.factory() obj_.build(child_) self.set_migration_selected_objects(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dst-temporary-directory': obj_ = DstTemporaryDirectory.factory() obj_.build(child_) self.set_dst_temporary_directory(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'config-parameters': obj_ = ConfigParameters.factory() obj_.build(child_) self.set_config_parameters(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'migration-capability-info': obj_ = MigrationCapabilityInfo.factory() obj_.build(child_) self.set_migration_capability_info(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'migration-download-speed': obj_ = DownloadSpeed.factory() obj_.build(child_) self.set_migration_download_speed(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'child-dumps-list': obj_ = ChildDumpsList.factory() obj_.build(child_) self.set_child_dumps_list(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-name': obj_ = DumpName.factory() obj_.build(child_) self.set_dump_name(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'plain-data': obj_ = PlainData.factory() obj_.build(child_) self.set_plain_data(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'repository-check-errors': obj_ = RepositoryCheckErrors.factory() obj_.build(child_) self.set_repository_check_errors(obj_) # end class Data class QuickInfo: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if QuickInfo.subclass: return QuickInfo.subclass(*args_, **kwargs_) else: return QuickInfo(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='QuickInfo'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='QuickInfo') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='QuickInfo'): pass def exportChildren(self, outfile, level, namespace_='', name_='QuickInfo'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='QuickInfo'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class QuickInfo class ScoutResult: subclass = None superclass = None def __init__(self, migration_session_id='', detected_panel=None, os_info=None, remote_fs=None): self.migration_session_id = migration_session_id if detected_panel is None: self.detected_panel = [] else: self.detected_panel = detected_panel self.os_info = os_info self.remote_fs = remote_fs def factory(*args_, **kwargs_): if ScoutResult.subclass: return ScoutResult.subclass(*args_, **kwargs_) else: return ScoutResult(*args_, **kwargs_) factory = staticmethod(factory) def get_detected_panel(self): return self.detected_panel def set_detected_panel(self, detected_panel): self.detected_panel = detected_panel def add_detected_panel(self, value): self.detected_panel.append(value) def insert_detected_panel(self, index, value): self.detected_panel[index] = value def get_os_info(self): return self.os_info def set_os_info(self, os_info): self.os_info = os_info def get_remote_fs(self): return self.remote_fs def set_remote_fs(self, remote_fs): self.remote_fs = remote_fs def get_migration_session_id(self): return self.migration_session_id def set_migration_session_id(self, migration_session_id): self.migration_session_id = migration_session_id def export(self, outfile, level, namespace_='', name_='ScoutResult'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ScoutResult') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ScoutResult'): if self.get_migration_session_id() is not None: outfile.write(' migration-session-id="%s"' % (quote_attrib(self.get_migration_session_id()), )) def exportChildren(self, outfile, level, namespace_='', name_='ScoutResult'): for detected_panel_ in self.get_detected_panel(): detected_panel_.export(outfile, level, namespace_, name_='detected-panel') if self.os_info: self.os_info.export(outfile, level, namespace_, name_='os-info', ) if self.remote_fs: self.remote_fs.export(outfile, level, namespace_, name_='remote-fs', ) def exportLiteral(self, outfile, level, name_='ScoutResult'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('migration_session_id = "%s",\n' % (self.get_migration_session_id(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('detected_panel=[\n') level += 1 for detected_panel in self.detected_panel: showIndent(outfile, level) outfile.write('DetectedPanel(\n') detected_panel.exportLiteral(outfile, level, name_='detected_panel') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') if self.os_info: showIndent(outfile, level) outfile.write('os_info=OsInfo(\n') self.os_info.exportLiteral(outfile, level, name_='os_info') showIndent(outfile, level) outfile.write('),\n') if self.remote_fs: showIndent(outfile, level) outfile.write('remote_fs=FsList(\n') self.remote_fs.exportLiteral(outfile, level, name_='remote_fs') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('migration-session-id'): self.migration_session_id = attrs.get('migration-session-id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'detected-panel': obj_ = DetectedPanel.factory() obj_.build(child_) self.detected_panel.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'os-info': obj_ = OsInfo.factory() obj_.build(child_) self.set_os_info(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'remote-fs': obj_ = FsList.factory() obj_.build(child_) self.set_remote_fs(obj_) # end class ScoutResult class PackageInstalled: subclass = None superclass = None def __init__(self, version='', name='', valueOf_=''): self.version = version self.name = name self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if PackageInstalled.subclass: return PackageInstalled.subclass(*args_, **kwargs_) else: return PackageInstalled(*args_, **kwargs_) factory = staticmethod(factory) def get_version(self): return self.version def set_version(self, version): self.version = version def get_name(self): return self.name def set_name(self, name): self.name = name def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='PackageInstalled'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='PackageInstalled') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='PackageInstalled'): if self.get_version() is not None: outfile.write(' version="%s"' % (quote_attrib(self.get_version()), )) outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='PackageInstalled'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='PackageInstalled'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('version = "%s",\n' % (self.get_version(),)) showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('version'): self.version = attrs.get('version').value if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class PackageInstalled class DetectedPanel: subclass = None superclass = None def __init__(self, name='', agent='', valueOf_='', mixedclass_=None, content_=None): self.name = name self.agent = agent if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if DetectedPanel.subclass: return DetectedPanel.subclass(*args_, **kwargs_) else: return DetectedPanel(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_agent(self): return self.agent def set_agent(self, agent): self.agent = agent def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='DetectedPanel'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DetectedPanel') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DetectedPanel'): outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) outfile.write(' agent="%s"' % (quote_attrib(self.get_agent()), )) def exportChildren(self, outfile, level, namespace_='', name_='DetectedPanel'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='DetectedPanel'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) showIndent(outfile, level) outfile.write('agent = "%s",\n' % (self.get_agent(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('name'): self.name = attrs.get('name').value if attrs.get('agent'): self.agent = attrs.get('agent').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class DetectedPanel class AgentToUse: subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if AgentToUse.subclass: return AgentToUse.subclass(*args_, **kwargs_) else: return AgentToUse(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AgentToUse'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='AgentToUse') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='AgentToUse'): pass def exportChildren(self, outfile, level, namespace_='', name_='AgentToUse'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='AgentToUse'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class AgentToUse class OsInfo: subclass = None superclass = None def __init__(self, loadavg='', os='', package_installed=None): self.loadavg = loadavg self.os = os if package_installed is None: self.package_installed = [] else: self.package_installed = package_installed def factory(*args_, **kwargs_): if OsInfo.subclass: return OsInfo.subclass(*args_, **kwargs_) else: return OsInfo(*args_, **kwargs_) factory = staticmethod(factory) def get_package_installed(self): return self.package_installed def set_package_installed(self, package_installed): self.package_installed = package_installed def add_package_installed(self, value): self.package_installed.append(value) def insert_package_installed(self, index, value): self.package_installed[index] = value def get_loadavg(self): return self.loadavg def set_loadavg(self, loadavg): self.loadavg = loadavg def get_os(self): return self.os def set_os(self, os): self.os = os def export(self, outfile, level, namespace_='', name_='OsInfo'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='OsInfo') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='OsInfo'): outfile.write(' loadavg="%s"' % (quote_attrib(self.get_loadavg()), )) outfile.write(' os="%s"' % (quote_attrib(self.get_os()), )) def exportChildren(self, outfile, level, namespace_='', name_='OsInfo'): for package_installed_ in self.get_package_installed(): package_installed_.export(outfile, level, namespace_, name_='package-installed') def exportLiteral(self, outfile, level, name_='OsInfo'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('loadavg = "%s",\n' % (self.get_loadavg(),)) showIndent(outfile, level) outfile.write('os = "%s",\n' % (self.get_os(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('package_installed=[\n') level += 1 for package_installed in self.package_installed: showIndent(outfile, level) outfile.write('PackageInstalled(\n') package_installed.exportLiteral(outfile, level, name_='package_installed') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('loadavg'): self.loadavg = attrs.get('loadavg').value if attrs.get('os'): self.os = attrs.get('os').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'package-installed': obj_ = PackageInstalled.factory() obj_.build(child_) self.package_installed.append(obj_) # end class OsInfo class FsList: subclass = None superclass = None def __init__(self, fs=None): if fs is None: self.fs = [] else: self.fs = fs def factory(*args_, **kwargs_): if FsList.subclass: return FsList.subclass(*args_, **kwargs_) else: return FsList(*args_, **kwargs_) factory = staticmethod(factory) def get_fs(self): return self.fs def set_fs(self, fs): self.fs = fs def add_fs(self, value): self.fs.append(value) def insert_fs(self, index, value): self.fs[index] = value def export(self, outfile, level, namespace_='', name_='FsList'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='FsList') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='FsList'): pass def exportChildren(self, outfile, level, namespace_='', name_='FsList'): for fs_ in self.get_fs(): fs_.export(outfile, level, namespace_, name_='fs') def exportLiteral(self, outfile, level, name_='FsList'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('fs=[\n') level += 1 for fs in self.fs: showIndent(outfile, level) outfile.write('Fs(\n') fs.exportLiteral(outfile, level, name_='fs') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'fs': obj_ = Fs.factory() obj_.build(child_) self.fs.append(obj_) # end class FsList class Fs: subclass = None superclass = None def __init__(self, free=-1, mode=None, device='', mountpoint='', typexx='', size=-1, valueOf_='', mixedclass_=None, content_=None): self.free = free self.mode = mode self.device = device self.mountpoint = mountpoint self.typexx = typexx self.size = size if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if Fs.subclass: return Fs.subclass(*args_, **kwargs_) else: return Fs(*args_, **kwargs_) factory = staticmethod(factory) def get_free(self): return self.free def set_free(self, free): self.free = free def get_mode(self): return self.mode def set_mode(self, mode): self.mode = mode def get_device(self): return self.device def set_device(self, device): self.device = device def get_mountpoint(self): return self.mountpoint def set_mountpoint(self, mountpoint): self.mountpoint = mountpoint def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_size(self): return self.size def set_size(self, size): self.size = size def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='Fs'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Fs') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Fs'): outfile.write(' free="%d"' % self.get_free()) outfile.write(' mode="%s"' % str(self.get_mode())) outfile.write(' device="%s"' % (quote_attrib(self.get_device()), )) outfile.write(' mountpoint="%s"' % (quote_attrib(self.get_mountpoint()), )) outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) outfile.write(' size="%d"' % self.get_size()) def exportChildren(self, outfile, level, namespace_='', name_='Fs'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='Fs'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('free = "%s",\n' % (self.get_free(),)) showIndent(outfile, level) outfile.write('mode = "%s",\n' % (self.get_mode(),)) showIndent(outfile, level) outfile.write('device = "%s",\n' % (self.get_device(),)) showIndent(outfile, level) outfile.write('mountpoint = "%s",\n' % (self.get_mountpoint(),)) showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) showIndent(outfile, level) outfile.write('size = "%s",\n' % (self.get_size(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('free'): try: self.free = int(attrs.get('free').value) except ValueError: raise ValueError('Bad integer attribute (free)') if attrs.get('mode'): self.mode = attrs.get('mode').value if attrs.get('device'): self.device = attrs.get('device').value if attrs.get('mountpoint'): self.mountpoint = attrs.get('mountpoint').value if attrs.get('type'): self.typexx = attrs.get('type').value if attrs.get('size'): try: self.size = int(attrs.get('size').value) except ValueError: raise ValueError('Bad integer attribute (size)') def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class Fs class CheckDumpResult: subclass = None superclass = None def __init__(self, dump_status=None, session_id=None): if dump_status is None: self.dump_status = [] else: self.dump_status = dump_status self.session_id = session_id def factory(*args_, **kwargs_): if CheckDumpResult.subclass: return CheckDumpResult.subclass(*args_, **kwargs_) else: return CheckDumpResult(*args_, **kwargs_) factory = staticmethod(factory) def get_dump_status(self): return self.dump_status def set_dump_status(self, dump_status): self.dump_status = dump_status def add_dump_status(self, value): self.dump_status.append(value) def insert_dump_status(self, index, value): self.dump_status[index] = value def get_session_id(self): return self.session_id def set_session_id(self, session_id): self.session_id = session_id def export(self, outfile, level, namespace_='', name_='CheckDumpResult'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='CheckDumpResult') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='CheckDumpResult'): pass def exportChildren(self, outfile, level, namespace_='', name_='CheckDumpResult'): for dump_status_ in self.get_dump_status(): dump_status_.export(outfile, level, namespace_, name_='dump-status') if self.get_session_id() != None : if self.session_id: self.session_id.export(outfile, level, namespace_, name_='session-id') def exportLiteral(self, outfile, level, name_='CheckDumpResult'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('dump_status=[\n') level += 1 for dump_status in self.dump_status: showIndent(outfile, level) outfile.write('DumpStatusFull(\n') dump_status.exportLiteral(outfile, level, name_='dump_status') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') if self.session_id: showIndent(outfile, level) outfile.write('session_id=SessionId(\n') self.session_id.exportLiteral(outfile, level, name_='session_id') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-status': obj_ = DumpStatusFull.factory() obj_.build(child_) self.dump_status.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'session-id': obj_ = SessionId.factory() obj_.build(child_) self.set_session_id(obj_) # end class CheckDumpResult class DumpStatusFull: subclass = None superclass = None def __init__(self, dump_status=None, backup_process_status=None, details=None): self.dump_status = dump_status self.backup_process_status = backup_process_status self.details = details def factory(*args_, **kwargs_): if DumpStatusFull.subclass: return DumpStatusFull.subclass(*args_, **kwargs_) else: return DumpStatusFull(*args_, **kwargs_) factory = staticmethod(factory) def get_details(self): return self.details def set_details(self, details): self.details = details def get_dump_status(self): return self.dump_status def set_dump_status(self, dump_status): self.dump_status = dump_status def get_backup_process_status(self): return self.backup_process_status def set_backup_process_status(self, backup_process_status): self.backup_process_status = backup_process_status def export(self, outfile, level, namespace_='', name_='DumpStatusFull'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpStatusFull') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpStatusFull'): if self.get_dump_status() is not None: outfile.write(' dump-status="%s"' % str(self.get_dump_status())) if self.get_backup_process_status() is not None: outfile.write(' backup-process-status="%s"' % str(self.get_backup_process_status())) def exportChildren(self, outfile, level, namespace_='', name_='DumpStatusFull'): if self.get_details() != None : if self.details: self.details.export(outfile, level, namespace_, name_='details') def exportLiteral(self, outfile, level, name_='DumpStatusFull'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('dump_status = "%s",\n' % (self.get_dump_status(),)) showIndent(outfile, level) outfile.write('backup_process_status = "%s",\n' % (self.get_backup_process_status(),)) def exportLiteralChildren(self, outfile, level, name_): if self.details: showIndent(outfile, level) outfile.write('details=details(\n') self.details.exportLiteral(outfile, level) showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('dump-status'): self.dump_status = attrs.get('dump-status').value if attrs.get('backup-process-status'): self.backup_process_status = attrs.get('backup-process-status').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'details': obj_ = details.factory() obj_.build(child_) self.set_details(obj_) # end class DumpStatusFull class details: subclass = None superclass = None def __init__(self, content_file_name=None, message=None): if content_file_name is None: self.content_file_name = [] else: self.content_file_name = content_file_name if message is None: self.message = [] else: self.message = message def factory(*args_, **kwargs_): if details.subclass: return details.subclass(*args_, **kwargs_) else: return details(*args_, **kwargs_) factory = staticmethod(factory) def get_content_file_name(self): return self.content_file_name def set_content_file_name(self, content_file_name): self.content_file_name = content_file_name def add_content_file_name(self, value): self.content_file_name.append(value) def insert_content_file_name(self, index, value): self.content_file_name[index] = value def get_message(self): return self.message def set_message(self, message): self.message = message def add_message(self, value): self.message.append(value) def insert_message(self, index, value): self.message[index] = value def export(self, outfile, level, namespace_='', name_='details'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='details') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='details'): pass def exportChildren(self, outfile, level, namespace_='', name_='details'): for content_file_name_ in self.get_content_file_name(): showIndent(outfile, level) outfile.write('<%scontent-file-name>%s\n' % (namespace_, quote_xml(content_file_name_), namespace_)) for message_ in self.get_message(): showIndent(outfile, level) outfile.write('<%smessage>%s\n' % (namespace_, quote_xml(message_), namespace_)) def exportLiteral(self, outfile, level, name_='details'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('content_file_name=[\n') level += 1 for content_file_name in self.content_file_name: showIndent(outfile, level) outfile.write('%s,\n' % quote_python(content_file_name)) level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('message=[\n') level += 1 for message in self.message: showIndent(outfile, level) outfile.write('%s,\n' % quote_python(message)) level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'content-file-name': content_file_name_ = '' for text__content_ in child_.childNodes: content_file_name_ += text__content_.nodeValue self.content_file_name.append(content_file_name_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'message': message_ = '' for text__content_ in child_.childNodes: message_ += text__content_.nodeValue self.message.append(message_) # end class details class content_file_name: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if content_file_name.subclass: return content_file_name.subclass(*args_, **kwargs_) else: return content_file_name(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='content-file-name'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='content-file-name') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='content-file-name'): pass def exportChildren(self, outfile, level, namespace_='', name_='content-file-name'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='content-file-name'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class content_file_name class message: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if message.subclass: return message.subclass(*args_, **kwargs_) else: return message(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='message'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='message') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='message'): pass def exportChildren(self, outfile, level, namespace_='', name_='message'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='message'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class message class MigrationTaskInfoMigratingObject: subclass = None superclass = None def __init__(self, amount=-1, typexx='', valueOf_=''): self.amount = amount self.typexx = typexx self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if MigrationTaskInfoMigratingObject.subclass: return MigrationTaskInfoMigratingObject.subclass(*args_, **kwargs_) else: return MigrationTaskInfoMigratingObject(*args_, **kwargs_) factory = staticmethod(factory) def get_amount(self): return self.amount def set_amount(self, amount): self.amount = amount def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='MigrationTaskInfoMigratingObject'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationTaskInfoMigratingObject') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationTaskInfoMigratingObject'): if self.get_amount() is not None: outfile.write(' amount="%d"' % self.get_amount()) if self.get_type() is not None: outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) def exportChildren(self, outfile, level, namespace_='', name_='MigrationTaskInfoMigratingObject'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='MigrationTaskInfoMigratingObject'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('amount = "%s",\n' % (self.get_amount(),)) showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('amount'): try: self.amount = int(attrs.get('amount').value) except ValueError: raise ValueError('Bad integer attribute (amount)') if attrs.get('type'): self.typexx = attrs.get('type').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class MigrationTaskInfoMigratingObject class MigrationTaskInfoMigratingObjects: subclass = None superclass = None def __init__(self, selected_objects=None): if selected_objects is None: self.selected_objects = [] else: self.selected_objects = selected_objects def factory(*args_, **kwargs_): if MigrationTaskInfoMigratingObjects.subclass: return MigrationTaskInfoMigratingObjects.subclass(*args_, **kwargs_) else: return MigrationTaskInfoMigratingObjects(*args_, **kwargs_) factory = staticmethod(factory) def get_selected_objects(self): return self.selected_objects def set_selected_objects(self, selected_objects): self.selected_objects = selected_objects def add_selected_objects(self, value): self.selected_objects.append(value) def insert_selected_objects(self, index, value): self.selected_objects[index] = value def validate_SelectedObjects(self, value): # validate type SelectedObjects pass def export(self, outfile, level, namespace_='', name_='MigrationTaskInfoMigratingObjects'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationTaskInfoMigratingObjects') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationTaskInfoMigratingObjects'): pass def exportChildren(self, outfile, level, namespace_='', name_='MigrationTaskInfoMigratingObjects'): for selected_objects_ in self.get_selected_objects(): selected_objects_.export(outfile, level, namespace_, name_='selected-objects') def exportLiteral(self, outfile, level, name_='MigrationTaskInfoMigratingObjects'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('selected_objects=[\n') level += 1 for selected_objects in self.selected_objects: showIndent(outfile, level) outfile.write('SelectedObjects(\n') selected_objects.exportLiteral(outfile, level, name_='selected_objects') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'selected-objects': obj_ = SelectedObjects.factory() obj_.build(child_) self.selected_objects.append(obj_) self.validate_SelectedObjects(self.selected_objects) # validate type SelectedObjects # end class MigrationTaskInfoMigratingObjects class SelectedObjects: subclass = None superclass = None def __init__(self, amount=-1, typexx='', valueOf_=''): self.amount = amount self.typexx = typexx self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if SelectedObjects.subclass: return SelectedObjects.subclass(*args_, **kwargs_) else: return SelectedObjects(*args_, **kwargs_) factory = staticmethod(factory) def get_amount(self): return self.amount def set_amount(self, amount): self.amount = amount def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='SelectedObjects'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='SelectedObjects') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='SelectedObjects'): if self.get_amount() is not None: outfile.write(' amount="%d"' % self.get_amount()) if self.get_type() is not None: outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) def exportChildren(self, outfile, level, namespace_='', name_='SelectedObjects'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='SelectedObjects'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('amount = "%s",\n' % (self.get_amount(),)) showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('amount'): try: self.amount = int(attrs.get('amount').value) except ValueError: raise ValueError('Bad integer attribute (amount)') if attrs.get('type'): self.typexx = attrs.get('type').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class SelectedObjects class MigrationTaskInfo: subclass = None superclass = None def __init__(self, source_hostname='', migrating_objects=None): self.source_hostname = source_hostname self.migrating_objects = migrating_objects def factory(*args_, **kwargs_): if MigrationTaskInfo.subclass: return MigrationTaskInfo.subclass(*args_, **kwargs_) else: return MigrationTaskInfo(*args_, **kwargs_) factory = staticmethod(factory) def get_source_hostname(self): return self.source_hostname def set_source_hostname(self, source_hostname): self.source_hostname = source_hostname def get_migrating_objects(self): return self.migrating_objects def set_migrating_objects(self, migrating_objects): self.migrating_objects = migrating_objects def export(self, outfile, level, namespace_='', name_='MigrationTaskInfo'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationTaskInfo') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationTaskInfo'): pass def exportChildren(self, outfile, level, namespace_='', name_='MigrationTaskInfo'): showIndent(outfile, level) outfile.write('<%ssource-hostname>%s\n' % (namespace_, quote_xml(self.get_source_hostname()), namespace_)) if self.get_migrating_objects() != None : if self.migrating_objects: self.migrating_objects.export(outfile, level, namespace_, name_='migrating-objects') def exportLiteral(self, outfile, level, name_='MigrationTaskInfo'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('source_hostname=%s,\n' % quote_python(self.get_source_hostname())) if self.migrating_objects: showIndent(outfile, level) outfile.write('migrating_objects=MigrationTaskInfoMigratingObjects(\n') self.migrating_objects.exportLiteral(outfile, level, name_='migrating_objects') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'source-hostname': source_hostname_ = '' for text__content_ in child_.childNodes: source_hostname_ += text__content_.nodeValue self.source_hostname = source_hostname_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'migrating-objects': obj_ = MigrationTaskInfoMigratingObjects.factory() obj_.build(child_) self.set_migrating_objects(obj_) # end class MigrationTaskInfo class TaskStatusMixed: subclass = None superclass = None def __init__(self, status=None, log_location='', backup=None, transfer=None, restore=None): self.status = status self.log_location = log_location self.backup = backup self.transfer = transfer self.restore = restore def factory(*args_, **kwargs_): if TaskStatusMixed.subclass: return TaskStatusMixed.subclass(*args_, **kwargs_) else: return TaskStatusMixed(*args_, **kwargs_) factory = staticmethod(factory) def get_backup(self): return self.backup def set_backup(self, backup): self.backup = backup def get_transfer(self): return self.transfer def set_transfer(self, transfer): self.transfer = transfer def get_restore(self): return self.restore def set_restore(self, restore): self.restore = restore def get_status(self): return self.status def set_status(self, status): self.status = status def get_log_location(self): return self.log_location def set_log_location(self, log_location): self.log_location = log_location def export(self, outfile, level, namespace_='', name_='TaskStatusMixed'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='TaskStatusMixed') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='TaskStatusMixed'): if self.get_status() is not None: outfile.write(' status="%s"' % str(self.get_status())) if self.get_log_location() is not None: outfile.write(' log-location="%s"' % (quote_attrib(self.get_log_location()), )) def exportChildren(self, outfile, level, namespace_='', name_='TaskStatusMixed'): if self.get_backup() != None : if self.backup: self.backup.export(outfile, level, namespace_, name_='backup') if self.get_transfer() != None : if self.transfer: self.transfer.export(outfile, level, namespace_, name_='transfer') if self.get_restore() != None : if self.restore: self.restore.export(outfile, level, namespace_, name_='restore') def exportLiteral(self, outfile, level, name_='TaskStatusMixed'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('status = "%s",\n' % (self.get_status(),)) showIndent(outfile, level) outfile.write('log_location = "%s",\n' % (self.get_log_location(),)) def exportLiteralChildren(self, outfile, level, name_): if self.backup: showIndent(outfile, level) outfile.write('backup=TaskStatus(\n') self.backup.exportLiteral(outfile, level, name_='backup') showIndent(outfile, level) outfile.write('),\n') if self.transfer: showIndent(outfile, level) outfile.write('transfer=TaskStatus(\n') self.transfer.exportLiteral(outfile, level, name_='transfer') showIndent(outfile, level) outfile.write('),\n') if self.restore: showIndent(outfile, level) outfile.write('restore=TaskStatusRestore(\n') self.restore.exportLiteral(outfile, level, name_='restore') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('status'): self.status = attrs.get('status').value if attrs.get('log-location'): self.log_location = attrs.get('log-location').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'backup': obj_ = TaskStatus.factory() obj_.build(child_) self.set_backup(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'transfer': obj_ = TaskStatus.factory() obj_.build(child_) self.set_transfer(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'restore': obj_ = TaskStatusRestore.factory() obj_.build(child_) self.set_restore(obj_) # end class TaskStatusMixed class TaskStatusRestore: subclass = None superclass = None def __init__(self, status=None, log_location='', conflict_resolve=None, importxx=None, deploy=None): self.status = status self.log_location = log_location self.conflict_resolve = conflict_resolve self.importxx = importxx self.deploy = deploy def factory(*args_, **kwargs_): if TaskStatusRestore.subclass: return TaskStatusRestore.subclass(*args_, **kwargs_) else: return TaskStatusRestore(*args_, **kwargs_) factory = staticmethod(factory) def get_conflict_resolve(self): return self.conflict_resolve def set_conflict_resolve(self, conflict_resolve): self.conflict_resolve = conflict_resolve def get_import(self): return self.importxx def set_import(self, importxx): self.importxx = importxx def get_deploy(self): return self.deploy def set_deploy(self, deploy): self.deploy = deploy def get_status(self): return self.status def set_status(self, status): self.status = status def get_log_location(self): return self.log_location def set_log_location(self, log_location): self.log_location = log_location def export(self, outfile, level, namespace_='', name_='TaskStatusRestore'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='TaskStatusRestore') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='TaskStatusRestore'): if self.get_status() is not None: outfile.write(' status="%s"' % str(self.get_status())) if self.get_log_location() is not None: outfile.write(' log-location="%s"' % (quote_attrib(self.get_log_location()), )) def exportChildren(self, outfile, level, namespace_='', name_='TaskStatusRestore'): if self.get_conflict_resolve() != None : if self.conflict_resolve: self.conflict_resolve.export(outfile, level, namespace_, name_='conflict-resolve') if self.get_import() != None : if self.importxx: self.importxx.export(outfile, level, namespace_, name_='import') if self.get_deploy() != None : if self.deploy: self.deploy.export(outfile, level, namespace_, name_='deploy') def exportLiteral(self, outfile, level, name_='TaskStatusRestore'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('status = "%s",\n' % (self.get_status(),)) showIndent(outfile, level) outfile.write('log_location = "%s",\n' % (self.get_log_location(),)) def exportLiteralChildren(self, outfile, level, name_): if self.conflict_resolve: showIndent(outfile, level) outfile.write('conflict_resolve=TaskStatus(\n') self.conflict_resolve.exportLiteral(outfile, level, name_='conflict_resolve') showIndent(outfile, level) outfile.write('),\n') if self.importxx: showIndent(outfile, level) outfile.write('importxx=TaskStatus(\n') self.importxx.exportLiteral(outfile, level, name_='import') showIndent(outfile, level) outfile.write('),\n') if self.deploy: showIndent(outfile, level) outfile.write('deploy=TaskStatus(\n') self.deploy.exportLiteral(outfile, level, name_='deploy') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('status'): self.status = attrs.get('status').value if attrs.get('log-location'): self.log_location = attrs.get('log-location').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'conflict-resolve': obj_ = TaskStatus.factory() obj_.build(child_) self.set_conflict_resolve(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'import': obj_ = TaskStatus.factory() obj_.build(child_) self.set_import(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'deploy': obj_ = TaskStatus.factory() obj_.build(child_) self.set_deploy(obj_) # end class TaskStatusRestore class TaskStatus: subclass = None superclass = None def __init__(self, task_id='', working=None, finished=None, stopped=None, mixed=None): self.task_id = task_id self.working = working self.finished = finished self.stopped = stopped self.mixed = mixed def factory(*args_, **kwargs_): if TaskStatus.subclass: return TaskStatus.subclass(*args_, **kwargs_) else: return TaskStatus(*args_, **kwargs_) factory = staticmethod(factory) def get_working(self): return self.working def set_working(self, working): self.working = working def get_finished(self): return self.finished def set_finished(self, finished): self.finished = finished def get_stopped(self): return self.stopped def set_stopped(self, stopped): self.stopped = stopped def get_mixed(self): return self.mixed def set_mixed(self, mixed): self.mixed = mixed def get_task_id(self): return self.task_id def set_task_id(self, task_id): self.task_id = task_id def export(self, outfile, level, namespace_='', name_='TaskStatus'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='TaskStatus') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='TaskStatus'): if self.get_task_id() is not None: outfile.write(' task-id="%s"' % (quote_attrib(self.get_task_id()), )) def exportChildren(self, outfile, level, namespace_='', name_='TaskStatus'): if self.working: self.working.export(outfile, level, namespace_, name_='working', ) if self.finished: self.finished.export(outfile, level, namespace_, name_='finished', ) if self.stopped: self.stopped.export(outfile, level, namespace_, name_='stopped', ) if self.mixed: self.mixed.export(outfile, level, namespace_, name_='mixed', ) def exportLiteral(self, outfile, level, name_='TaskStatus'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('task_id = "%s",\n' % (self.get_task_id(),)) def exportLiteralChildren(self, outfile, level, name_): if self.working: showIndent(outfile, level) outfile.write('working=Working(\n') self.working.exportLiteral(outfile, level, name_='working') showIndent(outfile, level) outfile.write('),\n') if self.finished: showIndent(outfile, level) outfile.write('finished=Finished(\n') self.finished.exportLiteral(outfile, level, name_='finished') showIndent(outfile, level) outfile.write('),\n') if self.stopped: showIndent(outfile, level) outfile.write('stopped=Stopped(\n') self.stopped.exportLiteral(outfile, level, name_='stopped') showIndent(outfile, level) outfile.write('),\n') if self.mixed: showIndent(outfile, level) outfile.write('mixed=TaskStatusMixed(\n') self.mixed.exportLiteral(outfile, level, name_='mixed') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('task-id'): self.task_id = attrs.get('task-id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'working': obj_ = Working.factory() obj_.build(child_) self.set_working(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'finished': obj_ = Finished.factory() obj_.build(child_) self.set_finished(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'stopped': obj_ = Stopped.factory() obj_.build(child_) self.set_stopped(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'mixed': obj_ = TaskStatusMixed.factory() obj_.build(child_) self.set_mixed(obj_) # end class TaskStatus class Working: subclass = None superclass = None def __init__(self, starting=None, deploy=None, dumping=None): self.starting = starting self.deploy = deploy self.dumping = dumping def factory(*args_, **kwargs_): if Working.subclass: return Working.subclass(*args_, **kwargs_) else: return Working(*args_, **kwargs_) factory = staticmethod(factory) def get_starting(self): return self.starting def set_starting(self, starting): self.starting = starting def get_deploy(self): return self.deploy def set_deploy(self, deploy): self.deploy = deploy def get_dumping(self): return self.dumping def set_dumping(self, dumping): self.dumping = dumping def export(self, outfile, level, namespace_='', name_='Working'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Working') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Working'): pass def exportChildren(self, outfile, level, namespace_='', name_='Working'): if self.starting: self.starting.export(outfile, level, namespace_, name_='starting', ) if self.deploy: self.deploy.export(outfile, level, namespace_, name_='deploy', ) if self.dumping: self.dumping.export(outfile, level, namespace_, name_='dumping', ) def exportLiteral(self, outfile, level, name_='Working'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.starting: showIndent(outfile, level) outfile.write('starting=Starting(\n') self.starting.exportLiteral(outfile, level, name_='starting') showIndent(outfile, level) outfile.write('),\n') if self.deploy: showIndent(outfile, level) outfile.write('deploy=WorkingProgress(\n') self.deploy.exportLiteral(outfile, level, name_='deploy') showIndent(outfile, level) outfile.write('),\n') if self.dumping: showIndent(outfile, level) outfile.write('dumping=WorkingProgress(\n') self.dumping.exportLiteral(outfile, level, name_='dumping') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'starting': obj_ = Starting.factory() obj_.build(child_) self.set_starting(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'deploy': obj_ = WorkingProgress.factory() obj_.build(child_) self.set_deploy(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dumping': obj_ = WorkingProgress.factory() obj_.build(child_) self.set_dumping(obj_) # end class Working class Starting: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if Starting.subclass: return Starting.subclass(*args_, **kwargs_) else: return Starting(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='Starting'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Starting') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Starting'): pass def exportChildren(self, outfile, level, namespace_='', name_='Starting'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='Starting'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class Starting class Stopped: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if Stopped.subclass: return Stopped.subclass(*args_, **kwargs_) else: return Stopped(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='Stopped'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Stopped') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Stopped'): pass def exportChildren(self, outfile, level, namespace_='', name_='Stopped'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='Stopped'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class Stopped class CurrentObject: subclass = None superclass = None def __init__(self, typexx='', valueOf_=''): self.typexx = typexx self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if CurrentObject.subclass: return CurrentObject.subclass(*args_, **kwargs_) else: return CurrentObject(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='CurrentObject'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='CurrentObject') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='CurrentObject'): outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) def exportChildren(self, outfile, level, namespace_='', name_='CurrentObject'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='CurrentObject'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('type'): self.typexx = attrs.get('type').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class CurrentObject class WorkingProgress: subclass = None superclass = None def __init__(self, total_accounts=-1, completed_domains=-1, completed_accounts=-1, total_domains=-1, current_object=None): self.total_accounts = total_accounts self.completed_domains = completed_domains self.completed_accounts = completed_accounts self.total_domains = total_domains self.current_object = current_object def factory(*args_, **kwargs_): if WorkingProgress.subclass: return WorkingProgress.subclass(*args_, **kwargs_) else: return WorkingProgress(*args_, **kwargs_) factory = staticmethod(factory) def get_current_object(self): return self.current_object def set_current_object(self, current_object): self.current_object = current_object def get_total_accounts(self): return self.total_accounts def set_total_accounts(self, total_accounts): self.total_accounts = total_accounts def get_completed_domains(self): return self.completed_domains def set_completed_domains(self, completed_domains): self.completed_domains = completed_domains def get_completed_accounts(self): return self.completed_accounts def set_completed_accounts(self, completed_accounts): self.completed_accounts = completed_accounts def get_total_domains(self): return self.total_domains def set_total_domains(self, total_domains): self.total_domains = total_domains def export(self, outfile, level, namespace_='', name_='WorkingProgress'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='WorkingProgress') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='WorkingProgress'): outfile.write(' total-accounts="%d"' % self.get_total_accounts()) outfile.write(' completed-domains="%d"' % self.get_completed_domains()) outfile.write(' completed-accounts="%d"' % self.get_completed_accounts()) outfile.write(' total-domains="%d"' % self.get_total_domains()) def exportChildren(self, outfile, level, namespace_='', name_='WorkingProgress'): if self.get_current_object() != None : if self.current_object: self.current_object.export(outfile, level, namespace_, name_='current-object') def exportLiteral(self, outfile, level, name_='WorkingProgress'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('total_accounts = "%s",\n' % (self.get_total_accounts(),)) showIndent(outfile, level) outfile.write('completed_domains = "%s",\n' % (self.get_completed_domains(),)) showIndent(outfile, level) outfile.write('completed_accounts = "%s",\n' % (self.get_completed_accounts(),)) showIndent(outfile, level) outfile.write('total_domains = "%s",\n' % (self.get_total_domains(),)) def exportLiteralChildren(self, outfile, level, name_): if self.current_object: showIndent(outfile, level) outfile.write('current_object=CurrentObject(\n') self.current_object.exportLiteral(outfile, level, name_='current_object') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('total-accounts'): try: self.total_accounts = int(attrs.get('total-accounts').value) except ValueError: raise ValueError('Bad integer attribute (total-accounts)') if attrs.get('completed-domains'): try: self.completed_domains = int(attrs.get('completed-domains').value) except ValueError: raise ValueError('Bad integer attribute (completed-domains)') if attrs.get('completed-accounts'): try: self.completed_accounts = int(attrs.get('completed-accounts').value) except ValueError: raise ValueError('Bad integer attribute (completed-accounts)') if attrs.get('total-domains'): try: self.total_domains = int(attrs.get('total-domains').value) except ValueError: raise ValueError('Bad integer attribute (total-domains)') def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'current-object': obj_ = CurrentObject.factory() obj_.build(child_) self.set_current_object(obj_) # end class WorkingProgress class Finished: subclass = None superclass = None def __init__(self, status=None, log_location='', valueOf_=''): self.status = status self.log_location = log_location self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if Finished.subclass: return Finished.subclass(*args_, **kwargs_) else: return Finished(*args_, **kwargs_) factory = staticmethod(factory) def get_status(self): return self.status def set_status(self, status): self.status = status def get_log_location(self): return self.log_location def set_log_location(self, log_location): self.log_location = log_location def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='Finished'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Finished') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Finished'): outfile.write(' status="%s"' % str(self.get_status())) if self.get_log_location() is not None: outfile.write(' log-location="%s"' % (quote_attrib(self.get_log_location()), )) def exportChildren(self, outfile, level, namespace_='', name_='Finished'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='Finished'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('status = "%s",\n' % (self.get_status(),)) showIndent(outfile, level) outfile.write('log_location = "%s",\n' % (self.get_log_location(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('status'): self.status = attrs.get('status').value if attrs.get('log-location'): self.log_location = attrs.get('log-location').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class Finished class DumpListQuery: subclass = None superclass = None def __init__(self, dumps_storage_credentials=None, object_specification=None): self.dumps_storage_credentials = dumps_storage_credentials self.object_specification = object_specification def factory(*args_, **kwargs_): if DumpListQuery.subclass: return DumpListQuery.subclass(*args_, **kwargs_) else: return DumpListQuery(*args_, **kwargs_) factory = staticmethod(factory) def get_dumps_storage_credentials(self): return self.dumps_storage_credentials def set_dumps_storage_credentials(self, dumps_storage_credentials): self.dumps_storage_credentials = dumps_storage_credentials def validate_DumpsStorageCredentials(self, value): # validate type DumpsStorageCredentials pass def get_object_specification(self): return self.object_specification def set_object_specification(self, object_specification): self.object_specification = object_specification def validate_ObjectSpecification(self, value): # validate type ObjectSpecification pass def export(self, outfile, level, namespace_='', name_='DumpListQuery'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpListQuery') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpListQuery'): pass def exportChildren(self, outfile, level, namespace_='', name_='DumpListQuery'): if self.dumps_storage_credentials: self.dumps_storage_credentials.export(outfile, level, namespace_, name_='dumps-storage-credentials', ) if self.object_specification: self.object_specification.export(outfile, level, namespace_, name_='object-specification', ) def exportLiteral(self, outfile, level, name_='DumpListQuery'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.dumps_storage_credentials: showIndent(outfile, level) outfile.write('dumps_storage_credentials=DumpsStorageCredentials(\n') self.dumps_storage_credentials.exportLiteral(outfile, level, name_='dumps_storage_credentials') showIndent(outfile, level) outfile.write('),\n') if self.object_specification: showIndent(outfile, level) outfile.write('object_specification=ObjectSpecification(\n') self.object_specification.exportLiteral(outfile, level, name_='object_specification') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dumps-storage-credentials': obj_ = DumpsStorageCredentials.factory() obj_.build(child_) self.set_dumps_storage_credentials(obj_) self.validate_DumpsStorageCredentials(self.dumps_storage_credentials) # validate type DumpsStorageCredentials elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'object-specification': obj_ = ObjectSpecification.factory() obj_.build(child_) self.set_object_specification(obj_) self.validate_ObjectSpecification(self.object_specification) # validate type ObjectSpecification # end class DumpListQuery class DeleteDumpQuery: subclass = None superclass = None def __init__(self, dump_specification=None, object_specification=None): self.dump_specification = dump_specification self.object_specification = object_specification def factory(*args_, **kwargs_): if DeleteDumpQuery.subclass: return DeleteDumpQuery.subclass(*args_, **kwargs_) else: return DeleteDumpQuery(*args_, **kwargs_) factory = staticmethod(factory) def get_dump_specification(self): return self.dump_specification def set_dump_specification(self, dump_specification): self.dump_specification = dump_specification def get_object_specification(self): return self.object_specification def set_object_specification(self, object_specification): self.object_specification = object_specification def validate_ObjectSpecification(self, value): # validate type ObjectSpecification pass def export(self, outfile, level, namespace_='', name_='DeleteDumpQuery'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DeleteDumpQuery') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DeleteDumpQuery'): pass def exportChildren(self, outfile, level, namespace_='', name_='DeleteDumpQuery'): if self.dump_specification: self.dump_specification.export(outfile, level, namespace_, name_='dump-specification', ) if self.object_specification: self.object_specification.export(outfile, level, namespace_, name_='object-specification', ) def exportLiteral(self, outfile, level, name_='DeleteDumpQuery'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.dump_specification: showIndent(outfile, level) outfile.write('dump_specification=DumpSpecification(\n') self.dump_specification.exportLiteral(outfile, level, name_='dump_specification') showIndent(outfile, level) outfile.write('),\n') if self.object_specification: showIndent(outfile, level) outfile.write('object_specification=ObjectSpecification(\n') self.object_specification.exportLiteral(outfile, level, name_='object_specification') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-specification': obj_ = DumpSpecification.factory() obj_.build(child_) self.set_dump_specification(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'object-specification': obj_ = ObjectSpecification.factory() obj_.build(child_) self.set_object_specification(obj_) self.validate_ObjectSpecification(self.object_specification) # validate type ObjectSpecification # end class DeleteDumpQuery class ObjectSpecification: subclass = None superclass = None def __init__(self, guid='', typexx='', id='', name='', valueOf_=''): self.guid = guid self.typexx = typexx self.id = id self.name = name self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ObjectSpecification.subclass: return ObjectSpecification.subclass(*args_, **kwargs_) else: return ObjectSpecification(*args_, **kwargs_) factory = staticmethod(factory) def get_guid(self): return self.guid def set_guid(self, guid): self.guid = guid def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_id(self): return self.id def set_id(self, id): self.id = id def get_name(self): return self.name def set_name(self, name): self.name = name def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ObjectSpecification'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ObjectSpecification') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ObjectSpecification'): if self.get_guid() is not None: outfile.write(' guid="%s"' % (quote_attrib(self.get_guid()), )) if self.get_type() is not None: outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) if self.get_id() is not None: outfile.write(' id="%s"' % (quote_attrib(self.get_id()), )) if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='ObjectSpecification'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ObjectSpecification'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('guid = "%s",\n' % (self.get_guid(),)) showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) showIndent(outfile, level) outfile.write('id = "%s",\n' % (self.get_id(),)) showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('guid'): self.guid = attrs.get('guid').value if attrs.get('type'): self.typexx = attrs.get('type').value if attrs.get('id'): self.id = attrs.get('id').value if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ObjectSpecification class BackupTaskDescription: subclass = None superclass = None def __init__(self, misc=None, dumps_storage_credentials=None, backup_specification=None, backup_parameters=''): self.misc = misc self.dumps_storage_credentials = dumps_storage_credentials self.backup_specification = backup_specification self.backup_parameters = backup_parameters def factory(*args_, **kwargs_): if BackupTaskDescription.subclass: return BackupTaskDescription.subclass(*args_, **kwargs_) else: return BackupTaskDescription(*args_, **kwargs_) factory = staticmethod(factory) def get_misc(self): return self.misc def set_misc(self, misc): self.misc = misc def validate_BackupTaskDescriptionMisc(self, value): # validate type BackupTaskDescriptionMisc pass def get_dumps_storage_credentials(self): return self.dumps_storage_credentials def set_dumps_storage_credentials(self, dumps_storage_credentials): self.dumps_storage_credentials = dumps_storage_credentials def validate_DumpsStorageCredentials(self, value): # validate type DumpsStorageCredentials pass def get_backup_specification(self): return self.backup_specification def set_backup_specification(self, backup_specification): self.backup_specification = backup_specification def get_backup_parameters(self): return self.backup_parameters def set_backup_parameters(self, backup_parameters): self.backup_parameters = backup_parameters def export(self, outfile, level, namespace_='', name_='BackupTaskDescription'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='BackupTaskDescription') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='BackupTaskDescription'): pass def exportChildren(self, outfile, level, namespace_='', name_='BackupTaskDescription'): if self.misc: self.misc.export(outfile, level, namespace_, name_='misc', ) if self.dumps_storage_credentials: self.dumps_storage_credentials.export(outfile, level, namespace_, name_='dumps-storage-credentials', ) if self.backup_specification: self.backup_specification.export(outfile, level, namespace_, name_='backup-specification', ) if self.get_backup_parameters() != None : if self.get_backup_parameters() != "" : showIndent(outfile, level) outfile.write('<%sbackup-parameters>%s\n' % (namespace_, quote_xml(self.get_backup_parameters()), namespace_)) def exportLiteral(self, outfile, level, name_='BackupTaskDescription'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.misc: showIndent(outfile, level) outfile.write('misc=BackupTaskDescriptionMisc(\n') self.misc.exportLiteral(outfile, level, name_='misc') showIndent(outfile, level) outfile.write('),\n') if self.dumps_storage_credentials: showIndent(outfile, level) outfile.write('dumps_storage_credentials=DumpsStorageCredentials(\n') self.dumps_storage_credentials.exportLiteral(outfile, level, name_='dumps_storage_credentials') showIndent(outfile, level) outfile.write('),\n') if self.backup_specification: showIndent(outfile, level) outfile.write('backup_specification=BackupSpecification(\n') self.backup_specification.exportLiteral(outfile, level, name_='backup_specification') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('backup_parameters=%s,\n' % quote_python(self.get_backup_parameters())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'misc': obj_ = BackupTaskDescriptionMisc.factory() obj_.build(child_) self.set_misc(obj_) self.validate_BackupTaskDescriptionMisc(self.misc) # validate type BackupTaskDescriptionMisc elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dumps-storage-credentials': obj_ = DumpsStorageCredentials.factory() obj_.build(child_) self.set_dumps_storage_credentials(obj_) self.validate_DumpsStorageCredentials(self.dumps_storage_credentials) # validate type DumpsStorageCredentials elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'backup-specification': obj_ = BackupSpecification.factory() obj_.build(child_) self.set_backup_specification(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'backup-parameters': backup_parameters_ = '' for text__content_ in child_.childNodes: backup_parameters_ += text__content_.nodeValue self.backup_parameters = backup_parameters_ # end class BackupTaskDescription class BackupSpecification: subclass = None superclass = None def __init__(self, backup_options=None, object_to_backup=None, object_to_exclude=None, file_to_exclude=None): self.backup_options = backup_options if object_to_backup is None: self.object_to_backup = [] else: self.object_to_backup = object_to_backup if object_to_exclude is None: self.object_to_exclude = [] else: self.object_to_exclude = object_to_exclude if file_to_exclude is None: self.file_to_exclude = [] else: self.file_to_exclude = file_to_exclude def factory(*args_, **kwargs_): if BackupSpecification.subclass: return BackupSpecification.subclass(*args_, **kwargs_) else: return BackupSpecification(*args_, **kwargs_) factory = staticmethod(factory) def get_backup_options(self): return self.backup_options def set_backup_options(self, backup_options): self.backup_options = backup_options def validate_BackupOptions(self, value): # validate type BackupOptions pass def get_object_to_backup(self): return self.object_to_backup def set_object_to_backup(self, object_to_backup): self.object_to_backup = object_to_backup def add_object_to_backup(self, value): self.object_to_backup.append(value) def insert_object_to_backup(self, index, value): self.object_to_backup[index] = value def validate_BackupObjectIdentifier(self, value): # validate type BackupObjectIdentifier pass def get_object_to_exclude(self): return self.object_to_exclude def set_object_to_exclude(self, object_to_exclude): self.object_to_exclude = object_to_exclude def add_object_to_exclude(self, value): self.object_to_exclude.append(value) def insert_object_to_exclude(self, index, value): self.object_to_exclude[index] = value def validate_BackupObjectIdentifier(self, value): # validate type BackupObjectIdentifier pass def get_file_to_exclude(self): return self.file_to_exclude def set_file_to_exclude(self, file_to_exclude): self.file_to_exclude = file_to_exclude def add_file_to_exclude(self, value): self.file_to_exclude.append(value) def insert_file_to_exclude(self, index, value): self.file_to_exclude[index] = value def export(self, outfile, level, namespace_='', name_='BackupSpecification'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='BackupSpecification') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='BackupSpecification'): pass def exportChildren(self, outfile, level, namespace_='', name_='BackupSpecification'): if self.backup_options: self.backup_options.export(outfile, level, namespace_, name_='backup-options', ) for object_to_backup_ in self.get_object_to_backup(): object_to_backup_.export(outfile, level, namespace_, name_='object-to-backup') for object_to_exclude_ in self.get_object_to_exclude(): object_to_exclude_.export(outfile, level, namespace_, name_='object-to-exclude') for file_to_exclude_ in self.get_file_to_exclude(): showIndent(outfile, level) outfile.write('<%sfile-to-exclude>%s\n' % (namespace_, quote_xml(file_to_exclude_), namespace_)) def exportLiteral(self, outfile, level, name_='BackupSpecification'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.backup_options: showIndent(outfile, level) outfile.write('backup_options=BackupOptions(\n') self.backup_options.exportLiteral(outfile, level, name_='backup_options') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('object_to_backup=[\n') level += 1 for object_to_backup in self.object_to_backup: showIndent(outfile, level) outfile.write('BackupObjectIdentifier(\n') object_to_backup.exportLiteral(outfile, level, name_='object_to_backup') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('object_to_exclude=[\n') level += 1 for object_to_exclude in self.object_to_exclude: showIndent(outfile, level) outfile.write('BackupObjectIdentifier(\n') object_to_exclude.exportLiteral(outfile, level, name_='object_to_exclude') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('file_to_exclude=[\n') level += 1 for file_to_exclude in self.file_to_exclude: showIndent(outfile, level) outfile.write('%s,\n' % quote_python(file_to_exclude)) level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'backup-options': obj_ = BackupOptions.factory() obj_.build(child_) self.set_backup_options(obj_) self.validate_BackupOptions(self.backup_options) # validate type BackupOptions elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'object-to-backup': obj_ = BackupObjectIdentifier.factory() obj_.build(child_) self.object_to_backup.append(obj_) self.validate_BackupObjectIdentifier(self.object_to_backup) # validate type BackupObjectIdentifier elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'object-to-exclude': obj_ = BackupObjectIdentifier.factory() obj_.build(child_) self.object_to_exclude.append(obj_) self.validate_BackupObjectIdentifier(self.object_to_exclude) # validate type BackupObjectIdentifier elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'file-to-exclude': file_to_exclude_ = '' for text__content_ in child_.childNodes: file_to_exclude_ += text__content_.nodeValue self.file_to_exclude.append(file_to_exclude_) # end class BackupSpecification class file_to_exclude: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if file_to_exclude.subclass: return file_to_exclude.subclass(*args_, **kwargs_) else: return file_to_exclude(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='file-to-exclude'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='file-to-exclude') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='file-to-exclude'): pass def exportChildren(self, outfile, level, namespace_='', name_='file-to-exclude'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='file-to-exclude'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class file_to_exclude class BackupTaskDescriptionMisc: subclass = None superclass = None def __init__(self, owner_may_use_server_storage='', top_object_name='', top_object_type=None, owner_name='', top_object_id='', owner_guid='', owner_type=None, backup_profile_id='', backup_profile_name='', verbose_level=None, valueOf_=''): self.owner_may_use_server_storage = owner_may_use_server_storage self.top_object_name = top_object_name self.top_object_type = top_object_type self.owner_name = owner_name self.top_object_id = top_object_id self.owner_guid = owner_guid self.owner_type = owner_type self.backup_profile_id = backup_profile_id self.backup_profile_name = backup_profile_name self.verbose_level = verbose_level self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if BackupTaskDescriptionMisc.subclass: return BackupTaskDescriptionMisc.subclass(*args_, **kwargs_) else: return BackupTaskDescriptionMisc(*args_, **kwargs_) factory = staticmethod(factory) def get_owner_may_use_server_storage(self): return self.owner_may_use_server_storage def set_owner_may_use_server_storage(self, owner_may_use_server_storage): self.owner_may_use_server_storage = owner_may_use_server_storage def get_top_object_name(self): return self.top_object_name def set_top_object_name(self, top_object_name): self.top_object_name = top_object_name def get_top_object_type(self): return self.top_object_type def set_top_object_type(self, top_object_type): self.top_object_type = top_object_type def get_owner_name(self): return self.owner_name def set_owner_name(self, owner_name): self.owner_name = owner_name def get_top_object_id(self): return self.top_object_id def set_top_object_id(self, top_object_id): self.top_object_id = top_object_id def get_owner_guid(self): return self.owner_guid def set_owner_guid(self, owner_guid): self.owner_guid = owner_guid def get_owner_type(self): return self.owner_type def set_owner_type(self, owner_type): self.owner_type = owner_type def get_backup_profile_id(self): return self.backup_profile_id def set_backup_profile_id(self, backup_profile_id): self.backup_profile_id = backup_profile_id def get_backup_profile_name(self): return self.backup_profile_name def set_backup_profile_name(self, backup_profile_name): self.backup_profile_name = backup_profile_name def get_verbose_level(self): return self.verbose_level def set_verbose_level(self, verbose_level): self.verbose_level = verbose_level def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='BackupTaskDescriptionMisc'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='BackupTaskDescriptionMisc') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='BackupTaskDescriptionMisc'): if self.get_owner_may_use_server_storage() is not None: outfile.write(' owner-may-use-server-storage="%s"' % (quote_attrib(self.get_owner_may_use_server_storage()), )) if self.get_top_object_name() is not None: outfile.write(' top-object-name="%s"' % (quote_attrib(self.get_top_object_name()), )) if self.get_top_object_type() is not None: outfile.write(' top-object-type="%s"' % str(self.get_top_object_type())) if self.get_owner_name() is not None: outfile.write(' owner-name="%s"' % (quote_attrib(self.get_owner_name()), )) if self.get_top_object_id() is not None: outfile.write(' top-object-id="%s"' % (quote_attrib(self.get_top_object_id()), )) outfile.write(' owner-guid="%s"' % (quote_attrib(self.get_owner_guid()), )) if self.get_owner_type() is not None: outfile.write(' owner-type="%s"' % str(self.get_owner_type())) if self.get_backup_profile_id() is not None: outfile.write(' backup-profile-id="%s"' % (quote_attrib(self.get_backup_profile_id()), )) if self.get_backup_profile_name() is not None: outfile.write(' backup-profile-name="%s"' % (quote_attrib(self.get_backup_profile_name()), )) if self.get_verbose_level() is not None: outfile.write(' verbose-level="%s"' % str(self.get_verbose_level())) def exportChildren(self, outfile, level, namespace_='', name_='BackupTaskDescriptionMisc'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='BackupTaskDescriptionMisc'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('owner_may_use_server_storage = "%s",\n' % (self.get_owner_may_use_server_storage(),)) showIndent(outfile, level) outfile.write('top_object_name = "%s",\n' % (self.get_top_object_name(),)) showIndent(outfile, level) outfile.write('top_object_type = "%s",\n' % (self.get_top_object_type(),)) showIndent(outfile, level) outfile.write('owner_name = "%s",\n' % (self.get_owner_name(),)) showIndent(outfile, level) outfile.write('top_object_id = "%s",\n' % (self.get_top_object_id(),)) showIndent(outfile, level) outfile.write('owner_guid = "%s",\n' % (self.get_owner_guid(),)) showIndent(outfile, level) outfile.write('owner_type = "%s",\n' % (self.get_owner_type(),)) showIndent(outfile, level) outfile.write('backup_profile_id = "%s",\n' % (self.get_backup_profile_id(),)) showIndent(outfile, level) outfile.write('backup_profile_name = "%s",\n' % (self.get_backup_profile_name(),)) showIndent(outfile, level) outfile.write('verbose_level = "%s",\n' % (self.get_verbose_level(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('owner-may-use-server-storage'): self.owner_may_use_server_storage = attrs.get('owner-may-use-server-storage').value if attrs.get('top-object-name'): self.top_object_name = attrs.get('top-object-name').value if attrs.get('top-object-type'): self.top_object_type = attrs.get('top-object-type').value if attrs.get('owner-name'): self.owner_name = attrs.get('owner-name').value if attrs.get('top-object-id'): self.top_object_id = attrs.get('top-object-id').value if attrs.get('owner-guid'): self.owner_guid = attrs.get('owner-guid').value if attrs.get('owner-type'): self.owner_type = attrs.get('owner-type').value if attrs.get('backup-profile-id'): self.backup_profile_id = attrs.get('backup-profile-id').value if attrs.get('backup-profile-name'): self.backup_profile_name = attrs.get('backup-profile-name').value if attrs.get('verbose-level'): self.verbose_level = attrs.get('verbose-level').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class BackupTaskDescriptionMisc class BackupObjectIdentifier: subclass = None superclass = None def __init__(self, all='', typexx=None, id='', name='', valueOf_=''): self.all = all self.typexx = typexx self.id = id self.name = name self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if BackupObjectIdentifier.subclass: return BackupObjectIdentifier.subclass(*args_, **kwargs_) else: return BackupObjectIdentifier(*args_, **kwargs_) factory = staticmethod(factory) def get_all(self): return self.all def set_all(self, all): self.all = all def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_id(self): return self.id def set_id(self, id): self.id = id def get_name(self): return self.name def set_name(self, name): self.name = name def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='BackupObjectIdentifier'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='BackupObjectIdentifier') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='BackupObjectIdentifier'): if self.get_all() is not None: outfile.write(' all="%s"' % (quote_attrib(self.get_all()), )) outfile.write(' type="%s"' % str(self.get_type())) if self.get_id() is not None: outfile.write(' id="%s"' % (quote_attrib(self.get_id()), )) if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='BackupObjectIdentifier'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='BackupObjectIdentifier'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('all = "%s",\n' % (self.get_all(),)) showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) showIndent(outfile, level) outfile.write('id = "%s",\n' % (self.get_id(),)) showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('all'): self.all = attrs.get('all').value if attrs.get('type'): self.typexx = attrs.get('type').value if attrs.get('id'): self.id = attrs.get('id').value if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class BackupObjectIdentifier class BackupOptions: subclass = None superclass = None def __init__(self, filter='', suspend=None, description='', mail_to='', mssql_native_backup='', compression_level='', split_size=None, incremental='', incremental_creation_date='', rotation=None, typexx='', valueOf_=''): self.filter = filter self.suspend = suspend self.description = description self.mail_to = mail_to self.mssql_native_backup = mssql_native_backup self.compression_level = compression_level self.split_size = split_size self.incremental = incremental self.incremental_creation_date = incremental_creation_date self.rotation = rotation self.typexx = typexx self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if BackupOptions.subclass: return BackupOptions.subclass(*args_, **kwargs_) else: return BackupOptions(*args_, **kwargs_) factory = staticmethod(factory) def get_filter(self): return self.filter def set_filter(self, filter): self.filter = filter def get_suspend(self): return self.suspend def set_suspend(self, suspend): self.suspend = suspend def get_description(self): return self.description def set_description(self, description): self.description = description def get_mail_to(self): return self.mail_to def set_mail_to(self, mail_to): self.mail_to = mail_to def get_mssql_native_backup(self): return self.mssql_native_backup def set_mssql_native_backup(self, mssql_native_backup): self.mssql_native_backup = mssql_native_backup def get_compression_level(self): return self.compression_level def set_compression_level(self, compression_level): self.compression_level = compression_level def get_split_size(self): return self.split_size def set_split_size(self, split_size): self.split_size = split_size def get_incremental(self): return self.incremental def set_incremental(self, incremental): self.incremental = incremental def get_incremental_creation_date(self): return self.incremental_creation_date def set_incremental_creation_date(self, incremental_creation_date): self.incremental_creation_date = incremental_creation_date def get_rotation(self): return self.rotation def set_rotation(self, rotation): self.rotation = rotation def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='BackupOptions'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='BackupOptions') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='BackupOptions'): if self.get_filter() is not None: outfile.write(' filter="%s"' % (quote_attrib(self.get_filter()), )) if self.get_suspend() is not None: outfile.write(' suspend="%s"' % str(self.get_suspend())) if self.get_description() is not None: outfile.write(' description="%s"' % (quote_attrib(self.get_description()), )) if self.get_mail_to() is not None: outfile.write(' mail-to="%s"' % (quote_attrib(self.get_mail_to()), )) if self.get_mssql_native_backup() is not None: outfile.write(' mssql-native-backup="%s"' % (quote_attrib(self.get_mssql_native_backup()), )) if self.get_compression_level() is not None: outfile.write(' compression-level="%s"' % (quote_attrib(self.get_compression_level()), )) if self.get_split_size() is not None: outfile.write(' split-size="%s"' % str(self.get_split_size())) if self.get_incremental() is not None: outfile.write(' incremental="%s"' % (quote_attrib(self.get_incremental()), )) if self.get_incremental_creation_date() is not None: outfile.write(' incremental-creation-date="%s"' % (quote_attrib(self.get_incremental_creation_date()), )) if self.get_rotation() is not None: outfile.write(' rotation="%s"' % str(self.get_rotation())) if self.get_type() is not None: outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) def exportChildren(self, outfile, level, namespace_='', name_='BackupOptions'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='BackupOptions'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('filter = "%s",\n' % (self.get_filter(),)) showIndent(outfile, level) outfile.write('suspend = "%s",\n' % (self.get_suspend(),)) showIndent(outfile, level) outfile.write('description = "%s",\n' % (self.get_description(),)) showIndent(outfile, level) outfile.write('mail_to = "%s",\n' % (self.get_mail_to(),)) showIndent(outfile, level) outfile.write('mssql_native_backup = "%s",\n' % (self.get_mssql_native_backup(),)) showIndent(outfile, level) outfile.write('compression_level = "%s",\n' % (self.get_compression_level(),)) showIndent(outfile, level) outfile.write('split_size = "%s",\n' % (self.get_split_size(),)) showIndent(outfile, level) outfile.write('incremental = "%s",\n' % (self.get_incremental(),)) showIndent(outfile, level) outfile.write('incremental_creation_date = "%s",\n' % (self.get_incremental_creation_date(),)) showIndent(outfile, level) outfile.write('rotation = "%s",\n' % (self.get_rotation(),)) showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('filter'): self.filter = attrs.get('filter').value if attrs.get('suspend'): self.suspend = attrs.get('suspend').value if attrs.get('description'): self.description = attrs.get('description').value if attrs.get('mail-to'): self.mail_to = attrs.get('mail-to').value if attrs.get('mssql-native-backup'): self.mssql_native_backup = attrs.get('mssql-native-backup').value if attrs.get('compression-level'): self.compression_level = attrs.get('compression-level').value if attrs.get('split-size'): self.split_size = attrs.get('split-size').value if attrs.get('incremental'): self.incremental = attrs.get('incremental').value if attrs.get('incremental-creation-date'): self.incremental_creation_date = attrs.get('incremental-creation-date').value if attrs.get('rotation'): self.rotation = attrs.get('rotation').value if attrs.get('type'): self.typexx = attrs.get('type').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class BackupOptions class MigrationTaskDescription: subclass = None superclass = None def __init__(self, owner_guid='', agent_credentials=None, dst_host_parameters=None): self.owner_guid = owner_guid self.agent_credentials = agent_credentials self.dst_host_parameters = dst_host_parameters def factory(*args_, **kwargs_): if MigrationTaskDescription.subclass: return MigrationTaskDescription.subclass(*args_, **kwargs_) else: return MigrationTaskDescription(*args_, **kwargs_) factory = staticmethod(factory) def get_agent_credentials(self): return self.agent_credentials def set_agent_credentials(self, agent_credentials): self.agent_credentials = agent_credentials def get_dst_host_parameters(self): return self.dst_host_parameters def set_dst_host_parameters(self, dst_host_parameters): self.dst_host_parameters = dst_host_parameters def get_owner_guid(self): return self.owner_guid def set_owner_guid(self, owner_guid): self.owner_guid = owner_guid def export(self, outfile, level, namespace_='', name_='MigrationTaskDescription'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationTaskDescription') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationTaskDescription'): outfile.write(' owner-guid="%s"' % (quote_attrib(self.get_owner_guid()), )) def exportChildren(self, outfile, level, namespace_='', name_='MigrationTaskDescription'): if self.agent_credentials: self.agent_credentials.export(outfile, level, namespace_, name_='agent-credentials', ) if self.dst_host_parameters: self.dst_host_parameters.export(outfile, level, namespace_, name_='dst-host-parameters', ) def exportLiteral(self, outfile, level, name_='MigrationTaskDescription'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('owner_guid = "%s",\n' % (self.get_owner_guid(),)) def exportLiteralChildren(self, outfile, level, name_): if self.agent_credentials: showIndent(outfile, level) outfile.write('agent_credentials=AgentCredentials(\n') self.agent_credentials.exportLiteral(outfile, level, name_='agent_credentials') showIndent(outfile, level) outfile.write('),\n') if self.dst_host_parameters: showIndent(outfile, level) outfile.write('dst_host_parameters=DstHostParameters(\n') self.dst_host_parameters.exportLiteral(outfile, level, name_='dst_host_parameters') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('owner-guid'): self.owner_guid = attrs.get('owner-guid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'agent-credentials': obj_ = AgentCredentials.factory() obj_.build(child_) self.set_agent_credentials(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dst-host-parameters': obj_ = DstHostParameters.factory() obj_.build(child_) self.set_dst_host_parameters(obj_) # end class MigrationTaskDescription class DstHostParameters: subclass = None superclass = None def __init__(self, dst_temporary_directory=None): self.dst_temporary_directory = dst_temporary_directory def factory(*args_, **kwargs_): if DstHostParameters.subclass: return DstHostParameters.subclass(*args_, **kwargs_) else: return DstHostParameters(*args_, **kwargs_) factory = staticmethod(factory) def get_dst_temporary_directory(self): return self.dst_temporary_directory def set_dst_temporary_directory(self, dst_temporary_directory): self.dst_temporary_directory = dst_temporary_directory def export(self, outfile, level, namespace_='', name_='DstHostParameters'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DstHostParameters') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DstHostParameters'): pass def exportChildren(self, outfile, level, namespace_='', name_='DstHostParameters'): if self.get_dst_temporary_directory() != None : if self.dst_temporary_directory: self.dst_temporary_directory.export(outfile, level, namespace_, name_='dst-temporary-directory') def exportLiteral(self, outfile, level, name_='DstHostParameters'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.dst_temporary_directory: showIndent(outfile, level) outfile.write('dst_temporary_directory=DstTemporaryDirectory(\n') self.dst_temporary_directory.exportLiteral(outfile, level, name_='dst_temporary_directory') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dst-temporary-directory': obj_ = DstTemporaryDirectory.factory() obj_.build(child_) self.set_dst_temporary_directory(obj_) # end class DstHostParameters class RestoreTaskDescription: subclass = None superclass = None def __init__(self, top_object_name='', top_object_type=None, owner_name='', top_object_id='', owner_guid='', owner_type=None, operability_check=None, mail_to='', source=None, objects=None, ignore_errors=None, misc=None, dump_transformer_options=None, conflict_resolution_rules=None, content_filter=None): self.top_object_name = top_object_name self.top_object_type = top_object_type self.owner_name = owner_name self.top_object_id = top_object_id self.owner_guid = owner_guid self.owner_type = owner_type self.operability_check = operability_check self.mail_to = mail_to self.source = source self.objects = objects self.ignore_errors = ignore_errors self.misc = misc self.dump_transformer_options = dump_transformer_options self.conflict_resolution_rules = conflict_resolution_rules self.content_filter = content_filter def factory(*args_, **kwargs_): if RestoreTaskDescription.subclass: return RestoreTaskDescription.subclass(*args_, **kwargs_) else: return RestoreTaskDescription(*args_, **kwargs_) factory = staticmethod(factory) def get_source(self): return self.source def set_source(self, source): self.source = source def get_objects(self): return self.objects def set_objects(self, objects): self.objects = objects def get_ignore_errors(self): return self.ignore_errors def set_ignore_errors(self, ignore_errors): self.ignore_errors = ignore_errors def get_misc(self): return self.misc def set_misc(self, misc): self.misc = misc def get_dump_transformer_options(self): return self.dump_transformer_options def set_dump_transformer_options(self, dump_transformer_options): self.dump_transformer_options = dump_transformer_options def get_conflict_resolution_rules(self): return self.conflict_resolution_rules def set_conflict_resolution_rules(self, conflict_resolution_rules): self.conflict_resolution_rules = conflict_resolution_rules def get_content_filter(self): return self.content_filter def set_content_filter(self, content_filter): self.content_filter = content_filter def get_top_object_name(self): return self.top_object_name def set_top_object_name(self, top_object_name): self.top_object_name = top_object_name def get_top_object_type(self): return self.top_object_type def set_top_object_type(self, top_object_type): self.top_object_type = top_object_type def get_owner_name(self): return self.owner_name def set_owner_name(self, owner_name): self.owner_name = owner_name def get_top_object_id(self): return self.top_object_id def set_top_object_id(self, top_object_id): self.top_object_id = top_object_id def get_owner_guid(self): return self.owner_guid def set_owner_guid(self, owner_guid): self.owner_guid = owner_guid def get_owner_type(self): return self.owner_type def set_owner_type(self, owner_type): self.owner_type = owner_type def get_operability_check(self): return self.operability_check def set_operability_check(self, operability_check): self.operability_check = operability_check def get_mail_to(self): return self.mail_to def set_mail_to(self, mail_to): self.mail_to = mail_to def export(self, outfile, level, namespace_='', name_='RestoreTaskDescription'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='RestoreTaskDescription') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='RestoreTaskDescription'): if self.get_top_object_name() is not None: outfile.write(' top-object-name="%s"' % (quote_attrib(self.get_top_object_name()), )) if self.get_top_object_type() is not None: outfile.write(' top-object-type="%s"' % str(self.get_top_object_type())) if self.get_owner_name() is not None: outfile.write(' owner-name="%s"' % (quote_attrib(self.get_owner_name()), )) if self.get_top_object_id() is not None: outfile.write(' top-object-id="%s"' % (quote_attrib(self.get_top_object_id()), )) outfile.write(' owner-guid="%s"' % (quote_attrib(self.get_owner_guid()), )) outfile.write(' owner-type="%s"' % str(self.get_owner_type())) if self.get_operability_check() is not None: outfile.write(' operability-check="%s"' % str(self.get_operability_check())) if self.get_mail_to() is not None: outfile.write(' mail-to="%s"' % (quote_attrib(self.get_mail_to()), )) def exportChildren(self, outfile, level, namespace_='', name_='RestoreTaskDescription'): if self.source: self.source.export(outfile, level, namespace_, name_='source', ) if self.objects: self.objects.export(outfile, level, namespace_, name_='objects', ) if self.get_ignore_errors() != None : if self.ignore_errors: self.ignore_errors.export(outfile, level, namespace_, name_='ignore-errors') if self.get_misc() != None : if self.misc: self.misc.export(outfile, level, namespace_, name_='misc') if self.get_dump_transformer_options() != None : if self.dump_transformer_options: self.dump_transformer_options.export(outfile, level, namespace_, name_='dump-transformer-options') if self.get_conflict_resolution_rules() != None : if self.conflict_resolution_rules: self.conflict_resolution_rules.export(outfile, level, namespace_, name_='conflict-resolution-rules') if self.get_content_filter() != None : if self.content_filter: self.content_filter.export(outfile, level, namespace_, name_='content-filter') def exportLiteral(self, outfile, level, name_='RestoreTaskDescription'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('top_object_name = "%s",\n' % (self.get_top_object_name(),)) showIndent(outfile, level) outfile.write('top_object_type = "%s",\n' % (self.get_top_object_type(),)) showIndent(outfile, level) outfile.write('owner_name = "%s",\n' % (self.get_owner_name(),)) showIndent(outfile, level) outfile.write('top_object_id = "%s",\n' % (self.get_top_object_id(),)) showIndent(outfile, level) outfile.write('owner_guid = "%s",\n' % (self.get_owner_guid(),)) showIndent(outfile, level) outfile.write('owner_type = "%s",\n' % (self.get_owner_type(),)) showIndent(outfile, level) outfile.write('operability_check = "%s",\n' % (self.get_operability_check(),)) showIndent(outfile, level) outfile.write('mail_to = "%s",\n' % (self.get_mail_to(),)) def exportLiteralChildren(self, outfile, level, name_): if self.source: showIndent(outfile, level) outfile.write('source=RestoreTaskDescriptionSource(\n') self.source.exportLiteral(outfile, level, name_='source') showIndent(outfile, level) outfile.write('),\n') if self.objects: showIndent(outfile, level) outfile.write('objects=RestoreTaskDescriptionObjects(\n') self.objects.exportLiteral(outfile, level, name_='objects') showIndent(outfile, level) outfile.write('),\n') if self.ignore_errors: showIndent(outfile, level) outfile.write('ignore_errors=IgnoreErrors(\n') self.ignore_errors.exportLiteral(outfile, level, name_='ignore_errors') showIndent(outfile, level) outfile.write('),\n') if self.misc: showIndent(outfile, level) outfile.write('misc=RestoreTaskDescriptionMisc(\n') self.misc.exportLiteral(outfile, level, name_='misc') showIndent(outfile, level) outfile.write('),\n') if self.dump_transformer_options: showIndent(outfile, level) outfile.write('dump_transformer_options=DumpTransformerOptions(\n') self.dump_transformer_options.exportLiteral(outfile, level, name_='dump_transformer_options') showIndent(outfile, level) outfile.write('),\n') if self.conflict_resolution_rules: showIndent(outfile, level) outfile.write('conflict_resolution_rules=ConflictResolutionRules(\n') self.conflict_resolution_rules.exportLiteral(outfile, level, name_='conflict_resolution_rules') showIndent(outfile, level) outfile.write('),\n') if self.content_filter: showIndent(outfile, level) outfile.write('content_filter=RestoreTaskContentFilterInfo(\n') self.content_filter.exportLiteral(outfile, level, name_='content_filter') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('top-object-name'): self.top_object_name = attrs.get('top-object-name').value if attrs.get('top-object-type'): self.top_object_type = attrs.get('top-object-type').value if attrs.get('owner-name'): self.owner_name = attrs.get('owner-name').value if attrs.get('top-object-id'): self.top_object_id = attrs.get('top-object-id').value if attrs.get('owner-guid'): self.owner_guid = attrs.get('owner-guid').value if attrs.get('owner-type'): self.owner_type = attrs.get('owner-type').value if attrs.get('operability-check'): self.operability_check = attrs.get('operability-check').value if attrs.get('mail-to'): self.mail_to = attrs.get('mail-to').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'source': obj_ = RestoreTaskDescriptionSource.factory() obj_.build(child_) self.set_source(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'objects': obj_ = RestoreTaskDescriptionObjects.factory() obj_.build(child_) self.set_objects(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'ignore-errors': obj_ = IgnoreErrors.factory() obj_.build(child_) self.set_ignore_errors(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'misc': obj_ = RestoreTaskDescriptionMisc.factory() obj_.build(child_) self.set_misc(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-transformer-options': obj_ = DumpTransformerOptions.factory() obj_.build(child_) self.set_dump_transformer_options(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'conflict-resolution-rules': obj_ = ConflictResolutionRules.factory() obj_.build(child_) self.set_conflict_resolution_rules(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'content-filter': obj_ = RestoreTaskContentFilterInfo.factory() obj_.build(child_) self.set_content_filter(obj_) # end class RestoreTaskDescription class RestoreTaskDescriptionMisc: subclass = None superclass = None def __init__(self, content_restore_type='', suspend=None, delete_downloaded_dumps='', mode='', verbose_level=None, valueOf_='', mixedclass_=None, content_=None): self.content_restore_type = content_restore_type self.suspend = suspend self.delete_downloaded_dumps = delete_downloaded_dumps self.mode = mode self.verbose_level = verbose_level if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if RestoreTaskDescriptionMisc.subclass: return RestoreTaskDescriptionMisc.subclass(*args_, **kwargs_) else: return RestoreTaskDescriptionMisc(*args_, **kwargs_) factory = staticmethod(factory) def get_content_restore_type(self): return self.content_restore_type def set_content_restore_type(self, content_restore_type): self.content_restore_type = content_restore_type def get_suspend(self): return self.suspend def set_suspend(self, suspend): self.suspend = suspend def get_delete_downloaded_dumps(self): return self.delete_downloaded_dumps def set_delete_downloaded_dumps(self, delete_downloaded_dumps): self.delete_downloaded_dumps = delete_downloaded_dumps def get_mode(self): return self.mode def set_mode(self, mode): self.mode = mode def get_verbose_level(self): return self.verbose_level def set_verbose_level(self, verbose_level): self.verbose_level = verbose_level def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionMisc'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='RestoreTaskDescriptionMisc') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionMisc'): if self.get_content_restore_type() is not None: outfile.write(' content-restore-type="%s"' % (quote_attrib(self.get_content_restore_type()), )) if self.get_suspend() is not None: outfile.write(' suspend="%s"' % str(self.get_suspend())) if self.get_delete_downloaded_dumps() is not None: outfile.write(' delete-downloaded-dumps="%s"' % (quote_attrib(self.get_delete_downloaded_dumps()), )) if self.get_mode() is not None: outfile.write(' mode="%s"' % (quote_attrib(self.get_mode()), )) if self.get_verbose_level() is not None: outfile.write(' verbose-level="%s"' % str(self.get_verbose_level())) def exportChildren(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionMisc'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='RestoreTaskDescriptionMisc'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('content_restore_type = "%s",\n' % (self.get_content_restore_type(),)) showIndent(outfile, level) outfile.write('suspend = "%s",\n' % (self.get_suspend(),)) showIndent(outfile, level) outfile.write('delete_downloaded_dumps = "%s",\n' % (self.get_delete_downloaded_dumps(),)) showIndent(outfile, level) outfile.write('mode = "%s",\n' % (self.get_mode(),)) showIndent(outfile, level) outfile.write('verbose_level = "%s",\n' % (self.get_verbose_level(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('content-restore-type'): self.content_restore_type = attrs.get('content-restore-type').value if attrs.get('suspend'): self.suspend = attrs.get('suspend').value if attrs.get('delete-downloaded-dumps'): self.delete_downloaded_dumps = attrs.get('delete-downloaded-dumps').value if attrs.get('mode'): self.mode = attrs.get('mode').value if attrs.get('verbose-level'): self.verbose_level = attrs.get('verbose-level').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class RestoreTaskDescriptionMisc class RestoreTaskDescriptionSource: subclass = None superclass = None def __init__(self, dump_specification=None, session_id=None, backup_password=''): self.dump_specification = dump_specification self.session_id = session_id self.backup_password = backup_password def factory(*args_, **kwargs_): if RestoreTaskDescriptionSource.subclass: return RestoreTaskDescriptionSource.subclass(*args_, **kwargs_) else: return RestoreTaskDescriptionSource(*args_, **kwargs_) factory = staticmethod(factory) def get_dump_specification(self): return self.dump_specification def set_dump_specification(self, dump_specification): self.dump_specification = dump_specification def get_session_id(self): return self.session_id def set_session_id(self, session_id): self.session_id = session_id def get_backup_password(self): return self.backup_password def set_backup_password(self, backup_password): self.backup_password = backup_password def export(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionSource'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='RestoreTaskDescriptionSource') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionSource'): pass def exportChildren(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionSource'): if self.get_dump_specification() != None : if self.dump_specification: self.dump_specification.export(outfile, level, namespace_, name_='dump-specification') if self.get_session_id() != None : if self.session_id: self.session_id.export(outfile, level, namespace_, name_='session-id') if self.get_backup_password() != None : if self.get_backup_password() != "" : showIndent(outfile, level) outfile.write('<%sbackup-password>%s\n' % (namespace_, quote_xml(self.get_backup_password()), namespace_)) def exportLiteral(self, outfile, level, name_='RestoreTaskDescriptionSource'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.dump_specification: showIndent(outfile, level) outfile.write('dump_specification=DumpSpecification(\n') self.dump_specification.exportLiteral(outfile, level, name_='dump_specification') showIndent(outfile, level) outfile.write('),\n') if self.session_id: showIndent(outfile, level) outfile.write('session_id=SessionId(\n') self.session_id.exportLiteral(outfile, level, name_='session_id') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('backup_password=%s,\n' % quote_python(self.get_backup_password())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-specification': obj_ = DumpSpecification.factory() obj_.build(child_) self.set_dump_specification(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'session-id': obj_ = SessionId.factory() obj_.build(child_) self.set_session_id(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'backup-password': backup_password_ = '' for text__content_ in child_.childNodes: backup_password_ += text__content_.nodeValue self.backup_password = backup_password_ # end class RestoreTaskDescriptionSource class SessionId: subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if SessionId.subclass: return SessionId.subclass(*args_, **kwargs_) else: return SessionId(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='SessionId'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='SessionId') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='SessionId'): pass def exportChildren(self, outfile, level, namespace_='', name_='SessionId'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='SessionId'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class SessionId class RestoreTaskDescriptionObjects: subclass = None superclass = None def __init__(self, all=None, selected=None): self.all = all self.selected = selected def factory(*args_, **kwargs_): if RestoreTaskDescriptionObjects.subclass: return RestoreTaskDescriptionObjects.subclass(*args_, **kwargs_) else: return RestoreTaskDescriptionObjects(*args_, **kwargs_) factory = staticmethod(factory) def get_all(self): return self.all def set_all(self, all): self.all = all def get_selected(self): return self.selected def set_selected(self, selected): self.selected = selected def export(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionObjects'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='RestoreTaskDescriptionObjects') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionObjects'): pass def exportChildren(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionObjects'): if self.all: self.all.export(outfile, level, namespace_, name_='all', ) if self.selected: self.selected.export(outfile, level, namespace_, name_='selected', ) def exportLiteral(self, outfile, level, name_='RestoreTaskDescriptionObjects'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.all: showIndent(outfile, level) outfile.write('all=EmptyType(\n') self.all.exportLiteral(outfile, level, name_='all') showIndent(outfile, level) outfile.write('),\n') if self.selected: showIndent(outfile, level) outfile.write('selected=RestoreTaskDescriptionObjectsSelected(\n') self.selected.exportLiteral(outfile, level, name_='selected') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'all': obj_ = EmptyType.factory() obj_.build(child_) self.set_all(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'selected': obj_ = RestoreTaskDescriptionObjectsSelected.factory() obj_.build(child_) self.set_selected(obj_) # end class RestoreTaskDescriptionObjects class RestoreTaskDescriptionObjectsSelected: subclass = None superclass = None def __init__(self, node=None): if node is None: self.node = [] else: self.node = node def factory(*args_, **kwargs_): if RestoreTaskDescriptionObjectsSelected.subclass: return RestoreTaskDescriptionObjectsSelected.subclass(*args_, **kwargs_) else: return RestoreTaskDescriptionObjectsSelected(*args_, **kwargs_) factory = staticmethod(factory) def get_node(self): return self.node def set_node(self, node): self.node = node def add_node(self, value): self.node.append(value) def insert_node(self, index, value): self.node[index] = value def validate_TransformNode(self, value): # validate type TransformNode pass def export(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionObjectsSelected'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='RestoreTaskDescriptionObjectsSelected') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionObjectsSelected'): pass def exportChildren(self, outfile, level, namespace_='', name_='RestoreTaskDescriptionObjectsSelected'): for node_ in self.get_node(): node_.export(outfile, level, namespace_, name_='node') def exportLiteral(self, outfile, level, name_='RestoreTaskDescriptionObjectsSelected'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('node=[\n') level += 1 for node in self.node: showIndent(outfile, level) outfile.write('TransformNode(\n') node.exportLiteral(outfile, level, name_='node') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'node': obj_ = TransformNode.factory() obj_.build(child_) self.node.append(obj_) self.validate_TransformNode(self.node) # validate type TransformNode # end class RestoreTaskDescriptionObjectsSelected class RestoreTaskContentFilterInfo: subclass = None superclass = None def __init__(self, content_type='', content_data=''): self.content_type = content_type self.content_data = content_data def factory(*args_, **kwargs_): if RestoreTaskContentFilterInfo.subclass: return RestoreTaskContentFilterInfo.subclass(*args_, **kwargs_) else: return RestoreTaskContentFilterInfo(*args_, **kwargs_) factory = staticmethod(factory) def get_content_type(self): return self.content_type def set_content_type(self, content_type): self.content_type = content_type def get_content_data(self): return self.content_data def set_content_data(self, content_data): self.content_data = content_data def export(self, outfile, level, namespace_='', name_='RestoreTaskContentFilterInfo'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='RestoreTaskContentFilterInfo') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='RestoreTaskContentFilterInfo'): pass def exportChildren(self, outfile, level, namespace_='', name_='RestoreTaskContentFilterInfo'): showIndent(outfile, level) outfile.write('<%scontent-type>%s\n' % (namespace_, quote_xml(self.get_content_type()), namespace_)) showIndent(outfile, level) outfile.write('<%scontent-data>%s\n' % (namespace_, quote_xml(self.get_content_data()), namespace_)) def exportLiteral(self, outfile, level, name_='RestoreTaskContentFilterInfo'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('content_type=%s,\n' % quote_python(self.get_content_type())) showIndent(outfile, level) outfile.write('content_data=%s,\n' % quote_python(self.get_content_data())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'content-type': content_type_ = '' for text__content_ in child_.childNodes: content_type_ += text__content_.nodeValue self.content_type = content_type_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'content-data': content_data_ = '' for text__content_ in child_.childNodes: content_data_ += text__content_.nodeValue self.content_data = content_data_ # end class RestoreTaskContentFilterInfo class IgnoreErrors: subclass = None superclass = None def __init__(self, ignore_error=None): if ignore_error is None: self.ignore_error = [] else: self.ignore_error = ignore_error def factory(*args_, **kwargs_): if IgnoreErrors.subclass: return IgnoreErrors.subclass(*args_, **kwargs_) else: return IgnoreErrors(*args_, **kwargs_) factory = staticmethod(factory) def get_ignore_error(self): return self.ignore_error def set_ignore_error(self, ignore_error): self.ignore_error = ignore_error def add_ignore_error(self, value): self.ignore_error.append(value) def insert_ignore_error(self, index, value): self.ignore_error[index] = value def validate_IgnoreError(self, value): # validate type IgnoreError pass def export(self, outfile, level, namespace_='', name_='IgnoreErrors'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='IgnoreErrors') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='IgnoreErrors'): pass def exportChildren(self, outfile, level, namespace_='', name_='IgnoreErrors'): for ignore_error_ in self.get_ignore_error(): ignore_error_.export(outfile, level, namespace_, name_='ignore-error') def exportLiteral(self, outfile, level, name_='IgnoreErrors'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('ignore_error=[\n') level += 1 for ignore_error in self.ignore_error: showIndent(outfile, level) outfile.write('IgnoreError(\n') ignore_error.exportLiteral(outfile, level, name_='ignore_error') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'ignore-error': obj_ = IgnoreError.factory() obj_.build(child_) self.ignore_error.append(obj_) self.validate_IgnoreError(self.ignore_error) # validate type IgnoreError # end class IgnoreErrors class IgnoreError: subclass = None superclass = None def __init__(self, typexx='', valueOf_='', mixedclass_=None, content_=None): self.typexx = typexx if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if IgnoreError.subclass: return IgnoreError.subclass(*args_, **kwargs_) else: return IgnoreError(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='IgnoreError'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='IgnoreError') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='IgnoreError'): outfile.write(' type="%s"' % (quote_attrib(self.get_type()), )) def exportChildren(self, outfile, level, namespace_='', name_='IgnoreError'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='IgnoreError'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('type'): self.typexx = attrs.get('type').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class IgnoreError class TimingPolicy: subclass = None superclass = None def __init__(self, resolution=None): self.resolution = resolution def factory(*args_, **kwargs_): if TimingPolicy.subclass: return TimingPolicy.subclass(*args_, **kwargs_) else: return TimingPolicy(*args_, **kwargs_) factory = staticmethod(factory) def get_resolution(self): return self.resolution def set_resolution(self, resolution): self.resolution = resolution def export(self, outfile, level, namespace_='', name_='TimingPolicy'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='TimingPolicy') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='TimingPolicy'): pass def exportChildren(self, outfile, level, namespace_='', name_='TimingPolicy'): if self.resolution: self.resolution.export(outfile, level, namespace_, name_='resolution', ) def exportLiteral(self, outfile, level, name_='TimingPolicy'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.resolution: showIndent(outfile, level) outfile.write('resolution=Resolution(\n') self.resolution.exportLiteral(outfile, level, name_='resolution') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resolution': obj_ = Resolution.factory() obj_.build(child_) self.set_resolution(obj_) # end class TimingPolicy class ResourceUsagePolicy: subclass = None superclass = None def __init__(self, resolution=None): self.resolution = resolution def factory(*args_, **kwargs_): if ResourceUsagePolicy.subclass: return ResourceUsagePolicy.subclass(*args_, **kwargs_) else: return ResourceUsagePolicy(*args_, **kwargs_) factory = staticmethod(factory) def get_resolution(self): return self.resolution def set_resolution(self, resolution): self.resolution = resolution def export(self, outfile, level, namespace_='', name_='ResourceUsagePolicy'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResourceUsagePolicy') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResourceUsagePolicy'): pass def exportChildren(self, outfile, level, namespace_='', name_='ResourceUsagePolicy'): if self.resolution: self.resolution.export(outfile, level, namespace_, name_='resolution', ) def exportLiteral(self, outfile, level, name_='ResourceUsagePolicy'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.resolution: showIndent(outfile, level) outfile.write('resolution=Resolution(\n') self.resolution.exportLiteral(outfile, level, name_='resolution') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resolution': obj_ = Resolution.factory() obj_.build(child_) self.set_resolution(obj_) # end class ResourceUsagePolicy class ConfigurationPolicy: subclass = None superclass = None def __init__(self, resolution=None): self.resolution = resolution def factory(*args_, **kwargs_): if ConfigurationPolicy.subclass: return ConfigurationPolicy.subclass(*args_, **kwargs_) else: return ConfigurationPolicy(*args_, **kwargs_) factory = staticmethod(factory) def get_resolution(self): return self.resolution def set_resolution(self, resolution): self.resolution = resolution def export(self, outfile, level, namespace_='', name_='ConfigurationPolicy'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConfigurationPolicy') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConfigurationPolicy'): pass def exportChildren(self, outfile, level, namespace_='', name_='ConfigurationPolicy'): if self.resolution: self.resolution.export(outfile, level, namespace_, name_='resolution', ) def exportLiteral(self, outfile, level, name_='ConfigurationPolicy'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.resolution: showIndent(outfile, level) outfile.write('resolution=Resolution(\n') self.resolution.exportLiteral(outfile, level, name_='resolution') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resolution': obj_ = Resolution.factory() obj_.build(child_) self.set_resolution(obj_) # end class ConfigurationPolicy class Policy: subclass = None superclass = None def __init__(self, timing=None, resource_usage=None, configuration=None): self.timing = timing self.resource_usage = resource_usage self.configuration = configuration def factory(*args_, **kwargs_): if Policy.subclass: return Policy.subclass(*args_, **kwargs_) else: return Policy(*args_, **kwargs_) factory = staticmethod(factory) def get_timing(self): return self.timing def set_timing(self, timing): self.timing = timing def get_resource_usage(self): return self.resource_usage def set_resource_usage(self, resource_usage): self.resource_usage = resource_usage def get_configuration(self): return self.configuration def set_configuration(self, configuration): self.configuration = configuration def export(self, outfile, level, namespace_='', name_='Policy'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Policy') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Policy'): pass def exportChildren(self, outfile, level, namespace_='', name_='Policy'): if self.get_timing() != None : if self.timing: self.timing.export(outfile, level, namespace_, name_='timing') if self.get_resource_usage() != None : if self.resource_usage: self.resource_usage.export(outfile, level, namespace_, name_='resource-usage') if self.get_configuration() != None : if self.configuration: self.configuration.export(outfile, level, namespace_, name_='configuration') def exportLiteral(self, outfile, level, name_='Policy'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.timing: showIndent(outfile, level) outfile.write('timing=TimingPolicy(\n') self.timing.exportLiteral(outfile, level, name_='timing') showIndent(outfile, level) outfile.write('),\n') if self.resource_usage: showIndent(outfile, level) outfile.write('resource_usage=ResourceUsagePolicy(\n') self.resource_usage.exportLiteral(outfile, level, name_='resource_usage') showIndent(outfile, level) outfile.write('),\n') if self.configuration: showIndent(outfile, level) outfile.write('configuration=ConfigurationPolicy(\n') self.configuration.exportLiteral(outfile, level, name_='configuration') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'timing': obj_ = TimingPolicy.factory() obj_.build(child_) self.set_timing(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resource-usage': obj_ = ResourceUsagePolicy.factory() obj_.build(child_) self.set_resource_usage(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'configuration': obj_ = ConfigurationPolicy.factory() obj_.build(child_) self.set_configuration(obj_) # end class Policy class DumpObjects: subclass = None superclass = None def __init__(self, node=None): if node is None: self.node = [] else: self.node = node def factory(*args_, **kwargs_): if DumpObjects.subclass: return DumpObjects.subclass(*args_, **kwargs_) else: return DumpObjects(*args_, **kwargs_) factory = staticmethod(factory) def get_node(self): return self.node def set_node(self, node): self.node = node def add_node(self, value): self.node.append(value) def insert_node(self, index, value): self.node[index] = value def validate_TransformNode(self, value): # validate type TransformNode pass def export(self, outfile, level, namespace_='', name_='DumpObjects'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpObjects') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpObjects'): pass def exportChildren(self, outfile, level, namespace_='', name_='DumpObjects'): for node_ in self.get_node(): node_.export(outfile, level, namespace_, name_='node') def exportLiteral(self, outfile, level, name_='DumpObjects'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('node=[\n') level += 1 for node in self.node: showIndent(outfile, level) outfile.write('TransformNode(\n') node.exportLiteral(outfile, level, name_='node') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'node': obj_ = TransformNode.factory() obj_.build(child_) self.node.append(obj_) self.validate_TransformNode(self.node) # validate type TransformNode # end class DumpObjects class Rule: subclass = None superclass = None def __init__(self, conflict_guid='', conflict_id='', dump_objects=None, resolution=None): self.conflict_guid = conflict_guid self.conflict_id = conflict_id self.dump_objects = dump_objects self.resolution = resolution def factory(*args_, **kwargs_): if Rule.subclass: return Rule.subclass(*args_, **kwargs_) else: return Rule(*args_, **kwargs_) factory = staticmethod(factory) def get_dump_objects(self): return self.dump_objects def set_dump_objects(self, dump_objects): self.dump_objects = dump_objects def get_resolution(self): return self.resolution def set_resolution(self, resolution): self.resolution = resolution def get_conflict_guid(self): return self.conflict_guid def set_conflict_guid(self, conflict_guid): self.conflict_guid = conflict_guid def get_conflict_id(self): return self.conflict_id def set_conflict_id(self, conflict_id): self.conflict_id = conflict_id def export(self, outfile, level, namespace_='', name_='Rule'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Rule') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Rule'): if self.get_conflict_guid() is not None: outfile.write(' conflict-guid="%s"' % (quote_attrib(self.get_conflict_guid()), )) if self.get_conflict_id() is not None: outfile.write(' conflict-id="%s"' % (quote_attrib(self.get_conflict_id()), )) def exportChildren(self, outfile, level, namespace_='', name_='Rule'): if self.get_dump_objects() != None : if self.dump_objects: self.dump_objects.export(outfile, level, namespace_, name_='dump-objects') if self.resolution: self.resolution.export(outfile, level, namespace_, name_='resolution', ) def exportLiteral(self, outfile, level, name_='Rule'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('conflict_guid = "%s",\n' % (self.get_conflict_guid(),)) showIndent(outfile, level) outfile.write('conflict_id = "%s",\n' % (self.get_conflict_id(),)) def exportLiteralChildren(self, outfile, level, name_): if self.dump_objects: showIndent(outfile, level) outfile.write('dump_objects=DumpObjects(\n') self.dump_objects.exportLiteral(outfile, level, name_='dump_objects') showIndent(outfile, level) outfile.write('),\n') if self.resolution: showIndent(outfile, level) outfile.write('resolution=Resolution(\n') self.resolution.exportLiteral(outfile, level, name_='resolution') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('conflict-guid'): self.conflict_guid = attrs.get('conflict-guid').value if attrs.get('conflict-id'): self.conflict_id = attrs.get('conflict-id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump-objects': obj_ = DumpObjects.factory() obj_.build(child_) self.set_dump_objects(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resolution': obj_ = Resolution.factory() obj_.build(child_) self.set_resolution(obj_) # end class Rule class ResolveConflictsTaskDescription: subclass = None superclass = None def __init__(self, session_id='', conflict_resolution_rules=None): self.session_id = session_id self.conflict_resolution_rules = conflict_resolution_rules def factory(*args_, **kwargs_): if ResolveConflictsTaskDescription.subclass: return ResolveConflictsTaskDescription.subclass(*args_, **kwargs_) else: return ResolveConflictsTaskDescription(*args_, **kwargs_) factory = staticmethod(factory) def get_conflict_resolution_rules(self): return self.conflict_resolution_rules def set_conflict_resolution_rules(self, conflict_resolution_rules): self.conflict_resolution_rules = conflict_resolution_rules def get_session_id(self): return self.session_id def set_session_id(self, session_id): self.session_id = session_id def export(self, outfile, level, namespace_='', name_='ResolveConflictsTaskDescription'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResolveConflictsTaskDescription') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResolveConflictsTaskDescription'): if self.get_session_id() is not None: outfile.write(' session-id="%s"' % (quote_attrib(self.get_session_id()), )) def exportChildren(self, outfile, level, namespace_='', name_='ResolveConflictsTaskDescription'): if self.conflict_resolution_rules: self.conflict_resolution_rules.export(outfile, level, namespace_, name_='conflict-resolution-rules', ) def exportLiteral(self, outfile, level, name_='ResolveConflictsTaskDescription'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('session_id = "%s",\n' % (self.get_session_id(),)) def exportLiteralChildren(self, outfile, level, name_): if self.conflict_resolution_rules: showIndent(outfile, level) outfile.write('conflict_resolution_rules=ConflictResolutionRules(\n') self.conflict_resolution_rules.exportLiteral(outfile, level, name_='conflict_resolution_rules') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('session-id'): self.session_id = attrs.get('session-id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'conflict-resolution-rules': obj_ = ConflictResolutionRules.factory() obj_.build(child_) self.set_conflict_resolution_rules(obj_) # end class ResolveConflictsTaskDescription class ConflictResolutionRules: subclass = None superclass = None def __init__(self, policy=None, rule=None): self.policy = policy if rule is None: self.rule = [] else: self.rule = rule def factory(*args_, **kwargs_): if ConflictResolutionRules.subclass: return ConflictResolutionRules.subclass(*args_, **kwargs_) else: return ConflictResolutionRules(*args_, **kwargs_) factory = staticmethod(factory) def get_policy(self): return self.policy def set_policy(self, policy): self.policy = policy def get_rule(self): return self.rule def set_rule(self, rule): self.rule = rule def add_rule(self, value): self.rule.append(value) def insert_rule(self, index, value): self.rule[index] = value def export(self, outfile, level, namespace_='', name_='ConflictResolutionRules'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConflictResolutionRules') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConflictResolutionRules'): pass def exportChildren(self, outfile, level, namespace_='', name_='ConflictResolutionRules'): if self.policy: self.policy.export(outfile, level, namespace_, name_='policy', ) for rule_ in self.get_rule(): rule_.export(outfile, level, namespace_, name_='rule') def exportLiteral(self, outfile, level, name_='ConflictResolutionRules'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.policy: showIndent(outfile, level) outfile.write('policy=Policy(\n') self.policy.exportLiteral(outfile, level, name_='policy') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('rule=[\n') level += 1 for rule in self.rule: showIndent(outfile, level) outfile.write('Rule(\n') rule.exportLiteral(outfile, level, name_='rule') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'policy': obj_ = Policy.factory() obj_.build(child_) self.set_policy(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'rule': obj_ = Rule.factory() obj_.build(child_) self.rule.append(obj_) # end class ConflictResolutionRules class ResolutionDoNotRestore: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ResolutionDoNotRestore.subclass: return ResolutionDoNotRestore.subclass(*args_, **kwargs_) else: return ResolutionDoNotRestore(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ResolutionDoNotRestore'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResolutionDoNotRestore') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResolutionDoNotRestore'): pass def exportChildren(self, outfile, level, namespace_='', name_='ResolutionDoNotRestore'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ResolutionDoNotRestore'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ResolutionDoNotRestore class ResolutionProceedWithCurrent: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ResolutionProceedWithCurrent.subclass: return ResolutionProceedWithCurrent.subclass(*args_, **kwargs_) else: return ResolutionProceedWithCurrent(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ResolutionProceedWithCurrent'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResolutionProceedWithCurrent') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResolutionProceedWithCurrent'): pass def exportChildren(self, outfile, level, namespace_='', name_='ResolutionProceedWithCurrent'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ResolutionProceedWithCurrent'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ResolutionProceedWithCurrent class ResolutionAutomatic: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ResolutionAutomatic.subclass: return ResolutionAutomatic.subclass(*args_, **kwargs_) else: return ResolutionAutomatic(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ResolutionAutomatic'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResolutionAutomatic') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResolutionAutomatic'): pass def exportChildren(self, outfile, level, namespace_='', name_='ResolutionAutomatic'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ResolutionAutomatic'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ResolutionAutomatic class ResolutionOveruse: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ResolutionOveruse.subclass: return ResolutionOveruse.subclass(*args_, **kwargs_) else: return ResolutionOveruse(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ResolutionOveruse'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResolutionOveruse') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResolutionOveruse'): pass def exportChildren(self, outfile, level, namespace_='', name_='ResolutionOveruse'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ResolutionOveruse'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ResolutionOveruse class ResolutionOverwrite: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ResolutionOverwrite.subclass: return ResolutionOverwrite.subclass(*args_, **kwargs_) else: return ResolutionOverwrite(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ResolutionOverwrite'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResolutionOverwrite') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResolutionOverwrite'): pass def exportChildren(self, outfile, level, namespace_='', name_='ResolutionOverwrite'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ResolutionOverwrite'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ResolutionOverwrite class ResolutionRename: subclass = None superclass = None def __init__(self, new_name='', valueOf_='', mixedclass_=None, content_=None): self.new_name = new_name if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if ResolutionRename.subclass: return ResolutionRename.subclass(*args_, **kwargs_) else: return ResolutionRename(*args_, **kwargs_) factory = staticmethod(factory) def get_new_name(self): return self.new_name def set_new_name(self, new_name): self.new_name = new_name def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ResolutionRename'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResolutionRename') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResolutionRename'): outfile.write(' new-name="%s"' % (quote_attrib(self.get_new_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='ResolutionRename'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ResolutionRename'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('new_name = "%s",\n' % (self.get_new_name(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('new-name'): self.new_name = attrs.get('new-name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ResolutionRename class Resolution: subclass = None superclass = None def __init__(self, do_not_restore=None, proceed_with_current=None, automatic=None, overuse=None, overwrite=None, rename=None): self.do_not_restore = do_not_restore self.proceed_with_current = proceed_with_current self.automatic = automatic self.overuse = overuse self.overwrite = overwrite self.rename = rename def factory(*args_, **kwargs_): if Resolution.subclass: return Resolution.subclass(*args_, **kwargs_) else: return Resolution(*args_, **kwargs_) factory = staticmethod(factory) def get_do_not_restore(self): return self.do_not_restore def set_do_not_restore(self, do_not_restore): self.do_not_restore = do_not_restore def get_proceed_with_current(self): return self.proceed_with_current def set_proceed_with_current(self, proceed_with_current): self.proceed_with_current = proceed_with_current def get_automatic(self): return self.automatic def set_automatic(self, automatic): self.automatic = automatic def get_overuse(self): return self.overuse def set_overuse(self, overuse): self.overuse = overuse def get_overwrite(self): return self.overwrite def set_overwrite(self, overwrite): self.overwrite = overwrite def get_rename(self): return self.rename def set_rename(self, rename): self.rename = rename def export(self, outfile, level, namespace_='', name_='Resolution'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='Resolution') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='Resolution'): pass def exportChildren(self, outfile, level, namespace_='', name_='Resolution'): if self.do_not_restore: self.do_not_restore.export(outfile, level, namespace_, name_='do-not-restore', ) if self.proceed_with_current: self.proceed_with_current.export(outfile, level, namespace_, name_='proceed-with-current', ) if self.automatic: self.automatic.export(outfile, level, namespace_, name_='automatic', ) if self.overuse: self.overuse.export(outfile, level, namespace_, name_='overuse', ) if self.overwrite: self.overwrite.export(outfile, level, namespace_, name_='overwrite', ) if self.rename: self.rename.export(outfile, level, namespace_, name_='rename', ) def exportLiteral(self, outfile, level, name_='Resolution'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.do_not_restore: showIndent(outfile, level) outfile.write('do_not_restore=ResolutionDoNotRestore(\n') self.do_not_restore.exportLiteral(outfile, level, name_='do_not_restore') showIndent(outfile, level) outfile.write('),\n') if self.proceed_with_current: showIndent(outfile, level) outfile.write('proceed_with_current=ResolutionProceedWithCurrent(\n') self.proceed_with_current.exportLiteral(outfile, level, name_='proceed_with_current') showIndent(outfile, level) outfile.write('),\n') if self.automatic: showIndent(outfile, level) outfile.write('automatic=ResolutionAutomatic(\n') self.automatic.exportLiteral(outfile, level, name_='automatic') showIndent(outfile, level) outfile.write('),\n') if self.overuse: showIndent(outfile, level) outfile.write('overuse=ResolutionOveruse(\n') self.overuse.exportLiteral(outfile, level, name_='overuse') showIndent(outfile, level) outfile.write('),\n') if self.overwrite: showIndent(outfile, level) outfile.write('overwrite=ResolutionOverwrite(\n') self.overwrite.exportLiteral(outfile, level, name_='overwrite') showIndent(outfile, level) outfile.write('),\n') if self.rename: showIndent(outfile, level) outfile.write('rename=ResolutionRename(\n') self.rename.exportLiteral(outfile, level, name_='rename') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'do-not-restore': obj_ = ResolutionDoNotRestore.factory() obj_.build(child_) self.set_do_not_restore(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'proceed-with-current': obj_ = ResolutionProceedWithCurrent.factory() obj_.build(child_) self.set_proceed_with_current(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'automatic': obj_ = ResolutionAutomatic.factory() obj_.build(child_) self.set_automatic(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'overuse': obj_ = ResolutionOveruse.factory() obj_.build(child_) self.set_overuse(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'overwrite': obj_ = ResolutionOverwrite.factory() obj_.build(child_) self.set_overwrite(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'rename': obj_ = ResolutionRename.factory() obj_.build(child_) self.set_rename(obj_) # end class Resolution class AgentCredentials: subclass = None superclass = None def __init__(self, host_credentials=None, agent_executable='', log_directory=''): self.host_credentials = host_credentials self.agent_executable = agent_executable self.log_directory = log_directory def factory(*args_, **kwargs_): if AgentCredentials.subclass: return AgentCredentials.subclass(*args_, **kwargs_) else: return AgentCredentials(*args_, **kwargs_) factory = staticmethod(factory) def get_host_credentials(self): return self.host_credentials def set_host_credentials(self, host_credentials): self.host_credentials = host_credentials def validate_HostCredentials(self, value): # validate type HostCredentials pass def get_agent_executable(self): return self.agent_executable def set_agent_executable(self, agent_executable): self.agent_executable = agent_executable def get_log_directory(self): return self.log_directory def set_log_directory(self, log_directory): self.log_directory = log_directory def export(self, outfile, level, namespace_='', name_='AgentCredentials'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='AgentCredentials') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='AgentCredentials'): pass def exportChildren(self, outfile, level, namespace_='', name_='AgentCredentials'): if self.get_host_credentials() != None : if self.host_credentials: self.host_credentials.export(outfile, level, namespace_, name_='host-credentials') if self.get_agent_executable() != None : if self.get_agent_executable() != "" : showIndent(outfile, level) outfile.write('<%sagent-executable>%s\n' % (namespace_, quote_xml(self.get_agent_executable()), namespace_)) if self.get_log_directory() != None : if self.get_log_directory() != "" : showIndent(outfile, level) outfile.write('<%slog-directory>%s\n' % (namespace_, quote_xml(self.get_log_directory()), namespace_)) def exportLiteral(self, outfile, level, name_='AgentCredentials'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.host_credentials: showIndent(outfile, level) outfile.write('host_credentials=HostCredentials(\n') self.host_credentials.exportLiteral(outfile, level, name_='host_credentials') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('agent_executable=%s,\n' % quote_python(self.get_agent_executable())) showIndent(outfile, level) outfile.write('log_directory=%s,\n' % quote_python(self.get_log_directory())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'host-credentials': obj_ = HostCredentials.factory() obj_.build(child_) self.set_host_credentials(obj_) self.validate_HostCredentials(self.host_credentials) # validate type HostCredentials elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'agent-executable': agent_executable_ = '' for text__content_ in child_.childNodes: agent_executable_ += text__content_.nodeValue self.agent_executable = agent_executable_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'log-directory': log_directory_ = '' for text__content_ in child_.childNodes: log_directory_ += text__content_.nodeValue self.log_directory = log_directory_ # end class AgentCredentials class agent_executable: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if agent_executable.subclass: return agent_executable.subclass(*args_, **kwargs_) else: return agent_executable(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='agent-executable'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='agent-executable') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='agent-executable'): pass def exportChildren(self, outfile, level, namespace_='', name_='agent-executable'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='agent-executable'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class agent_executable class log_directory: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if log_directory.subclass: return log_directory.subclass(*args_, **kwargs_) else: return log_directory(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='log-directory'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='log-directory') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='log-directory'): pass def exportChildren(self, outfile, level, namespace_='', name_='log-directory'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='log-directory'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class log_directory class HostCredentials: subclass = None superclass = None def __init__(self, remoting_type='', port='', login='', password='', hostname=''): self.remoting_type = remoting_type self.port = port self.login = login self.password = password self.hostname = hostname def factory(*args_, **kwargs_): if HostCredentials.subclass: return HostCredentials.subclass(*args_, **kwargs_) else: return HostCredentials(*args_, **kwargs_) factory = staticmethod(factory) def get_login(self): return self.login def set_login(self, login): self.login = login def get_password(self): return self.password def set_password(self, password): self.password = password def get_hostname(self): return self.hostname def set_hostname(self, hostname): self.hostname = hostname def get_remoting_type(self): return self.remoting_type def set_remoting_type(self, remoting_type): self.remoting_type = remoting_type def get_port(self): return self.port def set_port(self, port): self.port = port def export(self, outfile, level, namespace_='', name_='HostCredentials'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='HostCredentials') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='HostCredentials'): if self.get_remoting_type() is not None: outfile.write(' remoting-type="%s"' % (quote_attrib(self.get_remoting_type()), )) if self.get_port() is not None: outfile.write(' port="%s"' % (quote_attrib(self.get_port()), )) def exportChildren(self, outfile, level, namespace_='', name_='HostCredentials'): if self.get_login() != None : if self.get_login() != "" : showIndent(outfile, level) outfile.write('<%slogin>%s\n' % (namespace_, quote_xml(self.get_login()), namespace_)) if self.get_password() != None : if self.get_password() != "" : showIndent(outfile, level) outfile.write('<%spassword>%s\n' % (namespace_, quote_xml(self.get_password()), namespace_)) showIndent(outfile, level) outfile.write('<%shostname>%s\n' % (namespace_, quote_xml(self.get_hostname()), namespace_)) def exportLiteral(self, outfile, level, name_='HostCredentials'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('remoting_type = "%s",\n' % (self.get_remoting_type(),)) showIndent(outfile, level) outfile.write('port = "%s",\n' % (self.get_port(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('login=%s,\n' % quote_python(self.get_login())) showIndent(outfile, level) outfile.write('password=%s,\n' % quote_python(self.get_password())) showIndent(outfile, level) outfile.write('hostname=%s,\n' % quote_python(self.get_hostname())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('remoting-type'): self.remoting_type = attrs.get('remoting-type').value if attrs.get('port'): self.port = attrs.get('port').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'login': login_ = '' for text__content_ in child_.childNodes: login_ += text__content_.nodeValue self.login = login_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'password': password_ = '' for text__content_ in child_.childNodes: password_ += text__content_.nodeValue self.password = password_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'hostname': hostname_ = '' for text__content_ in child_.childNodes: hostname_ += text__content_.nodeValue self.hostname = hostname_ # end class HostCredentials class login: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if login.subclass: return login.subclass(*args_, **kwargs_) else: return login(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='login'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='login') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='login'): pass def exportChildren(self, outfile, level, namespace_='', name_='login'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='login'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class login class password: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if password.subclass: return password.subclass(*args_, **kwargs_) else: return password(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='password'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='password') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='password'): pass def exportChildren(self, outfile, level, namespace_='', name_='password'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='password'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class password class hostname: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if hostname.subclass: return hostname.subclass(*args_, **kwargs_) else: return hostname(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='hostname'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='hostname') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='hostname'): pass def exportChildren(self, outfile, level, namespace_='', name_='hostname'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='hostname'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class hostname class ControlPanelCredentials: subclass = None superclass = None def __init__(self, typexx='', url='', admin_login='', admin_password=''): self.typexx = typexx self.url = url self.admin_login = admin_login self.admin_password = admin_password def factory(*args_, **kwargs_): if ControlPanelCredentials.subclass: return ControlPanelCredentials.subclass(*args_, **kwargs_) else: return ControlPanelCredentials(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_url(self): return self.url def set_url(self, url): self.url = url def get_admin_login(self): return self.admin_login def set_admin_login(self, admin_login): self.admin_login = admin_login def get_admin_password(self): return self.admin_password def set_admin_password(self, admin_password): self.admin_password = admin_password def export(self, outfile, level, namespace_='', name_='ControlPanelCredentials'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ControlPanelCredentials') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ControlPanelCredentials'): pass def exportChildren(self, outfile, level, namespace_='', name_='ControlPanelCredentials'): showIndent(outfile, level) outfile.write('<%stype>%s\n' % (namespace_, quote_xml(self.get_type()), namespace_)) showIndent(outfile, level) outfile.write('<%surl>%s\n' % (namespace_, quote_xml(self.get_url()), namespace_)) showIndent(outfile, level) outfile.write('<%sadmin-login>%s\n' % (namespace_, quote_xml(self.get_admin_login()), namespace_)) showIndent(outfile, level) outfile.write('<%sadmin-password>%s\n' % (namespace_, quote_xml(self.get_admin_password()), namespace_)) def exportLiteral(self, outfile, level, name_='ControlPanelCredentials'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx=%s,\n' % quote_python(self.get_type())) showIndent(outfile, level) outfile.write('url=%s,\n' % quote_python(self.get_url())) showIndent(outfile, level) outfile.write('admin_login=%s,\n' % quote_python(self.get_admin_login())) showIndent(outfile, level) outfile.write('admin_password=%s,\n' % quote_python(self.get_admin_password())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': type_ = '' for text__content_ in child_.childNodes: type_ += text__content_.nodeValue self.typexx = type_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'url': url_ = '' for text__content_ in child_.childNodes: url_ += text__content_.nodeValue self.url = url_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'admin-login': admin_login_ = '' for text__content_ in child_.childNodes: admin_login_ += text__content_.nodeValue self.admin_login = admin_login_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'admin-password': admin_password_ = '' for text__content_ in child_.childNodes: admin_password_ += text__content_.nodeValue self.admin_password = admin_password_ # end class ControlPanelCredentials class url: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if url.subclass: return url.subclass(*args_, **kwargs_) else: return url(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='url'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='url') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='url'): pass def exportChildren(self, outfile, level, namespace_='', name_='url'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='url'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class url class admin_login: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if admin_login.subclass: return admin_login.subclass(*args_, **kwargs_) else: return admin_login(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='admin-login'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='admin-login') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='admin-login'): pass def exportChildren(self, outfile, level, namespace_='', name_='admin-login'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='admin-login'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class admin_login class admin_password: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if admin_password.subclass: return admin_password.subclass(*args_, **kwargs_) else: return admin_password(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='admin-password'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='admin-password') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='admin-password'): pass def exportChildren(self, outfile, level, namespace_='', name_='admin-password'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='admin-password'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class admin_password class SrcDstFilesSpecification: subclass = None superclass = None def __init__(self, guid='', typexx=None, src=None, dst=None): self.guid = guid self.typexx = typexx self.src = src self.dst = dst def factory(*args_, **kwargs_): if SrcDstFilesSpecification.subclass: return SrcDstFilesSpecification.subclass(*args_, **kwargs_) else: return SrcDstFilesSpecification(*args_, **kwargs_) factory = staticmethod(factory) def get_src(self): return self.src def set_src(self, src): self.src = src def get_dst(self): return self.dst def set_dst(self, dst): self.dst = dst def get_guid(self): return self.guid def set_guid(self, guid): self.guid = guid def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def export(self, outfile, level, namespace_='', name_='SrcDstFilesSpecification'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='SrcDstFilesSpecification') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='SrcDstFilesSpecification'): if self.get_guid() is not None: outfile.write(' guid="%s"' % (quote_attrib(self.get_guid()), )) if self.get_type() is not None: outfile.write(' type="%s"' % str(self.get_type())) def exportChildren(self, outfile, level, namespace_='', name_='SrcDstFilesSpecification'): if self.src: self.src.export(outfile, level, namespace_, name_='src', ) if self.dst: self.dst.export(outfile, level, namespace_, name_='dst', ) def exportLiteral(self, outfile, level, name_='SrcDstFilesSpecification'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('guid = "%s",\n' % (self.get_guid(),)) showIndent(outfile, level) outfile.write('typexx = "%s",\n' % (self.get_type(),)) def exportLiteralChildren(self, outfile, level, name_): if self.src: showIndent(outfile, level) outfile.write('src=DumpSpecification(\n') self.src.exportLiteral(outfile, level, name_='src') showIndent(outfile, level) outfile.write('),\n') if self.dst: showIndent(outfile, level) outfile.write('dst=DumpSpecification(\n') self.dst.exportLiteral(outfile, level, name_='dst') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('guid'): self.guid = attrs.get('guid').value if attrs.get('type'): self.typexx = attrs.get('type').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'src': obj_ = DumpSpecification.factory() obj_.build(child_) self.set_src(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dst': obj_ = DumpSpecification.factory() obj_.build(child_) self.set_dst(obj_) # end class SrcDstFilesSpecification class DumpSpecification: subclass = None superclass = None def __init__(self, dumps_storage_credentials=None, name_of_info_xml_file=''): self.dumps_storage_credentials = dumps_storage_credentials self.name_of_info_xml_file = name_of_info_xml_file def factory(*args_, **kwargs_): if DumpSpecification.subclass: return DumpSpecification.subclass(*args_, **kwargs_) else: return DumpSpecification(*args_, **kwargs_) factory = staticmethod(factory) def get_dumps_storage_credentials(self): return self.dumps_storage_credentials def set_dumps_storage_credentials(self, dumps_storage_credentials): self.dumps_storage_credentials = dumps_storage_credentials def validate_DumpsStorageCredentials(self, value): # validate type DumpsStorageCredentials pass def get_name_of_info_xml_file(self): return self.name_of_info_xml_file def set_name_of_info_xml_file(self, name_of_info_xml_file): self.name_of_info_xml_file = name_of_info_xml_file def export(self, outfile, level, namespace_='', name_='DumpSpecification'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpSpecification') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpSpecification'): pass def exportChildren(self, outfile, level, namespace_='', name_='DumpSpecification'): if self.dumps_storage_credentials: self.dumps_storage_credentials.export(outfile, level, namespace_, name_='dumps-storage-credentials', ) if self.get_name_of_info_xml_file() != None : if self.get_name_of_info_xml_file() != "" : showIndent(outfile, level) outfile.write('<%sname-of-info-xml-file>%s\n' % (namespace_, quote_xml(self.get_name_of_info_xml_file()), namespace_)) def exportLiteral(self, outfile, level, name_='DumpSpecification'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.dumps_storage_credentials: showIndent(outfile, level) outfile.write('dumps_storage_credentials=DumpsStorageCredentials(\n') self.dumps_storage_credentials.exportLiteral(outfile, level, name_='dumps_storage_credentials') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('name_of_info_xml_file=%s,\n' % quote_python(self.get_name_of_info_xml_file())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dumps-storage-credentials': obj_ = DumpsStorageCredentials.factory() obj_.build(child_) self.set_dumps_storage_credentials(obj_) self.validate_DumpsStorageCredentials(self.dumps_storage_credentials) # validate type DumpsStorageCredentials elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name-of-info-xml-file': name_of_info_xml_file_ = '' for text__content_ in child_.childNodes: name_of_info_xml_file_ += text__content_.nodeValue self.name_of_info_xml_file = name_of_info_xml_file_ # end class DumpSpecification class DumpsStorageCredentials: subclass = None superclass = None def __init__(self, storage_type='', use_passive_ftp_mode=None, use_ftps=None, login='', password='', hostname='', root_dir='', file_name='', backup_password='', backup_password_plain='', ignore_backup_password='', ignore_backup_sign=''): self.storage_type = storage_type self.use_passive_ftp_mode = use_passive_ftp_mode self.use_ftps = use_ftps self.login = login self.password = password self.hostname = hostname self.root_dir = root_dir self.file_name = file_name self.backup_password = backup_password self.backup_password_plain = backup_password_plain self.ignore_backup_password = ignore_backup_password self.ignore_backup_sign = ignore_backup_sign def factory(*args_, **kwargs_): if DumpsStorageCredentials.subclass: return DumpsStorageCredentials.subclass(*args_, **kwargs_) else: return DumpsStorageCredentials(*args_, **kwargs_) factory = staticmethod(factory) def get_login(self): return self.login def set_login(self, login): self.login = login def get_password(self): return self.password def set_password(self, password): self.password = password def get_hostname(self): return self.hostname def set_hostname(self, hostname): self.hostname = hostname def get_root_dir(self): return self.root_dir def set_root_dir(self, root_dir): self.root_dir = root_dir def get_file_name(self): return self.file_name def set_file_name(self, file_name): self.file_name = file_name def get_backup_password(self): return self.backup_password def set_backup_password(self, backup_password): self.backup_password = backup_password def get_backup_password_plain(self): return self.backup_password_plain def set_backup_password_plain(self, backup_password_plain): self.backup_password_plain = backup_password_plain def get_ignore_backup_password(self): return self.ignore_backup_password def set_ignore_backup_password(self, ignore_backup_password): self.ignore_backup_password = ignore_backup_password def validate_ignore_backup_password(self, value): # validate type ignore_backup_password pass def get_ignore_backup_sign(self): return self.ignore_backup_sign def set_ignore_backup_sign(self, ignore_backup_sign): self.ignore_backup_sign = ignore_backup_sign def validate_ignore_backup_sign(self, value): # validate type ignore_backup_sign pass def get_storage_type(self): return self.storage_type def set_storage_type(self, storage_type): self.storage_type = storage_type def get_use_passive_ftp_mode(self): return self.use_passive_ftp_mode def set_use_passive_ftp_mode(self, use_passive_ftp_mode): self.use_passive_ftp_mode = use_passive_ftp_mode def get_use_ftps(self): return self.use_ftps def set_use_ftps(self, use_ftps): self.use_ftps = use_ftps def export(self, outfile, level, namespace_='', name_='DumpsStorageCredentials'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DumpsStorageCredentials') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DumpsStorageCredentials'): if self.get_storage_type() is not None: outfile.write(' storage-type="%s"' % (quote_attrib(self.get_storage_type()), )) if self.get_use_passive_ftp_mode() is not None: outfile.write(' use-passive-ftp-mode="%s"' % str(self.get_use_passive_ftp_mode())) if self.get_use_ftps() is not None: outfile.write(' use-ftps="%s"' % str(self.get_use_ftps())) def exportChildren(self, outfile, level, namespace_='', name_='DumpsStorageCredentials'): if self.get_login() != None : if self.get_login() != "" : showIndent(outfile, level) outfile.write('<%slogin>%s\n' % (namespace_, quote_xml(self.get_login()), namespace_)) if self.get_password() != None : if self.get_password() != "" : showIndent(outfile, level) outfile.write('<%spassword>%s\n' % (namespace_, quote_xml(self.get_password()), namespace_)) if self.get_hostname() != None : if self.get_hostname() != "" : showIndent(outfile, level) outfile.write('<%shostname>%s\n' % (namespace_, quote_xml(self.get_hostname()), namespace_)) showIndent(outfile, level) outfile.write('<%sroot-dir>%s\n' % (namespace_, quote_xml(self.get_root_dir()), namespace_)) if self.get_file_name() != None : if self.get_file_name() != "" : showIndent(outfile, level) outfile.write('<%sfile-name>%s\n' % (namespace_, quote_xml(self.get_file_name()), namespace_)) if self.get_backup_password() != None : if self.get_backup_password() != "" : showIndent(outfile, level) outfile.write('<%sbackup-password>%s\n' % (namespace_, quote_xml(self.get_backup_password()), namespace_)) if self.get_backup_password_plain() != None : if self.get_backup_password_plain() != "" : showIndent(outfile, level) outfile.write('<%sbackup-password-plain>%s\n' % (namespace_, quote_xml(self.get_backup_password_plain()), namespace_)) if self.get_ignore_backup_password() != None : if self.get_ignore_backup_password() != "" : showIndent(outfile, level) outfile.write('<%signore-backup-password>%s\n' % (namespace_, quote_xml(self.get_ignore_backup_password()), namespace_)) if self.get_ignore_backup_sign() != None : if self.get_ignore_backup_sign() != "" : showIndent(outfile, level) outfile.write('<%signore-backup-sign>%s\n' % (namespace_, quote_xml(self.get_ignore_backup_sign()), namespace_)) def exportLiteral(self, outfile, level, name_='DumpsStorageCredentials'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('storage_type = "%s",\n' % (self.get_storage_type(),)) showIndent(outfile, level) outfile.write('use_passive_ftp_mode = "%s",\n' % (self.get_use_passive_ftp_mode(),)) showIndent(outfile, level) outfile.write('use_ftps = "%s",\n' % (self.get_use_ftps(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('login=%s,\n' % quote_python(self.get_login())) showIndent(outfile, level) outfile.write('password=%s,\n' % quote_python(self.get_password())) showIndent(outfile, level) outfile.write('hostname=%s,\n' % quote_python(self.get_hostname())) showIndent(outfile, level) outfile.write('root_dir=%s,\n' % quote_python(self.get_root_dir())) showIndent(outfile, level) outfile.write('file_name=%s,\n' % quote_python(self.get_file_name())) showIndent(outfile, level) outfile.write('backup_password=%s,\n' % quote_python(self.get_backup_password())) showIndent(outfile, level) outfile.write('backup_password_plain=%s,\n' % quote_python(self.get_backup_password_plain())) showIndent(outfile, level) outfile.write('ignore_backup_password=%s,\n' % quote_python(self.get_ignore_backup_password())) showIndent(outfile, level) outfile.write('ignore_backup_sign=%s,\n' % quote_python(self.get_ignore_backup_sign())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('storage-type'): self.storage_type = attrs.get('storage-type').value if attrs.get('use-passive-ftp-mode'): self.use_passive_ftp_mode = attrs.get('use-passive-ftp-mode').value if attrs.get('use-ftps'): self.use_ftps = attrs.get('use-ftps').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'login': login_ = '' for text__content_ in child_.childNodes: login_ += text__content_.nodeValue self.login = login_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'password': password_ = '' for text__content_ in child_.childNodes: password_ += text__content_.nodeValue self.password = password_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'hostname': hostname_ = '' for text__content_ in child_.childNodes: hostname_ += text__content_.nodeValue self.hostname = hostname_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'root-dir': root_dir_ = '' for text__content_ in child_.childNodes: root_dir_ += text__content_.nodeValue self.root_dir = root_dir_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'file-name': file_name_ = '' for text__content_ in child_.childNodes: file_name_ += text__content_.nodeValue self.file_name = file_name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'backup-password': backup_password_ = '' for text__content_ in child_.childNodes: backup_password_ += text__content_.nodeValue self.backup_password = backup_password_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'backup-password-plain': backup_password_plain_ = '' for text__content_ in child_.childNodes: backup_password_plain_ += text__content_.nodeValue self.backup_password_plain = backup_password_plain_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'ignore-backup-password': ignore_backup_password_ = '' for text__content_ in child_.childNodes: ignore_backup_password_ += text__content_.nodeValue self.ignore_backup_password = ignore_backup_password_ self.validate_ignore_backup_password(self.ignore_backup_password) # validate type ignore_backup_password elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'ignore-backup-sign': ignore_backup_sign_ = '' for text__content_ in child_.childNodes: ignore_backup_sign_ += text__content_.nodeValue self.ignore_backup_sign = ignore_backup_sign_ self.validate_ignore_backup_sign(self.ignore_backup_sign) # validate type ignore_backup_sign # end class DumpsStorageCredentials class root_dir: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if root_dir.subclass: return root_dir.subclass(*args_, **kwargs_) else: return root_dir(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='root-dir'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='root-dir') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='root-dir'): pass def exportChildren(self, outfile, level, namespace_='', name_='root-dir'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='root-dir'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class root_dir class file_name: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if file_name.subclass: return file_name.subclass(*args_, **kwargs_) else: return file_name(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='file-name'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='file-name') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='file-name'): pass def exportChildren(self, outfile, level, namespace_='', name_='file-name'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='file-name'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class file_name class IpPairType: subclass = None superclass = None def __init__(self, source='', source_ftps='', destination=''): self.source = source self.source_ftps = source_ftps self.destination = destination def factory(*args_, **kwargs_): if IpPairType.subclass: return IpPairType.subclass(*args_, **kwargs_) else: return IpPairType(*args_, **kwargs_) factory = staticmethod(factory) def get_source(self): return self.source def set_source(self, source): self.source = source def get_source_ftps(self): return self.source_ftps def set_source_ftps(self, source_ftps): self.source_ftps = source_ftps def get_destination(self): return self.destination def set_destination(self, destination): self.destination = destination def export(self, outfile, level, namespace_='', name_='IpPairType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='IpPairType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='IpPairType'): pass def exportChildren(self, outfile, level, namespace_='', name_='IpPairType'): showIndent(outfile, level) outfile.write('<%ssource>%s\n' % (namespace_, quote_xml(self.get_source()), namespace_)) if self.get_source_ftps() != None : if self.get_source_ftps() != "" : showIndent(outfile, level) outfile.write('<%ssource-ftps>%s\n' % (namespace_, quote_xml(self.get_source_ftps()), namespace_)) if self.get_destination() != None : if self.get_destination() != "" : showIndent(outfile, level) outfile.write('<%sdestination>%s\n' % (namespace_, quote_xml(self.get_destination()), namespace_)) def exportLiteral(self, outfile, level, name_='IpPairType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('source=%s,\n' % quote_python(self.get_source())) showIndent(outfile, level) outfile.write('source_ftps=%s,\n' % quote_python(self.get_source_ftps())) showIndent(outfile, level) outfile.write('destination=%s,\n' % quote_python(self.get_destination())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'source': source_ = '' for text__content_ in child_.childNodes: source_ += text__content_.nodeValue self.source = source_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'source-ftps': source_ftps_ = '' for text__content_ in child_.childNodes: source_ftps_ += text__content_.nodeValue self.source_ftps = source_ftps_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'destination': destination_ = '' for text__content_ in child_.childNodes: destination_ += text__content_.nodeValue self.destination = destination_ # end class IpPairType class IPMapping: subclass = None superclass = None def __init__(self, ftps_policy=None, shared=None, exclusive=None): self.ftps_policy = ftps_policy if shared is None: self.shared = [] else: self.shared = shared if exclusive is None: self.exclusive = [] else: self.exclusive = exclusive def factory(*args_, **kwargs_): if IPMapping.subclass: return IPMapping.subclass(*args_, **kwargs_) else: return IPMapping(*args_, **kwargs_) factory = staticmethod(factory) def get_shared(self): return self.shared def set_shared(self, shared): self.shared = shared def add_shared(self, value): self.shared.append(value) def insert_shared(self, index, value): self.shared[index] = value def get_exclusive(self): return self.exclusive def set_exclusive(self, exclusive): self.exclusive = exclusive def add_exclusive(self, value): self.exclusive.append(value) def insert_exclusive(self, index, value): self.exclusive[index] = value def get_ftps_policy(self): return self.ftps_policy def set_ftps_policy(self, ftps_policy): self.ftps_policy = ftps_policy def export(self, outfile, level, namespace_='', name_='IPMapping'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='IPMapping') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='IPMapping'): if self.get_ftps_policy() is not None: outfile.write(' ftps-policy="%s"' % str(self.get_ftps_policy())) def exportChildren(self, outfile, level, namespace_='', name_='IPMapping'): for shared_ in self.get_shared(): shared_.export(outfile, level, namespace_, name_='shared') for exclusive_ in self.get_exclusive(): exclusive_.export(outfile, level, namespace_, name_='exclusive') def exportLiteral(self, outfile, level, name_='IPMapping'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('ftps_policy = "%s",\n' % (self.get_ftps_policy(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('shared=[\n') level += 1 for shared in self.shared: showIndent(outfile, level) outfile.write('IpPairType(\n') shared.exportLiteral(outfile, level, name_='shared') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('exclusive=[\n') level += 1 for exclusive in self.exclusive: showIndent(outfile, level) outfile.write('IpPairType(\n') exclusive.exportLiteral(outfile, level, name_='exclusive') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('ftps-policy'): self.ftps_policy = attrs.get('ftps-policy').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'shared': obj_ = IpPairType.factory() obj_.build(child_) self.shared.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'exclusive': obj_ = IpPairType.factory() obj_.build(child_) self.exclusive.append(obj_) # end class IPMapping class OwnerMapOwner: subclass = None superclass = None def __init__(self, guid=''): self.guid = guid def factory(*args_, **kwargs_): if OwnerMapOwner.subclass: return OwnerMapOwner.subclass(*args_, **kwargs_) else: return OwnerMapOwner(*args_, **kwargs_) factory = staticmethod(factory) def get_guid(self): return self.guid def set_guid(self, guid): self.guid = guid def export(self, outfile, level, namespace_='', name_='OwnerMapOwner'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='OwnerMapOwner') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='OwnerMapOwner'): pass def exportChildren(self, outfile, level, namespace_='', name_='OwnerMapOwner'): showIndent(outfile, level) outfile.write('<%sguid>%s\n' % (namespace_, quote_xml(self.get_guid()), namespace_)) def exportLiteral(self, outfile, level, name_='OwnerMapOwner'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('guid=%s,\n' % quote_python(self.get_guid())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'guid': guid_ = '' for text__content_ in child_.childNodes: guid_ += text__content_.nodeValue self.guid = guid_ # end class OwnerMapOwner class OwnerMapChild: subclass = None superclass = None def __init__(self, typexx='', name=''): self.typexx = typexx self.name = name def factory(*args_, **kwargs_): if OwnerMapChild.subclass: return OwnerMapChild.subclass(*args_, **kwargs_) else: return OwnerMapChild(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def validate_type(self, value): # validate type type pass def get_name(self): return self.name def set_name(self, name): self.name = name def export(self, outfile, level, namespace_='', name_='OwnerMapChild'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='OwnerMapChild') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='OwnerMapChild'): pass def exportChildren(self, outfile, level, namespace_='', name_='OwnerMapChild'): showIndent(outfile, level) outfile.write('<%stype>%s\n' % (namespace_, quote_xml(self.get_type()), namespace_)) if self.get_name() != None : if self.get_name() != "" : showIndent(outfile, level) outfile.write('<%sname>%s\n' % (namespace_, quote_xml(self.get_name()), namespace_)) def exportLiteral(self, outfile, level, name_='OwnerMapChild'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx=%s,\n' % quote_python(self.get_type())) showIndent(outfile, level) outfile.write('name=%s,\n' % quote_python(self.get_name())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': type_ = '' for text__content_ in child_.childNodes: type_ += text__content_.nodeValue self.typexx = type_ self.validate_type(self.typexx) # validate type type elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ # end class OwnerMapChild class SetOwner: subclass = None superclass = None def __init__(self, owner=None, child=None): self.owner = owner if child is None: self.child = [] else: self.child = child def factory(*args_, **kwargs_): if SetOwner.subclass: return SetOwner.subclass(*args_, **kwargs_) else: return SetOwner(*args_, **kwargs_) factory = staticmethod(factory) def get_owner(self): return self.owner def set_owner(self, owner): self.owner = owner def get_child(self): return self.child def set_child(self, child): self.child = child def add_child(self, value): self.child.append(value) def insert_child(self, index, value): self.child[index] = value def export(self, outfile, level, namespace_='', name_='SetOwner'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='SetOwner') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='SetOwner'): pass def exportChildren(self, outfile, level, namespace_='', name_='SetOwner'): if self.owner: self.owner.export(outfile, level, namespace_, name_='owner', ) for child_ in self.get_child(): child_.export(outfile, level, namespace_, name_='child') def exportLiteral(self, outfile, level, name_='SetOwner'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.owner: showIndent(outfile, level) outfile.write('owner=OwnerMapOwner(\n') self.owner.exportLiteral(outfile, level, name_='owner') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('child=[\n') level += 1 for child in self.child: showIndent(outfile, level) outfile.write('OwnerMapChild(\n') child.exportLiteral(outfile, level, name_='child') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'owner': obj_ = OwnerMapOwner.factory() obj_.build(child_) self.set_owner(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'child': obj_ = OwnerMapChild.factory() obj_.build(child_) self.child.append(obj_) # end class SetOwner class OwnersMapping: subclass = None superclass = None def __init__(self, set_owner=None): if set_owner is None: self.set_owner = [] else: self.set_owner = set_owner def factory(*args_, **kwargs_): if OwnersMapping.subclass: return OwnersMapping.subclass(*args_, **kwargs_) else: return OwnersMapping(*args_, **kwargs_) factory = staticmethod(factory) def get_set_owner(self): return self.set_owner def set_set_owner(self, set_owner): self.set_owner = set_owner def add_set_owner(self, value): self.set_owner.append(value) def insert_set_owner(self, index, value): self.set_owner[index] = value def export(self, outfile, level, namespace_='', name_='OwnersMapping'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='OwnersMapping') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='OwnersMapping'): pass def exportChildren(self, outfile, level, namespace_='', name_='OwnersMapping'): for set_owner_ in self.get_set_owner(): set_owner_.export(outfile, level, namespace_, name_='set-owner') def exportLiteral(self, outfile, level, name_='OwnersMapping'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('set_owner=[\n') level += 1 for set_owner in self.set_owner: showIndent(outfile, level) outfile.write('SetOwner(\n') set_owner.exportLiteral(outfile, level, name_='set_owner') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'set-owner': obj_ = SetOwner.factory() obj_.build(child_) self.set_owner.append(obj_) # end class OwnersMapping class DBMappingPair: subclass = None superclass = None def __init__(self, source=None, destination=None): self.source = source self.destination = destination def factory(*args_, **kwargs_): if DBMappingPair.subclass: return DBMappingPair.subclass(*args_, **kwargs_) else: return DBMappingPair(*args_, **kwargs_) factory = staticmethod(factory) def get_source(self): return self.source def set_source(self, source): self.source = source def get_destination(self): return self.destination def set_destination(self, destination): self.destination = destination def export(self, outfile, level, namespace_='', name_='DBMappingPair'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DBMappingPair') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DBMappingPair'): pass def exportChildren(self, outfile, level, namespace_='', name_='DBMappingPair'): if self.source: self.source.export(outfile, level, namespace_, name_='source', ) if self.destination: self.destination.export(outfile, level, namespace_, name_='destination', ) def exportLiteral(self, outfile, level, name_='DBMappingPair'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.source: showIndent(outfile, level) outfile.write('source=DbServer(\n') self.source.exportLiteral(outfile, level, name_='source') showIndent(outfile, level) outfile.write('),\n') if self.destination: showIndent(outfile, level) outfile.write('destination=DbServer(\n') self.destination.exportLiteral(outfile, level, name_='destination') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'source': obj_ = DbServer.factory() obj_.build(child_) self.set_source(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'destination': obj_ = DbServer.factory() obj_.build(child_) self.set_destination(obj_) # end class DBMappingPair class DBMapping: subclass = None superclass = None def __init__(self, mapping=None): if mapping is None: self.mapping = [] else: self.mapping = mapping def factory(*args_, **kwargs_): if DBMapping.subclass: return DBMapping.subclass(*args_, **kwargs_) else: return DBMapping(*args_, **kwargs_) factory = staticmethod(factory) def get_mapping(self): return self.mapping def set_mapping(self, mapping): self.mapping = mapping def add_mapping(self, value): self.mapping.append(value) def insert_mapping(self, index, value): self.mapping[index] = value def export(self, outfile, level, namespace_='', name_='DBMapping'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='DBMapping') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='DBMapping'): pass def exportChildren(self, outfile, level, namespace_='', name_='DBMapping'): for mapping_ in self.get_mapping(): mapping_.export(outfile, level, namespace_, name_='mapping') def exportLiteral(self, outfile, level, name_='DBMapping'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('mapping=[\n') level += 1 for mapping in self.mapping: showIndent(outfile, level) outfile.write('DBMappingPair(\n') mapping.exportLiteral(outfile, level, name_='mapping') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'mapping': obj_ = DBMappingPair.factory() obj_.build(child_) self.mapping.append(obj_) # end class DBMapping class UsedComponentType: subclass = None superclass = None def __init__(self, name='', version='', mode=''): self.name = name self.version = version self.mode = mode def factory(*args_, **kwargs_): if UsedComponentType.subclass: return UsedComponentType.subclass(*args_, **kwargs_) else: return UsedComponentType(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_version(self): return self.version def set_version(self, version): self.version = version def get_mode(self): return self.mode def set_mode(self, mode): self.mode = mode def export(self, outfile, level, namespace_='', name_='UsedComponentType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='UsedComponentType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='UsedComponentType'): pass def exportChildren(self, outfile, level, namespace_='', name_='UsedComponentType'): showIndent(outfile, level) outfile.write('<%sname>%s\n' % (namespace_, quote_xml(self.get_name()), namespace_)) if self.get_version() != None : if self.get_version() != "" : showIndent(outfile, level) outfile.write('<%sversion>%s\n' % (namespace_, quote_xml(self.get_version()), namespace_)) if self.get_mode() != None : if self.get_mode() != "" : showIndent(outfile, level) outfile.write('<%smode>%s\n' % (namespace_, quote_xml(self.get_mode()), namespace_)) def exportLiteral(self, outfile, level, name_='UsedComponentType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name=%s,\n' % quote_python(self.get_name())) showIndent(outfile, level) outfile.write('version=%s,\n' % quote_python(self.get_version())) showIndent(outfile, level) outfile.write('mode=%s,\n' % quote_python(self.get_mode())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'version': version_ = '' for text__content_ in child_.childNodes: version_ += text__content_.nodeValue self.version = version_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'mode': mode_ = '' for text__content_ in child_.childNodes: mode_ += text__content_.nodeValue self.mode = mode_ # end class UsedComponentType class version: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if version.subclass: return version.subclass(*args_, **kwargs_) else: return version(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='version'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='version') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='version'): pass def exportChildren(self, outfile, level, namespace_='', name_='version'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='version'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class version class mode: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if mode.subclass: return mode.subclass(*args_, **kwargs_) else: return mode(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='mode'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='mode') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='mode'): pass def exportChildren(self, outfile, level, namespace_='', name_='mode'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='mode'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class mode class ResourceUsageType: subclass = None superclass = None def __init__(self, component=None, hosting_disk_usage='', mail_disk_usage='', db_disk_usage='', domain_aliases='', mail_accounts='', web_users='', maillists=''): if component is None: self.component = [] else: self.component = component self.hosting_disk_usage = hosting_disk_usage self.mail_disk_usage = mail_disk_usage self.db_disk_usage = db_disk_usage self.domain_aliases = domain_aliases self.mail_accounts = mail_accounts self.web_users = web_users self.maillists = maillists def factory(*args_, **kwargs_): if ResourceUsageType.subclass: return ResourceUsageType.subclass(*args_, **kwargs_) else: return ResourceUsageType(*args_, **kwargs_) factory = staticmethod(factory) def get_component(self): return self.component def set_component(self, component): self.component = component def add_component(self, value): self.component.append(value) def insert_component(self, index, value): self.component[index] = value def get_hosting_disk_usage(self): return self.hosting_disk_usage def set_hosting_disk_usage(self, hosting_disk_usage): self.hosting_disk_usage = hosting_disk_usage def get_mail_disk_usage(self): return self.mail_disk_usage def set_mail_disk_usage(self, mail_disk_usage): self.mail_disk_usage = mail_disk_usage def get_db_disk_usage(self): return self.db_disk_usage def set_db_disk_usage(self, db_disk_usage): self.db_disk_usage = db_disk_usage def get_domain_aliases(self): return self.domain_aliases def set_domain_aliases(self, domain_aliases): self.domain_aliases = domain_aliases def get_mail_accounts(self): return self.mail_accounts def set_mail_accounts(self, mail_accounts): self.mail_accounts = mail_accounts def get_web_users(self): return self.web_users def set_web_users(self, web_users): self.web_users = web_users def get_maillists(self): return self.maillists def set_maillists(self, maillists): self.maillists = maillists def export(self, outfile, level, namespace_='', name_='ResourceUsageType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResourceUsageType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResourceUsageType'): pass def exportChildren(self, outfile, level, namespace_='', name_='ResourceUsageType'): for component_ in self.get_component(): component_.export(outfile, level, namespace_, name_='component') if self.get_hosting_disk_usage() != None : if self.get_hosting_disk_usage() != "" : showIndent(outfile, level) outfile.write('<%shosting-disk-usage>%s\n' % (namespace_, quote_xml(self.get_hosting_disk_usage()), namespace_)) if self.get_mail_disk_usage() != None : if self.get_mail_disk_usage() != "" : showIndent(outfile, level) outfile.write('<%smail-disk-usage>%s\n' % (namespace_, quote_xml(self.get_mail_disk_usage()), namespace_)) if self.get_db_disk_usage() != None : if self.get_db_disk_usage() != "" : showIndent(outfile, level) outfile.write('<%sdb-disk-usage>%s\n' % (namespace_, quote_xml(self.get_db_disk_usage()), namespace_)) if self.get_domain_aliases() != None : if self.get_domain_aliases() != "" : showIndent(outfile, level) outfile.write('<%sdomain-aliases>%s\n' % (namespace_, quote_xml(self.get_domain_aliases()), namespace_)) if self.get_mail_accounts() != None : if self.get_mail_accounts() != "" : showIndent(outfile, level) outfile.write('<%smail-accounts>%s\n' % (namespace_, quote_xml(self.get_mail_accounts()), namespace_)) if self.get_web_users() != None : if self.get_web_users() != "" : showIndent(outfile, level) outfile.write('<%sweb-users>%s\n' % (namespace_, quote_xml(self.get_web_users()), namespace_)) if self.get_maillists() != None : if self.get_maillists() != "" : showIndent(outfile, level) outfile.write('<%smaillists>%s\n' % (namespace_, quote_xml(self.get_maillists()), namespace_)) def exportLiteral(self, outfile, level, name_='ResourceUsageType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('component=[\n') level += 1 for component in self.component: showIndent(outfile, level) outfile.write('UsedComponentType(\n') component.exportLiteral(outfile, level, name_='component') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('hosting_disk_usage=%s,\n' % quote_python(self.get_hosting_disk_usage())) showIndent(outfile, level) outfile.write('mail_disk_usage=%s,\n' % quote_python(self.get_mail_disk_usage())) showIndent(outfile, level) outfile.write('db_disk_usage=%s,\n' % quote_python(self.get_db_disk_usage())) showIndent(outfile, level) outfile.write('domain_aliases=%s,\n' % quote_python(self.get_domain_aliases())) showIndent(outfile, level) outfile.write('mail_accounts=%s,\n' % quote_python(self.get_mail_accounts())) showIndent(outfile, level) outfile.write('web_users=%s,\n' % quote_python(self.get_web_users())) showIndent(outfile, level) outfile.write('maillists=%s,\n' % quote_python(self.get_maillists())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'component': obj_ = UsedComponentType.factory() obj_.build(child_) self.component.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'hosting-disk-usage': hosting_disk_usage_ = '' for text__content_ in child_.childNodes: hosting_disk_usage_ += text__content_.nodeValue self.hosting_disk_usage = hosting_disk_usage_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'mail-disk-usage': mail_disk_usage_ = '' for text__content_ in child_.childNodes: mail_disk_usage_ += text__content_.nodeValue self.mail_disk_usage = mail_disk_usage_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'db-disk-usage': db_disk_usage_ = '' for text__content_ in child_.childNodes: db_disk_usage_ += text__content_.nodeValue self.db_disk_usage = db_disk_usage_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'domain-aliases': domain_aliases_ = '' for text__content_ in child_.childNodes: domain_aliases_ += text__content_.nodeValue self.domain_aliases = domain_aliases_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'mail-accounts': mail_accounts_ = '' for text__content_ in child_.childNodes: mail_accounts_ += text__content_.nodeValue self.mail_accounts = mail_accounts_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'web-users': web_users_ = '' for text__content_ in child_.childNodes: web_users_ += text__content_.nodeValue self.web_users = web_users_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'maillists': maillists_ = '' for text__content_ in child_.childNodes: maillists_ += text__content_.nodeValue self.maillists = maillists_ # end class ResourceUsageType class hosting_disk_usage: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if hosting_disk_usage.subclass: return hosting_disk_usage.subclass(*args_, **kwargs_) else: return hosting_disk_usage(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='hosting-disk-usage'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='hosting-disk-usage') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='hosting-disk-usage'): pass def exportChildren(self, outfile, level, namespace_='', name_='hosting-disk-usage'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='hosting-disk-usage'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class hosting_disk_usage class mail_disk_usage: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if mail_disk_usage.subclass: return mail_disk_usage.subclass(*args_, **kwargs_) else: return mail_disk_usage(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='mail-disk-usage'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='mail-disk-usage') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='mail-disk-usage'): pass def exportChildren(self, outfile, level, namespace_='', name_='mail-disk-usage'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='mail-disk-usage'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class mail_disk_usage class db_disk_usage: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if db_disk_usage.subclass: return db_disk_usage.subclass(*args_, **kwargs_) else: return db_disk_usage(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='db-disk-usage'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='db-disk-usage') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='db-disk-usage'): pass def exportChildren(self, outfile, level, namespace_='', name_='db-disk-usage'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='db-disk-usage'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class db_disk_usage class domain_aliases: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if domain_aliases.subclass: return domain_aliases.subclass(*args_, **kwargs_) else: return domain_aliases(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='domain-aliases'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='domain-aliases') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='domain-aliases'): pass def exportChildren(self, outfile, level, namespace_='', name_='domain-aliases'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='domain-aliases'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class domain_aliases class mail_accounts: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if mail_accounts.subclass: return mail_accounts.subclass(*args_, **kwargs_) else: return mail_accounts(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='mail-accounts'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='mail-accounts') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='mail-accounts'): pass def exportChildren(self, outfile, level, namespace_='', name_='mail-accounts'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='mail-accounts'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class mail_accounts class web_users: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if web_users.subclass: return web_users.subclass(*args_, **kwargs_) else: return web_users(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='web-users'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='web-users') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='web-users'): pass def exportChildren(self, outfile, level, namespace_='', name_='web-users'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='web-users'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class web_users class maillists: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if maillists.subclass: return maillists.subclass(*args_, **kwargs_) else: return maillists(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='maillists'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='maillists') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='maillists'): pass def exportChildren(self, outfile, level, namespace_='', name_='maillists'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='maillists'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class maillists class ResourceUsageDbServerType: subclass = None superclass = None def __init__(self, typexx='', version=''): self.typexx = typexx self.version = version def factory(*args_, **kwargs_): if ResourceUsageDbServerType.subclass: return ResourceUsageDbServerType.subclass(*args_, **kwargs_) else: return ResourceUsageDbServerType(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_version(self): return self.version def set_version(self, version): self.version = version def export(self, outfile, level, namespace_='', name_='ResourceUsageDbServerType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ResourceUsageDbServerType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ResourceUsageDbServerType'): pass def exportChildren(self, outfile, level, namespace_='', name_='ResourceUsageDbServerType'): showIndent(outfile, level) outfile.write('<%stype>%s\n' % (namespace_, quote_xml(self.get_type()), namespace_)) if self.get_version() != None : if self.get_version() != "" : showIndent(outfile, level) outfile.write('<%sversion>%s\n' % (namespace_, quote_xml(self.get_version()), namespace_)) def exportLiteral(self, outfile, level, name_='ResourceUsageDbServerType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx=%s,\n' % quote_python(self.get_type())) showIndent(outfile, level) outfile.write('version=%s,\n' % quote_python(self.get_version())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': type_ = '' for text__content_ in child_.childNodes: type_ += text__content_.nodeValue self.typexx = type_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'version': version_ = '' for text__content_ in child_.childNodes: version_ += text__content_.nodeValue self.version = version_ # end class ResourceUsageDbServerType class InformationType: subclass = None superclass = None def __init__(self, message=None): if message is None: self.message = [] else: self.message = message def factory(*args_, **kwargs_): if InformationType.subclass: return InformationType.subclass(*args_, **kwargs_) else: return InformationType(*args_, **kwargs_) factory = staticmethod(factory) def get_message(self): return self.message def set_message(self, message): self.message = message def add_message(self, value): self.message.append(value) def insert_message(self, index, value): self.message[index] = value def validate_InformationMessageType(self, value): # validate type InformationMessageType pass def export(self, outfile, level, namespace_='', name_='InformationType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='InformationType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='InformationType'): pass def exportChildren(self, outfile, level, namespace_='', name_='InformationType'): for message_ in self.get_message(): message_.export(outfile, level, namespace_, name_='message') def exportLiteral(self, outfile, level, name_='InformationType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('message=[\n') level += 1 for message in self.message: showIndent(outfile, level) outfile.write('InformationMessageType(\n') message.exportLiteral(outfile, level, name_='message') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'message': obj_ = InformationMessageType.factory() obj_.build(child_) self.message.append(obj_) self.validate_InformationMessageType(self.message) # validate type InformationMessageType # end class InformationType class InformationMessageType: subclass = None superclass = None def __init__(self, severity='', group_id='', valueOf_='', mixedclass_=None, content_=None): self.severity = severity self.group_id = group_id if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if InformationMessageType.subclass: return InformationMessageType.subclass(*args_, **kwargs_) else: return InformationMessageType(*args_, **kwargs_) factory = staticmethod(factory) def get_severity(self): return self.severity def set_severity(self, severity): self.severity = severity def get_group_id(self): return self.group_id def set_group_id(self, group_id): self.group_id = group_id def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='InformationMessageType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='InformationMessageType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='InformationMessageType'): if self.get_severity() is not None: outfile.write(' severity="%s"' % (quote_attrib(self.get_severity()), )) if self.get_group_id() is not None: outfile.write(' group-id="%s"' % (quote_attrib(self.get_group_id()), )) def exportChildren(self, outfile, level, namespace_='', name_='InformationMessageType'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='InformationMessageType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('severity = "%s",\n' % (self.get_severity(),)) showIndent(outfile, level) outfile.write('group_id = "%s",\n' % (self.get_group_id(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('severity'): self.severity = attrs.get('severity').value if attrs.get('group-id'): self.group_id = attrs.get('group-id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class InformationMessageType class ObjServerType(MigrationObjectServer): subclass = None superclass = MigrationObjectServer def __init__(self, check='', information=None, license=None, capability_info=None, valueOf_=''): MigrationObjectServer.__init__(self, check, information, license, capability_info) self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ObjServerType.subclass: return ObjServerType.subclass(*args_, **kwargs_) else: return ObjServerType(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ObjServerType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ObjServerType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ObjServerType'): MigrationObjectServer.exportAttributes(self, outfile, level, namespace_, name_='ObjServerType') def exportChildren(self, outfile, level, namespace_='', name_='ObjServerType'): MigrationObjectServer.exportChildren(self, outfile, level, namespace_, name_) def exportLiteral(self, outfile, level, name_='ObjServerType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass MigrationObjectServer.exportLiteralAttributes(self, outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): MigrationObjectServer.exportLiteralChildren(self, outfile, level, name_) showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): MigrationObjectServer.buildAttributes(self, attrs) def buildChildren(self, child_, nodeName_): MigrationObjectServer.buildChildren(self, child_, nodeName_) # end class ObjServerType class ObjAdminInfoType(MigrationObjectAdminInfo): subclass = None superclass = MigrationObjectAdminInfo def __init__(self, information=None, valueOf_=''): MigrationObjectAdminInfo.__init__(self, information) self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ObjAdminInfoType.subclass: return ObjAdminInfoType.subclass(*args_, **kwargs_) else: return ObjAdminInfoType(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ObjAdminInfoType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ObjAdminInfoType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ObjAdminInfoType'): MigrationObjectAdminInfo.exportAttributes(self, outfile, level, namespace_, name_='ObjAdminInfoType') def exportChildren(self, outfile, level, namespace_='', name_='ObjAdminInfoType'): MigrationObjectAdminInfo.exportChildren(self, outfile, level, namespace_, name_) def exportLiteral(self, outfile, level, name_='ObjAdminInfoType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass MigrationObjectAdminInfo.exportLiteralAttributes(self, outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): MigrationObjectAdminInfo.exportLiteralChildren(self, outfile, level, name_) showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): MigrationObjectAdminInfo.buildAttributes(self, attrs) def buildChildren(self, child_, nodeName_): MigrationObjectAdminInfo.buildChildren(self, child_, nodeName_) # end class ObjAdminInfoType class ComponentType: subclass = None superclass = None def __init__(self, version='', name='', mode='', valueOf_=''): self.version = version self.name = name self.mode = mode self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if ComponentType.subclass: return ComponentType.subclass(*args_, **kwargs_) else: return ComponentType(*args_, **kwargs_) factory = staticmethod(factory) def get_version(self): return self.version def set_version(self, version): self.version = version def get_name(self): return self.name def set_name(self, name): self.name = name def get_mode(self): return self.mode def set_mode(self, mode): self.mode = mode def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='ComponentType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ComponentType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ComponentType'): if self.get_version() is not None: outfile.write(' version="%s"' % (quote_attrib(self.get_version()), )) outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) if self.get_mode() is not None: outfile.write(' mode="%s"' % (quote_attrib(self.get_mode()), )) def exportChildren(self, outfile, level, namespace_='', name_='ComponentType'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='ComponentType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('version = "%s",\n' % (self.get_version(),)) showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) showIndent(outfile, level) outfile.write('mode = "%s",\n' % (self.get_mode(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('version'): self.version = attrs.get('version').value if attrs.get('name'): self.name = attrs.get('name').value if attrs.get('mode'): self.mode = attrs.get('mode').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class ComponentType class BusinessModel: subclass = None superclass = None def __init__(self, reason_description=None, resolve_options=None): self.reason_description = reason_description self.resolve_options = resolve_options def factory(*args_, **kwargs_): if BusinessModel.subclass: return BusinessModel.subclass(*args_, **kwargs_) else: return BusinessModel(*args_, **kwargs_) factory = staticmethod(factory) def get_reason_description(self): return self.reason_description def set_reason_description(self, reason_description): self.reason_description = reason_description def validate_reason_description(self, value): # validate type reason_description pass def get_resolve_options(self): return self.resolve_options def set_resolve_options(self, resolve_options): self.resolve_options = resolve_options def export(self, outfile, level, namespace_='', name_='BusinessModel'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='BusinessModel') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='BusinessModel'): pass def exportChildren(self, outfile, level, namespace_='', name_='BusinessModel'): if self.reason_description: self.reason_description.export(outfile, level, namespace_, name_='reason-description', ) if self.resolve_options: self.resolve_options.export(outfile, level, namespace_, name_='resolve-options', ) def exportLiteral(self, outfile, level, name_='BusinessModel'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.reason_description: showIndent(outfile, level) outfile.write('reason_description=reason_description(\n') self.reason_description.exportLiteral(outfile, level, name_='reason_description') showIndent(outfile, level) outfile.write('),\n') if self.resolve_options: showIndent(outfile, level) outfile.write('resolve_options=ResolveOptions(\n') self.resolve_options.exportLiteral(outfile, level, name_='resolve_options') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'reason-description': obj_ = None obj_.build(child_) self.set_reason_description(obj_) self.validate_reason_description(self.reason_description) # validate type reason_description elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resolve-options': obj_ = ResolveOptions.factory() obj_.build(child_) self.set_resolve_options(obj_) # end class BusinessModel class reason_description: subclass = None superclass = None def __init__(self, severity='', valueOf_='', mixedclass_=None, content_=None): self.severity = severity if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if reason_description.subclass: return reason_description.subclass(*args_, **kwargs_) else: return reason_description(*args_, **kwargs_) factory = staticmethod(factory) def get_severity(self): return self.severity def set_severity(self, severity): self.severity = severity def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='reason-description'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='reason-description') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='reason-description'): if self.get_severity() is not None: outfile.write(' severity="%s"' % (quote_attrib(self.get_severity()), )) def exportChildren(self, outfile, level, namespace_='', name_='reason-description'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='reason-description'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('severity = "%s",\n' % (self.get_severity(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('severity'): self.severity = attrs.get('severity').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class reason_description class ConfigParameters: subclass = None superclass = None def __init__(self, parameter=None): if parameter is None: self.parameter = [] else: self.parameter = parameter def factory(*args_, **kwargs_): if ConfigParameters.subclass: return ConfigParameters.subclass(*args_, **kwargs_) else: return ConfigParameters(*args_, **kwargs_) factory = staticmethod(factory) def get_parameter(self): return self.parameter def set_parameter(self, parameter): self.parameter = parameter def add_parameter(self, value): self.parameter.append(value) def insert_parameter(self, index, value): self.parameter[index] = value def export(self, outfile, level, namespace_='', name_='ConfigParameters'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ConfigParameters') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ConfigParameters'): pass def exportChildren(self, outfile, level, namespace_='', name_='ConfigParameters'): for parameter_ in self.get_parameter(): parameter_.export(outfile, level, namespace_, name_='parameter') def exportLiteral(self, outfile, level, name_='ConfigParameters'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('parameter=[\n') level += 1 for parameter in self.parameter: showIndent(outfile, level) outfile.write('parameter(\n') parameter.exportLiteral(outfile, level) showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'parameter': obj_ = parameter.factory() obj_.build(child_) self.parameter.append(obj_) # end class ConfigParameters class parameter: subclass = None superclass = None def __init__(self, name='', value=''): self.name = name self.value = value def factory(*args_, **kwargs_): if parameter.subclass: return parameter.subclass(*args_, **kwargs_) else: return parameter(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_value(self): return self.value def set_value(self, value): self.value = value def export(self, outfile, level, namespace_='', name_='parameter'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='parameter') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='parameter'): pass def exportChildren(self, outfile, level, namespace_='', name_='parameter'): showIndent(outfile, level) outfile.write('<%sname>%s\n' % (namespace_, quote_xml(self.get_name()), namespace_)) showIndent(outfile, level) outfile.write('<%svalue>%s\n' % (namespace_, quote_xml(self.get_value()), namespace_)) def exportLiteral(self, outfile, level, name_='parameter'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name=%s,\n' % quote_python(self.get_name())) showIndent(outfile, level) outfile.write('value=%s,\n' % quote_python(self.get_value())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'value': value_ = '' for text__content_ in child_.childNodes: value_ += text__content_.nodeValue self.value = value_ # end class parameter class ChildDumpsList: subclass = None superclass = None def __init__(self, dump=None): if dump is None: self.dump = [] else: self.dump = dump def factory(*args_, **kwargs_): if ChildDumpsList.subclass: return ChildDumpsList.subclass(*args_, **kwargs_) else: return ChildDumpsList(*args_, **kwargs_) factory = staticmethod(factory) def get_dump(self): return self.dump def set_dump(self, dump): self.dump = dump def add_dump(self, value): self.dump.append(value) def insert_dump(self, index, value): self.dump[index] = value def export(self, outfile, level, namespace_='', name_='ChildDumpsList'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='ChildDumpsList') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='ChildDumpsList'): pass def exportChildren(self, outfile, level, namespace_='', name_='ChildDumpsList'): for dump_ in self.get_dump(): showIndent(outfile, level) outfile.write('<%sdump>%s\n' % (namespace_, quote_xml(dump_), namespace_)) def exportLiteral(self, outfile, level, name_='ChildDumpsList'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('dump=[\n') level += 1 for dump in self.dump: showIndent(outfile, level) outfile.write('%s,\n' % quote_python(dump)) level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'dump': dump_ = '' for text__content_ in child_.childNodes: dump_ += text__content_.nodeValue self.dump.append(dump_) # end class ChildDumpsList class TasksListQuery: subclass = None superclass = None def __init__(self, typexx=None, owner_guid=None, top_object_type='', top_object_id=''): if typexx is None: self.typexx = [] else: self.typexx = typexx if owner_guid is None: self.owner_guid = [] else: self.owner_guid = owner_guid self.top_object_type = top_object_type self.top_object_id = top_object_id def factory(*args_, **kwargs_): if TasksListQuery.subclass: return TasksListQuery.subclass(*args_, **kwargs_) else: return TasksListQuery(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def add_type(self, value): self.typexx.append(value) def insert_type(self, index, value): self.typexx[index] = value def validate_type(self, value): # validate type type pass def get_owner_guid(self): return self.owner_guid def set_owner_guid(self, owner_guid): self.owner_guid = owner_guid def add_owner_guid(self, value): self.owner_guid.append(value) def insert_owner_guid(self, index, value): self.owner_guid[index] = value def get_top_object_type(self): return self.top_object_type def set_top_object_type(self, top_object_type): self.top_object_type = top_object_type def validate_top_object_type(self, value): # validate type top_object_type pass def get_top_object_id(self): return self.top_object_id def set_top_object_id(self, top_object_id): self.top_object_id = top_object_id def export(self, outfile, level, namespace_='', name_='TasksListQuery'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='TasksListQuery') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='TasksListQuery'): pass def exportChildren(self, outfile, level, namespace_='', name_='TasksListQuery'): for type_ in self.get_type(): showIndent(outfile, level) outfile.write('<%stype>%s\n' % (namespace_, quote_xml(type_), namespace_)) for owner_guid_ in self.get_owner_guid(): showIndent(outfile, level) outfile.write('<%sowner-guid>%s\n' % (namespace_, quote_xml(owner_guid_), namespace_)) if self.get_top_object_type() != None : if self.get_top_object_type() != "" : showIndent(outfile, level) outfile.write('<%stop-object-type>%s\n' % (namespace_, quote_xml(self.get_top_object_type()), namespace_)) if self.get_top_object_id() != None : if self.get_top_object_id() != "" : showIndent(outfile, level) outfile.write('<%stop-object-id>%s\n' % (namespace_, quote_xml(self.get_top_object_id()), namespace_)) def exportLiteral(self, outfile, level, name_='TasksListQuery'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('type=[\n') level += 1 for type in self.type: showIndent(outfile, level) outfile.write('%s,\n' % quote_python(type)) level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('owner_guid=[\n') level += 1 for owner_guid in self.owner_guid: showIndent(outfile, level) outfile.write('%s,\n' % quote_python(owner_guid)) level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('top_object_type=%s,\n' % quote_python(self.get_top_object_type())) showIndent(outfile, level) outfile.write('top_object_id=%s,\n' % quote_python(self.get_top_object_id())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': type_ = '' for text__content_ in child_.childNodes: type_ += text__content_.nodeValue self.typexx.append(type_) self.validate_type(self.typexx) # validate type type elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'owner-guid': owner_guid_ = '' for text__content_ in child_.childNodes: owner_guid_ += text__content_.nodeValue self.owner_guid.append(owner_guid_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'top-object-type': top_object_type_ = '' for text__content_ in child_.childNodes: top_object_type_ += text__content_.nodeValue self.top_object_type = top_object_type_ self.validate_top_object_type(self.top_object_type) # validate type top_object_type elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'top-object-id': top_object_id_ = '' for text__content_ in child_.childNodes: top_object_id_ += text__content_.nodeValue self.top_object_id = top_object_id_ # end class TasksListQuery class MigrationCapabilityInfo: subclass = None superclass = None def __init__(self, group=None): if group is None: self.group = [] else: self.group = group def factory(*args_, **kwargs_): if MigrationCapabilityInfo.subclass: return MigrationCapabilityInfo.subclass(*args_, **kwargs_) else: return MigrationCapabilityInfo(*args_, **kwargs_) factory = staticmethod(factory) def get_group(self): return self.group def set_group(self, group): self.group = group def add_group(self, value): self.group.append(value) def insert_group(self, index, value): self.group[index] = value def export(self, outfile, level, namespace_='', name_='MigrationCapabilityInfo'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationCapabilityInfo') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationCapabilityInfo'): pass def exportChildren(self, outfile, level, namespace_='', name_='MigrationCapabilityInfo'): for group_ in self.get_group(): group_.export(outfile, level, namespace_, name_='group') def exportLiteral(self, outfile, level, name_='MigrationCapabilityInfo'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('group=[\n') level += 1 for group in self.group: showIndent(outfile, level) outfile.write('MigrationCapabiltyInfoGroup(\n') group.exportLiteral(outfile, level, name_='group') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'group': obj_ = MigrationCapabiltyInfoGroup.factory() obj_.build(child_) self.group.append(obj_) # end class MigrationCapabilityInfo class MigrationCapabiltyInfoMessage: subclass = None superclass = None def __init__(self, severity='', text=None, resolutionDescription=None, objects_list=None): self.severity = severity if text is None: self.text = [] else: self.text = text self.resolutionDescription = resolutionDescription self.objects_list = objects_list def factory(*args_, **kwargs_): if MigrationCapabiltyInfoMessage.subclass: return MigrationCapabiltyInfoMessage.subclass(*args_, **kwargs_) else: return MigrationCapabiltyInfoMessage(*args_, **kwargs_) factory = staticmethod(factory) def get_severity(self): return self.severity def set_severity(self, severity): self.severity = severity def validate_severity(self, value): # validate type severity pass def get_text(self): return self.text def set_text(self, text): self.text = text def add_text(self, value): self.text.append(value) def insert_text(self, index, value): self.text[index] = value def get_resolutionDescription(self): return self.resolutionDescription def set_resolutionDescription(self, resolutionDescription): self.resolutionDescription = resolutionDescription def get_objects_list(self): return self.objects_list def set_objects_list(self, objects_list): self.objects_list = objects_list def export(self, outfile, level, namespace_='', name_='MigrationCapabiltyInfoMessage'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationCapabiltyInfoMessage') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationCapabiltyInfoMessage'): pass def exportChildren(self, outfile, level, namespace_='', name_='MigrationCapabiltyInfoMessage'): showIndent(outfile, level) outfile.write('<%sseverity>%s\n' % (namespace_, quote_xml(self.get_severity()), namespace_)) for text_ in self.get_text(): showIndent(outfile, level) outfile.write('<%stext>%s\n' % (namespace_, quote_xml(text_), namespace_)) if self.resolutionDescription: self.resolutionDescription.export(outfile, level, namespace_, name_='resolutionDescription', ) if self.objects_list: self.objects_list.export(outfile, level, namespace_, name_='objects-list', ) def exportLiteral(self, outfile, level, name_='MigrationCapabiltyInfoMessage'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('severity=%s,\n' % quote_python(self.get_severity())) showIndent(outfile, level) outfile.write('text=[\n') level += 1 for text in self.text: showIndent(outfile, level) outfile.write('%s,\n' % quote_python(text)) level -= 1 showIndent(outfile, level) outfile.write('],\n') if self.resolutionDescription: showIndent(outfile, level) outfile.write('resolutionDescription=MigrationCapabiltyMessageResolutionType(\n') self.resolutionDescription.exportLiteral(outfile, level, name_='resolutionDescription') showIndent(outfile, level) outfile.write('),\n') if self.objects_list: showIndent(outfile, level) outfile.write('objects_list=objects_list(\n') self.objects_list.exportLiteral(outfile, level, name_='objects_list') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'severity': severity_ = '' for text__content_ in child_.childNodes: severity_ += text__content_.nodeValue self.severity = severity_ self.validate_severity(self.severity) # validate type severity elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'text': text_ = '' for text__content_ in child_.childNodes: text_ += text__content_.nodeValue self.text.append(text_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resolutionDescription': obj_ = MigrationCapabiltyMessageResolutionType.factory() obj_.build(child_) self.set_resolutionDescription(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'objects-list': obj_ = objects_list.factory() obj_.build(child_) self.set_objects_list(obj_) # end class MigrationCapabiltyInfoMessage class severity: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if severity.subclass: return severity.subclass(*args_, **kwargs_) else: return severity(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='severity'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='severity') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='severity'): pass def exportChildren(self, outfile, level, namespace_='', name_='severity'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='severity'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class severity class text: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if text.subclass: return text.subclass(*args_, **kwargs_) else: return text(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='text'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='text') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='text'): pass def exportChildren(self, outfile, level, namespace_='', name_='text'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='text'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class text class objects_list: subclass = None superclass = None def __init__(self, object=None): if object is None: self.object = [] else: self.object = object def factory(*args_, **kwargs_): if objects_list.subclass: return objects_list.subclass(*args_, **kwargs_) else: return objects_list(*args_, **kwargs_) factory = staticmethod(factory) def get_object(self): return self.object def set_object(self, object): self.object = object def add_object(self, value): self.object.append(value) def insert_object(self, index, value): self.object[index] = value def export(self, outfile, level, namespace_='', name_='objects-list'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='objects-list') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='objects-list'): pass def exportChildren(self, outfile, level, namespace_='', name_='objects-list'): for object_ in self.get_object(): object_.export(outfile, level, namespace_, name_='object') def exportLiteral(self, outfile, level, name_='objects-list'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('object=[\n') level += 1 for object in self.object: showIndent(outfile, level) outfile.write('MigrationCapabiltyObjectType(\n') object.exportLiteral(outfile, level, name_='object') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'object': obj_ = MigrationCapabiltyObjectType.factory() obj_.build(child_) self.object.append(obj_) # end class objects_list class MigrationCapabiltyInfoGroup: subclass = None superclass = None def __init__(self, name='', message=None): self.name = name if message is None: self.message = [] else: self.message = message def factory(*args_, **kwargs_): if MigrationCapabiltyInfoGroup.subclass: return MigrationCapabiltyInfoGroup.subclass(*args_, **kwargs_) else: return MigrationCapabiltyInfoGroup(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_message(self): return self.message def set_message(self, message): self.message = message def add_message(self, value): self.message.append(value) def insert_message(self, index, value): self.message[index] = value def export(self, outfile, level, namespace_='', name_='MigrationCapabiltyInfoGroup'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationCapabiltyInfoGroup') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationCapabiltyInfoGroup'): pass def exportChildren(self, outfile, level, namespace_='', name_='MigrationCapabiltyInfoGroup'): showIndent(outfile, level) outfile.write('<%sname>%s\n' % (namespace_, quote_xml(self.get_name()), namespace_)) for message_ in self.get_message(): message_.export(outfile, level, namespace_, name_='message') def exportLiteral(self, outfile, level, name_='MigrationCapabiltyInfoGroup'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name=%s,\n' % quote_python(self.get_name())) showIndent(outfile, level) outfile.write('message=[\n') level += 1 for message in self.message: showIndent(outfile, level) outfile.write('MigrationCapabiltyInfoMessage(\n') message.exportLiteral(outfile, level, name_='message') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'message': obj_ = MigrationCapabiltyInfoMessage.factory() obj_.build(child_) self.message.append(obj_) # end class MigrationCapabiltyInfoGroup class AgentCapabilityInfoType: subclass = None superclass = None def __init__(self, components=None, resource_usage=None, miscellaneous=None, database_servers=None, apache_modules=None): self.components = components self.resource_usage = resource_usage self.miscellaneous = miscellaneous self.database_servers = database_servers self.apache_modules = apache_modules def factory(*args_, **kwargs_): if AgentCapabilityInfoType.subclass: return AgentCapabilityInfoType.subclass(*args_, **kwargs_) else: return AgentCapabilityInfoType(*args_, **kwargs_) factory = staticmethod(factory) def get_components(self): return self.components def set_components(self, components): self.components = components def get_resource_usage(self): return self.resource_usage def set_resource_usage(self, resource_usage): self.resource_usage = resource_usage def get_miscellaneous(self): return self.miscellaneous def set_miscellaneous(self, miscellaneous): self.miscellaneous = miscellaneous def get_database_servers(self): return self.database_servers def set_database_servers(self, database_servers): self.database_servers = database_servers def get_apache_modules(self): return self.apache_modules def set_apache_modules(self, apache_modules): self.apache_modules = apache_modules def export(self, outfile, level, namespace_='', name_='AgentCapabilityInfoType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='AgentCapabilityInfoType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='AgentCapabilityInfoType'): pass def exportChildren(self, outfile, level, namespace_='', name_='AgentCapabilityInfoType'): if self.get_components() != None : if self.components: self.components.export(outfile, level, namespace_, name_='components') if self.get_resource_usage() != None : if self.resource_usage: self.resource_usage.export(outfile, level, namespace_, name_='resource-usage') if self.get_miscellaneous() != None : if self.miscellaneous: self.miscellaneous.export(outfile, level, namespace_, name_='miscellaneous') if self.get_database_servers() != None : if self.database_servers: self.database_servers.export(outfile, level, namespace_, name_='database-servers') if self.get_apache_modules() != None : if self.apache_modules: self.apache_modules.export(outfile, level, namespace_, name_='apache-modules') def exportLiteral(self, outfile, level, name_='AgentCapabilityInfoType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): if self.components: showIndent(outfile, level) outfile.write('components=AgentCapabilityComponentsType(\n') self.components.exportLiteral(outfile, level, name_='components') showIndent(outfile, level) outfile.write('),\n') if self.resource_usage: showIndent(outfile, level) outfile.write('resource_usage=AgentCapabilityResourceUsageType(\n') self.resource_usage.exportLiteral(outfile, level, name_='resource_usage') showIndent(outfile, level) outfile.write('),\n') if self.miscellaneous: showIndent(outfile, level) outfile.write('miscellaneous=AgentCapabilityMiscellaneousType(\n') self.miscellaneous.exportLiteral(outfile, level, name_='miscellaneous') showIndent(outfile, level) outfile.write('),\n') if self.database_servers: showIndent(outfile, level) outfile.write('database_servers=AgentCapabilityDatabaseServersType(\n') self.database_servers.exportLiteral(outfile, level, name_='database_servers') showIndent(outfile, level) outfile.write('),\n') if self.apache_modules: showIndent(outfile, level) outfile.write('apache_modules=AgentCapabilityApacheModulesType(\n') self.apache_modules.exportLiteral(outfile, level, name_='apache_modules') showIndent(outfile, level) outfile.write('),\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'components': obj_ = AgentCapabilityComponentsType.factory() obj_.build(child_) self.set_components(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resource-usage': obj_ = AgentCapabilityResourceUsageType.factory() obj_.build(child_) self.set_resource_usage(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'miscellaneous': obj_ = AgentCapabilityMiscellaneousType.factory() obj_.build(child_) self.set_miscellaneous(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'database-servers': obj_ = AgentCapabilityDatabaseServersType.factory() obj_.build(child_) self.set_database_servers(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'apache-modules': obj_ = AgentCapabilityApacheModulesType.factory() obj_.build(child_) self.set_apache_modules(obj_) # end class AgentCapabilityInfoType class AgentCapabilityNameValueType: subclass = None superclass = None def __init__(self, name='', value=''): self.name = name self.value = value def factory(*args_, **kwargs_): if AgentCapabilityNameValueType.subclass: return AgentCapabilityNameValueType.subclass(*args_, **kwargs_) else: return AgentCapabilityNameValueType(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_value(self): return self.value def set_value(self, value): self.value = value def export(self, outfile, level, namespace_='', name_='AgentCapabilityNameValueType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='AgentCapabilityNameValueType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='AgentCapabilityNameValueType'): pass def exportChildren(self, outfile, level, namespace_='', name_='AgentCapabilityNameValueType'): showIndent(outfile, level) outfile.write('<%sname>%s\n' % (namespace_, quote_xml(self.get_name()), namespace_)) showIndent(outfile, level) outfile.write('<%svalue>%s\n' % (namespace_, quote_xml(self.get_value()), namespace_)) def exportLiteral(self, outfile, level, name_='AgentCapabilityNameValueType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name=%s,\n' % quote_python(self.get_name())) showIndent(outfile, level) outfile.write('value=%s,\n' % quote_python(self.get_value())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'value': value_ = '' for text__content_ in child_.childNodes: value_ += text__content_.nodeValue self.value = value_ # end class AgentCapabilityNameValueType class value: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if value.subclass: return value.subclass(*args_, **kwargs_) else: return value(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='value'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='value') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='value'): pass def exportChildren(self, outfile, level, namespace_='', name_='value'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='value'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class value class AgentCapabilityComponentsType: subclass = None superclass = None def __init__(self, component=None): if component is None: self.component = [] else: self.component = component def factory(*args_, **kwargs_): if AgentCapabilityComponentsType.subclass: return AgentCapabilityComponentsType.subclass(*args_, **kwargs_) else: return AgentCapabilityComponentsType(*args_, **kwargs_) factory = staticmethod(factory) def get_component(self): return self.component def set_component(self, component): self.component = component def add_component(self, value): self.component.append(value) def insert_component(self, index, value): self.component[index] = value def export(self, outfile, level, namespace_='', name_='AgentCapabilityComponentsType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='AgentCapabilityComponentsType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='AgentCapabilityComponentsType'): pass def exportChildren(self, outfile, level, namespace_='', name_='AgentCapabilityComponentsType'): for component_ in self.get_component(): component_.export(outfile, level, namespace_, name_='component') def exportLiteral(self, outfile, level, name_='AgentCapabilityComponentsType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('component=[\n') level += 1 for component in self.component: showIndent(outfile, level) outfile.write('AgentCapabilityNameValueType(\n') component.exportLiteral(outfile, level, name_='component') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'component': obj_ = AgentCapabilityNameValueType.factory() obj_.build(child_) self.component.append(obj_) # end class AgentCapabilityComponentsType class AgentCapabilityResourceUsageType: subclass = None superclass = None def __init__(self, resource=None): if resource is None: self.resource = [] else: self.resource = resource def factory(*args_, **kwargs_): if AgentCapabilityResourceUsageType.subclass: return AgentCapabilityResourceUsageType.subclass(*args_, **kwargs_) else: return AgentCapabilityResourceUsageType(*args_, **kwargs_) factory = staticmethod(factory) def get_resource(self): return self.resource def set_resource(self, resource): self.resource = resource def add_resource(self, value): self.resource.append(value) def insert_resource(self, index, value): self.resource[index] = value def export(self, outfile, level, namespace_='', name_='AgentCapabilityResourceUsageType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='AgentCapabilityResourceUsageType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='AgentCapabilityResourceUsageType'): pass def exportChildren(self, outfile, level, namespace_='', name_='AgentCapabilityResourceUsageType'): for resource_ in self.get_resource(): resource_.export(outfile, level, namespace_, name_='resource') def exportLiteral(self, outfile, level, name_='AgentCapabilityResourceUsageType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('resource=[\n') level += 1 for resource in self.resource: showIndent(outfile, level) outfile.write('AgentCapabilityNameValueType(\n') resource.exportLiteral(outfile, level, name_='resource') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'resource': obj_ = AgentCapabilityNameValueType.factory() obj_.build(child_) self.resource.append(obj_) # end class AgentCapabilityResourceUsageType class AgentCapabilityMiscellaneousType: subclass = None superclass = None def __init__(self, setting=None): if setting is None: self.setting = [] else: self.setting = setting def factory(*args_, **kwargs_): if AgentCapabilityMiscellaneousType.subclass: return AgentCapabilityMiscellaneousType.subclass(*args_, **kwargs_) else: return AgentCapabilityMiscellaneousType(*args_, **kwargs_) factory = staticmethod(factory) def get_setting(self): return self.setting def set_setting(self, setting): self.setting = setting def add_setting(self, value): self.setting.append(value) def insert_setting(self, index, value): self.setting[index] = value def export(self, outfile, level, namespace_='', name_='AgentCapabilityMiscellaneousType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='AgentCapabilityMiscellaneousType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='AgentCapabilityMiscellaneousType'): pass def exportChildren(self, outfile, level, namespace_='', name_='AgentCapabilityMiscellaneousType'): for setting_ in self.get_setting(): setting_.export(outfile, level, namespace_, name_='setting') def exportLiteral(self, outfile, level, name_='AgentCapabilityMiscellaneousType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('setting=[\n') level += 1 for setting in self.setting: showIndent(outfile, level) outfile.write('AgentCapabilityNameValueType(\n') setting.exportLiteral(outfile, level, name_='setting') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'setting': obj_ = AgentCapabilityNameValueType.factory() obj_.build(child_) self.setting.append(obj_) # end class AgentCapabilityMiscellaneousType class AgentCapabilityDatabaseServerType: subclass = None superclass = None def __init__(self, typexx='', host='', port='', version='', local=''): self.typexx = typexx self.host = host self.port = port self.version = version self.local = local def factory(*args_, **kwargs_): if AgentCapabilityDatabaseServerType.subclass: return AgentCapabilityDatabaseServerType.subclass(*args_, **kwargs_) else: return AgentCapabilityDatabaseServerType(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_host(self): return self.host def set_host(self, host): self.host = host def get_port(self): return self.port def set_port(self, port): self.port = port def get_version(self): return self.version def set_version(self, version): self.version = version def get_local(self): return self.local def set_local(self, local): self.local = local def export(self, outfile, level, namespace_='', name_='AgentCapabilityDatabaseServerType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='AgentCapabilityDatabaseServerType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='AgentCapabilityDatabaseServerType'): pass def exportChildren(self, outfile, level, namespace_='', name_='AgentCapabilityDatabaseServerType'): showIndent(outfile, level) outfile.write('<%stype>%s\n' % (namespace_, quote_xml(self.get_type()), namespace_)) showIndent(outfile, level) outfile.write('<%shost>%s\n' % (namespace_, quote_xml(self.get_host()), namespace_)) showIndent(outfile, level) outfile.write('<%sport>%s\n' % (namespace_, quote_xml(self.get_port()), namespace_)) showIndent(outfile, level) outfile.write('<%sversion>%s\n' % (namespace_, quote_xml(self.get_version()), namespace_)) showIndent(outfile, level) outfile.write('<%slocal>%s\n' % (namespace_, quote_xml(self.get_local()), namespace_)) def exportLiteral(self, outfile, level, name_='AgentCapabilityDatabaseServerType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx=%s,\n' % quote_python(self.get_type())) showIndent(outfile, level) outfile.write('host=%s,\n' % quote_python(self.get_host())) showIndent(outfile, level) outfile.write('port=%s,\n' % quote_python(self.get_port())) showIndent(outfile, level) outfile.write('version=%s,\n' % quote_python(self.get_version())) showIndent(outfile, level) outfile.write('local=%s,\n' % quote_python(self.get_local())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': type_ = '' for text__content_ in child_.childNodes: type_ += text__content_.nodeValue self.typexx = type_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'host': host_ = '' for text__content_ in child_.childNodes: host_ += text__content_.nodeValue self.host = host_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'port': port_ = '' for text__content_ in child_.childNodes: port_ += text__content_.nodeValue self.port = port_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'version': version_ = '' for text__content_ in child_.childNodes: version_ += text__content_.nodeValue self.version = version_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'local': local_ = '' for text__content_ in child_.childNodes: local_ += text__content_.nodeValue self.local = local_ # end class AgentCapabilityDatabaseServerType class host: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if host.subclass: return host.subclass(*args_, **kwargs_) else: return host(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='host'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='host') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='host'): pass def exportChildren(self, outfile, level, namespace_='', name_='host'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='host'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class host class port: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if port.subclass: return port.subclass(*args_, **kwargs_) else: return port(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='port'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='port') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='port'): pass def exportChildren(self, outfile, level, namespace_='', name_='port'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='port'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class port class local: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if local.subclass: return local.subclass(*args_, **kwargs_) else: return local(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='local'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='local') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='local'): pass def exportChildren(self, outfile, level, namespace_='', name_='local'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='local'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class local class AgentCapabilityDatabaseServersType: subclass = None superclass = None def __init__(self, database_server=None): if database_server is None: self.database_server = [] else: self.database_server = database_server def factory(*args_, **kwargs_): if AgentCapabilityDatabaseServersType.subclass: return AgentCapabilityDatabaseServersType.subclass(*args_, **kwargs_) else: return AgentCapabilityDatabaseServersType(*args_, **kwargs_) factory = staticmethod(factory) def get_database_server(self): return self.database_server def set_database_server(self, database_server): self.database_server = database_server def add_database_server(self, value): self.database_server.append(value) def insert_database_server(self, index, value): self.database_server[index] = value def export(self, outfile, level, namespace_='', name_='AgentCapabilityDatabaseServersType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='AgentCapabilityDatabaseServersType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='AgentCapabilityDatabaseServersType'): pass def exportChildren(self, outfile, level, namespace_='', name_='AgentCapabilityDatabaseServersType'): for database_server_ in self.get_database_server(): database_server_.export(outfile, level, namespace_, name_='database-server') def exportLiteral(self, outfile, level, name_='AgentCapabilityDatabaseServersType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('database_server=[\n') level += 1 for database_server in self.database_server: showIndent(outfile, level) outfile.write('AgentCapabilityDatabaseServerType(\n') database_server.exportLiteral(outfile, level, name_='database_server') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'database-server': obj_ = AgentCapabilityDatabaseServerType.factory() obj_.build(child_) self.database_server.append(obj_) # end class AgentCapabilityDatabaseServersType class MigrationCapabiltyObjectType: subclass = None superclass = None def __init__(self, typexx='', name=''): self.typexx = typexx self.name = name def factory(*args_, **kwargs_): if MigrationCapabiltyObjectType.subclass: return MigrationCapabiltyObjectType.subclass(*args_, **kwargs_) else: return MigrationCapabiltyObjectType(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def get_name(self): return self.name def set_name(self, name): self.name = name def export(self, outfile, level, namespace_='', name_='MigrationCapabiltyObjectType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationCapabiltyObjectType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationCapabiltyObjectType'): pass def exportChildren(self, outfile, level, namespace_='', name_='MigrationCapabiltyObjectType'): showIndent(outfile, level) outfile.write('<%stype>%s\n' % (namespace_, quote_xml(self.get_type()), namespace_)) showIndent(outfile, level) outfile.write('<%sname>%s\n' % (namespace_, quote_xml(self.get_name()), namespace_)) def exportLiteral(self, outfile, level, name_='MigrationCapabiltyObjectType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx=%s,\n' % quote_python(self.get_type())) showIndent(outfile, level) outfile.write('name=%s,\n' % quote_python(self.get_name())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': type_ = '' for text__content_ in child_.childNodes: type_ += text__content_.nodeValue self.typexx = type_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ # end class MigrationCapabiltyObjectType class AgentCapabilityApacheModulesType: subclass = None superclass = None def __init__(self, module=None): if module is None: self.module = [] else: self.module = module def factory(*args_, **kwargs_): if AgentCapabilityApacheModulesType.subclass: return AgentCapabilityApacheModulesType.subclass(*args_, **kwargs_) else: return AgentCapabilityApacheModulesType(*args_, **kwargs_) factory = staticmethod(factory) def get_module(self): return self.module def set_module(self, module): self.module = module def add_module(self, value): self.module.append(value) def insert_module(self, index, value): self.module[index] = value def export(self, outfile, level, namespace_='', name_='AgentCapabilityApacheModulesType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='AgentCapabilityApacheModulesType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='AgentCapabilityApacheModulesType'): pass def exportChildren(self, outfile, level, namespace_='', name_='AgentCapabilityApacheModulesType'): for module_ in self.get_module(): module_.export(outfile, level, namespace_, name_='module') def exportLiteral(self, outfile, level, name_='AgentCapabilityApacheModulesType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('module=[\n') level += 1 for module in self.module: showIndent(outfile, level) outfile.write('AgentCapabilityNameValueType(\n') module.exportLiteral(outfile, level, name_='module') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'module': obj_ = AgentCapabilityNameValueType.factory() obj_.build(child_) self.module.append(obj_) # end class AgentCapabilityApacheModulesType class MigrationCapabiltyMessageResolutionType: subclass = None superclass = None def __init__(self, typexx='', text='', url='', urlText='', componentName=''): self.typexx = typexx self.text = text self.url = url self.urlText = urlText self.componentName = componentName def factory(*args_, **kwargs_): if MigrationCapabiltyMessageResolutionType.subclass: return MigrationCapabiltyMessageResolutionType.subclass(*args_, **kwargs_) else: return MigrationCapabiltyMessageResolutionType(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.typexx def set_type(self, typexx): self.typexx = typexx def validate_type(self, value): # validate type type pass def get_text(self): return self.text def set_text(self, text): self.text = text def get_url(self): return self.url def set_url(self, url): self.url = url def get_urlText(self): return self.urlText def set_urlText(self, urlText): self.urlText = urlText def get_componentName(self): return self.componentName def set_componentName(self, componentName): self.componentName = componentName def export(self, outfile, level, namespace_='', name_='MigrationCapabiltyMessageResolutionType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='MigrationCapabiltyMessageResolutionType') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='MigrationCapabiltyMessageResolutionType'): pass def exportChildren(self, outfile, level, namespace_='', name_='MigrationCapabiltyMessageResolutionType'): showIndent(outfile, level) outfile.write('<%stype>%s\n' % (namespace_, quote_xml(self.get_type()), namespace_)) showIndent(outfile, level) outfile.write('<%stext>%s\n' % (namespace_, quote_xml(self.get_text()), namespace_)) showIndent(outfile, level) outfile.write('<%surl>%s\n' % (namespace_, quote_xml(self.get_url()), namespace_)) showIndent(outfile, level) outfile.write('<%surlText>%s\n' % (namespace_, quote_xml(self.get_urlText()), namespace_)) showIndent(outfile, level) outfile.write('<%scomponentName>%s\n' % (namespace_, quote_xml(self.get_componentName()), namespace_)) def exportLiteral(self, outfile, level, name_='MigrationCapabiltyMessageResolutionType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('typexx=%s,\n' % quote_python(self.get_type())) showIndent(outfile, level) outfile.write('text=%s,\n' % quote_python(self.get_text())) showIndent(outfile, level) outfile.write('url=%s,\n' % quote_python(self.get_url())) showIndent(outfile, level) outfile.write('urlText=%s,\n' % quote_python(self.get_urlText())) showIndent(outfile, level) outfile.write('componentName=%s,\n' % quote_python(self.get_componentName())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': type_ = '' for text__content_ in child_.childNodes: type_ += text__content_.nodeValue self.typexx = type_ self.validate_type(self.typexx) # validate type type elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'text': text_ = '' for text__content_ in child_.childNodes: text_ += text__content_.nodeValue self.text = text_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'url': url_ = '' for text__content_ in child_.childNodes: url_ += text__content_.nodeValue self.url = url_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'urlText': urlText_ = '' for text__content_ in child_.childNodes: urlText_ += text__content_.nodeValue self.urlText = urlText_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'componentName': componentName_ = '' for text__content_ in child_.childNodes: componentName_ += text__content_.nodeValue self.componentName = componentName_ # end class MigrationCapabiltyMessageResolutionType class urlText: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if urlText.subclass: return urlText.subclass(*args_, **kwargs_) else: return urlText(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='urlText'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='urlText') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='urlText'): pass def exportChildren(self, outfile, level, namespace_='', name_='urlText'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='urlText'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class urlText class componentName: subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if componentName.subclass: return componentName.subclass(*args_, **kwargs_) else: return componentName(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='componentName'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='componentName') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='componentName'): pass def exportChildren(self, outfile, level, namespace_='', name_='componentName'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='componentName'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class componentName class EnvList: subclass = None superclass = None def __init__(self, env=None): if env is None: self.env = [] else: self.env = env def factory(*args_, **kwargs_): if EnvList.subclass: return EnvList.subclass(*args_, **kwargs_) else: return EnvList(*args_, **kwargs_) factory = staticmethod(factory) def get_env(self): return self.env def set_env(self, env): self.env = env def add_env(self, value): self.env.append(value) def insert_env(self, index, value): self.env[index] = value def export(self, outfile, level, namespace_='', name_='EnvList'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='EnvList') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='EnvList'): pass def exportChildren(self, outfile, level, namespace_='', name_='EnvList'): for env_ in self.get_env(): env_.export(outfile, level, namespace_, name_='env') def exportLiteral(self, outfile, level, name_='EnvList'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('env=[\n') level += 1 for env in self.env: showIndent(outfile, level) outfile.write('env(\n') env.exportLiteral(outfile, level) showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'env': obj_ = env.factory() obj_.build(child_) self.env.append(obj_) # end class EnvList class env: subclass = None superclass = None def __init__(self, name='', valueOf_=''): self.name = name self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if env.subclass: return env.subclass(*args_, **kwargs_) else: return env(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='env'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='env') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='env'): if self.get_name() is not None: outfile.write(' name="%s"' % (quote_attrib(self.get_name()), )) def exportChildren(self, outfile, level, namespace_='', name_='env'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='env'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): showIndent(outfile, level) outfile.write('name = "%s",\n' % (self.get_name(),)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class env class RepositoryCheckErrors: subclass = None superclass = None def __init__(self, repository_check_error=None): if repository_check_error is None: self.repository_check_error = [] else: self.repository_check_error = repository_check_error def factory(*args_, **kwargs_): if RepositoryCheckErrors.subclass: return RepositoryCheckErrors.subclass(*args_, **kwargs_) else: return RepositoryCheckErrors(*args_, **kwargs_) factory = staticmethod(factory) def get_repository_check_error(self): return self.repository_check_error def set_repository_check_error(self, repository_check_error): self.repository_check_error = repository_check_error def add_repository_check_error(self, value): self.repository_check_error.append(value) def insert_repository_check_error(self, index, value): self.repository_check_error[index] = value def export(self, outfile, level, namespace_='', name_='RepositoryCheckErrors'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='RepositoryCheckErrors') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='RepositoryCheckErrors'): pass def exportChildren(self, outfile, level, namespace_='', name_='RepositoryCheckErrors'): for repository_check_error_ in self.get_repository_check_error(): repository_check_error_.export(outfile, level, namespace_, name_='repository-check-error') def exportLiteral(self, outfile, level, name_='RepositoryCheckErrors'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('repository_check_error=[\n') level += 1 for repository_check_error in self.repository_check_error: showIndent(outfile, level) outfile.write('RepositoryCheckError(\n') repository_check_error.exportLiteral(outfile, level, name_='repository_check_error') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'repository-check-error': obj_ = RepositoryCheckError.factory() obj_.build(child_) self.repository_check_error.append(obj_) # end class RepositoryCheckErrors class RepositoryCheckError: subclass = None superclass = None def __init__(self, operation='', message=''): self.operation = operation self.message = message def factory(*args_, **kwargs_): if RepositoryCheckError.subclass: return RepositoryCheckError.subclass(*args_, **kwargs_) else: return RepositoryCheckError(*args_, **kwargs_) factory = staticmethod(factory) def get_operation(self): return self.operation def set_operation(self, operation): self.operation = operation def get_message(self): return self.message def set_message(self, message): self.message = message def export(self, outfile, level, namespace_='', name_='RepositoryCheckError'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='RepositoryCheckError') outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='RepositoryCheckError'): pass def exportChildren(self, outfile, level, namespace_='', name_='RepositoryCheckError'): showIndent(outfile, level) outfile.write('<%soperation>%s\n' % (namespace_, quote_xml(self.get_operation()), namespace_)) showIndent(outfile, level) outfile.write('<%smessage>%s\n' % (namespace_, quote_xml(self.get_message()), namespace_)) def exportLiteral(self, outfile, level, name_='RepositoryCheckError'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('operation=%s,\n' % quote_python(self.get_operation())) showIndent(outfile, level) outfile.write('message=%s,\n' % quote_python(self.get_message())) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'operation': operation_ = '' for text__content_ in child_.childNodes: operation_ += text__content_.nodeValue self.operation = operation_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'message': message_ = '' for text__content_ in child_.childNodes: message_ += text__content_.nodeValue self.message = message_ # end class RepositoryCheckError class EmptyType: subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if EmptyType.subclass: return EmptyType.subclass(*args_, **kwargs_) else: return EmptyType(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='EmptyType'): showIndent(outfile, level) outfile.write('<%s%s' % (namespace_, name_)) self.exportAttributes(outfile, level, namespace_, name_='EmptyType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='EmptyType'): pass def exportChildren(self, outfile, level, namespace_='', name_='EmptyType'): outfile.write(quote_xml('%s' % self.valueOf_)) def exportLiteral(self, outfile, level, name_='EmptyType'): level += 1 self.exportLiteralAttributes(outfile, level, name_) self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,)) def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue # end class EmptyType from xml.sax import handler, make_parser class SaxStackElement: def __init__(self, name='', obj=None): self.name = name self.obj = obj self.content = '' # # SAX handler # class Sax_PlainDataHandler(handler.ContentHandler): def __init__(self): self.stack = [] self.root = None def getRoot(self): return self.root def setDocumentLocator(self, locator): self.locator = locator def showError(self, msg): print '*** (showError):', msg sys.exit(-1) def startElement(self, name, attrs): done = 0 if name == 'PlainData': obj = PlainData.factory() stackObj = SaxStackElement('PlainData', obj) self.stack.append(stackObj) done = 1 elif name == 'plain-data': stackObj = SaxStackElement('plain_data', None) self.stack.append(stackObj) done = 1 elif name == 'conflicts-description': obj = ConflictsDescription.factory() stackObj = SaxStackElement('conflicts_description', obj) self.stack.append(stackObj) done = 1 elif name == 'dump-validity-error': obj = DumpValidityError.factory() stackObj = SaxStackElement('dump_validity_error', obj) self.stack.append(stackObj) done = 1 elif name == 'dump-overview': obj = DumpOverview.factory() stackObj = SaxStackElement('dump_overview', obj) self.stack.append(stackObj) done = 1 elif name == 'plesk-object-identifier': obj = PleskObjectIdentifier.factory() stackObj = SaxStackElement('plesk_object_identifier', obj) self.stack.append(stackObj) done = 1 elif name == 'required-resource-description': obj = RequiredResourceDescription.factory() stackObj = SaxStackElement('required_resource_description', obj) self.stack.append(stackObj) done = 1 elif name == 'ip': obj = Ip.factory() stackObj = SaxStackElement('ip', obj) self.stack.append(stackObj) done = 1 elif name == 'database': obj = Database.factory() stackObj = SaxStackElement('database', obj) self.stack.append(stackObj) done = 1 elif name == 'db-server': obj = DbServer.factory() stackObj = SaxStackElement('db_server', obj) self.stack.append(stackObj) done = 1 elif name == 'site-app': obj = SiteApp.factory() stackObj = SaxStackElement('site_app', obj) self.stack.append(stackObj) done = 1 elif name == 'service-plan': obj = ServicePlan.factory() stackObj = SaxStackElement('service_plan', obj) self.stack.append(stackObj) done = 1 elif name == 'subscription': obj = Subscription.factory() stackObj = SaxStackElement('subscription', obj) self.stack.append(stackObj) done = 1 elif name == 'component': obj = ComponentType.factory() stackObj = SaxStackElement('component', obj) self.stack.append(stackObj) done = 1 elif name == 'reason-description': obj = ResourceUsageReasonDescription.factory() val = attrs.get('severity', None) if val is not None: obj.set_severity(val) stackObj = SaxStackElement('reason_description', obj) self.stack.append(stackObj) done = 1 elif name == 'resolve-options': obj = ResolveOptions.factory() stackObj = SaxStackElement('resolve_options', obj) self.stack.append(stackObj) done = 1 elif name == 'resource-usage': obj = ResourceUsage.factory() stackObj = SaxStackElement('resource_usage', obj) self.stack.append(stackObj) done = 1 elif name == 'unique-resource': obj = UniqueResource.factory() stackObj = SaxStackElement('unique_resource', obj) self.stack.append(stackObj) done = 1 elif name == 'timing': obj = Timing.factory() stackObj = SaxStackElement('timing', obj) self.stack.append(stackObj) done = 1 elif name == 'configuration': obj = Configuration.factory() stackObj = SaxStackElement('configuration', obj) self.stack.append(stackObj) done = 1 elif name == 'business-model': obj = BusinessModel.factory() stackObj = SaxStackElement('business_model', obj) self.stack.append(stackObj) done = 1 elif name == 'node': obj = TransformNode.factory() stackObj = SaxStackElement('node', obj) self.stack.append(stackObj) done = 1 elif name == 'context': obj = Context.factory() stackObj = SaxStackElement('context', obj) self.stack.append(stackObj) done = 1 elif name == 'attributes': obj = Attributes.factory() stackObj = SaxStackElement('attributes', obj) self.stack.append(stackObj) done = 1 elif name == 'path': stackObj = SaxStackElement('path', None) self.stack.append(stackObj) done = 1 elif name == 'attribute': obj = Attribute.factory() stackObj = SaxStackElement('attribute', obj) self.stack.append(stackObj) done = 1 elif name == 'message': stackObj = SaxStackElement('message', None) self.stack.append(stackObj) done = 1 elif name == 'resolver-message': stackObj = SaxStackElement('resolver_message', None) self.stack.append(stackObj) done = 1 elif name == 'param': obj = ConflictOverviewReasonParam.factory() stackObj = SaxStackElement('param', obj) self.stack.append(stackObj) done = 1 elif name == 'reason': obj = ConflictOverviewReason.factory() stackObj = SaxStackElement('reason', obj) self.stack.append(stackObj) done = 1 elif name == 'name': stackObj = SaxStackElement('name', None) self.stack.append(stackObj) done = 1 elif name == 'type': stackObj = SaxStackElement('typexx', None) self.stack.append(stackObj) done = 1 elif name == 'owner-name': stackObj = SaxStackElement('owner_name', None) self.stack.append(stackObj) done = 1 elif name == 'reasons': obj = ConflictOverviewReasons.factory() stackObj = SaxStackElement('reasons', obj) self.stack.append(stackObj) done = 1 elif name == 'object': obj = ConflictOverviewObject.factory() stackObj = SaxStackElement('object', obj) self.stack.append(stackObj) done = 1 elif name == 'conflicting-objects': obj = ConflictingObjects.factory() stackObj = SaxStackElement('conflicting_objects', obj) self.stack.append(stackObj) done = 1 elif name == 'overview': obj = ConflictOverview.factory() stackObj = SaxStackElement('overview', obj) self.stack.append(stackObj) done = 1 elif name == 'conflict': obj = Conflict.factory() stackObj = SaxStackElement('conflict', obj) self.stack.append(stackObj) done = 1 elif name == 'database-id': stackObj = SaxStackElement('database_id', None) self.stack.append(stackObj) done = 1 elif name == 'guid': stackObj = SaxStackElement('guid', None) self.stack.append(stackObj) done = 1 elif name == 'parameter': obj = ResolveParameter.factory() stackObj = SaxStackElement('parameter', obj) self.stack.append(stackObj) done = 1 elif name == 'parameters': obj = ResolveParameters.factory() stackObj = SaxStackElement('parameters', obj) self.stack.append(stackObj) done = 1 elif name == 'option': obj = ResolveOption.factory() stackObj = SaxStackElement('option', obj) self.stack.append(stackObj) done = 1 elif name == 'errcode': stackObj = SaxStackElement('errcode', None) self.stack.append(stackObj) done = 1 elif name == 'errmsg': stackObj = SaxStackElement('errmsg', None) self.stack.append(stackObj) done = 1 elif name == 'data': obj = Data.factory() stackObj = SaxStackElement('data', obj) self.stack.append(stackObj) done = 1 elif name == 'backup-object': obj = backup_object.factory() val = attrs.get('guid', None) if val is not None: obj.set_guid(val) val = attrs.get('type', None) if val is not None: obj.set_type(val) val = attrs.get('name', None) if val is not None: obj.set_name(val) stackObj = SaxStackElement('backup_object', obj) self.stack.append(stackObj) done = 1 elif name == 'dump-status': obj = DumpStatusFull.factory() stackObj = SaxStackElement('dump_status', obj) self.stack.append(stackObj) done = 1 elif name == 'volumes': obj = volumes.factory() stackObj = SaxStackElement('volumes', obj) self.stack.append(stackObj) done = 1 elif name == 'volume': obj = DumpVolume.factory() stackObj = SaxStackElement('volume', obj) self.stack.append(stackObj) done = 1 elif name == 'related-dumps': obj = related_dumps.factory() stackObj = SaxStackElement('related_dumps', obj) self.stack.append(stackObj) done = 1 elif name == 'related-dump': stackObj = SaxStackElement('related_dump', None) self.stack.append(stackObj) done = 1 elif name == 'dump': obj = Dump.factory() stackObj = SaxStackElement('dump', obj) self.stack.append(stackObj) done = 1 elif name == 'task-status': obj = TaskStatus.factory() stackObj = SaxStackElement('task_status', obj) self.stack.append(stackObj) done = 1 elif name == 'dumps-storage-credentials': obj = DumpsStorageCredentials.factory() stackObj = SaxStackElement('dumps_storage_credentials', obj) self.stack.append(stackObj) done = 1 elif name == 'additional-info': obj = MigrationTaskInfo.factory() stackObj = SaxStackElement('additional_info', obj) self.stack.append(stackObj) done = 1 elif name == 'step': obj = SessionStep.factory() stackObj = SaxStackElement('step', obj) self.stack.append(stackObj) done = 1 elif name == 'steps-passed': obj = SessionSteps.factory() stackObj = SaxStackElement('steps_passed', obj) self.stack.append(stackObj) done = 1 elif name == 'task': obj = Task.factory() stackObj = SaxStackElement('task', obj) self.stack.append(stackObj) done = 1 elif name == 'session': obj = Session.factory() stackObj = SaxStackElement('session', obj) self.stack.append(stackObj) done = 1 elif name == 'record': obj = Record.factory() stackObj = SaxStackElement('record', obj) self.stack.append(stackObj) done = 1 elif name == 'owner-guid': stackObj = SaxStackElement('owner_guid', None) self.stack.append(stackObj) done = 1 elif name == 'id': stackObj = SaxStackElement('id', None) self.stack.append(stackObj) done = 1 elif name == 'metainformation': obj = Metainformation.factory() stackObj = SaxStackElement('metainformation', obj) self.stack.append(stackObj) done = 1 elif name == 'objects-to-select': obj = ObjectsToSelect.factory() stackObj = SaxStackElement('objects_to_select', obj) self.stack.append(stackObj) done = 1 elif name == 'display': obj = ObjectDisplay.factory() stackObj = SaxStackElement('display', obj) self.stack.append(stackObj) done = 1 elif name == 'select': obj = ObjectSelect.factory() stackObj = SaxStackElement('select', obj) self.stack.append(stackObj) done = 1 elif name == 'objects': obj = Objects.factory() stackObj = SaxStackElement('objects', obj) self.stack.append(stackObj) done = 1 elif name == 'contact': stackObj = SaxStackElement('contact', None) self.stack.append(stackObj) done = 1 elif name == 'clients': obj = clients.factory() stackObj = SaxStackElement('clients', obj) self.stack.append(stackObj) done = 1 elif name == 'client': obj = ObjTypeClient.factory() stackObj = SaxStackElement('client', obj) self.stack.append(stackObj) done = 1 elif name == 'domains': obj = domains.factory() stackObj = SaxStackElement('domains', obj) self.stack.append(stackObj) done = 1 elif name == 'domain': obj = ObjTypeDomain.factory() stackObj = SaxStackElement('domain', obj) self.stack.append(stackObj) done = 1 elif name == 'information': obj = InformationType.factory() stackObj = SaxStackElement('information', obj) self.stack.append(stackObj) done = 1 elif name == 'vendor-login': stackObj = SaxStackElement('vendor_login', None) self.stack.append(stackObj) done = 1 elif name == 'capability-info': obj = AgentCapabilityInfoType.factory() stackObj = SaxStackElement('capability_info', obj) self.stack.append(stackObj) done = 1 elif name == 'value': obj = DumpTransformerOptionValue.factory() stackObj = SaxStackElement('value', obj) self.stack.append(stackObj) done = 1 elif name == 'dump-transformer-option': obj = DumpTransformerOption.factory() stackObj = SaxStackElement('dump_transformer_option', obj) self.stack.append(stackObj) done = 1 elif name == 'dump-transformer-options': obj = DumpTransformerOptions.factory() stackObj = SaxStackElement('dump_transformer_options', obj) self.stack.append(stackObj) done = 1 elif name == 'reseller': obj = ObjTypeReseller.factory() stackObj = SaxStackElement('reseller', obj) self.stack.append(stackObj) done = 1 elif name == 'admin-info': obj = ObjAdminInfoType.factory() stackObj = SaxStackElement('admin_info', obj) self.stack.append(stackObj) done = 1 elif name == 'server': obj = ObjServerType.factory() stackObj = SaxStackElement('server', obj) self.stack.append(stackObj) done = 1 elif name == 'license': obj = MigrationObjectServerLicense.factory() stackObj = SaxStackElement('license', obj) self.stack.append(stackObj) done = 1 elif name == 'restore-task-result': obj = RestoreTaskResult.factory() stackObj = SaxStackElement('restore_task_result', obj) self.stack.append(stackObj) done = 1 elif name == 'task-id': obj = TaskId.factory() stackObj = SaxStackElement('task_id', obj) self.stack.append(stackObj) done = 1 elif name == 'task-list': obj = TaskList.factory() stackObj = SaxStackElement('task_list', obj) self.stack.append(stackObj) done = 1 elif name == 'session-list': obj = SessionList.factory() stackObj = SaxStackElement('session_list', obj) self.stack.append(stackObj) done = 1 elif name == 'task-log': obj = TaskLog.factory() stackObj = SaxStackElement('task_log', obj) self.stack.append(stackObj) done = 1 elif name == 'dump-list': obj = DumpList.factory() stackObj = SaxStackElement('dump_list', obj) self.stack.append(stackObj) done = 1 elif name == 'check-dump-result': obj = CheckDumpResult.factory() stackObj = SaxStackElement('check_dump_result', obj) self.stack.append(stackObj) done = 1 elif name == 'scout-result': obj = ScoutResult.factory() stackObj = SaxStackElement('scout_result', obj) self.stack.append(stackObj) done = 1 elif name == 'quick-info': obj = QuickInfo.factory() stackObj = SaxStackElement('quick_info', obj) self.stack.append(stackObj) done = 1 elif name == 'migration-objects-list': obj = MigrationObjectList.factory() stackObj = SaxStackElement('migration_objects_list', obj) self.stack.append(stackObj) done = 1 elif name == 'agent-credentials': obj = AgentCredentials.factory() stackObj = SaxStackElement('agent_credentials', obj) self.stack.append(stackObj) done = 1 elif name == 'migration-ip-mapping': obj = IPMapping.factory() stackObj = SaxStackElement('migration_ip_mapping', obj) self.stack.append(stackObj) done = 1 elif name == 'migration-db-mapping': obj = DBMapping.factory() stackObj = SaxStackElement('migration_db_mapping', obj) self.stack.append(stackObj) done = 1 elif name == 'migration-owners': obj = OwnersMapping.factory() stackObj = SaxStackElement('migration_owners', obj) self.stack.append(stackObj) done = 1 elif name == 'migration-restore-policy': obj = ConflictResolutionRules.factory() stackObj = SaxStackElement('migration_restore_policy', obj) self.stack.append(stackObj) done = 1 elif name == 'migration-selected-objects': obj = MigrationObjectList.factory() stackObj = SaxStackElement('migration_selected_objects', obj) self.stack.append(stackObj) done = 1 elif name == 'dst-temporary-directory': obj = DstTemporaryDirectory.factory() stackObj = SaxStackElement('dst_temporary_directory', obj) self.stack.append(stackObj) done = 1 elif name == 'config-parameters': obj = ConfigParameters.factory() stackObj = SaxStackElement('config_parameters', obj) self.stack.append(stackObj) done = 1 elif name == 'migration-capability-info': obj = MigrationCapabilityInfo.factory() stackObj = SaxStackElement('migration_capability_info', obj) self.stack.append(stackObj) done = 1 elif name == 'migration-download-speed': obj = DownloadSpeed.factory() stackObj = SaxStackElement('migration_download_speed', obj) self.stack.append(stackObj) done = 1 elif name == 'child-dumps-list': obj = ChildDumpsList.factory() stackObj = SaxStackElement('child_dumps_list', obj) self.stack.append(stackObj) done = 1 elif name == 'dump-name': obj = DumpName.factory() stackObj = SaxStackElement('dump_name', obj) self.stack.append(stackObj) done = 1 elif name == 'repository-check-errors': obj = RepositoryCheckErrors.factory() stackObj = SaxStackElement('repository_check_errors', obj) self.stack.append(stackObj) done = 1 elif name == 'detected-panel': obj = DetectedPanel.factory() stackObj = SaxStackElement('detected_panel', obj) self.stack.append(stackObj) done = 1 elif name == 'os-info': obj = OsInfo.factory() stackObj = SaxStackElement('os_info', obj) self.stack.append(stackObj) done = 1 elif name == 'remote-fs': obj = FsList.factory() stackObj = SaxStackElement('remote_fs', obj) self.stack.append(stackObj) done = 1 elif name == 'package-installed': obj = PackageInstalled.factory() stackObj = SaxStackElement('package_installed', obj) self.stack.append(stackObj) done = 1 elif name == 'fs': obj = Fs.factory() stackObj = SaxStackElement('fs', obj) self.stack.append(stackObj) done = 1 elif name == 'session-id': obj = SessionId.factory() stackObj = SaxStackElement('session_id', obj) self.stack.append(stackObj) done = 1 elif name == 'details': obj = details.factory() stackObj = SaxStackElement('details', obj) self.stack.append(stackObj) done = 1 elif name == 'content-file-name': stackObj = SaxStackElement('content_file_name', None) self.stack.append(stackObj) done = 1 elif name == 'selected-objects': obj = SelectedObjects.factory() stackObj = SaxStackElement('selected_objects', obj) self.stack.append(stackObj) done = 1 elif name == 'source-hostname': stackObj = SaxStackElement('source_hostname', None) self.stack.append(stackObj) done = 1 elif name == 'migrating-objects': obj = MigrationTaskInfoMigratingObjects.factory() stackObj = SaxStackElement('migrating_objects', obj) self.stack.append(stackObj) done = 1 elif name == 'backup': obj = TaskStatus.factory() stackObj = SaxStackElement('backup', obj) self.stack.append(stackObj) done = 1 elif name == 'transfer': obj = TaskStatus.factory() stackObj = SaxStackElement('transfer', obj) self.stack.append(stackObj) done = 1 elif name == 'restore': obj = TaskStatusRestore.factory() stackObj = SaxStackElement('restore', obj) self.stack.append(stackObj) done = 1 elif name == 'conflict-resolve': obj = TaskStatus.factory() stackObj = SaxStackElement('conflict_resolve', obj) self.stack.append(stackObj) done = 1 elif name == 'import': obj = TaskStatus.factory() stackObj = SaxStackElement('importxx', obj) self.stack.append(stackObj) done = 1 elif name == 'deploy': obj = TaskStatus.factory() stackObj = SaxStackElement('deploy', obj) self.stack.append(stackObj) done = 1 elif name == 'working': obj = Working.factory() stackObj = SaxStackElement('working', obj) self.stack.append(stackObj) done = 1 elif name == 'finished': obj = Finished.factory() stackObj = SaxStackElement('finished', obj) self.stack.append(stackObj) done = 1 elif name == 'stopped': obj = Stopped.factory() stackObj = SaxStackElement('stopped', obj) self.stack.append(stackObj) done = 1 elif name == 'mixed': obj = TaskStatusMixed.factory() stackObj = SaxStackElement('mixed', obj) self.stack.append(stackObj) done = 1 elif name == 'starting': obj = Starting.factory() stackObj = SaxStackElement('starting', obj) self.stack.append(stackObj) done = 1 elif name == 'dumping': obj = WorkingProgress.factory() stackObj = SaxStackElement('dumping', obj) self.stack.append(stackObj) done = 1 elif name == 'current-object': obj = CurrentObject.factory() stackObj = SaxStackElement('current_object', obj) self.stack.append(stackObj) done = 1 elif name == 'object-specification': obj = ObjectSpecification.factory() stackObj = SaxStackElement('object_specification', obj) self.stack.append(stackObj) done = 1 elif name == 'dump-specification': obj = DumpSpecification.factory() stackObj = SaxStackElement('dump_specification', obj) self.stack.append(stackObj) done = 1 elif name == 'misc': obj = BackupTaskDescriptionMisc.factory() stackObj = SaxStackElement('misc', obj) self.stack.append(stackObj) done = 1 elif name == 'backup-specification': obj = BackupSpecification.factory() stackObj = SaxStackElement('backup_specification', obj) self.stack.append(stackObj) done = 1 elif name == 'backup-parameters': stackObj = SaxStackElement('backup_parameters', None) self.stack.append(stackObj) done = 1 elif name == 'backup-options': obj = BackupOptions.factory() stackObj = SaxStackElement('backup_options', obj) self.stack.append(stackObj) done = 1 elif name == 'object-to-backup': obj = BackupObjectIdentifier.factory() stackObj = SaxStackElement('object_to_backup', obj) self.stack.append(stackObj) done = 1 elif name == 'object-to-exclude': obj = BackupObjectIdentifier.factory() stackObj = SaxStackElement('object_to_exclude', obj) self.stack.append(stackObj) done = 1 elif name == 'file-to-exclude': stackObj = SaxStackElement('file_to_exclude', None) self.stack.append(stackObj) done = 1 elif name == 'dst-host-parameters': obj = DstHostParameters.factory() stackObj = SaxStackElement('dst_host_parameters', obj) self.stack.append(stackObj) done = 1 elif name == 'source': obj = RestoreTaskDescriptionSource.factory() stackObj = SaxStackElement('source', obj) self.stack.append(stackObj) done = 1 elif name == 'ignore-errors': obj = IgnoreErrors.factory() stackObj = SaxStackElement('ignore_errors', obj) self.stack.append(stackObj) done = 1 elif name == 'conflict-resolution-rules': obj = ConflictResolutionRules.factory() stackObj = SaxStackElement('conflict_resolution_rules', obj) self.stack.append(stackObj) done = 1 elif name == 'content-filter': obj = RestoreTaskContentFilterInfo.factory() stackObj = SaxStackElement('content_filter', obj) self.stack.append(stackObj) done = 1 elif name == 'backup-password': stackObj = SaxStackElement('backup_password', None) self.stack.append(stackObj) done = 1 elif name == 'all': obj = EmptyType.factory() stackObj = SaxStackElement('all', obj) self.stack.append(stackObj) done = 1 elif name == 'selected': obj = RestoreTaskDescriptionObjectsSelected.factory() stackObj = SaxStackElement('selected', obj) self.stack.append(stackObj) done = 1 elif name == 'content-type': stackObj = SaxStackElement('content_type', None) self.stack.append(stackObj) done = 1 elif name == 'content-data': stackObj = SaxStackElement('content_data', None) self.stack.append(stackObj) done = 1 elif name == 'ignore-error': obj = IgnoreError.factory() stackObj = SaxStackElement('ignore_error', obj) self.stack.append(stackObj) done = 1 elif name == 'resolution': obj = Resolution.factory() stackObj = SaxStackElement('resolution', obj) self.stack.append(stackObj) done = 1 elif name == 'dump-objects': obj = DumpObjects.factory() stackObj = SaxStackElement('dump_objects', obj) self.stack.append(stackObj) done = 1 elif name == 'policy': obj = Policy.factory() stackObj = SaxStackElement('policy', obj) self.stack.append(stackObj) done = 1 elif name == 'rule': obj = Rule.factory() stackObj = SaxStackElement('rule', obj) self.stack.append(stackObj) done = 1 elif name == 'do-not-restore': obj = ResolutionDoNotRestore.factory() stackObj = SaxStackElement('do_not_restore', obj) self.stack.append(stackObj) done = 1 elif name == 'proceed-with-current': obj = ResolutionProceedWithCurrent.factory() stackObj = SaxStackElement('proceed_with_current', obj) self.stack.append(stackObj) done = 1 elif name == 'automatic': obj = ResolutionAutomatic.factory() stackObj = SaxStackElement('automatic', obj) self.stack.append(stackObj) done = 1 elif name == 'overuse': obj = ResolutionOveruse.factory() stackObj = SaxStackElement('overuse', obj) self.stack.append(stackObj) done = 1 elif name == 'overwrite': obj = ResolutionOverwrite.factory() stackObj = SaxStackElement('overwrite', obj) self.stack.append(stackObj) done = 1 elif name == 'rename': obj = ResolutionRename.factory() stackObj = SaxStackElement('rename', obj) self.stack.append(stackObj) done = 1 elif name == 'host-credentials': obj = HostCredentials.factory() stackObj = SaxStackElement('host_credentials', obj) self.stack.append(stackObj) done = 1 elif name == 'agent-executable': stackObj = SaxStackElement('agent_executable', None) self.stack.append(stackObj) done = 1 elif name == 'log-directory': stackObj = SaxStackElement('log_directory', None) self.stack.append(stackObj) done = 1 elif name == 'login': stackObj = SaxStackElement('login', None) self.stack.append(stackObj) done = 1 elif name == 'password': stackObj = SaxStackElement('password', None) self.stack.append(stackObj) done = 1 elif name == 'hostname': stackObj = SaxStackElement('hostname', None) self.stack.append(stackObj) done = 1 elif name == 'url': stackObj = SaxStackElement('url', None) self.stack.append(stackObj) done = 1 elif name == 'admin-login': stackObj = SaxStackElement('admin_login', None) self.stack.append(stackObj) done = 1 elif name == 'admin-password': stackObj = SaxStackElement('admin_password', None) self.stack.append(stackObj) done = 1 elif name == 'src': obj = DumpSpecification.factory() stackObj = SaxStackElement('src', obj) self.stack.append(stackObj) done = 1 elif name == 'dst': obj = DumpSpecification.factory() stackObj = SaxStackElement('dst', obj) self.stack.append(stackObj) done = 1 elif name == 'name-of-info-xml-file': stackObj = SaxStackElement('name_of_info_xml_file', None) self.stack.append(stackObj) done = 1 elif name == 'root-dir': stackObj = SaxStackElement('root_dir', None) self.stack.append(stackObj) done = 1 elif name == 'file-name': stackObj = SaxStackElement('file_name', None) self.stack.append(stackObj) done = 1 elif name == 'backup-password-plain': stackObj = SaxStackElement('backup_password_plain', None) self.stack.append(stackObj) done = 1 elif name == 'ignore-backup-password': stackObj = SaxStackElement('ignore_backup_password', None) self.stack.append(stackObj) done = 1 elif name == 'ignore-backup-sign': stackObj = SaxStackElement('ignore_backup_sign', None) self.stack.append(stackObj) done = 1 elif name == 'source-ftps': stackObj = SaxStackElement('source_ftps', None) self.stack.append(stackObj) done = 1 elif name == 'destination': stackObj = SaxStackElement('destination', None) self.stack.append(stackObj) done = 1 elif name == 'shared': obj = IpPairType.factory() stackObj = SaxStackElement('shared', obj) self.stack.append(stackObj) done = 1 elif name == 'exclusive': obj = IpPairType.factory() stackObj = SaxStackElement('exclusive', obj) self.stack.append(stackObj) done = 1 elif name == 'owner': obj = OwnerMapOwner.factory() stackObj = SaxStackElement('owner', obj) self.stack.append(stackObj) done = 1 elif name == 'child': obj = OwnerMapChild.factory() stackObj = SaxStackElement('child', obj) self.stack.append(stackObj) done = 1 elif name == 'set-owner': obj = SetOwner.factory() stackObj = SaxStackElement('set_owner', obj) self.stack.append(stackObj) done = 1 elif name == 'mapping': obj = DBMappingPair.factory() stackObj = SaxStackElement('mapping', obj) self.stack.append(stackObj) done = 1 elif name == 'version': stackObj = SaxStackElement('version', None) self.stack.append(stackObj) done = 1 elif name == 'mode': stackObj = SaxStackElement('mode', None) self.stack.append(stackObj) done = 1 elif name == 'hosting-disk-usage': stackObj = SaxStackElement('hosting_disk_usage', None) self.stack.append(stackObj) done = 1 elif name == 'mail-disk-usage': stackObj = SaxStackElement('mail_disk_usage', None) self.stack.append(stackObj) done = 1 elif name == 'db-disk-usage': stackObj = SaxStackElement('db_disk_usage', None) self.stack.append(stackObj) done = 1 elif name == 'domain-aliases': stackObj = SaxStackElement('domain_aliases', None) self.stack.append(stackObj) done = 1 elif name == 'mail-accounts': stackObj = SaxStackElement('mail_accounts', None) self.stack.append(stackObj) done = 1 elif name == 'web-users': stackObj = SaxStackElement('web_users', None) self.stack.append(stackObj) done = 1 elif name == 'maillists': stackObj = SaxStackElement('maillists', None) self.stack.append(stackObj) done = 1 elif name == 'top-object-type': stackObj = SaxStackElement('top_object_type', None) self.stack.append(stackObj) done = 1 elif name == 'top-object-id': stackObj = SaxStackElement('top_object_id', None) self.stack.append(stackObj) done = 1 elif name == 'group': obj = MigrationCapabiltyInfoGroup.factory() stackObj = SaxStackElement('group', obj) self.stack.append(stackObj) done = 1 elif name == 'severity': stackObj = SaxStackElement('severity', None) self.stack.append(stackObj) done = 1 elif name == 'text': stackObj = SaxStackElement('text', None) self.stack.append(stackObj) done = 1 elif name == 'resolutionDescription': obj = MigrationCapabiltyMessageResolutionType.factory() stackObj = SaxStackElement('resolutionDescription', obj) self.stack.append(stackObj) done = 1 elif name == 'objects-list': obj = objects_list.factory() stackObj = SaxStackElement('objects_list', obj) self.stack.append(stackObj) done = 1 elif name == 'components': obj = AgentCapabilityComponentsType.factory() stackObj = SaxStackElement('components', obj) self.stack.append(stackObj) done = 1 elif name == 'miscellaneous': obj = AgentCapabilityMiscellaneousType.factory() stackObj = SaxStackElement('miscellaneous', obj) self.stack.append(stackObj) done = 1 elif name == 'database-servers': obj = AgentCapabilityDatabaseServersType.factory() stackObj = SaxStackElement('database_servers', obj) self.stack.append(stackObj) done = 1 elif name == 'apache-modules': obj = AgentCapabilityApacheModulesType.factory() stackObj = SaxStackElement('apache_modules', obj) self.stack.append(stackObj) done = 1 elif name == 'resource': obj = AgentCapabilityNameValueType.factory() stackObj = SaxStackElement('resource', obj) self.stack.append(stackObj) done = 1 elif name == 'setting': obj = AgentCapabilityNameValueType.factory() stackObj = SaxStackElement('setting', obj) self.stack.append(stackObj) done = 1 elif name == 'host': stackObj = SaxStackElement('host', None) self.stack.append(stackObj) done = 1 elif name == 'port': stackObj = SaxStackElement('port', None) self.stack.append(stackObj) done = 1 elif name == 'local': stackObj = SaxStackElement('local', None) self.stack.append(stackObj) done = 1 elif name == 'database-server': obj = AgentCapabilityDatabaseServerType.factory() stackObj = SaxStackElement('database_server', obj) self.stack.append(stackObj) done = 1 elif name == 'module': obj = AgentCapabilityNameValueType.factory() stackObj = SaxStackElement('module', obj) self.stack.append(stackObj) done = 1 elif name == 'urlText': stackObj = SaxStackElement('urlText', None) self.stack.append(stackObj) done = 1 elif name == 'componentName': stackObj = SaxStackElement('componentName', None) self.stack.append(stackObj) done = 1 elif name == 'env': obj = env.factory() val = attrs.get('name', None) if val is not None: obj.set_name(val) stackObj = SaxStackElement('env', obj) self.stack.append(stackObj) done = 1 elif name == 'repository-check-error': obj = RepositoryCheckError.factory() stackObj = SaxStackElement('repository_check_error', obj) self.stack.append(stackObj) done = 1 elif name == 'operation': stackObj = SaxStackElement('operation', None) self.stack.append(stackObj) done = 1 if not done: self.reportError('"%s" element not allowed here.' % name) def endElement(self, name): done = 0 if name == 'PlainData': if len(self.stack) == 1: self.root = self.stack[-1].obj self.stack.pop() done = 1 elif name == 'plain-data': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_plain_data(content) self.stack.pop() done = 1 elif name == 'conflicts-description': if len(self.stack) >= 2: self.stack[-2].obj.set_conflicts_description(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dump-validity-error': if len(self.stack) >= 2: self.stack[-2].obj.add_dump_validity_error(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dump-overview': if len(self.stack) >= 2: self.stack[-2].obj.set_dump_overview(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'plesk-object-identifier': if len(self.stack) >= 2: self.stack[-2].obj.set_plesk_object_identifier(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'required-resource-description': if len(self.stack) >= 2: self.stack[-2].obj.set_required_resource_description(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'ip': if len(self.stack) >= 2: self.stack[-2].obj.set_ip(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'database': if len(self.stack) >= 2: self.stack[-2].obj.set_database(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'db-server': if len(self.stack) >= 2: self.stack[-2].obj.set_db_server(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'site-app': if len(self.stack) >= 2: self.stack[-2].obj.set_site_app(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'service-plan': if len(self.stack) >= 2: self.stack[-2].obj.set_service_plan(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'subscription': if len(self.stack) >= 2: self.stack[-2].obj.set_subscription(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'component': if len(self.stack) >= 2: self.stack[-2].obj.set_component(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'reason-description': if len(self.stack) >= 2: self.stack[-2].obj.set_reason_description(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'resolve-options': if len(self.stack) >= 2: self.stack[-2].obj.set_resolve_options(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'resource-usage': if len(self.stack) >= 2: self.stack[-2].obj.set_resource_usage(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'unique-resource': if len(self.stack) >= 2: self.stack[-2].obj.set_unique_resource(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'timing': if len(self.stack) >= 2: self.stack[-2].obj.set_timing(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'configuration': if len(self.stack) >= 2: self.stack[-2].obj.set_configuration(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'business-model': if len(self.stack) >= 2: self.stack[-2].obj.set_business_model(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'node': if len(self.stack) >= 2: self.stack[-2].obj.add_node(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'context': if len(self.stack) >= 2: self.stack[-2].obj.set_context(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'attributes': if len(self.stack) >= 2: self.stack[-2].obj.set_attributes(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'path': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.add_path(content) self.stack.pop() done = 1 elif name == 'attribute': if len(self.stack) >= 2: self.stack[-2].obj.add_attribute(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'message': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_message(content) self.stack.pop() done = 1 elif name == 'resolver-message': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_resolver_message(content) self.stack.pop() done = 1 elif name == 'param': if len(self.stack) >= 2: self.stack[-2].obj.add_param(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'reason': if len(self.stack) >= 2: self.stack[-2].obj.add_reason(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'name': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_name(content) self.stack.pop() done = 1 elif name == 'type': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_type(content) self.stack.pop() done = 1 elif name == 'owner-name': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_owner_name(content) self.stack.pop() done = 1 elif name == 'reasons': if len(self.stack) >= 2: self.stack[-2].obj.set_reasons(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'object': if len(self.stack) >= 2: self.stack[-2].obj.add_object(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'conflicting-objects': if len(self.stack) >= 2: self.stack[-2].obj.set_conflicting_objects(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'overview': if len(self.stack) >= 2: self.stack[-2].obj.set_overview(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'conflict': if len(self.stack) >= 2: self.stack[-2].obj.add_conflict(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'database-id': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_database_id(content) self.stack.pop() done = 1 elif name == 'guid': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_guid(content) self.stack.pop() done = 1 elif name == 'parameter': if len(self.stack) >= 2: self.stack[-2].obj.set_parameter(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'parameters': if len(self.stack) >= 2: self.stack[-2].obj.set_parameters(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'option': if len(self.stack) >= 2: self.stack[-2].obj.add_option(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'errcode': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_errcode(content) self.stack.pop() done = 1 elif name == 'errmsg': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_errmsg(content) self.stack.pop() done = 1 elif name == 'data': if len(self.stack) >= 2: self.stack[-2].obj.set_data(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'backup-object': if len(self.stack) >= 2: self.stack[-2].obj.set_backup_object(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dump-status': if len(self.stack) >= 2: self.stack[-2].obj.add_dump_status(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'volumes': if len(self.stack) >= 2: self.stack[-2].obj.set_volumes(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'volume': if len(self.stack) >= 2: self.stack[-2].obj.add_volume(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'related-dumps': if len(self.stack) >= 2: self.stack[-2].obj.set_related_dumps(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'related-dump': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.add_related_dump(content) self.stack.pop() done = 1 elif name == 'dump': if len(self.stack) >= 2: self.stack[-2].obj.add_dump(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'task-status': if len(self.stack) >= 2: self.stack[-2].obj.set_task_status(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dumps-storage-credentials': if len(self.stack) >= 2: self.stack[-2].obj.set_dumps_storage_credentials(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'additional-info': if len(self.stack) >= 2: self.stack[-2].obj.set_additional_info(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'step': if len(self.stack) >= 2: self.stack[-2].obj.add_step(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'steps-passed': if len(self.stack) >= 2: self.stack[-2].obj.set_steps_passed(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'task': if len(self.stack) >= 2: self.stack[-2].obj.add_task(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'session': if len(self.stack) >= 2: self.stack[-2].obj.add_session(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'record': if len(self.stack) >= 2: self.stack[-2].obj.add_record(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'owner-guid': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_owner_guid(content) self.stack.pop() done = 1 elif name == 'id': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_id(content) self.stack.pop() done = 1 elif name == 'metainformation': if len(self.stack) >= 2: self.stack[-2].obj.set_metainformation(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'objects-to-select': if len(self.stack) >= 2: self.stack[-2].obj.set_objects_to_select(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'display': if len(self.stack) >= 2: self.stack[-2].obj.set_display(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'select': if len(self.stack) >= 2: self.stack[-2].obj.set_select(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'objects': if len(self.stack) >= 2: self.stack[-2].obj.set_objects(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'contact': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_contact(content) self.stack.pop() done = 1 elif name == 'clients': if len(self.stack) >= 2: self.stack[-2].obj.set_clients(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'client': if len(self.stack) >= 2: self.stack[-2].obj.add_client(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'domains': if len(self.stack) >= 2: self.stack[-2].obj.set_domains(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'domain': if len(self.stack) >= 2: self.stack[-2].obj.add_domain(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'information': if len(self.stack) >= 2: self.stack[-2].obj.set_information(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'vendor-login': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_vendor_login(content) self.stack.pop() done = 1 elif name == 'capability-info': if len(self.stack) >= 2: self.stack[-2].obj.set_capability_info(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'value': if len(self.stack) >= 2: self.stack[-2].obj.set_value(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dump-transformer-option': if len(self.stack) >= 2: self.stack[-2].obj.add_dump_transformer_option(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dump-transformer-options': if len(self.stack) >= 2: self.stack[-2].obj.set_dump_transformer_options(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'reseller': if len(self.stack) >= 2: self.stack[-2].obj.add_reseller(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'admin-info': if len(self.stack) >= 2: self.stack[-2].obj.set_admin_info(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'server': if len(self.stack) >= 2: self.stack[-2].obj.set_server(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'license': if len(self.stack) >= 2: self.stack[-2].obj.set_license(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'restore-task-result': if len(self.stack) >= 2: self.stack[-2].obj.set_restore_task_result(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'task-id': if len(self.stack) >= 2: self.stack[-2].obj.set_task_id(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'task-list': if len(self.stack) >= 2: self.stack[-2].obj.set_task_list(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'session-list': if len(self.stack) >= 2: self.stack[-2].obj.set_session_list(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'task-log': if len(self.stack) >= 2: self.stack[-2].obj.set_task_log(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dump-list': if len(self.stack) >= 2: self.stack[-2].obj.set_dump_list(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'check-dump-result': if len(self.stack) >= 2: self.stack[-2].obj.set_check_dump_result(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'scout-result': if len(self.stack) >= 2: self.stack[-2].obj.set_scout_result(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'quick-info': if len(self.stack) >= 2: self.stack[-2].obj.set_quick_info(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'migration-objects-list': if len(self.stack) >= 2: self.stack[-2].obj.set_migration_objects_list(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'agent-credentials': if len(self.stack) >= 2: self.stack[-2].obj.set_agent_credentials(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'migration-ip-mapping': if len(self.stack) >= 2: self.stack[-2].obj.set_migration_ip_mapping(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'migration-db-mapping': if len(self.stack) >= 2: self.stack[-2].obj.set_migration_db_mapping(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'migration-owners': if len(self.stack) >= 2: self.stack[-2].obj.set_migration_owners(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'migration-restore-policy': if len(self.stack) >= 2: self.stack[-2].obj.set_migration_restore_policy(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'migration-selected-objects': if len(self.stack) >= 2: self.stack[-2].obj.set_migration_selected_objects(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dst-temporary-directory': if len(self.stack) >= 2: self.stack[-2].obj.set_dst_temporary_directory(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'config-parameters': if len(self.stack) >= 2: self.stack[-2].obj.set_config_parameters(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'migration-capability-info': if len(self.stack) >= 2: self.stack[-2].obj.set_migration_capability_info(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'migration-download-speed': if len(self.stack) >= 2: self.stack[-2].obj.set_migration_download_speed(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'child-dumps-list': if len(self.stack) >= 2: self.stack[-2].obj.set_child_dumps_list(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dump-name': if len(self.stack) >= 2: self.stack[-2].obj.set_dump_name(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'repository-check-errors': if len(self.stack) >= 2: self.stack[-2].obj.set_repository_check_errors(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'detected-panel': if len(self.stack) >= 2: self.stack[-2].obj.add_detected_panel(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'os-info': if len(self.stack) >= 2: self.stack[-2].obj.set_os_info(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'remote-fs': if len(self.stack) >= 2: self.stack[-2].obj.set_remote_fs(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'package-installed': if len(self.stack) >= 2: self.stack[-2].obj.add_package_installed(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'fs': if len(self.stack) >= 2: self.stack[-2].obj.add_fs(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'session-id': if len(self.stack) >= 2: self.stack[-2].obj.set_session_id(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'details': if len(self.stack) >= 2: self.stack[-2].obj.set_details(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'content-file-name': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.add_content_file_name(content) self.stack.pop() done = 1 elif name == 'selected-objects': if len(self.stack) >= 2: self.stack[-2].obj.add_selected_objects(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'source-hostname': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_source_hostname(content) self.stack.pop() done = 1 elif name == 'migrating-objects': if len(self.stack) >= 2: self.stack[-2].obj.set_migrating_objects(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'backup': if len(self.stack) >= 2: self.stack[-2].obj.set_backup(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'transfer': if len(self.stack) >= 2: self.stack[-2].obj.set_transfer(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'restore': if len(self.stack) >= 2: self.stack[-2].obj.set_restore(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'conflict-resolve': if len(self.stack) >= 2: self.stack[-2].obj.set_conflict_resolve(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'import': if len(self.stack) >= 2: self.stack[-2].obj.set_import(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'deploy': if len(self.stack) >= 2: self.stack[-2].obj.set_deploy(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'working': if len(self.stack) >= 2: self.stack[-2].obj.set_working(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'finished': if len(self.stack) >= 2: self.stack[-2].obj.set_finished(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'stopped': if len(self.stack) >= 2: self.stack[-2].obj.set_stopped(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'mixed': if len(self.stack) >= 2: self.stack[-2].obj.set_mixed(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'starting': if len(self.stack) >= 2: self.stack[-2].obj.set_starting(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dumping': if len(self.stack) >= 2: self.stack[-2].obj.set_dumping(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'current-object': if len(self.stack) >= 2: self.stack[-2].obj.set_current_object(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'object-specification': if len(self.stack) >= 2: self.stack[-2].obj.set_object_specification(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dump-specification': if len(self.stack) >= 2: self.stack[-2].obj.set_dump_specification(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'misc': if len(self.stack) >= 2: self.stack[-2].obj.set_misc(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'backup-specification': if len(self.stack) >= 2: self.stack[-2].obj.set_backup_specification(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'backup-parameters': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_backup_parameters(content) self.stack.pop() done = 1 elif name == 'backup-options': if len(self.stack) >= 2: self.stack[-2].obj.set_backup_options(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'object-to-backup': if len(self.stack) >= 2: self.stack[-2].obj.add_object_to_backup(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'object-to-exclude': if len(self.stack) >= 2: self.stack[-2].obj.add_object_to_exclude(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'file-to-exclude': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.add_file_to_exclude(content) self.stack.pop() done = 1 elif name == 'dst-host-parameters': if len(self.stack) >= 2: self.stack[-2].obj.set_dst_host_parameters(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'source': if len(self.stack) >= 2: self.stack[-2].obj.set_source(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'ignore-errors': if len(self.stack) >= 2: self.stack[-2].obj.set_ignore_errors(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'conflict-resolution-rules': if len(self.stack) >= 2: self.stack[-2].obj.set_conflict_resolution_rules(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'content-filter': if len(self.stack) >= 2: self.stack[-2].obj.set_content_filter(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'backup-password': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_backup_password(content) self.stack.pop() done = 1 elif name == 'all': if len(self.stack) >= 2: self.stack[-2].obj.set_all(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'selected': if len(self.stack) >= 2: self.stack[-2].obj.set_selected(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'content-type': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_content_type(content) self.stack.pop() done = 1 elif name == 'content-data': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_content_data(content) self.stack.pop() done = 1 elif name == 'ignore-error': if len(self.stack) >= 2: self.stack[-2].obj.add_ignore_error(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'resolution': if len(self.stack) >= 2: self.stack[-2].obj.set_resolution(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dump-objects': if len(self.stack) >= 2: self.stack[-2].obj.set_dump_objects(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'policy': if len(self.stack) >= 2: self.stack[-2].obj.set_policy(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'rule': if len(self.stack) >= 2: self.stack[-2].obj.add_rule(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'do-not-restore': if len(self.stack) >= 2: self.stack[-2].obj.set_do_not_restore(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'proceed-with-current': if len(self.stack) >= 2: self.stack[-2].obj.set_proceed_with_current(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'automatic': if len(self.stack) >= 2: self.stack[-2].obj.set_automatic(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'overuse': if len(self.stack) >= 2: self.stack[-2].obj.set_overuse(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'overwrite': if len(self.stack) >= 2: self.stack[-2].obj.set_overwrite(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'rename': if len(self.stack) >= 2: self.stack[-2].obj.set_rename(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'host-credentials': if len(self.stack) >= 2: self.stack[-2].obj.set_host_credentials(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'agent-executable': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_agent_executable(content) self.stack.pop() done = 1 elif name == 'log-directory': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_log_directory(content) self.stack.pop() done = 1 elif name == 'login': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_login(content) self.stack.pop() done = 1 elif name == 'password': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_password(content) self.stack.pop() done = 1 elif name == 'hostname': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_hostname(content) self.stack.pop() done = 1 elif name == 'url': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_url(content) self.stack.pop() done = 1 elif name == 'admin-login': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_admin_login(content) self.stack.pop() done = 1 elif name == 'admin-password': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_admin_password(content) self.stack.pop() done = 1 elif name == 'src': if len(self.stack) >= 2: self.stack[-2].obj.set_src(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'dst': if len(self.stack) >= 2: self.stack[-2].obj.set_dst(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'name-of-info-xml-file': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_name_of_info_xml_file(content) self.stack.pop() done = 1 elif name == 'root-dir': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_root_dir(content) self.stack.pop() done = 1 elif name == 'file-name': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_file_name(content) self.stack.pop() done = 1 elif name == 'backup-password-plain': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_backup_password_plain(content) self.stack.pop() done = 1 elif name == 'ignore-backup-password': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_ignore_backup_password(content) self.stack.pop() done = 1 elif name == 'ignore-backup-sign': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_ignore_backup_sign(content) self.stack.pop() done = 1 elif name == 'source-ftps': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_source_ftps(content) self.stack.pop() done = 1 elif name == 'destination': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_destination(content) self.stack.pop() done = 1 elif name == 'shared': if len(self.stack) >= 2: self.stack[-2].obj.add_shared(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'exclusive': if len(self.stack) >= 2: self.stack[-2].obj.add_exclusive(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'owner': if len(self.stack) >= 2: self.stack[-2].obj.set_owner(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'child': if len(self.stack) >= 2: self.stack[-2].obj.add_child(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'set-owner': if len(self.stack) >= 2: self.stack[-2].obj.add_set_owner(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'mapping': if len(self.stack) >= 2: self.stack[-2].obj.add_mapping(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'version': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_version(content) self.stack.pop() done = 1 elif name == 'mode': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_mode(content) self.stack.pop() done = 1 elif name == 'hosting-disk-usage': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_hosting_disk_usage(content) self.stack.pop() done = 1 elif name == 'mail-disk-usage': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_mail_disk_usage(content) self.stack.pop() done = 1 elif name == 'db-disk-usage': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_db_disk_usage(content) self.stack.pop() done = 1 elif name == 'domain-aliases': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_domain_aliases(content) self.stack.pop() done = 1 elif name == 'mail-accounts': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_mail_accounts(content) self.stack.pop() done = 1 elif name == 'web-users': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_web_users(content) self.stack.pop() done = 1 elif name == 'maillists': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_maillists(content) self.stack.pop() done = 1 elif name == 'top-object-type': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_top_object_type(content) self.stack.pop() done = 1 elif name == 'top-object-id': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_top_object_id(content) self.stack.pop() done = 1 elif name == 'group': if len(self.stack) >= 2: self.stack[-2].obj.add_group(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'severity': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_severity(content) self.stack.pop() done = 1 elif name == 'text': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.add_text(content) self.stack.pop() done = 1 elif name == 'resolutionDescription': if len(self.stack) >= 2: self.stack[-2].obj.set_resolutionDescription(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'objects-list': if len(self.stack) >= 2: self.stack[-2].obj.set_objects_list(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'components': if len(self.stack) >= 2: self.stack[-2].obj.set_components(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'miscellaneous': if len(self.stack) >= 2: self.stack[-2].obj.set_miscellaneous(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'database-servers': if len(self.stack) >= 2: self.stack[-2].obj.set_database_servers(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'apache-modules': if len(self.stack) >= 2: self.stack[-2].obj.set_apache_modules(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'resource': if len(self.stack) >= 2: self.stack[-2].obj.add_resource(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'setting': if len(self.stack) >= 2: self.stack[-2].obj.add_setting(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'host': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_host(content) self.stack.pop() done = 1 elif name == 'port': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_port(content) self.stack.pop() done = 1 elif name == 'local': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_local(content) self.stack.pop() done = 1 elif name == 'database-server': if len(self.stack) >= 2: self.stack[-2].obj.add_database_server(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'module': if len(self.stack) >= 2: self.stack[-2].obj.add_module(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'urlText': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_urlText(content) self.stack.pop() done = 1 elif name == 'componentName': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_componentName(content) self.stack.pop() done = 1 elif name == 'env': if len(self.stack) >= 2: self.stack[-2].obj.add_env(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'repository-check-error': if len(self.stack) >= 2: self.stack[-2].obj.add_repository_check_error(self.stack[-1].obj) self.stack.pop() done = 1 elif name == 'operation': if len(self.stack) >= 2: content = self.stack[-1].content self.stack[-2].obj.set_operation(content) self.stack.pop() done = 1 if not done: self.reportError('"%s" element not allowed here.' % name) def characters(self, chrs, start, end): if len(self.stack) > 0: self.stack[-1].content += chrs[start:end] def reportError(self, mesg): locator = self.locator sys.stderr.write('Doc: %s Line: %d Column: %d\n' % \ (locator.getSystemId(), locator.getLineNumber(), locator.getColumnNumber() + 1)) sys.stderr.write(mesg) sys.stderr.write('\n') sys.exit(-1) #raise RuntimeError USAGE_TEXT = """ Usage: python .py [ -s ] Options: -s Use the SAX parser, not the minidom parser. """ def usage(): print USAGE_TEXT sys.exit(-1) # # SAX handler used to determine the top level element. # class SaxSelectorHandler(handler.ContentHandler): def __init__(self): self.topElementName = None def getTopElementName(self): return self.topElementName def startElement(self, name, attrs): self.topElementName = name raise StopIteration def parseSelect(inFileName): infile = file(inFileName, 'r') topElementName = None parser = make_parser() documentHandler = SaxSelectorHandler() parser.setContentHandler(documentHandler) try: try: parser.parse(infile) except StopIteration: topElementName = documentHandler.getTopElementName() if topElementName is None: raise RuntimeError, 'no top level element' topElementName = topElementName.replace('-', '_').replace(':', '_') if topElementName not in globals(): raise RuntimeError, 'no class for top element: %s' % topElementName topElement = globals()[topElementName] infile.seek(0) doc = minidom.parse(infile) finally: infile.close() rootNode = doc.childNodes[0] rootObj = topElement.factory() rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. doc = None sys.stdout.write('\n') rootObj.export(sys.stdout, 0) return rootObj def saxParse(inFileName): parser = make_parser() documentHandler = Sax_PlainDataHandler() parser.setDocumentHandler(documentHandler) parser.parse('file:%s' % inFileName) root = documentHandler.getRoot() sys.stdout.write('\n') root.export(sys.stdout, 0) return root def saxParseString(inString): parser = make_parser() documentHandler = Sax_PlainDataHandler() parser.setDocumentHandler(documentHandler) parser.feed(inString) parser.close() rootObj = documentHandler.getRoot() #sys.stdout.write('\n') #rootObj.export(sys.stdout, 0) return rootObj def parse(inFileName): doc = minidom.parse(inFileName) rootNode = doc.documentElement rootObj = PlainData.factory() rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. doc = None sys.stdout.write('\n') rootObj.export(sys.stdout, 0, name_="PlainData") return rootObj def parseString(inString): doc = minidom.parseString(inString) rootNode = doc.documentElement rootObj = PlainData.factory() rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. doc = None sys.stdout.write('\n') rootObj.export(sys.stdout, 0, name_="PlainData") return rootObj def parseLiteral(inFileName): doc = minidom.parse(inFileName) rootNode = doc.documentElement rootObj = PlainData.factory() rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. doc = None sys.stdout.write('from pmm_api_xml_protocols import *\n\n') sys.stdout.write('rootObj = PlainData(\n') rootObj.exportLiteral(sys.stdout, 0, name_="PlainData") sys.stdout.write(')\n') return rootObj def main(): args = sys.argv[1:] if len(args) == 2 and args[0] == '-s': saxParse(args[1]) elif len(args) == 1: parse(args[0]) else: usage() if __name__ == '__main__': main() #import pdb #pdb.run('main()')