Fix compatibility with jsonschema>=4.0.0
Specify the schema version for network_data and node, otherwise the latest one is used. Also fix one test where the error messages was changed. Change-Id: I4a614d7e73348bbe6c355a40881b013cbfe00b03
This commit is contained in:
parent
0c4401cfbb
commit
55b9579f14
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "http://openstack.org/nova/network_data.json#",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"id": "http://openstack.org/nova/network_data.json",
|
||||
"type": "object",
|
||||
"title": "OpenStack Nova network metadata schema",
|
||||
|
@ -140,6 +140,7 @@ def network_data_schema():
|
||||
def node_schema():
|
||||
network_data = network_data_schema()
|
||||
return {
|
||||
'$schema': 'http://json-schema.org/draft-07/schema#',
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
'automated_clean': {'type': ['string', 'boolean', 'null']},
|
||||
|
@ -883,7 +883,7 @@ class TestPost(BaseDeployTemplatesAPITest):
|
||||
def test_create_invalid_step_field_priority(self):
|
||||
self._test_create_invalid_step_field(
|
||||
'priority', 'not a number',
|
||||
"'not a number' is not of type 'integer'")
|
||||
"'not a number'") # differs between jsonschema versions
|
||||
|
||||
def test_create_invalid_step_field_negative_priority(self):
|
||||
self._test_create_invalid_step_field(
|
||||
|
9
releasenotes/notes/jsonschema-966f55fc79b916fc.yaml
Normal file
9
releasenotes/notes/jsonschema-966f55fc79b916fc.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes compatibility with ``jsonschema`` package version 4.0.0 or newer
|
||||
by providing a proper schema version (Draft-07 currently).
|
||||
issues:
|
||||
- |
|
||||
When using ``jsonschema`` 4.0.0 or newer, make sure to include a proper
|
||||
``$schema`` field in your custom network data or RAID schemas.
|
Loading…
Reference in New Issue
Block a user