def _get_version(self): """ Get openstack cinder version """ try: from cinder import version version = version.version_string() if version.startswith('2015.2'): return 'kilo' # For the moment use K driver elif version.startswith('2015.1'): return 'kilo' elif version.startswith('2014.2'): return 'juno' else: raise ValueError('Unknown cinder version: %s' % version) except Exception as ex: raise ValueError('Cannot determine cinder version: %s' % str(ex))
def _get_version(): """ Get openstack cinder version """ try: from cinder import version version = version.version_string() if version.startswith('2015.2'): return 'kilo' # For the moment use K driver elif version.startswith('7.0'): return 'kilo' # For the moment use K driver elif version.startswith('2015.1'): return 'kilo' elif version.startswith('2014.2'): return 'juno' else: raise ValueError('Unknown cinder version: %s' % version) except Exception as ex: raise ValueError('Cannot determine cinder version: %s' % str(ex))