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 | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 30 | "site_id": 1, |
| 31 | "updated": 1234.0, |
| 32 | "enacted": 1234.0 |
Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 33 | } |
| 34 | }, |
| 35 | { |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 36 | "method": "GetSlice", |
| 37 | "input": {"id": 2}, |
| 38 | "output": { |
| 39 | "id": 2, |
| 40 | "name": "mockslice2", |
| 41 | "site_id": 1, |
| 42 | "updated": 1234.0, |
| 43 | "enacted": 900.0 |
| 44 | } |
| 45 | }, |
| 46 | { |
| 47 | "method": "GetSlice", |
| 48 | "input": {"id": 77}, |
| 49 | "error": { "code": 2, "message": "Slice matching query does not exist."} |
| 50 | }, |
| 51 | { |
Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 52 | "method": "ListSlice", |
| 53 | "input": ".*", |
| 54 | "output": { |
| 55 | "items": [{ |
| 56 | "id": 1, |
| 57 | "name": "mockslice1", |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 58 | "site_id": 1, |
| 59 | "updated": 1234.0, |
| 60 | "enacted": 1234.0 |
| 61 | }, |
| 62 | { |
| 63 | "id": 2, |
| 64 | "name": "mockslice2", |
| 65 | "site_id": 1, |
| 66 | "updated": 1234.0, |
| 67 | "enacted": 900.0 |
| 68 | }] |
| 69 | } |
| 70 | }, |
| 71 | { |
| 72 | "method": "FilterSlice", |
| 73 | "input": {"elements": [{"operator": 0, "name": "id", "iValue": 1}]}, |
| 74 | "output": { |
| 75 | "items": [{ |
| 76 | "id": 1, |
| 77 | "name": "mockslice1", |
Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 78 | "site_id": 1 |
| 79 | }] |
| 80 | } |
Scott Baker | c328cf1 | 2019-05-28 16:03:12 -0700 | [diff] [blame] | 81 | }, |
| 82 | { |
| 83 | "method": "FilterSlice", |
| 84 | "input": {"elements": [{"operator": 0, "name": "name", "sValue": "mockslice2"}]}, |
| 85 | "output": { |
| 86 | "items": [{ |
| 87 | "id": 2, |
| 88 | "name": "mockslice2", |
| 89 | "site_id": 1 |
| 90 | }] |
| 91 | } |
| 92 | }, |
| 93 | { |
| 94 | "method": "FilterSlice", |
| 95 | "input": {"elements": [{"operator": 0, "name": "id", "iValue": 77}]}, |
| 96 | "output": { |
| 97 | "items": [] |
| 98 | } |
| 99 | }, |
| 100 | { |
| 101 | "method": "UpdateSlice", |
| 102 | "input": {"id": 1, "name": "mockslice1_newname"}, |
| 103 | "output": { |
| 104 | "id": 1, |
| 105 | "name": "mockslice1_newname", |
| 106 | "site_id": 1 |
| 107 | } |
| 108 | }, |
| 109 | { |
| 110 | "method": "UpdateSlice", |
| 111 | "input": { "id": 77, "name": "mockslice1_newname"}, |
| 112 | "error": { "code": 2, "message": "Slice matching query does not exist."} |
| 113 | }, |
| 114 | { |
| 115 | "method": "CreateSlice", |
| 116 | "input": {"name": "mockslice3", "site_id": 1}, |
| 117 | "output": { |
| 118 | "id": 3, |
| 119 | "name": "mockslice3", |
| 120 | "site_id": 1 |
| 121 | } |
| 122 | }, |
| 123 | { |
| 124 | "method": "DeleteSlice", |
| 125 | "input": {"id": 1}, |
| 126 | "output": {} |
| 127 | }, |
| 128 | { |
| 129 | "method": "DeleteSlice", |
| 130 | "input": {"id": 77}, |
| 131 | "error": { "code": 2, "message": "Slice matching query does not exist."} |
Scott Baker | f53bf15 | 2019-05-29 17:50:37 -0700 | [diff] [blame] | 132 | }, |
| 133 | { |
| 134 | "method": "GetLoadStatus", |
| 135 | "input": ".*", |
| 136 | "output": {"services": [ |
| 137 | {"name": "onos", |
| 138 | "version": "2.1.1-dev", |
| 139 | "state": "present"}, |
| 140 | {"name": "kubernetes", |
| 141 | "version": "1.2.1", |
| 142 | "state": "present"}]} |
| 143 | }, |
| 144 | { |
| 145 | "method": "Download", |
| 146 | "input": ".*", |
| 147 | "streamType": "server", |
| 148 | "stream": [ |
| 149 | {"output": { "chunk": "ABC"} }, |
| 150 | {"output": { "chunk": "DEF"} } |
| 151 | ] |
| 152 | }, |
| 153 | { |
| 154 | "method": "Upload", |
| 155 | "input": ".*", |
| 156 | "streamType": "client", |
| 157 | "stream": [ |
| 158 | {"input": { "chunk": "ABC", "uri": "file:///tmp/transfer.up"} }, |
| 159 | {"input": { "chunk": "DEF", "uri": "file:///tmp/transfer.up"} } |
| 160 | ], |
| 161 | "output": { "status": 0, |
| 162 | "checksum": "sha256:e9c0f8b575cbfcb42ab3b78ecc87efa3b011d9a5d10b09fa4e96f240bf6a82f5", |
| 163 | "chunks_received": 2, |
| 164 | "bytes_received": 6 } |
| 165 | }, |
| 166 | { |
| 167 | "method": "CreateBackupOperation", |
| 168 | "input": {"operation": "create"}, |
| 169 | "output": { |
| 170 | "id": 1, |
| 171 | "uuid": "uuid1" |
| 172 | } |
| 173 | }, |
| 174 | { |
| 175 | "method": "GetBackupOperation", |
| 176 | "input": {"id": 1}, |
| 177 | "output": { |
| 178 | "id": 1, |
| 179 | "operation": "create", |
| 180 | "status": "created", |
| 181 | "updated": 1234.0, |
| 182 | "enacted": 1234.0, |
| 183 | "file_id": 33 |
| 184 | } |
| 185 | }, |
| 186 | { |
| 187 | "method": "GetBackupFile", |
| 188 | "input": {"id": 33}, |
| 189 | "output": { |
| 190 | "id": 33, |
| 191 | "uri": "file:///transfer.down", |
| 192 | "checksum": "sha256:e9c0f8b575cbfcb42ab3b78ecc87efa3b011d9a5d10b09fa4e96f240bf6a82f5" |
| 193 | } |
| 194 | }, |
| 195 | { |
| 196 | "method": "CreateBackupFile", |
| 197 | "input": ".*", |
| 198 | "output": { |
| 199 | "id": 34, |
| 200 | "uuid": "uuid34" |
| 201 | } |
| 202 | }, |
| 203 | { |
| 204 | "method": "CreateBackupOperation", |
| 205 | "input": {"operation": "restore"}, |
| 206 | "output": { |
| 207 | "id": 3, |
| 208 | "uuid": "uuid3" |
| 209 | } |
| 210 | }, |
| 211 | { |
| 212 | "method": "FilterBackupOperation", |
| 213 | "input": {"elements": [{"operator": 0, "name": "uuid", "sValue": "uuid3"}]}, |
| 214 | "output": {"items": [{ |
| 215 | "id": 3, |
| 216 | "operation": "restore", |
| 217 | "status": "restored", |
| 218 | "updated": 1234.0, |
| 219 | "enacted": 1234.0, |
| 220 | "file_id": 34 |
| 221 | }]} |
Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 222 | } |
Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 223 | ] |