def construct(self): root = xmlutil.TemplateElement('storages') elem = xmlutil.SubTemplateElement(root, 'storage', selector='storages') make_storage(elem) alias = Hardware_tenant_attribute.alias namespace = Hardware_tenant_attribute.namespace return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})
def construct(self): root = xmlutil.TemplateElement('storage', selector='storage') root.append(HardwareImageMetadataMetadataTemplate()) alias = Hardware_image_metadata.alias namespace = Hardware_image_metadata.namespace return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})
def construct(self): root = xmlutil.TemplateElement('snapshots') elem = xmlutil.SubTemplateElement(root, 'snapshot', selector='snapshots') make_snapshot(elem) alias = Extended_snapshot_attributes.alias namespace = Extended_snapshot_attributes.namespace return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})