Skip to content

Commit aa8f44f

Browse files
Adding installation instructions
1 parent 9ba9957 commit aa8f44f

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

README.md

+5-10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
JSON Schema (for) Network Automation Creator
77

88
- [Overview](#overview)
9+
- [Installation](#installation)
910
- [Brief Example](#brief-example)
1011
- [YAML Validation](#yaml-validation)
1112
- [Detailed Example](#detailed-example)
@@ -23,6 +24,10 @@ This project aims to simplify this whole process by helping you build a JSON sch
2324

2425
Now you can hopefully catch those rare mistakes before you run that Playbook, create that configuration with a Jinja2 template or run a REST query to that Source of Truth or Telemetry solution :)
2526

27+
## Installation
28+
29+
JSNAC can be installed using pip: ``pip install jsnac`` and can be used as either a command line tool or as a Python library in your own python project (See [Usage](#usage)).
30+
2631
## Brief Example
2732

2833
Take a basic Ansible host_vars YAML file for a host below:
@@ -56,7 +61,6 @@ header:
5661
schema:
5762
chassis:
5863
title: "Chassis"
59-
type: "object"
6064
properties:
6165
hostname:
6266
js_kind: { name: "string" }
@@ -65,18 +69,14 @@ schema:
6569
device_type:
6670
js_kind: { name: "choice", choices: [ "router", "switch", "firewall", "load-balancer" ] }
6771
system:
68-
type: "object"
6972
properties:
7073
domain_name:
7174
js_kind: { name: "string" }
7275
ntp_servers:
73-
type: "array"
7476
items:
7577
js_kind: { name: "ipv4" }
7678
interfaces:
77-
type: "array"
7879
items:
79-
type: "object"
8080
properties:
8181
if:
8282
js_kind: { name: "string" }
@@ -139,7 +139,6 @@ schema:
139139
hostname [required]: hostname
140140
model [required]: string
141141
device_type [required]: choice (router, switch, firewall, load-balancer)
142-
type: "object"
143142
properties:
144143
hostname:
145144
js_kind: { name: "hostname" }
@@ -158,14 +157,12 @@ schema:
158157
Object containing System information. Has the below properties:
159158
domain_name [required]: string
160159
ntp_servers [required]: list of ipv4 addresses
161-
type: "object"
162160
properties:
163161
domain_name:
164162
js_kind: { name: "string" }
165163
ntp_servers:
166164
title: "NTP Servers"
167165
description: "List of NTP servers"
168-
type: "array"
169166
items:
170167
js_kind: { name: "ipv4" }
171168
required: [ "domain_name", "ntp_servers" ]
@@ -177,9 +174,7 @@ schema:
177174
desc: string
178175
ipv4: ipv4_cidr
179176
ipv6: ipv6_cidr
180-
type: "array"
181177
items:
182-
type: "object"
183178
properties:
184179
if:
185180
js_kind: { name: "string" }

0 commit comments

Comments
 (0)