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