bad_vlan_json_schema.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validate(vlan_bad, schema) | |
Traceback (most recent call last): | |
File "<input>", line 1, in <module> | |
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/jsonschema/validators.py", line 541, in validate | |
cls(schema, *args, **kwargs).validate(instance) | |
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/jsonschema/validators.py", line 130, in validate | |
raise error | |
jsonschema.exceptions.ValidationError: 5000 is greater than the maximum of 4094 | |
Failed validating 'maximum' in schema['properties']['vlan_id']: | |
{'description': 'The unique ID of the VLAN. IEEE 802.1Q VLAN ' | |
'identifier (VID)', | |
'maximum': 4094, | |
'minimum': 1, | |
'sql.not_null': True, | |
'type': 'integer'} | |
On instance['vlan_id']: | |
5000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment