Fix compute baremetal_nodes API schema
The Nova os-baremetal-nodes endpoint is effectively a proxy for the Ironic
API. The API schema on the tempest side is too strict, does not reflect
the documented Nova responses and does not reflect the documented Ironic
responses. Specifically, the node resource properties may be strings or
integers and Nova documents them currently as strings. This updates the
Tempest schema to accept both.
Closes-bug: #1422832
Change-Id: I57e385014799aa6333a74a30696dd2846efdbc68
diff --git a/tempest/api_schema/response/compute/baremetal_nodes.py b/tempest/api_schema/response/compute/baremetal_nodes.py
index 2f67d37..e82792c 100644
--- a/tempest/api_schema/response/compute/baremetal_nodes.py
+++ b/tempest/api_schema/response/compute/baremetal_nodes.py
@@ -19,9 +19,9 @@
'interfaces': {'type': 'array'},
'host': {'type': 'string'},
'task_state': {'type': ['string', 'null']},
- 'cpus': {'type': 'integer'},
- 'memory_mb': {'type': 'integer'},
- 'disk_gb': {'type': 'integer'},
+ 'cpus': {'type': ['integer', 'string']},
+ 'memory_mb': {'type': ['integer', 'string']},
+ 'disk_gb': {'type': ['integer', 'string']},
},
'required': ['id', 'interfaces', 'host', 'task_state', 'cpus', 'memory_mb',
'disk_gb']