]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Added mapper for snapshot_metadata
authorsaurabh <saurabh.chordiya@nectechnologies.in>
Thu, 19 Sep 2013 18:07:35 +0000 (23:37 +0530)
committersaurabh <saurabh.chordiya@nectechnologies.in>
Fri, 20 Sep 2013 02:53:14 +0000 (08:23 +0530)
cinder/api/v2/snapshot_metadata.py exist with all actions
but mapper missing for it.

Closes-bug: 1227799

Change-Id: I9a95c68a8de620626042951fa15a555621ebbc17

cinder/api/v2/router.py

index e3e51399f1f6328c34b5fc612978935f0714b714..bcd668470a6c1b20f7c19308f52abebcb538a4ff 100644 (file)
@@ -24,6 +24,7 @@ WSGI middleware for OpenStack Volume API.
 from cinder.api import extensions
 import cinder.api.openstack
 from cinder.api.v2 import limits
+from cinder.api.v2 import snapshot_metadata
 from cinder.api.v2 import snapshots
 from cinder.api.v2 import types
 from cinder.api.v2 import volumes
@@ -68,3 +69,12 @@ class APIRouter(cinder.api.openstack.APIRouter):
         self.resources['limits'] = limits.create_resource()
         mapper.resource("limit", "limits",
                         controller=self.resources['limits'])
+
+        self.resources['snapshot_metadata'] = \
+            snapshot_metadata.create_resource()
+        snapshot_metadata_controller = self.resources['snapshot_metadata']
+
+        mapper.resource("snapshot_metadata", "metadata",
+                        controller=snapshot_metadata_controller,
+                        parent_resource=dict(member_name='snapshot',
+                                             collection_name='snapshots'))