Refactor fixed_ips API response schema
- Rename fixed_ips -> get_fixed_ip
- Rename fixed_ip_action -> reserve_fixed_ip
Partially implements blueprint rearrange-nova-response-schemas
Change-Id: If95988306ad0efdf4dd22e47a6623623f34503d9
diff --git a/tempest/api_schema/response/compute/v2_1/fixed_ips.py b/tempest/api_schema/response/compute/v2_1/fixed_ips.py
index 446633f..13e70bf 100644
--- a/tempest/api_schema/response/compute/v2_1/fixed_ips.py
+++ b/tempest/api_schema/response/compute/v2_1/fixed_ips.py
@@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-fixed_ips = {
+get_fixed_ip = {
'status_code': [200],
'response_body': {
'type': 'object',
@@ -35,7 +35,7 @@
}
}
-fixed_ip_action = {
+reserve_fixed_ip = {
'status_code': [202],
'response_body': {'type': 'string'}
}
diff --git a/tempest/services/compute/json/fixed_ips_client.py b/tempest/services/compute/json/fixed_ips_client.py
index dda940c..7ba424f 100644
--- a/tempest/services/compute/json/fixed_ips_client.py
+++ b/tempest/services/compute/json/fixed_ips_client.py
@@ -25,12 +25,12 @@
url = "os-fixed-ips/%s" % (fixed_ip)
resp, body = self.get(url)
body = json.loads(body)
- self.validate_response(schema.fixed_ips, resp, body)
+ self.validate_response(schema.get_fixed_ip, resp, body)
return service_client.ResponseBody(resp, body['fixed_ip'])
def reserve_fixed_ip(self, ip, body):
"""This reserves and unreserves fixed ips."""
url = "os-fixed-ips/%s/action" % (ip)
resp, body = self.post(url, json.dumps(body))
- self.validate_response(schema.fixed_ip_action, resp, body)
+ self.validate_response(schema.reserve_fixed_ip, resp, body)
return service_client.ResponseBody(resp)