From b5c4c5767fbfe9580e68343e722794326e6bb254 Mon Sep 17 00:00:00 2001 From: ling-yun Date: Wed, 12 Feb 2014 10:02:54 +0800 Subject: [PATCH] Removed unused context in _extend_snapshot method 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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cinder/api/contrib/extended_snapshot_attributes.py b/cinder/api/contrib/extended_snapshot_attributes.py index 1c4712b1006..85676ced4e1 100644 --- a/cinder/api/contrib/extended_snapshot_attributes.py +++ b/cinder/api/contrib/extended_snapshot_attributes.py @@ -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):