def _cinderclient_with_features(request, features, raise_exc=False, message=False): version = get_microversion(request, features) if version is None: if message: versions = microversions.get_requested_versions('cinder', features) if message is True: message = ('Insufficient microversion for cinder feature(s) ' '%(features)s. One of the following API ' 'microversion(s) is required: %(versions).') LOG.warning(message, {'features': features, 'versions': versions}) if raise_exc: raise microversions.MicroVersionNotFound(features) if version is not None: version = version.get_string() return cinderclient(request, version=version)
def _cinderclient_with_features(request, features, raise_exc=False, message=False): version = get_microversion(request, features) if version is None: if message: versions = microversions.get_requested_versions('cinder', features) if message is True: message = ('Insufficient microversion for cinder feature(s) ' '%(features)s. One of the following API ' 'microversion(s) is required: %(versions).') LOG.warning(message, {'features': features, 'versions': versions}) if raise_exc: raise microversions.MicroVersionNotFound(features) if version is not None: version = version.get_string() return cinderclient(request, version=version)