Added json validation of formats to check IPv4

refactored files and calls to be api_server
worked down satisfying review comments of last commit
This commit is contained in:
creslinux
2018-06-14 20:19:15 +00:00
parent 7caf8a46d4
commit 40db83c24c
4 changed files with 39 additions and 28 deletions

View File

@@ -85,6 +85,19 @@ CONF_SCHEMA = {
},
'required': ['enabled', 'token', 'chat_id']
},
'api_server': {
'type': 'object',
'properties': {
'enabled': {'type': 'boolean'},
'listen_ip_address': { "format": "ipv4"},
'listen_port': {
'type': 'integer',
"minimum": 1024,
"maximum": 65535
},
},
'required': ['enabled', 'listen_ip_address', 'listen_port']
},
'db_url': {'type': 'string'},
'initial_state': {'type': 'string', 'enum': ['running', 'stopped']},
'internals': {