1 | {
|
2 | "$schema": "http://json-schema.org/draft-04/schema#",
|
3 | "title": "Trace protocol",
|
4 | "description": "This protocol is utilized for triggering and transmitting [Flowtrace](https://github.com/flowbased/flowtrace)s",
|
5 | "output": {
|
6 | "start": {
|
7 | "id": "output/start",
|
8 | "description": "Tracing was started",
|
9 | "$ref": "../input/start"
|
10 | },
|
11 | "stop": {
|
12 | "id": "output/stop",
|
13 | "description": "Tracing was stopped",
|
14 | "$ref": "../input/stop"
|
15 | },
|
16 | "clear": {
|
17 | "id": "output/clear",
|
18 | "description": "Tracing buffer was cleared",
|
19 | "$ref": "../input/clear"
|
20 | },
|
21 | "dump": {
|
22 | "id": "output/dump",
|
23 | "allOf": [
|
24 | {
|
25 | "$ref": "/shared/message"
|
26 | },
|
27 | {
|
28 | "properties": {
|
29 | "protocol": {
|
30 | "enum": [
|
31 | "trace"
|
32 | ]
|
33 | },
|
34 | "command": {
|
35 | "enum": [
|
36 | "dump"
|
37 | ]
|
38 | },
|
39 | "payload": {
|
40 | "required": [
|
41 | "graph",
|
42 | "type",
|
43 | "flowtrace"
|
44 | ],
|
45 | "additionalProperties": false,
|
46 | "properties": {
|
47 | "graph": {
|
48 | "$ref": "/shared/graph_id"
|
49 | },
|
50 | "type": {
|
51 | "description": "String describing type of trace.",
|
52 | "type": "string",
|
53 | "enum": [
|
54 | "flowtrace.json"
|
55 | ]
|
56 | },
|
57 | "flowtrace": {
|
58 | "description": "A Flowtrace file of `type`",
|
59 | "type": "string"
|
60 | }
|
61 | }
|
62 | }
|
63 | }
|
64 | }
|
65 | ]
|
66 | },
|
67 | "error": {
|
68 | "id": "output/error",
|
69 | "description": "Error response to a command on trace protocol",
|
70 | "allOf": [
|
71 | {
|
72 | "$ref": "/shared/message"
|
73 | },
|
74 | {
|
75 | "properties": {
|
76 | "protocol": {
|
77 | "enum": [
|
78 | "trace"
|
79 | ]
|
80 | },
|
81 | "command": {
|
82 | "enum": [
|
83 | "error"
|
84 | ]
|
85 | },
|
86 | "payload": {
|
87 | "required": [
|
88 | "message"
|
89 | ],
|
90 | "properties": {
|
91 | "message": {
|
92 | "type": "string",
|
93 | "description": "Error message describing what went wrong"
|
94 | }
|
95 | }
|
96 | }
|
97 | }
|
98 | }
|
99 | ]
|
100 | }
|
101 | },
|
102 | "input": {
|
103 | "start": {
|
104 | "id": "input/start",
|
105 | "description": "Enable/start tracing of a network.",
|
106 | "allOf": [
|
107 | {
|
108 | "$ref": "/shared/message"
|
109 | },
|
110 | {
|
111 | "properties": {
|
112 | "protocol": {
|
113 | "enum": [
|
114 | "trace"
|
115 | ]
|
116 | },
|
117 | "command": {
|
118 | "enum": [
|
119 | "start"
|
120 | ]
|
121 | },
|
122 | "payload": {
|
123 | "required": [
|
124 | "secret",
|
125 | "graph"
|
126 | ],
|
127 | "additionalProperties": false,
|
128 | "properties": {
|
129 | "secret": {
|
130 | "$ref": "/shared/secret"
|
131 | },
|
132 | "graph": {
|
133 | "$ref": "/shared/graph_id"
|
134 | },
|
135 | "buffersize": {
|
136 | "description": "Size of tracing buffer to keep. In bytes",
|
137 | "type": "integer"
|
138 | }
|
139 | }
|
140 | }
|
141 | }
|
142 | }
|
143 | ]
|
144 | },
|
145 | "stop": {
|
146 | "description": "Stop/disable tracing of a network.",
|
147 | "id": "input/stop",
|
148 | "allOf": [
|
149 | {
|
150 | "$ref": "/shared/message"
|
151 | },
|
152 | {
|
153 | "properties": {
|
154 | "protocol": {
|
155 | "enum": [
|
156 | "trace"
|
157 | ]
|
158 | },
|
159 | "command": {
|
160 | "enum": [
|
161 | "stop"
|
162 | ]
|
163 | },
|
164 | "payload": {
|
165 | "required": [
|
166 | "secret",
|
167 | "graph"
|
168 | ],
|
169 | "additionalProperties": false,
|
170 | "properties": {
|
171 | "secret": {
|
172 | "$ref": "/shared/secret"
|
173 | },
|
174 | "graph": {
|
175 | "$ref": "/shared/graph_id"
|
176 | }
|
177 | }
|
178 | }
|
179 | }
|
180 | }
|
181 | ]
|
182 | },
|
183 | "dump": {
|
184 | "id": "input/dump",
|
185 | "description": "Trigger dumping of the current tracing buffer, to return it back to server.",
|
186 | "allOf": [
|
187 | {
|
188 | "$ref": "/shared/message"
|
189 | },
|
190 | {
|
191 | "properties": {
|
192 | "protocol": {
|
193 | "enum": [
|
194 | "trace"
|
195 | ]
|
196 | },
|
197 | "command": {
|
198 | "enum": [
|
199 | "dump"
|
200 | ]
|
201 | },
|
202 | "payload": {
|
203 | "required": [
|
204 | "secret",
|
205 | "graph",
|
206 | "type"
|
207 | ],
|
208 | "additionalProperties": false,
|
209 | "properties": {
|
210 | "secret": {
|
211 | "$ref": "/shared/secret"
|
212 | },
|
213 | "graph": {
|
214 | "$ref": "/shared/graph_id"
|
215 | },
|
216 | "type": {
|
217 | "description": "Type/format of trace to output",
|
218 | "type": "string",
|
219 | "enum": [
|
220 | "flowtrace.json"
|
221 | ]
|
222 | }
|
223 | }
|
224 | }
|
225 | }
|
226 | }
|
227 | ]
|
228 | },
|
229 | "clear": {
|
230 | "id": "input/clear",
|
231 | "description": "Clear current tracing buffer.",
|
232 | "allOf": [
|
233 | {
|
234 | "$ref": "/shared/message"
|
235 | },
|
236 | {
|
237 | "properties": {
|
238 | "protocol": {
|
239 | "enum": [
|
240 | "trace"
|
241 | ]
|
242 | },
|
243 | "command": {
|
244 | "enum": [
|
245 | "clear"
|
246 | ]
|
247 | },
|
248 | "payload": {
|
249 | "required": [
|
250 | "secret",
|
251 | "graph"
|
252 | ],
|
253 | "additionalProperties": false,
|
254 | "properties": {
|
255 | "secret": {
|
256 | "$ref": "/shared/secret"
|
257 | },
|
258 | "graph": {
|
259 | "$ref": "/shared/graph_id"
|
260 | }
|
261 | }
|
262 | }
|
263 | }
|
264 | }
|
265 | ]
|
266 | }
|
267 | }
|
268 | } |
\ | No newline at end of file |