From c99bae92e8aa3a38d5e3411e71df0d65a9484298 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Tue, 17 Jul 2012 04:15:32 +0100 Subject: [PATCH] Remove unused check_snapshots_enabled Only used in Nova by the createImage action. Change-Id: I114281fd553020ac96c499c18ff3e4a2a626c3b2 --- cinder/api/openstack/common.py | 12 ------------ etc/cinder/cinder.conf.sample | 5 ----- 2 files changed, 17 deletions(-) diff --git a/cinder/api/openstack/common.py b/cinder/api/openstack/common.py index 0ebe610e0..de0a6a5a7 100644 --- a/cinder/api/openstack/common.py +++ b/cinder/api/openstack/common.py @@ -178,18 +178,6 @@ def dict_to_query_str(params): return param_str.rstrip('&') -def check_snapshots_enabled(f): - @functools.wraps(f) - def inner(*args, **kwargs): - if not FLAGS.allow_instance_snapshots: - LOG.warn(_('Rejecting snapshot request, snapshots currently' - ' disabled')) - msg = _("Instance snapshots are not permitted at this time.") - raise webob.exc.HTTPBadRequest(explanation=msg) - return f(*args, **kwargs) - return inner - - class ViewBuilder(object): """Model API responses as dictionaries.""" diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index e28bec3d1..3dba756d1 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -440,11 +440,6 @@ ###### (IntOpt) Number of minutes for lockout window. # lockout_window=15 -######### defined in cinder.api.openstack.compute ######### - -###### (BoolOpt) Permit instance snapshot operations. -# allow_instance_snapshots=true - ######### defined in cinder.ipv6.api ######### ###### (StrOpt) Backend to use for IPv6 generation -- 2.45.2