Copied to Clipboard
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "goldenConfigData",
"definitions": {
"goldenConfigNodePath": {
"title": "goldenConfigNodePath",
"type": "string",
"examples": [
"base",
"base/US East",
"base/US East/Atlanta"
]
},
"goldenConfigTreeVersionName": {
"title": "goldenConfigTreeVersionName",
"type": "string",
"examples": [
"initial",
"v2",
"v3",
"draft-v4"
]
},
"goldenConfigNode": {
"title": "goldenConfigNode",
"type": "object",
"properties": {
"name": {
"type": "string",
"examples": [
"base",
"us-east",
"edge"
]
},
"attributes": {
"type": "object",
"properties": {
"devices": {
"type": "array",
"items": {
"$ref": "deviceData#/definitions/deviceName"
}
},
"configId": {
"$ref": "common#/definitions/mongoObjectId"
}
}
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/goldenConfigNode"
}
}
},
"required": [
"name",
"attributes",
"children"
]
},
"goldenConfigTreeVariable": {
"type": "object",
"properties": {
"name": {
"type": "string",
"examples": [
"variable name"
]
},
"type": {
"type": "string",
"enum": [
"literal",
"regex"
]
},
"value": {
"type": "string",
"examples": [
"variable value"
]
}
}
},
"goldenConfigTreeVersion": {
"title": "goldenConfigTreeVersion",
"type": "object",
"properties": {
"id": {
"$ref": "common#/definitions/mongoObjectId"
},
"name": {
"type": "string",
"examples": [
"Cisco Edge - Day 0",
"Cisco Edge - Day 1",
"Cisco Core - Day 0",
"Cisco Core - Day 1"
]
},
"deviceType": {
"type": "string",
"examples": [
"cisco-ios",
"cisco-ios-xr",
"cisco-nx",
"a10-acos",
"f5-big-ip"
]
},
"version": {
"type": "string",
"examples": [
"initial",
"v2",
"v3",
"draft v4"
]
},
"root": {
"$ref": "#/definitions/goldenConfigNode"
},
"variables": {
"type": "array",
"items": {
"$ref": "#/definitions/goldenConfigTreeVariable"
}
},
"created": {
"$ref": "common#/definitions/timestamp"
},
"createdBy": {
"$ref": "common#/definitions/mongoObjectId"
},
"lastUpdated": {
"$ref": "common#/definitions/timestamp"
},
"lastUpdatedBy": {
"$ref": "common#/definitions/mongoObjectId"
}
}
},
"goldenConfigTreeVersionSummary": {
"title": "goldenConfigTreeVersion",
"type": "object",
"properties": {
"id": {
"$ref": "common#/definitions/mongoObjectId"
},
"name": {
"type": "string",
"examples": [
"Cisco Edge - Day 0",
"Cisco Edge - Day 1",
"Cisco Core - Day 0",
"Cisco Core - Day 1"
]
},
"deviceType": {
"type": "string",
"examples": [
"cisco-ios",
"cisco-ios-xr",
"cisco-nx",
"a10-acos",
"f5-big-ip"
]
},
"versions": {
"type": "array",
"items": {
"type": "string",
"examples": [
"initial",
"v2",
"v3",
"draft v4"
]
}
},
"created": {
"$ref": "common#/definitions/timestamp"
},
"lastUpdated": {
"$ref": "common#/definitions/timestamp"
}
}
},
"goldenConfigSpecWord": {
"title": "goldenConfigSpecWord",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"literal",
"regex",
"variable"
]
},
"value": {
"type": "string",
"examples": [
" or or "
]
}
}
},
"goldenConfigSpecLineId": {
"type": "string",
"pattern": "^[0-9a-f]{16}$",
"examples": [
"5c353f69d085d85c",
"5c353f69e69c9dc4",
"5c353f691dd5c3b9",
"5c9964aa0d66293a",
"5c353f694ed8385d",
"5c353f699915cc4a",
"5c353f692edfafcf",
"5c353f6940fd1ec5",
"5c353f6932963635"
]
},
"goldenConfigSpecLine": {
"title": "goldenConfigSpecLine",
"type": "object",
"properties": {
"id": {
"$ref": "#/definitions/goldenConfigSpecLineId"
},
"evalMode": {
"type": "string",
"enum": [
"required",
"disallowed",
"ignored",
"optional"
]
},
"severity": {
"type": "string",
"enum": [
"error",
"warning",
"info"
]
},
"words": {
"type": "array",
"items": {
"$ref": "#/definitions/goldenConfigSpecWord"
}
},
"lines": {
"type": "array",
"items": {
"$ref": "#/definitions/goldenConfigSpecLine"
}
}
}
},
"goldenConfigSpec": {
"type": "object",
"properties": {
"id": {
"$ref": "common#/definitions/mongoObjectId"
},
"deviceType": {
"type": "string",
"examples": [
"cisco-ios",
"cisco-ios-xr",
"cisco-nx",
"a10-acos",
"f5-big-ip"
]
},
"lines": {
"type": "array",
"items": {
"$ref": "#/definitions/goldenConfigSpecLine"
}
},
"created": {
"$ref": "common#/definitions/timestamp"
},
"createdBy": {
"$ref": "common#/definitions/mongoObjectId"
},
"lastUpdated": {
"$ref": "common#/definitions/timestamp"
},
"lastUpdatedBy": {
"$ref": "common#/definitions/mongoObjectId"
}
}
},
"goldenConfigJSONSpec": {
"type": "object",
"properties": {
"id": {
"$ref": "common#/definitions/mongoObjectId"
},
"deviceType": {
"type": "string",
"examples": [
"json"
]
},
"data": {
"type": "object",
"properties": {}
},
"created": {
"$ref": "common#/definitions/timestamp"
},
"createdBy": {
"$ref": "common#/definitions/mongoObjectId"
},
"lastUpdated": {
"$ref": "common#/definitions/timestamp"
},
"lastUpdatedBy": {
"$ref": "common#/definitions/mongoObjectId"
}
}
},
"goldenConfigVariables": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/goldenConfigTreeVariable"
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"literal",
"regex"
]
},
"value": {
"type": "string",
"examples": [
"string value",
"^regular.*expression$"
]
}
}
},
{
"type": "string",
"examples": [
"string value"
]
}
]
}
}
]
},
"reportGradingOptions": {
"type": "object",
"properties": {
"weights": {
"type": "object",
"properties": {
"error": {
"type": "number"
},
"warning": {
"type": "number"
},
"info": {
"type": "number"
}
}
},
"benchmarks": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"gradeDeviceComplianceHistoryOptions": {
"type": "object",
"properties": {
"weights": {
"type": "object",
"properties": {
"error": {
"type": "number"
},
"warning": {
"type": "number"
},
"info": {
"type": "number"
}
}
},
"benchmarks": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
},
"limit": {
"type": "integer",
"minimum": 1
}
}
},
"complianceSummary": {
"title": "complianceSummary",
"type": "object",
"properties": {
"errors": {
"type": "integer",
"minimum": 0
},
"warnings": {
"type": "integer",
"minimum": 0
},
"passes": {
"type": "integer",
"minimum": 0
},
"infos": {
"type": "integer",
"minimum": 0
},
"deviceWithErrors": {
"type": "integer",
"minimum": 0
},
"deviceWithWarnings": {
"type": "integer",
"minimum": 0
},
"deviceWithInfos": {
"type": "integer",
"minimum": 0
},
"fullyCompliantDevices": {
"type": "integer",
"minimum": 0
},
"numDevices": {
"type": "integer",
"minimum": 0
}
}
},
"complianceReportTotals": {
"type": "object",
"properties": {
"errors": {
"type": "integer",
"minimum": 0
},
"warnings": {
"type": "integer",
"minimum": 0
},
"infos": {
"type": "integer",
"minimum": 0
},
"passes": {
"type": "integer",
"minimum": 0
}
}
},
"complianceIssue": {
"title": "complianceIssue",
"type": "object",
"properties": {
"severity": {
"enum": [
"error",
"warning",
"info"
]
},
"type": {
"enum": [
"required",
"disallowed"
]
},
"message": {
"type": "string",
"examples": [
"Required config not found"
]
},
"specLineId": {
"$ref": "#/definitions/goldenConfigSpecLineId"
},
"path": {
"type": "array",
"items": {
"type": "string",
"examples": [
"interface GigE1"
]
}
},
"spec": {
"$ref": "#/definitions/goldenConfigSpecLine"
},
"configWords": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"const": "literal"
},
"value": {
"type": "string",
"examples": [
"word"
]
}
}
}
},
"candidates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"const": "literal"
},
"value": {
"type": "string",
"examples": [
"word"
]
}
}
}
}
}
},
"complianceReport": {
"title": "complianceReport",
"type": "object",
"properties": {
"id": {
"$ref": "common#/definitions/mongoObjectId"
},
"batchId": {
"$ref": "common#/definitions/mongoObjectId"
},
"treeId": {
"$ref": "common#/definitions/mongoObjectId"
},
"version": {
"$ref": "#/definitions/goldenConfigTreeVersionName"
},
"nodePath": {
"$ref": "#/definitions/goldenConfigNodePath"
},
"deviceType": {
"type": "string",
"examples": [
"cisco-ios",
"cisco-ios-xr",
"junos"
]
},
"specId": {
"$ref": "common#/definitions/mongoObjectId"
},
"inheritedSpecIds": {
"type": "array",
"items": {
"$ref": "common#/definitions/mongoObjectId"
}
},
"deviceName": {
"$ref": "deviceData#/definitions/deviceName"
},
"variables": {
"type": "array",
"items": {
"$ref": "#/definitions/goldenConfigTreeVariable"
}
},
"timestamp": {
"$ref": "common#/definitions/timestamp"
},
"totals": {
"$ref": "#/definitions/complianceReportTotals"
},
"issues": {
"type": "array",
"items": {
"$ref": "#/definitions/complianceIssue"
}
},
"score": {
"type": "number"
}
}
},
"complianceReportBrief": {
"title": "complianceReportBrief",
"type": "object",
"properties": {
"id": {
"$ref": "common#/definitions/mongoObjectId"
},
"batchId": {
"$ref": "common#/definitions/mongoObjectId"
},
"treeId": {
"$ref": "common#/definitions/mongoObjectId"
},
"version": {
"type": "string",
"examples": [
"initial",
"v2",
"v3",
"draft v4"
]
},
"nodePath": {
"$ref": "#/definitions/goldenConfigNodePath"
},
"deviceName": {
"$ref": "deviceData#/definitions/deviceName"
},
"timestamp": {
"$ref": "common#/definitions/timestamp"
},
"totals": {
"$ref": "#/definitions/complianceReportTotals"
}
}
},
"complianceReportBriefGraded": {
"title": "complianceReportBriefGraded",
"type": "object",
"properties": {
"id": {
"title": "complianceReportId",
"$ref": "common#/definitions/mongoObjectId"
},
"nodePath": {
"type": "string",
"examples": [
"base/US East/Atlanta"
]
},
"deviceName": {
"title": "deviceName",
"$ref": "deviceData#/definitions/deviceName"
},
"timestamp": {
"$ref": "common#/definitions/timestamp"
},
"error": {
"type": "integer",
"minimum": 0
},
"warning": {
"type": "integer",
"minimum": 0
},
"info": {
"type": "integer",
"minimum": 0
},
"pass": {
"type": "integer",
"minimum": 0
},
"score": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"grade": {
"type": "string",
"examples": [
"pass",
"review",
"fail"
]
}
}
},
"complianceReportGraded": {
"title": "complianceReportGraded",
"allOf": [
{
"$ref": "#/definitions/complianceReport"
},
{
"type": "object",
"properties": {
"score": {
"type": "number"
},
"grade": {
"type": "string",
"examples": [
"pass",
"fail",
"review"
]
}
}
}
]
}
}
}