1- chassis :
2- hostname : { jsnac_type: pattern, jsnac_pattern: "^ceos-[a-zA-Z]{1,16}[0-9]$" }
3- model : " ceos"
4- type : { jsnac_type: choice, jsnac_choices: ["router", "switch", "spine", "leaf"] }
1+ ---
2+ header :
3+ id : " example-schema.json"
4+ schema : " http://json-schema.org/draft-07/schema"
5+ title : " JSNAC Created Schema"
6+ description : " The below schema was created by JSNAC (https://github.com/commitconfirmed/jsnac)"
57
6- system :
7- domain_name : { jsnac_type: domain }
8- ntp_servers : [ { jsnac_type: ipv4 } ]
9-
10- interfaces :
11- - if : { jsnac_type: string }
12- desc : { jsnac_type: string }
13- ipv4 : { jsnac_type: ipv4_cidr }
14- ipv6 : { jsnac_type: ipv6_cidr }
8+ kinds :
9+ hostname :
10+ title : " Hostname"
11+ description : " Hostname of the device"
12+ type : " pattern"
13+ regex : " ^[a-zA-Z0-9-]{1,63}$"
14+
15+ schema :
16+ chassis :
17+ title : " Chassis"
18+ description : " Chassis information"
19+ type : " object"
20+ properties :
21+ hostname :
22+ kind : { name: "hostname" }
23+ model :
24+ kind : { name: "string" }
25+ device_type :
26+ title : " Type"
27+ description : " Type of the device"
28+ kind : { name: "choice", choices: [ "router", "switch", "firewall", "load-balancer" ] }
29+ required : [ "hostname", "model", "type" ]
30+ system :
31+ title : " System"
32+ description : " System information"
33+ type : " object"
34+ properties :
35+ domain_name :
36+ kind : { name: "string" }
37+ ntp_servers :
38+ title : " NTP Servers"
39+ description : " List of NTP servers"
40+ type : " array"
41+ items :
42+ kind : { name: "ipv4" }
43+ required : [ "domain_name", "ntp_servers" ]
44+ interfaces :
45+ title : " Interfaces"
46+ type : " array"
47+ items :
48+ type : " object"
49+ properties :
50+ if :
51+ kind : { name: "string" }
52+ desc :
53+ kind : { name: "string" }
54+ ipv4 :
55+ kind : { name: "ipv4_cidr" }
56+ ipv6 :
57+ kind : { name: "ipv6_cidr" }
58+ required : [ "if" ]
0 commit comments