finish ri_data module

change some ri_cmd to accompany with ri_data
This commit is contained in:
lizhi-rocky
2010-07-22 16:37:23 +08:00
parent c3e59e063f
commit 9a1bd8a5df
7 changed files with 217 additions and 49 deletions

View File

@@ -19,6 +19,10 @@ for e in root.childNodes:
MountPoint.init_from_xml(e)
elif e.nodeName == 'network':
Network.init_from_xml(e)
elif e.nodeName == 'groups':
Group.init_from_install_xml(e)
# elif e.nodeName == 'services':
# Service.init_from_install_xml(e)
xmldoc2 = minidom.Document()
root2 = xmldoc2.createElement('install')
@@ -32,7 +36,13 @@ MountPoint.list=[]
MountPoint.init_from_internal()
MountPoint.to_xml(xmldoc2, root2)
Network.to_xml(xmldoc2, root2)
Group.to_xml(xmldoc2, root2)
#Group.to_xml(xmldoc2, root2)
xmldoc_cfg = minidom.parse('./config.xml')
root_cfg = xmldoc_cfg.firstChild
#Group.init_from_config_xml(root_cfg)
#Group.to_xml(xmldoc2, root2)
Service.init_from_config_xml(root_cfg)
Service.to_xml(xmldoc2, root2)
PrettyPrint(xmldoc2)