| 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 | |
| 8 | class AgentToolsFacade(Type): |
| 9 | name = 'AgentTools' |
| 10 | version = 1 |
| 11 | schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'} |
| 12 | |
| 13 | |
| 14 | @ReturnMapping(None) |
| 15 | async def UpdateToolsAvailable(self): |
| 16 | ''' |
| 17 | |
| 18 | Returns -> None |
| 19 | ''' |
| 20 | # map input types to rpc msg |
| 21 | _params = dict() |
| 22 | msg = dict(type='AgentTools', request='UpdateToolsAvailable', version=1, params=_params) |
| 23 | |
| 24 | reply = await self.rpc(msg) |
| 25 | return reply |
| 26 | |
| 27 | |
| 28 | |
| 29 | class AllWatcherFacade(Type): |
| 30 | name = 'AllWatcher' |
| 31 | version = 1 |
| 32 | schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False, |
| 33 | 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'}, |
| 34 | 'type': 'array'}}, |
| 35 | 'required': ['deltas'], |
| 36 | 'type': 'object'}, |
| 37 | 'Delta': {'additionalProperties': False, |
| 38 | 'properties': {'entity': {'additionalProperties': True, |
| 39 | 'type': 'object'}, |
| 40 | 'removed': {'type': 'boolean'}}, |
| 41 | 'required': ['removed', 'entity'], |
| 42 | 'type': 'object'}}, |
| 43 | 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}}, |
| 44 | 'type': 'object'}, |
| 45 | 'Stop': {'type': 'object'}}, |
| 46 | 'type': 'object'} |
| 47 | |
| 48 | |
| 49 | @ReturnMapping(AllWatcherNextResults) |
| 50 | async def Next(self): |
| 51 | ''' |
| 52 | |
| 53 | Returns -> typing.Sequence<+T_co>[~Delta]<~Delta> |
| 54 | ''' |
| 55 | # map input types to rpc msg |
| 56 | _params = dict() |
| 57 | msg = dict(type='AllWatcher', request='Next', version=1, params=_params) |
| 58 | |
| 59 | reply = await self.rpc(msg) |
| 60 | return reply |
| 61 | |
| 62 | |
| 63 | |
| 64 | @ReturnMapping(None) |
| 65 | async def Stop(self): |
| 66 | ''' |
| 67 | |
| 68 | Returns -> None |
| 69 | ''' |
| 70 | # map input types to rpc msg |
| 71 | _params = dict() |
| 72 | msg = dict(type='AllWatcher', request='Stop', version=1, params=_params) |
| 73 | |
| 74 | reply = await self.rpc(msg) |
| 75 | return reply |
| 76 | |
| 77 | |
| 78 | |
| 79 | class ApplicationRelationsWatcherFacade(Type): |
| 80 | name = 'ApplicationRelationsWatcher' |
| 81 | version = 1 |
| 82 | schema = {'definitions': {'ApplicationRelationsChange': {'additionalProperties': False, |
| 83 | 'properties': {'changed': {'items': {'$ref': '#/definitions/RelationChange'}, |
| 84 | 'type': 'array'}, |
| 85 | 'removed': {'items': {'type': 'integer'}, |
| 86 | 'type': 'array'}}, |
| 87 | 'type': 'object'}, |
| 88 | 'ApplicationRelationsWatchResult': {'additionalProperties': False, |
| 89 | 'properties': {'ApplicationRelationsWatcherId': {'type': 'string'}, |
| 90 | 'changes': {'$ref': '#/definitions/ApplicationRelationsChange'}, |
| 91 | 'error': {'$ref': '#/definitions/Error'}}, |
| 92 | 'required': ['ApplicationRelationsWatcherId'], |
| 93 | 'type': 'object'}, |
| 94 | 'Error': {'additionalProperties': False, |
| 95 | 'properties': {'code': {'type': 'string'}, |
| 96 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 97 | 'message': {'type': 'string'}}, |
| 98 | 'required': ['message', 'code'], |
| 99 | 'type': 'object'}, |
| 100 | 'ErrorInfo': {'additionalProperties': False, |
| 101 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 102 | 'macaroon-path': {'type': 'string'}}, |
| 103 | 'type': 'object'}, |
| 104 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 105 | 'RelationChange': {'additionalProperties': False, |
| 106 | 'properties': {'changedunits': {'patternProperties': {'.*': {'$ref': '#/definitions/RelationUnitChange'}}, |
| 107 | 'type': 'object'}, |
| 108 | 'departedunits': {'items': {'type': 'string'}, |
| 109 | 'type': 'array'}, |
| 110 | 'id': {'type': 'integer'}, |
| 111 | 'life': {'type': 'string'}}, |
| 112 | 'required': ['id', 'life'], |
| 113 | 'type': 'object'}, |
| 114 | 'RelationUnitChange': {'additionalProperties': False, |
| 115 | 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True, |
| 116 | 'type': 'object'}}, |
| 117 | 'type': 'object'}}, |
| 118 | 'type': 'object'}}, |
| 119 | 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/ApplicationRelationsWatchResult'}}, |
| 120 | 'type': 'object'}, |
| 121 | 'Stop': {'type': 'object'}}, |
| 122 | 'type': 'object'} |
| 123 | |
| 124 | |
| 125 | @ReturnMapping(ApplicationRelationsWatchResult) |
| 126 | async def Next(self): |
| 127 | ''' |
| 128 | |
| 129 | Returns -> typing.Union[str, _ForwardRef('ApplicationRelationsChange'), _ForwardRef('Error')] |
| 130 | ''' |
| 131 | # map input types to rpc msg |
| 132 | _params = dict() |
| 133 | msg = dict(type='ApplicationRelationsWatcher', request='Next', version=1, params=_params) |
| 134 | |
| 135 | reply = await self.rpc(msg) |
| 136 | return reply |
| 137 | |
| 138 | |
| 139 | |
| 140 | @ReturnMapping(None) |
| 141 | async def Stop(self): |
| 142 | ''' |
| 143 | |
| 144 | Returns -> None |
| 145 | ''' |
| 146 | # map input types to rpc msg |
| 147 | _params = dict() |
| 148 | msg = dict(type='ApplicationRelationsWatcher', request='Stop', version=1, params=_params) |
| 149 | |
| 150 | reply = await self.rpc(msg) |
| 151 | return reply |
| 152 | |
| 153 | |
| 154 | |
| 155 | class ApplicationScalerFacade(Type): |
| 156 | name = 'ApplicationScaler' |
| 157 | version = 1 |
| 158 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 159 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 160 | 'type': 'array'}}, |
| 161 | 'required': ['entities'], |
| 162 | 'type': 'object'}, |
| 163 | 'Entity': {'additionalProperties': False, |
| 164 | 'properties': {'tag': {'type': 'string'}}, |
| 165 | 'required': ['tag'], |
| 166 | 'type': 'object'}, |
| 167 | 'Error': {'additionalProperties': False, |
| 168 | 'properties': {'code': {'type': 'string'}, |
| 169 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 170 | 'message': {'type': 'string'}}, |
| 171 | 'required': ['message', 'code'], |
| 172 | 'type': 'object'}, |
| 173 | 'ErrorInfo': {'additionalProperties': False, |
| 174 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 175 | 'macaroon-path': {'type': 'string'}}, |
| 176 | 'type': 'object'}, |
| 177 | 'ErrorResult': {'additionalProperties': False, |
| 178 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 179 | 'type': 'object'}, |
| 180 | 'ErrorResults': {'additionalProperties': False, |
| 181 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 182 | 'type': 'array'}}, |
| 183 | 'required': ['results'], |
| 184 | 'type': 'object'}, |
| 185 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 186 | 'StringsWatchResult': {'additionalProperties': False, |
| 187 | 'properties': {'changes': {'items': {'type': 'string'}, |
| 188 | 'type': 'array'}, |
| 189 | 'error': {'$ref': '#/definitions/Error'}, |
| 190 | 'watcher-id': {'type': 'string'}}, |
| 191 | 'required': ['watcher-id'], |
| 192 | 'type': 'object'}}, |
| 193 | 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 194 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 195 | 'type': 'object'}, |
| 196 | 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, |
| 197 | 'type': 'object'}}, |
| 198 | 'type': 'object'} |
| 199 | |
| 200 | |
| 201 | @ReturnMapping(ErrorResults) |
| 202 | async def Rescale(self, entities): |
| 203 | ''' |
| 204 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 205 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 206 | ''' |
| 207 | # map input types to rpc msg |
| 208 | _params = dict() |
| 209 | msg = dict(type='ApplicationScaler', request='Rescale', version=1, params=_params) |
| 210 | _params['entities'] = entities |
| 211 | reply = await self.rpc(msg) |
| 212 | return reply |
| 213 | |
| 214 | |
| 215 | |
| 216 | @ReturnMapping(StringsWatchResult) |
| 217 | async def Watch(self): |
| 218 | ''' |
| 219 | |
| 220 | Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')] |
| 221 | ''' |
| 222 | # map input types to rpc msg |
| 223 | _params = dict() |
| 224 | msg = dict(type='ApplicationScaler', request='Watch', version=1, params=_params) |
| 225 | |
| 226 | reply = await self.rpc(msg) |
| 227 | return reply |
| 228 | |
| 229 | |
| 230 | |
| 231 | class BackupsFacade(Type): |
| 232 | name = 'Backups' |
| 233 | version = 1 |
| 234 | schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False, |
| 235 | 'properties': {'notes': {'type': 'string'}}, |
| 236 | 'required': ['notes'], |
| 237 | 'type': 'object'}, |
| 238 | 'BackupsInfoArgs': {'additionalProperties': False, |
| 239 | 'properties': {'id': {'type': 'string'}}, |
| 240 | 'required': ['id'], |
| 241 | 'type': 'object'}, |
| 242 | 'BackupsListArgs': {'additionalProperties': False, |
| 243 | 'type': 'object'}, |
| 244 | 'BackupsListResult': {'additionalProperties': False, |
| 245 | 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'}, |
| 246 | 'type': 'array'}}, |
| 247 | 'required': ['list'], |
| 248 | 'type': 'object'}, |
| 249 | 'BackupsMetadataResult': {'additionalProperties': False, |
| 250 | 'properties': {'ca-cert': {'type': 'string'}, |
| 251 | 'ca-private-key': {'type': 'string'}, |
| 252 | 'checksum': {'type': 'string'}, |
| 253 | 'checksum-format': {'type': 'string'}, |
| 254 | 'finished': {'format': 'date-time', |
| 255 | 'type': 'string'}, |
| 256 | 'hostname': {'type': 'string'}, |
| 257 | 'id': {'type': 'string'}, |
| 258 | 'machine': {'type': 'string'}, |
| 259 | 'model': {'type': 'string'}, |
| 260 | 'notes': {'type': 'string'}, |
| 261 | 'series': {'type': 'string'}, |
| 262 | 'size': {'type': 'integer'}, |
| 263 | 'started': {'format': 'date-time', |
| 264 | 'type': 'string'}, |
| 265 | 'stored': {'format': 'date-time', |
| 266 | 'type': 'string'}, |
| 267 | 'version': {'$ref': '#/definitions/Number'}}, |
| 268 | 'required': ['id', |
| 269 | 'checksum', |
| 270 | 'checksum-format', |
| 271 | 'size', |
| 272 | 'stored', |
| 273 | 'started', |
| 274 | 'finished', |
| 275 | 'notes', |
| 276 | 'model', |
| 277 | 'machine', |
| 278 | 'hostname', |
| 279 | 'version', |
| 280 | 'series', |
| 281 | 'ca-cert', |
| 282 | 'ca-private-key'], |
| 283 | 'type': 'object'}, |
| 284 | 'BackupsRemoveArgs': {'additionalProperties': False, |
| 285 | 'properties': {'id': {'type': 'string'}}, |
| 286 | 'required': ['id'], |
| 287 | 'type': 'object'}, |
| 288 | 'Number': {'additionalProperties': False, |
| 289 | 'properties': {'Build': {'type': 'integer'}, |
| 290 | 'Major': {'type': 'integer'}, |
| 291 | 'Minor': {'type': 'integer'}, |
| 292 | 'Patch': {'type': 'integer'}, |
| 293 | 'Tag': {'type': 'string'}}, |
| 294 | 'required': ['Major', |
| 295 | 'Minor', |
| 296 | 'Tag', |
| 297 | 'Patch', |
| 298 | 'Build'], |
| 299 | 'type': 'object'}, |
| 300 | 'RestoreArgs': {'additionalProperties': False, |
| 301 | 'properties': {'backup-id': {'type': 'string'}}, |
| 302 | 'required': ['backup-id'], |
| 303 | 'type': 'object'}}, |
| 304 | 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'}, |
| 305 | 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}}, |
| 306 | 'type': 'object'}, |
| 307 | 'FinishRestore': {'type': 'object'}, |
| 308 | 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'}, |
| 309 | 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}}, |
| 310 | 'type': 'object'}, |
| 311 | 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'}, |
| 312 | 'Result': {'$ref': '#/definitions/BackupsListResult'}}, |
| 313 | 'type': 'object'}, |
| 314 | 'PrepareRestore': {'type': 'object'}, |
| 315 | 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}}, |
| 316 | 'type': 'object'}, |
| 317 | 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}}, |
| 318 | 'type': 'object'}}, |
| 319 | 'type': 'object'} |
| 320 | |
| 321 | |
| 322 | @ReturnMapping(BackupsMetadataResult) |
| 323 | async def Create(self, notes): |
| 324 | ''' |
| 325 | notes : str |
| 326 | Returns -> typing.Union[str, int, _ForwardRef('Number')] |
| 327 | ''' |
| 328 | # map input types to rpc msg |
| 329 | _params = dict() |
| 330 | msg = dict(type='Backups', request='Create', version=1, params=_params) |
| 331 | _params['notes'] = notes |
| 332 | reply = await self.rpc(msg) |
| 333 | return reply |
| 334 | |
| 335 | |
| 336 | |
| 337 | @ReturnMapping(None) |
| 338 | async def FinishRestore(self): |
| 339 | ''' |
| 340 | |
| 341 | Returns -> None |
| 342 | ''' |
| 343 | # map input types to rpc msg |
| 344 | _params = dict() |
| 345 | msg = dict(type='Backups', request='FinishRestore', version=1, params=_params) |
| 346 | |
| 347 | reply = await self.rpc(msg) |
| 348 | return reply |
| 349 | |
| 350 | |
| 351 | |
| 352 | @ReturnMapping(BackupsMetadataResult) |
| 353 | async def Info(self, id_): |
| 354 | ''' |
| 355 | id_ : str |
| 356 | Returns -> typing.Union[str, int, _ForwardRef('Number')] |
| 357 | ''' |
| 358 | # map input types to rpc msg |
| 359 | _params = dict() |
| 360 | msg = dict(type='Backups', request='Info', version=1, params=_params) |
| 361 | _params['id'] = id_ |
| 362 | reply = await self.rpc(msg) |
| 363 | return reply |
| 364 | |
| 365 | |
| 366 | |
| 367 | @ReturnMapping(BackupsListResult) |
| 368 | async def List(self): |
| 369 | ''' |
| 370 | |
| 371 | Returns -> typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult> |
| 372 | ''' |
| 373 | # map input types to rpc msg |
| 374 | _params = dict() |
| 375 | msg = dict(type='Backups', request='List', version=1, params=_params) |
| 376 | |
| 377 | reply = await self.rpc(msg) |
| 378 | return reply |
| 379 | |
| 380 | |
| 381 | |
| 382 | @ReturnMapping(None) |
| 383 | async def PrepareRestore(self): |
| 384 | ''' |
| 385 | |
| 386 | Returns -> None |
| 387 | ''' |
| 388 | # map input types to rpc msg |
| 389 | _params = dict() |
| 390 | msg = dict(type='Backups', request='PrepareRestore', version=1, params=_params) |
| 391 | |
| 392 | reply = await self.rpc(msg) |
| 393 | return reply |
| 394 | |
| 395 | |
| 396 | |
| 397 | @ReturnMapping(None) |
| 398 | async def Remove(self, id_): |
| 399 | ''' |
| 400 | id_ : str |
| 401 | Returns -> None |
| 402 | ''' |
| 403 | # map input types to rpc msg |
| 404 | _params = dict() |
| 405 | msg = dict(type='Backups', request='Remove', version=1, params=_params) |
| 406 | _params['id'] = id_ |
| 407 | reply = await self.rpc(msg) |
| 408 | return reply |
| 409 | |
| 410 | |
| 411 | |
| 412 | @ReturnMapping(None) |
| 413 | async def Restore(self, backup_id): |
| 414 | ''' |
| 415 | backup_id : str |
| 416 | Returns -> None |
| 417 | ''' |
| 418 | # map input types to rpc msg |
| 419 | _params = dict() |
| 420 | msg = dict(type='Backups', request='Restore', version=1, params=_params) |
| 421 | _params['backup-id'] = backup_id |
| 422 | reply = await self.rpc(msg) |
| 423 | return reply |
| 424 | |
| 425 | |
| 426 | |
| 427 | class BundleFacade(Type): |
| 428 | name = 'Bundle' |
| 429 | version = 1 |
| 430 | schema = {'definitions': {'BundleChange': {'additionalProperties': False, |
| 431 | 'properties': {'args': {'items': {'additionalProperties': True, |
| 432 | 'type': 'object'}, |
| 433 | 'type': 'array'}, |
| 434 | 'id': {'type': 'string'}, |
| 435 | 'method': {'type': 'string'}, |
| 436 | 'requires': {'items': {'type': 'string'}, |
| 437 | 'type': 'array'}}, |
| 438 | 'required': ['id', |
| 439 | 'method', |
| 440 | 'args', |
| 441 | 'requires'], |
| 442 | 'type': 'object'}, |
| 443 | 'BundleChangesParams': {'additionalProperties': False, |
| 444 | 'properties': {'yaml': {'type': 'string'}}, |
| 445 | 'required': ['yaml'], |
| 446 | 'type': 'object'}, |
| 447 | 'BundleChangesResults': {'additionalProperties': False, |
| 448 | 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'}, |
| 449 | 'type': 'array'}, |
| 450 | 'errors': {'items': {'type': 'string'}, |
| 451 | 'type': 'array'}}, |
| 452 | 'type': 'object'}}, |
| 453 | 'properties': {'GetChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'}, |
| 454 | 'Result': {'$ref': '#/definitions/BundleChangesResults'}}, |
| 455 | 'type': 'object'}}, |
| 456 | 'type': 'object'} |
| 457 | |
| 458 | |
| 459 | @ReturnMapping(BundleChangesResults) |
| 460 | async def GetChanges(self, yaml): |
| 461 | ''' |
| 462 | yaml : str |
| 463 | Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange> |
| 464 | ''' |
| 465 | # map input types to rpc msg |
| 466 | _params = dict() |
| 467 | msg = dict(type='Bundle', request='GetChanges', version=1, params=_params) |
| 468 | _params['yaml'] = yaml |
| 469 | reply = await self.rpc(msg) |
| 470 | return reply |
| 471 | |
| 472 | |
| 473 | |
| 474 | class ClientFacade(Type): |
| 475 | name = 'Client' |
| 476 | version = 1 |
| 477 | schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, |
| 478 | 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, |
| 479 | 'type': 'array'}, |
| 480 | 'type': 'array'}}, |
| 481 | 'required': ['servers'], |
| 482 | 'type': 'object'}, |
| 483 | 'AddCharm': {'additionalProperties': False, |
| 484 | 'properties': {'channel': {'type': 'string'}, |
| 485 | 'url': {'type': 'string'}}, |
| 486 | 'required': ['url', 'channel'], |
| 487 | 'type': 'object'}, |
| 488 | 'AddCharmWithAuthorization': {'additionalProperties': False, |
| 489 | 'properties': {'channel': {'type': 'string'}, |
| 490 | 'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 491 | 'url': {'type': 'string'}}, |
| 492 | 'required': ['url', |
| 493 | 'channel', |
| 494 | 'macaroon'], |
| 495 | 'type': 'object'}, |
| 496 | 'AddMachineParams': {'additionalProperties': False, |
| 497 | 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, |
| 498 | 'type': 'array'}, |
| 499 | 'constraints': {'$ref': '#/definitions/Value'}, |
| 500 | 'container-type': {'type': 'string'}, |
| 501 | 'disks': {'items': {'$ref': '#/definitions/Constraints'}, |
| 502 | 'type': 'array'}, |
| 503 | 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'}, |
| 504 | 'instance-id': {'type': 'string'}, |
| 505 | 'jobs': {'items': {'type': 'string'}, |
| 506 | 'type': 'array'}, |
| 507 | 'nonce': {'type': 'string'}, |
| 508 | 'parent-id': {'type': 'string'}, |
| 509 | 'placement': {'$ref': '#/definitions/Placement'}, |
| 510 | 'series': {'type': 'string'}}, |
| 511 | 'required': ['series', |
| 512 | 'constraints', |
| 513 | 'jobs', |
| 514 | 'parent-id', |
| 515 | 'container-type', |
| 516 | 'instance-id', |
| 517 | 'nonce', |
| 518 | 'hardware-characteristics', |
| 519 | 'addresses'], |
| 520 | 'type': 'object'}, |
| 521 | 'AddMachines': {'additionalProperties': False, |
| 522 | 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'}, |
| 523 | 'type': 'array'}}, |
| 524 | 'required': ['params'], |
| 525 | 'type': 'object'}, |
| 526 | 'AddMachinesResult': {'additionalProperties': False, |
| 527 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 528 | 'machine': {'type': 'string'}}, |
| 529 | 'required': ['machine'], |
| 530 | 'type': 'object'}, |
| 531 | 'AddMachinesResults': {'additionalProperties': False, |
| 532 | 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'}, |
| 533 | 'type': 'array'}}, |
| 534 | 'required': ['machines'], |
| 535 | 'type': 'object'}, |
| 536 | 'Address': {'additionalProperties': False, |
| 537 | 'properties': {'scope': {'type': 'string'}, |
| 538 | 'space-name': {'type': 'string'}, |
| 539 | 'type': {'type': 'string'}, |
| 540 | 'value': {'type': 'string'}}, |
| 541 | 'required': ['value', 'type', 'scope'], |
| 542 | 'type': 'object'}, |
| 543 | 'AgentVersionResult': {'additionalProperties': False, |
| 544 | 'properties': {'version': {'$ref': '#/definitions/Number'}}, |
| 545 | 'required': ['version'], |
| 546 | 'type': 'object'}, |
| 547 | 'AllWatcherId': {'additionalProperties': False, |
| 548 | 'properties': {'watcher-id': {'type': 'string'}}, |
| 549 | 'required': ['watcher-id'], |
| 550 | 'type': 'object'}, |
| 551 | 'ApplicationStatus': {'additionalProperties': False, |
| 552 | 'properties': {'can-upgrade-to': {'type': 'string'}, |
| 553 | 'charm': {'type': 'string'}, |
| 554 | 'err': {'additionalProperties': True, |
| 555 | 'type': 'object'}, |
| 556 | 'exposed': {'type': 'boolean'}, |
| 557 | 'life': {'type': 'string'}, |
| 558 | 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}}, |
| 559 | 'type': 'object'}, |
| 560 | 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'}, |
| 561 | 'type': 'array'}}, |
| 562 | 'type': 'object'}, |
| 563 | 'series': {'type': 'string'}, |
| 564 | 'status': {'$ref': '#/definitions/DetailedStatus'}, |
| 565 | 'subordinate-to': {'items': {'type': 'string'}, |
| 566 | 'type': 'array'}, |
| 567 | 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}}, |
| 568 | 'type': 'object'}, |
| 569 | 'workload-version': {'type': 'string'}}, |
| 570 | 'required': ['charm', |
| 571 | 'series', |
| 572 | 'exposed', |
| 573 | 'life', |
| 574 | 'relations', |
| 575 | 'can-upgrade-to', |
| 576 | 'subordinate-to', |
| 577 | 'units', |
| 578 | 'meter-statuses', |
| 579 | 'status', |
| 580 | 'workload-version'], |
| 581 | 'type': 'object'}, |
| 582 | 'Binary': {'additionalProperties': False, |
| 583 | 'properties': {'Arch': {'type': 'string'}, |
| 584 | 'Number': {'$ref': '#/definitions/Number'}, |
| 585 | 'Series': {'type': 'string'}}, |
| 586 | 'required': ['Number', 'Series', 'Arch'], |
| 587 | 'type': 'object'}, |
| 588 | 'BundleChange': {'additionalProperties': False, |
| 589 | 'properties': {'args': {'items': {'additionalProperties': True, |
| 590 | 'type': 'object'}, |
| 591 | 'type': 'array'}, |
| 592 | 'id': {'type': 'string'}, |
| 593 | 'method': {'type': 'string'}, |
| 594 | 'requires': {'items': {'type': 'string'}, |
| 595 | 'type': 'array'}}, |
| 596 | 'required': ['id', |
| 597 | 'method', |
| 598 | 'args', |
| 599 | 'requires'], |
| 600 | 'type': 'object'}, |
| 601 | 'BundleChangesParams': {'additionalProperties': False, |
| 602 | 'properties': {'yaml': {'type': 'string'}}, |
| 603 | 'required': ['yaml'], |
| 604 | 'type': 'object'}, |
| 605 | 'BundleChangesResults': {'additionalProperties': False, |
| 606 | 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'}, |
| 607 | 'type': 'array'}, |
| 608 | 'errors': {'items': {'type': 'string'}, |
| 609 | 'type': 'array'}}, |
| 610 | 'type': 'object'}, |
| 611 | 'BytesResult': {'additionalProperties': False, |
| 612 | 'properties': {'result': {'items': {'type': 'integer'}, |
| 613 | 'type': 'array'}}, |
| 614 | 'required': ['result'], |
| 615 | 'type': 'object'}, |
| 616 | 'ConfigValue': {'additionalProperties': False, |
| 617 | 'properties': {'source': {'type': 'string'}, |
| 618 | 'value': {'additionalProperties': True, |
| 619 | 'type': 'object'}}, |
| 620 | 'required': ['value', 'source'], |
| 621 | 'type': 'object'}, |
| 622 | 'Constraints': {'additionalProperties': False, |
| 623 | 'properties': {'Count': {'type': 'integer'}, |
| 624 | 'Pool': {'type': 'string'}, |
| 625 | 'Size': {'type': 'integer'}}, |
| 626 | 'required': ['Pool', 'Size', 'Count'], |
| 627 | 'type': 'object'}, |
| 628 | 'DestroyMachines': {'additionalProperties': False, |
| 629 | 'properties': {'force': {'type': 'boolean'}, |
| 630 | 'machine-names': {'items': {'type': 'string'}, |
| 631 | 'type': 'array'}}, |
| 632 | 'required': ['machine-names', 'force'], |
| 633 | 'type': 'object'}, |
| 634 | 'DetailedStatus': {'additionalProperties': False, |
| 635 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 636 | 'type': 'object'}}, |
| 637 | 'type': 'object'}, |
| 638 | 'err': {'additionalProperties': True, |
| 639 | 'type': 'object'}, |
| 640 | 'info': {'type': 'string'}, |
| 641 | 'kind': {'type': 'string'}, |
| 642 | 'life': {'type': 'string'}, |
| 643 | 'since': {'format': 'date-time', |
| 644 | 'type': 'string'}, |
| 645 | 'status': {'type': 'string'}, |
| 646 | 'version': {'type': 'string'}}, |
| 647 | 'required': ['status', |
| 648 | 'info', |
| 649 | 'data', |
| 650 | 'since', |
| 651 | 'kind', |
| 652 | 'version', |
| 653 | 'life'], |
| 654 | 'type': 'object'}, |
| 655 | 'EndpointStatus': {'additionalProperties': False, |
| 656 | 'properties': {'application': {'type': 'string'}, |
| 657 | 'name': {'type': 'string'}, |
| 658 | 'role': {'type': 'string'}, |
| 659 | 'subordinate': {'type': 'boolean'}}, |
| 660 | 'required': ['application', |
| 661 | 'name', |
| 662 | 'role', |
| 663 | 'subordinate'], |
| 664 | 'type': 'object'}, |
| 665 | 'Entities': {'additionalProperties': False, |
| 666 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 667 | 'type': 'array'}}, |
| 668 | 'required': ['entities'], |
| 669 | 'type': 'object'}, |
| 670 | 'Entity': {'additionalProperties': False, |
| 671 | 'properties': {'tag': {'type': 'string'}}, |
| 672 | 'required': ['tag'], |
| 673 | 'type': 'object'}, |
| 674 | 'EntityStatus': {'additionalProperties': False, |
| 675 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 676 | 'type': 'object'}}, |
| 677 | 'type': 'object'}, |
| 678 | 'info': {'type': 'string'}, |
| 679 | 'since': {'format': 'date-time', |
| 680 | 'type': 'string'}, |
| 681 | 'status': {'type': 'string'}}, |
| 682 | 'required': ['status', 'info', 'since'], |
| 683 | 'type': 'object'}, |
| 684 | 'Error': {'additionalProperties': False, |
| 685 | 'properties': {'code': {'type': 'string'}, |
| 686 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 687 | 'message': {'type': 'string'}}, |
| 688 | 'required': ['message', 'code'], |
| 689 | 'type': 'object'}, |
| 690 | 'ErrorInfo': {'additionalProperties': False, |
| 691 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 692 | 'macaroon-path': {'type': 'string'}}, |
| 693 | 'type': 'object'}, |
| 694 | 'ErrorResult': {'additionalProperties': False, |
| 695 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 696 | 'type': 'object'}, |
| 697 | 'ErrorResults': {'additionalProperties': False, |
| 698 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 699 | 'type': 'array'}}, |
| 700 | 'required': ['results'], |
| 701 | 'type': 'object'}, |
| 702 | 'FindToolsParams': {'additionalProperties': False, |
| 703 | 'properties': {'arch': {'type': 'string'}, |
| 704 | 'major': {'type': 'integer'}, |
| 705 | 'minor': {'type': 'integer'}, |
| 706 | 'number': {'$ref': '#/definitions/Number'}, |
| 707 | 'series': {'type': 'string'}}, |
| 708 | 'required': ['number', |
| 709 | 'major', |
| 710 | 'minor', |
| 711 | 'arch', |
| 712 | 'series'], |
| 713 | 'type': 'object'}, |
| 714 | 'FindToolsResult': {'additionalProperties': False, |
| 715 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 716 | 'list': {'items': {'$ref': '#/definitions/Tools'}, |
| 717 | 'type': 'array'}}, |
| 718 | 'required': ['list'], |
| 719 | 'type': 'object'}, |
| 720 | 'FullStatus': {'additionalProperties': False, |
| 721 | 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}}, |
| 722 | 'type': 'object'}, |
| 723 | 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}}, |
| 724 | 'type': 'object'}, |
| 725 | 'model': {'$ref': '#/definitions/ModelStatusInfo'}, |
| 726 | 'relations': {'items': {'$ref': '#/definitions/RelationStatus'}, |
| 727 | 'type': 'array'}, |
| 728 | 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}}, |
| 729 | 'type': 'object'}}, |
| 730 | 'required': ['model', |
| 731 | 'machines', |
| 732 | 'applications', |
| 733 | 'remote-applications', |
| 734 | 'relations'], |
| 735 | 'type': 'object'}, |
| 736 | 'GetConstraintsResults': {'additionalProperties': False, |
| 737 | 'properties': {'constraints': {'$ref': '#/definitions/Value'}}, |
| 738 | 'required': ['constraints'], |
| 739 | 'type': 'object'}, |
| 740 | 'HardwareCharacteristics': {'additionalProperties': False, |
| 741 | 'properties': {'arch': {'type': 'string'}, |
| 742 | 'availability-zone': {'type': 'string'}, |
| 743 | 'cpu-cores': {'type': 'integer'}, |
| 744 | 'cpu-power': {'type': 'integer'}, |
| 745 | 'mem': {'type': 'integer'}, |
| 746 | 'root-disk': {'type': 'integer'}, |
| 747 | 'tags': {'items': {'type': 'string'}, |
| 748 | 'type': 'array'}}, |
| 749 | 'type': 'object'}, |
| 750 | 'History': {'additionalProperties': False, |
| 751 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 752 | 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'}, |
| 753 | 'type': 'array'}}, |
| 754 | 'required': ['statuses'], |
| 755 | 'type': 'object'}, |
| 756 | 'HostPort': {'additionalProperties': False, |
| 757 | 'properties': {'Address': {'$ref': '#/definitions/Address'}, |
| 758 | 'port': {'type': 'integer'}}, |
| 759 | 'required': ['Address', 'port'], |
| 760 | 'type': 'object'}, |
| 761 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 762 | 'MachineHardware': {'additionalProperties': False, |
| 763 | 'properties': {'arch': {'type': 'string'}, |
| 764 | 'availability-zone': {'type': 'string'}, |
| 765 | 'cores': {'type': 'integer'}, |
| 766 | 'cpu-power': {'type': 'integer'}, |
| 767 | 'mem': {'type': 'integer'}, |
| 768 | 'root-disk': {'type': 'integer'}, |
| 769 | 'tags': {'items': {'type': 'string'}, |
| 770 | 'type': 'array'}}, |
| 771 | 'type': 'object'}, |
| 772 | 'MachineStatus': {'additionalProperties': False, |
| 773 | 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'}, |
| 774 | 'constraints': {'type': 'string'}, |
| 775 | 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}}, |
| 776 | 'type': 'object'}, |
| 777 | 'dns-name': {'type': 'string'}, |
| 778 | 'hardware': {'type': 'string'}, |
| 779 | 'has-vote': {'type': 'boolean'}, |
| 780 | 'id': {'type': 'string'}, |
| 781 | 'instance-id': {'type': 'string'}, |
| 782 | 'instance-status': {'$ref': '#/definitions/DetailedStatus'}, |
| 783 | 'ip-addresses': {'items': {'type': 'string'}, |
| 784 | 'type': 'array'}, |
| 785 | 'jobs': {'items': {'type': 'string'}, |
| 786 | 'type': 'array'}, |
| 787 | 'network-interfaces': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInterface'}}, |
| 788 | 'type': 'object'}, |
| 789 | 'series': {'type': 'string'}, |
| 790 | 'wants-vote': {'type': 'boolean'}}, |
| 791 | 'required': ['agent-status', |
| 792 | 'instance-status', |
| 793 | 'dns-name', |
| 794 | 'instance-id', |
| 795 | 'series', |
| 796 | 'id', |
| 797 | 'containers', |
| 798 | 'constraints', |
| 799 | 'hardware', |
| 800 | 'jobs', |
| 801 | 'has-vote', |
| 802 | 'wants-vote'], |
| 803 | 'type': 'object'}, |
| 804 | 'MeterStatus': {'additionalProperties': False, |
| 805 | 'properties': {'color': {'type': 'string'}, |
| 806 | 'message': {'type': 'string'}}, |
| 807 | 'required': ['color', 'message'], |
| 808 | 'type': 'object'}, |
| 809 | 'ModelConfigResults': {'additionalProperties': False, |
| 810 | 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}}, |
| 811 | 'type': 'object'}}, |
| 812 | 'required': ['config'], |
| 813 | 'type': 'object'}, |
| 814 | 'ModelInfo': {'additionalProperties': False, |
| 815 | 'properties': {'agent-version': {'$ref': '#/definitions/Number'}, |
| 816 | 'cloud-credential-tag': {'type': 'string'}, |
| 817 | 'cloud-region': {'type': 'string'}, |
| 818 | 'cloud-tag': {'type': 'string'}, |
| 819 | 'controller-uuid': {'type': 'string'}, |
| 820 | 'default-series': {'type': 'string'}, |
| 821 | 'life': {'type': 'string'}, |
| 822 | 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'}, |
| 823 | 'type': 'array'}, |
| 824 | 'migration': {'$ref': '#/definitions/ModelMigrationStatus'}, |
| 825 | 'name': {'type': 'string'}, |
| 826 | 'owner-tag': {'type': 'string'}, |
| 827 | 'provider-type': {'type': 'string'}, |
| 828 | 'sla': {'$ref': '#/definitions/ModelSLAInfo'}, |
| 829 | 'status': {'$ref': '#/definitions/EntityStatus'}, |
| 830 | 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'}, |
| 831 | 'type': 'array'}, |
| 832 | 'uuid': {'type': 'string'}}, |
| 833 | 'required': ['name', |
| 834 | 'uuid', |
| 835 | 'controller-uuid', |
| 836 | 'cloud-tag', |
| 837 | 'owner-tag', |
| 838 | 'life', |
| 839 | 'users', |
| 840 | 'machines', |
| 841 | 'sla', |
| 842 | 'agent-version'], |
| 843 | 'type': 'object'}, |
| 844 | 'ModelMachineInfo': {'additionalProperties': False, |
| 845 | 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'}, |
| 846 | 'has-vote': {'type': 'boolean'}, |
| 847 | 'id': {'type': 'string'}, |
| 848 | 'instance-id': {'type': 'string'}, |
| 849 | 'status': {'type': 'string'}, |
| 850 | 'wants-vote': {'type': 'boolean'}}, |
| 851 | 'required': ['id'], |
| 852 | 'type': 'object'}, |
| 853 | 'ModelMigrationStatus': {'additionalProperties': False, |
| 854 | 'properties': {'end': {'format': 'date-time', |
| 855 | 'type': 'string'}, |
| 856 | 'start': {'format': 'date-time', |
| 857 | 'type': 'string'}, |
| 858 | 'status': {'type': 'string'}}, |
| 859 | 'required': ['status', 'start'], |
| 860 | 'type': 'object'}, |
| 861 | 'ModelSLA': {'additionalProperties': False, |
| 862 | 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'}, |
| 863 | 'creds': {'items': {'type': 'integer'}, |
| 864 | 'type': 'array'}}, |
| 865 | 'required': ['ModelSLAInfo', 'creds'], |
| 866 | 'type': 'object'}, |
| 867 | 'ModelSLAInfo': {'additionalProperties': False, |
| 868 | 'properties': {'level': {'type': 'string'}, |
| 869 | 'owner': {'type': 'string'}}, |
| 870 | 'required': ['level', 'owner'], |
| 871 | 'type': 'object'}, |
| 872 | 'ModelSet': {'additionalProperties': False, |
| 873 | 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 874 | 'type': 'object'}}, |
| 875 | 'type': 'object'}}, |
| 876 | 'required': ['config'], |
| 877 | 'type': 'object'}, |
| 878 | 'ModelStatusInfo': {'additionalProperties': False, |
| 879 | 'properties': {'available-version': {'type': 'string'}, |
| 880 | 'cloud-tag': {'type': 'string'}, |
| 881 | 'meter-status': {'$ref': '#/definitions/MeterStatus'}, |
| 882 | 'model-status': {'$ref': '#/definitions/DetailedStatus'}, |
| 883 | 'name': {'type': 'string'}, |
| 884 | 'region': {'type': 'string'}, |
| 885 | 'sla': {'type': 'string'}, |
| 886 | 'version': {'type': 'string'}}, |
| 887 | 'required': ['name', |
| 888 | 'cloud-tag', |
| 889 | 'version', |
| 890 | 'available-version', |
| 891 | 'model-status', |
| 892 | 'meter-status', |
| 893 | 'sla'], |
| 894 | 'type': 'object'}, |
| 895 | 'ModelUnset': {'additionalProperties': False, |
| 896 | 'properties': {'keys': {'items': {'type': 'string'}, |
| 897 | 'type': 'array'}}, |
| 898 | 'required': ['keys'], |
| 899 | 'type': 'object'}, |
| 900 | 'ModelUserInfo': {'additionalProperties': False, |
| 901 | 'properties': {'access': {'type': 'string'}, |
| 902 | 'display-name': {'type': 'string'}, |
| 903 | 'last-connection': {'format': 'date-time', |
| 904 | 'type': 'string'}, |
| 905 | 'user': {'type': 'string'}}, |
| 906 | 'required': ['user', |
| 907 | 'display-name', |
| 908 | 'last-connection', |
| 909 | 'access'], |
| 910 | 'type': 'object'}, |
| 911 | 'ModelUserInfoResult': {'additionalProperties': False, |
| 912 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 913 | 'result': {'$ref': '#/definitions/ModelUserInfo'}}, |
| 914 | 'type': 'object'}, |
| 915 | 'ModelUserInfoResults': {'additionalProperties': False, |
| 916 | 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'}, |
| 917 | 'type': 'array'}}, |
| 918 | 'required': ['results'], |
| 919 | 'type': 'object'}, |
| 920 | 'NetworkInterface': {'additionalProperties': False, |
| 921 | 'properties': {'dns-nameservers': {'items': {'type': 'string'}, |
| 922 | 'type': 'array'}, |
| 923 | 'gateway': {'type': 'string'}, |
| 924 | 'ip-addresses': {'items': {'type': 'string'}, |
| 925 | 'type': 'array'}, |
| 926 | 'is-up': {'type': 'boolean'}, |
| 927 | 'mac-address': {'type': 'string'}, |
| 928 | 'space': {'type': 'string'}}, |
| 929 | 'required': ['ip-addresses', |
| 930 | 'mac-address', |
| 931 | 'is-up'], |
| 932 | 'type': 'object'}, |
| 933 | 'Number': {'additionalProperties': False, |
| 934 | 'properties': {'Build': {'type': 'integer'}, |
| 935 | 'Major': {'type': 'integer'}, |
| 936 | 'Minor': {'type': 'integer'}, |
| 937 | 'Patch': {'type': 'integer'}, |
| 938 | 'Tag': {'type': 'string'}}, |
| 939 | 'required': ['Major', |
| 940 | 'Minor', |
| 941 | 'Tag', |
| 942 | 'Patch', |
| 943 | 'Build'], |
| 944 | 'type': 'object'}, |
| 945 | 'Placement': {'additionalProperties': False, |
| 946 | 'properties': {'directive': {'type': 'string'}, |
| 947 | 'scope': {'type': 'string'}}, |
| 948 | 'required': ['scope', 'directive'], |
| 949 | 'type': 'object'}, |
| 950 | 'PrivateAddress': {'additionalProperties': False, |
| 951 | 'properties': {'target': {'type': 'string'}}, |
| 952 | 'required': ['target'], |
| 953 | 'type': 'object'}, |
| 954 | 'PrivateAddressResults': {'additionalProperties': False, |
| 955 | 'properties': {'private-address': {'type': 'string'}}, |
| 956 | 'required': ['private-address'], |
| 957 | 'type': 'object'}, |
| 958 | 'ProvisioningScriptParams': {'additionalProperties': False, |
| 959 | 'properties': {'data-dir': {'type': 'string'}, |
| 960 | 'disable-package-commands': {'type': 'boolean'}, |
| 961 | 'machine-id': {'type': 'string'}, |
| 962 | 'nonce': {'type': 'string'}}, |
| 963 | 'required': ['machine-id', |
| 964 | 'nonce', |
| 965 | 'data-dir', |
| 966 | 'disable-package-commands'], |
| 967 | 'type': 'object'}, |
| 968 | 'ProvisioningScriptResult': {'additionalProperties': False, |
| 969 | 'properties': {'script': {'type': 'string'}}, |
| 970 | 'required': ['script'], |
| 971 | 'type': 'object'}, |
| 972 | 'PublicAddress': {'additionalProperties': False, |
| 973 | 'properties': {'target': {'type': 'string'}}, |
| 974 | 'required': ['target'], |
| 975 | 'type': 'object'}, |
| 976 | 'PublicAddressResults': {'additionalProperties': False, |
| 977 | 'properties': {'public-address': {'type': 'string'}}, |
| 978 | 'required': ['public-address'], |
| 979 | 'type': 'object'}, |
| 980 | 'RelationStatus': {'additionalProperties': False, |
| 981 | 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'}, |
| 982 | 'type': 'array'}, |
| 983 | 'id': {'type': 'integer'}, |
| 984 | 'interface': {'type': 'string'}, |
| 985 | 'key': {'type': 'string'}, |
| 986 | 'scope': {'type': 'string'}}, |
| 987 | 'required': ['id', |
| 988 | 'key', |
| 989 | 'interface', |
| 990 | 'scope', |
| 991 | 'endpoints'], |
| 992 | 'type': 'object'}, |
| 993 | 'RemoteApplicationStatus': {'additionalProperties': False, |
| 994 | 'properties': {'application-name': {'type': 'string'}, |
| 995 | 'application-url': {'type': 'string'}, |
| 996 | 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'}, |
| 997 | 'type': 'array'}, |
| 998 | 'err': {'additionalProperties': True, |
| 999 | 'type': 'object'}, |
| 1000 | 'life': {'type': 'string'}, |
| 1001 | 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'}, |
| 1002 | 'type': 'array'}}, |
| 1003 | 'type': 'object'}, |
| 1004 | 'status': {'$ref': '#/definitions/DetailedStatus'}}, |
| 1005 | 'required': ['application-url', |
| 1006 | 'application-name', |
| 1007 | 'endpoints', |
| 1008 | 'life', |
| 1009 | 'relations', |
| 1010 | 'status'], |
| 1011 | 'type': 'object'}, |
| 1012 | 'RemoteEndpoint': {'additionalProperties': False, |
| 1013 | 'properties': {'interface': {'type': 'string'}, |
| 1014 | 'limit': {'type': 'integer'}, |
| 1015 | 'name': {'type': 'string'}, |
| 1016 | 'role': {'type': 'string'}, |
| 1017 | 'scope': {'type': 'string'}}, |
| 1018 | 'required': ['name', |
| 1019 | 'role', |
| 1020 | 'interface', |
| 1021 | 'limit', |
| 1022 | 'scope'], |
| 1023 | 'type': 'object'}, |
| 1024 | 'ResolveCharmResult': {'additionalProperties': False, |
| 1025 | 'properties': {'error': {'type': 'string'}, |
| 1026 | 'url': {'type': 'string'}}, |
| 1027 | 'type': 'object'}, |
| 1028 | 'ResolveCharmResults': {'additionalProperties': False, |
| 1029 | 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'}, |
| 1030 | 'type': 'array'}}, |
| 1031 | 'required': ['urls'], |
| 1032 | 'type': 'object'}, |
| 1033 | 'ResolveCharms': {'additionalProperties': False, |
| 1034 | 'properties': {'references': {'items': {'type': 'string'}, |
| 1035 | 'type': 'array'}}, |
| 1036 | 'required': ['references'], |
| 1037 | 'type': 'object'}, |
| 1038 | 'Resolved': {'additionalProperties': False, |
| 1039 | 'properties': {'retry': {'type': 'boolean'}, |
| 1040 | 'unit-name': {'type': 'string'}}, |
| 1041 | 'required': ['unit-name', 'retry'], |
| 1042 | 'type': 'object'}, |
| 1043 | 'SetConstraints': {'additionalProperties': False, |
| 1044 | 'properties': {'application': {'type': 'string'}, |
| 1045 | 'constraints': {'$ref': '#/definitions/Value'}}, |
| 1046 | 'required': ['application', 'constraints'], |
| 1047 | 'type': 'object'}, |
| 1048 | 'SetModelAgentVersion': {'additionalProperties': False, |
| 1049 | 'properties': {'version': {'$ref': '#/definitions/Number'}}, |
| 1050 | 'required': ['version'], |
| 1051 | 'type': 'object'}, |
| 1052 | 'StatusHistoryFilter': {'additionalProperties': False, |
| 1053 | 'properties': {'date': {'format': 'date-time', |
| 1054 | 'type': 'string'}, |
| 1055 | 'delta': {'type': 'integer'}, |
| 1056 | 'exclude': {'items': {'type': 'string'}, |
| 1057 | 'type': 'array'}, |
| 1058 | 'size': {'type': 'integer'}}, |
| 1059 | 'required': ['size', |
| 1060 | 'date', |
| 1061 | 'delta', |
| 1062 | 'exclude'], |
| 1063 | 'type': 'object'}, |
| 1064 | 'StatusHistoryRequest': {'additionalProperties': False, |
| 1065 | 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'}, |
| 1066 | 'historyKind': {'type': 'string'}, |
| 1067 | 'size': {'type': 'integer'}, |
| 1068 | 'tag': {'type': 'string'}}, |
| 1069 | 'required': ['historyKind', |
| 1070 | 'size', |
| 1071 | 'filter', |
| 1072 | 'tag'], |
| 1073 | 'type': 'object'}, |
| 1074 | 'StatusHistoryRequests': {'additionalProperties': False, |
| 1075 | 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'}, |
| 1076 | 'type': 'array'}}, |
| 1077 | 'required': ['requests'], |
| 1078 | 'type': 'object'}, |
| 1079 | 'StatusHistoryResult': {'additionalProperties': False, |
| 1080 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1081 | 'history': {'$ref': '#/definitions/History'}}, |
| 1082 | 'required': ['history'], |
| 1083 | 'type': 'object'}, |
| 1084 | 'StatusHistoryResults': {'additionalProperties': False, |
| 1085 | 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'}, |
| 1086 | 'type': 'array'}}, |
| 1087 | 'required': ['results'], |
| 1088 | 'type': 'object'}, |
| 1089 | 'StatusParams': {'additionalProperties': False, |
| 1090 | 'properties': {'patterns': {'items': {'type': 'string'}, |
| 1091 | 'type': 'array'}}, |
| 1092 | 'required': ['patterns'], |
| 1093 | 'type': 'object'}, |
| 1094 | 'StringResult': {'additionalProperties': False, |
| 1095 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1096 | 'result': {'type': 'string'}}, |
| 1097 | 'required': ['result'], |
| 1098 | 'type': 'object'}, |
| 1099 | 'Tools': {'additionalProperties': False, |
| 1100 | 'properties': {'sha256': {'type': 'string'}, |
| 1101 | 'size': {'type': 'integer'}, |
| 1102 | 'url': {'type': 'string'}, |
| 1103 | 'version': {'$ref': '#/definitions/Binary'}}, |
| 1104 | 'required': ['version', 'url', 'size'], |
| 1105 | 'type': 'object'}, |
| 1106 | 'UnitStatus': {'additionalProperties': False, |
| 1107 | 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'}, |
| 1108 | 'charm': {'type': 'string'}, |
| 1109 | 'leader': {'type': 'boolean'}, |
| 1110 | 'machine': {'type': 'string'}, |
| 1111 | 'opened-ports': {'items': {'type': 'string'}, |
| 1112 | 'type': 'array'}, |
| 1113 | 'public-address': {'type': 'string'}, |
| 1114 | 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}}, |
| 1115 | 'type': 'object'}, |
| 1116 | 'workload-status': {'$ref': '#/definitions/DetailedStatus'}, |
| 1117 | 'workload-version': {'type': 'string'}}, |
| 1118 | 'required': ['agent-status', |
| 1119 | 'workload-status', |
| 1120 | 'workload-version', |
| 1121 | 'machine', |
| 1122 | 'opened-ports', |
| 1123 | 'public-address', |
| 1124 | 'charm', |
| 1125 | 'subordinates'], |
| 1126 | 'type': 'object'}, |
| 1127 | 'Value': {'additionalProperties': False, |
| 1128 | 'properties': {'arch': {'type': 'string'}, |
| 1129 | 'container': {'type': 'string'}, |
| 1130 | 'cores': {'type': 'integer'}, |
| 1131 | 'cpu-power': {'type': 'integer'}, |
| 1132 | 'instance-type': {'type': 'string'}, |
| 1133 | 'mem': {'type': 'integer'}, |
| 1134 | 'root-disk': {'type': 'integer'}, |
| 1135 | 'spaces': {'items': {'type': 'string'}, |
| 1136 | 'type': 'array'}, |
| 1137 | 'tags': {'items': {'type': 'string'}, |
| 1138 | 'type': 'array'}, |
| 1139 | 'virt-type': {'type': 'string'}}, |
| 1140 | 'type': 'object'}}, |
| 1141 | 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, |
| 1142 | 'type': 'object'}, |
| 1143 | 'AbortCurrentUpgrade': {'type': 'object'}, |
| 1144 | 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}}, |
| 1145 | 'type': 'object'}, |
| 1146 | 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}}, |
| 1147 | 'type': 'object'}, |
| 1148 | 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, |
| 1149 | 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, |
| 1150 | 'type': 'object'}, |
| 1151 | 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, |
| 1152 | 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, |
| 1153 | 'type': 'object'}, |
| 1154 | 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}}, |
| 1155 | 'type': 'object'}, |
| 1156 | 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, |
| 1157 | 'type': 'object'}, |
| 1158 | 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}}, |
| 1159 | 'type': 'object'}, |
| 1160 | 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'}, |
| 1161 | 'Result': {'$ref': '#/definitions/FindToolsResult'}}, |
| 1162 | 'type': 'object'}, |
| 1163 | 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'}, |
| 1164 | 'Result': {'$ref': '#/definitions/FullStatus'}}, |
| 1165 | 'type': 'object'}, |
| 1166 | 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'}, |
| 1167 | 'Result': {'$ref': '#/definitions/BundleChangesResults'}}, |
| 1168 | 'type': 'object'}, |
| 1169 | 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}}, |
| 1170 | 'type': 'object'}, |
| 1171 | 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, |
| 1172 | 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, |
| 1173 | 'type': 'object'}, |
| 1174 | 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}}, |
| 1175 | 'type': 'object'}, |
| 1176 | 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}}, |
| 1177 | 'type': 'object'}, |
| 1178 | 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}}, |
| 1179 | 'type': 'object'}, |
| 1180 | 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}}, |
| 1181 | 'type': 'object'}, |
| 1182 | 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}}, |
| 1183 | 'type': 'object'}, |
| 1184 | 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'}, |
| 1185 | 'Result': {'$ref': '#/definitions/PrivateAddressResults'}}, |
| 1186 | 'type': 'object'}, |
| 1187 | 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'}, |
| 1188 | 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}}, |
| 1189 | 'type': 'object'}, |
| 1190 | 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'}, |
| 1191 | 'Result': {'$ref': '#/definitions/PublicAddressResults'}}, |
| 1192 | 'type': 'object'}, |
| 1193 | 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'}, |
| 1194 | 'Result': {'$ref': '#/definitions/ResolveCharmResults'}}, |
| 1195 | 'type': 'object'}, |
| 1196 | 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}}, |
| 1197 | 'type': 'object'}, |
| 1198 | 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1199 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1200 | 'type': 'object'}, |
| 1201 | 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, |
| 1202 | 'type': 'object'}, |
| 1203 | 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}}, |
| 1204 | 'type': 'object'}, |
| 1205 | 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}}, |
| 1206 | 'type': 'object'}, |
| 1207 | 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}}, |
| 1208 | 'type': 'object'}, |
| 1209 | 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'}, |
| 1210 | 'Result': {'$ref': '#/definitions/StatusHistoryResults'}}, |
| 1211 | 'type': 'object'}, |
| 1212 | 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}}, |
| 1213 | 'type': 'object'}}, |
| 1214 | 'type': 'object'} |
| 1215 | |
| 1216 | |
| 1217 | @ReturnMapping(APIHostPortsResult) |
| 1218 | async def APIHostPorts(self): |
| 1219 | ''' |
| 1220 | |
| 1221 | Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort> |
| 1222 | ''' |
| 1223 | # map input types to rpc msg |
| 1224 | _params = dict() |
| 1225 | msg = dict(type='Client', request='APIHostPorts', version=1, params=_params) |
| 1226 | |
| 1227 | reply = await self.rpc(msg) |
| 1228 | return reply |
| 1229 | |
| 1230 | |
| 1231 | |
| 1232 | @ReturnMapping(None) |
| 1233 | async def AbortCurrentUpgrade(self): |
| 1234 | ''' |
| 1235 | |
| 1236 | Returns -> None |
| 1237 | ''' |
| 1238 | # map input types to rpc msg |
| 1239 | _params = dict() |
| 1240 | msg = dict(type='Client', request='AbortCurrentUpgrade', version=1, params=_params) |
| 1241 | |
| 1242 | reply = await self.rpc(msg) |
| 1243 | return reply |
| 1244 | |
| 1245 | |
| 1246 | |
| 1247 | @ReturnMapping(None) |
| 1248 | async def AddCharm(self, channel, url): |
| 1249 | ''' |
| 1250 | channel : str |
| 1251 | url : str |
| 1252 | Returns -> None |
| 1253 | ''' |
| 1254 | # map input types to rpc msg |
| 1255 | _params = dict() |
| 1256 | msg = dict(type='Client', request='AddCharm', version=1, params=_params) |
| 1257 | _params['channel'] = channel |
| 1258 | _params['url'] = url |
| 1259 | reply = await self.rpc(msg) |
| 1260 | return reply |
| 1261 | |
| 1262 | |
| 1263 | |
| 1264 | @ReturnMapping(None) |
| 1265 | async def AddCharmWithAuthorization(self, channel, macaroon, url): |
| 1266 | ''' |
| 1267 | channel : str |
| 1268 | macaroon : Macaroon |
| 1269 | url : str |
| 1270 | Returns -> None |
| 1271 | ''' |
| 1272 | # map input types to rpc msg |
| 1273 | _params = dict() |
| 1274 | msg = dict(type='Client', request='AddCharmWithAuthorization', version=1, params=_params) |
| 1275 | _params['channel'] = channel |
| 1276 | _params['macaroon'] = macaroon |
| 1277 | _params['url'] = url |
| 1278 | reply = await self.rpc(msg) |
| 1279 | return reply |
| 1280 | |
| 1281 | |
| 1282 | |
| 1283 | @ReturnMapping(AddMachinesResults) |
| 1284 | async def AddMachines(self, params): |
| 1285 | ''' |
| 1286 | params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams> |
| 1287 | Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult> |
| 1288 | ''' |
| 1289 | # map input types to rpc msg |
| 1290 | _params = dict() |
| 1291 | msg = dict(type='Client', request='AddMachines', version=1, params=_params) |
| 1292 | _params['params'] = params |
| 1293 | reply = await self.rpc(msg) |
| 1294 | return reply |
| 1295 | |
| 1296 | |
| 1297 | |
| 1298 | @ReturnMapping(AddMachinesResults) |
| 1299 | async def AddMachinesV2(self, params): |
| 1300 | ''' |
| 1301 | params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams> |
| 1302 | Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult> |
| 1303 | ''' |
| 1304 | # map input types to rpc msg |
| 1305 | _params = dict() |
| 1306 | msg = dict(type='Client', request='AddMachinesV2', version=1, params=_params) |
| 1307 | _params['params'] = params |
| 1308 | reply = await self.rpc(msg) |
| 1309 | return reply |
| 1310 | |
| 1311 | |
| 1312 | |
| 1313 | @ReturnMapping(AgentVersionResult) |
| 1314 | async def AgentVersion(self): |
| 1315 | ''' |
| 1316 | |
| 1317 | Returns -> Number |
| 1318 | ''' |
| 1319 | # map input types to rpc msg |
| 1320 | _params = dict() |
| 1321 | msg = dict(type='Client', request='AgentVersion', version=1, params=_params) |
| 1322 | |
| 1323 | reply = await self.rpc(msg) |
| 1324 | return reply |
| 1325 | |
| 1326 | |
| 1327 | |
| 1328 | @ReturnMapping(BytesResult) |
| 1329 | async def CACert(self): |
| 1330 | ''' |
| 1331 | |
| 1332 | Returns -> typing.Sequence<+T_co>[int] |
| 1333 | ''' |
| 1334 | # map input types to rpc msg |
| 1335 | _params = dict() |
| 1336 | msg = dict(type='Client', request='CACert', version=1, params=_params) |
| 1337 | |
| 1338 | reply = await self.rpc(msg) |
| 1339 | return reply |
| 1340 | |
| 1341 | |
| 1342 | |
| 1343 | @ReturnMapping(None) |
| 1344 | async def DestroyMachines(self, force, machine_names): |
| 1345 | ''' |
| 1346 | force : bool |
| 1347 | machine_names : typing.Sequence<+T_co>[str] |
| 1348 | Returns -> None |
| 1349 | ''' |
| 1350 | # map input types to rpc msg |
| 1351 | _params = dict() |
| 1352 | msg = dict(type='Client', request='DestroyMachines', version=1, params=_params) |
| 1353 | _params['force'] = force |
| 1354 | _params['machine-names'] = machine_names |
| 1355 | reply = await self.rpc(msg) |
| 1356 | return reply |
| 1357 | |
| 1358 | |
| 1359 | |
| 1360 | @ReturnMapping(FindToolsResult) |
| 1361 | async def FindTools(self, arch, major, minor, number, series): |
| 1362 | ''' |
| 1363 | arch : str |
| 1364 | major : int |
| 1365 | minor : int |
| 1366 | number : Number |
| 1367 | series : str |
| 1368 | Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>] |
| 1369 | ''' |
| 1370 | # map input types to rpc msg |
| 1371 | _params = dict() |
| 1372 | msg = dict(type='Client', request='FindTools', version=1, params=_params) |
| 1373 | _params['arch'] = arch |
| 1374 | _params['major'] = major |
| 1375 | _params['minor'] = minor |
| 1376 | _params['number'] = number |
| 1377 | _params['series'] = series |
| 1378 | reply = await self.rpc(msg) |
| 1379 | return reply |
| 1380 | |
| 1381 | |
| 1382 | |
| 1383 | @ReturnMapping(FullStatus) |
| 1384 | async def FullStatus(self, patterns): |
| 1385 | ''' |
| 1386 | patterns : typing.Sequence<+T_co>[str] |
| 1387 | Returns -> typing.Union[_ForwardRef('ModelStatusInfo'), typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>, typing.Mapping<~KT, +VT_co>[str, ~RemoteApplicationStatus]<~RemoteApplicationStatus>] |
| 1388 | ''' |
| 1389 | # map input types to rpc msg |
| 1390 | _params = dict() |
| 1391 | msg = dict(type='Client', request='FullStatus', version=1, params=_params) |
| 1392 | _params['patterns'] = patterns |
| 1393 | reply = await self.rpc(msg) |
| 1394 | return reply |
| 1395 | |
| 1396 | |
| 1397 | |
| 1398 | @ReturnMapping(BundleChangesResults) |
| 1399 | async def GetBundleChanges(self, yaml): |
| 1400 | ''' |
| 1401 | yaml : str |
| 1402 | Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange> |
| 1403 | ''' |
| 1404 | # map input types to rpc msg |
| 1405 | _params = dict() |
| 1406 | msg = dict(type='Client', request='GetBundleChanges', version=1, params=_params) |
| 1407 | _params['yaml'] = yaml |
| 1408 | reply = await self.rpc(msg) |
| 1409 | return reply |
| 1410 | |
| 1411 | |
| 1412 | |
| 1413 | @ReturnMapping(GetConstraintsResults) |
| 1414 | async def GetModelConstraints(self): |
| 1415 | ''' |
| 1416 | |
| 1417 | Returns -> Value |
| 1418 | ''' |
| 1419 | # map input types to rpc msg |
| 1420 | _params = dict() |
| 1421 | msg = dict(type='Client', request='GetModelConstraints', version=1, params=_params) |
| 1422 | |
| 1423 | reply = await self.rpc(msg) |
| 1424 | return reply |
| 1425 | |
| 1426 | |
| 1427 | |
| 1428 | @ReturnMapping(AddMachinesResults) |
| 1429 | async def InjectMachines(self, params): |
| 1430 | ''' |
| 1431 | params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams> |
| 1432 | Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult> |
| 1433 | ''' |
| 1434 | # map input types to rpc msg |
| 1435 | _params = dict() |
| 1436 | msg = dict(type='Client', request='InjectMachines', version=1, params=_params) |
| 1437 | _params['params'] = params |
| 1438 | reply = await self.rpc(msg) |
| 1439 | return reply |
| 1440 | |
| 1441 | |
| 1442 | |
| 1443 | @ReturnMapping(ModelConfigResults) |
| 1444 | async def ModelGet(self): |
| 1445 | ''' |
| 1446 | |
| 1447 | Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue> |
| 1448 | ''' |
| 1449 | # map input types to rpc msg |
| 1450 | _params = dict() |
| 1451 | msg = dict(type='Client', request='ModelGet', version=1, params=_params) |
| 1452 | |
| 1453 | reply = await self.rpc(msg) |
| 1454 | return reply |
| 1455 | |
| 1456 | |
| 1457 | |
| 1458 | @ReturnMapping(ModelInfo) |
| 1459 | async def ModelInfo(self): |
| 1460 | ''' |
| 1461 | |
| 1462 | Returns -> typing.Union[_ForwardRef('Number'), _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>] |
| 1463 | ''' |
| 1464 | # map input types to rpc msg |
| 1465 | _params = dict() |
| 1466 | msg = dict(type='Client', request='ModelInfo', version=1, params=_params) |
| 1467 | |
| 1468 | reply = await self.rpc(msg) |
| 1469 | return reply |
| 1470 | |
| 1471 | |
| 1472 | |
| 1473 | @ReturnMapping(None) |
| 1474 | async def ModelSet(self, config): |
| 1475 | ''' |
| 1476 | config : typing.Mapping<~KT, +VT_co>[str, typing.Any] |
| 1477 | Returns -> None |
| 1478 | ''' |
| 1479 | # map input types to rpc msg |
| 1480 | _params = dict() |
| 1481 | msg = dict(type='Client', request='ModelSet', version=1, params=_params) |
| 1482 | _params['config'] = config |
| 1483 | reply = await self.rpc(msg) |
| 1484 | return reply |
| 1485 | |
| 1486 | |
| 1487 | |
| 1488 | @ReturnMapping(None) |
| 1489 | async def ModelUnset(self, keys): |
| 1490 | ''' |
| 1491 | keys : typing.Sequence<+T_co>[str] |
| 1492 | Returns -> None |
| 1493 | ''' |
| 1494 | # map input types to rpc msg |
| 1495 | _params = dict() |
| 1496 | msg = dict(type='Client', request='ModelUnset', version=1, params=_params) |
| 1497 | _params['keys'] = keys |
| 1498 | reply = await self.rpc(msg) |
| 1499 | return reply |
| 1500 | |
| 1501 | |
| 1502 | |
| 1503 | @ReturnMapping(ModelUserInfoResults) |
| 1504 | async def ModelUserInfo(self): |
| 1505 | ''' |
| 1506 | |
| 1507 | Returns -> typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult> |
| 1508 | ''' |
| 1509 | # map input types to rpc msg |
| 1510 | _params = dict() |
| 1511 | msg = dict(type='Client', request='ModelUserInfo', version=1, params=_params) |
| 1512 | |
| 1513 | reply = await self.rpc(msg) |
| 1514 | return reply |
| 1515 | |
| 1516 | |
| 1517 | |
| 1518 | @ReturnMapping(PrivateAddressResults) |
| 1519 | async def PrivateAddress(self, target): |
| 1520 | ''' |
| 1521 | target : str |
| 1522 | Returns -> str |
| 1523 | ''' |
| 1524 | # map input types to rpc msg |
| 1525 | _params = dict() |
| 1526 | msg = dict(type='Client', request='PrivateAddress', version=1, params=_params) |
| 1527 | _params['target'] = target |
| 1528 | reply = await self.rpc(msg) |
| 1529 | return reply |
| 1530 | |
| 1531 | |
| 1532 | |
| 1533 | @ReturnMapping(ProvisioningScriptResult) |
| 1534 | async def ProvisioningScript(self, data_dir, disable_package_commands, machine_id, nonce): |
| 1535 | ''' |
| 1536 | data_dir : str |
| 1537 | disable_package_commands : bool |
| 1538 | machine_id : str |
| 1539 | nonce : str |
| 1540 | Returns -> str |
| 1541 | ''' |
| 1542 | # map input types to rpc msg |
| 1543 | _params = dict() |
| 1544 | msg = dict(type='Client', request='ProvisioningScript', version=1, params=_params) |
| 1545 | _params['data-dir'] = data_dir |
| 1546 | _params['disable-package-commands'] = disable_package_commands |
| 1547 | _params['machine-id'] = machine_id |
| 1548 | _params['nonce'] = nonce |
| 1549 | reply = await self.rpc(msg) |
| 1550 | return reply |
| 1551 | |
| 1552 | |
| 1553 | |
| 1554 | @ReturnMapping(PublicAddressResults) |
| 1555 | async def PublicAddress(self, target): |
| 1556 | ''' |
| 1557 | target : str |
| 1558 | Returns -> str |
| 1559 | ''' |
| 1560 | # map input types to rpc msg |
| 1561 | _params = dict() |
| 1562 | msg = dict(type='Client', request='PublicAddress', version=1, params=_params) |
| 1563 | _params['target'] = target |
| 1564 | reply = await self.rpc(msg) |
| 1565 | return reply |
| 1566 | |
| 1567 | |
| 1568 | |
| 1569 | @ReturnMapping(ResolveCharmResults) |
| 1570 | async def ResolveCharms(self, references): |
| 1571 | ''' |
| 1572 | references : typing.Sequence<+T_co>[str] |
| 1573 | Returns -> typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult> |
| 1574 | ''' |
| 1575 | # map input types to rpc msg |
| 1576 | _params = dict() |
| 1577 | msg = dict(type='Client', request='ResolveCharms', version=1, params=_params) |
| 1578 | _params['references'] = references |
| 1579 | reply = await self.rpc(msg) |
| 1580 | return reply |
| 1581 | |
| 1582 | |
| 1583 | |
| 1584 | @ReturnMapping(None) |
| 1585 | async def Resolved(self, retry, unit_name): |
| 1586 | ''' |
| 1587 | retry : bool |
| 1588 | unit_name : str |
| 1589 | Returns -> None |
| 1590 | ''' |
| 1591 | # map input types to rpc msg |
| 1592 | _params = dict() |
| 1593 | msg = dict(type='Client', request='Resolved', version=1, params=_params) |
| 1594 | _params['retry'] = retry |
| 1595 | _params['unit-name'] = unit_name |
| 1596 | reply = await self.rpc(msg) |
| 1597 | return reply |
| 1598 | |
| 1599 | |
| 1600 | |
| 1601 | @ReturnMapping(ErrorResults) |
| 1602 | async def RetryProvisioning(self, entities): |
| 1603 | ''' |
| 1604 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 1605 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 1606 | ''' |
| 1607 | # map input types to rpc msg |
| 1608 | _params = dict() |
| 1609 | msg = dict(type='Client', request='RetryProvisioning', version=1, params=_params) |
| 1610 | _params['entities'] = entities |
| 1611 | reply = await self.rpc(msg) |
| 1612 | return reply |
| 1613 | |
| 1614 | |
| 1615 | |
| 1616 | @ReturnMapping(StringResult) |
| 1617 | async def SLALevel(self): |
| 1618 | ''' |
| 1619 | |
| 1620 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 1621 | ''' |
| 1622 | # map input types to rpc msg |
| 1623 | _params = dict() |
| 1624 | msg = dict(type='Client', request='SLALevel', version=1, params=_params) |
| 1625 | |
| 1626 | reply = await self.rpc(msg) |
| 1627 | return reply |
| 1628 | |
| 1629 | |
| 1630 | |
| 1631 | @ReturnMapping(None) |
| 1632 | async def SetModelAgentVersion(self, version): |
| 1633 | ''' |
| 1634 | version : Number |
| 1635 | Returns -> None |
| 1636 | ''' |
| 1637 | # map input types to rpc msg |
| 1638 | _params = dict() |
| 1639 | msg = dict(type='Client', request='SetModelAgentVersion', version=1, params=_params) |
| 1640 | _params['version'] = version |
| 1641 | reply = await self.rpc(msg) |
| 1642 | return reply |
| 1643 | |
| 1644 | |
| 1645 | |
| 1646 | @ReturnMapping(None) |
| 1647 | async def SetModelConstraints(self, application, constraints): |
| 1648 | ''' |
| 1649 | application : str |
| 1650 | constraints : Value |
| 1651 | Returns -> None |
| 1652 | ''' |
| 1653 | # map input types to rpc msg |
| 1654 | _params = dict() |
| 1655 | msg = dict(type='Client', request='SetModelConstraints', version=1, params=_params) |
| 1656 | _params['application'] = application |
| 1657 | _params['constraints'] = constraints |
| 1658 | reply = await self.rpc(msg) |
| 1659 | return reply |
| 1660 | |
| 1661 | |
| 1662 | |
| 1663 | @ReturnMapping(None) |
| 1664 | async def SetSLALevel(self, creds, level): |
| 1665 | ''' |
| 1666 | creds : typing.Sequence<+T_co>[int] |
| 1667 | level : str |
| 1668 | Returns -> None |
| 1669 | ''' |
| 1670 | # map input types to rpc msg |
| 1671 | _params = dict() |
| 1672 | msg = dict(type='Client', request='SetSLALevel', version=1, params=_params) |
| 1673 | _params['creds'] = creds |
| 1674 | _params['level'] = level |
| 1675 | reply = await self.rpc(msg) |
| 1676 | return reply |
| 1677 | |
| 1678 | |
| 1679 | |
| 1680 | @ReturnMapping(StatusHistoryResults) |
| 1681 | async def StatusHistory(self, requests): |
| 1682 | ''' |
| 1683 | requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest> |
| 1684 | Returns -> typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult> |
| 1685 | ''' |
| 1686 | # map input types to rpc msg |
| 1687 | _params = dict() |
| 1688 | msg = dict(type='Client', request='StatusHistory', version=1, params=_params) |
| 1689 | _params['requests'] = requests |
| 1690 | reply = await self.rpc(msg) |
| 1691 | return reply |
| 1692 | |
| 1693 | |
| 1694 | |
| 1695 | @ReturnMapping(AllWatcherId) |
| 1696 | async def WatchAll(self): |
| 1697 | ''' |
| 1698 | |
| 1699 | Returns -> str |
| 1700 | ''' |
| 1701 | # map input types to rpc msg |
| 1702 | _params = dict() |
| 1703 | msg = dict(type='Client', request='WatchAll', version=1, params=_params) |
| 1704 | |
| 1705 | reply = await self.rpc(msg) |
| 1706 | return reply |
| 1707 | |
| 1708 | |
| 1709 | |
| 1710 | class CloudFacade(Type): |
| 1711 | name = 'Cloud' |
| 1712 | version = 1 |
| 1713 | schema = {'definitions': {'Cloud': {'additionalProperties': False, |
| 1714 | 'properties': {'auth-types': {'items': {'type': 'string'}, |
| 1715 | 'type': 'array'}, |
| 1716 | 'endpoint': {'type': 'string'}, |
| 1717 | 'identity-endpoint': {'type': 'string'}, |
| 1718 | 'regions': {'items': {'$ref': '#/definitions/CloudRegion'}, |
| 1719 | 'type': 'array'}, |
| 1720 | 'storage-endpoint': {'type': 'string'}, |
| 1721 | 'type': {'type': 'string'}}, |
| 1722 | 'required': ['type'], |
| 1723 | 'type': 'object'}, |
| 1724 | 'CloudCredential': {'additionalProperties': False, |
| 1725 | 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, |
| 1726 | 'type': 'object'}, |
| 1727 | 'auth-type': {'type': 'string'}, |
| 1728 | 'redacted': {'items': {'type': 'string'}, |
| 1729 | 'type': 'array'}}, |
| 1730 | 'required': ['auth-type'], |
| 1731 | 'type': 'object'}, |
| 1732 | 'CloudCredentialResult': {'additionalProperties': False, |
| 1733 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1734 | 'result': {'$ref': '#/definitions/CloudCredential'}}, |
| 1735 | 'type': 'object'}, |
| 1736 | 'CloudCredentialResults': {'additionalProperties': False, |
| 1737 | 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'}, |
| 1738 | 'type': 'array'}}, |
| 1739 | 'type': 'object'}, |
| 1740 | 'CloudInstanceTypesConstraint': {'additionalProperties': False, |
| 1741 | 'properties': {'cloud-tag': {'type': 'string'}, |
| 1742 | 'constraints': {'$ref': '#/definitions/Value'}, |
| 1743 | 'region': {'type': 'string'}}, |
| 1744 | 'required': ['cloud-tag', |
| 1745 | 'region'], |
| 1746 | 'type': 'object'}, |
| 1747 | 'CloudInstanceTypesConstraints': {'additionalProperties': False, |
| 1748 | 'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'}, |
| 1749 | 'type': 'array'}}, |
| 1750 | 'required': ['constraints'], |
| 1751 | 'type': 'object'}, |
| 1752 | 'CloudRegion': {'additionalProperties': False, |
| 1753 | 'properties': {'endpoint': {'type': 'string'}, |
| 1754 | 'identity-endpoint': {'type': 'string'}, |
| 1755 | 'name': {'type': 'string'}, |
| 1756 | 'storage-endpoint': {'type': 'string'}}, |
| 1757 | 'required': ['name'], |
| 1758 | 'type': 'object'}, |
| 1759 | 'CloudResult': {'additionalProperties': False, |
| 1760 | 'properties': {'cloud': {'$ref': '#/definitions/Cloud'}, |
| 1761 | 'error': {'$ref': '#/definitions/Error'}}, |
| 1762 | 'type': 'object'}, |
| 1763 | 'CloudResults': {'additionalProperties': False, |
| 1764 | 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'}, |
| 1765 | 'type': 'array'}}, |
| 1766 | 'type': 'object'}, |
| 1767 | 'CloudsResult': {'additionalProperties': False, |
| 1768 | 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}}, |
| 1769 | 'type': 'object'}}, |
| 1770 | 'type': 'object'}, |
| 1771 | 'Entities': {'additionalProperties': False, |
| 1772 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 1773 | 'type': 'array'}}, |
| 1774 | 'required': ['entities'], |
| 1775 | 'type': 'object'}, |
| 1776 | 'Entity': {'additionalProperties': False, |
| 1777 | 'properties': {'tag': {'type': 'string'}}, |
| 1778 | 'required': ['tag'], |
| 1779 | 'type': 'object'}, |
| 1780 | 'Error': {'additionalProperties': False, |
| 1781 | 'properties': {'code': {'type': 'string'}, |
| 1782 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 1783 | 'message': {'type': 'string'}}, |
| 1784 | 'required': ['message', 'code'], |
| 1785 | 'type': 'object'}, |
| 1786 | 'ErrorInfo': {'additionalProperties': False, |
| 1787 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 1788 | 'macaroon-path': {'type': 'string'}}, |
| 1789 | 'type': 'object'}, |
| 1790 | 'ErrorResult': {'additionalProperties': False, |
| 1791 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 1792 | 'type': 'object'}, |
| 1793 | 'ErrorResults': {'additionalProperties': False, |
| 1794 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 1795 | 'type': 'array'}}, |
| 1796 | 'required': ['results'], |
| 1797 | 'type': 'object'}, |
| 1798 | 'InstanceType': {'additionalProperties': False, |
| 1799 | 'properties': {'arches': {'items': {'type': 'string'}, |
| 1800 | 'type': 'array'}, |
| 1801 | 'cost': {'type': 'integer'}, |
| 1802 | 'cpu-cores': {'type': 'integer'}, |
| 1803 | 'deprecated': {'type': 'boolean'}, |
| 1804 | 'memory': {'type': 'integer'}, |
| 1805 | 'name': {'type': 'string'}, |
| 1806 | 'root-disk': {'type': 'integer'}, |
| 1807 | 'virt-type': {'type': 'string'}}, |
| 1808 | 'required': ['arches', 'cpu-cores', 'memory'], |
| 1809 | 'type': 'object'}, |
| 1810 | 'InstanceTypesResult': {'additionalProperties': False, |
| 1811 | 'properties': {'cost-currency': {'type': 'string'}, |
| 1812 | 'cost-divisor': {'type': 'integer'}, |
| 1813 | 'cost-unit': {'type': 'string'}, |
| 1814 | 'error': {'$ref': '#/definitions/Error'}, |
| 1815 | 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'}, |
| 1816 | 'type': 'array'}}, |
| 1817 | 'type': 'object'}, |
| 1818 | 'InstanceTypesResults': {'additionalProperties': False, |
| 1819 | 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'}, |
| 1820 | 'type': 'array'}}, |
| 1821 | 'required': ['results'], |
| 1822 | 'type': 'object'}, |
| 1823 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 1824 | 'StringResult': {'additionalProperties': False, |
| 1825 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1826 | 'result': {'type': 'string'}}, |
| 1827 | 'required': ['result'], |
| 1828 | 'type': 'object'}, |
| 1829 | 'StringsResult': {'additionalProperties': False, |
| 1830 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1831 | 'result': {'items': {'type': 'string'}, |
| 1832 | 'type': 'array'}}, |
| 1833 | 'type': 'object'}, |
| 1834 | 'StringsResults': {'additionalProperties': False, |
| 1835 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, |
| 1836 | 'type': 'array'}}, |
| 1837 | 'required': ['results'], |
| 1838 | 'type': 'object'}, |
| 1839 | 'UpdateCloudCredential': {'additionalProperties': False, |
| 1840 | 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'}, |
| 1841 | 'tag': {'type': 'string'}}, |
| 1842 | 'required': ['tag', 'credential'], |
| 1843 | 'type': 'object'}, |
| 1844 | 'UpdateCloudCredentials': {'additionalProperties': False, |
| 1845 | 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'}, |
| 1846 | 'type': 'array'}}, |
| 1847 | 'type': 'object'}, |
| 1848 | 'UserCloud': {'additionalProperties': False, |
| 1849 | 'properties': {'cloud-tag': {'type': 'string'}, |
| 1850 | 'user-tag': {'type': 'string'}}, |
| 1851 | 'required': ['user-tag', 'cloud-tag'], |
| 1852 | 'type': 'object'}, |
| 1853 | 'UserClouds': {'additionalProperties': False, |
| 1854 | 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'}, |
| 1855 | 'type': 'array'}}, |
| 1856 | 'type': 'object'}, |
| 1857 | 'Value': {'additionalProperties': False, |
| 1858 | 'properties': {'arch': {'type': 'string'}, |
| 1859 | 'container': {'type': 'string'}, |
| 1860 | 'cores': {'type': 'integer'}, |
| 1861 | 'cpu-power': {'type': 'integer'}, |
| 1862 | 'instance-type': {'type': 'string'}, |
| 1863 | 'mem': {'type': 'integer'}, |
| 1864 | 'root-disk': {'type': 'integer'}, |
| 1865 | 'spaces': {'items': {'type': 'string'}, |
| 1866 | 'type': 'array'}, |
| 1867 | 'tags': {'items': {'type': 'string'}, |
| 1868 | 'type': 'array'}, |
| 1869 | 'virt-type': {'type': 'string'}}, |
| 1870 | 'type': 'object'}}, |
| 1871 | 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1872 | 'Result': {'$ref': '#/definitions/CloudResults'}}, |
| 1873 | 'type': 'object'}, |
| 1874 | 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}}, |
| 1875 | 'type': 'object'}, |
| 1876 | 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1877 | 'Result': {'$ref': '#/definitions/CloudCredentialResults'}}, |
| 1878 | 'type': 'object'}, |
| 1879 | 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, |
| 1880 | 'type': 'object'}, |
| 1881 | 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'}, |
| 1882 | 'Result': {'$ref': '#/definitions/InstanceTypesResults'}}, |
| 1883 | 'type': 'object'}, |
| 1884 | 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1885 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1886 | 'type': 'object'}, |
| 1887 | 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'}, |
| 1888 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1889 | 'type': 'object'}, |
| 1890 | 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'}, |
| 1891 | 'Result': {'$ref': '#/definitions/StringsResults'}}, |
| 1892 | 'type': 'object'}}, |
| 1893 | 'type': 'object'} |
| 1894 | |
| 1895 | |
| 1896 | @ReturnMapping(CloudResults) |
| 1897 | async def Cloud(self, entities): |
| 1898 | ''' |
| 1899 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 1900 | Returns -> typing.Sequence<+T_co>[~CloudResult]<~CloudResult> |
| 1901 | ''' |
| 1902 | # map input types to rpc msg |
| 1903 | _params = dict() |
| 1904 | msg = dict(type='Cloud', request='Cloud', version=1, params=_params) |
| 1905 | _params['entities'] = entities |
| 1906 | reply = await self.rpc(msg) |
| 1907 | return reply |
| 1908 | |
| 1909 | |
| 1910 | |
| 1911 | @ReturnMapping(CloudsResult) |
| 1912 | async def Clouds(self): |
| 1913 | ''' |
| 1914 | |
| 1915 | Returns -> typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud> |
| 1916 | ''' |
| 1917 | # map input types to rpc msg |
| 1918 | _params = dict() |
| 1919 | msg = dict(type='Cloud', request='Clouds', version=1, params=_params) |
| 1920 | |
| 1921 | reply = await self.rpc(msg) |
| 1922 | return reply |
| 1923 | |
| 1924 | |
| 1925 | |
| 1926 | @ReturnMapping(CloudCredentialResults) |
| 1927 | async def Credential(self, entities): |
| 1928 | ''' |
| 1929 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 1930 | Returns -> typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult> |
| 1931 | ''' |
| 1932 | # map input types to rpc msg |
| 1933 | _params = dict() |
| 1934 | msg = dict(type='Cloud', request='Credential', version=1, params=_params) |
| 1935 | _params['entities'] = entities |
| 1936 | reply = await self.rpc(msg) |
| 1937 | return reply |
| 1938 | |
| 1939 | |
| 1940 | |
| 1941 | @ReturnMapping(StringResult) |
| 1942 | async def DefaultCloud(self): |
| 1943 | ''' |
| 1944 | |
| 1945 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 1946 | ''' |
| 1947 | # map input types to rpc msg |
| 1948 | _params = dict() |
| 1949 | msg = dict(type='Cloud', request='DefaultCloud', version=1, params=_params) |
| 1950 | |
| 1951 | reply = await self.rpc(msg) |
| 1952 | return reply |
| 1953 | |
| 1954 | |
| 1955 | |
| 1956 | @ReturnMapping(InstanceTypesResults) |
| 1957 | async def InstanceTypes(self, constraints): |
| 1958 | ''' |
| 1959 | constraints : typing.Sequence<+T_co>[~CloudInstanceTypesConstraint]<~CloudInstanceTypesConstraint> |
| 1960 | Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult> |
| 1961 | ''' |
| 1962 | # map input types to rpc msg |
| 1963 | _params = dict() |
| 1964 | msg = dict(type='Cloud', request='InstanceTypes', version=1, params=_params) |
| 1965 | _params['constraints'] = constraints |
| 1966 | reply = await self.rpc(msg) |
| 1967 | return reply |
| 1968 | |
| 1969 | |
| 1970 | |
| 1971 | @ReturnMapping(ErrorResults) |
| 1972 | async def RevokeCredentials(self, entities): |
| 1973 | ''' |
| 1974 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 1975 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 1976 | ''' |
| 1977 | # map input types to rpc msg |
| 1978 | _params = dict() |
| 1979 | msg = dict(type='Cloud', request='RevokeCredentials', version=1, params=_params) |
| 1980 | _params['entities'] = entities |
| 1981 | reply = await self.rpc(msg) |
| 1982 | return reply |
| 1983 | |
| 1984 | |
| 1985 | |
| 1986 | @ReturnMapping(ErrorResults) |
| 1987 | async def UpdateCredentials(self, credentials): |
| 1988 | ''' |
| 1989 | credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential> |
| 1990 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 1991 | ''' |
| 1992 | # map input types to rpc msg |
| 1993 | _params = dict() |
| 1994 | msg = dict(type='Cloud', request='UpdateCredentials', version=1, params=_params) |
| 1995 | _params['credentials'] = credentials |
| 1996 | reply = await self.rpc(msg) |
| 1997 | return reply |
| 1998 | |
| 1999 | |
| 2000 | |
| 2001 | @ReturnMapping(StringsResults) |
| 2002 | async def UserCredentials(self, user_clouds): |
| 2003 | ''' |
| 2004 | user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud> |
| 2005 | Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult> |
| 2006 | ''' |
| 2007 | # map input types to rpc msg |
| 2008 | _params = dict() |
| 2009 | msg = dict(type='Cloud', request='UserCredentials', version=1, params=_params) |
| 2010 | _params['user-clouds'] = user_clouds |
| 2011 | reply = await self.rpc(msg) |
| 2012 | return reply |
| 2013 | |
| 2014 | |
| 2015 | |
| 2016 | class DeployerFacade(Type): |
| 2017 | name = 'Deployer' |
| 2018 | version = 1 |
| 2019 | schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, |
| 2020 | 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, |
| 2021 | 'type': 'array'}, |
| 2022 | 'type': 'array'}}, |
| 2023 | 'required': ['servers'], |
| 2024 | 'type': 'object'}, |
| 2025 | 'Address': {'additionalProperties': False, |
| 2026 | 'properties': {'scope': {'type': 'string'}, |
| 2027 | 'space-name': {'type': 'string'}, |
| 2028 | 'type': {'type': 'string'}, |
| 2029 | 'value': {'type': 'string'}}, |
| 2030 | 'required': ['value', 'type', 'scope'], |
| 2031 | 'type': 'object'}, |
| 2032 | 'BytesResult': {'additionalProperties': False, |
| 2033 | 'properties': {'result': {'items': {'type': 'integer'}, |
| 2034 | 'type': 'array'}}, |
| 2035 | 'required': ['result'], |
| 2036 | 'type': 'object'}, |
| 2037 | 'DeployerConnectionValues': {'additionalProperties': False, |
| 2038 | 'properties': {'api-addresses': {'items': {'type': 'string'}, |
| 2039 | 'type': 'array'}, |
| 2040 | 'state-addresses': {'items': {'type': 'string'}, |
| 2041 | 'type': 'array'}}, |
| 2042 | 'required': ['state-addresses', |
| 2043 | 'api-addresses'], |
| 2044 | 'type': 'object'}, |
| 2045 | 'Entities': {'additionalProperties': False, |
| 2046 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 2047 | 'type': 'array'}}, |
| 2048 | 'required': ['entities'], |
| 2049 | 'type': 'object'}, |
| 2050 | 'Entity': {'additionalProperties': False, |
| 2051 | 'properties': {'tag': {'type': 'string'}}, |
| 2052 | 'required': ['tag'], |
| 2053 | 'type': 'object'}, |
| 2054 | 'EntityPassword': {'additionalProperties': False, |
| 2055 | 'properties': {'password': {'type': 'string'}, |
| 2056 | 'tag': {'type': 'string'}}, |
| 2057 | 'required': ['tag', 'password'], |
| 2058 | 'type': 'object'}, |
| 2059 | 'EntityPasswords': {'additionalProperties': False, |
| 2060 | 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'}, |
| 2061 | 'type': 'array'}}, |
| 2062 | 'required': ['changes'], |
| 2063 | 'type': 'object'}, |
| 2064 | 'EntityStatusArgs': {'additionalProperties': False, |
| 2065 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2066 | 'type': 'object'}}, |
| 2067 | 'type': 'object'}, |
| 2068 | 'info': {'type': 'string'}, |
| 2069 | 'status': {'type': 'string'}, |
| 2070 | 'tag': {'type': 'string'}}, |
| 2071 | 'required': ['tag', |
| 2072 | 'status', |
| 2073 | 'info', |
| 2074 | 'data'], |
| 2075 | 'type': 'object'}, |
| 2076 | 'Error': {'additionalProperties': False, |
| 2077 | 'properties': {'code': {'type': 'string'}, |
| 2078 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 2079 | 'message': {'type': 'string'}}, |
| 2080 | 'required': ['message', 'code'], |
| 2081 | 'type': 'object'}, |
| 2082 | 'ErrorInfo': {'additionalProperties': False, |
| 2083 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 2084 | 'macaroon-path': {'type': 'string'}}, |
| 2085 | 'type': 'object'}, |
| 2086 | 'ErrorResult': {'additionalProperties': False, |
| 2087 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 2088 | 'type': 'object'}, |
| 2089 | 'ErrorResults': {'additionalProperties': False, |
| 2090 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 2091 | 'type': 'array'}}, |
| 2092 | 'required': ['results'], |
| 2093 | 'type': 'object'}, |
| 2094 | 'HostPort': {'additionalProperties': False, |
| 2095 | 'properties': {'Address': {'$ref': '#/definitions/Address'}, |
| 2096 | 'port': {'type': 'integer'}}, |
| 2097 | 'required': ['Address', 'port'], |
| 2098 | 'type': 'object'}, |
| 2099 | 'LifeResult': {'additionalProperties': False, |
| 2100 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2101 | 'life': {'type': 'string'}}, |
| 2102 | 'required': ['life'], |
| 2103 | 'type': 'object'}, |
| 2104 | 'LifeResults': {'additionalProperties': False, |
| 2105 | 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, |
| 2106 | 'type': 'array'}}, |
| 2107 | 'required': ['results'], |
| 2108 | 'type': 'object'}, |
| 2109 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 2110 | 'NotifyWatchResult': {'additionalProperties': False, |
| 2111 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 2112 | 'error': {'$ref': '#/definitions/Error'}}, |
| 2113 | 'required': ['NotifyWatcherId'], |
| 2114 | 'type': 'object'}, |
| 2115 | 'SetStatus': {'additionalProperties': False, |
| 2116 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, |
| 2117 | 'type': 'array'}}, |
| 2118 | 'required': ['entities'], |
| 2119 | 'type': 'object'}, |
| 2120 | 'StringResult': {'additionalProperties': False, |
| 2121 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2122 | 'result': {'type': 'string'}}, |
| 2123 | 'required': ['result'], |
| 2124 | 'type': 'object'}, |
| 2125 | 'StringsResult': {'additionalProperties': False, |
| 2126 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2127 | 'result': {'items': {'type': 'string'}, |
| 2128 | 'type': 'array'}}, |
| 2129 | 'type': 'object'}, |
| 2130 | 'StringsWatchResult': {'additionalProperties': False, |
| 2131 | 'properties': {'changes': {'items': {'type': 'string'}, |
| 2132 | 'type': 'array'}, |
| 2133 | 'error': {'$ref': '#/definitions/Error'}, |
| 2134 | 'watcher-id': {'type': 'string'}}, |
| 2135 | 'required': ['watcher-id'], |
| 2136 | 'type': 'object'}, |
| 2137 | 'StringsWatchResults': {'additionalProperties': False, |
| 2138 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, |
| 2139 | 'type': 'array'}}, |
| 2140 | 'required': ['results'], |
| 2141 | 'type': 'object'}}, |
| 2142 | 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, |
| 2143 | 'type': 'object'}, |
| 2144 | 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, |
| 2145 | 'type': 'object'}, |
| 2146 | 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, |
| 2147 | 'type': 'object'}, |
| 2148 | 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}}, |
| 2149 | 'type': 'object'}, |
| 2150 | 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2151 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 2152 | 'type': 'object'}, |
| 2153 | 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, |
| 2154 | 'type': 'object'}, |
| 2155 | 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2156 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 2157 | 'type': 'object'}, |
| 2158 | 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, |
| 2159 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 2160 | 'type': 'object'}, |
| 2161 | 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 2162 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 2163 | 'type': 'object'}, |
| 2164 | 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, |
| 2165 | 'type': 'object'}, |
| 2166 | 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 2167 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 2168 | 'type': 'object'}, |
| 2169 | 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 2170 | 'type': 'object'}, |
| 2171 | 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2172 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 2173 | 'type': 'object'}}, |
| 2174 | 'type': 'object'} |
| 2175 | |
| 2176 | |
| 2177 | @ReturnMapping(StringsResult) |
| 2178 | async def APIAddresses(self): |
| 2179 | ''' |
| 2180 | |
| 2181 | Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]] |
| 2182 | ''' |
| 2183 | # map input types to rpc msg |
| 2184 | _params = dict() |
| 2185 | msg = dict(type='Deployer', request='APIAddresses', version=1, params=_params) |
| 2186 | |
| 2187 | reply = await self.rpc(msg) |
| 2188 | return reply |
| 2189 | |
| 2190 | |
| 2191 | |
| 2192 | @ReturnMapping(APIHostPortsResult) |
| 2193 | async def APIHostPorts(self): |
| 2194 | ''' |
| 2195 | |
| 2196 | Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort> |
| 2197 | ''' |
| 2198 | # map input types to rpc msg |
| 2199 | _params = dict() |
| 2200 | msg = dict(type='Deployer', request='APIHostPorts', version=1, params=_params) |
| 2201 | |
| 2202 | reply = await self.rpc(msg) |
| 2203 | return reply |
| 2204 | |
| 2205 | |
| 2206 | |
| 2207 | @ReturnMapping(BytesResult) |
| 2208 | async def CACert(self): |
| 2209 | ''' |
| 2210 | |
| 2211 | Returns -> typing.Sequence<+T_co>[int] |
| 2212 | ''' |
| 2213 | # map input types to rpc msg |
| 2214 | _params = dict() |
| 2215 | msg = dict(type='Deployer', request='CACert', version=1, params=_params) |
| 2216 | |
| 2217 | reply = await self.rpc(msg) |
| 2218 | return reply |
| 2219 | |
| 2220 | |
| 2221 | |
| 2222 | @ReturnMapping(DeployerConnectionValues) |
| 2223 | async def ConnectionInfo(self): |
| 2224 | ''' |
| 2225 | |
| 2226 | Returns -> typing.Sequence<+T_co>[str] |
| 2227 | ''' |
| 2228 | # map input types to rpc msg |
| 2229 | _params = dict() |
| 2230 | msg = dict(type='Deployer', request='ConnectionInfo', version=1, params=_params) |
| 2231 | |
| 2232 | reply = await self.rpc(msg) |
| 2233 | return reply |
| 2234 | |
| 2235 | |
| 2236 | |
| 2237 | @ReturnMapping(LifeResults) |
| 2238 | async def Life(self, entities): |
| 2239 | ''' |
| 2240 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 2241 | Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> |
| 2242 | ''' |
| 2243 | # map input types to rpc msg |
| 2244 | _params = dict() |
| 2245 | msg = dict(type='Deployer', request='Life', version=1, params=_params) |
| 2246 | _params['entities'] = entities |
| 2247 | reply = await self.rpc(msg) |
| 2248 | return reply |
| 2249 | |
| 2250 | |
| 2251 | |
| 2252 | @ReturnMapping(StringResult) |
| 2253 | async def ModelUUID(self): |
| 2254 | ''' |
| 2255 | |
| 2256 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 2257 | ''' |
| 2258 | # map input types to rpc msg |
| 2259 | _params = dict() |
| 2260 | msg = dict(type='Deployer', request='ModelUUID', version=1, params=_params) |
| 2261 | |
| 2262 | reply = await self.rpc(msg) |
| 2263 | return reply |
| 2264 | |
| 2265 | |
| 2266 | |
| 2267 | @ReturnMapping(ErrorResults) |
| 2268 | async def Remove(self, entities): |
| 2269 | ''' |
| 2270 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 2271 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 2272 | ''' |
| 2273 | # map input types to rpc msg |
| 2274 | _params = dict() |
| 2275 | msg = dict(type='Deployer', request='Remove', version=1, params=_params) |
| 2276 | _params['entities'] = entities |
| 2277 | reply = await self.rpc(msg) |
| 2278 | return reply |
| 2279 | |
| 2280 | |
| 2281 | |
| 2282 | @ReturnMapping(ErrorResults) |
| 2283 | async def SetPasswords(self, changes): |
| 2284 | ''' |
| 2285 | changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword> |
| 2286 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 2287 | ''' |
| 2288 | # map input types to rpc msg |
| 2289 | _params = dict() |
| 2290 | msg = dict(type='Deployer', request='SetPasswords', version=1, params=_params) |
| 2291 | _params['changes'] = changes |
| 2292 | reply = await self.rpc(msg) |
| 2293 | return reply |
| 2294 | |
| 2295 | |
| 2296 | |
| 2297 | @ReturnMapping(ErrorResults) |
| 2298 | async def SetStatus(self, entities): |
| 2299 | ''' |
| 2300 | entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> |
| 2301 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 2302 | ''' |
| 2303 | # map input types to rpc msg |
| 2304 | _params = dict() |
| 2305 | msg = dict(type='Deployer', request='SetStatus', version=1, params=_params) |
| 2306 | _params['entities'] = entities |
| 2307 | reply = await self.rpc(msg) |
| 2308 | return reply |
| 2309 | |
| 2310 | |
| 2311 | |
| 2312 | @ReturnMapping(StringsResult) |
| 2313 | async def StateAddresses(self): |
| 2314 | ''' |
| 2315 | |
| 2316 | Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]] |
| 2317 | ''' |
| 2318 | # map input types to rpc msg |
| 2319 | _params = dict() |
| 2320 | msg = dict(type='Deployer', request='StateAddresses', version=1, params=_params) |
| 2321 | |
| 2322 | reply = await self.rpc(msg) |
| 2323 | return reply |
| 2324 | |
| 2325 | |
| 2326 | |
| 2327 | @ReturnMapping(ErrorResults) |
| 2328 | async def UpdateStatus(self, entities): |
| 2329 | ''' |
| 2330 | entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> |
| 2331 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 2332 | ''' |
| 2333 | # map input types to rpc msg |
| 2334 | _params = dict() |
| 2335 | msg = dict(type='Deployer', request='UpdateStatus', version=1, params=_params) |
| 2336 | _params['entities'] = entities |
| 2337 | reply = await self.rpc(msg) |
| 2338 | return reply |
| 2339 | |
| 2340 | |
| 2341 | |
| 2342 | @ReturnMapping(NotifyWatchResult) |
| 2343 | async def WatchAPIHostPorts(self): |
| 2344 | ''' |
| 2345 | |
| 2346 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 2347 | ''' |
| 2348 | # map input types to rpc msg |
| 2349 | _params = dict() |
| 2350 | msg = dict(type='Deployer', request='WatchAPIHostPorts', version=1, params=_params) |
| 2351 | |
| 2352 | reply = await self.rpc(msg) |
| 2353 | return reply |
| 2354 | |
| 2355 | |
| 2356 | |
| 2357 | @ReturnMapping(StringsWatchResults) |
| 2358 | async def WatchUnits(self, entities): |
| 2359 | ''' |
| 2360 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 2361 | Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> |
| 2362 | ''' |
| 2363 | # map input types to rpc msg |
| 2364 | _params = dict() |
| 2365 | msg = dict(type='Deployer', request='WatchUnits', version=1, params=_params) |
| 2366 | _params['entities'] = entities |
| 2367 | reply = await self.rpc(msg) |
| 2368 | return reply |
| 2369 | |
| 2370 | |
| 2371 | |
| 2372 | class HostKeyReporterFacade(Type): |
| 2373 | name = 'HostKeyReporter' |
| 2374 | version = 1 |
| 2375 | schema = {'definitions': {'Error': {'additionalProperties': False, |
| 2376 | 'properties': {'code': {'type': 'string'}, |
| 2377 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 2378 | 'message': {'type': 'string'}}, |
| 2379 | 'required': ['message', 'code'], |
| 2380 | 'type': 'object'}, |
| 2381 | 'ErrorInfo': {'additionalProperties': False, |
| 2382 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 2383 | 'macaroon-path': {'type': 'string'}}, |
| 2384 | 'type': 'object'}, |
| 2385 | 'ErrorResult': {'additionalProperties': False, |
| 2386 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 2387 | 'type': 'object'}, |
| 2388 | 'ErrorResults': {'additionalProperties': False, |
| 2389 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 2390 | 'type': 'array'}}, |
| 2391 | 'required': ['results'], |
| 2392 | 'type': 'object'}, |
| 2393 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 2394 | 'SSHHostKeySet': {'additionalProperties': False, |
| 2395 | 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'}, |
| 2396 | 'type': 'array'}}, |
| 2397 | 'required': ['entity-keys'], |
| 2398 | 'type': 'object'}, |
| 2399 | 'SSHHostKeys': {'additionalProperties': False, |
| 2400 | 'properties': {'public-keys': {'items': {'type': 'string'}, |
| 2401 | 'type': 'array'}, |
| 2402 | 'tag': {'type': 'string'}}, |
| 2403 | 'required': ['tag', 'public-keys'], |
| 2404 | 'type': 'object'}}, |
| 2405 | 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'}, |
| 2406 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 2407 | 'type': 'object'}}, |
| 2408 | 'type': 'object'} |
| 2409 | |
| 2410 | |
| 2411 | @ReturnMapping(ErrorResults) |
| 2412 | async def ReportKeys(self, entity_keys): |
| 2413 | ''' |
| 2414 | entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys> |
| 2415 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 2416 | ''' |
| 2417 | # map input types to rpc msg |
| 2418 | _params = dict() |
| 2419 | msg = dict(type='HostKeyReporter', request='ReportKeys', version=1, params=_params) |
| 2420 | _params['entity-keys'] = entity_keys |
| 2421 | reply = await self.rpc(msg) |
| 2422 | return reply |
| 2423 | |
| 2424 | |
| 2425 | |
| 2426 | class KeyManagerFacade(Type): |
| 2427 | name = 'KeyManager' |
| 2428 | version = 1 |
| 2429 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 2430 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 2431 | 'type': 'array'}}, |
| 2432 | 'required': ['entities'], |
| 2433 | 'type': 'object'}, |
| 2434 | 'Entity': {'additionalProperties': False, |
| 2435 | 'properties': {'tag': {'type': 'string'}}, |
| 2436 | 'required': ['tag'], |
| 2437 | 'type': 'object'}, |
| 2438 | 'Error': {'additionalProperties': False, |
| 2439 | 'properties': {'code': {'type': 'string'}, |
| 2440 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 2441 | 'message': {'type': 'string'}}, |
| 2442 | 'required': ['message', 'code'], |
| 2443 | 'type': 'object'}, |
| 2444 | 'ErrorInfo': {'additionalProperties': False, |
| 2445 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 2446 | 'macaroon-path': {'type': 'string'}}, |
| 2447 | 'type': 'object'}, |
| 2448 | 'ErrorResult': {'additionalProperties': False, |
| 2449 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 2450 | 'type': 'object'}, |
| 2451 | 'ErrorResults': {'additionalProperties': False, |
| 2452 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 2453 | 'type': 'array'}}, |
| 2454 | 'required': ['results'], |
| 2455 | 'type': 'object'}, |
| 2456 | 'ListSSHKeys': {'additionalProperties': False, |
| 2457 | 'properties': {'entities': {'$ref': '#/definitions/Entities'}, |
| 2458 | 'mode': {'type': 'boolean'}}, |
| 2459 | 'required': ['entities', 'mode'], |
| 2460 | 'type': 'object'}, |
| 2461 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 2462 | 'ModifyUserSSHKeys': {'additionalProperties': False, |
| 2463 | 'properties': {'ssh-keys': {'items': {'type': 'string'}, |
| 2464 | 'type': 'array'}, |
| 2465 | 'user': {'type': 'string'}}, |
| 2466 | 'required': ['user', 'ssh-keys'], |
| 2467 | 'type': 'object'}, |
| 2468 | 'StringsResult': {'additionalProperties': False, |
| 2469 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2470 | 'result': {'items': {'type': 'string'}, |
| 2471 | 'type': 'array'}}, |
| 2472 | 'type': 'object'}, |
| 2473 | 'StringsResults': {'additionalProperties': False, |
| 2474 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, |
| 2475 | 'type': 'array'}}, |
| 2476 | 'required': ['results'], |
| 2477 | 'type': 'object'}}, |
| 2478 | 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, |
| 2479 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 2480 | 'type': 'object'}, |
| 2481 | 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, |
| 2482 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 2483 | 'type': 'object'}, |
| 2484 | 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, |
| 2485 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 2486 | 'type': 'object'}, |
| 2487 | 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'}, |
| 2488 | 'Result': {'$ref': '#/definitions/StringsResults'}}, |
| 2489 | 'type': 'object'}}, |
| 2490 | 'type': 'object'} |
| 2491 | |
| 2492 | |
| 2493 | @ReturnMapping(ErrorResults) |
| 2494 | async def AddKeys(self, ssh_keys, user): |
| 2495 | ''' |
| 2496 | ssh_keys : typing.Sequence<+T_co>[str] |
| 2497 | user : str |
| 2498 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 2499 | ''' |
| 2500 | # map input types to rpc msg |
| 2501 | _params = dict() |
| 2502 | msg = dict(type='KeyManager', request='AddKeys', version=1, params=_params) |
| 2503 | _params['ssh-keys'] = ssh_keys |
| 2504 | _params['user'] = user |
| 2505 | reply = await self.rpc(msg) |
| 2506 | return reply |
| 2507 | |
| 2508 | |
| 2509 | |
| 2510 | @ReturnMapping(ErrorResults) |
| 2511 | async def DeleteKeys(self, ssh_keys, user): |
| 2512 | ''' |
| 2513 | ssh_keys : typing.Sequence<+T_co>[str] |
| 2514 | user : str |
| 2515 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 2516 | ''' |
| 2517 | # map input types to rpc msg |
| 2518 | _params = dict() |
| 2519 | msg = dict(type='KeyManager', request='DeleteKeys', version=1, params=_params) |
| 2520 | _params['ssh-keys'] = ssh_keys |
| 2521 | _params['user'] = user |
| 2522 | reply = await self.rpc(msg) |
| 2523 | return reply |
| 2524 | |
| 2525 | |
| 2526 | |
| 2527 | @ReturnMapping(ErrorResults) |
| 2528 | async def ImportKeys(self, ssh_keys, user): |
| 2529 | ''' |
| 2530 | ssh_keys : typing.Sequence<+T_co>[str] |
| 2531 | user : str |
| 2532 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 2533 | ''' |
| 2534 | # map input types to rpc msg |
| 2535 | _params = dict() |
| 2536 | msg = dict(type='KeyManager', request='ImportKeys', version=1, params=_params) |
| 2537 | _params['ssh-keys'] = ssh_keys |
| 2538 | _params['user'] = user |
| 2539 | reply = await self.rpc(msg) |
| 2540 | return reply |
| 2541 | |
| 2542 | |
| 2543 | |
| 2544 | @ReturnMapping(StringsResults) |
| 2545 | async def ListKeys(self, entities, mode): |
| 2546 | ''' |
| 2547 | entities : Entities |
| 2548 | mode : bool |
| 2549 | Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult> |
| 2550 | ''' |
| 2551 | # map input types to rpc msg |
| 2552 | _params = dict() |
| 2553 | msg = dict(type='KeyManager', request='ListKeys', version=1, params=_params) |
| 2554 | _params['entities'] = entities |
| 2555 | _params['mode'] = mode |
| 2556 | reply = await self.rpc(msg) |
| 2557 | return reply |
| 2558 | |
| 2559 | |
| 2560 | |
| 2561 | class KeyUpdaterFacade(Type): |
| 2562 | name = 'KeyUpdater' |
| 2563 | version = 1 |
| 2564 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 2565 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 2566 | 'type': 'array'}}, |
| 2567 | 'required': ['entities'], |
| 2568 | 'type': 'object'}, |
| 2569 | 'Entity': {'additionalProperties': False, |
| 2570 | 'properties': {'tag': {'type': 'string'}}, |
| 2571 | 'required': ['tag'], |
| 2572 | 'type': 'object'}, |
| 2573 | 'Error': {'additionalProperties': False, |
| 2574 | 'properties': {'code': {'type': 'string'}, |
| 2575 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 2576 | 'message': {'type': 'string'}}, |
| 2577 | 'required': ['message', 'code'], |
| 2578 | 'type': 'object'}, |
| 2579 | 'ErrorInfo': {'additionalProperties': False, |
| 2580 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 2581 | 'macaroon-path': {'type': 'string'}}, |
| 2582 | 'type': 'object'}, |
| 2583 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 2584 | 'NotifyWatchResult': {'additionalProperties': False, |
| 2585 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 2586 | 'error': {'$ref': '#/definitions/Error'}}, |
| 2587 | 'required': ['NotifyWatcherId'], |
| 2588 | 'type': 'object'}, |
| 2589 | 'NotifyWatchResults': {'additionalProperties': False, |
| 2590 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 2591 | 'type': 'array'}}, |
| 2592 | 'required': ['results'], |
| 2593 | 'type': 'object'}, |
| 2594 | 'StringsResult': {'additionalProperties': False, |
| 2595 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2596 | 'result': {'items': {'type': 'string'}, |
| 2597 | 'type': 'array'}}, |
| 2598 | 'type': 'object'}, |
| 2599 | 'StringsResults': {'additionalProperties': False, |
| 2600 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, |
| 2601 | 'type': 'array'}}, |
| 2602 | 'required': ['results'], |
| 2603 | 'type': 'object'}}, |
| 2604 | 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2605 | 'Result': {'$ref': '#/definitions/StringsResults'}}, |
| 2606 | 'type': 'object'}, |
| 2607 | 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2608 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 2609 | 'type': 'object'}}, |
| 2610 | 'type': 'object'} |
| 2611 | |
| 2612 | |
| 2613 | @ReturnMapping(StringsResults) |
| 2614 | async def AuthorisedKeys(self, entities): |
| 2615 | ''' |
| 2616 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 2617 | Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult> |
| 2618 | ''' |
| 2619 | # map input types to rpc msg |
| 2620 | _params = dict() |
| 2621 | msg = dict(type='KeyUpdater', request='AuthorisedKeys', version=1, params=_params) |
| 2622 | _params['entities'] = entities |
| 2623 | reply = await self.rpc(msg) |
| 2624 | return reply |
| 2625 | |
| 2626 | |
| 2627 | |
| 2628 | @ReturnMapping(NotifyWatchResults) |
| 2629 | async def WatchAuthorisedKeys(self, entities): |
| 2630 | ''' |
| 2631 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 2632 | Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> |
| 2633 | ''' |
| 2634 | # map input types to rpc msg |
| 2635 | _params = dict() |
| 2636 | msg = dict(type='KeyUpdater', request='WatchAuthorisedKeys', version=1, params=_params) |
| 2637 | _params['entities'] = entities |
| 2638 | reply = await self.rpc(msg) |
| 2639 | return reply |
| 2640 | |
| 2641 | |
| 2642 | |
| 2643 | class LifeFlagFacade(Type): |
| 2644 | name = 'LifeFlag' |
| 2645 | version = 1 |
| 2646 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 2647 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 2648 | 'type': 'array'}}, |
| 2649 | 'required': ['entities'], |
| 2650 | 'type': 'object'}, |
| 2651 | 'Entity': {'additionalProperties': False, |
| 2652 | 'properties': {'tag': {'type': 'string'}}, |
| 2653 | 'required': ['tag'], |
| 2654 | 'type': 'object'}, |
| 2655 | 'Error': {'additionalProperties': False, |
| 2656 | 'properties': {'code': {'type': 'string'}, |
| 2657 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 2658 | 'message': {'type': 'string'}}, |
| 2659 | 'required': ['message', 'code'], |
| 2660 | 'type': 'object'}, |
| 2661 | 'ErrorInfo': {'additionalProperties': False, |
| 2662 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 2663 | 'macaroon-path': {'type': 'string'}}, |
| 2664 | 'type': 'object'}, |
| 2665 | 'LifeResult': {'additionalProperties': False, |
| 2666 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2667 | 'life': {'type': 'string'}}, |
| 2668 | 'required': ['life'], |
| 2669 | 'type': 'object'}, |
| 2670 | 'LifeResults': {'additionalProperties': False, |
| 2671 | 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, |
| 2672 | 'type': 'array'}}, |
| 2673 | 'required': ['results'], |
| 2674 | 'type': 'object'}, |
| 2675 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 2676 | 'NotifyWatchResult': {'additionalProperties': False, |
| 2677 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 2678 | 'error': {'$ref': '#/definitions/Error'}}, |
| 2679 | 'required': ['NotifyWatcherId'], |
| 2680 | 'type': 'object'}, |
| 2681 | 'NotifyWatchResults': {'additionalProperties': False, |
| 2682 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 2683 | 'type': 'array'}}, |
| 2684 | 'required': ['results'], |
| 2685 | 'type': 'object'}}, |
| 2686 | 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2687 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 2688 | 'type': 'object'}, |
| 2689 | 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2690 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 2691 | 'type': 'object'}}, |
| 2692 | 'type': 'object'} |
| 2693 | |
| 2694 | |
| 2695 | @ReturnMapping(LifeResults) |
| 2696 | async def Life(self, entities): |
| 2697 | ''' |
| 2698 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 2699 | Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> |
| 2700 | ''' |
| 2701 | # map input types to rpc msg |
| 2702 | _params = dict() |
| 2703 | msg = dict(type='LifeFlag', request='Life', version=1, params=_params) |
| 2704 | _params['entities'] = entities |
| 2705 | reply = await self.rpc(msg) |
| 2706 | return reply |
| 2707 | |
| 2708 | |
| 2709 | |
| 2710 | @ReturnMapping(NotifyWatchResults) |
| 2711 | async def Watch(self, entities): |
| 2712 | ''' |
| 2713 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 2714 | Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> |
| 2715 | ''' |
| 2716 | # map input types to rpc msg |
| 2717 | _params = dict() |
| 2718 | msg = dict(type='LifeFlag', request='Watch', version=1, params=_params) |
| 2719 | _params['entities'] = entities |
| 2720 | reply = await self.rpc(msg) |
| 2721 | return reply |
| 2722 | |
| 2723 | |
| 2724 | |
| 2725 | class LogForwardingFacade(Type): |
| 2726 | name = 'LogForwarding' |
| 2727 | version = 1 |
| 2728 | schema = {'definitions': {'Error': {'additionalProperties': False, |
| 2729 | 'properties': {'code': {'type': 'string'}, |
| 2730 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 2731 | 'message': {'type': 'string'}}, |
| 2732 | 'required': ['message', 'code'], |
| 2733 | 'type': 'object'}, |
| 2734 | 'ErrorInfo': {'additionalProperties': False, |
| 2735 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 2736 | 'macaroon-path': {'type': 'string'}}, |
| 2737 | 'type': 'object'}, |
| 2738 | 'ErrorResult': {'additionalProperties': False, |
| 2739 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 2740 | 'type': 'object'}, |
| 2741 | 'ErrorResults': {'additionalProperties': False, |
| 2742 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 2743 | 'type': 'array'}}, |
| 2744 | 'required': ['results'], |
| 2745 | 'type': 'object'}, |
| 2746 | 'LogForwardingGetLastSentParams': {'additionalProperties': False, |
| 2747 | 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'}, |
| 2748 | 'type': 'array'}}, |
| 2749 | 'required': ['ids'], |
| 2750 | 'type': 'object'}, |
| 2751 | 'LogForwardingGetLastSentResult': {'additionalProperties': False, |
| 2752 | 'properties': {'err': {'$ref': '#/definitions/Error'}, |
| 2753 | 'record-id': {'type': 'integer'}, |
| 2754 | 'record-timestamp': {'type': 'integer'}}, |
| 2755 | 'required': ['record-id', |
| 2756 | 'record-timestamp', |
| 2757 | 'err'], |
| 2758 | 'type': 'object'}, |
| 2759 | 'LogForwardingGetLastSentResults': {'additionalProperties': False, |
| 2760 | 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'}, |
| 2761 | 'type': 'array'}}, |
| 2762 | 'required': ['results'], |
| 2763 | 'type': 'object'}, |
| 2764 | 'LogForwardingID': {'additionalProperties': False, |
| 2765 | 'properties': {'model': {'type': 'string'}, |
| 2766 | 'sink': {'type': 'string'}}, |
| 2767 | 'required': ['model', 'sink'], |
| 2768 | 'type': 'object'}, |
| 2769 | 'LogForwardingSetLastSentParam': {'additionalProperties': False, |
| 2770 | 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'}, |
| 2771 | 'record-id': {'type': 'integer'}, |
| 2772 | 'record-timestamp': {'type': 'integer'}}, |
| 2773 | 'required': ['LogForwardingID', |
| 2774 | 'record-id', |
| 2775 | 'record-timestamp'], |
| 2776 | 'type': 'object'}, |
| 2777 | 'LogForwardingSetLastSentParams': {'additionalProperties': False, |
| 2778 | 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'}, |
| 2779 | 'type': 'array'}}, |
| 2780 | 'required': ['params'], |
| 2781 | 'type': 'object'}, |
| 2782 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}}, |
| 2783 | 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'}, |
| 2784 | 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}}, |
| 2785 | 'type': 'object'}, |
| 2786 | 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'}, |
| 2787 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 2788 | 'type': 'object'}}, |
| 2789 | 'type': 'object'} |
| 2790 | |
| 2791 | |
| 2792 | @ReturnMapping(LogForwardingGetLastSentResults) |
| 2793 | async def GetLastSent(self, ids): |
| 2794 | ''' |
| 2795 | ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID> |
| 2796 | Returns -> typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult> |
| 2797 | ''' |
| 2798 | # map input types to rpc msg |
| 2799 | _params = dict() |
| 2800 | msg = dict(type='LogForwarding', request='GetLastSent', version=1, params=_params) |
| 2801 | _params['ids'] = ids |
| 2802 | reply = await self.rpc(msg) |
| 2803 | return reply |
| 2804 | |
| 2805 | |
| 2806 | |
| 2807 | @ReturnMapping(ErrorResults) |
| 2808 | async def SetLastSent(self, params): |
| 2809 | ''' |
| 2810 | params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam> |
| 2811 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 2812 | ''' |
| 2813 | # map input types to rpc msg |
| 2814 | _params = dict() |
| 2815 | msg = dict(type='LogForwarding', request='SetLastSent', version=1, params=_params) |
| 2816 | _params['params'] = params |
| 2817 | reply = await self.rpc(msg) |
| 2818 | return reply |
| 2819 | |
| 2820 | |
| 2821 | |
| 2822 | class LoggerFacade(Type): |
| 2823 | name = 'Logger' |
| 2824 | version = 1 |
| 2825 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 2826 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 2827 | 'type': 'array'}}, |
| 2828 | 'required': ['entities'], |
| 2829 | 'type': 'object'}, |
| 2830 | 'Entity': {'additionalProperties': False, |
| 2831 | 'properties': {'tag': {'type': 'string'}}, |
| 2832 | 'required': ['tag'], |
| 2833 | 'type': 'object'}, |
| 2834 | 'Error': {'additionalProperties': False, |
| 2835 | 'properties': {'code': {'type': 'string'}, |
| 2836 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 2837 | 'message': {'type': 'string'}}, |
| 2838 | 'required': ['message', 'code'], |
| 2839 | 'type': 'object'}, |
| 2840 | 'ErrorInfo': {'additionalProperties': False, |
| 2841 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 2842 | 'macaroon-path': {'type': 'string'}}, |
| 2843 | 'type': 'object'}, |
| 2844 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 2845 | 'NotifyWatchResult': {'additionalProperties': False, |
| 2846 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 2847 | 'error': {'$ref': '#/definitions/Error'}}, |
| 2848 | 'required': ['NotifyWatcherId'], |
| 2849 | 'type': 'object'}, |
| 2850 | 'NotifyWatchResults': {'additionalProperties': False, |
| 2851 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 2852 | 'type': 'array'}}, |
| 2853 | 'required': ['results'], |
| 2854 | 'type': 'object'}, |
| 2855 | 'StringResult': {'additionalProperties': False, |
| 2856 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2857 | 'result': {'type': 'string'}}, |
| 2858 | 'required': ['result'], |
| 2859 | 'type': 'object'}, |
| 2860 | 'StringResults': {'additionalProperties': False, |
| 2861 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, |
| 2862 | 'type': 'array'}}, |
| 2863 | 'required': ['results'], |
| 2864 | 'type': 'object'}}, |
| 2865 | 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2866 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 2867 | 'type': 'object'}, |
| 2868 | 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2869 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 2870 | 'type': 'object'}}, |
| 2871 | 'type': 'object'} |
| 2872 | |
| 2873 | |
| 2874 | @ReturnMapping(StringResults) |
| 2875 | async def LoggingConfig(self, entities): |
| 2876 | ''' |
| 2877 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 2878 | Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> |
| 2879 | ''' |
| 2880 | # map input types to rpc msg |
| 2881 | _params = dict() |
| 2882 | msg = dict(type='Logger', request='LoggingConfig', version=1, params=_params) |
| 2883 | _params['entities'] = entities |
| 2884 | reply = await self.rpc(msg) |
| 2885 | return reply |
| 2886 | |
| 2887 | |
| 2888 | |
| 2889 | @ReturnMapping(NotifyWatchResults) |
| 2890 | async def WatchLoggingConfig(self, entities): |
| 2891 | ''' |
| 2892 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 2893 | Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> |
| 2894 | ''' |
| 2895 | # map input types to rpc msg |
| 2896 | _params = dict() |
| 2897 | msg = dict(type='Logger', request='WatchLoggingConfig', version=1, params=_params) |
| 2898 | _params['entities'] = entities |
| 2899 | reply = await self.rpc(msg) |
| 2900 | return reply |
| 2901 | |
| 2902 | |
| 2903 | |
| 2904 | class MachineActionsFacade(Type): |
| 2905 | name = 'MachineActions' |
| 2906 | version = 1 |
| 2907 | schema = {'definitions': {'Action': {'additionalProperties': False, |
| 2908 | 'properties': {'name': {'type': 'string'}, |
| 2909 | 'parameters': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2910 | 'type': 'object'}}, |
| 2911 | 'type': 'object'}, |
| 2912 | 'receiver': {'type': 'string'}, |
| 2913 | 'tag': {'type': 'string'}}, |
| 2914 | 'required': ['tag', 'receiver', 'name'], |
| 2915 | 'type': 'object'}, |
| 2916 | 'ActionExecutionResult': {'additionalProperties': False, |
| 2917 | 'properties': {'action-tag': {'type': 'string'}, |
| 2918 | 'message': {'type': 'string'}, |
| 2919 | 'results': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2920 | 'type': 'object'}}, |
| 2921 | 'type': 'object'}, |
| 2922 | 'status': {'type': 'string'}}, |
| 2923 | 'required': ['action-tag', 'status'], |
| 2924 | 'type': 'object'}, |
| 2925 | 'ActionExecutionResults': {'additionalProperties': False, |
| 2926 | 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'}, |
| 2927 | 'type': 'array'}}, |
| 2928 | 'type': 'object'}, |
| 2929 | 'ActionResult': {'additionalProperties': False, |
| 2930 | 'properties': {'action': {'$ref': '#/definitions/Action'}, |
| 2931 | 'completed': {'format': 'date-time', |
| 2932 | 'type': 'string'}, |
| 2933 | 'enqueued': {'format': 'date-time', |
| 2934 | 'type': 'string'}, |
| 2935 | 'error': {'$ref': '#/definitions/Error'}, |
| 2936 | 'message': {'type': 'string'}, |
| 2937 | 'output': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2938 | 'type': 'object'}}, |
| 2939 | 'type': 'object'}, |
| 2940 | 'started': {'format': 'date-time', |
| 2941 | 'type': 'string'}, |
| 2942 | 'status': {'type': 'string'}}, |
| 2943 | 'type': 'object'}, |
| 2944 | 'ActionResults': {'additionalProperties': False, |
| 2945 | 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'}, |
| 2946 | 'type': 'array'}}, |
| 2947 | 'type': 'object'}, |
| 2948 | 'ActionsByReceiver': {'additionalProperties': False, |
| 2949 | 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'}, |
| 2950 | 'type': 'array'}, |
| 2951 | 'error': {'$ref': '#/definitions/Error'}, |
| 2952 | 'receiver': {'type': 'string'}}, |
| 2953 | 'type': 'object'}, |
| 2954 | 'ActionsByReceivers': {'additionalProperties': False, |
| 2955 | 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'}, |
| 2956 | 'type': 'array'}}, |
| 2957 | 'type': 'object'}, |
| 2958 | 'Entities': {'additionalProperties': False, |
| 2959 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 2960 | 'type': 'array'}}, |
| 2961 | 'required': ['entities'], |
| 2962 | 'type': 'object'}, |
| 2963 | 'Entity': {'additionalProperties': False, |
| 2964 | 'properties': {'tag': {'type': 'string'}}, |
| 2965 | 'required': ['tag'], |
| 2966 | 'type': 'object'}, |
| 2967 | 'Error': {'additionalProperties': False, |
| 2968 | 'properties': {'code': {'type': 'string'}, |
| 2969 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 2970 | 'message': {'type': 'string'}}, |
| 2971 | 'required': ['message', 'code'], |
| 2972 | 'type': 'object'}, |
| 2973 | 'ErrorInfo': {'additionalProperties': False, |
| 2974 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 2975 | 'macaroon-path': {'type': 'string'}}, |
| 2976 | 'type': 'object'}, |
| 2977 | 'ErrorResult': {'additionalProperties': False, |
| 2978 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 2979 | 'type': 'object'}, |
| 2980 | 'ErrorResults': {'additionalProperties': False, |
| 2981 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 2982 | 'type': 'array'}}, |
| 2983 | 'required': ['results'], |
| 2984 | 'type': 'object'}, |
| 2985 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 2986 | 'StringsWatchResult': {'additionalProperties': False, |
| 2987 | 'properties': {'changes': {'items': {'type': 'string'}, |
| 2988 | 'type': 'array'}, |
| 2989 | 'error': {'$ref': '#/definitions/Error'}, |
| 2990 | 'watcher-id': {'type': 'string'}}, |
| 2991 | 'required': ['watcher-id'], |
| 2992 | 'type': 'object'}, |
| 2993 | 'StringsWatchResults': {'additionalProperties': False, |
| 2994 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, |
| 2995 | 'type': 'array'}}, |
| 2996 | 'required': ['results'], |
| 2997 | 'type': 'object'}}, |
| 2998 | 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 2999 | 'Result': {'$ref': '#/definitions/ActionResults'}}, |
| 3000 | 'type': 'object'}, |
| 3001 | 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3002 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3003 | 'type': 'object'}, |
| 3004 | 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'}, |
| 3005 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3006 | 'type': 'object'}, |
| 3007 | 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3008 | 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, |
| 3009 | 'type': 'object'}, |
| 3010 | 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3011 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 3012 | 'type': 'object'}}, |
| 3013 | 'type': 'object'} |
| 3014 | |
| 3015 | |
| 3016 | @ReturnMapping(ActionResults) |
| 3017 | async def Actions(self, entities): |
| 3018 | ''' |
| 3019 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3020 | Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult> |
| 3021 | ''' |
| 3022 | # map input types to rpc msg |
| 3023 | _params = dict() |
| 3024 | msg = dict(type='MachineActions', request='Actions', version=1, params=_params) |
| 3025 | _params['entities'] = entities |
| 3026 | reply = await self.rpc(msg) |
| 3027 | return reply |
| 3028 | |
| 3029 | |
| 3030 | |
| 3031 | @ReturnMapping(ErrorResults) |
| 3032 | async def BeginActions(self, entities): |
| 3033 | ''' |
| 3034 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3035 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 3036 | ''' |
| 3037 | # map input types to rpc msg |
| 3038 | _params = dict() |
| 3039 | msg = dict(type='MachineActions', request='BeginActions', version=1, params=_params) |
| 3040 | _params['entities'] = entities |
| 3041 | reply = await self.rpc(msg) |
| 3042 | return reply |
| 3043 | |
| 3044 | |
| 3045 | |
| 3046 | @ReturnMapping(ErrorResults) |
| 3047 | async def FinishActions(self, results): |
| 3048 | ''' |
| 3049 | results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult> |
| 3050 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 3051 | ''' |
| 3052 | # map input types to rpc msg |
| 3053 | _params = dict() |
| 3054 | msg = dict(type='MachineActions', request='FinishActions', version=1, params=_params) |
| 3055 | _params['results'] = results |
| 3056 | reply = await self.rpc(msg) |
| 3057 | return reply |
| 3058 | |
| 3059 | |
| 3060 | |
| 3061 | @ReturnMapping(ActionsByReceivers) |
| 3062 | async def RunningActions(self, entities): |
| 3063 | ''' |
| 3064 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3065 | Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver> |
| 3066 | ''' |
| 3067 | # map input types to rpc msg |
| 3068 | _params = dict() |
| 3069 | msg = dict(type='MachineActions', request='RunningActions', version=1, params=_params) |
| 3070 | _params['entities'] = entities |
| 3071 | reply = await self.rpc(msg) |
| 3072 | return reply |
| 3073 | |
| 3074 | |
| 3075 | |
| 3076 | @ReturnMapping(StringsWatchResults) |
| 3077 | async def WatchActionNotifications(self, entities): |
| 3078 | ''' |
| 3079 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3080 | Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> |
| 3081 | ''' |
| 3082 | # map input types to rpc msg |
| 3083 | _params = dict() |
| 3084 | msg = dict(type='MachineActions', request='WatchActionNotifications', version=1, params=_params) |
| 3085 | _params['entities'] = entities |
| 3086 | reply = await self.rpc(msg) |
| 3087 | return reply |
| 3088 | |
| 3089 | |
| 3090 | |
| 3091 | class MachineUndertakerFacade(Type): |
| 3092 | name = 'MachineUndertaker' |
| 3093 | version = 1 |
| 3094 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 3095 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 3096 | 'type': 'array'}}, |
| 3097 | 'required': ['entities'], |
| 3098 | 'type': 'object'}, |
| 3099 | 'EntitiesResult': {'additionalProperties': False, |
| 3100 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 3101 | 'type': 'array'}, |
| 3102 | 'error': {'$ref': '#/definitions/Error'}}, |
| 3103 | 'required': ['entities'], |
| 3104 | 'type': 'object'}, |
| 3105 | 'EntitiesResults': {'additionalProperties': False, |
| 3106 | 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'}, |
| 3107 | 'type': 'array'}}, |
| 3108 | 'required': ['results'], |
| 3109 | 'type': 'object'}, |
| 3110 | 'Entity': {'additionalProperties': False, |
| 3111 | 'properties': {'tag': {'type': 'string'}}, |
| 3112 | 'required': ['tag'], |
| 3113 | 'type': 'object'}, |
| 3114 | 'Error': {'additionalProperties': False, |
| 3115 | 'properties': {'code': {'type': 'string'}, |
| 3116 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 3117 | 'message': {'type': 'string'}}, |
| 3118 | 'required': ['message', 'code'], |
| 3119 | 'type': 'object'}, |
| 3120 | 'ErrorInfo': {'additionalProperties': False, |
| 3121 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 3122 | 'macaroon-path': {'type': 'string'}}, |
| 3123 | 'type': 'object'}, |
| 3124 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 3125 | 'NotifyWatchResult': {'additionalProperties': False, |
| 3126 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 3127 | 'error': {'$ref': '#/definitions/Error'}}, |
| 3128 | 'required': ['NotifyWatcherId'], |
| 3129 | 'type': 'object'}, |
| 3130 | 'NotifyWatchResults': {'additionalProperties': False, |
| 3131 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 3132 | 'type': 'array'}}, |
| 3133 | 'required': ['results'], |
| 3134 | 'type': 'object'}, |
| 3135 | 'ProviderInterfaceInfo': {'additionalProperties': False, |
| 3136 | 'properties': {'interface-name': {'type': 'string'}, |
| 3137 | 'mac-address': {'type': 'string'}, |
| 3138 | 'provider-id': {'type': 'string'}}, |
| 3139 | 'required': ['interface-name', |
| 3140 | 'mac-address', |
| 3141 | 'provider-id'], |
| 3142 | 'type': 'object'}, |
| 3143 | 'ProviderInterfaceInfoResult': {'additionalProperties': False, |
| 3144 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3145 | 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'}, |
| 3146 | 'type': 'array'}, |
| 3147 | 'machine-tag': {'type': 'string'}}, |
| 3148 | 'required': ['machine-tag', |
| 3149 | 'interfaces'], |
| 3150 | 'type': 'object'}, |
| 3151 | 'ProviderInterfaceInfoResults': {'additionalProperties': False, |
| 3152 | 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'}, |
| 3153 | 'type': 'array'}}, |
| 3154 | 'required': ['results'], |
| 3155 | 'type': 'object'}}, |
| 3156 | 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3157 | 'Result': {'$ref': '#/definitions/EntitiesResults'}}, |
| 3158 | 'type': 'object'}, |
| 3159 | 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}}, |
| 3160 | 'type': 'object'}, |
| 3161 | 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3162 | 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}}, |
| 3163 | 'type': 'object'}, |
| 3164 | 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3165 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 3166 | 'type': 'object'}}, |
| 3167 | 'type': 'object'} |
| 3168 | |
| 3169 | |
| 3170 | @ReturnMapping(EntitiesResults) |
| 3171 | async def AllMachineRemovals(self, entities): |
| 3172 | ''' |
| 3173 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3174 | Returns -> typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult> |
| 3175 | ''' |
| 3176 | # map input types to rpc msg |
| 3177 | _params = dict() |
| 3178 | msg = dict(type='MachineUndertaker', request='AllMachineRemovals', version=1, params=_params) |
| 3179 | _params['entities'] = entities |
| 3180 | reply = await self.rpc(msg) |
| 3181 | return reply |
| 3182 | |
| 3183 | |
| 3184 | |
| 3185 | @ReturnMapping(None) |
| 3186 | async def CompleteMachineRemovals(self, entities): |
| 3187 | ''' |
| 3188 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3189 | Returns -> None |
| 3190 | ''' |
| 3191 | # map input types to rpc msg |
| 3192 | _params = dict() |
| 3193 | msg = dict(type='MachineUndertaker', request='CompleteMachineRemovals', version=1, params=_params) |
| 3194 | _params['entities'] = entities |
| 3195 | reply = await self.rpc(msg) |
| 3196 | return reply |
| 3197 | |
| 3198 | |
| 3199 | |
| 3200 | @ReturnMapping(ProviderInterfaceInfoResults) |
| 3201 | async def GetMachineProviderInterfaceInfo(self, entities): |
| 3202 | ''' |
| 3203 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3204 | Returns -> typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult> |
| 3205 | ''' |
| 3206 | # map input types to rpc msg |
| 3207 | _params = dict() |
| 3208 | msg = dict(type='MachineUndertaker', request='GetMachineProviderInterfaceInfo', version=1, params=_params) |
| 3209 | _params['entities'] = entities |
| 3210 | reply = await self.rpc(msg) |
| 3211 | return reply |
| 3212 | |
| 3213 | |
| 3214 | |
| 3215 | @ReturnMapping(NotifyWatchResults) |
| 3216 | async def WatchMachineRemovals(self, entities): |
| 3217 | ''' |
| 3218 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3219 | Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> |
| 3220 | ''' |
| 3221 | # map input types to rpc msg |
| 3222 | _params = dict() |
| 3223 | msg = dict(type='MachineUndertaker', request='WatchMachineRemovals', version=1, params=_params) |
| 3224 | _params['entities'] = entities |
| 3225 | reply = await self.rpc(msg) |
| 3226 | return reply |
| 3227 | |
| 3228 | |
| 3229 | |
| 3230 | class MachinerFacade(Type): |
| 3231 | name = 'Machiner' |
| 3232 | version = 1 |
| 3233 | schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, |
| 3234 | 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, |
| 3235 | 'type': 'array'}, |
| 3236 | 'type': 'array'}}, |
| 3237 | 'required': ['servers'], |
| 3238 | 'type': 'object'}, |
| 3239 | 'Address': {'additionalProperties': False, |
| 3240 | 'properties': {'scope': {'type': 'string'}, |
| 3241 | 'space-name': {'type': 'string'}, |
| 3242 | 'type': {'type': 'string'}, |
| 3243 | 'value': {'type': 'string'}}, |
| 3244 | 'required': ['value', 'type', 'scope'], |
| 3245 | 'type': 'object'}, |
| 3246 | 'BytesResult': {'additionalProperties': False, |
| 3247 | 'properties': {'result': {'items': {'type': 'integer'}, |
| 3248 | 'type': 'array'}}, |
| 3249 | 'required': ['result'], |
| 3250 | 'type': 'object'}, |
| 3251 | 'Entities': {'additionalProperties': False, |
| 3252 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 3253 | 'type': 'array'}}, |
| 3254 | 'required': ['entities'], |
| 3255 | 'type': 'object'}, |
| 3256 | 'Entity': {'additionalProperties': False, |
| 3257 | 'properties': {'tag': {'type': 'string'}}, |
| 3258 | 'required': ['tag'], |
| 3259 | 'type': 'object'}, |
| 3260 | 'EntityStatusArgs': {'additionalProperties': False, |
| 3261 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 3262 | 'type': 'object'}}, |
| 3263 | 'type': 'object'}, |
| 3264 | 'info': {'type': 'string'}, |
| 3265 | 'status': {'type': 'string'}, |
| 3266 | 'tag': {'type': 'string'}}, |
| 3267 | 'required': ['tag', |
| 3268 | 'status', |
| 3269 | 'info', |
| 3270 | 'data'], |
| 3271 | 'type': 'object'}, |
| 3272 | 'Error': {'additionalProperties': False, |
| 3273 | 'properties': {'code': {'type': 'string'}, |
| 3274 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 3275 | 'message': {'type': 'string'}}, |
| 3276 | 'required': ['message', 'code'], |
| 3277 | 'type': 'object'}, |
| 3278 | 'ErrorInfo': {'additionalProperties': False, |
| 3279 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 3280 | 'macaroon-path': {'type': 'string'}}, |
| 3281 | 'type': 'object'}, |
| 3282 | 'ErrorResult': {'additionalProperties': False, |
| 3283 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 3284 | 'type': 'object'}, |
| 3285 | 'ErrorResults': {'additionalProperties': False, |
| 3286 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 3287 | 'type': 'array'}}, |
| 3288 | 'required': ['results'], |
| 3289 | 'type': 'object'}, |
| 3290 | 'HostPort': {'additionalProperties': False, |
| 3291 | 'properties': {'Address': {'$ref': '#/definitions/Address'}, |
| 3292 | 'port': {'type': 'integer'}}, |
| 3293 | 'required': ['Address', 'port'], |
| 3294 | 'type': 'object'}, |
| 3295 | 'JobsResult': {'additionalProperties': False, |
| 3296 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3297 | 'jobs': {'items': {'type': 'string'}, |
| 3298 | 'type': 'array'}}, |
| 3299 | 'required': ['jobs'], |
| 3300 | 'type': 'object'}, |
| 3301 | 'JobsResults': {'additionalProperties': False, |
| 3302 | 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'}, |
| 3303 | 'type': 'array'}}, |
| 3304 | 'required': ['results'], |
| 3305 | 'type': 'object'}, |
| 3306 | 'LifeResult': {'additionalProperties': False, |
| 3307 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3308 | 'life': {'type': 'string'}}, |
| 3309 | 'required': ['life'], |
| 3310 | 'type': 'object'}, |
| 3311 | 'LifeResults': {'additionalProperties': False, |
| 3312 | 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, |
| 3313 | 'type': 'array'}}, |
| 3314 | 'required': ['results'], |
| 3315 | 'type': 'object'}, |
| 3316 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 3317 | 'MachineAddresses': {'additionalProperties': False, |
| 3318 | 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, |
| 3319 | 'type': 'array'}, |
| 3320 | 'tag': {'type': 'string'}}, |
| 3321 | 'required': ['tag', 'addresses'], |
| 3322 | 'type': 'object'}, |
| 3323 | 'NetworkConfig': {'additionalProperties': False, |
| 3324 | 'properties': {'address': {'type': 'string'}, |
| 3325 | 'cidr': {'type': 'string'}, |
| 3326 | 'config-type': {'type': 'string'}, |
| 3327 | 'device-index': {'type': 'integer'}, |
| 3328 | 'disabled': {'type': 'boolean'}, |
| 3329 | 'dns-search-domains': {'items': {'type': 'string'}, |
| 3330 | 'type': 'array'}, |
| 3331 | 'dns-servers': {'items': {'type': 'string'}, |
| 3332 | 'type': 'array'}, |
| 3333 | 'gateway-address': {'type': 'string'}, |
| 3334 | 'interface-name': {'type': 'string'}, |
| 3335 | 'interface-type': {'type': 'string'}, |
| 3336 | 'mac-address': {'type': 'string'}, |
| 3337 | 'mtu': {'type': 'integer'}, |
| 3338 | 'no-auto-start': {'type': 'boolean'}, |
| 3339 | 'parent-interface-name': {'type': 'string'}, |
| 3340 | 'provider-address-id': {'type': 'string'}, |
| 3341 | 'provider-id': {'type': 'string'}, |
| 3342 | 'provider-space-id': {'type': 'string'}, |
| 3343 | 'provider-subnet-id': {'type': 'string'}, |
| 3344 | 'provider-vlan-id': {'type': 'string'}, |
| 3345 | 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'}, |
| 3346 | 'type': 'array'}, |
| 3347 | 'vlan-tag': {'type': 'integer'}}, |
| 3348 | 'required': ['device-index', |
| 3349 | 'mac-address', |
| 3350 | 'cidr', |
| 3351 | 'mtu', |
| 3352 | 'provider-id', |
| 3353 | 'provider-subnet-id', |
| 3354 | 'provider-space-id', |
| 3355 | 'provider-address-id', |
| 3356 | 'provider-vlan-id', |
| 3357 | 'vlan-tag', |
| 3358 | 'interface-name', |
| 3359 | 'parent-interface-name', |
| 3360 | 'interface-type', |
| 3361 | 'disabled'], |
| 3362 | 'type': 'object'}, |
| 3363 | 'NetworkRoute': {'additionalProperties': False, |
| 3364 | 'properties': {'destination-cidr': {'type': 'string'}, |
| 3365 | 'gateway-ip': {'type': 'string'}, |
| 3366 | 'metric': {'type': 'integer'}}, |
| 3367 | 'required': ['destination-cidr', |
| 3368 | 'gateway-ip', |
| 3369 | 'metric'], |
| 3370 | 'type': 'object'}, |
| 3371 | 'NotifyWatchResult': {'additionalProperties': False, |
| 3372 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 3373 | 'error': {'$ref': '#/definitions/Error'}}, |
| 3374 | 'required': ['NotifyWatcherId'], |
| 3375 | 'type': 'object'}, |
| 3376 | 'NotifyWatchResults': {'additionalProperties': False, |
| 3377 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 3378 | 'type': 'array'}}, |
| 3379 | 'required': ['results'], |
| 3380 | 'type': 'object'}, |
| 3381 | 'SetMachineNetworkConfig': {'additionalProperties': False, |
| 3382 | 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'}, |
| 3383 | 'type': 'array'}, |
| 3384 | 'tag': {'type': 'string'}}, |
| 3385 | 'required': ['tag', 'config'], |
| 3386 | 'type': 'object'}, |
| 3387 | 'SetMachinesAddresses': {'additionalProperties': False, |
| 3388 | 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'}, |
| 3389 | 'type': 'array'}}, |
| 3390 | 'required': ['machine-addresses'], |
| 3391 | 'type': 'object'}, |
| 3392 | 'SetStatus': {'additionalProperties': False, |
| 3393 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, |
| 3394 | 'type': 'array'}}, |
| 3395 | 'required': ['entities'], |
| 3396 | 'type': 'object'}, |
| 3397 | 'StringResult': {'additionalProperties': False, |
| 3398 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3399 | 'result': {'type': 'string'}}, |
| 3400 | 'required': ['result'], |
| 3401 | 'type': 'object'}, |
| 3402 | 'StringsResult': {'additionalProperties': False, |
| 3403 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3404 | 'result': {'items': {'type': 'string'}, |
| 3405 | 'type': 'array'}}, |
| 3406 | 'type': 'object'}}, |
| 3407 | 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, |
| 3408 | 'type': 'object'}, |
| 3409 | 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, |
| 3410 | 'type': 'object'}, |
| 3411 | 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, |
| 3412 | 'type': 'object'}, |
| 3413 | 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3414 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3415 | 'type': 'object'}, |
| 3416 | 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3417 | 'Result': {'$ref': '#/definitions/JobsResults'}}, |
| 3418 | 'type': 'object'}, |
| 3419 | 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3420 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 3421 | 'type': 'object'}, |
| 3422 | 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, |
| 3423 | 'type': 'object'}, |
| 3424 | 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'}, |
| 3425 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3426 | 'type': 'object'}, |
| 3427 | 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}}, |
| 3428 | 'type': 'object'}, |
| 3429 | 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3430 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3431 | 'type': 'object'}, |
| 3432 | 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 3433 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3434 | 'type': 'object'}, |
| 3435 | 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 3436 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3437 | 'type': 'object'}, |
| 3438 | 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3439 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 3440 | 'type': 'object'}, |
| 3441 | 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 3442 | 'type': 'object'}}, |
| 3443 | 'type': 'object'} |
| 3444 | |
| 3445 | |
| 3446 | @ReturnMapping(StringsResult) |
| 3447 | async def APIAddresses(self): |
| 3448 | ''' |
| 3449 | |
| 3450 | Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]] |
| 3451 | ''' |
| 3452 | # map input types to rpc msg |
| 3453 | _params = dict() |
| 3454 | msg = dict(type='Machiner', request='APIAddresses', version=1, params=_params) |
| 3455 | |
| 3456 | reply = await self.rpc(msg) |
| 3457 | return reply |
| 3458 | |
| 3459 | |
| 3460 | |
| 3461 | @ReturnMapping(APIHostPortsResult) |
| 3462 | async def APIHostPorts(self): |
| 3463 | ''' |
| 3464 | |
| 3465 | Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort> |
| 3466 | ''' |
| 3467 | # map input types to rpc msg |
| 3468 | _params = dict() |
| 3469 | msg = dict(type='Machiner', request='APIHostPorts', version=1, params=_params) |
| 3470 | |
| 3471 | reply = await self.rpc(msg) |
| 3472 | return reply |
| 3473 | |
| 3474 | |
| 3475 | |
| 3476 | @ReturnMapping(BytesResult) |
| 3477 | async def CACert(self): |
| 3478 | ''' |
| 3479 | |
| 3480 | Returns -> typing.Sequence<+T_co>[int] |
| 3481 | ''' |
| 3482 | # map input types to rpc msg |
| 3483 | _params = dict() |
| 3484 | msg = dict(type='Machiner', request='CACert', version=1, params=_params) |
| 3485 | |
| 3486 | reply = await self.rpc(msg) |
| 3487 | return reply |
| 3488 | |
| 3489 | |
| 3490 | |
| 3491 | @ReturnMapping(ErrorResults) |
| 3492 | async def EnsureDead(self, entities): |
| 3493 | ''' |
| 3494 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3495 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 3496 | ''' |
| 3497 | # map input types to rpc msg |
| 3498 | _params = dict() |
| 3499 | msg = dict(type='Machiner', request='EnsureDead', version=1, params=_params) |
| 3500 | _params['entities'] = entities |
| 3501 | reply = await self.rpc(msg) |
| 3502 | return reply |
| 3503 | |
| 3504 | |
| 3505 | |
| 3506 | @ReturnMapping(JobsResults) |
| 3507 | async def Jobs(self, entities): |
| 3508 | ''' |
| 3509 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3510 | Returns -> typing.Sequence<+T_co>[~JobsResult]<~JobsResult> |
| 3511 | ''' |
| 3512 | # map input types to rpc msg |
| 3513 | _params = dict() |
| 3514 | msg = dict(type='Machiner', request='Jobs', version=1, params=_params) |
| 3515 | _params['entities'] = entities |
| 3516 | reply = await self.rpc(msg) |
| 3517 | return reply |
| 3518 | |
| 3519 | |
| 3520 | |
| 3521 | @ReturnMapping(LifeResults) |
| 3522 | async def Life(self, entities): |
| 3523 | ''' |
| 3524 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3525 | Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> |
| 3526 | ''' |
| 3527 | # map input types to rpc msg |
| 3528 | _params = dict() |
| 3529 | msg = dict(type='Machiner', request='Life', version=1, params=_params) |
| 3530 | _params['entities'] = entities |
| 3531 | reply = await self.rpc(msg) |
| 3532 | return reply |
| 3533 | |
| 3534 | |
| 3535 | |
| 3536 | @ReturnMapping(StringResult) |
| 3537 | async def ModelUUID(self): |
| 3538 | ''' |
| 3539 | |
| 3540 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 3541 | ''' |
| 3542 | # map input types to rpc msg |
| 3543 | _params = dict() |
| 3544 | msg = dict(type='Machiner', request='ModelUUID', version=1, params=_params) |
| 3545 | |
| 3546 | reply = await self.rpc(msg) |
| 3547 | return reply |
| 3548 | |
| 3549 | |
| 3550 | |
| 3551 | @ReturnMapping(ErrorResults) |
| 3552 | async def SetMachineAddresses(self, machine_addresses): |
| 3553 | ''' |
| 3554 | machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses> |
| 3555 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 3556 | ''' |
| 3557 | # map input types to rpc msg |
| 3558 | _params = dict() |
| 3559 | msg = dict(type='Machiner', request='SetMachineAddresses', version=1, params=_params) |
| 3560 | _params['machine-addresses'] = machine_addresses |
| 3561 | reply = await self.rpc(msg) |
| 3562 | return reply |
| 3563 | |
| 3564 | |
| 3565 | |
| 3566 | @ReturnMapping(None) |
| 3567 | async def SetObservedNetworkConfig(self, config, tag): |
| 3568 | ''' |
| 3569 | config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig> |
| 3570 | tag : str |
| 3571 | Returns -> None |
| 3572 | ''' |
| 3573 | # map input types to rpc msg |
| 3574 | _params = dict() |
| 3575 | msg = dict(type='Machiner', request='SetObservedNetworkConfig', version=1, params=_params) |
| 3576 | _params['config'] = config |
| 3577 | _params['tag'] = tag |
| 3578 | reply = await self.rpc(msg) |
| 3579 | return reply |
| 3580 | |
| 3581 | |
| 3582 | |
| 3583 | @ReturnMapping(ErrorResults) |
| 3584 | async def SetProviderNetworkConfig(self, entities): |
| 3585 | ''' |
| 3586 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3587 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 3588 | ''' |
| 3589 | # map input types to rpc msg |
| 3590 | _params = dict() |
| 3591 | msg = dict(type='Machiner', request='SetProviderNetworkConfig', version=1, params=_params) |
| 3592 | _params['entities'] = entities |
| 3593 | reply = await self.rpc(msg) |
| 3594 | return reply |
| 3595 | |
| 3596 | |
| 3597 | |
| 3598 | @ReturnMapping(ErrorResults) |
| 3599 | async def SetStatus(self, entities): |
| 3600 | ''' |
| 3601 | entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> |
| 3602 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 3603 | ''' |
| 3604 | # map input types to rpc msg |
| 3605 | _params = dict() |
| 3606 | msg = dict(type='Machiner', request='SetStatus', version=1, params=_params) |
| 3607 | _params['entities'] = entities |
| 3608 | reply = await self.rpc(msg) |
| 3609 | return reply |
| 3610 | |
| 3611 | |
| 3612 | |
| 3613 | @ReturnMapping(ErrorResults) |
| 3614 | async def UpdateStatus(self, entities): |
| 3615 | ''' |
| 3616 | entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> |
| 3617 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 3618 | ''' |
| 3619 | # map input types to rpc msg |
| 3620 | _params = dict() |
| 3621 | msg = dict(type='Machiner', request='UpdateStatus', version=1, params=_params) |
| 3622 | _params['entities'] = entities |
| 3623 | reply = await self.rpc(msg) |
| 3624 | return reply |
| 3625 | |
| 3626 | |
| 3627 | |
| 3628 | @ReturnMapping(NotifyWatchResults) |
| 3629 | async def Watch(self, entities): |
| 3630 | ''' |
| 3631 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3632 | Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> |
| 3633 | ''' |
| 3634 | # map input types to rpc msg |
| 3635 | _params = dict() |
| 3636 | msg = dict(type='Machiner', request='Watch', version=1, params=_params) |
| 3637 | _params['entities'] = entities |
| 3638 | reply = await self.rpc(msg) |
| 3639 | return reply |
| 3640 | |
| 3641 | |
| 3642 | |
| 3643 | @ReturnMapping(NotifyWatchResult) |
| 3644 | async def WatchAPIHostPorts(self): |
| 3645 | ''' |
| 3646 | |
| 3647 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 3648 | ''' |
| 3649 | # map input types to rpc msg |
| 3650 | _params = dict() |
| 3651 | msg = dict(type='Machiner', request='WatchAPIHostPorts', version=1, params=_params) |
| 3652 | |
| 3653 | reply = await self.rpc(msg) |
| 3654 | return reply |
| 3655 | |
| 3656 | |
| 3657 | |
| 3658 | class MeterStatusFacade(Type): |
| 3659 | name = 'MeterStatus' |
| 3660 | version = 1 |
| 3661 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 3662 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 3663 | 'type': 'array'}}, |
| 3664 | 'required': ['entities'], |
| 3665 | 'type': 'object'}, |
| 3666 | 'Entity': {'additionalProperties': False, |
| 3667 | 'properties': {'tag': {'type': 'string'}}, |
| 3668 | 'required': ['tag'], |
| 3669 | 'type': 'object'}, |
| 3670 | 'Error': {'additionalProperties': False, |
| 3671 | 'properties': {'code': {'type': 'string'}, |
| 3672 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 3673 | 'message': {'type': 'string'}}, |
| 3674 | 'required': ['message', 'code'], |
| 3675 | 'type': 'object'}, |
| 3676 | 'ErrorInfo': {'additionalProperties': False, |
| 3677 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 3678 | 'macaroon-path': {'type': 'string'}}, |
| 3679 | 'type': 'object'}, |
| 3680 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 3681 | 'MeterStatusResult': {'additionalProperties': False, |
| 3682 | 'properties': {'code': {'type': 'string'}, |
| 3683 | 'error': {'$ref': '#/definitions/Error'}, |
| 3684 | 'info': {'type': 'string'}}, |
| 3685 | 'required': ['code', 'info'], |
| 3686 | 'type': 'object'}, |
| 3687 | 'MeterStatusResults': {'additionalProperties': False, |
| 3688 | 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'}, |
| 3689 | 'type': 'array'}}, |
| 3690 | 'required': ['results'], |
| 3691 | 'type': 'object'}, |
| 3692 | 'NotifyWatchResult': {'additionalProperties': False, |
| 3693 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 3694 | 'error': {'$ref': '#/definitions/Error'}}, |
| 3695 | 'required': ['NotifyWatcherId'], |
| 3696 | 'type': 'object'}, |
| 3697 | 'NotifyWatchResults': {'additionalProperties': False, |
| 3698 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 3699 | 'type': 'array'}}, |
| 3700 | 'required': ['results'], |
| 3701 | 'type': 'object'}}, |
| 3702 | 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3703 | 'Result': {'$ref': '#/definitions/MeterStatusResults'}}, |
| 3704 | 'type': 'object'}, |
| 3705 | 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3706 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 3707 | 'type': 'object'}}, |
| 3708 | 'type': 'object'} |
| 3709 | |
| 3710 | |
| 3711 | @ReturnMapping(MeterStatusResults) |
| 3712 | async def GetMeterStatus(self, entities): |
| 3713 | ''' |
| 3714 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3715 | Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult> |
| 3716 | ''' |
| 3717 | # map input types to rpc msg |
| 3718 | _params = dict() |
| 3719 | msg = dict(type='MeterStatus', request='GetMeterStatus', version=1, params=_params) |
| 3720 | _params['entities'] = entities |
| 3721 | reply = await self.rpc(msg) |
| 3722 | return reply |
| 3723 | |
| 3724 | |
| 3725 | |
| 3726 | @ReturnMapping(NotifyWatchResults) |
| 3727 | async def WatchMeterStatus(self, entities): |
| 3728 | ''' |
| 3729 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3730 | Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> |
| 3731 | ''' |
| 3732 | # map input types to rpc msg |
| 3733 | _params = dict() |
| 3734 | msg = dict(type='MeterStatus', request='WatchMeterStatus', version=1, params=_params) |
| 3735 | _params['entities'] = entities |
| 3736 | reply = await self.rpc(msg) |
| 3737 | return reply |
| 3738 | |
| 3739 | |
| 3740 | |
| 3741 | class MetricsManagerFacade(Type): |
| 3742 | name = 'MetricsManager' |
| 3743 | version = 1 |
| 3744 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 3745 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 3746 | 'type': 'array'}}, |
| 3747 | 'required': ['entities'], |
| 3748 | 'type': 'object'}, |
| 3749 | 'Entity': {'additionalProperties': False, |
| 3750 | 'properties': {'tag': {'type': 'string'}}, |
| 3751 | 'required': ['tag'], |
| 3752 | 'type': 'object'}, |
| 3753 | 'Error': {'additionalProperties': False, |
| 3754 | 'properties': {'code': {'type': 'string'}, |
| 3755 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 3756 | 'message': {'type': 'string'}}, |
| 3757 | 'required': ['message', 'code'], |
| 3758 | 'type': 'object'}, |
| 3759 | 'ErrorInfo': {'additionalProperties': False, |
| 3760 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 3761 | 'macaroon-path': {'type': 'string'}}, |
| 3762 | 'type': 'object'}, |
| 3763 | 'ErrorResult': {'additionalProperties': False, |
| 3764 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 3765 | 'type': 'object'}, |
| 3766 | 'ErrorResults': {'additionalProperties': False, |
| 3767 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 3768 | 'type': 'array'}}, |
| 3769 | 'required': ['results'], |
| 3770 | 'type': 'object'}, |
| 3771 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}}, |
| 3772 | 'properties': {'AddJujuMachineMetrics': {'type': 'object'}, |
| 3773 | 'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3774 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3775 | 'type': 'object'}, |
| 3776 | 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3777 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3778 | 'type': 'object'}}, |
| 3779 | 'type': 'object'} |
| 3780 | |
| 3781 | |
| 3782 | @ReturnMapping(None) |
| 3783 | async def AddJujuMachineMetrics(self): |
| 3784 | ''' |
| 3785 | |
| 3786 | Returns -> None |
| 3787 | ''' |
| 3788 | # map input types to rpc msg |
| 3789 | _params = dict() |
| 3790 | msg = dict(type='MetricsManager', request='AddJujuMachineMetrics', version=1, params=_params) |
| 3791 | |
| 3792 | reply = await self.rpc(msg) |
| 3793 | return reply |
| 3794 | |
| 3795 | |
| 3796 | |
| 3797 | @ReturnMapping(ErrorResults) |
| 3798 | async def CleanupOldMetrics(self, entities): |
| 3799 | ''' |
| 3800 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3801 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 3802 | ''' |
| 3803 | # map input types to rpc msg |
| 3804 | _params = dict() |
| 3805 | msg = dict(type='MetricsManager', request='CleanupOldMetrics', version=1, params=_params) |
| 3806 | _params['entities'] = entities |
| 3807 | reply = await self.rpc(msg) |
| 3808 | return reply |
| 3809 | |
| 3810 | |
| 3811 | |
| 3812 | @ReturnMapping(ErrorResults) |
| 3813 | async def SendMetrics(self, entities): |
| 3814 | ''' |
| 3815 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3816 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 3817 | ''' |
| 3818 | # map input types to rpc msg |
| 3819 | _params = dict() |
| 3820 | msg = dict(type='MetricsManager', request='SendMetrics', version=1, params=_params) |
| 3821 | _params['entities'] = entities |
| 3822 | reply = await self.rpc(msg) |
| 3823 | return reply |
| 3824 | |
| 3825 | |
| 3826 | |
| 3827 | class MigrationFlagFacade(Type): |
| 3828 | name = 'MigrationFlag' |
| 3829 | version = 1 |
| 3830 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 3831 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 3832 | 'type': 'array'}}, |
| 3833 | 'required': ['entities'], |
| 3834 | 'type': 'object'}, |
| 3835 | 'Entity': {'additionalProperties': False, |
| 3836 | 'properties': {'tag': {'type': 'string'}}, |
| 3837 | 'required': ['tag'], |
| 3838 | 'type': 'object'}, |
| 3839 | 'Error': {'additionalProperties': False, |
| 3840 | 'properties': {'code': {'type': 'string'}, |
| 3841 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 3842 | 'message': {'type': 'string'}}, |
| 3843 | 'required': ['message', 'code'], |
| 3844 | 'type': 'object'}, |
| 3845 | 'ErrorInfo': {'additionalProperties': False, |
| 3846 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 3847 | 'macaroon-path': {'type': 'string'}}, |
| 3848 | 'type': 'object'}, |
| 3849 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 3850 | 'NotifyWatchResult': {'additionalProperties': False, |
| 3851 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 3852 | 'error': {'$ref': '#/definitions/Error'}}, |
| 3853 | 'required': ['NotifyWatcherId'], |
| 3854 | 'type': 'object'}, |
| 3855 | 'NotifyWatchResults': {'additionalProperties': False, |
| 3856 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 3857 | 'type': 'array'}}, |
| 3858 | 'required': ['results'], |
| 3859 | 'type': 'object'}, |
| 3860 | 'PhaseResult': {'additionalProperties': False, |
| 3861 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3862 | 'phase': {'type': 'string'}}, |
| 3863 | 'type': 'object'}, |
| 3864 | 'PhaseResults': {'additionalProperties': False, |
| 3865 | 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'}, |
| 3866 | 'type': 'array'}}, |
| 3867 | 'required': ['results'], |
| 3868 | 'type': 'object'}}, |
| 3869 | 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3870 | 'Result': {'$ref': '#/definitions/PhaseResults'}}, |
| 3871 | 'type': 'object'}, |
| 3872 | 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3873 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 3874 | 'type': 'object'}}, |
| 3875 | 'type': 'object'} |
| 3876 | |
| 3877 | |
| 3878 | @ReturnMapping(PhaseResults) |
| 3879 | async def Phase(self, entities): |
| 3880 | ''' |
| 3881 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3882 | Returns -> typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult> |
| 3883 | ''' |
| 3884 | # map input types to rpc msg |
| 3885 | _params = dict() |
| 3886 | msg = dict(type='MigrationFlag', request='Phase', version=1, params=_params) |
| 3887 | _params['entities'] = entities |
| 3888 | reply = await self.rpc(msg) |
| 3889 | return reply |
| 3890 | |
| 3891 | |
| 3892 | |
| 3893 | @ReturnMapping(NotifyWatchResults) |
| 3894 | async def Watch(self, entities): |
| 3895 | ''' |
| 3896 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 3897 | Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> |
| 3898 | ''' |
| 3899 | # map input types to rpc msg |
| 3900 | _params = dict() |
| 3901 | msg = dict(type='MigrationFlag', request='Watch', version=1, params=_params) |
| 3902 | _params['entities'] = entities |
| 3903 | reply = await self.rpc(msg) |
| 3904 | return reply |
| 3905 | |
| 3906 | |
| 3907 | |
| 3908 | class MigrationMasterFacade(Type): |
| 3909 | name = 'MigrationMaster' |
| 3910 | version = 1 |
| 3911 | schema = {'definitions': {'Error': {'additionalProperties': False, |
| 3912 | 'properties': {'code': {'type': 'string'}, |
| 3913 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 3914 | 'message': {'type': 'string'}}, |
| 3915 | 'required': ['message', 'code'], |
| 3916 | 'type': 'object'}, |
| 3917 | 'ErrorInfo': {'additionalProperties': False, |
| 3918 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 3919 | 'macaroon-path': {'type': 'string'}}, |
| 3920 | 'type': 'object'}, |
| 3921 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 3922 | 'MasterMigrationStatus': {'additionalProperties': False, |
| 3923 | 'properties': {'migration-id': {'type': 'string'}, |
| 3924 | 'phase': {'type': 'string'}, |
| 3925 | 'phase-changed-time': {'format': 'date-time', |
| 3926 | 'type': 'string'}, |
| 3927 | 'spec': {'$ref': '#/definitions/MigrationSpec'}}, |
| 3928 | 'required': ['spec', |
| 3929 | 'migration-id', |
| 3930 | 'phase', |
| 3931 | 'phase-changed-time'], |
| 3932 | 'type': 'object'}, |
| 3933 | 'MigrationModelInfo': {'additionalProperties': False, |
| 3934 | 'properties': {'agent-version': {'$ref': '#/definitions/Number'}, |
| 3935 | 'controller-agent-version': {'$ref': '#/definitions/Number'}, |
| 3936 | 'name': {'type': 'string'}, |
| 3937 | 'owner-tag': {'type': 'string'}, |
| 3938 | 'uuid': {'type': 'string'}}, |
| 3939 | 'required': ['uuid', |
| 3940 | 'name', |
| 3941 | 'owner-tag', |
| 3942 | 'agent-version', |
| 3943 | 'controller-agent-version'], |
| 3944 | 'type': 'object'}, |
| 3945 | 'MigrationSpec': {'additionalProperties': False, |
| 3946 | 'properties': {'model-tag': {'type': 'string'}, |
| 3947 | 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}}, |
| 3948 | 'required': ['model-tag', 'target-info'], |
| 3949 | 'type': 'object'}, |
| 3950 | 'MigrationTargetInfo': {'additionalProperties': False, |
| 3951 | 'properties': {'addrs': {'items': {'type': 'string'}, |
| 3952 | 'type': 'array'}, |
| 3953 | 'auth-tag': {'type': 'string'}, |
| 3954 | 'ca-cert': {'type': 'string'}, |
| 3955 | 'controller-tag': {'type': 'string'}, |
| 3956 | 'macaroons': {'type': 'string'}, |
| 3957 | 'password': {'type': 'string'}}, |
| 3958 | 'required': ['controller-tag', |
| 3959 | 'addrs', |
| 3960 | 'ca-cert', |
| 3961 | 'auth-tag'], |
| 3962 | 'type': 'object'}, |
| 3963 | 'MinionReports': {'additionalProperties': False, |
| 3964 | 'properties': {'failed': {'items': {'type': 'string'}, |
| 3965 | 'type': 'array'}, |
| 3966 | 'migration-id': {'type': 'string'}, |
| 3967 | 'phase': {'type': 'string'}, |
| 3968 | 'success-count': {'type': 'integer'}, |
| 3969 | 'unknown-count': {'type': 'integer'}, |
| 3970 | 'unknown-sample': {'items': {'type': 'string'}, |
| 3971 | 'type': 'array'}}, |
| 3972 | 'required': ['migration-id', |
| 3973 | 'phase', |
| 3974 | 'success-count', |
| 3975 | 'unknown-count', |
| 3976 | 'unknown-sample', |
| 3977 | 'failed'], |
| 3978 | 'type': 'object'}, |
| 3979 | 'NotifyWatchResult': {'additionalProperties': False, |
| 3980 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 3981 | 'error': {'$ref': '#/definitions/Error'}}, |
| 3982 | 'required': ['NotifyWatcherId'], |
| 3983 | 'type': 'object'}, |
| 3984 | 'Number': {'additionalProperties': False, |
| 3985 | 'properties': {'Build': {'type': 'integer'}, |
| 3986 | 'Major': {'type': 'integer'}, |
| 3987 | 'Minor': {'type': 'integer'}, |
| 3988 | 'Patch': {'type': 'integer'}, |
| 3989 | 'Tag': {'type': 'string'}}, |
| 3990 | 'required': ['Major', |
| 3991 | 'Minor', |
| 3992 | 'Tag', |
| 3993 | 'Patch', |
| 3994 | 'Build'], |
| 3995 | 'type': 'object'}, |
| 3996 | 'SerializedModel': {'additionalProperties': False, |
| 3997 | 'properties': {'bytes': {'items': {'type': 'integer'}, |
| 3998 | 'type': 'array'}, |
| 3999 | 'charms': {'items': {'type': 'string'}, |
| 4000 | 'type': 'array'}, |
| 4001 | 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'}, |
| 4002 | 'type': 'array'}, |
| 4003 | 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'}, |
| 4004 | 'type': 'array'}}, |
| 4005 | 'required': ['bytes', |
| 4006 | 'charms', |
| 4007 | 'tools', |
| 4008 | 'resources'], |
| 4009 | 'type': 'object'}, |
| 4010 | 'SerializedModelResource': {'additionalProperties': False, |
| 4011 | 'properties': {'application': {'type': 'string'}, |
| 4012 | 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'}, |
| 4013 | 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'}, |
| 4014 | 'name': {'type': 'string'}, |
| 4015 | 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}}, |
| 4016 | 'type': 'object'}}, |
| 4017 | 'required': ['application', |
| 4018 | 'name', |
| 4019 | 'application-revision', |
| 4020 | 'charmstore-revision', |
| 4021 | 'unit-revisions'], |
| 4022 | 'type': 'object'}, |
| 4023 | 'SerializedModelResourceRevision': {'additionalProperties': False, |
| 4024 | 'properties': {'description': {'type': 'string'}, |
| 4025 | 'fingerprint': {'type': 'string'}, |
| 4026 | 'origin': {'type': 'string'}, |
| 4027 | 'path': {'type': 'string'}, |
| 4028 | 'revision': {'type': 'integer'}, |
| 4029 | 'size': {'type': 'integer'}, |
| 4030 | 'timestamp': {'format': 'date-time', |
| 4031 | 'type': 'string'}, |
| 4032 | 'type': {'type': 'string'}, |
| 4033 | 'username': {'type': 'string'}}, |
| 4034 | 'required': ['revision', |
| 4035 | 'type', |
| 4036 | 'path', |
| 4037 | 'description', |
| 4038 | 'origin', |
| 4039 | 'fingerprint', |
| 4040 | 'size', |
| 4041 | 'timestamp'], |
| 4042 | 'type': 'object'}, |
| 4043 | 'SerializedModelTools': {'additionalProperties': False, |
| 4044 | 'properties': {'uri': {'type': 'string'}, |
| 4045 | 'version': {'type': 'string'}}, |
| 4046 | 'required': ['version', 'uri'], |
| 4047 | 'type': 'object'}, |
| 4048 | 'SetMigrationPhaseArgs': {'additionalProperties': False, |
| 4049 | 'properties': {'phase': {'type': 'string'}}, |
| 4050 | 'required': ['phase'], |
| 4051 | 'type': 'object'}, |
| 4052 | 'SetMigrationStatusMessageArgs': {'additionalProperties': False, |
| 4053 | 'properties': {'message': {'type': 'string'}}, |
| 4054 | 'required': ['message'], |
| 4055 | 'type': 'object'}}, |
| 4056 | 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}}, |
| 4057 | 'type': 'object'}, |
| 4058 | 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}}, |
| 4059 | 'type': 'object'}, |
| 4060 | 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}}, |
| 4061 | 'type': 'object'}, |
| 4062 | 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}}, |
| 4063 | 'type': 'object'}, |
| 4064 | 'Prechecks': {'type': 'object'}, |
| 4065 | 'Reap': {'type': 'object'}, |
| 4066 | 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}}, |
| 4067 | 'type': 'object'}, |
| 4068 | 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}}, |
| 4069 | 'type': 'object'}, |
| 4070 | 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 4071 | 'type': 'object'}, |
| 4072 | 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 4073 | 'type': 'object'}}, |
| 4074 | 'type': 'object'} |
| 4075 | |
| 4076 | |
| 4077 | @ReturnMapping(SerializedModel) |
| 4078 | async def Export(self): |
| 4079 | ''' |
| 4080 | |
| 4081 | Returns -> typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools> |
| 4082 | ''' |
| 4083 | # map input types to rpc msg |
| 4084 | _params = dict() |
| 4085 | msg = dict(type='MigrationMaster', request='Export', version=1, params=_params) |
| 4086 | |
| 4087 | reply = await self.rpc(msg) |
| 4088 | return reply |
| 4089 | |
| 4090 | |
| 4091 | |
| 4092 | @ReturnMapping(MasterMigrationStatus) |
| 4093 | async def MigrationStatus(self): |
| 4094 | ''' |
| 4095 | |
| 4096 | Returns -> typing.Union[str, _ForwardRef('MigrationSpec')] |
| 4097 | ''' |
| 4098 | # map input types to rpc msg |
| 4099 | _params = dict() |
| 4100 | msg = dict(type='MigrationMaster', request='MigrationStatus', version=1, params=_params) |
| 4101 | |
| 4102 | reply = await self.rpc(msg) |
| 4103 | return reply |
| 4104 | |
| 4105 | |
| 4106 | |
| 4107 | @ReturnMapping(MinionReports) |
| 4108 | async def MinionReports(self): |
| 4109 | ''' |
| 4110 | |
| 4111 | Returns -> typing.Union[typing.Sequence<+T_co>[str], int] |
| 4112 | ''' |
| 4113 | # map input types to rpc msg |
| 4114 | _params = dict() |
| 4115 | msg = dict(type='MigrationMaster', request='MinionReports', version=1, params=_params) |
| 4116 | |
| 4117 | reply = await self.rpc(msg) |
| 4118 | return reply |
| 4119 | |
| 4120 | |
| 4121 | |
| 4122 | @ReturnMapping(MigrationModelInfo) |
| 4123 | async def ModelInfo(self): |
| 4124 | ''' |
| 4125 | |
| 4126 | Returns -> typing.Union[_ForwardRef('Number'), str] |
| 4127 | ''' |
| 4128 | # map input types to rpc msg |
| 4129 | _params = dict() |
| 4130 | msg = dict(type='MigrationMaster', request='ModelInfo', version=1, params=_params) |
| 4131 | |
| 4132 | reply = await self.rpc(msg) |
| 4133 | return reply |
| 4134 | |
| 4135 | |
| 4136 | |
| 4137 | @ReturnMapping(None) |
| 4138 | async def Prechecks(self): |
| 4139 | ''' |
| 4140 | |
| 4141 | Returns -> None |
| 4142 | ''' |
| 4143 | # map input types to rpc msg |
| 4144 | _params = dict() |
| 4145 | msg = dict(type='MigrationMaster', request='Prechecks', version=1, params=_params) |
| 4146 | |
| 4147 | reply = await self.rpc(msg) |
| 4148 | return reply |
| 4149 | |
| 4150 | |
| 4151 | |
| 4152 | @ReturnMapping(None) |
| 4153 | async def Reap(self): |
| 4154 | ''' |
| 4155 | |
| 4156 | Returns -> None |
| 4157 | ''' |
| 4158 | # map input types to rpc msg |
| 4159 | _params = dict() |
| 4160 | msg = dict(type='MigrationMaster', request='Reap', version=1, params=_params) |
| 4161 | |
| 4162 | reply = await self.rpc(msg) |
| 4163 | return reply |
| 4164 | |
| 4165 | |
| 4166 | |
| 4167 | @ReturnMapping(None) |
| 4168 | async def SetPhase(self, phase): |
| 4169 | ''' |
| 4170 | phase : str |
| 4171 | Returns -> None |
| 4172 | ''' |
| 4173 | # map input types to rpc msg |
| 4174 | _params = dict() |
| 4175 | msg = dict(type='MigrationMaster', request='SetPhase', version=1, params=_params) |
| 4176 | _params['phase'] = phase |
| 4177 | reply = await self.rpc(msg) |
| 4178 | return reply |
| 4179 | |
| 4180 | |
| 4181 | |
| 4182 | @ReturnMapping(None) |
| 4183 | async def SetStatusMessage(self, message): |
| 4184 | ''' |
| 4185 | message : str |
| 4186 | Returns -> None |
| 4187 | ''' |
| 4188 | # map input types to rpc msg |
| 4189 | _params = dict() |
| 4190 | msg = dict(type='MigrationMaster', request='SetStatusMessage', version=1, params=_params) |
| 4191 | _params['message'] = message |
| 4192 | reply = await self.rpc(msg) |
| 4193 | return reply |
| 4194 | |
| 4195 | |
| 4196 | |
| 4197 | @ReturnMapping(NotifyWatchResult) |
| 4198 | async def Watch(self): |
| 4199 | ''' |
| 4200 | |
| 4201 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 4202 | ''' |
| 4203 | # map input types to rpc msg |
| 4204 | _params = dict() |
| 4205 | msg = dict(type='MigrationMaster', request='Watch', version=1, params=_params) |
| 4206 | |
| 4207 | reply = await self.rpc(msg) |
| 4208 | return reply |
| 4209 | |
| 4210 | |
| 4211 | |
| 4212 | @ReturnMapping(NotifyWatchResult) |
| 4213 | async def WatchMinionReports(self): |
| 4214 | ''' |
| 4215 | |
| 4216 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 4217 | ''' |
| 4218 | # map input types to rpc msg |
| 4219 | _params = dict() |
| 4220 | msg = dict(type='MigrationMaster', request='WatchMinionReports', version=1, params=_params) |
| 4221 | |
| 4222 | reply = await self.rpc(msg) |
| 4223 | return reply |
| 4224 | |
| 4225 | |
| 4226 | |
| 4227 | class MigrationMinionFacade(Type): |
| 4228 | name = 'MigrationMinion' |
| 4229 | version = 1 |
| 4230 | schema = {'definitions': {'Error': {'additionalProperties': False, |
| 4231 | 'properties': {'code': {'type': 'string'}, |
| 4232 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 4233 | 'message': {'type': 'string'}}, |
| 4234 | 'required': ['message', 'code'], |
| 4235 | 'type': 'object'}, |
| 4236 | 'ErrorInfo': {'additionalProperties': False, |
| 4237 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 4238 | 'macaroon-path': {'type': 'string'}}, |
| 4239 | 'type': 'object'}, |
| 4240 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 4241 | 'MinionReport': {'additionalProperties': False, |
| 4242 | 'properties': {'migration-id': {'type': 'string'}, |
| 4243 | 'phase': {'type': 'string'}, |
| 4244 | 'success': {'type': 'boolean'}}, |
| 4245 | 'required': ['migration-id', |
| 4246 | 'phase', |
| 4247 | 'success'], |
| 4248 | 'type': 'object'}, |
| 4249 | 'NotifyWatchResult': {'additionalProperties': False, |
| 4250 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 4251 | 'error': {'$ref': '#/definitions/Error'}}, |
| 4252 | 'required': ['NotifyWatcherId'], |
| 4253 | 'type': 'object'}}, |
| 4254 | 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}}, |
| 4255 | 'type': 'object'}, |
| 4256 | 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 4257 | 'type': 'object'}}, |
| 4258 | 'type': 'object'} |
| 4259 | |
| 4260 | |
| 4261 | @ReturnMapping(None) |
| 4262 | async def Report(self, migration_id, phase, success): |
| 4263 | ''' |
| 4264 | migration_id : str |
| 4265 | phase : str |
| 4266 | success : bool |
| 4267 | Returns -> None |
| 4268 | ''' |
| 4269 | # map input types to rpc msg |
| 4270 | _params = dict() |
| 4271 | msg = dict(type='MigrationMinion', request='Report', version=1, params=_params) |
| 4272 | _params['migration-id'] = migration_id |
| 4273 | _params['phase'] = phase |
| 4274 | _params['success'] = success |
| 4275 | reply = await self.rpc(msg) |
| 4276 | return reply |
| 4277 | |
| 4278 | |
| 4279 | |
| 4280 | @ReturnMapping(NotifyWatchResult) |
| 4281 | async def Watch(self): |
| 4282 | ''' |
| 4283 | |
| 4284 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 4285 | ''' |
| 4286 | # map input types to rpc msg |
| 4287 | _params = dict() |
| 4288 | msg = dict(type='MigrationMinion', request='Watch', version=1, params=_params) |
| 4289 | |
| 4290 | reply = await self.rpc(msg) |
| 4291 | return reply |
| 4292 | |
| 4293 | |
| 4294 | |
| 4295 | class MigrationStatusWatcherFacade(Type): |
| 4296 | name = 'MigrationStatusWatcher' |
| 4297 | version = 1 |
| 4298 | schema = {'definitions': {'MigrationStatus': {'additionalProperties': False, |
| 4299 | 'properties': {'attempt': {'type': 'integer'}, |
| 4300 | 'migration-id': {'type': 'string'}, |
| 4301 | 'phase': {'type': 'string'}, |
| 4302 | 'source-api-addrs': {'items': {'type': 'string'}, |
| 4303 | 'type': 'array'}, |
| 4304 | 'source-ca-cert': {'type': 'string'}, |
| 4305 | 'target-api-addrs': {'items': {'type': 'string'}, |
| 4306 | 'type': 'array'}, |
| 4307 | 'target-ca-cert': {'type': 'string'}}, |
| 4308 | 'required': ['migration-id', |
| 4309 | 'attempt', |
| 4310 | 'phase', |
| 4311 | 'source-api-addrs', |
| 4312 | 'source-ca-cert', |
| 4313 | 'target-api-addrs', |
| 4314 | 'target-ca-cert'], |
| 4315 | 'type': 'object'}}, |
| 4316 | 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}}, |
| 4317 | 'type': 'object'}, |
| 4318 | 'Stop': {'type': 'object'}}, |
| 4319 | 'type': 'object'} |
| 4320 | |
| 4321 | |
| 4322 | @ReturnMapping(MigrationStatus) |
| 4323 | async def Next(self): |
| 4324 | ''' |
| 4325 | |
| 4326 | Returns -> typing.Union[int, typing.Sequence<+T_co>[str]] |
| 4327 | ''' |
| 4328 | # map input types to rpc msg |
| 4329 | _params = dict() |
| 4330 | msg = dict(type='MigrationStatusWatcher', request='Next', version=1, params=_params) |
| 4331 | |
| 4332 | reply = await self.rpc(msg) |
| 4333 | return reply |
| 4334 | |
| 4335 | |
| 4336 | |
| 4337 | @ReturnMapping(None) |
| 4338 | async def Stop(self): |
| 4339 | ''' |
| 4340 | |
| 4341 | Returns -> None |
| 4342 | ''' |
| 4343 | # map input types to rpc msg |
| 4344 | _params = dict() |
| 4345 | msg = dict(type='MigrationStatusWatcher', request='Stop', version=1, params=_params) |
| 4346 | |
| 4347 | reply = await self.rpc(msg) |
| 4348 | return reply |
| 4349 | |
| 4350 | |
| 4351 | |
| 4352 | class MigrationTargetFacade(Type): |
| 4353 | name = 'MigrationTarget' |
| 4354 | version = 1 |
| 4355 | schema = {'definitions': {'AdoptResourcesArgs': {'additionalProperties': False, |
| 4356 | 'properties': {'model-tag': {'type': 'string'}, |
| 4357 | 'source-controller-version': {'$ref': '#/definitions/Number'}}, |
| 4358 | 'required': ['model-tag', |
| 4359 | 'source-controller-version'], |
| 4360 | 'type': 'object'}, |
| 4361 | 'BytesResult': {'additionalProperties': False, |
| 4362 | 'properties': {'result': {'items': {'type': 'integer'}, |
| 4363 | 'type': 'array'}}, |
| 4364 | 'required': ['result'], |
| 4365 | 'type': 'object'}, |
| 4366 | 'MigrationModelInfo': {'additionalProperties': False, |
| 4367 | 'properties': {'agent-version': {'$ref': '#/definitions/Number'}, |
| 4368 | 'controller-agent-version': {'$ref': '#/definitions/Number'}, |
| 4369 | 'name': {'type': 'string'}, |
| 4370 | 'owner-tag': {'type': 'string'}, |
| 4371 | 'uuid': {'type': 'string'}}, |
| 4372 | 'required': ['uuid', |
| 4373 | 'name', |
| 4374 | 'owner-tag', |
| 4375 | 'agent-version', |
| 4376 | 'controller-agent-version'], |
| 4377 | 'type': 'object'}, |
| 4378 | 'ModelArgs': {'additionalProperties': False, |
| 4379 | 'properties': {'model-tag': {'type': 'string'}}, |
| 4380 | 'required': ['model-tag'], |
| 4381 | 'type': 'object'}, |
| 4382 | 'Number': {'additionalProperties': False, |
| 4383 | 'properties': {'Build': {'type': 'integer'}, |
| 4384 | 'Major': {'type': 'integer'}, |
| 4385 | 'Minor': {'type': 'integer'}, |
| 4386 | 'Patch': {'type': 'integer'}, |
| 4387 | 'Tag': {'type': 'string'}}, |
| 4388 | 'required': ['Major', |
| 4389 | 'Minor', |
| 4390 | 'Tag', |
| 4391 | 'Patch', |
| 4392 | 'Build'], |
| 4393 | 'type': 'object'}, |
| 4394 | 'SerializedModel': {'additionalProperties': False, |
| 4395 | 'properties': {'bytes': {'items': {'type': 'integer'}, |
| 4396 | 'type': 'array'}, |
| 4397 | 'charms': {'items': {'type': 'string'}, |
| 4398 | 'type': 'array'}, |
| 4399 | 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'}, |
| 4400 | 'type': 'array'}, |
| 4401 | 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'}, |
| 4402 | 'type': 'array'}}, |
| 4403 | 'required': ['bytes', |
| 4404 | 'charms', |
| 4405 | 'tools', |
| 4406 | 'resources'], |
| 4407 | 'type': 'object'}, |
| 4408 | 'SerializedModelResource': {'additionalProperties': False, |
| 4409 | 'properties': {'application': {'type': 'string'}, |
| 4410 | 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'}, |
| 4411 | 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'}, |
| 4412 | 'name': {'type': 'string'}, |
| 4413 | 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}}, |
| 4414 | 'type': 'object'}}, |
| 4415 | 'required': ['application', |
| 4416 | 'name', |
| 4417 | 'application-revision', |
| 4418 | 'charmstore-revision', |
| 4419 | 'unit-revisions'], |
| 4420 | 'type': 'object'}, |
| 4421 | 'SerializedModelResourceRevision': {'additionalProperties': False, |
| 4422 | 'properties': {'description': {'type': 'string'}, |
| 4423 | 'fingerprint': {'type': 'string'}, |
| 4424 | 'origin': {'type': 'string'}, |
| 4425 | 'path': {'type': 'string'}, |
| 4426 | 'revision': {'type': 'integer'}, |
| 4427 | 'size': {'type': 'integer'}, |
| 4428 | 'timestamp': {'format': 'date-time', |
| 4429 | 'type': 'string'}, |
| 4430 | 'type': {'type': 'string'}, |
| 4431 | 'username': {'type': 'string'}}, |
| 4432 | 'required': ['revision', |
| 4433 | 'type', |
| 4434 | 'path', |
| 4435 | 'description', |
| 4436 | 'origin', |
| 4437 | 'fingerprint', |
| 4438 | 'size', |
| 4439 | 'timestamp'], |
| 4440 | 'type': 'object'}, |
| 4441 | 'SerializedModelTools': {'additionalProperties': False, |
| 4442 | 'properties': {'uri': {'type': 'string'}, |
| 4443 | 'version': {'type': 'string'}}, |
| 4444 | 'required': ['version', 'uri'], |
| 4445 | 'type': 'object'}}, |
| 4446 | 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}}, |
| 4447 | 'type': 'object'}, |
| 4448 | 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}}, |
| 4449 | 'type': 'object'}, |
| 4450 | 'AdoptResources': {'properties': {'Params': {'$ref': '#/definitions/AdoptResourcesArgs'}}, |
| 4451 | 'type': 'object'}, |
| 4452 | 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, |
| 4453 | 'type': 'object'}, |
| 4454 | 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}}, |
| 4455 | 'type': 'object'}, |
| 4456 | 'LatestLogTime': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}, |
| 4457 | 'Result': {'format': 'date-time', |
| 4458 | 'type': 'string'}}, |
| 4459 | 'type': 'object'}, |
| 4460 | 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}}, |
| 4461 | 'type': 'object'}}, |
| 4462 | 'type': 'object'} |
| 4463 | |
| 4464 | |
| 4465 | @ReturnMapping(None) |
| 4466 | async def Abort(self, model_tag): |
| 4467 | ''' |
| 4468 | model_tag : str |
| 4469 | Returns -> None |
| 4470 | ''' |
| 4471 | # map input types to rpc msg |
| 4472 | _params = dict() |
| 4473 | msg = dict(type='MigrationTarget', request='Abort', version=1, params=_params) |
| 4474 | _params['model-tag'] = model_tag |
| 4475 | reply = await self.rpc(msg) |
| 4476 | return reply |
| 4477 | |
| 4478 | |
| 4479 | |
| 4480 | @ReturnMapping(None) |
| 4481 | async def Activate(self, model_tag): |
| 4482 | ''' |
| 4483 | model_tag : str |
| 4484 | Returns -> None |
| 4485 | ''' |
| 4486 | # map input types to rpc msg |
| 4487 | _params = dict() |
| 4488 | msg = dict(type='MigrationTarget', request='Activate', version=1, params=_params) |
| 4489 | _params['model-tag'] = model_tag |
| 4490 | reply = await self.rpc(msg) |
| 4491 | return reply |
| 4492 | |
| 4493 | |
| 4494 | |
| 4495 | @ReturnMapping(None) |
| 4496 | async def AdoptResources(self, model_tag, source_controller_version): |
| 4497 | ''' |
| 4498 | model_tag : str |
| 4499 | source_controller_version : Number |
| 4500 | Returns -> None |
| 4501 | ''' |
| 4502 | # map input types to rpc msg |
| 4503 | _params = dict() |
| 4504 | msg = dict(type='MigrationTarget', request='AdoptResources', version=1, params=_params) |
| 4505 | _params['model-tag'] = model_tag |
| 4506 | _params['source-controller-version'] = source_controller_version |
| 4507 | reply = await self.rpc(msg) |
| 4508 | return reply |
| 4509 | |
| 4510 | |
| 4511 | |
| 4512 | @ReturnMapping(BytesResult) |
| 4513 | async def CACert(self): |
| 4514 | ''' |
| 4515 | |
| 4516 | Returns -> typing.Sequence<+T_co>[int] |
| 4517 | ''' |
| 4518 | # map input types to rpc msg |
| 4519 | _params = dict() |
| 4520 | msg = dict(type='MigrationTarget', request='CACert', version=1, params=_params) |
| 4521 | |
| 4522 | reply = await self.rpc(msg) |
| 4523 | return reply |
| 4524 | |
| 4525 | |
| 4526 | |
| 4527 | @ReturnMapping(None) |
| 4528 | async def Import(self, bytes_, charms, tools): |
| 4529 | ''' |
| 4530 | bytes_ : typing.Sequence<+T_co>[int] |
| 4531 | charms : typing.Sequence<+T_co>[str] |
| 4532 | tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools> |
| 4533 | Returns -> None |
| 4534 | ''' |
| 4535 | # map input types to rpc msg |
| 4536 | _params = dict() |
| 4537 | msg = dict(type='MigrationTarget', request='Import', version=1, params=_params) |
| 4538 | _params['bytes'] = bytes_ |
| 4539 | _params['charms'] = charms |
| 4540 | _params['tools'] = tools |
| 4541 | reply = await self.rpc(msg) |
| 4542 | return reply |
| 4543 | |
| 4544 | |
| 4545 | |
| 4546 | @ReturnMapping(str) |
| 4547 | async def LatestLogTime(self, model_tag): |
| 4548 | ''' |
| 4549 | model_tag : str |
| 4550 | Returns -> str |
| 4551 | ''' |
| 4552 | # map input types to rpc msg |
| 4553 | _params = dict() |
| 4554 | msg = dict(type='MigrationTarget', request='LatestLogTime', version=1, params=_params) |
| 4555 | _params['model-tag'] = model_tag |
| 4556 | reply = await self.rpc(msg) |
| 4557 | return reply |
| 4558 | |
| 4559 | |
| 4560 | |
| 4561 | @ReturnMapping(None) |
| 4562 | async def Prechecks(self, agent_version, name, owner_tag, uuid): |
| 4563 | ''' |
| 4564 | agent_version : Number |
| 4565 | name : str |
| 4566 | owner_tag : str |
| 4567 | uuid : str |
| 4568 | Returns -> None |
| 4569 | ''' |
| 4570 | # map input types to rpc msg |
| 4571 | _params = dict() |
| 4572 | msg = dict(type='MigrationTarget', request='Prechecks', version=1, params=_params) |
| 4573 | _params['agent-version'] = agent_version |
| 4574 | _params['name'] = name |
| 4575 | _params['owner-tag'] = owner_tag |
| 4576 | _params['uuid'] = uuid |
| 4577 | reply = await self.rpc(msg) |
| 4578 | return reply |
| 4579 | |
| 4580 | |
| 4581 | |
| 4582 | class ModelConfigFacade(Type): |
| 4583 | name = 'ModelConfig' |
| 4584 | version = 1 |
| 4585 | schema = {'definitions': {'ConfigValue': {'additionalProperties': False, |
| 4586 | 'properties': {'source': {'type': 'string'}, |
| 4587 | 'value': {'additionalProperties': True, |
| 4588 | 'type': 'object'}}, |
| 4589 | 'required': ['value', 'source'], |
| 4590 | 'type': 'object'}, |
| 4591 | 'Error': {'additionalProperties': False, |
| 4592 | 'properties': {'code': {'type': 'string'}, |
| 4593 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 4594 | 'message': {'type': 'string'}}, |
| 4595 | 'required': ['message', 'code'], |
| 4596 | 'type': 'object'}, |
| 4597 | 'ErrorInfo': {'additionalProperties': False, |
| 4598 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 4599 | 'macaroon-path': {'type': 'string'}}, |
| 4600 | 'type': 'object'}, |
| 4601 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 4602 | 'ModelConfigResults': {'additionalProperties': False, |
| 4603 | 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}}, |
| 4604 | 'type': 'object'}}, |
| 4605 | 'required': ['config'], |
| 4606 | 'type': 'object'}, |
| 4607 | 'ModelSLA': {'additionalProperties': False, |
| 4608 | 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'}, |
| 4609 | 'creds': {'items': {'type': 'integer'}, |
| 4610 | 'type': 'array'}}, |
| 4611 | 'required': ['ModelSLAInfo', 'creds'], |
| 4612 | 'type': 'object'}, |
| 4613 | 'ModelSLAInfo': {'additionalProperties': False, |
| 4614 | 'properties': {'level': {'type': 'string'}, |
| 4615 | 'owner': {'type': 'string'}}, |
| 4616 | 'required': ['level', 'owner'], |
| 4617 | 'type': 'object'}, |
| 4618 | 'ModelSet': {'additionalProperties': False, |
| 4619 | 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 4620 | 'type': 'object'}}, |
| 4621 | 'type': 'object'}}, |
| 4622 | 'required': ['config'], |
| 4623 | 'type': 'object'}, |
| 4624 | 'ModelUnset': {'additionalProperties': False, |
| 4625 | 'properties': {'keys': {'items': {'type': 'string'}, |
| 4626 | 'type': 'array'}}, |
| 4627 | 'required': ['keys'], |
| 4628 | 'type': 'object'}, |
| 4629 | 'StringResult': {'additionalProperties': False, |
| 4630 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 4631 | 'result': {'type': 'string'}}, |
| 4632 | 'required': ['result'], |
| 4633 | 'type': 'object'}}, |
| 4634 | 'properties': {'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}}, |
| 4635 | 'type': 'object'}, |
| 4636 | 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}}, |
| 4637 | 'type': 'object'}, |
| 4638 | 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}}, |
| 4639 | 'type': 'object'}, |
| 4640 | 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, |
| 4641 | 'type': 'object'}, |
| 4642 | 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}}, |
| 4643 | 'type': 'object'}}, |
| 4644 | 'type': 'object'} |
| 4645 | |
| 4646 | |
| 4647 | @ReturnMapping(ModelConfigResults) |
| 4648 | async def ModelGet(self): |
| 4649 | ''' |
| 4650 | |
| 4651 | Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue> |
| 4652 | ''' |
| 4653 | # map input types to rpc msg |
| 4654 | _params = dict() |
| 4655 | msg = dict(type='ModelConfig', request='ModelGet', version=1, params=_params) |
| 4656 | |
| 4657 | reply = await self.rpc(msg) |
| 4658 | return reply |
| 4659 | |
| 4660 | |
| 4661 | |
| 4662 | @ReturnMapping(None) |
| 4663 | async def ModelSet(self, config): |
| 4664 | ''' |
| 4665 | config : typing.Mapping<~KT, +VT_co>[str, typing.Any] |
| 4666 | Returns -> None |
| 4667 | ''' |
| 4668 | # map input types to rpc msg |
| 4669 | _params = dict() |
| 4670 | msg = dict(type='ModelConfig', request='ModelSet', version=1, params=_params) |
| 4671 | _params['config'] = config |
| 4672 | reply = await self.rpc(msg) |
| 4673 | return reply |
| 4674 | |
| 4675 | |
| 4676 | |
| 4677 | @ReturnMapping(None) |
| 4678 | async def ModelUnset(self, keys): |
| 4679 | ''' |
| 4680 | keys : typing.Sequence<+T_co>[str] |
| 4681 | Returns -> None |
| 4682 | ''' |
| 4683 | # map input types to rpc msg |
| 4684 | _params = dict() |
| 4685 | msg = dict(type='ModelConfig', request='ModelUnset', version=1, params=_params) |
| 4686 | _params['keys'] = keys |
| 4687 | reply = await self.rpc(msg) |
| 4688 | return reply |
| 4689 | |
| 4690 | |
| 4691 | |
| 4692 | @ReturnMapping(StringResult) |
| 4693 | async def SLALevel(self): |
| 4694 | ''' |
| 4695 | |
| 4696 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 4697 | ''' |
| 4698 | # map input types to rpc msg |
| 4699 | _params = dict() |
| 4700 | msg = dict(type='ModelConfig', request='SLALevel', version=1, params=_params) |
| 4701 | |
| 4702 | reply = await self.rpc(msg) |
| 4703 | return reply |
| 4704 | |
| 4705 | |
| 4706 | |
| 4707 | @ReturnMapping(None) |
| 4708 | async def SetSLALevel(self, creds, level): |
| 4709 | ''' |
| 4710 | creds : typing.Sequence<+T_co>[int] |
| 4711 | level : str |
| 4712 | Returns -> None |
| 4713 | ''' |
| 4714 | # map input types to rpc msg |
| 4715 | _params = dict() |
| 4716 | msg = dict(type='ModelConfig', request='SetSLALevel', version=1, params=_params) |
| 4717 | _params['creds'] = creds |
| 4718 | _params['level'] = level |
| 4719 | reply = await self.rpc(msg) |
| 4720 | return reply |
| 4721 | |
| 4722 | |
| 4723 | |
| 4724 | class NotifyWatcherFacade(Type): |
| 4725 | name = 'NotifyWatcher' |
| 4726 | version = 1 |
| 4727 | schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}}, |
| 4728 | 'type': 'object'} |
| 4729 | |
| 4730 | |
| 4731 | @ReturnMapping(None) |
| 4732 | async def Next(self): |
| 4733 | ''' |
| 4734 | |
| 4735 | Returns -> None |
| 4736 | ''' |
| 4737 | # map input types to rpc msg |
| 4738 | _params = dict() |
| 4739 | msg = dict(type='NotifyWatcher', request='Next', version=1, params=_params) |
| 4740 | |
| 4741 | reply = await self.rpc(msg) |
| 4742 | return reply |
| 4743 | |
| 4744 | |
| 4745 | |
| 4746 | @ReturnMapping(None) |
| 4747 | async def Stop(self): |
| 4748 | ''' |
| 4749 | |
| 4750 | Returns -> None |
| 4751 | ''' |
| 4752 | # map input types to rpc msg |
| 4753 | _params = dict() |
| 4754 | msg = dict(type='NotifyWatcher', request='Stop', version=1, params=_params) |
| 4755 | |
| 4756 | reply = await self.rpc(msg) |
| 4757 | return reply |
| 4758 | |
| 4759 | |
| 4760 | |
| 4761 | class PayloadsFacade(Type): |
| 4762 | name = 'Payloads' |
| 4763 | version = 1 |
| 4764 | schema = {'definitions': {'Payload': {'additionalProperties': False, |
| 4765 | 'properties': {'class': {'type': 'string'}, |
| 4766 | 'id': {'type': 'string'}, |
| 4767 | 'labels': {'items': {'type': 'string'}, |
| 4768 | 'type': 'array'}, |
| 4769 | 'machine': {'type': 'string'}, |
| 4770 | 'status': {'type': 'string'}, |
| 4771 | 'type': {'type': 'string'}, |
| 4772 | 'unit': {'type': 'string'}}, |
| 4773 | 'required': ['class', |
| 4774 | 'type', |
| 4775 | 'id', |
| 4776 | 'status', |
| 4777 | 'labels', |
| 4778 | 'unit', |
| 4779 | 'machine'], |
| 4780 | 'type': 'object'}, |
| 4781 | 'PayloadListArgs': {'additionalProperties': False, |
| 4782 | 'properties': {'patterns': {'items': {'type': 'string'}, |
| 4783 | 'type': 'array'}}, |
| 4784 | 'required': ['patterns'], |
| 4785 | 'type': 'object'}, |
| 4786 | 'PayloadListResults': {'additionalProperties': False, |
| 4787 | 'properties': {'results': {'items': {'$ref': '#/definitions/Payload'}, |
| 4788 | 'type': 'array'}}, |
| 4789 | 'required': ['results'], |
| 4790 | 'type': 'object'}}, |
| 4791 | 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/PayloadListArgs'}, |
| 4792 | 'Result': {'$ref': '#/definitions/PayloadListResults'}}, |
| 4793 | 'type': 'object'}}, |
| 4794 | 'type': 'object'} |
| 4795 | |
| 4796 | |
| 4797 | @ReturnMapping(PayloadListResults) |
| 4798 | async def List(self, patterns): |
| 4799 | ''' |
| 4800 | patterns : typing.Sequence<+T_co>[str] |
| 4801 | Returns -> typing.Sequence<+T_co>[~Payload]<~Payload> |
| 4802 | ''' |
| 4803 | # map input types to rpc msg |
| 4804 | _params = dict() |
| 4805 | msg = dict(type='Payloads', request='List', version=1, params=_params) |
| 4806 | _params['patterns'] = patterns |
| 4807 | reply = await self.rpc(msg) |
| 4808 | return reply |
| 4809 | |
| 4810 | |
| 4811 | |
| 4812 | class PayloadsHookContextFacade(Type): |
| 4813 | name = 'PayloadsHookContext' |
| 4814 | version = 1 |
| 4815 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 4816 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 4817 | 'type': 'array'}}, |
| 4818 | 'required': ['entities'], |
| 4819 | 'type': 'object'}, |
| 4820 | 'Entity': {'additionalProperties': False, |
| 4821 | 'properties': {'tag': {'type': 'string'}}, |
| 4822 | 'required': ['tag'], |
| 4823 | 'type': 'object'}, |
| 4824 | 'Error': {'additionalProperties': False, |
| 4825 | 'properties': {'code': {'type': 'string'}, |
| 4826 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 4827 | 'message': {'type': 'string'}}, |
| 4828 | 'required': ['message', 'code'], |
| 4829 | 'type': 'object'}, |
| 4830 | 'ErrorInfo': {'additionalProperties': False, |
| 4831 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 4832 | 'macaroon-path': {'type': 'string'}}, |
| 4833 | 'type': 'object'}, |
| 4834 | 'LookUpPayloadArg': {'additionalProperties': False, |
| 4835 | 'properties': {'id': {'type': 'string'}, |
| 4836 | 'name': {'type': 'string'}}, |
| 4837 | 'required': ['name', 'id'], |
| 4838 | 'type': 'object'}, |
| 4839 | 'LookUpPayloadArgs': {'additionalProperties': False, |
| 4840 | 'properties': {'args': {'items': {'$ref': '#/definitions/LookUpPayloadArg'}, |
| 4841 | 'type': 'array'}}, |
| 4842 | 'required': ['args'], |
| 4843 | 'type': 'object'}, |
| 4844 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 4845 | 'Payload': {'additionalProperties': False, |
| 4846 | 'properties': {'class': {'type': 'string'}, |
| 4847 | 'id': {'type': 'string'}, |
| 4848 | 'labels': {'items': {'type': 'string'}, |
| 4849 | 'type': 'array'}, |
| 4850 | 'machine': {'type': 'string'}, |
| 4851 | 'status': {'type': 'string'}, |
| 4852 | 'type': {'type': 'string'}, |
| 4853 | 'unit': {'type': 'string'}}, |
| 4854 | 'required': ['class', |
| 4855 | 'type', |
| 4856 | 'id', |
| 4857 | 'status', |
| 4858 | 'labels', |
| 4859 | 'unit', |
| 4860 | 'machine'], |
| 4861 | 'type': 'object'}, |
| 4862 | 'PayloadResult': {'additionalProperties': False, |
| 4863 | 'properties': {'Entity': {'$ref': '#/definitions/Entity'}, |
| 4864 | 'error': {'$ref': '#/definitions/Error'}, |
| 4865 | 'not-found': {'type': 'boolean'}, |
| 4866 | 'payload': {'$ref': '#/definitions/Payload'}}, |
| 4867 | 'required': ['Entity', |
| 4868 | 'payload', |
| 4869 | 'not-found'], |
| 4870 | 'type': 'object'}, |
| 4871 | 'PayloadResults': {'additionalProperties': False, |
| 4872 | 'properties': {'results': {'items': {'$ref': '#/definitions/PayloadResult'}, |
| 4873 | 'type': 'array'}}, |
| 4874 | 'required': ['results'], |
| 4875 | 'type': 'object'}, |
| 4876 | 'SetPayloadStatusArg': {'additionalProperties': False, |
| 4877 | 'properties': {'Entity': {'$ref': '#/definitions/Entity'}, |
| 4878 | 'status': {'type': 'string'}}, |
| 4879 | 'required': ['Entity', 'status'], |
| 4880 | 'type': 'object'}, |
| 4881 | 'SetPayloadStatusArgs': {'additionalProperties': False, |
| 4882 | 'properties': {'args': {'items': {'$ref': '#/definitions/SetPayloadStatusArg'}, |
| 4883 | 'type': 'array'}}, |
| 4884 | 'required': ['args'], |
| 4885 | 'type': 'object'}, |
| 4886 | 'TrackPayloadArgs': {'additionalProperties': False, |
| 4887 | 'properties': {'payloads': {'items': {'$ref': '#/definitions/Payload'}, |
| 4888 | 'type': 'array'}}, |
| 4889 | 'required': ['payloads'], |
| 4890 | 'type': 'object'}}, |
| 4891 | 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4892 | 'Result': {'$ref': '#/definitions/PayloadResults'}}, |
| 4893 | 'type': 'object'}, |
| 4894 | 'LookUp': {'properties': {'Params': {'$ref': '#/definitions/LookUpPayloadArgs'}, |
| 4895 | 'Result': {'$ref': '#/definitions/PayloadResults'}}, |
| 4896 | 'type': 'object'}, |
| 4897 | 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetPayloadStatusArgs'}, |
| 4898 | 'Result': {'$ref': '#/definitions/PayloadResults'}}, |
| 4899 | 'type': 'object'}, |
| 4900 | 'Track': {'properties': {'Params': {'$ref': '#/definitions/TrackPayloadArgs'}, |
| 4901 | 'Result': {'$ref': '#/definitions/PayloadResults'}}, |
| 4902 | 'type': 'object'}, |
| 4903 | 'Untrack': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 4904 | 'Result': {'$ref': '#/definitions/PayloadResults'}}, |
| 4905 | 'type': 'object'}}, |
| 4906 | 'type': 'object'} |
| 4907 | |
| 4908 | |
| 4909 | @ReturnMapping(PayloadResults) |
| 4910 | async def List(self, entities): |
| 4911 | ''' |
| 4912 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 4913 | Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult> |
| 4914 | ''' |
| 4915 | # map input types to rpc msg |
| 4916 | _params = dict() |
| 4917 | msg = dict(type='PayloadsHookContext', request='List', version=1, params=_params) |
| 4918 | _params['entities'] = entities |
| 4919 | reply = await self.rpc(msg) |
| 4920 | return reply |
| 4921 | |
| 4922 | |
| 4923 | |
| 4924 | @ReturnMapping(PayloadResults) |
| 4925 | async def LookUp(self, args): |
| 4926 | ''' |
| 4927 | args : typing.Sequence<+T_co>[~LookUpPayloadArg]<~LookUpPayloadArg> |
| 4928 | Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult> |
| 4929 | ''' |
| 4930 | # map input types to rpc msg |
| 4931 | _params = dict() |
| 4932 | msg = dict(type='PayloadsHookContext', request='LookUp', version=1, params=_params) |
| 4933 | _params['args'] = args |
| 4934 | reply = await self.rpc(msg) |
| 4935 | return reply |
| 4936 | |
| 4937 | |
| 4938 | |
| 4939 | @ReturnMapping(PayloadResults) |
| 4940 | async def SetStatus(self, args): |
| 4941 | ''' |
| 4942 | args : typing.Sequence<+T_co>[~SetPayloadStatusArg]<~SetPayloadStatusArg> |
| 4943 | Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult> |
| 4944 | ''' |
| 4945 | # map input types to rpc msg |
| 4946 | _params = dict() |
| 4947 | msg = dict(type='PayloadsHookContext', request='SetStatus', version=1, params=_params) |
| 4948 | _params['args'] = args |
| 4949 | reply = await self.rpc(msg) |
| 4950 | return reply |
| 4951 | |
| 4952 | |
| 4953 | |
| 4954 | @ReturnMapping(PayloadResults) |
| 4955 | async def Track(self, payloads): |
| 4956 | ''' |
| 4957 | payloads : typing.Sequence<+T_co>[~Payload]<~Payload> |
| 4958 | Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult> |
| 4959 | ''' |
| 4960 | # map input types to rpc msg |
| 4961 | _params = dict() |
| 4962 | msg = dict(type='PayloadsHookContext', request='Track', version=1, params=_params) |
| 4963 | _params['payloads'] = payloads |
| 4964 | reply = await self.rpc(msg) |
| 4965 | return reply |
| 4966 | |
| 4967 | |
| 4968 | |
| 4969 | @ReturnMapping(PayloadResults) |
| 4970 | async def Untrack(self, entities): |
| 4971 | ''' |
| 4972 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 4973 | Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult> |
| 4974 | ''' |
| 4975 | # map input types to rpc msg |
| 4976 | _params = dict() |
| 4977 | msg = dict(type='PayloadsHookContext', request='Untrack', version=1, params=_params) |
| 4978 | _params['entities'] = entities |
| 4979 | reply = await self.rpc(msg) |
| 4980 | return reply |
| 4981 | |
| 4982 | |
| 4983 | |
| 4984 | class PingerFacade(Type): |
| 4985 | name = 'Pinger' |
| 4986 | version = 1 |
| 4987 | schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}}, |
| 4988 | 'type': 'object'} |
| 4989 | |
| 4990 | |
| 4991 | @ReturnMapping(None) |
| 4992 | async def Ping(self): |
| 4993 | ''' |
| 4994 | |
| 4995 | Returns -> None |
| 4996 | ''' |
| 4997 | # map input types to rpc msg |
| 4998 | _params = dict() |
| 4999 | msg = dict(type='Pinger', request='Ping', version=1, params=_params) |
| 5000 | |
| 5001 | reply = await self.rpc(msg) |
| 5002 | return reply |
| 5003 | |
| 5004 | |
| 5005 | |
| 5006 | @ReturnMapping(None) |
| 5007 | async def Stop(self): |
| 5008 | ''' |
| 5009 | |
| 5010 | Returns -> None |
| 5011 | ''' |
| 5012 | # map input types to rpc msg |
| 5013 | _params = dict() |
| 5014 | msg = dict(type='Pinger', request='Stop', version=1, params=_params) |
| 5015 | |
| 5016 | reply = await self.rpc(msg) |
| 5017 | return reply |
| 5018 | |
| 5019 | |
| 5020 | |
| 5021 | class ProxyUpdaterFacade(Type): |
| 5022 | name = 'ProxyUpdater' |
| 5023 | version = 1 |
| 5024 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 5025 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 5026 | 'type': 'array'}}, |
| 5027 | 'required': ['entities'], |
| 5028 | 'type': 'object'}, |
| 5029 | 'Entity': {'additionalProperties': False, |
| 5030 | 'properties': {'tag': {'type': 'string'}}, |
| 5031 | 'required': ['tag'], |
| 5032 | 'type': 'object'}, |
| 5033 | 'Error': {'additionalProperties': False, |
| 5034 | 'properties': {'code': {'type': 'string'}, |
| 5035 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5036 | 'message': {'type': 'string'}}, |
| 5037 | 'required': ['message', 'code'], |
| 5038 | 'type': 'object'}, |
| 5039 | 'ErrorInfo': {'additionalProperties': False, |
| 5040 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5041 | 'macaroon-path': {'type': 'string'}}, |
| 5042 | 'type': 'object'}, |
| 5043 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5044 | 'NotifyWatchResult': {'additionalProperties': False, |
| 5045 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 5046 | 'error': {'$ref': '#/definitions/Error'}}, |
| 5047 | 'required': ['NotifyWatcherId'], |
| 5048 | 'type': 'object'}, |
| 5049 | 'NotifyWatchResults': {'additionalProperties': False, |
| 5050 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 5051 | 'type': 'array'}}, |
| 5052 | 'required': ['results'], |
| 5053 | 'type': 'object'}, |
| 5054 | 'ProxyConfig': {'additionalProperties': False, |
| 5055 | 'properties': {'ftp': {'type': 'string'}, |
| 5056 | 'http': {'type': 'string'}, |
| 5057 | 'https': {'type': 'string'}, |
| 5058 | 'no-proxy': {'type': 'string'}}, |
| 5059 | 'required': ['http', |
| 5060 | 'https', |
| 5061 | 'ftp', |
| 5062 | 'no-proxy'], |
| 5063 | 'type': 'object'}, |
| 5064 | 'ProxyConfigResult': {'additionalProperties': False, |
| 5065 | 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'}, |
| 5066 | 'error': {'$ref': '#/definitions/Error'}, |
| 5067 | 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}}, |
| 5068 | 'required': ['proxy-settings', |
| 5069 | 'apt-proxy-settings'], |
| 5070 | 'type': 'object'}, |
| 5071 | 'ProxyConfigResults': {'additionalProperties': False, |
| 5072 | 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'}, |
| 5073 | 'type': 'array'}}, |
| 5074 | 'required': ['results'], |
| 5075 | 'type': 'object'}}, |
| 5076 | 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 5077 | 'Result': {'$ref': '#/definitions/ProxyConfigResults'}}, |
| 5078 | 'type': 'object'}, |
| 5079 | 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 5080 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 5081 | 'type': 'object'}}, |
| 5082 | 'type': 'object'} |
| 5083 | |
| 5084 | |
| 5085 | @ReturnMapping(ProxyConfigResults) |
| 5086 | async def ProxyConfig(self, entities): |
| 5087 | ''' |
| 5088 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 5089 | Returns -> typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult> |
| 5090 | ''' |
| 5091 | # map input types to rpc msg |
| 5092 | _params = dict() |
| 5093 | msg = dict(type='ProxyUpdater', request='ProxyConfig', version=1, params=_params) |
| 5094 | _params['entities'] = entities |
| 5095 | reply = await self.rpc(msg) |
| 5096 | return reply |
| 5097 | |
| 5098 | |
| 5099 | |
| 5100 | @ReturnMapping(NotifyWatchResults) |
| 5101 | async def WatchForProxyConfigAndAPIHostPortChanges(self, entities): |
| 5102 | ''' |
| 5103 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 5104 | Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> |
| 5105 | ''' |
| 5106 | # map input types to rpc msg |
| 5107 | _params = dict() |
| 5108 | msg = dict(type='ProxyUpdater', request='WatchForProxyConfigAndAPIHostPortChanges', version=1, params=_params) |
| 5109 | _params['entities'] = entities |
| 5110 | reply = await self.rpc(msg) |
| 5111 | return reply |
| 5112 | |
| 5113 | |
| 5114 | |
| 5115 | class RelationUnitsWatcherFacade(Type): |
| 5116 | name = 'RelationUnitsWatcher' |
| 5117 | version = 1 |
| 5118 | schema = {'definitions': {'Error': {'additionalProperties': False, |
| 5119 | 'properties': {'code': {'type': 'string'}, |
| 5120 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5121 | 'message': {'type': 'string'}}, |
| 5122 | 'required': ['message', 'code'], |
| 5123 | 'type': 'object'}, |
| 5124 | 'ErrorInfo': {'additionalProperties': False, |
| 5125 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5126 | 'macaroon-path': {'type': 'string'}}, |
| 5127 | 'type': 'object'}, |
| 5128 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5129 | 'RelationUnitsChange': {'additionalProperties': False, |
| 5130 | 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}}, |
| 5131 | 'type': 'object'}, |
| 5132 | 'departed': {'items': {'type': 'string'}, |
| 5133 | 'type': 'array'}}, |
| 5134 | 'required': ['changed'], |
| 5135 | 'type': 'object'}, |
| 5136 | 'RelationUnitsWatchResult': {'additionalProperties': False, |
| 5137 | 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'}, |
| 5138 | 'error': {'$ref': '#/definitions/Error'}, |
| 5139 | 'watcher-id': {'type': 'string'}}, |
| 5140 | 'required': ['watcher-id', |
| 5141 | 'changes'], |
| 5142 | 'type': 'object'}, |
| 5143 | 'UnitSettings': {'additionalProperties': False, |
| 5144 | 'properties': {'version': {'type': 'integer'}}, |
| 5145 | 'required': ['version'], |
| 5146 | 'type': 'object'}}, |
| 5147 | 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}}, |
| 5148 | 'type': 'object'}, |
| 5149 | 'Stop': {'type': 'object'}}, |
| 5150 | 'type': 'object'} |
| 5151 | |
| 5152 | |
| 5153 | @ReturnMapping(RelationUnitsWatchResult) |
| 5154 | async def Next(self): |
| 5155 | ''' |
| 5156 | |
| 5157 | Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str] |
| 5158 | ''' |
| 5159 | # map input types to rpc msg |
| 5160 | _params = dict() |
| 5161 | msg = dict(type='RelationUnitsWatcher', request='Next', version=1, params=_params) |
| 5162 | |
| 5163 | reply = await self.rpc(msg) |
| 5164 | return reply |
| 5165 | |
| 5166 | |
| 5167 | |
| 5168 | @ReturnMapping(None) |
| 5169 | async def Stop(self): |
| 5170 | ''' |
| 5171 | |
| 5172 | Returns -> None |
| 5173 | ''' |
| 5174 | # map input types to rpc msg |
| 5175 | _params = dict() |
| 5176 | msg = dict(type='RelationUnitsWatcher', request='Stop', version=1, params=_params) |
| 5177 | |
| 5178 | reply = await self.rpc(msg) |
| 5179 | return reply |
| 5180 | |
| 5181 | |
| 5182 | |
| 5183 | class RemoteApplicationWatcherFacade(Type): |
| 5184 | name = 'RemoteApplicationWatcher' |
| 5185 | version = 1 |
| 5186 | schema = {'definitions': {'Error': {'additionalProperties': False, |
| 5187 | 'properties': {'code': {'type': 'string'}, |
| 5188 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5189 | 'message': {'type': 'string'}}, |
| 5190 | 'required': ['message', 'code'], |
| 5191 | 'type': 'object'}, |
| 5192 | 'ErrorInfo': {'additionalProperties': False, |
| 5193 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5194 | 'macaroon-path': {'type': 'string'}}, |
| 5195 | 'type': 'object'}, |
| 5196 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5197 | 'RemoteApplicationChange': {'additionalProperties': False, |
| 5198 | 'properties': {'application-tag': {'type': 'string'}, |
| 5199 | 'life': {'type': 'string'}, |
| 5200 | 'relations': {'$ref': '#/definitions/RemoteRelationsChange'}}, |
| 5201 | 'required': ['application-tag', |
| 5202 | 'life', |
| 5203 | 'relations'], |
| 5204 | 'type': 'object'}, |
| 5205 | 'RemoteApplicationWatchResult': {'additionalProperties': False, |
| 5206 | 'properties': {'change': {'$ref': '#/definitions/RemoteApplicationChange'}, |
| 5207 | 'error': {'$ref': '#/definitions/Error'}, |
| 5208 | 'id': {'type': 'string'}}, |
| 5209 | 'required': ['id'], |
| 5210 | 'type': 'object'}, |
| 5211 | 'RemoteEntityId': {'additionalProperties': False, |
| 5212 | 'properties': {'model-uuid': {'type': 'string'}, |
| 5213 | 'token': {'type': 'string'}}, |
| 5214 | 'required': ['model-uuid', 'token'], |
| 5215 | 'type': 'object'}, |
| 5216 | 'RemoteRelationChange': {'additionalProperties': False, |
| 5217 | 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}}, |
| 5218 | 'type': 'object'}, |
| 5219 | 'departed-units': {'items': {'type': 'string'}, |
| 5220 | 'type': 'array'}, |
| 5221 | 'id': {'type': 'integer'}, |
| 5222 | 'life': {'type': 'string'}}, |
| 5223 | 'required': ['id', 'life'], |
| 5224 | 'type': 'object'}, |
| 5225 | 'RemoteRelationUnitChange': {'additionalProperties': False, |
| 5226 | 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True, |
| 5227 | 'type': 'object'}}, |
| 5228 | 'type': 'object'}, |
| 5229 | 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}}, |
| 5230 | 'required': ['unit-id'], |
| 5231 | 'type': 'object'}, |
| 5232 | 'RemoteRelationsChange': {'additionalProperties': False, |
| 5233 | 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'}, |
| 5234 | 'type': 'array'}, |
| 5235 | 'initial': {'type': 'boolean'}, |
| 5236 | 'removed': {'items': {'type': 'integer'}, |
| 5237 | 'type': 'array'}}, |
| 5238 | 'required': ['initial'], |
| 5239 | 'type': 'object'}}, |
| 5240 | 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteApplicationWatchResult'}}, |
| 5241 | 'type': 'object'}, |
| 5242 | 'Stop': {'type': 'object'}}, |
| 5243 | 'type': 'object'} |
| 5244 | |
| 5245 | |
| 5246 | @ReturnMapping(RemoteApplicationWatchResult) |
| 5247 | async def Next(self): |
| 5248 | ''' |
| 5249 | |
| 5250 | Returns -> typing.Union[_ForwardRef('RemoteApplicationChange'), _ForwardRef('Error'), str] |
| 5251 | ''' |
| 5252 | # map input types to rpc msg |
| 5253 | _params = dict() |
| 5254 | msg = dict(type='RemoteApplicationWatcher', request='Next', version=1, params=_params) |
| 5255 | |
| 5256 | reply = await self.rpc(msg) |
| 5257 | return reply |
| 5258 | |
| 5259 | |
| 5260 | |
| 5261 | @ReturnMapping(None) |
| 5262 | async def Stop(self): |
| 5263 | ''' |
| 5264 | |
| 5265 | Returns -> None |
| 5266 | ''' |
| 5267 | # map input types to rpc msg |
| 5268 | _params = dict() |
| 5269 | msg = dict(type='RemoteApplicationWatcher', request='Stop', version=1, params=_params) |
| 5270 | |
| 5271 | reply = await self.rpc(msg) |
| 5272 | return reply |
| 5273 | |
| 5274 | |
| 5275 | |
| 5276 | class RemoteRelationsWatcherFacade(Type): |
| 5277 | name = 'RemoteRelationsWatcher' |
| 5278 | version = 1 |
| 5279 | schema = {'definitions': {'Error': {'additionalProperties': False, |
| 5280 | 'properties': {'code': {'type': 'string'}, |
| 5281 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5282 | 'message': {'type': 'string'}}, |
| 5283 | 'required': ['message', 'code'], |
| 5284 | 'type': 'object'}, |
| 5285 | 'ErrorInfo': {'additionalProperties': False, |
| 5286 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5287 | 'macaroon-path': {'type': 'string'}}, |
| 5288 | 'type': 'object'}, |
| 5289 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5290 | 'RemoteEntityId': {'additionalProperties': False, |
| 5291 | 'properties': {'model-uuid': {'type': 'string'}, |
| 5292 | 'token': {'type': 'string'}}, |
| 5293 | 'required': ['model-uuid', 'token'], |
| 5294 | 'type': 'object'}, |
| 5295 | 'RemoteRelationChange': {'additionalProperties': False, |
| 5296 | 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}}, |
| 5297 | 'type': 'object'}, |
| 5298 | 'departed-units': {'items': {'type': 'string'}, |
| 5299 | 'type': 'array'}, |
| 5300 | 'id': {'type': 'integer'}, |
| 5301 | 'life': {'type': 'string'}}, |
| 5302 | 'required': ['id', 'life'], |
| 5303 | 'type': 'object'}, |
| 5304 | 'RemoteRelationUnitChange': {'additionalProperties': False, |
| 5305 | 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True, |
| 5306 | 'type': 'object'}}, |
| 5307 | 'type': 'object'}, |
| 5308 | 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}}, |
| 5309 | 'required': ['unit-id'], |
| 5310 | 'type': 'object'}, |
| 5311 | 'RemoteRelationsChange': {'additionalProperties': False, |
| 5312 | 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'}, |
| 5313 | 'type': 'array'}, |
| 5314 | 'initial': {'type': 'boolean'}, |
| 5315 | 'removed': {'items': {'type': 'integer'}, |
| 5316 | 'type': 'array'}}, |
| 5317 | 'required': ['initial'], |
| 5318 | 'type': 'object'}, |
| 5319 | 'RemoteRelationsWatchResult': {'additionalProperties': False, |
| 5320 | 'properties': {'RemoteRelationsWatcherId': {'type': 'string'}, |
| 5321 | 'change': {'$ref': '#/definitions/RemoteRelationsChange'}, |
| 5322 | 'error': {'$ref': '#/definitions/Error'}}, |
| 5323 | 'required': ['RemoteRelationsWatcherId'], |
| 5324 | 'type': 'object'}}, |
| 5325 | 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteRelationsWatchResult'}}, |
| 5326 | 'type': 'object'}, |
| 5327 | 'Stop': {'type': 'object'}}, |
| 5328 | 'type': 'object'} |
| 5329 | |
| 5330 | |
| 5331 | @ReturnMapping(RemoteRelationsWatchResult) |
| 5332 | async def Next(self): |
| 5333 | ''' |
| 5334 | |
| 5335 | Returns -> typing.Union[str, _ForwardRef('RemoteRelationsChange'), _ForwardRef('Error')] |
| 5336 | ''' |
| 5337 | # map input types to rpc msg |
| 5338 | _params = dict() |
| 5339 | msg = dict(type='RemoteRelationsWatcher', request='Next', version=1, params=_params) |
| 5340 | |
| 5341 | reply = await self.rpc(msg) |
| 5342 | return reply |
| 5343 | |
| 5344 | |
| 5345 | |
| 5346 | @ReturnMapping(None) |
| 5347 | async def Stop(self): |
| 5348 | ''' |
| 5349 | |
| 5350 | Returns -> None |
| 5351 | ''' |
| 5352 | # map input types to rpc msg |
| 5353 | _params = dict() |
| 5354 | msg = dict(type='RemoteRelationsWatcher', request='Stop', version=1, params=_params) |
| 5355 | |
| 5356 | reply = await self.rpc(msg) |
| 5357 | return reply |
| 5358 | |
| 5359 | |
| 5360 | |
| 5361 | class ResourcesFacade(Type): |
| 5362 | name = 'Resources' |
| 5363 | version = 1 |
| 5364 | schema = {'definitions': {'AddCharmWithAuthorization': {'additionalProperties': False, |
| 5365 | 'properties': {'channel': {'type': 'string'}, |
| 5366 | 'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5367 | 'url': {'type': 'string'}}, |
| 5368 | 'required': ['url', |
| 5369 | 'channel', |
| 5370 | 'macaroon'], |
| 5371 | 'type': 'object'}, |
| 5372 | 'AddPendingResourcesArgs': {'additionalProperties': False, |
| 5373 | 'properties': {'AddCharmWithAuthorization': {'$ref': '#/definitions/AddCharmWithAuthorization'}, |
| 5374 | 'Entity': {'$ref': '#/definitions/Entity'}, |
| 5375 | 'resources': {'items': {'$ref': '#/definitions/CharmResource'}, |
| 5376 | 'type': 'array'}}, |
| 5377 | 'required': ['Entity', |
| 5378 | 'AddCharmWithAuthorization', |
| 5379 | 'resources'], |
| 5380 | 'type': 'object'}, |
| 5381 | 'AddPendingResourcesResult': {'additionalProperties': False, |
| 5382 | 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'}, |
| 5383 | 'pending-ids': {'items': {'type': 'string'}, |
| 5384 | 'type': 'array'}}, |
| 5385 | 'required': ['ErrorResult', |
| 5386 | 'pending-ids'], |
| 5387 | 'type': 'object'}, |
| 5388 | 'CharmResource': {'additionalProperties': False, |
| 5389 | 'properties': {'description': {'type': 'string'}, |
| 5390 | 'fingerprint': {'items': {'type': 'integer'}, |
| 5391 | 'type': 'array'}, |
| 5392 | 'name': {'type': 'string'}, |
| 5393 | 'origin': {'type': 'string'}, |
| 5394 | 'path': {'type': 'string'}, |
| 5395 | 'revision': {'type': 'integer'}, |
| 5396 | 'size': {'type': 'integer'}, |
| 5397 | 'type': {'type': 'string'}}, |
| 5398 | 'required': ['name', |
| 5399 | 'type', |
| 5400 | 'path', |
| 5401 | 'origin', |
| 5402 | 'revision', |
| 5403 | 'fingerprint', |
| 5404 | 'size'], |
| 5405 | 'type': 'object'}, |
| 5406 | 'Entity': {'additionalProperties': False, |
| 5407 | 'properties': {'tag': {'type': 'string'}}, |
| 5408 | 'required': ['tag'], |
| 5409 | 'type': 'object'}, |
| 5410 | 'Error': {'additionalProperties': False, |
| 5411 | 'properties': {'code': {'type': 'string'}, |
| 5412 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5413 | 'message': {'type': 'string'}}, |
| 5414 | 'required': ['message', 'code'], |
| 5415 | 'type': 'object'}, |
| 5416 | 'ErrorInfo': {'additionalProperties': False, |
| 5417 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5418 | 'macaroon-path': {'type': 'string'}}, |
| 5419 | 'type': 'object'}, |
| 5420 | 'ErrorResult': {'additionalProperties': False, |
| 5421 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 5422 | 'type': 'object'}, |
| 5423 | 'ListResourcesArgs': {'additionalProperties': False, |
| 5424 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 5425 | 'type': 'array'}}, |
| 5426 | 'required': ['entities'], |
| 5427 | 'type': 'object'}, |
| 5428 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5429 | 'Resource': {'additionalProperties': False, |
| 5430 | 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'}, |
| 5431 | 'application': {'type': 'string'}, |
| 5432 | 'id': {'type': 'string'}, |
| 5433 | 'pending-id': {'type': 'string'}, |
| 5434 | 'timestamp': {'format': 'date-time', |
| 5435 | 'type': 'string'}, |
| 5436 | 'username': {'type': 'string'}}, |
| 5437 | 'required': ['CharmResource', |
| 5438 | 'id', |
| 5439 | 'pending-id', |
| 5440 | 'application', |
| 5441 | 'username', |
| 5442 | 'timestamp'], |
| 5443 | 'type': 'object'}, |
| 5444 | 'ResourcesResult': {'additionalProperties': False, |
| 5445 | 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'}, |
| 5446 | 'charm-store-resources': {'items': {'$ref': '#/definitions/CharmResource'}, |
| 5447 | 'type': 'array'}, |
| 5448 | 'resources': {'items': {'$ref': '#/definitions/Resource'}, |
| 5449 | 'type': 'array'}, |
| 5450 | 'unit-resources': {'items': {'$ref': '#/definitions/UnitResources'}, |
| 5451 | 'type': 'array'}}, |
| 5452 | 'required': ['ErrorResult', |
| 5453 | 'resources', |
| 5454 | 'charm-store-resources', |
| 5455 | 'unit-resources'], |
| 5456 | 'type': 'object'}, |
| 5457 | 'ResourcesResults': {'additionalProperties': False, |
| 5458 | 'properties': {'results': {'items': {'$ref': '#/definitions/ResourcesResult'}, |
| 5459 | 'type': 'array'}}, |
| 5460 | 'required': ['results'], |
| 5461 | 'type': 'object'}, |
| 5462 | 'UnitResources': {'additionalProperties': False, |
| 5463 | 'properties': {'Entity': {'$ref': '#/definitions/Entity'}, |
| 5464 | 'download-progress': {'patternProperties': {'.*': {'type': 'integer'}}, |
| 5465 | 'type': 'object'}, |
| 5466 | 'resources': {'items': {'$ref': '#/definitions/Resource'}, |
| 5467 | 'type': 'array'}}, |
| 5468 | 'required': ['Entity', |
| 5469 | 'resources', |
| 5470 | 'download-progress'], |
| 5471 | 'type': 'object'}}, |
| 5472 | 'properties': {'AddPendingResources': {'properties': {'Params': {'$ref': '#/definitions/AddPendingResourcesArgs'}, |
| 5473 | 'Result': {'$ref': '#/definitions/AddPendingResourcesResult'}}, |
| 5474 | 'type': 'object'}, |
| 5475 | 'ListResources': {'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'}, |
| 5476 | 'Result': {'$ref': '#/definitions/ResourcesResults'}}, |
| 5477 | 'type': 'object'}}, |
| 5478 | 'type': 'object'} |
| 5479 | |
| 5480 | |
| 5481 | @ReturnMapping(AddPendingResourcesResult) |
| 5482 | async def AddPendingResources(self, addcharmwithauthorization, entity, resources): |
| 5483 | ''' |
| 5484 | addcharmwithauthorization : AddCharmWithAuthorization |
| 5485 | entity : Entity |
| 5486 | resources : typing.Sequence<+T_co>[~CharmResource]<~CharmResource> |
| 5487 | Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[str]] |
| 5488 | ''' |
| 5489 | # map input types to rpc msg |
| 5490 | _params = dict() |
| 5491 | msg = dict(type='Resources', request='AddPendingResources', version=1, params=_params) |
| 5492 | _params['AddCharmWithAuthorization'] = addcharmwithauthorization |
| 5493 | _params['Entity'] = entity |
| 5494 | _params['Resources'] = resources |
| 5495 | reply = await self.rpc(msg) |
| 5496 | return reply |
| 5497 | |
| 5498 | |
| 5499 | |
| 5500 | @ReturnMapping(ResourcesResults) |
| 5501 | async def ListResources(self, entities): |
| 5502 | ''' |
| 5503 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 5504 | Returns -> typing.Sequence<+T_co>[~ResourcesResult]<~ResourcesResult> |
| 5505 | ''' |
| 5506 | # map input types to rpc msg |
| 5507 | _params = dict() |
| 5508 | msg = dict(type='Resources', request='ListResources', version=1, params=_params) |
| 5509 | _params['entities'] = entities |
| 5510 | reply = await self.rpc(msg) |
| 5511 | return reply |
| 5512 | |
| 5513 | |
| 5514 | |
| 5515 | class ResourcesHookContextFacade(Type): |
| 5516 | name = 'ResourcesHookContext' |
| 5517 | version = 1 |
| 5518 | schema = {'definitions': {'CharmResource': {'additionalProperties': False, |
| 5519 | 'properties': {'description': {'type': 'string'}, |
| 5520 | 'fingerprint': {'items': {'type': 'integer'}, |
| 5521 | 'type': 'array'}, |
| 5522 | 'name': {'type': 'string'}, |
| 5523 | 'origin': {'type': 'string'}, |
| 5524 | 'path': {'type': 'string'}, |
| 5525 | 'revision': {'type': 'integer'}, |
| 5526 | 'size': {'type': 'integer'}, |
| 5527 | 'type': {'type': 'string'}}, |
| 5528 | 'required': ['name', |
| 5529 | 'type', |
| 5530 | 'path', |
| 5531 | 'origin', |
| 5532 | 'revision', |
| 5533 | 'fingerprint', |
| 5534 | 'size'], |
| 5535 | 'type': 'object'}, |
| 5536 | 'Error': {'additionalProperties': False, |
| 5537 | 'properties': {'code': {'type': 'string'}, |
| 5538 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5539 | 'message': {'type': 'string'}}, |
| 5540 | 'required': ['message', 'code'], |
| 5541 | 'type': 'object'}, |
| 5542 | 'ErrorInfo': {'additionalProperties': False, |
| 5543 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5544 | 'macaroon-path': {'type': 'string'}}, |
| 5545 | 'type': 'object'}, |
| 5546 | 'ErrorResult': {'additionalProperties': False, |
| 5547 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 5548 | 'type': 'object'}, |
| 5549 | 'ListUnitResourcesArgs': {'additionalProperties': False, |
| 5550 | 'properties': {'resource-names': {'items': {'type': 'string'}, |
| 5551 | 'type': 'array'}}, |
| 5552 | 'required': ['resource-names'], |
| 5553 | 'type': 'object'}, |
| 5554 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5555 | 'Resource': {'additionalProperties': False, |
| 5556 | 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'}, |
| 5557 | 'application': {'type': 'string'}, |
| 5558 | 'id': {'type': 'string'}, |
| 5559 | 'pending-id': {'type': 'string'}, |
| 5560 | 'timestamp': {'format': 'date-time', |
| 5561 | 'type': 'string'}, |
| 5562 | 'username': {'type': 'string'}}, |
| 5563 | 'required': ['CharmResource', |
| 5564 | 'id', |
| 5565 | 'pending-id', |
| 5566 | 'application', |
| 5567 | 'username', |
| 5568 | 'timestamp'], |
| 5569 | 'type': 'object'}, |
| 5570 | 'UnitResourceResult': {'additionalProperties': False, |
| 5571 | 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'}, |
| 5572 | 'resource': {'$ref': '#/definitions/Resource'}}, |
| 5573 | 'required': ['ErrorResult', 'resource'], |
| 5574 | 'type': 'object'}, |
| 5575 | 'UnitResourcesResult': {'additionalProperties': False, |
| 5576 | 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'}, |
| 5577 | 'resources': {'items': {'$ref': '#/definitions/UnitResourceResult'}, |
| 5578 | 'type': 'array'}}, |
| 5579 | 'required': ['ErrorResult', |
| 5580 | 'resources'], |
| 5581 | 'type': 'object'}}, |
| 5582 | 'properties': {'GetResourceInfo': {'properties': {'Params': {'$ref': '#/definitions/ListUnitResourcesArgs'}, |
| 5583 | 'Result': {'$ref': '#/definitions/UnitResourcesResult'}}, |
| 5584 | 'type': 'object'}}, |
| 5585 | 'type': 'object'} |
| 5586 | |
| 5587 | |
| 5588 | @ReturnMapping(UnitResourcesResult) |
| 5589 | async def GetResourceInfo(self, resource_names): |
| 5590 | ''' |
| 5591 | resource_names : typing.Sequence<+T_co>[str] |
| 5592 | Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[~UnitResourceResult]<~UnitResourceResult>] |
| 5593 | ''' |
| 5594 | # map input types to rpc msg |
| 5595 | _params = dict() |
| 5596 | msg = dict(type='ResourcesHookContext', request='GetResourceInfo', version=1, params=_params) |
| 5597 | _params['resource-names'] = resource_names |
| 5598 | reply = await self.rpc(msg) |
| 5599 | return reply |
| 5600 | |
| 5601 | |
| 5602 | |
| 5603 | class RetryStrategyFacade(Type): |
| 5604 | name = 'RetryStrategy' |
| 5605 | version = 1 |
| 5606 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 5607 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 5608 | 'type': 'array'}}, |
| 5609 | 'required': ['entities'], |
| 5610 | 'type': 'object'}, |
| 5611 | 'Entity': {'additionalProperties': False, |
| 5612 | 'properties': {'tag': {'type': 'string'}}, |
| 5613 | 'required': ['tag'], |
| 5614 | 'type': 'object'}, |
| 5615 | 'Error': {'additionalProperties': False, |
| 5616 | 'properties': {'code': {'type': 'string'}, |
| 5617 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5618 | 'message': {'type': 'string'}}, |
| 5619 | 'required': ['message', 'code'], |
| 5620 | 'type': 'object'}, |
| 5621 | 'ErrorInfo': {'additionalProperties': False, |
| 5622 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5623 | 'macaroon-path': {'type': 'string'}}, |
| 5624 | 'type': 'object'}, |
| 5625 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5626 | 'NotifyWatchResult': {'additionalProperties': False, |
| 5627 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 5628 | 'error': {'$ref': '#/definitions/Error'}}, |
| 5629 | 'required': ['NotifyWatcherId'], |
| 5630 | 'type': 'object'}, |
| 5631 | 'NotifyWatchResults': {'additionalProperties': False, |
| 5632 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 5633 | 'type': 'array'}}, |
| 5634 | 'required': ['results'], |
| 5635 | 'type': 'object'}, |
| 5636 | 'RetryStrategy': {'additionalProperties': False, |
| 5637 | 'properties': {'jitter-retry-time': {'type': 'boolean'}, |
| 5638 | 'max-retry-time': {'type': 'integer'}, |
| 5639 | 'min-retry-time': {'type': 'integer'}, |
| 5640 | 'retry-time-factor': {'type': 'integer'}, |
| 5641 | 'should-retry': {'type': 'boolean'}}, |
| 5642 | 'required': ['should-retry', |
| 5643 | 'min-retry-time', |
| 5644 | 'max-retry-time', |
| 5645 | 'jitter-retry-time', |
| 5646 | 'retry-time-factor'], |
| 5647 | 'type': 'object'}, |
| 5648 | 'RetryStrategyResult': {'additionalProperties': False, |
| 5649 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5650 | 'result': {'$ref': '#/definitions/RetryStrategy'}}, |
| 5651 | 'type': 'object'}, |
| 5652 | 'RetryStrategyResults': {'additionalProperties': False, |
| 5653 | 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'}, |
| 5654 | 'type': 'array'}}, |
| 5655 | 'required': ['results'], |
| 5656 | 'type': 'object'}}, |
| 5657 | 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 5658 | 'Result': {'$ref': '#/definitions/RetryStrategyResults'}}, |
| 5659 | 'type': 'object'}, |
| 5660 | 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 5661 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 5662 | 'type': 'object'}}, |
| 5663 | 'type': 'object'} |
| 5664 | |
| 5665 | |
| 5666 | @ReturnMapping(RetryStrategyResults) |
| 5667 | async def RetryStrategy(self, entities): |
| 5668 | ''' |
| 5669 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 5670 | Returns -> typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult> |
| 5671 | ''' |
| 5672 | # map input types to rpc msg |
| 5673 | _params = dict() |
| 5674 | msg = dict(type='RetryStrategy', request='RetryStrategy', version=1, params=_params) |
| 5675 | _params['entities'] = entities |
| 5676 | reply = await self.rpc(msg) |
| 5677 | return reply |
| 5678 | |
| 5679 | |
| 5680 | |
| 5681 | @ReturnMapping(NotifyWatchResults) |
| 5682 | async def WatchRetryStrategy(self, entities): |
| 5683 | ''' |
| 5684 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 5685 | Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> |
| 5686 | ''' |
| 5687 | # map input types to rpc msg |
| 5688 | _params = dict() |
| 5689 | msg = dict(type='RetryStrategy', request='WatchRetryStrategy', version=1, params=_params) |
| 5690 | _params['entities'] = entities |
| 5691 | reply = await self.rpc(msg) |
| 5692 | return reply |
| 5693 | |
| 5694 | |
| 5695 | |
| 5696 | class SSHClientFacade(Type): |
| 5697 | name = 'SSHClient' |
| 5698 | version = 1 |
| 5699 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 5700 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 5701 | 'type': 'array'}}, |
| 5702 | 'required': ['entities'], |
| 5703 | 'type': 'object'}, |
| 5704 | 'Entity': {'additionalProperties': False, |
| 5705 | 'properties': {'tag': {'type': 'string'}}, |
| 5706 | 'required': ['tag'], |
| 5707 | 'type': 'object'}, |
| 5708 | 'Error': {'additionalProperties': False, |
| 5709 | 'properties': {'code': {'type': 'string'}, |
| 5710 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5711 | 'message': {'type': 'string'}}, |
| 5712 | 'required': ['message', 'code'], |
| 5713 | 'type': 'object'}, |
| 5714 | 'ErrorInfo': {'additionalProperties': False, |
| 5715 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5716 | 'macaroon-path': {'type': 'string'}}, |
| 5717 | 'type': 'object'}, |
| 5718 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5719 | 'SSHAddressResult': {'additionalProperties': False, |
| 5720 | 'properties': {'address': {'type': 'string'}, |
| 5721 | 'error': {'$ref': '#/definitions/Error'}}, |
| 5722 | 'type': 'object'}, |
| 5723 | 'SSHAddressResults': {'additionalProperties': False, |
| 5724 | 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'}, |
| 5725 | 'type': 'array'}}, |
| 5726 | 'required': ['results'], |
| 5727 | 'type': 'object'}, |
| 5728 | 'SSHProxyResult': {'additionalProperties': False, |
| 5729 | 'properties': {'use-proxy': {'type': 'boolean'}}, |
| 5730 | 'required': ['use-proxy'], |
| 5731 | 'type': 'object'}, |
| 5732 | 'SSHPublicKeysResult': {'additionalProperties': False, |
| 5733 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 5734 | 'public-keys': {'items': {'type': 'string'}, |
| 5735 | 'type': 'array'}}, |
| 5736 | 'type': 'object'}, |
| 5737 | 'SSHPublicKeysResults': {'additionalProperties': False, |
| 5738 | 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'}, |
| 5739 | 'type': 'array'}}, |
| 5740 | 'required': ['results'], |
| 5741 | 'type': 'object'}}, |
| 5742 | 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 5743 | 'Result': {'$ref': '#/definitions/SSHAddressResults'}}, |
| 5744 | 'type': 'object'}, |
| 5745 | 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}}, |
| 5746 | 'type': 'object'}, |
| 5747 | 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 5748 | 'Result': {'$ref': '#/definitions/SSHAddressResults'}}, |
| 5749 | 'type': 'object'}, |
| 5750 | 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 5751 | 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}}, |
| 5752 | 'type': 'object'}}, |
| 5753 | 'type': 'object'} |
| 5754 | |
| 5755 | |
| 5756 | @ReturnMapping(SSHAddressResults) |
| 5757 | async def PrivateAddress(self, entities): |
| 5758 | ''' |
| 5759 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 5760 | Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult> |
| 5761 | ''' |
| 5762 | # map input types to rpc msg |
| 5763 | _params = dict() |
| 5764 | msg = dict(type='SSHClient', request='PrivateAddress', version=1, params=_params) |
| 5765 | _params['entities'] = entities |
| 5766 | reply = await self.rpc(msg) |
| 5767 | return reply |
| 5768 | |
| 5769 | |
| 5770 | |
| 5771 | @ReturnMapping(SSHProxyResult) |
| 5772 | async def Proxy(self): |
| 5773 | ''' |
| 5774 | |
| 5775 | Returns -> bool |
| 5776 | ''' |
| 5777 | # map input types to rpc msg |
| 5778 | _params = dict() |
| 5779 | msg = dict(type='SSHClient', request='Proxy', version=1, params=_params) |
| 5780 | |
| 5781 | reply = await self.rpc(msg) |
| 5782 | return reply |
| 5783 | |
| 5784 | |
| 5785 | |
| 5786 | @ReturnMapping(SSHAddressResults) |
| 5787 | async def PublicAddress(self, entities): |
| 5788 | ''' |
| 5789 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 5790 | Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult> |
| 5791 | ''' |
| 5792 | # map input types to rpc msg |
| 5793 | _params = dict() |
| 5794 | msg = dict(type='SSHClient', request='PublicAddress', version=1, params=_params) |
| 5795 | _params['entities'] = entities |
| 5796 | reply = await self.rpc(msg) |
| 5797 | return reply |
| 5798 | |
| 5799 | |
| 5800 | |
| 5801 | @ReturnMapping(SSHPublicKeysResults) |
| 5802 | async def PublicKeys(self, entities): |
| 5803 | ''' |
| 5804 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 5805 | Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult> |
| 5806 | ''' |
| 5807 | # map input types to rpc msg |
| 5808 | _params = dict() |
| 5809 | msg = dict(type='SSHClient', request='PublicKeys', version=1, params=_params) |
| 5810 | _params['entities'] = entities |
| 5811 | reply = await self.rpc(msg) |
| 5812 | return reply |
| 5813 | |
| 5814 | |
| 5815 | |
| 5816 | class SingularFacade(Type): |
| 5817 | name = 'Singular' |
| 5818 | version = 1 |
| 5819 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 5820 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 5821 | 'type': 'array'}}, |
| 5822 | 'required': ['entities'], |
| 5823 | 'type': 'object'}, |
| 5824 | 'Entity': {'additionalProperties': False, |
| 5825 | 'properties': {'tag': {'type': 'string'}}, |
| 5826 | 'required': ['tag'], |
| 5827 | 'type': 'object'}, |
| 5828 | 'Error': {'additionalProperties': False, |
| 5829 | 'properties': {'code': {'type': 'string'}, |
| 5830 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5831 | 'message': {'type': 'string'}}, |
| 5832 | 'required': ['message', 'code'], |
| 5833 | 'type': 'object'}, |
| 5834 | 'ErrorInfo': {'additionalProperties': False, |
| 5835 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5836 | 'macaroon-path': {'type': 'string'}}, |
| 5837 | 'type': 'object'}, |
| 5838 | 'ErrorResult': {'additionalProperties': False, |
| 5839 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 5840 | 'type': 'object'}, |
| 5841 | 'ErrorResults': {'additionalProperties': False, |
| 5842 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 5843 | 'type': 'array'}}, |
| 5844 | 'required': ['results'], |
| 5845 | 'type': 'object'}, |
| 5846 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5847 | 'SingularClaim': {'additionalProperties': False, |
| 5848 | 'properties': {'controller-tag': {'type': 'string'}, |
| 5849 | 'duration': {'type': 'integer'}, |
| 5850 | 'model-tag': {'type': 'string'}}, |
| 5851 | 'required': ['model-tag', |
| 5852 | 'controller-tag', |
| 5853 | 'duration'], |
| 5854 | 'type': 'object'}, |
| 5855 | 'SingularClaims': {'additionalProperties': False, |
| 5856 | 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'}, |
| 5857 | 'type': 'array'}}, |
| 5858 | 'required': ['claims'], |
| 5859 | 'type': 'object'}}, |
| 5860 | 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'}, |
| 5861 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 5862 | 'type': 'object'}, |
| 5863 | 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 5864 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 5865 | 'type': 'object'}}, |
| 5866 | 'type': 'object'} |
| 5867 | |
| 5868 | |
| 5869 | @ReturnMapping(ErrorResults) |
| 5870 | async def Claim(self, claims): |
| 5871 | ''' |
| 5872 | claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim> |
| 5873 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 5874 | ''' |
| 5875 | # map input types to rpc msg |
| 5876 | _params = dict() |
| 5877 | msg = dict(type='Singular', request='Claim', version=1, params=_params) |
| 5878 | _params['claims'] = claims |
| 5879 | reply = await self.rpc(msg) |
| 5880 | return reply |
| 5881 | |
| 5882 | |
| 5883 | |
| 5884 | @ReturnMapping(ErrorResults) |
| 5885 | async def Wait(self, entities): |
| 5886 | ''' |
| 5887 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 5888 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 5889 | ''' |
| 5890 | # map input types to rpc msg |
| 5891 | _params = dict() |
| 5892 | msg = dict(type='Singular', request='Wait', version=1, params=_params) |
| 5893 | _params['entities'] = entities |
| 5894 | reply = await self.rpc(msg) |
| 5895 | return reply |
| 5896 | |
| 5897 | |
| 5898 | |
| 5899 | class StringsWatcherFacade(Type): |
| 5900 | name = 'StringsWatcher' |
| 5901 | version = 1 |
| 5902 | schema = {'definitions': {'Error': {'additionalProperties': False, |
| 5903 | 'properties': {'code': {'type': 'string'}, |
| 5904 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5905 | 'message': {'type': 'string'}}, |
| 5906 | 'required': ['message', 'code'], |
| 5907 | 'type': 'object'}, |
| 5908 | 'ErrorInfo': {'additionalProperties': False, |
| 5909 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5910 | 'macaroon-path': {'type': 'string'}}, |
| 5911 | 'type': 'object'}, |
| 5912 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5913 | 'StringsWatchResult': {'additionalProperties': False, |
| 5914 | 'properties': {'changes': {'items': {'type': 'string'}, |
| 5915 | 'type': 'array'}, |
| 5916 | 'error': {'$ref': '#/definitions/Error'}, |
| 5917 | 'watcher-id': {'type': 'string'}}, |
| 5918 | 'required': ['watcher-id'], |
| 5919 | 'type': 'object'}}, |
| 5920 | 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, |
| 5921 | 'type': 'object'}, |
| 5922 | 'Stop': {'type': 'object'}}, |
| 5923 | 'type': 'object'} |
| 5924 | |
| 5925 | |
| 5926 | @ReturnMapping(StringsWatchResult) |
| 5927 | async def Next(self): |
| 5928 | ''' |
| 5929 | |
| 5930 | Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')] |
| 5931 | ''' |
| 5932 | # map input types to rpc msg |
| 5933 | _params = dict() |
| 5934 | msg = dict(type='StringsWatcher', request='Next', version=1, params=_params) |
| 5935 | |
| 5936 | reply = await self.rpc(msg) |
| 5937 | return reply |
| 5938 | |
| 5939 | |
| 5940 | |
| 5941 | @ReturnMapping(None) |
| 5942 | async def Stop(self): |
| 5943 | ''' |
| 5944 | |
| 5945 | Returns -> None |
| 5946 | ''' |
| 5947 | # map input types to rpc msg |
| 5948 | _params = dict() |
| 5949 | msg = dict(type='StringsWatcher', request='Stop', version=1, params=_params) |
| 5950 | |
| 5951 | reply = await self.rpc(msg) |
| 5952 | return reply |
| 5953 | |
| 5954 | |
| 5955 | |
| 5956 | class UndertakerFacade(Type): |
| 5957 | name = 'Undertaker' |
| 5958 | version = 1 |
| 5959 | schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False, |
| 5960 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 5961 | 'type': 'object'}}, |
| 5962 | 'type': 'object'}, |
| 5963 | 'info': {'type': 'string'}, |
| 5964 | 'status': {'type': 'string'}, |
| 5965 | 'tag': {'type': 'string'}}, |
| 5966 | 'required': ['tag', |
| 5967 | 'status', |
| 5968 | 'info', |
| 5969 | 'data'], |
| 5970 | 'type': 'object'}, |
| 5971 | 'Error': {'additionalProperties': False, |
| 5972 | 'properties': {'code': {'type': 'string'}, |
| 5973 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 5974 | 'message': {'type': 'string'}}, |
| 5975 | 'required': ['message', 'code'], |
| 5976 | 'type': 'object'}, |
| 5977 | 'ErrorInfo': {'additionalProperties': False, |
| 5978 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 5979 | 'macaroon-path': {'type': 'string'}}, |
| 5980 | 'type': 'object'}, |
| 5981 | 'ErrorResult': {'additionalProperties': False, |
| 5982 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 5983 | 'type': 'object'}, |
| 5984 | 'ErrorResults': {'additionalProperties': False, |
| 5985 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 5986 | 'type': 'array'}}, |
| 5987 | 'required': ['results'], |
| 5988 | 'type': 'object'}, |
| 5989 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 5990 | 'ModelConfigResult': {'additionalProperties': False, |
| 5991 | 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 5992 | 'type': 'object'}}, |
| 5993 | 'type': 'object'}}, |
| 5994 | 'required': ['config'], |
| 5995 | 'type': 'object'}, |
| 5996 | 'NotifyWatchResult': {'additionalProperties': False, |
| 5997 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 5998 | 'error': {'$ref': '#/definitions/Error'}}, |
| 5999 | 'required': ['NotifyWatcherId'], |
| 6000 | 'type': 'object'}, |
| 6001 | 'NotifyWatchResults': {'additionalProperties': False, |
| 6002 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 6003 | 'type': 'array'}}, |
| 6004 | 'required': ['results'], |
| 6005 | 'type': 'object'}, |
| 6006 | 'SetStatus': {'additionalProperties': False, |
| 6007 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, |
| 6008 | 'type': 'array'}}, |
| 6009 | 'required': ['entities'], |
| 6010 | 'type': 'object'}, |
| 6011 | 'UndertakerModelInfo': {'additionalProperties': False, |
| 6012 | 'properties': {'global-name': {'type': 'string'}, |
| 6013 | 'is-system': {'type': 'boolean'}, |
| 6014 | 'life': {'type': 'string'}, |
| 6015 | 'name': {'type': 'string'}, |
| 6016 | 'uuid': {'type': 'string'}}, |
| 6017 | 'required': ['uuid', |
| 6018 | 'name', |
| 6019 | 'global-name', |
| 6020 | 'is-system', |
| 6021 | 'life'], |
| 6022 | 'type': 'object'}, |
| 6023 | 'UndertakerModelInfoResult': {'additionalProperties': False, |
| 6024 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 6025 | 'result': {'$ref': '#/definitions/UndertakerModelInfo'}}, |
| 6026 | 'required': ['result'], |
| 6027 | 'type': 'object'}}, |
| 6028 | 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, |
| 6029 | 'type': 'object'}, |
| 6030 | 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}}, |
| 6031 | 'type': 'object'}, |
| 6032 | 'ProcessDyingModel': {'type': 'object'}, |
| 6033 | 'RemoveModel': {'type': 'object'}, |
| 6034 | 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 6035 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6036 | 'type': 'object'}, |
| 6037 | 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 6038 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6039 | 'type': 'object'}, |
| 6040 | 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 6041 | 'type': 'object'}}, |
| 6042 | 'type': 'object'} |
| 6043 | |
| 6044 | |
| 6045 | @ReturnMapping(ModelConfigResult) |
| 6046 | async def ModelConfig(self): |
| 6047 | ''' |
| 6048 | |
| 6049 | Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any] |
| 6050 | ''' |
| 6051 | # map input types to rpc msg |
| 6052 | _params = dict() |
| 6053 | msg = dict(type='Undertaker', request='ModelConfig', version=1, params=_params) |
| 6054 | |
| 6055 | reply = await self.rpc(msg) |
| 6056 | return reply |
| 6057 | |
| 6058 | |
| 6059 | |
| 6060 | @ReturnMapping(UndertakerModelInfoResult) |
| 6061 | async def ModelInfo(self): |
| 6062 | ''' |
| 6063 | |
| 6064 | Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')] |
| 6065 | ''' |
| 6066 | # map input types to rpc msg |
| 6067 | _params = dict() |
| 6068 | msg = dict(type='Undertaker', request='ModelInfo', version=1, params=_params) |
| 6069 | |
| 6070 | reply = await self.rpc(msg) |
| 6071 | return reply |
| 6072 | |
| 6073 | |
| 6074 | |
| 6075 | @ReturnMapping(None) |
| 6076 | async def ProcessDyingModel(self): |
| 6077 | ''' |
| 6078 | |
| 6079 | Returns -> None |
| 6080 | ''' |
| 6081 | # map input types to rpc msg |
| 6082 | _params = dict() |
| 6083 | msg = dict(type='Undertaker', request='ProcessDyingModel', version=1, params=_params) |
| 6084 | |
| 6085 | reply = await self.rpc(msg) |
| 6086 | return reply |
| 6087 | |
| 6088 | |
| 6089 | |
| 6090 | @ReturnMapping(None) |
| 6091 | async def RemoveModel(self): |
| 6092 | ''' |
| 6093 | |
| 6094 | Returns -> None |
| 6095 | ''' |
| 6096 | # map input types to rpc msg |
| 6097 | _params = dict() |
| 6098 | msg = dict(type='Undertaker', request='RemoveModel', version=1, params=_params) |
| 6099 | |
| 6100 | reply = await self.rpc(msg) |
| 6101 | return reply |
| 6102 | |
| 6103 | |
| 6104 | |
| 6105 | @ReturnMapping(ErrorResults) |
| 6106 | async def SetStatus(self, entities): |
| 6107 | ''' |
| 6108 | entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> |
| 6109 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 6110 | ''' |
| 6111 | # map input types to rpc msg |
| 6112 | _params = dict() |
| 6113 | msg = dict(type='Undertaker', request='SetStatus', version=1, params=_params) |
| 6114 | _params['entities'] = entities |
| 6115 | reply = await self.rpc(msg) |
| 6116 | return reply |
| 6117 | |
| 6118 | |
| 6119 | |
| 6120 | @ReturnMapping(ErrorResults) |
| 6121 | async def UpdateStatus(self, entities): |
| 6122 | ''' |
| 6123 | entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> |
| 6124 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 6125 | ''' |
| 6126 | # map input types to rpc msg |
| 6127 | _params = dict() |
| 6128 | msg = dict(type='Undertaker', request='UpdateStatus', version=1, params=_params) |
| 6129 | _params['entities'] = entities |
| 6130 | reply = await self.rpc(msg) |
| 6131 | return reply |
| 6132 | |
| 6133 | |
| 6134 | |
| 6135 | @ReturnMapping(NotifyWatchResults) |
| 6136 | async def WatchModelResources(self): |
| 6137 | ''' |
| 6138 | |
| 6139 | Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> |
| 6140 | ''' |
| 6141 | # map input types to rpc msg |
| 6142 | _params = dict() |
| 6143 | msg = dict(type='Undertaker', request='WatchModelResources', version=1, params=_params) |
| 6144 | |
| 6145 | reply = await self.rpc(msg) |
| 6146 | return reply |
| 6147 | |
| 6148 | |
| 6149 | |
| 6150 | class UnitAssignerFacade(Type): |
| 6151 | name = 'UnitAssigner' |
| 6152 | version = 1 |
| 6153 | schema = {'definitions': {'Entities': {'additionalProperties': False, |
| 6154 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 6155 | 'type': 'array'}}, |
| 6156 | 'required': ['entities'], |
| 6157 | 'type': 'object'}, |
| 6158 | 'Entity': {'additionalProperties': False, |
| 6159 | 'properties': {'tag': {'type': 'string'}}, |
| 6160 | 'required': ['tag'], |
| 6161 | 'type': 'object'}, |
| 6162 | 'EntityStatusArgs': {'additionalProperties': False, |
| 6163 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 6164 | 'type': 'object'}}, |
| 6165 | 'type': 'object'}, |
| 6166 | 'info': {'type': 'string'}, |
| 6167 | 'status': {'type': 'string'}, |
| 6168 | 'tag': {'type': 'string'}}, |
| 6169 | 'required': ['tag', |
| 6170 | 'status', |
| 6171 | 'info', |
| 6172 | 'data'], |
| 6173 | 'type': 'object'}, |
| 6174 | 'Error': {'additionalProperties': False, |
| 6175 | 'properties': {'code': {'type': 'string'}, |
| 6176 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 6177 | 'message': {'type': 'string'}}, |
| 6178 | 'required': ['message', 'code'], |
| 6179 | 'type': 'object'}, |
| 6180 | 'ErrorInfo': {'additionalProperties': False, |
| 6181 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 6182 | 'macaroon-path': {'type': 'string'}}, |
| 6183 | 'type': 'object'}, |
| 6184 | 'ErrorResult': {'additionalProperties': False, |
| 6185 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 6186 | 'type': 'object'}, |
| 6187 | 'ErrorResults': {'additionalProperties': False, |
| 6188 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 6189 | 'type': 'array'}}, |
| 6190 | 'required': ['results'], |
| 6191 | 'type': 'object'}, |
| 6192 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 6193 | 'SetStatus': {'additionalProperties': False, |
| 6194 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, |
| 6195 | 'type': 'array'}}, |
| 6196 | 'required': ['entities'], |
| 6197 | 'type': 'object'}, |
| 6198 | 'StringsWatchResult': {'additionalProperties': False, |
| 6199 | 'properties': {'changes': {'items': {'type': 'string'}, |
| 6200 | 'type': 'array'}, |
| 6201 | 'error': {'$ref': '#/definitions/Error'}, |
| 6202 | 'watcher-id': {'type': 'string'}}, |
| 6203 | 'required': ['watcher-id'], |
| 6204 | 'type': 'object'}}, |
| 6205 | 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6206 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6207 | 'type': 'object'}, |
| 6208 | 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 6209 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6210 | 'type': 'object'}, |
| 6211 | 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, |
| 6212 | 'type': 'object'}}, |
| 6213 | 'type': 'object'} |
| 6214 | |
| 6215 | |
| 6216 | @ReturnMapping(ErrorResults) |
| 6217 | async def AssignUnits(self, entities): |
| 6218 | ''' |
| 6219 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 6220 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 6221 | ''' |
| 6222 | # map input types to rpc msg |
| 6223 | _params = dict() |
| 6224 | msg = dict(type='UnitAssigner', request='AssignUnits', version=1, params=_params) |
| 6225 | _params['entities'] = entities |
| 6226 | reply = await self.rpc(msg) |
| 6227 | return reply |
| 6228 | |
| 6229 | |
| 6230 | |
| 6231 | @ReturnMapping(ErrorResults) |
| 6232 | async def SetAgentStatus(self, entities): |
| 6233 | ''' |
| 6234 | entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> |
| 6235 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 6236 | ''' |
| 6237 | # map input types to rpc msg |
| 6238 | _params = dict() |
| 6239 | msg = dict(type='UnitAssigner', request='SetAgentStatus', version=1, params=_params) |
| 6240 | _params['entities'] = entities |
| 6241 | reply = await self.rpc(msg) |
| 6242 | return reply |
| 6243 | |
| 6244 | |
| 6245 | |
| 6246 | @ReturnMapping(StringsWatchResult) |
| 6247 | async def WatchUnitAssignments(self): |
| 6248 | ''' |
| 6249 | |
| 6250 | Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')] |
| 6251 | ''' |
| 6252 | # map input types to rpc msg |
| 6253 | _params = dict() |
| 6254 | msg = dict(type='UnitAssigner', request='WatchUnitAssignments', version=1, params=_params) |
| 6255 | |
| 6256 | reply = await self.rpc(msg) |
| 6257 | return reply |
| 6258 | |
| 6259 | |
| 6260 | |
| 6261 | class UpgraderFacade(Type): |
| 6262 | name = 'Upgrader' |
| 6263 | version = 1 |
| 6264 | schema = {'definitions': {'Binary': {'additionalProperties': False, |
| 6265 | 'properties': {'Arch': {'type': 'string'}, |
| 6266 | 'Number': {'$ref': '#/definitions/Number'}, |
| 6267 | 'Series': {'type': 'string'}}, |
| 6268 | 'required': ['Number', 'Series', 'Arch'], |
| 6269 | 'type': 'object'}, |
| 6270 | 'Entities': {'additionalProperties': False, |
| 6271 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 6272 | 'type': 'array'}}, |
| 6273 | 'required': ['entities'], |
| 6274 | 'type': 'object'}, |
| 6275 | 'EntitiesVersion': {'additionalProperties': False, |
| 6276 | 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'}, |
| 6277 | 'type': 'array'}}, |
| 6278 | 'required': ['agent-tools'], |
| 6279 | 'type': 'object'}, |
| 6280 | 'Entity': {'additionalProperties': False, |
| 6281 | 'properties': {'tag': {'type': 'string'}}, |
| 6282 | 'required': ['tag'], |
| 6283 | 'type': 'object'}, |
| 6284 | 'EntityVersion': {'additionalProperties': False, |
| 6285 | 'properties': {'tag': {'type': 'string'}, |
| 6286 | 'tools': {'$ref': '#/definitions/Version'}}, |
| 6287 | 'required': ['tag', 'tools'], |
| 6288 | 'type': 'object'}, |
| 6289 | 'Error': {'additionalProperties': False, |
| 6290 | 'properties': {'code': {'type': 'string'}, |
| 6291 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 6292 | 'message': {'type': 'string'}}, |
| 6293 | 'required': ['message', 'code'], |
| 6294 | 'type': 'object'}, |
| 6295 | 'ErrorInfo': {'additionalProperties': False, |
| 6296 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 6297 | 'macaroon-path': {'type': 'string'}}, |
| 6298 | 'type': 'object'}, |
| 6299 | 'ErrorResult': {'additionalProperties': False, |
| 6300 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 6301 | 'type': 'object'}, |
| 6302 | 'ErrorResults': {'additionalProperties': False, |
| 6303 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 6304 | 'type': 'array'}}, |
| 6305 | 'required': ['results'], |
| 6306 | 'type': 'object'}, |
| 6307 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 6308 | 'NotifyWatchResult': {'additionalProperties': False, |
| 6309 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 6310 | 'error': {'$ref': '#/definitions/Error'}}, |
| 6311 | 'required': ['NotifyWatcherId'], |
| 6312 | 'type': 'object'}, |
| 6313 | 'NotifyWatchResults': {'additionalProperties': False, |
| 6314 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 6315 | 'type': 'array'}}, |
| 6316 | 'required': ['results'], |
| 6317 | 'type': 'object'}, |
| 6318 | 'Number': {'additionalProperties': False, |
| 6319 | 'properties': {'Build': {'type': 'integer'}, |
| 6320 | 'Major': {'type': 'integer'}, |
| 6321 | 'Minor': {'type': 'integer'}, |
| 6322 | 'Patch': {'type': 'integer'}, |
| 6323 | 'Tag': {'type': 'string'}}, |
| 6324 | 'required': ['Major', |
| 6325 | 'Minor', |
| 6326 | 'Tag', |
| 6327 | 'Patch', |
| 6328 | 'Build'], |
| 6329 | 'type': 'object'}, |
| 6330 | 'Tools': {'additionalProperties': False, |
| 6331 | 'properties': {'sha256': {'type': 'string'}, |
| 6332 | 'size': {'type': 'integer'}, |
| 6333 | 'url': {'type': 'string'}, |
| 6334 | 'version': {'$ref': '#/definitions/Binary'}}, |
| 6335 | 'required': ['version', 'url', 'size'], |
| 6336 | 'type': 'object'}, |
| 6337 | 'ToolsResult': {'additionalProperties': False, |
| 6338 | 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'}, |
| 6339 | 'error': {'$ref': '#/definitions/Error'}, |
| 6340 | 'tools': {'items': {'$ref': '#/definitions/Tools'}, |
| 6341 | 'type': 'array'}}, |
| 6342 | 'required': ['tools', |
| 6343 | 'disable-ssl-hostname-verification'], |
| 6344 | 'type': 'object'}, |
| 6345 | 'ToolsResults': {'additionalProperties': False, |
| 6346 | 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'}, |
| 6347 | 'type': 'array'}}, |
| 6348 | 'required': ['results'], |
| 6349 | 'type': 'object'}, |
| 6350 | 'Version': {'additionalProperties': False, |
| 6351 | 'properties': {'version': {'$ref': '#/definitions/Binary'}}, |
| 6352 | 'required': ['version'], |
| 6353 | 'type': 'object'}, |
| 6354 | 'VersionResult': {'additionalProperties': False, |
| 6355 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 6356 | 'version': {'$ref': '#/definitions/Number'}}, |
| 6357 | 'type': 'object'}, |
| 6358 | 'VersionResults': {'additionalProperties': False, |
| 6359 | 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'}, |
| 6360 | 'type': 'array'}}, |
| 6361 | 'required': ['results'], |
| 6362 | 'type': 'object'}}, |
| 6363 | 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6364 | 'Result': {'$ref': '#/definitions/VersionResults'}}, |
| 6365 | 'type': 'object'}, |
| 6366 | 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'}, |
| 6367 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6368 | 'type': 'object'}, |
| 6369 | 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6370 | 'Result': {'$ref': '#/definitions/ToolsResults'}}, |
| 6371 | 'type': 'object'}, |
| 6372 | 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6373 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 6374 | 'type': 'object'}}, |
| 6375 | 'type': 'object'} |
| 6376 | |
| 6377 | |
| 6378 | @ReturnMapping(VersionResults) |
| 6379 | async def DesiredVersion(self, entities): |
| 6380 | ''' |
| 6381 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 6382 | Returns -> typing.Sequence<+T_co>[~VersionResult]<~VersionResult> |
| 6383 | ''' |
| 6384 | # map input types to rpc msg |
| 6385 | _params = dict() |
| 6386 | msg = dict(type='Upgrader', request='DesiredVersion', version=1, params=_params) |
| 6387 | _params['entities'] = entities |
| 6388 | reply = await self.rpc(msg) |
| 6389 | return reply |
| 6390 | |
| 6391 | |
| 6392 | |
| 6393 | @ReturnMapping(ErrorResults) |
| 6394 | async def SetTools(self, agent_tools): |
| 6395 | ''' |
| 6396 | agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion> |
| 6397 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 6398 | ''' |
| 6399 | # map input types to rpc msg |
| 6400 | _params = dict() |
| 6401 | msg = dict(type='Upgrader', request='SetTools', version=1, params=_params) |
| 6402 | _params['agent-tools'] = agent_tools |
| 6403 | reply = await self.rpc(msg) |
| 6404 | return reply |
| 6405 | |
| 6406 | |
| 6407 | |
| 6408 | @ReturnMapping(ToolsResults) |
| 6409 | async def Tools(self, entities): |
| 6410 | ''' |
| 6411 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 6412 | Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult> |
| 6413 | ''' |
| 6414 | # map input types to rpc msg |
| 6415 | _params = dict() |
| 6416 | msg = dict(type='Upgrader', request='Tools', version=1, params=_params) |
| 6417 | _params['entities'] = entities |
| 6418 | reply = await self.rpc(msg) |
| 6419 | return reply |
| 6420 | |
| 6421 | |
| 6422 | |
| 6423 | @ReturnMapping(NotifyWatchResults) |
| 6424 | async def WatchAPIVersion(self, entities): |
| 6425 | ''' |
| 6426 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 6427 | Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> |
| 6428 | ''' |
| 6429 | # map input types to rpc msg |
| 6430 | _params = dict() |
| 6431 | msg = dict(type='Upgrader', request='WatchAPIVersion', version=1, params=_params) |
| 6432 | _params['entities'] = entities |
| 6433 | reply = await self.rpc(msg) |
| 6434 | return reply |
| 6435 | |
| 6436 | |
| 6437 | |
| 6438 | class UserManagerFacade(Type): |
| 6439 | name = 'UserManager' |
| 6440 | version = 1 |
| 6441 | schema = {'definitions': {'AddUser': {'additionalProperties': False, |
| 6442 | 'properties': {'display-name': {'type': 'string'}, |
| 6443 | 'password': {'type': 'string'}, |
| 6444 | 'username': {'type': 'string'}}, |
| 6445 | 'required': ['username', 'display-name'], |
| 6446 | 'type': 'object'}, |
| 6447 | 'AddUserResult': {'additionalProperties': False, |
| 6448 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 6449 | 'secret-key': {'items': {'type': 'integer'}, |
| 6450 | 'type': 'array'}, |
| 6451 | 'tag': {'type': 'string'}}, |
| 6452 | 'type': 'object'}, |
| 6453 | 'AddUserResults': {'additionalProperties': False, |
| 6454 | 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'}, |
| 6455 | 'type': 'array'}}, |
| 6456 | 'required': ['results'], |
| 6457 | 'type': 'object'}, |
| 6458 | 'AddUsers': {'additionalProperties': False, |
| 6459 | 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'}, |
| 6460 | 'type': 'array'}}, |
| 6461 | 'required': ['users'], |
| 6462 | 'type': 'object'}, |
| 6463 | 'Entities': {'additionalProperties': False, |
| 6464 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 6465 | 'type': 'array'}}, |
| 6466 | 'required': ['entities'], |
| 6467 | 'type': 'object'}, |
| 6468 | 'Entity': {'additionalProperties': False, |
| 6469 | 'properties': {'tag': {'type': 'string'}}, |
| 6470 | 'required': ['tag'], |
| 6471 | 'type': 'object'}, |
| 6472 | 'EntityPassword': {'additionalProperties': False, |
| 6473 | 'properties': {'password': {'type': 'string'}, |
| 6474 | 'tag': {'type': 'string'}}, |
| 6475 | 'required': ['tag', 'password'], |
| 6476 | 'type': 'object'}, |
| 6477 | 'EntityPasswords': {'additionalProperties': False, |
| 6478 | 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'}, |
| 6479 | 'type': 'array'}}, |
| 6480 | 'required': ['changes'], |
| 6481 | 'type': 'object'}, |
| 6482 | 'Error': {'additionalProperties': False, |
| 6483 | 'properties': {'code': {'type': 'string'}, |
| 6484 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 6485 | 'message': {'type': 'string'}}, |
| 6486 | 'required': ['message', 'code'], |
| 6487 | 'type': 'object'}, |
| 6488 | 'ErrorInfo': {'additionalProperties': False, |
| 6489 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 6490 | 'macaroon-path': {'type': 'string'}}, |
| 6491 | 'type': 'object'}, |
| 6492 | 'ErrorResult': {'additionalProperties': False, |
| 6493 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 6494 | 'type': 'object'}, |
| 6495 | 'ErrorResults': {'additionalProperties': False, |
| 6496 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 6497 | 'type': 'array'}}, |
| 6498 | 'required': ['results'], |
| 6499 | 'type': 'object'}, |
| 6500 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 6501 | 'UserInfo': {'additionalProperties': False, |
| 6502 | 'properties': {'access': {'type': 'string'}, |
| 6503 | 'created-by': {'type': 'string'}, |
| 6504 | 'date-created': {'format': 'date-time', |
| 6505 | 'type': 'string'}, |
| 6506 | 'disabled': {'type': 'boolean'}, |
| 6507 | 'display-name': {'type': 'string'}, |
| 6508 | 'last-connection': {'format': 'date-time', |
| 6509 | 'type': 'string'}, |
| 6510 | 'username': {'type': 'string'}}, |
| 6511 | 'required': ['username', |
| 6512 | 'display-name', |
| 6513 | 'access', |
| 6514 | 'created-by', |
| 6515 | 'date-created', |
| 6516 | 'disabled'], |
| 6517 | 'type': 'object'}, |
| 6518 | 'UserInfoRequest': {'additionalProperties': False, |
| 6519 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 6520 | 'type': 'array'}, |
| 6521 | 'include-disabled': {'type': 'boolean'}}, |
| 6522 | 'required': ['entities', |
| 6523 | 'include-disabled'], |
| 6524 | 'type': 'object'}, |
| 6525 | 'UserInfoResult': {'additionalProperties': False, |
| 6526 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 6527 | 'result': {'$ref': '#/definitions/UserInfo'}}, |
| 6528 | 'type': 'object'}, |
| 6529 | 'UserInfoResults': {'additionalProperties': False, |
| 6530 | 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'}, |
| 6531 | 'type': 'array'}}, |
| 6532 | 'required': ['results'], |
| 6533 | 'type': 'object'}}, |
| 6534 | 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'}, |
| 6535 | 'Result': {'$ref': '#/definitions/AddUserResults'}}, |
| 6536 | 'type': 'object'}, |
| 6537 | 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6538 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6539 | 'type': 'object'}, |
| 6540 | 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6541 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6542 | 'type': 'object'}, |
| 6543 | 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 6544 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6545 | 'type': 'object'}, |
| 6546 | 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, |
| 6547 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 6548 | 'type': 'object'}, |
| 6549 | 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'}, |
| 6550 | 'Result': {'$ref': '#/definitions/UserInfoResults'}}, |
| 6551 | 'type': 'object'}}, |
| 6552 | 'type': 'object'} |
| 6553 | |
| 6554 | |
| 6555 | @ReturnMapping(AddUserResults) |
| 6556 | async def AddUser(self, users): |
| 6557 | ''' |
| 6558 | users : typing.Sequence<+T_co>[~AddUser]<~AddUser> |
| 6559 | Returns -> typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult> |
| 6560 | ''' |
| 6561 | # map input types to rpc msg |
| 6562 | _params = dict() |
| 6563 | msg = dict(type='UserManager', request='AddUser', version=1, params=_params) |
| 6564 | _params['users'] = users |
| 6565 | reply = await self.rpc(msg) |
| 6566 | return reply |
| 6567 | |
| 6568 | |
| 6569 | |
| 6570 | @ReturnMapping(ErrorResults) |
| 6571 | async def DisableUser(self, entities): |
| 6572 | ''' |
| 6573 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 6574 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 6575 | ''' |
| 6576 | # map input types to rpc msg |
| 6577 | _params = dict() |
| 6578 | msg = dict(type='UserManager', request='DisableUser', version=1, params=_params) |
| 6579 | _params['entities'] = entities |
| 6580 | reply = await self.rpc(msg) |
| 6581 | return reply |
| 6582 | |
| 6583 | |
| 6584 | |
| 6585 | @ReturnMapping(ErrorResults) |
| 6586 | async def EnableUser(self, entities): |
| 6587 | ''' |
| 6588 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 6589 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 6590 | ''' |
| 6591 | # map input types to rpc msg |
| 6592 | _params = dict() |
| 6593 | msg = dict(type='UserManager', request='EnableUser', version=1, params=_params) |
| 6594 | _params['entities'] = entities |
| 6595 | reply = await self.rpc(msg) |
| 6596 | return reply |
| 6597 | |
| 6598 | |
| 6599 | |
| 6600 | @ReturnMapping(ErrorResults) |
| 6601 | async def RemoveUser(self, entities): |
| 6602 | ''' |
| 6603 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 6604 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 6605 | ''' |
| 6606 | # map input types to rpc msg |
| 6607 | _params = dict() |
| 6608 | msg = dict(type='UserManager', request='RemoveUser', version=1, params=_params) |
| 6609 | _params['entities'] = entities |
| 6610 | reply = await self.rpc(msg) |
| 6611 | return reply |
| 6612 | |
| 6613 | |
| 6614 | |
| 6615 | @ReturnMapping(ErrorResults) |
| 6616 | async def SetPassword(self, changes): |
| 6617 | ''' |
| 6618 | changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword> |
| 6619 | Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> |
| 6620 | ''' |
| 6621 | # map input types to rpc msg |
| 6622 | _params = dict() |
| 6623 | msg = dict(type='UserManager', request='SetPassword', version=1, params=_params) |
| 6624 | _params['changes'] = changes |
| 6625 | reply = await self.rpc(msg) |
| 6626 | return reply |
| 6627 | |
| 6628 | |
| 6629 | |
| 6630 | @ReturnMapping(UserInfoResults) |
| 6631 | async def UserInfo(self, entities, include_disabled): |
| 6632 | ''' |
| 6633 | entities : typing.Sequence<+T_co>[~Entity]<~Entity> |
| 6634 | include_disabled : bool |
| 6635 | Returns -> typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult> |
| 6636 | ''' |
| 6637 | # map input types to rpc msg |
| 6638 | _params = dict() |
| 6639 | msg = dict(type='UserManager', request='UserInfo', version=1, params=_params) |
| 6640 | _params['entities'] = entities |
| 6641 | _params['include-disabled'] = include_disabled |
| 6642 | reply = await self.rpc(msg) |
| 6643 | return reply |