{ "$id": "adapterNSOSchema", "type": "object", "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "commitWait": { "$id": "/properties/commitWait", "type": "integer", "description": "Amount of time in milliseconds that the adapter will wait for a aysch commit before timing out.", "default": 10000, "minimum": 5000, "maximum": 300000 }, "poolSize": { "$id": "/properties/poolSize", "type": "integer", "description": "Number of concurrent NETCONF sessions to allow.", "default": 3, "minimum": 1, "maximum": 20 }, "credentials": { "$ref": "#/definitions/credentials" }, "authenticationStrategy": { "$ref": "#/definitions/authenticationStrategy" }, "ssl": { "$ref": "#/definitions/ssl" }, "netconf": { "$ref": "#/definitions/netconf" }, "http": { "$ref": "#/definitions/http" } }, "required": [ "http", "netconf", "credentials" ], "anyOf": [ { "required": [ "credentials" ] }, { "required": [ "authStrategy" ] } ], "definitions": { "credentials": { "$id": "/credentials", "type": "object", "properties": { "user": { "$id": "/credentials/properties/user", "type": "string", "description": "Username passed to NSO for login.", "default": "admin", "examples": [ "admin" ] }, "passwd": { "$id": "/credentials/properties/passwd", "type": "string", "description": "Password passed to NSO for login.", "default": "admin", "examples": [ "admin" ] } }, "required": [ "user", "passwd" ] }, "authenticationStrategy": { "$id": "/authenticationStrategy", "type": "object", "properties": { "type": { "$id": "/authenticationStrategy/properties/type", "type": "string", "description": "How the adapter gets NSO login credentials.", "default": "machine", "enum": [ "machine", "dynamic" ] }, "location": { "$id": "/authenticationStrategy/properties/location", "type": "string", "description": "If the strategy is dynamic, which package contains the method", "default": "", "examples": [ "myCustomCog", "NSO" ] }, "method": { "$id": "/authenticationStrategy/properties/method", "type": "string", "description": "If the strategy is dynamic, the name of the method used.", "default": "", "examples": [ "myCustomAuthScript", "tokenLogin" ] } }, "if": { "properties": { "type": { "enum": [ "dynamic" ] } } }, "then": { "required": [ "location", "method" ] } }, "ssl": { "$id": "/ssl", "type": "object", "properties": { "enabled": { "$id": "/ssl/properties/enabled", "type": "boolean", "description": "Whether or not ssl is enabled on NSO", "default": false }, "acceptInvalidCerts": { "$id": "/ssl/properties/acceptInvalidCerts", "type": "boolean", "description": "Whether NSO is configured to accept invalid certificates", "default": false }, "caFile": { "$id": "/ssl/properties/caFile", "type": "string", "description": "The fully qualified path name to the CA file used for SSL", "default": "", "examples": [ "keys/key.pem" ] }, "ciphers": { "$id": "/ssl/properties/ciphers", "type": "string", "description": "Hyphen separated list of acceptable ciphers", "default": "", "examples": [ "DHE-RSA-AES256-SHA" ] } }, "required": [ "enabled" ], "allOf": [ { "if": { "properties": { "enabled": { "enum": [ true ] } } }, "then": { "required": [ "acceptInvalidCerts", "ciphers" ] } }, { "if": { "allOf": [ { "properties": { "enabled": { "enum": [ true ] } } }, { "properties": { "acceptInvalidCerts": { "enum": [ false ] } } } ] }, "then": { "required": [ "caFile" ] } } ] }, "netconf": { "$id": "/netconf", "type": "object", "properties": { "host": { "$id": "/netconf/properties/host", "type": "string", "description": "The IP address where the NSO NETCONF server is running", "default": "localhost", "examples": [ "127.0.0.1", "localhost" ] }, "port": { "$id": "/netconf/properties/port", "type": "integer", "description": "The port where the NSO NETCONF server is running", "default": 2022, "minimum": 1, "maximum": 65535 }, "protocol": { "$id": "/netconf/properties/protocol", "type": "string", "description": "The protocol used over the NETCONF server.", "default": "ssh", "enum": [ "ssh", "tcp" ] }, "frame_size": { "$id": "/netconf/properties/frame_size", "type": "integer", "description": "The size of the frames sent to NSO", "default": 16376, "minimum": 1, "maximum": 300000 } }, "required": [ "host", "port" ] }, "http": { "$id": "/http", "type": "object", "properties": { "host": { "$id": "/http/properties/host", "type": "string", "description": "The hostname where the NSO webserver is running", "default": "localhost", "examples": [ "127.0.0.1", "localhost" ] }, "port": { "$id": "/http/properties/port", "type": "integer", "description": "The port where the NSO webserver is running", "default": 8080, "minimum": 1, "maximum": 65535 } }, "required": [ "host", "port" ] } } }