Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 7
0
 def __init__(self, etype, trait, name, value):
     TextElement.__init__(self, etype, value)
     self.setAttribute('trait', trait)
     self.setAttribute('name', name)
Exemplo n.º 8
0
 def __init__(self, package, action='install'):
     TextElement.__init__(self, 'package', package)
     self.setAttribute('action', action)
     self.package = package
     self.action = action
Exemplo n.º 9
0
 def append_families(self, rows):
     for row in rows:
         felement = TextElement('family', row.family)
         self.families.appendChild(felement)
Exemplo n.º 10
0
 def __init__(self, name):
     TextElement.__init__(self, 'kernel', name)
Exemplo n.º 11
0
 def __init__(self, name):
     TextElement.__init__(self, 'kernel', name)
Exemplo n.º 12
0
 def __init__(self, package, action="install"):
     TextElement.__init__(self, "package", package)
     self.setAttribute("action", action)
     self.package = package
     self.action = action
Exemplo n.º 13
0
 def __init__(self, trait, name, value):
     TextElement.__init__(self, "profile_variable", value)
     self.setAttribute("trait", trait)
     self.setAttribute("name", name)
Exemplo n.º 14
0
 def __init__(self, mtype, module, order):
     TextElement.__init__(self, 'module', module)
     self.setAttribute('machine_type', mtype)
     self.setAttribute('order', order)
Exemplo n.º 15
0
 def __init__(self, mtype, module, order):
     TextElement.__init__(self, 'module', module)
     self.setAttribute('machine_type', mtype)
     self.setAttribute('order', order)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 18
0
 def __init__(self, parent):
     TextElement.__init__(self, "parent", parent)
Exemplo n.º 19
0
 def __init__(self, parent):
     TextElement.__init__(self, 'parent', parent)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 22
0
 def __init__(self, trait, name, value):
     TextElement.__init__(self, 'profile_variable', value)
     self.setAttribute('trait', trait)
     self.setAttribute('name', name)