Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 1 | [ |
| 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 Baker | d847682 | 2019-06-07 15:12:09 -0700 | [diff] [blame] | 15 | "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 Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 25 | "method": "GetSlice", |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 26 | "input": {"id": 1}, |
Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 27 | "output": { |
| 28 | "id": 1, |
| 29 | "name": "mockslice1", |
Scott Baker | 1dd0667 | 2019-06-14 15:40:56 -0700 | [diff] [blame] | 30 | "description": "an up-to-date slice", |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 31 | "site_id": 1, |
| 32 | "updated": 1234.0, |
| 33 | "enacted": 1234.0 |
Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 34 | } |
| 35 | }, |
| 36 | { |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 37 | "method": "GetSlice", |
| 38 | "input": {"id": 2}, |
| 39 | "output": { |
| 40 | "id": 2, |
| 41 | "name": "mockslice2", |
Scott Baker | 1dd0667 | 2019-06-14 15:40:56 -0700 | [diff] [blame] | 42 | "description": "a dirty slice", |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 43 | "site_id": 1, |
| 44 | "updated": 1234.0, |
| 45 | "enacted": 900.0 |
| 46 | } |
| 47 | }, |
| 48 | { |
| 49 | "method": "GetSlice", |
| 50 | "input": {"id": 77}, |
| 51 | "error": { "code": 2, "message": "Slice matching query does not exist."} |
| 52 | }, |
| 53 | { |
Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 54 | "method": "ListSlice", |
| 55 | "input": ".*", |
| 56 | "output": { |
| 57 | "items": [{ |
| 58 | "id": 1, |
| 59 | "name": "mockslice1", |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 60 | "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 Baker | 1dd0667 | 2019-06-14 15:40:56 -0700 | [diff] [blame] | 75 | "input": {"kind": 0, |
| 76 | "elements": [{"operator": 0, "name": "id", "iValue": 1}]}, |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 77 | "output": { |
| 78 | "items": [{ |
| 79 | "id": 1, |
| 80 | "name": "mockslice1", |
Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 81 | "site_id": 1 |
| 82 | }] |
| 83 | } |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 84 | }, |
| 85 | { |
| 86 | "method": "FilterSlice", |
Scott Baker | 1dd0667 | 2019-06-14 15:40:56 -0700 | [diff] [blame] | 87 | "input": {"kind": 0, |
| 88 | "elements": [{"operator": 0, "name": "name", "sValue": "mockslice2"}]}, |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 89 | "output": { |
| 90 | "items": [{ |
| 91 | "id": 2, |
| 92 | "name": "mockslice2", |
| 93 | "site_id": 1 |
| 94 | }] |
| 95 | } |
| 96 | }, |
| 97 | { |
| 98 | "method": "FilterSlice", |
Scott Baker | 1dd0667 | 2019-06-14 15:40:56 -0700 | [diff] [blame] | 99 | "input": {"kind": 0, |
| 100 | "elements": [{"operator": 0, "name": "id", "iValue": 77}]}, |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 101 | "output": { |
| 102 | "items": [] |
| 103 | } |
| 104 | }, |
| 105 | { |
Scott Baker | 1dd0667 | 2019-06-14 15:40:56 -0700 | [diff] [blame] | 106 | "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 Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 117 | "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 Baker | 1dd0667 | 2019-06-14 15:40:56 -0700 | [diff] [blame] | 127 | "input": { "id": 1 }, |
| 128 | "output": { |
| 129 | "id": 1, |
| 130 | "name": "mockslice1", |
| 131 | "site_id": 1 |
| 132 | } |
| 133 | }, |
| 134 | { |
| 135 | "method": "UpdateSlice", |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 136 | "input": { "id": 77, "name": "mockslice1_newname"}, |
| 137 | "error": { "code": 2, "message": "Slice matching query does not exist."} |
| 138 | }, |
| 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}, |
| 156 | "error": { "code": 2, "message": "Slice matching query does not exist."} |
Scott Baker | f53bf15 | 2019-05-29 17:50:37 -0700 | [diff] [blame] | 157 | }, |
| 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 Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 247 | } |
Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 248 | ] |