]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove unused check_snapshots_enabled
authorMark McLoughlin <markmc@redhat.com>
Tue, 17 Jul 2012 03:15:32 +0000 (04:15 +0100)
committerMark McLoughlin <markmc@redhat.com>
Fri, 20 Jul 2012 14:52:03 +0000 (15:52 +0100)
Only used in Nova by the createImage action.

Change-Id: I114281fd553020ac96c499c18ff3e4a2a626c3b2

cinder/api/openstack/common.py
etc/cinder/cinder.conf.sample

index 0ebe610e0600e63424e760a97deff06e7f2cbde2..de0a6a5a70a291f36d4675c3dcb221ab800cacdf 100644 (file)
@@ -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."""
 
index e28bec3d15fbf7844c386aabe6ab3c5424c735ff..3dba756d12641ec863a55ce7ae5e7ef893a101a9 100644 (file)
 ###### (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