blob: 33958761f343de61f398427806f0b80f6fc37d37 [file] [log] [blame]
Jian Lic134c7a2017-04-25 12:51:28 +09001{
2 "type": "object",
3 "title": "mappings",
4 "required": [
5 "mappings"
6 ],
7 "properties": {
8 "mappings": {
9 "type": "array",
10 "xml": {
11 "name": "mappings",
12 "wrapped": true
13 },
14 "items": {
15 "type": "object",
16 "title": "mapping",
17 "required": [
18 "id",
19 "state",
20 "deviceId",
21 "key",
22 "value"
23 ],
24 "properties": {
25 "id": {
26 "type": "string",
27 "example": "12103425214920339"
28 },
29 "state": {
30 "type": "string",
31 "example": "ADDED"
32 },
33 "deviceId": {
34 "type": "string",
35 "example": "lisp:1.2.3.4"
36 },
37 "key": {
38 "type": "object",
39 "title": "key",
40 "required": [
41 "address"
42 ],
43 "properties": {
44 "address": {
45 "type": "object",
46 "title": "address",
47 "required": [
48 "addrType",
49 "typeValue"
50 ],
51 "properties": {
52 "addrType": {
53 "type": "string",
54 "example": "IPV4"
55 },
56 "typeValue": {
57 "type": "string",
58 "example": "1.2.3.4"
59 }
60 }
61 }
62 }
63 },
64 "value": {
65 "type": "object",
66 "title": "value",
67 "required": [
68 "action",
69 "treatments"
70 ],
71 "properties": {
72 "action": {
73 "type": "string",
74 "example": "FORWARD"
75 },
76 "treatments": {
77 "type": "array",
78 "xml": {
79 "name": "treatments",
80 "wrapped": true
81 },
82 "items": {
83 "type": "object",
84 "title": "treatment",
85 "required": [
86 "address",
87 "instructions"
88 ],
89 "properties": {
90 "address": {
91 "type": "object",
92 "title": "address",
93 "required": [
94 "addrType",
95 "typeValue"
96 ],
97 "properties": {
98 "addrType": {
99 "type": "string",
100 "example": "IPV4"
101 },
102 "typeValue": {
103 "type": "string",
104 "example": "1.2.3.4"
105 }
106 }
107 },
108 "instructions": {
109 "type": "array",
110 "xml": {
111 "name": "instructions",
112 "wrapped": true
113 },
114 "items": {
115 "type": "object",
116 "title": "instruction",
117 "required": [
118 "instType",
119 "value"
120 ],
121 "properties": {
122 "instType": {
123 "type": "string",
124 "example": "WEIGHT"
125 },
126 "value": {
127 "type": "int32",
128 "format": "int32",
129 "example": 1
130 }
131 }
132 }
133 }
134 }
135 }
136 }
137 }
138 }
139 }
140 }
141 }
142 }
143}