Skip to content

Commit a775bf2

Browse files
committed
Add missing query parameters to compute v2 Server
Several query parameters have been added or were previously undocumented, so they are now up-to-date. Change-Id: I98b734bd4f8c981eca2c4bc1e9f5d08a3a06f5a6
1 parent 1652043 commit a775bf2

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

openstack/compute/v2/server.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ class Server(resource2.Resource, metadata.MetadataMixin):
3131

3232
_query_mapping = resource2.QueryParameters("image", "flavor", "name",
3333
"status", "host", "all_tenants",
34+
"sort_key", "sort_dir",
35+
"reservation_id", "tags",
36+
tags_any="tags-any",
37+
not_tags="not-tags",
38+
not_tags_any="not-tags-any",
39+
is_deleted="deleted",
40+
ipv4_address="ip",
41+
ipv6_address="ip6",
3442
changes_since="changes-since")
3543

3644
#: A list of dictionaries holding links relevant to this server.

openstack/tests/unit/compute/v2/test_server.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,18 @@ def test_basic(self):
8585
"all_tenants": "all_tenants",
8686
"changes_since": "changes-since",
8787
"limit": "limit",
88-
"marker": "marker"},
88+
"marker": "marker",
89+
"sort_key": "sort_key",
90+
"sort_dir": "sort_dir",
91+
"reservation_id": "reservation_id",
92+
"tags": "tags",
93+
"tags_any": "tags-any",
94+
"not_tags": "not-tags",
95+
"not_tags_any": "not-tags-any",
96+
"is_deleted": "deleted",
97+
"ipv4_address": "ip",
98+
"ipv6_address": "ip6",
99+
},
89100
sot._query_mapping._mapping)
90101

91102
def test_make_it(self):

0 commit comments

Comments
 (0)