Skip to content
Snippets Groups Projects
Commit 8a169630 authored by Jovana Vuleta's avatar Jovana Vuleta
Browse files

NAT-8: JSON schemas in public read-only repository

parent 63593f39
Branches main
No related tags found
No related merge requests found
Showing
with 1088 additions and 0 deletions
{
"$id": "https://example.com/arrays.schema.json",
"$schema": "http://json-schema.org/draft-03/schema#",
"description": "A representation of a prefix-list on Geant routers",
"type": "array",
"items": { "$ref": "#/$defs/prefix_list" },
"$defs": {
"prefix_list": {
"type": "object",
"required": [ "name" ],
"oneOf": [
{"required": ["prefixes"]},
{"required": ["apply-path"]}
],
"properties": {
"name": {
"type": "string",
"description": "The name of the prefix-list."
},
"prefixes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Prefixes of the prefix list - for now no strict IP validation"
},
"apply-path": {
"type": "string",
"description": "Apply path for dynamic prefix-lists"
}
}
}
}
}
{
"$id": "https://example.com/arrays.schema.json",
"$schema": "http://json-schema.org/draft-03/schema#",
"description": "A representation of a SNMP community on Geant routers",
"type": "array",
"items": { "$ref": "#/$defs/snmp_community" },
"$defs": {
"snmp_community": {
"type": "object",
"required": [ "name" , "authorization", "clients"],
"properties": {
"name": {
"type": "string",
"description": "The name of the community"
},
"authorization": {
"type": "string",
"description": "The name of the community",
"enum":["read-only"]
},
"clients": {
"type": "array",
"description": "Clients for a community",
"items": {
"type": "object",
"required": [ "client" , "description"],
"properties": {
"client": {
"type": "string",
"description": "The IP address"
},
"description": {
"type": "string",
"description": "A meaningful description for a client"
}
}
}
}
}
}
}
}
{
"$id": "https://example.com/arrays.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A representation of a user class on Geant routers",
"type": "array",
"items": { "$ref": "#/$defs/system_login_class" },
"$defs": {
"system_login_class": {
"type": "object",
"required": [ "name", "permissions" ],
"properties": {
"name": {
"type": "string",
"description": "The name of the user."
},
"idle-timeout": {
"type": "integer",
"description": "The timeout for a session in minutes"
},
"allow-commands": {
"type": "string",
"description": "The list of allowed commands"
},
"deny-commands": {
"type": "string",
"description": "The list of denied commands"
},
"permissions": {
"type": "array",
"description": "The permissions for a user class",
"items": {
"type":"string"
}
}
}
}
}
}
{
"$id": "https://example.com/arrays.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A representation of a local user on Geant routers",
"type": "array",
"items": { "$ref": "#/$defs/system_login_user" },
"$defs": {
"system_login_user": {
"type": "object",
"required": [ "name", "class" ],
"properties": {
"name": {
"type": "string",
"description": "The name of the user."
},
"class": {
"type": "string",
"description": "The class of the user"
},
"uid": {
"type": "integer",
"description": "The uid of the user"
},
"authentication": {
"type": "object",
"description": "The authentication methods for a user",
"properties": {
"ssh_rsa": {
"type": "array",
"description": "The ssh-rsa keys of the user",
"items":{
"type": "string"
}
},
"ssh_dsa": {
"type": "array",
"description": "The ssh-dsa keys of the user",
"items":{
"type": "string"
}
},
"encrypted_password": {
"type": "string",
"description": "The password of the user"
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "object",
"default": {},
"title": "Root Schema",
"required": [
"cfg_bakcup_password"
],
"properties": {
"cfg_bakcup_password": {
"type": "string",
"default": "",
"title": "The cfg_bakcup_password Schema"
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "string",
"default": {},
"title": "Root Schema",
"required": [
"cfg_backup_path"
],
"properties": {
"cfg_backup_path": {
"type": "string",
"default": "",
"title": "The cfg_backup_path Schema"
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "string",
"default": {},
"title": "Root Schema",
"required": [
"cfg_backup_username"
],
"properties": {
"cfg_backup_username": {
"type": "string",
"default": "",
"title": "The cfg_backup_username Schema"
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "integer",
"default": {},
"title": "Root Schema",
"required": [
"chassis_aggredated_ethernet_count"
],
"properties": {
"chassis_aggredated_ethernet_count": {
"type": "integer",
"default": 0,
"title": "The chassis_aggredated_ethernet_count Schema"
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "boolean",
"default": {},
"title": "Root Schema",
"required": [
"chassis_enhanced_ip"
],
"properties": {
"chassis_enhanced_ip": {
"type": "boolean",
"default": false,
"title": "The chassis_enhanced_ip Schema"
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "boolean",
"default": {},
"title": "Root Schema",
"required": [
"chassis_graceful_switchover_inactive"
],
"properties": {
"chassis_graceful_switchover_inactive": {
"type": "boolean",
"default": false,
"title": "The chassis_graceful_switchover_inactive Schema"
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "array",
"default": {},
"title": "Root Schema",
"required": [
"cos_classifiers"
],
"properties": {
"cos_classifiers": {
"type": "array",
"default": [],
"title": "The cos_classifiers Schema",
"items": {
"type": "object",
"title": "A Schema",
"required": [
"name",
"type",
"import",
"forwarding_classes"
],
"properties": {
"name": {
"type": "string",
"title": "The name Schema"
},
"type": {
"type": "string",
"title": "The type Schema"
},
"import": {
"type": "string",
"title": "The import Schema"
},
"forwarding_classes": {
"type": "array",
"title": "The forwarding_classes Schema",
"items": {
"type": "object",
"title": "A Schema",
"required": [
"name",
"loss_priority",
"code_points"
],
"properties": {
"name": {
"type": "string",
"title": "The name Schema"
},
"loss_priority": {
"type": "string",
"title": "The loss_priority Schema"
},
"code_points": {
"type": "array",
"title": "The code_points Schema",
"items": {
"anyOf": [{
"type": "string",
"title": "A Schema"
},
{
"type": "integer",
"title": "A Schema"
}]
}
}
}
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "array",
"default": {},
"title": "Root Schema",
"required": [
"cos_drop_profiles"
],
"properties": {
"cos_drop_profiles": {
"type": "array",
"default": [],
"title": "The cos_drop_profiles Schema",
"items": {
"type": "object",
"default": {},
"title": "A Schema",
"required": [
"name",
"fill_levels",
"drop_probabilities"
],
"properties": {
"name": {
"type": "string",
"default": "",
"title": "The name Schema"
},
"fill_levels": {
"type": "array",
"default": [],
"title": "The fill_levels Schema",
"items": {
"type": "integer",
"title": "A Schema"
}
},
"drop_probabilities": {
"type": "array",
"default": [],
"title": "The drop_probabilities Schema",
"items": {
"type": "integer",
"title": "A Schema"
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "array",
"default": {},
"title": "Root Schema",
"required": [
"cos_forwarding_classes"
],
"properties": {
"cos_forwarding_classes": {
"type": "array",
"default": [],
"title": "The cos_forwarding_classes Schema",
"items": {
"type": "object",
"default": {},
"title": "A Schema",
"required": [
"name",
"queue_num",
"priority"
],
"properties": {
"name": {
"type": "string",
"default": "",
"title": "The name Schema"
},
"queue_num": {
"type": "integer",
"default": 0,
"title": "The queue_num Schema"
},
"priority": {
"type": "string",
"default": "",
"title": "The priority Schema"
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "array",
"default": {},
"title": "Root Schema",
"required": [
"cos_interfaces"
],
"properties": {
"cos_interfaces": {
"type": "array",
"default": [],
"title": "The cos_interfaces Schema",
"items": {
"type": "object",
"title": "A Schema",
"required": [
"regex",
"scheduler_map",
"classifiers",
"rewrite_rules"
],
"properties": {
"regex": {
"type": "string",
"title": "The regex Schema"
},
"scheduler_map": {
"type": "string",
"title": "The scheduler_map Schema"
},
"classifiers": {
"type": "array",
"title": "The classifiers Schema",
"items": {
"type": "object",
"title": "A Schema",
"required": [
"type",
"name"
],
"properties": {
"type": {
"type": "string",
"title": "The type Schema"
},
"name": {
"type": "string",
"title": "The name Schema"
}
}
}
},
"rewrite_rules": {
"type": "array",
"title": "The rewrite_rules Schema",
"items": {
"type": "object",
"title": "A Schema",
"required": [
"type",
"name",
"protocol"
],
"properties": {
"type": {
"type": "string",
"title": "The type Schema"
},
"name": {
"type": "string",
"title": "The name Schema"
},
"protocol": {
"type": "string",
"title": "The protocol Schema"
}
}
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "array",
"default": {},
"title": "Root Schema",
"required": [
"cos_rewrite_rules"
],
"properties": {
"cos_rewrite_rules": {
"type": "array",
"default": [],
"title": "The cos_rewrite_rules Schema",
"items": {
"type": "object",
"default": {},
"title": "A Schema",
"required": [
"name",
"type",
"import",
"forwarding_classes"
],
"properties": {
"name": {
"type": "string",
"default": "",
"title": "The name Schema"
},
"type": {
"type": "string",
"default": "",
"title": "The type Schema"
},
"import": {
"type": "string",
"default": "",
"title": "The import Schema"
},
"forwarding_classes": {
"type": "array",
"default": [],
"title": "The forwarding_classes Schema",
"items": {
"type": "object",
"default": {},
"title": "A Schema",
"required": [
"name",
"loss_priorities"
],
"properties": {
"name": {
"type": "string",
"default": "",
"title": "The name Schema"
},
"loss_priorities": {
"type": "array",
"default": [],
"title": "The loss_priorities Schema",
"items": {
"type": "object",
"title": "A Schema",
"required": [
"type",
"code_point"
],
"properties": {
"type": {
"type": "string",
"title": "The type Schema"
},
"code_point": {
"type": "string",
"title": "The code_point Schema"
}
}
}
}
}
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "array",
"default": {},
"title": "Root Schema",
"required": [
"cos_scheduler_maps"
],
"properties": {
"cos_scheduler_maps": {
"type": "array",
"default": [],
"title": "The cos_scheduler_maps Schema",
"items": {
"type": "object",
"default": {},
"title": "A Schema",
"required": [
"name",
"mappings"
],
"properties": {
"name": {
"type": "string",
"default": "",
"title": "The name Schema"
},
"mappings": {
"type": "array",
"default": [],
"title": "The mappings Schema",
"items": {
"type": "object",
"title": "A Schema",
"required": [
"class",
"scheduler"
],
"properties": {
"class": {
"type": "string",
"title": "The class Schema"
},
"scheduler": {
"type": "string",
"title": "The scheduler Schema"
}
}
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "array",
"default": {},
"title": "Root Schema",
"required": [
"cos_schedulers"
],
"properties": {
"cos_schedulers": {
"type": "array",
"default": [],
"title": "The cos_schedulers Schema",
"items": {
"type": "object",
"title": "A Schema",
"required": [
"name",
"transmit_rate",
"buffer_size",
"priority",
"drop_profile_map"
],
"properties": {
"name": {
"type": "string",
"title": "The name Schema"
},
"transmit_rate": {
"type": "object",
"title": "The transmit_rate Schema",
"required": [
"unit",
"value"
],
"properties": {
"unit": {
"type": "string",
"title": "The unit Schema"
},
"value": {
"type": "integer",
"title": "The value Schema"
}
}
},
"buffer_size": {
"type": "object",
"title": "The buffer_size Schema",
"required": [
"unit",
"value"
],
"properties": {
"unit": {
"type": "string",
"title": "The unit Schema"
},
"value": {
"type": [
"string",
"integer"
],
"title": "The value Schema"
}
}
},
"priority": {
"type": "string",
"title": "The priority Schema"
},
"drop_profile_map": {
"type": "object",
"default": {},
"title": "The drop_profile_map Schema",
"required": [
"loss_priority",
"protocol",
"drop_profile"
],
"properties": {
"loss_priority": {
"type": "string",
"default": "",
"title": "The loss_priority Schema"
},
"protocol": {
"type": "string",
"default": "",
"title": "The protocol Schema"
},
"drop_profile": {
"type": "string",
"default": "",
"title": "The drop_profile Schema"
}
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "object",
"default": {},
"title": "Root Schema",
"required": [
"family_inet_filters"
],
"properties": {
"family_inet_filters": {
"type": "array",
"default": [],
"title": "The family_inet_filters Schema",
"items": {
"type": "object",
"default": {},
"title": "A Schema",
"required": [
"name",
"terms",
"interface"
],
"properties": {
"name": {
"type": "string",
"default": "",
"title": "The name Schema"
},
"terms": {
"type": "array",
"default": [],
"title": "The terms Schema",
"items": {
"type": "object",
"title": "A Schema",
"required": [
"name",
"from",
"then"
],
"properties": {
"name": {
"type": "string",
"title": "The name Schema"
},
"from": {
"type": "object",
"title": "The from Schema",
"required": [
"protocol",
"tcp_established",
"source_prefix_lists",
"destination_ports",
"source_ports"
],
"properties": {
"protocol": {
"type": "string",
"title": "The protocol Schema"
},
"tcp_established": {
"type": "string",
"default": "",
"title": "The tcp_established Schema"
},
"source_prefix_lists": {
"type": "array",
"title": "The source_prefix_lists Schema",
"items": {
"type": "string",
"title": "A Schema"
}
},
"destination_ports": {
"type": "array",
"title": "The destination_ports Schema",
"items": {
"anyOf": [{
"type": "integer",
"title": "A Schema"
},
{
"type": "string",
"default": "",
"title": "A Schema"
}]
}
},
"source_ports": {
"type": "array",
"title": "The source_ports Schema",
"items": {
"anyOf": [{
"type": "string",
"default": "",
"title": "A Schema"
},
{
"type": "integer",
"default": 0,
"title": "A Schema"
}]
}
}
}
},
"then": {
"type": "object",
"title": "The then Schema",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"title": "The action Schema"
}
}
}
}
}
},
"interface": {
"type": "object",
"default": {},
"title": "The interface Schema",
"required": [
"name",
"direction"
],
"properties": {
"name": {
"type": "string",
"default": "",
"title": "The name Schema"
},
"direction": {
"type": "string",
"default": "",
"title": "The direction Schema"
}
}
}
}
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/example.json",
"type": "object",
"default": {},
"title": "Root Schema",
"required": [ ],
"properties": {
"firewall": {
"type": "object",
"default": {},
"title": "The firewall Schema",
"required": [
"inet"
],
"properties": {
"inet": {
"type": "object",
"default": {},
"title": "The inet Schema",
"required": [
"ROUTER_access"
],
"properties": {
"ROUTER_access": {
"type": "object",
"default": {},
"title": "The ROUTER_access Schema",
"required": [
"terms"
],
"properties": {
"terms": {
"type": "array",
"default": [],
"title": "The terms Schema",
"items": {
"type": "object",
"title": "A Schema",
"required": [
"name",
"from",
"then"
],
"properties": {
"name": {
"type": "string",
"title": "The name Schema"
},
"from": {
"type": "object",
"title": "The from Schema",
"required": [
"protocol",
"tcp-established",
"source-prefix-list",
"destination-port",
"port",
"icmp-type"
],
"properties": {
"protocol": {
"type": "string",
"title": "The protocol Schema"
},
"tcp-established": {
"type": "null",
"default": null,
"title": "The tcp-established Schema"
},
"source-prefix-list": {
"type": "array",
"title": "The source-prefix-list Schema",
"items": {
"type": "string",
"title": "A Schema"
}
},
"destination-port": {
"type": [
"string",
"array",
"integer"
],
"title": "The destination-port Schema",
"items": {
"type": "string",
"title": "A Schema"
}
},
"port": {
"type": [
"string",
"array",
"integer"
],
"title": "The port Schema",
"items": {
"anyOf": [{
"type": "integer",
"title": "A Schema"
},
{
"type": "string",
"title": "A Schema"
}]
}
},
"icmp-type": {
"type": "array",
"default": [],
"title": "The icmp-type Schema",
"items": {
"type": "string",
"title": "A Schema"
}
}
}
},
"then": {
"type": [
"string",
"array"
],
"title": "The then Schema",
"items": {
"anyOf": [{
"type": "object",
"title": "A Schema",
"required": [
"count",
"policer"
],
"properties": {
"count": {
"type": "string",
"default": "",
"title": "The count Schema"
},
"policer": {
"type": "string",
"title": "The policer Schema"
}
}
},
{
"type": "string",
"title": "A Schema"
}]
}
}
}
}
}
}
}
}
}
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment