|
|
|
@ -229,6 +229,20 @@ class fillVars(object, glob_attr):
|
|
|
|
|
return ", ".join(map(lambda x:"%s (%s)"%(x[0],x[1]),
|
|
|
|
|
listInterfacesInfo))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getTableByChild(self,device):
|
|
|
|
|
"""Get table by child partitions"""
|
|
|
|
|
syspath = getUdevDeviceInfo(name=device).get('DEVPATH','')
|
|
|
|
|
if not syspath.startswith('/sys'):
|
|
|
|
|
syspath = pathJoin('/sys',syspath)
|
|
|
|
|
shortnameDevice = path.basename(device)
|
|
|
|
|
childs = filter(lambda x:x.startswith(shortnameDevice),
|
|
|
|
|
listDirectory(syspath))
|
|
|
|
|
if childs:
|
|
|
|
|
child = pathJoin(syspath,childs[0])
|
|
|
|
|
return getUdevDeviceInfo(path=child).get('ID_PART_ENTRY_SCHEME','')
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
def get_os_device_hash(self):
|
|
|
|
|
def onlyDisk(devpath):
|
|
|
|
|
prop = getUdevDeviceInfo(devpath)
|
|
|
|
@ -253,7 +267,8 @@ class fillVars(object, glob_attr):
|
|
|
|
|
continue
|
|
|
|
|
device = props['DEVNAME']
|
|
|
|
|
device_hash[device] = {}
|
|
|
|
|
device_hash[device]['table'] = props.get('ID_PART_TABLE_TYPE','')
|
|
|
|
|
device_hash[device]['table'] = props.get('ID_PART_TABLE_TYPE',
|
|
|
|
|
self.getTableByChild(device))
|
|
|
|
|
device_hash[device]['map'] = mapnum
|
|
|
|
|
|
|
|
|
|
if path.basename(device) in usbdevices:
|
|
|
|
|