modified: ri_data.py
zli update
This commit is contained in:
@@ -40,8 +40,7 @@ p_node - xml node (parent node)'''
|
|||||||
class Partition:
|
class Partition:
|
||||||
''' disk partition '''
|
''' disk partition '''
|
||||||
unit=''
|
unit=''
|
||||||
label=''
|
dict={}
|
||||||
list=[]
|
|
||||||
def __init__(self, dev, st, sz, tp, fs, fg, fr):
|
def __init__(self, dev, st, sz, tp, fs, fg, fr):
|
||||||
''' Partition init function '''
|
''' Partition init function '''
|
||||||
self.device = dev
|
self.device = dev
|
||||||
@@ -49,72 +48,86 @@ class Partition:
|
|||||||
self.size = sz
|
self.size = sz
|
||||||
self.type = tp
|
self.type = tp
|
||||||
self.filesystem = fs
|
self.filesystem = fs
|
||||||
self.israid = fg
|
self.flags = fg
|
||||||
self.from_os = fr
|
self.from_os = fr
|
||||||
Partition.list.append(self)
|
Partition.dict[dev] = self
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def init_from_os():
|
def init_from_os():
|
||||||
''' create a Partition instance from hardware info'''
|
''' create a Partition instance from hardware info'''
|
||||||
device_list=[]
|
device_list=[]
|
||||||
Partition.unit='MB'
|
Partition.unit='GB'
|
||||||
p = re.compile(r"\s*")
|
|
||||||
cmd_cat = 'cat /proc/partitions'
|
cmd_cat = 'cat /proc/partitions'
|
||||||
fs_list=["ext2","ext3","fat32","fat16","ntfs","reiserfs","xfs","jfs","linux-swap"]
|
|
||||||
|
|
||||||
st,o = commands.getstatusoutput(cmd_cat)
|
st,o = commands.getstatusoutput(cmd_cat)
|
||||||
if st:
|
if st:
|
||||||
print "Error cat : command not found or /proc/partitions dosen't exsit"
|
print "Error cat : command not found or /proc/partitions dosen't exsit"
|
||||||
return
|
return
|
||||||
for s in o.splitlines():
|
|
||||||
ret = re.search(r".+([sh][a-zA-Z]+)\s*",s)
|
|
||||||
if ret:
|
|
||||||
if ret.group(1) in device_list:
|
|
||||||
continue
|
|
||||||
device_list.append(ret.group(1))
|
|
||||||
|
|
||||||
for d in device_list:
|
# an example of `cat /proc/partitions`
|
||||||
st,o=commands.getstatusoutput('parted /dev/%s unit %s print'%(d,Partition.unit))
|
# major minor #blocks name
|
||||||
if st:
|
#
|
||||||
print "Error parted :command not found"
|
# 8 0 488386584 sda
|
||||||
return
|
# 8 1 97659103 sda1
|
||||||
for s in o.splitlines():
|
# 8 2 1951897 sda2
|
||||||
ret = p.split(s)
|
# 8 3 97659135 sda3
|
||||||
if ret[0]=='Partition':
|
# 8 4 291113865 sda4
|
||||||
Partition.label=ret[-1]
|
# 8 16 244197527 sdb
|
||||||
if len(ret) > 1 and ret[1].isdigit():
|
# 8 17 62918541 sdb1
|
||||||
# ret[0] is ['']
|
# 8 18 4200997 sdb2
|
||||||
#Number start end size type file_system flags
|
# 8 19 1 sdb3
|
||||||
# 1 2.0B 33GB 1GB primary raid
|
# 8 21 1238016 sdb5
|
||||||
# 2 32GB 33GB 1GB primary raid, boot ...
|
# 9 0 803136 md0
|
||||||
# 3 32GB 33GB 1GB primary boot, raid, lbx ...
|
|
||||||
# 4 32GB 33GB 1GB primary exit2 raid
|
|
||||||
# 5 32GB 33GB 1GB primary exit2 raid, boot ...
|
|
||||||
# 6 3.2kB 33GB 1GB primary
|
|
||||||
# 7 32GB 33GB 1GB primary linx-swap
|
|
||||||
# 8 32GB 33GB 1GB primary boot, lbx ...
|
|
||||||
# 9 32GB 33GB 1GB primary exit2 boot
|
|
||||||
#ret[1] ret[2] ret[3] ret[4] ret[5] ret[6] ret[7]
|
|
||||||
ret+=['','','']
|
|
||||||
ret[2]=ret[2][:-len(Partition.unit)]
|
|
||||||
ret[3]=ret[3][:-len(Partition.unit)]
|
|
||||||
ret[4]=ret[4][:-len(Partition.unit)]
|
|
||||||
if "raid" in ret[6:] or "raid," in ret[6:]:
|
|
||||||
ret[7]='yes'
|
|
||||||
if ret[6][:3].lower()=='raid' or ret[6].lower() not in fs_list:
|
|
||||||
ret[6]=''
|
|
||||||
else:
|
|
||||||
ret[7]='no'
|
|
||||||
if ret[6].lower() not in fs_list:
|
|
||||||
ret[6]=''
|
|
||||||
Partition(d+ret[1],ret[2],ret[4],ret[5],ret[6][:10] == "linux-swap" and "swap" or ret[6] ,ret[7],'yes')
|
|
||||||
|
|
||||||
|
l = [ s.split()[-1] for s in o.splitlines() if re.match(r'\s*\d+', s)]
|
||||||
|
# devices : 1) sda, sdb(first if ), or md0 (second if)
|
||||||
|
for d in [ i for i in l if not re.search(r'\d+', i)
|
||||||
|
or re.search(r'([a-zA-Z]+)', i).group(1) not in l]
|
||||||
|
st,o=commands.getstatusoutput('parted /dev/%s unit %s print'%(d,Partition.unit))
|
||||||
|
if st:
|
||||||
|
print "Error parted execute error"
|
||||||
|
return
|
||||||
|
# an example of o's content
|
||||||
|
# Model: ATA Hitachi HDS72105 (scsi)
|
||||||
|
# Disk /dev/sda: 500GB
|
||||||
|
# Sector size (logical/physical): 512B/512B
|
||||||
|
# Partition Table: msdos
|
||||||
|
#
|
||||||
|
# Number Start End Size Type File system Flags
|
||||||
|
# 1 0.00GB 100GB 100GB primary ext3 boot
|
||||||
|
# 2 100GB 102GB 2.00GB primary linux-swap(v1)
|
||||||
|
# 3 102GB 202GB 100GB primary ext3
|
||||||
|
# 4 202GB 500GB 298GB primary ext3
|
||||||
|
|
||||||
|
located = False
|
||||||
|
for s in o.splitlines():
|
||||||
|
# Only match number, start, end, and size, that's enough.
|
||||||
|
# And when in raid case, no type appears.
|
||||||
|
title_p = re.compile('Number\s+Start\s+End\s+Size\s')
|
||||||
|
if title_p.match(s):
|
||||||
|
nm_i = s.find('Number')
|
||||||
|
st_i = s.find('Start')
|
||||||
|
end_i = s.find('End')
|
||||||
|
sz_i = s.find('Size')
|
||||||
|
tp_i = s.find('Type')
|
||||||
|
fs_i = s.find('File system')
|
||||||
|
flg_i= s.find('Flags')
|
||||||
|
if tp_i < 0: tp_i=fs_i
|
||||||
|
located = True
|
||||||
|
|
||||||
|
if located:
|
||||||
|
Partition(d+s[nm_i:st_i].strip(), # device name
|
||||||
|
s[st_i:end_i].strip(), # start
|
||||||
|
s[sz_i:tp_i].strip().rstrip(Partition.unit), # size
|
||||||
|
s[tp_i:fs_i].strip(), # type
|
||||||
|
re.search('swap', s[fs_i:flg_i]) and 'swap' or s[fs_i:flg_i].strip(), # file system
|
||||||
|
s[flg_i:].strip() # flags
|
||||||
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def init_from_xml(node):
|
def init_from_xml(node):
|
||||||
''' create Partition instances from xml node '''
|
''' create Partition instances from xml node '''
|
||||||
Partition.unit = node.attributes['unit'].value.encode('ascii')
|
Partition.unit = node.attributes['unit'].value.encode('ascii')
|
||||||
Partition.label = node.attributes['label'].value.encode('ascii')
|
|
||||||
for p in node.childNodes:
|
for p in node.childNodes:
|
||||||
if p.nodeType == node.ELEMENT_NODE and p.nodeName == 'partition':
|
if p.nodeType == node.ELEMENT_NODE and p.nodeName == 'partition':
|
||||||
Partition(p.attributes['device'].value.encode('ascii'),\
|
Partition(p.attributes['device'].value.encode('ascii'),\
|
||||||
@@ -122,7 +135,7 @@ class Partition:
|
|||||||
p.attributes['size'].value.encode('ascii'),\
|
p.attributes['size'].value.encode('ascii'),\
|
||||||
p.attributes['type'].value.encode('ascii'),\
|
p.attributes['type'].value.encode('ascii'),\
|
||||||
p.attributes['file-system'].value.encode('ascii'),\
|
p.attributes['file-system'].value.encode('ascii'),\
|
||||||
p.attributes['israid'].value.encode('ascii'),\
|
p.attributes['flags'].value.encode('ascii'),\
|
||||||
p.attributes['from_os'].value.encode('ascii'))
|
p.attributes['from_os'].value.encode('ascii'))
|
||||||
|
|
||||||
|
|
||||||
@@ -135,9 +148,6 @@ p_node - xml node (parent node)'''
|
|||||||
unit_attr = doc.createAttribute('unit')
|
unit_attr = doc.createAttribute('unit')
|
||||||
unit_attr.value = Partition.unit
|
unit_attr.value = Partition.unit
|
||||||
pts.setAttributeNode(unit_attr)
|
pts.setAttributeNode(unit_attr)
|
||||||
label_attr = doc.createAttribute('label')
|
|
||||||
label_attr.value = Partition.label
|
|
||||||
pts.setAttributeNode(label_attr)
|
|
||||||
for p in Partition.list:
|
for p in Partition.list:
|
||||||
pt = doc.createElement('partition')
|
pt = doc.createElement('partition')
|
||||||
dev_attr = doc.createAttribute('device')
|
dev_attr = doc.createAttribute('device')
|
||||||
@@ -145,62 +155,52 @@ p_node - xml node (parent node)'''
|
|||||||
size_attr = doc.createAttribute('size')
|
size_attr = doc.createAttribute('size')
|
||||||
type_attr = doc.createAttribute('type')
|
type_attr = doc.createAttribute('type')
|
||||||
fs_attr = doc.createAttribute('file-system')
|
fs_attr = doc.createAttribute('file-system')
|
||||||
israid_attr = doc.createAttribute('israid')
|
flags_attr = doc.createAttribute('flags')
|
||||||
from_attr = doc.createAttribute('from_os')
|
from_attr = doc.createAttribute('from_os')
|
||||||
dev_attr.value = p.device
|
dev_attr.value = p.device
|
||||||
start_attr.value = p.start
|
start_attr.value = p.start
|
||||||
size_attr.value = p.size
|
size_attr.value = p.size
|
||||||
type_attr.value = p.type
|
type_attr.value = p.type
|
||||||
fs_attr.value = p.filesystem
|
fs_attr.value = p.filesystem
|
||||||
israid_attr.value = p.israid
|
flags_attr.value = p.flags
|
||||||
from_attr.value = p.from_os
|
from_attr.value = p.from_os
|
||||||
pt.setAttributeNode(dev_attr)
|
pt.setAttributeNode(dev_attr)
|
||||||
pt.setAttributeNode(start_attr)
|
pt.setAttributeNode(start_attr)
|
||||||
pt.setAttributeNode(size_attr)
|
pt.setAttributeNode(size_attr)
|
||||||
pt.setAttributeNode(type_attr)
|
pt.setAttributeNode(type_attr)
|
||||||
pt.setAttributeNode(fs_attr)
|
pt.setAttributeNode(fs_attr)
|
||||||
pt.setAttributeNode(israid_attr)
|
pt.setAttributeNode(flags_attr)
|
||||||
pt.setAttributeNode(from_attr)
|
pt.setAttributeNode(from_attr)
|
||||||
pts.appendChild(pt)
|
pts.appendChild(pt)
|
||||||
p_node.appendChild(pts)
|
p_node.appendChild(pts)
|
||||||
# ri_tk_cmd.py use
|
# ri_tk_cmd.py use
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_size(dev):
|
def get_size(dev):
|
||||||
for p in Partition.list:
|
return Partition.dict[dev].size
|
||||||
if p.device == dev:
|
|
||||||
return p.size
|
|
||||||
|
|
||||||
class Raid:
|
class Raid:
|
||||||
''' raid information '''
|
''' raid information '''
|
||||||
list = []
|
dict = {}
|
||||||
def __init__(self, dev, from_os, level, sz, a_devs, s_devs=[]):
|
def __init__(self, dev, from_os, level, a_devs, s_devs=[]):
|
||||||
''' Raid init function '''
|
''' Raid init function '''
|
||||||
self.device = dev
|
self.device = dev
|
||||||
self.from_os = from_os
|
self.from_os = from_os
|
||||||
self.level = level
|
self.level = level
|
||||||
self.size = sz
|
|
||||||
self.active_components = a_devs
|
self.active_components = a_devs
|
||||||
self.spare_components = s_devs
|
self.spare_components = s_devs
|
||||||
Raid.list.append(self)
|
Raid.dict[dev] = self
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def init_from_os():
|
def init_from_os():
|
||||||
cmd = 'cat /proc/mdstat'
|
cmd = 'cat /proc/mdstat'
|
||||||
st, o = commands.getstatusoutput(cmd)
|
st, o = commands.getstatusoutput(cmd)
|
||||||
if st:
|
if st: return
|
||||||
return
|
|
||||||
dev_p = re.compile(r'''
|
dev_p = re.compile(r'''
|
||||||
^(md\d+)\s*: # md device
|
^(md\d+)\s*: # md device
|
||||||
\s*active\s* # "active"
|
\s*active\s* # "active"
|
||||||
(\w+)\s* # raid type
|
(\w+)\s* # raid type
|
||||||
''', re.VERBOSE)
|
''', re.VERBOSE)
|
||||||
|
|
||||||
size_p = re.compile(r'''
|
|
||||||
^\s*(\d+) # block number
|
|
||||||
\s*blocks
|
|
||||||
''', re.VERBOSE)
|
|
||||||
|
|
||||||
|
|
||||||
for s in o.splitlines():
|
for s in o.splitlines():
|
||||||
dev_res = dev_p.split(s)
|
dev_res = dev_p.split(s)
|
||||||
if len(dev_res)>1: # matched
|
if len(dev_res)>1: # matched
|
||||||
@@ -214,15 +214,8 @@ class Raid:
|
|||||||
spr_cmpts.append(ss[:ss.index('[')])
|
spr_cmpts.append(ss[:ss.index('[')])
|
||||||
else:
|
else:
|
||||||
act_cmpts.append(ss[:ss.index('[')])
|
act_cmpts.append(ss[:ss.index('[')])
|
||||||
size = size_p.match(s)
|
|
||||||
if size is not None:
|
|
||||||
raid_size = size.groups()[0]
|
|
||||||
# if already detect a raid dev
|
|
||||||
if raid_dev:
|
|
||||||
Raid(raid_dev, "yes", raid_level, raid_size, act_cmpts, spr_cmpts)
|
|
||||||
# clear raid dev
|
|
||||||
raid_dev=''
|
|
||||||
|
|
||||||
|
Raid(raid_dev, "yes", raid_level, raid_size, act_cmpts, spr_cmpts)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def add_component(node, l):
|
def add_component(node, l):
|
||||||
@@ -242,7 +235,6 @@ l - list
|
|||||||
raid_dev = e.attributes['device'].value
|
raid_dev = e.attributes['device'].value
|
||||||
raid_from = e.attributes['from_os'].value
|
raid_from = e.attributes['from_os'].value
|
||||||
raid_level = e.attributes['level'].value
|
raid_level = e.attributes['level'].value
|
||||||
raid_size = e.attributes['size'].value
|
|
||||||
act_cmpts = []
|
act_cmpts = []
|
||||||
spr_cmpts = []
|
spr_cmpts = []
|
||||||
for sub_e in e.childNodes:
|
for sub_e in e.childNodes:
|
||||||
@@ -252,7 +244,7 @@ l - list
|
|||||||
elif sub_e.nodeName == 'spare':
|
elif sub_e.nodeName == 'spare':
|
||||||
Raid.add_component(sub_e, spr_cmpts)
|
Raid.add_component(sub_e, spr_cmpts)
|
||||||
|
|
||||||
Raid(raid_dev, raid_from, raid_level, raid_size, act_cmpts, spr_cmpts)
|
Raid(raid_dev, raid_from, raid_level, act_cmpts, spr_cmpts)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def to_xml(doc, p_node):
|
def to_xml(doc, p_node):
|
||||||
@@ -275,10 +267,6 @@ p_node - xml node (parent node) '''
|
|||||||
rd_level_attr.value = r.level
|
rd_level_attr.value = r.level
|
||||||
rd.setAttributeNode(rd_level_attr)
|
rd.setAttributeNode(rd_level_attr)
|
||||||
|
|
||||||
rd_size_attr = doc.createAttribute('size')
|
|
||||||
rd_size_attr.value = r.size
|
|
||||||
rd.setAttributeNode(rd_size_attr)
|
|
||||||
|
|
||||||
rd_act_elem = doc.createElement('active')
|
rd_act_elem = doc.createElement('active')
|
||||||
for act_c in r.active_components:
|
for act_c in r.active_components:
|
||||||
act_c_e = doc.createElement('component')
|
act_c_e = doc.createElement('component')
|
||||||
@@ -301,15 +289,14 @@ p_node - xml node (parent node) '''
|
|||||||
#ri_tk_cmd.py use
|
#ri_tk_cmd.py use
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_size(dev):
|
def get_size(dev):
|
||||||
for r in Raid.list:
|
# need fill
|
||||||
if r.device == dev:
|
pass
|
||||||
return r.size
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_next_device():
|
def get_next_device():
|
||||||
''' get next available raid device name '''
|
''' get next available raid device name '''
|
||||||
num_p = re.compile(r'md(\d+)')
|
num_p = re.compile(r'md(\d+)')
|
||||||
numbers = [ int(num_p.match(r.device).groups()[0]) for r in Raid.list ]
|
numbers = [ int(num_p.match(r).groups()[0]) for r in Raid.dict.keys() ]
|
||||||
max = 0
|
max = 0
|
||||||
for n in numbers:
|
for n in numbers:
|
||||||
if n > max: max = n
|
if n > max: max = n
|
||||||
@@ -326,62 +313,52 @@ p_node - xml node (parent node) '''
|
|||||||
|
|
||||||
class MountPoint:
|
class MountPoint:
|
||||||
''' mount-points '''
|
''' mount-points '''
|
||||||
list=[]
|
dict={}
|
||||||
def __init__(self, dev, dir='', fs='', fm='no', sz='0'):
|
def __init__(self, dev, dir='', fs='', fm='no'):
|
||||||
self.device = dev
|
self.device = dev
|
||||||
self.directory = dir
|
self.directory = dir
|
||||||
self.filesystem = fs
|
self.filesystem = fs
|
||||||
self.format = fm
|
self.format = fm
|
||||||
self.size = sz
|
MountPoint.dict[dev]=self
|
||||||
MountPoint.list.append(self)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def change(dev, dir, fs, fm):
|
def change(dev, dir, fs, fm):
|
||||||
for mp in MountPoint.list:
|
mp = MountPoint.dict[dev]
|
||||||
if mp.device == dev:
|
mp.directory = dir
|
||||||
mp.directory = dir
|
mp.filesystem = fs
|
||||||
mp.filesystem = fs
|
mp.format = fm
|
||||||
mp.format = fm
|
|
||||||
|
|
||||||
|
|
||||||
def device(self):
|
|
||||||
return self.device
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def init_from_internal():
|
def init_from_internal():
|
||||||
''' init MountPoint from internal class Partition and class Raid '''
|
''' init MountPoint from internal class Partition and class Raid '''
|
||||||
# clean MountPoint.list before update
|
# add raid device in dev_in_raid
|
||||||
MountPoint.list=[]
|
dev_in_raid = Raid.dev_in_raid()
|
||||||
# add partitions in Raid.list
|
|
||||||
raid_devs=Raid.dev_in_raid()
|
|
||||||
for p in Partition.list:
|
|
||||||
if p.device not in raid_devs :
|
|
||||||
MountPoint(p.device,fs=p.filesystem,sz=p.size)
|
|
||||||
|
|
||||||
for r in Raid.list:
|
for dev in set(Partition.dict.keys()).difference(set(dev_in_raid)):
|
||||||
MountPoint(r.device,sz=r.size)
|
if MountPoint.dict.has_key(dev): continue
|
||||||
|
MountPoint(dev, fs=Partition.dict[dev].filesystem)
|
||||||
|
|
||||||
|
for dev in Raid.dict.keys():
|
||||||
|
if MountPoint.dict.has_key(dev)
|
||||||
|
continue
|
||||||
|
MountPoint(dev)
|
||||||
|
|
||||||
# now process whether a partition or raid was removed
|
# now process whether a partition or raid was removed
|
||||||
s1 = set([ m.device for m in MountPoint.list ])
|
s1 = set(MountPoint.dict.keys())
|
||||||
s2 = set([ p.device for p in Partition.list ] + [ r.device for r in Raid.list])
|
s2 = set(Partition.dict.keys() + Raid.dict.keys())
|
||||||
for dev in s1-s2:
|
for dev in s1-s2:
|
||||||
for i in range(len(MountPoint.list)):
|
del MountPoint.dict[dev]
|
||||||
if dev == MountPoint.list[i].device:
|
|
||||||
del MountPoint.list[i]
|
|
||||||
break
|
|
||||||
# sort
|
|
||||||
MountPoint.list.sort(key=MountPoint.device)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def init_from_xml(node):
|
def init_from_xml(node):
|
||||||
''' create MountPoint instances from xml node '''
|
''' create MountPoint instances from xml node '''
|
||||||
for m in node.childNodes:
|
for m in node.childNodes:
|
||||||
if m.nodeType == node.ELEMENT_NODE and m.nodeName == 'mount-point':
|
if m.nodeType == node.ELEMENT_NODE and m.nodeName == 'mount-point':
|
||||||
MountPoint(m.attributes['device'].value.encode('ascii'), \
|
MountPoint(m.attributes['device'].value.encode('ascii'), \
|
||||||
m.attributes['directory'].value.encode('ascii'), \
|
m.attributes['directory'].value.encode('ascii'), \
|
||||||
m.attributes['file-system'].value.encode('ascii'), \
|
m.attributes['file-system'].value.encode('ascii'), \
|
||||||
m.attributes['format'].value.encode('ascii'),\
|
m.attributes['format'].value.encode('ascii'))
|
||||||
m.attributes['size'].value.encode('ascii'))
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def to_xml(doc, p_node):
|
def to_xml(doc, p_node):
|
||||||
@@ -395,17 +372,14 @@ p_node - xml node (parent node)'''
|
|||||||
dir_attr = doc.createAttribute('directory')
|
dir_attr = doc.createAttribute('directory')
|
||||||
fs_attr = doc.createAttribute('file-system')
|
fs_attr = doc.createAttribute('file-system')
|
||||||
fm_attr = doc.createAttribute('format')
|
fm_attr = doc.createAttribute('format')
|
||||||
sz_attr = doc.createAttribute('size')
|
|
||||||
dev_attr.value = m.device
|
dev_attr.value = m.device
|
||||||
dir_attr.value = m.directory
|
dir_attr.value = m.directory
|
||||||
fs_attr.value = m.filesystem
|
fs_attr.value = m.filesystem
|
||||||
fm_attr.value = m.format
|
fm_attr.value = m.format
|
||||||
sz_attr.value = m.size
|
|
||||||
mp.setAttributeNode(dev_attr)
|
mp.setAttributeNode(dev_attr)
|
||||||
mp.setAttributeNode(dir_attr)
|
mp.setAttributeNode(dir_attr)
|
||||||
mp.setAttributeNode(fs_attr)
|
mp.setAttributeNode(fs_attr)
|
||||||
mp.setAttributeNode(fm_attr)
|
mp.setAttributeNode(fm_attr)
|
||||||
mp.setAttributeNode(sz_attr)
|
|
||||||
mps.appendChild(mp)
|
mps.appendChild(mp)
|
||||||
p_node.appendChild(mps)
|
p_node.appendChild(mps)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user