def get_volume_names(self, volume_file):
        """Return a dictionary for which key are volume names according to the
        output of gluster volume info stored in volume_file.
        """
        out = []
        fp = open(volume_file, 'r')
        for line in fp.readlines():
            if not line.startswith("Volume Name:"):
                continue
            volname = line[12:-1]
            out.append(volname)
        fp.close()
        return out
def get_volume_names ( self , volume_file ) : out = [ ] fp = open ( volume_file , 'r' ) for line in fp . readlines ( ) : if not line . startswith ( "Volume Name:" ) : continue volname = line [ 12 : - 1 ] out . append ( volname ) fp . close ( ) return out
Return a dictionary for which key are volume names according to the
        output of gluster volume info stored in volume_file.