ConfigFileFormat » History » Version 2
Vince Lehman, 03/01/2016 09:06 AM
| 1 | 1 | Vince Lehman | ConfigFileFormat |
|---|---|---|---|
| 2 | ================ |
||
| 3 | |||
| 4 | # File Format v2.0 |
||
| 5 | |||
| 6 | ## Topology Schema |
||
| 7 | ``` JSON |
||
| 8 | { |
||
| 9 | "$schema": "http://json-schema.org/draft-04/schema#", |
||
| 10 | "id": "/", |
||
| 11 | "type": "object", |
||
| 12 | "properties": { |
||
| 13 | "hosts": { |
||
| 14 | "id": "hosts", |
||
| 15 | "type": "array", |
||
| 16 | "items": [], |
||
| 17 | "description": "Array of hosts in the topology" |
||
| 18 | }, |
||
| 19 | "links": { |
||
| 20 | "id": "links", |
||
| 21 | "type": "array", |
||
| 22 | "items": [], |
||
| 23 | "description": "Array of links in the topology" |
||
| 24 | }, |
||
| 25 | "routers": { |
||
| 26 | "id": "routers", |
||
| 27 | "type": "array", |
||
| 28 | "items": [], |
||
| 29 | "description": "Array of routers in the topology" |
||
| 30 | }, |
||
| 31 | "switches": { |
||
| 32 | "id": "switches", |
||
| 33 | "type": "array", |
||
| 34 | "items": [], |
||
| 35 | "description": "Array of switches in the topology" |
||
| 36 | }, |
||
| 37 | "version": { |
||
| 38 | "id": "version", |
||
| 39 | "type": "string", |
||
| 40 | "description": "File format version" |
||
| 41 | } |
||
| 42 | }, |
||
| 43 | "required": [ |
||
| 44 | "hosts", |
||
| 45 | "links", |
||
| 46 | "routers", |
||
| 47 | "switches", |
||
| 48 | "version" |
||
| 49 | ] |
||
| 50 | } |
||
| 51 | |||
| 52 | ``` |
||
| 53 | 2 | Vince Lehman | |
| 54 | ## Host Schema |
||
| 55 | ``` JSON |
||
| 56 | { |
||
| 57 | "$schema": "http://json-schema.org/draft-04/schema#", |
||
| 58 | "id": "Host", |
||
| 59 | "type": "object", |
||
| 60 | "properties": { |
||
| 61 | "number": { |
||
| 62 | "id": "number", |
||
| 63 | "type": "string" |
||
| 64 | }, |
||
| 65 | "opts": { |
||
| 66 | "id": "opts", |
||
| 67 | "type": "object", |
||
| 68 | "properties": { |
||
| 69 | "cpu": { |
||
| 70 | "id": "cpu", |
||
| 71 | "type": "string" |
||
| 72 | }, |
||
| 73 | "hostname": { |
||
| 74 | "id": "hostname", |
||
| 75 | "type": "string" |
||
| 76 | }, |
||
| 77 | "mem": { |
||
| 78 | "id": "mem", |
||
| 79 | "type": "string" |
||
| 80 | }, |
||
| 81 | "nfd": { |
||
| 82 | "id": "nfd", |
||
| 83 | "type": "object", |
||
| 84 | "properties": { |
||
| 85 | "log-level": { |
||
| 86 | "id": "log-level", |
||
| 87 | "type": "string" |
||
| 88 | } |
||
| 89 | } |
||
| 90 | }, |
||
| 91 | "nlsr": { |
||
| 92 | "id": "nlsr", |
||
| 93 | "type": "object", |
||
| 94 | "properties": { |
||
| 95 | "angle": { |
||
| 96 | "id": "angle", |
||
| 97 | "type": "string" |
||
| 98 | }, |
||
| 99 | "hyperbolic-state": { |
||
| 100 | "id": "hyperbolic-state", |
||
| 101 | "type": "string" |
||
| 102 | }, |
||
| 103 | "log-level": { |
||
| 104 | "id": "log-level", |
||
| 105 | "type": "string" |
||
| 106 | }, |
||
| 107 | "max-faces-per-prefix": { |
||
| 108 | "id": "max-faces-per-prefix", |
||
| 109 | "type": "string" |
||
| 110 | }, |
||
| 111 | "network": { |
||
| 112 | "id": "network", |
||
| 113 | "type": "string" |
||
| 114 | }, |
||
| 115 | "radius": { |
||
| 116 | "id": "radius", |
||
| 117 | "type": "string" |
||
| 118 | }, |
||
| 119 | "router": { |
||
| 120 | "id": "router", |
||
| 121 | "type": "string" |
||
| 122 | }, |
||
| 123 | "site": { |
||
| 124 | "id": "site", |
||
| 125 | "type": "string" |
||
| 126 | } |
||
| 127 | } |
||
| 128 | }, |
||
| 129 | "nodeNum": { |
||
| 130 | "id": "nodeNum", |
||
| 131 | "type": "integer" |
||
| 132 | } |
||
| 133 | } |
||
| 134 | }, |
||
| 135 | "x": { |
||
| 136 | "id": "x", |
||
| 137 | "type": "string" |
||
| 138 | }, |
||
| 139 | "y": { |
||
| 140 | "id": "y", |
||
| 141 | "type": "string" |
||
| 142 | } |
||
| 143 | }, |
||
| 144 | "required": [ |
||
| 145 | "number", |
||
| 146 | "opts", |
||
| 147 | "x", |
||
| 148 | "y" |
||
| 149 | ], |
||
| 150 | "description": "Configuration for a single host" |
||
| 151 | } |
||
| 152 | ``` |