Example #1
0
 def reform(self, element):
     name = element.tagName.encode()
     if name != 'package':
         raise Error, 'bad package tag'
     package = element.firstChild.data.encode()
     action = element.getAttribute('action').encode()
     TextElement.__init__(self, package, action)
Example #2
0
 def reform(self, element):
     name = element.tagName.encode()
     if name != "package":
         raise Error, "bad package tag"
     package = element.firstChild.data.encode()
     action = element.getAttribute("action").encode()
     TextElement.__init__(self, package, action)
Example #3
0
 def __init__(self, package, template, mode='0100644',
              owner='root', grp_owner='root'):
     TextElement.__init__(self, 'template', template)
     self.setAttribute('package', package)
     self.setAttribute('mode', mode)
     self.setAttribute('owner', owner)
     self.setAttribute('grp_owner', grp_owner)
Example #4
0
 def __init__(self, trait, data):
     Element.__init__(self, 'debconf')
     self.setAttribute('trait', trait)
     self.dc = Debconf_object()
     self.dc.name = TextElement('name', data['name'])
     self.appendChild(self.dc.name)
     self.dc.template = TextElement('template', data['template'])
     self.appendChild(self.dc.template)
     self.dc.owners = TextElement('owners', data['owners'])
     self.appendChild(self.dc.owners)
     self.dc.value = TextElement('value', data['value'])
     self.appendChild(self.dc.value)
Example #5
0
 def __init__(self, conn, suite):
     self.conn = conn
     self.cursor = StatementCursor(self.conn, name='_Trait_')
     Element.__init__(self, 'trait')
     self.desc_element = TextElement('description', None)
     self.parent_element = Element('parents')
     self.pkg_element = Element('packages')
     self.env_element = Element('environ')
     self.templ_element = Element('templates')
     self.scripts_element = Element('scripts')
     self.debconf_element = DebConfigurationElement()
     self.appendChild(self.desc_element)
     self.appendChild(self.parent_element)
     self.appendChild(self.pkg_element)
     self.appendChild(self.env_element)
     self.appendChild(self.templ_element)
     self.appendChild(self.debconf_element)
     self.appendChild(self.scripts_element)
     self.set_suite(suite)
Example #6
0
 def append_parents(self, parents):
     for parent in parents:
         pelement = TextElement('parent', parent)
         #pelement.setAttribute('ord', str(trait.ord))
         self.parents.appendChild(pelement)
Example #7
0
 def __init__(self, etype, trait, name, value):
     TextElement.__init__(self, etype, value)
     self.setAttribute('trait', trait)
     self.setAttribute('name', name)
Example #8
0
 def __init__(self, package, action='install'):
     TextElement.__init__(self, 'package', package)
     self.setAttribute('action', action)
     self.package = package
     self.action = action
Example #9
0
 def append_families(self, rows):
     for row in rows:
         felement = TextElement('family', row.family)
         self.families.appendChild(felement)
Example #10
0
 def __init__(self, name):
     TextElement.__init__(self, 'kernel', name)
Example #11
0
 def __init__(self, name):
     TextElement.__init__(self, 'kernel', name)
Example #12
0
 def __init__(self, package, action="install"):
     TextElement.__init__(self, "package", package)
     self.setAttribute("action", action)
     self.package = package
     self.action = action
Example #13
0
 def __init__(self, trait, name, value):
     TextElement.__init__(self, "profile_variable", value)
     self.setAttribute("trait", trait)
     self.setAttribute("name", name)
Example #14
0
 def __init__(self, mtype, module, order):
     TextElement.__init__(self, 'module', module)
     self.setAttribute('machine_type', mtype)
     self.setAttribute('order', order)
Example #15
0
 def __init__(self, mtype, module, order):
     TextElement.__init__(self, 'module', module)
     self.setAttribute('machine_type', mtype)
     self.setAttribute('order', order)
Example #16
0
 def __init__(self, machine, machine_type, kernel, profile, filesystem):
     TextElement.__init__(self, 'machine', machine)
     self.setAttribute('machine_type', machine_type)
     self.setAttribute('kernel', kernel)
     self.setAttribute('profile', profile)
     self.setAttribute('filesystem', filesystem)
Example #17
0
 def __init__(self, package, template, mode="0100644", owner="root", grp_owner="root"):
     TextElement.__init__(self, "template", template)
     self.setAttribute("package", package)
     self.setAttribute("mode", mode)
     self.setAttribute("owner", owner)
     self.setAttribute("grp_owner", grp_owner)
Example #18
0
 def __init__(self, parent):
     TextElement.__init__(self, "parent", parent)
Example #19
0
 def __init__(self, parent):
     TextElement.__init__(self, 'parent', parent)
Example #20
0
 def append_traits(self, trait_rows):
     for trait in trait_rows:
         telement = TextElement('trait', trait.trait)
         telement.setAttribute('ord', str(trait.ord))
         self.traits.appendChild(telement)
Example #21
0
 def __init__(self, machine, machine_type, kernel, profile, filesystem):
     TextElement.__init__(self, 'machine', machine)
     self.setAttribute('machine_type', machine_type)
     self.setAttribute('kernel', kernel)
     self.setAttribute('profile', profile)
     self.setAttribute('filesystem', filesystem)
Example #22
0
 def __init__(self, trait, name, value):
     TextElement.__init__(self, 'profile_variable', value)
     self.setAttribute('trait', trait)
     self.setAttribute('name', name)