def makeLVMap(self, columns):
     # lv_name,vg_name,lv_attr,lv_size,lv_uuid,origin
     lv_om = ObjectMap()
     lv_om.title = columns['lv_name']
     lv_om.vgname = columns['vg_name']
     lv_om.id = 'lv-{}'.format(self.prepId(columns['vg_name'])+'_'+self.prepId(columns['lv_name']))
     lv_om.attributes = self.lvm_parser.lv_attributes(columns['lv_attr'])
     lv_om.lvsize = int(columns['lv_size'])
     lv_om.uuid = columns['lv_uuid']
     if columns['origin']:
         lv_om.origin = columns['origin']
         lv_om.relname = 'snapshotVolumes'
         lv_om.modname = 'ZenPacks.zenoss.LinuxMonitor.SnapshotVolume'
     elif columns['lv_metadata_size']:
         lv_om.id = 'tp-{}'.format(self.prepId(columns['vg_name'])+'_'+self.prepId(columns['lv_name']))
         lv_om.metadatasize = int(columns['lv_metadata_size'])
         lv_om.relname = 'thinPools'
         lv_om.modname = 'ZenPacks.zenoss.LinuxMonitor.ThinPool'
     else:
         lv_om.set_thinPool = None
         if columns['pool_lv']:
             lv_om.set_thinPool = 'tp-{}'.format(self.prepId(columns['vg_name'])+'_'+self.prepId(columns['pool_lv']))
         lv_om.relname = 'logicalVolumes'
         lv_om.modname = 'ZenPacks.zenoss.LinuxMonitor.LogicalVolume'
     return lv_om
 def makeLVMap(self, columns):
     # lv_name,vg_name,lv_attr,lv_size,lv_uuid,origin
     lv_om = ObjectMap()
     lv_om.title = columns['lv_name']
     lv_om.vgname = columns['vg_name']
     lv_om.id = 'lv-{}'.format(self.prepId(columns['vg_name'])+'_'+self.prepId(columns['lv_name']))
     lv_om.attributes = self.lvm_parser.lv_attributes(columns['lv_attr'])
     lv_om.lvsize = int(columns['lv_size'])
     lv_om.uuid = columns['lv_uuid']
     if columns['origin']:
         lv_om.origin = columns['origin']
         lv_om.relname = 'snapshotVolumes'
         lv_om.modname = 'ZenPacks.zenoss.LinuxMonitor.SnapshotVolume'
     elif columns['lv_metadata_size']:
         lv_om.id = 'tp-{}'.format(self.prepId(columns['vg_name'])+'_'+self.prepId(columns['lv_name']))
         lv_om.metadatasize = int(columns['lv_metadata_size'])
         lv_om.relname = 'thinPools'
         lv_om.modname = 'ZenPacks.zenoss.LinuxMonitor.ThinPool'
     else:
         lv_om.set_thinPool = None
         if columns['pool_lv']:
             lv_om.set_thinPool = 'tp-{}'.format(self.prepId(columns['vg_name'])+'_'+self.prepId(columns['pool_lv']))
         lv_om.relname = 'logicalVolumes'
         lv_om.modname = 'ZenPacks.zenoss.LinuxMonitor.LogicalVolume'
     return lv_om
 def makeVGMap(self, columns):
     # vg_name,vg_attr,vg_size,vg_free,vg_uuid
     vg_om = ObjectMap()
     vg_om.title = columns['vg_name']
     vg_om.id = 'vg-{}'.format(self.prepId(columns['vg_name']))
     vg_om.attributes = self.lvm_parser.vg_attributes(columns['vg_attr'])
     vg_om.uuid = columns['vg_uuid']
     vg_om.relname = 'volumeGroups'
     vg_om.modname = 'ZenPacks.zenoss.LinuxMonitor.VolumeGroup'
     return vg_om
 def makeVGMap(self, columns):
     # vg_name,vg_attr,vg_size,vg_free,vg_uuid
     vg_om = ObjectMap()
     vg_om.title = columns['vg_name']
     vg_om.id = 'vg-{}'.format(self.prepId(columns['vg_name']))
     vg_om.attributes = self.lvm_parser.vg_attributes(columns['vg_attr'])
     vg_om.uuid = columns['vg_uuid']
     vg_om.relname = 'volumeGroups'
     vg_om.modname = 'ZenPacks.zenoss.LinuxMonitor.VolumeGroup'
     return vg_om
 def makePVMap(self, columns):
     # pv_name,pv_fmt,pv_attr,pv_size,pv_free,pv_uuid,vg_name
     pv_om = ObjectMap()
     pv_om.title = columns['pv_name']
     pv_om.id = 'pv-{}'.format(self.prepId(columns['pv_name']))
     pv_om.format = columns['pv_fmt']
     pv_om.attributes = self.lvm_parser.pv_attributes(columns['pv_attr'])
     pv_om.uuid = columns['pv_uuid']
     pv_om.set_volumeGroup = 'vg-{}'.format(columns['vg_name']) if columns['vg_name'] else ''
     pv_om.relname = 'physicalVolumes'
     pv_om.modname = 'ZenPacks.zenoss.LinuxMonitor.PhysicalVolume'
     return pv_om
 def makePVMap(self, columns):
     # pv_name,pv_fmt,pv_attr,pv_size,pv_free,pv_uuid,vg_name
     pv_om = ObjectMap()
     pv_om.title = columns['pv_name']
     pv_om.id = 'pv-{}'.format(self.prepId(columns['pv_name']))
     pv_om.format = columns['pv_fmt']
     pv_om.attributes = self.lvm_parser.pv_attributes(columns['pv_attr'])
     pv_om.uuid = columns['pv_uuid']
     pv_om.set_volumeGroup = 'vg-{}'.format(columns['vg_name']) if columns['vg_name'] else ''
     pv_om.relname = 'physicalVolumes'
     pv_om.modname = 'ZenPacks.zenoss.LinuxMonitor.PhysicalVolume'
     return pv_om