Input data schemes¶
Input data JSON scheme¶
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"cli-creds": {
"type": "object",
"properties": {
"enable password": {
"description": "CLI enable password on the device",
"type": "string"
},
"password": {
"description": "CLI password on the device",
"type": "string"
},
"user": {
"description": "CLI user on the device",
"type": "string"
}
}
},
"ip-range": {
"type": "string",
"description": "Device IP (10.10.10.10) or a range of device IPs (10.10.10.10-45)"
}
},
"type": "object",
"description": "schema for input data with devices information",
"required": [
"cloudshell",
"community-strings",
"devices-ips"
],
"properties": {
"vendor-settings": {
"type": "object",
"additionalProperties": {
"type": "object",
"description": "additional settings for the specific vendor",
"properties": {
"cli-credentials": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"$ref": "#/definitions/cli-creds"
}
},
"folder-path": {
"description": "full path for the resource folder",
"type": "string"
}
}
}
},
"cloudshell": {
"type": "object",
"description": "schema for CloudShell API credentials",
"required": [
"ip",
"user",
"password"
],
"properties": {
"ip": {
"description": "IP address for the CloudShell API",
"type": "string"
},
"password": {
"description": "password for the CloudShell API",
"type": "string"
},
"user": {
"description": "user for the CloudShell API",
"type": "string"
}
}
},
"community-strings": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"description": "Possible SNMP read community string for the devices"
}
},
"devices-ips": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"oneOf": [
{
"$ref": "#/definitions/ip-range"
},
{
"type": "object",
"properties": {
"range": {
"$ref": "#/definitions/ip-range"
},
"domain": {
"type": "string",
"description": "CloudShell Domain name"
}
}
}
]
}
}
}
}
An additional vendors configuration JSON scheme¶
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"name": {
"type": "string",
"description": "name for the vendor"
},
"family_name": {
"type": "string",
"description": "resource family name for the device on the CloudShell"
},
"model_name": {
"type": "string",
"description": "resource model name for the device on the CloudShell"
},
"driver_name": {
"type": "string",
"description": "driver name for the device on the CloudShell"
},
"aliases": {
"type": "array",
"items": {
"type": "string",
"description": "regex string which can be an alias for the vendor name"
}
},
"default_prompt": {
"type": "string",
"description": "regexp string for the default prompt"
},
"enable_prompt": {
"type": "string",
"description": "regexp string for the enable prompt"
},
"networking_device": {
"type": "object",
"required": [
"name",
"type",
"operation_systems"
],
"properties": {
"name": {
"$ref": "#/definitions/name"
},
"aliases": {
"$ref": "#/definitions/aliases"
},
"type": {
"enum": [
"networking"
]
},
"default_os": {
"type": "string",
"description": "default operation system name for the vendor"
},
"default_prompt": {
"$ref": "#/definitions/default_prompt"
},
"enable_prompt": {
"$ref": "#/definitions/enable_prompt"
},
"operation_systems": {
"type": "array",
"items": {
"type": "object",
"description": "operation system data within specific vendor",
"required": [
"name",
"families"
],
"properties": {
"name": {
"$ref": "#/definitions/name"
},
"aliases": {
"$ref": "#/definitions/aliases"
},
"default_model": {
"type": "string",
"description": "model type of the device (switch/router/ect.)"
},
"models_map": {
"type": "array",
"items": {
"type": "object",
"required": [
"model",
"aliases"
],
"properties": {
"model": {
"type": "string",
"description": "model type of the device (switch/router/ect.)"
},
"aliases": {
"$ref": "#/definitions/aliases"
}
}
}
},
"families": {
"type": "object",
"additionalProperties": {
"type": "object",
"description": "family/model name info by the device model type",
"properties": {
"first_gen": {
"type": "object",
"required": [
"family_name",
"model_name",
"driver_name"
],
"properties": {
"family_name": {
"$ref": "#/definitions/family_name"
},
"model_name": {
"$ref": "#/definitions/model_name"
},
"driver_name": {
"$ref": "#/definitions/driver_name"
}
}
},
"second_gen": {
"type": "object",
"required": [
"family_name",
"model_name",
"driver_name"
],
"properties": {
"family_name": {
"$ref": "#/definitions/family_name"
},
"model_name": {
"$ref": "#/definitions/model_name"
},
"driver_name": {
"$ref": "#/definitions/driver_name"
}
}
}
}
}
}
}
}
}
}
},
"pdu_device": {
"type": "object",
"required": [
"name",
"type",
"family_name",
"model_name",
"driver_name"
],
"properties": {
"name": {
"$ref": "#/definitions/name"
},
"type": {
"enum": [
"PDU"
]
},
"default_prompt": {
"$ref": "#/definitions/default_prompt"
},
"enable_prompt": {
"$ref": "#/definitions/enable_prompt"
},
"family_name": {
"$ref": "#/definitions/family_name"
},
"model_name": {
"$ref": "#/definitions/model_name"
},
"driver_name": {
"$ref": "#/definitions/driver_name"
}
}
}
},
"type": "array",
"description": "schema for the additional vendors configuration",
"items": {
"type": "object",
"oneOf": [
{
"$ref": "#/definitions/networking_device"
},
{
"$ref": "#/definitions/pdu_device"
}
]
}
}