modify follow files for new datastructure
modified: interface/ri_data.py
remove MountPoint use new datastructure for instead
modified: interface/ri_install.py
add MakePartitions for partition
modified: interface/ri_oper.py
1.add MakePartitions class
2.modify Format, Mount, ConfigureFstab class
modified: new_partition/partition_data.py
1.add disk_from_os attribute to Partition class for disk
2.add process linux-swap(v1) in Partition class
3.force convert num and sn to int, beacause when read from install.xml
sn and num is still string.
modified: operation/format_partition.sh
1.add timeout beacause use MakePartitions, need time to generate
device file
2.add linux-swap for swap
modified: operation/functions
1.add % support, beacause of partition may use 1% to partition
disks.
new file: operation/partition_disks.sh
1.use partition_disks as parted stdin wrapper.
Signed-off-by: Qin Bo <bqin@linx-info.com>
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import re,os
|
||||
import re,os,sys
|
||||
import commands
|
||||
from xml.dom import minidom
|
||||
from xml.dom.ext import PrettyPrint
|
||||
sys.path.append('../new_partition/')
|
||||
import partition_data as p_d
|
||||
|
||||
|
||||
|
||||
# xml file names
|
||||
install_xml = '/var/install/install.xml'
|
||||
@@ -688,12 +692,10 @@ def init_from_xml():
|
||||
if n.nodeType == n.ELEMENT_NODE:
|
||||
if n.nodeName == 'serial-number':
|
||||
SerialNumber.init_from_xml(n)
|
||||
elif n.nodeName == 'partitions':
|
||||
Partition.init_from_xml(n)
|
||||
elif n.nodeName == 'disks':
|
||||
p_d.Partition.init_from_xml(n)
|
||||
elif n.nodeName == 'raids':
|
||||
Raid.init_from_xml(n)
|
||||
elif n.nodeName == 'mount-points':
|
||||
MountPoint.init_from_xml(n)
|
||||
elif n.nodeName == 'network':
|
||||
Network.init_from_xml(n)
|
||||
elif n.nodeName == 'groups':
|
||||
|
||||
Reference in New Issue
Block a user