compute/v2/server: add ?all_tenants=bool to list

The compute v2 API accepts ?all_tenants=bool for operators to list all
projects' servers.

This change adds this capability.

Change-Id: Ifbe960751c86fd8c1f187c1c293abbb87561aefc
This commit is contained in:
Martin Millnert 2016-09-12 23:41:20 +02:00
parent e935c86df2
commit b01d9deffb
2 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class Server(resource2.Resource, metadata.MetadataMixin):
allow_list = True
_query_mapping = resource2.QueryParameters("image", "flavor", "name",
"status", "host",
"status", "host", "all_tenants",
changes_since="changes-since")
#: A list of dictionaries holding links relevant to this server.

View File

@ -82,6 +82,7 @@ class TestServer(testtools.TestCase):
"name": "name",
"status": "status",
"host": "host",
"all_tenants": "all_tenants",
"changes_since": "changes-since"},
sot._query_mapping._mapping)