377405641787e82ec740cf476995dd8ee0cc8158
[osm/N2VC.git] / juju / client / _client1.py
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
4 from juju.client.facade import Type, ReturnMapping
5 from juju.client._definitions import *
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'],