Merge "Add 'project_id' to Snapshot query parameters"
This commit is contained in:
@@ -62,6 +62,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
|||||||
|
|
||||||
* name: Name of the snapshot as a string.
|
* name: Name of the snapshot as a string.
|
||||||
* all_projects: Whether return the snapshots in all projects.
|
* all_projects: Whether return the snapshots in all projects.
|
||||||
|
* project_id: Filter the snapshots by project.
|
||||||
* volume_id: volume id of a snapshot.
|
* volume_id: volume id of a snapshot.
|
||||||
* status: Value of the status of the snapshot so that you can
|
* status: Value of the status of the snapshot so that you can
|
||||||
filter on "available" for example.
|
filter on "available" for example.
|
||||||
|
@@ -20,7 +20,8 @@ class Snapshot(resource.Resource):
|
|||||||
base_path = "/snapshots"
|
base_path = "/snapshots"
|
||||||
|
|
||||||
_query_mapping = resource.QueryParameters(
|
_query_mapping = resource.QueryParameters(
|
||||||
'name', 'status', 'volume_id', all_projects='all_tenants')
|
'name', 'status', 'volume_id',
|
||||||
|
'project_id', all_projects='all_tenants')
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
allow_fetch = True
|
allow_fetch = True
|
||||||
|
@@ -48,6 +48,7 @@ class TestSnapshot(base.TestCase):
|
|||||||
self.assertDictEqual({"name": "name",
|
self.assertDictEqual({"name": "name",
|
||||||
"status": "status",
|
"status": "status",
|
||||||
"all_projects": "all_tenants",
|
"all_projects": "all_tenants",
|
||||||
|
"project_id": "project_id",
|
||||||
"volume_id": "volume_id",
|
"volume_id": "volume_id",
|
||||||
"limit": "limit",
|
"limit": "limit",
|
||||||
"marker": "marker"},
|
"marker": "marker"},
|
||||||
|
Reference in New Issue
Block a user