Exemple #1
0
 def construct(self):
     root = xmlutil.TemplateElement('extensions')
     elem = xmlutil.SubTemplateElement(root,
                                       'extension',
                                       selector='extensions')
     make_ext(elem)
     return xmlutil.MasterTemplate(root, 1, nsmap=ext_nsmap)
Exemple #2
0
 def construct(self):
     root = MetadataTemplateElement('metadata', selector='metadata')
     elem = xmlutil.SubTemplateElement(root,
                                       'meta',
                                       selector=xmlutil.get_items)
     elem.set('key', 0)
     elem.text = 1
     return xmlutil.MasterTemplate(root, 1, nsmap=metadata_nsmap)
    def construct(self):
        root = xmlutil.TemplateElement('host')
        root.set('host')
        root.set('service')
        root.set('disabled')
        root.set('binary')
        root.set('status')
        root.set('disabled_reason')

        return xmlutil.MasterTemplate(root, 1)
    def construct(self):
        root = xmlutil.TemplateElement('services')
        elem = xmlutil.SubTemplateElement(root, 'service', selector='services')
        elem.set('binary')
        elem.set('host')
        elem.set('status')
        elem.set('state')
        elem.set('update_at')
        elem.set('disabled_reason')

        return xmlutil.MasterTemplate(root, 1)
Exemple #5
0
 def construct(self):
     root = xmlutil.TemplateElement('versions')
     elem = xmlutil.SubTemplateElement(root, 'version', selector='versions')
     make_version(elem)
     return xmlutil.MasterTemplate(root, 1, nsmap=version_nsmap)
Exemple #6
0
 def construct(self):
     sel = xmlutil.Selector('meta', xmlutil.get_items, 0)
     root = xmlutil.TemplateElement('meta', selector=sel)
     root.set('key', 0)
     root.text = 1
     return xmlutil.MasterTemplate(root, 1, nsmap=metadata_nsmap)