<s> """<STR_LIT>""" <EOL> from dfvfs . lib import definitions <EOL> from dfvfs . lib import errors <EOL> from dfvfs . resolver import resolver <EOL> from dfvfs . volume import volume_system <EOL> class LVMVolume ( volume_system . Volume ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , file_entry ) : <EOL> """<STR_LIT>""" <EOL> super ( LVMVolume , self ) . __init__ ( file_entry . name ) <EOL> self . _file_entry = file_entry <EOL> def _Parse ( self ) : <EOL> """<STR_LIT>""" <EOL> vslvm_logical_volume = self . _file_entry . GetLVMLogicalVolume ( ) <EOL> self . _AddAttribute ( volume_system . VolumeAttribute ( <EOL> u'<STR_LIT>' , vslvm_logical_volume . identifier ) ) <EOL> volume_extent = volume_system . VolumeExtent ( <NUM_LIT:0> , vslvm_logical_volume . size ) <EOL> self . _extents . append ( volume_extent ) <EOL> class LVMVolumeSystem ( volume_system . VolumeSystem ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( LVMVolumeSystem , self ) . __init__ ( ) <EOL> self . _file_system = None <EOL> def _Parse ( self ) : <EOL> """<STR_LIT>""" <EOL> root_file_entry = self . _file_system . GetRootFileEntry ( ) <EOL> for sub_file_entry in root_file_entry . sub_file_entries : <EOL> volume = LVMVolume ( sub_file_entry ) <EOL> self . _AddVolume ( volume ) <EOL> def Open ( self , path_spec ) : <EOL> """<STR_LIT>""" <EOL> self . _file_system = resolver . Resolver . OpenFileSystem ( path_spec ) <EOL> if self . _file_system is None : <EOL> raise errors . VolumeSystemError ( <EOL> u'<STR_LIT>' ) <EOL> type_indicator = self . _file_system . type_indicator <EOL> if type_indicator != definitions . TYPE_INDICATOR_LVM : <EOL> raise errors . VolumeSystemError ( u'<STR_LIT>' ) </s>
