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