Enhancements K8s helm connector
[osm/N2VC.git] / modules / libjuju / 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._definitions import *
5 from juju.client.facade import ReturnMapping, Type
6
7
8 class ActionPrunerFacade(Type):
9 name = 'ActionPruner'
10 version = 1
11 schema = {'definitions': {'ActionPruneArgs': {'additionalProperties': False,
12 'properties': {'max-history-mb': {'type': 'integer'},
13 'max-history-time': {'type': 'integer'}},
14 'required': ['max-history-time',
15 'max-history-mb'],
16 'type': 'object'},
17 'Error': {'additionalProperties': False,
18 'properties': {'code': {'type': 'string'},
19 'info': {'$ref': '#/definitions/ErrorInfo'},
20 'message': {'type': 'string'}},
21 'required': ['message', 'code'],
22 'type': 'object'},
23 'ErrorInfo': {'additionalProperties': False,
24 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
25 'macaroon-path': {'type': 'string'}},
26 'type': 'object'},
27 'Macaroon': {'additionalProperties': False, 'type': 'object'},
28 'ModelConfigResult': {'additionalProperties': False,
29 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
30 'type': 'object'}},
31 'type': 'object'}},
32 'required': ['config'],
33 'type': 'object'},
34 'NotifyWatchResult': {'additionalProperties': False,
35 'properties': {'NotifyWatcherId': {'type': 'string'},
36 'error': {'$ref': '#/definitions/Error'}},
37 'required': ['NotifyWatcherId'],
38 'type': 'object'}},
39 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
40 'type': 'object'},
41 'Prune': {'properties': {'Params': {'$ref': '#/definitions/ActionPruneArgs'}},
42 'type': 'object'},
43 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
44 'type': 'object'}},
45 'type': 'object'}
46
47
48 @ReturnMapping(ModelConfigResult)
49 async def ModelConfig(self):
50 '''
51
52 Returns -> typing.Mapping[str, typing.Any]
53 '''
54 # map input types to rpc msg
55 _params = dict()
56 msg = dict(type='ActionPruner',
57 request='ModelConfig',
58 version=1,
59 params=_params)
60
61 reply = await self.rpc(msg)
62 return reply
63
64
65
66 @ReturnMapping(None)
67 async def Prune(self, max_history_mb, max_history_time):
68 '''
69 max_history_mb : int
70 max_history_time : int
71 Returns -> None
72 '''
73 # map input types to rpc msg
74 _params = dict()
75 msg = dict(type='ActionPruner',
76 request='Prune',
77 version=1,
78 params=_params)
79 _params['max-history-mb'] = max_history_mb
80 _params['max-history-time'] = max_history_time
81 reply = await self.rpc(msg)
82 return reply
83
84
85
86 @ReturnMapping(NotifyWatchResult)
87 async def WatchForModelConfigChanges(self):
88 '''
89
90 Returns -> typing.Union[str, _ForwardRef('Error')]
91 '''
92 # map input types to rpc msg
93 _params = dict()
94 msg = dict(type='ActionPruner',
95 request='WatchForModelConfigChanges',
96 version=1,
97 params=_params)
98
99 reply = await self.rpc(msg)
100 return reply
101
102
103
104 class AgentToolsFacade(Type):
105 name = 'AgentTools'
106 version = 1
107 schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
108
109
110 @ReturnMapping(None)
111 async def UpdateToolsAvailable(self):
112 '''
113
114 Returns -> None
115 '''
116 # map input types to rpc msg
117 _params = dict()
118 msg = dict(type='AgentTools',
119 request='UpdateToolsAvailable',
120 version=1,
121 params=_params)
122
123 reply = await self.rpc(msg)
124 return reply
125
126
127
128 class AllWatcherFacade(Type):
129 name = 'AllWatcher'
130 version = 1
131 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
132 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
133 'type': 'array'}},
134 'required': ['deltas'],
135 'type': 'object'},
136 'Delta': {'additionalProperties': False,
137 'properties': {'entity': {'additionalProperties': True,
138 'type': 'object'},
139 'removed': {'type': 'boolean'}},
140 'required': ['removed', 'entity'],
141 'type': 'object'}},
142 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
143 'type': 'object'},
144 'Stop': {'type': 'object'}},
145 'type': 'object'}
146
147
148 @ReturnMapping(AllWatcherNextResults)
149 async def Next(self):
150 '''
151
152 Returns -> typing.Sequence[~Delta]
153 '''
154 # map input types to rpc msg
155 _params = dict()
156 msg = dict(type='AllWatcher',
157 request='Next',
158 version=1,
159 params=_params)
160
161 reply = await self.rpc(msg)
162 return reply
163
164
165
166 @ReturnMapping(None)
167 async def Stop(self):
168 '''
169
170 Returns -> None
171 '''
172 # map input types to rpc msg
173 _params = dict()
174 msg = dict(type='AllWatcher',
175 request='Stop',
176 version=1,
177 params=_params)
178
179 reply = await self.rpc(msg)
180 return reply
181
182
183
184 class ApplicationRelationsWatcherFacade(Type):
185 name = 'ApplicationRelationsWatcher'
186 version = 1
187 schema = {'definitions': {'ApplicationRelationsChange': {'additionalProperties': False,
188 'properties': {'changed': {'items': {'$ref': '#/definitions/RelationChange'},
189 'type': 'array'},
190 'removed': {'items': {'type': 'integer'},
191 'type': 'array'}},
192 'type': 'object'},
193 'ApplicationRelationsWatchResult': {'additionalProperties': False,
194 'properties': {'ApplicationRelationsWatcherId': {'type': 'string'},
195 'changes': {'$ref': '#/definitions/ApplicationRelationsChange'},
196 'error': {'$ref': '#/definitions/Error'}},
197 'required': ['ApplicationRelationsWatcherId'],
198 'type': 'object'},
199 'Error': {'additionalProperties': False,
200 'properties': {'code': {'type': 'string'},
201 'info': {'$ref': '#/definitions/ErrorInfo'},
202 'message': {'type': 'string'}},
203 'required': ['message', 'code'],
204 'type': 'object'},
205 'ErrorInfo': {'additionalProperties': False,
206 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
207 'macaroon-path': {'type': 'string'}},
208 'type': 'object'},
209 'Macaroon': {'additionalProperties': False, 'type': 'object'},
210 'RelationChange': {'additionalProperties': False,
211 'properties': {'changedunits': {'patternProperties': {'.*': {'$ref': '#/definitions/RelationUnitChange'}},
212 'type': 'object'},
213 'departedunits': {'items': {'type': 'string'},
214 'type': 'array'},
215 'id': {'type': 'integer'},
216 'life': {'type': 'string'}},
217 'required': ['id', 'life'],
218 'type': 'object'},
219 'RelationUnitChange': {'additionalProperties': False,
220 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
221 'type': 'object'}},
222 'type': 'object'}},
223 'type': 'object'}},
224 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/ApplicationRelationsWatchResult'}},
225 'type': 'object'},
226 'Stop': {'type': 'object'}},
227 'type': 'object'}
228
229
230 @ReturnMapping(ApplicationRelationsWatchResult)
231 async def Next(self):
232 '''
233
234 Returns -> typing.Union[str, _ForwardRef('ApplicationRelationsChange'), _ForwardRef('Error')]
235 '''
236 # map input types to rpc msg
237 _params = dict()
238 msg = dict(type='ApplicationRelationsWatcher',
239 request='Next',
240 version=1,
241 params=_params)
242
243 reply = await self.rpc(msg)
244 return reply
245
246
247
248 @ReturnMapping(None)
249 async def Stop(self):
250 '''
251
252 Returns -> None
253 '''
254 # map input types to rpc msg
255 _params = dict()
256 msg = dict(type='ApplicationRelationsWatcher',
257 request='Stop',
258 version=1,
259 params=_params)
260
261 reply = await self.rpc(msg)
262 return reply
263
264
265
266 class ApplicationScalerFacade(Type):
267 name = 'ApplicationScaler'
268 version = 1
269 schema = {'definitions': {'Entities': {'additionalProperties': False,
270 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
271 'type': 'array'}},
272 'required': ['entities'],
273 'type': 'object'},
274 'Entity': {'additionalProperties': False,
275 'properties': {'tag': {'type': 'string'}},
276 'required': ['tag'],
277 'type': 'object'},
278 'Error': {'additionalProperties': False,
279 'properties': {'code': {'type': 'string'},
280 'info': {'$ref': '#/definitions/ErrorInfo'},
281 'message': {'type': 'string'}},
282 'required': ['message', 'code'],
283 'type': 'object'},
284 'ErrorInfo': {'additionalProperties': False,
285 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
286 'macaroon-path': {'type': 'string'}},
287 'type': 'object'},
288 'ErrorResult': {'additionalProperties': False,
289 'properties': {'error': {'$ref': '#/definitions/Error'}},
290 'type': 'object'},
291 'ErrorResults': {'additionalProperties': False,
292 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
293 'type': 'array'}},
294 'required': ['results'],
295 'type': 'object'},
296 'Macaroon': {'additionalProperties': False, 'type': 'object'},
297 'StringsWatchResult': {'additionalProperties': False,
298 'properties': {'changes': {'items': {'type': 'string'},
299 'type': 'array'},
300 'error': {'$ref': '#/definitions/Error'},
301 'watcher-id': {'type': 'string'}},
302 'required': ['watcher-id'],
303 'type': 'object'}},
304 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
305 'Result': {'$ref': '#/definitions/ErrorResults'}},
306 'type': 'object'},
307 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
308 'type': 'object'}},
309 'type': 'object'}
310
311
312 @ReturnMapping(ErrorResults)
313 async def Rescale(self, entities):
314 '''
315 entities : typing.Sequence[~Entity]
316 Returns -> typing.Sequence[~ErrorResult]
317 '''
318 # map input types to rpc msg
319 _params = dict()
320 msg = dict(type='ApplicationScaler',
321 request='Rescale',
322 version=1,
323 params=_params)
324 _params['entities'] = entities
325 reply = await self.rpc(msg)
326 return reply
327
328
329
330 @ReturnMapping(StringsWatchResult)
331 async def Watch(self):
332 '''
333
334 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
335 '''
336 # map input types to rpc msg
337 _params = dict()
338 msg = dict(type='ApplicationScaler',
339 request='Watch',
340 version=1,
341 params=_params)
342
343 reply = await self.rpc(msg)
344 return reply
345
346
347
348 class BackupsFacade(Type):
349 name = 'Backups'
350 version = 1
351 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
352 'properties': {'notes': {'type': 'string'}},
353 'required': ['notes'],
354 'type': 'object'},
355 'BackupsInfoArgs': {'additionalProperties': False,
356 'properties': {'id': {'type': 'string'}},
357 'required': ['id'],
358 'type': 'object'},
359 'BackupsListArgs': {'additionalProperties': False,
360 'type': 'object'},
361 'BackupsListResult': {'additionalProperties': False,
362 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
363 'type': 'array'}},
364 'required': ['list'],
365 'type': 'object'},
366 'BackupsMetadataResult': {'additionalProperties': False,
367 'properties': {'ca-cert': {'type': 'string'},
368 'ca-private-key': {'type': 'string'},
369 'checksum': {'type': 'string'},
370 'checksum-format': {'type': 'string'},
371 'finished': {'format': 'date-time',
372 'type': 'string'},
373 'hostname': {'type': 'string'},
374 'id': {'type': 'string'},
375 'machine': {'type': 'string'},
376 'model': {'type': 'string'},
377 'notes': {'type': 'string'},
378 'series': {'type': 'string'},
379 'size': {'type': 'integer'},
380 'started': {'format': 'date-time',
381 'type': 'string'},
382 'stored': {'format': 'date-time',
383 'type': 'string'},
384 'version': {'$ref': '#/definitions/Number'}},
385 'required': ['id',
386 'checksum',
387 'checksum-format',
388 'size',
389 'stored',
390 'started',
391 'finished',
392 'notes',
393 'model',
394 'machine',
395 'hostname',
396 'version',
397 'series',
398 'ca-cert',
399 'ca-private-key'],
400 'type': 'object'},
401 'BackupsRemoveArgs': {'additionalProperties': False,
402 'properties': {'id': {'type': 'string'}},
403 'required': ['id'],
404 'type': 'object'},
405 'Number': {'additionalProperties': False,
406 'properties': {'Build': {'type': 'integer'},
407 'Major': {'type': 'integer'},
408 'Minor': {'type': 'integer'},
409 'Patch': {'type': 'integer'},
410 'Tag': {'type': 'string'}},
411 'required': ['Major',
412 'Minor',
413 'Tag',
414 'Patch',
415 'Build'],
416 'type': 'object'},
417 'RestoreArgs': {'additionalProperties': False,
418 'properties': {'backup-id': {'type': 'string'}},
419 'required': ['backup-id'],
420 'type': 'object'}},
421 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
422 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
423 'type': 'object'},
424 'FinishRestore': {'type': 'object'},
425 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
426 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
427 'type': 'object'},
428 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
429 'Result': {'$ref': '#/definitions/BackupsListResult'}},
430 'type': 'object'},
431 'PrepareRestore': {'type': 'object'},
432 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
433 'type': 'object'},
434 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
435 'type': 'object'}},
436 'type': 'object'}
437
438
439 @ReturnMapping(BackupsMetadataResult)
440 async def Create(self, notes):
441 '''
442 notes : str
443 Returns -> typing.Union[str, int, _ForwardRef('Number')]
444 '''
445 # map input types to rpc msg
446 _params = dict()
447 msg = dict(type='Backups',
448 request='Create',
449 version=1,
450 params=_params)
451 _params['notes'] = notes
452 reply = await self.rpc(msg)
453 return reply
454
455
456
457 @ReturnMapping(None)
458 async def FinishRestore(self):
459 '''
460
461 Returns -> None
462 '''
463 # map input types to rpc msg
464 _params = dict()
465 msg = dict(type='Backups',
466 request='FinishRestore',
467 version=1,
468 params=_params)
469
470 reply = await self.rpc(msg)
471 return reply
472
473
474
475 @ReturnMapping(BackupsMetadataResult)
476 async def Info(self, id_):
477 '''
478 id_ : str
479 Returns -> typing.Union[str, int, _ForwardRef('Number')]
480 '''
481 # map input types to rpc msg
482 _params = dict()
483 msg = dict(type='Backups',
484 request='Info',
485 version=1,
486 params=_params)
487 _params['id'] = id_
488 reply = await self.rpc(msg)
489 return reply
490
491
492
493 @ReturnMapping(BackupsListResult)
494 async def List(self):
495 '''
496
497 Returns -> typing.Sequence[~BackupsMetadataResult]
498 '''
499 # map input types to rpc msg
500 _params = dict()
501 msg = dict(type='Backups',
502 request='List',
503 version=1,
504 params=_params)
505
506 reply = await self.rpc(msg)
507 return reply
508
509
510
511 @ReturnMapping(None)
512 async def PrepareRestore(self):
513 '''
514
515 Returns -> None
516 '''
517 # map input types to rpc msg
518 _params = dict()
519 msg = dict(type='Backups',
520 request='PrepareRestore',
521 version=1,
522 params=_params)
523
524 reply = await self.rpc(msg)
525 return reply
526
527
528
529 @ReturnMapping(None)
530 async def Remove(self, id_):
531 '''
532 id_ : str
533 Returns -> None
534 '''
535 # map input types to rpc msg
536 _params = dict()
537 msg = dict(type='Backups',
538 request='Remove',
539 version=1,
540 params=_params)
541 _params['id'] = id_
542 reply = await self.rpc(msg)
543 return reply
544
545
546
547 @ReturnMapping(None)
548 async def Restore(self, backup_id):
549 '''
550 backup_id : str
551 Returns -> None
552 '''
553 # map input types to rpc msg
554 _params = dict()
555 msg = dict(type='Backups',
556 request='Restore',
557 version=1,
558 params=_params)
559 _params['backup-id'] = backup_id
560 reply = await self.rpc(msg)
561 return reply
562
563
564
565 class BundleFacade(Type):
566 name = 'Bundle'
567 version = 1
568 schema = {'definitions': {'BundleChange': {'additionalProperties': False,
569 'properties': {'args': {'items': {'additionalProperties': True,
570 'type': 'object'},
571 'type': 'array'},
572 'id': {'type': 'string'},
573 'method': {'type': 'string'},
574 'requires': {'items': {'type': 'string'},
575 'type': 'array'}},
576 'required': ['id',
577 'method',
578 'args',
579 'requires'],
580 'type': 'object'},
581 'BundleChangesParams': {'additionalProperties': False,
582 'properties': {'yaml': {'type': 'string'}},
583 'required': ['yaml'],
584 'type': 'object'},
585 'BundleChangesResults': {'additionalProperties': False,
586 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
587 'type': 'array'},
588 'errors': {'items': {'type': 'string'},
589 'type': 'array'}},
590 'type': 'object'}},
591 'properties': {'GetChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
592 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
593 'type': 'object'}},
594 'type': 'object'}
595
596
597 @ReturnMapping(BundleChangesResults)
598 async def GetChanges(self, yaml):
599 '''
600 yaml : str
601 Returns -> typing.Union[typing.Sequence[~BundleChange], typing.Sequence[str]]
602 '''
603 # map input types to rpc msg
604 _params = dict()
605 msg = dict(type='Bundle',
606 request='GetChanges',
607 version=1,
608 params=_params)
609 _params['yaml'] = yaml
610 reply = await self.rpc(msg)
611 return reply
612
613
614
615 class CAASAgentFacade(Type):
616 name = 'CAASAgent'
617 version = 1
618 schema = {'definitions': {'CloudCredential': {'additionalProperties': False,
619 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
620 'type': 'object'},
621 'auth-type': {'type': 'string'},
622 'redacted': {'items': {'type': 'string'},
623 'type': 'array'}},
624 'required': ['auth-type'],
625 'type': 'object'},
626 'CloudSpec': {'additionalProperties': False,
627 'properties': {'cacertificates': {'items': {'type': 'string'},
628 'type': 'array'},
629 'credential': {'$ref': '#/definitions/CloudCredential'},
630 'endpoint': {'type': 'string'},
631 'identity-endpoint': {'type': 'string'},
632 'name': {'type': 'string'},
633 'region': {'type': 'string'},
634 'storage-endpoint': {'type': 'string'},
635 'type': {'type': 'string'}},
636 'required': ['type', 'name'],
637 'type': 'object'},
638 'CloudSpecResult': {'additionalProperties': False,
639 'properties': {'error': {'$ref': '#/definitions/Error'},
640 'result': {'$ref': '#/definitions/CloudSpec'}},
641 'type': 'object'},
642 'CloudSpecResults': {'additionalProperties': False,
643 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
644 'type': 'array'}},
645 'type': 'object'},
646 'Entities': {'additionalProperties': False,
647 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
648 'type': 'array'}},
649 'required': ['entities'],
650 'type': 'object'},
651 'Entity': {'additionalProperties': False,
652 'properties': {'tag': {'type': 'string'}},
653 'required': ['tag'],
654 'type': 'object'},
655 'Error': {'additionalProperties': False,
656 'properties': {'code': {'type': 'string'},
657 'info': {'$ref': '#/definitions/ErrorInfo'},
658 'message': {'type': 'string'}},
659 'required': ['message', 'code'],
660 'type': 'object'},
661 'ErrorInfo': {'additionalProperties': False,
662 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
663 'macaroon-path': {'type': 'string'}},
664 'type': 'object'},
665 'Macaroon': {'additionalProperties': False, 'type': 'object'},
666 'ModelConfigResult': {'additionalProperties': False,
667 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
668 'type': 'object'}},
669 'type': 'object'}},
670 'required': ['config'],
671 'type': 'object'},
672 'ModelTag': {'additionalProperties': False, 'type': 'object'},
673 'NotifyWatchResult': {'additionalProperties': False,
674 'properties': {'NotifyWatcherId': {'type': 'string'},
675 'error': {'$ref': '#/definitions/Error'}},
676 'required': ['NotifyWatcherId'],
677 'type': 'object'}},
678 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
679 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
680 'type': 'object'},
681 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
682 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
683 'type': 'object'},
684 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
685 'type': 'object'},
686 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
687 'type': 'object'}},
688 'type': 'object'}
689
690
691 @ReturnMapping(CloudSpecResults)
692 async def CloudSpec(self, entities):
693 '''
694 entities : typing.Sequence[~Entity]
695 Returns -> typing.Sequence[~CloudSpecResult]
696 '''
697 # map input types to rpc msg
698 _params = dict()
699 msg = dict(type='CAASAgent',
700 request='CloudSpec',
701 version=1,
702 params=_params)
703 _params['entities'] = entities
704 reply = await self.rpc(msg)
705 return reply
706
707
708
709 @ReturnMapping(CloudSpecResult)
710 async def GetCloudSpec(self):
711 '''
712
713 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
714 '''
715 # map input types to rpc msg
716 _params = dict()
717 msg = dict(type='CAASAgent',
718 request='GetCloudSpec',
719 version=1,
720 params=_params)
721
722 reply = await self.rpc(msg)
723 return reply
724
725
726
727 @ReturnMapping(ModelConfigResult)
728 async def ModelConfig(self):
729 '''
730
731 Returns -> typing.Mapping[str, typing.Any]
732 '''
733 # map input types to rpc msg
734 _params = dict()
735 msg = dict(type='CAASAgent',
736 request='ModelConfig',
737 version=1,
738 params=_params)
739
740 reply = await self.rpc(msg)
741 return reply
742
743
744
745 @ReturnMapping(NotifyWatchResult)
746 async def WatchForModelConfigChanges(self):
747 '''
748
749 Returns -> typing.Union[str, _ForwardRef('Error')]
750 '''
751 # map input types to rpc msg
752 _params = dict()
753 msg = dict(type='CAASAgent',
754 request='WatchForModelConfigChanges',
755 version=1,
756 params=_params)
757
758 reply = await self.rpc(msg)
759 return reply
760
761
762
763 class CAASFirewallerFacade(Type):
764 name = 'CAASFirewaller'
765 version = 1
766 schema = {'definitions': {'ApplicationGetConfigResults': {'additionalProperties': False,
767 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigResult'},
768 'type': 'array'}},
769 'required': ['Results'],
770 'type': 'object'},
771 'BoolResult': {'additionalProperties': False,
772 'properties': {'error': {'$ref': '#/definitions/Error'},
773 'result': {'type': 'boolean'}},
774 'required': ['result'],
775 'type': 'object'},
776 'BoolResults': {'additionalProperties': False,
777 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
778 'type': 'array'}},
779 'required': ['results'],
780 'type': 'object'},
781 'ConfigResult': {'additionalProperties': False,
782 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
783 'type': 'object'}},
784 'type': 'object'},
785 'error': {'$ref': '#/definitions/Error'}},
786 'required': ['config'],
787 'type': 'object'},
788 'Entities': {'additionalProperties': False,
789 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
790 'type': 'array'}},
791 'required': ['entities'],
792 'type': 'object'},
793 'Entity': {'additionalProperties': False,
794 'properties': {'tag': {'type': 'string'}},
795 'required': ['tag'],
796 'type': 'object'},
797 'Error': {'additionalProperties': False,
798 'properties': {'code': {'type': 'string'},
799 'info': {'$ref': '#/definitions/ErrorInfo'},
800 'message': {'type': 'string'}},
801 'required': ['message', 'code'],
802 'type': 'object'},
803 'ErrorInfo': {'additionalProperties': False,
804 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
805 'macaroon-path': {'type': 'string'}},
806 'type': 'object'},
807 'LifeResult': {'additionalProperties': False,
808 'properties': {'error': {'$ref': '#/definitions/Error'},
809 'life': {'type': 'string'}},
810 'required': ['life'],
811 'type': 'object'},
812 'LifeResults': {'additionalProperties': False,
813 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
814 'type': 'array'}},
815 'required': ['results'],
816 'type': 'object'},
817 'Macaroon': {'additionalProperties': False, 'type': 'object'},
818 'NotifyWatchResult': {'additionalProperties': False,
819 'properties': {'NotifyWatcherId': {'type': 'string'},
820 'error': {'$ref': '#/definitions/Error'}},
821 'required': ['NotifyWatcherId'],
822 'type': 'object'},
823 'NotifyWatchResults': {'additionalProperties': False,
824 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
825 'type': 'array'}},
826 'required': ['results'],
827 'type': 'object'},
828 'StringsWatchResult': {'additionalProperties': False,
829 'properties': {'changes': {'items': {'type': 'string'},
830 'type': 'array'},
831 'error': {'$ref': '#/definitions/Error'},
832 'watcher-id': {'type': 'string'}},
833 'required': ['watcher-id'],
834 'type': 'object'}},
835 'properties': {'ApplicationsConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
836 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}},
837 'type': 'object'},
838 'IsExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
839 'Result': {'$ref': '#/definitions/BoolResults'}},
840 'type': 'object'},
841 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
842 'Result': {'$ref': '#/definitions/LifeResults'}},
843 'type': 'object'},
844 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
845 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
846 'type': 'object'},
847 'WatchApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
848 'type': 'object'}},
849 'type': 'object'}
850
851
852 @ReturnMapping(ApplicationGetConfigResults)
853 async def ApplicationsConfig(self, entities):
854 '''
855 entities : typing.Sequence[~Entity]
856 Returns -> typing.Sequence[~ConfigResult]
857 '''
858 # map input types to rpc msg
859 _params = dict()
860 msg = dict(type='CAASFirewaller',
861 request='ApplicationsConfig',
862 version=1,
863 params=_params)
864 _params['entities'] = entities
865 reply = await self.rpc(msg)
866 return reply
867
868
869
870 @ReturnMapping(BoolResults)
871 async def IsExposed(self, entities):
872 '''
873 entities : typing.Sequence[~Entity]
874 Returns -> typing.Sequence[~BoolResult]
875 '''
876 # map input types to rpc msg
877 _params = dict()
878 msg = dict(type='CAASFirewaller',
879 request='IsExposed',
880 version=1,
881 params=_params)
882 _params['entities'] = entities
883 reply = await self.rpc(msg)
884 return reply
885
886
887
888 @ReturnMapping(LifeResults)
889 async def Life(self, entities):
890 '''
891 entities : typing.Sequence[~Entity]
892 Returns -> typing.Sequence[~LifeResult]
893 '''
894 # map input types to rpc msg
895 _params = dict()
896 msg = dict(type='CAASFirewaller',
897 request='Life',
898 version=1,
899 params=_params)
900 _params['entities'] = entities
901 reply = await self.rpc(msg)
902 return reply
903
904
905
906 @ReturnMapping(NotifyWatchResults)
907 async def Watch(self, entities):
908 '''
909 entities : typing.Sequence[~Entity]
910 Returns -> typing.Sequence[~NotifyWatchResult]
911 '''
912 # map input types to rpc msg
913 _params = dict()
914 msg = dict(type='CAASFirewaller',
915 request='Watch',
916 version=1,
917 params=_params)
918 _params['entities'] = entities
919 reply = await self.rpc(msg)
920 return reply
921
922
923
924 @ReturnMapping(StringsWatchResult)
925 async def WatchApplications(self):
926 '''
927
928 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
929 '''
930 # map input types to rpc msg
931 _params = dict()
932 msg = dict(type='CAASFirewaller',
933 request='WatchApplications',
934 version=1,
935 params=_params)
936
937 reply = await self.rpc(msg)
938 return reply
939
940
941
942 class CAASOperatorFacade(Type):
943 name = 'CAASOperator'
944 version = 1
945 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
946 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
947 'type': 'array'},
948 'type': 'array'}},
949 'required': ['servers'],
950 'type': 'object'},
951 'Address': {'additionalProperties': False,
952 'properties': {'scope': {'type': 'string'},
953 'space-name': {'type': 'string'},
954 'type': {'type': 'string'},
955 'value': {'type': 'string'}},
956 'required': ['value', 'type', 'scope'],
957 'type': 'object'},
958 'ApplicationCharm': {'additionalProperties': False,
959 'properties': {'charm-modified-version': {'type': 'integer'},
960 'force-upgrade': {'type': 'boolean'},
961 'sha256': {'type': 'string'},
962 'url': {'type': 'string'}},
963 'required': ['url',
964 'sha256',
965 'charm-modified-version'],
966 'type': 'object'},
967 'ApplicationCharmResult': {'additionalProperties': False,
968 'properties': {'error': {'$ref': '#/definitions/Error'},
969 'result': {'$ref': '#/definitions/ApplicationCharm'}},
970 'type': 'object'},
971 'ApplicationCharmResults': {'additionalProperties': False,
972 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmResult'},
973 'type': 'array'}},
974 'required': ['results'],
975 'type': 'object'},
976 'Binary': {'additionalProperties': False,
977 'properties': {'Arch': {'type': 'string'},
978 'Number': {'$ref': '#/definitions/Number'},
979 'Series': {'type': 'string'}},
980 'required': ['Number', 'Series', 'Arch'],
981 'type': 'object'},
982 'Entities': {'additionalProperties': False,
983 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
984 'type': 'array'}},
985 'required': ['entities'],
986 'type': 'object'},
987 'EntitiesVersion': {'additionalProperties': False,
988 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
989 'type': 'array'}},
990 'required': ['agent-tools'],
991 'type': 'object'},
992 'Entity': {'additionalProperties': False,
993 'properties': {'tag': {'type': 'string'}},
994 'required': ['tag'],
995 'type': 'object'},
996 'EntityStatusArgs': {'additionalProperties': False,
997 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
998 'type': 'object'}},
999 'type': 'object'},
1000 'info': {'type': 'string'},
1001 'status': {'type': 'string'},
1002 'tag': {'type': 'string'}},
1003 'required': ['tag',
1004 'status',
1005 'info',
1006 'data'],
1007 'type': 'object'},
1008 'EntityString': {'additionalProperties': False,
1009 'properties': {'tag': {'type': 'string'},
1010 'value': {'type': 'string'}},
1011 'required': ['tag', 'value'],
1012 'type': 'object'},
1013 'EntityVersion': {'additionalProperties': False,
1014 'properties': {'tag': {'type': 'string'},
1015 'tools': {'$ref': '#/definitions/Version'}},
1016 'required': ['tag', 'tools'],
1017 'type': 'object'},
1018 'Error': {'additionalProperties': False,
1019 'properties': {'code': {'type': 'string'},
1020 'info': {'$ref': '#/definitions/ErrorInfo'},
1021 'message': {'type': 'string'}},
1022 'required': ['message', 'code'],
1023 'type': 'object'},
1024 'ErrorInfo': {'additionalProperties': False,
1025 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1026 'macaroon-path': {'type': 'string'}},
1027 'type': 'object'},
1028 'ErrorResult': {'additionalProperties': False,
1029 'properties': {'error': {'$ref': '#/definitions/Error'}},
1030 'type': 'object'},
1031 'ErrorResults': {'additionalProperties': False,
1032 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1033 'type': 'array'}},
1034 'required': ['results'],
1035 'type': 'object'},
1036 'HostPort': {'additionalProperties': False,
1037 'properties': {'Address': {'$ref': '#/definitions/Address'},
1038 'port': {'type': 'integer'}},
1039 'required': ['Address', 'port'],
1040 'type': 'object'},
1041 'LifeResult': {'additionalProperties': False,
1042 'properties': {'error': {'$ref': '#/definitions/Error'},
1043 'life': {'type': 'string'}},
1044 'required': ['life'],
1045 'type': 'object'},
1046 'LifeResults': {'additionalProperties': False,
1047 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1048 'type': 'array'}},
1049 'required': ['results'],
1050 'type': 'object'},
1051 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1052 'ModelResult': {'additionalProperties': False,
1053 'properties': {'error': {'$ref': '#/definitions/Error'},
1054 'name': {'type': 'string'},
1055 'type': {'type': 'string'},
1056 'uuid': {'type': 'string'}},
1057 'required': ['name', 'uuid', 'type'],
1058 'type': 'object'},
1059 'NotifyWatchResult': {'additionalProperties': False,
1060 'properties': {'NotifyWatcherId': {'type': 'string'},
1061 'error': {'$ref': '#/definitions/Error'}},
1062 'required': ['NotifyWatcherId'],
1063 'type': 'object'},
1064 'NotifyWatchResults': {'additionalProperties': False,
1065 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1066 'type': 'array'}},
1067 'required': ['results'],
1068 'type': 'object'},
1069 'Number': {'additionalProperties': False,
1070 'properties': {'Build': {'type': 'integer'},
1071 'Major': {'type': 'integer'},
1072 'Minor': {'type': 'integer'},
1073 'Patch': {'type': 'integer'},
1074 'Tag': {'type': 'string'}},
1075 'required': ['Major',
1076 'Minor',
1077 'Tag',
1078 'Patch',
1079 'Build'],
1080 'type': 'object'},
1081 'SetPodSpecParams': {'additionalProperties': False,
1082 'properties': {'specs': {'items': {'$ref': '#/definitions/EntityString'},
1083 'type': 'array'}},
1084 'required': ['specs'],
1085 'type': 'object'},
1086 'SetStatus': {'additionalProperties': False,
1087 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1088 'type': 'array'}},
1089 'required': ['entities'],
1090 'type': 'object'},
1091 'StringResult': {'additionalProperties': False,
1092 'properties': {'error': {'$ref': '#/definitions/Error'},
1093 'result': {'type': 'string'}},
1094 'required': ['result'],
1095 'type': 'object'},
1096 'StringsResult': {'additionalProperties': False,
1097 'properties': {'error': {'$ref': '#/definitions/Error'},
1098 'result': {'items': {'type': 'string'},
1099 'type': 'array'}},
1100 'type': 'object'},
1101 'StringsWatchResult': {'additionalProperties': False,
1102 'properties': {'changes': {'items': {'type': 'string'},
1103 'type': 'array'},
1104 'error': {'$ref': '#/definitions/Error'},
1105 'watcher-id': {'type': 'string'}},
1106 'required': ['watcher-id'],
1107 'type': 'object'},
1108 'StringsWatchResults': {'additionalProperties': False,
1109 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
1110 'type': 'array'}},
1111 'required': ['results'],
1112 'type': 'object'},
1113 'Version': {'additionalProperties': False,
1114 'properties': {'version': {'$ref': '#/definitions/Binary'}},
1115 'required': ['version'],
1116 'type': 'object'}},
1117 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
1118 'type': 'object'},
1119 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
1120 'type': 'object'},
1121 'Charm': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1122 'Result': {'$ref': '#/definitions/ApplicationCharmResults'}},
1123 'type': 'object'},
1124 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
1125 'type': 'object'},
1126 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1127 'Result': {'$ref': '#/definitions/LifeResults'}},
1128 'type': 'object'},
1129 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1130 'type': 'object'},
1131 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1132 'Result': {'$ref': '#/definitions/ErrorResults'}},
1133 'type': 'object'},
1134 'SetPodSpec': {'properties': {'Params': {'$ref': '#/definitions/SetPodSpecParams'},
1135 'Result': {'$ref': '#/definitions/ErrorResults'}},
1136 'type': 'object'},
1137 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1138 'Result': {'$ref': '#/definitions/ErrorResults'}},
1139 'type': 'object'},
1140 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
1141 'Result': {'$ref': '#/definitions/ErrorResults'}},
1142 'type': 'object'},
1143 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1144 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1145 'type': 'object'},
1146 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1147 'type': 'object'},
1148 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1149 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1150 'type': 'object'}},
1151 'type': 'object'}
1152
1153
1154 @ReturnMapping(StringsResult)
1155 async def APIAddresses(self):
1156 '''
1157
1158 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
1159 '''
1160 # map input types to rpc msg
1161 _params = dict()
1162 msg = dict(type='CAASOperator',
1163 request='APIAddresses',
1164 version=1,
1165 params=_params)
1166
1167 reply = await self.rpc(msg)
1168 return reply
1169
1170
1171
1172 @ReturnMapping(APIHostPortsResult)
1173 async def APIHostPorts(self):
1174 '''
1175
1176 Returns -> typing.Sequence[~HostPort]
1177 '''
1178 # map input types to rpc msg
1179 _params = dict()
1180 msg = dict(type='CAASOperator',
1181 request='APIHostPorts',
1182 version=1,
1183 params=_params)
1184
1185 reply = await self.rpc(msg)
1186 return reply
1187
1188
1189
1190 @ReturnMapping(ApplicationCharmResults)
1191 async def Charm(self, entities):
1192 '''
1193 entities : typing.Sequence[~Entity]
1194 Returns -> typing.Sequence[~ApplicationCharmResult]
1195 '''
1196 # map input types to rpc msg
1197 _params = dict()
1198 msg = dict(type='CAASOperator',
1199 request='Charm',
1200 version=1,
1201 params=_params)
1202 _params['entities'] = entities
1203 reply = await self.rpc(msg)
1204 return reply
1205
1206
1207
1208 @ReturnMapping(ModelResult)
1209 async def CurrentModel(self):
1210 '''
1211
1212 Returns -> typing.Union[_ForwardRef('Error'), str]
1213 '''
1214 # map input types to rpc msg
1215 _params = dict()
1216 msg = dict(type='CAASOperator',
1217 request='CurrentModel',
1218 version=1,
1219 params=_params)
1220
1221 reply = await self.rpc(msg)
1222 return reply
1223
1224
1225
1226 @ReturnMapping(LifeResults)
1227 async def Life(self, entities):
1228 '''
1229 entities : typing.Sequence[~Entity]
1230 Returns -> typing.Sequence[~LifeResult]
1231 '''
1232 # map input types to rpc msg
1233 _params = dict()
1234 msg = dict(type='CAASOperator',
1235 request='Life',
1236 version=1,
1237 params=_params)
1238 _params['entities'] = entities
1239 reply = await self.rpc(msg)
1240 return reply
1241
1242
1243
1244 @ReturnMapping(StringResult)
1245 async def ModelUUID(self):
1246 '''
1247
1248 Returns -> typing.Union[_ForwardRef('Error'), str]
1249 '''
1250 # map input types to rpc msg
1251 _params = dict()
1252 msg = dict(type='CAASOperator',
1253 request='ModelUUID',
1254 version=1,
1255 params=_params)
1256
1257 reply = await self.rpc(msg)
1258 return reply
1259
1260
1261
1262 @ReturnMapping(ErrorResults)
1263 async def Remove(self, entities):
1264 '''
1265 entities : typing.Sequence[~Entity]
1266 Returns -> typing.Sequence[~ErrorResult]
1267 '''
1268 # map input types to rpc msg
1269 _params = dict()
1270 msg = dict(type='CAASOperator',
1271 request='Remove',
1272 version=1,
1273 params=_params)
1274 _params['entities'] = entities
1275 reply = await self.rpc(msg)
1276 return reply
1277
1278
1279
1280 @ReturnMapping(ErrorResults)
1281 async def SetPodSpec(self, specs):
1282 '''
1283 specs : typing.Sequence[~EntityString]
1284 Returns -> typing.Sequence[~ErrorResult]
1285 '''
1286 # map input types to rpc msg
1287 _params = dict()
1288 msg = dict(type='CAASOperator',
1289 request='SetPodSpec',
1290 version=1,
1291 params=_params)
1292 _params['specs'] = specs
1293 reply = await self.rpc(msg)
1294 return reply
1295
1296
1297
1298 @ReturnMapping(ErrorResults)
1299 async def SetStatus(self, entities):
1300 '''
1301 entities : typing.Sequence[~EntityStatusArgs]
1302 Returns -> typing.Sequence[~ErrorResult]
1303 '''
1304 # map input types to rpc msg
1305 _params = dict()
1306 msg = dict(type='CAASOperator',
1307 request='SetStatus',
1308 version=1,
1309 params=_params)
1310 _params['entities'] = entities
1311 reply = await self.rpc(msg)
1312 return reply
1313
1314
1315
1316 @ReturnMapping(ErrorResults)
1317 async def SetTools(self, agent_tools):
1318 '''
1319 agent_tools : typing.Sequence[~EntityVersion]
1320 Returns -> typing.Sequence[~ErrorResult]
1321 '''
1322 # map input types to rpc msg
1323 _params = dict()
1324 msg = dict(type='CAASOperator',
1325 request='SetTools',
1326 version=1,
1327 params=_params)
1328 _params['agent-tools'] = agent_tools
1329 reply = await self.rpc(msg)
1330 return reply
1331
1332
1333
1334 @ReturnMapping(NotifyWatchResults)
1335 async def Watch(self, entities):
1336 '''
1337 entities : typing.Sequence[~Entity]
1338 Returns -> typing.Sequence[~NotifyWatchResult]
1339 '''
1340 # map input types to rpc msg
1341 _params = dict()
1342 msg = dict(type='CAASOperator',
1343 request='Watch',
1344 version=1,
1345 params=_params)
1346 _params['entities'] = entities
1347 reply = await self.rpc(msg)
1348 return reply
1349
1350
1351
1352 @ReturnMapping(NotifyWatchResult)
1353 async def WatchAPIHostPorts(self):
1354 '''
1355
1356 Returns -> typing.Union[str, _ForwardRef('Error')]
1357 '''
1358 # map input types to rpc msg
1359 _params = dict()
1360 msg = dict(type='CAASOperator',
1361 request='WatchAPIHostPorts',
1362 version=1,
1363 params=_params)
1364
1365 reply = await self.rpc(msg)
1366 return reply
1367
1368
1369
1370 @ReturnMapping(StringsWatchResults)
1371 async def WatchUnits(self, entities):
1372 '''
1373 entities : typing.Sequence[~Entity]
1374 Returns -> typing.Sequence[~StringsWatchResult]
1375 '''
1376 # map input types to rpc msg
1377 _params = dict()
1378 msg = dict(type='CAASOperator',
1379 request='WatchUnits',
1380 version=1,
1381 params=_params)
1382 _params['entities'] = entities
1383 reply = await self.rpc(msg)
1384 return reply
1385
1386
1387
1388 class CAASOperatorProvisionerFacade(Type):
1389 name = 'CAASOperatorProvisioner'
1390 version = 1
1391 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
1392 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
1393 'type': 'array'},
1394 'type': 'array'}},
1395 'required': ['servers'],
1396 'type': 'object'},
1397 'Address': {'additionalProperties': False,
1398 'properties': {'scope': {'type': 'string'},
1399 'space-name': {'type': 'string'},
1400 'type': {'type': 'string'},
1401 'value': {'type': 'string'}},
1402 'required': ['value', 'type', 'scope'],
1403 'type': 'object'},
1404 'Entities': {'additionalProperties': False,
1405 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1406 'type': 'array'}},
1407 'required': ['entities'],
1408 'type': 'object'},
1409 'Entity': {'additionalProperties': False,
1410 'properties': {'tag': {'type': 'string'}},
1411 'required': ['tag'],
1412 'type': 'object'},
1413 'EntityPassword': {'additionalProperties': False,
1414 'properties': {'password': {'type': 'string'},
1415 'tag': {'type': 'string'}},
1416 'required': ['tag', 'password'],
1417 'type': 'object'},
1418 'EntityPasswords': {'additionalProperties': False,
1419 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
1420 'type': 'array'}},
1421 'required': ['changes'],
1422 'type': 'object'},
1423 'Error': {'additionalProperties': False,
1424 'properties': {'code': {'type': 'string'},
1425 'info': {'$ref': '#/definitions/ErrorInfo'},
1426 'message': {'type': 'string'}},
1427 'required': ['message', 'code'],
1428 'type': 'object'},
1429 'ErrorInfo': {'additionalProperties': False,
1430 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1431 'macaroon-path': {'type': 'string'}},
1432 'type': 'object'},
1433 'ErrorResult': {'additionalProperties': False,
1434 'properties': {'error': {'$ref': '#/definitions/Error'}},
1435 'type': 'object'},
1436 'ErrorResults': {'additionalProperties': False,
1437 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1438 'type': 'array'}},
1439 'required': ['results'],
1440 'type': 'object'},
1441 'HostPort': {'additionalProperties': False,
1442 'properties': {'Address': {'$ref': '#/definitions/Address'},
1443 'port': {'type': 'integer'}},
1444 'required': ['Address', 'port'],
1445 'type': 'object'},
1446 'KubernetesFilesystemAttachmentParams': {'additionalProperties': False,
1447 'properties': {'mount-point': {'type': 'string'},
1448 'provider': {'type': 'string'},
1449 'read-only': {'type': 'boolean'}},
1450 'required': ['provider'],
1451 'type': 'object'},
1452 'KubernetesFilesystemParams': {'additionalProperties': False,
1453 'properties': {'attachment': {'$ref': '#/definitions/KubernetesFilesystemAttachmentParams'},
1454 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
1455 'type': 'object'}},
1456 'type': 'object'},
1457 'provider': {'type': 'string'},
1458 'size': {'type': 'integer'},
1459 'storagename': {'type': 'string'},
1460 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1461 'type': 'object'}},
1462 'required': ['storagename',
1463 'size',
1464 'provider'],
1465 'type': 'object'},
1466 'LifeResult': {'additionalProperties': False,
1467 'properties': {'error': {'$ref': '#/definitions/Error'},
1468 'life': {'type': 'string'}},
1469 'required': ['life'],
1470 'type': 'object'},
1471 'LifeResults': {'additionalProperties': False,
1472 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1473 'type': 'array'}},
1474 'required': ['results'],
1475 'type': 'object'},
1476 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1477 'NotifyWatchResult': {'additionalProperties': False,
1478 'properties': {'NotifyWatcherId': {'type': 'string'},
1479 'error': {'$ref': '#/definitions/Error'}},
1480 'required': ['NotifyWatcherId'],
1481 'type': 'object'},
1482 'Number': {'additionalProperties': False,
1483 'properties': {'Build': {'type': 'integer'},
1484 'Major': {'type': 'integer'},
1485 'Minor': {'type': 'integer'},
1486 'Patch': {'type': 'integer'},
1487 'Tag': {'type': 'string'}},
1488 'required': ['Major',
1489 'Minor',
1490 'Tag',
1491 'Patch',
1492 'Build'],
1493 'type': 'object'},
1494 'OperatorProvisioningInfo': {'additionalProperties': False,
1495 'properties': {'api-addresses': {'items': {'type': 'string'},
1496 'type': 'array'},
1497 'charm-storage': {'$ref': '#/definitions/KubernetesFilesystemParams'},
1498 'image-path': {'type': 'string'},
1499 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1500 'type': 'object'},
1501 'version': {'$ref': '#/definitions/Number'}},
1502 'required': ['image-path',
1503 'version',
1504 'api-addresses',
1505 'charm-storage'],
1506 'type': 'object'},
1507 'StringResult': {'additionalProperties': False,
1508 'properties': {'error': {'$ref': '#/definitions/Error'},
1509 'result': {'type': 'string'}},
1510 'required': ['result'],
1511 'type': 'object'},
1512 'StringsResult': {'additionalProperties': False,
1513 'properties': {'error': {'$ref': '#/definitions/Error'},
1514 'result': {'items': {'type': 'string'},
1515 'type': 'array'}},
1516 'type': 'object'},
1517 'StringsWatchResult': {'additionalProperties': False,
1518 'properties': {'changes': {'items': {'type': 'string'},
1519 'type': 'array'},
1520 'error': {'$ref': '#/definitions/Error'},
1521 'watcher-id': {'type': 'string'}},
1522 'required': ['watcher-id'],
1523 'type': 'object'}},
1524 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
1525 'type': 'object'},
1526 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
1527 'type': 'object'},
1528 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1529 'Result': {'$ref': '#/definitions/LifeResults'}},
1530 'type': 'object'},
1531 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1532 'type': 'object'},
1533 'OperatorProvisioningInfo': {'properties': {'Result': {'$ref': '#/definitions/OperatorProvisioningInfo'}},
1534 'type': 'object'},
1535 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
1536 'Result': {'$ref': '#/definitions/ErrorResults'}},
1537 'type': 'object'},
1538 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1539 'type': 'object'},
1540 'WatchApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1541 'type': 'object'}},
1542 'type': 'object'}
1543
1544
1545 @ReturnMapping(StringsResult)
1546 async def APIAddresses(self):
1547 '''
1548
1549 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
1550 '''
1551 # map input types to rpc msg
1552 _params = dict()
1553 msg = dict(type='CAASOperatorProvisioner',
1554 request='APIAddresses',
1555 version=1,
1556 params=_params)
1557
1558 reply = await self.rpc(msg)
1559 return reply
1560
1561
1562
1563 @ReturnMapping(APIHostPortsResult)
1564 async def APIHostPorts(self):
1565 '''
1566
1567 Returns -> typing.Sequence[~HostPort]
1568 '''
1569 # map input types to rpc msg
1570 _params = dict()
1571 msg = dict(type='CAASOperatorProvisioner',
1572 request='APIHostPorts',
1573 version=1,
1574 params=_params)
1575
1576 reply = await self.rpc(msg)
1577 return reply
1578
1579
1580
1581 @ReturnMapping(LifeResults)
1582 async def Life(self, entities):
1583 '''
1584 entities : typing.Sequence[~Entity]
1585 Returns -> typing.Sequence[~LifeResult]
1586 '''
1587 # map input types to rpc msg
1588 _params = dict()
1589 msg = dict(type='CAASOperatorProvisioner',
1590 request='Life',
1591 version=1,
1592 params=_params)
1593 _params['entities'] = entities
1594 reply = await self.rpc(msg)
1595 return reply
1596
1597
1598
1599 @ReturnMapping(StringResult)
1600 async def ModelUUID(self):
1601 '''
1602
1603 Returns -> typing.Union[_ForwardRef('Error'), str]
1604 '''
1605 # map input types to rpc msg
1606 _params = dict()
1607 msg = dict(type='CAASOperatorProvisioner',
1608 request='ModelUUID',
1609 version=1,
1610 params=_params)
1611
1612 reply = await self.rpc(msg)
1613 return reply
1614
1615
1616
1617 @ReturnMapping(OperatorProvisioningInfo)
1618 async def OperatorProvisioningInfo(self):
1619 '''
1620
1621 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('KubernetesFilesystemParams'), str, typing.Mapping[str, str], _ForwardRef('Number')]
1622 '''
1623 # map input types to rpc msg
1624 _params = dict()
1625 msg = dict(type='CAASOperatorProvisioner',
1626 request='OperatorProvisioningInfo',
1627 version=1,
1628 params=_params)
1629
1630 reply = await self.rpc(msg)
1631 return reply
1632
1633
1634
1635 @ReturnMapping(ErrorResults)
1636 async def SetPasswords(self, changes):
1637 '''
1638 changes : typing.Sequence[~EntityPassword]
1639 Returns -> typing.Sequence[~ErrorResult]
1640 '''
1641 # map input types to rpc msg
1642 _params = dict()
1643 msg = dict(type='CAASOperatorProvisioner',
1644 request='SetPasswords',
1645 version=1,
1646 params=_params)
1647 _params['changes'] = changes
1648 reply = await self.rpc(msg)
1649 return reply
1650
1651
1652
1653 @ReturnMapping(NotifyWatchResult)
1654 async def WatchAPIHostPorts(self):
1655 '''
1656
1657 Returns -> typing.Union[str, _ForwardRef('Error')]
1658 '''
1659 # map input types to rpc msg
1660 _params = dict()
1661 msg = dict(type='CAASOperatorProvisioner',
1662 request='WatchAPIHostPorts',
1663 version=1,
1664 params=_params)
1665
1666 reply = await self.rpc(msg)
1667 return reply
1668
1669
1670
1671 @ReturnMapping(StringsWatchResult)
1672 async def WatchApplications(self):
1673 '''
1674
1675 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
1676 '''
1677 # map input types to rpc msg
1678 _params = dict()
1679 msg = dict(type='CAASOperatorProvisioner',
1680 request='WatchApplications',
1681 version=1,
1682 params=_params)
1683
1684 reply = await self.rpc(msg)
1685 return reply
1686
1687
1688
1689 class CAASUnitProvisionerFacade(Type):
1690 name = 'CAASUnitProvisioner'
1691 version = 1
1692 schema = {'definitions': {'Address': {'additionalProperties': False,
1693 'properties': {'scope': {'type': 'string'},
1694 'space-name': {'type': 'string'},
1695 'type': {'type': 'string'},
1696 'value': {'type': 'string'}},
1697 'required': ['value', 'type', 'scope'],
1698 'type': 'object'},
1699 'ApplicationGetConfigResults': {'additionalProperties': False,
1700 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigResult'},
1701 'type': 'array'}},
1702 'required': ['Results'],
1703 'type': 'object'},
1704 'ApplicationUnitParams': {'additionalProperties': False,
1705 'properties': {'address': {'type': 'string'},
1706 'data': {'patternProperties': {'.*': {'additionalProperties': True,
1707 'type': 'object'}},
1708 'type': 'object'},
1709 'filesystem-info': {'items': {'$ref': '#/definitions/KubernetesFilesystemInfo'},
1710 'type': 'array'},
1711 'info': {'type': 'string'},
1712 'ports': {'items': {'type': 'string'},
1713 'type': 'array'},
1714 'provider-id': {'type': 'string'},
1715 'status': {'type': 'string'},
1716 'unit-tag': {'type': 'string'}},
1717 'required': ['provider-id',
1718 'unit-tag',
1719 'address',
1720 'ports',
1721 'status',
1722 'info'],
1723 'type': 'object'},
1724 'ConfigResult': {'additionalProperties': False,
1725 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1726 'type': 'object'}},
1727 'type': 'object'},
1728 'error': {'$ref': '#/definitions/Error'}},
1729 'required': ['config'],
1730 'type': 'object'},
1731 'Entities': {'additionalProperties': False,
1732 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1733 'type': 'array'}},
1734 'required': ['entities'],
1735 'type': 'object'},
1736 'Entity': {'additionalProperties': False,
1737 'properties': {'tag': {'type': 'string'}},
1738 'required': ['tag'],
1739 'type': 'object'},
1740 'EntityStatusArgs': {'additionalProperties': False,
1741 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1742 'type': 'object'}},
1743 'type': 'object'},
1744 'info': {'type': 'string'},
1745 'status': {'type': 'string'},
1746 'tag': {'type': 'string'}},
1747 'required': ['tag',
1748 'status',
1749 'info',
1750 'data'],
1751 'type': 'object'},
1752 'Error': {'additionalProperties': False,
1753 'properties': {'code': {'type': 'string'},
1754 'info': {'$ref': '#/definitions/ErrorInfo'},
1755 'message': {'type': 'string'}},
1756 'required': ['message', 'code'],
1757 'type': 'object'},
1758 'ErrorInfo': {'additionalProperties': False,
1759 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1760 'macaroon-path': {'type': 'string'}},
1761 'type': 'object'},
1762 'ErrorResult': {'additionalProperties': False,
1763 'properties': {'error': {'$ref': '#/definitions/Error'}},
1764 'type': 'object'},
1765 'ErrorResults': {'additionalProperties': False,
1766 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1767 'type': 'array'}},
1768 'required': ['results'],
1769 'type': 'object'},
1770 'IntResult': {'additionalProperties': False,
1771 'properties': {'error': {'$ref': '#/definitions/Error'},
1772 'result': {'type': 'integer'}},
1773 'required': ['result'],
1774 'type': 'object'},
1775 'IntResults': {'additionalProperties': False,
1776 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
1777 'type': 'array'}},
1778 'required': ['results'],
1779 'type': 'object'},
1780 'KubernetesDeviceParams': {'additionalProperties': False,
1781 'properties': {'Attributes': {'patternProperties': {'.*': {'type': 'string'}},
1782 'type': 'object'},
1783 'Count': {'type': 'integer'},
1784 'Type': {'type': 'string'}},
1785 'required': ['Type',
1786 'Count',
1787 'Attributes'],
1788 'type': 'object'},
1789 'KubernetesFilesystemAttachmentParams': {'additionalProperties': False,
1790 'properties': {'mount-point': {'type': 'string'},
1791 'provider': {'type': 'string'},
1792 'read-only': {'type': 'boolean'}},
1793 'required': ['provider'],
1794 'type': 'object'},
1795 'KubernetesFilesystemInfo': {'additionalProperties': False,
1796 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1797 'type': 'object'}},
1798 'type': 'object'},
1799 'filesystem-id': {'type': 'string'},
1800 'info': {'type': 'string'},
1801 'mount-point': {'type': 'string'},
1802 'pool': {'type': 'string'},
1803 'read-only': {'type': 'boolean'},
1804 'size': {'type': 'integer'},
1805 'status': {'type': 'string'},
1806 'storagename': {'type': 'string'},
1807 'volume': {'$ref': '#/definitions/KubernetesVolumeInfo'}},
1808 'required': ['storagename',
1809 'pool',
1810 'size',
1811 'filesystem-id',
1812 'status',
1813 'info',
1814 'volume'],
1815 'type': 'object'},
1816 'KubernetesFilesystemParams': {'additionalProperties': False,
1817 'properties': {'attachment': {'$ref': '#/definitions/KubernetesFilesystemAttachmentParams'},
1818 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
1819 'type': 'object'}},
1820 'type': 'object'},
1821 'provider': {'type': 'string'},
1822 'size': {'type': 'integer'},
1823 'storagename': {'type': 'string'},
1824 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1825 'type': 'object'}},
1826 'required': ['storagename',
1827 'size',
1828 'provider'],
1829 'type': 'object'},
1830 'KubernetesProvisioningInfo': {'additionalProperties': False,
1831 'properties': {'constraints': {'$ref': '#/definitions/Value'},
1832 'devices': {'items': {'$ref': '#/definitions/KubernetesDeviceParams'},
1833 'type': 'array'},
1834 'filesystems': {'items': {'$ref': '#/definitions/KubernetesFilesystemParams'},
1835 'type': 'array'},
1836 'placement': {'type': 'string'},
1837 'pod-spec': {'type': 'string'},
1838 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1839 'type': 'object'},
1840 'volumes': {'items': {'$ref': '#/definitions/KubernetesVolumeParams'},
1841 'type': 'array'}},
1842 'required': ['pod-spec',
1843 'constraints'],
1844 'type': 'object'},
1845 'KubernetesProvisioningInfoResult': {'additionalProperties': False,
1846 'properties': {'error': {'$ref': '#/definitions/Error'},
1847 'result': {'$ref': '#/definitions/KubernetesProvisioningInfo'}},
1848 'required': ['result'],
1849 'type': 'object'},
1850 'KubernetesProvisioningInfoResults': {'additionalProperties': False,
1851 'properties': {'results': {'items': {'$ref': '#/definitions/KubernetesProvisioningInfoResult'},
1852 'type': 'array'}},
1853 'required': ['results'],
1854 'type': 'object'},
1855 'KubernetesVolumeAttachmentParams': {'additionalProperties': False,
1856 'properties': {'provider': {'type': 'string'},
1857 'read-only': {'type': 'boolean'}},
1858 'required': ['provider'],
1859 'type': 'object'},
1860 'KubernetesVolumeInfo': {'additionalProperties': False,
1861 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1862 'type': 'object'}},
1863 'type': 'object'},
1864 'info': {'type': 'string'},
1865 'persistent': {'type': 'boolean'},
1866 'pool': {'type': 'string'},
1867 'size': {'type': 'integer'},
1868 'status': {'type': 'string'},
1869 'volume-id': {'type': 'string'}},
1870 'required': ['volume-id',
1871 'size',
1872 'persistent',
1873 'status',
1874 'info'],
1875 'type': 'object'},
1876 'KubernetesVolumeParams': {'additionalProperties': False,
1877 'properties': {'attachment': {'$ref': '#/definitions/KubernetesVolumeAttachmentParams'},
1878 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
1879 'type': 'object'}},
1880 'type': 'object'},
1881 'provider': {'type': 'string'},
1882 'size': {'type': 'integer'},
1883 'storagename': {'type': 'string'},
1884 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1885 'type': 'object'}},
1886 'required': ['storagename',
1887 'size',
1888 'provider'],
1889 'type': 'object'},
1890 'LifeResult': {'additionalProperties': False,
1891 'properties': {'error': {'$ref': '#/definitions/Error'},
1892 'life': {'type': 'string'}},
1893 'required': ['life'],
1894 'type': 'object'},
1895 'LifeResults': {'additionalProperties': False,
1896 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1897 'type': 'array'}},
1898 'required': ['results'],
1899 'type': 'object'},
1900 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1901 'NotifyWatchResult': {'additionalProperties': False,
1902 'properties': {'NotifyWatcherId': {'type': 'string'},
1903 'error': {'$ref': '#/definitions/Error'}},
1904 'required': ['NotifyWatcherId'],
1905 'type': 'object'},
1906 'NotifyWatchResults': {'additionalProperties': False,
1907 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1908 'type': 'array'}},
1909 'required': ['results'],
1910 'type': 'object'},
1911 'SetStatus': {'additionalProperties': False,
1912 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1913 'type': 'array'}},
1914 'required': ['entities'],
1915 'type': 'object'},
1916 'StringsWatchResult': {'additionalProperties': False,
1917 'properties': {'changes': {'items': {'type': 'string'},
1918 'type': 'array'},
1919 'error': {'$ref': '#/definitions/Error'},
1920 'watcher-id': {'type': 'string'}},
1921 'required': ['watcher-id'],
1922 'type': 'object'},
1923 'UpdateApplicationServiceArg': {'additionalProperties': False,
1924 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1925 'type': 'array'},
1926 'application-tag': {'type': 'string'},
1927 'provider-id': {'type': 'string'}},
1928 'required': ['application-tag',
1929 'provider-id',
1930 'addresses'],
1931 'type': 'object'},
1932 'UpdateApplicationServiceArgs': {'additionalProperties': False,
1933 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateApplicationServiceArg'},
1934 'type': 'array'}},
1935 'required': ['args'],
1936 'type': 'object'},
1937 'UpdateApplicationUnitArgs': {'additionalProperties': False,
1938 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateApplicationUnits'},
1939 'type': 'array'}},
1940 'required': ['args'],
1941 'type': 'object'},
1942 'UpdateApplicationUnits': {'additionalProperties': False,
1943 'properties': {'application-tag': {'type': 'string'},
1944 'units': {'items': {'$ref': '#/definitions/ApplicationUnitParams'},
1945 'type': 'array'}},
1946 'required': ['application-tag',
1947 'units'],
1948 'type': 'object'},
1949 'Value': {'additionalProperties': False,
1950 'properties': {'arch': {'type': 'string'},
1951 'container': {'type': 'string'},
1952 'cores': {'type': 'integer'},
1953 'cpu-power': {'type': 'integer'},
1954 'instance-type': {'type': 'string'},
1955 'mem': {'type': 'integer'},
1956 'root-disk': {'type': 'integer'},
1957 'spaces': {'items': {'type': 'string'},
1958 'type': 'array'},
1959 'tags': {'items': {'type': 'string'},
1960 'type': 'array'},
1961 'virt-type': {'type': 'string'},
1962 'zones': {'items': {'type': 'string'},
1963 'type': 'array'}},
1964 'type': 'object'}},
1965 'properties': {'ApplicationsConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1966 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}},
1967 'type': 'object'},
1968 'ApplicationsScale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1969 'Result': {'$ref': '#/definitions/IntResults'}},
1970 'type': 'object'},
1971 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1972 'Result': {'$ref': '#/definitions/LifeResults'}},
1973 'type': 'object'},
1974 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1975 'Result': {'$ref': '#/definitions/KubernetesProvisioningInfoResults'}},
1976 'type': 'object'},
1977 'SetOperatorStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1978 'Result': {'$ref': '#/definitions/ErrorResults'}},
1979 'type': 'object'},
1980 'UpdateApplicationsService': {'properties': {'Params': {'$ref': '#/definitions/UpdateApplicationServiceArgs'},
1981 'Result': {'$ref': '#/definitions/ErrorResults'}},
1982 'type': 'object'},
1983 'UpdateApplicationsUnits': {'properties': {'Params': {'$ref': '#/definitions/UpdateApplicationUnitArgs'},
1984 'Result': {'$ref': '#/definitions/ErrorResults'}},
1985 'type': 'object'},
1986 'WatchApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1987 'type': 'object'},
1988 'WatchApplicationsScale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1989 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1990 'type': 'object'},
1991 'WatchPodSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1992 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1993 'type': 'object'}},
1994 'type': 'object'}
1995
1996
1997 @ReturnMapping(ApplicationGetConfigResults)
1998 async def ApplicationsConfig(self, entities):
1999 '''
2000 entities : typing.Sequence[~Entity]
2001 Returns -> typing.Sequence[~ConfigResult]
2002 '''
2003 # map input types to rpc msg
2004 _params = dict()
2005 msg = dict(type='CAASUnitProvisioner',
2006 request='ApplicationsConfig',
2007 version=1,
2008 params=_params)
2009 _params['entities'] = entities
2010 reply = await self.rpc(msg)
2011 return reply
2012
2013
2014
2015 @ReturnMapping(IntResults)
2016 async def ApplicationsScale(self, entities):
2017 '''
2018 entities : typing.Sequence[~Entity]
2019 Returns -> typing.Sequence[~IntResult]
2020 '''
2021 # map input types to rpc msg
2022 _params = dict()
2023 msg = dict(type='CAASUnitProvisioner',
2024 request='ApplicationsScale',
2025 version=1,
2026 params=_params)
2027 _params['entities'] = entities
2028 reply = await self.rpc(msg)
2029 return reply
2030
2031
2032
2033 @ReturnMapping(LifeResults)
2034 async def Life(self, entities):
2035 '''
2036 entities : typing.Sequence[~Entity]
2037 Returns -> typing.Sequence[~LifeResult]
2038 '''
2039 # map input types to rpc msg
2040 _params = dict()
2041 msg = dict(type='CAASUnitProvisioner',
2042 request='Life',
2043 version=1,
2044 params=_params)
2045 _params['entities'] = entities
2046 reply = await self.rpc(msg)
2047 return reply
2048
2049
2050
2051 @ReturnMapping(KubernetesProvisioningInfoResults)
2052 async def ProvisioningInfo(self, entities):
2053 '''
2054 entities : typing.Sequence[~Entity]
2055 Returns -> typing.Sequence[~KubernetesProvisioningInfoResult]
2056 '''
2057 # map input types to rpc msg
2058 _params = dict()
2059 msg = dict(type='CAASUnitProvisioner',
2060 request='ProvisioningInfo',
2061 version=1,
2062 params=_params)
2063 _params['entities'] = entities
2064 reply = await self.rpc(msg)
2065 return reply
2066
2067
2068
2069 @ReturnMapping(ErrorResults)
2070 async def SetOperatorStatus(self, entities):
2071 '''
2072 entities : typing.Sequence[~EntityStatusArgs]
2073 Returns -> typing.Sequence[~ErrorResult]
2074 '''
2075 # map input types to rpc msg
2076 _params = dict()
2077 msg = dict(type='CAASUnitProvisioner',
2078 request='SetOperatorStatus',
2079 version=1,
2080 params=_params)
2081 _params['entities'] = entities
2082 reply = await self.rpc(msg)
2083 return reply
2084
2085
2086
2087 @ReturnMapping(ErrorResults)
2088 async def UpdateApplicationsService(self, args):
2089 '''
2090 args : typing.Sequence[~UpdateApplicationServiceArg]
2091 Returns -> typing.Sequence[~ErrorResult]
2092 '''
2093 # map input types to rpc msg
2094 _params = dict()
2095 msg = dict(type='CAASUnitProvisioner',
2096 request='UpdateApplicationsService',
2097 version=1,
2098 params=_params)
2099 _params['args'] = args
2100 reply = await self.rpc(msg)
2101 return reply
2102
2103
2104
2105 @ReturnMapping(ErrorResults)
2106 async def UpdateApplicationsUnits(self, args):
2107 '''
2108 args : typing.Sequence[~UpdateApplicationUnits]
2109 Returns -> typing.Sequence[~ErrorResult]
2110 '''
2111 # map input types to rpc msg
2112 _params = dict()
2113 msg = dict(type='CAASUnitProvisioner',
2114 request='UpdateApplicationsUnits',
2115 version=1,
2116 params=_params)
2117 _params['args'] = args
2118 reply = await self.rpc(msg)
2119 return reply
2120
2121
2122
2123 @ReturnMapping(StringsWatchResult)
2124 async def WatchApplications(self):
2125 '''
2126
2127 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
2128 '''
2129 # map input types to rpc msg
2130 _params = dict()
2131 msg = dict(type='CAASUnitProvisioner',
2132 request='WatchApplications',
2133 version=1,
2134 params=_params)
2135
2136 reply = await self.rpc(msg)
2137 return reply
2138
2139
2140
2141 @ReturnMapping(NotifyWatchResults)
2142 async def WatchApplicationsScale(self, entities):
2143 '''
2144 entities : typing.Sequence[~Entity]
2145 Returns -> typing.Sequence[~NotifyWatchResult]
2146 '''
2147 # map input types to rpc msg
2148 _params = dict()
2149 msg = dict(type='CAASUnitProvisioner',
2150 request='WatchApplicationsScale',
2151 version=1,
2152 params=_params)
2153 _params['entities'] = entities
2154 reply = await self.rpc(msg)
2155 return reply
2156
2157
2158
2159 @ReturnMapping(NotifyWatchResults)
2160 async def WatchPodSpec(self, entities):
2161 '''
2162 entities : typing.Sequence[~Entity]
2163 Returns -> typing.Sequence[~NotifyWatchResult]
2164 '''
2165 # map input types to rpc msg
2166 _params = dict()
2167 msg = dict(type='CAASUnitProvisioner',
2168 request='WatchPodSpec',
2169 version=1,
2170 params=_params)
2171 _params['entities'] = entities
2172 reply = await self.rpc(msg)
2173 return reply
2174
2175
2176
2177 class ClientFacade(Type):
2178 name = 'Client'
2179 version = 1
2180 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
2181 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2182 'type': 'array'},
2183 'type': 'array'}},
2184 'required': ['servers'],
2185 'type': 'object'},
2186 'AddCharm': {'additionalProperties': False,
2187 'properties': {'channel': {'type': 'string'},
2188 'url': {'type': 'string'}},
2189 'required': ['url', 'channel'],
2190 'type': 'object'},
2191 'AddCharmWithAuthorization': {'additionalProperties': False,
2192 'properties': {'channel': {'type': 'string'},
2193 'macaroon': {'$ref': '#/definitions/Macaroon'},
2194 'url': {'type': 'string'}},
2195 'required': ['url',
2196 'channel',
2197 'macaroon'],
2198 'type': 'object'},
2199 'AddMachineParams': {'additionalProperties': False,
2200 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
2201 'type': 'array'},
2202 'constraints': {'$ref': '#/definitions/Value'},
2203 'container-type': {'type': 'string'},
2204 'disks': {'items': {'$ref': '#/definitions/Constraints'},
2205 'type': 'array'},
2206 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2207 'instance-id': {'type': 'string'},
2208 'jobs': {'items': {'type': 'string'},
2209 'type': 'array'},
2210 'nonce': {'type': 'string'},
2211 'parent-id': {'type': 'string'},
2212 'placement': {'$ref': '#/definitions/Placement'},
2213 'series': {'type': 'string'}},
2214 'required': ['series',
2215 'constraints',
2216 'jobs',
2217 'parent-id',
2218 'container-type',
2219 'instance-id',
2220 'nonce',
2221 'hardware-characteristics',
2222 'addresses'],
2223 'type': 'object'},
2224 'AddMachines': {'additionalProperties': False,
2225 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
2226 'type': 'array'}},
2227 'required': ['params'],
2228 'type': 'object'},
2229 'AddMachinesResult': {'additionalProperties': False,
2230 'properties': {'error': {'$ref': '#/definitions/Error'},
2231 'machine': {'type': 'string'}},
2232 'required': ['machine'],
2233 'type': 'object'},
2234 'AddMachinesResults': {'additionalProperties': False,
2235 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
2236 'type': 'array'}},
2237 'required': ['machines'],
2238 'type': 'object'},
2239 'Address': {'additionalProperties': False,
2240 'properties': {'scope': {'type': 'string'},
2241 'space-name': {'type': 'string'},
2242 'type': {'type': 'string'},
2243 'value': {'type': 'string'}},
2244 'required': ['value', 'type', 'scope'],
2245 'type': 'object'},
2246 'AgentVersionResult': {'additionalProperties': False,
2247 'properties': {'version': {'$ref': '#/definitions/Number'}},
2248 'required': ['version'],
2249 'type': 'object'},
2250 'AllWatcherId': {'additionalProperties': False,
2251 'properties': {'watcher-id': {'type': 'string'}},
2252 'required': ['watcher-id'],
2253 'type': 'object'},
2254 'ApplicationStatus': {'additionalProperties': False,
2255 'properties': {'can-upgrade-to': {'type': 'string'},
2256 'charm': {'type': 'string'},
2257 'err': {'additionalProperties': True,
2258 'type': 'object'},
2259 'exposed': {'type': 'boolean'},
2260 'life': {'type': 'string'},
2261 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
2262 'type': 'object'},
2263 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
2264 'type': 'array'}},
2265 'type': 'object'},
2266 'series': {'type': 'string'},
2267 'status': {'$ref': '#/definitions/DetailedStatus'},
2268 'subordinate-to': {'items': {'type': 'string'},
2269 'type': 'array'},
2270 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
2271 'type': 'object'},
2272 'workload-version': {'type': 'string'}},
2273 'required': ['charm',
2274 'series',
2275 'exposed',
2276 'life',
2277 'relations',
2278 'can-upgrade-to',
2279 'subordinate-to',
2280 'units',
2281 'meter-statuses',
2282 'status',
2283 'workload-version'],
2284 'type': 'object'},
2285 'Binary': {'additionalProperties': False,
2286 'properties': {'Arch': {'type': 'string'},
2287 'Number': {'$ref': '#/definitions/Number'},
2288 'Series': {'type': 'string'}},
2289 'required': ['Number', 'Series', 'Arch'],
2290 'type': 'object'},
2291 'BundleChange': {'additionalProperties': False,
2292 'properties': {'args': {'items': {'additionalProperties': True,
2293 'type': 'object'},
2294 'type': 'array'},
2295 'id': {'type': 'string'},
2296 'method': {'type': 'string'},
2297 'requires': {'items': {'type': 'string'},
2298 'type': 'array'}},
2299 'required': ['id',
2300 'method',
2301 'args',
2302 'requires'],
2303 'type': 'object'},
2304 'BundleChangesParams': {'additionalProperties': False,
2305 'properties': {'yaml': {'type': 'string'}},
2306 'required': ['yaml'],
2307 'type': 'object'},
2308 'BundleChangesResults': {'additionalProperties': False,
2309 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
2310 'type': 'array'},
2311 'errors': {'items': {'type': 'string'},
2312 'type': 'array'}},
2313 'type': 'object'},
2314 'BytesResult': {'additionalProperties': False,
2315 'properties': {'result': {'items': {'type': 'integer'},
2316 'type': 'array'}},
2317 'required': ['result'],
2318 'type': 'object'},
2319 'ConfigValue': {'additionalProperties': False,
2320 'properties': {'source': {'type': 'string'},
2321 'value': {'additionalProperties': True,
2322 'type': 'object'}},
2323 'required': ['value', 'source'],
2324 'type': 'object'},
2325 'Constraints': {'additionalProperties': False,
2326 'properties': {'Count': {'type': 'integer'},
2327 'Pool': {'type': 'string'},
2328 'Size': {'type': 'integer'}},
2329 'required': ['Pool', 'Size', 'Count'],
2330 'type': 'object'},
2331 'DestroyMachines': {'additionalProperties': False,
2332 'properties': {'force': {'type': 'boolean'},
2333 'machine-names': {'items': {'type': 'string'},
2334 'type': 'array'}},
2335 'required': ['machine-names', 'force'],
2336 'type': 'object'},
2337 'DetailedStatus': {'additionalProperties': False,
2338 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2339 'type': 'object'}},
2340 'type': 'object'},
2341 'err': {'additionalProperties': True,
2342 'type': 'object'},
2343 'info': {'type': 'string'},
2344 'kind': {'type': 'string'},
2345 'life': {'type': 'string'},
2346 'since': {'format': 'date-time',
2347 'type': 'string'},
2348 'status': {'type': 'string'},
2349 'version': {'type': 'string'}},
2350 'required': ['status',
2351 'info',
2352 'data',
2353 'since',
2354 'kind',
2355 'version',
2356 'life'],
2357 'type': 'object'},
2358 'EndpointStatus': {'additionalProperties': False,
2359 'properties': {'application': {'type': 'string'},
2360 'name': {'type': 'string'},
2361 'role': {'type': 'string'},
2362 'subordinate': {'type': 'boolean'}},
2363 'required': ['application',
2364 'name',
2365 'role',
2366 'subordinate'],
2367 'type': 'object'},
2368 'Entities': {'additionalProperties': False,
2369 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2370 'type': 'array'}},
2371 'required': ['entities'],
2372 'type': 'object'},
2373 'Entity': {'additionalProperties': False,
2374 'properties': {'tag': {'type': 'string'}},
2375 'required': ['tag'],
2376 'type': 'object'},
2377 'EntityStatus': {'additionalProperties': False,
2378 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2379 'type': 'object'}},
2380 'type': 'object'},
2381 'info': {'type': 'string'},
2382 'since': {'format': 'date-time',
2383 'type': 'string'},
2384 'status': {'type': 'string'}},
2385 'required': ['status', 'info', 'since'],
2386 'type': 'object'},
2387 'Error': {'additionalProperties': False,
2388 'properties': {'code': {'type': 'string'},
2389 'info': {'$ref': '#/definitions/ErrorInfo'},
2390 'message': {'type': 'string'}},
2391 'required': ['message', 'code'],
2392 'type': 'object'},
2393 'ErrorInfo': {'additionalProperties': False,
2394 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2395 'macaroon-path': {'type': 'string'}},
2396 'type': 'object'},
2397 'ErrorResult': {'additionalProperties': False,
2398 'properties': {'error': {'$ref': '#/definitions/Error'}},
2399 'type': 'object'},
2400 'ErrorResults': {'additionalProperties': False,
2401 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2402 'type': 'array'}},
2403 'required': ['results'],
2404 'type': 'object'},
2405 'FindToolsParams': {'additionalProperties': False,
2406 'properties': {'arch': {'type': 'string'},
2407 'major': {'type': 'integer'},
2408 'minor': {'type': 'integer'},
2409 'number': {'$ref': '#/definitions/Number'},
2410 'series': {'type': 'string'}},
2411 'required': ['number',
2412 'major',
2413 'minor',
2414 'arch',
2415 'series'],
2416 'type': 'object'},
2417 'FindToolsResult': {'additionalProperties': False,
2418 'properties': {'error': {'$ref': '#/definitions/Error'},
2419 'list': {'items': {'$ref': '#/definitions/Tools'},
2420 'type': 'array'}},
2421 'required': ['list'],
2422 'type': 'object'},
2423 'FullStatus': {'additionalProperties': False,
2424 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
2425 'type': 'object'},
2426 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
2427 'type': 'object'},
2428 'model': {'$ref': '#/definitions/ModelStatusInfo'},
2429 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
2430 'type': 'array'},
2431 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}},
2432 'type': 'object'}},
2433 'required': ['model',
2434 'machines',
2435 'applications',
2436 'remote-applications',
2437 'relations'],
2438 'type': 'object'},
2439 'GetConstraintsResults': {'additionalProperties': False,
2440 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
2441 'required': ['constraints'],
2442 'type': 'object'},
2443 'HardwareCharacteristics': {'additionalProperties': False,
2444 'properties': {'arch': {'type': 'string'},
2445 'availability-zone': {'type': 'string'},
2446 'cpu-cores': {'type': 'integer'},
2447 'cpu-power': {'type': 'integer'},
2448 'mem': {'type': 'integer'},
2449 'root-disk': {'type': 'integer'},
2450 'tags': {'items': {'type': 'string'},
2451 'type': 'array'}},
2452 'type': 'object'},
2453 'History': {'additionalProperties': False,
2454 'properties': {'error': {'$ref': '#/definitions/Error'},
2455 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
2456 'type': 'array'}},
2457 'required': ['statuses'],
2458 'type': 'object'},
2459 'HostPort': {'additionalProperties': False,
2460 'properties': {'Address': {'$ref': '#/definitions/Address'},
2461 'port': {'type': 'integer'}},
2462 'required': ['Address', 'port'],
2463 'type': 'object'},
2464 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2465 'MachineHardware': {'additionalProperties': False,
2466 'properties': {'arch': {'type': 'string'},
2467 'availability-zone': {'type': 'string'},
2468 'cores': {'type': 'integer'},
2469 'cpu-power': {'type': 'integer'},
2470 'mem': {'type': 'integer'},
2471 'root-disk': {'type': 'integer'},
2472 'tags': {'items': {'type': 'string'},
2473 'type': 'array'}},
2474 'type': 'object'},
2475 'MachineStatus': {'additionalProperties': False,
2476 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
2477 'constraints': {'type': 'string'},
2478 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
2479 'type': 'object'},
2480 'dns-name': {'type': 'string'},
2481 'hardware': {'type': 'string'},
2482 'has-vote': {'type': 'boolean'},
2483 'id': {'type': 'string'},
2484 'instance-id': {'type': 'string'},
2485 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
2486 'ip-addresses': {'items': {'type': 'string'},
2487 'type': 'array'},
2488 'jobs': {'items': {'type': 'string'},
2489 'type': 'array'},
2490 'network-interfaces': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInterface'}},
2491 'type': 'object'},
2492 'series': {'type': 'string'},
2493 'wants-vote': {'type': 'boolean'}},
2494 'required': ['agent-status',
2495 'instance-status',
2496 'dns-name',
2497 'instance-id',
2498 'series',
2499 'id',
2500 'containers',
2501 'constraints',
2502 'hardware',
2503 'jobs',
2504 'has-vote',
2505 'wants-vote'],
2506 'type': 'object'},
2507 'MeterStatus': {'additionalProperties': False,
2508 'properties': {'color': {'type': 'string'},
2509 'message': {'type': 'string'}},
2510 'required': ['color', 'message'],
2511 'type': 'object'},
2512 'ModelConfigResults': {'additionalProperties': False,
2513 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
2514 'type': 'object'}},
2515 'required': ['config'],
2516 'type': 'object'},
2517 'ModelInfo': {'additionalProperties': False,
2518 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
2519 'cloud-credential-tag': {'type': 'string'},
2520 'cloud-region': {'type': 'string'},
2521 'cloud-tag': {'type': 'string'},
2522 'controller-uuid': {'type': 'string'},
2523 'default-series': {'type': 'string'},
2524 'life': {'type': 'string'},
2525 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
2526 'type': 'array'},
2527 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
2528 'name': {'type': 'string'},
2529 'owner-tag': {'type': 'string'},
2530 'provider-type': {'type': 'string'},
2531 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
2532 'status': {'$ref': '#/definitions/EntityStatus'},
2533 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
2534 'type': 'array'},
2535 'uuid': {'type': 'string'}},
2536 'required': ['name',
2537 'uuid',
2538 'controller-uuid',
2539 'cloud-tag',
2540 'owner-tag',
2541 'life',
2542 'users',
2543 'machines',
2544 'sla',
2545 'agent-version'],
2546 'type': 'object'},
2547 'ModelMachineInfo': {'additionalProperties': False,
2548 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
2549 'has-vote': {'type': 'boolean'},
2550 'id': {'type': 'string'},
2551 'instance-id': {'type': 'string'},
2552 'status': {'type': 'string'},
2553 'wants-vote': {'type': 'boolean'}},
2554 'required': ['id'],
2555 'type': 'object'},
2556 'ModelMigrationStatus': {'additionalProperties': False,
2557 'properties': {'end': {'format': 'date-time',
2558 'type': 'string'},
2559 'start': {'format': 'date-time',
2560 'type': 'string'},
2561 'status': {'type': 'string'}},
2562 'required': ['status', 'start'],
2563 'type': 'object'},
2564 'ModelSLA': {'additionalProperties': False,
2565 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
2566 'creds': {'items': {'type': 'integer'},
2567 'type': 'array'}},
2568 'required': ['ModelSLAInfo', 'creds'],
2569 'type': 'object'},
2570 'ModelSLAInfo': {'additionalProperties': False,
2571 'properties': {'level': {'type': 'string'},
2572 'owner': {'type': 'string'}},
2573 'required': ['level', 'owner'],
2574 'type': 'object'},
2575 'ModelSet': {'additionalProperties': False,
2576 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2577 'type': 'object'}},
2578 'type': 'object'}},
2579 'required': ['config'],
2580 'type': 'object'},
2581 'ModelStatusInfo': {'additionalProperties': False,
2582 'properties': {'available-version': {'type': 'string'},
2583 'cloud-tag': {'type': 'string'},
2584 'meter-status': {'$ref': '#/definitions/MeterStatus'},
2585 'model-status': {'$ref': '#/definitions/DetailedStatus'},
2586 'name': {'type': 'string'},
2587 'region': {'type': 'string'},
2588 'sla': {'type': 'string'},
2589 'version': {'type': 'string'}},
2590 'required': ['name',
2591 'cloud-tag',
2592 'version',
2593 'available-version',
2594 'model-status',
2595 'meter-status',
2596 'sla'],
2597 'type': 'object'},
2598 'ModelUnset': {'additionalProperties': False,
2599 'properties': {'keys': {'items': {'type': 'string'},
2600 'type': 'array'}},
2601 'required': ['keys'],
2602 'type': 'object'},
2603 'ModelUserInfo': {'additionalProperties': False,
2604 'properties': {'access': {'type': 'string'},
2605 'display-name': {'type': 'string'},
2606 'last-connection': {'format': 'date-time',
2607 'type': 'string'},
2608 'user': {'type': 'string'}},
2609 'required': ['user',
2610 'display-name',
2611 'last-connection',
2612 'access'],
2613 'type': 'object'},
2614 'ModelUserInfoResult': {'additionalProperties': False,
2615 'properties': {'error': {'$ref': '#/definitions/Error'},
2616 'result': {'$ref': '#/definitions/ModelUserInfo'}},
2617 'type': 'object'},
2618 'ModelUserInfoResults': {'additionalProperties': False,
2619 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
2620 'type': 'array'}},
2621 'required': ['results'],
2622 'type': 'object'},
2623 'NetworkInterface': {'additionalProperties': False,
2624 'properties': {'dns-nameservers': {'items': {'type': 'string'},
2625 'type': 'array'},
2626 'gateway': {'type': 'string'},
2627 'ip-addresses': {'items': {'type': 'string'},
2628 'type': 'array'},
2629 'is-up': {'type': 'boolean'},
2630 'mac-address': {'type': 'string'},
2631 'space': {'type': 'string'}},
2632 'required': ['ip-addresses',
2633 'mac-address',
2634 'is-up'],
2635 'type': 'object'},
2636 'Number': {'additionalProperties': False,
2637 'properties': {'Build': {'type': 'integer'},
2638 'Major': {'type': 'integer'},
2639 'Minor': {'type': 'integer'},
2640 'Patch': {'type': 'integer'},
2641 'Tag': {'type': 'string'}},
2642 'required': ['Major',
2643 'Minor',
2644 'Tag',
2645 'Patch',
2646 'Build'],
2647 'type': 'object'},
2648 'Placement': {'additionalProperties': False,
2649 'properties': {'directive': {'type': 'string'},
2650 'scope': {'type': 'string'}},
2651 'required': ['scope', 'directive'],
2652 'type': 'object'},
2653 'PrivateAddress': {'additionalProperties': False,
2654 'properties': {'target': {'type': 'string'}},
2655 'required': ['target'],
2656 'type': 'object'},
2657 'PrivateAddressResults': {'additionalProperties': False,
2658 'properties': {'private-address': {'type': 'string'}},
2659 'required': ['private-address'],
2660 'type': 'object'},
2661 'ProvisioningScriptParams': {'additionalProperties': False,
2662 'properties': {'data-dir': {'type': 'string'},
2663 'disable-package-commands': {'type': 'boolean'},
2664 'machine-id': {'type': 'string'},
2665 'nonce': {'type': 'string'}},
2666 'required': ['machine-id',
2667 'nonce',
2668 'data-dir',
2669 'disable-package-commands'],
2670 'type': 'object'},
2671 'ProvisioningScriptResult': {'additionalProperties': False,
2672 'properties': {'script': {'type': 'string'}},
2673 'required': ['script'],
2674 'type': 'object'},
2675 'PublicAddress': {'additionalProperties': False,
2676 'properties': {'target': {'type': 'string'}},
2677 'required': ['target'],
2678 'type': 'object'},
2679 'PublicAddressResults': {'additionalProperties': False,
2680 'properties': {'public-address': {'type': 'string'}},
2681 'required': ['public-address'],
2682 'type': 'object'},
2683 'RelationStatus': {'additionalProperties': False,
2684 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
2685 'type': 'array'},
2686 'id': {'type': 'integer'},
2687 'interface': {'type': 'string'},
2688 'key': {'type': 'string'},
2689 'scope': {'type': 'string'}},
2690 'required': ['id',
2691 'key',
2692 'interface',
2693 'scope',
2694 'endpoints'],
2695 'type': 'object'},
2696 'RemoteApplicationStatus': {'additionalProperties': False,
2697 'properties': {'application-name': {'type': 'string'},
2698 'application-url': {'type': 'string'},
2699 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
2700 'type': 'array'},
2701 'err': {'additionalProperties': True,
2702 'type': 'object'},
2703 'life': {'type': 'string'},
2704 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
2705 'type': 'array'}},
2706 'type': 'object'},
2707 'status': {'$ref': '#/definitions/DetailedStatus'}},
2708 'required': ['application-url',
2709 'application-name',
2710 'endpoints',
2711 'life',
2712 'relations',
2713 'status'],
2714 'type': 'object'},
2715 'RemoteEndpoint': {'additionalProperties': False,
2716 'properties': {'interface': {'type': 'string'},
2717 'limit': {'type': 'integer'},
2718 'name': {'type': 'string'},
2719 'role': {'type': 'string'},
2720 'scope': {'type': 'string'}},
2721 'required': ['name',
2722 'role',
2723 'interface',
2724 'limit',
2725 'scope'],
2726 'type': 'object'},
2727 'ResolveCharmResult': {'additionalProperties': False,
2728 'properties': {'error': {'type': 'string'},
2729 'url': {'type': 'string'}},
2730 'type': 'object'},
2731 'ResolveCharmResults': {'additionalProperties': False,
2732 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
2733 'type': 'array'}},
2734 'required': ['urls'],
2735 'type': 'object'},
2736 'ResolveCharms': {'additionalProperties': False,
2737 'properties': {'references': {'items': {'type': 'string'},
2738 'type': 'array'}},
2739 'required': ['references'],
2740 'type': 'object'},
2741 'Resolved': {'additionalProperties': False,
2742 'properties': {'retry': {'type': 'boolean'},
2743 'unit-name': {'type': 'string'}},
2744 'required': ['unit-name', 'retry'],
2745 'type': 'object'},
2746 'SetConstraints': {'additionalProperties': False,
2747 'properties': {'application': {'type': 'string'},
2748 'constraints': {'$ref': '#/definitions/Value'}},
2749 'required': ['application', 'constraints'],
2750 'type': 'object'},
2751 'SetModelAgentVersion': {'additionalProperties': False,
2752 'properties': {'version': {'$ref': '#/definitions/Number'}},
2753 'required': ['version'],
2754 'type': 'object'},
2755 'StatusHistoryFilter': {'additionalProperties': False,
2756 'properties': {'date': {'format': 'date-time',
2757 'type': 'string'},
2758 'delta': {'type': 'integer'},
2759 'exclude': {'items': {'type': 'string'},
2760 'type': 'array'},
2761 'size': {'type': 'integer'}},
2762 'required': ['size',
2763 'date',
2764 'delta',
2765 'exclude'],
2766 'type': 'object'},
2767 'StatusHistoryRequest': {'additionalProperties': False,
2768 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
2769 'historyKind': {'type': 'string'},
2770 'size': {'type': 'integer'},
2771 'tag': {'type': 'string'}},
2772 'required': ['historyKind',
2773 'size',
2774 'filter',
2775 'tag'],
2776 'type': 'object'},
2777 'StatusHistoryRequests': {'additionalProperties': False,
2778 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
2779 'type': 'array'}},
2780 'required': ['requests'],
2781 'type': 'object'},
2782 'StatusHistoryResult': {'additionalProperties': False,
2783 'properties': {'error': {'$ref': '#/definitions/Error'},
2784 'history': {'$ref': '#/definitions/History'}},
2785 'required': ['history'],
2786 'type': 'object'},
2787 'StatusHistoryResults': {'additionalProperties': False,
2788 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
2789 'type': 'array'}},
2790 'required': ['results'],
2791 'type': 'object'},
2792 'StatusParams': {'additionalProperties': False,
2793 'properties': {'patterns': {'items': {'type': 'string'},
2794 'type': 'array'}},
2795 'required': ['patterns'],
2796 'type': 'object'},
2797 'StringResult': {'additionalProperties': False,
2798 'properties': {'error': {'$ref': '#/definitions/Error'},
2799 'result': {'type': 'string'}},
2800 'required': ['result'],
2801 'type': 'object'},
2802 'Tools': {'additionalProperties': False,
2803 'properties': {'sha256': {'type': 'string'},
2804 'size': {'type': 'integer'},
2805 'url': {'type': 'string'},
2806 'version': {'$ref': '#/definitions/Binary'}},
2807 'required': ['version', 'url', 'size'],
2808 'type': 'object'},
2809 'UnitStatus': {'additionalProperties': False,
2810 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
2811 'charm': {'type': 'string'},
2812 'leader': {'type': 'boolean'},
2813 'machine': {'type': 'string'},
2814 'opened-ports': {'items': {'type': 'string'},
2815 'type': 'array'},
2816 'public-address': {'type': 'string'},
2817 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
2818 'type': 'object'},
2819 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
2820 'workload-version': {'type': 'string'}},
2821 'required': ['agent-status',
2822 'workload-status',
2823 'workload-version',
2824 'machine',
2825 'opened-ports',
2826 'public-address',
2827 'charm',
2828 'subordinates'],
2829 'type': 'object'},
2830 'Value': {'additionalProperties': False,
2831 'properties': {'arch': {'type': 'string'},
2832 'container': {'type': 'string'},
2833 'cores': {'type': 'integer'},
2834 'cpu-power': {'type': 'integer'},
2835 'instance-type': {'type': 'string'},
2836 'mem': {'type': 'integer'},
2837 'root-disk': {'type': 'integer'},
2838 'spaces': {'items': {'type': 'string'},
2839 'type': 'array'},
2840 'tags': {'items': {'type': 'string'},
2841 'type': 'array'},
2842 'virt-type': {'type': 'string'}},
2843 'type': 'object'}},
2844 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
2845 'type': 'object'},
2846 'AbortCurrentUpgrade': {'type': 'object'},
2847 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
2848 'type': 'object'},
2849 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
2850 'type': 'object'},
2851 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2852 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2853 'type': 'object'},
2854 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2855 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2856 'type': 'object'},
2857 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
2858 'type': 'object'},
2859 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
2860 'type': 'object'},
2861 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
2862 'type': 'object'},
2863 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
2864 'Result': {'$ref': '#/definitions/FindToolsResult'}},
2865 'type': 'object'},
2866 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
2867 'Result': {'$ref': '#/definitions/FullStatus'}},
2868 'type': 'object'},
2869 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
2870 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
2871 'type': 'object'},
2872 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
2873 'type': 'object'},
2874 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2875 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2876 'type': 'object'},
2877 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
2878 'type': 'object'},
2879 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
2880 'type': 'object'},
2881 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
2882 'type': 'object'},
2883 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
2884 'type': 'object'},
2885 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
2886 'type': 'object'},
2887 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
2888 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
2889 'type': 'object'},
2890 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
2891 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
2892 'type': 'object'},
2893 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
2894 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
2895 'type': 'object'},
2896 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
2897 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
2898 'type': 'object'},
2899 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
2900 'type': 'object'},
2901 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2902 'Result': {'$ref': '#/definitions/ErrorResults'}},
2903 'type': 'object'},
2904 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
2905 'type': 'object'},
2906 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
2907 'type': 'object'},
2908 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
2909 'type': 'object'},
2910 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
2911 'type': 'object'},
2912 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
2913 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
2914 'type': 'object'},
2915 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
2916 'type': 'object'}},
2917 'type': 'object'}
2918
2919
2920 @ReturnMapping(APIHostPortsResult)
2921 async def APIHostPorts(self):
2922 '''
2923
2924 Returns -> typing.Sequence[~HostPort]
2925 '''
2926 # map input types to rpc msg
2927 _params = dict()
2928 msg = dict(type='Client',
2929 request='APIHostPorts',
2930 version=1,
2931 params=_params)
2932
2933 reply = await self.rpc(msg)
2934 return reply
2935
2936
2937
2938 @ReturnMapping(None)
2939 async def AbortCurrentUpgrade(self):
2940 '''
2941
2942 Returns -> None
2943 '''
2944 # map input types to rpc msg
2945 _params = dict()
2946 msg = dict(type='Client',
2947 request='AbortCurrentUpgrade',
2948 version=1,
2949 params=_params)
2950
2951 reply = await self.rpc(msg)
2952 return reply
2953
2954
2955
2956 @ReturnMapping(None)
2957 async def AddCharm(self, channel, url):
2958 '''
2959 channel : str
2960 url : str
2961 Returns -> None
2962 '''
2963 # map input types to rpc msg
2964 _params = dict()
2965 msg = dict(type='Client',
2966 request='AddCharm',
2967 version=1,
2968 params=_params)
2969 _params['channel'] = channel
2970 _params['url'] = url
2971 reply = await self.rpc(msg)
2972 return reply
2973
2974
2975
2976 @ReturnMapping(None)
2977 async def AddCharmWithAuthorization(self, channel, macaroon, url):
2978 '''
2979 channel : str
2980 macaroon : Macaroon
2981 url : str
2982 Returns -> None
2983 '''
2984 # map input types to rpc msg
2985 _params = dict()
2986 msg = dict(type='Client',
2987 request='AddCharmWithAuthorization',
2988 version=1,
2989 params=_params)
2990 _params['channel'] = channel
2991 _params['macaroon'] = macaroon
2992 _params['url'] = url
2993 reply = await self.rpc(msg)
2994 return reply
2995
2996
2997
2998 @ReturnMapping(AddMachinesResults)
2999 async def AddMachines(self, params):
3000 '''
3001 params : typing.Sequence[~AddMachineParams]
3002 Returns -> typing.Sequence[~AddMachinesResult]
3003 '''
3004 # map input types to rpc msg
3005 _params = dict()
3006 msg = dict(type='Client',
3007 request='AddMachines',
3008 version=1,
3009 params=_params)
3010 _params['params'] = params
3011 reply = await self.rpc(msg)
3012 return reply
3013
3014
3015
3016 @ReturnMapping(AddMachinesResults)
3017 async def AddMachinesV2(self, params):
3018 '''
3019 params : typing.Sequence[~AddMachineParams]
3020 Returns -> typing.Sequence[~AddMachinesResult]
3021 '''
3022 # map input types to rpc msg
3023 _params = dict()
3024 msg = dict(type='Client',
3025 request='AddMachinesV2',
3026 version=1,
3027 params=_params)
3028 _params['params'] = params
3029 reply = await self.rpc(msg)
3030 return reply
3031
3032
3033
3034 @ReturnMapping(AgentVersionResult)
3035 async def AgentVersion(self):
3036 '''
3037
3038 Returns -> Number
3039 '''
3040 # map input types to rpc msg
3041 _params = dict()
3042 msg = dict(type='Client',
3043 request='AgentVersion',
3044 version=1,
3045 params=_params)
3046
3047 reply = await self.rpc(msg)
3048 return reply
3049
3050
3051
3052 @ReturnMapping(BytesResult)
3053 async def CACert(self):
3054 '''
3055
3056 Returns -> typing.Sequence[int]
3057 '''
3058 # map input types to rpc msg
3059 _params = dict()
3060 msg = dict(type='Client',
3061 request='CACert',
3062 version=1,
3063 params=_params)
3064
3065 reply = await self.rpc(msg)
3066 return reply
3067
3068
3069
3070 @ReturnMapping(None)
3071 async def DestroyMachines(self, force, machine_names):
3072 '''
3073 force : bool
3074 machine_names : typing.Sequence[str]
3075 Returns -> None
3076 '''
3077 # map input types to rpc msg
3078 _params = dict()
3079 msg = dict(type='Client',
3080 request='DestroyMachines',
3081 version=1,
3082 params=_params)
3083 _params['force'] = force
3084 _params['machine-names'] = machine_names
3085 reply = await self.rpc(msg)
3086 return reply
3087
3088
3089
3090 @ReturnMapping(FindToolsResult)
3091 async def FindTools(self, arch, major, minor, number, series):
3092 '''
3093 arch : str
3094 major : int
3095 minor : int
3096 number : Number
3097 series : str
3098 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
3099 '''
3100 # map input types to rpc msg
3101 _params = dict()
3102 msg = dict(type='Client',
3103 request='FindTools',
3104 version=1,
3105 params=_params)
3106 _params['arch'] = arch
3107 _params['major'] = major
3108 _params['minor'] = minor
3109 _params['number'] = number
3110 _params['series'] = series
3111 reply = await self.rpc(msg)
3112 return reply
3113
3114
3115
3116 @ReturnMapping(FullStatus)
3117 async def FullStatus(self, patterns):
3118 '''
3119 patterns : typing.Sequence[str]
3120 Returns -> typing.Union[typing.Mapping[str, ~ApplicationStatus], str, typing.Mapping[str, ~MachineStatus], _ForwardRef('ModelStatusInfo'), typing.Mapping[str, ~ApplicationOfferStatus], typing.Sequence[~RelationStatus], typing.Mapping[str, ~RemoteApplicationStatus]]
3121 '''
3122 # map input types to rpc msg
3123 _params = dict()
3124 msg = dict(type='Client',
3125 request='FullStatus',
3126 version=1,
3127 params=_params)
3128 _params['patterns'] = patterns
3129 reply = await self.rpc(msg)
3130 return reply
3131
3132
3133
3134 @ReturnMapping(BundleChangesResults)
3135 async def GetBundleChanges(self, yaml):
3136 '''
3137 yaml : str
3138 Returns -> typing.Union[typing.Sequence[~BundleChange], typing.Sequence[str]]
3139 '''
3140 # map input types to rpc msg
3141 _params = dict()
3142 msg = dict(type='Client',
3143 request='GetBundleChanges',
3144 version=1,
3145 params=_params)
3146 _params['yaml'] = yaml
3147 reply = await self.rpc(msg)
3148 return reply
3149
3150
3151
3152 @ReturnMapping(GetConstraintsResults)
3153 async def GetModelConstraints(self):
3154 '''
3155
3156 Returns -> Value
3157 '''
3158 # map input types to rpc msg
3159 _params = dict()
3160 msg = dict(type='Client',
3161 request='GetModelConstraints',
3162 version=1,
3163 params=_params)
3164
3165 reply = await self.rpc(msg)
3166 return reply
3167
3168
3169
3170 @ReturnMapping(AddMachinesResults)
3171 async def InjectMachines(self, params):
3172 '''
3173 params : typing.Sequence[~AddMachineParams]
3174 Returns -> typing.Sequence[~AddMachinesResult]
3175 '''
3176 # map input types to rpc msg
3177 _params = dict()
3178 msg = dict(type='Client',
3179 request='InjectMachines',
3180 version=1,
3181 params=_params)
3182 _params['params'] = params
3183 reply = await self.rpc(msg)
3184 return reply
3185
3186
3187
3188 @ReturnMapping(ModelConfigResults)
3189 async def ModelGet(self):
3190 '''
3191
3192 Returns -> typing.Mapping[str, ~ConfigValue]
3193 '''
3194 # map input types to rpc msg
3195 _params = dict()
3196 msg = dict(type='Client',
3197 request='ModelGet',
3198 version=1,
3199 params=_params)
3200
3201 reply = await self.rpc(msg)
3202 return reply
3203
3204
3205
3206 @ReturnMapping(ModelInfo)
3207 async def ModelInfo(self):
3208 '''
3209
3210 Returns -> typing.Union[_ForwardRef('Number'), str, typing.Sequence[~ModelMachineInfo], _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
3211 '''
3212 # map input types to rpc msg
3213 _params = dict()
3214 msg = dict(type='Client',
3215 request='ModelInfo',
3216 version=1,
3217 params=_params)
3218
3219 reply = await self.rpc(msg)
3220 return reply
3221
3222
3223
3224 @ReturnMapping(None)
3225 async def ModelSet(self, config):
3226 '''
3227 config : typing.Mapping[str, typing.Any]
3228 Returns -> None
3229 '''
3230 # map input types to rpc msg
3231 _params = dict()
3232 msg = dict(type='Client',
3233 request='ModelSet',
3234 version=1,
3235 params=_params)
3236 _params['config'] = config
3237 reply = await self.rpc(msg)
3238 return reply
3239
3240
3241
3242 @ReturnMapping(None)
3243 async def ModelUnset(self, keys):
3244 '''
3245 keys : typing.Sequence[str]
3246 Returns -> None
3247 '''
3248 # map input types to rpc msg
3249 _params = dict()
3250 msg = dict(type='Client',
3251 request='ModelUnset',
3252 version=1,
3253 params=_params)
3254 _params['keys'] = keys
3255 reply = await self.rpc(msg)
3256 return reply
3257
3258
3259
3260 @ReturnMapping(ModelUserInfoResults)
3261 async def ModelUserInfo(self):
3262 '''
3263
3264 Returns -> typing.Sequence[~ModelUserInfoResult]
3265 '''
3266 # map input types to rpc msg
3267 _params = dict()
3268 msg = dict(type='Client',
3269 request='ModelUserInfo',
3270 version=1,
3271 params=_params)
3272
3273 reply = await self.rpc(msg)
3274 return reply
3275
3276
3277
3278 @ReturnMapping(PrivateAddressResults)
3279 async def PrivateAddress(self, target):
3280 '''
3281 target : str
3282 Returns -> str
3283 '''
3284 # map input types to rpc msg
3285 _params = dict()
3286 msg = dict(type='Client',
3287 request='PrivateAddress',
3288 version=1,
3289 params=_params)
3290 _params['target'] = target
3291 reply = await self.rpc(msg)
3292 return reply
3293
3294
3295
3296 @ReturnMapping(ProvisioningScriptResult)
3297 async def ProvisioningScript(self, data_dir, disable_package_commands, machine_id, nonce):
3298 '''
3299 data_dir : str
3300 disable_package_commands : bool
3301 machine_id : str
3302 nonce : str
3303 Returns -> str
3304 '''
3305 # map input types to rpc msg
3306 _params = dict()
3307 msg = dict(type='Client',
3308 request='ProvisioningScript',
3309 version=1,
3310 params=_params)
3311 _params['data-dir'] = data_dir
3312 _params['disable-package-commands'] = disable_package_commands
3313 _params['machine-id'] = machine_id
3314 _params['nonce'] = nonce
3315 reply = await self.rpc(msg)
3316 return reply
3317
3318
3319
3320 @ReturnMapping(PublicAddressResults)
3321 async def PublicAddress(self, target):
3322 '''
3323 target : str
3324 Returns -> str
3325 '''
3326 # map input types to rpc msg
3327 _params = dict()
3328 msg = dict(type='Client',
3329 request='PublicAddress',
3330 version=1,
3331 params=_params)
3332 _params['target'] = target
3333 reply = await self.rpc(msg)
3334 return reply
3335
3336
3337
3338 @ReturnMapping(ResolveCharmResults)
3339 async def ResolveCharms(self, references):
3340 '''
3341 references : typing.Sequence[str]
3342 Returns -> typing.Sequence[~ResolveCharmResult]
3343 '''
3344 # map input types to rpc msg
3345 _params = dict()
3346 msg = dict(type='Client',
3347 request='ResolveCharms',
3348 version=1,
3349 params=_params)
3350 _params['references'] = references
3351 reply = await self.rpc(msg)
3352 return reply
3353
3354
3355
3356 @ReturnMapping(None)
3357 async def Resolved(self, retry, unit_name):
3358 '''
3359 retry : bool
3360 unit_name : str
3361 Returns -> None
3362 '''
3363 # map input types to rpc msg
3364 _params = dict()
3365 msg = dict(type='Client',
3366 request='Resolved',
3367 version=1,
3368 params=_params)
3369 _params['retry'] = retry
3370 _params['unit-name'] = unit_name
3371 reply = await self.rpc(msg)
3372 return reply
3373
3374
3375
3376 @ReturnMapping(ErrorResults)
3377 async def RetryProvisioning(self, entities):
3378 '''
3379 entities : typing.Sequence[~Entity]
3380 Returns -> typing.Sequence[~ErrorResult]
3381 '''
3382 # map input types to rpc msg
3383 _params = dict()
3384 msg = dict(type='Client',
3385 request='RetryProvisioning',
3386 version=1,
3387 params=_params)
3388 _params['entities'] = entities
3389 reply = await self.rpc(msg)
3390 return reply
3391
3392
3393
3394 @ReturnMapping(StringResult)
3395 async def SLALevel(self):
3396 '''
3397
3398 Returns -> typing.Union[_ForwardRef('Error'), str]
3399 '''
3400 # map input types to rpc msg
3401 _params = dict()
3402 msg = dict(type='Client',
3403 request='SLALevel',
3404 version=1,
3405 params=_params)
3406
3407 reply = await self.rpc(msg)
3408 return reply
3409
3410
3411
3412 @ReturnMapping(None)
3413 async def SetModelAgentVersion(self, version):
3414 '''
3415 version : Number
3416 Returns -> None
3417 '''
3418 # map input types to rpc msg
3419 _params = dict()
3420 msg = dict(type='Client',
3421 request='SetModelAgentVersion',
3422 version=1,
3423 params=_params)
3424 _params['version'] = version
3425 reply = await self.rpc(msg)
3426 return reply
3427
3428
3429
3430 @ReturnMapping(None)
3431 async def SetModelConstraints(self, application, constraints):
3432 '''
3433 application : str
3434 constraints : Value
3435 Returns -> None
3436 '''
3437 # map input types to rpc msg
3438 _params = dict()
3439 msg = dict(type='Client',
3440 request='SetModelConstraints',
3441 version=1,
3442 params=_params)
3443 _params['application'] = application
3444 _params['constraints'] = constraints
3445 reply = await self.rpc(msg)
3446 return reply
3447
3448
3449
3450 @ReturnMapping(None)
3451 async def SetSLALevel(self, creds, level):
3452 '''
3453 creds : typing.Sequence[int]
3454 level : str
3455 Returns -> None
3456 '''
3457 # map input types to rpc msg
3458 _params = dict()
3459 msg = dict(type='Client',
3460 request='SetSLALevel',
3461 version=1,
3462 params=_params)
3463 _params['creds'] = creds
3464 _params['level'] = level
3465 reply = await self.rpc(msg)
3466 return reply
3467
3468
3469
3470 @ReturnMapping(StatusHistoryResults)
3471 async def StatusHistory(self, requests):
3472 '''
3473 requests : typing.Sequence[~StatusHistoryRequest]
3474 Returns -> typing.Sequence[~StatusHistoryResult]
3475 '''
3476 # map input types to rpc msg
3477 _params = dict()
3478 msg = dict(type='Client',
3479 request='StatusHistory',
3480 version=1,
3481 params=_params)
3482 _params['requests'] = requests
3483 reply = await self.rpc(msg)
3484 return reply
3485
3486
3487
3488 @ReturnMapping(AllWatcherId)
3489 async def WatchAll(self):
3490 '''
3491
3492 Returns -> str
3493 '''
3494 # map input types to rpc msg
3495 _params = dict()
3496 msg = dict(type='Client',
3497 request='WatchAll',
3498 version=1,
3499 params=_params)
3500
3501 reply = await self.rpc(msg)
3502 return reply
3503
3504
3505
3506 class CloudFacade(Type):
3507 name = 'Cloud'
3508 version = 1
3509 schema = {'definitions': {'Cloud': {'additionalProperties': False,
3510 'properties': {'auth-types': {'items': {'type': 'string'},
3511 'type': 'array'},
3512 'endpoint': {'type': 'string'},
3513 'identity-endpoint': {'type': 'string'},
3514 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
3515 'type': 'array'},
3516 'storage-endpoint': {'type': 'string'},
3517 'type': {'type': 'string'}},
3518 'required': ['type'],
3519 'type': 'object'},
3520 'CloudCredential': {'additionalProperties': False,
3521 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
3522 'type': 'object'},
3523 'auth-type': {'type': 'string'},
3524 'redacted': {'items': {'type': 'string'},
3525 'type': 'array'}},
3526 'required': ['auth-type'],
3527 'type': 'object'},
3528 'CloudCredentialResult': {'additionalProperties': False,
3529 'properties': {'error': {'$ref': '#/definitions/Error'},
3530 'result': {'$ref': '#/definitions/CloudCredential'}},
3531 'type': 'object'},
3532 'CloudCredentialResults': {'additionalProperties': False,
3533 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
3534 'type': 'array'}},
3535 'type': 'object'},
3536 'CloudInstanceTypesConstraint': {'additionalProperties': False,
3537 'properties': {'cloud-tag': {'type': 'string'},
3538 'constraints': {'$ref': '#/definitions/Value'},
3539 'region': {'type': 'string'}},
3540 'required': ['cloud-tag',
3541 'region'],
3542 'type': 'object'},
3543 'CloudInstanceTypesConstraints': {'additionalProperties': False,
3544 'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'},
3545 'type': 'array'}},
3546 'required': ['constraints'],
3547 'type': 'object'},
3548 'CloudRegion': {'additionalProperties': False,
3549 'properties': {'endpoint': {'type': 'string'},
3550 'identity-endpoint': {'type': 'string'},
3551 'name': {'type': 'string'},
3552 'storage-endpoint': {'type': 'string'}},
3553 'required': ['name'],
3554 'type': 'object'},
3555 'CloudResult': {'additionalProperties': False,
3556 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
3557 'error': {'$ref': '#/definitions/Error'}},
3558 'type': 'object'},
3559 'CloudResults': {'additionalProperties': False,
3560 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
3561 'type': 'array'}},
3562 'type': 'object'},
3563 'CloudsResult': {'additionalProperties': False,
3564 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
3565 'type': 'object'}},
3566 'type': 'object'},
3567 'Entities': {'additionalProperties': False,
3568 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3569 'type': 'array'}},
3570 'required': ['entities'],
3571 'type': 'object'},
3572 'Entity': {'additionalProperties': False,
3573 'properties': {'tag': {'type': 'string'}},
3574 'required': ['tag'],
3575 'type': 'object'},
3576 'Error': {'additionalProperties': False,
3577 'properties': {'code': {'type': 'string'},
3578 'info': {'$ref': '#/definitions/ErrorInfo'},
3579 'message': {'type': 'string'}},
3580 'required': ['message', 'code'],
3581 'type': 'object'},
3582 'ErrorInfo': {'additionalProperties': False,
3583 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3584 'macaroon-path': {'type': 'string'}},
3585 'type': 'object'},
3586 'ErrorResult': {'additionalProperties': False,
3587 'properties': {'error': {'$ref': '#/definitions/Error'}},
3588 'type': 'object'},
3589 'ErrorResults': {'additionalProperties': False,
3590 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3591 'type': 'array'}},
3592 'required': ['results'],
3593 'type': 'object'},
3594 'InstanceType': {'additionalProperties': False,
3595 'properties': {'arches': {'items': {'type': 'string'},
3596 'type': 'array'},
3597 'cost': {'type': 'integer'},
3598 'cpu-cores': {'type': 'integer'},
3599 'deprecated': {'type': 'boolean'},
3600 'memory': {'type': 'integer'},
3601 'name': {'type': 'string'},
3602 'root-disk': {'type': 'integer'},
3603 'virt-type': {'type': 'string'}},
3604 'required': ['arches', 'cpu-cores', 'memory'],
3605 'type': 'object'},
3606 'InstanceTypesResult': {'additionalProperties': False,
3607 'properties': {'cost-currency': {'type': 'string'},
3608 'cost-divisor': {'type': 'integer'},
3609 'cost-unit': {'type': 'string'},
3610 'error': {'$ref': '#/definitions/Error'},
3611 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
3612 'type': 'array'}},
3613 'type': 'object'},
3614 'InstanceTypesResults': {'additionalProperties': False,
3615 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
3616 'type': 'array'}},
3617 'required': ['results'],
3618 'type': 'object'},
3619 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3620 'StringResult': {'additionalProperties': False,
3621 'properties': {'error': {'$ref': '#/definitions/Error'},
3622 'result': {'type': 'string'}},
3623 'required': ['result'],
3624 'type': 'object'},
3625 'StringsResult': {'additionalProperties': False,
3626 'properties': {'error': {'$ref': '#/definitions/Error'},
3627 'result': {'items': {'type': 'string'},
3628 'type': 'array'}},
3629 'type': 'object'},
3630 'StringsResults': {'additionalProperties': False,
3631 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
3632 'type': 'array'}},
3633 'required': ['results'],
3634 'type': 'object'},
3635 'UpdateCloudCredential': {'additionalProperties': False,
3636 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
3637 'tag': {'type': 'string'}},
3638 'required': ['tag', 'credential'],
3639 'type': 'object'},
3640 'UpdateCloudCredentials': {'additionalProperties': False,
3641 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'},
3642 'type': 'array'}},
3643 'type': 'object'},
3644 'UserCloud': {'additionalProperties': False,
3645 'properties': {'cloud-tag': {'type': 'string'},
3646 'user-tag': {'type': 'string'}},
3647 'required': ['user-tag', 'cloud-tag'],
3648 'type': 'object'},
3649 'UserClouds': {'additionalProperties': False,
3650 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
3651 'type': 'array'}},
3652 'type': 'object'},
3653 'Value': {'additionalProperties': False,
3654 'properties': {'arch': {'type': 'string'},
3655 'container': {'type': 'string'},
3656 'cores': {'type': 'integer'},
3657 'cpu-power': {'type': 'integer'},
3658 'instance-type': {'type': 'string'},
3659 'mem': {'type': 'integer'},
3660 'root-disk': {'type': 'integer'},
3661 'spaces': {'items': {'type': 'string'},
3662 'type': 'array'},
3663 'tags': {'items': {'type': 'string'},
3664 'type': 'array'},
3665 'virt-type': {'type': 'string'}},
3666 'type': 'object'}},
3667 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3668 'Result': {'$ref': '#/definitions/CloudResults'}},
3669 'type': 'object'},
3670 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
3671 'type': 'object'},
3672 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3673 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
3674 'type': 'object'},
3675 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3676 'type': 'object'},
3677 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
3678 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
3679 'type': 'object'},
3680 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3681 'Result': {'$ref': '#/definitions/ErrorResults'}},
3682 'type': 'object'},
3683 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'},
3684 'Result': {'$ref': '#/definitions/ErrorResults'}},
3685 'type': 'object'},
3686 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
3687 'Result': {'$ref': '#/definitions/StringsResults'}},
3688 'type': 'object'}},
3689 'type': 'object'}
3690
3691
3692 @ReturnMapping(CloudResults)
3693 async def Cloud(self, entities):
3694 '''
3695 entities : typing.Sequence[~Entity]
3696 Returns -> typing.Sequence[~CloudResult]
3697 '''
3698 # map input types to rpc msg
3699 _params = dict()
3700 msg = dict(type='Cloud',
3701 request='Cloud',
3702 version=1,
3703 params=_params)
3704 _params['entities'] = entities
3705 reply = await self.rpc(msg)
3706 return reply
3707
3708
3709
3710 @ReturnMapping(CloudsResult)
3711 async def Clouds(self):
3712 '''
3713
3714 Returns -> typing.Mapping[str, ~Cloud]
3715 '''
3716 # map input types to rpc msg
3717 _params = dict()
3718 msg = dict(type='Cloud',
3719 request='Clouds',
3720 version=1,
3721 params=_params)
3722
3723 reply = await self.rpc(msg)
3724 return reply
3725
3726
3727
3728 @ReturnMapping(CloudCredentialResults)
3729 async def Credential(self, entities):
3730 '''
3731 entities : typing.Sequence[~Entity]
3732 Returns -> typing.Sequence[~CloudCredentialResult]
3733 '''
3734 # map input types to rpc msg
3735 _params = dict()
3736 msg = dict(type='Cloud',
3737 request='Credential',
3738 version=1,
3739 params=_params)
3740 _params['entities'] = entities
3741 reply = await self.rpc(msg)
3742 return reply
3743
3744
3745
3746 @ReturnMapping(StringResult)
3747 async def DefaultCloud(self):
3748 '''
3749
3750 Returns -> typing.Union[_ForwardRef('Error'), str]
3751 '''
3752 # map input types to rpc msg
3753 _params = dict()
3754 msg = dict(type='Cloud',
3755 request='DefaultCloud',
3756 version=1,
3757 params=_params)
3758
3759 reply = await self.rpc(msg)
3760 return reply
3761
3762
3763
3764 @ReturnMapping(InstanceTypesResults)
3765 async def InstanceTypes(self, constraints):
3766 '''
3767 constraints : typing.Sequence[~CloudInstanceTypesConstraint]
3768 Returns -> typing.Sequence[~InstanceTypesResult]
3769 '''
3770 # map input types to rpc msg
3771 _params = dict()
3772 msg = dict(type='Cloud',
3773 request='InstanceTypes',
3774 version=1,
3775 params=_params)
3776 _params['constraints'] = constraints
3777 reply = await self.rpc(msg)
3778 return reply
3779
3780
3781
3782 @ReturnMapping(ErrorResults)
3783 async def RevokeCredentials(self, entities):
3784 '''
3785 entities : typing.Sequence[~Entity]
3786 Returns -> typing.Sequence[~ErrorResult]
3787 '''
3788 # map input types to rpc msg
3789 _params = dict()
3790 msg = dict(type='Cloud',
3791 request='RevokeCredentials',
3792 version=1,
3793 params=_params)
3794 _params['entities'] = entities
3795 reply = await self.rpc(msg)
3796 return reply
3797
3798
3799
3800 @ReturnMapping(ErrorResults)
3801 async def UpdateCredentials(self, credentials):
3802 '''
3803 credentials : typing.Sequence[~UpdateCloudCredential]
3804 Returns -> typing.Sequence[~ErrorResult]
3805 '''
3806 # map input types to rpc msg
3807 _params = dict()
3808 msg = dict(type='Cloud',
3809 request='UpdateCredentials',
3810 version=1,
3811 params=_params)
3812 _params['credentials'] = credentials
3813 reply = await self.rpc(msg)
3814 return reply
3815
3816
3817
3818 @ReturnMapping(StringsResults)
3819 async def UserCredentials(self, user_clouds):
3820 '''
3821 user_clouds : typing.Sequence[~UserCloud]
3822 Returns -> typing.Sequence[~StringsResult]
3823 '''
3824 # map input types to rpc msg
3825 _params = dict()
3826 msg = dict(type='Cloud',
3827 request='UserCredentials',
3828 version=1,
3829 params=_params)
3830 _params['user-clouds'] = user_clouds
3831 reply = await self.rpc(msg)
3832 return reply
3833
3834
3835
3836 class CredentialManagerFacade(Type):
3837 name = 'CredentialManager'
3838 version = 1
3839 schema = {'definitions': {'Error': {'additionalProperties': False,
3840 'properties': {'code': {'type': 'string'},
3841 'info': {'$ref': '#/definitions/ErrorInfo'},
3842 'message': {'type': 'string'}},
3843 'required': ['message', 'code'],
3844 'type': 'object'},
3845 'ErrorInfo': {'additionalProperties': False,
3846 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3847 'macaroon-path': {'type': 'string'}},
3848 'type': 'object'},
3849 'ErrorResult': {'additionalProperties': False,
3850 'properties': {'error': {'$ref': '#/definitions/Error'}},
3851 'type': 'object'},
3852 'InvalidateCredentialArg': {'additionalProperties': False,
3853 'properties': {'reason': {'type': 'string'}},
3854 'type': 'object'},
3855 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
3856 'properties': {'InvalidateModelCredential': {'properties': {'Params': {'$ref': '#/definitions/InvalidateCredentialArg'},
3857 'Result': {'$ref': '#/definitions/ErrorResult'}},
3858 'type': 'object'}},
3859 'type': 'object'}
3860
3861
3862 @ReturnMapping(ErrorResult)
3863 async def InvalidateModelCredential(self, reason):
3864 '''
3865 reason : str
3866 Returns -> Error
3867 '''
3868 # map input types to rpc msg
3869 _params = dict()
3870 msg = dict(type='CredentialManager',
3871 request='InvalidateModelCredential',
3872 version=1,
3873 params=_params)
3874 _params['reason'] = reason
3875 reply = await self.rpc(msg)
3876 return reply
3877
3878
3879
3880 class CrossControllerFacade(Type):
3881 name = 'CrossController'
3882 version = 1
3883 schema = {'definitions': {'ControllerAPIInfoResult': {'additionalProperties': False,
3884 'properties': {'addresses': {'items': {'type': 'string'},
3885 'type': 'array'},
3886 'cacert': {'type': 'string'},
3887 'error': {'$ref': '#/definitions/Error'}},
3888 'required': ['addresses',
3889 'cacert'],
3890 'type': 'object'},
3891 'ControllerAPIInfoResults': {'additionalProperties': False,
3892 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
3893 'type': 'array'}},
3894 'required': ['results'],
3895 'type': 'object'},
3896 'Error': {'additionalProperties': False,
3897 'properties': {'code': {'type': 'string'},
3898 'info': {'$ref': '#/definitions/ErrorInfo'},
3899 'message': {'type': 'string'}},
3900 'required': ['message', 'code'],
3901 'type': 'object'},
3902 'ErrorInfo': {'additionalProperties': False,
3903 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3904 'macaroon-path': {'type': 'string'}},
3905 'type': 'object'},
3906 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3907 'NotifyWatchResult': {'additionalProperties': False,
3908 'properties': {'NotifyWatcherId': {'type': 'string'},
3909 'error': {'$ref': '#/definitions/Error'}},
3910 'required': ['NotifyWatcherId'],
3911 'type': 'object'},
3912 'NotifyWatchResults': {'additionalProperties': False,
3913 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3914 'type': 'array'}},
3915 'required': ['results'],
3916 'type': 'object'}},
3917 'properties': {'ControllerInfo': {'properties': {'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
3918 'type': 'object'},
3919 'WatchControllerInfo': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3920 'type': 'object'}},
3921 'type': 'object'}
3922
3923
3924 @ReturnMapping(ControllerAPIInfoResults)
3925 async def ControllerInfo(self):
3926 '''
3927
3928 Returns -> typing.Sequence[~ControllerAPIInfoResult]
3929 '''
3930 # map input types to rpc msg
3931 _params = dict()
3932 msg = dict(type='CrossController',
3933 request='ControllerInfo',
3934 version=1,
3935 params=_params)
3936
3937 reply = await self.rpc(msg)
3938 return reply
3939
3940
3941
3942 @ReturnMapping(NotifyWatchResults)
3943 async def WatchControllerInfo(self):
3944 '''
3945
3946 Returns -> typing.Sequence[~NotifyWatchResult]
3947 '''
3948 # map input types to rpc msg
3949 _params = dict()
3950 msg = dict(type='CrossController',
3951 request='WatchControllerInfo',
3952 version=1,
3953 params=_params)
3954
3955 reply = await self.rpc(msg)
3956 return reply
3957
3958
3959
3960 class CrossModelRelationsFacade(Type):
3961 name = 'CrossModelRelations'
3962 version = 1
3963 schema = {'definitions': {'EntityStatus': {'additionalProperties': False,
3964 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3965 'type': 'object'}},
3966 'type': 'object'},
3967 'info': {'type': 'string'},
3968 'since': {'format': 'date-time',
3969 'type': 'string'},
3970 'status': {'type': 'string'}},
3971 'required': ['status', 'info', 'since'],
3972 'type': 'object'},
3973 'Error': {'additionalProperties': False,
3974 'properties': {'code': {'type': 'string'},
3975 'info': {'$ref': '#/definitions/ErrorInfo'},
3976 'message': {'type': 'string'}},
3977 'required': ['message', 'code'],
3978 'type': 'object'},
3979 'ErrorInfo': {'additionalProperties': False,
3980 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3981 'macaroon-path': {'type': 'string'}},
3982 'type': 'object'},
3983 'ErrorResult': {'additionalProperties': False,
3984 'properties': {'error': {'$ref': '#/definitions/Error'}},
3985 'type': 'object'},
3986 'ErrorResults': {'additionalProperties': False,
3987 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3988 'type': 'array'}},
3989 'required': ['results'],
3990 'type': 'object'},
3991 'IngressNetworksChangeEvent': {'additionalProperties': False,
3992 'properties': {'application-token': {'type': 'string'},
3993 'ingress-required': {'type': 'boolean'},
3994 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
3995 'type': 'array'},
3996 'networks': {'items': {'type': 'string'},
3997 'type': 'array'},
3998 'relation-token': {'type': 'string'}},
3999 'required': ['relation-token',
4000 'application-token',
4001 'ingress-required'],
4002 'type': 'object'},
4003 'IngressNetworksChanges': {'additionalProperties': False,
4004 'properties': {'changes': {'items': {'$ref': '#/definitions/IngressNetworksChangeEvent'},
4005 'type': 'array'}},
4006 'type': 'object'},
4007 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4008 'OfferArg': {'additionalProperties': False,
4009 'properties': {'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
4010 'type': 'array'},
4011 'offer-uuid': {'type': 'string'}},
4012 'required': ['offer-uuid'],
4013 'type': 'object'},
4014 'OfferArgs': {'additionalProperties': False,
4015 'properties': {'args': {'items': {'$ref': '#/definitions/OfferArg'},
4016 'type': 'array'}},
4017 'required': ['args'],
4018 'type': 'object'},
4019 'OfferStatusChange': {'additionalProperties': False,
4020 'properties': {'offer-name': {'type': 'string'},
4021 'status': {'$ref': '#/definitions/EntityStatus'}},
4022 'required': ['offer-name', 'status'],
4023 'type': 'object'},
4024 'OfferStatusWatchResult': {'additionalProperties': False,
4025 'properties': {'changes': {'items': {'$ref': '#/definitions/OfferStatusChange'},
4026 'type': 'array'},
4027 'error': {'$ref': '#/definitions/Error'},
4028 'watcher-id': {'type': 'string'}},
4029 'required': ['watcher-id',
4030 'changes'],
4031 'type': 'object'},
4032 'OfferStatusWatchResults': {'additionalProperties': False,
4033 'properties': {'results': {'items': {'$ref': '#/definitions/OfferStatusWatchResult'},
4034 'type': 'array'}},
4035 'required': ['results'],
4036 'type': 'object'},
4037 'RegisterRemoteRelationArg': {'additionalProperties': False,
4038 'properties': {'application-token': {'type': 'string'},
4039 'local-endpoint-name': {'type': 'string'},
4040 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
4041 'type': 'array'},
4042 'offer-uuid': {'type': 'string'},
4043 'relation-token': {'type': 'string'},
4044 'remote-endpoint': {'$ref': '#/definitions/RemoteEndpoint'},
4045 'remote-space': {'$ref': '#/definitions/RemoteSpace'},
4046 'source-model-tag': {'type': 'string'}},
4047 'required': ['application-token',
4048 'source-model-tag',
4049 'relation-token',
4050 'remote-endpoint',
4051 'remote-space',
4052 'offer-uuid',
4053 'local-endpoint-name'],
4054 'type': 'object'},
4055 'RegisterRemoteRelationArgs': {'additionalProperties': False,
4056 'properties': {'relations': {'items': {'$ref': '#/definitions/RegisterRemoteRelationArg'},
4057 'type': 'array'}},
4058 'required': ['relations'],
4059 'type': 'object'},
4060 'RegisterRemoteRelationResult': {'additionalProperties': False,
4061 'properties': {'error': {'$ref': '#/definitions/Error'},
4062 'result': {'$ref': '#/definitions/RemoteRelationDetails'}},
4063 'type': 'object'},
4064 'RegisterRemoteRelationResults': {'additionalProperties': False,
4065 'properties': {'results': {'items': {'$ref': '#/definitions/RegisterRemoteRelationResult'},
4066 'type': 'array'}},
4067 'type': 'object'},
4068 'RelationLifeSuspendedStatusChange': {'additionalProperties': False,
4069 'properties': {'key': {'type': 'string'},
4070 'life': {'type': 'string'},
4071 'suspended': {'type': 'boolean'},
4072 'suspended-reason': {'type': 'string'}},
4073 'required': ['key',
4074 'life',
4075 'suspended',
4076 'suspended-reason'],
4077 'type': 'object'},
4078 'RelationLifeSuspendedStatusWatchResult': {'additionalProperties': False,
4079 'properties': {'changes': {'items': {'$ref': '#/definitions/RelationLifeSuspendedStatusChange'},
4080 'type': 'array'},
4081 'error': {'$ref': '#/definitions/Error'},
4082 'watcher-id': {'type': 'string'}},
4083 'required': ['watcher-id',
4084 'changes'],
4085 'type': 'object'},
4086 'RelationStatusWatchResults': {'additionalProperties': False,
4087 'properties': {'results': {'items': {'$ref': '#/definitions/RelationLifeSuspendedStatusWatchResult'},
4088 'type': 'array'}},
4089 'required': ['results'],
4090 'type': 'object'},
4091 'RelationUnitsChange': {'additionalProperties': False,
4092 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
4093 'type': 'object'},
4094 'departed': {'items': {'type': 'string'},
4095 'type': 'array'}},
4096 'required': ['changed'],
4097 'type': 'object'},
4098 'RelationUnitsWatchResult': {'additionalProperties': False,
4099 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
4100 'error': {'$ref': '#/definitions/Error'},
4101 'watcher-id': {'type': 'string'}},
4102 'required': ['watcher-id',
4103 'changes'],
4104 'type': 'object'},
4105 'RelationUnitsWatchResults': {'additionalProperties': False,
4106 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
4107 'type': 'array'}},
4108 'required': ['results'],
4109 'type': 'object'},
4110 'RemoteEndpoint': {'additionalProperties': False,
4111 'properties': {'interface': {'type': 'string'},
4112 'limit': {'type': 'integer'},
4113 'name': {'type': 'string'},
4114 'role': {'type': 'string'}},
4115 'required': ['name',
4116 'role',
4117 'interface',
4118 'limit'],
4119 'type': 'object'},
4120 'RemoteEntityArg': {'additionalProperties': False,
4121 'properties': {'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
4122 'type': 'array'},
4123 'relation-token': {'type': 'string'}},
4124 'required': ['relation-token'],
4125 'type': 'object'},
4126 'RemoteEntityArgs': {'additionalProperties': False,
4127 'properties': {'args': {'items': {'$ref': '#/definitions/RemoteEntityArg'},
4128 'type': 'array'}},
4129 'required': ['args'],
4130 'type': 'object'},
4131 'RemoteRelationChangeEvent': {'additionalProperties': False,
4132 'properties': {'application-token': {'type': 'string'},
4133 'changed-units': {'items': {'$ref': '#/definitions/RemoteRelationUnitChange'},
4134 'type': 'array'},
4135 'departed-units': {'items': {'type': 'integer'},
4136 'type': 'array'},
4137 'force-cleanup': {'type': 'boolean'},
4138 'life': {'type': 'string'},
4139 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
4140 'type': 'array'},
4141 'relation-token': {'type': 'string'},
4142 'suspended': {'type': 'boolean'},
4143 'suspended-reason': {'type': 'string'}},
4144 'required': ['relation-token',
4145 'application-token',
4146 'life'],
4147 'type': 'object'},
4148 'RemoteRelationDetails': {'additionalProperties': False,
4149 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4150 'relation-token': {'type': 'string'}},
4151 'required': ['relation-token'],
4152 'type': 'object'},
4153 'RemoteRelationUnit': {'additionalProperties': False,
4154 'properties': {'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
4155 'type': 'array'},
4156 'relation-token': {'type': 'string'},
4157 'unit': {'type': 'string'}},
4158 'required': ['relation-token', 'unit'],
4159 'type': 'object'},
4160 'RemoteRelationUnitChange': {'additionalProperties': False,
4161 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
4162 'type': 'object'}},
4163 'type': 'object'},
4164 'unit-id': {'type': 'integer'}},
4165 'required': ['unit-id'],
4166 'type': 'object'},
4167 'RemoteRelationUnits': {'additionalProperties': False,
4168 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RemoteRelationUnit'},
4169 'type': 'array'}},
4170 'required': ['relation-units'],
4171 'type': 'object'},
4172 'RemoteRelationsChanges': {'additionalProperties': False,
4173 'properties': {'changes': {'items': {'$ref': '#/definitions/RemoteRelationChangeEvent'},
4174 'type': 'array'}},
4175 'type': 'object'},
4176 'RemoteSpace': {'additionalProperties': False,
4177 'properties': {'cloud-type': {'type': 'string'},
4178 'name': {'type': 'string'},
4179 'provider-attributes': {'patternProperties': {'.*': {'additionalProperties': True,
4180 'type': 'object'}},
4181 'type': 'object'},
4182 'provider-id': {'type': 'string'},
4183 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
4184 'type': 'array'}},
4185 'required': ['cloud-type',
4186 'name',
4187 'provider-id',
4188 'provider-attributes',
4189 'subnets'],
4190 'type': 'object'},
4191 'SettingsResult': {'additionalProperties': False,
4192 'properties': {'error': {'$ref': '#/definitions/Error'},
4193 'settings': {'patternProperties': {'.*': {'type': 'string'}},
4194 'type': 'object'}},
4195 'required': ['settings'],
4196 'type': 'object'},
4197 'SettingsResults': {'additionalProperties': False,
4198 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
4199 'type': 'array'}},
4200 'required': ['results'],
4201 'type': 'object'},
4202 'StringsWatchResult': {'additionalProperties': False,
4203 'properties': {'changes': {'items': {'type': 'string'},
4204 'type': 'array'},
4205 'error': {'$ref': '#/definitions/Error'},
4206 'watcher-id': {'type': 'string'}},
4207 'required': ['watcher-id'],
4208 'type': 'object'},
4209 'StringsWatchResults': {'additionalProperties': False,
4210 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
4211 'type': 'array'}},
4212 'required': ['results'],
4213 'type': 'object'},
4214 'Subnet': {'additionalProperties': False,
4215 'properties': {'cidr': {'type': 'string'},
4216 'life': {'type': 'string'},
4217 'provider-id': {'type': 'string'},
4218 'provider-network-id': {'type': 'string'},
4219 'provider-space-id': {'type': 'string'},
4220 'space-tag': {'type': 'string'},
4221 'status': {'type': 'string'},
4222 'vlan-tag': {'type': 'integer'},
4223 'zones': {'items': {'type': 'string'},
4224 'type': 'array'}},
4225 'required': ['cidr',
4226 'vlan-tag',
4227 'life',
4228 'space-tag',
4229 'zones'],
4230 'type': 'object'},
4231 'UnitSettings': {'additionalProperties': False,
4232 'properties': {'version': {'type': 'integer'}},
4233 'required': ['version'],
4234 'type': 'object'}},
4235 'properties': {'PublishIngressNetworkChanges': {'properties': {'Params': {'$ref': '#/definitions/IngressNetworksChanges'},
4236 'Result': {'$ref': '#/definitions/ErrorResults'}},
4237 'type': 'object'},
4238 'PublishRelationChanges': {'properties': {'Params': {'$ref': '#/definitions/RemoteRelationsChanges'},
4239 'Result': {'$ref': '#/definitions/ErrorResults'}},
4240 'type': 'object'},
4241 'RegisterRemoteRelations': {'properties': {'Params': {'$ref': '#/definitions/RegisterRemoteRelationArgs'},
4242 'Result': {'$ref': '#/definitions/RegisterRemoteRelationResults'}},
4243 'type': 'object'},
4244 'RelationUnitSettings': {'properties': {'Params': {'$ref': '#/definitions/RemoteRelationUnits'},
4245 'Result': {'$ref': '#/definitions/SettingsResults'}},
4246 'type': 'object'},
4247 'WatchEgressAddressesForRelations': {'properties': {'Params': {'$ref': '#/definitions/RemoteEntityArgs'},
4248 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4249 'type': 'object'},
4250 'WatchOfferStatus': {'properties': {'Params': {'$ref': '#/definitions/OfferArgs'},
4251 'Result': {'$ref': '#/definitions/OfferStatusWatchResults'}},
4252 'type': 'object'},
4253 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RemoteEntityArgs'},
4254 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
4255 'type': 'object'},
4256 'WatchRelationsSuspendedStatus': {'properties': {'Params': {'$ref': '#/definitions/RemoteEntityArgs'},
4257 'Result': {'$ref': '#/definitions/RelationStatusWatchResults'}},
4258 'type': 'object'}},
4259 'type': 'object'}
4260
4261
4262 @ReturnMapping(ErrorResults)
4263 async def PublishIngressNetworkChanges(self, changes):
4264 '''
4265 changes : typing.Sequence[~IngressNetworksChangeEvent]
4266 Returns -> typing.Sequence[~ErrorResult]
4267 '''
4268 # map input types to rpc msg
4269 _params = dict()
4270 msg = dict(type='CrossModelRelations',
4271 request='PublishIngressNetworkChanges',
4272 version=1,
4273 params=_params)
4274 _params['changes'] = changes
4275 reply = await self.rpc(msg)
4276 return reply
4277
4278
4279
4280 @ReturnMapping(ErrorResults)
4281 async def PublishRelationChanges(self, changes):
4282 '''
4283 changes : typing.Sequence[~RemoteRelationChangeEvent]
4284 Returns -> typing.Sequence[~ErrorResult]
4285 '''
4286 # map input types to rpc msg
4287 _params = dict()
4288 msg = dict(type='CrossModelRelations',
4289 request='PublishRelationChanges',
4290 version=1,
4291 params=_params)
4292 _params['changes'] = changes
4293 reply = await self.rpc(msg)
4294 return reply
4295
4296
4297
4298 @ReturnMapping(RegisterRemoteRelationResults)
4299 async def RegisterRemoteRelations(self, relations):
4300 '''
4301 relations : typing.Sequence[~RegisterRemoteRelationArg]
4302 Returns -> typing.Sequence[~RegisterRemoteRelationResult]
4303 '''
4304 # map input types to rpc msg
4305 _params = dict()
4306 msg = dict(type='CrossModelRelations',
4307 request='RegisterRemoteRelations',
4308 version=1,
4309 params=_params)
4310 _params['relations'] = relations
4311 reply = await self.rpc(msg)
4312 return reply
4313
4314
4315
4316 @ReturnMapping(SettingsResults)
4317 async def RelationUnitSettings(self, relation_units):
4318 '''
4319 relation_units : typing.Sequence[~RemoteRelationUnit]
4320 Returns -> typing.Sequence[~SettingsResult]
4321 '''
4322 # map input types to rpc msg
4323 _params = dict()
4324 msg = dict(type='CrossModelRelations',
4325 request='RelationUnitSettings',
4326 version=1,
4327 params=_params)
4328 _params['relation-units'] = relation_units
4329 reply = await self.rpc(msg)
4330 return reply
4331
4332
4333
4334 @ReturnMapping(StringsWatchResults)
4335 async def WatchEgressAddressesForRelations(self, args):
4336 '''
4337 args : typing.Sequence[~RemoteEntityArg]
4338 Returns -> typing.Sequence[~StringsWatchResult]
4339 '''
4340 # map input types to rpc msg
4341 _params = dict()
4342 msg = dict(type='CrossModelRelations',
4343 request='WatchEgressAddressesForRelations',
4344 version=1,
4345 params=_params)
4346 _params['args'] = args
4347 reply = await self.rpc(msg)
4348 return reply
4349
4350
4351
4352 @ReturnMapping(OfferStatusWatchResults)
4353 async def WatchOfferStatus(self, args):
4354 '''
4355 args : typing.Sequence[~OfferArg]
4356 Returns -> typing.Sequence[~OfferStatusWatchResult]
4357 '''
4358 # map input types to rpc msg
4359 _params = dict()
4360 msg = dict(type='CrossModelRelations',
4361 request='WatchOfferStatus',
4362 version=1,
4363 params=_params)
4364 _params['args'] = args
4365 reply = await self.rpc(msg)
4366 return reply
4367
4368
4369
4370 @ReturnMapping(RelationUnitsWatchResults)
4371 async def WatchRelationUnits(self, args):
4372 '''
4373 args : typing.Sequence[~RemoteEntityArg]
4374 Returns -> typing.Sequence[~RelationUnitsWatchResult]
4375 '''
4376 # map input types to rpc msg
4377 _params = dict()
4378 msg = dict(type='CrossModelRelations',
4379 request='WatchRelationUnits',
4380 version=1,
4381 params=_params)
4382 _params['args'] = args
4383 reply = await self.rpc(msg)
4384 return reply
4385
4386
4387
4388 @ReturnMapping(RelationStatusWatchResults)
4389 async def WatchRelationsSuspendedStatus(self, args):
4390 '''
4391 args : typing.Sequence[~RemoteEntityArg]
4392 Returns -> typing.Sequence[~RelationLifeSuspendedStatusWatchResult]
4393 '''
4394 # map input types to rpc msg
4395 _params = dict()
4396 msg = dict(type='CrossModelRelations',
4397 request='WatchRelationsSuspendedStatus',
4398 version=1,
4399 params=_params)
4400 _params['args'] = args
4401 reply = await self.rpc(msg)
4402 return reply
4403
4404
4405
4406 class DeployerFacade(Type):
4407 name = 'Deployer'
4408 version = 1
4409 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
4410 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
4411 'type': 'array'},
4412 'type': 'array'}},
4413 'required': ['servers'],
4414 'type': 'object'},
4415 'Address': {'additionalProperties': False,
4416 'properties': {'scope': {'type': 'string'},
4417 'space-name': {'type': 'string'},
4418 'type': {'type': 'string'},
4419 'value': {'type': 'string'}},
4420 'required': ['value', 'type', 'scope'],
4421 'type': 'object'},
4422 'DeployerConnectionValues': {'additionalProperties': False,
4423 'properties': {'api-addresses': {'items': {'type': 'string'},
4424 'type': 'array'}},
4425 'required': ['api-addresses'],
4426 'type': 'object'},
4427 'Entities': {'additionalProperties': False,
4428 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
4429 'type': 'array'}},
4430 'required': ['entities'],
4431 'type': 'object'},
4432 'Entity': {'additionalProperties': False,
4433 'properties': {'tag': {'type': 'string'}},
4434 'required': ['tag'],
4435 'type': 'object'},
4436 'EntityPassword': {'additionalProperties': False,
4437 'properties': {'password': {'type': 'string'},
4438 'tag': {'type': 'string'}},
4439 'required': ['tag', 'password'],
4440 'type': 'object'},
4441 'EntityPasswords': {'additionalProperties': False,
4442 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
4443 'type': 'array'}},
4444 'required': ['changes'],
4445 'type': 'object'},
4446 'EntityStatusArgs': {'additionalProperties': False,
4447 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
4448 'type': 'object'}},
4449 'type': 'object'},
4450 'info': {'type': 'string'},
4451 'status': {'type': 'string'},
4452 'tag': {'type': 'string'}},
4453 'required': ['tag',
4454 'status',
4455 'info',
4456 'data'],
4457 'type': 'object'},
4458 'Error': {'additionalProperties': False,
4459 'properties': {'code': {'type': 'string'},
4460 'info': {'$ref': '#/definitions/ErrorInfo'},
4461 'message': {'type': 'string'}},
4462 'required': ['message', 'code'],
4463 'type': 'object'},
4464 'ErrorInfo': {'additionalProperties': False,
4465 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4466 'macaroon-path': {'type': 'string'}},
4467 'type': 'object'},
4468 'ErrorResult': {'additionalProperties': False,
4469 'properties': {'error': {'$ref': '#/definitions/Error'}},
4470 'type': 'object'},
4471 'ErrorResults': {'additionalProperties': False,
4472 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4473 'type': 'array'}},
4474 'required': ['results'],
4475 'type': 'object'},
4476 'HostPort': {'additionalProperties': False,
4477 'properties': {'Address': {'$ref': '#/definitions/Address'},
4478 'port': {'type': 'integer'}},
4479 'required': ['Address', 'port'],
4480 'type': 'object'},
4481 'LifeResult': {'additionalProperties': False,
4482 'properties': {'error': {'$ref': '#/definitions/Error'},
4483 'life': {'type': 'string'}},
4484 'required': ['life'],
4485 'type': 'object'},
4486 'LifeResults': {'additionalProperties': False,
4487 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
4488 'type': 'array'}},
4489 'required': ['results'],
4490 'type': 'object'},
4491 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4492 'NotifyWatchResult': {'additionalProperties': False,
4493 'properties': {'NotifyWatcherId': {'type': 'string'},
4494 'error': {'$ref': '#/definitions/Error'}},
4495 'required': ['NotifyWatcherId'],
4496 'type': 'object'},
4497 'SetStatus': {'additionalProperties': False,
4498 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
4499 'type': 'array'}},
4500 'required': ['entities'],
4501 'type': 'object'},
4502 'StringResult': {'additionalProperties': False,
4503 'properties': {'error': {'$ref': '#/definitions/Error'},
4504 'result': {'type': 'string'}},
4505 'required': ['result'],
4506 'type': 'object'},
4507 'StringsResult': {'additionalProperties': False,
4508 'properties': {'error': {'$ref': '#/definitions/Error'},
4509 'result': {'items': {'type': 'string'},
4510 'type': 'array'}},
4511 'type': 'object'},
4512 'StringsWatchResult': {'additionalProperties': False,
4513 'properties': {'changes': {'items': {'type': 'string'},
4514 'type': 'array'},
4515 'error': {'$ref': '#/definitions/Error'},
4516 'watcher-id': {'type': 'string'}},
4517 'required': ['watcher-id'],
4518 'type': 'object'},
4519 'StringsWatchResults': {'additionalProperties': False,
4520 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
4521 'type': 'array'}},
4522 'required': ['results'],
4523 'type': 'object'}},
4524 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
4525 'type': 'object'},
4526 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
4527 'type': 'object'},
4528 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
4529 'type': 'object'},
4530 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4531 'Result': {'$ref': '#/definitions/LifeResults'}},
4532 'type': 'object'},
4533 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
4534 'type': 'object'},
4535 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4536 'Result': {'$ref': '#/definitions/ErrorResults'}},
4537 'type': 'object'},
4538 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
4539 'Result': {'$ref': '#/definitions/ErrorResults'}},
4540 'type': 'object'},
4541 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4542 'Result': {'$ref': '#/definitions/ErrorResults'}},
4543 'type': 'object'},
4544 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4545 'Result': {'$ref': '#/definitions/ErrorResults'}},
4546 'type': 'object'},
4547 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4548 'type': 'object'},
4549 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4550 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4551 'type': 'object'}},
4552 'type': 'object'}
4553
4554
4555 @ReturnMapping(StringsResult)
4556 async def APIAddresses(self):
4557 '''
4558
4559 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
4560 '''
4561 # map input types to rpc msg
4562 _params = dict()
4563 msg = dict(type='Deployer',
4564 request='APIAddresses',
4565 version=1,
4566 params=_params)
4567
4568 reply = await self.rpc(msg)
4569 return reply
4570
4571
4572
4573 @ReturnMapping(APIHostPortsResult)
4574 async def APIHostPorts(self):
4575 '''
4576
4577 Returns -> typing.Sequence[~HostPort]
4578 '''
4579 # map input types to rpc msg
4580 _params = dict()
4581 msg = dict(type='Deployer',
4582 request='APIHostPorts',
4583 version=1,
4584 params=_params)
4585
4586 reply = await self.rpc(msg)
4587 return reply
4588
4589
4590
4591 @ReturnMapping(DeployerConnectionValues)
4592 async def ConnectionInfo(self):
4593 '''
4594
4595 Returns -> typing.Sequence[str]
4596 '''
4597 # map input types to rpc msg
4598 _params = dict()
4599 msg = dict(type='Deployer',
4600 request='ConnectionInfo',
4601 version=1,
4602 params=_params)
4603
4604 reply = await self.rpc(msg)
4605 return reply
4606
4607
4608
4609 @ReturnMapping(LifeResults)
4610 async def Life(self, entities):
4611 '''
4612 entities : typing.Sequence[~Entity]
4613 Returns -> typing.Sequence[~LifeResult]
4614 '''
4615 # map input types to rpc msg
4616 _params = dict()
4617 msg = dict(type='Deployer',
4618 request='Life',
4619 version=1,
4620 params=_params)
4621 _params['entities'] = entities
4622 reply = await self.rpc(msg)
4623 return reply
4624
4625
4626
4627 @ReturnMapping(StringResult)
4628 async def ModelUUID(self):
4629 '''
4630
4631 Returns -> typing.Union[_ForwardRef('Error'), str]
4632 '''
4633 # map input types to rpc msg
4634 _params = dict()
4635 msg = dict(type='Deployer',
4636 request='ModelUUID',
4637 version=1,
4638 params=_params)
4639
4640 reply = await self.rpc(msg)
4641 return reply
4642
4643
4644
4645 @ReturnMapping(ErrorResults)
4646 async def Remove(self, entities):
4647 '''
4648 entities : typing.Sequence[~Entity]
4649 Returns -> typing.Sequence[~ErrorResult]
4650 '''
4651 # map input types to rpc msg
4652 _params = dict()
4653 msg = dict(type='Deployer',
4654 request='Remove',
4655 version=1,
4656 params=_params)
4657 _params['entities'] = entities
4658 reply = await self.rpc(msg)
4659 return reply
4660
4661
4662
4663 @ReturnMapping(ErrorResults)
4664 async def SetPasswords(self, changes):
4665 '''
4666 changes : typing.Sequence[~EntityPassword]
4667 Returns -> typing.Sequence[~ErrorResult]
4668 '''
4669 # map input types to rpc msg
4670 _params = dict()
4671 msg = dict(type='Deployer',
4672 request='SetPasswords',
4673 version=1,
4674 params=_params)
4675 _params['changes'] = changes
4676 reply = await self.rpc(msg)
4677 return reply
4678
4679
4680
4681 @ReturnMapping(ErrorResults)
4682 async def SetStatus(self, entities):
4683 '''
4684 entities : typing.Sequence[~EntityStatusArgs]
4685 Returns -> typing.Sequence[~ErrorResult]
4686 '''
4687 # map input types to rpc msg
4688 _params = dict()
4689 msg = dict(type='Deployer',
4690 request='SetStatus',
4691 version=1,
4692 params=_params)
4693 _params['entities'] = entities
4694 reply = await self.rpc(msg)
4695 return reply
4696
4697
4698
4699 @ReturnMapping(ErrorResults)
4700 async def UpdateStatus(self, entities):
4701 '''
4702 entities : typing.Sequence[~EntityStatusArgs]
4703 Returns -> typing.Sequence[~ErrorResult]
4704 '''
4705 # map input types to rpc msg
4706 _params = dict()
4707 msg = dict(type='Deployer',
4708 request='UpdateStatus',
4709 version=1,
4710 params=_params)
4711 _params['entities'] = entities
4712 reply = await self.rpc(msg)
4713 return reply
4714
4715
4716
4717 @ReturnMapping(NotifyWatchResult)
4718 async def WatchAPIHostPorts(self):
4719 '''
4720
4721 Returns -> typing.Union[str, _ForwardRef('Error')]
4722 '''
4723 # map input types to rpc msg
4724 _params = dict()
4725 msg = dict(type='Deployer',
4726 request='WatchAPIHostPorts',
4727 version=1,
4728 params=_params)
4729
4730 reply = await self.rpc(msg)
4731 return reply
4732
4733
4734
4735 @ReturnMapping(StringsWatchResults)
4736 async def WatchUnits(self, entities):
4737 '''
4738 entities : typing.Sequence[~Entity]
4739 Returns -> typing.Sequence[~StringsWatchResult]
4740 '''
4741 # map input types to rpc msg
4742 _params = dict()
4743 msg = dict(type='Deployer',
4744 request='WatchUnits',
4745 version=1,
4746 params=_params)
4747 _params['entities'] = entities
4748 reply = await self.rpc(msg)
4749 return reply
4750
4751
4752
4753 class ExternalControllerUpdaterFacade(Type):
4754 name = 'ExternalControllerUpdater'
4755 version = 1
4756 schema = {'definitions': {'Entities': {'additionalProperties': False,
4757 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
4758 'type': 'array'}},
4759 'required': ['entities'],
4760 'type': 'object'},
4761 'Entity': {'additionalProperties': False,
4762 'properties': {'tag': {'type': 'string'}},
4763 'required': ['tag'],
4764 'type': 'object'},
4765 'Error': {'additionalProperties': False,
4766 'properties': {'code': {'type': 'string'},
4767 'info': {'$ref': '#/definitions/ErrorInfo'},
4768 'message': {'type': 'string'}},
4769 'required': ['message', 'code'],
4770 'type': 'object'},
4771 'ErrorInfo': {'additionalProperties': False,
4772 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4773 'macaroon-path': {'type': 'string'}},
4774 'type': 'object'},
4775 'ErrorResult': {'additionalProperties': False,
4776 'properties': {'error': {'$ref': '#/definitions/Error'}},
4777 'type': 'object'},
4778 'ErrorResults': {'additionalProperties': False,
4779 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4780 'type': 'array'}},
4781 'required': ['results'],
4782 'type': 'object'},
4783 'ExternalControllerInfo': {'additionalProperties': False,
4784 'properties': {'addrs': {'items': {'type': 'string'},
4785 'type': 'array'},
4786 'ca-cert': {'type': 'string'},
4787 'controller-alias': {'type': 'string'},
4788 'controller-tag': {'type': 'string'}},
4789 'required': ['controller-tag',
4790 'controller-alias',
4791 'addrs',
4792 'ca-cert'],
4793 'type': 'object'},
4794 'ExternalControllerInfoResult': {'additionalProperties': False,
4795 'properties': {'error': {'$ref': '#/definitions/Error'},
4796 'result': {'$ref': '#/definitions/ExternalControllerInfo'}},
4797 'required': ['result',
4798 'error'],
4799 'type': 'object'},
4800 'ExternalControllerInfoResults': {'additionalProperties': False,
4801 'properties': {'results': {'items': {'$ref': '#/definitions/ExternalControllerInfoResult'},
4802 'type': 'array'}},
4803 'required': ['results'],
4804 'type': 'object'},
4805 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4806 'SetExternalControllerInfoParams': {'additionalProperties': False,
4807 'properties': {'info': {'$ref': '#/definitions/ExternalControllerInfo'}},
4808 'required': ['info'],
4809 'type': 'object'},
4810 'SetExternalControllersInfoParams': {'additionalProperties': False,
4811 'properties': {'controllers': {'items': {'$ref': '#/definitions/SetExternalControllerInfoParams'},
4812 'type': 'array'}},
4813 'required': ['controllers'],
4814 'type': 'object'},
4815 'StringsWatchResult': {'additionalProperties': False,
4816 'properties': {'changes': {'items': {'type': 'string'},
4817 'type': 'array'},
4818 'error': {'$ref': '#/definitions/Error'},
4819 'watcher-id': {'type': 'string'}},
4820 'required': ['watcher-id'],
4821 'type': 'object'},
4822 'StringsWatchResults': {'additionalProperties': False,
4823 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
4824 'type': 'array'}},
4825 'required': ['results'],
4826 'type': 'object'}},
4827 'properties': {'ExternalControllerInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4828 'Result': {'$ref': '#/definitions/ExternalControllerInfoResults'}},
4829 'type': 'object'},
4830 'SetExternalControllerInfo': {'properties': {'Params': {'$ref': '#/definitions/SetExternalControllersInfoParams'},
4831 'Result': {'$ref': '#/definitions/ErrorResults'}},
4832 'type': 'object'},
4833 'WatchExternalControllers': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4834 'type': 'object'}},
4835 'type': 'object'}
4836
4837
4838 @ReturnMapping(ExternalControllerInfoResults)
4839 async def ExternalControllerInfo(self, entities):
4840 '''
4841 entities : typing.Sequence[~Entity]
4842 Returns -> typing.Sequence[~ExternalControllerInfoResult]
4843 '''
4844 # map input types to rpc msg
4845 _params = dict()
4846 msg = dict(type='ExternalControllerUpdater',
4847 request='ExternalControllerInfo',
4848 version=1,
4849 params=_params)
4850 _params['entities'] = entities
4851 reply = await self.rpc(msg)
4852 return reply
4853
4854
4855
4856 @ReturnMapping(ErrorResults)
4857 async def SetExternalControllerInfo(self, controllers):
4858 '''
4859 controllers : typing.Sequence[~SetExternalControllerInfoParams]
4860 Returns -> typing.Sequence[~ErrorResult]
4861 '''
4862 # map input types to rpc msg
4863 _params = dict()
4864 msg = dict(type='ExternalControllerUpdater',
4865 request='SetExternalControllerInfo',
4866 version=1,
4867 params=_params)
4868 _params['controllers'] = controllers
4869 reply = await self.rpc(msg)
4870 return reply
4871
4872
4873
4874 @ReturnMapping(StringsWatchResults)
4875 async def WatchExternalControllers(self):
4876 '''
4877
4878 Returns -> typing.Sequence[~StringsWatchResult]
4879 '''
4880 # map input types to rpc msg
4881 _params = dict()
4882 msg = dict(type='ExternalControllerUpdater',
4883 request='WatchExternalControllers',
4884 version=1,
4885 params=_params)
4886
4887 reply = await self.rpc(msg)
4888 return reply
4889
4890
4891
4892 class FanConfigurerFacade(Type):
4893 name = 'FanConfigurer'
4894 version = 1
4895 schema = {'definitions': {'Error': {'additionalProperties': False,
4896 'properties': {'code': {'type': 'string'},
4897 'info': {'$ref': '#/definitions/ErrorInfo'},
4898 'message': {'type': 'string'}},
4899 'required': ['message', 'code'],
4900 'type': 'object'},
4901 'ErrorInfo': {'additionalProperties': False,
4902 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4903 'macaroon-path': {'type': 'string'}},
4904 'type': 'object'},
4905 'FanConfigEntry': {'additionalProperties': False,
4906 'properties': {'overlay': {'type': 'string'},
4907 'underlay': {'type': 'string'}},
4908 'required': ['underlay', 'overlay'],
4909 'type': 'object'},
4910 'FanConfigResult': {'additionalProperties': False,
4911 'properties': {'fans': {'items': {'$ref': '#/definitions/FanConfigEntry'},
4912 'type': 'array'}},
4913 'required': ['fans'],
4914 'type': 'object'},
4915 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4916 'NotifyWatchResult': {'additionalProperties': False,
4917 'properties': {'NotifyWatcherId': {'type': 'string'},
4918 'error': {'$ref': '#/definitions/Error'}},
4919 'required': ['NotifyWatcherId'],
4920 'type': 'object'}},
4921 'properties': {'FanConfig': {'properties': {'Result': {'$ref': '#/definitions/FanConfigResult'}},
4922 'type': 'object'},
4923 'WatchForFanConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4924 'type': 'object'}},
4925 'type': 'object'}
4926
4927
4928 @ReturnMapping(FanConfigResult)
4929 async def FanConfig(self):
4930 '''
4931
4932 Returns -> typing.Sequence[~FanConfigEntry]
4933 '''
4934 # map input types to rpc msg
4935 _params = dict()
4936 msg = dict(type='FanConfigurer',
4937 request='FanConfig',
4938 version=1,
4939 params=_params)
4940
4941 reply = await self.rpc(msg)
4942 return reply
4943
4944
4945
4946 @ReturnMapping(NotifyWatchResult)
4947 async def WatchForFanConfigChanges(self):
4948 '''
4949
4950 Returns -> typing.Union[str, _ForwardRef('Error')]
4951 '''
4952 # map input types to rpc msg
4953 _params = dict()
4954 msg = dict(type='FanConfigurer',
4955 request='WatchForFanConfigChanges',
4956 version=1,
4957 params=_params)
4958
4959 reply = await self.rpc(msg)
4960 return reply
4961
4962
4963
4964 class FirewallRulesFacade(Type):
4965 name = 'FirewallRules'
4966 version = 1
4967 schema = {'definitions': {'Error': {'additionalProperties': False,
4968 'properties': {'code': {'type': 'string'},
4969 'info': {'$ref': '#/definitions/ErrorInfo'},
4970 'message': {'type': 'string'}},
4971 'required': ['message', 'code'],
4972 'type': 'object'},
4973 'ErrorInfo': {'additionalProperties': False,
4974 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4975 'macaroon-path': {'type': 'string'}},
4976 'type': 'object'},
4977 'ErrorResult': {'additionalProperties': False,
4978 'properties': {'error': {'$ref': '#/definitions/Error'}},
4979 'type': 'object'},
4980 'ErrorResults': {'additionalProperties': False,
4981 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4982 'type': 'array'}},
4983 'required': ['results'],
4984 'type': 'object'},
4985 'FirewallRule': {'additionalProperties': False,
4986 'properties': {'known-service': {'type': 'string'},
4987 'whitelist-cidrs': {'items': {'type': 'string'},
4988 'type': 'array'}},
4989 'required': ['known-service'],
4990 'type': 'object'},
4991 'FirewallRuleArgs': {'additionalProperties': False,
4992 'properties': {'args': {'items': {'$ref': '#/definitions/FirewallRule'},
4993 'type': 'array'}},
4994 'required': ['args'],
4995 'type': 'object'},
4996 'ListFirewallRulesResults': {'additionalProperties': False,
4997 'properties': {'Rules': {'items': {'$ref': '#/definitions/FirewallRule'},
4998 'type': 'array'}},
4999 'required': ['Rules'],
5000 'type': 'object'},
5001 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
5002 'properties': {'ListFirewallRules': {'properties': {'Result': {'$ref': '#/definitions/ListFirewallRulesResults'}},
5003 'type': 'object'},
5004 'SetFirewallRules': {'properties': {'Params': {'$ref': '#/definitions/FirewallRuleArgs'},
5005 'Result': {'$ref': '#/definitions/ErrorResults'}},
5006 'type': 'object'}},
5007 'type': 'object'}
5008
5009
5010 @ReturnMapping(ListFirewallRulesResults)
5011 async def ListFirewallRules(self):
5012 '''
5013
5014 Returns -> typing.Sequence[~FirewallRule]
5015 '''
5016 # map input types to rpc msg
5017 _params = dict()
5018 msg = dict(type='FirewallRules',
5019 request='ListFirewallRules',
5020 version=1,
5021 params=_params)
5022
5023 reply = await self.rpc(msg)
5024 return reply
5025
5026
5027
5028 @ReturnMapping(ErrorResults)
5029 async def SetFirewallRules(self, args):
5030 '''
5031 args : typing.Sequence[~FirewallRule]
5032 Returns -> typing.Sequence[~ErrorResult]
5033 '''
5034 # map input types to rpc msg
5035 _params = dict()
5036 msg = dict(type='FirewallRules',
5037 request='SetFirewallRules',
5038 version=1,
5039 params=_params)
5040 _params['args'] = args
5041 reply = await self.rpc(msg)
5042 return reply
5043
5044
5045
5046 class HostKeyReporterFacade(Type):
5047 name = 'HostKeyReporter'
5048 version = 1
5049 schema = {'definitions': {'Error': {'additionalProperties': False,
5050 'properties': {'code': {'type': 'string'},
5051 'info': {'$ref': '#/definitions/ErrorInfo'},
5052 'message': {'type': 'string'}},
5053 'required': ['message', 'code'],
5054 'type': 'object'},
5055 'ErrorInfo': {'additionalProperties': False,
5056 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5057 'macaroon-path': {'type': 'string'}},
5058 'type': 'object'},
5059 'ErrorResult': {'additionalProperties': False,
5060 'properties': {'error': {'$ref': '#/definitions/Error'}},
5061 'type': 'object'},
5062 'ErrorResults': {'additionalProperties': False,
5063 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5064 'type': 'array'}},
5065 'required': ['results'],
5066 'type': 'object'},
5067 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5068 'SSHHostKeySet': {'additionalProperties': False,
5069 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
5070 'type': 'array'}},
5071 'required': ['entity-keys'],
5072 'type': 'object'},
5073 'SSHHostKeys': {'additionalProperties': False,
5074 'properties': {'public-keys': {'items': {'type': 'string'},
5075 'type': 'array'},
5076 'tag': {'type': 'string'}},
5077 'required': ['tag', 'public-keys'],
5078 'type': 'object'}},
5079 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
5080 'Result': {'$ref': '#/definitions/ErrorResults'}},
5081 'type': 'object'}},
5082 'type': 'object'}
5083
5084
5085 @ReturnMapping(ErrorResults)
5086 async def ReportKeys(self, entity_keys):
5087 '''
5088 entity_keys : typing.Sequence[~SSHHostKeys]
5089 Returns -> typing.Sequence[~ErrorResult]
5090 '''
5091 # map input types to rpc msg
5092 _params = dict()
5093 msg = dict(type='HostKeyReporter',
5094 request='ReportKeys',
5095 version=1,
5096 params=_params)
5097 _params['entity-keys'] = entity_keys
5098 reply = await self.rpc(msg)
5099 return reply
5100
5101
5102
5103 class KeyManagerFacade(Type):
5104 name = 'KeyManager'
5105 version = 1
5106 schema = {'definitions': {'Entities': {'additionalProperties': False,
5107 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5108 'type': 'array'}},
5109 'required': ['entities'],
5110 'type': 'object'},
5111 'Entity': {'additionalProperties': False,
5112 'properties': {'tag': {'type': 'string'}},
5113 'required': ['tag'],
5114 'type': 'object'},
5115 'Error': {'additionalProperties': False,
5116 'properties': {'code': {'type': 'string'},
5117 'info': {'$ref': '#/definitions/ErrorInfo'},
5118 'message': {'type': 'string'}},
5119 'required': ['message', 'code'],
5120 'type': 'object'},
5121 'ErrorInfo': {'additionalProperties': False,
5122 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5123 'macaroon-path': {'type': 'string'}},
5124 'type': 'object'},
5125 'ErrorResult': {'additionalProperties': False,
5126 'properties': {'error': {'$ref': '#/definitions/Error'}},
5127 'type': 'object'},
5128 'ErrorResults': {'additionalProperties': False,
5129 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5130 'type': 'array'}},
5131 'required': ['results'],
5132 'type': 'object'},
5133 'ListSSHKeys': {'additionalProperties': False,
5134 'properties': {'entities': {'$ref': '#/definitions/Entities'},
5135 'mode': {'type': 'boolean'}},
5136 'required': ['entities', 'mode'],
5137 'type': 'object'},
5138 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5139 'ModifyUserSSHKeys': {'additionalProperties': False,
5140 'properties': {'ssh-keys': {'items': {'type': 'string'},
5141 'type': 'array'},
5142 'user': {'type': 'string'}},
5143 'required': ['user', 'ssh-keys'],
5144 'type': 'object'},
5145 'StringsResult': {'additionalProperties': False,
5146 'properties': {'error': {'$ref': '#/definitions/Error'},
5147 'result': {'items': {'type': 'string'},
5148 'type': 'array'}},
5149 'type': 'object'},
5150 'StringsResults': {'additionalProperties': False,
5151 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
5152 'type': 'array'}},
5153 'required': ['results'],
5154 'type': 'object'}},
5155 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
5156 'Result': {'$ref': '#/definitions/ErrorResults'}},
5157 'type': 'object'},
5158 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
5159 'Result': {'$ref': '#/definitions/ErrorResults'}},
5160 'type': 'object'},
5161 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
5162 'Result': {'$ref': '#/definitions/ErrorResults'}},
5163 'type': 'object'},
5164 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
5165 'Result': {'$ref': '#/definitions/StringsResults'}},
5166 'type': 'object'}},
5167 'type': 'object'}
5168
5169
5170 @ReturnMapping(ErrorResults)
5171 async def AddKeys(self, ssh_keys, user):
5172 '''
5173 ssh_keys : typing.Sequence[str]
5174 user : str
5175 Returns -> typing.Sequence[~ErrorResult]
5176 '''
5177 # map input types to rpc msg
5178 _params = dict()
5179 msg = dict(type='KeyManager',
5180 request='AddKeys',
5181 version=1,
5182 params=_params)
5183 _params['ssh-keys'] = ssh_keys
5184 _params['user'] = user
5185 reply = await self.rpc(msg)
5186 return reply
5187
5188
5189
5190 @ReturnMapping(ErrorResults)
5191 async def DeleteKeys(self, ssh_keys, user):
5192 '''
5193 ssh_keys : typing.Sequence[str]
5194 user : str
5195 Returns -> typing.Sequence[~ErrorResult]
5196 '''
5197 # map input types to rpc msg
5198 _params = dict()
5199 msg = dict(type='KeyManager',
5200 request='DeleteKeys',
5201 version=1,
5202 params=_params)
5203 _params['ssh-keys'] = ssh_keys
5204 _params['user'] = user
5205 reply = await self.rpc(msg)
5206 return reply
5207
5208
5209
5210 @ReturnMapping(ErrorResults)
5211 async def ImportKeys(self, ssh_keys, user):
5212 '''
5213 ssh_keys : typing.Sequence[str]
5214 user : str
5215 Returns -> typing.Sequence[~ErrorResult]
5216 '''
5217 # map input types to rpc msg
5218 _params = dict()
5219 msg = dict(type='KeyManager',
5220 request='ImportKeys',
5221 version=1,
5222 params=_params)
5223 _params['ssh-keys'] = ssh_keys
5224 _params['user'] = user
5225 reply = await self.rpc(msg)
5226 return reply
5227
5228
5229
5230 @ReturnMapping(StringsResults)
5231 async def ListKeys(self, entities, mode):
5232 '''
5233 entities : Entities
5234 mode : bool
5235 Returns -> typing.Sequence[~StringsResult]
5236 '''
5237 # map input types to rpc msg
5238 _params = dict()
5239 msg = dict(type='KeyManager',
5240 request='ListKeys',
5241 version=1,
5242 params=_params)
5243 _params['entities'] = entities
5244 _params['mode'] = mode
5245 reply = await self.rpc(msg)
5246 return reply
5247
5248
5249
5250 class KeyUpdaterFacade(Type):
5251 name = 'KeyUpdater'
5252 version = 1
5253 schema = {'definitions': {'Entities': {'additionalProperties': False,
5254 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5255 'type': 'array'}},
5256 'required': ['entities'],
5257 'type': 'object'},
5258 'Entity': {'additionalProperties': False,
5259 'properties': {'tag': {'type': 'string'}},
5260 'required': ['tag'],
5261 'type': 'object'},
5262 'Error': {'additionalProperties': False,
5263 'properties': {'code': {'type': 'string'},
5264 'info': {'$ref': '#/definitions/ErrorInfo'},
5265 'message': {'type': 'string'}},
5266 'required': ['message', 'code'],
5267 'type': 'object'},
5268 'ErrorInfo': {'additionalProperties': False,
5269 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5270 'macaroon-path': {'type': 'string'}},
5271 'type': 'object'},
5272 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5273 'NotifyWatchResult': {'additionalProperties': False,
5274 'properties': {'NotifyWatcherId': {'type': 'string'},
5275 'error': {'$ref': '#/definitions/Error'}},
5276 'required': ['NotifyWatcherId'],
5277 'type': 'object'},
5278 'NotifyWatchResults': {'additionalProperties': False,
5279 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5280 'type': 'array'}},
5281 'required': ['results'],
5282 'type': 'object'},
5283 'StringsResult': {'additionalProperties': False,
5284 'properties': {'error': {'$ref': '#/definitions/Error'},
5285 'result': {'items': {'type': 'string'},
5286 'type': 'array'}},
5287 'type': 'object'},
5288 'StringsResults': {'additionalProperties': False,
5289 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
5290 'type': 'array'}},
5291 'required': ['results'],
5292 'type': 'object'}},
5293 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5294 'Result': {'$ref': '#/definitions/StringsResults'}},
5295 'type': 'object'},
5296 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5297 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5298 'type': 'object'}},
5299 'type': 'object'}
5300
5301
5302 @ReturnMapping(StringsResults)
5303 async def AuthorisedKeys(self, entities):
5304 '''
5305 entities : typing.Sequence[~Entity]
5306 Returns -> typing.Sequence[~StringsResult]
5307 '''
5308 # map input types to rpc msg
5309 _params = dict()
5310 msg = dict(type='KeyUpdater',
5311 request='AuthorisedKeys',
5312 version=1,
5313 params=_params)
5314 _params['entities'] = entities
5315 reply = await self.rpc(msg)
5316 return reply
5317
5318
5319
5320 @ReturnMapping(NotifyWatchResults)
5321 async def WatchAuthorisedKeys(self, entities):
5322 '''
5323 entities : typing.Sequence[~Entity]
5324 Returns -> typing.Sequence[~NotifyWatchResult]
5325 '''
5326 # map input types to rpc msg
5327 _params = dict()
5328 msg = dict(type='KeyUpdater',
5329 request='WatchAuthorisedKeys',
5330 version=1,
5331 params=_params)
5332 _params['entities'] = entities
5333 reply = await self.rpc(msg)
5334 return reply
5335
5336
5337
5338 class LifeFlagFacade(Type):
5339 name = 'LifeFlag'
5340 version = 1
5341 schema = {'definitions': {'Entities': {'additionalProperties': False,
5342 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5343 'type': 'array'}},
5344 'required': ['entities'],
5345 'type': 'object'},
5346 'Entity': {'additionalProperties': False,
5347 'properties': {'tag': {'type': 'string'}},
5348 'required': ['tag'],
5349 'type': 'object'},
5350 'Error': {'additionalProperties': False,
5351 'properties': {'code': {'type': 'string'},
5352 'info': {'$ref': '#/definitions/ErrorInfo'},
5353 'message': {'type': 'string'}},
5354 'required': ['message', 'code'],
5355 'type': 'object'},
5356 'ErrorInfo': {'additionalProperties': False,
5357 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5358 'macaroon-path': {'type': 'string'}},
5359 'type': 'object'},
5360 'LifeResult': {'additionalProperties': False,
5361 'properties': {'error': {'$ref': '#/definitions/Error'},
5362 'life': {'type': 'string'}},
5363 'required': ['life'],
5364 'type': 'object'},
5365 'LifeResults': {'additionalProperties': False,
5366 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
5367 'type': 'array'}},
5368 'required': ['results'],
5369 'type': 'object'},
5370 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5371 'NotifyWatchResult': {'additionalProperties': False,
5372 'properties': {'NotifyWatcherId': {'type': 'string'},
5373 'error': {'$ref': '#/definitions/Error'}},
5374 'required': ['NotifyWatcherId'],
5375 'type': 'object'},
5376 'NotifyWatchResults': {'additionalProperties': False,
5377 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5378 'type': 'array'}},
5379 'required': ['results'],
5380 'type': 'object'}},
5381 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5382 'Result': {'$ref': '#/definitions/LifeResults'}},
5383 'type': 'object'},
5384 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5385 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5386 'type': 'object'}},
5387 'type': 'object'}
5388
5389
5390 @ReturnMapping(LifeResults)
5391 async def Life(self, entities):
5392 '''
5393 entities : typing.Sequence[~Entity]
5394 Returns -> typing.Sequence[~LifeResult]
5395 '''
5396 # map input types to rpc msg
5397 _params = dict()
5398 msg = dict(type='LifeFlag',
5399 request='Life',
5400 version=1,
5401 params=_params)
5402 _params['entities'] = entities
5403 reply = await self.rpc(msg)
5404 return reply
5405
5406
5407
5408 @ReturnMapping(NotifyWatchResults)
5409 async def Watch(self, entities):
5410 '''
5411 entities : typing.Sequence[~Entity]
5412 Returns -> typing.Sequence[~NotifyWatchResult]
5413 '''
5414 # map input types to rpc msg
5415 _params = dict()
5416 msg = dict(type='LifeFlag',
5417 request='Watch',
5418 version=1,
5419 params=_params)
5420 _params['entities'] = entities
5421 reply = await self.rpc(msg)
5422 return reply
5423
5424
5425
5426 class LogForwardingFacade(Type):
5427 name = 'LogForwarding'
5428 version = 1
5429 schema = {'definitions': {'Error': {'additionalProperties': False,
5430 'properties': {'code': {'type': 'string'},
5431 'info': {'$ref': '#/definitions/ErrorInfo'},
5432 'message': {'type': 'string'}},
5433 'required': ['message', 'code'],
5434 'type': 'object'},
5435 'ErrorInfo': {'additionalProperties': False,
5436 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5437 'macaroon-path': {'type': 'string'}},
5438 'type': 'object'},
5439 'ErrorResult': {'additionalProperties': False,
5440 'properties': {'error': {'$ref': '#/definitions/Error'}},
5441 'type': 'object'},
5442 'ErrorResults': {'additionalProperties': False,
5443 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5444 'type': 'array'}},
5445 'required': ['results'],
5446 'type': 'object'},
5447 'LogForwardingGetLastSentParams': {'additionalProperties': False,
5448 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
5449 'type': 'array'}},
5450 'required': ['ids'],
5451 'type': 'object'},
5452 'LogForwardingGetLastSentResult': {'additionalProperties': False,
5453 'properties': {'err': {'$ref': '#/definitions/Error'},
5454 'record-id': {'type': 'integer'},
5455 'record-timestamp': {'type': 'integer'}},
5456 'required': ['record-id',
5457 'record-timestamp',
5458 'err'],
5459 'type': 'object'},
5460 'LogForwardingGetLastSentResults': {'additionalProperties': False,
5461 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
5462 'type': 'array'}},
5463 'required': ['results'],
5464 'type': 'object'},
5465 'LogForwardingID': {'additionalProperties': False,
5466 'properties': {'model': {'type': 'string'},
5467 'sink': {'type': 'string'}},
5468 'required': ['model', 'sink'],
5469 'type': 'object'},
5470 'LogForwardingSetLastSentParam': {'additionalProperties': False,
5471 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
5472 'record-id': {'type': 'integer'},
5473 'record-timestamp': {'type': 'integer'}},
5474 'required': ['LogForwardingID',
5475 'record-id',
5476 'record-timestamp'],
5477 'type': 'object'},
5478 'LogForwardingSetLastSentParams': {'additionalProperties': False,
5479 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
5480 'type': 'array'}},
5481 'required': ['params'],
5482 'type': 'object'},
5483 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
5484 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
5485 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
5486 'type': 'object'},
5487 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
5488 'Result': {'$ref': '#/definitions/ErrorResults'}},
5489 'type': 'object'}},
5490 'type': 'object'}
5491
5492
5493 @ReturnMapping(LogForwardingGetLastSentResults)
5494 async def GetLastSent(self, ids):
5495 '''
5496 ids : typing.Sequence[~LogForwardingID]
5497 Returns -> typing.Sequence[~LogForwardingGetLastSentResult]
5498 '''
5499 # map input types to rpc msg
5500 _params = dict()
5501 msg = dict(type='LogForwarding',
5502 request='GetLastSent',
5503 version=1,
5504 params=_params)
5505 _params['ids'] = ids
5506 reply = await self.rpc(msg)
5507 return reply
5508
5509
5510
5511 @ReturnMapping(ErrorResults)
5512 async def SetLastSent(self, params):
5513 '''
5514 params : typing.Sequence[~LogForwardingSetLastSentParam]
5515 Returns -> typing.Sequence[~ErrorResult]
5516 '''
5517 # map input types to rpc msg
5518 _params = dict()
5519 msg = dict(type='LogForwarding',
5520 request='SetLastSent',
5521 version=1,
5522 params=_params)
5523 _params['params'] = params
5524 reply = await self.rpc(msg)
5525 return reply
5526
5527
5528
5529 class LoggerFacade(Type):
5530 name = 'Logger'
5531 version = 1
5532 schema = {'definitions': {'Entities': {'additionalProperties': False,
5533 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5534 'type': 'array'}},
5535 'required': ['entities'],
5536 'type': 'object'},
5537 'Entity': {'additionalProperties': False,
5538 'properties': {'tag': {'type': 'string'}},
5539 'required': ['tag'],
5540 'type': 'object'},
5541 'Error': {'additionalProperties': False,
5542 'properties': {'code': {'type': 'string'},
5543 'info': {'$ref': '#/definitions/ErrorInfo'},
5544 'message': {'type': 'string'}},
5545 'required': ['message', 'code'],
5546 'type': 'object'},
5547 'ErrorInfo': {'additionalProperties': False,
5548 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5549 'macaroon-path': {'type': 'string'}},
5550 'type': 'object'},
5551 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5552 'NotifyWatchResult': {'additionalProperties': False,
5553 'properties': {'NotifyWatcherId': {'type': 'string'},
5554 'error': {'$ref': '#/definitions/Error'}},
5555 'required': ['NotifyWatcherId'],
5556 'type': 'object'},
5557 'NotifyWatchResults': {'additionalProperties': False,
5558 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5559 'type': 'array'}},
5560 'required': ['results'],
5561 'type': 'object'},
5562 'StringResult': {'additionalProperties': False,
5563 'properties': {'error': {'$ref': '#/definitions/Error'},
5564 'result': {'type': 'string'}},
5565 'required': ['result'],
5566 'type': 'object'},
5567 'StringResults': {'additionalProperties': False,
5568 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
5569 'type': 'array'}},
5570 'required': ['results'],
5571 'type': 'object'}},
5572 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5573 'Result': {'$ref': '#/definitions/StringResults'}},
5574 'type': 'object'},
5575 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5576 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5577 'type': 'object'}},
5578 'type': 'object'}
5579
5580
5581 @ReturnMapping(StringResults)
5582 async def LoggingConfig(self, entities):
5583 '''
5584 entities : typing.Sequence[~Entity]
5585 Returns -> typing.Sequence[~StringResult]
5586 '''
5587 # map input types to rpc msg
5588 _params = dict()
5589 msg = dict(type='Logger',
5590 request='LoggingConfig',
5591 version=1,
5592 params=_params)
5593 _params['entities'] = entities
5594 reply = await self.rpc(msg)
5595 return reply
5596
5597
5598
5599 @ReturnMapping(NotifyWatchResults)
5600 async def WatchLoggingConfig(self, entities):
5601 '''
5602 entities : typing.Sequence[~Entity]
5603 Returns -> typing.Sequence[~NotifyWatchResult]
5604 '''
5605 # map input types to rpc msg
5606 _params = dict()
5607 msg = dict(type='Logger',
5608 request='WatchLoggingConfig',
5609 version=1,
5610 params=_params)
5611 _params['entities'] = entities
5612 reply = await self.rpc(msg)
5613 return reply
5614
5615
5616
5617 class MachineActionsFacade(Type):
5618 name = 'MachineActions'
5619 version = 1
5620 schema = {'definitions': {'Action': {'additionalProperties': False,
5621 'properties': {'name': {'type': 'string'},
5622 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
5623 'type': 'object'}},
5624 'type': 'object'},
5625 'receiver': {'type': 'string'},
5626 'tag': {'type': 'string'}},
5627 'required': ['tag', 'receiver', 'name'],
5628 'type': 'object'},
5629 'ActionExecutionResult': {'additionalProperties': False,
5630 'properties': {'action-tag': {'type': 'string'},
5631 'message': {'type': 'string'},
5632 'results': {'patternProperties': {'.*': {'additionalProperties': True,
5633 'type': 'object'}},
5634 'type': 'object'},
5635 'status': {'type': 'string'}},
5636 'required': ['action-tag', 'status'],
5637 'type': 'object'},
5638 'ActionExecutionResults': {'additionalProperties': False,
5639 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
5640 'type': 'array'}},
5641 'type': 'object'},
5642 'ActionResult': {'additionalProperties': False,
5643 'properties': {'action': {'$ref': '#/definitions/Action'},
5644 'completed': {'format': 'date-time',
5645 'type': 'string'},
5646 'enqueued': {'format': 'date-time',
5647 'type': 'string'},
5648 'error': {'$ref': '#/definitions/Error'},
5649 'message': {'type': 'string'},
5650 'output': {'patternProperties': {'.*': {'additionalProperties': True,
5651 'type': 'object'}},
5652 'type': 'object'},
5653 'started': {'format': 'date-time',
5654 'type': 'string'},
5655 'status': {'type': 'string'}},
5656 'type': 'object'},
5657 'ActionResults': {'additionalProperties': False,
5658 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
5659 'type': 'array'}},
5660 'type': 'object'},
5661 'ActionsByReceiver': {'additionalProperties': False,
5662 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5663 'type': 'array'},
5664 'error': {'$ref': '#/definitions/Error'},
5665 'receiver': {'type': 'string'}},
5666 'type': 'object'},
5667 'ActionsByReceivers': {'additionalProperties': False,
5668 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
5669 'type': 'array'}},
5670 'type': 'object'},
5671 'Entities': {'additionalProperties': False,
5672 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5673 'type': 'array'}},
5674 'required': ['entities'],
5675 'type': 'object'},
5676 'Entity': {'additionalProperties': False,
5677 'properties': {'tag': {'type': 'string'}},
5678 'required': ['tag'],
5679 'type': 'object'},
5680 'Error': {'additionalProperties': False,
5681 'properties': {'code': {'type': 'string'},
5682 'info': {'$ref': '#/definitions/ErrorInfo'},
5683 'message': {'type': 'string'}},
5684 'required': ['message', 'code'],
5685 'type': 'object'},
5686 'ErrorInfo': {'additionalProperties': False,
5687 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5688 'macaroon-path': {'type': 'string'}},
5689 'type': 'object'},
5690 'ErrorResult': {'additionalProperties': False,
5691 'properties': {'error': {'$ref': '#/definitions/Error'}},
5692 'type': 'object'},
5693 'ErrorResults': {'additionalProperties': False,
5694 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5695 'type': 'array'}},
5696 'required': ['results'],
5697 'type': 'object'},
5698 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5699 'StringsWatchResult': {'additionalProperties': False,
5700 'properties': {'changes': {'items': {'type': 'string'},
5701 'type': 'array'},
5702 'error': {'$ref': '#/definitions/Error'},
5703 'watcher-id': {'type': 'string'}},
5704 'required': ['watcher-id'],
5705 'type': 'object'},
5706 'StringsWatchResults': {'additionalProperties': False,
5707 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
5708 'type': 'array'}},
5709 'required': ['results'],
5710 'type': 'object'}},
5711 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5712 'Result': {'$ref': '#/definitions/ActionResults'}},
5713 'type': 'object'},
5714 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5715 'Result': {'$ref': '#/definitions/ErrorResults'}},
5716 'type': 'object'},
5717 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
5718 'Result': {'$ref': '#/definitions/ErrorResults'}},
5719 'type': 'object'},
5720 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5721 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5722 'type': 'object'},
5723 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5724 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
5725 'type': 'object'}},
5726 'type': 'object'}
5727
5728
5729 @ReturnMapping(ActionResults)
5730 async def Actions(self, entities):
5731 '''
5732 entities : typing.Sequence[~Entity]
5733 Returns -> typing.Sequence[~ActionResult]
5734 '''
5735 # map input types to rpc msg
5736 _params = dict()
5737 msg = dict(type='MachineActions',
5738 request='Actions',
5739 version=1,
5740 params=_params)
5741 _params['entities'] = entities
5742 reply = await self.rpc(msg)
5743 return reply
5744
5745
5746
5747 @ReturnMapping(ErrorResults)
5748 async def BeginActions(self, entities):
5749 '''
5750 entities : typing.Sequence[~Entity]
5751 Returns -> typing.Sequence[~ErrorResult]
5752 '''
5753 # map input types to rpc msg
5754 _params = dict()
5755 msg = dict(type='MachineActions',
5756 request='BeginActions',
5757 version=1,
5758 params=_params)
5759 _params['entities'] = entities
5760 reply = await self.rpc(msg)
5761 return reply
5762
5763
5764
5765 @ReturnMapping(ErrorResults)
5766 async def FinishActions(self, results):
5767 '''
5768 results : typing.Sequence[~ActionExecutionResult]
5769 Returns -> typing.Sequence[~ErrorResult]
5770 '''
5771 # map input types to rpc msg
5772 _params = dict()
5773 msg = dict(type='MachineActions',
5774 request='FinishActions',
5775 version=1,
5776 params=_params)
5777 _params['results'] = results
5778 reply = await self.rpc(msg)
5779 return reply
5780
5781
5782
5783 @ReturnMapping(ActionsByReceivers)
5784 async def RunningActions(self, entities):
5785 '''
5786 entities : typing.Sequence[~Entity]
5787 Returns -> typing.Sequence[~ActionsByReceiver]
5788 '''
5789 # map input types to rpc msg
5790 _params = dict()
5791 msg = dict(type='MachineActions',
5792 request='RunningActions',
5793 version=1,
5794 params=_params)
5795 _params['entities'] = entities
5796 reply = await self.rpc(msg)
5797 return reply
5798
5799
5800
5801 @ReturnMapping(StringsWatchResults)
5802 async def WatchActionNotifications(self, entities):
5803 '''
5804 entities : typing.Sequence[~Entity]
5805 Returns -> typing.Sequence[~StringsWatchResult]
5806 '''
5807 # map input types to rpc msg
5808 _params = dict()
5809 msg = dict(type='MachineActions',
5810 request='WatchActionNotifications',
5811 version=1,
5812 params=_params)
5813 _params['entities'] = entities
5814 reply = await self.rpc(msg)
5815 return reply
5816
5817
5818
5819 class MachineUndertakerFacade(Type):
5820 name = 'MachineUndertaker'
5821 version = 1
5822 schema = {'definitions': {'Entities': {'additionalProperties': False,
5823 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5824 'type': 'array'}},
5825 'required': ['entities'],
5826 'type': 'object'},
5827 'EntitiesResult': {'additionalProperties': False,
5828 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5829 'type': 'array'},
5830 'error': {'$ref': '#/definitions/Error'}},
5831 'required': ['entities'],
5832 'type': 'object'},
5833 'EntitiesResults': {'additionalProperties': False,
5834 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
5835 'type': 'array'}},
5836 'required': ['results'],
5837 'type': 'object'},
5838 'Entity': {'additionalProperties': False,
5839 'properties': {'tag': {'type': 'string'}},
5840 'required': ['tag'],
5841 'type': 'object'},
5842 'Error': {'additionalProperties': False,
5843 'properties': {'code': {'type': 'string'},
5844 'info': {'$ref': '#/definitions/ErrorInfo'},
5845 'message': {'type': 'string'}},
5846 'required': ['message', 'code'],
5847 'type': 'object'},
5848 'ErrorInfo': {'additionalProperties': False,
5849 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5850 'macaroon-path': {'type': 'string'}},
5851 'type': 'object'},
5852 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5853 'NotifyWatchResult': {'additionalProperties': False,
5854 'properties': {'NotifyWatcherId': {'type': 'string'},
5855 'error': {'$ref': '#/definitions/Error'}},
5856 'required': ['NotifyWatcherId'],
5857 'type': 'object'},
5858 'NotifyWatchResults': {'additionalProperties': False,
5859 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5860 'type': 'array'}},
5861 'required': ['results'],
5862 'type': 'object'},
5863 'ProviderInterfaceInfo': {'additionalProperties': False,
5864 'properties': {'interface-name': {'type': 'string'},
5865 'mac-address': {'type': 'string'},
5866 'provider-id': {'type': 'string'}},
5867 'required': ['interface-name',
5868 'mac-address',
5869 'provider-id'],
5870 'type': 'object'},
5871 'ProviderInterfaceInfoResult': {'additionalProperties': False,
5872 'properties': {'error': {'$ref': '#/definitions/Error'},
5873 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'},
5874 'type': 'array'},
5875 'machine-tag': {'type': 'string'}},
5876 'required': ['machine-tag',
5877 'interfaces'],
5878 'type': 'object'},
5879 'ProviderInterfaceInfoResults': {'additionalProperties': False,
5880 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'},
5881 'type': 'array'}},
5882 'required': ['results'],
5883 'type': 'object'}},
5884 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5885 'Result': {'$ref': '#/definitions/EntitiesResults'}},
5886 'type': 'object'},
5887 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}},
5888 'type': 'object'},
5889 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5890 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}},
5891 'type': 'object'},
5892 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5893 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5894 'type': 'object'}},
5895 'type': 'object'}
5896
5897
5898 @ReturnMapping(EntitiesResults)
5899 async def AllMachineRemovals(self, entities):
5900 '''
5901 entities : typing.Sequence[~Entity]
5902 Returns -> typing.Sequence[~EntitiesResult]
5903 '''
5904 # map input types to rpc msg
5905 _params = dict()
5906 msg = dict(type='MachineUndertaker',
5907 request='AllMachineRemovals',
5908 version=1,
5909 params=_params)
5910 _params['entities'] = entities
5911 reply = await self.rpc(msg)
5912 return reply
5913
5914
5915
5916 @ReturnMapping(None)
5917 async def CompleteMachineRemovals(self, entities):
5918 '''
5919 entities : typing.Sequence[~Entity]
5920 Returns -> None
5921 '''
5922 # map input types to rpc msg
5923 _params = dict()
5924 msg = dict(type='MachineUndertaker',
5925 request='CompleteMachineRemovals',
5926 version=1,
5927 params=_params)
5928 _params['entities'] = entities
5929 reply = await self.rpc(msg)
5930 return reply
5931
5932
5933
5934 @ReturnMapping(ProviderInterfaceInfoResults)
5935 async def GetMachineProviderInterfaceInfo(self, entities):
5936 '''
5937 entities : typing.Sequence[~Entity]
5938 Returns -> typing.Sequence[~ProviderInterfaceInfoResult]
5939 '''
5940 # map input types to rpc msg
5941 _params = dict()
5942 msg = dict(type='MachineUndertaker',
5943 request='GetMachineProviderInterfaceInfo',
5944 version=1,
5945 params=_params)
5946 _params['entities'] = entities
5947 reply = await self.rpc(msg)
5948 return reply
5949
5950
5951
5952 @ReturnMapping(NotifyWatchResults)
5953 async def WatchMachineRemovals(self, entities):
5954 '''
5955 entities : typing.Sequence[~Entity]
5956 Returns -> typing.Sequence[~NotifyWatchResult]
5957 '''
5958 # map input types to rpc msg
5959 _params = dict()
5960 msg = dict(type='MachineUndertaker',
5961 request='WatchMachineRemovals',
5962 version=1,
5963 params=_params)
5964 _params['entities'] = entities
5965 reply = await self.rpc(msg)
5966 return reply
5967
5968
5969
5970 class MachinerFacade(Type):
5971 name = 'Machiner'
5972 version = 1
5973 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
5974 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
5975 'type': 'array'},
5976 'type': 'array'}},
5977 'required': ['servers'],
5978 'type': 'object'},
5979 'Address': {'additionalProperties': False,
5980 'properties': {'scope': {'type': 'string'},
5981 'space-name': {'type': 'string'},
5982 'type': {'type': 'string'},
5983 'value': {'type': 'string'}},
5984 'required': ['value', 'type', 'scope'],
5985 'type': 'object'},
5986 'Entities': {'additionalProperties': False,
5987 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5988 'type': 'array'}},
5989 'required': ['entities'],
5990 'type': 'object'},
5991 'Entity': {'additionalProperties': False,
5992 'properties': {'tag': {'type': 'string'}},
5993 'required': ['tag'],
5994 'type': 'object'},
5995 'EntityStatusArgs': {'additionalProperties': False,
5996 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
5997 'type': 'object'}},
5998 'type': 'object'},
5999 'info': {'type': 'string'},
6000 'status': {'type': 'string'},
6001 'tag': {'type': 'string'}},
6002 'required': ['tag',
6003 'status',
6004 'info',
6005 'data'],
6006 'type': 'object'},
6007 'Error': {'additionalProperties': False,
6008 'properties': {'code': {'type': 'string'},
6009 'info': {'$ref': '#/definitions/ErrorInfo'},
6010 'message': {'type': 'string'}},
6011 'required': ['message', 'code'],
6012 'type': 'object'},
6013 'ErrorInfo': {'additionalProperties': False,
6014 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6015 'macaroon-path': {'type': 'string'}},
6016 'type': 'object'},
6017 'ErrorResult': {'additionalProperties': False,
6018 'properties': {'error': {'$ref': '#/definitions/Error'}},
6019 'type': 'object'},
6020 'ErrorResults': {'additionalProperties': False,
6021 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6022 'type': 'array'}},
6023 'required': ['results'],
6024 'type': 'object'},
6025 'HostPort': {'additionalProperties': False,
6026 'properties': {'Address': {'$ref': '#/definitions/Address'},
6027 'port': {'type': 'integer'}},
6028 'required': ['Address', 'port'],
6029 'type': 'object'},
6030 'JobsResult': {'additionalProperties': False,
6031 'properties': {'error': {'$ref': '#/definitions/Error'},
6032 'jobs': {'items': {'type': 'string'},
6033 'type': 'array'}},
6034 'required': ['jobs'],
6035 'type': 'object'},
6036 'JobsResults': {'additionalProperties': False,
6037 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
6038 'type': 'array'}},
6039 'required': ['results'],
6040 'type': 'object'},
6041 'LifeResult': {'additionalProperties': False,
6042 'properties': {'error': {'$ref': '#/definitions/Error'},
6043 'life': {'type': 'string'}},
6044 'required': ['life'],
6045 'type': 'object'},
6046 'LifeResults': {'additionalProperties': False,
6047 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
6048 'type': 'array'}},
6049 'required': ['results'],
6050 'type': 'object'},
6051 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6052 'MachineAddresses': {'additionalProperties': False,
6053 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
6054 'type': 'array'},
6055 'tag': {'type': 'string'}},
6056 'required': ['tag', 'addresses'],
6057 'type': 'object'},
6058 'NetworkConfig': {'additionalProperties': False,
6059 'properties': {'address': {'type': 'string'},
6060 'cidr': {'type': 'string'},
6061 'config-type': {'type': 'string'},
6062 'device-index': {'type': 'integer'},
6063 'disabled': {'type': 'boolean'},
6064 'dns-search-domains': {'items': {'type': 'string'},
6065 'type': 'array'},
6066 'dns-servers': {'items': {'type': 'string'},
6067 'type': 'array'},
6068 'gateway-address': {'type': 'string'},
6069 'interface-name': {'type': 'string'},
6070 'interface-type': {'type': 'string'},
6071 'is-default-gateway': {'type': 'boolean'},
6072 'mac-address': {'type': 'string'},
6073 'mtu': {'type': 'integer'},
6074 'no-auto-start': {'type': 'boolean'},
6075 'parent-interface-name': {'type': 'string'},
6076 'provider-address-id': {'type': 'string'},
6077 'provider-id': {'type': 'string'},
6078 'provider-space-id': {'type': 'string'},
6079 'provider-subnet-id': {'type': 'string'},
6080 'provider-vlan-id': {'type': 'string'},
6081 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
6082 'type': 'array'},
6083 'vlan-tag': {'type': 'integer'}},
6084 'required': ['device-index',
6085 'mac-address',
6086 'cidr',
6087 'mtu',
6088 'provider-id',
6089 'provider-subnet-id',
6090 'provider-space-id',
6091 'provider-address-id',
6092 'provider-vlan-id',
6093 'vlan-tag',
6094 'interface-name',
6095 'parent-interface-name',
6096 'interface-type',
6097 'disabled'],
6098 'type': 'object'},
6099 'NetworkRoute': {'additionalProperties': False,
6100 'properties': {'destination-cidr': {'type': 'string'},
6101 'gateway-ip': {'type': 'string'},
6102 'metric': {'type': 'integer'}},
6103 'required': ['destination-cidr',
6104 'gateway-ip',
6105 'metric'],
6106 'type': 'object'},
6107 'NotifyWatchResult': {'additionalProperties': False,
6108 'properties': {'NotifyWatcherId': {'type': 'string'},
6109 'error': {'$ref': '#/definitions/Error'}},
6110 'required': ['NotifyWatcherId'],
6111 'type': 'object'},
6112 'NotifyWatchResults': {'additionalProperties': False,
6113 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6114 'type': 'array'}},
6115 'required': ['results'],
6116 'type': 'object'},
6117 'SetMachineNetworkConfig': {'additionalProperties': False,
6118 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
6119 'type': 'array'},
6120 'tag': {'type': 'string'}},
6121 'required': ['tag', 'config'],
6122 'type': 'object'},
6123 'SetMachinesAddresses': {'additionalProperties': False,
6124 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
6125 'type': 'array'}},
6126 'required': ['machine-addresses'],
6127 'type': 'object'},
6128 'SetStatus': {'additionalProperties': False,
6129 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
6130 'type': 'array'}},
6131 'required': ['entities'],
6132 'type': 'object'},
6133 'StringResult': {'additionalProperties': False,
6134 'properties': {'error': {'$ref': '#/definitions/Error'},
6135 'result': {'type': 'string'}},
6136 'required': ['result'],
6137 'type': 'object'},
6138 'StringsResult': {'additionalProperties': False,
6139 'properties': {'error': {'$ref': '#/definitions/Error'},
6140 'result': {'items': {'type': 'string'},
6141 'type': 'array'}},
6142 'type': 'object'}},
6143 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
6144 'type': 'object'},
6145 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
6146 'type': 'object'},
6147 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6148 'Result': {'$ref': '#/definitions/ErrorResults'}},
6149 'type': 'object'},
6150 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6151 'Result': {'$ref': '#/definitions/JobsResults'}},
6152 'type': 'object'},
6153 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6154 'Result': {'$ref': '#/definitions/LifeResults'}},
6155 'type': 'object'},
6156 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
6157 'type': 'object'},
6158 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
6159 'Result': {'$ref': '#/definitions/ErrorResults'}},
6160 'type': 'object'},
6161 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
6162 'type': 'object'},
6163 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6164 'Result': {'$ref': '#/definitions/ErrorResults'}},
6165 'type': 'object'},
6166 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6167 'Result': {'$ref': '#/definitions/ErrorResults'}},
6168 'type': 'object'},
6169 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6170 'Result': {'$ref': '#/definitions/ErrorResults'}},
6171 'type': 'object'},
6172 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6173 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6174 'type': 'object'},
6175 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6176 'type': 'object'}},
6177 'type': 'object'}
6178
6179
6180 @ReturnMapping(StringsResult)
6181 async def APIAddresses(self):
6182 '''
6183
6184 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
6185 '''
6186 # map input types to rpc msg
6187 _params = dict()
6188 msg = dict(type='Machiner',
6189 request='APIAddresses',
6190 version=1,
6191 params=_params)
6192
6193 reply = await self.rpc(msg)
6194 return reply
6195
6196
6197
6198 @ReturnMapping(APIHostPortsResult)
6199 async def APIHostPorts(self):
6200 '''
6201
6202 Returns -> typing.Sequence[~HostPort]
6203 '''
6204 # map input types to rpc msg
6205 _params = dict()
6206 msg = dict(type='Machiner',
6207 request='APIHostPorts',
6208 version=1,
6209 params=_params)
6210
6211 reply = await self.rpc(msg)
6212 return reply
6213
6214
6215
6216 @ReturnMapping(ErrorResults)
6217 async def EnsureDead(self, entities):
6218 '''
6219 entities : typing.Sequence[~Entity]
6220 Returns -> typing.Sequence[~ErrorResult]
6221 '''
6222 # map input types to rpc msg
6223 _params = dict()
6224 msg = dict(type='Machiner',
6225 request='EnsureDead',
6226 version=1,
6227 params=_params)
6228 _params['entities'] = entities
6229 reply = await self.rpc(msg)
6230 return reply
6231
6232
6233
6234 @ReturnMapping(JobsResults)
6235 async def Jobs(self, entities):
6236 '''
6237 entities : typing.Sequence[~Entity]
6238 Returns -> typing.Sequence[~JobsResult]
6239 '''
6240 # map input types to rpc msg
6241 _params = dict()
6242 msg = dict(type='Machiner',
6243 request='Jobs',
6244 version=1,
6245 params=_params)
6246 _params['entities'] = entities
6247 reply = await self.rpc(msg)
6248 return reply
6249
6250
6251
6252 @ReturnMapping(LifeResults)
6253 async def Life(self, entities):
6254 '''
6255 entities : typing.Sequence[~Entity]
6256 Returns -> typing.Sequence[~LifeResult]
6257 '''
6258 # map input types to rpc msg
6259 _params = dict()
6260 msg = dict(type='Machiner',
6261 request='Life',
6262 version=1,
6263 params=_params)
6264 _params['entities'] = entities
6265 reply = await self.rpc(msg)
6266 return reply
6267
6268
6269
6270 @ReturnMapping(StringResult)
6271 async def ModelUUID(self):
6272 '''
6273
6274 Returns -> typing.Union[_ForwardRef('Error'), str]
6275 '''
6276 # map input types to rpc msg
6277 _params = dict()
6278 msg = dict(type='Machiner',
6279 request='ModelUUID',
6280 version=1,
6281 params=_params)
6282
6283 reply = await self.rpc(msg)
6284 return reply
6285
6286
6287
6288 @ReturnMapping(ErrorResults)
6289 async def SetMachineAddresses(self, machine_addresses):
6290 '''
6291 machine_addresses : typing.Sequence[~MachineAddresses]
6292 Returns -> typing.Sequence[~ErrorResult]
6293 '''
6294 # map input types to rpc msg
6295 _params = dict()
6296 msg = dict(type='Machiner',
6297 request='SetMachineAddresses',
6298 version=1,
6299 params=_params)
6300 _params['machine-addresses'] = machine_addresses
6301 reply = await self.rpc(msg)
6302 return reply
6303
6304
6305
6306 @ReturnMapping(None)
6307 async def SetObservedNetworkConfig(self, config, tag):
6308 '''
6309 config : typing.Sequence[~NetworkConfig]
6310 tag : str
6311 Returns -> None
6312 '''
6313 # map input types to rpc msg
6314 _params = dict()
6315 msg = dict(type='Machiner',
6316 request='SetObservedNetworkConfig',
6317 version=1,
6318 params=_params)
6319 _params['config'] = config
6320 _params['tag'] = tag
6321 reply = await self.rpc(msg)
6322 return reply
6323
6324
6325
6326 @ReturnMapping(ErrorResults)
6327 async def SetProviderNetworkConfig(self, entities):
6328 '''
6329 entities : typing.Sequence[~Entity]
6330 Returns -> typing.Sequence[~ErrorResult]
6331 '''
6332 # map input types to rpc msg
6333 _params = dict()
6334 msg = dict(type='Machiner',
6335 request='SetProviderNetworkConfig',
6336 version=1,
6337 params=_params)
6338 _params['entities'] = entities
6339 reply = await self.rpc(msg)
6340 return reply
6341
6342
6343
6344 @ReturnMapping(ErrorResults)
6345 async def SetStatus(self, entities):
6346 '''
6347 entities : typing.Sequence[~EntityStatusArgs]
6348 Returns -> typing.Sequence[~ErrorResult]
6349 '''
6350 # map input types to rpc msg
6351 _params = dict()
6352 msg = dict(type='Machiner',
6353 request='SetStatus',
6354 version=1,
6355 params=_params)
6356 _params['entities'] = entities
6357 reply = await self.rpc(msg)
6358 return reply
6359
6360
6361
6362 @ReturnMapping(ErrorResults)
6363 async def UpdateStatus(self, entities):
6364 '''
6365 entities : typing.Sequence[~EntityStatusArgs]
6366 Returns -> typing.Sequence[~ErrorResult]
6367 '''
6368 # map input types to rpc msg
6369 _params = dict()
6370 msg = dict(type='Machiner',
6371 request='UpdateStatus',
6372 version=1,
6373 params=_params)
6374 _params['entities'] = entities
6375 reply = await self.rpc(msg)
6376 return reply
6377
6378
6379
6380 @ReturnMapping(NotifyWatchResults)
6381 async def Watch(self, entities):
6382 '''
6383 entities : typing.Sequence[~Entity]
6384 Returns -> typing.Sequence[~NotifyWatchResult]
6385 '''
6386 # map input types to rpc msg
6387 _params = dict()
6388 msg = dict(type='Machiner',
6389 request='Watch',
6390 version=1,
6391 params=_params)
6392 _params['entities'] = entities
6393 reply = await self.rpc(msg)
6394 return reply
6395
6396
6397
6398 @ReturnMapping(NotifyWatchResult)
6399 async def WatchAPIHostPorts(self):
6400 '''
6401
6402 Returns -> typing.Union[str, _ForwardRef('Error')]
6403 '''
6404 # map input types to rpc msg
6405 _params = dict()
6406 msg = dict(type='Machiner',
6407 request='WatchAPIHostPorts',
6408 version=1,
6409 params=_params)
6410
6411 reply = await self.rpc(msg)
6412 return reply
6413
6414
6415
6416 class MeterStatusFacade(Type):
6417 name = 'MeterStatus'
6418 version = 1
6419 schema = {'definitions': {'Entities': {'additionalProperties': False,
6420 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6421 'type': 'array'}},
6422 'required': ['entities'],
6423 'type': 'object'},
6424 'Entity': {'additionalProperties': False,
6425 'properties': {'tag': {'type': 'string'}},
6426 'required': ['tag'],
6427 'type': 'object'},
6428 'Error': {'additionalProperties': False,
6429 'properties': {'code': {'type': 'string'},
6430 'info': {'$ref': '#/definitions/ErrorInfo'},
6431 'message': {'type': 'string'}},
6432 'required': ['message', 'code'],
6433 'type': 'object'},
6434 'ErrorInfo': {'additionalProperties': False,
6435 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6436 'macaroon-path': {'type': 'string'}},
6437 'type': 'object'},
6438 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6439 'MeterStatusResult': {'additionalProperties': False,
6440 'properties': {'code': {'type': 'string'},
6441 'error': {'$ref': '#/definitions/Error'},
6442 'info': {'type': 'string'}},
6443 'required': ['code', 'info'],
6444 'type': 'object'},
6445 'MeterStatusResults': {'additionalProperties': False,
6446 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
6447 'type': 'array'}},
6448 'required': ['results'],
6449 'type': 'object'},
6450 'NotifyWatchResult': {'additionalProperties': False,
6451 'properties': {'NotifyWatcherId': {'type': 'string'},
6452 'error': {'$ref': '#/definitions/Error'}},
6453 'required': ['NotifyWatcherId'],
6454 'type': 'object'},
6455 'NotifyWatchResults': {'additionalProperties': False,
6456 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6457 'type': 'array'}},
6458 'required': ['results'],
6459 'type': 'object'}},
6460 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6461 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
6462 'type': 'object'},
6463 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6464 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6465 'type': 'object'}},
6466 'type': 'object'}
6467
6468
6469 @ReturnMapping(MeterStatusResults)
6470 async def GetMeterStatus(self, entities):
6471 '''
6472 entities : typing.Sequence[~Entity]
6473 Returns -> typing.Sequence[~MeterStatusResult]
6474 '''
6475 # map input types to rpc msg
6476 _params = dict()
6477 msg = dict(type='MeterStatus',
6478 request='GetMeterStatus',
6479 version=1,
6480 params=_params)
6481 _params['entities'] = entities
6482 reply = await self.rpc(msg)
6483 return reply
6484
6485
6486
6487 @ReturnMapping(NotifyWatchResults)
6488 async def WatchMeterStatus(self, entities):
6489 '''
6490 entities : typing.Sequence[~Entity]
6491 Returns -> typing.Sequence[~NotifyWatchResult]
6492 '''
6493 # map input types to rpc msg
6494 _params = dict()
6495 msg = dict(type='MeterStatus',
6496 request='WatchMeterStatus',
6497 version=1,
6498 params=_params)
6499 _params['entities'] = entities
6500 reply = await self.rpc(msg)
6501 return reply
6502
6503
6504
6505 class MetricsManagerFacade(Type):
6506 name = 'MetricsManager'
6507 version = 1
6508 schema = {'definitions': {'Entities': {'additionalProperties': False,
6509 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6510 'type': 'array'}},
6511 'required': ['entities'],
6512 'type': 'object'},
6513 'Entity': {'additionalProperties': False,
6514 'properties': {'tag': {'type': 'string'}},
6515 'required': ['tag'],
6516 'type': 'object'},
6517 'Error': {'additionalProperties': False,
6518 'properties': {'code': {'type': 'string'},
6519 'info': {'$ref': '#/definitions/ErrorInfo'},
6520 'message': {'type': 'string'}},
6521 'required': ['message', 'code'],
6522 'type': 'object'},
6523 'ErrorInfo': {'additionalProperties': False,
6524 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6525 'macaroon-path': {'type': 'string'}},
6526 'type': 'object'},
6527 'ErrorResult': {'additionalProperties': False,
6528 'properties': {'error': {'$ref': '#/definitions/Error'}},
6529 'type': 'object'},
6530 'ErrorResults': {'additionalProperties': False,
6531 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6532 'type': 'array'}},
6533 'required': ['results'],
6534 'type': 'object'},
6535 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
6536 'properties': {'AddJujuMachineMetrics': {'type': 'object'},
6537 'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6538 'Result': {'$ref': '#/definitions/ErrorResults'}},
6539 'type': 'object'},
6540 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6541 'Result': {'$ref': '#/definitions/ErrorResults'}},
6542 'type': 'object'}},
6543 'type': 'object'}
6544
6545
6546 @ReturnMapping(None)
6547 async def AddJujuMachineMetrics(self):
6548 '''
6549
6550 Returns -> None
6551 '''
6552 # map input types to rpc msg
6553 _params = dict()
6554 msg = dict(type='MetricsManager',
6555 request='AddJujuMachineMetrics',
6556 version=1,
6557 params=_params)
6558
6559 reply = await self.rpc(msg)
6560 return reply
6561
6562
6563
6564 @ReturnMapping(ErrorResults)
6565 async def CleanupOldMetrics(self, entities):
6566 '''
6567 entities : typing.Sequence[~Entity]
6568 Returns -> typing.Sequence[~ErrorResult]
6569 '''
6570 # map input types to rpc msg
6571 _params = dict()
6572 msg = dict(type='MetricsManager',
6573 request='CleanupOldMetrics',
6574 version=1,
6575 params=_params)
6576 _params['entities'] = entities
6577 reply = await self.rpc(msg)
6578 return reply
6579
6580
6581
6582 @ReturnMapping(ErrorResults)
6583 async def SendMetrics(self, entities):
6584 '''
6585 entities : typing.Sequence[~Entity]
6586 Returns -> typing.Sequence[~ErrorResult]
6587 '''
6588 # map input types to rpc msg
6589 _params = dict()
6590 msg = dict(type='MetricsManager',
6591 request='SendMetrics',
6592 version=1,
6593 params=_params)
6594 _params['entities'] = entities
6595 reply = await self.rpc(msg)
6596 return reply
6597
6598
6599
6600 class MigrationFlagFacade(Type):
6601 name = 'MigrationFlag'
6602 version = 1
6603 schema = {'definitions': {'Entities': {'additionalProperties': False,
6604 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6605 'type': 'array'}},
6606 'required': ['entities'],
6607 'type': 'object'},
6608 'Entity': {'additionalProperties': False,
6609 'properties': {'tag': {'type': 'string'}},
6610 'required': ['tag'],
6611 'type': 'object'},
6612 'Error': {'additionalProperties': False,
6613 'properties': {'code': {'type': 'string'},
6614 'info': {'$ref': '#/definitions/ErrorInfo'},
6615 'message': {'type': 'string'}},
6616 'required': ['message', 'code'],
6617 'type': 'object'},
6618 'ErrorInfo': {'additionalProperties': False,
6619 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6620 'macaroon-path': {'type': 'string'}},
6621 'type': 'object'},
6622 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6623 'NotifyWatchResult': {'additionalProperties': False,
6624 'properties': {'NotifyWatcherId': {'type': 'string'},
6625 'error': {'$ref': '#/definitions/Error'}},
6626 'required': ['NotifyWatcherId'],
6627 'type': 'object'},
6628 'NotifyWatchResults': {'additionalProperties': False,
6629 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6630 'type': 'array'}},
6631 'required': ['results'],
6632 'type': 'object'},
6633 'PhaseResult': {'additionalProperties': False,
6634 'properties': {'error': {'$ref': '#/definitions/Error'},
6635 'phase': {'type': 'string'}},
6636 'type': 'object'},
6637 'PhaseResults': {'additionalProperties': False,
6638 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
6639 'type': 'array'}},
6640 'required': ['results'],
6641 'type': 'object'}},
6642 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6643 'Result': {'$ref': '#/definitions/PhaseResults'}},
6644 'type': 'object'},
6645 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6646 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6647 'type': 'object'}},
6648 'type': 'object'}
6649
6650
6651 @ReturnMapping(PhaseResults)
6652 async def Phase(self, entities):
6653 '''
6654 entities : typing.Sequence[~Entity]
6655 Returns -> typing.Sequence[~PhaseResult]
6656 '''
6657 # map input types to rpc msg
6658 _params = dict()
6659 msg = dict(type='MigrationFlag',
6660 request='Phase',
6661 version=1,
6662 params=_params)
6663 _params['entities'] = entities
6664 reply = await self.rpc(msg)
6665 return reply
6666
6667
6668
6669 @ReturnMapping(NotifyWatchResults)
6670 async def Watch(self, entities):
6671 '''
6672 entities : typing.Sequence[~Entity]
6673 Returns -> typing.Sequence[~NotifyWatchResult]
6674 '''
6675 # map input types to rpc msg
6676 _params = dict()
6677 msg = dict(type='MigrationFlag',
6678 request='Watch',
6679 version=1,
6680 params=_params)
6681 _params['entities'] = entities
6682 reply = await self.rpc(msg)
6683 return reply
6684
6685
6686
6687 class MigrationMasterFacade(Type):
6688 name = 'MigrationMaster'
6689 version = 1
6690 schema = {'definitions': {'Error': {'additionalProperties': False,
6691 'properties': {'code': {'type': 'string'},
6692 'info': {'$ref': '#/definitions/ErrorInfo'},
6693 'message': {'type': 'string'}},
6694 'required': ['message', 'code'],
6695 'type': 'object'},
6696 'ErrorInfo': {'additionalProperties': False,
6697 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6698 'macaroon-path': {'type': 'string'}},
6699 'type': 'object'},
6700 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6701 'MasterMigrationStatus': {'additionalProperties': False,
6702 'properties': {'migration-id': {'type': 'string'},
6703 'phase': {'type': 'string'},
6704 'phase-changed-time': {'format': 'date-time',
6705 'type': 'string'},
6706 'spec': {'$ref': '#/definitions/MigrationSpec'}},
6707 'required': ['spec',
6708 'migration-id',
6709 'phase',
6710 'phase-changed-time'],
6711 'type': 'object'},
6712 'MigrationModelInfo': {'additionalProperties': False,
6713 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
6714 'controller-agent-version': {'$ref': '#/definitions/Number'},
6715 'name': {'type': 'string'},
6716 'owner-tag': {'type': 'string'},
6717 'uuid': {'type': 'string'}},
6718 'required': ['uuid',
6719 'name',
6720 'owner-tag',
6721 'agent-version',
6722 'controller-agent-version'],
6723 'type': 'object'},
6724 'MigrationSpec': {'additionalProperties': False,
6725 'properties': {'model-tag': {'type': 'string'},
6726 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
6727 'required': ['model-tag', 'target-info'],
6728 'type': 'object'},
6729 'MigrationTargetInfo': {'additionalProperties': False,
6730 'properties': {'addrs': {'items': {'type': 'string'},
6731 'type': 'array'},
6732 'auth-tag': {'type': 'string'},
6733 'ca-cert': {'type': 'string'},
6734 'controller-tag': {'type': 'string'},
6735 'macaroons': {'type': 'string'},
6736 'password': {'type': 'string'}},
6737 'required': ['controller-tag',
6738 'addrs',
6739 'ca-cert',
6740 'auth-tag'],
6741 'type': 'object'},
6742 'MinionReports': {'additionalProperties': False,
6743 'properties': {'failed': {'items': {'type': 'string'},
6744 'type': 'array'},
6745 'migration-id': {'type': 'string'},
6746 'phase': {'type': 'string'},
6747 'success-count': {'type': 'integer'},
6748 'unknown-count': {'type': 'integer'},
6749 'unknown-sample': {'items': {'type': 'string'},
6750 'type': 'array'}},
6751 'required': ['migration-id',
6752 'phase',
6753 'success-count',
6754 'unknown-count',
6755 'unknown-sample',
6756 'failed'],
6757 'type': 'object'},
6758 'NotifyWatchResult': {'additionalProperties': False,
6759 'properties': {'NotifyWatcherId': {'type': 'string'},
6760 'error': {'$ref': '#/definitions/Error'}},
6761 'required': ['NotifyWatcherId'],
6762 'type': 'object'},
6763 'Number': {'additionalProperties': False,
6764 'properties': {'Build': {'type': 'integer'},
6765 'Major': {'type': 'integer'},
6766 'Minor': {'type': 'integer'},
6767 'Patch': {'type': 'integer'},
6768 'Tag': {'type': 'string'}},
6769 'required': ['Major',
6770 'Minor',
6771 'Tag',
6772 'Patch',
6773 'Build'],
6774 'type': 'object'},
6775 'SerializedModel': {'additionalProperties': False,
6776 'properties': {'bytes': {'items': {'type': 'integer'},
6777 'type': 'array'},
6778 'charms': {'items': {'type': 'string'},
6779 'type': 'array'},
6780 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
6781 'type': 'array'},
6782 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
6783 'type': 'array'}},
6784 'required': ['bytes',
6785 'charms',
6786 'tools',
6787 'resources'],
6788 'type': 'object'},
6789 'SerializedModelResource': {'additionalProperties': False,
6790 'properties': {'application': {'type': 'string'},
6791 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
6792 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
6793 'name': {'type': 'string'},
6794 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}},
6795 'type': 'object'}},
6796 'required': ['application',
6797 'name',
6798 'application-revision',
6799 'charmstore-revision',
6800 'unit-revisions'],
6801 'type': 'object'},
6802 'SerializedModelResourceRevision': {'additionalProperties': False,
6803 'properties': {'description': {'type': 'string'},
6804 'fingerprint': {'type': 'string'},
6805 'origin': {'type': 'string'},
6806 'path': {'type': 'string'},
6807 'revision': {'type': 'integer'},
6808 'size': {'type': 'integer'},
6809 'timestamp': {'format': 'date-time',
6810 'type': 'string'},
6811 'type': {'type': 'string'},
6812 'username': {'type': 'string'}},
6813 'required': ['revision',
6814 'type',
6815 'path',
6816 'description',
6817 'origin',
6818 'fingerprint',
6819 'size',
6820 'timestamp'],
6821 'type': 'object'},
6822 'SerializedModelTools': {'additionalProperties': False,
6823 'properties': {'uri': {'type': 'string'},
6824 'version': {'type': 'string'}},
6825 'required': ['version', 'uri'],
6826 'type': 'object'},
6827 'SetMigrationPhaseArgs': {'additionalProperties': False,
6828 'properties': {'phase': {'type': 'string'}},
6829 'required': ['phase'],
6830 'type': 'object'},
6831 'SetMigrationStatusMessageArgs': {'additionalProperties': False,
6832 'properties': {'message': {'type': 'string'}},
6833 'required': ['message'],
6834 'type': 'object'}},
6835 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
6836 'type': 'object'},
6837 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}},
6838 'type': 'object'},
6839 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}},
6840 'type': 'object'},
6841 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}},
6842 'type': 'object'},
6843 'Prechecks': {'type': 'object'},
6844 'Reap': {'type': 'object'},
6845 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
6846 'type': 'object'},
6847 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
6848 'type': 'object'},
6849 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6850 'type': 'object'},
6851 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6852 'type': 'object'}},
6853 'type': 'object'}
6854
6855
6856 @ReturnMapping(SerializedModel)
6857 async def Export(self):
6858 '''
6859
6860 Returns -> typing.Union[typing.Sequence[int], typing.Sequence[str], typing.Sequence[~SerializedModelTools]]
6861 '''
6862 # map input types to rpc msg
6863 _params = dict()
6864 msg = dict(type='MigrationMaster',
6865 request='Export',
6866 version=1,
6867 params=_params)
6868
6869 reply = await self.rpc(msg)
6870 return reply
6871
6872
6873
6874 @ReturnMapping(MasterMigrationStatus)
6875 async def MigrationStatus(self):
6876 '''
6877
6878 Returns -> typing.Union[str, _ForwardRef('MigrationSpec')]
6879 '''
6880 # map input types to rpc msg
6881 _params = dict()
6882 msg = dict(type='MigrationMaster',
6883 request='MigrationStatus',
6884 version=1,
6885 params=_params)
6886
6887 reply = await self.rpc(msg)
6888 return reply
6889
6890
6891
6892 @ReturnMapping(MinionReports)
6893 async def MinionReports(self):
6894 '''
6895
6896 Returns -> typing.Union[typing.Sequence[str], str, int]
6897 '''
6898 # map input types to rpc msg
6899 _params = dict()
6900 msg = dict(type='MigrationMaster',
6901 request='MinionReports',
6902 version=1,
6903 params=_params)
6904
6905 reply = await self.rpc(msg)
6906 return reply
6907
6908
6909
6910 @ReturnMapping(MigrationModelInfo)
6911 async def ModelInfo(self):
6912 '''
6913
6914 Returns -> typing.Union[_ForwardRef('Number'), str]
6915 '''
6916 # map input types to rpc msg
6917 _params = dict()
6918 msg = dict(type='MigrationMaster',
6919 request='ModelInfo',
6920 version=1,
6921 params=_params)
6922
6923 reply = await self.rpc(msg)
6924 return reply
6925
6926
6927
6928 @ReturnMapping(None)
6929 async def Prechecks(self):
6930 '''
6931
6932 Returns -> None
6933 '''
6934 # map input types to rpc msg
6935 _params = dict()
6936 msg = dict(type='MigrationMaster',
6937 request='Prechecks',
6938 version=1,
6939 params=_params)
6940
6941 reply = await self.rpc(msg)
6942 return reply
6943
6944
6945
6946 @ReturnMapping(None)
6947 async def Reap(self):
6948 '''
6949
6950 Returns -> None
6951 '''
6952 # map input types to rpc msg
6953 _params = dict()
6954 msg = dict(type='MigrationMaster',
6955 request='Reap',
6956 version=1,
6957 params=_params)
6958
6959 reply = await self.rpc(msg)
6960 return reply
6961
6962
6963
6964 @ReturnMapping(None)
6965 async def SetPhase(self, phase):
6966 '''
6967 phase : str
6968 Returns -> None
6969 '''
6970 # map input types to rpc msg
6971 _params = dict()
6972 msg = dict(type='MigrationMaster',
6973 request='SetPhase',
6974 version=1,
6975 params=_params)
6976 _params['phase'] = phase
6977 reply = await self.rpc(msg)
6978 return reply
6979
6980
6981
6982 @ReturnMapping(None)
6983 async def SetStatusMessage(self, message):
6984 '''
6985 message : str
6986 Returns -> None
6987 '''
6988 # map input types to rpc msg
6989 _params = dict()
6990 msg = dict(type='MigrationMaster',
6991 request='SetStatusMessage',
6992 version=1,
6993 params=_params)
6994 _params['message'] = message
6995 reply = await self.rpc(msg)
6996 return reply
6997
6998
6999
7000 @ReturnMapping(NotifyWatchResult)
7001 async def Watch(self):
7002 '''
7003
7004 Returns -> typing.Union[str, _ForwardRef('Error')]
7005 '''
7006 # map input types to rpc msg
7007 _params = dict()
7008 msg = dict(type='MigrationMaster',
7009 request='Watch',
7010 version=1,
7011 params=_params)
7012
7013 reply = await self.rpc(msg)
7014 return reply
7015
7016
7017
7018 @ReturnMapping(NotifyWatchResult)
7019 async def WatchMinionReports(self):
7020 '''
7021
7022 Returns -> typing.Union[str, _ForwardRef('Error')]
7023 '''
7024 # map input types to rpc msg
7025 _params = dict()
7026 msg = dict(type='MigrationMaster',
7027 request='WatchMinionReports',
7028 version=1,
7029 params=_params)
7030
7031 reply = await self.rpc(msg)
7032 return reply
7033
7034
7035
7036 class MigrationMinionFacade(Type):
7037 name = 'MigrationMinion'
7038 version = 1
7039 schema = {'definitions': {'Error': {'additionalProperties': False,
7040 'properties': {'code': {'type': 'string'},
7041 'info': {'$ref': '#/definitions/ErrorInfo'},
7042 'message': {'type': 'string'}},
7043 'required': ['message', 'code'],
7044 'type': 'object'},
7045 'ErrorInfo': {'additionalProperties': False,
7046 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7047 'macaroon-path': {'type': 'string'}},
7048 'type': 'object'},
7049 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7050 'MinionReport': {'additionalProperties': False,
7051 'properties': {'migration-id': {'type': 'string'},
7052 'phase': {'type': 'string'},
7053 'success': {'type': 'boolean'}},
7054 'required': ['migration-id',
7055 'phase',
7056 'success'],
7057 'type': 'object'},
7058 'NotifyWatchResult': {'additionalProperties': False,
7059 'properties': {'NotifyWatcherId': {'type': 'string'},
7060 'error': {'$ref': '#/definitions/Error'}},
7061 'required': ['NotifyWatcherId'],
7062 'type': 'object'}},
7063 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}},
7064 'type': 'object'},
7065 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
7066 'type': 'object'}},
7067 'type': 'object'}
7068
7069
7070 @ReturnMapping(None)
7071 async def Report(self, migration_id, phase, success):
7072 '''
7073 migration_id : str
7074 phase : str
7075 success : bool
7076 Returns -> None
7077 '''
7078 # map input types to rpc msg
7079 _params = dict()
7080 msg = dict(type='MigrationMinion',
7081 request='Report',
7082 version=1,
7083 params=_params)
7084 _params['migration-id'] = migration_id
7085 _params['phase'] = phase
7086 _params['success'] = success
7087 reply = await self.rpc(msg)
7088 return reply
7089
7090
7091
7092 @ReturnMapping(NotifyWatchResult)
7093 async def Watch(self):
7094 '''
7095
7096 Returns -> typing.Union[str, _ForwardRef('Error')]
7097 '''
7098 # map input types to rpc msg
7099 _params = dict()
7100 msg = dict(type='MigrationMinion',
7101 request='Watch',
7102 version=1,
7103 params=_params)
7104
7105 reply = await self.rpc(msg)
7106 return reply
7107
7108
7109
7110 class MigrationStatusWatcherFacade(Type):
7111 name = 'MigrationStatusWatcher'
7112 version = 1
7113 schema = {'definitions': {'MigrationStatus': {'additionalProperties': False,
7114 'properties': {'attempt': {'type': 'integer'},
7115 'migration-id': {'type': 'string'},
7116 'phase': {'type': 'string'},
7117 'source-api-addrs': {'items': {'type': 'string'},
7118 'type': 'array'},
7119 'source-ca-cert': {'type': 'string'},
7120 'target-api-addrs': {'items': {'type': 'string'},
7121 'type': 'array'},
7122 'target-ca-cert': {'type': 'string'}},
7123 'required': ['migration-id',
7124 'attempt',
7125 'phase',
7126 'source-api-addrs',
7127 'source-ca-cert',
7128 'target-api-addrs',
7129 'target-ca-cert'],
7130 'type': 'object'}},
7131 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
7132 'type': 'object'},
7133 'Stop': {'type': 'object'}},
7134 'type': 'object'}
7135
7136
7137 @ReturnMapping(MigrationStatus)
7138 async def Next(self):
7139 '''
7140
7141 Returns -> typing.Union[int, str, typing.Sequence[str]]
7142 '''
7143 # map input types to rpc msg
7144 _params = dict()
7145 msg = dict(type='MigrationStatusWatcher',
7146 request='Next',
7147 version=1,
7148 params=_params)
7149
7150 reply = await self.rpc(msg)
7151 return reply
7152
7153
7154
7155 @ReturnMapping(None)
7156 async def Stop(self):
7157 '''
7158
7159 Returns -> None
7160 '''
7161 # map input types to rpc msg
7162 _params = dict()
7163 msg = dict(type='MigrationStatusWatcher',
7164 request='Stop',
7165 version=1,
7166 params=_params)
7167
7168 reply = await self.rpc(msg)
7169 return reply
7170
7171
7172
7173 class MigrationTargetFacade(Type):
7174 name = 'MigrationTarget'
7175 version = 1
7176 schema = {'definitions': {'AdoptResourcesArgs': {'additionalProperties': False,
7177 'properties': {'model-tag': {'type': 'string'},
7178 'source-controller-version': {'$ref': '#/definitions/Number'}},
7179 'required': ['model-tag',
7180 'source-controller-version'],
7181 'type': 'object'},
7182 'BytesResult': {'additionalProperties': False,
7183 'properties': {'result': {'items': {'type': 'integer'},
7184 'type': 'array'}},
7185 'required': ['result'],
7186 'type': 'object'},
7187 'Error': {'additionalProperties': False,
7188 'properties': {'code': {'type': 'string'},
7189 'info': {'$ref': '#/definitions/ErrorInfo'},
7190 'message': {'type': 'string'}},
7191 'required': ['message', 'code'],
7192 'type': 'object'},
7193 'ErrorInfo': {'additionalProperties': False,
7194 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7195 'macaroon-path': {'type': 'string'}},
7196 'type': 'object'},
7197 'ErrorResult': {'additionalProperties': False,
7198 'properties': {'error': {'$ref': '#/definitions/Error'}},
7199 'type': 'object'},
7200 'ErrorResults': {'additionalProperties': False,
7201 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7202 'type': 'array'}},
7203 'required': ['results'],
7204 'type': 'object'},
7205 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7206 'MigrationModelInfo': {'additionalProperties': False,
7207 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
7208 'controller-agent-version': {'$ref': '#/definitions/Number'},
7209 'name': {'type': 'string'},
7210 'owner-tag': {'type': 'string'},
7211 'uuid': {'type': 'string'}},
7212 'required': ['uuid',
7213 'name',
7214 'owner-tag',
7215 'agent-version',
7216 'controller-agent-version'],
7217 'type': 'object'},
7218 'ModelArgs': {'additionalProperties': False,
7219 'properties': {'model-tag': {'type': 'string'}},
7220 'required': ['model-tag'],
7221 'type': 'object'},
7222 'Number': {'additionalProperties': False,
7223 'properties': {'Build': {'type': 'integer'},
7224 'Major': {'type': 'integer'},
7225 'Minor': {'type': 'integer'},
7226 'Patch': {'type': 'integer'},
7227 'Tag': {'type': 'string'}},
7228 'required': ['Major',
7229 'Minor',
7230 'Tag',
7231 'Patch',
7232 'Build'],
7233 'type': 'object'},
7234 'SerializedModel': {'additionalProperties': False,
7235 'properties': {'bytes': {'items': {'type': 'integer'},
7236 'type': 'array'},
7237 'charms': {'items': {'type': 'string'},
7238 'type': 'array'},
7239 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
7240 'type': 'array'},
7241 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
7242 'type': 'array'}},
7243 'required': ['bytes',
7244 'charms',
7245 'tools',
7246 'resources'],
7247 'type': 'object'},
7248 'SerializedModelResource': {'additionalProperties': False,
7249 'properties': {'application': {'type': 'string'},
7250 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
7251 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
7252 'name': {'type': 'string'},
7253 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}},
7254 'type': 'object'}},
7255 'required': ['application',
7256 'name',
7257 'application-revision',
7258 'charmstore-revision',
7259 'unit-revisions'],
7260 'type': 'object'},
7261 'SerializedModelResourceRevision': {'additionalProperties': False,
7262 'properties': {'description': {'type': 'string'},
7263 'fingerprint': {'type': 'string'},
7264 'origin': {'type': 'string'},
7265 'path': {'type': 'string'},
7266 'revision': {'type': 'integer'},
7267 'size': {'type': 'integer'},
7268 'timestamp': {'format': 'date-time',
7269 'type': 'string'},
7270 'type': {'type': 'string'},
7271 'username': {'type': 'string'}},
7272 'required': ['revision',
7273 'type',
7274 'path',
7275 'description',
7276 'origin',
7277 'fingerprint',
7278 'size',
7279 'timestamp'],
7280 'type': 'object'},
7281 'SerializedModelTools': {'additionalProperties': False,
7282 'properties': {'uri': {'type': 'string'},
7283 'version': {'type': 'string'}},
7284 'required': ['version', 'uri'],
7285 'type': 'object'}},
7286 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
7287 'type': 'object'},
7288 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
7289 'type': 'object'},
7290 'AdoptResources': {'properties': {'Params': {'$ref': '#/definitions/AdoptResourcesArgs'}},
7291 'type': 'object'},
7292 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
7293 'type': 'object'},
7294 'CheckMachines': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'},
7295 'Result': {'$ref': '#/definitions/ErrorResults'}},
7296 'type': 'object'},
7297 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
7298 'type': 'object'},
7299 'LatestLogTime': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'},
7300 'Result': {'format': 'date-time',
7301 'type': 'string'}},
7302 'type': 'object'},
7303 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}},
7304 'type': 'object'}},
7305 'type': 'object'}
7306
7307
7308 @ReturnMapping(None)
7309 async def Abort(self, model_tag):
7310 '''
7311 model_tag : str
7312 Returns -> None
7313 '''
7314 # map input types to rpc msg
7315 _params = dict()
7316 msg = dict(type='MigrationTarget',
7317 request='Abort',
7318 version=1,
7319 params=_params)
7320 _params['model-tag'] = model_tag
7321 reply = await self.rpc(msg)
7322 return reply
7323
7324
7325
7326 @ReturnMapping(None)
7327 async def Activate(self, model_tag):
7328 '''
7329 model_tag : str
7330 Returns -> None
7331 '''
7332 # map input types to rpc msg
7333 _params = dict()
7334 msg = dict(type='MigrationTarget',
7335 request='Activate',
7336 version=1,
7337 params=_params)
7338 _params['model-tag'] = model_tag
7339 reply = await self.rpc(msg)
7340 return reply
7341
7342
7343
7344 @ReturnMapping(None)
7345 async def AdoptResources(self, model_tag, source_controller_version):
7346 '''
7347 model_tag : str
7348 source_controller_version : Number
7349 Returns -> None
7350 '''
7351 # map input types to rpc msg
7352 _params = dict()
7353 msg = dict(type='MigrationTarget',
7354 request='AdoptResources',
7355 version=1,
7356 params=_params)
7357 _params['model-tag'] = model_tag
7358 _params['source-controller-version'] = source_controller_version
7359 reply = await self.rpc(msg)
7360 return reply
7361
7362
7363
7364 @ReturnMapping(BytesResult)
7365 async def CACert(self):
7366 '''
7367
7368 Returns -> typing.Sequence[int]
7369 '''
7370 # map input types to rpc msg
7371 _params = dict()
7372 msg = dict(type='MigrationTarget',
7373 request='CACert',
7374 version=1,
7375 params=_params)
7376
7377 reply = await self.rpc(msg)
7378 return reply
7379
7380
7381
7382 @ReturnMapping(ErrorResults)
7383 async def CheckMachines(self, model_tag):
7384 '''
7385 model_tag : str
7386 Returns -> typing.Sequence[~ErrorResult]
7387 '''
7388 # map input types to rpc msg
7389 _params = dict()
7390 msg = dict(type='MigrationTarget',
7391 request='CheckMachines',
7392 version=1,
7393 params=_params)
7394 _params['model-tag'] = model_tag
7395 reply = await self.rpc(msg)
7396 return reply
7397
7398
7399
7400 @ReturnMapping(None)
7401 async def Import(self, bytes_, charms, tools):
7402 '''
7403 bytes_ : typing.Sequence[int]
7404 charms : typing.Sequence[str]
7405 tools : typing.Sequence[~SerializedModelTools]
7406 Returns -> None
7407 '''
7408 # map input types to rpc msg
7409 _params = dict()
7410 msg = dict(type='MigrationTarget',
7411 request='Import',
7412 version=1,
7413 params=_params)
7414 _params['bytes'] = bytes_
7415 _params['charms'] = charms
7416 _params['tools'] = tools
7417 reply = await self.rpc(msg)
7418 return reply
7419
7420
7421
7422 @ReturnMapping(str)
7423 async def LatestLogTime(self, model_tag):
7424 '''
7425 model_tag : str
7426 Returns -> str
7427 '''
7428 # map input types to rpc msg
7429 _params = dict()
7430 msg = dict(type='MigrationTarget',
7431 request='LatestLogTime',
7432 version=1,
7433 params=_params)
7434 _params['model-tag'] = model_tag
7435 reply = await self.rpc(msg)
7436 return reply
7437
7438
7439
7440 @ReturnMapping(None)
7441 async def Prechecks(self, agent_version, name, owner_tag, uuid):
7442 '''
7443 agent_version : Number
7444 name : str
7445 owner_tag : str
7446 uuid : str
7447 Returns -> None
7448 '''
7449 # map input types to rpc msg
7450 _params = dict()
7451 msg = dict(type='MigrationTarget',
7452 request='Prechecks',
7453 version=1,
7454 params=_params)
7455 _params['agent-version'] = agent_version
7456 _params['name'] = name
7457 _params['owner-tag'] = owner_tag
7458 _params['uuid'] = uuid
7459 reply = await self.rpc(msg)
7460 return reply
7461
7462
7463
7464 class ModelConfigFacade(Type):
7465 name = 'ModelConfig'
7466 version = 1
7467 schema = {'definitions': {'ConfigValue': {'additionalProperties': False,
7468 'properties': {'source': {'type': 'string'},
7469 'value': {'additionalProperties': True,
7470 'type': 'object'}},
7471 'required': ['value', 'source'],
7472 'type': 'object'},
7473 'Error': {'additionalProperties': False,
7474 'properties': {'code': {'type': 'string'},
7475 'info': {'$ref': '#/definitions/ErrorInfo'},
7476 'message': {'type': 'string'}},
7477 'required': ['message', 'code'],
7478 'type': 'object'},
7479 'ErrorInfo': {'additionalProperties': False,
7480 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7481 'macaroon-path': {'type': 'string'}},
7482 'type': 'object'},
7483 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7484 'ModelConfigResults': {'additionalProperties': False,
7485 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
7486 'type': 'object'}},
7487 'required': ['config'],
7488 'type': 'object'},
7489 'ModelSLA': {'additionalProperties': False,
7490 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
7491 'creds': {'items': {'type': 'integer'},
7492 'type': 'array'}},
7493 'required': ['ModelSLAInfo', 'creds'],
7494 'type': 'object'},
7495 'ModelSLAInfo': {'additionalProperties': False,
7496 'properties': {'level': {'type': 'string'},
7497 'owner': {'type': 'string'}},
7498 'required': ['level', 'owner'],
7499 'type': 'object'},
7500 'ModelSet': {'additionalProperties': False,
7501 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
7502 'type': 'object'}},
7503 'type': 'object'}},
7504 'required': ['config'],
7505 'type': 'object'},
7506 'ModelUnset': {'additionalProperties': False,
7507 'properties': {'keys': {'items': {'type': 'string'},
7508 'type': 'array'}},
7509 'required': ['keys'],
7510 'type': 'object'},
7511 'StringResult': {'additionalProperties': False,
7512 'properties': {'error': {'$ref': '#/definitions/Error'},
7513 'result': {'type': 'string'}},
7514 'required': ['result'],
7515 'type': 'object'}},
7516 'properties': {'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
7517 'type': 'object'},
7518 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
7519 'type': 'object'},
7520 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
7521 'type': 'object'},
7522 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
7523 'type': 'object'},
7524 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
7525 'type': 'object'}},
7526 'type': 'object'}
7527
7528
7529 @ReturnMapping(ModelConfigResults)
7530 async def ModelGet(self):
7531 '''
7532
7533 Returns -> typing.Mapping[str, ~ConfigValue]
7534 '''
7535 # map input types to rpc msg
7536 _params = dict()
7537 msg = dict(type='ModelConfig',
7538 request='ModelGet',
7539 version=1,
7540 params=_params)
7541
7542 reply = await self.rpc(msg)
7543 return reply
7544
7545
7546
7547 @ReturnMapping(None)
7548 async def ModelSet(self, config):
7549 '''
7550 config : typing.Mapping[str, typing.Any]
7551 Returns -> None
7552 '''
7553 # map input types to rpc msg
7554 _params = dict()
7555 msg = dict(type='ModelConfig',
7556 request='ModelSet',
7557 version=1,
7558 params=_params)
7559 _params['config'] = config
7560 reply = await self.rpc(msg)
7561 return reply
7562
7563
7564
7565 @ReturnMapping(None)
7566 async def ModelUnset(self, keys):
7567 '''
7568 keys : typing.Sequence[str]
7569 Returns -> None
7570 '''
7571 # map input types to rpc msg
7572 _params = dict()
7573 msg = dict(type='ModelConfig',
7574 request='ModelUnset',
7575 version=1,
7576 params=_params)
7577 _params['keys'] = keys
7578 reply = await self.rpc(msg)
7579 return reply
7580
7581
7582
7583 @ReturnMapping(StringResult)
7584 async def SLALevel(self):
7585 '''
7586
7587 Returns -> typing.Union[_ForwardRef('Error'), str]
7588 '''
7589 # map input types to rpc msg
7590 _params = dict()
7591 msg = dict(type='ModelConfig',
7592 request='SLALevel',
7593 version=1,
7594 params=_params)
7595
7596 reply = await self.rpc(msg)
7597 return reply
7598
7599
7600
7601 @ReturnMapping(None)
7602 async def SetSLALevel(self, creds, level):
7603 '''
7604 creds : typing.Sequence[int]
7605 level : str
7606 Returns -> None
7607 '''
7608 # map input types to rpc msg
7609 _params = dict()
7610 msg = dict(type='ModelConfig',
7611 request='SetSLALevel',
7612 version=1,
7613 params=_params)
7614 _params['creds'] = creds
7615 _params['level'] = level
7616 reply = await self.rpc(msg)
7617 return reply
7618
7619
7620
7621 class ModelUpgraderFacade(Type):
7622 name = 'ModelUpgrader'
7623 version = 1
7624 schema = {'definitions': {'Entities': {'additionalProperties': False,
7625 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7626 'type': 'array'}},
7627 'required': ['entities'],
7628 'type': 'object'},
7629 'Entity': {'additionalProperties': False,
7630 'properties': {'tag': {'type': 'string'}},
7631 'required': ['tag'],
7632 'type': 'object'},
7633 'EntityStatusArgs': {'additionalProperties': False,
7634 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
7635 'type': 'object'}},
7636 'type': 'object'},
7637 'info': {'type': 'string'},
7638 'status': {'type': 'string'},
7639 'tag': {'type': 'string'}},
7640 'required': ['tag',
7641 'status',
7642 'info',
7643 'data'],
7644 'type': 'object'},
7645 'Error': {'additionalProperties': False,
7646 'properties': {'code': {'type': 'string'},
7647 'info': {'$ref': '#/definitions/ErrorInfo'},
7648 'message': {'type': 'string'}},
7649 'required': ['message', 'code'],
7650 'type': 'object'},
7651 'ErrorInfo': {'additionalProperties': False,
7652 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7653 'macaroon-path': {'type': 'string'}},
7654 'type': 'object'},
7655 'ErrorResult': {'additionalProperties': False,
7656 'properties': {'error': {'$ref': '#/definitions/Error'}},
7657 'type': 'object'},
7658 'ErrorResults': {'additionalProperties': False,
7659 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7660 'type': 'array'}},
7661 'required': ['results'],
7662 'type': 'object'},
7663 'IntResult': {'additionalProperties': False,
7664 'properties': {'error': {'$ref': '#/definitions/Error'},
7665 'result': {'type': 'integer'}},
7666 'required': ['result'],
7667 'type': 'object'},
7668 'IntResults': {'additionalProperties': False,
7669 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
7670 'type': 'array'}},
7671 'required': ['results'],
7672 'type': 'object'},
7673 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7674 'NotifyWatchResult': {'additionalProperties': False,
7675 'properties': {'NotifyWatcherId': {'type': 'string'},
7676 'error': {'$ref': '#/definitions/Error'}},
7677 'required': ['NotifyWatcherId'],
7678 'type': 'object'},
7679 'NotifyWatchResults': {'additionalProperties': False,
7680 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
7681 'type': 'array'}},
7682 'required': ['results'],
7683 'type': 'object'},
7684 'SetModelEnvironVersion': {'additionalProperties': False,
7685 'properties': {'model-tag': {'type': 'string'},
7686 'version': {'type': 'integer'}},
7687 'required': ['model-tag',
7688 'version'],
7689 'type': 'object'},
7690 'SetModelEnvironVersions': {'additionalProperties': False,
7691 'properties': {'models': {'items': {'$ref': '#/definitions/SetModelEnvironVersion'},
7692 'type': 'array'}},
7693 'type': 'object'},
7694 'SetStatus': {'additionalProperties': False,
7695 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
7696 'type': 'array'}},
7697 'required': ['entities'],
7698 'type': 'object'}},
7699 'properties': {'ModelEnvironVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7700 'Result': {'$ref': '#/definitions/IntResults'}},
7701 'type': 'object'},
7702 'ModelTargetEnvironVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7703 'Result': {'$ref': '#/definitions/IntResults'}},
7704 'type': 'object'},
7705 'SetModelEnvironVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelEnvironVersions'},
7706 'Result': {'$ref': '#/definitions/ErrorResults'}},
7707 'type': 'object'},
7708 'SetModelStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
7709 'Result': {'$ref': '#/definitions/ErrorResults'}},
7710 'type': 'object'},
7711 'WatchModelEnvironVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7712 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
7713 'type': 'object'}},
7714 'type': 'object'}
7715
7716
7717 @ReturnMapping(IntResults)
7718 async def ModelEnvironVersion(self, entities):
7719 '''
7720 entities : typing.Sequence[~Entity]
7721 Returns -> typing.Sequence[~IntResult]
7722 '''
7723 # map input types to rpc msg
7724 _params = dict()
7725 msg = dict(type='ModelUpgrader',
7726 request='ModelEnvironVersion',
7727 version=1,
7728 params=_params)
7729 _params['entities'] = entities
7730 reply = await self.rpc(msg)
7731 return reply
7732
7733
7734
7735 @ReturnMapping(IntResults)
7736 async def ModelTargetEnvironVersion(self, entities):
7737 '''
7738 entities : typing.Sequence[~Entity]
7739 Returns -> typing.Sequence[~IntResult]
7740 '''
7741 # map input types to rpc msg
7742 _params = dict()
7743 msg = dict(type='ModelUpgrader',
7744 request='ModelTargetEnvironVersion',
7745 version=1,
7746 params=_params)
7747 _params['entities'] = entities
7748 reply = await self.rpc(msg)
7749 return reply
7750
7751
7752
7753 @ReturnMapping(ErrorResults)
7754 async def SetModelEnvironVersion(self, models):
7755 '''
7756 models : typing.Sequence[~SetModelEnvironVersion]
7757 Returns -> typing.Sequence[~ErrorResult]
7758 '''
7759 # map input types to rpc msg
7760 _params = dict()
7761 msg = dict(type='ModelUpgrader',
7762 request='SetModelEnvironVersion',
7763 version=1,
7764 params=_params)
7765 _params['models'] = models
7766 reply = await self.rpc(msg)
7767 return reply
7768
7769
7770
7771 @ReturnMapping(ErrorResults)
7772 async def SetModelStatus(self, entities):
7773 '''
7774 entities : typing.Sequence[~EntityStatusArgs]
7775 Returns -> typing.Sequence[~ErrorResult]
7776 '''
7777 # map input types to rpc msg
7778 _params = dict()
7779 msg = dict(type='ModelUpgrader',
7780 request='SetModelStatus',
7781 version=1,
7782 params=_params)
7783 _params['entities'] = entities
7784 reply = await self.rpc(msg)
7785 return reply
7786
7787
7788
7789 @ReturnMapping(NotifyWatchResults)
7790 async def WatchModelEnvironVersion(self, entities):
7791 '''
7792 entities : typing.Sequence[~Entity]
7793 Returns -> typing.Sequence[~NotifyWatchResult]
7794 '''
7795 # map input types to rpc msg
7796 _params = dict()
7797 msg = dict(type='ModelUpgrader',
7798 request='WatchModelEnvironVersion',
7799 version=1,
7800 params=_params)
7801 _params['entities'] = entities
7802 reply = await self.rpc(msg)
7803 return reply
7804
7805
7806
7807 class NotifyWatcherFacade(Type):
7808 name = 'NotifyWatcher'
7809 version = 1
7810 schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
7811 'type': 'object'}
7812
7813
7814 @ReturnMapping(None)
7815 async def Next(self):
7816 '''
7817
7818 Returns -> None
7819 '''
7820 # map input types to rpc msg
7821 _params = dict()
7822 msg = dict(type='NotifyWatcher',
7823 request='Next',
7824 version=1,
7825 params=_params)
7826
7827 reply = await self.rpc(msg)
7828 return reply
7829
7830
7831
7832 @ReturnMapping(None)
7833 async def Stop(self):
7834 '''
7835
7836 Returns -> None
7837 '''
7838 # map input types to rpc msg
7839 _params = dict()
7840 msg = dict(type='NotifyWatcher',
7841 request='Stop',
7842 version=1,
7843 params=_params)
7844
7845 reply = await self.rpc(msg)
7846 return reply
7847
7848
7849
7850 class OfferStatusWatcherFacade(Type):
7851 name = 'OfferStatusWatcher'
7852 version = 1
7853 schema = {'definitions': {'EntityStatus': {'additionalProperties': False,
7854 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
7855 'type': 'object'}},
7856 'type': 'object'},
7857 'info': {'type': 'string'},
7858 'since': {'format': 'date-time',
7859 'type': 'string'},
7860 'status': {'type': 'string'}},
7861 'required': ['status', 'info', 'since'],
7862 'type': 'object'},
7863 'Error': {'additionalProperties': False,
7864 'properties': {'code': {'type': 'string'},
7865 'info': {'$ref': '#/definitions/ErrorInfo'},
7866 'message': {'type': 'string'}},
7867 'required': ['message', 'code'],
7868 'type': 'object'},
7869 'ErrorInfo': {'additionalProperties': False,
7870 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7871 'macaroon-path': {'type': 'string'}},
7872 'type': 'object'},
7873 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7874 'OfferStatusChange': {'additionalProperties': False,
7875 'properties': {'offer-name': {'type': 'string'},
7876 'status': {'$ref': '#/definitions/EntityStatus'}},
7877 'required': ['offer-name', 'status'],
7878 'type': 'object'},
7879 'OfferStatusWatchResult': {'additionalProperties': False,
7880 'properties': {'changes': {'items': {'$ref': '#/definitions/OfferStatusChange'},
7881 'type': 'array'},
7882 'error': {'$ref': '#/definitions/Error'},
7883 'watcher-id': {'type': 'string'}},
7884 'required': ['watcher-id',
7885 'changes'],
7886 'type': 'object'}},
7887 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/OfferStatusWatchResult'}},
7888 'type': 'object'},
7889 'Stop': {'type': 'object'}},
7890 'type': 'object'}
7891
7892
7893 @ReturnMapping(OfferStatusWatchResult)
7894 async def Next(self):
7895 '''
7896
7897 Returns -> typing.Union[typing.Sequence[~OfferStatusChange], _ForwardRef('Error'), str]
7898 '''
7899 # map input types to rpc msg
7900 _params = dict()
7901 msg = dict(type='OfferStatusWatcher',
7902 request='Next',
7903 version=1,
7904 params=_params)
7905
7906 reply = await self.rpc(msg)
7907 return reply
7908
7909
7910
7911 @ReturnMapping(None)
7912 async def Stop(self):
7913 '''
7914
7915 Returns -> None
7916 '''
7917 # map input types to rpc msg
7918 _params = dict()
7919 msg = dict(type='OfferStatusWatcher',
7920 request='Stop',
7921 version=1,
7922 params=_params)
7923
7924 reply = await self.rpc(msg)
7925 return reply
7926
7927
7928
7929 class PayloadsFacade(Type):
7930 name = 'Payloads'
7931 version = 1
7932 schema = {'definitions': {'Payload': {'additionalProperties': False,
7933 'properties': {'class': {'type': 'string'},
7934 'id': {'type': 'string'},
7935 'labels': {'items': {'type': 'string'},
7936 'type': 'array'},
7937 'machine': {'type': 'string'},
7938 'status': {'type': 'string'},
7939 'type': {'type': 'string'},
7940 'unit': {'type': 'string'}},
7941 'required': ['class',
7942 'type',
7943 'id',
7944 'status',
7945 'labels',
7946 'unit',
7947 'machine'],
7948 'type': 'object'},
7949 'PayloadListArgs': {'additionalProperties': False,
7950 'properties': {'patterns': {'items': {'type': 'string'},
7951 'type': 'array'}},
7952 'required': ['patterns'],
7953 'type': 'object'},
7954 'PayloadListResults': {'additionalProperties': False,
7955 'properties': {'results': {'items': {'$ref': '#/definitions/Payload'},
7956 'type': 'array'}},
7957 'required': ['results'],
7958 'type': 'object'}},
7959 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/PayloadListArgs'},
7960 'Result': {'$ref': '#/definitions/PayloadListResults'}},
7961 'type': 'object'}},
7962 'type': 'object'}
7963
7964
7965 @ReturnMapping(PayloadListResults)
7966 async def List(self, patterns):
7967 '''
7968 patterns : typing.Sequence[str]
7969 Returns -> typing.Sequence[~Payload]
7970 '''
7971 # map input types to rpc msg
7972 _params = dict()
7973 msg = dict(type='Payloads',
7974 request='List',
7975 version=1,
7976 params=_params)
7977 _params['patterns'] = patterns
7978 reply = await self.rpc(msg)
7979 return reply
7980
7981
7982
7983 class PayloadsHookContextFacade(Type):
7984 name = 'PayloadsHookContext'
7985 version = 1
7986 schema = {'definitions': {'Entities': {'additionalProperties': False,
7987 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7988 'type': 'array'}},
7989 'required': ['entities'],
7990 'type': 'object'},
7991 'Entity': {'additionalProperties': False,
7992 'properties': {'tag': {'type': 'string'}},
7993 'required': ['tag'],
7994 'type': 'object'},
7995 'Error': {'additionalProperties': False,
7996 'properties': {'code': {'type': 'string'},
7997 'info': {'$ref': '#/definitions/ErrorInfo'},
7998 'message': {'type': 'string'}},
7999 'required': ['message', 'code'],
8000 'type': 'object'},
8001 'ErrorInfo': {'additionalProperties': False,
8002 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8003 'macaroon-path': {'type': 'string'}},
8004 'type': 'object'},
8005 'LookUpPayloadArg': {'additionalProperties': False,
8006 'properties': {'id': {'type': 'string'},
8007 'name': {'type': 'string'}},
8008 'required': ['name', 'id'],
8009 'type': 'object'},
8010 'LookUpPayloadArgs': {'additionalProperties': False,
8011 'properties': {'args': {'items': {'$ref': '#/definitions/LookUpPayloadArg'},
8012 'type': 'array'}},
8013 'required': ['args'],
8014 'type': 'object'},
8015 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8016 'Payload': {'additionalProperties': False,
8017 'properties': {'class': {'type': 'string'},
8018 'id': {'type': 'string'},
8019 'labels': {'items': {'type': 'string'},
8020 'type': 'array'},
8021 'machine': {'type': 'string'},
8022 'status': {'type': 'string'},
8023 'type': {'type': 'string'},
8024 'unit': {'type': 'string'}},
8025 'required': ['class',
8026 'type',
8027 'id',
8028 'status',
8029 'labels',
8030 'unit',
8031 'machine'],
8032 'type': 'object'},
8033 'PayloadResult': {'additionalProperties': False,
8034 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
8035 'error': {'$ref': '#/definitions/Error'},
8036 'not-found': {'type': 'boolean'},
8037 'payload': {'$ref': '#/definitions/Payload'}},
8038 'required': ['Entity',
8039 'payload',
8040 'not-found'],
8041 'type': 'object'},
8042 'PayloadResults': {'additionalProperties': False,
8043 'properties': {'results': {'items': {'$ref': '#/definitions/PayloadResult'},
8044 'type': 'array'}},
8045 'required': ['results'],
8046 'type': 'object'},
8047 'SetPayloadStatusArg': {'additionalProperties': False,
8048 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
8049 'status': {'type': 'string'}},
8050 'required': ['Entity', 'status'],
8051 'type': 'object'},
8052 'SetPayloadStatusArgs': {'additionalProperties': False,
8053 'properties': {'args': {'items': {'$ref': '#/definitions/SetPayloadStatusArg'},
8054 'type': 'array'}},
8055 'required': ['args'],
8056 'type': 'object'},
8057 'TrackPayloadArgs': {'additionalProperties': False,
8058 'properties': {'payloads': {'items': {'$ref': '#/definitions/Payload'},
8059 'type': 'array'}},
8060 'required': ['payloads'],
8061 'type': 'object'}},
8062 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8063 'Result': {'$ref': '#/definitions/PayloadResults'}},
8064 'type': 'object'},
8065 'LookUp': {'properties': {'Params': {'$ref': '#/definitions/LookUpPayloadArgs'},
8066 'Result': {'$ref': '#/definitions/PayloadResults'}},
8067 'type': 'object'},
8068 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetPayloadStatusArgs'},
8069 'Result': {'$ref': '#/definitions/PayloadResults'}},
8070 'type': 'object'},
8071 'Track': {'properties': {'Params': {'$ref': '#/definitions/TrackPayloadArgs'},
8072 'Result': {'$ref': '#/definitions/PayloadResults'}},
8073 'type': 'object'},
8074 'Untrack': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8075 'Result': {'$ref': '#/definitions/PayloadResults'}},
8076 'type': 'object'}},
8077 'type': 'object'}
8078
8079
8080 @ReturnMapping(PayloadResults)
8081 async def List(self, entities):
8082 '''
8083 entities : typing.Sequence[~Entity]
8084 Returns -> typing.Sequence[~PayloadResult]
8085 '''
8086 # map input types to rpc msg
8087 _params = dict()
8088 msg = dict(type='PayloadsHookContext',
8089 request='List',
8090 version=1,
8091 params=_params)
8092 _params['entities'] = entities
8093 reply = await self.rpc(msg)
8094 return reply
8095
8096
8097
8098 @ReturnMapping(PayloadResults)
8099 async def LookUp(self, args):
8100 '''
8101 args : typing.Sequence[~LookUpPayloadArg]
8102 Returns -> typing.Sequence[~PayloadResult]
8103 '''
8104 # map input types to rpc msg
8105 _params = dict()
8106 msg = dict(type='PayloadsHookContext',
8107 request='LookUp',
8108 version=1,
8109 params=_params)
8110 _params['args'] = args
8111 reply = await self.rpc(msg)
8112 return reply
8113
8114
8115
8116 @ReturnMapping(PayloadResults)
8117 async def SetStatus(self, args):
8118 '''
8119 args : typing.Sequence[~SetPayloadStatusArg]
8120 Returns -> typing.Sequence[~PayloadResult]
8121 '''
8122 # map input types to rpc msg
8123 _params = dict()
8124 msg = dict(type='PayloadsHookContext',
8125 request='SetStatus',
8126 version=1,
8127 params=_params)
8128 _params['args'] = args
8129 reply = await self.rpc(msg)
8130 return reply
8131
8132
8133
8134 @ReturnMapping(PayloadResults)
8135 async def Track(self, payloads):
8136 '''
8137 payloads : typing.Sequence[~Payload]
8138 Returns -> typing.Sequence[~PayloadResult]
8139 '''
8140 # map input types to rpc msg
8141 _params = dict()
8142 msg = dict(type='PayloadsHookContext',
8143 request='Track',
8144 version=1,
8145 params=_params)
8146 _params['payloads'] = payloads
8147 reply = await self.rpc(msg)
8148 return reply
8149
8150
8151
8152 @ReturnMapping(PayloadResults)
8153 async def Untrack(self, entities):
8154 '''
8155 entities : typing.Sequence[~Entity]
8156 Returns -> typing.Sequence[~PayloadResult]
8157 '''
8158 # map input types to rpc msg
8159 _params = dict()
8160 msg = dict(type='PayloadsHookContext',
8161 request='Untrack',
8162 version=1,
8163 params=_params)
8164 _params['entities'] = entities
8165 reply = await self.rpc(msg)
8166 return reply
8167
8168
8169
8170 class PingerFacade(Type):
8171 name = 'Pinger'
8172 version = 1
8173 schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
8174 'type': 'object'}
8175
8176
8177 @ReturnMapping(None)
8178 async def Ping(self):
8179 '''
8180
8181 Returns -> None
8182 '''
8183 # map input types to rpc msg
8184 _params = dict()
8185 msg = dict(type='Pinger',
8186 request='Ping',
8187 version=1,
8188 params=_params)
8189
8190 reply = await self.rpc(msg)
8191 return reply
8192
8193
8194
8195 @ReturnMapping(None)
8196 async def Stop(self):
8197 '''
8198
8199 Returns -> None
8200 '''
8201 # map input types to rpc msg
8202 _params = dict()
8203 msg = dict(type='Pinger',
8204 request='Stop',
8205 version=1,
8206 params=_params)
8207
8208 reply = await self.rpc(msg)
8209 return reply
8210
8211
8212
8213 class ProxyUpdaterFacade(Type):
8214 name = 'ProxyUpdater'
8215 version = 1
8216 schema = {'definitions': {'Entities': {'additionalProperties': False,
8217 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
8218 'type': 'array'}},
8219 'required': ['entities'],
8220 'type': 'object'},
8221 'Entity': {'additionalProperties': False,
8222 'properties': {'tag': {'type': 'string'}},
8223 'required': ['tag'],
8224 'type': 'object'},
8225 'Error': {'additionalProperties': False,
8226 'properties': {'code': {'type': 'string'},
8227 'info': {'$ref': '#/definitions/ErrorInfo'},
8228 'message': {'type': 'string'}},
8229 'required': ['message', 'code'],
8230 'type': 'object'},
8231 'ErrorInfo': {'additionalProperties': False,
8232 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8233 'macaroon-path': {'type': 'string'}},
8234 'type': 'object'},
8235 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8236 'NotifyWatchResult': {'additionalProperties': False,
8237 'properties': {'NotifyWatcherId': {'type': 'string'},
8238 'error': {'$ref': '#/definitions/Error'}},
8239 'required': ['NotifyWatcherId'],
8240 'type': 'object'},
8241 'NotifyWatchResults': {'additionalProperties': False,
8242 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
8243 'type': 'array'}},
8244 'required': ['results'],
8245 'type': 'object'},
8246 'ProxyConfig': {'additionalProperties': False,
8247 'properties': {'ftp': {'type': 'string'},
8248 'http': {'type': 'string'},
8249 'https': {'type': 'string'},
8250 'no-proxy': {'type': 'string'}},
8251 'required': ['http',
8252 'https',
8253 'ftp',
8254 'no-proxy'],
8255 'type': 'object'},
8256 'ProxyConfigResult': {'additionalProperties': False,
8257 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
8258 'error': {'$ref': '#/definitions/Error'},
8259 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}},
8260 'required': ['proxy-settings',
8261 'apt-proxy-settings'],
8262 'type': 'object'},
8263 'ProxyConfigResults': {'additionalProperties': False,
8264 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
8265 'type': 'array'}},
8266 'required': ['results'],
8267 'type': 'object'}},
8268 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8269 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
8270 'type': 'object'},
8271 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8272 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
8273 'type': 'object'}},
8274 'type': 'object'}
8275
8276
8277 @ReturnMapping(ProxyConfigResults)
8278 async def ProxyConfig(self, entities):
8279 '''
8280 entities : typing.Sequence[~Entity]
8281 Returns -> typing.Sequence[~ProxyConfigResult]
8282 '''
8283 # map input types to rpc msg
8284 _params = dict()
8285 msg = dict(type='ProxyUpdater',
8286 request='ProxyConfig',
8287 version=1,
8288 params=_params)
8289 _params['entities'] = entities
8290 reply = await self.rpc(msg)
8291 return reply
8292
8293
8294
8295 @ReturnMapping(NotifyWatchResults)
8296 async def WatchForProxyConfigAndAPIHostPortChanges(self, entities):
8297 '''
8298 entities : typing.Sequence[~Entity]
8299 Returns -> typing.Sequence[~NotifyWatchResult]
8300 '''
8301 # map input types to rpc msg
8302 _params = dict()
8303 msg = dict(type='ProxyUpdater',
8304 request='WatchForProxyConfigAndAPIHostPortChanges',
8305 version=1,
8306 params=_params)
8307 _params['entities'] = entities
8308 reply = await self.rpc(msg)
8309 return reply
8310
8311
8312
8313 class RelationStatusWatcherFacade(Type):
8314 name = 'RelationStatusWatcher'
8315 version = 1
8316 schema = {'definitions': {'Error': {'additionalProperties': False,
8317 'properties': {'code': {'type': 'string'},
8318 'info': {'$ref': '#/definitions/ErrorInfo'},
8319 'message': {'type': 'string'}},
8320 'required': ['message', 'code'],
8321 'type': 'object'},
8322 'ErrorInfo': {'additionalProperties': False,
8323 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8324 'macaroon-path': {'type': 'string'}},
8325 'type': 'object'},
8326 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8327 'RelationLifeSuspendedStatusChange': {'additionalProperties': False,
8328 'properties': {'key': {'type': 'string'},
8329 'life': {'type': 'string'},
8330 'suspended': {'type': 'boolean'},
8331 'suspended-reason': {'type': 'string'}},
8332 'required': ['key',
8333 'life',
8334 'suspended',
8335 'suspended-reason'],
8336 'type': 'object'},
8337 'RelationLifeSuspendedStatusWatchResult': {'additionalProperties': False,
8338 'properties': {'changes': {'items': {'$ref': '#/definitions/RelationLifeSuspendedStatusChange'},
8339 'type': 'array'},
8340 'error': {'$ref': '#/definitions/Error'},
8341 'watcher-id': {'type': 'string'}},
8342 'required': ['watcher-id',
8343 'changes'],
8344 'type': 'object'}},
8345 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationLifeSuspendedStatusWatchResult'}},
8346 'type': 'object'},
8347 'Stop': {'type': 'object'}},
8348 'type': 'object'}
8349
8350
8351 @ReturnMapping(RelationLifeSuspendedStatusWatchResult)
8352 async def Next(self):
8353 '''
8354
8355 Returns -> typing.Union[typing.Sequence[~RelationLifeSuspendedStatusChange], _ForwardRef('Error'), str]
8356 '''
8357 # map input types to rpc msg
8358 _params = dict()
8359 msg = dict(type='RelationStatusWatcher',
8360 request='Next',
8361 version=1,
8362 params=_params)
8363
8364 reply = await self.rpc(msg)
8365 return reply
8366
8367
8368
8369 @ReturnMapping(None)
8370 async def Stop(self):
8371 '''
8372
8373 Returns -> None
8374 '''
8375 # map input types to rpc msg
8376 _params = dict()
8377 msg = dict(type='RelationStatusWatcher',
8378 request='Stop',
8379 version=1,
8380 params=_params)
8381
8382 reply = await self.rpc(msg)
8383 return reply
8384
8385
8386
8387 class RelationUnitsWatcherFacade(Type):
8388 name = 'RelationUnitsWatcher'
8389 version = 1
8390 schema = {'definitions': {'Error': {'additionalProperties': False,
8391 'properties': {'code': {'type': 'string'},
8392 'info': {'$ref': '#/definitions/ErrorInfo'},
8393 'message': {'type': 'string'}},
8394 'required': ['message', 'code'],
8395 'type': 'object'},
8396 'ErrorInfo': {'additionalProperties': False,
8397 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8398 'macaroon-path': {'type': 'string'}},
8399 'type': 'object'},
8400 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8401 'RelationUnitsChange': {'additionalProperties': False,
8402 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
8403 'type': 'object'},
8404 'departed': {'items': {'type': 'string'},
8405 'type': 'array'}},
8406 'required': ['changed'],
8407 'type': 'object'},
8408 'RelationUnitsWatchResult': {'additionalProperties': False,
8409 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
8410 'error': {'$ref': '#/definitions/Error'},
8411 'watcher-id': {'type': 'string'}},
8412 'required': ['watcher-id',
8413 'changes'],
8414 'type': 'object'},
8415 'UnitSettings': {'additionalProperties': False,
8416 'properties': {'version': {'type': 'integer'}},
8417 'required': ['version'],
8418 'type': 'object'}},
8419 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
8420 'type': 'object'},
8421 'Stop': {'type': 'object'}},
8422 'type': 'object'}
8423
8424
8425 @ReturnMapping(RelationUnitsWatchResult)
8426 async def Next(self):
8427 '''
8428
8429 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
8430 '''
8431 # map input types to rpc msg
8432 _params = dict()
8433 msg = dict(type='RelationUnitsWatcher',
8434 request='Next',
8435 version=1,
8436 params=_params)
8437
8438 reply = await self.rpc(msg)
8439 return reply
8440
8441
8442
8443 @ReturnMapping(None)
8444 async def Stop(self):
8445 '''
8446
8447 Returns -> None
8448 '''
8449 # map input types to rpc msg
8450 _params = dict()
8451 msg = dict(type='RelationUnitsWatcher',
8452 request='Stop',
8453 version=1,
8454 params=_params)
8455
8456 reply = await self.rpc(msg)
8457 return reply
8458
8459
8460
8461 class RemoteApplicationWatcherFacade(Type):
8462 name = 'RemoteApplicationWatcher'
8463 version = 1
8464 schema = {'definitions': {'Error': {'additionalProperties': False,
8465 'properties': {'code': {'type': 'string'},
8466 'info': {'$ref': '#/definitions/ErrorInfo'},
8467 'message': {'type': 'string'}},
8468 'required': ['message', 'code'],
8469 'type': 'object'},
8470 'ErrorInfo': {'additionalProperties': False,
8471 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8472 'macaroon-path': {'type': 'string'}},
8473 'type': 'object'},
8474 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8475 'RemoteApplicationChange': {'additionalProperties': False,
8476 'properties': {'application-tag': {'type': 'string'},
8477 'life': {'type': 'string'},
8478 'relations': {'$ref': '#/definitions/RemoteRelationsChange'}},
8479 'required': ['application-tag',
8480 'life',
8481 'relations'],
8482 'type': 'object'},
8483 'RemoteApplicationWatchResult': {'additionalProperties': False,
8484 'properties': {'change': {'$ref': '#/definitions/RemoteApplicationChange'},
8485 'error': {'$ref': '#/definitions/Error'},
8486 'id': {'type': 'string'}},
8487 'required': ['id'],
8488 'type': 'object'},
8489 'RemoteEntityId': {'additionalProperties': False,
8490 'properties': {'model-uuid': {'type': 'string'},
8491 'token': {'type': 'string'}},
8492 'required': ['model-uuid', 'token'],
8493 'type': 'object'},
8494 'RemoteRelationChange': {'additionalProperties': False,
8495 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
8496 'type': 'object'},
8497 'departed-units': {'items': {'type': 'string'},
8498 'type': 'array'},
8499 'id': {'type': 'integer'},
8500 'life': {'type': 'string'}},
8501 'required': ['id', 'life'],
8502 'type': 'object'},
8503 'RemoteRelationUnitChange': {'additionalProperties': False,
8504 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
8505 'type': 'object'}},
8506 'type': 'object'},
8507 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
8508 'required': ['unit-id'],
8509 'type': 'object'},
8510 'RemoteRelationsChange': {'additionalProperties': False,
8511 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
8512 'type': 'array'},
8513 'initial': {'type': 'boolean'},
8514 'removed': {'items': {'type': 'integer'},
8515 'type': 'array'}},
8516 'required': ['initial'],
8517 'type': 'object'}},
8518 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteApplicationWatchResult'}},
8519 'type': 'object'},
8520 'Stop': {'type': 'object'}},
8521 'type': 'object'}
8522
8523
8524 @ReturnMapping(RemoteApplicationWatchResult)
8525 async def Next(self):
8526 '''
8527
8528 Returns -> typing.Union[_ForwardRef('RemoteApplicationChange'), _ForwardRef('Error'), str]
8529 '''
8530 # map input types to rpc msg
8531 _params = dict()
8532 msg = dict(type='RemoteApplicationWatcher',
8533 request='Next',
8534 version=1,
8535 params=_params)
8536
8537 reply = await self.rpc(msg)
8538 return reply
8539
8540
8541
8542 @ReturnMapping(None)
8543 async def Stop(self):
8544 '''
8545
8546 Returns -> None
8547 '''
8548 # map input types to rpc msg
8549 _params = dict()
8550 msg = dict(type='RemoteApplicationWatcher',
8551 request='Stop',
8552 version=1,
8553 params=_params)
8554
8555 reply = await self.rpc(msg)
8556 return reply
8557
8558
8559
8560 class RemoteRelationsFacade(Type):
8561 name = 'RemoteRelations'
8562 version = 1
8563 schema = {'definitions': {'ControllerAPIInfoResult': {'additionalProperties': False,
8564 'properties': {'addresses': {'items': {'type': 'string'},
8565 'type': 'array'},
8566 'cacert': {'type': 'string'},
8567 'error': {'$ref': '#/definitions/Error'}},
8568 'required': ['addresses',
8569 'cacert'],
8570 'type': 'object'},
8571 'ControllerAPIInfoResults': {'additionalProperties': False,
8572 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
8573 'type': 'array'}},
8574 'required': ['results'],
8575 'type': 'object'},
8576 'ControllerConfigResult': {'additionalProperties': False,
8577 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
8578 'type': 'object'}},
8579 'type': 'object'}},
8580 'required': ['config'],
8581 'type': 'object'},
8582 'Entities': {'additionalProperties': False,
8583 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
8584 'type': 'array'}},
8585 'required': ['entities'],
8586 'type': 'object'},
8587 'Entity': {'additionalProperties': False,
8588 'properties': {'tag': {'type': 'string'}},
8589 'required': ['tag'],
8590 'type': 'object'},
8591 'EntityMacaroonArg': {'additionalProperties': False,
8592 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8593 'tag': {'type': 'string'}},
8594 'required': ['macaroon', 'tag'],
8595 'type': 'object'},
8596 'EntityMacaroonArgs': {'additionalProperties': False,
8597 'properties': {'Args': {'items': {'$ref': '#/definitions/EntityMacaroonArg'},
8598 'type': 'array'}},
8599 'required': ['Args'],
8600 'type': 'object'},
8601 'EntityStatusArgs': {'additionalProperties': False,
8602 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8603 'type': 'object'}},
8604 'type': 'object'},
8605 'info': {'type': 'string'},
8606 'status': {'type': 'string'},
8607 'tag': {'type': 'string'}},
8608 'required': ['tag',
8609 'status',
8610 'info',
8611 'data'],
8612 'type': 'object'},
8613 'Error': {'additionalProperties': False,
8614 'properties': {'code': {'type': 'string'},
8615 'info': {'$ref': '#/definitions/ErrorInfo'},
8616 'message': {'type': 'string'}},
8617 'required': ['message', 'code'],
8618 'type': 'object'},
8619 'ErrorInfo': {'additionalProperties': False,
8620 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8621 'macaroon-path': {'type': 'string'}},
8622 'type': 'object'},
8623 'ErrorResult': {'additionalProperties': False,
8624 'properties': {'error': {'$ref': '#/definitions/Error'}},
8625 'type': 'object'},
8626 'ErrorResults': {'additionalProperties': False,
8627 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
8628 'type': 'array'}},
8629 'required': ['results'],
8630 'type': 'object'},
8631 'GetTokenArg': {'additionalProperties': False,
8632 'properties': {'tag': {'type': 'string'}},
8633 'required': ['tag'],
8634 'type': 'object'},
8635 'GetTokenArgs': {'additionalProperties': False,
8636 'properties': {'Args': {'items': {'$ref': '#/definitions/GetTokenArg'},
8637 'type': 'array'}},
8638 'required': ['Args'],
8639 'type': 'object'},
8640 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8641 'RelationUnit': {'additionalProperties': False,
8642 'properties': {'relation': {'type': 'string'},
8643 'unit': {'type': 'string'}},
8644 'required': ['relation', 'unit'],
8645 'type': 'object'},
8646 'RelationUnits': {'additionalProperties': False,
8647 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
8648 'type': 'array'}},
8649 'required': ['relation-units'],
8650 'type': 'object'},
8651 'RelationUnitsChange': {'additionalProperties': False,
8652 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
8653 'type': 'object'},
8654 'departed': {'items': {'type': 'string'},
8655 'type': 'array'}},
8656 'required': ['changed'],
8657 'type': 'object'},
8658 'RelationUnitsWatchResult': {'additionalProperties': False,
8659 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
8660 'error': {'$ref': '#/definitions/Error'},
8661 'watcher-id': {'type': 'string'}},
8662 'required': ['watcher-id',
8663 'changes'],
8664 'type': 'object'},
8665 'RelationUnitsWatchResults': {'additionalProperties': False,
8666 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
8667 'type': 'array'}},
8668 'required': ['results'],
8669 'type': 'object'},
8670 'RemoteApplication': {'additionalProperties': False,
8671 'properties': {'is-consumer-proxy': {'type': 'boolean'},
8672 'life': {'type': 'string'},
8673 'macaroon': {'$ref': '#/definitions/Macaroon'},
8674 'model-uuid': {'type': 'string'},
8675 'name': {'type': 'string'},
8676 'offer-uuid': {'type': 'string'},
8677 'status': {'type': 'string'}},
8678 'required': ['name',
8679 'offer-uuid',
8680 'model-uuid',
8681 'is-consumer-proxy'],
8682 'type': 'object'},
8683 'RemoteApplicationResult': {'additionalProperties': False,
8684 'properties': {'error': {'$ref': '#/definitions/Error'},
8685 'result': {'$ref': '#/definitions/RemoteApplication'}},
8686 'type': 'object'},
8687 'RemoteApplicationResults': {'additionalProperties': False,
8688 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteApplicationResult'},
8689 'type': 'array'}},
8690 'type': 'object'},
8691 'RemoteEndpoint': {'additionalProperties': False,
8692 'properties': {'interface': {'type': 'string'},
8693 'limit': {'type': 'integer'},
8694 'name': {'type': 'string'},
8695 'role': {'type': 'string'}},
8696 'required': ['name',
8697 'role',
8698 'interface',
8699 'limit'],
8700 'type': 'object'},
8701 'RemoteEntityTokenArg': {'additionalProperties': False,
8702 'properties': {'tag': {'type': 'string'},
8703 'token': {'type': 'string'}},
8704 'required': ['tag'],
8705 'type': 'object'},
8706 'RemoteEntityTokenArgs': {'additionalProperties': False,
8707 'properties': {'Args': {'items': {'$ref': '#/definitions/RemoteEntityTokenArg'},
8708 'type': 'array'}},
8709 'required': ['Args'],
8710 'type': 'object'},
8711 'RemoteRelation': {'additionalProperties': False,
8712 'properties': {'application-name': {'type': 'string'},
8713 'endpoint': {'$ref': '#/definitions/RemoteEndpoint'},
8714 'id': {'type': 'integer'},
8715 'key': {'type': 'string'},
8716 'life': {'type': 'string'},
8717 'remote-application-name': {'type': 'string'},
8718 'remote-endpoint-name': {'type': 'string'},
8719 'source-model-uuid': {'type': 'string'},
8720 'suspended': {'type': 'boolean'}},
8721 'required': ['life',
8722 'suspended',
8723 'id',
8724 'key',
8725 'application-name',
8726 'endpoint',
8727 'remote-application-name',
8728 'remote-endpoint-name',
8729 'source-model-uuid'],
8730 'type': 'object'},
8731 'RemoteRelationChangeEvent': {'additionalProperties': False,
8732 'properties': {'application-token': {'type': 'string'},
8733 'changed-units': {'items': {'$ref': '#/definitions/RemoteRelationUnitChange'},
8734 'type': 'array'},
8735 'departed-units': {'items': {'type': 'integer'},
8736 'type': 'array'},
8737 'force-cleanup': {'type': 'boolean'},
8738 'life': {'type': 'string'},
8739 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
8740 'type': 'array'},
8741 'relation-token': {'type': 'string'},
8742 'suspended': {'type': 'boolean'},
8743 'suspended-reason': {'type': 'string'}},
8744 'required': ['relation-token',
8745 'application-token',
8746 'life'],
8747 'type': 'object'},
8748 'RemoteRelationResult': {'additionalProperties': False,
8749 'properties': {'error': {'$ref': '#/definitions/Error'},
8750 'result': {'$ref': '#/definitions/RemoteRelation'}},
8751 'type': 'object'},
8752 'RemoteRelationResults': {'additionalProperties': False,
8753 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteRelationResult'},
8754 'type': 'array'}},
8755 'required': ['results'],
8756 'type': 'object'},
8757 'RemoteRelationUnitChange': {'additionalProperties': False,
8758 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
8759 'type': 'object'}},
8760 'type': 'object'},
8761 'unit-id': {'type': 'integer'}},
8762 'required': ['unit-id'],
8763 'type': 'object'},
8764 'RemoteRelationsChanges': {'additionalProperties': False,
8765 'properties': {'changes': {'items': {'$ref': '#/definitions/RemoteRelationChangeEvent'},
8766 'type': 'array'}},
8767 'type': 'object'},
8768 'SetStatus': {'additionalProperties': False,
8769 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
8770 'type': 'array'}},
8771 'required': ['entities'],
8772 'type': 'object'},
8773 'SettingsResult': {'additionalProperties': False,
8774 'properties': {'error': {'$ref': '#/definitions/Error'},
8775 'settings': {'patternProperties': {'.*': {'type': 'string'}},
8776 'type': 'object'}},
8777 'required': ['settings'],
8778 'type': 'object'},
8779 'SettingsResults': {'additionalProperties': False,
8780 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
8781 'type': 'array'}},
8782 'required': ['results'],
8783 'type': 'object'},
8784 'StringResult': {'additionalProperties': False,
8785 'properties': {'error': {'$ref': '#/definitions/Error'},
8786 'result': {'type': 'string'}},
8787 'required': ['result'],
8788 'type': 'object'},
8789 'StringResults': {'additionalProperties': False,
8790 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
8791 'type': 'array'}},
8792 'required': ['results'],
8793 'type': 'object'},
8794 'StringsWatchResult': {'additionalProperties': False,
8795 'properties': {'changes': {'items': {'type': 'string'},
8796 'type': 'array'},
8797 'error': {'$ref': '#/definitions/Error'},
8798 'watcher-id': {'type': 'string'}},
8799 'required': ['watcher-id'],
8800 'type': 'object'},
8801 'StringsWatchResults': {'additionalProperties': False,
8802 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
8803 'type': 'array'}},
8804 'required': ['results'],
8805 'type': 'object'},
8806 'TokenResult': {'additionalProperties': False,
8807 'properties': {'error': {'$ref': '#/definitions/Error'},
8808 'token': {'type': 'string'}},
8809 'type': 'object'},
8810 'TokenResults': {'additionalProperties': False,
8811 'properties': {'results': {'items': {'$ref': '#/definitions/TokenResult'},
8812 'type': 'array'}},
8813 'type': 'object'},
8814 'UnitSettings': {'additionalProperties': False,
8815 'properties': {'version': {'type': 'integer'}},
8816 'required': ['version'],
8817 'type': 'object'}},
8818 'properties': {'ConsumeRemoteRelationChanges': {'properties': {'Params': {'$ref': '#/definitions/RemoteRelationsChanges'},
8819 'Result': {'$ref': '#/definitions/ErrorResults'}},
8820 'type': 'object'},
8821 'ControllerAPIInfoForModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8822 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
8823 'type': 'object'},
8824 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
8825 'type': 'object'},
8826 'ExportEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8827 'Result': {'$ref': '#/definitions/TokenResults'}},
8828 'type': 'object'},
8829 'GetTokens': {'properties': {'Params': {'$ref': '#/definitions/GetTokenArgs'},
8830 'Result': {'$ref': '#/definitions/StringResults'}},
8831 'type': 'object'},
8832 'ImportRemoteEntities': {'properties': {'Params': {'$ref': '#/definitions/RemoteEntityTokenArgs'},
8833 'Result': {'$ref': '#/definitions/ErrorResults'}},
8834 'type': 'object'},
8835 'RelationUnitSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
8836 'Result': {'$ref': '#/definitions/SettingsResults'}},
8837 'type': 'object'},
8838 'Relations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8839 'Result': {'$ref': '#/definitions/RemoteRelationResults'}},
8840 'type': 'object'},
8841 'RemoteApplications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8842 'Result': {'$ref': '#/definitions/RemoteApplicationResults'}},
8843 'type': 'object'},
8844 'SaveMacaroons': {'properties': {'Params': {'$ref': '#/definitions/EntityMacaroonArgs'},
8845 'Result': {'$ref': '#/definitions/ErrorResults'}},
8846 'type': 'object'},
8847 'SetRemoteApplicationsStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
8848 'Result': {'$ref': '#/definitions/ErrorResults'}},
8849 'type': 'object'},
8850 'WatchLocalRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8851 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
8852 'type': 'object'},
8853 'WatchRemoteApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8854 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
8855 'type': 'object'},
8856 'WatchRemoteApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
8857 'type': 'object'},
8858 'WatchRemoteRelations': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
8859 'type': 'object'}},
8860 'type': 'object'}
8861
8862
8863 @ReturnMapping(ErrorResults)
8864 async def ConsumeRemoteRelationChanges(self, changes):
8865 '''
8866 changes : typing.Sequence[~RemoteRelationChangeEvent]
8867 Returns -> typing.Sequence[~ErrorResult]
8868 '''
8869 # map input types to rpc msg
8870 _params = dict()
8871 msg = dict(type='RemoteRelations',
8872 request='ConsumeRemoteRelationChanges',
8873 version=1,
8874 params=_params)
8875 _params['changes'] = changes
8876 reply = await self.rpc(msg)
8877 return reply
8878
8879
8880
8881 @ReturnMapping(ControllerAPIInfoResults)
8882 async def ControllerAPIInfoForModels(self, entities):
8883 '''
8884 entities : typing.Sequence[~Entity]
8885 Returns -> typing.Sequence[~ControllerAPIInfoResult]
8886 '''
8887 # map input types to rpc msg
8888 _params = dict()
8889 msg = dict(type='RemoteRelations',
8890 request='ControllerAPIInfoForModels',
8891 version=1,
8892 params=_params)
8893 _params['entities'] = entities
8894 reply = await self.rpc(msg)
8895 return reply
8896
8897
8898
8899 @ReturnMapping(ControllerConfigResult)
8900 async def ControllerConfig(self):
8901 '''
8902
8903 Returns -> typing.Mapping[str, typing.Any]
8904 '''
8905 # map input types to rpc msg
8906 _params = dict()
8907 msg = dict(type='RemoteRelations',
8908 request='ControllerConfig',
8909 version=1,
8910 params=_params)
8911
8912 reply = await self.rpc(msg)
8913 return reply
8914
8915
8916
8917 @ReturnMapping(TokenResults)
8918 async def ExportEntities(self, entities):
8919 '''
8920 entities : typing.Sequence[~Entity]
8921 Returns -> typing.Sequence[~TokenResult]
8922 '''
8923 # map input types to rpc msg
8924 _params = dict()
8925 msg = dict(type='RemoteRelations',
8926 request='ExportEntities',
8927 version=1,
8928 params=_params)
8929 _params['entities'] = entities
8930 reply = await self.rpc(msg)
8931 return reply
8932
8933
8934
8935 @ReturnMapping(StringResults)
8936 async def GetTokens(self, args):
8937 '''
8938 args : typing.Sequence[~GetTokenArg]
8939 Returns -> typing.Sequence[~StringResult]
8940 '''
8941 # map input types to rpc msg
8942 _params = dict()
8943 msg = dict(type='RemoteRelations',
8944 request='GetTokens',
8945 version=1,
8946 params=_params)
8947 _params['Args'] = args
8948 reply = await self.rpc(msg)
8949 return reply
8950
8951
8952
8953 @ReturnMapping(ErrorResults)
8954 async def ImportRemoteEntities(self, args):
8955 '''
8956 args : typing.Sequence[~RemoteEntityTokenArg]
8957 Returns -> typing.Sequence[~ErrorResult]
8958 '''
8959 # map input types to rpc msg
8960 _params = dict()
8961 msg = dict(type='RemoteRelations',
8962 request='ImportRemoteEntities',
8963 version=1,
8964 params=_params)
8965 _params['Args'] = args
8966 reply = await self.rpc(msg)
8967 return reply
8968
8969
8970
8971 @ReturnMapping(SettingsResults)
8972 async def RelationUnitSettings(self, relation_units):
8973 '''
8974 relation_units : typing.Sequence[~RelationUnit]
8975 Returns -> typing.Sequence[~SettingsResult]
8976 '''
8977 # map input types to rpc msg
8978 _params = dict()
8979 msg = dict(type='RemoteRelations',
8980 request='RelationUnitSettings',
8981 version=1,
8982 params=_params)
8983 _params['relation-units'] = relation_units
8984 reply = await self.rpc(msg)
8985 return reply
8986
8987
8988
8989 @ReturnMapping(RemoteRelationResults)
8990 async def Relations(self, entities):
8991 '''
8992 entities : typing.Sequence[~Entity]
8993 Returns -> typing.Sequence[~RemoteRelationResult]
8994 '''
8995 # map input types to rpc msg
8996 _params = dict()
8997 msg = dict(type='RemoteRelations',
8998 request='Relations',
8999 version=1,
9000 params=_params)
9001 _params['entities'] = entities
9002 reply = await self.rpc(msg)
9003 return reply
9004
9005
9006
9007 @ReturnMapping(RemoteApplicationResults)
9008 async def RemoteApplications(self, entities):
9009 '''
9010 entities : typing.Sequence[~Entity]
9011 Returns -> typing.Sequence[~RemoteApplicationResult]
9012 '''
9013 # map input types to rpc msg
9014 _params = dict()
9015 msg = dict(type='RemoteRelations',
9016 request='RemoteApplications',
9017 version=1,
9018 params=_params)
9019 _params['entities'] = entities
9020 reply = await self.rpc(msg)
9021 return reply
9022
9023
9024
9025 @ReturnMapping(ErrorResults)
9026 async def SaveMacaroons(self, args):
9027 '''
9028 args : typing.Sequence[~EntityMacaroonArg]
9029 Returns -> typing.Sequence[~ErrorResult]
9030 '''
9031 # map input types to rpc msg
9032 _params = dict()
9033 msg = dict(type='RemoteRelations',
9034 request='SaveMacaroons',
9035 version=1,
9036 params=_params)
9037 _params['Args'] = args
9038 reply = await self.rpc(msg)
9039 return reply
9040
9041
9042
9043 @ReturnMapping(ErrorResults)
9044 async def SetRemoteApplicationsStatus(self, entities):
9045 '''
9046 entities : typing.Sequence[~EntityStatusArgs]
9047 Returns -> typing.Sequence[~ErrorResult]
9048 '''
9049 # map input types to rpc msg
9050 _params = dict()
9051 msg = dict(type='RemoteRelations',
9052 request='SetRemoteApplicationsStatus',
9053 version=1,
9054 params=_params)
9055 _params['entities'] = entities
9056 reply = await self.rpc(msg)
9057 return reply
9058
9059
9060
9061 @ReturnMapping(RelationUnitsWatchResults)
9062 async def WatchLocalRelationUnits(self, entities):
9063 '''
9064 entities : typing.Sequence[~Entity]
9065 Returns -> typing.Sequence[~RelationUnitsWatchResult]
9066 '''
9067 # map input types to rpc msg
9068 _params = dict()
9069 msg = dict(type='RemoteRelations',
9070 request='WatchLocalRelationUnits',
9071 version=1,
9072 params=_params)
9073 _params['entities'] = entities
9074 reply = await self.rpc(msg)
9075 return reply
9076
9077
9078
9079 @ReturnMapping(StringsWatchResults)
9080 async def WatchRemoteApplicationRelations(self, entities):
9081 '''
9082 entities : typing.Sequence[~Entity]
9083 Returns -> typing.Sequence[~StringsWatchResult]
9084 '''
9085 # map input types to rpc msg
9086 _params = dict()
9087 msg = dict(type='RemoteRelations',
9088 request='WatchRemoteApplicationRelations',
9089 version=1,
9090 params=_params)
9091 _params['entities'] = entities
9092 reply = await self.rpc(msg)
9093 return reply
9094
9095
9096
9097 @ReturnMapping(StringsWatchResult)
9098 async def WatchRemoteApplications(self):
9099 '''
9100
9101 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
9102 '''
9103 # map input types to rpc msg
9104 _params = dict()
9105 msg = dict(type='RemoteRelations',
9106 request='WatchRemoteApplications',
9107 version=1,
9108 params=_params)
9109
9110 reply = await self.rpc(msg)
9111 return reply
9112
9113
9114
9115 @ReturnMapping(StringsWatchResult)
9116 async def WatchRemoteRelations(self):
9117 '''
9118
9119 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
9120 '''
9121 # map input types to rpc msg
9122 _params = dict()
9123 msg = dict(type='RemoteRelations',
9124 request='WatchRemoteRelations',
9125 version=1,
9126 params=_params)
9127
9128 reply = await self.rpc(msg)
9129 return reply
9130
9131
9132
9133 class RemoteRelationsWatcherFacade(Type):
9134 name = 'RemoteRelationsWatcher'
9135 version = 1
9136 schema = {'definitions': {'Error': {'additionalProperties': False,
9137 'properties': {'code': {'type': 'string'},
9138 'info': {'$ref': '#/definitions/ErrorInfo'},
9139 'message': {'type': 'string'}},
9140 'required': ['message', 'code'],
9141 'type': 'object'},
9142 'ErrorInfo': {'additionalProperties': False,
9143 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9144 'macaroon-path': {'type': 'string'}},
9145 'type': 'object'},
9146 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9147 'RemoteEntityId': {'additionalProperties': False,
9148 'properties': {'model-uuid': {'type': 'string'},
9149 'token': {'type': 'string'}},
9150 'required': ['model-uuid', 'token'],
9151 'type': 'object'},
9152 'RemoteRelationChange': {'additionalProperties': False,
9153 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
9154 'type': 'object'},
9155 'departed-units': {'items': {'type': 'string'},
9156 'type': 'array'},
9157 'id': {'type': 'integer'},
9158 'life': {'type': 'string'}},
9159 'required': ['id', 'life'],
9160 'type': 'object'},
9161 'RemoteRelationUnitChange': {'additionalProperties': False,
9162 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
9163 'type': 'object'}},
9164 'type': 'object'},
9165 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
9166 'required': ['unit-id'],
9167 'type': 'object'},
9168 'RemoteRelationsChange': {'additionalProperties': False,
9169 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
9170 'type': 'array'},
9171 'initial': {'type': 'boolean'},
9172 'removed': {'items': {'type': 'integer'},
9173 'type': 'array'}},
9174 'required': ['initial'],
9175 'type': 'object'},
9176 'RemoteRelationsWatchResult': {'additionalProperties': False,
9177 'properties': {'RemoteRelationsWatcherId': {'type': 'string'},
9178 'change': {'$ref': '#/definitions/RemoteRelationsChange'},
9179 'error': {'$ref': '#/definitions/Error'}},
9180 'required': ['RemoteRelationsWatcherId'],
9181 'type': 'object'}},
9182 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteRelationsWatchResult'}},
9183 'type': 'object'},
9184 'Stop': {'type': 'object'}},
9185 'type': 'object'}
9186
9187
9188 @ReturnMapping(RemoteRelationsWatchResult)
9189 async def Next(self):
9190 '''
9191
9192 Returns -> typing.Union[str, _ForwardRef('RemoteRelationsChange'), _ForwardRef('Error')]
9193 '''
9194 # map input types to rpc msg
9195 _params = dict()
9196 msg = dict(type='RemoteRelationsWatcher',
9197 request='Next',
9198 version=1,
9199 params=_params)
9200
9201 reply = await self.rpc(msg)
9202 return reply
9203
9204
9205
9206 @ReturnMapping(None)
9207 async def Stop(self):
9208 '''
9209
9210 Returns -> None
9211 '''
9212 # map input types to rpc msg
9213 _params = dict()
9214 msg = dict(type='RemoteRelationsWatcher',
9215 request='Stop',
9216 version=1,
9217 params=_params)
9218
9219 reply = await self.rpc(msg)
9220 return reply
9221
9222
9223
9224 class ResourcesFacade(Type):
9225 name = 'Resources'
9226 version = 1
9227 schema = {'definitions': {'AddCharmWithAuthorization': {'additionalProperties': False,
9228 'properties': {'channel': {'type': 'string'},
9229 'force': {'type': 'boolean'},
9230 'macaroon': {'$ref': '#/definitions/Macaroon'},
9231 'url': {'type': 'string'}},
9232 'required': ['url',
9233 'channel',
9234 'macaroon',
9235 'force'],
9236 'type': 'object'},
9237 'AddPendingResourcesArgs': {'additionalProperties': False,
9238 'properties': {'AddCharmWithAuthorization': {'$ref': '#/definitions/AddCharmWithAuthorization'},
9239 'Entity': {'$ref': '#/definitions/Entity'},
9240 'resources': {'items': {'$ref': '#/definitions/CharmResource'},
9241 'type': 'array'}},
9242 'required': ['Entity',
9243 'AddCharmWithAuthorization',
9244 'resources'],
9245 'type': 'object'},
9246 'AddPendingResourcesResult': {'additionalProperties': False,
9247 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
9248 'pending-ids': {'items': {'type': 'string'},
9249 'type': 'array'}},
9250 'required': ['ErrorResult',
9251 'pending-ids'],
9252 'type': 'object'},
9253 'CharmResource': {'additionalProperties': False,
9254 'properties': {'description': {'type': 'string'},
9255 'fingerprint': {'items': {'type': 'integer'},
9256 'type': 'array'},
9257 'name': {'type': 'string'},
9258 'origin': {'type': 'string'},
9259 'path': {'type': 'string'},
9260 'revision': {'type': 'integer'},
9261 'size': {'type': 'integer'},
9262 'type': {'type': 'string'}},
9263 'required': ['name',
9264 'type',
9265 'path',
9266 'origin',
9267 'revision',
9268 'fingerprint',
9269 'size'],
9270 'type': 'object'},
9271 'Entity': {'additionalProperties': False,
9272 'properties': {'tag': {'type': 'string'}},
9273 'required': ['tag'],
9274 'type': 'object'},
9275 'Error': {'additionalProperties': False,
9276 'properties': {'code': {'type': 'string'},
9277 'info': {'$ref': '#/definitions/ErrorInfo'},
9278 'message': {'type': 'string'}},
9279 'required': ['message', 'code'],
9280 'type': 'object'},
9281 'ErrorInfo': {'additionalProperties': False,
9282 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9283 'macaroon-path': {'type': 'string'}},
9284 'type': 'object'},
9285 'ErrorResult': {'additionalProperties': False,
9286 'properties': {'error': {'$ref': '#/definitions/Error'}},
9287 'type': 'object'},
9288 'ListResourcesArgs': {'additionalProperties': False,
9289 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9290 'type': 'array'}},
9291 'required': ['entities'],
9292 'type': 'object'},
9293 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9294 'Resource': {'additionalProperties': False,
9295 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'},
9296 'application': {'type': 'string'},
9297 'id': {'type': 'string'},
9298 'pending-id': {'type': 'string'},
9299 'timestamp': {'format': 'date-time',
9300 'type': 'string'},
9301 'username': {'type': 'string'}},
9302 'required': ['CharmResource',
9303 'id',
9304 'pending-id',
9305 'application',
9306 'username',
9307 'timestamp'],
9308 'type': 'object'},
9309 'ResourcesResult': {'additionalProperties': False,
9310 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
9311 'charm-store-resources': {'items': {'$ref': '#/definitions/CharmResource'},
9312 'type': 'array'},
9313 'resources': {'items': {'$ref': '#/definitions/Resource'},
9314 'type': 'array'},
9315 'unit-resources': {'items': {'$ref': '#/definitions/UnitResources'},
9316 'type': 'array'}},
9317 'required': ['ErrorResult',
9318 'resources',
9319 'charm-store-resources',
9320 'unit-resources'],
9321 'type': 'object'},
9322 'ResourcesResults': {'additionalProperties': False,
9323 'properties': {'results': {'items': {'$ref': '#/definitions/ResourcesResult'},
9324 'type': 'array'}},
9325 'required': ['results'],
9326 'type': 'object'},
9327 'UnitResources': {'additionalProperties': False,
9328 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
9329 'download-progress': {'patternProperties': {'.*': {'type': 'integer'}},
9330 'type': 'object'},
9331 'resources': {'items': {'$ref': '#/definitions/Resource'},
9332 'type': 'array'}},
9333 'required': ['Entity',
9334 'resources',
9335 'download-progress'],
9336 'type': 'object'}},
9337 'properties': {'AddPendingResources': {'properties': {'Params': {'$ref': '#/definitions/AddPendingResourcesArgs'},
9338 'Result': {'$ref': '#/definitions/AddPendingResourcesResult'}},
9339 'type': 'object'},
9340 'ListResources': {'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'},
9341 'Result': {'$ref': '#/definitions/ResourcesResults'}},
9342 'type': 'object'}},
9343 'type': 'object'}
9344
9345
9346 @ReturnMapping(AddPendingResourcesResult)
9347 async def AddPendingResources(self, addcharmwithauthorization, entity, resources):
9348 '''
9349 addcharmwithauthorization : AddCharmWithAuthorization
9350 entity : Entity
9351 resources : typing.Sequence[~CharmResource]
9352 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence[str]]
9353 '''
9354 # map input types to rpc msg
9355 _params = dict()
9356 msg = dict(type='Resources',
9357 request='AddPendingResources',
9358 version=1,
9359 params=_params)
9360 _params['AddCharmWithAuthorization'] = addcharmwithauthorization
9361 _params['Entity'] = entity
9362 _params['Resources'] = resources
9363 reply = await self.rpc(msg)
9364 return reply
9365
9366
9367
9368 @ReturnMapping(ResourcesResults)
9369 async def ListResources(self, entities):
9370 '''
9371 entities : typing.Sequence[~Entity]
9372 Returns -> typing.Sequence[~ResourcesResult]
9373 '''
9374 # map input types to rpc msg
9375 _params = dict()
9376 msg = dict(type='Resources',
9377 request='ListResources',
9378 version=1,
9379 params=_params)
9380 _params['entities'] = entities
9381 reply = await self.rpc(msg)
9382 return reply
9383
9384
9385
9386 class ResourcesHookContextFacade(Type):
9387 name = 'ResourcesHookContext'
9388 version = 1
9389 schema = {'definitions': {'CharmResource': {'additionalProperties': False,
9390 'properties': {'description': {'type': 'string'},
9391 'fingerprint': {'items': {'type': 'integer'},
9392 'type': 'array'},
9393 'name': {'type': 'string'},
9394 'origin': {'type': 'string'},
9395 'path': {'type': 'string'},
9396 'revision': {'type': 'integer'},
9397 'size': {'type': 'integer'},
9398 'type': {'type': 'string'}},
9399 'required': ['name',
9400 'type',
9401 'path',
9402 'origin',
9403 'revision',
9404 'fingerprint',
9405 'size'],
9406 'type': 'object'},
9407 'Error': {'additionalProperties': False,
9408 'properties': {'code': {'type': 'string'},
9409 'info': {'$ref': '#/definitions/ErrorInfo'},
9410 'message': {'type': 'string'}},
9411 'required': ['message', 'code'],
9412 'type': 'object'},
9413 'ErrorInfo': {'additionalProperties': False,
9414 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9415 'macaroon-path': {'type': 'string'}},
9416 'type': 'object'},
9417 'ErrorResult': {'additionalProperties': False,
9418 'properties': {'error': {'$ref': '#/definitions/Error'}},
9419 'type': 'object'},
9420 'ListUnitResourcesArgs': {'additionalProperties': False,
9421 'properties': {'resource-names': {'items': {'type': 'string'},
9422 'type': 'array'}},
9423 'required': ['resource-names'],
9424 'type': 'object'},
9425 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9426 'Resource': {'additionalProperties': False,
9427 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'},
9428 'application': {'type': 'string'},
9429 'id': {'type': 'string'},
9430 'pending-id': {'type': 'string'},
9431 'timestamp': {'format': 'date-time',
9432 'type': 'string'},
9433 'username': {'type': 'string'}},
9434 'required': ['CharmResource',
9435 'id',
9436 'pending-id',
9437 'application',
9438 'username',
9439 'timestamp'],
9440 'type': 'object'},
9441 'UnitResourceResult': {'additionalProperties': False,
9442 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
9443 'resource': {'$ref': '#/definitions/Resource'}},
9444 'required': ['ErrorResult', 'resource'],
9445 'type': 'object'},
9446 'UnitResourcesResult': {'additionalProperties': False,
9447 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
9448 'resources': {'items': {'$ref': '#/definitions/UnitResourceResult'},
9449 'type': 'array'}},
9450 'required': ['ErrorResult',
9451 'resources'],
9452 'type': 'object'}},
9453 'properties': {'GetResourceInfo': {'properties': {'Params': {'$ref': '#/definitions/ListUnitResourcesArgs'},
9454 'Result': {'$ref': '#/definitions/UnitResourcesResult'}},
9455 'type': 'object'}},
9456 'type': 'object'}
9457
9458
9459 @ReturnMapping(UnitResourcesResult)
9460 async def GetResourceInfo(self, resource_names):
9461 '''
9462 resource_names : typing.Sequence[str]
9463 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence[~UnitResourceResult]]
9464 '''
9465 # map input types to rpc msg
9466 _params = dict()
9467 msg = dict(type='ResourcesHookContext',
9468 request='GetResourceInfo',
9469 version=1,
9470 params=_params)
9471 _params['resource-names'] = resource_names
9472 reply = await self.rpc(msg)
9473 return reply
9474
9475
9476
9477 class RetryStrategyFacade(Type):
9478 name = 'RetryStrategy'
9479 version = 1
9480 schema = {'definitions': {'Entities': {'additionalProperties': False,
9481 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9482 'type': 'array'}},
9483 'required': ['entities'],
9484 'type': 'object'},
9485 'Entity': {'additionalProperties': False,
9486 'properties': {'tag': {'type': 'string'}},
9487 'required': ['tag'],
9488 'type': 'object'},
9489 'Error': {'additionalProperties': False,
9490 'properties': {'code': {'type': 'string'},
9491 'info': {'$ref': '#/definitions/ErrorInfo'},
9492 'message': {'type': 'string'}},
9493 'required': ['message', 'code'],
9494 'type': 'object'},
9495 'ErrorInfo': {'additionalProperties': False,
9496 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9497 'macaroon-path': {'type': 'string'}},
9498 'type': 'object'},
9499 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9500 'NotifyWatchResult': {'additionalProperties': False,
9501 'properties': {'NotifyWatcherId': {'type': 'string'},
9502 'error': {'$ref': '#/definitions/Error'}},
9503 'required': ['NotifyWatcherId'],
9504 'type': 'object'},
9505 'NotifyWatchResults': {'additionalProperties': False,
9506 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9507 'type': 'array'}},
9508 'required': ['results'],
9509 'type': 'object'},
9510 'RetryStrategy': {'additionalProperties': False,
9511 'properties': {'jitter-retry-time': {'type': 'boolean'},
9512 'max-retry-time': {'type': 'integer'},
9513 'min-retry-time': {'type': 'integer'},
9514 'retry-time-factor': {'type': 'integer'},
9515 'should-retry': {'type': 'boolean'}},
9516 'required': ['should-retry',
9517 'min-retry-time',
9518 'max-retry-time',
9519 'jitter-retry-time',
9520 'retry-time-factor'],
9521 'type': 'object'},
9522 'RetryStrategyResult': {'additionalProperties': False,
9523 'properties': {'error': {'$ref': '#/definitions/Error'},
9524 'result': {'$ref': '#/definitions/RetryStrategy'}},
9525 'type': 'object'},
9526 'RetryStrategyResults': {'additionalProperties': False,
9527 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
9528 'type': 'array'}},
9529 'required': ['results'],
9530 'type': 'object'}},
9531 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9532 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
9533 'type': 'object'},
9534 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9535 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
9536 'type': 'object'}},
9537 'type': 'object'}
9538
9539
9540 @ReturnMapping(RetryStrategyResults)
9541 async def RetryStrategy(self, entities):
9542 '''
9543 entities : typing.Sequence[~Entity]
9544 Returns -> typing.Sequence[~RetryStrategyResult]
9545 '''
9546 # map input types to rpc msg
9547 _params = dict()
9548 msg = dict(type='RetryStrategy',
9549 request='RetryStrategy',
9550 version=1,
9551 params=_params)
9552 _params['entities'] = entities
9553 reply = await self.rpc(msg)
9554 return reply
9555
9556
9557
9558 @ReturnMapping(NotifyWatchResults)
9559 async def WatchRetryStrategy(self, entities):
9560 '''
9561 entities : typing.Sequence[~Entity]
9562 Returns -> typing.Sequence[~NotifyWatchResult]
9563 '''
9564 # map input types to rpc msg
9565 _params = dict()
9566 msg = dict(type='RetryStrategy',
9567 request='WatchRetryStrategy',
9568 version=1,
9569 params=_params)
9570 _params['entities'] = entities
9571 reply = await self.rpc(msg)
9572 return reply
9573
9574
9575
9576 class SSHClientFacade(Type):
9577 name = 'SSHClient'
9578 version = 1
9579 schema = {'definitions': {'Entities': {'additionalProperties': False,
9580 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9581 'type': 'array'}},
9582 'required': ['entities'],
9583 'type': 'object'},
9584 'Entity': {'additionalProperties': False,
9585 'properties': {'tag': {'type': 'string'}},
9586 'required': ['tag'],
9587 'type': 'object'},
9588 'Error': {'additionalProperties': False,
9589 'properties': {'code': {'type': 'string'},
9590 'info': {'$ref': '#/definitions/ErrorInfo'},
9591 'message': {'type': 'string'}},
9592 'required': ['message', 'code'],
9593 'type': 'object'},
9594 'ErrorInfo': {'additionalProperties': False,
9595 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9596 'macaroon-path': {'type': 'string'}},
9597 'type': 'object'},
9598 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9599 'SSHAddressResult': {'additionalProperties': False,
9600 'properties': {'address': {'type': 'string'},
9601 'error': {'$ref': '#/definitions/Error'}},
9602 'type': 'object'},
9603 'SSHAddressResults': {'additionalProperties': False,
9604 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
9605 'type': 'array'}},
9606 'required': ['results'],
9607 'type': 'object'},
9608 'SSHProxyResult': {'additionalProperties': False,
9609 'properties': {'use-proxy': {'type': 'boolean'}},
9610 'required': ['use-proxy'],
9611 'type': 'object'},
9612 'SSHPublicKeysResult': {'additionalProperties': False,
9613 'properties': {'error': {'$ref': '#/definitions/Error'},
9614 'public-keys': {'items': {'type': 'string'},
9615 'type': 'array'}},
9616 'type': 'object'},
9617 'SSHPublicKeysResults': {'additionalProperties': False,
9618 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
9619 'type': 'array'}},
9620 'required': ['results'],
9621 'type': 'object'}},
9622 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9623 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
9624 'type': 'object'},
9625 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
9626 'type': 'object'},
9627 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9628 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
9629 'type': 'object'},
9630 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9631 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
9632 'type': 'object'}},
9633 'type': 'object'}
9634
9635
9636 @ReturnMapping(SSHAddressResults)
9637 async def PrivateAddress(self, entities):
9638 '''
9639 entities : typing.Sequence[~Entity]
9640 Returns -> typing.Sequence[~SSHAddressResult]
9641 '''
9642 # map input types to rpc msg
9643 _params = dict()
9644 msg = dict(type='SSHClient',
9645 request='PrivateAddress',
9646 version=1,
9647 params=_params)
9648 _params['entities'] = entities
9649 reply = await self.rpc(msg)
9650 return reply
9651
9652
9653
9654 @ReturnMapping(SSHProxyResult)
9655 async def Proxy(self):
9656 '''
9657
9658 Returns -> bool
9659 '''
9660 # map input types to rpc msg
9661 _params = dict()
9662 msg = dict(type='SSHClient',
9663 request='Proxy',
9664 version=1,
9665 params=_params)
9666
9667 reply = await self.rpc(msg)
9668 return reply
9669
9670
9671
9672 @ReturnMapping(SSHAddressResults)
9673 async def PublicAddress(self, entities):
9674 '''
9675 entities : typing.Sequence[~Entity]
9676 Returns -> typing.Sequence[~SSHAddressResult]
9677 '''
9678 # map input types to rpc msg
9679 _params = dict()
9680 msg = dict(type='SSHClient',
9681 request='PublicAddress',
9682 version=1,
9683 params=_params)
9684 _params['entities'] = entities
9685 reply = await self.rpc(msg)
9686 return reply
9687
9688
9689
9690 @ReturnMapping(SSHPublicKeysResults)
9691 async def PublicKeys(self, entities):
9692 '''
9693 entities : typing.Sequence[~Entity]
9694 Returns -> typing.Sequence[~SSHPublicKeysResult]
9695 '''
9696 # map input types to rpc msg
9697 _params = dict()
9698 msg = dict(type='SSHClient',
9699 request='PublicKeys',
9700 version=1,
9701 params=_params)
9702 _params['entities'] = entities
9703 reply = await self.rpc(msg)
9704 return reply
9705
9706
9707
9708 class SingularFacade(Type):
9709 name = 'Singular'
9710 version = 1
9711 schema = {'definitions': {'Entities': {'additionalProperties': False,
9712 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9713 'type': 'array'}},
9714 'required': ['entities'],
9715 'type': 'object'},
9716 'Entity': {'additionalProperties': False,
9717 'properties': {'tag': {'type': 'string'}},
9718 'required': ['tag'],
9719 'type': 'object'},
9720 'Error': {'additionalProperties': False,
9721 'properties': {'code': {'type': 'string'},
9722 'info': {'$ref': '#/definitions/ErrorInfo'},
9723 'message': {'type': 'string'}},
9724 'required': ['message', 'code'],
9725 'type': 'object'},
9726 'ErrorInfo': {'additionalProperties': False,
9727 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9728 'macaroon-path': {'type': 'string'}},
9729 'type': 'object'},
9730 'ErrorResult': {'additionalProperties': False,
9731 'properties': {'error': {'$ref': '#/definitions/Error'}},
9732 'type': 'object'},
9733 'ErrorResults': {'additionalProperties': False,
9734 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9735 'type': 'array'}},
9736 'required': ['results'],
9737 'type': 'object'},
9738 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9739 'SingularClaim': {'additionalProperties': False,
9740 'properties': {'controller-tag': {'type': 'string'},
9741 'duration': {'type': 'integer'},
9742 'model-tag': {'type': 'string'}},
9743 'required': ['model-tag',
9744 'controller-tag',
9745 'duration'],
9746 'type': 'object'},
9747 'SingularClaims': {'additionalProperties': False,
9748 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
9749 'type': 'array'}},
9750 'required': ['claims'],
9751 'type': 'object'}},
9752 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
9753 'Result': {'$ref': '#/definitions/ErrorResults'}},
9754 'type': 'object'},
9755 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9756 'Result': {'$ref': '#/definitions/ErrorResults'}},
9757 'type': 'object'}},
9758 'type': 'object'}
9759
9760
9761 @ReturnMapping(ErrorResults)
9762 async def Claim(self, claims):
9763 '''
9764 claims : typing.Sequence[~SingularClaim]
9765 Returns -> typing.Sequence[~ErrorResult]
9766 '''
9767 # map input types to rpc msg
9768 _params = dict()
9769 msg = dict(type='Singular',
9770 request='Claim',
9771 version=1,
9772 params=_params)
9773 _params['claims'] = claims
9774 reply = await self.rpc(msg)
9775 return reply
9776
9777
9778
9779 @ReturnMapping(ErrorResults)
9780 async def Wait(self, entities):
9781 '''
9782 entities : typing.Sequence[~Entity]
9783 Returns -> typing.Sequence[~ErrorResult]
9784 '''
9785 # map input types to rpc msg
9786 _params = dict()
9787 msg = dict(type='Singular',
9788 request='Wait',
9789 version=1,
9790 params=_params)
9791 _params['entities'] = entities
9792 reply = await self.rpc(msg)
9793 return reply
9794
9795
9796
9797 class StringsWatcherFacade(Type):
9798 name = 'StringsWatcher'
9799 version = 1
9800 schema = {'definitions': {'Error': {'additionalProperties': False,
9801 'properties': {'code': {'type': 'string'},
9802 'info': {'$ref': '#/definitions/ErrorInfo'},
9803 'message': {'type': 'string'}},
9804 'required': ['message', 'code'],
9805 'type': 'object'},
9806 'ErrorInfo': {'additionalProperties': False,
9807 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9808 'macaroon-path': {'type': 'string'}},
9809 'type': 'object'},
9810 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9811 'StringsWatchResult': {'additionalProperties': False,
9812 'properties': {'changes': {'items': {'type': 'string'},
9813 'type': 'array'},
9814 'error': {'$ref': '#/definitions/Error'},
9815 'watcher-id': {'type': 'string'}},
9816 'required': ['watcher-id'],
9817 'type': 'object'}},
9818 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
9819 'type': 'object'},
9820 'Stop': {'type': 'object'}},
9821 'type': 'object'}
9822
9823
9824 @ReturnMapping(StringsWatchResult)
9825 async def Next(self):
9826 '''
9827
9828 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
9829 '''
9830 # map input types to rpc msg
9831 _params = dict()
9832 msg = dict(type='StringsWatcher',
9833 request='Next',
9834 version=1,
9835 params=_params)
9836
9837 reply = await self.rpc(msg)
9838 return reply
9839
9840
9841
9842 @ReturnMapping(None)
9843 async def Stop(self):
9844 '''
9845
9846 Returns -> None
9847 '''
9848 # map input types to rpc msg
9849 _params = dict()
9850 msg = dict(type='StringsWatcher',
9851 request='Stop',
9852 version=1,
9853 params=_params)
9854
9855 reply = await self.rpc(msg)
9856 return reply
9857
9858
9859
9860 class UndertakerFacade(Type):
9861 name = 'Undertaker'
9862 version = 1
9863 schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
9864 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
9865 'type': 'object'}},
9866 'type': 'object'},
9867 'info': {'type': 'string'},
9868 'status': {'type': 'string'},
9869 'tag': {'type': 'string'}},
9870 'required': ['tag',
9871 'status',
9872 'info',
9873 'data'],
9874 'type': 'object'},
9875 'Error': {'additionalProperties': False,
9876 'properties': {'code': {'type': 'string'},
9877 'info': {'$ref': '#/definitions/ErrorInfo'},
9878 'message': {'type': 'string'}},
9879 'required': ['message', 'code'],
9880 'type': 'object'},
9881 'ErrorInfo': {'additionalProperties': False,
9882 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9883 'macaroon-path': {'type': 'string'}},
9884 'type': 'object'},
9885 'ErrorResult': {'additionalProperties': False,
9886 'properties': {'error': {'$ref': '#/definitions/Error'}},
9887 'type': 'object'},
9888 'ErrorResults': {'additionalProperties': False,
9889 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9890 'type': 'array'}},
9891 'required': ['results'],
9892 'type': 'object'},
9893 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9894 'ModelConfigResult': {'additionalProperties': False,
9895 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
9896 'type': 'object'}},
9897 'type': 'object'}},
9898 'required': ['config'],
9899 'type': 'object'},
9900 'NotifyWatchResult': {'additionalProperties': False,
9901 'properties': {'NotifyWatcherId': {'type': 'string'},
9902 'error': {'$ref': '#/definitions/Error'}},
9903 'required': ['NotifyWatcherId'],
9904 'type': 'object'},
9905 'NotifyWatchResults': {'additionalProperties': False,
9906 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9907 'type': 'array'}},
9908 'required': ['results'],
9909 'type': 'object'},
9910 'SetStatus': {'additionalProperties': False,
9911 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
9912 'type': 'array'}},
9913 'required': ['entities'],
9914 'type': 'object'},
9915 'UndertakerModelInfo': {'additionalProperties': False,
9916 'properties': {'global-name': {'type': 'string'},
9917 'is-system': {'type': 'boolean'},
9918 'life': {'type': 'string'},
9919 'name': {'type': 'string'},
9920 'uuid': {'type': 'string'}},
9921 'required': ['uuid',
9922 'name',
9923 'global-name',
9924 'is-system',
9925 'life'],
9926 'type': 'object'},
9927 'UndertakerModelInfoResult': {'additionalProperties': False,
9928 'properties': {'error': {'$ref': '#/definitions/Error'},
9929 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
9930 'required': ['result'],
9931 'type': 'object'}},
9932 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
9933 'type': 'object'},
9934 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
9935 'type': 'object'},
9936 'ProcessDyingModel': {'type': 'object'},
9937 'RemoveModel': {'type': 'object'},
9938 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
9939 'Result': {'$ref': '#/definitions/ErrorResults'}},
9940 'type': 'object'},
9941 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
9942 'Result': {'$ref': '#/definitions/ErrorResults'}},
9943 'type': 'object'},
9944 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
9945 'type': 'object'}},
9946 'type': 'object'}
9947
9948
9949 @ReturnMapping(ModelConfigResult)
9950 async def ModelConfig(self):
9951 '''
9952
9953 Returns -> typing.Mapping[str, typing.Any]
9954 '''
9955 # map input types to rpc msg
9956 _params = dict()
9957 msg = dict(type='Undertaker',
9958 request='ModelConfig',
9959 version=1,
9960 params=_params)
9961
9962 reply = await self.rpc(msg)
9963 return reply
9964
9965
9966
9967 @ReturnMapping(UndertakerModelInfoResult)
9968 async def ModelInfo(self):
9969 '''
9970
9971 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
9972 '''
9973 # map input types to rpc msg
9974 _params = dict()
9975 msg = dict(type='Undertaker',
9976 request='ModelInfo',
9977 version=1,
9978 params=_params)
9979
9980 reply = await self.rpc(msg)
9981 return reply
9982
9983
9984
9985 @ReturnMapping(None)
9986 async def ProcessDyingModel(self):
9987 '''
9988
9989 Returns -> None
9990 '''
9991 # map input types to rpc msg
9992 _params = dict()
9993 msg = dict(type='Undertaker',
9994 request='ProcessDyingModel',
9995 version=1,
9996 params=_params)
9997
9998 reply = await self.rpc(msg)
9999 return reply
10000
10001
10002
10003 @ReturnMapping(None)
10004 async def RemoveModel(self):
10005 '''
10006
10007 Returns -> None
10008 '''
10009 # map input types to rpc msg
10010 _params = dict()
10011 msg = dict(type='Undertaker',
10012 request='RemoveModel',
10013 version=1,
10014 params=_params)
10015
10016 reply = await self.rpc(msg)
10017 return reply
10018
10019
10020
10021 @ReturnMapping(ErrorResults)
10022 async def SetStatus(self, entities):
10023 '''
10024 entities : typing.Sequence[~EntityStatusArgs]
10025 Returns -> typing.Sequence[~ErrorResult]
10026 '''
10027 # map input types to rpc msg
10028 _params = dict()
10029 msg = dict(type='Undertaker',
10030 request='SetStatus',
10031 version=1,
10032 params=_params)
10033 _params['entities'] = entities
10034 reply = await self.rpc(msg)
10035 return reply
10036
10037
10038
10039 @ReturnMapping(ErrorResults)
10040 async def UpdateStatus(self, entities):
10041 '''
10042 entities : typing.Sequence[~EntityStatusArgs]
10043 Returns -> typing.Sequence[~ErrorResult]
10044 '''
10045 # map input types to rpc msg
10046 _params = dict()
10047 msg = dict(type='Undertaker',
10048 request='UpdateStatus',
10049 version=1,
10050 params=_params)
10051 _params['entities'] = entities
10052 reply = await self.rpc(msg)
10053 return reply
10054
10055
10056
10057 @ReturnMapping(NotifyWatchResults)
10058 async def WatchModelResources(self):
10059 '''
10060
10061 Returns -> typing.Sequence[~NotifyWatchResult]
10062 '''
10063 # map input types to rpc msg
10064 _params = dict()
10065 msg = dict(type='Undertaker',
10066 request='WatchModelResources',
10067 version=1,
10068 params=_params)
10069
10070 reply = await self.rpc(msg)
10071 return reply
10072
10073
10074
10075 class UnitAssignerFacade(Type):
10076 name = 'UnitAssigner'
10077 version = 1
10078 schema = {'definitions': {'Entities': {'additionalProperties': False,
10079 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10080 'type': 'array'}},
10081 'required': ['entities'],
10082 'type': 'object'},
10083 'Entity': {'additionalProperties': False,
10084 'properties': {'tag': {'type': 'string'}},
10085 'required': ['tag'],
10086 'type': 'object'},
10087 'EntityStatusArgs': {'additionalProperties': False,
10088 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
10089 'type': 'object'}},
10090 'type': 'object'},
10091 'info': {'type': 'string'},
10092 'status': {'type': 'string'},
10093 'tag': {'type': 'string'}},
10094 'required': ['tag',
10095 'status',
10096 'info',
10097 'data'],
10098 'type': 'object'},
10099 'Error': {'additionalProperties': False,
10100 'properties': {'code': {'type': 'string'},
10101 'info': {'$ref': '#/definitions/ErrorInfo'},
10102 'message': {'type': 'string'}},
10103 'required': ['message', 'code'],
10104 'type': 'object'},
10105 'ErrorInfo': {'additionalProperties': False,
10106 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10107 'macaroon-path': {'type': 'string'}},
10108 'type': 'object'},
10109 'ErrorResult': {'additionalProperties': False,
10110 'properties': {'error': {'$ref': '#/definitions/Error'}},
10111 'type': 'object'},
10112 'ErrorResults': {'additionalProperties': False,
10113 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10114 'type': 'array'}},
10115 'required': ['results'],
10116 'type': 'object'},
10117 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10118 'SetStatus': {'additionalProperties': False,
10119 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
10120 'type': 'array'}},
10121 'required': ['entities'],
10122 'type': 'object'},
10123 'StringsWatchResult': {'additionalProperties': False,
10124 'properties': {'changes': {'items': {'type': 'string'},
10125 'type': 'array'},
10126 'error': {'$ref': '#/definitions/Error'},
10127 'watcher-id': {'type': 'string'}},
10128 'required': ['watcher-id'],
10129 'type': 'object'}},
10130 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10131 'Result': {'$ref': '#/definitions/ErrorResults'}},
10132 'type': 'object'},
10133 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
10134 'Result': {'$ref': '#/definitions/ErrorResults'}},
10135 'type': 'object'},
10136 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
10137 'type': 'object'}},
10138 'type': 'object'}
10139
10140
10141 @ReturnMapping(ErrorResults)
10142 async def AssignUnits(self, entities):
10143 '''
10144 entities : typing.Sequence[~Entity]
10145 Returns -> typing.Sequence[~ErrorResult]
10146 '''
10147 # map input types to rpc msg
10148 _params = dict()
10149 msg = dict(type='UnitAssigner',
10150 request='AssignUnits',
10151 version=1,
10152 params=_params)
10153 _params['entities'] = entities
10154 reply = await self.rpc(msg)
10155 return reply
10156
10157
10158
10159 @ReturnMapping(ErrorResults)
10160 async def SetAgentStatus(self, entities):
10161 '''
10162 entities : typing.Sequence[~EntityStatusArgs]
10163 Returns -> typing.Sequence[~ErrorResult]
10164 '''
10165 # map input types to rpc msg
10166 _params = dict()
10167 msg = dict(type='UnitAssigner',
10168 request='SetAgentStatus',
10169 version=1,
10170 params=_params)
10171 _params['entities'] = entities
10172 reply = await self.rpc(msg)
10173 return reply
10174
10175
10176
10177 @ReturnMapping(StringsWatchResult)
10178 async def WatchUnitAssignments(self):
10179 '''
10180
10181 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
10182 '''
10183 # map input types to rpc msg
10184 _params = dict()
10185 msg = dict(type='UnitAssigner',
10186 request='WatchUnitAssignments',
10187 version=1,
10188 params=_params)
10189
10190 reply = await self.rpc(msg)
10191 return reply
10192
10193
10194
10195 class UpgradeSeriesFacade(Type):
10196 name = 'UpgradeSeries'
10197 version = 1
10198 schema = {'definitions': {'Entities': {'additionalProperties': False,
10199 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10200 'type': 'array'}},
10201 'required': ['entities'],
10202 'type': 'object'},
10203 'EntitiesResult': {'additionalProperties': False,
10204 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10205 'type': 'array'},
10206 'error': {'$ref': '#/definitions/Error'}},
10207 'required': ['entities'],
10208 'type': 'object'},
10209 'EntitiesResults': {'additionalProperties': False,
10210 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
10211 'type': 'array'}},
10212 'required': ['results'],
10213 'type': 'object'},
10214 'Entity': {'additionalProperties': False,
10215 'properties': {'tag': {'type': 'string'}},
10216 'required': ['tag'],
10217 'type': 'object'},
10218 'Error': {'additionalProperties': False,
10219 'properties': {'code': {'type': 'string'},
10220 'info': {'$ref': '#/definitions/ErrorInfo'},
10221 'message': {'type': 'string'}},
10222 'required': ['message', 'code'],
10223 'type': 'object'},
10224 'ErrorInfo': {'additionalProperties': False,
10225 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10226 'macaroon-path': {'type': 'string'}},
10227 'type': 'object'},
10228 'ErrorResult': {'additionalProperties': False,
10229 'properties': {'error': {'$ref': '#/definitions/Error'}},
10230 'type': 'object'},
10231 'ErrorResults': {'additionalProperties': False,
10232 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10233 'type': 'array'}},
10234 'required': ['results'],
10235 'type': 'object'},
10236 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10237 'NotifyWatchResult': {'additionalProperties': False,
10238 'properties': {'NotifyWatcherId': {'type': 'string'},
10239 'error': {'$ref': '#/definitions/Error'}},
10240 'required': ['NotifyWatcherId'],
10241 'type': 'object'},
10242 'NotifyWatchResults': {'additionalProperties': False,
10243 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10244 'type': 'array'}},
10245 'required': ['results'],
10246 'type': 'object'},
10247 'PinApplicationResult': {'additionalProperties': False,
10248 'properties': {'application-name': {'type': 'string'},
10249 'error': {'$ref': '#/definitions/Error'}},
10250 'required': ['application-name'],
10251 'type': 'object'},
10252 'PinApplicationsResults': {'additionalProperties': False,
10253 'properties': {'results': {'items': {'$ref': '#/definitions/PinApplicationResult'},
10254 'type': 'array'}},
10255 'required': ['results'],
10256 'type': 'object'},
10257 'PinnedLeadershipResult': {'additionalProperties': False,
10258 'properties': {'result': {'patternProperties': {'.*': {'items': {'type': 'string'},
10259 'type': 'array'}},
10260 'type': 'object'}},
10261 'type': 'object'},
10262 'StringResult': {'additionalProperties': False,
10263 'properties': {'error': {'$ref': '#/definitions/Error'},
10264 'result': {'type': 'string'}},
10265 'required': ['result'],
10266 'type': 'object'},
10267 'StringResults': {'additionalProperties': False,
10268 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
10269 'type': 'array'}},
10270 'required': ['results'],
10271 'type': 'object'},
10272 'UpdateSeriesArg': {'additionalProperties': False,
10273 'properties': {'force': {'type': 'boolean'},
10274 'series': {'type': 'string'},
10275 'tag': {'$ref': '#/definitions/Entity'}},
10276 'required': ['tag', 'force', 'series'],
10277 'type': 'object'},
10278 'UpdateSeriesArgs': {'additionalProperties': False,
10279 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSeriesArg'},
10280 'type': 'array'}},
10281 'required': ['args'],
10282 'type': 'object'},
10283 'UpgradeSeriesStartUnitCompletionParam': {'additionalProperties': False,
10284 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10285 'type': 'array'},
10286 'message': {'type': 'string'}},
10287 'required': ['entities',
10288 'message'],
10289 'type': 'object'},
10290 'UpgradeSeriesStatusParam': {'additionalProperties': False,
10291 'properties': {'entity': {'$ref': '#/definitions/Entity'},
10292 'message': {'type': 'string'},
10293 'status': {'type': 'string'}},
10294 'required': ['entity',
10295 'status',
10296 'message'],
10297 'type': 'object'},
10298 'UpgradeSeriesStatusParams': {'additionalProperties': False,
10299 'properties': {'params': {'items': {'$ref': '#/definitions/UpgradeSeriesStatusParam'},
10300 'type': 'array'}},
10301 'required': ['params'],
10302 'type': 'object'},
10303 'UpgradeSeriesStatusResult': {'additionalProperties': False,
10304 'properties': {'error': {'$ref': '#/definitions/Error'},
10305 'status': {'type': 'string'}},
10306 'type': 'object'},
10307 'UpgradeSeriesStatusResults': {'additionalProperties': False,
10308 'properties': {'results': {'items': {'$ref': '#/definitions/UpgradeSeriesStatusResult'},
10309 'type': 'array'}},
10310 'type': 'object'}},
10311 'properties': {'FinishUpgradeSeries': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArgs'},
10312 'Result': {'$ref': '#/definitions/ErrorResults'}},
10313 'type': 'object'},
10314 'MachineStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10315 'Result': {'$ref': '#/definitions/UpgradeSeriesStatusResults'}},
10316 'type': 'object'},
10317 'PinMachineApplications': {'properties': {'Result': {'$ref': '#/definitions/PinApplicationsResults'}},
10318 'type': 'object'},
10319 'PinnedLeadership': {'properties': {'Result': {'$ref': '#/definitions/PinnedLeadershipResult'}},
10320 'type': 'object'},
10321 'SetMachineStatus': {'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesStatusParams'},
10322 'Result': {'$ref': '#/definitions/ErrorResults'}},
10323 'type': 'object'},
10324 'SetUpgradeSeriesUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesStatusParams'},
10325 'Result': {'$ref': '#/definitions/ErrorResults'}},
10326 'type': 'object'},
10327 'StartUnitCompletion': {'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesStartUnitCompletionParam'},
10328 'Result': {'$ref': '#/definitions/ErrorResults'}},
10329 'type': 'object'},
10330 'TargetSeries': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10331 'Result': {'$ref': '#/definitions/StringResults'}},
10332 'type': 'object'},
10333 'UnitsCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10334 'Result': {'$ref': '#/definitions/EntitiesResults'}},
10335 'type': 'object'},
10336 'UnitsPrepared': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10337 'Result': {'$ref': '#/definitions/EntitiesResults'}},
10338 'type': 'object'},
10339 'UnpinMachineApplications': {'properties': {'Result': {'$ref': '#/definitions/PinApplicationsResults'}},
10340 'type': 'object'},
10341 'UpgradeSeriesUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10342 'Result': {'$ref': '#/definitions/UpgradeSeriesStatusResults'}},
10343 'type': 'object'},
10344 'WatchUpgradeSeriesNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10345 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10346 'type': 'object'}},
10347 'type': 'object'}
10348
10349
10350 @ReturnMapping(ErrorResults)
10351 async def FinishUpgradeSeries(self, args):
10352 '''
10353 args : typing.Sequence[~UpdateSeriesArg]
10354 Returns -> typing.Sequence[~ErrorResult]
10355 '''
10356 # map input types to rpc msg
10357 _params = dict()
10358 msg = dict(type='UpgradeSeries',
10359 request='FinishUpgradeSeries',
10360 version=1,
10361 params=_params)
10362 _params['args'] = args
10363 reply = await self.rpc(msg)
10364 return reply
10365
10366
10367
10368 @ReturnMapping(UpgradeSeriesStatusResults)
10369 async def MachineStatus(self, entities):
10370 '''
10371 entities : typing.Sequence[~Entity]
10372 Returns -> typing.Sequence[~UpgradeSeriesStatusResult]
10373 '''
10374 # map input types to rpc msg
10375 _params = dict()
10376 msg = dict(type='UpgradeSeries',
10377 request='MachineStatus',
10378 version=1,
10379 params=_params)
10380 _params['entities'] = entities
10381 reply = await self.rpc(msg)
10382 return reply
10383
10384
10385
10386 @ReturnMapping(PinApplicationsResults)
10387 async def PinMachineApplications(self):
10388 '''
10389
10390 Returns -> typing.Sequence[~PinApplicationResult]
10391 '''
10392 # map input types to rpc msg
10393 _params = dict()
10394 msg = dict(type='UpgradeSeries',
10395 request='PinMachineApplications',
10396 version=1,
10397 params=_params)
10398
10399 reply = await self.rpc(msg)
10400 return reply
10401
10402
10403
10404 @ReturnMapping(PinnedLeadershipResult)
10405 async def PinnedLeadership(self):
10406 '''
10407
10408 Returns -> typing.Sequence[str]
10409 '''
10410 # map input types to rpc msg
10411 _params = dict()
10412 msg = dict(type='UpgradeSeries',
10413 request='PinnedLeadership',
10414 version=1,
10415 params=_params)
10416
10417 reply = await self.rpc(msg)
10418 return reply
10419
10420
10421
10422 @ReturnMapping(ErrorResults)
10423 async def SetMachineStatus(self, params):
10424 '''
10425 params : typing.Sequence[~UpgradeSeriesStatusParam]
10426 Returns -> typing.Sequence[~ErrorResult]
10427 '''
10428 # map input types to rpc msg
10429 _params = dict()
10430 msg = dict(type='UpgradeSeries',
10431 request='SetMachineStatus',
10432 version=1,
10433 params=_params)
10434 _params['params'] = params
10435 reply = await self.rpc(msg)
10436 return reply
10437
10438
10439
10440 @ReturnMapping(ErrorResults)
10441 async def SetUpgradeSeriesUnitStatus(self, params):
10442 '''
10443 params : typing.Sequence[~UpgradeSeriesStatusParam]
10444 Returns -> typing.Sequence[~ErrorResult]
10445 '''
10446 # map input types to rpc msg
10447 _params = dict()
10448 msg = dict(type='UpgradeSeries',
10449 request='SetUpgradeSeriesUnitStatus',
10450 version=1,
10451 params=_params)
10452 _params['params'] = params
10453 reply = await self.rpc(msg)
10454 return reply
10455
10456
10457
10458 @ReturnMapping(ErrorResults)
10459 async def StartUnitCompletion(self, entities, message):
10460 '''
10461 entities : typing.Sequence[~Entity]
10462 message : str
10463 Returns -> typing.Sequence[~ErrorResult]
10464 '''
10465 # map input types to rpc msg
10466 _params = dict()
10467 msg = dict(type='UpgradeSeries',
10468 request='StartUnitCompletion',
10469 version=1,
10470 params=_params)
10471 _params['entities'] = entities
10472 _params['message'] = message
10473 reply = await self.rpc(msg)
10474 return reply
10475
10476
10477
10478 @ReturnMapping(StringResults)
10479 async def TargetSeries(self, entities):
10480 '''
10481 entities : typing.Sequence[~Entity]
10482 Returns -> typing.Sequence[~StringResult]
10483 '''
10484 # map input types to rpc msg
10485 _params = dict()
10486 msg = dict(type='UpgradeSeries',
10487 request='TargetSeries',
10488 version=1,
10489 params=_params)
10490 _params['entities'] = entities
10491 reply = await self.rpc(msg)
10492 return reply
10493
10494
10495
10496 @ReturnMapping(EntitiesResults)
10497 async def UnitsCompleted(self, entities):
10498 '''
10499 entities : typing.Sequence[~Entity]
10500 Returns -> typing.Sequence[~EntitiesResult]
10501 '''
10502 # map input types to rpc msg
10503 _params = dict()
10504 msg = dict(type='UpgradeSeries',
10505 request='UnitsCompleted',
10506 version=1,
10507 params=_params)
10508 _params['entities'] = entities
10509 reply = await self.rpc(msg)
10510 return reply
10511
10512
10513
10514 @ReturnMapping(EntitiesResults)
10515 async def UnitsPrepared(self, entities):
10516 '''
10517 entities : typing.Sequence[~Entity]
10518 Returns -> typing.Sequence[~EntitiesResult]
10519 '''
10520 # map input types to rpc msg
10521 _params = dict()
10522 msg = dict(type='UpgradeSeries',
10523 request='UnitsPrepared',
10524 version=1,
10525 params=_params)
10526 _params['entities'] = entities
10527 reply = await self.rpc(msg)
10528 return reply
10529
10530
10531
10532 @ReturnMapping(PinApplicationsResults)
10533 async def UnpinMachineApplications(self):
10534 '''
10535
10536 Returns -> typing.Sequence[~PinApplicationResult]
10537 '''
10538 # map input types to rpc msg
10539 _params = dict()
10540 msg = dict(type='UpgradeSeries',
10541 request='UnpinMachineApplications',
10542 version=1,
10543 params=_params)
10544
10545 reply = await self.rpc(msg)
10546 return reply
10547
10548
10549
10550 @ReturnMapping(UpgradeSeriesStatusResults)
10551 async def UpgradeSeriesUnitStatus(self, entities):
10552 '''
10553 entities : typing.Sequence[~Entity]
10554 Returns -> typing.Sequence[~UpgradeSeriesStatusResult]
10555 '''
10556 # map input types to rpc msg
10557 _params = dict()
10558 msg = dict(type='UpgradeSeries',
10559 request='UpgradeSeriesUnitStatus',
10560 version=1,
10561 params=_params)
10562 _params['entities'] = entities
10563 reply = await self.rpc(msg)
10564 return reply
10565
10566
10567
10568 @ReturnMapping(NotifyWatchResults)
10569 async def WatchUpgradeSeriesNotifications(self, entities):
10570 '''
10571 entities : typing.Sequence[~Entity]
10572 Returns -> typing.Sequence[~NotifyWatchResult]
10573 '''
10574 # map input types to rpc msg
10575 _params = dict()
10576 msg = dict(type='UpgradeSeries',
10577 request='WatchUpgradeSeriesNotifications',
10578 version=1,
10579 params=_params)
10580 _params['entities'] = entities
10581 reply = await self.rpc(msg)
10582 return reply
10583
10584
10585
10586 class UpgraderFacade(Type):
10587 name = 'Upgrader'
10588 version = 1
10589 schema = {'definitions': {'Binary': {'additionalProperties': False,
10590 'properties': {'Arch': {'type': 'string'},
10591 'Number': {'$ref': '#/definitions/Number'},
10592 'Series': {'type': 'string'}},
10593 'required': ['Number', 'Series', 'Arch'],
10594 'type': 'object'},
10595 'Entities': {'additionalProperties': False,
10596 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10597 'type': 'array'}},
10598 'required': ['entities'],
10599 'type': 'object'},
10600 'EntitiesVersion': {'additionalProperties': False,
10601 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
10602 'type': 'array'}},
10603 'required': ['agent-tools'],
10604 'type': 'object'},
10605 'Entity': {'additionalProperties': False,
10606 'properties': {'tag': {'type': 'string'}},
10607 'required': ['tag'],
10608 'type': 'object'},
10609 'EntityVersion': {'additionalProperties': False,
10610 'properties': {'tag': {'type': 'string'},
10611 'tools': {'$ref': '#/definitions/Version'}},
10612 'required': ['tag', 'tools'],
10613 'type': 'object'},
10614 'Error': {'additionalProperties': False,
10615 'properties': {'code': {'type': 'string'},
10616 'info': {'$ref': '#/definitions/ErrorInfo'},
10617 'message': {'type': 'string'}},
10618 'required': ['message', 'code'],
10619 'type': 'object'},
10620 'ErrorInfo': {'additionalProperties': False,
10621 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10622 'macaroon-path': {'type': 'string'}},
10623 'type': 'object'},
10624 'ErrorResult': {'additionalProperties': False,
10625 'properties': {'error': {'$ref': '#/definitions/Error'}},
10626 'type': 'object'},
10627 'ErrorResults': {'additionalProperties': False,
10628 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10629 'type': 'array'}},
10630 'required': ['results'],
10631 'type': 'object'},
10632 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10633 'NotifyWatchResult': {'additionalProperties': False,
10634 'properties': {'NotifyWatcherId': {'type': 'string'},
10635 'error': {'$ref': '#/definitions/Error'}},
10636 'required': ['NotifyWatcherId'],
10637 'type': 'object'},
10638 'NotifyWatchResults': {'additionalProperties': False,
10639 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10640 'type': 'array'}},
10641 'required': ['results'],
10642 'type': 'object'},
10643 'Number': {'additionalProperties': False,
10644 'properties': {'Build': {'type': 'integer'},
10645 'Major': {'type': 'integer'},
10646 'Minor': {'type': 'integer'},
10647 'Patch': {'type': 'integer'},
10648 'Tag': {'type': 'string'}},
10649 'required': ['Major',
10650 'Minor',
10651 'Tag',
10652 'Patch',
10653 'Build'],
10654 'type': 'object'},
10655 'Tools': {'additionalProperties': False,
10656 'properties': {'sha256': {'type': 'string'},
10657 'size': {'type': 'integer'},
10658 'url': {'type': 'string'},
10659 'version': {'$ref': '#/definitions/Binary'}},
10660 'required': ['version', 'url', 'size'],
10661 'type': 'object'},
10662 'ToolsResult': {'additionalProperties': False,
10663 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
10664 'error': {'$ref': '#/definitions/Error'},
10665 'tools': {'items': {'$ref': '#/definitions/Tools'},
10666 'type': 'array'}},
10667 'required': ['tools',
10668 'disable-ssl-hostname-verification'],
10669 'type': 'object'},
10670 'ToolsResults': {'additionalProperties': False,
10671 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
10672 'type': 'array'}},
10673 'required': ['results'],
10674 'type': 'object'},
10675 'Version': {'additionalProperties': False,
10676 'properties': {'version': {'$ref': '#/definitions/Binary'}},
10677 'required': ['version'],
10678 'type': 'object'},
10679 'VersionResult': {'additionalProperties': False,
10680 'properties': {'error': {'$ref': '#/definitions/Error'},
10681 'version': {'$ref': '#/definitions/Number'}},
10682 'type': 'object'},
10683 'VersionResults': {'additionalProperties': False,
10684 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
10685 'type': 'array'}},
10686 'required': ['results'],
10687 'type': 'object'}},
10688 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10689 'Result': {'$ref': '#/definitions/VersionResults'}},
10690 'type': 'object'},
10691 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
10692 'Result': {'$ref': '#/definitions/ErrorResults'}},
10693 'type': 'object'},
10694 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10695 'Result': {'$ref': '#/definitions/ToolsResults'}},
10696 'type': 'object'},
10697 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10698 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10699 'type': 'object'}},
10700 'type': 'object'}
10701
10702
10703 @ReturnMapping(VersionResults)
10704 async def DesiredVersion(self, entities):
10705 '''
10706 entities : typing.Sequence[~Entity]
10707 Returns -> typing.Sequence[~VersionResult]
10708 '''
10709 # map input types to rpc msg
10710 _params = dict()
10711 msg = dict(type='Upgrader',
10712 request='DesiredVersion',
10713 version=1,
10714 params=_params)
10715 _params['entities'] = entities
10716 reply = await self.rpc(msg)
10717 return reply
10718
10719
10720
10721 @ReturnMapping(ErrorResults)
10722 async def SetTools(self, agent_tools):
10723 '''
10724 agent_tools : typing.Sequence[~EntityVersion]
10725 Returns -> typing.Sequence[~ErrorResult]
10726 '''
10727 # map input types to rpc msg
10728 _params = dict()
10729 msg = dict(type='Upgrader',
10730 request='SetTools',
10731 version=1,
10732 params=_params)
10733 _params['agent-tools'] = agent_tools
10734 reply = await self.rpc(msg)
10735 return reply
10736
10737
10738
10739 @ReturnMapping(ToolsResults)
10740 async def Tools(self, entities):
10741 '''
10742 entities : typing.Sequence[~Entity]
10743 Returns -> typing.Sequence[~ToolsResult]
10744 '''
10745 # map input types to rpc msg
10746 _params = dict()
10747 msg = dict(type='Upgrader',
10748 request='Tools',
10749 version=1,
10750 params=_params)
10751 _params['entities'] = entities
10752 reply = await self.rpc(msg)
10753 return reply
10754
10755
10756
10757 @ReturnMapping(NotifyWatchResults)
10758 async def WatchAPIVersion(self, entities):
10759 '''
10760 entities : typing.Sequence[~Entity]
10761 Returns -> typing.Sequence[~NotifyWatchResult]
10762 '''
10763 # map input types to rpc msg
10764 _params = dict()
10765 msg = dict(type='Upgrader',
10766 request='WatchAPIVersion',
10767 version=1,
10768 params=_params)
10769 _params['entities'] = entities
10770 reply = await self.rpc(msg)
10771 return reply
10772
10773
10774
10775 class UserManagerFacade(Type):
10776 name = 'UserManager'
10777 version = 1
10778 schema = {'definitions': {'AddUser': {'additionalProperties': False,
10779 'properties': {'display-name': {'type': 'string'},
10780 'password': {'type': 'string'},
10781 'username': {'type': 'string'}},
10782 'required': ['username', 'display-name'],
10783 'type': 'object'},
10784 'AddUserResult': {'additionalProperties': False,
10785 'properties': {'error': {'$ref': '#/definitions/Error'},
10786 'secret-key': {'items': {'type': 'integer'},
10787 'type': 'array'},
10788 'tag': {'type': 'string'}},
10789 'type': 'object'},
10790 'AddUserResults': {'additionalProperties': False,
10791 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
10792 'type': 'array'}},
10793 'required': ['results'],
10794 'type': 'object'},
10795 'AddUsers': {'additionalProperties': False,
10796 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
10797 'type': 'array'}},
10798 'required': ['users'],
10799 'type': 'object'},
10800 'Entities': {'additionalProperties': False,
10801 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10802 'type': 'array'}},
10803 'required': ['entities'],
10804 'type': 'object'},
10805 'Entity': {'additionalProperties': False,
10806 'properties': {'tag': {'type': 'string'}},
10807 'required': ['tag'],
10808 'type': 'object'},
10809 'EntityPassword': {'additionalProperties': False,
10810 'properties': {'password': {'type': 'string'},
10811 'tag': {'type': 'string'}},
10812 'required': ['tag', 'password'],
10813 'type': 'object'},
10814 'EntityPasswords': {'additionalProperties': False,
10815 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
10816 'type': 'array'}},
10817 'required': ['changes'],
10818 'type': 'object'},
10819 'Error': {'additionalProperties': False,
10820 'properties': {'code': {'type': 'string'},
10821 'info': {'$ref': '#/definitions/ErrorInfo'},
10822 'message': {'type': 'string'}},
10823 'required': ['message', 'code'],
10824 'type': 'object'},
10825 'ErrorInfo': {'additionalProperties': False,
10826 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10827 'macaroon-path': {'type': 'string'}},
10828 'type': 'object'},
10829 'ErrorResult': {'additionalProperties': False,
10830 'properties': {'error': {'$ref': '#/definitions/Error'}},
10831 'type': 'object'},
10832 'ErrorResults': {'additionalProperties': False,
10833 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10834 'type': 'array'}},
10835 'required': ['results'],
10836 'type': 'object'},
10837 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10838 'UserInfo': {'additionalProperties': False,
10839 'properties': {'access': {'type': 'string'},
10840 'created-by': {'type': 'string'},
10841 'date-created': {'format': 'date-time',
10842 'type': 'string'},
10843 'disabled': {'type': 'boolean'},
10844 'display-name': {'type': 'string'},
10845 'last-connection': {'format': 'date-time',
10846 'type': 'string'},
10847 'username': {'type': 'string'}},
10848 'required': ['username',
10849 'display-name',
10850 'access',
10851 'created-by',
10852 'date-created',
10853 'disabled'],
10854 'type': 'object'},
10855 'UserInfoRequest': {'additionalProperties': False,
10856 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10857 'type': 'array'},
10858 'include-disabled': {'type': 'boolean'}},
10859 'required': ['entities',
10860 'include-disabled'],
10861 'type': 'object'},
10862 'UserInfoResult': {'additionalProperties': False,
10863 'properties': {'error': {'$ref': '#/definitions/Error'},
10864 'result': {'$ref': '#/definitions/UserInfo'}},
10865 'type': 'object'},
10866 'UserInfoResults': {'additionalProperties': False,
10867 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
10868 'type': 'array'}},
10869 'required': ['results'],
10870 'type': 'object'}},
10871 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
10872 'Result': {'$ref': '#/definitions/AddUserResults'}},
10873 'type': 'object'},
10874 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10875 'Result': {'$ref': '#/definitions/ErrorResults'}},
10876 'type': 'object'},
10877 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10878 'Result': {'$ref': '#/definitions/ErrorResults'}},
10879 'type': 'object'},
10880 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10881 'Result': {'$ref': '#/definitions/ErrorResults'}},
10882 'type': 'object'},
10883 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
10884 'Result': {'$ref': '#/definitions/ErrorResults'}},
10885 'type': 'object'},
10886 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
10887 'Result': {'$ref': '#/definitions/UserInfoResults'}},
10888 'type': 'object'}},
10889 'type': 'object'}
10890
10891
10892 @ReturnMapping(AddUserResults)
10893 async def AddUser(self, users):
10894 '''
10895 users : typing.Sequence[~AddUser]
10896 Returns -> typing.Sequence[~AddUserResult]
10897 '''
10898 # map input types to rpc msg
10899 _params = dict()
10900 msg = dict(type='UserManager',
10901 request='AddUser',
10902 version=1,
10903 params=_params)
10904 _params['users'] = users
10905 reply = await self.rpc(msg)
10906 return reply
10907
10908
10909
10910 @ReturnMapping(ErrorResults)
10911 async def DisableUser(self, entities):
10912 '''
10913 entities : typing.Sequence[~Entity]
10914 Returns -> typing.Sequence[~ErrorResult]
10915 '''
10916 # map input types to rpc msg
10917 _params = dict()
10918 msg = dict(type='UserManager',
10919 request='DisableUser',
10920 version=1,
10921 params=_params)
10922 _params['entities'] = entities
10923 reply = await self.rpc(msg)
10924 return reply
10925
10926
10927
10928 @ReturnMapping(ErrorResults)
10929 async def EnableUser(self, entities):
10930 '''
10931 entities : typing.Sequence[~Entity]
10932 Returns -> typing.Sequence[~ErrorResult]
10933 '''
10934 # map input types to rpc msg
10935 _params = dict()
10936 msg = dict(type='UserManager',
10937 request='EnableUser',
10938 version=1,
10939 params=_params)
10940 _params['entities'] = entities
10941 reply = await self.rpc(msg)
10942 return reply
10943
10944
10945
10946 @ReturnMapping(ErrorResults)
10947 async def RemoveUser(self, entities):
10948 '''
10949 entities : typing.Sequence[~Entity]
10950 Returns -> typing.Sequence[~ErrorResult]
10951 '''
10952 # map input types to rpc msg
10953 _params = dict()
10954 msg = dict(type='UserManager',
10955 request='RemoveUser',
10956 version=1,
10957 params=_params)
10958 _params['entities'] = entities
10959 reply = await self.rpc(msg)
10960 return reply
10961
10962
10963
10964 @ReturnMapping(ErrorResults)
10965 async def SetPassword(self, changes):
10966 '''
10967 changes : typing.Sequence[~EntityPassword]
10968 Returns -> typing.Sequence[~ErrorResult]
10969 '''
10970 # map input types to rpc msg
10971 _params = dict()
10972 msg = dict(type='UserManager',
10973 request='SetPassword',
10974 version=1,
10975 params=_params)
10976 _params['changes'] = changes
10977 reply = await self.rpc(msg)
10978 return reply
10979
10980
10981
10982 @ReturnMapping(UserInfoResults)
10983 async def UserInfo(self, entities, include_disabled):
10984 '''
10985 entities : typing.Sequence[~Entity]
10986 include_disabled : bool
10987 Returns -> typing.Sequence[~UserInfoResult]
10988 '''
10989 # map input types to rpc msg
10990 _params = dict()
10991 msg = dict(type='UserManager',
10992 request='UserInfo',
10993 version=1,
10994 params=_params)
10995 _params['entities'] = entities
10996 _params['include-disabled'] = include_disabled
10997 reply = await self.rpc(msg)
10998 return reply
10999
11000
11001
11002 class VolumeAttachmentPlansWatcherFacade(Type):
11003 name = 'VolumeAttachmentPlansWatcher'
11004 version = 1
11005 schema = {'definitions': {'Error': {'additionalProperties': False,
11006 'properties': {'code': {'type': 'string'},
11007 'info': {'$ref': '#/definitions/ErrorInfo'},
11008 'message': {'type': 'string'}},
11009 'required': ['message', 'code'],
11010 'type': 'object'},
11011 'ErrorInfo': {'additionalProperties': False,
11012 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11013 'macaroon-path': {'type': 'string'}},
11014 'type': 'object'},
11015 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11016 'MachineStorageId': {'additionalProperties': False,
11017 'properties': {'attachment-tag': {'type': 'string'},
11018 'machine-tag': {'type': 'string'}},
11019 'required': ['machine-tag',
11020 'attachment-tag'],
11021 'type': 'object'},
11022 'MachineStorageIdsWatchResult': {'additionalProperties': False,
11023 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
11024 'type': 'array'},
11025 'error': {'$ref': '#/definitions/Error'},
11026 'watcher-id': {'type': 'string'}},
11027 'required': ['watcher-id',
11028 'changes'],
11029 'type': 'object'}},
11030 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
11031 'type': 'object'},
11032 'Stop': {'type': 'object'}},
11033 'type': 'object'}
11034
11035
11036 @ReturnMapping(MachineStorageIdsWatchResult)
11037 async def Next(self):
11038 '''
11039
11040 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error'), str]
11041 '''
11042 # map input types to rpc msg
11043 _params = dict()
11044 msg = dict(type='VolumeAttachmentPlansWatcher',
11045 request='Next',
11046 version=1,
11047 params=_params)
11048
11049 reply = await self.rpc(msg)
11050 return reply
11051
11052
11053
11054 @ReturnMapping(None)
11055 async def Stop(self):
11056 '''
11057
11058 Returns -> None
11059 '''
11060 # map input types to rpc msg
11061 _params = dict()
11062 msg = dict(type='VolumeAttachmentPlansWatcher',
11063 request='Stop',
11064 version=1,
11065 params=_params)
11066
11067 reply = await self.rpc(msg)
11068 return reply