Add device type info.

lvmraid
Mike Hiretsky 13 years ago
parent d68c86a6e0
commit 1dc58d534f

@ -26,7 +26,7 @@ from cl_utils import isMount,typeFile,getTupleVersion,pathJoin,isFstabMount,\
listDirectory, getAvailableVideo, getUUIDDict, \
getUdevDeviceInfo, getPartitionDevice, getPartitionSize, \
isPkgInstalled, process, checkUtils, readLinesFile, \
FStab, lspci, getInstalledVideo
FStab, lspci, getInstalledVideo,getDeviceType
from cl_distr import DistributiveRepository,PartitionDistributive
from cl_fill import clLocale
from operator import itemgetter
@ -300,6 +300,7 @@ class fillVars(object, glob_attr):
props.get('ID_FS_TYPE','')
dev_hash['name'] = props.get('ID_FS_LABEL','')
dev_hash['table'] = props.get('ID_PART_TABLE_TYPE','')
dev_hash['type'] = getDeviceType(disk)
dev_hash['id'] =props.get('ID_PART_ENTRY_TYPE','').partition("x")[2]
devParent = getPartitionDevice(disk)
dev_hash['parent'] = devParent
@ -469,6 +470,10 @@ class fillVars(object, glob_attr):
"""Partition size"""
return self.getAttributeFromHash('os_disk_hash','size')
def get_os_disk_type(self):
"""Partition type"""
return self.getAttributeFromHash('os_disk_hash','type')
def get_os_disk_name(self):
"""Label of partitions"""
return self.getAttributeFromHash('os_disk_hash','name')

Loading…
Cancel
Save