blob: 368c2e8a22cb702bdce862ed0fc2afd7aad296a6 [file] [log] [blame]
Scott Baker14c8f182019-05-22 18:05:29 -07001[
2 {
3 "method": "GetVersion",
4 "input": ".*",
5 "output": {
6 "version": "3.2.6",
7 "pythonVersion": "2.7.16 (default, May 6 2019, 19:35:26)",
8 "gitCommit": "b0df1bf6ed1698285eda6a6725c5da0c80aa4aee",
9 "buildTime": "2019-05-20T17:04:14Z",
10 "os": "linux",
11 "arch": "x86_64"
12 }
13 },
14 {
Scott Bakerd8476822019-06-07 15:12:09 -070015 "method": "GetDatabaseInfo",
16 "input": ".*",
17 "output": {
18 "name": "xos",
19 "connection": "xos-db:5432",
20 "version": "10.3",
21 "status": 1
22 }
23 },
24 {
Scott Baker14c8f182019-05-22 18:05:29 -070025 "method": "GetSlice",
Scott Bakerc328cf12019-05-28 16:03:12 -070026 "input": {"id": 1},
Scott Baker14c8f182019-05-22 18:05:29 -070027 "output": {
28 "id": 1,
29 "name": "mockslice1",
Scott Baker1dd06672019-06-14 15:40:56 -070030 "description": "an up-to-date slice",
Scott Bakerc328cf12019-05-28 16:03:12 -070031 "site_id": 1,
32 "updated": 1234.0,
33 "enacted": 1234.0
Scott Baker14c8f182019-05-22 18:05:29 -070034 }
35 },
36 {
Scott Bakerc328cf12019-05-28 16:03:12 -070037 "method": "GetSlice",
38 "input": {"id": 2},
39 "output": {
40 "id": 2,
41 "name": "mockslice2",
Scott Baker1dd06672019-06-14 15:40:56 -070042 "description": "a dirty slice",
Scott Bakerc328cf12019-05-28 16:03:12 -070043 "site_id": 1,
44 "updated": 1234.0,
45 "enacted": 900.0
46 }
47 },
48 {
49 "method": "GetSlice",
50 "input": {"id": 77},
Scott Baker20481aa2019-06-20 11:00:54 -070051 "error": { "code": 5, "message": "Slice matching query does not exist."}
Scott Bakerc328cf12019-05-28 16:03:12 -070052 },
53 {
Scott Baker14c8f182019-05-22 18:05:29 -070054 "method": "ListSlice",
55 "input": ".*",
56 "output": {
57 "items": [{
58 "id": 1,
59 "name": "mockslice1",
Scott Bakerc328cf12019-05-28 16:03:12 -070060 "site_id": 1,
61 "updated": 1234.0,
62 "enacted": 1234.0
63 },
64 {
65 "id": 2,
66 "name": "mockslice2",
67 "site_id": 1,
68 "updated": 1234.0,
69 "enacted": 900.0
70 }]
71 }
72 },
73 {
74 "method": "FilterSlice",
Scott Baker1dd06672019-06-14 15:40:56 -070075 "input": {"kind": 0,
76 "elements": [{"operator": 0, "name": "id", "iValue": 1}]},
Scott Bakerc328cf12019-05-28 16:03:12 -070077 "output": {
78 "items": [{
79 "id": 1,
80 "name": "mockslice1",
Scott Baker14c8f182019-05-22 18:05:29 -070081 "site_id": 1
82 }]
83 }
Scott Bakerc328cf12019-05-28 16:03:12 -070084 },
85 {
86 "method": "FilterSlice",
Scott Baker1dd06672019-06-14 15:40:56 -070087 "input": {"kind": 0,
88 "elements": [{"operator": 0, "name": "name", "sValue": "mockslice2"}]},
Scott Bakerc328cf12019-05-28 16:03:12 -070089 "output": {
90 "items": [{
91 "id": 2,
92 "name": "mockslice2",
93 "site_id": 1
94 }]
95 }
96 },
97 {
98 "method": "FilterSlice",
Scott Baker1dd06672019-06-14 15:40:56 -070099 "input": {"kind": 0,
100 "elements": [{"operator": 0, "name": "id", "iValue": 77}]},
Scott Bakerc328cf12019-05-28 16:03:12 -0700101 "output": {
102 "items": []
103 }
104 },
105 {
Scott Baker1dd06672019-06-14 15:40:56 -0700106 "method": "FilterSlice",
107 "input": {"kind": 2},
108 "output": {
109 "items": [{
110 "id": 2,
111 "name": "mockslice2",
112 "site_id": 1
113 }]
114 }
115 },
116 {
Scott Bakerc328cf12019-05-28 16:03:12 -0700117 "method": "UpdateSlice",
118 "input": {"id": 1, "name": "mockslice1_newname"},
119 "output": {
120 "id": 1,
121 "name": "mockslice1_newname",
122 "site_id": 1
123 }
124 },
125 {
126 "method": "UpdateSlice",
Scott Baker1dd06672019-06-14 15:40:56 -0700127 "input": { "id": 1 },
128 "output": {
129 "id": 1,
130 "name": "mockslice1",
131 "site_id": 1
132 }
133 },
134 {
135 "method": "UpdateSlice",
Scott Bakerc328cf12019-05-28 16:03:12 -0700136 "input": { "id": 77, "name": "mockslice1_newname"},
Scott Baker20481aa2019-06-20 11:00:54 -0700137 "error": { "code": 5, "message": "Slice matching query does not exist."}
Scott Bakerc328cf12019-05-28 16:03:12 -0700138 },
139 {
140 "method": "CreateSlice",
141 "input": {"name": "mockslice3", "site_id": 1},
142 "output": {
143 "id": 3,
144 "name": "mockslice3",
145 "site_id": 1
146 }
147 },
148 {
149 "method": "DeleteSlice",
150 "input": {"id": 1},
151 "output": {}
152 },
153 {
154 "method": "DeleteSlice",
155 "input": {"id": 77},
Scott Baker20481aa2019-06-20 11:00:54 -0700156 "error": { "code": 5, "message": "Slice matching query does not exist."}
Scott Bakerf53bf152019-05-29 17:50:37 -0700157 },
158 {
159 "method": "GetLoadStatus",
160 "input": ".*",
161 "output": {"services": [
162 {"name": "onos",
163 "version": "2.1.1-dev",
164 "state": "present"},
165 {"name": "kubernetes",
166 "version": "1.2.1",
167 "state": "present"}]}
168 },
169 {
170 "method": "Download",
171 "input": ".*",
172 "streamType": "server",
173 "stream": [
174 {"output": { "chunk": "ABC"} },
175 {"output": { "chunk": "DEF"} }
176 ]
177 },
178 {
179 "method": "Upload",
180 "input": ".*",
181 "streamType": "client",
182 "stream": [
183 {"input": { "chunk": "ABC", "uri": "file:///tmp/transfer.up"} },
184 {"input": { "chunk": "DEF", "uri": "file:///tmp/transfer.up"} }
185 ],
186 "output": { "status": 0,
187 "checksum": "sha256:e9c0f8b575cbfcb42ab3b78ecc87efa3b011d9a5d10b09fa4e96f240bf6a82f5",
188 "chunks_received": 2,
189 "bytes_received": 6 }
190 },
191 {
192 "method": "CreateBackupOperation",
193 "input": {"operation": "create"},
194 "output": {
195 "id": 1,
196 "uuid": "uuid1"
197 }
198 },
199 {
200 "method": "GetBackupOperation",
201 "input": {"id": 1},
202 "output": {
203 "id": 1,
204 "operation": "create",
205 "status": "created",
206 "updated": 1234.0,
207 "enacted": 1234.0,
208 "file_id": 33
209 }
210 },
211 {
212 "method": "GetBackupFile",
213 "input": {"id": 33},
214 "output": {
215 "id": 33,
216 "uri": "file:///transfer.down",
217 "checksum": "sha256:e9c0f8b575cbfcb42ab3b78ecc87efa3b011d9a5d10b09fa4e96f240bf6a82f5"
218 }
219 },
220 {
221 "method": "CreateBackupFile",
222 "input": ".*",
223 "output": {
224 "id": 34,
225 "uuid": "uuid34"
226 }
227 },
228 {
229 "method": "CreateBackupOperation",
230 "input": {"operation": "restore"},
231 "output": {
232 "id": 3,
233 "uuid": "uuid3"
234 }
235 },
236 {
237 "method": "FilterBackupOperation",
238 "input": {"elements": [{"operator": 0, "name": "uuid", "sValue": "uuid3"}]},
239 "output": {"items": [{
240 "id": 3,
241 "operation": "restore",
242 "status": "restored",
243 "updated": 1234.0,
244 "enacted": 1234.0,
245 "file_id": 34
246 }]}
Scott Baker14c8f182019-05-22 18:05:29 -0700247 }
Scott Baker14c8f182019-05-22 18:05:29 -0700248]