Add auto install, HdInstall and state grid custom install
new file: AutoInstall/auto_install.py new file: StateGrid/state_grid.py modified: interface/ri_data.py modified: operation/exec_finish_install.sh new file: operation/finish_install.py renamed: operation/99finish_install.sh -> operation/finish_install/99finish_install.sh new file: xml/install.xml
This commit is contained in:
@@ -733,6 +733,8 @@ def init_from_xml():
|
||||
Group.init_from_xml(n)
|
||||
elif n.nodeName == 'services':
|
||||
Service.init_from_xml(n)
|
||||
elif n.nodeName == 'stategrid':
|
||||
StateGrid.init_from_xml(n)
|
||||
|
||||
def init_from_xml_and_os():
|
||||
''' init all classes in this module from file and os '''
|
||||
@@ -768,3 +770,27 @@ def to_xml():
|
||||
|
||||
PrettyPrint(xmldoc, f)
|
||||
f.close()
|
||||
|
||||
class StateGrid():
|
||||
''' state grid custom install data '''
|
||||
username = ''
|
||||
home_dir = ''
|
||||
shell = ''
|
||||
|
||||
@staticmethod
|
||||
def init_from_xml(node):
|
||||
''' init State Grid data from xml node '''
|
||||
for k in node.attributes.keys():
|
||||
setattr(StateGrid, k, node.attributes[k].value.encode('ascii'))
|
||||
|
||||
@staticmethod
|
||||
def to_xml(doc, p_node):
|
||||
''' write State Grid data into xml
|
||||
doc - xml document instance
|
||||
p_node - xml node (parent node)'''
|
||||
stgd = doc.createElement('stategrid')
|
||||
for st in ('username','home_dir','shell'):
|
||||
to_xml_attr(doc, stgd, StateGrid, st)
|
||||
|
||||
p_node.appendChild(stgd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user