diff --git a/inventory_provider/config.py b/inventory_provider/config.py index 59953f2eb9fb43b3f0b7b1b5b09e36b0be0e9baa..9000efbddd2178b9b57b47948b3f4869aa0c702d 100644 --- a/inventory_provider/config.py +++ b/inventory_provider/config.py @@ -6,6 +6,11 @@ CONFIG_SCHEMA = { "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { + "timeout": { + "type": "number", + "maximum": 10, # sanity + "exclusiveMinimum": 0 + }, "database-credentials": { "type": "object", "properties": { @@ -50,14 +55,25 @@ CONFIG_SCHEMA = { "additionalProperties": False }, "junosspace-credentials": { - "api": {"type": "string"}, - "username": {"type": "string"}, - "password": {"type": "string"} + "type": "object", + "properties": { + "api": {"type": "string"}, + "username": {"type": "string"}, + "password": {"type": "string"} + }, + "required": ["api", "username", "password"], + "additionalProperties": False }, - "timeout": { - "type": "number", - "maximum": 10, # sanity - "exclusiveMinimum": 0 + "interface-address": { + "type": "object", + "properties": { + "address": {"type": "string"}, + "network": {"type": "string"}, + "interface": {"type": "string"}, + "router": {"type": "string"} + }, + "required": ["address", "network", "interface", "router"], + "additionalProperties": False } }, @@ -73,6 +89,10 @@ CONFIG_SCHEMA = { "items": {"type": "integer"} }, "junosspace": {"$ref": "#/definitions/junosspace-credentials"}, + "unmanaged-interfaces": { + "type": "array", + "items": {"$ref": "#/definitions/interface-address"} + } }, "oneOf": [ {