コード例 #1
0
 def construct(self):
     root = xmlutil.TemplateElement('volumes')
     elem = xmlutil.SubTemplateElement(root, 'volume', selector='volumes')
     make_volume(elem)
     alias = Volume_tenant_attribute.alias
     namespace = Volume_tenant_attribute.namespace
     return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})
コード例 #2
0
    def construct(self):
        root = xmlutil.TemplateElement('volume', selector='volume')
        root.append(VolumeImageMetadataMetadataTemplate())

        alias = Volume_image_metadata.alias
        namespace = Volume_image_metadata.namespace

        return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})
コード例 #3
0
 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})
コード例 #4
0
 def construct(self):
     root = xmlutil.TemplateElement('volume', selector='volume')
     make_volume(root)
     alias = Volume_mig_status_attribute.alias
     namespace = Volume_mig_status_attribute.namespace
     return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})
コード例 #5
0
 def construct(self):
     root = xmlutil.TemplateElement('volume_type', selector='volume_type')
     make_volume_type(root)
     alias = Volume_type_access.alias
     namespace = Volume_type_access.namespace
     return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})