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
This commit is contained in:
ling-yun 2014-02-12 10:02:54 +08:00
parent 6b431ebdc1
commit b5c4c5767f
1 changed files with 5 additions and 3 deletions

View 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):