]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Removed unused context in _extend_snapshot method
authorling-yun <zengyunling@huawei.com>
Wed, 12 Feb 2014 02:02:54 +0000 (10:02 +0800)
committerling-yun <zengyunling@huawei.com>
Wed, 12 Feb 2014 03:16:55 +0000 (11:16 +0800)
Input parameter 'context' of _extend_snapshot method in
cinder/api/extended_snapshot_attributes.py is not being used, so remove
this 'context' parameter.

Change-Id: I8577e3938d5ed5bfb143a605320063a6b17c3be0
Closes-bug: #1279146

cinder/api/contrib/extended_snapshot_attributes.py

index 1c4712b10065ae738ea39947160be15df662fbae..85676ced4e1d204341f9969f409118cf48fce1c3 100644 (file)
@@ -42,7 +42,7 @@ class ExtendedSnapshotAttributesController(wsgi.Controller):
         rval = dict((snapshot['id'], snapshot) for snapshot in snapshots)
         return rval
 
-    def _extend_snapshot(self, context, snapshot, data):
+    def _extend_snapshot(self, snapshot, data):
         for attr in ['project_id', 'progress']:
             key = "%s:%s" % (Extended_snapshot_attributes.alias, attr)
             snapshot[key] = data[attr]
@@ -60,7 +60,8 @@ class ExtendedSnapshotAttributesController(wsgi.Controller):
                 explanation = _("Snapshot not found.")
                 raise exc.HTTPNotFound(explanation=explanation)
 
-            self._extend_snapshot(context, resp_obj.obj['snapshot'], snapshot)
+            self._extend_snapshot(snapshot=resp_obj.obj['snapshot'],
+                                  data=snapshot)
 
     @wsgi.extends
     def detail(self, req, resp_obj):
@@ -78,7 +79,8 @@ class ExtendedSnapshotAttributesController(wsgi.Controller):
                 except KeyError:
                     continue
 
-                self._extend_snapshot(context, snapshot_object, snapshot_data)
+                self._extend_snapshot(snapshot=snapshot_object,
+                                      data=snapshot_data)
 
 
 class Extended_snapshot_attributes(extensions.ExtensionDescriptor):