| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1 | # DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py. |
| 2 | # Changes will be overwritten/lost when the file is regenerated. |
| 3 | |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4 | from juju.client._definitions import * |
| Adam Israel | c3e6c2e | 2018-03-01 09:31:50 -0500 | [diff] [blame] | 5 | from juju.client.facade import ReturnMapping, Type |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6 | |
| 7 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 8 | class ActionFacade(Type): |
| 9 | name = 'Action' |
| 10 | version = 3 |
| 11 | schema = {'definitions': {'Action': {'additionalProperties': False, |
| 12 | 'properties': {'name': {'type': 'string'}, |
| 13 | 'parameters': {'patternProperties': {'.*': {'additionalProperties': True, |
| 14 | 'type': 'object'}}, |
| 15 | 'type': 'object'}, |
| 16 | 'receiver': {'type': 'string'}, |
| 17 | 'tag': {'type': 'string'}}, |
| 18 | 'required': ['tag', 'receiver', 'name'], |
| 19 | 'type': 'object'}, |
| 20 | 'ActionResult': {'additionalProperties': False, |
| 21 | 'properties': {'action': {'$ref': '#/definitions/Action'}, |
| 22 | 'completed': {'format': 'date-time', |
| 23 | 'type': 'string'}, |
| 24 | 'enqueued': {'format': 'date-time', |
| 25 | 'type': 'string'}, |
| 26 | 'error': {'$ref': '#/definitions/Error'}, |
| 27 | 'message': {'type': 'string'}, |
| 28 | 'output': {'patternProperties': {'.*': {'additionalProperties': True, |
| 29 | 'type': 'object'}}, |
| 30 | 'type': 'object'}, |
| 31 | 'started': {'format': 'date-time', |
| 32 | 'type': 'string'}, |
| 33 | 'status': {'type': 'string'}}, |
| 34 | 'type': 'object'}, |
| 35 | 'ActionResults': {'additionalProperties': False, |
| 36 | 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'}, |
| 37 | 'type': 'array'}}, |
| 38 | 'type': 'object'}, |
| 39 | 'ActionSpec': {'additionalProperties': False, |
| 40 | 'properties': {'description': {'type': 'string'}, |
| 41 | 'params': {'patternProperties': {'.*': {'additionalProperties': True, |
| 42 | 'type': 'object'}}, |
| 43 | 'type': 'object'}}, |
| 44 | 'required': ['description', 'params'], |
| 45 | 'type': 'object'}, |
| 46 | 'Actions': {'additionalProperties': False, |
| 47 | 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'}, |
| 48 | 'type': 'array'}}, |
| 49 | 'type': 'object'}, |
| 50 | 'ActionsByName': {'additionalProperties': False, |
| 51 | 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'}, |
| 52 | 'type': 'array'}, |
| 53 | 'error': {'$ref': '#/definitions/Error'}, |
| 54 | 'name': {'type': 'string'}}, |
| 55 | 'type': 'object'}, |
| 56 | 'ActionsByNames': {'additionalProperties': False, |
| 57 | 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'}, |
| 58 | 'type': 'array'}}, |
| 59 | 'type': 'object'}, |
| 60 | 'ActionsByReceiver': {'additionalProperties': False, |
| 61 | 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'}, |
| 62 | 'type': 'array'}, |
| 63 | 'error': {'$ref': '#/definitions/Error'}, |
| 64 | 'receiver': {'type': 'string'}}, |
| 65 | 'type': 'object'}, |
| 66 | 'ActionsByReceivers': {'additionalProperties': False, |
| 67 | 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'}, |
| 68 | 'type': 'array'}}, |
| 69 | 'type': 'object'}, |
| 70 | 'ApplicationCharmActionsResult': {'additionalProperties': False, |
| 71 | 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}}, |
| 72 | 'type': 'object'}, |
| 73 | 'application-tag': {'type': 'string'}, |
| 74 | 'error': {'$ref': '#/definitions/Error'}}, |
| 75 | 'type': 'object'}, |
| 76 | 'ApplicationsCharmActionsResults': {'additionalProperties': False, |
| 77 | 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'}, |
| 78 | 'type': 'array'}}, |
| 79 | 'type': 'object'}, |
| 80 | 'Entities': {'additionalProperties': False, |
| 81 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 82 | 'type': 'array'}}, |
| 83 | 'required': ['entities'], |
| 84 | 'type': 'object'}, |
| 85 | 'Entity': {'additionalProperties': False, |
| 86 | 'properties': {'tag': {'type': 'string'}}, |
| 87 | 'required': ['tag'], |
| 88 | 'type': 'object'}, |
| 89 | 'Error': {'additionalProperties': False, |
| 90 | 'properties': {'code': {'type': 'string'}, |
| 91 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 92 | 'message': {'type': 'string'}}, |
| 93 | 'required': ['message', 'code'], |
| 94 | 'type': 'object'}, |
| 95 | 'ErrorInfo': {'additionalProperties': False, |
| 96 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 97 | 'macaroon-path': {'type': 'string'}}, |
| 98 | 'type': 'object'}, |
| 99 | 'FindActionsByNames': {'additionalProperties': False, |
| 100 | 'properties': {'names': {'items': {'type': 'string'}, |
| 101 | 'type': 'array'}}, |
| 102 | 'type': 'object'}, |
| 103 | 'FindTags': {'additionalProperties': False, |
| 104 | 'properties': {'prefixes': {'items': {'type': 'string'}, |
| 105 | 'type': 'array'}}, |
| 106 | 'required': ['prefixes'], |
| 107 | 'type': 'object'}, |
| 108 | 'FindTagsResults': {'additionalProperties': False, |
| 109 | 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'}, |
| 110 | 'type': 'array'}}, |
| 111 | 'type': 'object'}}, |
| 112 | 'required': ['matches'], |
| 113 | 'type': 'object'}, |
| 114 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 115 | 'RunParams': {'additionalProperties': False, |
| 116 | 'properties': {'applications': {'items': {'type': 'string'}, |
| 117 | 'type': 'array'}, |
| 118 | 'commands': {'type': 'string'}, |
| 119 | 'machines': {'items': {'type': 'string'}, |
| 120 | 'type': 'array'}, |
| 121 | 'timeout': {'type': 'integer'}, |
| 122 | 'units': {'items': {'type': 'string'}, |
| 123 | 'type': 'array'}}, |
| 124 | 'required': ['commands', 'timeout'], |
| 125 | 'type': 'object'}}, |
| 126 | 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 127 | 'Result': {'$ref': '#/definitions/ActionResults'}}, |
| 128 | 'type': 'object'}, |
| 129 | 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 130 | 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}}, |
| 131 | 'type': 'object'}, |
| 132 | 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 133 | 'Result': {'$ref': '#/definitions/ActionResults'}}, |
| 134 | 'type': 'object'}, |
| 135 | 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'}, |
| 136 | 'Result': {'$ref': '#/definitions/ActionResults'}}, |
| 137 | 'type': 'object'}, |
| 138 | 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'}, |
| 139 | 'Result': {'$ref': '#/definitions/FindTagsResults'}}, |
| 140 | 'type': 'object'}, |
| 141 | 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'}, |
| 142 | 'Result': {'$ref': '#/definitions/ActionsByNames'}}, |
| 143 | 'type': 'object'}, |
| 144 | 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 145 | 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, |
| 146 | 'type': 'object'}, |
| 147 | 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 148 | 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, |
| 149 | 'type': 'object'}, |
| 150 | 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 151 | 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, |
| 152 | 'type': 'object'}, |
| 153 | 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 154 | 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, |
| 155 | 'type': 'object'}, |
| 156 | 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'}, |
| 157 | 'Result': {'$ref': '#/definitions/ActionResults'}}, |
| 158 | 'type': 'object'}, |
| 159 | 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'}, |
| 160 | 'Result': {'$ref': '#/definitions/ActionResults'}}, |
| 161 | 'type': 'object'}}, |
| 162 | 'type': 'object'} |
| 163 | |
| 164 | |
| 165 | @ReturnMapping(ActionResults) |
| 166 | async def Actions(self, entities): |
| 167 | ''' |
| 168 | entities : typing.Sequence[~Entity] |
| 169 | Returns -> typing.Sequence[~ActionResult] |
| 170 | ''' |
| 171 | # map input types to rpc msg |
| 172 | _params = dict() |
| 173 | msg = dict(type='Action', |
| 174 | request='Actions', |
| 175 | version=3, |
| 176 | params=_params) |
| 177 | _params['entities'] = entities |
| 178 | reply = await self.rpc(msg) |
| 179 | return reply |
| 180 | |
| 181 | |
| 182 | |
| 183 | @ReturnMapping(ApplicationsCharmActionsResults) |
| 184 | async def ApplicationsCharmsActions(self, entities): |
| 185 | ''' |
| 186 | entities : typing.Sequence[~Entity] |
| 187 | Returns -> typing.Sequence[~ApplicationCharmActionsResult] |
| 188 | ''' |
| 189 | # map input types to rpc msg |
| 190 | _params = dict() |
| 191 | msg = dict(type='Action', |
| 192 | request='ApplicationsCharmsActions', |
| 193 | version=3, |
| 194 | params=_params) |
| 195 | _params['entities'] = entities |
| 196 | reply = await self.rpc(msg) |
| 197 | return reply |
| 198 | |
| 199 | |
| 200 | |
| 201 | @ReturnMapping(ActionResults) |
| 202 | async def Cancel(self, entities): |
| 203 | ''' |
| 204 | entities : typing.Sequence[~Entity] |
| 205 | Returns -> typing.Sequence[~ActionResult] |
| 206 | ''' |
| 207 | # map input types to rpc msg |
| 208 | _params = dict() |
| 209 | msg = dict(type='Action', |
| 210 | request='Cancel', |
| 211 | version=3, |
| 212 | params=_params) |
| 213 | _params['entities'] = entities |
| 214 | reply = await self.rpc(msg) |
| 215 | return reply |
| 216 | |
| 217 | |
| 218 | |
| 219 | @ReturnMapping(ActionResults) |
| 220 | async def Enqueue(self, actions): |
| 221 | ''' |
| 222 | actions : typing.Sequence[~Action] |
| 223 | Returns -> typing.Sequence[~ActionResult] |
| 224 | ''' |
| 225 | # map input types to rpc msg |
| 226 | _params = dict() |
| 227 | msg = dict(type='Action', |
| 228 | request='Enqueue', |
| 229 | version=3, |
| 230 | params=_params) |
| 231 | _params['actions'] = actions |
| 232 | reply = await self.rpc(msg) |
| 233 | return reply |
| 234 | |
| 235 | |
| 236 | |
| 237 | @ReturnMapping(FindTagsResults) |
| 238 | async def FindActionTagsByPrefix(self, prefixes): |
| 239 | ''' |
| 240 | prefixes : typing.Sequence[str] |
| 241 | Returns -> typing.Sequence[~Entity] |
| 242 | ''' |
| 243 | # map input types to rpc msg |
| 244 | _params = dict() |
| 245 | msg = dict(type='Action', |
| 246 | request='FindActionTagsByPrefix', |
| 247 | version=3, |
| 248 | params=_params) |
| 249 | _params['prefixes'] = prefixes |
| 250 | reply = await self.rpc(msg) |
| 251 | return reply |
| 252 | |
| 253 | |
| 254 | |
| 255 | @ReturnMapping(ActionsByNames) |
| 256 | async def FindActionsByNames(self, names): |
| 257 | ''' |
| 258 | names : typing.Sequence[str] |
| 259 | Returns -> typing.Sequence[~ActionsByName] |
| 260 | ''' |
| 261 | # map input types to rpc msg |
| 262 | _params = dict() |
| 263 | msg = dict(type='Action', |
| 264 | request='FindActionsByNames', |
| 265 | version=3, |
| 266 | params=_params) |
| 267 | _params['names'] = names |
| 268 | reply = await self.rpc(msg) |
| 269 | return reply |
| 270 | |
| 271 | |
| 272 | |
| 273 | @ReturnMapping(ActionsByReceivers) |
| 274 | async def ListAll(self, entities): |
| 275 | ''' |
| 276 | entities : typing.Sequence[~Entity] |
| 277 | Returns -> typing.Sequence[~ActionsByReceiver] |
| 278 | ''' |
| 279 | # map input types to rpc msg |
| 280 | _params = dict() |
| 281 | msg = dict(type='Action', |
| 282 | request='ListAll', |
| 283 | version=3, |
| 284 | params=_params) |
| 285 | _params['entities'] = entities |
| 286 | reply = await self.rpc(msg) |
| 287 | return reply |
| 288 | |
| 289 | |
| 290 | |
| 291 | @ReturnMapping(ActionsByReceivers) |
| 292 | async def ListCompleted(self, entities): |
| 293 | ''' |
| 294 | entities : typing.Sequence[~Entity] |
| 295 | Returns -> typing.Sequence[~ActionsByReceiver] |
| 296 | ''' |
| 297 | # map input types to rpc msg |
| 298 | _params = dict() |
| 299 | msg = dict(type='Action', |
| 300 | request='ListCompleted', |
| 301 | version=3, |
| 302 | params=_params) |
| 303 | _params['entities'] = entities |
| 304 | reply = await self.rpc(msg) |
| 305 | return reply |
| 306 | |
| 307 | |
| 308 | |
| 309 | @ReturnMapping(ActionsByReceivers) |
| 310 | async def ListPending(self, entities): |
| 311 | ''' |
| 312 | entities : typing.Sequence[~Entity] |
| 313 | Returns -> typing.Sequence[~ActionsByReceiver] |
| 314 | ''' |
| 315 | # map input types to rpc msg |
| 316 | _params = dict() |
| 317 | msg = dict(type='Action', |
| 318 | request='ListPending', |
| 319 | version=3, |
| 320 | params=_params) |
| 321 | _params['entities'] = entities |
| 322 | reply = await self.rpc(msg) |
| 323 | return reply |
| 324 | |
| 325 | |
| 326 | |
| 327 | @ReturnMapping(ActionsByReceivers) |
| 328 | async def ListRunning(self, entities): |
| 329 | ''' |
| 330 | entities : typing.Sequence[~Entity] |
| 331 | Returns -> typing.Sequence[~ActionsByReceiver] |
| 332 | ''' |
| 333 | # map input types to rpc msg |
| 334 | _params = dict() |
| 335 | msg = dict(type='Action', |
| 336 | request='ListRunning', |
| 337 | version=3, |
| 338 | params=_params) |
| 339 | _params['entities'] = entities |
| 340 | reply = await self.rpc(msg) |
| 341 | return reply |
| 342 | |
| 343 | |
| 344 | |
| 345 | @ReturnMapping(ActionResults) |
| 346 | async def Run(self, applications, commands, machines, timeout, units): |
| 347 | ''' |
| 348 | applications : typing.Sequence[str] |
| 349 | commands : str |
| 350 | machines : typing.Sequence[str] |
| 351 | timeout : int |
| 352 | units : typing.Sequence[str] |
| 353 | Returns -> typing.Sequence[~ActionResult] |
| 354 | ''' |
| 355 | # map input types to rpc msg |
| 356 | _params = dict() |
| 357 | msg = dict(type='Action', |
| 358 | request='Run', |
| 359 | version=3, |
| 360 | params=_params) |
| 361 | _params['applications'] = applications |
| 362 | _params['commands'] = commands |
| 363 | _params['machines'] = machines |
| 364 | _params['timeout'] = timeout |
| 365 | _params['units'] = units |
| 366 | reply = await self.rpc(msg) |
| 367 | return reply |
| 368 | |
| 369 | |
| 370 | |
| 371 | @ReturnMapping(ActionResults) |
| 372 | async def RunOnAllMachines(self, applications, commands, machines, timeout, units): |
| 373 | ''' |
| 374 | applications : typing.Sequence[str] |
| 375 | commands : str |
| 376 | machines : typing.Sequence[str] |
| 377 | timeout : int |
| 378 | units : typing.Sequence[str] |
| 379 | Returns -> typing.Sequence[~ActionResult] |
| 380 | ''' |
| 381 | # map input types to rpc msg |
| 382 | _params = dict() |
| 383 | msg = dict(type='Action', |
| 384 | request='RunOnAllMachines', |
| 385 | version=3, |
| 386 | params=_params) |
| 387 | _params['applications'] = applications |
| 388 | _params['commands'] = commands |
| 389 | _params['machines'] = machines |
| 390 | _params['timeout'] = timeout |
| 391 | _params['units'] = units |
| 392 | reply = await self.rpc(msg) |
| 393 | return reply |
| 394 | |
| 395 | |
| 396 | |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 397 | class ApplicationFacade(Type): |
| 398 | name = 'Application' |
| 399 | version = 3 |
| 400 | schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False, |
| 401 | 'properties': {'application': {'type': 'string'}, |
| 402 | 'num-units': {'type': 'integer'}, |
| 403 | 'placement': {'items': {'$ref': '#/definitions/Placement'}, |
| 404 | 'type': 'array'}}, |
| 405 | 'required': ['application', |
| 406 | 'num-units', |
| 407 | 'placement'], |
| 408 | 'type': 'object'}, |
| 409 | 'AddApplicationUnitsResults': {'additionalProperties': False, |
| 410 | 'properties': {'units': {'items': {'type': 'string'}, |
| 411 | 'type': 'array'}}, |
| 412 | 'required': ['units'], |
| 413 | 'type': 'object'}, |
| 414 | 'AddRelation': {'additionalProperties': False, |
| 415 | 'properties': {'endpoints': {'items': {'type': 'string'}, |
| 416 | 'type': 'array'}}, |
| 417 | 'required': ['endpoints'], |
| 418 | 'type': 'object'}, |
| 419 | 'AddRelationResults': {'additionalProperties': False, |
| 420 | 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, |
| 421 | 'type': 'object'}}, |
| 422 | 'required': ['endpoints'], |
| 423 | 'type': 'object'}, |
| 424 | 'ApplicationCharmRelations': {'additionalProperties': False, |
| 425 | 'properties': {'application': {'type': 'string'}}, |
| 426 | 'required': ['application'], |
| 427 | 'type': 'object'}, |
| 428 | 'ApplicationCharmRelationsResults': {'additionalProperties': False, |
| 429 | 'properties': {'charm-relations': {'items': {'type': 'string'}, |
| 430 | 'type': 'array'}}, |
| 431 | 'required': ['charm-relations'], |
| 432 | 'type': 'object'}, |
| 433 | 'ApplicationDeploy': {'additionalProperties': False, |
| 434 | 'properties': {'application': {'type': 'string'}, |
| 435 | 'channel': {'type': 'string'}, |
| 436 | 'charm-url': {'type': 'string'}, |
| 437 | 'config': {'patternProperties': {'.*': {'type': 'string'}}, |
| 438 | 'type': 'object'}, |
| 439 | 'config-yaml': {'type': 'string'}, |
| 440 | 'constraints': {'$ref': '#/definitions/Value'}, |
| 441 | 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}}, |
| 442 | 'type': 'object'}, |
| 443 | 'num-units': {'type': 'integer'}, |
| 444 | 'placement': {'items': {'$ref': '#/definitions/Placement'}, |
| 445 | 'type': 'array'}, |
| 446 | 'resources': {'patternProperties': {'.*': {'type': 'string'}}, |
| 447 | 'type': 'object'}, |
| 448 | 'series': {'type': 'string'}, |
| 449 | 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}}, |
| 450 | 'type': 'object'}}, |
| 451 | 'required': ['application', |
| 452 | 'series', |
| 453 | 'charm-url', |
| 454 | 'channel', |
| 455 | 'num-units', |
| 456 | 'config-yaml', |
| 457 | 'constraints'], |
| 458 | 'type': 'object'}, |
| 459 | 'ApplicationDestroy': {'additionalProperties': False, |
| 460 | 'properties': {'application': {'type': 'string'}}, |
| 461 | 'required': ['application'], |
| 462 | 'type': 'object'}, |
| 463 | 'ApplicationExpose': {'additionalProperties': False, |
| 464 | 'properties': {'application': {'type': 'string'}}, |
| 465 | 'required': ['application'], |
| 466 | 'type': 'object'}, |
| 467 | 'ApplicationGet': {'additionalProperties': False, |
| 468 | 'properties': {'application': {'type': 'string'}}, |
| 469 | 'required': ['application'], |
| 470 | 'type': 'object'}, |
| 471 | 'ApplicationGetResults': {'additionalProperties': False, |
| 472 | 'properties': {'application': {'type': 'string'}, |
| 473 | 'charm': {'type': 'string'}, |
| 474 | 'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 475 | 'type': 'object'}}, |
| 476 | 'type': 'object'}, |
| 477 | 'constraints': {'$ref': '#/definitions/Value'}, |
| 478 | 'series': {'type': 'string'}}, |
| 479 | 'required': ['application', |
| 480 | 'charm', |
| 481 | 'config', |
| 482 | 'constraints', |
| 483 | 'series'], |
| 484 | 'type': 'object'}, |
| 485 | 'ApplicationMetricCredential': {'additionalProperties': False, |
| 486 | 'properties': {'application': {'type': 'string'}, |
| 487 | 'metrics-credentials': {'items': {'type': 'integer'}, |
| 488 | 'type': 'array'}}, |
| 489 | 'required': ['application', |
| 490 | 'metrics-credentials'], |
| 491 | 'type': 'object'}, |
| 492 | 'ApplicationMetricCredentials': {'additionalProperties': False, |
| 493 | 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'}, |
| 494 | 'type': 'array'}}, |
| 495 | 'required': ['creds'], |
| 496 | 'type': 'object'}, |
| 497 | 'ApplicationSet': {'additionalProperties': False, |
| 498 | 'properties': {'application': {'type': 'string'}, |
| 499 | 'options': {'patternProperties': {'.*': {'type': 'string'}}, |
| 500 | 'type': 'object'}}, |
| 501 | 'required': ['application', 'options'], |
| 502 | 'type': 'object'}, |
| 503 | 'ApplicationSetCharm': {'additionalProperties': False, |
| 504 | 'properties': {'application': {'type': 'string'}, |
| 505 | 'channel': {'type': 'string'}, |
| 506 | 'charm-url': {'type': 'string'}, |
| 507 | 'config-settings': {'patternProperties': {'.*': {'type': 'string'}}, |
| 508 | 'type': 'object'}, |
| 509 | 'config-settings-yaml': {'type': 'string'}, |
| 510 | 'force-series': {'type': 'boolean'}, |
| 511 | 'force-units': {'type': 'boolean'}, |
| 512 | 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}}, |
| 513 | 'type': 'object'}, |
| 514 | 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}}, |
| 515 | 'type': 'object'}}, |
| 516 | 'required': ['application', |
| 517 | 'charm-url', |
| 518 | 'channel', |
| 519 | 'force-units', |
| 520 | 'force-series'], |
| 521 | 'type': 'object'}, |
| 522 | 'ApplicationUnexpose': {'additionalProperties': False, |
| 523 | 'properties': {'application': {'type': 'string'}}, |
| 524 | 'required': ['application'], |
| 525 | 'type': 'object'}, |
| 526 | 'ApplicationUnset': {'additionalProperties': False, |
| 527 | 'properties': {'application': {'type': 'string'}, |
| 528 | 'options': {'items': {'type': 'string'}, |
| 529 | 'type': 'array'}}, |
| 530 | 'required': ['application', 'options'], |
| 531 | 'type': 'object'}, |
| 532 | 'ApplicationUpdate': {'additionalProperties': False, |
| 533 | 'properties': {'application': {'type': 'string'}, |
| 534 | 'charm-url': {'type': 'string'}, |
| 535 | 'constraints': {'$ref': '#/definitions/Value'}, |
| 536 | 'force-charm-url': {'type': 'boolean'}, |
| 537 | 'force-series': {'type': 'boolean'}, |
| 538 | 'min-units': {'type': 'integer'}, |
| 539 | 'settings': {'patternProperties': {'.*': {'type': 'string'}}, |
| 540 | 'type': 'object'}, |
| 541 | 'settings-yaml': {'type': 'string'}}, |
| 542 | 'required': ['application', |
| 543 | 'charm-url', |
| 544 | 'force-charm-url', |
| 545 | 'force-series', |
| 546 | 'settings-yaml'], |
| 547 | 'type': 'object'}, |
| 548 | 'ApplicationsDeploy': {'additionalProperties': False, |
| 549 | 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'}, |
| 550 | 'type': 'array'}}, |
| 551 | 'required': ['applications'], |
| 552 | 'type': 'object'}, |
| 553 | 'CharmRelation': {'additionalProperties': False, |
| 554 | 'properties': {'interface': {'type': 'string'}, |
| 555 | 'limit': {'type': 'integer'}, |
| 556 | 'name': {'type': 'string'}, |
| 557 | 'optional': {'type': 'boolean'}, |
| 558 | 'role': {'type': 'string'}, |
| 559 | 'scope': {'type': 'string'}}, |
| 560 | 'required': ['name', |
| 561 | 'role', |
| 562 | 'interface', |
| 563 | 'optional', |
| 564 | 'limit', |
| 565 | 'scope'], |
| 566 | 'type': 'object'}, |
| 567 | 'Constraints': {'additionalProperties': False, |
| 568 | 'properties': {'Count': {'type': 'integer'}, |
| 569 | 'Pool': {'type': 'string'}, |
| 570 | 'Size': {'type': 'integer'}}, |
| 571 | 'required': ['Pool', 'Size', 'Count'], |
| 572 | 'type': 'object'}, |
| 573 | 'DestroyApplicationUnits': {'additionalProperties': False, |
| 574 | 'properties': {'unit-names': {'items': {'type': 'string'}, |
| 575 | 'type': 'array'}}, |
| 576 | 'required': ['unit-names'], |
| 577 | 'type': 'object'}, |
| 578 | 'DestroyRelation': {'additionalProperties': False, |
| 579 | 'properties': {'endpoints': {'items': {'type': 'string'}, |
| 580 | 'type': 'array'}}, |
| 581 | 'required': ['endpoints'], |
| 582 | 'type': 'object'}, |
| 583 | 'Error': {'additionalProperties': False, |
| 584 | 'properties': {'code': {'type': 'string'}, |
| 585 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 586 | 'message': {'type': 'string'}}, |
| 587 | 'required': ['message', 'code'], |
| 588 | 'type': 'object'}, |
| 589 | 'ErrorInfo': {'additionalProperties': False, |
| 590 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 591 | 'macaroon-path': {'type': 'string'}}, |
| 592 | 'type': 'object'}, |
| 593 | 'ErrorResult': {'additionalProperties': False, |
| 594 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 595 | 'type': 'object'}, |
| 596 | 'ErrorResults': {'additionalProperties': False, |
| 597 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 598 | 'type': 'array'}}, |
| 599 | 'required': ['results'], |
| 600 | 'type': 'object'}, |
| 601 | 'GetApplicationConstraints': {'additionalProperties': False, |
| 602 | 'properties': {'application': {'type': 'string'}}, |
| 603 | 'required': ['application'], |
| 604 | 'type': 'object'}, |
| 605 | 'GetConstraintsResults': {'additionalProperties': False, |
| 606 | 'properties': {'constraints': {'$ref': '#/definitions/Value'}}, |
| 607 | 'required': ['constraints'], |
| 608 | 'type': 'object'}, |
| 609 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 610 | 'Placement': {'additionalProperties': False, |
| 611 | 'properties': {'directive': {'type': 'string'}, |
| 612 | 'scope': {'type': 'string'}}, |
| 613 | 'required': ['scope', 'directive'], |
| 614 | 'type': 'object'}, |
| 615 | 'SetConstraints': {'additionalProperties': False, |
| 616 | 'properties': {'application': {'type': 'string'}, |
| 617 | 'constraints': {'$ref': '#/definitions/Value'}}, |
| 618 | 'required': ['application', 'constraints'], |
| 619 | 'type': 'object'}, |
| 620 | 'StorageConstraints': {'additionalProperties': False, |
| 621 | 'properties': {'count': {'type': 'integer'}, |
| 622 | 'pool': {'type': 'string'}, |
| 623 | 'size': {'type': 'integer'}}, |
| 624 | 'type': 'object'}, |
| 625 | 'StringResult': {'additionalProperties': False, |
| 626 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 627 | 'result': {'type': 'string'}}, |
| 628 | 'required': ['result'], |
| 629 | 'type': 'object'}, |
| 630 | 'Value': {'additionalProperties': False, |
| 631 | 'properties': {'arch': {'type': 'string'}, |
| 632 | 'container': {'type': 'string'}, |
| 633 | 'cores': {'type': 'integer'}, |
| 634 | 'cpu-power': {'type': 'integer'}, |
| 635 | 'instance-type': {'type': 'string'}, |
| 636 | 'mem': {'type': 'integer'}, |
| 637 | 'root-disk': {'type': 'integer'}, |
| 638 | 'spaces': {'items': {'type': 'string'}, |
| 639 | 'type': 'array'}, |
| 640 | 'tags': {'items': {'type': 'string'}, |
| 641 | 'type': 'array'}, |
| 642 | 'virt-type': {'type': 'string'}}, |
| 643 | 'type': 'object'}}, |
| 644 | 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'}, |
| 645 | 'Result': {'$ref': '#/definitions/AddRelationResults'}}, |
| 646 | 'type': 'object'}, |
| 647 | 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'}, |
| 648 | 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}}, |
| 649 | 'type': 'object'}, |
| 650 | 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'}, |
| 651 | 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}}, |
| 652 | 'type': 'object'}, |
| 653 | 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'}, |
| 654 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 655 | 'type': 'object'}, |
| 656 | 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}}, |
| 657 | 'type': 'object'}, |
| 658 | 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}}, |
| 659 | 'type': 'object'}, |
| 660 | 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}}, |
| 661 | 'type': 'object'}, |
| 662 | 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}}, |
| 663 | 'type': 'object'}, |
| 664 | 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'}, |
| 665 | 'Result': {'$ref': '#/definitions/ApplicationGetResults'}}, |
| 666 | 'type': 'object'}, |
| 667 | 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'}, |
| 668 | 'Result': {'$ref': '#/definitions/StringResult'}}, |
| 669 | 'type': 'object'}, |
| 670 | 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'}, |
| 671 | 'Result': {'$ref': '#/definitions/GetConstraintsResults'}}, |
| 672 | 'type': 'object'}, |
| 673 | 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}}, |
| 674 | 'type': 'object'}, |
| 675 | 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}}, |
| 676 | 'type': 'object'}, |
| 677 | 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}}, |
| 678 | 'type': 'object'}, |
| 679 | 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'}, |
| 680 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 681 | 'type': 'object'}, |
| 682 | 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}}, |
| 683 | 'type': 'object'}, |
| 684 | 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}}, |
| 685 | 'type': 'object'}, |
| 686 | 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}}, |
| 687 | 'type': 'object'}}, |
| 688 | 'type': 'object'} |
| 689 | |
| 690 | |
| 691 | @ReturnMapping(AddRelationResults) |
| 692 | async def AddRelation(self, endpoints): |
| 693 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 694 | endpoints : typing.Sequence[str] |
| 695 | Returns -> typing.Mapping[str, ~CharmRelation] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 696 | ''' |
| 697 | # map input types to rpc msg |
| 698 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 699 | msg = dict(type='Application', |
| 700 | request='AddRelation', |
| 701 | version=3, |
| 702 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 703 | _params['endpoints'] = endpoints |
| 704 | reply = await self.rpc(msg) |
| 705 | return reply |
| 706 | |
| 707 | |
| 708 | |
| 709 | @ReturnMapping(AddApplicationUnitsResults) |
| 710 | async def AddUnits(self, application, num_units, placement): |
| 711 | ''' |
| 712 | application : str |
| 713 | num_units : int |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 714 | placement : typing.Sequence[~Placement] |
| 715 | Returns -> typing.Sequence[str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 716 | ''' |
| 717 | # map input types to rpc msg |
| 718 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 719 | msg = dict(type='Application', |
| 720 | request='AddUnits', |
| 721 | version=3, |
| 722 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 723 | _params['application'] = application |
| 724 | _params['num-units'] = num_units |
| 725 | _params['placement'] = placement |
| 726 | reply = await self.rpc(msg) |
| 727 | return reply |
| 728 | |
| 729 | |
| 730 | |
| 731 | @ReturnMapping(ApplicationCharmRelationsResults) |
| 732 | async def CharmRelations(self, application): |
| 733 | ''' |
| 734 | application : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 735 | Returns -> typing.Sequence[str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 736 | ''' |
| 737 | # map input types to rpc msg |
| 738 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 739 | msg = dict(type='Application', |
| 740 | request='CharmRelations', |
| 741 | version=3, |
| 742 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 743 | _params['application'] = application |
| 744 | reply = await self.rpc(msg) |
| 745 | return reply |
| 746 | |
| 747 | |
| 748 | |
| 749 | @ReturnMapping(ErrorResults) |
| 750 | async def Deploy(self, applications): |
| 751 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 752 | applications : typing.Sequence[~ApplicationDeploy] |
| 753 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 754 | ''' |
| 755 | # map input types to rpc msg |
| 756 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 757 | msg = dict(type='Application', |
| 758 | request='Deploy', |
| 759 | version=3, |
| 760 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 761 | _params['applications'] = applications |
| 762 | reply = await self.rpc(msg) |
| 763 | return reply |
| 764 | |
| 765 | |
| 766 | |
| 767 | @ReturnMapping(None) |
| 768 | async def Destroy(self, application): |
| 769 | ''' |
| 770 | application : str |
| 771 | Returns -> None |
| 772 | ''' |
| 773 | # map input types to rpc msg |
| 774 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 775 | msg = dict(type='Application', |
| 776 | request='Destroy', |
| 777 | version=3, |
| 778 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 779 | _params['application'] = application |
| 780 | reply = await self.rpc(msg) |
| 781 | return reply |
| 782 | |
| 783 | |
| 784 | |
| 785 | @ReturnMapping(None) |
| 786 | async def DestroyRelation(self, endpoints): |
| 787 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 788 | endpoints : typing.Sequence[str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 789 | Returns -> None |
| 790 | ''' |
| 791 | # map input types to rpc msg |
| 792 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 793 | msg = dict(type='Application', |
| 794 | request='DestroyRelation', |
| 795 | version=3, |
| 796 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 797 | _params['endpoints'] = endpoints |
| 798 | reply = await self.rpc(msg) |
| 799 | return reply |
| 800 | |
| 801 | |
| 802 | |
| 803 | @ReturnMapping(None) |
| 804 | async def DestroyUnits(self, unit_names): |
| 805 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 806 | unit_names : typing.Sequence[str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 807 | Returns -> None |
| 808 | ''' |
| 809 | # map input types to rpc msg |
| 810 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 811 | msg = dict(type='Application', |
| 812 | request='DestroyUnits', |
| 813 | version=3, |
| 814 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 815 | _params['unit-names'] = unit_names |
| 816 | reply = await self.rpc(msg) |
| 817 | return reply |
| 818 | |
| 819 | |
| 820 | |
| 821 | @ReturnMapping(None) |
| 822 | async def Expose(self, application): |
| 823 | ''' |
| 824 | application : str |
| 825 | Returns -> None |
| 826 | ''' |
| 827 | # map input types to rpc msg |
| 828 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 829 | msg = dict(type='Application', |
| 830 | request='Expose', |
| 831 | version=3, |
| 832 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 833 | _params['application'] = application |
| 834 | reply = await self.rpc(msg) |
| 835 | return reply |
| 836 | |
| 837 | |
| 838 | |
| 839 | @ReturnMapping(ApplicationGetResults) |
| 840 | async def Get(self, application): |
| 841 | ''' |
| 842 | application : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 843 | Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 844 | ''' |
| 845 | # map input types to rpc msg |
| 846 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 847 | msg = dict(type='Application', |
| 848 | request='Get', |
| 849 | version=3, |
| 850 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 851 | _params['application'] = application |
| 852 | reply = await self.rpc(msg) |
| 853 | return reply |
| 854 | |
| 855 | |
| 856 | |
| 857 | @ReturnMapping(StringResult) |
| 858 | async def GetCharmURL(self, application): |
| 859 | ''' |
| 860 | application : str |
| 861 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 862 | ''' |
| 863 | # map input types to rpc msg |
| 864 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 865 | msg = dict(type='Application', |
| 866 | request='GetCharmURL', |
| 867 | version=3, |
| 868 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 869 | _params['application'] = application |
| 870 | reply = await self.rpc(msg) |
| 871 | return reply |
| 872 | |
| 873 | |
| 874 | |
| 875 | @ReturnMapping(GetConstraintsResults) |
| 876 | async def GetConstraints(self, application): |
| 877 | ''' |
| 878 | application : str |
| 879 | Returns -> Value |
| 880 | ''' |
| 881 | # map input types to rpc msg |
| 882 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 883 | msg = dict(type='Application', |
| 884 | request='GetConstraints', |
| 885 | version=3, |
| 886 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 887 | _params['application'] = application |
| 888 | reply = await self.rpc(msg) |
| 889 | return reply |
| 890 | |
| 891 | |
| 892 | |
| 893 | @ReturnMapping(None) |
| 894 | async def Set(self, application, options): |
| 895 | ''' |
| 896 | application : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 897 | options : typing.Mapping[str, str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 898 | Returns -> None |
| 899 | ''' |
| 900 | # map input types to rpc msg |
| 901 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 902 | msg = dict(type='Application', |
| 903 | request='Set', |
| 904 | version=3, |
| 905 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 906 | _params['application'] = application |
| 907 | _params['options'] = options |
| 908 | reply = await self.rpc(msg) |
| 909 | return reply |
| 910 | |
| 911 | |
| 912 | |
| 913 | @ReturnMapping(None) |
| 914 | async def SetCharm(self, application, channel, charm_url, config_settings, config_settings_yaml, force_series, force_units, resource_ids, storage_constraints): |
| 915 | ''' |
| 916 | application : str |
| 917 | channel : str |
| 918 | charm_url : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 919 | config_settings : typing.Mapping[str, str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 920 | config_settings_yaml : str |
| 921 | force_series : bool |
| 922 | force_units : bool |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 923 | resource_ids : typing.Mapping[str, str] |
| 924 | storage_constraints : typing.Mapping[str, ~StorageConstraints] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 925 | Returns -> None |
| 926 | ''' |
| 927 | # map input types to rpc msg |
| 928 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 929 | msg = dict(type='Application', |
| 930 | request='SetCharm', |
| 931 | version=3, |
| 932 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 933 | _params['application'] = application |
| 934 | _params['channel'] = channel |
| 935 | _params['charm-url'] = charm_url |
| 936 | _params['config-settings'] = config_settings |
| 937 | _params['config-settings-yaml'] = config_settings_yaml |
| 938 | _params['force-series'] = force_series |
| 939 | _params['force-units'] = force_units |
| 940 | _params['resource-ids'] = resource_ids |
| 941 | _params['storage-constraints'] = storage_constraints |
| 942 | reply = await self.rpc(msg) |
| 943 | return reply |
| 944 | |
| 945 | |
| 946 | |
| 947 | @ReturnMapping(None) |
| 948 | async def SetConstraints(self, application, constraints): |
| 949 | ''' |
| 950 | application : str |
| 951 | constraints : Value |
| 952 | Returns -> None |
| 953 | ''' |
| 954 | # map input types to rpc msg |
| 955 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 956 | msg = dict(type='Application', |
| 957 | request='SetConstraints', |
| 958 | version=3, |
| 959 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 960 | _params['application'] = application |
| 961 | _params['constraints'] = constraints |
| 962 | reply = await self.rpc(msg) |
| 963 | return reply |
| 964 | |
| 965 | |
| 966 | |
| 967 | @ReturnMapping(ErrorResults) |
| 968 | async def SetMetricCredentials(self, creds): |
| 969 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 970 | creds : typing.Sequence[~ApplicationMetricCredential] |
| 971 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 972 | ''' |
| 973 | # map input types to rpc msg |
| 974 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 975 | msg = dict(type='Application', |
| 976 | request='SetMetricCredentials', |
| 977 | version=3, |
| 978 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 979 | _params['creds'] = creds |
| 980 | reply = await self.rpc(msg) |
| 981 | return reply |
| 982 | |
| 983 | |
| 984 | |
| 985 | @ReturnMapping(None) |
| 986 | async def Unexpose(self, application): |
| 987 | ''' |
| 988 | application : str |
| 989 | Returns -> None |
| 990 | ''' |
| 991 | # map input types to rpc msg |
| 992 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 993 | msg = dict(type='Application', |
| 994 | request='Unexpose', |
| 995 | version=3, |
| 996 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 997 | _params['application'] = application |
| 998 | reply = await self.rpc(msg) |
| 999 | return reply |
| 1000 | |
| 1001 | |
| 1002 | |
| 1003 | @ReturnMapping(None) |
| 1004 | async def Unset(self, application, options): |
| 1005 | ''' |
| 1006 | application : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 1007 | options : typing.Sequence[str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1008 | Returns -> None |
| 1009 | ''' |
| 1010 | # map input types to rpc msg |
| 1011 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 1012 | msg = dict(type='Application', |
| 1013 | request='Unset', |
| 1014 | version=3, |
| 1015 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1016 | _params['application'] = application |
| 1017 | _params['options'] = options |
| 1018 | reply = await self.rpc(msg) |
| 1019 | return reply |
| 1020 | |
| 1021 | |
| 1022 | |
| 1023 | @ReturnMapping(None) |
| 1024 | async def Update(self, application, charm_url, constraints, force_charm_url, force_series, min_units, settings, settings_yaml): |
| 1025 | ''' |
| 1026 | application : str |
| 1027 | charm_url : str |
| 1028 | constraints : Value |
| 1029 | force_charm_url : bool |
| 1030 | force_series : bool |
| 1031 | min_units : int |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 1032 | settings : typing.Mapping[str, str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1033 | settings_yaml : str |
| 1034 | Returns -> None |
| 1035 | ''' |
| 1036 | # map input types to rpc msg |
| 1037 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 1038 | msg = dict(type='Application', |
| 1039 | request='Update', |
| 1040 | version=3, |
| 1041 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1042 | _params['application'] = application |
| 1043 | _params['charm-url'] = charm_url |
| 1044 | _params['constraints'] = constraints |
| 1045 | _params['force-charm-url'] = force_charm_url |
| 1046 | _params['force-series'] = force_series |
| 1047 | _params['min-units'] = min_units |
| 1048 | _params['settings'] = settings |
| 1049 | _params['settings-yaml'] = settings_yaml |
| 1050 | reply = await self.rpc(msg) |
| 1051 | return reply |
| 1052 | |
| 1053 | |
| 1054 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 1055 | class CloudFacade(Type): |
| 1056 | name = 'Cloud' |
| 1057 | version = 3 |
| 1058 | schema = {'definitions': {'AddCloudArgs': {'additionalProperties': False, |
| 1059 | 'properties': {'cloud': {'$ref': '#/definitions/Cloud'}, |
| 1060 | 'name': {'type': 'string'}}, |
| 1061 | 'required': ['cloud', 'name'], |
| 1062 | 'type': 'object'}, |
| 1063 | 'Cloud': {'additionalProperties': False, |
| 1064 | 'properties': {'auth-types': {'items': {'type': 'string'}, |
| 1065 | 'type': 'array'}, |
| 1066 | 'ca-certificates': {'items': {'type': 'string'}, |
| 1067 | 'type': 'array'}, |
| 1068 | 'endpoint': {'type': 'string'}, |
| 1069 | 'identity-endpoint': {'type': 'string'}, |
| 1070 | 'regions': {'items': {'$ref': '#/definitions/CloudRegion'}, |
| 1071 | 'type': 'array'}, |
| 1072 | 'storage-endpoint': {'type': 'string'}, |
| 1073 | 'type': {'type': 'string'}}, |
| 1074 | 'required': ['type'], |
| 1075 | 'type': 'object'}, |
| 1076 | 'CloudCredential': {'additionalProperties': False, |
| 1077 | 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, |
| 1078 | 'type': 'object'}, |
| 1079 | 'auth-type': {'type': 'string'}, |
| 1080 | 'redacted': {'items': {'type': 'string'}, |
| 1081 | 'type': 'array'}}, |
| 1082 | 'required': ['auth-type'], |
| 1083 | 'type': 'object'}, |
| 1084 | 'CloudCredentialArg': {'additionalProperties': False, |
| 1085 | 'properties': {'cloud-name': {'type': 'string'}, |
| 1086 | 'credential-name': {'type': 'string'}}, |
| 1087 | 'required': ['cloud-name', |
| 1088 | 'credential-name'], |
| 1089 | 'type': 'object'}, |
| 1090 | 'CloudCredentialArgs': {'additionalProperties': False, |
| 1091 | 'properties': {'credentials': {'items': {'$ref': '#/definitions/CloudCredentialArg'}, |
| 1092 | 'type': 'array'}, |
| 1093 | 'include-secrets': {'type': 'boolean'}}, |
| 1094 | 'required': ['include-secrets'], |
| 1095 | 'type': 'object'}, |
| 1096 | 'CloudCredentialResult': {'additionalProperties': False, |
| 1097 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1098 | 'result': {'$ref': '#/definitions/CloudCredential'}}, |
| 1099 | 'type': 'object'}, |
| 1100 | 'CloudCredentialResults': {'additionalProperties': False, |
| 1101 | 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'}, |
| 1102 | 'type': 'array'}}, |
| 1103 | 'type': 'object'}, |
| 1104 | 'CloudDetails': {'additionalProperties': False, |
| 1105 | 'properties': {'auth-types': {'items': {'type': 'string'}, |
| 1106 | 'type': 'array'}, |
| 1107 | 'endpoint': {'type': 'string'}, |
| 1108 | 'identity-endpoint': {'type': 'string'}, |
| 1109 | 'regions': {'items': {'$ref': '#/definitions/CloudRegion'}, |
| 1110 | 'type': 'array'}, |
| 1111 | 'storage-endpoint': {'type': 'string'}, |
| 1112 | 'type': {'type': 'string'}}, |
| 1113 | 'required': ['type'], |
| 1114 | 'type': 'object'}, |
| 1115 | 'CloudInfo': {'additionalProperties': False, |
| 1116 | 'properties': {'CloudDetails': {'$ref': '#/definitions/CloudDetails'}, |
| 1117 | 'users': {'items': {'$ref': '#/definitions/CloudUserInfo'}, |
| 1118 | 'type': 'array'}}, |
| 1119 | 'required': ['CloudDetails', 'users'], |
| 1120 | 'type': 'object'}, |
| 1121 | 'CloudInfoResult': {'additionalProperties': False, |
| 1122 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1123 | 'result': {'$ref': '#/definitions/CloudInfo'}}, |
| 1124 | 'type': 'object'}, |
| 1125 | 'CloudInfoResults': {'additionalProperties': False, |
| 1126 | 'properties': {'results': {'items': {'$ref': '#/definitions/CloudInfoResult'}, |
| 1127 | 'type': 'array'}}, |
| 1128 | 'required': ['results'], |
| 1129 | 'type': 'object'}, |
| 1130 | 'CloudInstanceTypesConstraint': {'additionalProperties': False, |
| 1131 | 'properties': {'cloud-tag': {'type': 'string'}, |
| 1132 | 'constraints': {'$ref': '#/definitions/Value'}, |
| 1133 | 'region': {'type': 'string'}}, |
| 1134 | 'required': ['cloud-tag', |
| 1135 | 'region'], |
| 1136 | 'type': 'object'}, |
| 1137 | 'CloudInstanceTypesConstraints': {'additionalProperties': False, |
| 1138 | 'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'}, |
| 1139 | 'type': 'array'}}, |
| 1140 | 'required': ['constraints'], |
| 1141 | 'type': 'object'}, |
| 1142 | 'CloudRegion': {'additionalProperties': False, |
| 1143 | 'properties': {'endpoint': {'type': 'string'}, |
| 1144 | 'identity-endpoint': {'type': 'string'}, |
| 1145 | 'name': {'type': 'string'}, |
| 1146 | 'storage-endpoint': {'type': 'string'}}, |
| 1147 | 'required': ['name'], |
| 1148 | 'type': 'object'}, |
| 1149 | 'CloudResult': {'additionalProperties': False, |
| 1150 | 'properties': {'cloud': {'$ref': '#/definitions/Cloud'}, |
| 1151 | 'error': {'$ref': '#/definitions/Error'}}, |
| 1152 | 'type': 'object'}, |
| 1153 | 'CloudResults': {'additionalProperties': False, |
| 1154 | 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'}, |
| 1155 | 'type': 'array'}}, |
| 1156 | 'type': 'object'}, |
| 1157 | 'CloudUserInfo': {'additionalProperties': False, |
| 1158 | 'properties': {'access': {'type': 'string'}, |
| 1159 | 'display-name': {'type': 'string'}, |
| 1160 | 'user': {'type': 'string'}}, |
| 1161 | 'required': ['user', |
| 1162 | 'display-name', |
| 1163 | 'access'], |
| 1164 | 'type': 'object'}, |
| 1165 | 'CloudsResult': {'additionalProperties': False, |
| 1166 | 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}}, |
| 1167 | 'type': 'object'}}, |
| 1168 | 'type': 'object'}, |
| 1169 | 'ControllerCredentialInfo': {'additionalProperties': False, |
| 1170 | 'properties': {'content': {'$ref': '#/definitions/CredentialContent'}, |
| 1171 | 'models': {'items': {'$ref': '#/definitions/ModelAccess'}, |
| 1172 | 'type': 'array'}}, |
| 1173 | 'type': 'object'}, |
| 1174 | 'CredentialContent': {'additionalProperties': False, |
| 1175 | 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, |
| 1176 | 'type': 'object'}, |
| 1177 | 'auth-type': {'type': 'string'}, |
| 1178 | 'cloud': {'type': 'string'}, |
| 1179 | 'name': {'type': 'string'}}, |
| 1180 | 'required': ['name', |
| 1181 | 'cloud', |
| 1182 | 'auth-type'], |
| 1183 | 'type': 'object'}, |
| 1184 | 'CredentialContentResult': {'additionalProperties': False, |
| 1185 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1186 | 'result': {'$ref': '#/definitions/ControllerCredentialInfo'}}, |
| 1187 | 'type': 'object'}, |
| 1188 | 'CredentialContentResults': {'additionalProperties': False, |
| 1189 | 'properties': {'results': {'items': {'$ref': '#/definitions/CredentialContentResult'}, |
| 1190 | 'type': 'array'}}, |
| 1191 | 'type': 'object'}, |
| 1192 | 'Entities': {'additionalProperties': False, |
| 1193 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 1194 | 'type': 'array'}}, |
| 1195 | 'required': ['entities'], |
| 1196 | 'type': 'object'}, |
| 1197 | 'Entity': {'additionalProperties': False, |
| 1198 | 'properties': {'tag': {'type': 'string'}}, |
| 1199 | 'required': ['tag'], |
| 1200 | 'type': 'object'}, |
| 1201 | 'Error': {'additionalProperties': False, |
| 1202 | 'properties': {'code': {'type': 'string'}, |
| 1203 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 1204 | 'message': {'type': 'string'}}, |
| 1205 | 'required': ['message', 'code'], |
| 1206 | 'type': 'object'}, |
| 1207 | 'ErrorInfo': {'additionalProperties': False, |
| 1208 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 1209 | 'macaroon-path': {'type': 'string'}}, |
| 1210 | 'type': 'object'}, |
| 1211 | 'ErrorResult': {'additionalProperties': False, |
| 1212 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 1213 | 'type': 'object'}, |
| 1214 | 'ErrorResults': {'additionalProperties': False, |
| 1215 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 1216 | 'type': 'array'}}, |
| 1217 | 'required': ['results'], |
| 1218 | 'type': 'object'}, |
| 1219 | 'InstanceType': {'additionalProperties': False, |
| 1220 | 'properties': {'arches': {'items': {'type': 'string'}, |
| 1221 | 'type': 'array'}, |
| 1222 | 'cost': {'type': 'integer'}, |
| 1223 | 'cpu-cores': {'type': 'integer'}, |
| 1224 | 'deprecated': {'type': 'boolean'}, |
| 1225 | 'memory': {'type': 'integer'}, |
| 1226 | 'name': {'type': 'string'}, |
| 1227 | 'root-disk': {'type': 'integer'}, |
| 1228 | 'virt-type': {'type': 'string'}}, |
| 1229 | 'required': ['arches', 'cpu-cores', 'memory'], |
| 1230 | 'type': 'object'}, |
| 1231 | 'InstanceTypesResult': {'additionalProperties': False, |
| 1232 | 'properties': {'cost-currency': {'type': 'string'}, |
| 1233 | 'cost-divisor': {'type': 'integer'}, |
| 1234 | 'cost-unit': {'type': 'string'}, |
| 1235 | 'error': {'$ref': '#/definitions/Error'}, |
| 1236 | 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'}, |
| 1237 | 'type': 'array'}}, |
| 1238 | 'type': 'object'}, |
| 1239 | 'InstanceTypesResults': {'additionalProperties': False, |
| 1240 | 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'}, |
| 1241 | 'type': 'array'}}, |
| 1242 | 'required': ['results'], |
| 1243 | 'type': 'object'}, |
| 1244 | 'ListCloudInfo': {'additionalProperties': False, |
| 1245 | 'properties': {'CloudDetails': {'$ref': '#/definitions/CloudDetails'}, |
| 1246 | 'user-access': {'type': 'string'}}, |
| 1247 | 'required': ['CloudDetails', 'user-access'], |
| 1248 | 'type': 'object'}, |
| 1249 | 'ListCloudInfoResult': {'additionalProperties': False, |
| 1250 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1251 | 'result': {'$ref': '#/definitions/ListCloudInfo'}}, |
| 1252 | 'type': 'object'}, |
| 1253 | 'ListCloudInfoResults': {'additionalProperties': False, |
| 1254 | 'properties': {'results': {'items': {'$ref': '#/definitions/ListCloudInfoResult'}, |
| 1255 | 'type': 'array'}}, |
| 1256 | 'required': ['results'], |
| 1257 | 'type': 'object'}, |
| 1258 | 'ListCloudsRequest': {'additionalProperties': False, |
| 1259 | 'properties': {'all': {'type': 'boolean'}, |
| 1260 | 'user-tag': {'type': 'string'}}, |
| 1261 | 'required': ['user-tag'], |
| 1262 | 'type': 'object'}, |
| 1263 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 1264 | 'ModelAccess': {'additionalProperties': False, |
| 1265 | 'properties': {'access': {'type': 'string'}, |
| 1266 | 'model': {'type': 'string'}}, |
| 1267 | 'type': 'object'}, |
| 1268 | 'ModifyCloudAccess': {'additionalProperties': False, |
| 1269 | 'properties': {'access': {'type': 'string'}, |
| 1270 | 'action': {'type': 'string'}, |
| 1271 | 'cloud-tag': {'type': 'string'}, |
| 1272 | 'user-tag': {'type': 'string'}}, |
| 1273 | 'required': ['user-tag', |
| 1274 | 'cloud-tag', |
| 1275 | 'action', |
| 1276 | 'access'], |
| 1277 | 'type': 'object'}, |
| 1278 | 'ModifyCloudAccessRequest': {'additionalProperties': False, |
| 1279 | 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyCloudAccess'}, |
| 1280 | 'type': 'array'}}, |
| 1281 | 'required': ['changes'], |
| 1282 | 'type': 'object'}, |
| 1283 | 'RevokeCredentialArg': {'additionalProperties': False, |
| 1284 | 'properties': {'force': {'type': 'boolean'}, |
| 1285 | 'tag': {'type': 'string'}}, |
| 1286 | 'required': ['tag', 'force'], |
| 1287 | 'type': 'object'}, |
| 1288 | 'RevokeCredentialArgs': {'additionalProperties': False, |
| 1289 | 'properties': {'credentials': {'items': {'$ref': '#/definitions/RevokeCredentialArg'}, |
| 1290 | 'type': 'array'}}, |
| 1291 | 'required': ['credentials'], |
| 1292 | 'type': 'object'}, |
| 1293 | 'StringResult': {'additionalProperties': False, |
| 1294 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1295 | 'result': {'type': 'string'}}, |
| 1296 | 'required': ['result'], |
| 1297 | 'type': 'object'}, |
| 1298 | 'StringsResult': {'additionalProperties': False, |
| 1299 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1300 | 'result': {'items': {'type': 'string'}, |
| 1301 | 'type': 'array'}}, |
| 1302 | 'type': 'object'}, |
| 1303 | 'StringsResults': {'additionalProperties': False, |
| 1304 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, |
| 1305 | 'type': 'array'}}, |
| 1306 | 'required': ['results'], |
| 1307 | 'type': 'object'}, |
| 1308 | 'TaggedCredential': {'additionalProperties': False, |
| 1309 | 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'}, |
| 1310 | 'tag': {'type': 'string'}}, |
| 1311 | 'required': ['tag', 'credential'], |
| 1312 | 'type': 'object'}, |
| 1313 | 'TaggedCredentials': {'additionalProperties': False, |
| 1314 | 'properties': {'credentials': {'items': {'$ref': '#/definitions/TaggedCredential'}, |
| 1315 | 'type': 'array'}}, |
| 1316 | 'type': 'object'}, |
| 1317 | 'UpdateCredentialArgs': {'additionalProperties': False, |
| 1318 | 'properties': {'credentials': {'items': {'$ref': '#/definitions/TaggedCredential'}, |
| 1319 | 'type': 'array'}, |
| 1320 | 'force': {'type': 'boolean'}}, |
| 1321 | 'required': ['credentials', 'force'], |
| 1322 | 'type': 'object'}, |
| 1323 | 'UpdateCredentialModelResult': {'additionalProperties': False, |
| 1324 | 'properties': {'errors': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 1325 | 'type': 'array'}, |
| 1326 | 'name': {'type': 'string'}, |
| 1327 | 'uuid': {'type': 'string'}}, |
| 1328 | 'required': ['uuid', 'name'], |
| 1329 | 'type': 'object'}, |
| 1330 | 'UpdateCredentialResult': {'additionalProperties': False, |
| 1331 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1332 | 'models': {'items': {'$ref': '#/definitions/UpdateCredentialModelResult'}, |
| 1333 | 'type': 'array'}, |
| 1334 | 'tag': {'type': 'string'}}, |
| 1335 | 'required': ['tag'], |
| 1336 | 'type': 'object'}, |
| 1337 | 'UpdateCredentialResults': {'additionalProperties': False, |
| 1338 | 'properties': {'results': {'items': {'$ref': '#/definitions/UpdateCredentialResult'}, |
| 1339 | 'type': 'array'}}, |
| 1340 | 'type': 'object'}, |
| 1341 | 'UserCloud': {'additionalProperties': False, |
| 1342 | 'properties': {'cloud-tag': {'type': 'string'}, |
| 1343 | 'user-tag': {'type': 'string'}}, |
| 1344 | 'required': ['user-tag', 'cloud-tag'], |
| 1345 | 'type': 'object'}, |
| 1346 | 'UserClouds': {'additionalProperties': False, |
| 1347 | 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'}, |
| 1348 | 'type': 'array'}}, |
| 1349 | 'type': 'object'}, |
| 1350 | 'Value': {'additionalProperties': False, |
| 1351 | 'properties': {'arch': {'type': 'string'}, |
| 1352 | 'container': {'type': 'string'}, |
| 1353 | 'cores': {'type': 'integer'}, |
| 1354 | 'cpu-power': {'type': 'integer'}, |
| 1355 | 'instance-type': {'type': 'string'}, |
| 1356 | 'mem': {'type': 'integer'}, |
| 1357 | 'root-disk': {'type': 'integer'}, |
| 1358 | 'spaces': {'items': {'type': 'string'}, |
| 1359 | 'type': 'array'}, |
| 1360 | 'tags': {'items': {'type': 'string'}, |
| 1361 | 'type': 'array'}, |
| 1362 | 'virt-type': {'type': 'string'}, |
| 1363 | 'zones': {'items': {'type': 'string'}, |
| 1364 | 'type': 'array'}}, |
| 1365 | 'type': 'object'}}, |
| 1366 | 'properties': {'AddCloud': {'properties': {'Params': {'$ref': '#/definitions/AddCloudArgs'}}, |
| 1367 | 'type': 'object'}, |
| 1368 | 'AddCredentials': {'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'}, |
| 1369 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1370 | 'type': 'object'}, |
| 1371 | 'CheckCredentialsModels': {'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'}, |
| 1372 | 'Result': {'$ref': '#/definitions/UpdateCredentialResults'}}, |
| 1373 | 'type': 'object'}, |
| 1374 | 'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1375 | 'Result': {'$ref': '#/definitions/CloudResults'}}, |
| 1376 | 'type': 'object'}, |
| 1377 | 'CloudInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1378 | 'Result': {'$ref': '#/definitions/CloudInfoResults'}}, |
| 1379 | 'type': 'object'}, |
| 1380 | 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}}, |
| 1381 | 'type': 'object'}, |
| 1382 | 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1383 | 'Result': {'$ref': '#/definitions/CloudCredentialResults'}}, |
| 1384 | 'type': 'object'}, |
| 1385 | 'CredentialContents': {'properties': {'Params': {'$ref': '#/definitions/CloudCredentialArgs'}, |
| 1386 | 'Result': {'$ref': '#/definitions/CredentialContentResults'}}, |
| 1387 | 'type': 'object'}, |
| 1388 | 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, |
| 1389 | 'type': 'object'}, |
| 1390 | 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'}, |
| 1391 | 'Result': {'$ref': '#/definitions/InstanceTypesResults'}}, |
| 1392 | 'type': 'object'}, |
| 1393 | 'ListCloudInfo': {'properties': {'Params': {'$ref': '#/definitions/ListCloudsRequest'}, |
| 1394 | 'Result': {'$ref': '#/definitions/ListCloudInfoResults'}}, |
| 1395 | 'type': 'object'}, |
| 1396 | 'ModifyCloudAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyCloudAccessRequest'}, |
| 1397 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1398 | 'type': 'object'}, |
| 1399 | 'RemoveClouds': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1400 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1401 | 'type': 'object'}, |
| 1402 | 'RevokeCredentialsCheckModels': {'properties': {'Params': {'$ref': '#/definitions/RevokeCredentialArgs'}, |
| 1403 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1404 | 'type': 'object'}, |
| 1405 | 'UpdateCredentialsCheckModels': {'properties': {'Params': {'$ref': '#/definitions/UpdateCredentialArgs'}, |
| 1406 | 'Result': {'$ref': '#/definitions/UpdateCredentialResults'}}, |
| 1407 | 'type': 'object'}, |
| 1408 | 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'}, |
| 1409 | 'Result': {'$ref': '#/definitions/StringsResults'}}, |
| 1410 | 'type': 'object'}}, |
| 1411 | 'type': 'object'} |
| 1412 | |
| 1413 | |
| 1414 | @ReturnMapping(None) |
| 1415 | async def AddCloud(self, cloud, name): |
| 1416 | ''' |
| 1417 | cloud : Cloud |
| 1418 | name : str |
| 1419 | Returns -> None |
| 1420 | ''' |
| 1421 | # map input types to rpc msg |
| 1422 | _params = dict() |
| 1423 | msg = dict(type='Cloud', |
| 1424 | request='AddCloud', |
| 1425 | version=3, |
| 1426 | params=_params) |
| 1427 | _params['cloud'] = cloud |
| 1428 | _params['name'] = name |
| 1429 | reply = await self.rpc(msg) |
| 1430 | return reply |
| 1431 | |
| 1432 | |
| 1433 | |
| 1434 | @ReturnMapping(ErrorResults) |
| 1435 | async def AddCredentials(self, credentials): |
| 1436 | ''' |
| 1437 | credentials : typing.Sequence[~TaggedCredential] |
| 1438 | Returns -> typing.Sequence[~ErrorResult] |
| 1439 | ''' |
| 1440 | # map input types to rpc msg |
| 1441 | _params = dict() |
| 1442 | msg = dict(type='Cloud', |
| 1443 | request='AddCredentials', |
| 1444 | version=3, |
| 1445 | params=_params) |
| 1446 | _params['credentials'] = credentials |
| 1447 | reply = await self.rpc(msg) |
| 1448 | return reply |
| 1449 | |
| 1450 | |
| 1451 | |
| 1452 | @ReturnMapping(UpdateCredentialResults) |
| 1453 | async def CheckCredentialsModels(self, credentials): |
| 1454 | ''' |
| 1455 | credentials : typing.Sequence[~TaggedCredential] |
| 1456 | Returns -> typing.Sequence[~UpdateCredentialResult] |
| 1457 | ''' |
| 1458 | # map input types to rpc msg |
| 1459 | _params = dict() |
| 1460 | msg = dict(type='Cloud', |
| 1461 | request='CheckCredentialsModels', |
| 1462 | version=3, |
| 1463 | params=_params) |
| 1464 | _params['credentials'] = credentials |
| 1465 | reply = await self.rpc(msg) |
| 1466 | return reply |
| 1467 | |
| 1468 | |
| 1469 | |
| 1470 | @ReturnMapping(CloudResults) |
| 1471 | async def Cloud(self, entities): |
| 1472 | ''' |
| 1473 | entities : typing.Sequence[~Entity] |
| 1474 | Returns -> typing.Sequence[~CloudResult] |
| 1475 | ''' |
| 1476 | # map input types to rpc msg |
| 1477 | _params = dict() |
| 1478 | msg = dict(type='Cloud', |
| 1479 | request='Cloud', |
| 1480 | version=3, |
| 1481 | params=_params) |
| 1482 | _params['entities'] = entities |
| 1483 | reply = await self.rpc(msg) |
| 1484 | return reply |
| 1485 | |
| 1486 | |
| 1487 | |
| 1488 | @ReturnMapping(CloudInfoResults) |
| 1489 | async def CloudInfo(self, entities): |
| 1490 | ''' |
| 1491 | entities : typing.Sequence[~Entity] |
| 1492 | Returns -> typing.Sequence[~CloudInfoResult] |
| 1493 | ''' |
| 1494 | # map input types to rpc msg |
| 1495 | _params = dict() |
| 1496 | msg = dict(type='Cloud', |
| 1497 | request='CloudInfo', |
| 1498 | version=3, |
| 1499 | params=_params) |
| 1500 | _params['entities'] = entities |
| 1501 | reply = await self.rpc(msg) |
| 1502 | return reply |
| 1503 | |
| 1504 | |
| 1505 | |
| 1506 | @ReturnMapping(CloudsResult) |
| 1507 | async def Clouds(self): |
| 1508 | ''' |
| 1509 | |
| 1510 | Returns -> typing.Mapping[str, ~Cloud] |
| 1511 | ''' |
| 1512 | # map input types to rpc msg |
| 1513 | _params = dict() |
| 1514 | msg = dict(type='Cloud', |
| 1515 | request='Clouds', |
| 1516 | version=3, |
| 1517 | params=_params) |
| 1518 | |
| 1519 | reply = await self.rpc(msg) |
| 1520 | return reply |
| 1521 | |
| 1522 | |
| 1523 | |
| 1524 | @ReturnMapping(CloudCredentialResults) |
| 1525 | async def Credential(self, entities): |
| 1526 | ''' |
| 1527 | entities : typing.Sequence[~Entity] |
| 1528 | Returns -> typing.Sequence[~CloudCredentialResult] |
| 1529 | ''' |
| 1530 | # map input types to rpc msg |
| 1531 | _params = dict() |
| 1532 | msg = dict(type='Cloud', |
| 1533 | request='Credential', |
| 1534 | version=3, |
| 1535 | params=_params) |
| 1536 | _params['entities'] = entities |
| 1537 | reply = await self.rpc(msg) |
| 1538 | return reply |
| 1539 | |
| 1540 | |
| 1541 | |
| 1542 | @ReturnMapping(CredentialContentResults) |
| 1543 | async def CredentialContents(self, credentials, include_secrets): |
| 1544 | ''' |
| 1545 | credentials : typing.Sequence[~CloudCredentialArg] |
| 1546 | include_secrets : bool |
| 1547 | Returns -> typing.Sequence[~CredentialContentResult] |
| 1548 | ''' |
| 1549 | # map input types to rpc msg |
| 1550 | _params = dict() |
| 1551 | msg = dict(type='Cloud', |
| 1552 | request='CredentialContents', |
| 1553 | version=3, |
| 1554 | params=_params) |
| 1555 | _params['credentials'] = credentials |
| 1556 | _params['include-secrets'] = include_secrets |
| 1557 | reply = await self.rpc(msg) |
| 1558 | return reply |
| 1559 | |
| 1560 | |
| 1561 | |
| 1562 | @ReturnMapping(StringResult) |
| 1563 | async def DefaultCloud(self): |
| 1564 | ''' |
| 1565 | |
| 1566 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 1567 | ''' |
| 1568 | # map input types to rpc msg |
| 1569 | _params = dict() |
| 1570 | msg = dict(type='Cloud', |
| 1571 | request='DefaultCloud', |
| 1572 | version=3, |
| 1573 | params=_params) |
| 1574 | |
| 1575 | reply = await self.rpc(msg) |
| 1576 | return reply |
| 1577 | |
| 1578 | |
| 1579 | |
| 1580 | @ReturnMapping(InstanceTypesResults) |
| 1581 | async def InstanceTypes(self, constraints): |
| 1582 | ''' |
| 1583 | constraints : typing.Sequence[~CloudInstanceTypesConstraint] |
| 1584 | Returns -> typing.Sequence[~InstanceTypesResult] |
| 1585 | ''' |
| 1586 | # map input types to rpc msg |
| 1587 | _params = dict() |
| 1588 | msg = dict(type='Cloud', |
| 1589 | request='InstanceTypes', |
| 1590 | version=3, |
| 1591 | params=_params) |
| 1592 | _params['constraints'] = constraints |
| 1593 | reply = await self.rpc(msg) |
| 1594 | return reply |
| 1595 | |
| 1596 | |
| 1597 | |
| 1598 | @ReturnMapping(ListCloudInfoResults) |
| 1599 | async def ListCloudInfo(self, all_, user_tag): |
| 1600 | ''' |
| 1601 | all_ : bool |
| 1602 | user_tag : str |
| 1603 | Returns -> typing.Sequence[~ListCloudInfoResult] |
| 1604 | ''' |
| 1605 | # map input types to rpc msg |
| 1606 | _params = dict() |
| 1607 | msg = dict(type='Cloud', |
| 1608 | request='ListCloudInfo', |
| 1609 | version=3, |
| 1610 | params=_params) |
| 1611 | _params['all'] = all_ |
| 1612 | _params['user-tag'] = user_tag |
| 1613 | reply = await self.rpc(msg) |
| 1614 | return reply |
| 1615 | |
| 1616 | |
| 1617 | |
| 1618 | @ReturnMapping(ErrorResults) |
| 1619 | async def ModifyCloudAccess(self, changes): |
| 1620 | ''' |
| 1621 | changes : typing.Sequence[~ModifyCloudAccess] |
| 1622 | Returns -> typing.Sequence[~ErrorResult] |
| 1623 | ''' |
| 1624 | # map input types to rpc msg |
| 1625 | _params = dict() |
| 1626 | msg = dict(type='Cloud', |
| 1627 | request='ModifyCloudAccess', |
| 1628 | version=3, |
| 1629 | params=_params) |
| 1630 | _params['changes'] = changes |
| 1631 | reply = await self.rpc(msg) |
| 1632 | return reply |
| 1633 | |
| 1634 | |
| 1635 | |
| 1636 | @ReturnMapping(ErrorResults) |
| 1637 | async def RemoveClouds(self, entities): |
| 1638 | ''' |
| 1639 | entities : typing.Sequence[~Entity] |
| 1640 | Returns -> typing.Sequence[~ErrorResult] |
| 1641 | ''' |
| 1642 | # map input types to rpc msg |
| 1643 | _params = dict() |
| 1644 | msg = dict(type='Cloud', |
| 1645 | request='RemoveClouds', |
| 1646 | version=3, |
| 1647 | params=_params) |
| 1648 | _params['entities'] = entities |
| 1649 | reply = await self.rpc(msg) |
| 1650 | return reply |
| 1651 | |
| 1652 | |
| 1653 | |
| 1654 | @ReturnMapping(ErrorResults) |
| 1655 | async def RevokeCredentialsCheckModels(self, credentials): |
| 1656 | ''' |
| 1657 | credentials : typing.Sequence[~RevokeCredentialArg] |
| 1658 | Returns -> typing.Sequence[~ErrorResult] |
| 1659 | ''' |
| 1660 | # map input types to rpc msg |
| 1661 | _params = dict() |
| 1662 | msg = dict(type='Cloud', |
| 1663 | request='RevokeCredentialsCheckModels', |
| 1664 | version=3, |
| 1665 | params=_params) |
| 1666 | _params['credentials'] = credentials |
| 1667 | reply = await self.rpc(msg) |
| 1668 | return reply |
| 1669 | |
| 1670 | |
| 1671 | |
| 1672 | @ReturnMapping(UpdateCredentialResults) |
| 1673 | async def UpdateCredentialsCheckModels(self, credentials, force): |
| 1674 | ''' |
| 1675 | credentials : typing.Sequence[~TaggedCredential] |
| 1676 | force : bool |
| 1677 | Returns -> typing.Sequence[~UpdateCredentialResult] |
| 1678 | ''' |
| 1679 | # map input types to rpc msg |
| 1680 | _params = dict() |
| 1681 | msg = dict(type='Cloud', |
| 1682 | request='UpdateCredentialsCheckModels', |
| 1683 | version=3, |
| 1684 | params=_params) |
| 1685 | _params['credentials'] = credentials |
| 1686 | _params['force'] = force |
| 1687 | reply = await self.rpc(msg) |
| 1688 | return reply |
| 1689 | |
| 1690 | |
| 1691 | |
| 1692 | @ReturnMapping(StringsResults) |
| 1693 | async def UserCredentials(self, user_clouds): |
| 1694 | ''' |
| 1695 | user_clouds : typing.Sequence[~UserCloud] |
| 1696 | Returns -> typing.Sequence[~StringsResult] |
| 1697 | ''' |
| 1698 | # map input types to rpc msg |
| 1699 | _params = dict() |
| 1700 | msg = dict(type='Cloud', |
| 1701 | request='UserCredentials', |
| 1702 | version=3, |
| 1703 | params=_params) |
| 1704 | _params['user-clouds'] = user_clouds |
| 1705 | reply = await self.rpc(msg) |
| 1706 | return reply |
| 1707 | |
| 1708 | |
| 1709 | |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1710 | class ControllerFacade(Type): |
| 1711 | name = 'Controller' |
| 1712 | version = 3 |
| 1713 | schema = {'definitions': {'AllWatcherId': {'additionalProperties': False, |
| 1714 | 'properties': {'watcher-id': {'type': 'string'}}, |
| 1715 | 'required': ['watcher-id'], |
| 1716 | 'type': 'object'}, |
| 1717 | 'CloudCredential': {'additionalProperties': False, |
| 1718 | 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, |
| 1719 | 'type': 'object'}, |
| 1720 | 'auth-type': {'type': 'string'}, |
| 1721 | 'redacted': {'items': {'type': 'string'}, |
| 1722 | 'type': 'array'}}, |
| 1723 | 'required': ['auth-type'], |
| 1724 | 'type': 'object'}, |
| 1725 | 'CloudSpec': {'additionalProperties': False, |
| 1726 | 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'}, |
| 1727 | 'endpoint': {'type': 'string'}, |
| 1728 | 'identity-endpoint': {'type': 'string'}, |
| 1729 | 'name': {'type': 'string'}, |
| 1730 | 'region': {'type': 'string'}, |
| 1731 | 'storage-endpoint': {'type': 'string'}, |
| 1732 | 'type': {'type': 'string'}}, |
| 1733 | 'required': ['type', 'name'], |
| 1734 | 'type': 'object'}, |
| 1735 | 'CloudSpecResult': {'additionalProperties': False, |
| 1736 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1737 | 'result': {'$ref': '#/definitions/CloudSpec'}}, |
| 1738 | 'type': 'object'}, |
| 1739 | 'CloudSpecResults': {'additionalProperties': False, |
| 1740 | 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'}, |
| 1741 | 'type': 'array'}}, |
| 1742 | 'type': 'object'}, |
| 1743 | 'ConfigValue': {'additionalProperties': False, |
| 1744 | 'properties': {'source': {'type': 'string'}, |
| 1745 | 'value': {'additionalProperties': True, |
| 1746 | 'type': 'object'}}, |
| 1747 | 'required': ['value', 'source'], |
| 1748 | 'type': 'object'}, |
| 1749 | 'ControllerConfigResult': {'additionalProperties': False, |
| 1750 | 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 1751 | 'type': 'object'}}, |
| 1752 | 'type': 'object'}}, |
| 1753 | 'required': ['config'], |
| 1754 | 'type': 'object'}, |
| 1755 | 'DestroyControllerArgs': {'additionalProperties': False, |
| 1756 | 'properties': {'destroy-models': {'type': 'boolean'}}, |
| 1757 | 'required': ['destroy-models'], |
| 1758 | 'type': 'object'}, |
| 1759 | 'Entities': {'additionalProperties': False, |
| 1760 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 1761 | 'type': 'array'}}, |
| 1762 | 'required': ['entities'], |
| 1763 | 'type': 'object'}, |
| 1764 | 'Entity': {'additionalProperties': False, |
| 1765 | 'properties': {'tag': {'type': 'string'}}, |
| 1766 | 'required': ['tag'], |
| 1767 | 'type': 'object'}, |
| 1768 | 'Error': {'additionalProperties': False, |
| 1769 | 'properties': {'code': {'type': 'string'}, |
| 1770 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 1771 | 'message': {'type': 'string'}}, |
| 1772 | 'required': ['message', 'code'], |
| 1773 | 'type': 'object'}, |
| 1774 | 'ErrorInfo': {'additionalProperties': False, |
| 1775 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 1776 | 'macaroon-path': {'type': 'string'}}, |
| 1777 | 'type': 'object'}, |
| 1778 | 'ErrorResult': {'additionalProperties': False, |
| 1779 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 1780 | 'type': 'object'}, |
| 1781 | 'ErrorResults': {'additionalProperties': False, |
| 1782 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 1783 | 'type': 'array'}}, |
| 1784 | 'required': ['results'], |
| 1785 | 'type': 'object'}, |
| 1786 | 'HostedModelConfig': {'additionalProperties': False, |
| 1787 | 'properties': {'cloud-spec': {'$ref': '#/definitions/CloudSpec'}, |
| 1788 | 'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 1789 | 'type': 'object'}}, |
| 1790 | 'type': 'object'}, |
| 1791 | 'error': {'$ref': '#/definitions/Error'}, |
| 1792 | 'name': {'type': 'string'}, |
| 1793 | 'owner': {'type': 'string'}}, |
| 1794 | 'required': ['name', 'owner'], |
| 1795 | 'type': 'object'}, |
| 1796 | 'HostedModelConfigsResults': {'additionalProperties': False, |
| 1797 | 'properties': {'models': {'items': {'$ref': '#/definitions/HostedModelConfig'}, |
| 1798 | 'type': 'array'}}, |
| 1799 | 'required': ['models'], |
| 1800 | 'type': 'object'}, |
| 1801 | 'InitiateMigrationArgs': {'additionalProperties': False, |
| 1802 | 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'}, |
| 1803 | 'type': 'array'}}, |
| 1804 | 'required': ['specs'], |
| 1805 | 'type': 'object'}, |
| 1806 | 'InitiateMigrationResult': {'additionalProperties': False, |
| 1807 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1808 | 'migration-id': {'type': 'string'}, |
| 1809 | 'model-tag': {'type': 'string'}}, |
| 1810 | 'required': ['model-tag', |
| 1811 | 'migration-id'], |
| 1812 | 'type': 'object'}, |
| 1813 | 'InitiateMigrationResults': {'additionalProperties': False, |
| 1814 | 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'}, |
| 1815 | 'type': 'array'}}, |
| 1816 | 'required': ['results'], |
| 1817 | 'type': 'object'}, |
| 1818 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 1819 | 'MachineHardware': {'additionalProperties': False, |
| 1820 | 'properties': {'arch': {'type': 'string'}, |
| 1821 | 'availability-zone': {'type': 'string'}, |
| 1822 | 'cores': {'type': 'integer'}, |
| 1823 | 'cpu-power': {'type': 'integer'}, |
| 1824 | 'mem': {'type': 'integer'}, |
| 1825 | 'root-disk': {'type': 'integer'}, |
| 1826 | 'tags': {'items': {'type': 'string'}, |
| 1827 | 'type': 'array'}}, |
| 1828 | 'type': 'object'}, |
| 1829 | 'MigrationSpec': {'additionalProperties': False, |
| 1830 | 'properties': {'model-tag': {'type': 'string'}, |
| 1831 | 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}}, |
| 1832 | 'required': ['model-tag', 'target-info'], |
| 1833 | 'type': 'object'}, |
| 1834 | 'MigrationTargetInfo': {'additionalProperties': False, |
| 1835 | 'properties': {'addrs': {'items': {'type': 'string'}, |
| 1836 | 'type': 'array'}, |
| 1837 | 'auth-tag': {'type': 'string'}, |
| 1838 | 'ca-cert': {'type': 'string'}, |
| 1839 | 'controller-tag': {'type': 'string'}, |
| 1840 | 'macaroons': {'type': 'string'}, |
| 1841 | 'password': {'type': 'string'}}, |
| 1842 | 'required': ['controller-tag', |
| 1843 | 'addrs', |
| 1844 | 'ca-cert', |
| 1845 | 'auth-tag'], |
| 1846 | 'type': 'object'}, |
| 1847 | 'Model': {'additionalProperties': False, |
| 1848 | 'properties': {'name': {'type': 'string'}, |
| 1849 | 'owner-tag': {'type': 'string'}, |
| 1850 | 'uuid': {'type': 'string'}}, |
| 1851 | 'required': ['name', 'uuid', 'owner-tag'], |
| 1852 | 'type': 'object'}, |
| 1853 | 'ModelBlockInfo': {'additionalProperties': False, |
| 1854 | 'properties': {'blocks': {'items': {'type': 'string'}, |
| 1855 | 'type': 'array'}, |
| 1856 | 'model-uuid': {'type': 'string'}, |
| 1857 | 'name': {'type': 'string'}, |
| 1858 | 'owner-tag': {'type': 'string'}}, |
| 1859 | 'required': ['name', |
| 1860 | 'model-uuid', |
| 1861 | 'owner-tag', |
| 1862 | 'blocks'], |
| 1863 | 'type': 'object'}, |
| 1864 | 'ModelBlockInfoList': {'additionalProperties': False, |
| 1865 | 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'}, |
| 1866 | 'type': 'array'}}, |
| 1867 | 'type': 'object'}, |
| 1868 | 'ModelConfigResults': {'additionalProperties': False, |
| 1869 | 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}}, |
| 1870 | 'type': 'object'}}, |
| 1871 | 'required': ['config'], |
| 1872 | 'type': 'object'}, |
| 1873 | 'ModelMachineInfo': {'additionalProperties': False, |
| 1874 | 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'}, |
| 1875 | 'has-vote': {'type': 'boolean'}, |
| 1876 | 'id': {'type': 'string'}, |
| 1877 | 'instance-id': {'type': 'string'}, |
| 1878 | 'status': {'type': 'string'}, |
| 1879 | 'wants-vote': {'type': 'boolean'}}, |
| 1880 | 'required': ['id'], |
| 1881 | 'type': 'object'}, |
| 1882 | 'ModelStatus': {'additionalProperties': False, |
| 1883 | 'properties': {'application-count': {'type': 'integer'}, |
| 1884 | 'hosted-machine-count': {'type': 'integer'}, |
| 1885 | 'life': {'type': 'string'}, |
| 1886 | 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'}, |
| 1887 | 'type': 'array'}, |
| 1888 | 'model-tag': {'type': 'string'}, |
| 1889 | 'owner-tag': {'type': 'string'}}, |
| 1890 | 'required': ['model-tag', |
| 1891 | 'life', |
| 1892 | 'hosted-machine-count', |
| 1893 | 'application-count', |
| 1894 | 'owner-tag'], |
| 1895 | 'type': 'object'}, |
| 1896 | 'ModelStatusResults': {'additionalProperties': False, |
| 1897 | 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'}, |
| 1898 | 'type': 'array'}}, |
| 1899 | 'required': ['models'], |
| 1900 | 'type': 'object'}, |
| 1901 | 'ModelTag': {'additionalProperties': False, 'type': 'object'}, |
| 1902 | 'ModifyControllerAccess': {'additionalProperties': False, |
| 1903 | 'properties': {'access': {'type': 'string'}, |
| 1904 | 'action': {'type': 'string'}, |
| 1905 | 'user-tag': {'type': 'string'}}, |
| 1906 | 'required': ['user-tag', |
| 1907 | 'action', |
| 1908 | 'access'], |
| 1909 | 'type': 'object'}, |
| 1910 | 'ModifyControllerAccessRequest': {'additionalProperties': False, |
| 1911 | 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'}, |
| 1912 | 'type': 'array'}}, |
| 1913 | 'required': ['changes'], |
| 1914 | 'type': 'object'}, |
| 1915 | 'RemoveBlocksArgs': {'additionalProperties': False, |
| 1916 | 'properties': {'all': {'type': 'boolean'}}, |
| 1917 | 'required': ['all'], |
| 1918 | 'type': 'object'}, |
| 1919 | 'UserAccess': {'additionalProperties': False, |
| 1920 | 'properties': {'access': {'type': 'string'}, |
| 1921 | 'user-tag': {'type': 'string'}}, |
| 1922 | 'required': ['user-tag', 'access'], |
| 1923 | 'type': 'object'}, |
| 1924 | 'UserAccessResult': {'additionalProperties': False, |
| 1925 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1926 | 'result': {'$ref': '#/definitions/UserAccess'}}, |
| 1927 | 'type': 'object'}, |
| 1928 | 'UserAccessResults': {'additionalProperties': False, |
| 1929 | 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'}, |
| 1930 | 'type': 'array'}}, |
| 1931 | 'type': 'object'}, |
| 1932 | 'UserModel': {'additionalProperties': False, |
| 1933 | 'properties': {'last-connection': {'format': 'date-time', |
| 1934 | 'type': 'string'}, |
| 1935 | 'model': {'$ref': '#/definitions/Model'}}, |
| 1936 | 'required': ['model', 'last-connection'], |
| 1937 | 'type': 'object'}, |
| 1938 | 'UserModelList': {'additionalProperties': False, |
| 1939 | 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'}, |
| 1940 | 'type': 'array'}}, |
| 1941 | 'required': ['user-models'], |
| 1942 | 'type': 'object'}}, |
| 1943 | 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}}, |
| 1944 | 'type': 'object'}, |
| 1945 | 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1946 | 'Result': {'$ref': '#/definitions/CloudSpecResults'}}, |
| 1947 | 'type': 'object'}, |
| 1948 | 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, |
| 1949 | 'type': 'object'}, |
| 1950 | 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}}, |
| 1951 | 'type': 'object'}, |
| 1952 | 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'}, |
| 1953 | 'Result': {'$ref': '#/definitions/CloudSpecResult'}}, |
| 1954 | 'type': 'object'}, |
| 1955 | 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1956 | 'Result': {'$ref': '#/definitions/UserAccessResults'}}, |
| 1957 | 'type': 'object'}, |
| 1958 | 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}}, |
| 1959 | 'type': 'object'}, |
| 1960 | 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'}, |
| 1961 | 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}}, |
| 1962 | 'type': 'object'}, |
| 1963 | 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}}, |
| 1964 | 'type': 'object'}, |
| 1965 | 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}}, |
| 1966 | 'type': 'object'}, |
| 1967 | 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1968 | 'Result': {'$ref': '#/definitions/ModelStatusResults'}}, |
| 1969 | 'type': 'object'}, |
| 1970 | 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'}, |
| 1971 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1972 | 'type': 'object'}, |
| 1973 | 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}}, |
| 1974 | 'type': 'object'}, |
| 1975 | 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}}, |
| 1976 | 'type': 'object'}}, |
| 1977 | 'type': 'object'} |
| 1978 | |
| 1979 | |
| 1980 | @ReturnMapping(UserModelList) |
| 1981 | async def AllModels(self): |
| 1982 | ''' |
| 1983 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 1984 | Returns -> typing.Sequence[~UserModel] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1985 | ''' |
| 1986 | # map input types to rpc msg |
| 1987 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 1988 | msg = dict(type='Controller', |
| 1989 | request='AllModels', |
| 1990 | version=3, |
| 1991 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1992 | |
| 1993 | reply = await self.rpc(msg) |
| 1994 | return reply |
| 1995 | |
| 1996 | |
| 1997 | |
| 1998 | @ReturnMapping(CloudSpecResults) |
| 1999 | async def CloudSpec(self, entities): |
| 2000 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2001 | entities : typing.Sequence[~Entity] |
| 2002 | Returns -> typing.Sequence[~CloudSpecResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2003 | ''' |
| 2004 | # map input types to rpc msg |
| 2005 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2006 | msg = dict(type='Controller', |
| 2007 | request='CloudSpec', |
| 2008 | version=3, |
| 2009 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2010 | _params['entities'] = entities |
| 2011 | reply = await self.rpc(msg) |
| 2012 | return reply |
| 2013 | |
| 2014 | |
| 2015 | |
| 2016 | @ReturnMapping(ControllerConfigResult) |
| 2017 | async def ControllerConfig(self): |
| 2018 | ''' |
| 2019 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2020 | Returns -> typing.Mapping[str, typing.Any] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2021 | ''' |
| 2022 | # map input types to rpc msg |
| 2023 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2024 | msg = dict(type='Controller', |
| 2025 | request='ControllerConfig', |
| 2026 | version=3, |
| 2027 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2028 | |
| 2029 | reply = await self.rpc(msg) |
| 2030 | return reply |
| 2031 | |
| 2032 | |
| 2033 | |
| 2034 | @ReturnMapping(None) |
| 2035 | async def DestroyController(self, destroy_models): |
| 2036 | ''' |
| 2037 | destroy_models : bool |
| 2038 | Returns -> None |
| 2039 | ''' |
| 2040 | # map input types to rpc msg |
| 2041 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2042 | msg = dict(type='Controller', |
| 2043 | request='DestroyController', |
| 2044 | version=3, |
| 2045 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2046 | _params['destroy-models'] = destroy_models |
| 2047 | reply = await self.rpc(msg) |
| 2048 | return reply |
| 2049 | |
| 2050 | |
| 2051 | |
| 2052 | @ReturnMapping(CloudSpecResult) |
| 2053 | async def GetCloudSpec(self): |
| 2054 | ''' |
| 2055 | |
| 2056 | Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')] |
| 2057 | ''' |
| 2058 | # map input types to rpc msg |
| 2059 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2060 | msg = dict(type='Controller', |
| 2061 | request='GetCloudSpec', |
| 2062 | version=3, |
| 2063 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2064 | |
| 2065 | reply = await self.rpc(msg) |
| 2066 | return reply |
| 2067 | |
| 2068 | |
| 2069 | |
| 2070 | @ReturnMapping(UserAccessResults) |
| 2071 | async def GetControllerAccess(self, entities): |
| 2072 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2073 | entities : typing.Sequence[~Entity] |
| 2074 | Returns -> typing.Sequence[~UserAccessResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2075 | ''' |
| 2076 | # map input types to rpc msg |
| 2077 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2078 | msg = dict(type='Controller', |
| 2079 | request='GetControllerAccess', |
| 2080 | version=3, |
| 2081 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2082 | _params['entities'] = entities |
| 2083 | reply = await self.rpc(msg) |
| 2084 | return reply |
| 2085 | |
| 2086 | |
| 2087 | |
| 2088 | @ReturnMapping(HostedModelConfigsResults) |
| 2089 | async def HostedModelConfigs(self): |
| 2090 | ''' |
| 2091 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2092 | Returns -> typing.Sequence[~HostedModelConfig] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2093 | ''' |
| 2094 | # map input types to rpc msg |
| 2095 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2096 | msg = dict(type='Controller', |
| 2097 | request='HostedModelConfigs', |
| 2098 | version=3, |
| 2099 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2100 | |
| 2101 | reply = await self.rpc(msg) |
| 2102 | return reply |
| 2103 | |
| 2104 | |
| 2105 | |
| 2106 | @ReturnMapping(InitiateMigrationResults) |
| 2107 | async def InitiateMigration(self, specs): |
| 2108 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2109 | specs : typing.Sequence[~MigrationSpec] |
| 2110 | Returns -> typing.Sequence[~InitiateMigrationResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2111 | ''' |
| 2112 | # map input types to rpc msg |
| 2113 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2114 | msg = dict(type='Controller', |
| 2115 | request='InitiateMigration', |
| 2116 | version=3, |
| 2117 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2118 | _params['specs'] = specs |
| 2119 | reply = await self.rpc(msg) |
| 2120 | return reply |
| 2121 | |
| 2122 | |
| 2123 | |
| 2124 | @ReturnMapping(ModelBlockInfoList) |
| 2125 | async def ListBlockedModels(self): |
| 2126 | ''' |
| 2127 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2128 | Returns -> typing.Sequence[~ModelBlockInfo] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2129 | ''' |
| 2130 | # map input types to rpc msg |
| 2131 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2132 | msg = dict(type='Controller', |
| 2133 | request='ListBlockedModels', |
| 2134 | version=3, |
| 2135 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2136 | |
| 2137 | reply = await self.rpc(msg) |
| 2138 | return reply |
| 2139 | |
| 2140 | |
| 2141 | |
| 2142 | @ReturnMapping(ModelConfigResults) |
| 2143 | async def ModelConfig(self): |
| 2144 | ''' |
| 2145 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2146 | Returns -> typing.Mapping[str, ~ConfigValue] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2147 | ''' |
| 2148 | # map input types to rpc msg |
| 2149 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2150 | msg = dict(type='Controller', |
| 2151 | request='ModelConfig', |
| 2152 | version=3, |
| 2153 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2154 | |
| 2155 | reply = await self.rpc(msg) |
| 2156 | return reply |
| 2157 | |
| 2158 | |
| 2159 | |
| 2160 | @ReturnMapping(ModelStatusResults) |
| 2161 | async def ModelStatus(self, entities): |
| 2162 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2163 | entities : typing.Sequence[~Entity] |
| 2164 | Returns -> typing.Sequence[~ModelStatus] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2165 | ''' |
| 2166 | # map input types to rpc msg |
| 2167 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2168 | msg = dict(type='Controller', |
| 2169 | request='ModelStatus', |
| 2170 | version=3, |
| 2171 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2172 | _params['entities'] = entities |
| 2173 | reply = await self.rpc(msg) |
| 2174 | return reply |
| 2175 | |
| 2176 | |
| 2177 | |
| 2178 | @ReturnMapping(ErrorResults) |
| 2179 | async def ModifyControllerAccess(self, changes): |
| 2180 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2181 | changes : typing.Sequence[~ModifyControllerAccess] |
| 2182 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2183 | ''' |
| 2184 | # map input types to rpc msg |
| 2185 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2186 | msg = dict(type='Controller', |
| 2187 | request='ModifyControllerAccess', |
| 2188 | version=3, |
| 2189 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2190 | _params['changes'] = changes |
| 2191 | reply = await self.rpc(msg) |
| 2192 | return reply |
| 2193 | |
| 2194 | |
| 2195 | |
| 2196 | @ReturnMapping(None) |
| 2197 | async def RemoveBlocks(self, all_): |
| 2198 | ''' |
| 2199 | all_ : bool |
| 2200 | Returns -> None |
| 2201 | ''' |
| 2202 | # map input types to rpc msg |
| 2203 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2204 | msg = dict(type='Controller', |
| 2205 | request='RemoveBlocks', |
| 2206 | version=3, |
| 2207 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2208 | _params['all'] = all_ |
| 2209 | reply = await self.rpc(msg) |
| 2210 | return reply |
| 2211 | |
| 2212 | |
| 2213 | |
| 2214 | @ReturnMapping(AllWatcherId) |
| 2215 | async def WatchAllModels(self): |
| 2216 | ''' |
| 2217 | |
| 2218 | Returns -> str |
| 2219 | ''' |
| 2220 | # map input types to rpc msg |
| 2221 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2222 | msg = dict(type='Controller', |
| 2223 | request='WatchAllModels', |
| 2224 | version=3, |
| 2225 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2226 | |
| 2227 | reply = await self.rpc(msg) |
| 2228 | return reply |
| 2229 | |
| 2230 | |
| 2231 | |
| 2232 | class FirewallerFacade(Type): |
| 2233 | name = 'Firewaller' |
| 2234 | version = 3 |
| 2235 | schema = {'definitions': {'BoolResult': {'additionalProperties': False, |
| 2236 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2237 | 'result': {'type': 'boolean'}}, |
| 2238 | 'required': ['result'], |
| 2239 | 'type': 'object'}, |
| 2240 | 'BoolResults': {'additionalProperties': False, |
| 2241 | 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, |
| 2242 | 'type': 'array'}}, |
| 2243 | 'required': ['results'], |
| 2244 | 'type': 'object'}, |
| 2245 | 'CloudCredential': {'additionalProperties': False, |
| 2246 | 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, |
| 2247 | 'type': 'object'}, |
| 2248 | 'auth-type': {'type': 'string'}, |
| 2249 | 'redacted': {'items': {'type': 'string'}, |
| 2250 | 'type': 'array'}}, |
| 2251 | 'required': ['auth-type'], |
| 2252 | 'type': 'object'}, |
| 2253 | 'CloudSpec': {'additionalProperties': False, |
| 2254 | 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'}, |
| 2255 | 'endpoint': {'type': 'string'}, |
| 2256 | 'identity-endpoint': {'type': 'string'}, |
| 2257 | 'name': {'type': 'string'}, |
| 2258 | 'region': {'type': 'string'}, |
| 2259 | 'storage-endpoint': {'type': 'string'}, |
| 2260 | 'type': {'type': 'string'}}, |
| 2261 | 'required': ['type', 'name'], |
| 2262 | 'type': 'object'}, |
| 2263 | 'CloudSpecResult': {'additionalProperties': False, |
| 2264 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2265 | 'result': {'$ref': '#/definitions/CloudSpec'}}, |
| 2266 | 'type': 'object'}, |
| 2267 | 'CloudSpecResults': {'additionalProperties': False, |
| 2268 | 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'}, |
| 2269 | 'type': 'array'}}, |
| 2270 | 'type': 'object'}, |
| 2271 | 'Entities': {'additionalProperties': False, |
| 2272 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 2273 | 'type': 'array'}}, |
| 2274 | 'required': ['entities'], |
| 2275 | 'type': 'object'}, |
| 2276 | 'Entity': {'additionalProperties': False, |
| 2277 | 'properties': {'tag': {'type': 'string'}}, |
| 2278 | 'required': ['tag'], |
| 2279 | 'type': 'object'}, |
| 2280 | 'Error': {'additionalProperties': False, |
| 2281 | 'properties': {'code': {'type': 'string'}, |
| 2282 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 2283 | 'message': {'type': 'string'}}, |
| 2284 | 'required': ['message', 'code'], |
| 2285 | 'type': 'object'}, |
| 2286 | 'ErrorInfo': {'additionalProperties': False, |
| 2287 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 2288 | 'macaroon-path': {'type': 'string'}}, |
| 2289 | 'type': 'object'}, |
| 2290 | 'LifeResult': {'additionalProperties': False, |
| 2291 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2292 | 'life': {'type': 'string'}}, |
| 2293 | 'required': ['life'], |
| 2294 | 'type': 'object'}, |
| 2295 | 'LifeResults': {'additionalProperties': False, |
| 2296 | 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, |
| 2297 | 'type': 'array'}}, |
| 2298 | 'required': ['results'], |
| 2299 | 'type': 'object'}, |
| 2300 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 2301 | 'MachinePortRange': {'additionalProperties': False, |
| 2302 | 'properties': {'port-range': {'$ref': '#/definitions/PortRange'}, |
| 2303 | 'relation-tag': {'type': 'string'}, |
| 2304 | 'unit-tag': {'type': 'string'}}, |
| 2305 | 'required': ['unit-tag', |
| 2306 | 'relation-tag', |
| 2307 | 'port-range'], |
| 2308 | 'type': 'object'}, |
| 2309 | 'MachinePorts': {'additionalProperties': False, |
| 2310 | 'properties': {'machine-tag': {'type': 'string'}, |
| 2311 | 'subnet-tag': {'type': 'string'}}, |
| 2312 | 'required': ['machine-tag', 'subnet-tag'], |
| 2313 | 'type': 'object'}, |
| 2314 | 'MachinePortsParams': {'additionalProperties': False, |
| 2315 | 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'}, |
| 2316 | 'type': 'array'}}, |
| 2317 | 'required': ['params'], |
| 2318 | 'type': 'object'}, |
| 2319 | 'MachinePortsResult': {'additionalProperties': False, |
| 2320 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2321 | 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'}, |
| 2322 | 'type': 'array'}}, |
| 2323 | 'required': ['ports'], |
| 2324 | 'type': 'object'}, |
| 2325 | 'MachinePortsResults': {'additionalProperties': False, |
| 2326 | 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'}, |
| 2327 | 'type': 'array'}}, |
| 2328 | 'required': ['results'], |
| 2329 | 'type': 'object'}, |
| 2330 | 'ModelConfigResult': {'additionalProperties': False, |
| 2331 | 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2332 | 'type': 'object'}}, |
| 2333 | 'type': 'object'}}, |
| 2334 | 'required': ['config'], |
| 2335 | 'type': 'object'}, |
| 2336 | 'ModelTag': {'additionalProperties': False, 'type': 'object'}, |
| 2337 | 'NotifyWatchResult': {'additionalProperties': False, |
| 2338 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 2339 | 'error': {'$ref': '#/definitions/Error'}}, |
| 2340 | 'required': ['NotifyWatcherId'], |
| 2341 | 'type': 'object'}, |
| 2342 | 'NotifyWatchResults': {'additionalProperties': False, |
| 2343 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 2344 | 'type': 'array'}}, |
| 2345 | 'required': ['results'], |
| 2346 | 'type': 'object'}, |
| 2347 | 'PortRange': {'additionalProperties': False, |
| 2348 | 'properties': {'from-port': {'type': 'integer'}, |
| 2349 | 'protocol': {'type': 'string'}, |
| 2350 | 'to-port': {'type': 'integer'}}, |
| 2351 | 'required': ['from-port', 'to-port', 'protocol'], |
| 2352 | 'type': 'object'}, |
| 2353 | 'StringResult': {'additionalProperties': False, |
| 2354 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2355 | 'result': {'type': 'string'}}, |
| 2356 | 'required': ['result'], |
| 2357 | 'type': 'object'}, |
| 2358 | 'StringResults': {'additionalProperties': False, |
| 2359 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, |
| 2360 | 'type': 'array'}}, |
| 2361 | 'required': ['results'], |
| 2362 | 'type': 'object'}, |
| 2363 | 'StringsResult': {'additionalProperties': False, |
| 2364 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2365 | 'result': {'items': {'type': 'string'}, |
| 2366 | 'type': 'array'}}, |
| 2367 | 'type': 'object'}, |
| 2368 | 'StringsResults': {'additionalProperties': False, |
| 2369 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, |
| 2370 | 'type': 'array'}}, |
| 2371 | 'required': ['results'], |
| 2372 | 'type': 'object'}, |
| 2373 | 'StringsWatchResult': {'additionalProperties': False, |
| 2374 | 'properties': {'changes': {'items': {'type': 'string'}, |
| 2375 | 'type': 'array'}, |
| 2376 | 'error': {'$ref': '#/definitions/Error'}, |
| 2377 | 'watcher-id': {'type': 'string'}}, |
| 2378 | 'required': ['watcher-id'], |
| 2379 | 'type': 'object'}, |
| 2380 | 'StringsWatchResults': {'additionalProperties': False, |
| 2381 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, |
| 2382 | 'type': 'array'}}, |
| 2383 | 'required': ['results'], |
| 2384 | 'type': 'object'}}, |
| 2385 | 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2386 | 'Result': {'$ref': '#/definitions/CloudSpecResults'}}, |
| 2387 | 'type': 'object'}, |
| 2388 | 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2389 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 2390 | 'type': 'object'}, |
| 2391 | 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'}, |
| 2392 | 'Result': {'$ref': '#/definitions/CloudSpecResult'}}, |
| 2393 | 'type': 'object'}, |
| 2394 | 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2395 | 'Result': {'$ref': '#/definitions/BoolResults'}}, |
| 2396 | 'type': 'object'}, |
| 2397 | 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2398 | 'Result': {'$ref': '#/definitions/StringsResults'}}, |
| 2399 | 'type': 'object'}, |
| 2400 | 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'}, |
| 2401 | 'Result': {'$ref': '#/definitions/MachinePortsResults'}}, |
| 2402 | 'type': 'object'}, |
| 2403 | 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2404 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 2405 | 'type': 'object'}, |
| 2406 | 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2407 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 2408 | 'type': 'object'}, |
| 2409 | 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, |
| 2410 | 'type': 'object'}, |
| 2411 | 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2412 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 2413 | 'type': 'object'}, |
| 2414 | 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 2415 | 'type': 'object'}, |
| 2416 | 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, |
| 2417 | 'type': 'object'}, |
| 2418 | 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2419 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 2420 | 'type': 'object'}, |
| 2421 | 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2422 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 2423 | 'type': 'object'}}, |
| 2424 | 'type': 'object'} |
| 2425 | |
| 2426 | |
| 2427 | @ReturnMapping(CloudSpecResults) |
| 2428 | async def CloudSpec(self, entities): |
| 2429 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2430 | entities : typing.Sequence[~Entity] |
| 2431 | Returns -> typing.Sequence[~CloudSpecResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2432 | ''' |
| 2433 | # map input types to rpc msg |
| 2434 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2435 | msg = dict(type='Firewaller', |
| 2436 | request='CloudSpec', |
| 2437 | version=3, |
| 2438 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2439 | _params['entities'] = entities |
| 2440 | reply = await self.rpc(msg) |
| 2441 | return reply |
| 2442 | |
| 2443 | |
| 2444 | |
| 2445 | @ReturnMapping(StringResults) |
| 2446 | async def GetAssignedMachine(self, entities): |
| 2447 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2448 | entities : typing.Sequence[~Entity] |
| 2449 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2450 | ''' |
| 2451 | # map input types to rpc msg |
| 2452 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2453 | msg = dict(type='Firewaller', |
| 2454 | request='GetAssignedMachine', |
| 2455 | version=3, |
| 2456 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2457 | _params['entities'] = entities |
| 2458 | reply = await self.rpc(msg) |
| 2459 | return reply |
| 2460 | |
| 2461 | |
| 2462 | |
| 2463 | @ReturnMapping(CloudSpecResult) |
| 2464 | async def GetCloudSpec(self): |
| 2465 | ''' |
| 2466 | |
| 2467 | Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')] |
| 2468 | ''' |
| 2469 | # map input types to rpc msg |
| 2470 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2471 | msg = dict(type='Firewaller', |
| 2472 | request='GetCloudSpec', |
| 2473 | version=3, |
| 2474 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2475 | |
| 2476 | reply = await self.rpc(msg) |
| 2477 | return reply |
| 2478 | |
| 2479 | |
| 2480 | |
| 2481 | @ReturnMapping(BoolResults) |
| 2482 | async def GetExposed(self, entities): |
| 2483 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2484 | entities : typing.Sequence[~Entity] |
| 2485 | Returns -> typing.Sequence[~BoolResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2486 | ''' |
| 2487 | # map input types to rpc msg |
| 2488 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2489 | msg = dict(type='Firewaller', |
| 2490 | request='GetExposed', |
| 2491 | version=3, |
| 2492 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2493 | _params['entities'] = entities |
| 2494 | reply = await self.rpc(msg) |
| 2495 | return reply |
| 2496 | |
| 2497 | |
| 2498 | |
| 2499 | @ReturnMapping(StringsResults) |
| 2500 | async def GetMachineActiveSubnets(self, entities): |
| 2501 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2502 | entities : typing.Sequence[~Entity] |
| 2503 | Returns -> typing.Sequence[~StringsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2504 | ''' |
| 2505 | # map input types to rpc msg |
| 2506 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2507 | msg = dict(type='Firewaller', |
| 2508 | request='GetMachineActiveSubnets', |
| 2509 | version=3, |
| 2510 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2511 | _params['entities'] = entities |
| 2512 | reply = await self.rpc(msg) |
| 2513 | return reply |
| 2514 | |
| 2515 | |
| 2516 | |
| 2517 | @ReturnMapping(MachinePortsResults) |
| 2518 | async def GetMachinePorts(self, params): |
| 2519 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2520 | params : typing.Sequence[~MachinePorts] |
| 2521 | Returns -> typing.Sequence[~MachinePortsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2522 | ''' |
| 2523 | # map input types to rpc msg |
| 2524 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2525 | msg = dict(type='Firewaller', |
| 2526 | request='GetMachinePorts', |
| 2527 | version=3, |
| 2528 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2529 | _params['params'] = params |
| 2530 | reply = await self.rpc(msg) |
| 2531 | return reply |
| 2532 | |
| 2533 | |
| 2534 | |
| 2535 | @ReturnMapping(StringResults) |
| 2536 | async def InstanceId(self, entities): |
| 2537 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2538 | entities : typing.Sequence[~Entity] |
| 2539 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2540 | ''' |
| 2541 | # map input types to rpc msg |
| 2542 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2543 | msg = dict(type='Firewaller', |
| 2544 | request='InstanceId', |
| 2545 | version=3, |
| 2546 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2547 | _params['entities'] = entities |
| 2548 | reply = await self.rpc(msg) |
| 2549 | return reply |
| 2550 | |
| 2551 | |
| 2552 | |
| 2553 | @ReturnMapping(LifeResults) |
| 2554 | async def Life(self, entities): |
| 2555 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2556 | entities : typing.Sequence[~Entity] |
| 2557 | Returns -> typing.Sequence[~LifeResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2558 | ''' |
| 2559 | # map input types to rpc msg |
| 2560 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2561 | msg = dict(type='Firewaller', |
| 2562 | request='Life', |
| 2563 | version=3, |
| 2564 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2565 | _params['entities'] = entities |
| 2566 | reply = await self.rpc(msg) |
| 2567 | return reply |
| 2568 | |
| 2569 | |
| 2570 | |
| 2571 | @ReturnMapping(ModelConfigResult) |
| 2572 | async def ModelConfig(self): |
| 2573 | ''' |
| 2574 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2575 | Returns -> typing.Mapping[str, typing.Any] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2576 | ''' |
| 2577 | # map input types to rpc msg |
| 2578 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2579 | msg = dict(type='Firewaller', |
| 2580 | request='ModelConfig', |
| 2581 | version=3, |
| 2582 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2583 | |
| 2584 | reply = await self.rpc(msg) |
| 2585 | return reply |
| 2586 | |
| 2587 | |
| 2588 | |
| 2589 | @ReturnMapping(NotifyWatchResults) |
| 2590 | async def Watch(self, entities): |
| 2591 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2592 | entities : typing.Sequence[~Entity] |
| 2593 | Returns -> typing.Sequence[~NotifyWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2594 | ''' |
| 2595 | # map input types to rpc msg |
| 2596 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2597 | msg = dict(type='Firewaller', |
| 2598 | request='Watch', |
| 2599 | version=3, |
| 2600 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2601 | _params['entities'] = entities |
| 2602 | reply = await self.rpc(msg) |
| 2603 | return reply |
| 2604 | |
| 2605 | |
| 2606 | |
| 2607 | @ReturnMapping(NotifyWatchResult) |
| 2608 | async def WatchForModelConfigChanges(self): |
| 2609 | ''' |
| 2610 | |
| 2611 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 2612 | ''' |
| 2613 | # map input types to rpc msg |
| 2614 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2615 | msg = dict(type='Firewaller', |
| 2616 | request='WatchForModelConfigChanges', |
| 2617 | version=3, |
| 2618 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2619 | |
| 2620 | reply = await self.rpc(msg) |
| 2621 | return reply |
| 2622 | |
| 2623 | |
| 2624 | |
| 2625 | @ReturnMapping(StringsWatchResult) |
| 2626 | async def WatchModelMachines(self): |
| 2627 | ''' |
| 2628 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2629 | Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2630 | ''' |
| 2631 | # map input types to rpc msg |
| 2632 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2633 | msg = dict(type='Firewaller', |
| 2634 | request='WatchModelMachines', |
| 2635 | version=3, |
| 2636 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2637 | |
| 2638 | reply = await self.rpc(msg) |
| 2639 | return reply |
| 2640 | |
| 2641 | |
| 2642 | |
| 2643 | @ReturnMapping(StringsWatchResults) |
| 2644 | async def WatchOpenedPorts(self, entities): |
| 2645 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2646 | entities : typing.Sequence[~Entity] |
| 2647 | Returns -> typing.Sequence[~StringsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2648 | ''' |
| 2649 | # map input types to rpc msg |
| 2650 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2651 | msg = dict(type='Firewaller', |
| 2652 | request='WatchOpenedPorts', |
| 2653 | version=3, |
| 2654 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2655 | _params['entities'] = entities |
| 2656 | reply = await self.rpc(msg) |
| 2657 | return reply |
| 2658 | |
| 2659 | |
| 2660 | |
| 2661 | @ReturnMapping(StringsWatchResults) |
| 2662 | async def WatchUnits(self, entities): |
| 2663 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2664 | entities : typing.Sequence[~Entity] |
| 2665 | Returns -> typing.Sequence[~StringsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2666 | ''' |
| 2667 | # map input types to rpc msg |
| 2668 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2669 | msg = dict(type='Firewaller', |
| 2670 | request='WatchUnits', |
| 2671 | version=3, |
| 2672 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2673 | _params['entities'] = entities |
| 2674 | reply = await self.rpc(msg) |
| 2675 | return reply |
| 2676 | |
| 2677 | |
| 2678 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2679 | class ImageMetadataFacade(Type): |
| 2680 | name = 'ImageMetadata' |
| 2681 | version = 3 |
| 2682 | schema = {'properties': {'UpdateFromPublishedImages': {'type': 'object'}}, |
| 2683 | 'type': 'object'} |
| 2684 | |
| 2685 | |
| 2686 | @ReturnMapping(None) |
| 2687 | async def UpdateFromPublishedImages(self): |
| 2688 | ''' |
| 2689 | |
| 2690 | Returns -> None |
| 2691 | ''' |
| 2692 | # map input types to rpc msg |
| 2693 | _params = dict() |
| 2694 | msg = dict(type='ImageMetadata', |
| 2695 | request='UpdateFromPublishedImages', |
| 2696 | version=3, |
| 2697 | params=_params) |
| 2698 | |
| 2699 | reply = await self.rpc(msg) |
| 2700 | return reply |
| 2701 | |
| 2702 | |
| 2703 | |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2704 | class InstancePollerFacade(Type): |
| 2705 | name = 'InstancePoller' |
| 2706 | version = 3 |
| 2707 | schema = {'definitions': {'Address': {'additionalProperties': False, |
| 2708 | 'properties': {'scope': {'type': 'string'}, |
| 2709 | 'space-name': {'type': 'string'}, |
| 2710 | 'type': {'type': 'string'}, |
| 2711 | 'value': {'type': 'string'}}, |
| 2712 | 'required': ['value', 'type', 'scope'], |
| 2713 | 'type': 'object'}, |
| 2714 | 'BoolResult': {'additionalProperties': False, |
| 2715 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2716 | 'result': {'type': 'boolean'}}, |
| 2717 | 'required': ['result'], |
| 2718 | 'type': 'object'}, |
| 2719 | 'BoolResults': {'additionalProperties': False, |
| 2720 | 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, |
| 2721 | 'type': 'array'}}, |
| 2722 | 'required': ['results'], |
| 2723 | 'type': 'object'}, |
| 2724 | 'Entities': {'additionalProperties': False, |
| 2725 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 2726 | 'type': 'array'}}, |
| 2727 | 'required': ['entities'], |
| 2728 | 'type': 'object'}, |
| 2729 | 'Entity': {'additionalProperties': False, |
| 2730 | 'properties': {'tag': {'type': 'string'}}, |
| 2731 | 'required': ['tag'], |
| 2732 | 'type': 'object'}, |
| 2733 | 'EntityStatusArgs': {'additionalProperties': False, |
| 2734 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2735 | 'type': 'object'}}, |
| 2736 | 'type': 'object'}, |
| 2737 | 'info': {'type': 'string'}, |
| 2738 | 'status': {'type': 'string'}, |
| 2739 | 'tag': {'type': 'string'}}, |
| 2740 | 'required': ['tag', |
| 2741 | 'status', |
| 2742 | 'info', |
| 2743 | 'data'], |
| 2744 | 'type': 'object'}, |
| 2745 | 'Error': {'additionalProperties': False, |
| 2746 | 'properties': {'code': {'type': 'string'}, |
| 2747 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 2748 | 'message': {'type': 'string'}}, |
| 2749 | 'required': ['message', 'code'], |
| 2750 | 'type': 'object'}, |
| 2751 | 'ErrorInfo': {'additionalProperties': False, |
| 2752 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 2753 | 'macaroon-path': {'type': 'string'}}, |
| 2754 | 'type': 'object'}, |
| 2755 | 'ErrorResult': {'additionalProperties': False, |
| 2756 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 2757 | 'type': 'object'}, |
| 2758 | 'ErrorResults': {'additionalProperties': False, |
| 2759 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 2760 | 'type': 'array'}}, |
| 2761 | 'required': ['results'], |
| 2762 | 'type': 'object'}, |
| 2763 | 'LifeResult': {'additionalProperties': False, |
| 2764 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2765 | 'life': {'type': 'string'}}, |
| 2766 | 'required': ['life'], |
| 2767 | 'type': 'object'}, |
| 2768 | 'LifeResults': {'additionalProperties': False, |
| 2769 | 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, |
| 2770 | 'type': 'array'}}, |
| 2771 | 'required': ['results'], |
| 2772 | 'type': 'object'}, |
| 2773 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 2774 | 'MachineAddresses': {'additionalProperties': False, |
| 2775 | 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, |
| 2776 | 'type': 'array'}, |
| 2777 | 'tag': {'type': 'string'}}, |
| 2778 | 'required': ['tag', 'addresses'], |
| 2779 | 'type': 'object'}, |
| 2780 | 'MachineAddressesResult': {'additionalProperties': False, |
| 2781 | 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, |
| 2782 | 'type': 'array'}, |
| 2783 | 'error': {'$ref': '#/definitions/Error'}}, |
| 2784 | 'required': ['addresses'], |
| 2785 | 'type': 'object'}, |
| 2786 | 'MachineAddressesResults': {'additionalProperties': False, |
| 2787 | 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'}, |
| 2788 | 'type': 'array'}}, |
| 2789 | 'required': ['results'], |
| 2790 | 'type': 'object'}, |
| 2791 | 'ModelConfigResult': {'additionalProperties': False, |
| 2792 | 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2793 | 'type': 'object'}}, |
| 2794 | 'type': 'object'}}, |
| 2795 | 'required': ['config'], |
| 2796 | 'type': 'object'}, |
| 2797 | 'NotifyWatchResult': {'additionalProperties': False, |
| 2798 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 2799 | 'error': {'$ref': '#/definitions/Error'}}, |
| 2800 | 'required': ['NotifyWatcherId'], |
| 2801 | 'type': 'object'}, |
| 2802 | 'SetMachinesAddresses': {'additionalProperties': False, |
| 2803 | 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'}, |
| 2804 | 'type': 'array'}}, |
| 2805 | 'required': ['machine-addresses'], |
| 2806 | 'type': 'object'}, |
| 2807 | 'SetStatus': {'additionalProperties': False, |
| 2808 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, |
| 2809 | 'type': 'array'}}, |
| 2810 | 'required': ['entities'], |
| 2811 | 'type': 'object'}, |
| 2812 | 'StatusResult': {'additionalProperties': False, |
| 2813 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2814 | 'type': 'object'}}, |
| 2815 | 'type': 'object'}, |
| 2816 | 'error': {'$ref': '#/definitions/Error'}, |
| 2817 | 'id': {'type': 'string'}, |
| 2818 | 'info': {'type': 'string'}, |
| 2819 | 'life': {'type': 'string'}, |
| 2820 | 'since': {'format': 'date-time', |
| 2821 | 'type': 'string'}, |
| 2822 | 'status': {'type': 'string'}}, |
| 2823 | 'required': ['id', |
| 2824 | 'life', |
| 2825 | 'status', |
| 2826 | 'info', |
| 2827 | 'data', |
| 2828 | 'since'], |
| 2829 | 'type': 'object'}, |
| 2830 | 'StatusResults': {'additionalProperties': False, |
| 2831 | 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'}, |
| 2832 | 'type': 'array'}}, |
| 2833 | 'required': ['results'], |
| 2834 | 'type': 'object'}, |
| 2835 | 'StringResult': {'additionalProperties': False, |
| 2836 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2837 | 'result': {'type': 'string'}}, |
| 2838 | 'required': ['result'], |
| 2839 | 'type': 'object'}, |
| 2840 | 'StringResults': {'additionalProperties': False, |
| 2841 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, |
| 2842 | 'type': 'array'}}, |
| 2843 | 'required': ['results'], |
| 2844 | 'type': 'object'}, |
| 2845 | 'StringsWatchResult': {'additionalProperties': False, |
| 2846 | 'properties': {'changes': {'items': {'type': 'string'}, |
| 2847 | 'type': 'array'}, |
| 2848 | 'error': {'$ref': '#/definitions/Error'}, |
| 2849 | 'watcher-id': {'type': 'string'}}, |
| 2850 | 'required': ['watcher-id'], |
| 2851 | 'type': 'object'}}, |
| 2852 | 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2853 | 'Result': {'$ref': '#/definitions/BoolResults'}}, |
| 2854 | 'type': 'object'}, |
| 2855 | 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2856 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 2857 | 'type': 'object'}, |
| 2858 | 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2859 | 'Result': {'$ref': '#/definitions/StatusResults'}}, |
| 2860 | 'type': 'object'}, |
| 2861 | 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2862 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 2863 | 'type': 'object'}, |
| 2864 | 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, |
| 2865 | 'type': 'object'}, |
| 2866 | 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2867 | 'Result': {'$ref': '#/definitions/MachineAddressesResults'}}, |
| 2868 | 'type': 'object'}, |
| 2869 | 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 2870 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 2871 | 'type': 'object'}, |
| 2872 | 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'}, |
| 2873 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 2874 | 'type': 'object'}, |
| 2875 | 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2876 | 'Result': {'$ref': '#/definitions/StatusResults'}}, |
| 2877 | 'type': 'object'}, |
| 2878 | 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 2879 | 'type': 'object'}, |
| 2880 | 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, |
| 2881 | 'type': 'object'}}, |
| 2882 | 'type': 'object'} |
| 2883 | |
| 2884 | |
| 2885 | @ReturnMapping(BoolResults) |
| 2886 | async def AreManuallyProvisioned(self, entities): |
| 2887 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2888 | entities : typing.Sequence[~Entity] |
| 2889 | Returns -> typing.Sequence[~BoolResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2890 | ''' |
| 2891 | # map input types to rpc msg |
| 2892 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2893 | msg = dict(type='InstancePoller', |
| 2894 | request='AreManuallyProvisioned', |
| 2895 | version=3, |
| 2896 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2897 | _params['entities'] = entities |
| 2898 | reply = await self.rpc(msg) |
| 2899 | return reply |
| 2900 | |
| 2901 | |
| 2902 | |
| 2903 | @ReturnMapping(StringResults) |
| 2904 | async def InstanceId(self, entities): |
| 2905 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2906 | entities : typing.Sequence[~Entity] |
| 2907 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2908 | ''' |
| 2909 | # map input types to rpc msg |
| 2910 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2911 | msg = dict(type='InstancePoller', |
| 2912 | request='InstanceId', |
| 2913 | version=3, |
| 2914 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2915 | _params['entities'] = entities |
| 2916 | reply = await self.rpc(msg) |
| 2917 | return reply |
| 2918 | |
| 2919 | |
| 2920 | |
| 2921 | @ReturnMapping(StatusResults) |
| 2922 | async def InstanceStatus(self, entities): |
| 2923 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2924 | entities : typing.Sequence[~Entity] |
| 2925 | Returns -> typing.Sequence[~StatusResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2926 | ''' |
| 2927 | # map input types to rpc msg |
| 2928 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2929 | msg = dict(type='InstancePoller', |
| 2930 | request='InstanceStatus', |
| 2931 | version=3, |
| 2932 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2933 | _params['entities'] = entities |
| 2934 | reply = await self.rpc(msg) |
| 2935 | return reply |
| 2936 | |
| 2937 | |
| 2938 | |
| 2939 | @ReturnMapping(LifeResults) |
| 2940 | async def Life(self, entities): |
| 2941 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2942 | entities : typing.Sequence[~Entity] |
| 2943 | Returns -> typing.Sequence[~LifeResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2944 | ''' |
| 2945 | # map input types to rpc msg |
| 2946 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2947 | msg = dict(type='InstancePoller', |
| 2948 | request='Life', |
| 2949 | version=3, |
| 2950 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2951 | _params['entities'] = entities |
| 2952 | reply = await self.rpc(msg) |
| 2953 | return reply |
| 2954 | |
| 2955 | |
| 2956 | |
| 2957 | @ReturnMapping(ModelConfigResult) |
| 2958 | async def ModelConfig(self): |
| 2959 | ''' |
| 2960 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2961 | Returns -> typing.Mapping[str, typing.Any] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2962 | ''' |
| 2963 | # map input types to rpc msg |
| 2964 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2965 | msg = dict(type='InstancePoller', |
| 2966 | request='ModelConfig', |
| 2967 | version=3, |
| 2968 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2969 | |
| 2970 | reply = await self.rpc(msg) |
| 2971 | return reply |
| 2972 | |
| 2973 | |
| 2974 | |
| 2975 | @ReturnMapping(MachineAddressesResults) |
| 2976 | async def ProviderAddresses(self, entities): |
| 2977 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2978 | entities : typing.Sequence[~Entity] |
| 2979 | Returns -> typing.Sequence[~MachineAddressesResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2980 | ''' |
| 2981 | # map input types to rpc msg |
| 2982 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2983 | msg = dict(type='InstancePoller', |
| 2984 | request='ProviderAddresses', |
| 2985 | version=3, |
| 2986 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2987 | _params['entities'] = entities |
| 2988 | reply = await self.rpc(msg) |
| 2989 | return reply |
| 2990 | |
| 2991 | |
| 2992 | |
| 2993 | @ReturnMapping(ErrorResults) |
| 2994 | async def SetInstanceStatus(self, entities): |
| 2995 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 2996 | entities : typing.Sequence[~EntityStatusArgs] |
| 2997 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2998 | ''' |
| 2999 | # map input types to rpc msg |
| 3000 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3001 | msg = dict(type='InstancePoller', |
| 3002 | request='SetInstanceStatus', |
| 3003 | version=3, |
| 3004 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3005 | _params['entities'] = entities |
| 3006 | reply = await self.rpc(msg) |
| 3007 | return reply |
| 3008 | |
| 3009 | |
| 3010 | |
| 3011 | @ReturnMapping(ErrorResults) |
| 3012 | async def SetProviderAddresses(self, machine_addresses): |
| 3013 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3014 | machine_addresses : typing.Sequence[~MachineAddresses] |
| 3015 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3016 | ''' |
| 3017 | # map input types to rpc msg |
| 3018 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3019 | msg = dict(type='InstancePoller', |
| 3020 | request='SetProviderAddresses', |
| 3021 | version=3, |
| 3022 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3023 | _params['machine-addresses'] = machine_addresses |
| 3024 | reply = await self.rpc(msg) |
| 3025 | return reply |
| 3026 | |
| 3027 | |
| 3028 | |
| 3029 | @ReturnMapping(StatusResults) |
| 3030 | async def Status(self, entities): |
| 3031 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3032 | entities : typing.Sequence[~Entity] |
| 3033 | Returns -> typing.Sequence[~StatusResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3034 | ''' |
| 3035 | # map input types to rpc msg |
| 3036 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3037 | msg = dict(type='InstancePoller', |
| 3038 | request='Status', |
| 3039 | version=3, |
| 3040 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3041 | _params['entities'] = entities |
| 3042 | reply = await self.rpc(msg) |
| 3043 | return reply |
| 3044 | |
| 3045 | |
| 3046 | |
| 3047 | @ReturnMapping(NotifyWatchResult) |
| 3048 | async def WatchForModelConfigChanges(self): |
| 3049 | ''' |
| 3050 | |
| 3051 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 3052 | ''' |
| 3053 | # map input types to rpc msg |
| 3054 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3055 | msg = dict(type='InstancePoller', |
| 3056 | request='WatchForModelConfigChanges', |
| 3057 | version=3, |
| 3058 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3059 | |
| 3060 | reply = await self.rpc(msg) |
| 3061 | return reply |
| 3062 | |
| 3063 | |
| 3064 | |
| 3065 | @ReturnMapping(StringsWatchResult) |
| 3066 | async def WatchModelMachines(self): |
| 3067 | ''' |
| 3068 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3069 | Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3070 | ''' |
| 3071 | # map input types to rpc msg |
| 3072 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3073 | msg = dict(type='InstancePoller', |
| 3074 | request='WatchModelMachines', |
| 3075 | version=3, |
| 3076 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3077 | |
| 3078 | reply = await self.rpc(msg) |
| 3079 | return reply |
| 3080 | |
| 3081 | |
| 3082 | |
| 3083 | class MachineManagerFacade(Type): |
| 3084 | name = 'MachineManager' |
| 3085 | version = 3 |
| 3086 | schema = {'definitions': {'AddMachineParams': {'additionalProperties': False, |
| 3087 | 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, |
| 3088 | 'type': 'array'}, |
| 3089 | 'constraints': {'$ref': '#/definitions/Value'}, |
| 3090 | 'container-type': {'type': 'string'}, |
| 3091 | 'disks': {'items': {'$ref': '#/definitions/Constraints'}, |
| 3092 | 'type': 'array'}, |
| 3093 | 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'}, |
| 3094 | 'instance-id': {'type': 'string'}, |
| 3095 | 'jobs': {'items': {'type': 'string'}, |
| 3096 | 'type': 'array'}, |
| 3097 | 'nonce': {'type': 'string'}, |
| 3098 | 'parent-id': {'type': 'string'}, |
| 3099 | 'placement': {'$ref': '#/definitions/Placement'}, |
| 3100 | 'series': {'type': 'string'}}, |
| 3101 | 'required': ['series', |
| 3102 | 'constraints', |
| 3103 | 'jobs', |
| 3104 | 'parent-id', |
| 3105 | 'container-type', |
| 3106 | 'instance-id', |
| 3107 | 'nonce', |
| 3108 | 'hardware-characteristics', |
| 3109 | 'addresses'], |
| 3110 | 'type': 'object'}, |
| 3111 | 'AddMachines': {'additionalProperties': False, |
| 3112 | 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'}, |
| 3113 | 'type': 'array'}}, |
| 3114 | 'required': ['params'], |
| 3115 | 'type': 'object'}, |
| 3116 | 'AddMachinesResult': {'additionalProperties': False, |
| 3117 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3118 | 'machine': {'type': 'string'}}, |
| 3119 | 'required': ['machine'], |
| 3120 | 'type': 'object'}, |
| 3121 | 'AddMachinesResults': {'additionalProperties': False, |
| 3122 | 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'}, |
| 3123 | 'type': 'array'}}, |
| 3124 | 'required': ['machines'], |
| 3125 | 'type': 'object'}, |
| 3126 | 'Address': {'additionalProperties': False, |
| 3127 | 'properties': {'scope': {'type': 'string'}, |
| 3128 | 'space-name': {'type': 'string'}, |
| 3129 | 'type': {'type': 'string'}, |
| 3130 | 'value': {'type': 'string'}}, |
| 3131 | 'required': ['value', 'type', 'scope'], |
| 3132 | 'type': 'object'}, |
| 3133 | 'Constraints': {'additionalProperties': False, |
| 3134 | 'properties': {'Count': {'type': 'integer'}, |
| 3135 | 'Pool': {'type': 'string'}, |
| 3136 | 'Size': {'type': 'integer'}}, |
| 3137 | 'required': ['Pool', 'Size', 'Count'], |
| 3138 | 'type': 'object'}, |
| 3139 | 'DestroyMachineInfo': {'additionalProperties': False, |
| 3140 | 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'}, |
| 3141 | 'type': 'array'}, |
| 3142 | 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'}, |
| 3143 | 'type': 'array'}, |
| 3144 | 'detached-storage': {'items': {'$ref': '#/definitions/Entity'}, |
| 3145 | 'type': 'array'}}, |
| 3146 | 'type': 'object'}, |
| 3147 | 'DestroyMachineResult': {'additionalProperties': False, |
| 3148 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3149 | 'info': {'$ref': '#/definitions/DestroyMachineInfo'}}, |
| 3150 | 'type': 'object'}, |
| 3151 | 'DestroyMachineResults': {'additionalProperties': False, |
| 3152 | 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyMachineResult'}, |
| 3153 | 'type': 'array'}}, |
| 3154 | 'type': 'object'}, |
| 3155 | 'Entities': {'additionalProperties': False, |
| 3156 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 3157 | 'type': 'array'}}, |
| 3158 | 'required': ['entities'], |
| 3159 | 'type': 'object'}, |
| 3160 | 'Entity': {'additionalProperties': False, |
| 3161 | 'properties': {'tag': {'type': 'string'}}, |
| 3162 | 'required': ['tag'], |
| 3163 | 'type': 'object'}, |
| 3164 | 'Error': {'additionalProperties': False, |
| 3165 | 'properties': {'code': {'type': 'string'}, |
| 3166 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 3167 | 'message': {'type': 'string'}}, |
| 3168 | 'required': ['message', 'code'], |
| 3169 | 'type': 'object'}, |
| 3170 | 'ErrorInfo': {'additionalProperties': False, |
| 3171 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 3172 | 'macaroon-path': {'type': 'string'}}, |
| 3173 | 'type': 'object'}, |
| 3174 | 'HardwareCharacteristics': {'additionalProperties': False, |
| 3175 | 'properties': {'arch': {'type': 'string'}, |
| 3176 | 'availability-zone': {'type': 'string'}, |
| 3177 | 'cpu-cores': {'type': 'integer'}, |
| 3178 | 'cpu-power': {'type': 'integer'}, |
| 3179 | 'mem': {'type': 'integer'}, |
| 3180 | 'root-disk': {'type': 'integer'}, |
| 3181 | 'tags': {'items': {'type': 'string'}, |
| 3182 | 'type': 'array'}}, |
| 3183 | 'type': 'object'}, |
| 3184 | 'InstanceType': {'additionalProperties': False, |
| 3185 | 'properties': {'arches': {'items': {'type': 'string'}, |
| 3186 | 'type': 'array'}, |
| 3187 | 'cost': {'type': 'integer'}, |
| 3188 | 'cpu-cores': {'type': 'integer'}, |
| 3189 | 'deprecated': {'type': 'boolean'}, |
| 3190 | 'memory': {'type': 'integer'}, |
| 3191 | 'name': {'type': 'string'}, |
| 3192 | 'root-disk': {'type': 'integer'}, |
| 3193 | 'virt-type': {'type': 'string'}}, |
| 3194 | 'required': ['arches', 'cpu-cores', 'memory'], |
| 3195 | 'type': 'object'}, |
| 3196 | 'InstanceTypesResult': {'additionalProperties': False, |
| 3197 | 'properties': {'cost-currency': {'type': 'string'}, |
| 3198 | 'cost-divisor': {'type': 'integer'}, |
| 3199 | 'cost-unit': {'type': 'string'}, |
| 3200 | 'error': {'$ref': '#/definitions/Error'}, |
| 3201 | 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'}, |
| 3202 | 'type': 'array'}}, |
| 3203 | 'type': 'object'}, |
| 3204 | 'InstanceTypesResults': {'additionalProperties': False, |
| 3205 | 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'}, |
| 3206 | 'type': 'array'}}, |
| 3207 | 'required': ['results'], |
| 3208 | 'type': 'object'}, |
| 3209 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 3210 | 'ModelInstanceTypesConstraint': {'additionalProperties': False, |
| 3211 | 'properties': {'value': {'$ref': '#/definitions/Value'}}, |
| 3212 | 'type': 'object'}, |
| 3213 | 'ModelInstanceTypesConstraints': {'additionalProperties': False, |
| 3214 | 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'}, |
| 3215 | 'type': 'array'}}, |
| 3216 | 'required': ['constraints'], |
| 3217 | 'type': 'object'}, |
| 3218 | 'Placement': {'additionalProperties': False, |
| 3219 | 'properties': {'directive': {'type': 'string'}, |
| 3220 | 'scope': {'type': 'string'}}, |
| 3221 | 'required': ['scope', 'directive'], |
| 3222 | 'type': 'object'}, |
| 3223 | 'Value': {'additionalProperties': False, |
| 3224 | 'properties': {'arch': {'type': 'string'}, |
| 3225 | 'container': {'type': 'string'}, |
| 3226 | 'cores': {'type': 'integer'}, |
| 3227 | 'cpu-power': {'type': 'integer'}, |
| 3228 | 'instance-type': {'type': 'string'}, |
| 3229 | 'mem': {'type': 'integer'}, |
| 3230 | 'root-disk': {'type': 'integer'}, |
| 3231 | 'spaces': {'items': {'type': 'string'}, |
| 3232 | 'type': 'array'}, |
| 3233 | 'tags': {'items': {'type': 'string'}, |
| 3234 | 'type': 'array'}, |
| 3235 | 'virt-type': {'type': 'string'}}, |
| 3236 | 'type': 'object'}}, |
| 3237 | 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, |
| 3238 | 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, |
| 3239 | 'type': 'object'}, |
| 3240 | 'DestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3241 | 'Result': {'$ref': '#/definitions/DestroyMachineResults'}}, |
| 3242 | 'type': 'object'}, |
| 3243 | 'ForceDestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3244 | 'Result': {'$ref': '#/definitions/DestroyMachineResults'}}, |
| 3245 | 'type': 'object'}, |
| 3246 | 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'}, |
| 3247 | 'Result': {'$ref': '#/definitions/InstanceTypesResults'}}, |
| 3248 | 'type': 'object'}}, |
| 3249 | 'type': 'object'} |
| 3250 | |
| 3251 | |
| 3252 | @ReturnMapping(AddMachinesResults) |
| 3253 | async def AddMachines(self, params): |
| 3254 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3255 | params : typing.Sequence[~AddMachineParams] |
| 3256 | Returns -> typing.Sequence[~AddMachinesResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3257 | ''' |
| 3258 | # map input types to rpc msg |
| 3259 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3260 | msg = dict(type='MachineManager', |
| 3261 | request='AddMachines', |
| 3262 | version=3, |
| 3263 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3264 | _params['params'] = params |
| 3265 | reply = await self.rpc(msg) |
| 3266 | return reply |
| 3267 | |
| 3268 | |
| 3269 | |
| 3270 | @ReturnMapping(DestroyMachineResults) |
| 3271 | async def DestroyMachine(self, entities): |
| 3272 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3273 | entities : typing.Sequence[~Entity] |
| 3274 | Returns -> typing.Sequence[~DestroyMachineResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3275 | ''' |
| 3276 | # map input types to rpc msg |
| 3277 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3278 | msg = dict(type='MachineManager', |
| 3279 | request='DestroyMachine', |
| 3280 | version=3, |
| 3281 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3282 | _params['entities'] = entities |
| 3283 | reply = await self.rpc(msg) |
| 3284 | return reply |
| 3285 | |
| 3286 | |
| 3287 | |
| 3288 | @ReturnMapping(DestroyMachineResults) |
| 3289 | async def ForceDestroyMachine(self, entities): |
| 3290 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3291 | entities : typing.Sequence[~Entity] |
| 3292 | Returns -> typing.Sequence[~DestroyMachineResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3293 | ''' |
| 3294 | # map input types to rpc msg |
| 3295 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3296 | msg = dict(type='MachineManager', |
| 3297 | request='ForceDestroyMachine', |
| 3298 | version=3, |
| 3299 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3300 | _params['entities'] = entities |
| 3301 | reply = await self.rpc(msg) |
| 3302 | return reply |
| 3303 | |
| 3304 | |
| 3305 | |
| 3306 | @ReturnMapping(InstanceTypesResults) |
| 3307 | async def InstanceTypes(self, constraints): |
| 3308 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3309 | constraints : typing.Sequence[~ModelInstanceTypesConstraint] |
| 3310 | Returns -> typing.Sequence[~InstanceTypesResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3311 | ''' |
| 3312 | # map input types to rpc msg |
| 3313 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3314 | msg = dict(type='MachineManager', |
| 3315 | request='InstanceTypes', |
| 3316 | version=3, |
| 3317 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3318 | _params['constraints'] = constraints |
| 3319 | reply = await self.rpc(msg) |
| 3320 | return reply |
| 3321 | |
| 3322 | |
| 3323 | |
| 3324 | class ModelManagerFacade(Type): |
| 3325 | name = 'ModelManager' |
| 3326 | version = 3 |
| 3327 | schema = {'definitions': {'DumpModelRequest': {'additionalProperties': False, |
| 3328 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 3329 | 'type': 'array'}, |
| 3330 | 'simplified': {'type': 'boolean'}}, |
| 3331 | 'required': ['entities', 'simplified'], |
| 3332 | 'type': 'object'}, |
| 3333 | 'Entities': {'additionalProperties': False, |
| 3334 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 3335 | 'type': 'array'}}, |
| 3336 | 'required': ['entities'], |
| 3337 | 'type': 'object'}, |
| 3338 | 'Entity': {'additionalProperties': False, |
| 3339 | 'properties': {'tag': {'type': 'string'}}, |
| 3340 | 'required': ['tag'], |
| 3341 | 'type': 'object'}, |
| 3342 | 'EntityStatus': {'additionalProperties': False, |
| 3343 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 3344 | 'type': 'object'}}, |
| 3345 | 'type': 'object'}, |
| 3346 | 'info': {'type': 'string'}, |
| 3347 | 'since': {'format': 'date-time', |
| 3348 | 'type': 'string'}, |
| 3349 | 'status': {'type': 'string'}}, |
| 3350 | 'required': ['status', 'info', 'since'], |
| 3351 | 'type': 'object'}, |
| 3352 | 'Error': {'additionalProperties': False, |
| 3353 | 'properties': {'code': {'type': 'string'}, |
| 3354 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 3355 | 'message': {'type': 'string'}}, |
| 3356 | 'required': ['message', 'code'], |
| 3357 | 'type': 'object'}, |
| 3358 | 'ErrorInfo': {'additionalProperties': False, |
| 3359 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 3360 | 'macaroon-path': {'type': 'string'}}, |
| 3361 | 'type': 'object'}, |
| 3362 | 'ErrorResult': {'additionalProperties': False, |
| 3363 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 3364 | 'type': 'object'}, |
| 3365 | 'ErrorResults': {'additionalProperties': False, |
| 3366 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 3367 | 'type': 'array'}}, |
| 3368 | 'required': ['results'], |
| 3369 | 'type': 'object'}, |
| 3370 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 3371 | 'MachineHardware': {'additionalProperties': False, |
| 3372 | 'properties': {'arch': {'type': 'string'}, |
| 3373 | 'availability-zone': {'type': 'string'}, |
| 3374 | 'cores': {'type': 'integer'}, |
| 3375 | 'cpu-power': {'type': 'integer'}, |
| 3376 | 'mem': {'type': 'integer'}, |
| 3377 | 'root-disk': {'type': 'integer'}, |
| 3378 | 'tags': {'items': {'type': 'string'}, |
| 3379 | 'type': 'array'}}, |
| 3380 | 'type': 'object'}, |
| 3381 | 'MapResult': {'additionalProperties': False, |
| 3382 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3383 | 'result': {'patternProperties': {'.*': {'additionalProperties': True, |
| 3384 | 'type': 'object'}}, |
| 3385 | 'type': 'object'}}, |
| 3386 | 'required': ['result'], |
| 3387 | 'type': 'object'}, |
| 3388 | 'MapResults': {'additionalProperties': False, |
| 3389 | 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'}, |
| 3390 | 'type': 'array'}}, |
| 3391 | 'required': ['results'], |
| 3392 | 'type': 'object'}, |
| 3393 | 'Model': {'additionalProperties': False, |
| 3394 | 'properties': {'name': {'type': 'string'}, |
| 3395 | 'owner-tag': {'type': 'string'}, |
| 3396 | 'uuid': {'type': 'string'}}, |
| 3397 | 'required': ['name', 'uuid', 'owner-tag'], |
| 3398 | 'type': 'object'}, |
| 3399 | 'ModelCreateArgs': {'additionalProperties': False, |
| 3400 | 'properties': {'cloud-tag': {'type': 'string'}, |
| 3401 | 'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 3402 | 'type': 'object'}}, |
| 3403 | 'type': 'object'}, |
| 3404 | 'credential': {'type': 'string'}, |
| 3405 | 'name': {'type': 'string'}, |
| 3406 | 'owner-tag': {'type': 'string'}, |
| 3407 | 'region': {'type': 'string'}}, |
| 3408 | 'required': ['name', 'owner-tag'], |
| 3409 | 'type': 'object'}, |
| 3410 | 'ModelDefaultValues': {'additionalProperties': False, |
| 3411 | 'properties': {'cloud-region': {'type': 'string'}, |
| 3412 | 'cloud-tag': {'type': 'string'}, |
| 3413 | 'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 3414 | 'type': 'object'}}, |
| 3415 | 'type': 'object'}}, |
| 3416 | 'required': ['config'], |
| 3417 | 'type': 'object'}, |
| 3418 | 'ModelDefaults': {'additionalProperties': False, |
| 3419 | 'properties': {'controller': {'additionalProperties': True, |
| 3420 | 'type': 'object'}, |
| 3421 | 'default': {'additionalProperties': True, |
| 3422 | 'type': 'object'}, |
| 3423 | 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'}, |
| 3424 | 'type': 'array'}}, |
| 3425 | 'type': 'object'}, |
| 3426 | 'ModelDefaultsResult': {'additionalProperties': False, |
| 3427 | 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}}, |
| 3428 | 'type': 'object'}}, |
| 3429 | 'required': ['config'], |
| 3430 | 'type': 'object'}, |
| 3431 | 'ModelInfo': {'additionalProperties': False, |
| 3432 | 'properties': {'agent-version': {'$ref': '#/definitions/Number'}, |
| 3433 | 'cloud-credential-tag': {'type': 'string'}, |
| 3434 | 'cloud-region': {'type': 'string'}, |
| 3435 | 'cloud-tag': {'type': 'string'}, |
| 3436 | 'controller-uuid': {'type': 'string'}, |
| 3437 | 'default-series': {'type': 'string'}, |
| 3438 | 'life': {'type': 'string'}, |
| 3439 | 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'}, |
| 3440 | 'type': 'array'}, |
| 3441 | 'migration': {'$ref': '#/definitions/ModelMigrationStatus'}, |
| 3442 | 'name': {'type': 'string'}, |
| 3443 | 'owner-tag': {'type': 'string'}, |
| 3444 | 'provider-type': {'type': 'string'}, |
| 3445 | 'sla': {'$ref': '#/definitions/ModelSLAInfo'}, |
| 3446 | 'status': {'$ref': '#/definitions/EntityStatus'}, |
| 3447 | 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'}, |
| 3448 | 'type': 'array'}, |
| 3449 | 'uuid': {'type': 'string'}}, |
| 3450 | 'required': ['name', |
| 3451 | 'uuid', |
| 3452 | 'controller-uuid', |
| 3453 | 'cloud-tag', |
| 3454 | 'owner-tag', |
| 3455 | 'life', |
| 3456 | 'users', |
| 3457 | 'machines', |
| 3458 | 'sla', |
| 3459 | 'agent-version'], |
| 3460 | 'type': 'object'}, |
| 3461 | 'ModelInfoResult': {'additionalProperties': False, |
| 3462 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3463 | 'result': {'$ref': '#/definitions/ModelInfo'}}, |
| 3464 | 'type': 'object'}, |
| 3465 | 'ModelInfoResults': {'additionalProperties': False, |
| 3466 | 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'}, |
| 3467 | 'type': 'array'}}, |
| 3468 | 'required': ['results'], |
| 3469 | 'type': 'object'}, |
| 3470 | 'ModelMachineInfo': {'additionalProperties': False, |
| 3471 | 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'}, |
| 3472 | 'has-vote': {'type': 'boolean'}, |
| 3473 | 'id': {'type': 'string'}, |
| 3474 | 'instance-id': {'type': 'string'}, |
| 3475 | 'status': {'type': 'string'}, |
| 3476 | 'wants-vote': {'type': 'boolean'}}, |
| 3477 | 'required': ['id'], |
| 3478 | 'type': 'object'}, |
| 3479 | 'ModelMigrationStatus': {'additionalProperties': False, |
| 3480 | 'properties': {'end': {'format': 'date-time', |
| 3481 | 'type': 'string'}, |
| 3482 | 'start': {'format': 'date-time', |
| 3483 | 'type': 'string'}, |
| 3484 | 'status': {'type': 'string'}}, |
| 3485 | 'required': ['status', 'start'], |
| 3486 | 'type': 'object'}, |
| 3487 | 'ModelSLAInfo': {'additionalProperties': False, |
| 3488 | 'properties': {'level': {'type': 'string'}, |
| 3489 | 'owner': {'type': 'string'}}, |
| 3490 | 'required': ['level', 'owner'], |
| 3491 | 'type': 'object'}, |
| 3492 | 'ModelStatus': {'additionalProperties': False, |
| 3493 | 'properties': {'application-count': {'type': 'integer'}, |
| 3494 | 'hosted-machine-count': {'type': 'integer'}, |
| 3495 | 'life': {'type': 'string'}, |
| 3496 | 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'}, |
| 3497 | 'type': 'array'}, |
| 3498 | 'model-tag': {'type': 'string'}, |
| 3499 | 'owner-tag': {'type': 'string'}}, |
| 3500 | 'required': ['model-tag', |
| 3501 | 'life', |
| 3502 | 'hosted-machine-count', |
| 3503 | 'application-count', |
| 3504 | 'owner-tag'], |
| 3505 | 'type': 'object'}, |
| 3506 | 'ModelStatusResults': {'additionalProperties': False, |
| 3507 | 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'}, |
| 3508 | 'type': 'array'}}, |
| 3509 | 'required': ['models'], |
| 3510 | 'type': 'object'}, |
| 3511 | 'ModelUnsetKeys': {'additionalProperties': False, |
| 3512 | 'properties': {'cloud-region': {'type': 'string'}, |
| 3513 | 'cloud-tag': {'type': 'string'}, |
| 3514 | 'keys': {'items': {'type': 'string'}, |
| 3515 | 'type': 'array'}}, |
| 3516 | 'required': ['keys'], |
| 3517 | 'type': 'object'}, |
| 3518 | 'ModelUserInfo': {'additionalProperties': False, |
| 3519 | 'properties': {'access': {'type': 'string'}, |
| 3520 | 'display-name': {'type': 'string'}, |
| 3521 | 'last-connection': {'format': 'date-time', |
| 3522 | 'type': 'string'}, |
| 3523 | 'user': {'type': 'string'}}, |
| 3524 | 'required': ['user', |
| 3525 | 'display-name', |
| 3526 | 'last-connection', |
| 3527 | 'access'], |
| 3528 | 'type': 'object'}, |
| 3529 | 'ModifyModelAccess': {'additionalProperties': False, |
| 3530 | 'properties': {'access': {'type': 'string'}, |
| 3531 | 'action': {'type': 'string'}, |
| 3532 | 'model-tag': {'type': 'string'}, |
| 3533 | 'user-tag': {'type': 'string'}}, |
| 3534 | 'required': ['user-tag', |
| 3535 | 'action', |
| 3536 | 'access', |
| 3537 | 'model-tag'], |
| 3538 | 'type': 'object'}, |
| 3539 | 'ModifyModelAccessRequest': {'additionalProperties': False, |
| 3540 | 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'}, |
| 3541 | 'type': 'array'}}, |
| 3542 | 'required': ['changes'], |
| 3543 | 'type': 'object'}, |
| 3544 | 'Number': {'additionalProperties': False, |
| 3545 | 'properties': {'Build': {'type': 'integer'}, |
| 3546 | 'Major': {'type': 'integer'}, |
| 3547 | 'Minor': {'type': 'integer'}, |
| 3548 | 'Patch': {'type': 'integer'}, |
| 3549 | 'Tag': {'type': 'string'}}, |
| 3550 | 'required': ['Major', |
| 3551 | 'Minor', |
| 3552 | 'Tag', |
| 3553 | 'Patch', |
| 3554 | 'Build'], |
| 3555 | 'type': 'object'}, |
| 3556 | 'RegionDefaults': {'additionalProperties': False, |
| 3557 | 'properties': {'region-name': {'type': 'string'}, |
| 3558 | 'value': {'additionalProperties': True, |
| 3559 | 'type': 'object'}}, |
| 3560 | 'required': ['region-name', 'value'], |
| 3561 | 'type': 'object'}, |
| 3562 | 'SetModelDefaults': {'additionalProperties': False, |
| 3563 | 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'}, |
| 3564 | 'type': 'array'}}, |
| 3565 | 'required': ['config'], |
| 3566 | 'type': 'object'}, |
| 3567 | 'StringResult': {'additionalProperties': False, |
| 3568 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3569 | 'result': {'type': 'string'}}, |
| 3570 | 'required': ['result'], |
| 3571 | 'type': 'object'}, |
| 3572 | 'StringResults': {'additionalProperties': False, |
| 3573 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, |
| 3574 | 'type': 'array'}}, |
| 3575 | 'required': ['results'], |
| 3576 | 'type': 'object'}, |
| 3577 | 'UnsetModelDefaults': {'additionalProperties': False, |
| 3578 | 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'}, |
| 3579 | 'type': 'array'}}, |
| 3580 | 'required': ['keys'], |
| 3581 | 'type': 'object'}, |
| 3582 | 'UserModel': {'additionalProperties': False, |
| 3583 | 'properties': {'last-connection': {'format': 'date-time', |
| 3584 | 'type': 'string'}, |
| 3585 | 'model': {'$ref': '#/definitions/Model'}}, |
| 3586 | 'required': ['model', 'last-connection'], |
| 3587 | 'type': 'object'}, |
| 3588 | 'UserModelList': {'additionalProperties': False, |
| 3589 | 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'}, |
| 3590 | 'type': 'array'}}, |
| 3591 | 'required': ['user-models'], |
| 3592 | 'type': 'object'}}, |
| 3593 | 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'}, |
| 3594 | 'Result': {'$ref': '#/definitions/ModelInfo'}}, |
| 3595 | 'type': 'object'}, |
| 3596 | 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3597 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3598 | 'type': 'object'}, |
| 3599 | 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/DumpModelRequest'}, |
| 3600 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 3601 | 'type': 'object'}, |
| 3602 | 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3603 | 'Result': {'$ref': '#/definitions/MapResults'}}, |
| 3604 | 'type': 'object'}, |
| 3605 | 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'}, |
| 3606 | 'Result': {'$ref': '#/definitions/UserModelList'}}, |
| 3607 | 'type': 'object'}, |
| 3608 | 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}}, |
| 3609 | 'type': 'object'}, |
| 3610 | 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3611 | 'Result': {'$ref': '#/definitions/ModelInfoResults'}}, |
| 3612 | 'type': 'object'}, |
| 3613 | 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3614 | 'Result': {'$ref': '#/definitions/ModelStatusResults'}}, |
| 3615 | 'type': 'object'}, |
| 3616 | 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'}, |
| 3617 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3618 | 'type': 'object'}, |
| 3619 | 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'}, |
| 3620 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3621 | 'type': 'object'}, |
| 3622 | 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'}, |
| 3623 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3624 | 'type': 'object'}}, |
| 3625 | 'type': 'object'} |
| 3626 | |
| 3627 | |
| 3628 | @ReturnMapping(ModelInfo) |
| 3629 | async def CreateModel(self, cloud_tag, config, credential, name, owner_tag, region): |
| 3630 | ''' |
| 3631 | cloud_tag : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3632 | config : typing.Mapping[str, typing.Any] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3633 | credential : str |
| 3634 | name : str |
| 3635 | owner_tag : str |
| 3636 | region : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3637 | Returns -> typing.Union[_ForwardRef('Number'), str, typing.Sequence[~ModelMachineInfo], _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3638 | ''' |
| 3639 | # map input types to rpc msg |
| 3640 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3641 | msg = dict(type='ModelManager', |
| 3642 | request='CreateModel', |
| 3643 | version=3, |
| 3644 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3645 | _params['cloud-tag'] = cloud_tag |
| 3646 | _params['config'] = config |
| 3647 | _params['credential'] = credential |
| 3648 | _params['name'] = name |
| 3649 | _params['owner-tag'] = owner_tag |
| 3650 | _params['region'] = region |
| 3651 | reply = await self.rpc(msg) |
| 3652 | return reply |
| 3653 | |
| 3654 | |
| 3655 | |
| 3656 | @ReturnMapping(ErrorResults) |
| 3657 | async def DestroyModels(self, entities): |
| 3658 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3659 | entities : typing.Sequence[~Entity] |
| 3660 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3661 | ''' |
| 3662 | # map input types to rpc msg |
| 3663 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3664 | msg = dict(type='ModelManager', |
| 3665 | request='DestroyModels', |
| 3666 | version=3, |
| 3667 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3668 | _params['entities'] = entities |
| 3669 | reply = await self.rpc(msg) |
| 3670 | return reply |
| 3671 | |
| 3672 | |
| 3673 | |
| 3674 | @ReturnMapping(StringResults) |
| 3675 | async def DumpModels(self, entities, simplified): |
| 3676 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3677 | entities : typing.Sequence[~Entity] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3678 | simplified : bool |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3679 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3680 | ''' |
| 3681 | # map input types to rpc msg |
| 3682 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3683 | msg = dict(type='ModelManager', |
| 3684 | request='DumpModels', |
| 3685 | version=3, |
| 3686 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3687 | _params['entities'] = entities |
| 3688 | _params['simplified'] = simplified |
| 3689 | reply = await self.rpc(msg) |
| 3690 | return reply |
| 3691 | |
| 3692 | |
| 3693 | |
| 3694 | @ReturnMapping(MapResults) |
| 3695 | async def DumpModelsDB(self, entities): |
| 3696 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3697 | entities : typing.Sequence[~Entity] |
| 3698 | Returns -> typing.Sequence[~MapResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3699 | ''' |
| 3700 | # map input types to rpc msg |
| 3701 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3702 | msg = dict(type='ModelManager', |
| 3703 | request='DumpModelsDB', |
| 3704 | version=3, |
| 3705 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3706 | _params['entities'] = entities |
| 3707 | reply = await self.rpc(msg) |
| 3708 | return reply |
| 3709 | |
| 3710 | |
| 3711 | |
| 3712 | @ReturnMapping(UserModelList) |
| 3713 | async def ListModels(self, tag): |
| 3714 | ''' |
| 3715 | tag : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3716 | Returns -> typing.Sequence[~UserModel] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3717 | ''' |
| 3718 | # map input types to rpc msg |
| 3719 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3720 | msg = dict(type='ModelManager', |
| 3721 | request='ListModels', |
| 3722 | version=3, |
| 3723 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3724 | _params['tag'] = tag |
| 3725 | reply = await self.rpc(msg) |
| 3726 | return reply |
| 3727 | |
| 3728 | |
| 3729 | |
| 3730 | @ReturnMapping(ModelDefaultsResult) |
| 3731 | async def ModelDefaults(self): |
| 3732 | ''' |
| 3733 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3734 | Returns -> typing.Mapping[str, ~ModelDefaults] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3735 | ''' |
| 3736 | # map input types to rpc msg |
| 3737 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3738 | msg = dict(type='ModelManager', |
| 3739 | request='ModelDefaults', |
| 3740 | version=3, |
| 3741 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3742 | |
| 3743 | reply = await self.rpc(msg) |
| 3744 | return reply |
| 3745 | |
| 3746 | |
| 3747 | |
| 3748 | @ReturnMapping(ModelInfoResults) |
| 3749 | async def ModelInfo(self, entities): |
| 3750 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3751 | entities : typing.Sequence[~Entity] |
| 3752 | Returns -> typing.Sequence[~ModelInfoResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3753 | ''' |
| 3754 | # map input types to rpc msg |
| 3755 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3756 | msg = dict(type='ModelManager', |
| 3757 | request='ModelInfo', |
| 3758 | version=3, |
| 3759 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3760 | _params['entities'] = entities |
| 3761 | reply = await self.rpc(msg) |
| 3762 | return reply |
| 3763 | |
| 3764 | |
| 3765 | |
| 3766 | @ReturnMapping(ModelStatusResults) |
| 3767 | async def ModelStatus(self, entities): |
| 3768 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3769 | entities : typing.Sequence[~Entity] |
| 3770 | Returns -> typing.Sequence[~ModelStatus] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3771 | ''' |
| 3772 | # map input types to rpc msg |
| 3773 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3774 | msg = dict(type='ModelManager', |
| 3775 | request='ModelStatus', |
| 3776 | version=3, |
| 3777 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3778 | _params['entities'] = entities |
| 3779 | reply = await self.rpc(msg) |
| 3780 | return reply |
| 3781 | |
| 3782 | |
| 3783 | |
| 3784 | @ReturnMapping(ErrorResults) |
| 3785 | async def ModifyModelAccess(self, changes): |
| 3786 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3787 | changes : typing.Sequence[~ModifyModelAccess] |
| 3788 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3789 | ''' |
| 3790 | # map input types to rpc msg |
| 3791 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3792 | msg = dict(type='ModelManager', |
| 3793 | request='ModifyModelAccess', |
| 3794 | version=3, |
| 3795 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3796 | _params['changes'] = changes |
| 3797 | reply = await self.rpc(msg) |
| 3798 | return reply |
| 3799 | |
| 3800 | |
| 3801 | |
| 3802 | @ReturnMapping(ErrorResults) |
| 3803 | async def SetModelDefaults(self, config): |
| 3804 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3805 | config : typing.Sequence[~ModelDefaultValues] |
| 3806 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3807 | ''' |
| 3808 | # map input types to rpc msg |
| 3809 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3810 | msg = dict(type='ModelManager', |
| 3811 | request='SetModelDefaults', |
| 3812 | version=3, |
| 3813 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3814 | _params['config'] = config |
| 3815 | reply = await self.rpc(msg) |
| 3816 | return reply |
| 3817 | |
| 3818 | |
| 3819 | |
| 3820 | @ReturnMapping(ErrorResults) |
| 3821 | async def UnsetModelDefaults(self, keys): |
| 3822 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3823 | keys : typing.Sequence[~ModelUnsetKeys] |
| 3824 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3825 | ''' |
| 3826 | # map input types to rpc msg |
| 3827 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3828 | msg = dict(type='ModelManager', |
| 3829 | request='UnsetModelDefaults', |
| 3830 | version=3, |
| 3831 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3832 | _params['keys'] = keys |
| 3833 | reply = await self.rpc(msg) |
| 3834 | return reply |
| 3835 | |
| 3836 | |
| 3837 | |
| 3838 | class ProvisionerFacade(Type): |
| 3839 | name = 'Provisioner' |
| 3840 | version = 3 |
| 3841 | schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, |
| 3842 | 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, |
| 3843 | 'type': 'array'}, |
| 3844 | 'type': 'array'}}, |
| 3845 | 'required': ['servers'], |
| 3846 | 'type': 'object'}, |
| 3847 | 'Address': {'additionalProperties': False, |
| 3848 | 'properties': {'scope': {'type': 'string'}, |
| 3849 | 'space-name': {'type': 'string'}, |
| 3850 | 'type': {'type': 'string'}, |
| 3851 | 'value': {'type': 'string'}}, |
| 3852 | 'required': ['value', 'type', 'scope'], |
| 3853 | 'type': 'object'}, |
| 3854 | 'Binary': {'additionalProperties': False, |
| 3855 | 'properties': {'Arch': {'type': 'string'}, |
| 3856 | 'Number': {'$ref': '#/definitions/Number'}, |
| 3857 | 'Series': {'type': 'string'}}, |
| 3858 | 'required': ['Number', 'Series', 'Arch'], |
| 3859 | 'type': 'object'}, |
| 3860 | 'BytesResult': {'additionalProperties': False, |
| 3861 | 'properties': {'result': {'items': {'type': 'integer'}, |
| 3862 | 'type': 'array'}}, |
| 3863 | 'required': ['result'], |
| 3864 | 'type': 'object'}, |
| 3865 | 'CloudImageMetadata': {'additionalProperties': False, |
| 3866 | 'properties': {'arch': {'type': 'string'}, |
| 3867 | 'image-id': {'type': 'string'}, |
| 3868 | 'priority': {'type': 'integer'}, |
| 3869 | 'region': {'type': 'string'}, |
| 3870 | 'root-storage-size': {'type': 'integer'}, |
| 3871 | 'root-storage-type': {'type': 'string'}, |
| 3872 | 'series': {'type': 'string'}, |
| 3873 | 'source': {'type': 'string'}, |
| 3874 | 'stream': {'type': 'string'}, |
| 3875 | 'version': {'type': 'string'}, |
| 3876 | 'virt-type': {'type': 'string'}}, |
| 3877 | 'required': ['image-id', |
| 3878 | 'region', |
| 3879 | 'version', |
| 3880 | 'series', |
| 3881 | 'arch', |
| 3882 | 'source', |
| 3883 | 'priority'], |
| 3884 | 'type': 'object'}, |
| 3885 | 'ConstraintsResult': {'additionalProperties': False, |
| 3886 | 'properties': {'constraints': {'$ref': '#/definitions/Value'}, |
| 3887 | 'error': {'$ref': '#/definitions/Error'}}, |
| 3888 | 'required': ['constraints'], |
| 3889 | 'type': 'object'}, |
| 3890 | 'ConstraintsResults': {'additionalProperties': False, |
| 3891 | 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'}, |
| 3892 | 'type': 'array'}}, |
| 3893 | 'required': ['results'], |
| 3894 | 'type': 'object'}, |
| 3895 | 'ContainerConfig': {'additionalProperties': False, |
| 3896 | 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'}, |
| 3897 | 'apt-mirror': {'type': 'string'}, |
| 3898 | 'apt-proxy': {'$ref': '#/definitions/Settings'}, |
| 3899 | 'authorized-keys': {'type': 'string'}, |
| 3900 | 'provider-type': {'type': 'string'}, |
| 3901 | 'proxy': {'$ref': '#/definitions/Settings'}, |
| 3902 | 'ssl-hostname-verification': {'type': 'boolean'}}, |
| 3903 | 'required': ['provider-type', |
| 3904 | 'authorized-keys', |
| 3905 | 'ssl-hostname-verification', |
| 3906 | 'proxy', |
| 3907 | 'apt-proxy', |
| 3908 | 'apt-mirror', |
| 3909 | 'UpdateBehavior'], |
| 3910 | 'type': 'object'}, |
| 3911 | 'ContainerManagerConfig': {'additionalProperties': False, |
| 3912 | 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}}, |
| 3913 | 'type': 'object'}}, |
| 3914 | 'required': ['config'], |
| 3915 | 'type': 'object'}, |
| 3916 | 'ContainerManagerConfigParams': {'additionalProperties': False, |
| 3917 | 'properties': {'type': {'type': 'string'}}, |
| 3918 | 'required': ['type'], |
| 3919 | 'type': 'object'}, |
| 3920 | 'ControllerConfigResult': {'additionalProperties': False, |
| 3921 | 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 3922 | 'type': 'object'}}, |
| 3923 | 'type': 'object'}}, |
| 3924 | 'required': ['config'], |
| 3925 | 'type': 'object'}, |
| 3926 | 'DeviceBridgeInfo': {'additionalProperties': False, |
| 3927 | 'properties': {'bridge-name': {'type': 'string'}, |
| 3928 | 'host-device-name': {'type': 'string'}}, |
| 3929 | 'required': ['host-device-name', |
| 3930 | 'bridge-name'], |
| 3931 | 'type': 'object'}, |
| 3932 | 'DistributionGroupResult': {'additionalProperties': False, |
| 3933 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3934 | 'result': {'items': {'type': 'string'}, |
| 3935 | 'type': 'array'}}, |
| 3936 | 'required': ['result'], |
| 3937 | 'type': 'object'}, |
| 3938 | 'DistributionGroupResults': {'additionalProperties': False, |
| 3939 | 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'}, |
| 3940 | 'type': 'array'}}, |
| 3941 | 'required': ['results'], |
| 3942 | 'type': 'object'}, |
| 3943 | 'Entities': {'additionalProperties': False, |
| 3944 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 3945 | 'type': 'array'}}, |
| 3946 | 'required': ['entities'], |
| 3947 | 'type': 'object'}, |
| 3948 | 'Entity': {'additionalProperties': False, |
| 3949 | 'properties': {'tag': {'type': 'string'}}, |
| 3950 | 'required': ['tag'], |
| 3951 | 'type': 'object'}, |
| 3952 | 'EntityPassword': {'additionalProperties': False, |
| 3953 | 'properties': {'password': {'type': 'string'}, |
| 3954 | 'tag': {'type': 'string'}}, |
| 3955 | 'required': ['tag', 'password'], |
| 3956 | 'type': 'object'}, |
| 3957 | 'EntityPasswords': {'additionalProperties': False, |
| 3958 | 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'}, |
| 3959 | 'type': 'array'}}, |
| 3960 | 'required': ['changes'], |
| 3961 | 'type': 'object'}, |
| 3962 | 'EntityStatusArgs': {'additionalProperties': False, |
| 3963 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 3964 | 'type': 'object'}}, |
| 3965 | 'type': 'object'}, |
| 3966 | 'info': {'type': 'string'}, |
| 3967 | 'status': {'type': 'string'}, |
| 3968 | 'tag': {'type': 'string'}}, |
| 3969 | 'required': ['tag', |
| 3970 | 'status', |
| 3971 | 'info', |
| 3972 | 'data'], |
| 3973 | 'type': 'object'}, |
| 3974 | 'Error': {'additionalProperties': False, |
| 3975 | 'properties': {'code': {'type': 'string'}, |
| 3976 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 3977 | 'message': {'type': 'string'}}, |
| 3978 | 'required': ['message', 'code'], |
| 3979 | 'type': 'object'}, |
| 3980 | 'ErrorInfo': {'additionalProperties': False, |
| 3981 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 3982 | 'macaroon-path': {'type': 'string'}}, |
| 3983 | 'type': 'object'}, |
| 3984 | 'ErrorResult': {'additionalProperties': False, |
| 3985 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 3986 | 'type': 'object'}, |
| 3987 | 'ErrorResults': {'additionalProperties': False, |
| 3988 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 3989 | 'type': 'array'}}, |
| 3990 | 'required': ['results'], |
| 3991 | 'type': 'object'}, |
| 3992 | 'FindToolsParams': {'additionalProperties': False, |
| 3993 | 'properties': {'arch': {'type': 'string'}, |
| 3994 | 'major': {'type': 'integer'}, |
| 3995 | 'minor': {'type': 'integer'}, |
| 3996 | 'number': {'$ref': '#/definitions/Number'}, |
| 3997 | 'series': {'type': 'string'}}, |
| 3998 | 'required': ['number', |
| 3999 | 'major', |
| 4000 | 'minor', |
| 4001 | 'arch', |
| 4002 | 'series'], |
| 4003 | 'type': 'object'}, |
| 4004 | 'FindToolsResult': {'additionalProperties': False, |
| 4005 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 4006 | 'list': {'items': {'$ref': '#/definitions/Tools'}, |
| 4007 | 'type': 'array'}}, |
| 4008 | 'required': ['list'], |
| 4009 | 'type': 'object'}, |
| 4010 | 'HardwareCharacteristics': {'additionalProperties': False, |
| 4011 | 'properties': {'arch': {'type': 'string'}, |
| 4012 | 'availability-zone': {'type': 'string'}, |
| 4013 | 'cpu-cores': {'type': 'integer'}, |
| 4014 | 'cpu-power': {'type': 'integer'}, |
| 4015 | 'mem': {'type': 'integer'}, |
| 4016 | 'root-disk': {'type': 'integer'}, |
| 4017 | 'tags': {'items': {'type': 'string'}, |
| 4018 | 'type': 'array'}}, |
| 4019 | 'type': 'object'}, |
| 4020 | 'HostNetworkChange': {'additionalProperties': False, |
| 4021 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 4022 | 'new-bridges': {'items': {'$ref': '#/definitions/DeviceBridgeInfo'}, |
| 4023 | 'type': 'array'}, |
| 4024 | 'reconfigure-delay': {'type': 'integer'}}, |
| 4025 | 'required': ['new-bridges', |
| 4026 | 'reconfigure-delay'], |
| 4027 | 'type': 'object'}, |
| 4028 | 'HostNetworkChangeResults': {'additionalProperties': False, |
| 4029 | 'properties': {'results': {'items': {'$ref': '#/definitions/HostNetworkChange'}, |
| 4030 | 'type': 'array'}}, |
| 4031 | 'required': ['results'], |
| 4032 | 'type': 'object'}, |
| 4033 | 'HostPort': {'additionalProperties': False, |
| 4034 | 'properties': {'Address': {'$ref': '#/definitions/Address'}, |
| 4035 | 'port': {'type': 'integer'}}, |
| 4036 | 'required': ['Address', 'port'], |
| 4037 | 'type': 'object'}, |
| 4038 | 'InstanceInfo': {'additionalProperties': False, |
| 4039 | 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'}, |
| 4040 | 'instance-id': {'type': 'string'}, |
| 4041 | 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'}, |
| 4042 | 'type': 'array'}, |
| 4043 | 'nonce': {'type': 'string'}, |
| 4044 | 'tag': {'type': 'string'}, |
| 4045 | 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}}, |
| 4046 | 'type': 'object'}, |
| 4047 | 'volumes': {'items': {'$ref': '#/definitions/Volume'}, |
| 4048 | 'type': 'array'}}, |
| 4049 | 'required': ['tag', |
| 4050 | 'instance-id', |
| 4051 | 'nonce', |
| 4052 | 'characteristics', |
| 4053 | 'volumes', |
| 4054 | 'volume-attachments', |
| 4055 | 'network-config'], |
| 4056 | 'type': 'object'}, |
| 4057 | 'InstancesInfo': {'additionalProperties': False, |
| 4058 | 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'}, |
| 4059 | 'type': 'array'}}, |
| 4060 | 'required': ['machines'], |
| 4061 | 'type': 'object'}, |
| 4062 | 'LifeResult': {'additionalProperties': False, |
| 4063 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 4064 | 'life': {'type': 'string'}}, |
| 4065 | 'required': ['life'], |
| 4066 | 'type': 'object'}, |
| 4067 | 'LifeResults': {'additionalProperties': False, |
| 4068 | 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, |
| 4069 | 'type': 'array'}}, |
| 4070 | 'required': ['results'], |
| 4071 | 'type': 'object'}, |
| 4072 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 4073 | 'MachineContainers': {'additionalProperties': False, |
| 4074 | 'properties': {'container-types': {'items': {'type': 'string'}, |
| 4075 | 'type': 'array'}, |
| 4076 | 'machine-tag': {'type': 'string'}}, |
| 4077 | 'required': ['machine-tag', |
| 4078 | 'container-types'], |
| 4079 | 'type': 'object'}, |
| 4080 | 'MachineContainersParams': {'additionalProperties': False, |
| 4081 | 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'}, |
| 4082 | 'type': 'array'}}, |
| 4083 | 'required': ['params'], |
| 4084 | 'type': 'object'}, |
| 4085 | 'MachineNetworkConfigResult': {'additionalProperties': False, |
| 4086 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 4087 | 'info': {'items': {'$ref': '#/definitions/NetworkConfig'}, |
| 4088 | 'type': 'array'}}, |
| 4089 | 'required': ['info'], |
| 4090 | 'type': 'object'}, |
| 4091 | 'MachineNetworkConfigResults': {'additionalProperties': False, |
| 4092 | 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'}, |
| 4093 | 'type': 'array'}}, |
| 4094 | 'required': ['results'], |
| 4095 | 'type': 'object'}, |
| 4096 | 'ModelConfigResult': {'additionalProperties': False, |
| 4097 | 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 4098 | 'type': 'object'}}, |
| 4099 | 'type': 'object'}}, |
| 4100 | 'required': ['config'], |
| 4101 | 'type': 'object'}, |
| 4102 | 'NetworkConfig': {'additionalProperties': False, |
| 4103 | 'properties': {'address': {'type': 'string'}, |
| 4104 | 'cidr': {'type': 'string'}, |
| 4105 | 'config-type': {'type': 'string'}, |
| 4106 | 'device-index': {'type': 'integer'}, |
| 4107 | 'disabled': {'type': 'boolean'}, |
| 4108 | 'dns-search-domains': {'items': {'type': 'string'}, |
| 4109 | 'type': 'array'}, |
| 4110 | 'dns-servers': {'items': {'type': 'string'}, |
| 4111 | 'type': 'array'}, |
| 4112 | 'gateway-address': {'type': 'string'}, |
| 4113 | 'interface-name': {'type': 'string'}, |
| 4114 | 'interface-type': {'type': 'string'}, |
| 4115 | 'mac-address': {'type': 'string'}, |
| 4116 | 'mtu': {'type': 'integer'}, |
| 4117 | 'no-auto-start': {'type': 'boolean'}, |
| 4118 | 'parent-interface-name': {'type': 'string'}, |
| 4119 | 'provider-address-id': {'type': 'string'}, |
| 4120 | 'provider-id': {'type': 'string'}, |
| 4121 | 'provider-space-id': {'type': 'string'}, |
| 4122 | 'provider-subnet-id': {'type': 'string'}, |
| 4123 | 'provider-vlan-id': {'type': 'string'}, |
| 4124 | 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'}, |
| 4125 | 'type': 'array'}, |
| 4126 | 'vlan-tag': {'type': 'integer'}}, |
| 4127 | 'required': ['device-index', |
| 4128 | 'mac-address', |
| 4129 | 'cidr', |
| 4130 | 'mtu', |
| 4131 | 'provider-id', |
| 4132 | 'provider-subnet-id', |
| 4133 | 'provider-space-id', |
| 4134 | 'provider-address-id', |
| 4135 | 'provider-vlan-id', |
| 4136 | 'vlan-tag', |
| 4137 | 'interface-name', |
| 4138 | 'parent-interface-name', |
| 4139 | 'interface-type', |
| 4140 | 'disabled'], |
| 4141 | 'type': 'object'}, |
| 4142 | 'NetworkRoute': {'additionalProperties': False, |
| 4143 | 'properties': {'destination-cidr': {'type': 'string'}, |
| 4144 | 'gateway-ip': {'type': 'string'}, |
| 4145 | 'metric': {'type': 'integer'}}, |
| 4146 | 'required': ['destination-cidr', |
| 4147 | 'gateway-ip', |
| 4148 | 'metric'], |
| 4149 | 'type': 'object'}, |
| 4150 | 'NotifyWatchResult': {'additionalProperties': False, |
| 4151 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 4152 | 'error': {'$ref': '#/definitions/Error'}}, |
| 4153 | 'required': ['NotifyWatcherId'], |
| 4154 | 'type': 'object'}, |
| 4155 | 'Number': {'additionalProperties': False, |
| 4156 | 'properties': {'Build': {'type': 'integer'}, |
| 4157 | 'Major': {'type': 'integer'}, |
| 4158 | 'Minor': {'type': 'integer'}, |
| 4159 | 'Patch': {'type': 'integer'}, |
| 4160 | 'Tag': {'type': 'string'}}, |
| 4161 | 'required': ['Major', |
| 4162 | 'Minor', |
| 4163 | 'Tag', |
| 4164 | 'Patch', |
| 4165 | 'Build'], |
| 4166 | 'type': 'object'}, |
| 4167 | 'ProvisioningInfo': {'additionalProperties': False, |
| 4168 | 'properties': {'constraints': {'$ref': '#/definitions/Value'}, |
| 4169 | 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 4170 | 'type': 'object'}}, |
| 4171 | 'type': 'object'}, |
| 4172 | 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}}, |
| 4173 | 'type': 'object'}, |
| 4174 | 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'}, |
| 4175 | 'type': 'array'}, |
| 4176 | 'jobs': {'items': {'type': 'string'}, |
| 4177 | 'type': 'array'}, |
| 4178 | 'placement': {'type': 'string'}, |
| 4179 | 'series': {'type': 'string'}, |
| 4180 | 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'}, |
| 4181 | 'type': 'array'}}, |
| 4182 | 'type': 'object'}, |
| 4183 | 'tags': {'patternProperties': {'.*': {'type': 'string'}}, |
| 4184 | 'type': 'object'}, |
| 4185 | 'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachmentParams'}, |
| 4186 | 'type': 'array'}, |
| 4187 | 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'}, |
| 4188 | 'type': 'array'}}, |
| 4189 | 'required': ['constraints', |
| 4190 | 'series', |
| 4191 | 'placement', |
| 4192 | 'jobs'], |
| 4193 | 'type': 'object'}, |
| 4194 | 'ProvisioningInfoResult': {'additionalProperties': False, |
| 4195 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 4196 | 'result': {'$ref': '#/definitions/ProvisioningInfo'}}, |
| 4197 | 'required': ['result'], |
| 4198 | 'type': 'object'}, |
| 4199 | 'ProvisioningInfoResults': {'additionalProperties': False, |
| 4200 | 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'}, |
| 4201 | 'type': 'array'}}, |
| 4202 | 'required': ['results'], |
| 4203 | 'type': 'object'}, |
| 4204 | 'SetMachineNetworkConfig': {'additionalProperties': False, |
| 4205 | 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'}, |
| 4206 | 'type': 'array'}, |
| 4207 | 'tag': {'type': 'string'}}, |
| 4208 | 'required': ['tag', 'config'], |
| 4209 | 'type': 'object'}, |
| 4210 | 'SetStatus': {'additionalProperties': False, |
| 4211 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, |
| 4212 | 'type': 'array'}}, |
| 4213 | 'required': ['entities'], |
| 4214 | 'type': 'object'}, |
| 4215 | 'Settings': {'additionalProperties': False, |
| 4216 | 'properties': {'AutoNoProxy': {'type': 'string'}, |
| 4217 | 'Ftp': {'type': 'string'}, |
| 4218 | 'Http': {'type': 'string'}, |
| 4219 | 'Https': {'type': 'string'}, |
| 4220 | 'NoProxy': {'type': 'string'}}, |
| 4221 | 'required': ['Http', |
| 4222 | 'Https', |
| 4223 | 'Ftp', |
| 4224 | 'NoProxy', |
| 4225 | 'AutoNoProxy'], |
| 4226 | 'type': 'object'}, |
| 4227 | 'StatusResult': {'additionalProperties': False, |
| 4228 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 4229 | 'type': 'object'}}, |
| 4230 | 'type': 'object'}, |
| 4231 | 'error': {'$ref': '#/definitions/Error'}, |
| 4232 | 'id': {'type': 'string'}, |
| 4233 | 'info': {'type': 'string'}, |
| 4234 | 'life': {'type': 'string'}, |
| 4235 | 'since': {'format': 'date-time', |
| 4236 | 'type': 'string'}, |
| 4237 | 'status': {'type': 'string'}}, |
| 4238 | 'required': ['id', |
| 4239 | 'life', |
| 4240 | 'status', |
| 4241 | 'info', |
| 4242 | 'data', |
| 4243 | 'since'], |
| 4244 | 'type': 'object'}, |
| 4245 | 'StatusResults': {'additionalProperties': False, |
| 4246 | 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'}, |
| 4247 | 'type': 'array'}}, |
| 4248 | 'required': ['results'], |
| 4249 | 'type': 'object'}, |
| 4250 | 'StringResult': {'additionalProperties': False, |
| 4251 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 4252 | 'result': {'type': 'string'}}, |
| 4253 | 'required': ['result'], |
| 4254 | 'type': 'object'}, |
| 4255 | 'StringResults': {'additionalProperties': False, |
| 4256 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, |
| 4257 | 'type': 'array'}}, |
| 4258 | 'required': ['results'], |
| 4259 | 'type': 'object'}, |
| 4260 | 'StringsResult': {'additionalProperties': False, |
| 4261 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 4262 | 'result': {'items': {'type': 'string'}, |
| 4263 | 'type': 'array'}}, |
| 4264 | 'type': 'object'}, |
| 4265 | 'StringsWatchResult': {'additionalProperties': False, |
| 4266 | 'properties': {'changes': {'items': {'type': 'string'}, |
| 4267 | 'type': 'array'}, |
| 4268 | 'error': {'$ref': '#/definitions/Error'}, |
| 4269 | 'watcher-id': {'type': 'string'}}, |
| 4270 | 'required': ['watcher-id'], |
| 4271 | 'type': 'object'}, |
| 4272 | 'StringsWatchResults': {'additionalProperties': False, |
| 4273 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, |
| 4274 | 'type': 'array'}}, |
| 4275 | 'required': ['results'], |
| 4276 | 'type': 'object'}, |
| 4277 | 'Tools': {'additionalProperties': False, |
| 4278 | 'properties': {'sha256': {'type': 'string'}, |
| 4279 | 'size': {'type': 'integer'}, |
| 4280 | 'url': {'type': 'string'}, |
| 4281 | 'version': {'$ref': '#/definitions/Binary'}}, |
| 4282 | 'required': ['version', 'url', 'size'], |
| 4283 | 'type': 'object'}, |
| 4284 | 'ToolsResult': {'additionalProperties': False, |
| 4285 | 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'}, |
| 4286 | 'error': {'$ref': '#/definitions/Error'}, |
| 4287 | 'tools': {'items': {'$ref': '#/definitions/Tools'}, |
| 4288 | 'type': 'array'}}, |
| 4289 | 'required': ['tools', |
| 4290 | 'disable-ssl-hostname-verification'], |
| 4291 | 'type': 'object'}, |
| 4292 | 'ToolsResults': {'additionalProperties': False, |
| 4293 | 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'}, |
| 4294 | 'type': 'array'}}, |
| 4295 | 'required': ['results'], |
| 4296 | 'type': 'object'}, |
| 4297 | 'UpdateBehavior': {'additionalProperties': False, |
| 4298 | 'properties': {'enable-os-refresh-update': {'type': 'boolean'}, |
| 4299 | 'enable-os-upgrade': {'type': 'boolean'}}, |
| 4300 | 'required': ['enable-os-refresh-update', |
| 4301 | 'enable-os-upgrade'], |
| 4302 | 'type': 'object'}, |
| 4303 | 'Value': {'additionalProperties': False, |
| 4304 | 'properties': {'arch': {'type': 'string'}, |
| 4305 | 'container': {'type': 'string'}, |
| 4306 | 'cores': {'type': 'integer'}, |
| 4307 | 'cpu-power': {'type': 'integer'}, |
| 4308 | 'instance-type': {'type': 'string'}, |
| 4309 | 'mem': {'type': 'integer'}, |
| 4310 | 'root-disk': {'type': 'integer'}, |
| 4311 | 'spaces': {'items': {'type': 'string'}, |
| 4312 | 'type': 'array'}, |
| 4313 | 'tags': {'items': {'type': 'string'}, |
| 4314 | 'type': 'array'}, |
| 4315 | 'virt-type': {'type': 'string'}}, |
| 4316 | 'type': 'object'}, |
| 4317 | 'Volume': {'additionalProperties': False, |
| 4318 | 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, |
| 4319 | 'volume-tag': {'type': 'string'}}, |
| 4320 | 'required': ['volume-tag', 'info'], |
| 4321 | 'type': 'object'}, |
| 4322 | 'VolumeAttachmentInfo': {'additionalProperties': False, |
| 4323 | 'properties': {'bus-address': {'type': 'string'}, |
| 4324 | 'device-link': {'type': 'string'}, |
| 4325 | 'device-name': {'type': 'string'}, |
| 4326 | 'read-only': {'type': 'boolean'}}, |
| 4327 | 'type': 'object'}, |
| 4328 | 'VolumeAttachmentParams': {'additionalProperties': False, |
| 4329 | 'properties': {'instance-id': {'type': 'string'}, |
| 4330 | 'machine-tag': {'type': 'string'}, |
| 4331 | 'provider': {'type': 'string'}, |
| 4332 | 'read-only': {'type': 'boolean'}, |
| 4333 | 'volume-id': {'type': 'string'}, |
| 4334 | 'volume-tag': {'type': 'string'}}, |
| 4335 | 'required': ['volume-tag', |
| 4336 | 'machine-tag', |
| 4337 | 'provider'], |
| 4338 | 'type': 'object'}, |
| 4339 | 'VolumeInfo': {'additionalProperties': False, |
| 4340 | 'properties': {'hardware-id': {'type': 'string'}, |
| 4341 | 'persistent': {'type': 'boolean'}, |
| 4342 | 'pool': {'type': 'string'}, |
| 4343 | 'size': {'type': 'integer'}, |
| 4344 | 'volume-id': {'type': 'string'}, |
| 4345 | 'wwn': {'type': 'string'}}, |
| 4346 | 'required': ['volume-id', 'size', 'persistent'], |
| 4347 | 'type': 'object'}, |
| 4348 | 'VolumeParams': {'additionalProperties': False, |
| 4349 | 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'}, |
| 4350 | 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, |
| 4351 | 'type': 'object'}}, |
| 4352 | 'type': 'object'}, |
| 4353 | 'provider': {'type': 'string'}, |
| 4354 | 'size': {'type': 'integer'}, |
| 4355 | 'tags': {'patternProperties': {'.*': {'type': 'string'}}, |
| 4356 | 'type': 'object'}, |
| 4357 | 'volume-tag': {'type': 'string'}}, |
| 4358 | 'required': ['volume-tag', |
| 4359 | 'size', |
| 4360 | 'provider'], |
| 4361 | 'type': 'object'}, |
| 4362 | 'WatchContainer': {'additionalProperties': False, |
| 4363 | 'properties': {'container-type': {'type': 'string'}, |
| 4364 | 'machine-tag': {'type': 'string'}}, |
| 4365 | 'required': ['machine-tag', |
| 4366 | 'container-type'], |
| 4367 | 'type': 'object'}, |
| 4368 | 'WatchContainers': {'additionalProperties': False, |
| 4369 | 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'}, |
| 4370 | 'type': 'array'}}, |
| 4371 | 'required': ['params'], |
| 4372 | 'type': 'object'}}, |
| 4373 | 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, |
| 4374 | 'type': 'object'}, |
| 4375 | 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, |
| 4376 | 'type': 'object'}, |
| 4377 | 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, |
| 4378 | 'type': 'object'}, |
| 4379 | 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4380 | 'Result': {'$ref': '#/definitions/ConstraintsResults'}}, |
| 4381 | 'type': 'object'}, |
| 4382 | 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}}, |
| 4383 | 'type': 'object'}, |
| 4384 | 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'}, |
| 4385 | 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}}, |
| 4386 | 'type': 'object'}, |
| 4387 | 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, |
| 4388 | 'type': 'object'}, |
| 4389 | 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4390 | 'Result': {'$ref': '#/definitions/DistributionGroupResults'}}, |
| 4391 | 'type': 'object'}, |
| 4392 | 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4393 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 4394 | 'type': 'object'}, |
| 4395 | 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'}, |
| 4396 | 'Result': {'$ref': '#/definitions/FindToolsResult'}}, |
| 4397 | 'type': 'object'}, |
| 4398 | 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4399 | 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}}, |
| 4400 | 'type': 'object'}, |
| 4401 | 'HostChangesForContainers': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4402 | 'Result': {'$ref': '#/definitions/HostNetworkChangeResults'}}, |
| 4403 | 'type': 'object'}, |
| 4404 | 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4405 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 4406 | 'type': 'object'}, |
| 4407 | 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4408 | 'Result': {'$ref': '#/definitions/StatusResults'}}, |
| 4409 | 'type': 'object'}, |
| 4410 | 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4411 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 4412 | 'type': 'object'}, |
| 4413 | 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}}, |
| 4414 | 'type': 'object'}, |
| 4415 | 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4416 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 4417 | 'type': 'object'}, |
| 4418 | 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, |
| 4419 | 'type': 'object'}, |
| 4420 | 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, |
| 4421 | 'type': 'object'}, |
| 4422 | 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4423 | 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}}, |
| 4424 | 'type': 'object'}, |
| 4425 | 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4426 | 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}}, |
| 4427 | 'type': 'object'}, |
| 4428 | 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4429 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 4430 | 'type': 'object'}, |
| 4431 | 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4432 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 4433 | 'type': 'object'}, |
| 4434 | 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4435 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 4436 | 'type': 'object'}, |
| 4437 | 'SetHostMachineNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}}, |
| 4438 | 'type': 'object'}, |
| 4439 | 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'}, |
| 4440 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 4441 | 'type': 'object'}, |
| 4442 | 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 4443 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 4444 | 'type': 'object'}, |
| 4445 | 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}}, |
| 4446 | 'type': 'object'}, |
| 4447 | 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, |
| 4448 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 4449 | 'type': 'object'}, |
| 4450 | 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4451 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 4452 | 'type': 'object'}, |
| 4453 | 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 4454 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 4455 | 'type': 'object'}, |
| 4456 | 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'}, |
| 4457 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 4458 | 'type': 'object'}, |
| 4459 | 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, |
| 4460 | 'type': 'object'}, |
| 4461 | 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4462 | 'Result': {'$ref': '#/definitions/StatusResults'}}, |
| 4463 | 'type': 'object'}, |
| 4464 | 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4465 | 'Result': {'$ref': '#/definitions/ToolsResults'}}, |
| 4466 | 'type': 'object'}, |
| 4467 | 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 4468 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 4469 | 'type': 'object'}, |
| 4470 | 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 4471 | 'type': 'object'}, |
| 4472 | 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'}, |
| 4473 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 4474 | 'type': 'object'}, |
| 4475 | 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'}, |
| 4476 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 4477 | 'type': 'object'}, |
| 4478 | 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 4479 | 'type': 'object'}, |
| 4480 | 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 4481 | 'type': 'object'}, |
| 4482 | 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, |
| 4483 | 'type': 'object'}}, |
| 4484 | 'type': 'object'} |
| 4485 | |
| 4486 | |
| 4487 | @ReturnMapping(StringsResult) |
| 4488 | async def APIAddresses(self): |
| 4489 | ''' |
| 4490 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4491 | Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4492 | ''' |
| 4493 | # map input types to rpc msg |
| 4494 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4495 | msg = dict(type='Provisioner', |
| 4496 | request='APIAddresses', |
| 4497 | version=3, |
| 4498 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4499 | |
| 4500 | reply = await self.rpc(msg) |
| 4501 | return reply |
| 4502 | |
| 4503 | |
| 4504 | |
| 4505 | @ReturnMapping(APIHostPortsResult) |
| 4506 | async def APIHostPorts(self): |
| 4507 | ''' |
| 4508 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4509 | Returns -> typing.Sequence[~HostPort] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4510 | ''' |
| 4511 | # map input types to rpc msg |
| 4512 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4513 | msg = dict(type='Provisioner', |
| 4514 | request='APIHostPorts', |
| 4515 | version=3, |
| 4516 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4517 | |
| 4518 | reply = await self.rpc(msg) |
| 4519 | return reply |
| 4520 | |
| 4521 | |
| 4522 | |
| 4523 | @ReturnMapping(BytesResult) |
| 4524 | async def CACert(self): |
| 4525 | ''' |
| 4526 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4527 | Returns -> typing.Sequence[int] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4528 | ''' |
| 4529 | # map input types to rpc msg |
| 4530 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4531 | msg = dict(type='Provisioner', |
| 4532 | request='CACert', |
| 4533 | version=3, |
| 4534 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4535 | |
| 4536 | reply = await self.rpc(msg) |
| 4537 | return reply |
| 4538 | |
| 4539 | |
| 4540 | |
| 4541 | @ReturnMapping(ConstraintsResults) |
| 4542 | async def Constraints(self, entities): |
| 4543 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4544 | entities : typing.Sequence[~Entity] |
| 4545 | Returns -> typing.Sequence[~ConstraintsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4546 | ''' |
| 4547 | # map input types to rpc msg |
| 4548 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4549 | msg = dict(type='Provisioner', |
| 4550 | request='Constraints', |
| 4551 | version=3, |
| 4552 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4553 | _params['entities'] = entities |
| 4554 | reply = await self.rpc(msg) |
| 4555 | return reply |
| 4556 | |
| 4557 | |
| 4558 | |
| 4559 | @ReturnMapping(ContainerConfig) |
| 4560 | async def ContainerConfig(self): |
| 4561 | ''' |
| 4562 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4563 | Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), bool] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4564 | ''' |
| 4565 | # map input types to rpc msg |
| 4566 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4567 | msg = dict(type='Provisioner', |
| 4568 | request='ContainerConfig', |
| 4569 | version=3, |
| 4570 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4571 | |
| 4572 | reply = await self.rpc(msg) |
| 4573 | return reply |
| 4574 | |
| 4575 | |
| 4576 | |
| 4577 | @ReturnMapping(ContainerManagerConfig) |
| 4578 | async def ContainerManagerConfig(self, type_): |
| 4579 | ''' |
| 4580 | type_ : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4581 | Returns -> typing.Mapping[str, str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4582 | ''' |
| 4583 | # map input types to rpc msg |
| 4584 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4585 | msg = dict(type='Provisioner', |
| 4586 | request='ContainerManagerConfig', |
| 4587 | version=3, |
| 4588 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4589 | _params['type'] = type_ |
| 4590 | reply = await self.rpc(msg) |
| 4591 | return reply |
| 4592 | |
| 4593 | |
| 4594 | |
| 4595 | @ReturnMapping(ControllerConfigResult) |
| 4596 | async def ControllerConfig(self): |
| 4597 | ''' |
| 4598 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4599 | Returns -> typing.Mapping[str, typing.Any] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4600 | ''' |
| 4601 | # map input types to rpc msg |
| 4602 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4603 | msg = dict(type='Provisioner', |
| 4604 | request='ControllerConfig', |
| 4605 | version=3, |
| 4606 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4607 | |
| 4608 | reply = await self.rpc(msg) |
| 4609 | return reply |
| 4610 | |
| 4611 | |
| 4612 | |
| 4613 | @ReturnMapping(DistributionGroupResults) |
| 4614 | async def DistributionGroup(self, entities): |
| 4615 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4616 | entities : typing.Sequence[~Entity] |
| 4617 | Returns -> typing.Sequence[~DistributionGroupResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4618 | ''' |
| 4619 | # map input types to rpc msg |
| 4620 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4621 | msg = dict(type='Provisioner', |
| 4622 | request='DistributionGroup', |
| 4623 | version=3, |
| 4624 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4625 | _params['entities'] = entities |
| 4626 | reply = await self.rpc(msg) |
| 4627 | return reply |
| 4628 | |
| 4629 | |
| 4630 | |
| 4631 | @ReturnMapping(ErrorResults) |
| 4632 | async def EnsureDead(self, entities): |
| 4633 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4634 | entities : typing.Sequence[~Entity] |
| 4635 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4636 | ''' |
| 4637 | # map input types to rpc msg |
| 4638 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4639 | msg = dict(type='Provisioner', |
| 4640 | request='EnsureDead', |
| 4641 | version=3, |
| 4642 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4643 | _params['entities'] = entities |
| 4644 | reply = await self.rpc(msg) |
| 4645 | return reply |
| 4646 | |
| 4647 | |
| 4648 | |
| 4649 | @ReturnMapping(FindToolsResult) |
| 4650 | async def FindTools(self, arch, major, minor, number, series): |
| 4651 | ''' |
| 4652 | arch : str |
| 4653 | major : int |
| 4654 | minor : int |
| 4655 | number : Number |
| 4656 | series : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4657 | Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4658 | ''' |
| 4659 | # map input types to rpc msg |
| 4660 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4661 | msg = dict(type='Provisioner', |
| 4662 | request='FindTools', |
| 4663 | version=3, |
| 4664 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4665 | _params['arch'] = arch |
| 4666 | _params['major'] = major |
| 4667 | _params['minor'] = minor |
| 4668 | _params['number'] = number |
| 4669 | _params['series'] = series |
| 4670 | reply = await self.rpc(msg) |
| 4671 | return reply |
| 4672 | |
| 4673 | |
| 4674 | |
| 4675 | @ReturnMapping(MachineNetworkConfigResults) |
| 4676 | async def GetContainerInterfaceInfo(self, entities): |
| 4677 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4678 | entities : typing.Sequence[~Entity] |
| 4679 | Returns -> typing.Sequence[~MachineNetworkConfigResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4680 | ''' |
| 4681 | # map input types to rpc msg |
| 4682 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4683 | msg = dict(type='Provisioner', |
| 4684 | request='GetContainerInterfaceInfo', |
| 4685 | version=3, |
| 4686 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4687 | _params['entities'] = entities |
| 4688 | reply = await self.rpc(msg) |
| 4689 | return reply |
| 4690 | |
| 4691 | |
| 4692 | |
| 4693 | @ReturnMapping(HostNetworkChangeResults) |
| 4694 | async def HostChangesForContainers(self, entities): |
| 4695 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4696 | entities : typing.Sequence[~Entity] |
| 4697 | Returns -> typing.Sequence[~HostNetworkChange] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4698 | ''' |
| 4699 | # map input types to rpc msg |
| 4700 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4701 | msg = dict(type='Provisioner', |
| 4702 | request='HostChangesForContainers', |
| 4703 | version=3, |
| 4704 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4705 | _params['entities'] = entities |
| 4706 | reply = await self.rpc(msg) |
| 4707 | return reply |
| 4708 | |
| 4709 | |
| 4710 | |
| 4711 | @ReturnMapping(StringResults) |
| 4712 | async def InstanceId(self, entities): |
| 4713 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4714 | entities : typing.Sequence[~Entity] |
| 4715 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4716 | ''' |
| 4717 | # map input types to rpc msg |
| 4718 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4719 | msg = dict(type='Provisioner', |
| 4720 | request='InstanceId', |
| 4721 | version=3, |
| 4722 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4723 | _params['entities'] = entities |
| 4724 | reply = await self.rpc(msg) |
| 4725 | return reply |
| 4726 | |
| 4727 | |
| 4728 | |
| 4729 | @ReturnMapping(StatusResults) |
| 4730 | async def InstanceStatus(self, entities): |
| 4731 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4732 | entities : typing.Sequence[~Entity] |
| 4733 | Returns -> typing.Sequence[~StatusResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4734 | ''' |
| 4735 | # map input types to rpc msg |
| 4736 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4737 | msg = dict(type='Provisioner', |
| 4738 | request='InstanceStatus', |
| 4739 | version=3, |
| 4740 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4741 | _params['entities'] = entities |
| 4742 | reply = await self.rpc(msg) |
| 4743 | return reply |
| 4744 | |
| 4745 | |
| 4746 | |
| 4747 | @ReturnMapping(LifeResults) |
| 4748 | async def Life(self, entities): |
| 4749 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4750 | entities : typing.Sequence[~Entity] |
| 4751 | Returns -> typing.Sequence[~LifeResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4752 | ''' |
| 4753 | # map input types to rpc msg |
| 4754 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4755 | msg = dict(type='Provisioner', |
| 4756 | request='Life', |
| 4757 | version=3, |
| 4758 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4759 | _params['entities'] = entities |
| 4760 | reply = await self.rpc(msg) |
| 4761 | return reply |
| 4762 | |
| 4763 | |
| 4764 | |
| 4765 | @ReturnMapping(StatusResults) |
| 4766 | async def MachinesWithTransientErrors(self): |
| 4767 | ''' |
| 4768 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4769 | Returns -> typing.Sequence[~StatusResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4770 | ''' |
| 4771 | # map input types to rpc msg |
| 4772 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4773 | msg = dict(type='Provisioner', |
| 4774 | request='MachinesWithTransientErrors', |
| 4775 | version=3, |
| 4776 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4777 | |
| 4778 | reply = await self.rpc(msg) |
| 4779 | return reply |
| 4780 | |
| 4781 | |
| 4782 | |
| 4783 | @ReturnMapping(ErrorResults) |
| 4784 | async def MarkMachinesForRemoval(self, entities): |
| 4785 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4786 | entities : typing.Sequence[~Entity] |
| 4787 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4788 | ''' |
| 4789 | # map input types to rpc msg |
| 4790 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4791 | msg = dict(type='Provisioner', |
| 4792 | request='MarkMachinesForRemoval', |
| 4793 | version=3, |
| 4794 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4795 | _params['entities'] = entities |
| 4796 | reply = await self.rpc(msg) |
| 4797 | return reply |
| 4798 | |
| 4799 | |
| 4800 | |
| 4801 | @ReturnMapping(ModelConfigResult) |
| 4802 | async def ModelConfig(self): |
| 4803 | ''' |
| 4804 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4805 | Returns -> typing.Mapping[str, typing.Any] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4806 | ''' |
| 4807 | # map input types to rpc msg |
| 4808 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4809 | msg = dict(type='Provisioner', |
| 4810 | request='ModelConfig', |
| 4811 | version=3, |
| 4812 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4813 | |
| 4814 | reply = await self.rpc(msg) |
| 4815 | return reply |
| 4816 | |
| 4817 | |
| 4818 | |
| 4819 | @ReturnMapping(StringResult) |
| 4820 | async def ModelUUID(self): |
| 4821 | ''' |
| 4822 | |
| 4823 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 4824 | ''' |
| 4825 | # map input types to rpc msg |
| 4826 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4827 | msg = dict(type='Provisioner', |
| 4828 | request='ModelUUID', |
| 4829 | version=3, |
| 4830 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4831 | |
| 4832 | reply = await self.rpc(msg) |
| 4833 | return reply |
| 4834 | |
| 4835 | |
| 4836 | |
| 4837 | @ReturnMapping(MachineNetworkConfigResults) |
| 4838 | async def PrepareContainerInterfaceInfo(self, entities): |
| 4839 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4840 | entities : typing.Sequence[~Entity] |
| 4841 | Returns -> typing.Sequence[~MachineNetworkConfigResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4842 | ''' |
| 4843 | # map input types to rpc msg |
| 4844 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4845 | msg = dict(type='Provisioner', |
| 4846 | request='PrepareContainerInterfaceInfo', |
| 4847 | version=3, |
| 4848 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4849 | _params['entities'] = entities |
| 4850 | reply = await self.rpc(msg) |
| 4851 | return reply |
| 4852 | |
| 4853 | |
| 4854 | |
| 4855 | @ReturnMapping(ProvisioningInfoResults) |
| 4856 | async def ProvisioningInfo(self, entities): |
| 4857 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4858 | entities : typing.Sequence[~Entity] |
| 4859 | Returns -> typing.Sequence[~ProvisioningInfoResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4860 | ''' |
| 4861 | # map input types to rpc msg |
| 4862 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4863 | msg = dict(type='Provisioner', |
| 4864 | request='ProvisioningInfo', |
| 4865 | version=3, |
| 4866 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4867 | _params['entities'] = entities |
| 4868 | reply = await self.rpc(msg) |
| 4869 | return reply |
| 4870 | |
| 4871 | |
| 4872 | |
| 4873 | @ReturnMapping(ErrorResults) |
| 4874 | async def ReleaseContainerAddresses(self, entities): |
| 4875 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4876 | entities : typing.Sequence[~Entity] |
| 4877 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4878 | ''' |
| 4879 | # map input types to rpc msg |
| 4880 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4881 | msg = dict(type='Provisioner', |
| 4882 | request='ReleaseContainerAddresses', |
| 4883 | version=3, |
| 4884 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4885 | _params['entities'] = entities |
| 4886 | reply = await self.rpc(msg) |
| 4887 | return reply |
| 4888 | |
| 4889 | |
| 4890 | |
| 4891 | @ReturnMapping(ErrorResults) |
| 4892 | async def Remove(self, entities): |
| 4893 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4894 | entities : typing.Sequence[~Entity] |
| 4895 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4896 | ''' |
| 4897 | # map input types to rpc msg |
| 4898 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4899 | msg = dict(type='Provisioner', |
| 4900 | request='Remove', |
| 4901 | version=3, |
| 4902 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4903 | _params['entities'] = entities |
| 4904 | reply = await self.rpc(msg) |
| 4905 | return reply |
| 4906 | |
| 4907 | |
| 4908 | |
| 4909 | @ReturnMapping(StringResults) |
| 4910 | async def Series(self, entities): |
| 4911 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4912 | entities : typing.Sequence[~Entity] |
| 4913 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4914 | ''' |
| 4915 | # map input types to rpc msg |
| 4916 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4917 | msg = dict(type='Provisioner', |
| 4918 | request='Series', |
| 4919 | version=3, |
| 4920 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4921 | _params['entities'] = entities |
| 4922 | reply = await self.rpc(msg) |
| 4923 | return reply |
| 4924 | |
| 4925 | |
| 4926 | |
| 4927 | @ReturnMapping(None) |
| 4928 | async def SetHostMachineNetworkConfig(self, config, tag): |
| 4929 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4930 | config : typing.Sequence[~NetworkConfig] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4931 | tag : str |
| 4932 | Returns -> None |
| 4933 | ''' |
| 4934 | # map input types to rpc msg |
| 4935 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4936 | msg = dict(type='Provisioner', |
| 4937 | request='SetHostMachineNetworkConfig', |
| 4938 | version=3, |
| 4939 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4940 | _params['config'] = config |
| 4941 | _params['tag'] = tag |
| 4942 | reply = await self.rpc(msg) |
| 4943 | return reply |
| 4944 | |
| 4945 | |
| 4946 | |
| 4947 | @ReturnMapping(ErrorResults) |
| 4948 | async def SetInstanceInfo(self, machines): |
| 4949 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4950 | machines : typing.Sequence[~InstanceInfo] |
| 4951 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4952 | ''' |
| 4953 | # map input types to rpc msg |
| 4954 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4955 | msg = dict(type='Provisioner', |
| 4956 | request='SetInstanceInfo', |
| 4957 | version=3, |
| 4958 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4959 | _params['machines'] = machines |
| 4960 | reply = await self.rpc(msg) |
| 4961 | return reply |
| 4962 | |
| 4963 | |
| 4964 | |
| 4965 | @ReturnMapping(ErrorResults) |
| 4966 | async def SetInstanceStatus(self, entities): |
| 4967 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4968 | entities : typing.Sequence[~EntityStatusArgs] |
| 4969 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4970 | ''' |
| 4971 | # map input types to rpc msg |
| 4972 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4973 | msg = dict(type='Provisioner', |
| 4974 | request='SetInstanceStatus', |
| 4975 | version=3, |
| 4976 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4977 | _params['entities'] = entities |
| 4978 | reply = await self.rpc(msg) |
| 4979 | return reply |
| 4980 | |
| 4981 | |
| 4982 | |
| 4983 | @ReturnMapping(None) |
| 4984 | async def SetObservedNetworkConfig(self, config, tag): |
| 4985 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4986 | config : typing.Sequence[~NetworkConfig] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4987 | tag : str |
| 4988 | Returns -> None |
| 4989 | ''' |
| 4990 | # map input types to rpc msg |
| 4991 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4992 | msg = dict(type='Provisioner', |
| 4993 | request='SetObservedNetworkConfig', |
| 4994 | version=3, |
| 4995 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4996 | _params['config'] = config |
| 4997 | _params['tag'] = tag |
| 4998 | reply = await self.rpc(msg) |
| 4999 | return reply |
| 5000 | |
| 5001 | |
| 5002 | |
| 5003 | @ReturnMapping(ErrorResults) |
| 5004 | async def SetPasswords(self, changes): |
| 5005 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5006 | changes : typing.Sequence[~EntityPassword] |
| 5007 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5008 | ''' |
| 5009 | # map input types to rpc msg |
| 5010 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5011 | msg = dict(type='Provisioner', |
| 5012 | request='SetPasswords', |
| 5013 | version=3, |
| 5014 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5015 | _params['changes'] = changes |
| 5016 | reply = await self.rpc(msg) |
| 5017 | return reply |
| 5018 | |
| 5019 | |
| 5020 | |
| 5021 | @ReturnMapping(ErrorResults) |
| 5022 | async def SetProviderNetworkConfig(self, entities): |
| 5023 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5024 | entities : typing.Sequence[~Entity] |
| 5025 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5026 | ''' |
| 5027 | # map input types to rpc msg |
| 5028 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5029 | msg = dict(type='Provisioner', |
| 5030 | request='SetProviderNetworkConfig', |
| 5031 | version=3, |
| 5032 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5033 | _params['entities'] = entities |
| 5034 | reply = await self.rpc(msg) |
| 5035 | return reply |
| 5036 | |
| 5037 | |
| 5038 | |
| 5039 | @ReturnMapping(ErrorResults) |
| 5040 | async def SetStatus(self, entities): |
| 5041 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5042 | entities : typing.Sequence[~EntityStatusArgs] |
| 5043 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5044 | ''' |
| 5045 | # map input types to rpc msg |
| 5046 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5047 | msg = dict(type='Provisioner', |
| 5048 | request='SetStatus', |
| 5049 | version=3, |
| 5050 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5051 | _params['entities'] = entities |
| 5052 | reply = await self.rpc(msg) |
| 5053 | return reply |
| 5054 | |
| 5055 | |
| 5056 | |
| 5057 | @ReturnMapping(ErrorResults) |
| 5058 | async def SetSupportedContainers(self, params): |
| 5059 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5060 | params : typing.Sequence[~MachineContainers] |
| 5061 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5062 | ''' |
| 5063 | # map input types to rpc msg |
| 5064 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5065 | msg = dict(type='Provisioner', |
| 5066 | request='SetSupportedContainers', |
| 5067 | version=3, |
| 5068 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5069 | _params['params'] = params |
| 5070 | reply = await self.rpc(msg) |
| 5071 | return reply |
| 5072 | |
| 5073 | |
| 5074 | |
| 5075 | @ReturnMapping(StringsResult) |
| 5076 | async def StateAddresses(self): |
| 5077 | ''' |
| 5078 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5079 | Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5080 | ''' |
| 5081 | # map input types to rpc msg |
| 5082 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5083 | msg = dict(type='Provisioner', |
| 5084 | request='StateAddresses', |
| 5085 | version=3, |
| 5086 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5087 | |
| 5088 | reply = await self.rpc(msg) |
| 5089 | return reply |
| 5090 | |
| 5091 | |
| 5092 | |
| 5093 | @ReturnMapping(StatusResults) |
| 5094 | async def Status(self, entities): |
| 5095 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5096 | entities : typing.Sequence[~Entity] |
| 5097 | Returns -> typing.Sequence[~StatusResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5098 | ''' |
| 5099 | # map input types to rpc msg |
| 5100 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5101 | msg = dict(type='Provisioner', |
| 5102 | request='Status', |
| 5103 | version=3, |
| 5104 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5105 | _params['entities'] = entities |
| 5106 | reply = await self.rpc(msg) |
| 5107 | return reply |
| 5108 | |
| 5109 | |
| 5110 | |
| 5111 | @ReturnMapping(ToolsResults) |
| 5112 | async def Tools(self, entities): |
| 5113 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5114 | entities : typing.Sequence[~Entity] |
| 5115 | Returns -> typing.Sequence[~ToolsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5116 | ''' |
| 5117 | # map input types to rpc msg |
| 5118 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5119 | msg = dict(type='Provisioner', |
| 5120 | request='Tools', |
| 5121 | version=3, |
| 5122 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5123 | _params['entities'] = entities |
| 5124 | reply = await self.rpc(msg) |
| 5125 | return reply |
| 5126 | |
| 5127 | |
| 5128 | |
| 5129 | @ReturnMapping(ErrorResults) |
| 5130 | async def UpdateStatus(self, entities): |
| 5131 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5132 | entities : typing.Sequence[~EntityStatusArgs] |
| 5133 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5134 | ''' |
| 5135 | # map input types to rpc msg |
| 5136 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5137 | msg = dict(type='Provisioner', |
| 5138 | request='UpdateStatus', |
| 5139 | version=3, |
| 5140 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5141 | _params['entities'] = entities |
| 5142 | reply = await self.rpc(msg) |
| 5143 | return reply |
| 5144 | |
| 5145 | |
| 5146 | |
| 5147 | @ReturnMapping(NotifyWatchResult) |
| 5148 | async def WatchAPIHostPorts(self): |
| 5149 | ''' |
| 5150 | |
| 5151 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 5152 | ''' |
| 5153 | # map input types to rpc msg |
| 5154 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5155 | msg = dict(type='Provisioner', |
| 5156 | request='WatchAPIHostPorts', |
| 5157 | version=3, |
| 5158 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5159 | |
| 5160 | reply = await self.rpc(msg) |
| 5161 | return reply |
| 5162 | |
| 5163 | |
| 5164 | |
| 5165 | @ReturnMapping(StringsWatchResults) |
| 5166 | async def WatchAllContainers(self, params): |
| 5167 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5168 | params : typing.Sequence[~WatchContainer] |
| 5169 | Returns -> typing.Sequence[~StringsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5170 | ''' |
| 5171 | # map input types to rpc msg |
| 5172 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5173 | msg = dict(type='Provisioner', |
| 5174 | request='WatchAllContainers', |
| 5175 | version=3, |
| 5176 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5177 | _params['params'] = params |
| 5178 | reply = await self.rpc(msg) |
| 5179 | return reply |
| 5180 | |
| 5181 | |
| 5182 | |
| 5183 | @ReturnMapping(StringsWatchResults) |
| 5184 | async def WatchContainers(self, params): |
| 5185 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5186 | params : typing.Sequence[~WatchContainer] |
| 5187 | Returns -> typing.Sequence[~StringsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5188 | ''' |
| 5189 | # map input types to rpc msg |
| 5190 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5191 | msg = dict(type='Provisioner', |
| 5192 | request='WatchContainers', |
| 5193 | version=3, |
| 5194 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5195 | _params['params'] = params |
| 5196 | reply = await self.rpc(msg) |
| 5197 | return reply |
| 5198 | |
| 5199 | |
| 5200 | |
| 5201 | @ReturnMapping(NotifyWatchResult) |
| 5202 | async def WatchForModelConfigChanges(self): |
| 5203 | ''' |
| 5204 | |
| 5205 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 5206 | ''' |
| 5207 | # map input types to rpc msg |
| 5208 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5209 | msg = dict(type='Provisioner', |
| 5210 | request='WatchForModelConfigChanges', |
| 5211 | version=3, |
| 5212 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5213 | |
| 5214 | reply = await self.rpc(msg) |
| 5215 | return reply |
| 5216 | |
| 5217 | |
| 5218 | |
| 5219 | @ReturnMapping(NotifyWatchResult) |
| 5220 | async def WatchMachineErrorRetry(self): |
| 5221 | ''' |
| 5222 | |
| 5223 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 5224 | ''' |
| 5225 | # map input types to rpc msg |
| 5226 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5227 | msg = dict(type='Provisioner', |
| 5228 | request='WatchMachineErrorRetry', |
| 5229 | version=3, |
| 5230 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5231 | |
| 5232 | reply = await self.rpc(msg) |
| 5233 | return reply |
| 5234 | |
| 5235 | |
| 5236 | |
| 5237 | @ReturnMapping(StringsWatchResult) |
| 5238 | async def WatchModelMachines(self): |
| 5239 | ''' |
| 5240 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5241 | Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5242 | ''' |
| 5243 | # map input types to rpc msg |
| 5244 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5245 | msg = dict(type='Provisioner', |
| 5246 | request='WatchModelMachines', |
| 5247 | version=3, |
| 5248 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5249 | |
| 5250 | reply = await self.rpc(msg) |
| 5251 | return reply |
| 5252 | |
| 5253 | |
| 5254 | |
| 5255 | class SpacesFacade(Type): |
| 5256 | name = 'Spaces' |
| 5257 | version = 3 |
| 5258 | schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False, |
| 5259 | 'properties': {'provider-id': {'type': 'string'}, |
| 5260 | 'public': {'type': 'boolean'}, |
| 5261 | 'space-tag': {'type': 'string'}, |
| 5262 | 'subnet-tags': {'items': {'type': 'string'}, |
| 5263 | 'type': 'array'}}, |
| 5264 | 'required': ['subnet-tags', |
| 5265 | 'space-tag', |
| 5266 | 'public'], |
| 5267 | 'type': 'object'}, |
| 5268 | 'CreateSpacesParams': {'additionalProperties': False, |
| 5269 | 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'}, |
| 5270 | 'type': 'array'}}, |
| 5271 | 'required': ['spaces'], |
| 5272 | 'type': 'object'}, |
| 5273 | 'Error': {'additionalProperties': False, |
| 5274 | 'properties': {'code': {'type': 'string'}, |
| 5275 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5276 | 'message': {'type': 'string'}}, |
| 5277 | 'required': ['message', 'code'], |
| 5278 | 'type': 'object'}, |
| 5279 | 'ErrorInfo': {'additionalProperties': False, |
| 5280 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5281 | 'macaroon-path': {'type': 'string'}}, |
| 5282 | 'type': 'object'}, |
| 5283 | 'ErrorResult': {'additionalProperties': False, |
| 5284 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 5285 | 'type': 'object'}, |
| 5286 | 'ErrorResults': {'additionalProperties': False, |
| 5287 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 5288 | 'type': 'array'}}, |
| 5289 | 'required': ['results'], |
| 5290 | 'type': 'object'}, |
| 5291 | 'ListSpacesResults': {'additionalProperties': False, |
| 5292 | 'properties': {'results': {'items': {'$ref': '#/definitions/Space'}, |
| 5293 | 'type': 'array'}}, |
| 5294 | 'required': ['results'], |
| 5295 | 'type': 'object'}, |
| 5296 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5297 | 'Space': {'additionalProperties': False, |
| 5298 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5299 | 'name': {'type': 'string'}, |
| 5300 | 'subnets': {'items': {'$ref': '#/definitions/Subnet'}, |
| 5301 | 'type': 'array'}}, |
| 5302 | 'required': ['name', 'subnets'], |
| 5303 | 'type': 'object'}, |
| 5304 | 'Subnet': {'additionalProperties': False, |
| 5305 | 'properties': {'cidr': {'type': 'string'}, |
| 5306 | 'life': {'type': 'string'}, |
| 5307 | 'provider-id': {'type': 'string'}, |
| 5308 | 'provider-network-id': {'type': 'string'}, |
| 5309 | 'provider-space-id': {'type': 'string'}, |
| 5310 | 'space-tag': {'type': 'string'}, |
| 5311 | 'status': {'type': 'string'}, |
| 5312 | 'vlan-tag': {'type': 'integer'}, |
| 5313 | 'zones': {'items': {'type': 'string'}, |
| 5314 | 'type': 'array'}}, |
| 5315 | 'required': ['cidr', |
| 5316 | 'vlan-tag', |
| 5317 | 'life', |
| 5318 | 'space-tag', |
| 5319 | 'zones'], |
| 5320 | 'type': 'object'}}, |
| 5321 | 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'}, |
| 5322 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 5323 | 'type': 'object'}, |
| 5324 | 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}}, |
| 5325 | 'type': 'object'}, |
| 5326 | 'ReloadSpaces': {'type': 'object'}}, |
| 5327 | 'type': 'object'} |
| 5328 | |
| 5329 | |
| 5330 | @ReturnMapping(ErrorResults) |
| 5331 | async def CreateSpaces(self, spaces): |
| 5332 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5333 | spaces : typing.Sequence[~CreateSpaceParams] |
| 5334 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5335 | ''' |
| 5336 | # map input types to rpc msg |
| 5337 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5338 | msg = dict(type='Spaces', |
| 5339 | request='CreateSpaces', |
| 5340 | version=3, |
| 5341 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5342 | _params['spaces'] = spaces |
| 5343 | reply = await self.rpc(msg) |
| 5344 | return reply |
| 5345 | |
| 5346 | |
| 5347 | |
| 5348 | @ReturnMapping(ListSpacesResults) |
| 5349 | async def ListSpaces(self): |
| 5350 | ''' |
| 5351 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5352 | Returns -> typing.Sequence[~Space] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5353 | ''' |
| 5354 | # map input types to rpc msg |
| 5355 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5356 | msg = dict(type='Spaces', |
| 5357 | request='ListSpaces', |
| 5358 | version=3, |
| 5359 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5360 | |
| 5361 | reply = await self.rpc(msg) |
| 5362 | return reply |
| 5363 | |
| 5364 | |
| 5365 | |
| 5366 | @ReturnMapping(None) |
| 5367 | async def ReloadSpaces(self): |
| 5368 | ''' |
| 5369 | |
| 5370 | Returns -> None |
| 5371 | ''' |
| 5372 | # map input types to rpc msg |
| 5373 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5374 | msg = dict(type='Spaces', |
| 5375 | request='ReloadSpaces', |
| 5376 | version=3, |
| 5377 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5378 | |
| 5379 | reply = await self.rpc(msg) |
| 5380 | return reply |
| 5381 | |
| 5382 | |
| 5383 | |
| 5384 | class StorageFacade(Type): |
| 5385 | name = 'Storage' |
| 5386 | version = 3 |
| 5387 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 5388 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 5389 | 'type': 'array'}}, |
| 5390 | 'required': ['entities'], |
| 5391 | 'type': 'object'}, |
| 5392 | 'Entity': {'additionalProperties': False, |
| 5393 | 'properties': {'tag': {'type': 'string'}}, |
| 5394 | 'required': ['tag'], |
| 5395 | 'type': 'object'}, |
| 5396 | 'EntityStatus': {'additionalProperties': False, |
| 5397 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 5398 | 'type': 'object'}}, |
| 5399 | 'type': 'object'}, |
| 5400 | 'info': {'type': 'string'}, |
| 5401 | 'since': {'format': 'date-time', |
| 5402 | 'type': 'string'}, |
| 5403 | 'status': {'type': 'string'}}, |
| 5404 | 'required': ['status', 'info', 'since'], |
| 5405 | 'type': 'object'}, |
| 5406 | 'Error': {'additionalProperties': False, |
| 5407 | 'properties': {'code': {'type': 'string'}, |
| 5408 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5409 | 'message': {'type': 'string'}}, |
| 5410 | 'required': ['message', 'code'], |
| 5411 | 'type': 'object'}, |
| 5412 | 'ErrorInfo': {'additionalProperties': False, |
| 5413 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5414 | 'macaroon-path': {'type': 'string'}}, |
| 5415 | 'type': 'object'}, |
| 5416 | 'ErrorResult': {'additionalProperties': False, |
| 5417 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 5418 | 'type': 'object'}, |
| 5419 | 'ErrorResults': {'additionalProperties': False, |
| 5420 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 5421 | 'type': 'array'}}, |
| 5422 | 'required': ['results'], |
| 5423 | 'type': 'object'}, |
| 5424 | 'FilesystemAttachmentDetails': {'additionalProperties': False, |
| 5425 | 'properties': {'FilesystemAttachmentInfo': {'$ref': '#/definitions/FilesystemAttachmentInfo'}, |
| 5426 | 'life': {'type': 'string'}}, |
| 5427 | 'required': ['FilesystemAttachmentInfo'], |
| 5428 | 'type': 'object'}, |
| 5429 | 'FilesystemAttachmentInfo': {'additionalProperties': False, |
| 5430 | 'properties': {'mount-point': {'type': 'string'}, |
| 5431 | 'read-only': {'type': 'boolean'}}, |
| 5432 | 'type': 'object'}, |
| 5433 | 'FilesystemDetails': {'additionalProperties': False, |
| 5434 | 'properties': {'filesystem-tag': {'type': 'string'}, |
| 5435 | 'info': {'$ref': '#/definitions/FilesystemInfo'}, |
| 5436 | 'life': {'type': 'string'}, |
| 5437 | 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentDetails'}}, |
| 5438 | 'type': 'object'}, |
| 5439 | 'status': {'$ref': '#/definitions/EntityStatus'}, |
| 5440 | 'storage': {'$ref': '#/definitions/StorageDetails'}, |
| 5441 | 'volume-tag': {'type': 'string'}}, |
| 5442 | 'required': ['filesystem-tag', |
| 5443 | 'info', |
| 5444 | 'status'], |
| 5445 | 'type': 'object'}, |
| 5446 | 'FilesystemDetailsListResult': {'additionalProperties': False, |
| 5447 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5448 | 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'}, |
| 5449 | 'type': 'array'}}, |
| 5450 | 'type': 'object'}, |
| 5451 | 'FilesystemDetailsListResults': {'additionalProperties': False, |
| 5452 | 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'}, |
| 5453 | 'type': 'array'}}, |
| 5454 | 'type': 'object'}, |
| 5455 | 'FilesystemFilter': {'additionalProperties': False, |
| 5456 | 'properties': {'machines': {'items': {'type': 'string'}, |
| 5457 | 'type': 'array'}}, |
| 5458 | 'type': 'object'}, |
| 5459 | 'FilesystemFilters': {'additionalProperties': False, |
| 5460 | 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'}, |
| 5461 | 'type': 'array'}}, |
| 5462 | 'type': 'object'}, |
| 5463 | 'FilesystemInfo': {'additionalProperties': False, |
| 5464 | 'properties': {'filesystem-id': {'type': 'string'}, |
| 5465 | 'pool': {'type': 'string'}, |
| 5466 | 'size': {'type': 'integer'}}, |
| 5467 | 'required': ['filesystem-id', |
| 5468 | 'pool', |
| 5469 | 'size'], |
| 5470 | 'type': 'object'}, |
| 5471 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5472 | 'StorageAddParams': {'additionalProperties': False, |
| 5473 | 'properties': {'name': {'type': 'string'}, |
| 5474 | 'storage': {'$ref': '#/definitions/StorageConstraints'}, |
| 5475 | 'unit': {'type': 'string'}}, |
| 5476 | 'required': ['unit', 'name', 'storage'], |
| 5477 | 'type': 'object'}, |
| 5478 | 'StorageAttachmentDetails': {'additionalProperties': False, |
| 5479 | 'properties': {'life': {'type': 'string'}, |
| 5480 | 'location': {'type': 'string'}, |
| 5481 | 'machine-tag': {'type': 'string'}, |
| 5482 | 'storage-tag': {'type': 'string'}, |
| 5483 | 'unit-tag': {'type': 'string'}}, |
| 5484 | 'required': ['storage-tag', |
| 5485 | 'unit-tag', |
| 5486 | 'machine-tag'], |
| 5487 | 'type': 'object'}, |
| 5488 | 'StorageAttachmentId': {'additionalProperties': False, |
| 5489 | 'properties': {'storage-tag': {'type': 'string'}, |
| 5490 | 'unit-tag': {'type': 'string'}}, |
| 5491 | 'required': ['storage-tag', |
| 5492 | 'unit-tag'], |
| 5493 | 'type': 'object'}, |
| 5494 | 'StorageAttachmentIds': {'additionalProperties': False, |
| 5495 | 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'}, |
| 5496 | 'type': 'array'}}, |
| 5497 | 'required': ['ids'], |
| 5498 | 'type': 'object'}, |
| 5499 | 'StorageConstraints': {'additionalProperties': False, |
| 5500 | 'properties': {'count': {'type': 'integer'}, |
| 5501 | 'pool': {'type': 'string'}, |
| 5502 | 'size': {'type': 'integer'}}, |
| 5503 | 'type': 'object'}, |
| 5504 | 'StorageDetails': {'additionalProperties': False, |
| 5505 | 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}}, |
| 5506 | 'type': 'object'}, |
| 5507 | 'kind': {'type': 'integer'}, |
| 5508 | 'life': {'type': 'string'}, |
| 5509 | 'owner-tag': {'type': 'string'}, |
| 5510 | 'persistent': {'type': 'boolean'}, |
| 5511 | 'status': {'$ref': '#/definitions/EntityStatus'}, |
| 5512 | 'storage-tag': {'type': 'string'}}, |
| 5513 | 'required': ['storage-tag', |
| 5514 | 'owner-tag', |
| 5515 | 'kind', |
| 5516 | 'status', |
| 5517 | 'persistent'], |
| 5518 | 'type': 'object'}, |
| 5519 | 'StorageDetailsListResult': {'additionalProperties': False, |
| 5520 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5521 | 'result': {'items': {'$ref': '#/definitions/StorageDetails'}, |
| 5522 | 'type': 'array'}}, |
| 5523 | 'type': 'object'}, |
| 5524 | 'StorageDetailsListResults': {'additionalProperties': False, |
| 5525 | 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'}, |
| 5526 | 'type': 'array'}}, |
| 5527 | 'type': 'object'}, |
| 5528 | 'StorageDetailsResult': {'additionalProperties': False, |
| 5529 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5530 | 'result': {'$ref': '#/definitions/StorageDetails'}}, |
| 5531 | 'type': 'object'}, |
| 5532 | 'StorageDetailsResults': {'additionalProperties': False, |
| 5533 | 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'}, |
| 5534 | 'type': 'array'}}, |
| 5535 | 'type': 'object'}, |
| 5536 | 'StorageFilter': {'additionalProperties': False, |
| 5537 | 'type': 'object'}, |
| 5538 | 'StorageFilters': {'additionalProperties': False, |
| 5539 | 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'}, |
| 5540 | 'type': 'array'}}, |
| 5541 | 'type': 'object'}, |
| 5542 | 'StoragePool': {'additionalProperties': False, |
| 5543 | 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True, |
| 5544 | 'type': 'object'}}, |
| 5545 | 'type': 'object'}, |
| 5546 | 'name': {'type': 'string'}, |
| 5547 | 'provider': {'type': 'string'}}, |
| 5548 | 'required': ['name', 'provider', 'attrs'], |
| 5549 | 'type': 'object'}, |
| 5550 | 'StoragePoolFilter': {'additionalProperties': False, |
| 5551 | 'properties': {'names': {'items': {'type': 'string'}, |
| 5552 | 'type': 'array'}, |
| 5553 | 'providers': {'items': {'type': 'string'}, |
| 5554 | 'type': 'array'}}, |
| 5555 | 'type': 'object'}, |
| 5556 | 'StoragePoolFilters': {'additionalProperties': False, |
| 5557 | 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'}, |
| 5558 | 'type': 'array'}}, |
| 5559 | 'type': 'object'}, |
| 5560 | 'StoragePoolsResult': {'additionalProperties': False, |
| 5561 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5562 | 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'}, |
| 5563 | 'type': 'array'}}, |
| 5564 | 'type': 'object'}, |
| 5565 | 'StoragePoolsResults': {'additionalProperties': False, |
| 5566 | 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'}, |
| 5567 | 'type': 'array'}}, |
| 5568 | 'type': 'object'}, |
| 5569 | 'StoragesAddParams': {'additionalProperties': False, |
| 5570 | 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'}, |
| 5571 | 'type': 'array'}}, |
| 5572 | 'required': ['storages'], |
| 5573 | 'type': 'object'}, |
| 5574 | 'VolumeAttachmentDetails': {'additionalProperties': False, |
| 5575 | 'properties': {'VolumeAttachmentInfo': {'$ref': '#/definitions/VolumeAttachmentInfo'}, |
| 5576 | 'life': {'type': 'string'}}, |
| 5577 | 'required': ['VolumeAttachmentInfo'], |
| 5578 | 'type': 'object'}, |
| 5579 | 'VolumeAttachmentInfo': {'additionalProperties': False, |
| 5580 | 'properties': {'bus-address': {'type': 'string'}, |
| 5581 | 'device-link': {'type': 'string'}, |
| 5582 | 'device-name': {'type': 'string'}, |
| 5583 | 'read-only': {'type': 'boolean'}}, |
| 5584 | 'type': 'object'}, |
| 5585 | 'VolumeDetails': {'additionalProperties': False, |
| 5586 | 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, |
| 5587 | 'life': {'type': 'string'}, |
| 5588 | 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentDetails'}}, |
| 5589 | 'type': 'object'}, |
| 5590 | 'status': {'$ref': '#/definitions/EntityStatus'}, |
| 5591 | 'storage': {'$ref': '#/definitions/StorageDetails'}, |
| 5592 | 'volume-tag': {'type': 'string'}}, |
| 5593 | 'required': ['volume-tag', 'info', 'status'], |
| 5594 | 'type': 'object'}, |
| 5595 | 'VolumeDetailsListResult': {'additionalProperties': False, |
| 5596 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5597 | 'result': {'items': {'$ref': '#/definitions/VolumeDetails'}, |
| 5598 | 'type': 'array'}}, |
| 5599 | 'type': 'object'}, |
| 5600 | 'VolumeDetailsListResults': {'additionalProperties': False, |
| 5601 | 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'}, |
| 5602 | 'type': 'array'}}, |
| 5603 | 'type': 'object'}, |
| 5604 | 'VolumeFilter': {'additionalProperties': False, |
| 5605 | 'properties': {'machines': {'items': {'type': 'string'}, |
| 5606 | 'type': 'array'}}, |
| 5607 | 'type': 'object'}, |
| 5608 | 'VolumeFilters': {'additionalProperties': False, |
| 5609 | 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'}, |
| 5610 | 'type': 'array'}}, |
| 5611 | 'type': 'object'}, |
| 5612 | 'VolumeInfo': {'additionalProperties': False, |
| 5613 | 'properties': {'hardware-id': {'type': 'string'}, |
| 5614 | 'persistent': {'type': 'boolean'}, |
| 5615 | 'pool': {'type': 'string'}, |
| 5616 | 'size': {'type': 'integer'}, |
| 5617 | 'volume-id': {'type': 'string'}, |
| 5618 | 'wwn': {'type': 'string'}}, |
| 5619 | 'required': ['volume-id', 'size', 'persistent'], |
| 5620 | 'type': 'object'}}, |
| 5621 | 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'}, |
| 5622 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 5623 | 'type': 'object'}, |
| 5624 | 'Attach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, |
| 5625 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 5626 | 'type': 'object'}, |
| 5627 | 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}}, |
| 5628 | 'type': 'object'}, |
| 5629 | 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 5630 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 5631 | 'type': 'object'}, |
| 5632 | 'Detach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, |
| 5633 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 5634 | 'type': 'object'}, |
| 5635 | 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'}, |
| 5636 | 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}}, |
| 5637 | 'type': 'object'}, |
| 5638 | 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'}, |
| 5639 | 'Result': {'$ref': '#/definitions/StoragePoolsResults'}}, |
| 5640 | 'type': 'object'}, |
| 5641 | 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'}, |
| 5642 | 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}}, |
| 5643 | 'type': 'object'}, |
| 5644 | 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'}, |
| 5645 | 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}}, |
| 5646 | 'type': 'object'}, |
| 5647 | 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 5648 | 'Result': {'$ref': '#/definitions/StorageDetailsResults'}}, |
| 5649 | 'type': 'object'}}, |
| 5650 | 'type': 'object'} |
| 5651 | |
| 5652 | |
| 5653 | @ReturnMapping(ErrorResults) |
| 5654 | async def AddToUnit(self, storages): |
| 5655 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5656 | storages : typing.Sequence[~StorageAddParams] |
| 5657 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5658 | ''' |
| 5659 | # map input types to rpc msg |
| 5660 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5661 | msg = dict(type='Storage', |
| 5662 | request='AddToUnit', |
| 5663 | version=3, |
| 5664 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5665 | _params['storages'] = storages |
| 5666 | reply = await self.rpc(msg) |
| 5667 | return reply |
| 5668 | |
| 5669 | |
| 5670 | |
| 5671 | @ReturnMapping(ErrorResults) |
| 5672 | async def Attach(self, ids): |
| 5673 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5674 | ids : typing.Sequence[~StorageAttachmentId] |
| 5675 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5676 | ''' |
| 5677 | # map input types to rpc msg |
| 5678 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5679 | msg = dict(type='Storage', |
| 5680 | request='Attach', |
| 5681 | version=3, |
| 5682 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5683 | _params['ids'] = ids |
| 5684 | reply = await self.rpc(msg) |
| 5685 | return reply |
| 5686 | |
| 5687 | |
| 5688 | |
| 5689 | @ReturnMapping(None) |
| 5690 | async def CreatePool(self, attrs, name, provider): |
| 5691 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5692 | attrs : typing.Mapping[str, typing.Any] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5693 | name : str |
| 5694 | provider : str |
| 5695 | Returns -> None |
| 5696 | ''' |
| 5697 | # map input types to rpc msg |
| 5698 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5699 | msg = dict(type='Storage', |
| 5700 | request='CreatePool', |
| 5701 | version=3, |
| 5702 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5703 | _params['attrs'] = attrs |
| 5704 | _params['name'] = name |
| 5705 | _params['provider'] = provider |
| 5706 | reply = await self.rpc(msg) |
| 5707 | return reply |
| 5708 | |
| 5709 | |
| 5710 | |
| 5711 | @ReturnMapping(ErrorResults) |
| 5712 | async def Destroy(self, entities): |
| 5713 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5714 | entities : typing.Sequence[~Entity] |
| 5715 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5716 | ''' |
| 5717 | # map input types to rpc msg |
| 5718 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5719 | msg = dict(type='Storage', |
| 5720 | request='Destroy', |
| 5721 | version=3, |
| 5722 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5723 | _params['entities'] = entities |
| 5724 | reply = await self.rpc(msg) |
| 5725 | return reply |
| 5726 | |
| 5727 | |
| 5728 | |
| 5729 | @ReturnMapping(ErrorResults) |
| 5730 | async def Detach(self, ids): |
| 5731 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5732 | ids : typing.Sequence[~StorageAttachmentId] |
| 5733 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5734 | ''' |
| 5735 | # map input types to rpc msg |
| 5736 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5737 | msg = dict(type='Storage', |
| 5738 | request='Detach', |
| 5739 | version=3, |
| 5740 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5741 | _params['ids'] = ids |
| 5742 | reply = await self.rpc(msg) |
| 5743 | return reply |
| 5744 | |
| 5745 | |
| 5746 | |
| 5747 | @ReturnMapping(FilesystemDetailsListResults) |
| 5748 | async def ListFilesystems(self, filters): |
| 5749 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5750 | filters : typing.Sequence[~FilesystemFilter] |
| 5751 | Returns -> typing.Sequence[~FilesystemDetailsListResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5752 | ''' |
| 5753 | # map input types to rpc msg |
| 5754 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5755 | msg = dict(type='Storage', |
| 5756 | request='ListFilesystems', |
| 5757 | version=3, |
| 5758 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5759 | _params['filters'] = filters |
| 5760 | reply = await self.rpc(msg) |
| 5761 | return reply |
| 5762 | |
| 5763 | |
| 5764 | |
| 5765 | @ReturnMapping(StoragePoolsResults) |
| 5766 | async def ListPools(self, filters): |
| 5767 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5768 | filters : typing.Sequence[~StoragePoolFilter] |
| 5769 | Returns -> typing.Sequence[~StoragePoolsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5770 | ''' |
| 5771 | # map input types to rpc msg |
| 5772 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5773 | msg = dict(type='Storage', |
| 5774 | request='ListPools', |
| 5775 | version=3, |
| 5776 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5777 | _params['filters'] = filters |
| 5778 | reply = await self.rpc(msg) |
| 5779 | return reply |
| 5780 | |
| 5781 | |
| 5782 | |
| 5783 | @ReturnMapping(StorageDetailsListResults) |
| 5784 | async def ListStorageDetails(self, filters): |
| 5785 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5786 | filters : typing.Sequence[~StorageFilter] |
| 5787 | Returns -> typing.Sequence[~StorageDetailsListResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5788 | ''' |
| 5789 | # map input types to rpc msg |
| 5790 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5791 | msg = dict(type='Storage', |
| 5792 | request='ListStorageDetails', |
| 5793 | version=3, |
| 5794 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5795 | _params['filters'] = filters |
| 5796 | reply = await self.rpc(msg) |
| 5797 | return reply |
| 5798 | |
| 5799 | |
| 5800 | |
| 5801 | @ReturnMapping(VolumeDetailsListResults) |
| 5802 | async def ListVolumes(self, filters): |
| 5803 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5804 | filters : typing.Sequence[~VolumeFilter] |
| 5805 | Returns -> typing.Sequence[~VolumeDetailsListResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5806 | ''' |
| 5807 | # map input types to rpc msg |
| 5808 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5809 | msg = dict(type='Storage', |
| 5810 | request='ListVolumes', |
| 5811 | version=3, |
| 5812 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5813 | _params['filters'] = filters |
| 5814 | reply = await self.rpc(msg) |
| 5815 | return reply |
| 5816 | |
| 5817 | |
| 5818 | |
| 5819 | @ReturnMapping(StorageDetailsResults) |
| 5820 | async def StorageDetails(self, entities): |
| 5821 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5822 | entities : typing.Sequence[~Entity] |
| 5823 | Returns -> typing.Sequence[~StorageDetailsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5824 | ''' |
| 5825 | # map input types to rpc msg |
| 5826 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 5827 | msg = dict(type='Storage', |
| 5828 | request='StorageDetails', |
| 5829 | version=3, |
| 5830 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5831 | _params['entities'] = entities |
| 5832 | reply = await self.rpc(msg) |
| 5833 | return reply |
| 5834 | |
| 5835 | |
| 5836 | |
| 5837 | class StorageProvisionerFacade(Type): |
| 5838 | name = 'StorageProvisioner' |
| 5839 | version = 3 |
| 5840 | schema = {'definitions': {'BlockDevice': {'additionalProperties': False, |
| 5841 | 'properties': {'BusAddress': {'type': 'string'}, |
| 5842 | 'DeviceLinks': {'items': {'type': 'string'}, |
| 5843 | 'type': 'array'}, |
| 5844 | 'DeviceName': {'type': 'string'}, |
| 5845 | 'FilesystemType': {'type': 'string'}, |
| 5846 | 'HardwareId': {'type': 'string'}, |
| 5847 | 'InUse': {'type': 'boolean'}, |
| 5848 | 'Label': {'type': 'string'}, |
| 5849 | 'MountPoint': {'type': 'string'}, |
| 5850 | 'Size': {'type': 'integer'}, |
| 5851 | 'UUID': {'type': 'string'}, |
| 5852 | 'WWN': {'type': 'string'}}, |
| 5853 | 'required': ['DeviceName', |
| 5854 | 'DeviceLinks', |
| 5855 | 'Label', |
| 5856 | 'UUID', |
| 5857 | 'HardwareId', |
| 5858 | 'WWN', |
| 5859 | 'BusAddress', |
| 5860 | 'Size', |
| 5861 | 'FilesystemType', |
| 5862 | 'InUse', |
| 5863 | 'MountPoint'], |
| 5864 | 'type': 'object'}, |
| 5865 | 'BlockDeviceResult': {'additionalProperties': False, |
| 5866 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5867 | 'result': {'$ref': '#/definitions/BlockDevice'}}, |
| 5868 | 'required': ['result'], |
| 5869 | 'type': 'object'}, |
| 5870 | 'BlockDeviceResults': {'additionalProperties': False, |
| 5871 | 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'}, |
| 5872 | 'type': 'array'}}, |
| 5873 | 'type': 'object'}, |
| 5874 | 'Entities': {'additionalProperties': False, |
| 5875 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 5876 | 'type': 'array'}}, |
| 5877 | 'required': ['entities'], |
| 5878 | 'type': 'object'}, |
| 5879 | 'Entity': {'additionalProperties': False, |
| 5880 | 'properties': {'tag': {'type': 'string'}}, |
| 5881 | 'required': ['tag'], |
| 5882 | 'type': 'object'}, |
| 5883 | 'EntityStatusArgs': {'additionalProperties': False, |
| 5884 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 5885 | 'type': 'object'}}, |
| 5886 | 'type': 'object'}, |
| 5887 | 'info': {'type': 'string'}, |
| 5888 | 'status': {'type': 'string'}, |
| 5889 | 'tag': {'type': 'string'}}, |
| 5890 | 'required': ['tag', |
| 5891 | 'status', |
| 5892 | 'info', |
| 5893 | 'data'], |
| 5894 | 'type': 'object'}, |
| 5895 | 'Error': {'additionalProperties': False, |
| 5896 | 'properties': {'code': {'type': 'string'}, |
| 5897 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5898 | 'message': {'type': 'string'}}, |
| 5899 | 'required': ['message', 'code'], |
| 5900 | 'type': 'object'}, |
| 5901 | 'ErrorInfo': {'additionalProperties': False, |
| 5902 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5903 | 'macaroon-path': {'type': 'string'}}, |
| 5904 | 'type': 'object'}, |
| 5905 | 'ErrorResult': {'additionalProperties': False, |
| 5906 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 5907 | 'type': 'object'}, |
| 5908 | 'ErrorResults': {'additionalProperties': False, |
| 5909 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 5910 | 'type': 'array'}}, |
| 5911 | 'required': ['results'], |
| 5912 | 'type': 'object'}, |
| 5913 | 'Filesystem': {'additionalProperties': False, |
| 5914 | 'properties': {'filesystem-tag': {'type': 'string'}, |
| 5915 | 'info': {'$ref': '#/definitions/FilesystemInfo'}, |
| 5916 | 'volume-tag': {'type': 'string'}}, |
| 5917 | 'required': ['filesystem-tag', 'info'], |
| 5918 | 'type': 'object'}, |
| 5919 | 'FilesystemAttachment': {'additionalProperties': False, |
| 5920 | 'properties': {'filesystem-tag': {'type': 'string'}, |
| 5921 | 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'}, |
| 5922 | 'machine-tag': {'type': 'string'}}, |
| 5923 | 'required': ['filesystem-tag', |
| 5924 | 'machine-tag', |
| 5925 | 'info'], |
| 5926 | 'type': 'object'}, |
| 5927 | 'FilesystemAttachmentInfo': {'additionalProperties': False, |
| 5928 | 'properties': {'mount-point': {'type': 'string'}, |
| 5929 | 'read-only': {'type': 'boolean'}}, |
| 5930 | 'type': 'object'}, |
| 5931 | 'FilesystemAttachmentParams': {'additionalProperties': False, |
| 5932 | 'properties': {'filesystem-id': {'type': 'string'}, |
| 5933 | 'filesystem-tag': {'type': 'string'}, |
| 5934 | 'instance-id': {'type': 'string'}, |
| 5935 | 'machine-tag': {'type': 'string'}, |
| 5936 | 'mount-point': {'type': 'string'}, |
| 5937 | 'provider': {'type': 'string'}, |
| 5938 | 'read-only': {'type': 'boolean'}}, |
| 5939 | 'required': ['filesystem-tag', |
| 5940 | 'machine-tag', |
| 5941 | 'provider'], |
| 5942 | 'type': 'object'}, |
| 5943 | 'FilesystemAttachmentParamsResult': {'additionalProperties': False, |
| 5944 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5945 | 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}}, |
| 5946 | 'required': ['result'], |
| 5947 | 'type': 'object'}, |
| 5948 | 'FilesystemAttachmentParamsResults': {'additionalProperties': False, |
| 5949 | 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'}, |
| 5950 | 'type': 'array'}}, |
| 5951 | 'type': 'object'}, |
| 5952 | 'FilesystemAttachmentResult': {'additionalProperties': False, |
| 5953 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5954 | 'result': {'$ref': '#/definitions/FilesystemAttachment'}}, |
| 5955 | 'required': ['result'], |
| 5956 | 'type': 'object'}, |
| 5957 | 'FilesystemAttachmentResults': {'additionalProperties': False, |
| 5958 | 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'}, |
| 5959 | 'type': 'array'}}, |
| 5960 | 'type': 'object'}, |
| 5961 | 'FilesystemAttachments': {'additionalProperties': False, |
| 5962 | 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'}, |
| 5963 | 'type': 'array'}}, |
| 5964 | 'required': ['filesystem-attachments'], |
| 5965 | 'type': 'object'}, |
| 5966 | 'FilesystemInfo': {'additionalProperties': False, |
| 5967 | 'properties': {'filesystem-id': {'type': 'string'}, |
| 5968 | 'pool': {'type': 'string'}, |
| 5969 | 'size': {'type': 'integer'}}, |
| 5970 | 'required': ['filesystem-id', |
| 5971 | 'pool', |
| 5972 | 'size'], |
| 5973 | 'type': 'object'}, |
| 5974 | 'FilesystemParams': {'additionalProperties': False, |
| 5975 | 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'}, |
| 5976 | 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, |
| 5977 | 'type': 'object'}}, |
| 5978 | 'type': 'object'}, |
| 5979 | 'filesystem-tag': {'type': 'string'}, |
| 5980 | 'provider': {'type': 'string'}, |
| 5981 | 'size': {'type': 'integer'}, |
| 5982 | 'tags': {'patternProperties': {'.*': {'type': 'string'}}, |
| 5983 | 'type': 'object'}, |
| 5984 | 'volume-tag': {'type': 'string'}}, |
| 5985 | 'required': ['filesystem-tag', |
| 5986 | 'size', |
| 5987 | 'provider'], |
| 5988 | 'type': 'object'}, |
| 5989 | 'FilesystemParamsResult': {'additionalProperties': False, |
| 5990 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5991 | 'result': {'$ref': '#/definitions/FilesystemParams'}}, |
| 5992 | 'required': ['result'], |
| 5993 | 'type': 'object'}, |
| 5994 | 'FilesystemParamsResults': {'additionalProperties': False, |
| 5995 | 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'}, |
| 5996 | 'type': 'array'}}, |
| 5997 | 'type': 'object'}, |
| 5998 | 'FilesystemResult': {'additionalProperties': False, |
| 5999 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 6000 | 'result': {'$ref': '#/definitions/Filesystem'}}, |
| 6001 | 'required': ['result'], |
| 6002 | 'type': 'object'}, |
| 6003 | 'FilesystemResults': {'additionalProperties': False, |
| 6004 | 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'}, |
| 6005 | 'type': 'array'}}, |
| 6006 | 'type': 'object'}, |
| 6007 | 'Filesystems': {'additionalProperties': False, |
| 6008 | 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'}, |
| 6009 | 'type': 'array'}}, |
| 6010 | 'required': ['filesystems'], |
| 6011 | 'type': 'object'}, |
| 6012 | 'LifeResult': {'additionalProperties': False, |
| 6013 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 6014 | 'life': {'type': 'string'}}, |
| 6015 | 'required': ['life'], |
| 6016 | 'type': 'object'}, |
| 6017 | 'LifeResults': {'additionalProperties': False, |
| 6018 | 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, |
| 6019 | 'type': 'array'}}, |
| 6020 | 'required': ['results'], |
| 6021 | 'type': 'object'}, |
| 6022 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 6023 | 'MachineStorageId': {'additionalProperties': False, |
| 6024 | 'properties': {'attachment-tag': {'type': 'string'}, |
| 6025 | 'machine-tag': {'type': 'string'}}, |
| 6026 | 'required': ['machine-tag', |
| 6027 | 'attachment-tag'], |
| 6028 | 'type': 'object'}, |
| 6029 | 'MachineStorageIds': {'additionalProperties': False, |
| 6030 | 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'}, |
| 6031 | 'type': 'array'}}, |
| 6032 | 'required': ['ids'], |
| 6033 | 'type': 'object'}, |
| 6034 | 'MachineStorageIdsWatchResult': {'additionalProperties': False, |
| 6035 | 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, |
| 6036 | 'type': 'array'}, |
| 6037 | 'error': {'$ref': '#/definitions/Error'}, |
| 6038 | 'watcher-id': {'type': 'string'}}, |
| 6039 | 'required': ['watcher-id', |
| 6040 | 'changes'], |
| 6041 | 'type': 'object'}, |
| 6042 | 'MachineStorageIdsWatchResults': {'additionalProperties': False, |
| 6043 | 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}, |
| 6044 | 'type': 'array'}}, |
| 6045 | 'required': ['results'], |
| 6046 | 'type': 'object'}, |
| 6047 | 'NotifyWatchResult': {'additionalProperties': False, |
| 6048 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 6049 | 'error': {'$ref': '#/definitions/Error'}}, |
| 6050 | 'required': ['NotifyWatcherId'], |
| 6051 | 'type': 'object'}, |
| 6052 | 'NotifyWatchResults': {'additionalProperties': False, |
| 6053 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 6054 | 'type': 'array'}}, |
| 6055 | 'required': ['results'], |
| 6056 | 'type': 'object'}, |
| 6057 | 'SetStatus': {'additionalProperties': False, |
| 6058 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, |
| 6059 | 'type': 'array'}}, |
| 6060 | 'required': ['entities'], |
| 6061 | 'type': 'object'}, |
| 6062 | 'StringResult': {'additionalProperties': False, |
| 6063 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 6064 | 'result': {'type': 'string'}}, |
| 6065 | 'required': ['result'], |
| 6066 | 'type': 'object'}, |
| 6067 | 'StringResults': {'additionalProperties': False, |
| 6068 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, |
| 6069 | 'type': 'array'}}, |
| 6070 | 'required': ['results'], |
| 6071 | 'type': 'object'}, |
| 6072 | 'StringsWatchResult': {'additionalProperties': False, |
| 6073 | 'properties': {'changes': {'items': {'type': 'string'}, |
| 6074 | 'type': 'array'}, |
| 6075 | 'error': {'$ref': '#/definitions/Error'}, |
| 6076 | 'watcher-id': {'type': 'string'}}, |
| 6077 | 'required': ['watcher-id'], |
| 6078 | 'type': 'object'}, |
| 6079 | 'StringsWatchResults': {'additionalProperties': False, |
| 6080 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, |
| 6081 | 'type': 'array'}}, |
| 6082 | 'required': ['results'], |
| 6083 | 'type': 'object'}, |
| 6084 | 'Volume': {'additionalProperties': False, |
| 6085 | 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, |
| 6086 | 'volume-tag': {'type': 'string'}}, |
| 6087 | 'required': ['volume-tag', 'info'], |
| 6088 | 'type': 'object'}, |
| 6089 | 'VolumeAttachment': {'additionalProperties': False, |
| 6090 | 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'}, |
| 6091 | 'machine-tag': {'type': 'string'}, |
| 6092 | 'volume-tag': {'type': 'string'}}, |
| 6093 | 'required': ['volume-tag', |
| 6094 | 'machine-tag', |
| 6095 | 'info'], |
| 6096 | 'type': 'object'}, |
| 6097 | 'VolumeAttachmentInfo': {'additionalProperties': False, |
| 6098 | 'properties': {'bus-address': {'type': 'string'}, |
| 6099 | 'device-link': {'type': 'string'}, |
| 6100 | 'device-name': {'type': 'string'}, |
| 6101 | 'read-only': {'type': 'boolean'}}, |
| 6102 | 'type': 'object'}, |
| 6103 | 'VolumeAttachmentParams': {'additionalProperties': False, |
| 6104 | 'properties': {'instance-id': {'type': 'string'}, |
| 6105 | 'machine-tag': {'type': 'string'}, |
| 6106 | 'provider': {'type': 'string'}, |
| 6107 | 'read-only': {'type': 'boolean'}, |
| 6108 | 'volume-id': {'type': 'string'}, |
| 6109 | 'volume-tag': {'type': 'string'}}, |
| 6110 | 'required': ['volume-tag', |
| 6111 | 'machine-tag', |
| 6112 | 'provider'], |
| 6113 | 'type': 'object'}, |
| 6114 | 'VolumeAttachmentParamsResult': {'additionalProperties': False, |
| 6115 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 6116 | 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}}, |
| 6117 | 'required': ['result'], |
| 6118 | 'type': 'object'}, |
| 6119 | 'VolumeAttachmentParamsResults': {'additionalProperties': False, |
| 6120 | 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'}, |
| 6121 | 'type': 'array'}}, |
| 6122 | 'type': 'object'}, |
| 6123 | 'VolumeAttachmentResult': {'additionalProperties': False, |
| 6124 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 6125 | 'result': {'$ref': '#/definitions/VolumeAttachment'}}, |
| 6126 | 'required': ['result'], |
| 6127 | 'type': 'object'}, |
| 6128 | 'VolumeAttachmentResults': {'additionalProperties': False, |
| 6129 | 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'}, |
| 6130 | 'type': 'array'}}, |
| 6131 | 'type': 'object'}, |
| 6132 | 'VolumeAttachments': {'additionalProperties': False, |
| 6133 | 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'}, |
| 6134 | 'type': 'array'}}, |
| 6135 | 'required': ['volume-attachments'], |
| 6136 | 'type': 'object'}, |
| 6137 | 'VolumeInfo': {'additionalProperties': False, |
| 6138 | 'properties': {'hardware-id': {'type': 'string'}, |
| 6139 | 'persistent': {'type': 'boolean'}, |
| 6140 | 'pool': {'type': 'string'}, |
| 6141 | 'size': {'type': 'integer'}, |
| 6142 | 'volume-id': {'type': 'string'}, |
| 6143 | 'wwn': {'type': 'string'}}, |
| 6144 | 'required': ['volume-id', 'size', 'persistent'], |
| 6145 | 'type': 'object'}, |
| 6146 | 'VolumeParams': {'additionalProperties': False, |
| 6147 | 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'}, |
| 6148 | 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, |
| 6149 | 'type': 'object'}}, |
| 6150 | 'type': 'object'}, |
| 6151 | 'provider': {'type': 'string'}, |
| 6152 | 'size': {'type': 'integer'}, |
| 6153 | 'tags': {'patternProperties': {'.*': {'type': 'string'}}, |
| 6154 | 'type': 'object'}, |
| 6155 | 'volume-tag': {'type': 'string'}}, |
| 6156 | 'required': ['volume-tag', |
| 6157 | 'size', |
| 6158 | 'provider'], |
| 6159 | 'type': 'object'}, |
| 6160 | 'VolumeParamsResult': {'additionalProperties': False, |
| 6161 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 6162 | 'result': {'$ref': '#/definitions/VolumeParams'}}, |
| 6163 | 'required': ['result'], |
| 6164 | 'type': 'object'}, |
| 6165 | 'VolumeParamsResults': {'additionalProperties': False, |
| 6166 | 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'}, |
| 6167 | 'type': 'array'}}, |
| 6168 | 'type': 'object'}, |
| 6169 | 'VolumeResult': {'additionalProperties': False, |
| 6170 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 6171 | 'result': {'$ref': '#/definitions/Volume'}}, |
| 6172 | 'required': ['result'], |
| 6173 | 'type': 'object'}, |
| 6174 | 'VolumeResults': {'additionalProperties': False, |
| 6175 | 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'}, |
| 6176 | 'type': 'array'}}, |
| 6177 | 'type': 'object'}, |
| 6178 | 'Volumes': {'additionalProperties': False, |
| 6179 | 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'}, |
| 6180 | 'type': 'array'}}, |
| 6181 | 'required': ['volumes'], |
| 6182 | 'type': 'object'}}, |
| 6183 | 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 6184 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 6185 | 'type': 'object'}, |
| 6186 | 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6187 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6188 | 'type': 'object'}, |
| 6189 | 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 6190 | 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}}, |
| 6191 | 'type': 'object'}, |
| 6192 | 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 6193 | 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}}, |
| 6194 | 'type': 'object'}, |
| 6195 | 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6196 | 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}}, |
| 6197 | 'type': 'object'}, |
| 6198 | 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6199 | 'Result': {'$ref': '#/definitions/FilesystemResults'}}, |
| 6200 | 'type': 'object'}, |
| 6201 | 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6202 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 6203 | 'type': 'object'}, |
| 6204 | 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6205 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 6206 | 'type': 'object'}, |
| 6207 | 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6208 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6209 | 'type': 'object'}, |
| 6210 | 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 6211 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6212 | 'type': 'object'}, |
| 6213 | 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'}, |
| 6214 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6215 | 'type': 'object'}, |
| 6216 | 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'}, |
| 6217 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6218 | 'type': 'object'}, |
| 6219 | 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 6220 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6221 | 'type': 'object'}, |
| 6222 | 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'}, |
| 6223 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6224 | 'type': 'object'}, |
| 6225 | 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'}, |
| 6226 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6227 | 'type': 'object'}, |
| 6228 | 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 6229 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6230 | 'type': 'object'}, |
| 6231 | 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 6232 | 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}}, |
| 6233 | 'type': 'object'}, |
| 6234 | 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 6235 | 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}}, |
| 6236 | 'type': 'object'}, |
| 6237 | 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 6238 | 'Result': {'$ref': '#/definitions/BlockDeviceResults'}}, |
| 6239 | 'type': 'object'}, |
| 6240 | 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6241 | 'Result': {'$ref': '#/definitions/VolumeParamsResults'}}, |
| 6242 | 'type': 'object'}, |
| 6243 | 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6244 | 'Result': {'$ref': '#/definitions/VolumeResults'}}, |
| 6245 | 'type': 'object'}, |
| 6246 | 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6247 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 6248 | 'type': 'object'}, |
| 6249 | 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6250 | 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, |
| 6251 | 'type': 'object'}, |
| 6252 | 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6253 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 6254 | 'type': 'object'}, |
| 6255 | 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6256 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 6257 | 'type': 'object'}, |
| 6258 | 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6259 | 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, |
| 6260 | 'type': 'object'}, |
| 6261 | 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6262 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 6263 | 'type': 'object'}}, |
| 6264 | 'type': 'object'} |
| 6265 | |
| 6266 | |
| 6267 | @ReturnMapping(LifeResults) |
| 6268 | async def AttachmentLife(self, ids): |
| 6269 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6270 | ids : typing.Sequence[~MachineStorageId] |
| 6271 | Returns -> typing.Sequence[~LifeResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6272 | ''' |
| 6273 | # map input types to rpc msg |
| 6274 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6275 | msg = dict(type='StorageProvisioner', |
| 6276 | request='AttachmentLife', |
| 6277 | version=3, |
| 6278 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6279 | _params['ids'] = ids |
| 6280 | reply = await self.rpc(msg) |
| 6281 | return reply |
| 6282 | |
| 6283 | |
| 6284 | |
| 6285 | @ReturnMapping(ErrorResults) |
| 6286 | async def EnsureDead(self, entities): |
| 6287 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6288 | entities : typing.Sequence[~Entity] |
| 6289 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6290 | ''' |
| 6291 | # map input types to rpc msg |
| 6292 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6293 | msg = dict(type='StorageProvisioner', |
| 6294 | request='EnsureDead', |
| 6295 | version=3, |
| 6296 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6297 | _params['entities'] = entities |
| 6298 | reply = await self.rpc(msg) |
| 6299 | return reply |
| 6300 | |
| 6301 | |
| 6302 | |
| 6303 | @ReturnMapping(FilesystemAttachmentParamsResults) |
| 6304 | async def FilesystemAttachmentParams(self, ids): |
| 6305 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6306 | ids : typing.Sequence[~MachineStorageId] |
| 6307 | Returns -> typing.Sequence[~FilesystemAttachmentParamsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6308 | ''' |
| 6309 | # map input types to rpc msg |
| 6310 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6311 | msg = dict(type='StorageProvisioner', |
| 6312 | request='FilesystemAttachmentParams', |
| 6313 | version=3, |
| 6314 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6315 | _params['ids'] = ids |
| 6316 | reply = await self.rpc(msg) |
| 6317 | return reply |
| 6318 | |
| 6319 | |
| 6320 | |
| 6321 | @ReturnMapping(FilesystemAttachmentResults) |
| 6322 | async def FilesystemAttachments(self, ids): |
| 6323 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6324 | ids : typing.Sequence[~MachineStorageId] |
| 6325 | Returns -> typing.Sequence[~FilesystemAttachmentResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6326 | ''' |
| 6327 | # map input types to rpc msg |
| 6328 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6329 | msg = dict(type='StorageProvisioner', |
| 6330 | request='FilesystemAttachments', |
| 6331 | version=3, |
| 6332 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6333 | _params['ids'] = ids |
| 6334 | reply = await self.rpc(msg) |
| 6335 | return reply |
| 6336 | |
| 6337 | |
| 6338 | |
| 6339 | @ReturnMapping(FilesystemParamsResults) |
| 6340 | async def FilesystemParams(self, entities): |
| 6341 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6342 | entities : typing.Sequence[~Entity] |
| 6343 | Returns -> typing.Sequence[~FilesystemParamsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6344 | ''' |
| 6345 | # map input types to rpc msg |
| 6346 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6347 | msg = dict(type='StorageProvisioner', |
| 6348 | request='FilesystemParams', |
| 6349 | version=3, |
| 6350 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6351 | _params['entities'] = entities |
| 6352 | reply = await self.rpc(msg) |
| 6353 | return reply |
| 6354 | |
| 6355 | |
| 6356 | |
| 6357 | @ReturnMapping(FilesystemResults) |
| 6358 | async def Filesystems(self, entities): |
| 6359 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6360 | entities : typing.Sequence[~Entity] |
| 6361 | Returns -> typing.Sequence[~FilesystemResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6362 | ''' |
| 6363 | # map input types to rpc msg |
| 6364 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6365 | msg = dict(type='StorageProvisioner', |
| 6366 | request='Filesystems', |
| 6367 | version=3, |
| 6368 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6369 | _params['entities'] = entities |
| 6370 | reply = await self.rpc(msg) |
| 6371 | return reply |
| 6372 | |
| 6373 | |
| 6374 | |
| 6375 | @ReturnMapping(StringResults) |
| 6376 | async def InstanceId(self, entities): |
| 6377 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6378 | entities : typing.Sequence[~Entity] |
| 6379 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6380 | ''' |
| 6381 | # map input types to rpc msg |
| 6382 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6383 | msg = dict(type='StorageProvisioner', |
| 6384 | request='InstanceId', |
| 6385 | version=3, |
| 6386 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6387 | _params['entities'] = entities |
| 6388 | reply = await self.rpc(msg) |
| 6389 | return reply |
| 6390 | |
| 6391 | |
| 6392 | |
| 6393 | @ReturnMapping(LifeResults) |
| 6394 | async def Life(self, entities): |
| 6395 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6396 | entities : typing.Sequence[~Entity] |
| 6397 | Returns -> typing.Sequence[~LifeResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6398 | ''' |
| 6399 | # map input types to rpc msg |
| 6400 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6401 | msg = dict(type='StorageProvisioner', |
| 6402 | request='Life', |
| 6403 | version=3, |
| 6404 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6405 | _params['entities'] = entities |
| 6406 | reply = await self.rpc(msg) |
| 6407 | return reply |
| 6408 | |
| 6409 | |
| 6410 | |
| 6411 | @ReturnMapping(ErrorResults) |
| 6412 | async def Remove(self, entities): |
| 6413 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6414 | entities : typing.Sequence[~Entity] |
| 6415 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6416 | ''' |
| 6417 | # map input types to rpc msg |
| 6418 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6419 | msg = dict(type='StorageProvisioner', |
| 6420 | request='Remove', |
| 6421 | version=3, |
| 6422 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6423 | _params['entities'] = entities |
| 6424 | reply = await self.rpc(msg) |
| 6425 | return reply |
| 6426 | |
| 6427 | |
| 6428 | |
| 6429 | @ReturnMapping(ErrorResults) |
| 6430 | async def RemoveAttachment(self, ids): |
| 6431 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6432 | ids : typing.Sequence[~MachineStorageId] |
| 6433 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6434 | ''' |
| 6435 | # map input types to rpc msg |
| 6436 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6437 | msg = dict(type='StorageProvisioner', |
| 6438 | request='RemoveAttachment', |
| 6439 | version=3, |
| 6440 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6441 | _params['ids'] = ids |
| 6442 | reply = await self.rpc(msg) |
| 6443 | return reply |
| 6444 | |
| 6445 | |
| 6446 | |
| 6447 | @ReturnMapping(ErrorResults) |
| 6448 | async def SetFilesystemAttachmentInfo(self, filesystem_attachments): |
| 6449 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6450 | filesystem_attachments : typing.Sequence[~FilesystemAttachment] |
| 6451 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6452 | ''' |
| 6453 | # map input types to rpc msg |
| 6454 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6455 | msg = dict(type='StorageProvisioner', |
| 6456 | request='SetFilesystemAttachmentInfo', |
| 6457 | version=3, |
| 6458 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6459 | _params['filesystem-attachments'] = filesystem_attachments |
| 6460 | reply = await self.rpc(msg) |
| 6461 | return reply |
| 6462 | |
| 6463 | |
| 6464 | |
| 6465 | @ReturnMapping(ErrorResults) |
| 6466 | async def SetFilesystemInfo(self, filesystems): |
| 6467 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6468 | filesystems : typing.Sequence[~Filesystem] |
| 6469 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6470 | ''' |
| 6471 | # map input types to rpc msg |
| 6472 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6473 | msg = dict(type='StorageProvisioner', |
| 6474 | request='SetFilesystemInfo', |
| 6475 | version=3, |
| 6476 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6477 | _params['filesystems'] = filesystems |
| 6478 | reply = await self.rpc(msg) |
| 6479 | return reply |
| 6480 | |
| 6481 | |
| 6482 | |
| 6483 | @ReturnMapping(ErrorResults) |
| 6484 | async def SetStatus(self, entities): |
| 6485 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6486 | entities : typing.Sequence[~EntityStatusArgs] |
| 6487 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6488 | ''' |
| 6489 | # map input types to rpc msg |
| 6490 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6491 | msg = dict(type='StorageProvisioner', |
| 6492 | request='SetStatus', |
| 6493 | version=3, |
| 6494 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6495 | _params['entities'] = entities |
| 6496 | reply = await self.rpc(msg) |
| 6497 | return reply |
| 6498 | |
| 6499 | |
| 6500 | |
| 6501 | @ReturnMapping(ErrorResults) |
| 6502 | async def SetVolumeAttachmentInfo(self, volume_attachments): |
| 6503 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6504 | volume_attachments : typing.Sequence[~VolumeAttachment] |
| 6505 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6506 | ''' |
| 6507 | # map input types to rpc msg |
| 6508 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6509 | msg = dict(type='StorageProvisioner', |
| 6510 | request='SetVolumeAttachmentInfo', |
| 6511 | version=3, |
| 6512 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6513 | _params['volume-attachments'] = volume_attachments |
| 6514 | reply = await self.rpc(msg) |
| 6515 | return reply |
| 6516 | |
| 6517 | |
| 6518 | |
| 6519 | @ReturnMapping(ErrorResults) |
| 6520 | async def SetVolumeInfo(self, volumes): |
| 6521 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6522 | volumes : typing.Sequence[~Volume] |
| 6523 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6524 | ''' |
| 6525 | # map input types to rpc msg |
| 6526 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6527 | msg = dict(type='StorageProvisioner', |
| 6528 | request='SetVolumeInfo', |
| 6529 | version=3, |
| 6530 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6531 | _params['volumes'] = volumes |
| 6532 | reply = await self.rpc(msg) |
| 6533 | return reply |
| 6534 | |
| 6535 | |
| 6536 | |
| 6537 | @ReturnMapping(ErrorResults) |
| 6538 | async def UpdateStatus(self, entities): |
| 6539 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6540 | entities : typing.Sequence[~EntityStatusArgs] |
| 6541 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6542 | ''' |
| 6543 | # map input types to rpc msg |
| 6544 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6545 | msg = dict(type='StorageProvisioner', |
| 6546 | request='UpdateStatus', |
| 6547 | version=3, |
| 6548 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6549 | _params['entities'] = entities |
| 6550 | reply = await self.rpc(msg) |
| 6551 | return reply |
| 6552 | |
| 6553 | |
| 6554 | |
| 6555 | @ReturnMapping(VolumeAttachmentParamsResults) |
| 6556 | async def VolumeAttachmentParams(self, ids): |
| 6557 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6558 | ids : typing.Sequence[~MachineStorageId] |
| 6559 | Returns -> typing.Sequence[~VolumeAttachmentParamsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6560 | ''' |
| 6561 | # map input types to rpc msg |
| 6562 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6563 | msg = dict(type='StorageProvisioner', |
| 6564 | request='VolumeAttachmentParams', |
| 6565 | version=3, |
| 6566 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6567 | _params['ids'] = ids |
| 6568 | reply = await self.rpc(msg) |
| 6569 | return reply |
| 6570 | |
| 6571 | |
| 6572 | |
| 6573 | @ReturnMapping(VolumeAttachmentResults) |
| 6574 | async def VolumeAttachments(self, ids): |
| 6575 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6576 | ids : typing.Sequence[~MachineStorageId] |
| 6577 | Returns -> typing.Sequence[~VolumeAttachmentResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6578 | ''' |
| 6579 | # map input types to rpc msg |
| 6580 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6581 | msg = dict(type='StorageProvisioner', |
| 6582 | request='VolumeAttachments', |
| 6583 | version=3, |
| 6584 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6585 | _params['ids'] = ids |
| 6586 | reply = await self.rpc(msg) |
| 6587 | return reply |
| 6588 | |
| 6589 | |
| 6590 | |
| 6591 | @ReturnMapping(BlockDeviceResults) |
| 6592 | async def VolumeBlockDevices(self, ids): |
| 6593 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6594 | ids : typing.Sequence[~MachineStorageId] |
| 6595 | Returns -> typing.Sequence[~BlockDeviceResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6596 | ''' |
| 6597 | # map input types to rpc msg |
| 6598 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6599 | msg = dict(type='StorageProvisioner', |
| 6600 | request='VolumeBlockDevices', |
| 6601 | version=3, |
| 6602 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6603 | _params['ids'] = ids |
| 6604 | reply = await self.rpc(msg) |
| 6605 | return reply |
| 6606 | |
| 6607 | |
| 6608 | |
| 6609 | @ReturnMapping(VolumeParamsResults) |
| 6610 | async def VolumeParams(self, entities): |
| 6611 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6612 | entities : typing.Sequence[~Entity] |
| 6613 | Returns -> typing.Sequence[~VolumeParamsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6614 | ''' |
| 6615 | # map input types to rpc msg |
| 6616 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6617 | msg = dict(type='StorageProvisioner', |
| 6618 | request='VolumeParams', |
| 6619 | version=3, |
| 6620 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6621 | _params['entities'] = entities |
| 6622 | reply = await self.rpc(msg) |
| 6623 | return reply |
| 6624 | |
| 6625 | |
| 6626 | |
| 6627 | @ReturnMapping(VolumeResults) |
| 6628 | async def Volumes(self, entities): |
| 6629 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6630 | entities : typing.Sequence[~Entity] |
| 6631 | Returns -> typing.Sequence[~VolumeResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6632 | ''' |
| 6633 | # map input types to rpc msg |
| 6634 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6635 | msg = dict(type='StorageProvisioner', |
| 6636 | request='Volumes', |
| 6637 | version=3, |
| 6638 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6639 | _params['entities'] = entities |
| 6640 | reply = await self.rpc(msg) |
| 6641 | return reply |
| 6642 | |
| 6643 | |
| 6644 | |
| 6645 | @ReturnMapping(NotifyWatchResults) |
| 6646 | async def WatchBlockDevices(self, entities): |
| 6647 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6648 | entities : typing.Sequence[~Entity] |
| 6649 | Returns -> typing.Sequence[~NotifyWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6650 | ''' |
| 6651 | # map input types to rpc msg |
| 6652 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6653 | msg = dict(type='StorageProvisioner', |
| 6654 | request='WatchBlockDevices', |
| 6655 | version=3, |
| 6656 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6657 | _params['entities'] = entities |
| 6658 | reply = await self.rpc(msg) |
| 6659 | return reply |
| 6660 | |
| 6661 | |
| 6662 | |
| 6663 | @ReturnMapping(MachineStorageIdsWatchResults) |
| 6664 | async def WatchFilesystemAttachments(self, entities): |
| 6665 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6666 | entities : typing.Sequence[~Entity] |
| 6667 | Returns -> typing.Sequence[~MachineStorageIdsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6668 | ''' |
| 6669 | # map input types to rpc msg |
| 6670 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6671 | msg = dict(type='StorageProvisioner', |
| 6672 | request='WatchFilesystemAttachments', |
| 6673 | version=3, |
| 6674 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6675 | _params['entities'] = entities |
| 6676 | reply = await self.rpc(msg) |
| 6677 | return reply |
| 6678 | |
| 6679 | |
| 6680 | |
| 6681 | @ReturnMapping(StringsWatchResults) |
| 6682 | async def WatchFilesystems(self, entities): |
| 6683 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6684 | entities : typing.Sequence[~Entity] |
| 6685 | Returns -> typing.Sequence[~StringsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6686 | ''' |
| 6687 | # map input types to rpc msg |
| 6688 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6689 | msg = dict(type='StorageProvisioner', |
| 6690 | request='WatchFilesystems', |
| 6691 | version=3, |
| 6692 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6693 | _params['entities'] = entities |
| 6694 | reply = await self.rpc(msg) |
| 6695 | return reply |
| 6696 | |
| 6697 | |
| 6698 | |
| 6699 | @ReturnMapping(NotifyWatchResults) |
| 6700 | async def WatchMachines(self, entities): |
| 6701 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6702 | entities : typing.Sequence[~Entity] |
| 6703 | Returns -> typing.Sequence[~NotifyWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6704 | ''' |
| 6705 | # map input types to rpc msg |
| 6706 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6707 | msg = dict(type='StorageProvisioner', |
| 6708 | request='WatchMachines', |
| 6709 | version=3, |
| 6710 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6711 | _params['entities'] = entities |
| 6712 | reply = await self.rpc(msg) |
| 6713 | return reply |
| 6714 | |
| 6715 | |
| 6716 | |
| 6717 | @ReturnMapping(MachineStorageIdsWatchResults) |
| 6718 | async def WatchVolumeAttachments(self, entities): |
| 6719 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6720 | entities : typing.Sequence[~Entity] |
| 6721 | Returns -> typing.Sequence[~MachineStorageIdsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6722 | ''' |
| 6723 | # map input types to rpc msg |
| 6724 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6725 | msg = dict(type='StorageProvisioner', |
| 6726 | request='WatchVolumeAttachments', |
| 6727 | version=3, |
| 6728 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6729 | _params['entities'] = entities |
| 6730 | reply = await self.rpc(msg) |
| 6731 | return reply |
| 6732 | |
| 6733 | |
| 6734 | |
| 6735 | @ReturnMapping(StringsWatchResults) |
| 6736 | async def WatchVolumes(self, entities): |
| 6737 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6738 | entities : typing.Sequence[~Entity] |
| 6739 | Returns -> typing.Sequence[~StringsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6740 | ''' |
| 6741 | # map input types to rpc msg |
| 6742 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 6743 | msg = dict(type='StorageProvisioner', |
| 6744 | request='WatchVolumes', |
| 6745 | version=3, |
| 6746 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6747 | _params['entities'] = entities |
| 6748 | reply = await self.rpc(msg) |
| 6749 | return reply |