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.
4 from juju
.client
.facade
import Type
, ReturnMapping
5 from juju
.client
._definitions
import *
8 class ActionPrunerFacade(Type
):
11 schema
= {'definitions': {'ActionPruneArgs': {'additionalProperties': False,
12 'properties': {'max-history-mb': {'type': 'integer'},
13 'max-history-time': {'type': 'integer'}},
14 'required': ['max-history-time',
17 'Error': {'additionalProperties': False,
18 'properties': {'code': {'type': 'string'},
19 'info': {'$ref': '#/definitions/ErrorInfo'},
20 'message': {'type': 'string'}},
21 'required': ['message', 'code'],
23 'ErrorInfo': {'additionalProperties': False,
24 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
25 'macaroon-path': {'type': 'string'}},
27 'Macaroon': {'additionalProperties': False, 'type': 'object'},
28 'ModelConfigResult': {'additionalProperties': False,
29 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
32 'required': ['config'],
34 'NotifyWatchResult': {'additionalProperties': False,
35 'properties': {'NotifyWatcherId': {'type': 'string'},
36 'error': {'$ref': '#/definitions/Error'}},
37 'required': ['NotifyWatcherId'],
39 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
41 'Prune': {'properties': {'Params': {'$ref': '#/definitions/ActionPruneArgs'}},
43 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
48 @ReturnMapping(ModelConfigResult
)
49 async def ModelConfig(self
):
52 Returns -> typing.Mapping[str, typing.Any]
54 # map input types to rpc msg
56 msg
= dict(type='ActionPruner',
57 request
='ModelConfig',
61 reply
= await self
.rpc(msg
)
67 async def Prune(self
, max_history_mb
, max_history_time
):
70 max_history_time : int
73 # map input types to rpc msg
75 msg
= dict(type='ActionPruner',
79 _params
['max-history-mb'] = max_history_mb
80 _params
['max-history-time'] = max_history_time
81 reply
= await self
.rpc(msg
)
86 @ReturnMapping(NotifyWatchResult
)
87 async def WatchForModelConfigChanges(self
):
90 Returns -> typing.Union[str, _ForwardRef('Error')]
92 # map input types to rpc msg
94 msg
= dict(type='ActionPruner',
95 request
='WatchForModelConfigChanges',
99 reply
= await self
.rpc(msg
)
104 class AgentToolsFacade(Type
):
107 schema
= {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
111 async def UpdateToolsAvailable(self
):
116 # map input types to rpc msg
118 msg
= dict(type='AgentTools',
119 request
='UpdateToolsAvailable',
123 reply
= await self
.rpc(msg
)
128 class AllWatcherFacade(Type
):
131 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
132 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
134 'required': ['deltas'],
136 'Delta': {'additionalProperties': False,
137 'properties': {'entity': {'additionalProperties': True,
139 'removed': {'type': 'boolean'}},
140 'required': ['removed', 'entity'],
142 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
144 'Stop': {'type': 'object'}},
148 @ReturnMapping(AllWatcherNextResults
)
149 async def Next(self
):
152 Returns -> typing.Sequence[~Delta]
154 # map input types to rpc msg
156 msg
= dict(type='AllWatcher',
161 reply
= await self
.rpc(msg
)
167 async def Stop(self
):
172 # map input types to rpc msg
174 msg
= dict(type='AllWatcher',
179 reply
= await self
.rpc(msg
)
184 class ApplicationRelationsWatcherFacade(Type
):
185 name
= 'ApplicationRelationsWatcher'
187 schema
= {'definitions': {'ApplicationRelationsChange': {'additionalProperties': False,
188 'properties': {'changed': {'items': {'$ref': '#/definitions/RelationChange'},
190 'removed': {'items': {'type': 'integer'},
193 'ApplicationRelationsWatchResult': {'additionalProperties': False,
194 'properties': {'ApplicationRelationsWatcherId': {'type': 'string'},
195 'changes': {'$ref': '#/definitions/ApplicationRelationsChange'},
196 'error': {'$ref': '#/definitions/Error'}},
197 'required': ['ApplicationRelationsWatcherId'],
199 'Error': {'additionalProperties': False,
200 'properties': {'code': {'type': 'string'},
201 'info': {'$ref': '#/definitions/ErrorInfo'},
202 'message': {'type': 'string'}},
203 'required': ['message', 'code'],
205 'ErrorInfo': {'additionalProperties': False,
206 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
207 'macaroon-path': {'type': 'string'}},
209 'Macaroon': {'additionalProperties': False, 'type': 'object'},
210 'RelationChange': {'additionalProperties': False,
211 'properties': {'changedunits': {'patternProperties': {'.*': {'$ref': '#/definitions/RelationUnitChange'}},
213 'departedunits': {'items': {'type': 'string'},
215 'id': {'type': 'integer'},
216 'life': {'type': 'string'}},
217 'required': ['id', 'life'],
219 'RelationUnitChange': {'additionalProperties': False,
220 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
224 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/ApplicationRelationsWatchResult'}},
226 'Stop': {'type': 'object'}},
230 @ReturnMapping(ApplicationRelationsWatchResult
)
231 async def Next(self
):
234 Returns -> typing.Union[str, _ForwardRef('ApplicationRelationsChange'), _ForwardRef('Error')]
236 # map input types to rpc msg
238 msg
= dict(type='ApplicationRelationsWatcher',
243 reply
= await self
.rpc(msg
)
249 async def Stop(self
):
254 # map input types to rpc msg
256 msg
= dict(type='ApplicationRelationsWatcher',
261 reply
= await self
.rpc(msg
)
266 class ApplicationScalerFacade(Type
):
267 name
= 'ApplicationScaler'
269 schema
= {'definitions': {'Entities': {'additionalProperties': False,
270 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
272 'required': ['entities'],
274 'Entity': {'additionalProperties': False,
275 'properties': {'tag': {'type': 'string'}},
278 'Error': {'additionalProperties': False,
279 'properties': {'code': {'type': 'string'},
280 'info': {'$ref': '#/definitions/ErrorInfo'},
281 'message': {'type': 'string'}},
282 'required': ['message', 'code'],
284 'ErrorInfo': {'additionalProperties': False,
285 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
286 'macaroon-path': {'type': 'string'}},
288 'ErrorResult': {'additionalProperties': False,
289 'properties': {'error': {'$ref': '#/definitions/Error'}},
291 'ErrorResults': {'additionalProperties': False,
292 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
294 'required': ['results'],
296 'Macaroon': {'additionalProperties': False, 'type': 'object'},
297 'StringsWatchResult': {'additionalProperties': False,
298 'properties': {'changes': {'items': {'type': 'string'},
300 'error': {'$ref': '#/definitions/Error'},
301 'watcher-id': {'type': 'string'}},
302 'required': ['watcher-id'],
304 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
305 'Result': {'$ref': '#/definitions/ErrorResults'}},
307 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
312 @ReturnMapping(ErrorResults
)
313 async def Rescale(self
, entities
):
315 entities : typing.Sequence[~Entity]
316 Returns -> typing.Sequence[~ErrorResult]
318 # map input types to rpc msg
320 msg
= dict(type='ApplicationScaler',
324 _params
['entities'] = entities
325 reply
= await self
.rpc(msg
)
330 @ReturnMapping(StringsWatchResult
)
331 async def Watch(self
):
334 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
336 # map input types to rpc msg
338 msg
= dict(type='ApplicationScaler',
343 reply
= await self
.rpc(msg
)
348 class BackupsFacade(Type
):
351 schema
= {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
352 'properties': {'notes': {'type': 'string'}},
353 'required': ['notes'],
355 'BackupsInfoArgs': {'additionalProperties': False,
356 'properties': {'id': {'type': 'string'}},
359 'BackupsListArgs': {'additionalProperties': False,
361 'BackupsListResult': {'additionalProperties': False,
362 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
364 'required': ['list'],
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',
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',
382 'stored': {'format': 'date-time',
384 'version': {'$ref': '#/definitions/Number'}},
401 'BackupsRemoveArgs': {'additionalProperties': False,
402 'properties': {'id': {'type': 'string'}},
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',
417 'RestoreArgs': {'additionalProperties': False,
418 'properties': {'backup-id': {'type': 'string'}},
419 'required': ['backup-id'],
421 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
422 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
424 'FinishRestore': {'type': 'object'},
425 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
426 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
428 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
429 'Result': {'$ref': '#/definitions/BackupsListResult'}},
431 'PrepareRestore': {'type': 'object'},
432 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
434 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
439 @ReturnMapping(BackupsMetadataResult
)
440 async def Create(self
, notes
):
443 Returns -> typing.Union[str, int, _ForwardRef('Number')]
445 # map input types to rpc msg
447 msg
= dict(type='Backups',
451 _params
['notes'] = notes
452 reply
= await self
.rpc(msg
)
458 async def FinishRestore(self
):
463 # map input types to rpc msg
465 msg
= dict(type='Backups',
466 request
='FinishRestore',
470 reply
= await self
.rpc(msg
)
475 @ReturnMapping(BackupsMetadataResult
)
476 async def Info(self
, id_
):
479 Returns -> typing.Union[str, int, _ForwardRef('Number')]
481 # map input types to rpc msg
483 msg
= dict(type='Backups',
488 reply
= await self
.rpc(msg
)
493 @ReturnMapping(BackupsListResult
)
494 async def List(self
):
497 Returns -> typing.Sequence[~BackupsMetadataResult]
499 # map input types to rpc msg
501 msg
= dict(type='Backups',
506 reply
= await self
.rpc(msg
)
512 async def PrepareRestore(self
):
517 # map input types to rpc msg
519 msg
= dict(type='Backups',
520 request
='PrepareRestore',
524 reply
= await self
.rpc(msg
)
530 async def Remove(self
, id_
):
535 # map input types to rpc msg
537 msg
= dict(type='Backups',
542 reply
= await self
.rpc(msg
)
548 async def Restore(self
, backup_id
):
553 # map input types to rpc msg
555 msg
= dict(type='Backups',
559 _params
['backup-id'] = backup_id
560 reply
= await self
.rpc(msg
)
565 class BundleFacade(Type
):
568 schema
= {'definitions': {'BundleChange': {'additionalProperties': False,
569 'properties': {'args': {'items': {'additionalProperties': True,
572 'id': {'type': 'string'},
573 'method': {'type': 'string'},
574 'requires': {'items': {'type': 'string'},
581 'BundleChangesParams': {'additionalProperties': False,
582 'properties': {'yaml': {'type': 'string'}},
583 'required': ['yaml'],
585 'BundleChangesResults': {'additionalProperties': False,
586 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
588 'errors': {'items': {'type': 'string'},
591 'properties': {'GetChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
592 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
597 @ReturnMapping(BundleChangesResults
)
598 async def GetChanges(self
, yaml
):
601 Returns -> typing.Union[typing.Sequence[~BundleChange], typing.Sequence[str]]
603 # map input types to rpc msg
605 msg
= dict(type='Bundle',
606 request
='GetChanges',
609 _params
['yaml'] = yaml
610 reply
= await self
.rpc(msg
)
615 class CAASAgentFacade(Type
):
618 schema
= {'definitions': {'CloudCredential': {'additionalProperties': False,
619 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
621 'auth-type': {'type': 'string'},
622 'redacted': {'items': {'type': 'string'},
624 'required': ['auth-type'],
626 'CloudSpec': {'additionalProperties': False,
627 'properties': {'cacertificates': {'items': {'type': 'string'},
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'],
638 'CloudSpecResult': {'additionalProperties': False,
639 'properties': {'error': {'$ref': '#/definitions/Error'},
640 'result': {'$ref': '#/definitions/CloudSpec'}},
642 'CloudSpecResults': {'additionalProperties': False,
643 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
646 'Entities': {'additionalProperties': False,
647 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
649 'required': ['entities'],
651 'Entity': {'additionalProperties': False,
652 'properties': {'tag': {'type': 'string'}},
655 'Error': {'additionalProperties': False,
656 'properties': {'code': {'type': 'string'},
657 'info': {'$ref': '#/definitions/ErrorInfo'},
658 'message': {'type': 'string'}},
659 'required': ['message', 'code'],
661 'ErrorInfo': {'additionalProperties': False,
662 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
663 'macaroon-path': {'type': 'string'}},
665 'Macaroon': {'additionalProperties': False, 'type': 'object'},
666 'ModelConfigResult': {'additionalProperties': False,
667 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
670 'required': ['config'],
672 'ModelTag': {'additionalProperties': False, 'type': 'object'},
673 'NotifyWatchResult': {'additionalProperties': False,
674 'properties': {'NotifyWatcherId': {'type': 'string'},
675 'error': {'$ref': '#/definitions/Error'}},
676 'required': ['NotifyWatcherId'],
678 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
679 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
681 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
682 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
684 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
686 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
691 @ReturnMapping(CloudSpecResults
)
692 async def CloudSpec(self
, entities
):
694 entities : typing.Sequence[~Entity]
695 Returns -> typing.Sequence[~CloudSpecResult]
697 # map input types to rpc msg
699 msg
= dict(type='CAASAgent',
703 _params
['entities'] = entities
704 reply
= await self
.rpc(msg
)
709 @ReturnMapping(CloudSpecResult
)
710 async def GetCloudSpec(self
):
713 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
715 # map input types to rpc msg
717 msg
= dict(type='CAASAgent',
718 request
='GetCloudSpec',
722 reply
= await self
.rpc(msg
)
727 @ReturnMapping(ModelConfigResult
)
728 async def ModelConfig(self
):
731 Returns -> typing.Mapping[str, typing.Any]
733 # map input types to rpc msg
735 msg
= dict(type='CAASAgent',
736 request
='ModelConfig',
740 reply
= await self
.rpc(msg
)
745 @ReturnMapping(NotifyWatchResult
)
746 async def WatchForModelConfigChanges(self
):
749 Returns -> typing.Union[str, _ForwardRef('Error')]
751 # map input types to rpc msg
753 msg
= dict(type='CAASAgent',
754 request
='WatchForModelConfigChanges',
758 reply
= await self
.rpc(msg
)
763 class CAASFirewallerFacade(Type
):
764 name
= 'CAASFirewaller'
766 schema
= {'definitions': {'ApplicationGetConfigResults': {'additionalProperties': False,
767 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigResult'},
769 'required': ['Results'],
771 'BoolResult': {'additionalProperties': False,
772 'properties': {'error': {'$ref': '#/definitions/Error'},
773 'result': {'type': 'boolean'}},
774 'required': ['result'],
776 'BoolResults': {'additionalProperties': False,
777 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
779 'required': ['results'],
781 'ConfigResult': {'additionalProperties': False,
782 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
785 'error': {'$ref': '#/definitions/Error'}},
786 'required': ['config'],
788 'Entities': {'additionalProperties': False,
789 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
791 'required': ['entities'],
793 'Entity': {'additionalProperties': False,
794 'properties': {'tag': {'type': 'string'}},
797 'Error': {'additionalProperties': False,
798 'properties': {'code': {'type': 'string'},
799 'info': {'$ref': '#/definitions/ErrorInfo'},
800 'message': {'type': 'string'}},
801 'required': ['message', 'code'],
803 'ErrorInfo': {'additionalProperties': False,
804 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
805 'macaroon-path': {'type': 'string'}},
807 'LifeResult': {'additionalProperties': False,
808 'properties': {'error': {'$ref': '#/definitions/Error'},
809 'life': {'type': 'string'}},
810 'required': ['life'],
812 'LifeResults': {'additionalProperties': False,
813 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
815 'required': ['results'],
817 'Macaroon': {'additionalProperties': False, 'type': 'object'},
818 'NotifyWatchResult': {'additionalProperties': False,
819 'properties': {'NotifyWatcherId': {'type': 'string'},
820 'error': {'$ref': '#/definitions/Error'}},
821 'required': ['NotifyWatcherId'],
823 'NotifyWatchResults': {'additionalProperties': False,
824 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
826 'required': ['results'],
828 'StringsWatchResult': {'additionalProperties': False,
829 'properties': {'changes': {'items': {'type': 'string'},
831 'error': {'$ref': '#/definitions/Error'},
832 'watcher-id': {'type': 'string'}},
833 'required': ['watcher-id'],
835 'properties': {'ApplicationsConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
836 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}},
838 'IsExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
839 'Result': {'$ref': '#/definitions/BoolResults'}},
841 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
842 'Result': {'$ref': '#/definitions/LifeResults'}},
844 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
845 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
847 'WatchApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
852 @ReturnMapping(ApplicationGetConfigResults
)
853 async def ApplicationsConfig(self
, entities
):
855 entities : typing.Sequence[~Entity]
856 Returns -> typing.Sequence[~ConfigResult]
858 # map input types to rpc msg
860 msg
= dict(type='CAASFirewaller',
861 request
='ApplicationsConfig',
864 _params
['entities'] = entities
865 reply
= await self
.rpc(msg
)
870 @ReturnMapping(BoolResults
)
871 async def IsExposed(self
, entities
):
873 entities : typing.Sequence[~Entity]
874 Returns -> typing.Sequence[~BoolResult]
876 # map input types to rpc msg
878 msg
= dict(type='CAASFirewaller',
882 _params
['entities'] = entities
883 reply
= await self
.rpc(msg
)
888 @ReturnMapping(LifeResults
)
889 async def Life(self
, entities
):
891 entities : typing.Sequence[~Entity]
892 Returns -> typing.Sequence[~LifeResult]
894 # map input types to rpc msg
896 msg
= dict(type='CAASFirewaller',
900 _params
['entities'] = entities
901 reply
= await self
.rpc(msg
)
906 @ReturnMapping(NotifyWatchResults
)
907 async def Watch(self
, entities
):
909 entities : typing.Sequence[~Entity]
910 Returns -> typing.Sequence[~NotifyWatchResult]
912 # map input types to rpc msg
914 msg
= dict(type='CAASFirewaller',
918 _params
['entities'] = entities
919 reply
= await self
.rpc(msg
)
924 @ReturnMapping(StringsWatchResult
)
925 async def WatchApplications(self
):
928 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
930 # map input types to rpc msg
932 msg
= dict(type='CAASFirewaller',
933 request
='WatchApplications',
937 reply
= await self
.rpc(msg
)
942 class CAASOperatorFacade(Type
):
943 name
= 'CAASOperator'
945 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
946 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
949 'required': ['servers'],
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'],
958 'ApplicationCharm': {'additionalProperties': False,
959 'properties': {'charm-modified-version': {'type': 'integer'},
960 'force-upgrade': {'type': 'boolean'},
961 'sha256': {'type': 'string'},
962 'url': {'type': 'string'}},
965 'charm-modified-version'],
967 'ApplicationCharmResult': {'additionalProperties': False,
968 'properties': {'error': {'$ref': '#/definitions/Error'},
969 'result': {'$ref': '#/definitions/ApplicationCharm'}},
971 'ApplicationCharmResults': {'additionalProperties': False,
972 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmResult'},
974 'required': ['results'],
976 'Binary': {'additionalProperties': False,
977 'properties': {'Arch': {'type': 'string'},
978 'Number': {'$ref': '#/definitions/Number'},
979 'Series': {'type': 'string'}},
980 'required': ['Number', 'Series', 'Arch'],
982 'Entities': {'additionalProperties': False,
983 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
985 'required': ['entities'],
987 'EntitiesVersion': {'additionalProperties': False,
988 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
990 'required': ['agent-tools'],
992 'Entity': {'additionalProperties': False,
993 'properties': {'tag': {'type': 'string'}},
996 'EntityStatusArgs': {'additionalProperties': False,
997 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1000 'info': {'type': 'string'},
1001 'status': {'type': 'string'},
1002 'tag': {'type': 'string'}},
1008 'EntityString': {'additionalProperties': False,
1009 'properties': {'tag': {'type': 'string'},
1010 'value': {'type': 'string'}},
1011 'required': ['tag', 'value'],
1013 'EntityVersion': {'additionalProperties': False,
1014 'properties': {'tag': {'type': 'string'},
1015 'tools': {'$ref': '#/definitions/Version'}},
1016 'required': ['tag', 'tools'],
1018 'Error': {'additionalProperties': False,
1019 'properties': {'code': {'type': 'string'},
1020 'info': {'$ref': '#/definitions/ErrorInfo'},
1021 'message': {'type': 'string'}},
1022 'required': ['message', 'code'],
1024 'ErrorInfo': {'additionalProperties': False,
1025 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1026 'macaroon-path': {'type': 'string'}},
1028 'ErrorResult': {'additionalProperties': False,
1029 'properties': {'error': {'$ref': '#/definitions/Error'}},
1031 'ErrorResults': {'additionalProperties': False,
1032 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1034 'required': ['results'],
1036 'HostPort': {'additionalProperties': False,
1037 'properties': {'Address': {'$ref': '#/definitions/Address'},
1038 'port': {'type': 'integer'}},
1039 'required': ['Address', 'port'],
1041 'LifeResult': {'additionalProperties': False,
1042 'properties': {'error': {'$ref': '#/definitions/Error'},
1043 'life': {'type': 'string'}},
1044 'required': ['life'],
1046 'LifeResults': {'additionalProperties': False,
1047 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1049 'required': ['results'],
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'],
1059 'NotifyWatchResult': {'additionalProperties': False,
1060 'properties': {'NotifyWatcherId': {'type': 'string'},
1061 'error': {'$ref': '#/definitions/Error'}},
1062 'required': ['NotifyWatcherId'],
1064 'NotifyWatchResults': {'additionalProperties': False,
1065 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1067 'required': ['results'],
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',
1081 'SetPodSpecParams': {'additionalProperties': False,
1082 'properties': {'specs': {'items': {'$ref': '#/definitions/EntityString'},
1084 'required': ['specs'],
1086 'SetStatus': {'additionalProperties': False,
1087 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1089 'required': ['entities'],
1091 'StringResult': {'additionalProperties': False,
1092 'properties': {'error': {'$ref': '#/definitions/Error'},
1093 'result': {'type': 'string'}},
1094 'required': ['result'],
1096 'StringsResult': {'additionalProperties': False,
1097 'properties': {'error': {'$ref': '#/definitions/Error'},
1098 'result': {'items': {'type': 'string'},
1101 'StringsWatchResult': {'additionalProperties': False,
1102 'properties': {'changes': {'items': {'type': 'string'},
1104 'error': {'$ref': '#/definitions/Error'},
1105 'watcher-id': {'type': 'string'}},
1106 'required': ['watcher-id'],
1108 'StringsWatchResults': {'additionalProperties': False,
1109 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
1111 'required': ['results'],
1113 'Version': {'additionalProperties': False,
1114 'properties': {'version': {'$ref': '#/definitions/Binary'}},
1115 'required': ['version'],
1117 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
1119 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
1121 'Charm': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1122 'Result': {'$ref': '#/definitions/ApplicationCharmResults'}},
1124 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
1126 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1127 'Result': {'$ref': '#/definitions/LifeResults'}},
1129 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1131 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1132 'Result': {'$ref': '#/definitions/ErrorResults'}},
1134 'SetPodSpec': {'properties': {'Params': {'$ref': '#/definitions/SetPodSpecParams'},
1135 'Result': {'$ref': '#/definitions/ErrorResults'}},
1137 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1138 'Result': {'$ref': '#/definitions/ErrorResults'}},
1140 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
1141 'Result': {'$ref': '#/definitions/ErrorResults'}},
1143 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1144 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1146 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1148 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1149 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1154 @ReturnMapping(StringsResult
)
1155 async def APIAddresses(self
):
1158 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
1160 # map input types to rpc msg
1162 msg
= dict(type='CAASOperator',
1163 request
='APIAddresses',
1167 reply
= await self
.rpc(msg
)
1172 @ReturnMapping(APIHostPortsResult
)
1173 async def APIHostPorts(self
):
1176 Returns -> typing.Sequence[~HostPort]
1178 # map input types to rpc msg
1180 msg
= dict(type='CAASOperator',
1181 request
='APIHostPorts',
1185 reply
= await self
.rpc(msg
)
1190 @ReturnMapping(ApplicationCharmResults
)
1191 async def Charm(self
, entities
):
1193 entities : typing.Sequence[~Entity]
1194 Returns -> typing.Sequence[~ApplicationCharmResult]
1196 # map input types to rpc msg
1198 msg
= dict(type='CAASOperator',
1202 _params
['entities'] = entities
1203 reply
= await self
.rpc(msg
)
1208 @ReturnMapping(ModelResult
)
1209 async def CurrentModel(self
):
1212 Returns -> typing.Union[_ForwardRef('Error'), str]
1214 # map input types to rpc msg
1216 msg
= dict(type='CAASOperator',
1217 request
='CurrentModel',
1221 reply
= await self
.rpc(msg
)
1226 @ReturnMapping(LifeResults
)
1227 async def Life(self
, entities
):
1229 entities : typing.Sequence[~Entity]
1230 Returns -> typing.Sequence[~LifeResult]
1232 # map input types to rpc msg
1234 msg
= dict(type='CAASOperator',
1238 _params
['entities'] = entities
1239 reply
= await self
.rpc(msg
)
1244 @ReturnMapping(StringResult
)
1245 async def ModelUUID(self
):
1248 Returns -> typing.Union[_ForwardRef('Error'), str]
1250 # map input types to rpc msg
1252 msg
= dict(type='CAASOperator',
1253 request
='ModelUUID',
1257 reply
= await self
.rpc(msg
)
1262 @ReturnMapping(ErrorResults
)
1263 async def Remove(self
, entities
):
1265 entities : typing.Sequence[~Entity]
1266 Returns -> typing.Sequence[~ErrorResult]
1268 # map input types to rpc msg
1270 msg
= dict(type='CAASOperator',
1274 _params
['entities'] = entities
1275 reply
= await self
.rpc(msg
)
1280 @ReturnMapping(ErrorResults
)
1281 async def SetPodSpec(self
, specs
):
1283 specs : typing.Sequence[~EntityString]
1284 Returns -> typing.Sequence[~ErrorResult]
1286 # map input types to rpc msg
1288 msg
= dict(type='CAASOperator',
1289 request
='SetPodSpec',
1292 _params
['specs'] = specs
1293 reply
= await self
.rpc(msg
)
1298 @ReturnMapping(ErrorResults
)
1299 async def SetStatus(self
, entities
):
1301 entities : typing.Sequence[~EntityStatusArgs]
1302 Returns -> typing.Sequence[~ErrorResult]
1304 # map input types to rpc msg
1306 msg
= dict(type='CAASOperator',
1307 request
='SetStatus',
1310 _params
['entities'] = entities
1311 reply
= await self
.rpc(msg
)
1316 @ReturnMapping(ErrorResults
)
1317 async def SetTools(self
, agent_tools
):
1319 agent_tools : typing.Sequence[~EntityVersion]
1320 Returns -> typing.Sequence[~ErrorResult]
1322 # map input types to rpc msg
1324 msg
= dict(type='CAASOperator',
1328 _params
['agent-tools'] = agent_tools
1329 reply
= await self
.rpc(msg
)
1334 @ReturnMapping(NotifyWatchResults
)
1335 async def Watch(self
, entities
):
1337 entities : typing.Sequence[~Entity]
1338 Returns -> typing.Sequence[~NotifyWatchResult]
1340 # map input types to rpc msg
1342 msg
= dict(type='CAASOperator',
1346 _params
['entities'] = entities
1347 reply
= await self
.rpc(msg
)
1352 @ReturnMapping(NotifyWatchResult
)
1353 async def WatchAPIHostPorts(self
):
1356 Returns -> typing.Union[str, _ForwardRef('Error')]
1358 # map input types to rpc msg
1360 msg
= dict(type='CAASOperator',
1361 request
='WatchAPIHostPorts',
1365 reply
= await self
.rpc(msg
)
1370 @ReturnMapping(StringsWatchResults
)
1371 async def WatchUnits(self
, entities
):
1373 entities : typing.Sequence[~Entity]
1374 Returns -> typing.Sequence[~StringsWatchResult]
1376 # map input types to rpc msg
1378 msg
= dict(type='CAASOperator',
1379 request
='WatchUnits',
1382 _params
['entities'] = entities
1383 reply
= await self
.rpc(msg
)
1388 class CAASOperatorProvisionerFacade(Type
):
1389 name
= 'CAASOperatorProvisioner'
1391 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
1392 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
1395 'required': ['servers'],
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'],
1404 'Entities': {'additionalProperties': False,
1405 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1407 'required': ['entities'],
1409 'Entity': {'additionalProperties': False,
1410 'properties': {'tag': {'type': 'string'}},
1411 'required': ['tag'],
1413 'EntityPassword': {'additionalProperties': False,
1414 'properties': {'password': {'type': 'string'},
1415 'tag': {'type': 'string'}},
1416 'required': ['tag', 'password'],
1418 'EntityPasswords': {'additionalProperties': False,
1419 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
1421 'required': ['changes'],
1423 'Error': {'additionalProperties': False,
1424 'properties': {'code': {'type': 'string'},
1425 'info': {'$ref': '#/definitions/ErrorInfo'},
1426 'message': {'type': 'string'}},
1427 'required': ['message', 'code'],
1429 'ErrorInfo': {'additionalProperties': False,
1430 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1431 'macaroon-path': {'type': 'string'}},
1433 'ErrorResult': {'additionalProperties': False,
1434 'properties': {'error': {'$ref': '#/definitions/Error'}},
1436 'ErrorResults': {'additionalProperties': False,
1437 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1439 'required': ['results'],
1441 'HostPort': {'additionalProperties': False,
1442 'properties': {'Address': {'$ref': '#/definitions/Address'},
1443 'port': {'type': 'integer'}},
1444 'required': ['Address', 'port'],
1446 'KubernetesFilesystemAttachmentParams': {'additionalProperties': False,
1447 'properties': {'mount-point': {'type': 'string'},
1448 'provider': {'type': 'string'},
1449 'read-only': {'type': 'boolean'}},
1450 'required': ['provider'],
1452 'KubernetesFilesystemParams': {'additionalProperties': False,
1453 'properties': {'attachment': {'$ref': '#/definitions/KubernetesFilesystemAttachmentParams'},
1454 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
1457 'provider': {'type': 'string'},
1458 'size': {'type': 'integer'},
1459 'storagename': {'type': 'string'},
1460 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1462 'required': ['storagename',
1466 'LifeResult': {'additionalProperties': False,
1467 'properties': {'error': {'$ref': '#/definitions/Error'},
1468 'life': {'type': 'string'}},
1469 'required': ['life'],
1471 'LifeResults': {'additionalProperties': False,
1472 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1474 'required': ['results'],
1476 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1477 'NotifyWatchResult': {'additionalProperties': False,
1478 'properties': {'NotifyWatcherId': {'type': 'string'},
1479 'error': {'$ref': '#/definitions/Error'}},
1480 'required': ['NotifyWatcherId'],
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',
1494 'OperatorProvisioningInfo': {'additionalProperties': False,
1495 'properties': {'api-addresses': {'items': {'type': 'string'},
1497 'charm-storage': {'$ref': '#/definitions/KubernetesFilesystemParams'},
1498 'image-path': {'type': 'string'},
1499 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1501 'version': {'$ref': '#/definitions/Number'}},
1502 'required': ['image-path',
1507 'StringResult': {'additionalProperties': False,
1508 'properties': {'error': {'$ref': '#/definitions/Error'},
1509 'result': {'type': 'string'}},
1510 'required': ['result'],
1512 'StringsResult': {'additionalProperties': False,
1513 'properties': {'error': {'$ref': '#/definitions/Error'},
1514 'result': {'items': {'type': 'string'},
1517 'StringsWatchResult': {'additionalProperties': False,
1518 'properties': {'changes': {'items': {'type': 'string'},
1520 'error': {'$ref': '#/definitions/Error'},
1521 'watcher-id': {'type': 'string'}},
1522 'required': ['watcher-id'],
1524 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
1526 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
1528 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1529 'Result': {'$ref': '#/definitions/LifeResults'}},
1531 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1533 'OperatorProvisioningInfo': {'properties': {'Result': {'$ref': '#/definitions/OperatorProvisioningInfo'}},
1535 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
1536 'Result': {'$ref': '#/definitions/ErrorResults'}},
1538 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1540 'WatchApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1545 @ReturnMapping(StringsResult
)
1546 async def APIAddresses(self
):
1549 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
1551 # map input types to rpc msg
1553 msg
= dict(type='CAASOperatorProvisioner',
1554 request
='APIAddresses',
1558 reply
= await self
.rpc(msg
)
1563 @ReturnMapping(APIHostPortsResult
)
1564 async def APIHostPorts(self
):
1567 Returns -> typing.Sequence[~HostPort]
1569 # map input types to rpc msg
1571 msg
= dict(type='CAASOperatorProvisioner',
1572 request
='APIHostPorts',
1576 reply
= await self
.rpc(msg
)
1581 @ReturnMapping(LifeResults
)
1582 async def Life(self
, entities
):
1584 entities : typing.Sequence[~Entity]
1585 Returns -> typing.Sequence[~LifeResult]
1587 # map input types to rpc msg
1589 msg
= dict(type='CAASOperatorProvisioner',
1593 _params
['entities'] = entities
1594 reply
= await self
.rpc(msg
)
1599 @ReturnMapping(StringResult
)
1600 async def ModelUUID(self
):
1603 Returns -> typing.Union[_ForwardRef('Error'), str]
1605 # map input types to rpc msg
1607 msg
= dict(type='CAASOperatorProvisioner',
1608 request
='ModelUUID',
1612 reply
= await self
.rpc(msg
)
1617 @ReturnMapping(OperatorProvisioningInfo
)
1618 async def OperatorProvisioningInfo(self
):
1621 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('KubernetesFilesystemParams'), str, typing.Mapping[str, str], _ForwardRef('Number')]
1623 # map input types to rpc msg
1625 msg
= dict(type='CAASOperatorProvisioner',
1626 request
='OperatorProvisioningInfo',
1630 reply
= await self
.rpc(msg
)
1635 @ReturnMapping(ErrorResults
)
1636 async def SetPasswords(self
, changes
):
1638 changes : typing.Sequence[~EntityPassword]
1639 Returns -> typing.Sequence[~ErrorResult]
1641 # map input types to rpc msg
1643 msg
= dict(type='CAASOperatorProvisioner',
1644 request
='SetPasswords',
1647 _params
['changes'] = changes
1648 reply
= await self
.rpc(msg
)
1653 @ReturnMapping(NotifyWatchResult
)
1654 async def WatchAPIHostPorts(self
):
1657 Returns -> typing.Union[str, _ForwardRef('Error')]
1659 # map input types to rpc msg
1661 msg
= dict(type='CAASOperatorProvisioner',
1662 request
='WatchAPIHostPorts',
1666 reply
= await self
.rpc(msg
)
1671 @ReturnMapping(StringsWatchResult
)
1672 async def WatchApplications(self
):
1675 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
1677 # map input types to rpc msg
1679 msg
= dict(type='CAASOperatorProvisioner',
1680 request
='WatchApplications',
1684 reply
= await self
.rpc(msg
)
1689 class CAASUnitProvisionerFacade(Type
):
1690 name
= 'CAASUnitProvisioner'
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'],
1699 'ApplicationGetConfigResults': {'additionalProperties': False,
1700 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigResult'},
1702 'required': ['Results'],
1704 'ApplicationUnitParams': {'additionalProperties': False,
1705 'properties': {'address': {'type': 'string'},
1706 'data': {'patternProperties': {'.*': {'additionalProperties': True,
1709 'filesystem-info': {'items': {'$ref': '#/definitions/KubernetesFilesystemInfo'},
1711 'info': {'type': 'string'},
1712 'ports': {'items': {'type': 'string'},
1714 'provider-id': {'type': 'string'},
1715 'status': {'type': 'string'},
1716 'unit-tag': {'type': 'string'}},
1717 'required': ['provider-id',
1724 'ConfigResult': {'additionalProperties': False,
1725 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1728 'error': {'$ref': '#/definitions/Error'}},
1729 'required': ['config'],
1731 'Entities': {'additionalProperties': False,
1732 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1734 'required': ['entities'],
1736 'Entity': {'additionalProperties': False,
1737 'properties': {'tag': {'type': 'string'}},
1738 'required': ['tag'],
1740 'EntityStatusArgs': {'additionalProperties': False,
1741 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1744 'info': {'type': 'string'},
1745 'status': {'type': 'string'},
1746 'tag': {'type': 'string'}},
1752 'Error': {'additionalProperties': False,
1753 'properties': {'code': {'type': 'string'},
1754 'info': {'$ref': '#/definitions/ErrorInfo'},
1755 'message': {'type': 'string'}},
1756 'required': ['message', 'code'],
1758 'ErrorInfo': {'additionalProperties': False,
1759 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1760 'macaroon-path': {'type': 'string'}},
1762 'ErrorResult': {'additionalProperties': False,
1763 'properties': {'error': {'$ref': '#/definitions/Error'}},
1765 'ErrorResults': {'additionalProperties': False,
1766 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1768 'required': ['results'],
1770 'IntResult': {'additionalProperties': False,
1771 'properties': {'error': {'$ref': '#/definitions/Error'},
1772 'result': {'type': 'integer'}},
1773 'required': ['result'],
1775 'IntResults': {'additionalProperties': False,
1776 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
1778 'required': ['results'],
1780 'KubernetesDeviceParams': {'additionalProperties': False,
1781 'properties': {'Attributes': {'patternProperties': {'.*': {'type': 'string'}},
1783 'Count': {'type': 'integer'},
1784 'Type': {'type': 'string'}},
1785 'required': ['Type',
1789 'KubernetesFilesystemAttachmentParams': {'additionalProperties': False,
1790 'properties': {'mount-point': {'type': 'string'},
1791 'provider': {'type': 'string'},
1792 'read-only': {'type': 'boolean'}},
1793 'required': ['provider'],
1795 'KubernetesFilesystemInfo': {'additionalProperties': False,
1796 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
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',
1816 'KubernetesFilesystemParams': {'additionalProperties': False,
1817 'properties': {'attachment': {'$ref': '#/definitions/KubernetesFilesystemAttachmentParams'},
1818 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
1821 'provider': {'type': 'string'},
1822 'size': {'type': 'integer'},
1823 'storagename': {'type': 'string'},
1824 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1826 'required': ['storagename',
1830 'KubernetesProvisioningInfo': {'additionalProperties': False,
1831 'properties': {'constraints': {'$ref': '#/definitions/Value'},
1832 'devices': {'items': {'$ref': '#/definitions/KubernetesDeviceParams'},
1834 'filesystems': {'items': {'$ref': '#/definitions/KubernetesFilesystemParams'},
1836 'placement': {'type': 'string'},
1837 'pod-spec': {'type': 'string'},
1838 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1840 'volumes': {'items': {'$ref': '#/definitions/KubernetesVolumeParams'},
1842 'required': ['pod-spec',
1845 'KubernetesProvisioningInfoResult': {'additionalProperties': False,
1846 'properties': {'error': {'$ref': '#/definitions/Error'},
1847 'result': {'$ref': '#/definitions/KubernetesProvisioningInfo'}},
1848 'required': ['result'],
1850 'KubernetesProvisioningInfoResults': {'additionalProperties': False,
1851 'properties': {'results': {'items': {'$ref': '#/definitions/KubernetesProvisioningInfoResult'},
1853 'required': ['results'],
1855 'KubernetesVolumeAttachmentParams': {'additionalProperties': False,
1856 'properties': {'provider': {'type': 'string'},
1857 'read-only': {'type': 'boolean'}},
1858 'required': ['provider'],
1860 'KubernetesVolumeInfo': {'additionalProperties': False,
1861 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
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',
1876 'KubernetesVolumeParams': {'additionalProperties': False,
1877 'properties': {'attachment': {'$ref': '#/definitions/KubernetesVolumeAttachmentParams'},
1878 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
1881 'provider': {'type': 'string'},
1882 'size': {'type': 'integer'},
1883 'storagename': {'type': 'string'},
1884 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1886 'required': ['storagename',
1890 'LifeResult': {'additionalProperties': False,
1891 'properties': {'error': {'$ref': '#/definitions/Error'},
1892 'life': {'type': 'string'}},
1893 'required': ['life'],
1895 'LifeResults': {'additionalProperties': False,
1896 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1898 'required': ['results'],
1900 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1901 'NotifyWatchResult': {'additionalProperties': False,
1902 'properties': {'NotifyWatcherId': {'type': 'string'},
1903 'error': {'$ref': '#/definitions/Error'}},
1904 'required': ['NotifyWatcherId'],
1906 'NotifyWatchResults': {'additionalProperties': False,
1907 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1909 'required': ['results'],
1911 'SetStatus': {'additionalProperties': False,
1912 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1914 'required': ['entities'],
1916 'StringsWatchResult': {'additionalProperties': False,
1917 'properties': {'changes': {'items': {'type': 'string'},
1919 'error': {'$ref': '#/definitions/Error'},
1920 'watcher-id': {'type': 'string'}},
1921 'required': ['watcher-id'],
1923 'UpdateApplicationServiceArg': {'additionalProperties': False,
1924 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1926 'application-tag': {'type': 'string'},
1927 'provider-id': {'type': 'string'}},
1928 'required': ['application-tag',
1932 'UpdateApplicationServiceArgs': {'additionalProperties': False,
1933 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateApplicationServiceArg'},
1935 'required': ['args'],
1937 'UpdateApplicationUnitArgs': {'additionalProperties': False,
1938 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateApplicationUnits'},
1940 'required': ['args'],
1942 'UpdateApplicationUnits': {'additionalProperties': False,
1943 'properties': {'application-tag': {'type': 'string'},
1944 'units': {'items': {'$ref': '#/definitions/ApplicationUnitParams'},
1946 'required': ['application-tag',
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'},
1959 'tags': {'items': {'type': 'string'},
1961 'virt-type': {'type': 'string'},
1962 'zones': {'items': {'type': 'string'},
1965 'properties': {'ApplicationsConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1966 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}},
1968 'ApplicationsScale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1969 'Result': {'$ref': '#/definitions/IntResults'}},
1971 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1972 'Result': {'$ref': '#/definitions/LifeResults'}},
1974 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1975 'Result': {'$ref': '#/definitions/KubernetesProvisioningInfoResults'}},
1977 'SetOperatorStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1978 'Result': {'$ref': '#/definitions/ErrorResults'}},
1980 'UpdateApplicationsService': {'properties': {'Params': {'$ref': '#/definitions/UpdateApplicationServiceArgs'},
1981 'Result': {'$ref': '#/definitions/ErrorResults'}},
1983 'UpdateApplicationsUnits': {'properties': {'Params': {'$ref': '#/definitions/UpdateApplicationUnitArgs'},
1984 'Result': {'$ref': '#/definitions/ErrorResults'}},
1986 'WatchApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1988 'WatchApplicationsScale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1989 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1991 'WatchPodSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1992 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1997 @ReturnMapping(ApplicationGetConfigResults
)
1998 async def ApplicationsConfig(self
, entities
):
2000 entities : typing.Sequence[~Entity]
2001 Returns -> typing.Sequence[~ConfigResult]
2003 # map input types to rpc msg
2005 msg
= dict(type='CAASUnitProvisioner',
2006 request
='ApplicationsConfig',
2009 _params
['entities'] = entities
2010 reply
= await self
.rpc(msg
)
2015 @ReturnMapping(IntResults
)
2016 async def ApplicationsScale(self
, entities
):
2018 entities : typing.Sequence[~Entity]
2019 Returns -> typing.Sequence[~IntResult]
2021 # map input types to rpc msg
2023 msg
= dict(type='CAASUnitProvisioner',
2024 request
='ApplicationsScale',
2027 _params
['entities'] = entities
2028 reply
= await self
.rpc(msg
)
2033 @ReturnMapping(LifeResults
)
2034 async def Life(self
, entities
):
2036 entities : typing.Sequence[~Entity]
2037 Returns -> typing.Sequence[~LifeResult]
2039 # map input types to rpc msg
2041 msg
= dict(type='CAASUnitProvisioner',
2045 _params
['entities'] = entities
2046 reply
= await self
.rpc(msg
)
2051 @ReturnMapping(KubernetesProvisioningInfoResults
)
2052 async def ProvisioningInfo(self
, entities
):
2054 entities : typing.Sequence[~Entity]
2055 Returns -> typing.Sequence[~KubernetesProvisioningInfoResult]
2057 # map input types to rpc msg
2059 msg
= dict(type='CAASUnitProvisioner',
2060 request
='ProvisioningInfo',
2063 _params
['entities'] = entities
2064 reply
= await self
.rpc(msg
)
2069 @ReturnMapping(ErrorResults
)
2070 async def SetOperatorStatus(self
, entities
):
2072 entities : typing.Sequence[~EntityStatusArgs]
2073 Returns -> typing.Sequence[~ErrorResult]
2075 # map input types to rpc msg
2077 msg
= dict(type='CAASUnitProvisioner',
2078 request
='SetOperatorStatus',
2081 _params
['entities'] = entities
2082 reply
= await self
.rpc(msg
)
2087 @ReturnMapping(ErrorResults
)
2088 async def UpdateApplicationsService(self
, args
):
2090 args : typing.Sequence[~UpdateApplicationServiceArg]
2091 Returns -> typing.Sequence[~ErrorResult]
2093 # map input types to rpc msg
2095 msg
= dict(type='CAASUnitProvisioner',
2096 request
='UpdateApplicationsService',
2099 _params
['args'] = args
2100 reply
= await self
.rpc(msg
)
2105 @ReturnMapping(ErrorResults
)
2106 async def UpdateApplicationsUnits(self
, args
):
2108 args : typing.Sequence[~UpdateApplicationUnits]
2109 Returns -> typing.Sequence[~ErrorResult]
2111 # map input types to rpc msg
2113 msg
= dict(type='CAASUnitProvisioner',
2114 request
='UpdateApplicationsUnits',
2117 _params
['args'] = args
2118 reply
= await self
.rpc(msg
)
2123 @ReturnMapping(StringsWatchResult
)
2124 async def WatchApplications(self
):
2127 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
2129 # map input types to rpc msg
2131 msg
= dict(type='CAASUnitProvisioner',
2132 request
='WatchApplications',
2136 reply
= await self
.rpc(msg
)
2141 @ReturnMapping(NotifyWatchResults
)
2142 async def WatchApplicationsScale(self
, entities
):
2144 entities : typing.Sequence[~Entity]
2145 Returns -> typing.Sequence[~NotifyWatchResult]
2147 # map input types to rpc msg
2149 msg
= dict(type='CAASUnitProvisioner',
2150 request
='WatchApplicationsScale',
2153 _params
['entities'] = entities
2154 reply
= await self
.rpc(msg
)
2159 @ReturnMapping(NotifyWatchResults
)
2160 async def WatchPodSpec(self
, entities
):
2162 entities : typing.Sequence[~Entity]
2163 Returns -> typing.Sequence[~NotifyWatchResult]
2165 # map input types to rpc msg
2167 msg
= dict(type='CAASUnitProvisioner',
2168 request
='WatchPodSpec',
2171 _params
['entities'] = entities
2172 reply
= await self
.rpc(msg
)
2177 class ClientFacade(Type
):
2180 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
2181 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2184 'required': ['servers'],
2186 'AddCharm': {'additionalProperties': False,
2187 'properties': {'channel': {'type': 'string'},
2188 'url': {'type': 'string'}},
2189 'required': ['url', 'channel'],
2191 'AddCharmWithAuthorization': {'additionalProperties': False,
2192 'properties': {'channel': {'type': 'string'},
2193 'macaroon': {'$ref': '#/definitions/Macaroon'},
2194 'url': {'type': 'string'}},
2199 'AddMachineParams': {'additionalProperties': False,
2200 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
2202 'constraints': {'$ref': '#/definitions/Value'},
2203 'container-type': {'type': 'string'},
2204 'disks': {'items': {'$ref': '#/definitions/Constraints'},
2206 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2207 'instance-id': {'type': 'string'},
2208 'jobs': {'items': {'type': 'string'},
2210 'nonce': {'type': 'string'},
2211 'parent-id': {'type': 'string'},
2212 'placement': {'$ref': '#/definitions/Placement'},
2213 'series': {'type': 'string'}},
2214 'required': ['series',
2221 'hardware-characteristics',
2224 'AddMachines': {'additionalProperties': False,
2225 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
2227 'required': ['params'],
2229 'AddMachinesResult': {'additionalProperties': False,
2230 'properties': {'error': {'$ref': '#/definitions/Error'},
2231 'machine': {'type': 'string'}},
2232 'required': ['machine'],
2234 'AddMachinesResults': {'additionalProperties': False,
2235 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
2237 'required': ['machines'],
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'],
2246 'AgentVersionResult': {'additionalProperties': False,
2247 'properties': {'version': {'$ref': '#/definitions/Number'}},
2248 'required': ['version'],
2250 'AllWatcherId': {'additionalProperties': False,
2251 'properties': {'watcher-id': {'type': 'string'}},
2252 'required': ['watcher-id'],
2254 'ApplicationStatus': {'additionalProperties': False,
2255 'properties': {'can-upgrade-to': {'type': 'string'},
2256 'charm': {'type': 'string'},
2257 'err': {'additionalProperties': True,
2259 'exposed': {'type': 'boolean'},
2260 'life': {'type': 'string'},
2261 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
2263 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
2266 'series': {'type': 'string'},
2267 'status': {'$ref': '#/definitions/DetailedStatus'},
2268 'subordinate-to': {'items': {'type': 'string'},
2270 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
2272 'workload-version': {'type': 'string'}},
2273 'required': ['charm',
2283 'workload-version'],
2285 'Binary': {'additionalProperties': False,
2286 'properties': {'Arch': {'type': 'string'},
2287 'Number': {'$ref': '#/definitions/Number'},
2288 'Series': {'type': 'string'}},
2289 'required': ['Number', 'Series', 'Arch'],
2291 'BundleChange': {'additionalProperties': False,
2292 'properties': {'args': {'items': {'additionalProperties': True,
2295 'id': {'type': 'string'},
2296 'method': {'type': 'string'},
2297 'requires': {'items': {'type': 'string'},
2304 'BundleChangesParams': {'additionalProperties': False,
2305 'properties': {'yaml': {'type': 'string'}},
2306 'required': ['yaml'],
2308 'BundleChangesResults': {'additionalProperties': False,
2309 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
2311 'errors': {'items': {'type': 'string'},
2314 'BytesResult': {'additionalProperties': False,
2315 'properties': {'result': {'items': {'type': 'integer'},
2317 'required': ['result'],
2319 'ConfigValue': {'additionalProperties': False,
2320 'properties': {'source': {'type': 'string'},
2321 'value': {'additionalProperties': True,
2323 'required': ['value', 'source'],
2325 'Constraints': {'additionalProperties': False,
2326 'properties': {'Count': {'type': 'integer'},
2327 'Pool': {'type': 'string'},
2328 'Size': {'type': 'integer'}},
2329 'required': ['Pool', 'Size', 'Count'],
2331 'DestroyMachines': {'additionalProperties': False,
2332 'properties': {'force': {'type': 'boolean'},
2333 'machine-names': {'items': {'type': 'string'},
2335 'required': ['machine-names', 'force'],
2337 'DetailedStatus': {'additionalProperties': False,
2338 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2341 'err': {'additionalProperties': True,
2343 'info': {'type': 'string'},
2344 'kind': {'type': 'string'},
2345 'life': {'type': 'string'},
2346 'since': {'format': 'date-time',
2348 'status': {'type': 'string'},
2349 'version': {'type': 'string'}},
2350 'required': ['status',
2358 'EndpointStatus': {'additionalProperties': False,
2359 'properties': {'application': {'type': 'string'},
2360 'name': {'type': 'string'},
2361 'role': {'type': 'string'},
2362 'subordinate': {'type': 'boolean'}},
2363 'required': ['application',
2368 'Entities': {'additionalProperties': False,
2369 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2371 'required': ['entities'],
2373 'Entity': {'additionalProperties': False,
2374 'properties': {'tag': {'type': 'string'}},
2375 'required': ['tag'],
2377 'EntityStatus': {'additionalProperties': False,
2378 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2381 'info': {'type': 'string'},
2382 'since': {'format': 'date-time',
2384 'status': {'type': 'string'}},
2385 'required': ['status', 'info', 'since'],
2387 'Error': {'additionalProperties': False,
2388 'properties': {'code': {'type': 'string'},
2389 'info': {'$ref': '#/definitions/ErrorInfo'},
2390 'message': {'type': 'string'}},
2391 'required': ['message', 'code'],
2393 'ErrorInfo': {'additionalProperties': False,
2394 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2395 'macaroon-path': {'type': 'string'}},
2397 'ErrorResult': {'additionalProperties': False,
2398 'properties': {'error': {'$ref': '#/definitions/Error'}},
2400 'ErrorResults': {'additionalProperties': False,
2401 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2403 'required': ['results'],
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',
2417 'FindToolsResult': {'additionalProperties': False,
2418 'properties': {'error': {'$ref': '#/definitions/Error'},
2419 'list': {'items': {'$ref': '#/definitions/Tools'},
2421 'required': ['list'],
2423 'FullStatus': {'additionalProperties': False,
2424 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
2426 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
2428 'model': {'$ref': '#/definitions/ModelStatusInfo'},
2429 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
2431 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}},
2433 'required': ['model',
2436 'remote-applications',
2439 'GetConstraintsResults': {'additionalProperties': False,
2440 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
2441 'required': ['constraints'],
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'},
2453 'History': {'additionalProperties': False,
2454 'properties': {'error': {'$ref': '#/definitions/Error'},
2455 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
2457 'required': ['statuses'],
2459 'HostPort': {'additionalProperties': False,
2460 'properties': {'Address': {'$ref': '#/definitions/Address'},
2461 'port': {'type': 'integer'}},
2462 'required': ['Address', 'port'],
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'},
2475 'MachineStatus': {'additionalProperties': False,
2476 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
2477 'constraints': {'type': 'string'},
2478 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
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'},
2488 'jobs': {'items': {'type': 'string'},
2490 'network-interfaces': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInterface'}},
2492 'series': {'type': 'string'},
2493 'wants-vote': {'type': 'boolean'}},
2494 'required': ['agent-status',
2507 'MeterStatus': {'additionalProperties': False,
2508 'properties': {'color': {'type': 'string'},
2509 'message': {'type': 'string'}},
2510 'required': ['color', 'message'],
2512 'ModelConfigResults': {'additionalProperties': False,
2513 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
2515 'required': ['config'],
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'},
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'},
2535 'uuid': {'type': 'string'}},
2536 'required': ['name',
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'}},
2556 'ModelMigrationStatus': {'additionalProperties': False,
2557 'properties': {'end': {'format': 'date-time',
2559 'start': {'format': 'date-time',
2561 'status': {'type': 'string'}},
2562 'required': ['status', 'start'],
2564 'ModelSLA': {'additionalProperties': False,
2565 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
2566 'creds': {'items': {'type': 'integer'},
2568 'required': ['ModelSLAInfo', 'creds'],
2570 'ModelSLAInfo': {'additionalProperties': False,
2571 'properties': {'level': {'type': 'string'},
2572 'owner': {'type': 'string'}},
2573 'required': ['level', 'owner'],
2575 'ModelSet': {'additionalProperties': False,
2576 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2579 'required': ['config'],
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',
2593 'available-version',
2598 'ModelUnset': {'additionalProperties': False,
2599 'properties': {'keys': {'items': {'type': 'string'},
2601 'required': ['keys'],
2603 'ModelUserInfo': {'additionalProperties': False,
2604 'properties': {'access': {'type': 'string'},
2605 'display-name': {'type': 'string'},
2606 'last-connection': {'format': 'date-time',
2608 'user': {'type': 'string'}},
2609 'required': ['user',
2614 'ModelUserInfoResult': {'additionalProperties': False,
2615 'properties': {'error': {'$ref': '#/definitions/Error'},
2616 'result': {'$ref': '#/definitions/ModelUserInfo'}},
2618 'ModelUserInfoResults': {'additionalProperties': False,
2619 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
2621 'required': ['results'],
2623 'NetworkInterface': {'additionalProperties': False,
2624 'properties': {'dns-nameservers': {'items': {'type': 'string'},
2626 'gateway': {'type': 'string'},
2627 'ip-addresses': {'items': {'type': 'string'},
2629 'is-up': {'type': 'boolean'},
2630 'mac-address': {'type': 'string'},
2631 'space': {'type': 'string'}},
2632 'required': ['ip-addresses',
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',
2648 'Placement': {'additionalProperties': False,
2649 'properties': {'directive': {'type': 'string'},
2650 'scope': {'type': 'string'}},
2651 'required': ['scope', 'directive'],
2653 'PrivateAddress': {'additionalProperties': False,
2654 'properties': {'target': {'type': 'string'}},
2655 'required': ['target'],
2657 'PrivateAddressResults': {'additionalProperties': False,
2658 'properties': {'private-address': {'type': 'string'}},
2659 'required': ['private-address'],
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',
2669 'disable-package-commands'],
2671 'ProvisioningScriptResult': {'additionalProperties': False,
2672 'properties': {'script': {'type': 'string'}},
2673 'required': ['script'],
2675 'PublicAddress': {'additionalProperties': False,
2676 'properties': {'target': {'type': 'string'}},
2677 'required': ['target'],
2679 'PublicAddressResults': {'additionalProperties': False,
2680 'properties': {'public-address': {'type': 'string'}},
2681 'required': ['public-address'],
2683 'RelationStatus': {'additionalProperties': False,
2684 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
2686 'id': {'type': 'integer'},
2687 'interface': {'type': 'string'},
2688 'key': {'type': 'string'},
2689 'scope': {'type': 'string'}},
2696 'RemoteApplicationStatus': {'additionalProperties': False,
2697 'properties': {'application-name': {'type': 'string'},
2698 'application-url': {'type': 'string'},
2699 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
2701 'err': {'additionalProperties': True,
2703 'life': {'type': 'string'},
2704 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
2707 'status': {'$ref': '#/definitions/DetailedStatus'}},
2708 'required': ['application-url',
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',
2727 'ResolveCharmResult': {'additionalProperties': False,
2728 'properties': {'error': {'type': 'string'},
2729 'url': {'type': 'string'}},
2731 'ResolveCharmResults': {'additionalProperties': False,
2732 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
2734 'required': ['urls'],
2736 'ResolveCharms': {'additionalProperties': False,
2737 'properties': {'references': {'items': {'type': 'string'},
2739 'required': ['references'],
2741 'Resolved': {'additionalProperties': False,
2742 'properties': {'retry': {'type': 'boolean'},
2743 'unit-name': {'type': 'string'}},
2744 'required': ['unit-name', 'retry'],
2746 'SetConstraints': {'additionalProperties': False,
2747 'properties': {'application': {'type': 'string'},
2748 'constraints': {'$ref': '#/definitions/Value'}},
2749 'required': ['application', 'constraints'],
2751 'SetModelAgentVersion': {'additionalProperties': False,
2752 'properties': {'version': {'$ref': '#/definitions/Number'}},
2753 'required': ['version'],
2755 'StatusHistoryFilter': {'additionalProperties': False,
2756 'properties': {'date': {'format': 'date-time',
2758 'delta': {'type': 'integer'},
2759 'exclude': {'items': {'type': 'string'},
2761 'size': {'type': 'integer'}},
2762 'required': ['size',
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',
2777 'StatusHistoryRequests': {'additionalProperties': False,
2778 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
2780 'required': ['requests'],
2782 'StatusHistoryResult': {'additionalProperties': False,
2783 'properties': {'error': {'$ref': '#/definitions/Error'},
2784 'history': {'$ref': '#/definitions/History'}},
2785 'required': ['history'],
2787 'StatusHistoryResults': {'additionalProperties': False,
2788 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
2790 'required': ['results'],
2792 'StatusParams': {'additionalProperties': False,
2793 'properties': {'patterns': {'items': {'type': 'string'},
2795 'required': ['patterns'],
2797 'StringResult': {'additionalProperties': False,
2798 'properties': {'error': {'$ref': '#/definitions/Error'},
2799 'result': {'type': 'string'}},
2800 'required': ['result'],
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'],
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'},
2816 'public-address': {'type': 'string'},
2817 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
2819 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
2820 'workload-version': {'type': 'string'}},
2821 'required': ['agent-status',
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'},
2840 'tags': {'items': {'type': 'string'},
2842 'virt-type': {'type': 'string'}},
2844 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
2846 'AbortCurrentUpgrade': {'type': 'object'},
2847 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
2849 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
2851 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2852 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2854 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2855 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2857 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
2859 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
2861 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
2863 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
2864 'Result': {'$ref': '#/definitions/FindToolsResult'}},
2866 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
2867 'Result': {'$ref': '#/definitions/FullStatus'}},
2869 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
2870 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
2872 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
2874 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2875 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2877 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
2879 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
2881 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
2883 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
2885 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
2887 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
2888 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
2890 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
2891 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
2893 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
2894 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
2896 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
2897 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
2899 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
2901 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2902 'Result': {'$ref': '#/definitions/ErrorResults'}},
2904 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
2906 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
2908 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
2910 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
2912 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
2913 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
2915 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
2920 @ReturnMapping(APIHostPortsResult
)
2921 async def APIHostPorts(self
):
2924 Returns -> typing.Sequence[~HostPort]
2926 # map input types to rpc msg
2928 msg
= dict(type='Client',
2929 request
='APIHostPorts',
2933 reply
= await self
.rpc(msg
)
2938 @ReturnMapping(None)
2939 async def AbortCurrentUpgrade(self
):
2944 # map input types to rpc msg
2946 msg
= dict(type='Client',
2947 request
='AbortCurrentUpgrade',
2951 reply
= await self
.rpc(msg
)
2956 @ReturnMapping(None)
2957 async def AddCharm(self
, channel
, url
):
2963 # map input types to rpc msg
2965 msg
= dict(type='Client',
2969 _params
['channel'] = channel
2970 _params
['url'] = url
2971 reply
= await self
.rpc(msg
)
2976 @ReturnMapping(None)
2977 async def AddCharmWithAuthorization(self
, channel
, macaroon
, url
):
2984 # map input types to rpc msg
2986 msg
= dict(type='Client',
2987 request
='AddCharmWithAuthorization',
2990 _params
['channel'] = channel
2991 _params
['macaroon'] = macaroon
2992 _params
['url'] = url
2993 reply
= await self
.rpc(msg
)
2998 @ReturnMapping(AddMachinesResults
)
2999 async def AddMachines(self
, params
):
3001 params : typing.Sequence[~AddMachineParams]
3002 Returns -> typing.Sequence[~AddMachinesResult]
3004 # map input types to rpc msg
3006 msg
= dict(type='Client',
3007 request
='AddMachines',
3010 _params
['params'] = params
3011 reply
= await self
.rpc(msg
)
3016 @ReturnMapping(AddMachinesResults
)
3017 async def AddMachinesV2(self
, params
):
3019 params : typing.Sequence[~AddMachineParams]
3020 Returns -> typing.Sequence[~AddMachinesResult]
3022 # map input types to rpc msg
3024 msg
= dict(type='Client',
3025 request
='AddMachinesV2',
3028 _params
['params'] = params
3029 reply
= await self
.rpc(msg
)
3034 @ReturnMapping(AgentVersionResult
)
3035 async def AgentVersion(self
):
3040 # map input types to rpc msg
3042 msg
= dict(type='Client',
3043 request
='AgentVersion',
3047 reply
= await self
.rpc(msg
)
3052 @ReturnMapping(BytesResult
)
3053 async def CACert(self
):
3056 Returns -> typing.Sequence[int]
3058 # map input types to rpc msg
3060 msg
= dict(type='Client',
3065 reply
= await self
.rpc(msg
)
3070 @ReturnMapping(None)
3071 async def DestroyMachines(self
, force
, machine_names
):
3074 machine_names : typing.Sequence[str]
3077 # map input types to rpc msg
3079 msg
= dict(type='Client',
3080 request
='DestroyMachines',
3083 _params
['force'] = force
3084 _params
['machine-names'] = machine_names
3085 reply
= await self
.rpc(msg
)
3090 @ReturnMapping(FindToolsResult
)
3091 async def FindTools(self
, arch
, major
, minor
, number
, series
):
3098 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
3100 # map input types to rpc msg
3102 msg
= dict(type='Client',
3103 request
='FindTools',
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
)
3116 @ReturnMapping(FullStatus
)
3117 async def FullStatus(self
, patterns
):
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]]
3122 # map input types to rpc msg
3124 msg
= dict(type='Client',
3125 request
='FullStatus',
3128 _params
['patterns'] = patterns
3129 reply
= await self
.rpc(msg
)
3134 @ReturnMapping(BundleChangesResults
)
3135 async def GetBundleChanges(self
, yaml
):
3138 Returns -> typing.Union[typing.Sequence[~BundleChange], typing.Sequence[str]]
3140 # map input types to rpc msg
3142 msg
= dict(type='Client',
3143 request
='GetBundleChanges',
3146 _params
['yaml'] = yaml
3147 reply
= await self
.rpc(msg
)
3152 @ReturnMapping(GetConstraintsResults
)
3153 async def GetModelConstraints(self
):
3158 # map input types to rpc msg
3160 msg
= dict(type='Client',
3161 request
='GetModelConstraints',
3165 reply
= await self
.rpc(msg
)
3170 @ReturnMapping(AddMachinesResults
)
3171 async def InjectMachines(self
, params
):
3173 params : typing.Sequence[~AddMachineParams]
3174 Returns -> typing.Sequence[~AddMachinesResult]
3176 # map input types to rpc msg
3178 msg
= dict(type='Client',
3179 request
='InjectMachines',
3182 _params
['params'] = params
3183 reply
= await self
.rpc(msg
)
3188 @ReturnMapping(ModelConfigResults
)
3189 async def ModelGet(self
):
3192 Returns -> typing.Mapping[str, ~ConfigValue]
3194 # map input types to rpc msg
3196 msg
= dict(type='Client',
3201 reply
= await self
.rpc(msg
)
3206 @ReturnMapping(ModelInfo
)
3207 async def ModelInfo(self
):
3210 Returns -> typing.Union[_ForwardRef('Number'), str, typing.Sequence[~ModelMachineInfo], _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
3212 # map input types to rpc msg
3214 msg
= dict(type='Client',
3215 request
='ModelInfo',
3219 reply
= await self
.rpc(msg
)
3224 @ReturnMapping(None)
3225 async def ModelSet(self
, config
):
3227 config : typing.Mapping[str, typing.Any]
3230 # map input types to rpc msg
3232 msg
= dict(type='Client',
3236 _params
['config'] = config
3237 reply
= await self
.rpc(msg
)
3242 @ReturnMapping(None)
3243 async def ModelUnset(self
, keys
):
3245 keys : typing.Sequence[str]
3248 # map input types to rpc msg
3250 msg
= dict(type='Client',
3251 request
='ModelUnset',
3254 _params
['keys'] = keys
3255 reply
= await self
.rpc(msg
)
3260 @ReturnMapping(ModelUserInfoResults
)
3261 async def ModelUserInfo(self
):
3264 Returns -> typing.Sequence[~ModelUserInfoResult]
3266 # map input types to rpc msg
3268 msg
= dict(type='Client',
3269 request
='ModelUserInfo',
3273 reply
= await self
.rpc(msg
)
3278 @ReturnMapping(PrivateAddressResults
)
3279 async def PrivateAddress(self
, target
):
3284 # map input types to rpc msg
3286 msg
= dict(type='Client',
3287 request
='PrivateAddress',
3290 _params
['target'] = target
3291 reply
= await self
.rpc(msg
)
3296 @ReturnMapping(ProvisioningScriptResult
)
3297 async def ProvisioningScript(self
, data_dir
, disable_package_commands
, machine_id
, nonce
):
3300 disable_package_commands : bool
3305 # map input types to rpc msg
3307 msg
= dict(type='Client',
3308 request
='ProvisioningScript',
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
)
3320 @ReturnMapping(PublicAddressResults
)
3321 async def PublicAddress(self
, target
):
3326 # map input types to rpc msg
3328 msg
= dict(type='Client',
3329 request
='PublicAddress',
3332 _params
['target'] = target
3333 reply
= await self
.rpc(msg
)
3338 @ReturnMapping(ResolveCharmResults
)
3339 async def ResolveCharms(self
, references
):
3341 references : typing.Sequence[str]
3342 Returns -> typing.Sequence[~ResolveCharmResult]
3344 # map input types to rpc msg
3346 msg
= dict(type='Client',
3347 request
='ResolveCharms',
3350 _params
['references'] = references
3351 reply
= await self
.rpc(msg
)
3356 @ReturnMapping(None)
3357 async def Resolved(self
, retry
, unit_name
):
3363 # map input types to rpc msg
3365 msg
= dict(type='Client',
3369 _params
['retry'] = retry
3370 _params
['unit-name'] = unit_name
3371 reply
= await self
.rpc(msg
)
3376 @ReturnMapping(ErrorResults
)
3377 async def RetryProvisioning(self
, entities
):
3379 entities : typing.Sequence[~Entity]
3380 Returns -> typing.Sequence[~ErrorResult]
3382 # map input types to rpc msg
3384 msg
= dict(type='Client',
3385 request
='RetryProvisioning',
3388 _params
['entities'] = entities
3389 reply
= await self
.rpc(msg
)
3394 @ReturnMapping(StringResult
)
3395 async def SLALevel(self
):
3398 Returns -> typing.Union[_ForwardRef('Error'), str]
3400 # map input types to rpc msg
3402 msg
= dict(type='Client',
3407 reply
= await self
.rpc(msg
)
3412 @ReturnMapping(None)
3413 async def SetModelAgentVersion(self
, version
):
3418 # map input types to rpc msg
3420 msg
= dict(type='Client',
3421 request
='SetModelAgentVersion',
3424 _params
['version'] = version
3425 reply
= await self
.rpc(msg
)
3430 @ReturnMapping(None)
3431 async def SetModelConstraints(self
, application
, constraints
):
3437 # map input types to rpc msg
3439 msg
= dict(type='Client',
3440 request
='SetModelConstraints',
3443 _params
['application'] = application
3444 _params
['constraints'] = constraints
3445 reply
= await self
.rpc(msg
)
3450 @ReturnMapping(None)
3451 async def SetSLALevel(self
, creds
, level
):
3453 creds : typing.Sequence[int]
3457 # map input types to rpc msg
3459 msg
= dict(type='Client',
3460 request
='SetSLALevel',
3463 _params
['creds'] = creds
3464 _params
['level'] = level
3465 reply
= await self
.rpc(msg
)
3470 @ReturnMapping(StatusHistoryResults
)
3471 async def StatusHistory(self
, requests
):
3473 requests : typing.Sequence[~StatusHistoryRequest]
3474 Returns -> typing.Sequence[~StatusHistoryResult]
3476 # map input types to rpc msg
3478 msg
= dict(type='Client',
3479 request
='StatusHistory',
3482 _params
['requests'] = requests
3483 reply
= await self
.rpc(msg
)
3488 @ReturnMapping(AllWatcherId
)
3489 async def WatchAll(self
):
3494 # map input types to rpc msg
3496 msg
= dict(type='Client',
3501 reply
= await self
.rpc(msg
)
3506 class CloudFacade(Type
):
3509 schema
= {'definitions': {'Cloud': {'additionalProperties': False,
3510 'properties': {'auth-types': {'items': {'type': 'string'},
3512 'endpoint': {'type': 'string'},
3513 'identity-endpoint': {'type': 'string'},
3514 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
3516 'storage-endpoint': {'type': 'string'},
3517 'type': {'type': 'string'}},
3518 'required': ['type'],
3520 'CloudCredential': {'additionalProperties': False,
3521 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
3523 'auth-type': {'type': 'string'},
3524 'redacted': {'items': {'type': 'string'},
3526 'required': ['auth-type'],
3528 'CloudCredentialResult': {'additionalProperties': False,
3529 'properties': {'error': {'$ref': '#/definitions/Error'},
3530 'result': {'$ref': '#/definitions/CloudCredential'}},
3532 'CloudCredentialResults': {'additionalProperties': False,
3533 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
3536 'CloudInstanceTypesConstraint': {'additionalProperties': False,
3537 'properties': {'cloud-tag': {'type': 'string'},
3538 'constraints': {'$ref': '#/definitions/Value'},
3539 'region': {'type': 'string'}},
3540 'required': ['cloud-tag',
3543 'CloudInstanceTypesConstraints': {'additionalProperties': False,
3544 'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'},
3546 'required': ['constraints'],
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'],
3555 'CloudResult': {'additionalProperties': False,
3556 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
3557 'error': {'$ref': '#/definitions/Error'}},
3559 'CloudResults': {'additionalProperties': False,
3560 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
3563 'CloudsResult': {'additionalProperties': False,
3564 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
3567 'Entities': {'additionalProperties': False,
3568 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3570 'required': ['entities'],
3572 'Entity': {'additionalProperties': False,
3573 'properties': {'tag': {'type': 'string'}},
3574 'required': ['tag'],
3576 'Error': {'additionalProperties': False,
3577 'properties': {'code': {'type': 'string'},
3578 'info': {'$ref': '#/definitions/ErrorInfo'},
3579 'message': {'type': 'string'}},
3580 'required': ['message', 'code'],
3582 'ErrorInfo': {'additionalProperties': False,
3583 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3584 'macaroon-path': {'type': 'string'}},
3586 'ErrorResult': {'additionalProperties': False,
3587 'properties': {'error': {'$ref': '#/definitions/Error'}},
3589 'ErrorResults': {'additionalProperties': False,
3590 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3592 'required': ['results'],
3594 'InstanceType': {'additionalProperties': False,
3595 'properties': {'arches': {'items': {'type': 'string'},
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'],
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'},
3614 'InstanceTypesResults': {'additionalProperties': False,
3615 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
3617 'required': ['results'],
3619 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3620 'StringResult': {'additionalProperties': False,
3621 'properties': {'error': {'$ref': '#/definitions/Error'},
3622 'result': {'type': 'string'}},
3623 'required': ['result'],
3625 'StringsResult': {'additionalProperties': False,
3626 'properties': {'error': {'$ref': '#/definitions/Error'},
3627 'result': {'items': {'type': 'string'},
3630 'StringsResults': {'additionalProperties': False,
3631 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
3633 'required': ['results'],
3635 'UpdateCloudCredential': {'additionalProperties': False,
3636 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
3637 'tag': {'type': 'string'}},
3638 'required': ['tag', 'credential'],
3640 'UpdateCloudCredentials': {'additionalProperties': False,
3641 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'},
3644 'UserCloud': {'additionalProperties': False,
3645 'properties': {'cloud-tag': {'type': 'string'},
3646 'user-tag': {'type': 'string'}},
3647 'required': ['user-tag', 'cloud-tag'],
3649 'UserClouds': {'additionalProperties': False,
3650 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
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'},
3663 'tags': {'items': {'type': 'string'},
3665 'virt-type': {'type': 'string'}},
3667 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3668 'Result': {'$ref': '#/definitions/CloudResults'}},
3670 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
3672 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3673 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
3675 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3677 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
3678 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
3680 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3681 'Result': {'$ref': '#/definitions/ErrorResults'}},
3683 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'},
3684 'Result': {'$ref': '#/definitions/ErrorResults'}},
3686 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
3687 'Result': {'$ref': '#/definitions/StringsResults'}},
3692 @ReturnMapping(CloudResults
)
3693 async def Cloud(self
, entities
):
3695 entities : typing.Sequence[~Entity]
3696 Returns -> typing.Sequence[~CloudResult]
3698 # map input types to rpc msg
3700 msg
= dict(type='Cloud',
3704 _params
['entities'] = entities
3705 reply
= await self
.rpc(msg
)
3710 @ReturnMapping(CloudsResult
)
3711 async def Clouds(self
):
3714 Returns -> typing.Mapping[str, ~Cloud]
3716 # map input types to rpc msg
3718 msg
= dict(type='Cloud',
3723 reply
= await self
.rpc(msg
)
3728 @ReturnMapping(CloudCredentialResults
)
3729 async def Credential(self
, entities
):
3731 entities : typing.Sequence[~Entity]
3732 Returns -> typing.Sequence[~CloudCredentialResult]
3734 # map input types to rpc msg
3736 msg
= dict(type='Cloud',
3737 request
='Credential',
3740 _params
['entities'] = entities
3741 reply
= await self
.rpc(msg
)
3746 @ReturnMapping(StringResult
)
3747 async def DefaultCloud(self
):
3750 Returns -> typing.Union[_ForwardRef('Error'), str]
3752 # map input types to rpc msg
3754 msg
= dict(type='Cloud',
3755 request
='DefaultCloud',
3759 reply
= await self
.rpc(msg
)
3764 @ReturnMapping(InstanceTypesResults
)
3765 async def InstanceTypes(self
, constraints
):
3767 constraints : typing.Sequence[~CloudInstanceTypesConstraint]
3768 Returns -> typing.Sequence[~InstanceTypesResult]
3770 # map input types to rpc msg
3772 msg
= dict(type='Cloud',
3773 request
='InstanceTypes',
3776 _params
['constraints'] = constraints
3777 reply
= await self
.rpc(msg
)
3782 @ReturnMapping(ErrorResults
)
3783 async def RevokeCredentials(self
, entities
):
3785 entities : typing.Sequence[~Entity]
3786 Returns -> typing.Sequence[~ErrorResult]
3788 # map input types to rpc msg
3790 msg
= dict(type='Cloud',
3791 request
='RevokeCredentials',
3794 _params
['entities'] = entities
3795 reply
= await self
.rpc(msg
)
3800 @ReturnMapping(ErrorResults
)
3801 async def UpdateCredentials(self
, credentials
):
3803 credentials : typing.Sequence[~UpdateCloudCredential]
3804 Returns -> typing.Sequence[~ErrorResult]
3806 # map input types to rpc msg
3808 msg
= dict(type='Cloud',
3809 request
='UpdateCredentials',
3812 _params
['credentials'] = credentials
3813 reply
= await self
.rpc(msg
)
3818 @ReturnMapping(StringsResults
)
3819 async def UserCredentials(self
, user_clouds
):
3821 user_clouds : typing.Sequence[~UserCloud]
3822 Returns -> typing.Sequence[~StringsResult]
3824 # map input types to rpc msg
3826 msg
= dict(type='Cloud',
3827 request
='UserCredentials',
3830 _params
['user-clouds'] = user_clouds
3831 reply
= await self
.rpc(msg
)
3836 class CredentialManagerFacade(Type
):
3837 name
= 'CredentialManager'
3839 schema
= {'definitions': {'Error': {'additionalProperties': False,
3840 'properties': {'code': {'type': 'string'},
3841 'info': {'$ref': '#/definitions/ErrorInfo'},
3842 'message': {'type': 'string'}},
3843 'required': ['message', 'code'],
3845 'ErrorInfo': {'additionalProperties': False,
3846 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3847 'macaroon-path': {'type': 'string'}},
3849 'ErrorResult': {'additionalProperties': False,
3850 'properties': {'error': {'$ref': '#/definitions/Error'}},
3852 'InvalidateCredentialArg': {'additionalProperties': False,
3853 'properties': {'reason': {'type': 'string'}},
3855 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
3856 'properties': {'InvalidateModelCredential': {'properties': {'Params': {'$ref': '#/definitions/InvalidateCredentialArg'},
3857 'Result': {'$ref': '#/definitions/ErrorResult'}},
3862 @ReturnMapping(ErrorResult
)
3863 async def InvalidateModelCredential(self
, reason
):
3868 # map input types to rpc msg
3870 msg
= dict(type='CredentialManager',
3871 request
='InvalidateModelCredential',
3874 _params
['reason'] = reason
3875 reply
= await self
.rpc(msg
)
3880 class CrossControllerFacade(Type
):
3881 name
= 'CrossController'
3883 schema
= {'definitions': {'ControllerAPIInfoResult': {'additionalProperties': False,
3884 'properties': {'addresses': {'items': {'type': 'string'},
3886 'cacert': {'type': 'string'},
3887 'error': {'$ref': '#/definitions/Error'}},
3888 'required': ['addresses',
3891 'ControllerAPIInfoResults': {'additionalProperties': False,
3892 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
3894 'required': ['results'],
3896 'Error': {'additionalProperties': False,
3897 'properties': {'code': {'type': 'string'},
3898 'info': {'$ref': '#/definitions/ErrorInfo'},
3899 'message': {'type': 'string'}},
3900 'required': ['message', 'code'],
3902 'ErrorInfo': {'additionalProperties': False,
3903 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3904 'macaroon-path': {'type': 'string'}},
3906 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3907 'NotifyWatchResult': {'additionalProperties': False,
3908 'properties': {'NotifyWatcherId': {'type': 'string'},
3909 'error': {'$ref': '#/definitions/Error'}},
3910 'required': ['NotifyWatcherId'],
3912 'NotifyWatchResults': {'additionalProperties': False,
3913 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3915 'required': ['results'],
3917 'properties': {'ControllerInfo': {'properties': {'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
3919 'WatchControllerInfo': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3924 @ReturnMapping(ControllerAPIInfoResults
)
3925 async def ControllerInfo(self
):
3928 Returns -> typing.Sequence[~ControllerAPIInfoResult]
3930 # map input types to rpc msg
3932 msg
= dict(type='CrossController',
3933 request
='ControllerInfo',
3937 reply
= await self
.rpc(msg
)
3942 @ReturnMapping(NotifyWatchResults
)
3943 async def WatchControllerInfo(self
):
3946 Returns -> typing.Sequence[~NotifyWatchResult]
3948 # map input types to rpc msg
3950 msg
= dict(type='CrossController',
3951 request
='WatchControllerInfo',
3955 reply
= await self
.rpc(msg
)
3960 class CrossModelRelationsFacade(Type
):
3961 name
= 'CrossModelRelations'
3963 schema
= {'definitions': {'EntityStatus': {'additionalProperties': False,
3964 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3967 'info': {'type': 'string'},
3968 'since': {'format': 'date-time',
3970 'status': {'type': 'string'}},
3971 'required': ['status', 'info', 'since'],
3973 'Error': {'additionalProperties': False,
3974 'properties': {'code': {'type': 'string'},
3975 'info': {'$ref': '#/definitions/ErrorInfo'},
3976 'message': {'type': 'string'}},
3977 'required': ['message', 'code'],
3979 'ErrorInfo': {'additionalProperties': False,
3980 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3981 'macaroon-path': {'type': 'string'}},
3983 'ErrorResult': {'additionalProperties': False,
3984 'properties': {'error': {'$ref': '#/definitions/Error'}},
3986 'ErrorResults': {'additionalProperties': False,
3987 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3989 'required': ['results'],
3991 'IngressNetworksChangeEvent': {'additionalProperties': False,
3992 'properties': {'application-token': {'type': 'string'},
3993 'ingress-required': {'type': 'boolean'},
3994 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
3996 'networks': {'items': {'type': 'string'},
3998 'relation-token': {'type': 'string'}},
3999 'required': ['relation-token',
4000 'application-token',
4001 'ingress-required'],
4003 'IngressNetworksChanges': {'additionalProperties': False,
4004 'properties': {'changes': {'items': {'$ref': '#/definitions/IngressNetworksChangeEvent'},
4007 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4008 'OfferArg': {'additionalProperties': False,
4009 'properties': {'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
4011 'offer-uuid': {'type': 'string'}},
4012 'required': ['offer-uuid'],
4014 'OfferArgs': {'additionalProperties': False,
4015 'properties': {'args': {'items': {'$ref': '#/definitions/OfferArg'},
4017 'required': ['args'],
4019 'OfferStatusChange': {'additionalProperties': False,
4020 'properties': {'offer-name': {'type': 'string'},
4021 'status': {'$ref': '#/definitions/EntityStatus'}},
4022 'required': ['offer-name', 'status'],
4024 'OfferStatusWatchResult': {'additionalProperties': False,
4025 'properties': {'changes': {'items': {'$ref': '#/definitions/OfferStatusChange'},
4027 'error': {'$ref': '#/definitions/Error'},
4028 'watcher-id': {'type': 'string'}},
4029 'required': ['watcher-id',
4032 'OfferStatusWatchResults': {'additionalProperties': False,
4033 'properties': {'results': {'items': {'$ref': '#/definitions/OfferStatusWatchResult'},
4035 'required': ['results'],
4037 'RegisterRemoteRelationArg': {'additionalProperties': False,
4038 'properties': {'application-token': {'type': 'string'},
4039 'local-endpoint-name': {'type': 'string'},
4040 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
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',
4053 'local-endpoint-name'],
4055 'RegisterRemoteRelationArgs': {'additionalProperties': False,
4056 'properties': {'relations': {'items': {'$ref': '#/definitions/RegisterRemoteRelationArg'},
4058 'required': ['relations'],
4060 'RegisterRemoteRelationResult': {'additionalProperties': False,
4061 'properties': {'error': {'$ref': '#/definitions/Error'},
4062 'result': {'$ref': '#/definitions/RemoteRelationDetails'}},
4064 'RegisterRemoteRelationResults': {'additionalProperties': False,
4065 'properties': {'results': {'items': {'$ref': '#/definitions/RegisterRemoteRelationResult'},
4068 'RelationLifeSuspendedStatusChange': {'additionalProperties': False,
4069 'properties': {'key': {'type': 'string'},
4070 'life': {'type': 'string'},
4071 'suspended': {'type': 'boolean'},
4072 'suspended-reason': {'type': 'string'}},
4076 'suspended-reason'],
4078 'RelationLifeSuspendedStatusWatchResult': {'additionalProperties': False,
4079 'properties': {'changes': {'items': {'$ref': '#/definitions/RelationLifeSuspendedStatusChange'},
4081 'error': {'$ref': '#/definitions/Error'},
4082 'watcher-id': {'type': 'string'}},
4083 'required': ['watcher-id',
4086 'RelationStatusWatchResults': {'additionalProperties': False,
4087 'properties': {'results': {'items': {'$ref': '#/definitions/RelationLifeSuspendedStatusWatchResult'},
4089 'required': ['results'],
4091 'RelationUnitsChange': {'additionalProperties': False,
4092 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
4094 'departed': {'items': {'type': 'string'},
4096 'required': ['changed'],
4098 'RelationUnitsWatchResult': {'additionalProperties': False,
4099 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
4100 'error': {'$ref': '#/definitions/Error'},
4101 'watcher-id': {'type': 'string'}},
4102 'required': ['watcher-id',
4105 'RelationUnitsWatchResults': {'additionalProperties': False,
4106 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
4108 'required': ['results'],
4110 'RemoteEndpoint': {'additionalProperties': False,
4111 'properties': {'interface': {'type': 'string'},
4112 'limit': {'type': 'integer'},
4113 'name': {'type': 'string'},
4114 'role': {'type': 'string'}},
4115 'required': ['name',
4120 'RemoteEntityArg': {'additionalProperties': False,
4121 'properties': {'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
4123 'relation-token': {'type': 'string'}},
4124 'required': ['relation-token'],
4126 'RemoteEntityArgs': {'additionalProperties': False,
4127 'properties': {'args': {'items': {'$ref': '#/definitions/RemoteEntityArg'},
4129 'required': ['args'],
4131 'RemoteRelationChangeEvent': {'additionalProperties': False,
4132 'properties': {'application-token': {'type': 'string'},
4133 'changed-units': {'items': {'$ref': '#/definitions/RemoteRelationUnitChange'},
4135 'departed-units': {'items': {'type': 'integer'},
4137 'force-cleanup': {'type': 'boolean'},
4138 'life': {'type': 'string'},
4139 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
4141 'relation-token': {'type': 'string'},
4142 'suspended': {'type': 'boolean'},
4143 'suspended-reason': {'type': 'string'}},
4144 'required': ['relation-token',
4145 'application-token',
4148 'RemoteRelationDetails': {'additionalProperties': False,
4149 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4150 'relation-token': {'type': 'string'}},
4151 'required': ['relation-token'],
4153 'RemoteRelationUnit': {'additionalProperties': False,
4154 'properties': {'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
4156 'relation-token': {'type': 'string'},
4157 'unit': {'type': 'string'}},
4158 'required': ['relation-token', 'unit'],
4160 'RemoteRelationUnitChange': {'additionalProperties': False,
4161 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
4164 'unit-id': {'type': 'integer'}},
4165 'required': ['unit-id'],
4167 'RemoteRelationUnits': {'additionalProperties': False,
4168 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RemoteRelationUnit'},
4170 'required': ['relation-units'],
4172 'RemoteRelationsChanges': {'additionalProperties': False,
4173 'properties': {'changes': {'items': {'$ref': '#/definitions/RemoteRelationChangeEvent'},
4176 'RemoteSpace': {'additionalProperties': False,
4177 'properties': {'cloud-type': {'type': 'string'},
4178 'name': {'type': 'string'},
4179 'provider-attributes': {'patternProperties': {'.*': {'additionalProperties': True,
4182 'provider-id': {'type': 'string'},
4183 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
4185 'required': ['cloud-type',
4188 'provider-attributes',
4191 'SettingsResult': {'additionalProperties': False,
4192 'properties': {'error': {'$ref': '#/definitions/Error'},
4193 'settings': {'patternProperties': {'.*': {'type': 'string'}},
4195 'required': ['settings'],
4197 'SettingsResults': {'additionalProperties': False,
4198 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
4200 'required': ['results'],
4202 'StringsWatchResult': {'additionalProperties': False,
4203 'properties': {'changes': {'items': {'type': 'string'},
4205 'error': {'$ref': '#/definitions/Error'},
4206 'watcher-id': {'type': 'string'}},
4207 'required': ['watcher-id'],
4209 'StringsWatchResults': {'additionalProperties': False,
4210 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
4212 'required': ['results'],
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'},
4225 'required': ['cidr',
4231 'UnitSettings': {'additionalProperties': False,
4232 'properties': {'version': {'type': 'integer'}},
4233 'required': ['version'],
4235 'properties': {'PublishIngressNetworkChanges': {'properties': {'Params': {'$ref': '#/definitions/IngressNetworksChanges'},
4236 'Result': {'$ref': '#/definitions/ErrorResults'}},
4238 'PublishRelationChanges': {'properties': {'Params': {'$ref': '#/definitions/RemoteRelationsChanges'},
4239 'Result': {'$ref': '#/definitions/ErrorResults'}},
4241 'RegisterRemoteRelations': {'properties': {'Params': {'$ref': '#/definitions/RegisterRemoteRelationArgs'},
4242 'Result': {'$ref': '#/definitions/RegisterRemoteRelationResults'}},
4244 'RelationUnitSettings': {'properties': {'Params': {'$ref': '#/definitions/RemoteRelationUnits'},
4245 'Result': {'$ref': '#/definitions/SettingsResults'}},
4247 'WatchEgressAddressesForRelations': {'properties': {'Params': {'$ref': '#/definitions/RemoteEntityArgs'},
4248 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4250 'WatchOfferStatus': {'properties': {'Params': {'$ref': '#/definitions/OfferArgs'},
4251 'Result': {'$ref': '#/definitions/OfferStatusWatchResults'}},
4253 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RemoteEntityArgs'},
4254 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
4256 'WatchRelationsSuspendedStatus': {'properties': {'Params': {'$ref': '#/definitions/RemoteEntityArgs'},
4257 'Result': {'$ref': '#/definitions/RelationStatusWatchResults'}},
4262 @ReturnMapping(ErrorResults
)
4263 async def PublishIngressNetworkChanges(self
, changes
):
4265 changes : typing.Sequence[~IngressNetworksChangeEvent]
4266 Returns -> typing.Sequence[~ErrorResult]
4268 # map input types to rpc msg
4270 msg
= dict(type='CrossModelRelations',
4271 request
='PublishIngressNetworkChanges',
4274 _params
['changes'] = changes
4275 reply
= await self
.rpc(msg
)
4280 @ReturnMapping(ErrorResults
)
4281 async def PublishRelationChanges(self
, changes
):
4283 changes : typing.Sequence[~RemoteRelationChangeEvent]
4284 Returns -> typing.Sequence[~ErrorResult]
4286 # map input types to rpc msg
4288 msg
= dict(type='CrossModelRelations',
4289 request
='PublishRelationChanges',
4292 _params
['changes'] = changes
4293 reply
= await self
.rpc(msg
)
4298 @ReturnMapping(RegisterRemoteRelationResults
)
4299 async def RegisterRemoteRelations(self
, relations
):
4301 relations : typing.Sequence[~RegisterRemoteRelationArg]
4302 Returns -> typing.Sequence[~RegisterRemoteRelationResult]
4304 # map input types to rpc msg
4306 msg
= dict(type='CrossModelRelations',
4307 request
='RegisterRemoteRelations',
4310 _params
['relations'] = relations
4311 reply
= await self
.rpc(msg
)
4316 @ReturnMapping(SettingsResults
)
4317 async def RelationUnitSettings(self
, relation_units
):
4319 relation_units : typing.Sequence[~RemoteRelationUnit]
4320 Returns -> typing.Sequence[~SettingsResult]
4322 # map input types to rpc msg
4324 msg
= dict(type='CrossModelRelations',
4325 request
='RelationUnitSettings',
4328 _params
['relation-units'] = relation_units
4329 reply
= await self
.rpc(msg
)
4334 @ReturnMapping(StringsWatchResults
)
4335 async def WatchEgressAddressesForRelations(self
, args
):
4337 args : typing.Sequence[~RemoteEntityArg]
4338 Returns -> typing.Sequence[~StringsWatchResult]
4340 # map input types to rpc msg
4342 msg
= dict(type='CrossModelRelations',
4343 request
='WatchEgressAddressesForRelations',
4346 _params
['args'] = args
4347 reply
= await self
.rpc(msg
)
4352 @ReturnMapping(OfferStatusWatchResults
)
4353 async def WatchOfferStatus(self
, args
):
4355 args : typing.Sequence[~OfferArg]
4356 Returns -> typing.Sequence[~OfferStatusWatchResult]
4358 # map input types to rpc msg
4360 msg
= dict(type='CrossModelRelations',
4361 request
='WatchOfferStatus',
4364 _params
['args'] = args
4365 reply
= await self
.rpc(msg
)
4370 @ReturnMapping(RelationUnitsWatchResults
)
4371 async def WatchRelationUnits(self
, args
):
4373 args : typing.Sequence[~RemoteEntityArg]
4374 Returns -> typing.Sequence[~RelationUnitsWatchResult]
4376 # map input types to rpc msg
4378 msg
= dict(type='CrossModelRelations',
4379 request
='WatchRelationUnits',
4382 _params
['args'] = args
4383 reply
= await self
.rpc(msg
)
4388 @ReturnMapping(RelationStatusWatchResults
)
4389 async def WatchRelationsSuspendedStatus(self
, args
):
4391 args : typing.Sequence[~RemoteEntityArg]
4392 Returns -> typing.Sequence[~RelationLifeSuspendedStatusWatchResult]
4394 # map input types to rpc msg
4396 msg
= dict(type='CrossModelRelations',
4397 request
='WatchRelationsSuspendedStatus',
4400 _params
['args'] = args
4401 reply
= await self
.rpc(msg
)
4406 class DeployerFacade(Type
):
4409 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
4410 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
4413 'required': ['servers'],
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'],
4422 'DeployerConnectionValues': {'additionalProperties': False,
4423 'properties': {'api-addresses': {'items': {'type': 'string'},
4425 'required': ['api-addresses'],
4427 'Entities': {'additionalProperties': False,
4428 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
4430 'required': ['entities'],
4432 'Entity': {'additionalProperties': False,
4433 'properties': {'tag': {'type': 'string'}},
4434 'required': ['tag'],
4436 'EntityPassword': {'additionalProperties': False,
4437 'properties': {'password': {'type': 'string'},
4438 'tag': {'type': 'string'}},
4439 'required': ['tag', 'password'],
4441 'EntityPasswords': {'additionalProperties': False,
4442 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
4444 'required': ['changes'],
4446 'EntityStatusArgs': {'additionalProperties': False,
4447 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
4450 'info': {'type': 'string'},
4451 'status': {'type': 'string'},
4452 'tag': {'type': 'string'}},
4458 'Error': {'additionalProperties': False,
4459 'properties': {'code': {'type': 'string'},
4460 'info': {'$ref': '#/definitions/ErrorInfo'},
4461 'message': {'type': 'string'}},
4462 'required': ['message', 'code'],
4464 'ErrorInfo': {'additionalProperties': False,
4465 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4466 'macaroon-path': {'type': 'string'}},
4468 'ErrorResult': {'additionalProperties': False,
4469 'properties': {'error': {'$ref': '#/definitions/Error'}},
4471 'ErrorResults': {'additionalProperties': False,
4472 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4474 'required': ['results'],
4476 'HostPort': {'additionalProperties': False,
4477 'properties': {'Address': {'$ref': '#/definitions/Address'},
4478 'port': {'type': 'integer'}},
4479 'required': ['Address', 'port'],
4481 'LifeResult': {'additionalProperties': False,
4482 'properties': {'error': {'$ref': '#/definitions/Error'},
4483 'life': {'type': 'string'}},
4484 'required': ['life'],
4486 'LifeResults': {'additionalProperties': False,
4487 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
4489 'required': ['results'],
4491 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4492 'NotifyWatchResult': {'additionalProperties': False,
4493 'properties': {'NotifyWatcherId': {'type': 'string'},
4494 'error': {'$ref': '#/definitions/Error'}},
4495 'required': ['NotifyWatcherId'],
4497 'SetStatus': {'additionalProperties': False,
4498 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
4500 'required': ['entities'],
4502 'StringResult': {'additionalProperties': False,
4503 'properties': {'error': {'$ref': '#/definitions/Error'},
4504 'result': {'type': 'string'}},
4505 'required': ['result'],
4507 'StringsResult': {'additionalProperties': False,
4508 'properties': {'error': {'$ref': '#/definitions/Error'},
4509 'result': {'items': {'type': 'string'},
4512 'StringsWatchResult': {'additionalProperties': False,
4513 'properties': {'changes': {'items': {'type': 'string'},
4515 'error': {'$ref': '#/definitions/Error'},
4516 'watcher-id': {'type': 'string'}},
4517 'required': ['watcher-id'],
4519 'StringsWatchResults': {'additionalProperties': False,
4520 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
4522 'required': ['results'],
4524 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
4526 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
4528 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
4530 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4531 'Result': {'$ref': '#/definitions/LifeResults'}},
4533 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
4535 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4536 'Result': {'$ref': '#/definitions/ErrorResults'}},
4538 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
4539 'Result': {'$ref': '#/definitions/ErrorResults'}},
4541 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4542 'Result': {'$ref': '#/definitions/ErrorResults'}},
4544 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4545 'Result': {'$ref': '#/definitions/ErrorResults'}},
4547 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4549 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4550 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4555 @ReturnMapping(StringsResult
)
4556 async def APIAddresses(self
):
4559 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
4561 # map input types to rpc msg
4563 msg
= dict(type='Deployer',
4564 request
='APIAddresses',
4568 reply
= await self
.rpc(msg
)
4573 @ReturnMapping(APIHostPortsResult
)
4574 async def APIHostPorts(self
):
4577 Returns -> typing.Sequence[~HostPort]
4579 # map input types to rpc msg
4581 msg
= dict(type='Deployer',
4582 request
='APIHostPorts',
4586 reply
= await self
.rpc(msg
)
4591 @ReturnMapping(DeployerConnectionValues
)
4592 async def ConnectionInfo(self
):
4595 Returns -> typing.Sequence[str]
4597 # map input types to rpc msg
4599 msg
= dict(type='Deployer',
4600 request
='ConnectionInfo',
4604 reply
= await self
.rpc(msg
)
4609 @ReturnMapping(LifeResults
)
4610 async def Life(self
, entities
):
4612 entities : typing.Sequence[~Entity]
4613 Returns -> typing.Sequence[~LifeResult]
4615 # map input types to rpc msg
4617 msg
= dict(type='Deployer',
4621 _params
['entities'] = entities
4622 reply
= await self
.rpc(msg
)
4627 @ReturnMapping(StringResult
)
4628 async def ModelUUID(self
):
4631 Returns -> typing.Union[_ForwardRef('Error'), str]
4633 # map input types to rpc msg
4635 msg
= dict(type='Deployer',
4636 request
='ModelUUID',
4640 reply
= await self
.rpc(msg
)
4645 @ReturnMapping(ErrorResults
)
4646 async def Remove(self
, entities
):
4648 entities : typing.Sequence[~Entity]
4649 Returns -> typing.Sequence[~ErrorResult]
4651 # map input types to rpc msg
4653 msg
= dict(type='Deployer',
4657 _params
['entities'] = entities
4658 reply
= await self
.rpc(msg
)
4663 @ReturnMapping(ErrorResults
)
4664 async def SetPasswords(self
, changes
):
4666 changes : typing.Sequence[~EntityPassword]
4667 Returns -> typing.Sequence[~ErrorResult]
4669 # map input types to rpc msg
4671 msg
= dict(type='Deployer',
4672 request
='SetPasswords',
4675 _params
['changes'] = changes
4676 reply
= await self
.rpc(msg
)
4681 @ReturnMapping(ErrorResults
)
4682 async def SetStatus(self
, entities
):
4684 entities : typing.Sequence[~EntityStatusArgs]
4685 Returns -> typing.Sequence[~ErrorResult]
4687 # map input types to rpc msg
4689 msg
= dict(type='Deployer',
4690 request
='SetStatus',
4693 _params
['entities'] = entities
4694 reply
= await self
.rpc(msg
)
4699 @ReturnMapping(ErrorResults
)
4700 async def UpdateStatus(self
, entities
):
4702 entities : typing.Sequence[~EntityStatusArgs]
4703 Returns -> typing.Sequence[~ErrorResult]
4705 # map input types to rpc msg
4707 msg
= dict(type='Deployer',
4708 request
='UpdateStatus',
4711 _params
['entities'] = entities
4712 reply
= await self
.rpc(msg
)
4717 @ReturnMapping(NotifyWatchResult
)
4718 async def WatchAPIHostPorts(self
):
4721 Returns -> typing.Union[str, _ForwardRef('Error')]
4723 # map input types to rpc msg
4725 msg
= dict(type='Deployer',
4726 request
='WatchAPIHostPorts',
4730 reply
= await self
.rpc(msg
)
4735 @ReturnMapping(StringsWatchResults
)
4736 async def WatchUnits(self
, entities
):
4738 entities : typing.Sequence[~Entity]
4739 Returns -> typing.Sequence[~StringsWatchResult]
4741 # map input types to rpc msg
4743 msg
= dict(type='Deployer',
4744 request
='WatchUnits',
4747 _params
['entities'] = entities
4748 reply
= await self
.rpc(msg
)
4753 class ExternalControllerUpdaterFacade(Type
):
4754 name
= 'ExternalControllerUpdater'
4756 schema
= {'definitions': {'Entities': {'additionalProperties': False,
4757 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
4759 'required': ['entities'],
4761 'Entity': {'additionalProperties': False,
4762 'properties': {'tag': {'type': 'string'}},
4763 'required': ['tag'],
4765 'Error': {'additionalProperties': False,
4766 'properties': {'code': {'type': 'string'},
4767 'info': {'$ref': '#/definitions/ErrorInfo'},
4768 'message': {'type': 'string'}},
4769 'required': ['message', 'code'],
4771 'ErrorInfo': {'additionalProperties': False,
4772 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4773 'macaroon-path': {'type': 'string'}},
4775 'ErrorResult': {'additionalProperties': False,
4776 'properties': {'error': {'$ref': '#/definitions/Error'}},
4778 'ErrorResults': {'additionalProperties': False,
4779 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4781 'required': ['results'],
4783 'ExternalControllerInfo': {'additionalProperties': False,
4784 'properties': {'addrs': {'items': {'type': 'string'},
4786 'ca-cert': {'type': 'string'},
4787 'controller-alias': {'type': 'string'},
4788 'controller-tag': {'type': 'string'}},
4789 'required': ['controller-tag',
4794 'ExternalControllerInfoResult': {'additionalProperties': False,
4795 'properties': {'error': {'$ref': '#/definitions/Error'},
4796 'result': {'$ref': '#/definitions/ExternalControllerInfo'}},
4797 'required': ['result',
4800 'ExternalControllerInfoResults': {'additionalProperties': False,
4801 'properties': {'results': {'items': {'$ref': '#/definitions/ExternalControllerInfoResult'},
4803 'required': ['results'],
4805 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4806 'SetExternalControllerInfoParams': {'additionalProperties': False,
4807 'properties': {'info': {'$ref': '#/definitions/ExternalControllerInfo'}},
4808 'required': ['info'],
4810 'SetExternalControllersInfoParams': {'additionalProperties': False,
4811 'properties': {'controllers': {'items': {'$ref': '#/definitions/SetExternalControllerInfoParams'},
4813 'required': ['controllers'],
4815 'StringsWatchResult': {'additionalProperties': False,
4816 'properties': {'changes': {'items': {'type': 'string'},
4818 'error': {'$ref': '#/definitions/Error'},
4819 'watcher-id': {'type': 'string'}},
4820 'required': ['watcher-id'],
4822 'StringsWatchResults': {'additionalProperties': False,
4823 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
4825 'required': ['results'],
4827 'properties': {'ExternalControllerInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4828 'Result': {'$ref': '#/definitions/ExternalControllerInfoResults'}},
4830 'SetExternalControllerInfo': {'properties': {'Params': {'$ref': '#/definitions/SetExternalControllersInfoParams'},
4831 'Result': {'$ref': '#/definitions/ErrorResults'}},
4833 'WatchExternalControllers': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4838 @ReturnMapping(ExternalControllerInfoResults
)
4839 async def ExternalControllerInfo(self
, entities
):
4841 entities : typing.Sequence[~Entity]
4842 Returns -> typing.Sequence[~ExternalControllerInfoResult]
4844 # map input types to rpc msg
4846 msg
= dict(type='ExternalControllerUpdater',
4847 request
='ExternalControllerInfo',
4850 _params
['entities'] = entities
4851 reply
= await self
.rpc(msg
)
4856 @ReturnMapping(ErrorResults
)
4857 async def SetExternalControllerInfo(self
, controllers
):
4859 controllers : typing.Sequence[~SetExternalControllerInfoParams]
4860 Returns -> typing.Sequence[~ErrorResult]
4862 # map input types to rpc msg
4864 msg
= dict(type='ExternalControllerUpdater',
4865 request
='SetExternalControllerInfo',
4868 _params
['controllers'] = controllers
4869 reply
= await self
.rpc(msg
)
4874 @ReturnMapping(StringsWatchResults
)
4875 async def WatchExternalControllers(self
):
4878 Returns -> typing.Sequence[~StringsWatchResult]
4880 # map input types to rpc msg
4882 msg
= dict(type='ExternalControllerUpdater',
4883 request
='WatchExternalControllers',
4887 reply
= await self
.rpc(msg
)
4892 class FanConfigurerFacade(Type
):
4893 name
= 'FanConfigurer'
4895 schema
= {'definitions': {'Error': {'additionalProperties': False,
4896 'properties': {'code': {'type': 'string'},
4897 'info': {'$ref': '#/definitions/ErrorInfo'},
4898 'message': {'type': 'string'}},
4899 'required': ['message', 'code'],
4901 'ErrorInfo': {'additionalProperties': False,
4902 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4903 'macaroon-path': {'type': 'string'}},
4905 'FanConfigEntry': {'additionalProperties': False,
4906 'properties': {'overlay': {'type': 'string'},
4907 'underlay': {'type': 'string'}},
4908 'required': ['underlay', 'overlay'],
4910 'FanConfigResult': {'additionalProperties': False,
4911 'properties': {'fans': {'items': {'$ref': '#/definitions/FanConfigEntry'},
4913 'required': ['fans'],
4915 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4916 'NotifyWatchResult': {'additionalProperties': False,
4917 'properties': {'NotifyWatcherId': {'type': 'string'},
4918 'error': {'$ref': '#/definitions/Error'}},
4919 'required': ['NotifyWatcherId'],
4921 'properties': {'FanConfig': {'properties': {'Result': {'$ref': '#/definitions/FanConfigResult'}},
4923 'WatchForFanConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4928 @ReturnMapping(FanConfigResult
)
4929 async def FanConfig(self
):
4932 Returns -> typing.Sequence[~FanConfigEntry]
4934 # map input types to rpc msg
4936 msg
= dict(type='FanConfigurer',
4937 request
='FanConfig',
4941 reply
= await self
.rpc(msg
)
4946 @ReturnMapping(NotifyWatchResult
)
4947 async def WatchForFanConfigChanges(self
):
4950 Returns -> typing.Union[str, _ForwardRef('Error')]
4952 # map input types to rpc msg
4954 msg
= dict(type='FanConfigurer',
4955 request
='WatchForFanConfigChanges',
4959 reply
= await self
.rpc(msg
)
4964 class FirewallRulesFacade(Type
):
4965 name
= 'FirewallRules'
4967 schema
= {'definitions': {'Error': {'additionalProperties': False,
4968 'properties': {'code': {'type': 'string'},
4969 'info': {'$ref': '#/definitions/ErrorInfo'},
4970 'message': {'type': 'string'}},
4971 'required': ['message', 'code'],
4973 'ErrorInfo': {'additionalProperties': False,
4974 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4975 'macaroon-path': {'type': 'string'}},
4977 'ErrorResult': {'additionalProperties': False,
4978 'properties': {'error': {'$ref': '#/definitions/Error'}},
4980 'ErrorResults': {'additionalProperties': False,
4981 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4983 'required': ['results'],
4985 'FirewallRule': {'additionalProperties': False,
4986 'properties': {'known-service': {'type': 'string'},
4987 'whitelist-cidrs': {'items': {'type': 'string'},
4989 'required': ['known-service'],
4991 'FirewallRuleArgs': {'additionalProperties': False,
4992 'properties': {'args': {'items': {'$ref': '#/definitions/FirewallRule'},
4994 'required': ['args'],
4996 'ListFirewallRulesResults': {'additionalProperties': False,
4997 'properties': {'Rules': {'items': {'$ref': '#/definitions/FirewallRule'},
4999 'required': ['Rules'],
5001 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
5002 'properties': {'ListFirewallRules': {'properties': {'Result': {'$ref': '#/definitions/ListFirewallRulesResults'}},
5004 'SetFirewallRules': {'properties': {'Params': {'$ref': '#/definitions/FirewallRuleArgs'},
5005 'Result': {'$ref': '#/definitions/ErrorResults'}},
5010 @ReturnMapping(ListFirewallRulesResults
)
5011 async def ListFirewallRules(self
):
5014 Returns -> typing.Sequence[~FirewallRule]
5016 # map input types to rpc msg
5018 msg
= dict(type='FirewallRules',
5019 request
='ListFirewallRules',
5023 reply
= await self
.rpc(msg
)
5028 @ReturnMapping(ErrorResults
)
5029 async def SetFirewallRules(self
, args
):
5031 args : typing.Sequence[~FirewallRule]
5032 Returns -> typing.Sequence[~ErrorResult]
5034 # map input types to rpc msg
5036 msg
= dict(type='FirewallRules',
5037 request
='SetFirewallRules',
5040 _params
['args'] = args
5041 reply
= await self
.rpc(msg
)
5046 class HostKeyReporterFacade(Type
):
5047 name
= 'HostKeyReporter'
5049 schema
= {'definitions': {'Error': {'additionalProperties': False,
5050 'properties': {'code': {'type': 'string'},
5051 'info': {'$ref': '#/definitions/ErrorInfo'},
5052 'message': {'type': 'string'}},
5053 'required': ['message', 'code'],
5055 'ErrorInfo': {'additionalProperties': False,
5056 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5057 'macaroon-path': {'type': 'string'}},
5059 'ErrorResult': {'additionalProperties': False,
5060 'properties': {'error': {'$ref': '#/definitions/Error'}},
5062 'ErrorResults': {'additionalProperties': False,
5063 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5065 'required': ['results'],
5067 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5068 'SSHHostKeySet': {'additionalProperties': False,
5069 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
5071 'required': ['entity-keys'],
5073 'SSHHostKeys': {'additionalProperties': False,
5074 'properties': {'public-keys': {'items': {'type': 'string'},
5076 'tag': {'type': 'string'}},
5077 'required': ['tag', 'public-keys'],
5079 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
5080 'Result': {'$ref': '#/definitions/ErrorResults'}},
5085 @ReturnMapping(ErrorResults
)
5086 async def ReportKeys(self
, entity_keys
):
5088 entity_keys : typing.Sequence[~SSHHostKeys]
5089 Returns -> typing.Sequence[~ErrorResult]
5091 # map input types to rpc msg
5093 msg
= dict(type='HostKeyReporter',
5094 request
='ReportKeys',
5097 _params
['entity-keys'] = entity_keys
5098 reply
= await self
.rpc(msg
)
5103 class KeyManagerFacade(Type
):
5106 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5107 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5109 'required': ['entities'],
5111 'Entity': {'additionalProperties': False,
5112 'properties': {'tag': {'type': 'string'}},
5113 'required': ['tag'],
5115 'Error': {'additionalProperties': False,
5116 'properties': {'code': {'type': 'string'},
5117 'info': {'$ref': '#/definitions/ErrorInfo'},
5118 'message': {'type': 'string'}},
5119 'required': ['message', 'code'],
5121 'ErrorInfo': {'additionalProperties': False,
5122 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5123 'macaroon-path': {'type': 'string'}},
5125 'ErrorResult': {'additionalProperties': False,
5126 'properties': {'error': {'$ref': '#/definitions/Error'}},
5128 'ErrorResults': {'additionalProperties': False,
5129 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5131 'required': ['results'],
5133 'ListSSHKeys': {'additionalProperties': False,
5134 'properties': {'entities': {'$ref': '#/definitions/Entities'},
5135 'mode': {'type': 'boolean'}},
5136 'required': ['entities', 'mode'],
5138 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5139 'ModifyUserSSHKeys': {'additionalProperties': False,
5140 'properties': {'ssh-keys': {'items': {'type': 'string'},
5142 'user': {'type': 'string'}},
5143 'required': ['user', 'ssh-keys'],
5145 'StringsResult': {'additionalProperties': False,
5146 'properties': {'error': {'$ref': '#/definitions/Error'},
5147 'result': {'items': {'type': 'string'},
5150 'StringsResults': {'additionalProperties': False,
5151 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
5153 'required': ['results'],
5155 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
5156 'Result': {'$ref': '#/definitions/ErrorResults'}},
5158 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
5159 'Result': {'$ref': '#/definitions/ErrorResults'}},
5161 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
5162 'Result': {'$ref': '#/definitions/ErrorResults'}},
5164 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
5165 'Result': {'$ref': '#/definitions/StringsResults'}},
5170 @ReturnMapping(ErrorResults
)
5171 async def AddKeys(self
, ssh_keys
, user
):
5173 ssh_keys : typing.Sequence[str]
5175 Returns -> typing.Sequence[~ErrorResult]
5177 # map input types to rpc msg
5179 msg
= dict(type='KeyManager',
5183 _params
['ssh-keys'] = ssh_keys
5184 _params
['user'] = user
5185 reply
= await self
.rpc(msg
)
5190 @ReturnMapping(ErrorResults
)
5191 async def DeleteKeys(self
, ssh_keys
, user
):
5193 ssh_keys : typing.Sequence[str]
5195 Returns -> typing.Sequence[~ErrorResult]
5197 # map input types to rpc msg
5199 msg
= dict(type='KeyManager',
5200 request
='DeleteKeys',
5203 _params
['ssh-keys'] = ssh_keys
5204 _params
['user'] = user
5205 reply
= await self
.rpc(msg
)
5210 @ReturnMapping(ErrorResults
)
5211 async def ImportKeys(self
, ssh_keys
, user
):
5213 ssh_keys : typing.Sequence[str]
5215 Returns -> typing.Sequence[~ErrorResult]
5217 # map input types to rpc msg
5219 msg
= dict(type='KeyManager',
5220 request
='ImportKeys',
5223 _params
['ssh-keys'] = ssh_keys
5224 _params
['user'] = user
5225 reply
= await self
.rpc(msg
)
5230 @ReturnMapping(StringsResults
)
5231 async def ListKeys(self
, entities
, mode
):
5235 Returns -> typing.Sequence[~StringsResult]
5237 # map input types to rpc msg
5239 msg
= dict(type='KeyManager',
5243 _params
['entities'] = entities
5244 _params
['mode'] = mode
5245 reply
= await self
.rpc(msg
)
5250 class KeyUpdaterFacade(Type
):
5253 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5254 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5256 'required': ['entities'],
5258 'Entity': {'additionalProperties': False,
5259 'properties': {'tag': {'type': 'string'}},
5260 'required': ['tag'],
5262 'Error': {'additionalProperties': False,
5263 'properties': {'code': {'type': 'string'},
5264 'info': {'$ref': '#/definitions/ErrorInfo'},
5265 'message': {'type': 'string'}},
5266 'required': ['message', 'code'],
5268 'ErrorInfo': {'additionalProperties': False,
5269 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5270 'macaroon-path': {'type': 'string'}},
5272 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5273 'NotifyWatchResult': {'additionalProperties': False,
5274 'properties': {'NotifyWatcherId': {'type': 'string'},
5275 'error': {'$ref': '#/definitions/Error'}},
5276 'required': ['NotifyWatcherId'],
5278 'NotifyWatchResults': {'additionalProperties': False,
5279 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5281 'required': ['results'],
5283 'StringsResult': {'additionalProperties': False,
5284 'properties': {'error': {'$ref': '#/definitions/Error'},
5285 'result': {'items': {'type': 'string'},
5288 'StringsResults': {'additionalProperties': False,
5289 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
5291 'required': ['results'],
5293 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5294 'Result': {'$ref': '#/definitions/StringsResults'}},
5296 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5297 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5302 @ReturnMapping(StringsResults
)
5303 async def AuthorisedKeys(self
, entities
):
5305 entities : typing.Sequence[~Entity]
5306 Returns -> typing.Sequence[~StringsResult]
5308 # map input types to rpc msg
5310 msg
= dict(type='KeyUpdater',
5311 request
='AuthorisedKeys',
5314 _params
['entities'] = entities
5315 reply
= await self
.rpc(msg
)
5320 @ReturnMapping(NotifyWatchResults
)
5321 async def WatchAuthorisedKeys(self
, entities
):
5323 entities : typing.Sequence[~Entity]
5324 Returns -> typing.Sequence[~NotifyWatchResult]
5326 # map input types to rpc msg
5328 msg
= dict(type='KeyUpdater',
5329 request
='WatchAuthorisedKeys',
5332 _params
['entities'] = entities
5333 reply
= await self
.rpc(msg
)
5338 class LifeFlagFacade(Type
):
5341 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5342 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5344 'required': ['entities'],
5346 'Entity': {'additionalProperties': False,
5347 'properties': {'tag': {'type': 'string'}},
5348 'required': ['tag'],
5350 'Error': {'additionalProperties': False,
5351 'properties': {'code': {'type': 'string'},
5352 'info': {'$ref': '#/definitions/ErrorInfo'},
5353 'message': {'type': 'string'}},
5354 'required': ['message', 'code'],
5356 'ErrorInfo': {'additionalProperties': False,
5357 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5358 'macaroon-path': {'type': 'string'}},
5360 'LifeResult': {'additionalProperties': False,
5361 'properties': {'error': {'$ref': '#/definitions/Error'},
5362 'life': {'type': 'string'}},
5363 'required': ['life'],
5365 'LifeResults': {'additionalProperties': False,
5366 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
5368 'required': ['results'],
5370 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5371 'NotifyWatchResult': {'additionalProperties': False,
5372 'properties': {'NotifyWatcherId': {'type': 'string'},
5373 'error': {'$ref': '#/definitions/Error'}},
5374 'required': ['NotifyWatcherId'],
5376 'NotifyWatchResults': {'additionalProperties': False,
5377 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5379 'required': ['results'],
5381 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5382 'Result': {'$ref': '#/definitions/LifeResults'}},
5384 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5385 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5390 @ReturnMapping(LifeResults
)
5391 async def Life(self
, entities
):
5393 entities : typing.Sequence[~Entity]
5394 Returns -> typing.Sequence[~LifeResult]
5396 # map input types to rpc msg
5398 msg
= dict(type='LifeFlag',
5402 _params
['entities'] = entities
5403 reply
= await self
.rpc(msg
)
5408 @ReturnMapping(NotifyWatchResults
)
5409 async def Watch(self
, entities
):
5411 entities : typing.Sequence[~Entity]
5412 Returns -> typing.Sequence[~NotifyWatchResult]
5414 # map input types to rpc msg
5416 msg
= dict(type='LifeFlag',
5420 _params
['entities'] = entities
5421 reply
= await self
.rpc(msg
)
5426 class LogForwardingFacade(Type
):
5427 name
= 'LogForwarding'
5429 schema
= {'definitions': {'Error': {'additionalProperties': False,
5430 'properties': {'code': {'type': 'string'},
5431 'info': {'$ref': '#/definitions/ErrorInfo'},
5432 'message': {'type': 'string'}},
5433 'required': ['message', 'code'],
5435 'ErrorInfo': {'additionalProperties': False,
5436 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5437 'macaroon-path': {'type': 'string'}},
5439 'ErrorResult': {'additionalProperties': False,
5440 'properties': {'error': {'$ref': '#/definitions/Error'}},
5442 'ErrorResults': {'additionalProperties': False,
5443 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5445 'required': ['results'],
5447 'LogForwardingGetLastSentParams': {'additionalProperties': False,
5448 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
5450 'required': ['ids'],
5452 'LogForwardingGetLastSentResult': {'additionalProperties': False,
5453 'properties': {'err': {'$ref': '#/definitions/Error'},
5454 'record-id': {'type': 'integer'},
5455 'record-timestamp': {'type': 'integer'}},
5456 'required': ['record-id',
5460 'LogForwardingGetLastSentResults': {'additionalProperties': False,
5461 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
5463 'required': ['results'],
5465 'LogForwardingID': {'additionalProperties': False,
5466 'properties': {'model': {'type': 'string'},
5467 'sink': {'type': 'string'}},
5468 'required': ['model', 'sink'],
5470 'LogForwardingSetLastSentParam': {'additionalProperties': False,
5471 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
5472 'record-id': {'type': 'integer'},
5473 'record-timestamp': {'type': 'integer'}},
5474 'required': ['LogForwardingID',
5476 'record-timestamp'],
5478 'LogForwardingSetLastSentParams': {'additionalProperties': False,
5479 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
5481 'required': ['params'],
5483 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
5484 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
5485 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
5487 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
5488 'Result': {'$ref': '#/definitions/ErrorResults'}},
5493 @ReturnMapping(LogForwardingGetLastSentResults
)
5494 async def GetLastSent(self
, ids
):
5496 ids : typing.Sequence[~LogForwardingID]
5497 Returns -> typing.Sequence[~LogForwardingGetLastSentResult]
5499 # map input types to rpc msg
5501 msg
= dict(type='LogForwarding',
5502 request
='GetLastSent',
5505 _params
['ids'] = ids
5506 reply
= await self
.rpc(msg
)
5511 @ReturnMapping(ErrorResults
)
5512 async def SetLastSent(self
, params
):
5514 params : typing.Sequence[~LogForwardingSetLastSentParam]
5515 Returns -> typing.Sequence[~ErrorResult]
5517 # map input types to rpc msg
5519 msg
= dict(type='LogForwarding',
5520 request
='SetLastSent',
5523 _params
['params'] = params
5524 reply
= await self
.rpc(msg
)
5529 class LoggerFacade(Type
):
5532 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5533 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5535 'required': ['entities'],
5537 'Entity': {'additionalProperties': False,
5538 'properties': {'tag': {'type': 'string'}},
5539 'required': ['tag'],
5541 'Error': {'additionalProperties': False,
5542 'properties': {'code': {'type': 'string'},
5543 'info': {'$ref': '#/definitions/ErrorInfo'},
5544 'message': {'type': 'string'}},
5545 'required': ['message', 'code'],
5547 'ErrorInfo': {'additionalProperties': False,
5548 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5549 'macaroon-path': {'type': 'string'}},
5551 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5552 'NotifyWatchResult': {'additionalProperties': False,
5553 'properties': {'NotifyWatcherId': {'type': 'string'},
5554 'error': {'$ref': '#/definitions/Error'}},
5555 'required': ['NotifyWatcherId'],
5557 'NotifyWatchResults': {'additionalProperties': False,
5558 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5560 'required': ['results'],
5562 'StringResult': {'additionalProperties': False,
5563 'properties': {'error': {'$ref': '#/definitions/Error'},
5564 'result': {'type': 'string'}},
5565 'required': ['result'],
5567 'StringResults': {'additionalProperties': False,
5568 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
5570 'required': ['results'],
5572 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5573 'Result': {'$ref': '#/definitions/StringResults'}},
5575 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5576 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5581 @ReturnMapping(StringResults
)
5582 async def LoggingConfig(self
, entities
):
5584 entities : typing.Sequence[~Entity]
5585 Returns -> typing.Sequence[~StringResult]
5587 # map input types to rpc msg
5589 msg
= dict(type='Logger',
5590 request
='LoggingConfig',
5593 _params
['entities'] = entities
5594 reply
= await self
.rpc(msg
)
5599 @ReturnMapping(NotifyWatchResults
)
5600 async def WatchLoggingConfig(self
, entities
):
5602 entities : typing.Sequence[~Entity]
5603 Returns -> typing.Sequence[~NotifyWatchResult]
5605 # map input types to rpc msg
5607 msg
= dict(type='Logger',
5608 request
='WatchLoggingConfig',
5611 _params
['entities'] = entities
5612 reply
= await self
.rpc(msg
)
5617 class MachineActionsFacade(Type
):
5618 name
= 'MachineActions'
5620 schema
= {'definitions': {'Action': {'additionalProperties': False,
5621 'properties': {'name': {'type': 'string'},
5622 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
5625 'receiver': {'type': 'string'},
5626 'tag': {'type': 'string'}},
5627 'required': ['tag', 'receiver', 'name'],
5629 'ActionExecutionResult': {'additionalProperties': False,
5630 'properties': {'action-tag': {'type': 'string'},
5631 'message': {'type': 'string'},
5632 'results': {'patternProperties': {'.*': {'additionalProperties': True,
5635 'status': {'type': 'string'}},
5636 'required': ['action-tag', 'status'],
5638 'ActionExecutionResults': {'additionalProperties': False,
5639 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
5642 'ActionResult': {'additionalProperties': False,
5643 'properties': {'action': {'$ref': '#/definitions/Action'},
5644 'completed': {'format': 'date-time',
5646 'enqueued': {'format': 'date-time',
5648 'error': {'$ref': '#/definitions/Error'},
5649 'message': {'type': 'string'},
5650 'output': {'patternProperties': {'.*': {'additionalProperties': True,
5653 'started': {'format': 'date-time',
5655 'status': {'type': 'string'}},
5657 'ActionResults': {'additionalProperties': False,
5658 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
5661 'ActionsByReceiver': {'additionalProperties': False,
5662 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5664 'error': {'$ref': '#/definitions/Error'},
5665 'receiver': {'type': 'string'}},
5667 'ActionsByReceivers': {'additionalProperties': False,
5668 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
5671 'Entities': {'additionalProperties': False,
5672 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5674 'required': ['entities'],
5676 'Entity': {'additionalProperties': False,
5677 'properties': {'tag': {'type': 'string'}},
5678 'required': ['tag'],
5680 'Error': {'additionalProperties': False,
5681 'properties': {'code': {'type': 'string'},
5682 'info': {'$ref': '#/definitions/ErrorInfo'},
5683 'message': {'type': 'string'}},
5684 'required': ['message', 'code'],
5686 'ErrorInfo': {'additionalProperties': False,
5687 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5688 'macaroon-path': {'type': 'string'}},
5690 'ErrorResult': {'additionalProperties': False,
5691 'properties': {'error': {'$ref': '#/definitions/Error'}},
5693 'ErrorResults': {'additionalProperties': False,
5694 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5696 'required': ['results'],
5698 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5699 'StringsWatchResult': {'additionalProperties': False,
5700 'properties': {'changes': {'items': {'type': 'string'},
5702 'error': {'$ref': '#/definitions/Error'},
5703 'watcher-id': {'type': 'string'}},
5704 'required': ['watcher-id'],
5706 'StringsWatchResults': {'additionalProperties': False,
5707 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
5709 'required': ['results'],
5711 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5712 'Result': {'$ref': '#/definitions/ActionResults'}},
5714 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5715 'Result': {'$ref': '#/definitions/ErrorResults'}},
5717 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
5718 'Result': {'$ref': '#/definitions/ErrorResults'}},
5720 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5721 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5723 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5724 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
5729 @ReturnMapping(ActionResults
)
5730 async def Actions(self
, entities
):
5732 entities : typing.Sequence[~Entity]
5733 Returns -> typing.Sequence[~ActionResult]
5735 # map input types to rpc msg
5737 msg
= dict(type='MachineActions',
5741 _params
['entities'] = entities
5742 reply
= await self
.rpc(msg
)
5747 @ReturnMapping(ErrorResults
)
5748 async def BeginActions(self
, entities
):
5750 entities : typing.Sequence[~Entity]
5751 Returns -> typing.Sequence[~ErrorResult]
5753 # map input types to rpc msg
5755 msg
= dict(type='MachineActions',
5756 request
='BeginActions',
5759 _params
['entities'] = entities
5760 reply
= await self
.rpc(msg
)
5765 @ReturnMapping(ErrorResults
)
5766 async def FinishActions(self
, results
):
5768 results : typing.Sequence[~ActionExecutionResult]
5769 Returns -> typing.Sequence[~ErrorResult]
5771 # map input types to rpc msg
5773 msg
= dict(type='MachineActions',
5774 request
='FinishActions',
5777 _params
['results'] = results
5778 reply
= await self
.rpc(msg
)
5783 @ReturnMapping(ActionsByReceivers
)
5784 async def RunningActions(self
, entities
):
5786 entities : typing.Sequence[~Entity]
5787 Returns -> typing.Sequence[~ActionsByReceiver]
5789 # map input types to rpc msg
5791 msg
= dict(type='MachineActions',
5792 request
='RunningActions',
5795 _params
['entities'] = entities
5796 reply
= await self
.rpc(msg
)
5801 @ReturnMapping(StringsWatchResults
)
5802 async def WatchActionNotifications(self
, entities
):
5804 entities : typing.Sequence[~Entity]
5805 Returns -> typing.Sequence[~StringsWatchResult]
5807 # map input types to rpc msg
5809 msg
= dict(type='MachineActions',
5810 request
='WatchActionNotifications',
5813 _params
['entities'] = entities
5814 reply
= await self
.rpc(msg
)
5819 class MachineUndertakerFacade(Type
):
5820 name
= 'MachineUndertaker'
5822 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5823 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5825 'required': ['entities'],
5827 'EntitiesResult': {'additionalProperties': False,
5828 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5830 'error': {'$ref': '#/definitions/Error'}},
5831 'required': ['entities'],
5833 'EntitiesResults': {'additionalProperties': False,
5834 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
5836 'required': ['results'],
5838 'Entity': {'additionalProperties': False,
5839 'properties': {'tag': {'type': 'string'}},
5840 'required': ['tag'],
5842 'Error': {'additionalProperties': False,
5843 'properties': {'code': {'type': 'string'},
5844 'info': {'$ref': '#/definitions/ErrorInfo'},
5845 'message': {'type': 'string'}},
5846 'required': ['message', 'code'],
5848 'ErrorInfo': {'additionalProperties': False,
5849 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5850 'macaroon-path': {'type': 'string'}},
5852 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5853 'NotifyWatchResult': {'additionalProperties': False,
5854 'properties': {'NotifyWatcherId': {'type': 'string'},
5855 'error': {'$ref': '#/definitions/Error'}},
5856 'required': ['NotifyWatcherId'],
5858 'NotifyWatchResults': {'additionalProperties': False,
5859 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5861 'required': ['results'],
5863 'ProviderInterfaceInfo': {'additionalProperties': False,
5864 'properties': {'interface-name': {'type': 'string'},
5865 'mac-address': {'type': 'string'},
5866 'provider-id': {'type': 'string'}},
5867 'required': ['interface-name',
5871 'ProviderInterfaceInfoResult': {'additionalProperties': False,
5872 'properties': {'error': {'$ref': '#/definitions/Error'},
5873 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'},
5875 'machine-tag': {'type': 'string'}},
5876 'required': ['machine-tag',
5879 'ProviderInterfaceInfoResults': {'additionalProperties': False,
5880 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'},
5882 'required': ['results'],
5884 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5885 'Result': {'$ref': '#/definitions/EntitiesResults'}},
5887 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}},
5889 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5890 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}},
5892 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5893 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5898 @ReturnMapping(EntitiesResults
)
5899 async def AllMachineRemovals(self
, entities
):
5901 entities : typing.Sequence[~Entity]
5902 Returns -> typing.Sequence[~EntitiesResult]
5904 # map input types to rpc msg
5906 msg
= dict(type='MachineUndertaker',
5907 request
='AllMachineRemovals',
5910 _params
['entities'] = entities
5911 reply
= await self
.rpc(msg
)
5916 @ReturnMapping(None)
5917 async def CompleteMachineRemovals(self
, entities
):
5919 entities : typing.Sequence[~Entity]
5922 # map input types to rpc msg
5924 msg
= dict(type='MachineUndertaker',
5925 request
='CompleteMachineRemovals',
5928 _params
['entities'] = entities
5929 reply
= await self
.rpc(msg
)
5934 @ReturnMapping(ProviderInterfaceInfoResults
)
5935 async def GetMachineProviderInterfaceInfo(self
, entities
):
5937 entities : typing.Sequence[~Entity]
5938 Returns -> typing.Sequence[~ProviderInterfaceInfoResult]
5940 # map input types to rpc msg
5942 msg
= dict(type='MachineUndertaker',
5943 request
='GetMachineProviderInterfaceInfo',
5946 _params
['entities'] = entities
5947 reply
= await self
.rpc(msg
)
5952 @ReturnMapping(NotifyWatchResults
)
5953 async def WatchMachineRemovals(self
, entities
):
5955 entities : typing.Sequence[~Entity]
5956 Returns -> typing.Sequence[~NotifyWatchResult]
5958 # map input types to rpc msg
5960 msg
= dict(type='MachineUndertaker',
5961 request
='WatchMachineRemovals',
5964 _params
['entities'] = entities
5965 reply
= await self
.rpc(msg
)
5970 class MachinerFacade(Type
):
5973 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
5974 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
5977 'required': ['servers'],
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'],
5986 'Entities': {'additionalProperties': False,
5987 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5989 'required': ['entities'],
5991 'Entity': {'additionalProperties': False,
5992 'properties': {'tag': {'type': 'string'}},
5993 'required': ['tag'],
5995 'EntityStatusArgs': {'additionalProperties': False,
5996 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
5999 'info': {'type': 'string'},
6000 'status': {'type': 'string'},
6001 'tag': {'type': 'string'}},
6007 'Error': {'additionalProperties': False,
6008 'properties': {'code': {'type': 'string'},
6009 'info': {'$ref': '#/definitions/ErrorInfo'},
6010 'message': {'type': 'string'}},
6011 'required': ['message', 'code'],
6013 'ErrorInfo': {'additionalProperties': False,
6014 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6015 'macaroon-path': {'type': 'string'}},
6017 'ErrorResult': {'additionalProperties': False,
6018 'properties': {'error': {'$ref': '#/definitions/Error'}},
6020 'ErrorResults': {'additionalProperties': False,
6021 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6023 'required': ['results'],
6025 'HostPort': {'additionalProperties': False,
6026 'properties': {'Address': {'$ref': '#/definitions/Address'},
6027 'port': {'type': 'integer'}},
6028 'required': ['Address', 'port'],
6030 'JobsResult': {'additionalProperties': False,
6031 'properties': {'error': {'$ref': '#/definitions/Error'},
6032 'jobs': {'items': {'type': 'string'},
6034 'required': ['jobs'],
6036 'JobsResults': {'additionalProperties': False,
6037 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
6039 'required': ['results'],
6041 'LifeResult': {'additionalProperties': False,
6042 'properties': {'error': {'$ref': '#/definitions/Error'},
6043 'life': {'type': 'string'}},
6044 'required': ['life'],
6046 'LifeResults': {'additionalProperties': False,
6047 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
6049 'required': ['results'],
6051 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6052 'MachineAddresses': {'additionalProperties': False,
6053 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
6055 'tag': {'type': 'string'}},
6056 'required': ['tag', 'addresses'],
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'},
6066 'dns-servers': {'items': {'type': 'string'},
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'},
6083 'vlan-tag': {'type': 'integer'}},
6084 'required': ['device-index',
6089 'provider-subnet-id',
6090 'provider-space-id',
6091 'provider-address-id',
6095 'parent-interface-name',
6099 'NetworkRoute': {'additionalProperties': False,
6100 'properties': {'destination-cidr': {'type': 'string'},
6101 'gateway-ip': {'type': 'string'},
6102 'metric': {'type': 'integer'}},
6103 'required': ['destination-cidr',
6107 'NotifyWatchResult': {'additionalProperties': False,
6108 'properties': {'NotifyWatcherId': {'type': 'string'},
6109 'error': {'$ref': '#/definitions/Error'}},
6110 'required': ['NotifyWatcherId'],
6112 'NotifyWatchResults': {'additionalProperties': False,
6113 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6115 'required': ['results'],
6117 'SetMachineNetworkConfig': {'additionalProperties': False,
6118 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
6120 'tag': {'type': 'string'}},
6121 'required': ['tag', 'config'],
6123 'SetMachinesAddresses': {'additionalProperties': False,
6124 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
6126 'required': ['machine-addresses'],
6128 'SetStatus': {'additionalProperties': False,
6129 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
6131 'required': ['entities'],
6133 'StringResult': {'additionalProperties': False,
6134 'properties': {'error': {'$ref': '#/definitions/Error'},
6135 'result': {'type': 'string'}},
6136 'required': ['result'],
6138 'StringsResult': {'additionalProperties': False,
6139 'properties': {'error': {'$ref': '#/definitions/Error'},
6140 'result': {'items': {'type': 'string'},
6143 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
6145 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
6147 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6148 'Result': {'$ref': '#/definitions/ErrorResults'}},
6150 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6151 'Result': {'$ref': '#/definitions/JobsResults'}},
6153 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6154 'Result': {'$ref': '#/definitions/LifeResults'}},
6156 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
6158 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
6159 'Result': {'$ref': '#/definitions/ErrorResults'}},
6161 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
6163 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6164 'Result': {'$ref': '#/definitions/ErrorResults'}},
6166 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6167 'Result': {'$ref': '#/definitions/ErrorResults'}},
6169 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6170 'Result': {'$ref': '#/definitions/ErrorResults'}},
6172 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6173 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6175 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6180 @ReturnMapping(StringsResult
)
6181 async def APIAddresses(self
):
6184 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
6186 # map input types to rpc msg
6188 msg
= dict(type='Machiner',
6189 request
='APIAddresses',
6193 reply
= await self
.rpc(msg
)
6198 @ReturnMapping(APIHostPortsResult
)
6199 async def APIHostPorts(self
):
6202 Returns -> typing.Sequence[~HostPort]
6204 # map input types to rpc msg
6206 msg
= dict(type='Machiner',
6207 request
='APIHostPorts',
6211 reply
= await self
.rpc(msg
)
6216 @ReturnMapping(ErrorResults
)
6217 async def EnsureDead(self
, entities
):
6219 entities : typing.Sequence[~Entity]
6220 Returns -> typing.Sequence[~ErrorResult]
6222 # map input types to rpc msg
6224 msg
= dict(type='Machiner',
6225 request
='EnsureDead',
6228 _params
['entities'] = entities
6229 reply
= await self
.rpc(msg
)
6234 @ReturnMapping(JobsResults
)
6235 async def Jobs(self
, entities
):
6237 entities : typing.Sequence[~Entity]
6238 Returns -> typing.Sequence[~JobsResult]
6240 # map input types to rpc msg
6242 msg
= dict(type='Machiner',
6246 _params
['entities'] = entities
6247 reply
= await self
.rpc(msg
)
6252 @ReturnMapping(LifeResults
)
6253 async def Life(self
, entities
):
6255 entities : typing.Sequence[~Entity]
6256 Returns -> typing.Sequence[~LifeResult]
6258 # map input types to rpc msg
6260 msg
= dict(type='Machiner',
6264 _params
['entities'] = entities
6265 reply
= await self
.rpc(msg
)
6270 @ReturnMapping(StringResult
)
6271 async def ModelUUID(self
):
6274 Returns -> typing.Union[_ForwardRef('Error'), str]
6276 # map input types to rpc msg
6278 msg
= dict(type='Machiner',
6279 request
='ModelUUID',
6283 reply
= await self
.rpc(msg
)
6288 @ReturnMapping(ErrorResults
)
6289 async def SetMachineAddresses(self
, machine_addresses
):
6291 machine_addresses : typing.Sequence[~MachineAddresses]
6292 Returns -> typing.Sequence[~ErrorResult]
6294 # map input types to rpc msg
6296 msg
= dict(type='Machiner',
6297 request
='SetMachineAddresses',
6300 _params
['machine-addresses'] = machine_addresses
6301 reply
= await self
.rpc(msg
)
6306 @ReturnMapping(None)
6307 async def SetObservedNetworkConfig(self
, config
, tag
):
6309 config : typing.Sequence[~NetworkConfig]
6313 # map input types to rpc msg
6315 msg
= dict(type='Machiner',
6316 request
='SetObservedNetworkConfig',
6319 _params
['config'] = config
6320 _params
['tag'] = tag
6321 reply
= await self
.rpc(msg
)
6326 @ReturnMapping(ErrorResults
)
6327 async def SetProviderNetworkConfig(self
, entities
):
6329 entities : typing.Sequence[~Entity]
6330 Returns -> typing.Sequence[~ErrorResult]
6332 # map input types to rpc msg
6334 msg
= dict(type='Machiner',
6335 request
='SetProviderNetworkConfig',
6338 _params
['entities'] = entities
6339 reply
= await self
.rpc(msg
)
6344 @ReturnMapping(ErrorResults
)
6345 async def SetStatus(self
, entities
):
6347 entities : typing.Sequence[~EntityStatusArgs]
6348 Returns -> typing.Sequence[~ErrorResult]
6350 # map input types to rpc msg
6352 msg
= dict(type='Machiner',
6353 request
='SetStatus',
6356 _params
['entities'] = entities
6357 reply
= await self
.rpc(msg
)
6362 @ReturnMapping(ErrorResults
)
6363 async def UpdateStatus(self
, entities
):
6365 entities : typing.Sequence[~EntityStatusArgs]
6366 Returns -> typing.Sequence[~ErrorResult]
6368 # map input types to rpc msg
6370 msg
= dict(type='Machiner',
6371 request
='UpdateStatus',
6374 _params
['entities'] = entities
6375 reply
= await self
.rpc(msg
)
6380 @ReturnMapping(NotifyWatchResults
)
6381 async def Watch(self
, entities
):
6383 entities : typing.Sequence[~Entity]
6384 Returns -> typing.Sequence[~NotifyWatchResult]
6386 # map input types to rpc msg
6388 msg
= dict(type='Machiner',
6392 _params
['entities'] = entities
6393 reply
= await self
.rpc(msg
)
6398 @ReturnMapping(NotifyWatchResult
)
6399 async def WatchAPIHostPorts(self
):
6402 Returns -> typing.Union[str, _ForwardRef('Error')]
6404 # map input types to rpc msg
6406 msg
= dict(type='Machiner',
6407 request
='WatchAPIHostPorts',
6411 reply
= await self
.rpc(msg
)
6416 class MeterStatusFacade(Type
):
6417 name
= 'MeterStatus'
6419 schema
= {'definitions': {'Entities': {'additionalProperties': False,
6420 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6422 'required': ['entities'],
6424 'Entity': {'additionalProperties': False,
6425 'properties': {'tag': {'type': 'string'}},
6426 'required': ['tag'],
6428 'Error': {'additionalProperties': False,
6429 'properties': {'code': {'type': 'string'},
6430 'info': {'$ref': '#/definitions/ErrorInfo'},
6431 'message': {'type': 'string'}},
6432 'required': ['message', 'code'],
6434 'ErrorInfo': {'additionalProperties': False,
6435 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6436 'macaroon-path': {'type': 'string'}},
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'],
6445 'MeterStatusResults': {'additionalProperties': False,
6446 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
6448 'required': ['results'],
6450 'NotifyWatchResult': {'additionalProperties': False,
6451 'properties': {'NotifyWatcherId': {'type': 'string'},
6452 'error': {'$ref': '#/definitions/Error'}},
6453 'required': ['NotifyWatcherId'],
6455 'NotifyWatchResults': {'additionalProperties': False,
6456 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6458 'required': ['results'],
6460 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6461 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
6463 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6464 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6469 @ReturnMapping(MeterStatusResults
)
6470 async def GetMeterStatus(self
, entities
):
6472 entities : typing.Sequence[~Entity]
6473 Returns -> typing.Sequence[~MeterStatusResult]
6475 # map input types to rpc msg
6477 msg
= dict(type='MeterStatus',
6478 request
='GetMeterStatus',
6481 _params
['entities'] = entities
6482 reply
= await self
.rpc(msg
)
6487 @ReturnMapping(NotifyWatchResults
)
6488 async def WatchMeterStatus(self
, entities
):
6490 entities : typing.Sequence[~Entity]
6491 Returns -> typing.Sequence[~NotifyWatchResult]
6493 # map input types to rpc msg
6495 msg
= dict(type='MeterStatus',
6496 request
='WatchMeterStatus',
6499 _params
['entities'] = entities
6500 reply
= await self
.rpc(msg
)
6505 class MetricsManagerFacade(Type
):
6506 name
= 'MetricsManager'
6508 schema
= {'definitions': {'Entities': {'additionalProperties': False,
6509 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6511 'required': ['entities'],
6513 'Entity': {'additionalProperties': False,
6514 'properties': {'tag': {'type': 'string'}},
6515 'required': ['tag'],
6517 'Error': {'additionalProperties': False,
6518 'properties': {'code': {'type': 'string'},
6519 'info': {'$ref': '#/definitions/ErrorInfo'},
6520 'message': {'type': 'string'}},
6521 'required': ['message', 'code'],
6523 'ErrorInfo': {'additionalProperties': False,
6524 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6525 'macaroon-path': {'type': 'string'}},
6527 'ErrorResult': {'additionalProperties': False,
6528 'properties': {'error': {'$ref': '#/definitions/Error'}},
6530 'ErrorResults': {'additionalProperties': False,
6531 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6533 'required': ['results'],
6535 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
6536 'properties': {'AddJujuMachineMetrics': {'type': 'object'},
6537 'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6538 'Result': {'$ref': '#/definitions/ErrorResults'}},
6540 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6541 'Result': {'$ref': '#/definitions/ErrorResults'}},
6546 @ReturnMapping(None)
6547 async def AddJujuMachineMetrics(self
):
6552 # map input types to rpc msg
6554 msg
= dict(type='MetricsManager',
6555 request
='AddJujuMachineMetrics',
6559 reply
= await self
.rpc(msg
)
6564 @ReturnMapping(ErrorResults
)
6565 async def CleanupOldMetrics(self
, entities
):
6567 entities : typing.Sequence[~Entity]
6568 Returns -> typing.Sequence[~ErrorResult]
6570 # map input types to rpc msg
6572 msg
= dict(type='MetricsManager',
6573 request
='CleanupOldMetrics',
6576 _params
['entities'] = entities
6577 reply
= await self
.rpc(msg
)
6582 @ReturnMapping(ErrorResults
)
6583 async def SendMetrics(self
, entities
):
6585 entities : typing.Sequence[~Entity]
6586 Returns -> typing.Sequence[~ErrorResult]
6588 # map input types to rpc msg
6590 msg
= dict(type='MetricsManager',
6591 request
='SendMetrics',
6594 _params
['entities'] = entities
6595 reply
= await self
.rpc(msg
)
6600 class MigrationFlagFacade(Type
):
6601 name
= 'MigrationFlag'
6603 schema
= {'definitions': {'Entities': {'additionalProperties': False,
6604 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6606 'required': ['entities'],
6608 'Entity': {'additionalProperties': False,
6609 'properties': {'tag': {'type': 'string'}},
6610 'required': ['tag'],
6612 'Error': {'additionalProperties': False,
6613 'properties': {'code': {'type': 'string'},
6614 'info': {'$ref': '#/definitions/ErrorInfo'},
6615 'message': {'type': 'string'}},
6616 'required': ['message', 'code'],
6618 'ErrorInfo': {'additionalProperties': False,
6619 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6620 'macaroon-path': {'type': 'string'}},
6622 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6623 'NotifyWatchResult': {'additionalProperties': False,
6624 'properties': {'NotifyWatcherId': {'type': 'string'},
6625 'error': {'$ref': '#/definitions/Error'}},
6626 'required': ['NotifyWatcherId'],
6628 'NotifyWatchResults': {'additionalProperties': False,
6629 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6631 'required': ['results'],
6633 'PhaseResult': {'additionalProperties': False,
6634 'properties': {'error': {'$ref': '#/definitions/Error'},
6635 'phase': {'type': 'string'}},
6637 'PhaseResults': {'additionalProperties': False,
6638 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
6640 'required': ['results'],
6642 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6643 'Result': {'$ref': '#/definitions/PhaseResults'}},
6645 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6646 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6651 @ReturnMapping(PhaseResults
)
6652 async def Phase(self
, entities
):
6654 entities : typing.Sequence[~Entity]
6655 Returns -> typing.Sequence[~PhaseResult]
6657 # map input types to rpc msg
6659 msg
= dict(type='MigrationFlag',
6663 _params
['entities'] = entities
6664 reply
= await self
.rpc(msg
)
6669 @ReturnMapping(NotifyWatchResults
)
6670 async def Watch(self
, entities
):
6672 entities : typing.Sequence[~Entity]
6673 Returns -> typing.Sequence[~NotifyWatchResult]
6675 # map input types to rpc msg
6677 msg
= dict(type='MigrationFlag',
6681 _params
['entities'] = entities
6682 reply
= await self
.rpc(msg
)
6687 class MigrationMasterFacade(Type
):
6688 name
= 'MigrationMaster'
6690 schema
= {'definitions': {'Error': {'additionalProperties': False,
6691 'properties': {'code': {'type': 'string'},
6692 'info': {'$ref': '#/definitions/ErrorInfo'},
6693 'message': {'type': 'string'}},
6694 'required': ['message', 'code'],
6696 'ErrorInfo': {'additionalProperties': False,
6697 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6698 'macaroon-path': {'type': 'string'}},
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',
6706 'spec': {'$ref': '#/definitions/MigrationSpec'}},
6707 'required': ['spec',
6710 'phase-changed-time'],
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',
6722 'controller-agent-version'],
6724 'MigrationSpec': {'additionalProperties': False,
6725 'properties': {'model-tag': {'type': 'string'},
6726 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
6727 'required': ['model-tag', 'target-info'],
6729 'MigrationTargetInfo': {'additionalProperties': False,
6730 'properties': {'addrs': {'items': {'type': 'string'},
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',
6742 'MinionReports': {'additionalProperties': False,
6743 'properties': {'failed': {'items': {'type': 'string'},
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'},
6751 'required': ['migration-id',
6758 'NotifyWatchResult': {'additionalProperties': False,
6759 'properties': {'NotifyWatcherId': {'type': 'string'},
6760 'error': {'$ref': '#/definitions/Error'}},
6761 'required': ['NotifyWatcherId'],
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',
6775 'SerializedModel': {'additionalProperties': False,
6776 'properties': {'bytes': {'items': {'type': 'integer'},
6778 'charms': {'items': {'type': 'string'},
6780 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
6782 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
6784 'required': ['bytes',
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'}},
6796 'required': ['application',
6798 'application-revision',
6799 'charmstore-revision',
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',
6811 'type': {'type': 'string'},
6812 'username': {'type': 'string'}},
6813 'required': ['revision',
6822 'SerializedModelTools': {'additionalProperties': False,
6823 'properties': {'uri': {'type': 'string'},
6824 'version': {'type': 'string'}},
6825 'required': ['version', 'uri'],
6827 'SetMigrationPhaseArgs': {'additionalProperties': False,
6828 'properties': {'phase': {'type': 'string'}},
6829 'required': ['phase'],
6831 'SetMigrationStatusMessageArgs': {'additionalProperties': False,
6832 'properties': {'message': {'type': 'string'}},
6833 'required': ['message'],
6835 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
6837 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}},
6839 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}},
6841 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}},
6843 'Prechecks': {'type': 'object'},
6844 'Reap': {'type': 'object'},
6845 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
6847 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
6849 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6851 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6856 @ReturnMapping(SerializedModel
)
6857 async def Export(self
):
6860 Returns -> typing.Union[typing.Sequence[int], typing.Sequence[str], typing.Sequence[~SerializedModelTools]]
6862 # map input types to rpc msg
6864 msg
= dict(type='MigrationMaster',
6869 reply
= await self
.rpc(msg
)
6874 @ReturnMapping(MasterMigrationStatus
)
6875 async def MigrationStatus(self
):
6878 Returns -> typing.Union[str, _ForwardRef('MigrationSpec')]
6880 # map input types to rpc msg
6882 msg
= dict(type='MigrationMaster',
6883 request
='MigrationStatus',
6887 reply
= await self
.rpc(msg
)
6892 @ReturnMapping(MinionReports
)
6893 async def MinionReports(self
):
6896 Returns -> typing.Union[typing.Sequence[str], str, int]
6898 # map input types to rpc msg
6900 msg
= dict(type='MigrationMaster',
6901 request
='MinionReports',
6905 reply
= await self
.rpc(msg
)
6910 @ReturnMapping(MigrationModelInfo
)
6911 async def ModelInfo(self
):
6914 Returns -> typing.Union[_ForwardRef('Number'), str]
6916 # map input types to rpc msg
6918 msg
= dict(type='MigrationMaster',
6919 request
='ModelInfo',
6923 reply
= await self
.rpc(msg
)
6928 @ReturnMapping(None)
6929 async def Prechecks(self
):
6934 # map input types to rpc msg
6936 msg
= dict(type='MigrationMaster',
6937 request
='Prechecks',
6941 reply
= await self
.rpc(msg
)
6946 @ReturnMapping(None)
6947 async def Reap(self
):
6952 # map input types to rpc msg
6954 msg
= dict(type='MigrationMaster',
6959 reply
= await self
.rpc(msg
)
6964 @ReturnMapping(None)
6965 async def SetPhase(self
, phase
):
6970 # map input types to rpc msg
6972 msg
= dict(type='MigrationMaster',
6976 _params
['phase'] = phase
6977 reply
= await self
.rpc(msg
)
6982 @ReturnMapping(None)
6983 async def SetStatusMessage(self
, message
):
6988 # map input types to rpc msg
6990 msg
= dict(type='MigrationMaster',
6991 request
='SetStatusMessage',
6994 _params
['message'] = message
6995 reply
= await self
.rpc(msg
)
7000 @ReturnMapping(NotifyWatchResult
)
7001 async def Watch(self
):
7004 Returns -> typing.Union[str, _ForwardRef('Error')]
7006 # map input types to rpc msg
7008 msg
= dict(type='MigrationMaster',
7013 reply
= await self
.rpc(msg
)
7018 @ReturnMapping(NotifyWatchResult
)
7019 async def WatchMinionReports(self
):
7022 Returns -> typing.Union[str, _ForwardRef('Error')]
7024 # map input types to rpc msg
7026 msg
= dict(type='MigrationMaster',
7027 request
='WatchMinionReports',
7031 reply
= await self
.rpc(msg
)
7036 class MigrationMinionFacade(Type
):
7037 name
= 'MigrationMinion'
7039 schema
= {'definitions': {'Error': {'additionalProperties': False,
7040 'properties': {'code': {'type': 'string'},
7041 'info': {'$ref': '#/definitions/ErrorInfo'},
7042 'message': {'type': 'string'}},
7043 'required': ['message', 'code'],
7045 'ErrorInfo': {'additionalProperties': False,
7046 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7047 'macaroon-path': {'type': 'string'}},
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',
7058 'NotifyWatchResult': {'additionalProperties': False,
7059 'properties': {'NotifyWatcherId': {'type': 'string'},
7060 'error': {'$ref': '#/definitions/Error'}},
7061 'required': ['NotifyWatcherId'],
7063 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}},
7065 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
7070 @ReturnMapping(None)
7071 async def Report(self
, migration_id
, phase
, success
):
7078 # map input types to rpc msg
7080 msg
= dict(type='MigrationMinion',
7084 _params
['migration-id'] = migration_id
7085 _params
['phase'] = phase
7086 _params
['success'] = success
7087 reply
= await self
.rpc(msg
)
7092 @ReturnMapping(NotifyWatchResult
)
7093 async def Watch(self
):
7096 Returns -> typing.Union[str, _ForwardRef('Error')]
7098 # map input types to rpc msg
7100 msg
= dict(type='MigrationMinion',
7105 reply
= await self
.rpc(msg
)
7110 class MigrationStatusWatcherFacade(Type
):
7111 name
= 'MigrationStatusWatcher'
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'},
7119 'source-ca-cert': {'type': 'string'},
7120 'target-api-addrs': {'items': {'type': 'string'},
7122 'target-ca-cert': {'type': 'string'}},
7123 'required': ['migration-id',
7131 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
7133 'Stop': {'type': 'object'}},
7137 @ReturnMapping(MigrationStatus
)
7138 async def Next(self
):
7141 Returns -> typing.Union[int, str, typing.Sequence[str]]
7143 # map input types to rpc msg
7145 msg
= dict(type='MigrationStatusWatcher',
7150 reply
= await self
.rpc(msg
)
7155 @ReturnMapping(None)
7156 async def Stop(self
):
7161 # map input types to rpc msg
7163 msg
= dict(type='MigrationStatusWatcher',
7168 reply
= await self
.rpc(msg
)
7173 class MigrationTargetFacade(Type
):
7174 name
= 'MigrationTarget'
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'],
7182 'BytesResult': {'additionalProperties': False,
7183 'properties': {'result': {'items': {'type': 'integer'},
7185 'required': ['result'],
7187 'Error': {'additionalProperties': False,
7188 'properties': {'code': {'type': 'string'},
7189 'info': {'$ref': '#/definitions/ErrorInfo'},
7190 'message': {'type': 'string'}},
7191 'required': ['message', 'code'],
7193 'ErrorInfo': {'additionalProperties': False,
7194 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7195 'macaroon-path': {'type': 'string'}},
7197 'ErrorResult': {'additionalProperties': False,
7198 'properties': {'error': {'$ref': '#/definitions/Error'}},
7200 'ErrorResults': {'additionalProperties': False,
7201 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7203 'required': ['results'],
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',
7216 'controller-agent-version'],
7218 'ModelArgs': {'additionalProperties': False,
7219 'properties': {'model-tag': {'type': 'string'}},
7220 'required': ['model-tag'],
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',
7234 'SerializedModel': {'additionalProperties': False,
7235 'properties': {'bytes': {'items': {'type': 'integer'},
7237 'charms': {'items': {'type': 'string'},
7239 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
7241 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
7243 'required': ['bytes',
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'}},
7255 'required': ['application',
7257 'application-revision',
7258 'charmstore-revision',
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',
7270 'type': {'type': 'string'},
7271 'username': {'type': 'string'}},
7272 'required': ['revision',
7281 'SerializedModelTools': {'additionalProperties': False,
7282 'properties': {'uri': {'type': 'string'},
7283 'version': {'type': 'string'}},
7284 'required': ['version', 'uri'],
7286 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
7288 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
7290 'AdoptResources': {'properties': {'Params': {'$ref': '#/definitions/AdoptResourcesArgs'}},
7292 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
7294 'CheckMachines': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'},
7295 'Result': {'$ref': '#/definitions/ErrorResults'}},
7297 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
7299 'LatestLogTime': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'},
7300 'Result': {'format': 'date-time',
7303 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}},
7308 @ReturnMapping(None)
7309 async def Abort(self
, model_tag
):
7314 # map input types to rpc msg
7316 msg
= dict(type='MigrationTarget',
7320 _params
['model-tag'] = model_tag
7321 reply
= await self
.rpc(msg
)
7326 @ReturnMapping(None)
7327 async def Activate(self
, model_tag
):
7332 # map input types to rpc msg
7334 msg
= dict(type='MigrationTarget',
7338 _params
['model-tag'] = model_tag
7339 reply
= await self
.rpc(msg
)
7344 @ReturnMapping(None)
7345 async def AdoptResources(self
, model_tag
, source_controller_version
):
7348 source_controller_version : Number
7351 # map input types to rpc msg
7353 msg
= dict(type='MigrationTarget',
7354 request
='AdoptResources',
7357 _params
['model-tag'] = model_tag
7358 _params
['source-controller-version'] = source_controller_version
7359 reply
= await self
.rpc(msg
)
7364 @ReturnMapping(BytesResult
)
7365 async def CACert(self
):
7368 Returns -> typing.Sequence[int]
7370 # map input types to rpc msg
7372 msg
= dict(type='MigrationTarget',
7377 reply
= await self
.rpc(msg
)
7382 @ReturnMapping(ErrorResults
)
7383 async def CheckMachines(self
, model_tag
):
7386 Returns -> typing.Sequence[~ErrorResult]
7388 # map input types to rpc msg
7390 msg
= dict(type='MigrationTarget',
7391 request
='CheckMachines',
7394 _params
['model-tag'] = model_tag
7395 reply
= await self
.rpc(msg
)
7400 @ReturnMapping(None)
7401 async def Import(self
, bytes_
, charms
, tools
):
7403 bytes_ : typing.Sequence[int]
7404 charms : typing.Sequence[str]
7405 tools : typing.Sequence[~SerializedModelTools]
7408 # map input types to rpc msg
7410 msg
= dict(type='MigrationTarget',
7414 _params
['bytes'] = bytes_
7415 _params
['charms'] = charms
7416 _params
['tools'] = tools
7417 reply
= await self
.rpc(msg
)
7423 async def LatestLogTime(self
, model_tag
):
7428 # map input types to rpc msg
7430 msg
= dict(type='MigrationTarget',
7431 request
='LatestLogTime',
7434 _params
['model-tag'] = model_tag
7435 reply
= await self
.rpc(msg
)
7440 @ReturnMapping(None)
7441 async def Prechecks(self
, agent_version
, name
, owner_tag
, uuid
):
7443 agent_version : Number
7449 # map input types to rpc msg
7451 msg
= dict(type='MigrationTarget',
7452 request
='Prechecks',
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
)
7464 class ModelConfigFacade(Type
):
7465 name
= 'ModelConfig'
7467 schema
= {'definitions': {'ConfigValue': {'additionalProperties': False,
7468 'properties': {'source': {'type': 'string'},
7469 'value': {'additionalProperties': True,
7471 'required': ['value', 'source'],
7473 'Error': {'additionalProperties': False,
7474 'properties': {'code': {'type': 'string'},
7475 'info': {'$ref': '#/definitions/ErrorInfo'},
7476 'message': {'type': 'string'}},
7477 'required': ['message', 'code'],
7479 'ErrorInfo': {'additionalProperties': False,
7480 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7481 'macaroon-path': {'type': 'string'}},
7483 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7484 'ModelConfigResults': {'additionalProperties': False,
7485 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
7487 'required': ['config'],
7489 'ModelSLA': {'additionalProperties': False,
7490 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
7491 'creds': {'items': {'type': 'integer'},
7493 'required': ['ModelSLAInfo', 'creds'],
7495 'ModelSLAInfo': {'additionalProperties': False,
7496 'properties': {'level': {'type': 'string'},
7497 'owner': {'type': 'string'}},
7498 'required': ['level', 'owner'],
7500 'ModelSet': {'additionalProperties': False,
7501 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
7504 'required': ['config'],
7506 'ModelUnset': {'additionalProperties': False,
7507 'properties': {'keys': {'items': {'type': 'string'},
7509 'required': ['keys'],
7511 'StringResult': {'additionalProperties': False,
7512 'properties': {'error': {'$ref': '#/definitions/Error'},
7513 'result': {'type': 'string'}},
7514 'required': ['result'],
7516 'properties': {'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
7518 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
7520 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
7522 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
7524 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
7529 @ReturnMapping(ModelConfigResults
)
7530 async def ModelGet(self
):
7533 Returns -> typing.Mapping[str, ~ConfigValue]
7535 # map input types to rpc msg
7537 msg
= dict(type='ModelConfig',
7542 reply
= await self
.rpc(msg
)
7547 @ReturnMapping(None)
7548 async def ModelSet(self
, config
):
7550 config : typing.Mapping[str, typing.Any]
7553 # map input types to rpc msg
7555 msg
= dict(type='ModelConfig',
7559 _params
['config'] = config
7560 reply
= await self
.rpc(msg
)
7565 @ReturnMapping(None)
7566 async def ModelUnset(self
, keys
):
7568 keys : typing.Sequence[str]
7571 # map input types to rpc msg
7573 msg
= dict(type='ModelConfig',
7574 request
='ModelUnset',
7577 _params
['keys'] = keys
7578 reply
= await self
.rpc(msg
)
7583 @ReturnMapping(StringResult
)
7584 async def SLALevel(self
):
7587 Returns -> typing.Union[_ForwardRef('Error'), str]
7589 # map input types to rpc msg
7591 msg
= dict(type='ModelConfig',
7596 reply
= await self
.rpc(msg
)
7601 @ReturnMapping(None)
7602 async def SetSLALevel(self
, creds
, level
):
7604 creds : typing.Sequence[int]
7608 # map input types to rpc msg
7610 msg
= dict(type='ModelConfig',
7611 request
='SetSLALevel',
7614 _params
['creds'] = creds
7615 _params
['level'] = level
7616 reply
= await self
.rpc(msg
)
7621 class ModelUpgraderFacade(Type
):
7622 name
= 'ModelUpgrader'
7624 schema
= {'definitions': {'Entities': {'additionalProperties': False,
7625 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7627 'required': ['entities'],
7629 'Entity': {'additionalProperties': False,
7630 'properties': {'tag': {'type': 'string'}},
7631 'required': ['tag'],
7633 'EntityStatusArgs': {'additionalProperties': False,
7634 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
7637 'info': {'type': 'string'},
7638 'status': {'type': 'string'},
7639 'tag': {'type': 'string'}},
7645 'Error': {'additionalProperties': False,
7646 'properties': {'code': {'type': 'string'},
7647 'info': {'$ref': '#/definitions/ErrorInfo'},
7648 'message': {'type': 'string'}},
7649 'required': ['message', 'code'],
7651 'ErrorInfo': {'additionalProperties': False,
7652 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7653 'macaroon-path': {'type': 'string'}},
7655 'ErrorResult': {'additionalProperties': False,
7656 'properties': {'error': {'$ref': '#/definitions/Error'}},
7658 'ErrorResults': {'additionalProperties': False,
7659 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7661 'required': ['results'],
7663 'IntResult': {'additionalProperties': False,
7664 'properties': {'error': {'$ref': '#/definitions/Error'},
7665 'result': {'type': 'integer'}},
7666 'required': ['result'],
7668 'IntResults': {'additionalProperties': False,
7669 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
7671 'required': ['results'],
7673 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7674 'NotifyWatchResult': {'additionalProperties': False,
7675 'properties': {'NotifyWatcherId': {'type': 'string'},
7676 'error': {'$ref': '#/definitions/Error'}},
7677 'required': ['NotifyWatcherId'],
7679 'NotifyWatchResults': {'additionalProperties': False,
7680 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
7682 'required': ['results'],
7684 'SetModelEnvironVersion': {'additionalProperties': False,
7685 'properties': {'model-tag': {'type': 'string'},
7686 'version': {'type': 'integer'}},
7687 'required': ['model-tag',
7690 'SetModelEnvironVersions': {'additionalProperties': False,
7691 'properties': {'models': {'items': {'$ref': '#/definitions/SetModelEnvironVersion'},
7694 'SetStatus': {'additionalProperties': False,
7695 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
7697 'required': ['entities'],
7699 'properties': {'ModelEnvironVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7700 'Result': {'$ref': '#/definitions/IntResults'}},
7702 'ModelTargetEnvironVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7703 'Result': {'$ref': '#/definitions/IntResults'}},
7705 'SetModelEnvironVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelEnvironVersions'},
7706 'Result': {'$ref': '#/definitions/ErrorResults'}},
7708 'SetModelStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
7709 'Result': {'$ref': '#/definitions/ErrorResults'}},
7711 'WatchModelEnvironVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7712 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
7717 @ReturnMapping(IntResults
)
7718 async def ModelEnvironVersion(self
, entities
):
7720 entities : typing.Sequence[~Entity]
7721 Returns -> typing.Sequence[~IntResult]
7723 # map input types to rpc msg
7725 msg
= dict(type='ModelUpgrader',
7726 request
='ModelEnvironVersion',
7729 _params
['entities'] = entities
7730 reply
= await self
.rpc(msg
)
7735 @ReturnMapping(IntResults
)
7736 async def ModelTargetEnvironVersion(self
, entities
):
7738 entities : typing.Sequence[~Entity]
7739 Returns -> typing.Sequence[~IntResult]
7741 # map input types to rpc msg
7743 msg
= dict(type='ModelUpgrader',
7744 request
='ModelTargetEnvironVersion',
7747 _params
['entities'] = entities
7748 reply
= await self
.rpc(msg
)
7753 @ReturnMapping(ErrorResults
)
7754 async def SetModelEnvironVersion(self
, models
):
7756 models : typing.Sequence[~SetModelEnvironVersion]
7757 Returns -> typing.Sequence[~ErrorResult]
7759 # map input types to rpc msg
7761 msg
= dict(type='ModelUpgrader',
7762 request
='SetModelEnvironVersion',
7765 _params
['models'] = models
7766 reply
= await self
.rpc(msg
)
7771 @ReturnMapping(ErrorResults
)
7772 async def SetModelStatus(self
, entities
):
7774 entities : typing.Sequence[~EntityStatusArgs]
7775 Returns -> typing.Sequence[~ErrorResult]
7777 # map input types to rpc msg
7779 msg
= dict(type='ModelUpgrader',
7780 request
='SetModelStatus',
7783 _params
['entities'] = entities
7784 reply
= await self
.rpc(msg
)
7789 @ReturnMapping(NotifyWatchResults
)
7790 async def WatchModelEnvironVersion(self
, entities
):
7792 entities : typing.Sequence[~Entity]
7793 Returns -> typing.Sequence[~NotifyWatchResult]
7795 # map input types to rpc msg
7797 msg
= dict(type='ModelUpgrader',
7798 request
='WatchModelEnvironVersion',
7801 _params
['entities'] = entities
7802 reply
= await self
.rpc(msg
)
7807 class NotifyWatcherFacade(Type
):
7808 name
= 'NotifyWatcher'
7810 schema
= {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
7814 @ReturnMapping(None)
7815 async def Next(self
):
7820 # map input types to rpc msg
7822 msg
= dict(type='NotifyWatcher',
7827 reply
= await self
.rpc(msg
)
7832 @ReturnMapping(None)
7833 async def Stop(self
):
7838 # map input types to rpc msg
7840 msg
= dict(type='NotifyWatcher',
7845 reply
= await self
.rpc(msg
)
7850 class OfferStatusWatcherFacade(Type
):
7851 name
= 'OfferStatusWatcher'
7853 schema
= {'definitions': {'EntityStatus': {'additionalProperties': False,
7854 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
7857 'info': {'type': 'string'},
7858 'since': {'format': 'date-time',
7860 'status': {'type': 'string'}},
7861 'required': ['status', 'info', 'since'],
7863 'Error': {'additionalProperties': False,
7864 'properties': {'code': {'type': 'string'},
7865 'info': {'$ref': '#/definitions/ErrorInfo'},
7866 'message': {'type': 'string'}},
7867 'required': ['message', 'code'],
7869 'ErrorInfo': {'additionalProperties': False,
7870 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7871 'macaroon-path': {'type': 'string'}},
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'],
7879 'OfferStatusWatchResult': {'additionalProperties': False,
7880 'properties': {'changes': {'items': {'$ref': '#/definitions/OfferStatusChange'},
7882 'error': {'$ref': '#/definitions/Error'},
7883 'watcher-id': {'type': 'string'}},
7884 'required': ['watcher-id',
7887 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/OfferStatusWatchResult'}},
7889 'Stop': {'type': 'object'}},
7893 @ReturnMapping(OfferStatusWatchResult
)
7894 async def Next(self
):
7897 Returns -> typing.Union[typing.Sequence[~OfferStatusChange], _ForwardRef('Error'), str]
7899 # map input types to rpc msg
7901 msg
= dict(type='OfferStatusWatcher',
7906 reply
= await self
.rpc(msg
)
7911 @ReturnMapping(None)
7912 async def Stop(self
):
7917 # map input types to rpc msg
7919 msg
= dict(type='OfferStatusWatcher',
7924 reply
= await self
.rpc(msg
)
7929 class PayloadsFacade(Type
):
7932 schema
= {'definitions': {'Payload': {'additionalProperties': False,
7933 'properties': {'class': {'type': 'string'},
7934 'id': {'type': 'string'},
7935 'labels': {'items': {'type': 'string'},
7937 'machine': {'type': 'string'},
7938 'status': {'type': 'string'},
7939 'type': {'type': 'string'},
7940 'unit': {'type': 'string'}},
7941 'required': ['class',
7949 'PayloadListArgs': {'additionalProperties': False,
7950 'properties': {'patterns': {'items': {'type': 'string'},
7952 'required': ['patterns'],
7954 'PayloadListResults': {'additionalProperties': False,
7955 'properties': {'results': {'items': {'$ref': '#/definitions/Payload'},
7957 'required': ['results'],
7959 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/PayloadListArgs'},
7960 'Result': {'$ref': '#/definitions/PayloadListResults'}},
7965 @ReturnMapping(PayloadListResults
)
7966 async def List(self
, patterns
):
7968 patterns : typing.Sequence[str]
7969 Returns -> typing.Sequence[~Payload]
7971 # map input types to rpc msg
7973 msg
= dict(type='Payloads',
7977 _params
['patterns'] = patterns
7978 reply
= await self
.rpc(msg
)
7983 class PayloadsHookContextFacade(Type
):
7984 name
= 'PayloadsHookContext'
7986 schema
= {'definitions': {'Entities': {'additionalProperties': False,
7987 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7989 'required': ['entities'],
7991 'Entity': {'additionalProperties': False,
7992 'properties': {'tag': {'type': 'string'}},
7993 'required': ['tag'],
7995 'Error': {'additionalProperties': False,
7996 'properties': {'code': {'type': 'string'},
7997 'info': {'$ref': '#/definitions/ErrorInfo'},
7998 'message': {'type': 'string'}},
7999 'required': ['message', 'code'],
8001 'ErrorInfo': {'additionalProperties': False,
8002 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8003 'macaroon-path': {'type': 'string'}},
8005 'LookUpPayloadArg': {'additionalProperties': False,
8006 'properties': {'id': {'type': 'string'},
8007 'name': {'type': 'string'}},
8008 'required': ['name', 'id'],
8010 'LookUpPayloadArgs': {'additionalProperties': False,
8011 'properties': {'args': {'items': {'$ref': '#/definitions/LookUpPayloadArg'},
8013 'required': ['args'],
8015 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8016 'Payload': {'additionalProperties': False,
8017 'properties': {'class': {'type': 'string'},
8018 'id': {'type': 'string'},
8019 'labels': {'items': {'type': 'string'},
8021 'machine': {'type': 'string'},
8022 'status': {'type': 'string'},
8023 'type': {'type': 'string'},
8024 'unit': {'type': 'string'}},
8025 'required': ['class',
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',
8042 'PayloadResults': {'additionalProperties': False,
8043 'properties': {'results': {'items': {'$ref': '#/definitions/PayloadResult'},
8045 'required': ['results'],
8047 'SetPayloadStatusArg': {'additionalProperties': False,
8048 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
8049 'status': {'type': 'string'}},
8050 'required': ['Entity', 'status'],
8052 'SetPayloadStatusArgs': {'additionalProperties': False,
8053 'properties': {'args': {'items': {'$ref': '#/definitions/SetPayloadStatusArg'},
8055 'required': ['args'],
8057 'TrackPayloadArgs': {'additionalProperties': False,
8058 'properties': {'payloads': {'items': {'$ref': '#/definitions/Payload'},
8060 'required': ['payloads'],
8062 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8063 'Result': {'$ref': '#/definitions/PayloadResults'}},
8065 'LookUp': {'properties': {'Params': {'$ref': '#/definitions/LookUpPayloadArgs'},
8066 'Result': {'$ref': '#/definitions/PayloadResults'}},
8068 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetPayloadStatusArgs'},
8069 'Result': {'$ref': '#/definitions/PayloadResults'}},
8071 'Track': {'properties': {'Params': {'$ref': '#/definitions/TrackPayloadArgs'},
8072 'Result': {'$ref': '#/definitions/PayloadResults'}},
8074 'Untrack': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8075 'Result': {'$ref': '#/definitions/PayloadResults'}},
8080 @ReturnMapping(PayloadResults
)
8081 async def List(self
, entities
):
8083 entities : typing.Sequence[~Entity]
8084 Returns -> typing.Sequence[~PayloadResult]
8086 # map input types to rpc msg
8088 msg
= dict(type='PayloadsHookContext',
8092 _params
['entities'] = entities
8093 reply
= await self
.rpc(msg
)
8098 @ReturnMapping(PayloadResults
)
8099 async def LookUp(self
, args
):
8101 args : typing.Sequence[~LookUpPayloadArg]
8102 Returns -> typing.Sequence[~PayloadResult]
8104 # map input types to rpc msg
8106 msg
= dict(type='PayloadsHookContext',
8110 _params
['args'] = args
8111 reply
= await self
.rpc(msg
)
8116 @ReturnMapping(PayloadResults
)
8117 async def SetStatus(self
, args
):
8119 args : typing.Sequence[~SetPayloadStatusArg]
8120 Returns -> typing.Sequence[~PayloadResult]
8122 # map input types to rpc msg
8124 msg
= dict(type='PayloadsHookContext',
8125 request
='SetStatus',
8128 _params
['args'] = args
8129 reply
= await self
.rpc(msg
)
8134 @ReturnMapping(PayloadResults
)
8135 async def Track(self
, payloads
):
8137 payloads : typing.Sequence[~Payload]
8138 Returns -> typing.Sequence[~PayloadResult]
8140 # map input types to rpc msg
8142 msg
= dict(type='PayloadsHookContext',
8146 _params
['payloads'] = payloads
8147 reply
= await self
.rpc(msg
)
8152 @ReturnMapping(PayloadResults
)
8153 async def Untrack(self
, entities
):
8155 entities : typing.Sequence[~Entity]
8156 Returns -> typing.Sequence[~PayloadResult]
8158 # map input types to rpc msg
8160 msg
= dict(type='PayloadsHookContext',
8164 _params
['entities'] = entities
8165 reply
= await self
.rpc(msg
)
8170 class PingerFacade(Type
):
8173 schema
= {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
8177 @ReturnMapping(None)
8178 async def Ping(self
):
8183 # map input types to rpc msg
8185 msg
= dict(type='Pinger',
8190 reply
= await self
.rpc(msg
)
8195 @ReturnMapping(None)
8196 async def Stop(self
):
8201 # map input types to rpc msg
8203 msg
= dict(type='Pinger',
8208 reply
= await self
.rpc(msg
)
8213 class ProxyUpdaterFacade(Type
):
8214 name
= 'ProxyUpdater'
8216 schema
= {'definitions': {'Entities': {'additionalProperties': False,
8217 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
8219 'required': ['entities'],
8221 'Entity': {'additionalProperties': False,
8222 'properties': {'tag': {'type': 'string'}},
8223 'required': ['tag'],
8225 'Error': {'additionalProperties': False,
8226 'properties': {'code': {'type': 'string'},
8227 'info': {'$ref': '#/definitions/ErrorInfo'},
8228 'message': {'type': 'string'}},
8229 'required': ['message', 'code'],
8231 'ErrorInfo': {'additionalProperties': False,
8232 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8233 'macaroon-path': {'type': 'string'}},
8235 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8236 'NotifyWatchResult': {'additionalProperties': False,
8237 'properties': {'NotifyWatcherId': {'type': 'string'},
8238 'error': {'$ref': '#/definitions/Error'}},
8239 'required': ['NotifyWatcherId'],
8241 'NotifyWatchResults': {'additionalProperties': False,
8242 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
8244 'required': ['results'],
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',
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'],
8263 'ProxyConfigResults': {'additionalProperties': False,
8264 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
8266 'required': ['results'],
8268 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8269 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
8271 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8272 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
8277 @ReturnMapping(ProxyConfigResults
)
8278 async def ProxyConfig(self
, entities
):
8280 entities : typing.Sequence[~Entity]
8281 Returns -> typing.Sequence[~ProxyConfigResult]
8283 # map input types to rpc msg
8285 msg
= dict(type='ProxyUpdater',
8286 request
='ProxyConfig',
8289 _params
['entities'] = entities
8290 reply
= await self
.rpc(msg
)
8295 @ReturnMapping(NotifyWatchResults
)
8296 async def WatchForProxyConfigAndAPIHostPortChanges(self
, entities
):
8298 entities : typing.Sequence[~Entity]
8299 Returns -> typing.Sequence[~NotifyWatchResult]
8301 # map input types to rpc msg
8303 msg
= dict(type='ProxyUpdater',
8304 request
='WatchForProxyConfigAndAPIHostPortChanges',
8307 _params
['entities'] = entities
8308 reply
= await self
.rpc(msg
)
8313 class RelationStatusWatcherFacade(Type
):
8314 name
= 'RelationStatusWatcher'
8316 schema
= {'definitions': {'Error': {'additionalProperties': False,
8317 'properties': {'code': {'type': 'string'},
8318 'info': {'$ref': '#/definitions/ErrorInfo'},
8319 'message': {'type': 'string'}},
8320 'required': ['message', 'code'],
8322 'ErrorInfo': {'additionalProperties': False,
8323 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8324 'macaroon-path': {'type': 'string'}},
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'}},
8335 'suspended-reason'],
8337 'RelationLifeSuspendedStatusWatchResult': {'additionalProperties': False,
8338 'properties': {'changes': {'items': {'$ref': '#/definitions/RelationLifeSuspendedStatusChange'},
8340 'error': {'$ref': '#/definitions/Error'},
8341 'watcher-id': {'type': 'string'}},
8342 'required': ['watcher-id',
8345 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationLifeSuspendedStatusWatchResult'}},
8347 'Stop': {'type': 'object'}},
8351 @ReturnMapping(RelationLifeSuspendedStatusWatchResult
)
8352 async def Next(self
):
8355 Returns -> typing.Union[typing.Sequence[~RelationLifeSuspendedStatusChange], _ForwardRef('Error'), str]
8357 # map input types to rpc msg
8359 msg
= dict(type='RelationStatusWatcher',
8364 reply
= await self
.rpc(msg
)
8369 @ReturnMapping(None)
8370 async def Stop(self
):
8375 # map input types to rpc msg
8377 msg
= dict(type='RelationStatusWatcher',
8382 reply
= await self
.rpc(msg
)
8387 class RelationUnitsWatcherFacade(Type
):
8388 name
= 'RelationUnitsWatcher'
8390 schema
= {'definitions': {'Error': {'additionalProperties': False,
8391 'properties': {'code': {'type': 'string'},
8392 'info': {'$ref': '#/definitions/ErrorInfo'},
8393 'message': {'type': 'string'}},
8394 'required': ['message', 'code'],
8396 'ErrorInfo': {'additionalProperties': False,
8397 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8398 'macaroon-path': {'type': 'string'}},
8400 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8401 'RelationUnitsChange': {'additionalProperties': False,
8402 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
8404 'departed': {'items': {'type': 'string'},
8406 'required': ['changed'],
8408 'RelationUnitsWatchResult': {'additionalProperties': False,
8409 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
8410 'error': {'$ref': '#/definitions/Error'},
8411 'watcher-id': {'type': 'string'}},
8412 'required': ['watcher-id',
8415 'UnitSettings': {'additionalProperties': False,
8416 'properties': {'version': {'type': 'integer'}},
8417 'required': ['version'],
8419 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
8421 'Stop': {'type': 'object'}},
8425 @ReturnMapping(RelationUnitsWatchResult
)
8426 async def Next(self
):
8429 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
8431 # map input types to rpc msg
8433 msg
= dict(type='RelationUnitsWatcher',
8438 reply
= await self
.rpc(msg
)
8443 @ReturnMapping(None)
8444 async def Stop(self
):
8449 # map input types to rpc msg
8451 msg
= dict(type='RelationUnitsWatcher',
8456 reply
= await self
.rpc(msg
)
8461 class RemoteApplicationWatcherFacade(Type
):
8462 name
= 'RemoteApplicationWatcher'
8464 schema
= {'definitions': {'Error': {'additionalProperties': False,
8465 'properties': {'code': {'type': 'string'},
8466 'info': {'$ref': '#/definitions/ErrorInfo'},
8467 'message': {'type': 'string'}},
8468 'required': ['message', 'code'],
8470 'ErrorInfo': {'additionalProperties': False,
8471 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8472 'macaroon-path': {'type': 'string'}},
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',
8483 'RemoteApplicationWatchResult': {'additionalProperties': False,
8484 'properties': {'change': {'$ref': '#/definitions/RemoteApplicationChange'},
8485 'error': {'$ref': '#/definitions/Error'},
8486 'id': {'type': 'string'}},
8489 'RemoteEntityId': {'additionalProperties': False,
8490 'properties': {'model-uuid': {'type': 'string'},
8491 'token': {'type': 'string'}},
8492 'required': ['model-uuid', 'token'],
8494 'RemoteRelationChange': {'additionalProperties': False,
8495 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
8497 'departed-units': {'items': {'type': 'string'},
8499 'id': {'type': 'integer'},
8500 'life': {'type': 'string'}},
8501 'required': ['id', 'life'],
8503 'RemoteRelationUnitChange': {'additionalProperties': False,
8504 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
8507 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
8508 'required': ['unit-id'],
8510 'RemoteRelationsChange': {'additionalProperties': False,
8511 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
8513 'initial': {'type': 'boolean'},
8514 'removed': {'items': {'type': 'integer'},
8516 'required': ['initial'],
8518 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteApplicationWatchResult'}},
8520 'Stop': {'type': 'object'}},
8524 @ReturnMapping(RemoteApplicationWatchResult
)
8525 async def Next(self
):
8528 Returns -> typing.Union[_ForwardRef('RemoteApplicationChange'), _ForwardRef('Error'), str]
8530 # map input types to rpc msg
8532 msg
= dict(type='RemoteApplicationWatcher',
8537 reply
= await self
.rpc(msg
)
8542 @ReturnMapping(None)
8543 async def Stop(self
):
8548 # map input types to rpc msg
8550 msg
= dict(type='RemoteApplicationWatcher',
8555 reply
= await self
.rpc(msg
)
8560 class RemoteRelationsFacade(Type
):
8561 name
= 'RemoteRelations'
8563 schema
= {'definitions': {'ControllerAPIInfoResult': {'additionalProperties': False,
8564 'properties': {'addresses': {'items': {'type': 'string'},
8566 'cacert': {'type': 'string'},
8567 'error': {'$ref': '#/definitions/Error'}},
8568 'required': ['addresses',
8571 'ControllerAPIInfoResults': {'additionalProperties': False,
8572 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
8574 'required': ['results'],
8576 'ControllerConfigResult': {'additionalProperties': False,
8577 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
8580 'required': ['config'],
8582 'Entities': {'additionalProperties': False,
8583 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
8585 'required': ['entities'],
8587 'Entity': {'additionalProperties': False,
8588 'properties': {'tag': {'type': 'string'}},
8589 'required': ['tag'],
8591 'EntityMacaroonArg': {'additionalProperties': False,
8592 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8593 'tag': {'type': 'string'}},
8594 'required': ['macaroon', 'tag'],
8596 'EntityMacaroonArgs': {'additionalProperties': False,
8597 'properties': {'Args': {'items': {'$ref': '#/definitions/EntityMacaroonArg'},
8599 'required': ['Args'],
8601 'EntityStatusArgs': {'additionalProperties': False,
8602 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8605 'info': {'type': 'string'},
8606 'status': {'type': 'string'},
8607 'tag': {'type': 'string'}},
8613 'Error': {'additionalProperties': False,
8614 'properties': {'code': {'type': 'string'},
8615 'info': {'$ref': '#/definitions/ErrorInfo'},
8616 'message': {'type': 'string'}},
8617 'required': ['message', 'code'],
8619 'ErrorInfo': {'additionalProperties': False,
8620 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8621 'macaroon-path': {'type': 'string'}},
8623 'ErrorResult': {'additionalProperties': False,
8624 'properties': {'error': {'$ref': '#/definitions/Error'}},
8626 'ErrorResults': {'additionalProperties': False,
8627 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
8629 'required': ['results'],
8631 'GetTokenArg': {'additionalProperties': False,
8632 'properties': {'tag': {'type': 'string'}},
8633 'required': ['tag'],
8635 'GetTokenArgs': {'additionalProperties': False,
8636 'properties': {'Args': {'items': {'$ref': '#/definitions/GetTokenArg'},
8638 'required': ['Args'],
8640 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8641 'RelationUnit': {'additionalProperties': False,
8642 'properties': {'relation': {'type': 'string'},
8643 'unit': {'type': 'string'}},
8644 'required': ['relation', 'unit'],
8646 'RelationUnits': {'additionalProperties': False,
8647 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
8649 'required': ['relation-units'],
8651 'RelationUnitsChange': {'additionalProperties': False,
8652 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
8654 'departed': {'items': {'type': 'string'},
8656 'required': ['changed'],
8658 'RelationUnitsWatchResult': {'additionalProperties': False,
8659 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
8660 'error': {'$ref': '#/definitions/Error'},
8661 'watcher-id': {'type': 'string'}},
8662 'required': ['watcher-id',
8665 'RelationUnitsWatchResults': {'additionalProperties': False,
8666 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
8668 'required': ['results'],
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',
8681 'is-consumer-proxy'],
8683 'RemoteApplicationResult': {'additionalProperties': False,
8684 'properties': {'error': {'$ref': '#/definitions/Error'},
8685 'result': {'$ref': '#/definitions/RemoteApplication'}},
8687 'RemoteApplicationResults': {'additionalProperties': False,
8688 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteApplicationResult'},
8691 'RemoteEndpoint': {'additionalProperties': False,
8692 'properties': {'interface': {'type': 'string'},
8693 'limit': {'type': 'integer'},
8694 'name': {'type': 'string'},
8695 'role': {'type': 'string'}},
8696 'required': ['name',
8701 'RemoteEntityTokenArg': {'additionalProperties': False,
8702 'properties': {'tag': {'type': 'string'},
8703 'token': {'type': 'string'}},
8704 'required': ['tag'],
8706 'RemoteEntityTokenArgs': {'additionalProperties': False,
8707 'properties': {'Args': {'items': {'$ref': '#/definitions/RemoteEntityTokenArg'},
8709 'required': ['Args'],
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',
8727 'remote-application-name',
8728 'remote-endpoint-name',
8729 'source-model-uuid'],
8731 'RemoteRelationChangeEvent': {'additionalProperties': False,
8732 'properties': {'application-token': {'type': 'string'},
8733 'changed-units': {'items': {'$ref': '#/definitions/RemoteRelationUnitChange'},
8735 'departed-units': {'items': {'type': 'integer'},
8737 'force-cleanup': {'type': 'boolean'},
8738 'life': {'type': 'string'},
8739 'macaroons': {'items': {'$ref': '#/definitions/Macaroon'},
8741 'relation-token': {'type': 'string'},
8742 'suspended': {'type': 'boolean'},
8743 'suspended-reason': {'type': 'string'}},
8744 'required': ['relation-token',
8745 'application-token',
8748 'RemoteRelationResult': {'additionalProperties': False,
8749 'properties': {'error': {'$ref': '#/definitions/Error'},
8750 'result': {'$ref': '#/definitions/RemoteRelation'}},
8752 'RemoteRelationResults': {'additionalProperties': False,
8753 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteRelationResult'},
8755 'required': ['results'],
8757 'RemoteRelationUnitChange': {'additionalProperties': False,
8758 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
8761 'unit-id': {'type': 'integer'}},
8762 'required': ['unit-id'],
8764 'RemoteRelationsChanges': {'additionalProperties': False,
8765 'properties': {'changes': {'items': {'$ref': '#/definitions/RemoteRelationChangeEvent'},
8768 'SetStatus': {'additionalProperties': False,
8769 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
8771 'required': ['entities'],
8773 'SettingsResult': {'additionalProperties': False,
8774 'properties': {'error': {'$ref': '#/definitions/Error'},
8775 'settings': {'patternProperties': {'.*': {'type': 'string'}},
8777 'required': ['settings'],
8779 'SettingsResults': {'additionalProperties': False,
8780 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
8782 'required': ['results'],
8784 'StringResult': {'additionalProperties': False,
8785 'properties': {'error': {'$ref': '#/definitions/Error'},
8786 'result': {'type': 'string'}},
8787 'required': ['result'],
8789 'StringResults': {'additionalProperties': False,
8790 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
8792 'required': ['results'],
8794 'StringsWatchResult': {'additionalProperties': False,
8795 'properties': {'changes': {'items': {'type': 'string'},
8797 'error': {'$ref': '#/definitions/Error'},
8798 'watcher-id': {'type': 'string'}},
8799 'required': ['watcher-id'],
8801 'StringsWatchResults': {'additionalProperties': False,
8802 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
8804 'required': ['results'],
8806 'TokenResult': {'additionalProperties': False,
8807 'properties': {'error': {'$ref': '#/definitions/Error'},
8808 'token': {'type': 'string'}},
8810 'TokenResults': {'additionalProperties': False,
8811 'properties': {'results': {'items': {'$ref': '#/definitions/TokenResult'},
8814 'UnitSettings': {'additionalProperties': False,
8815 'properties': {'version': {'type': 'integer'}},
8816 'required': ['version'],
8818 'properties': {'ConsumeRemoteRelationChanges': {'properties': {'Params': {'$ref': '#/definitions/RemoteRelationsChanges'},
8819 'Result': {'$ref': '#/definitions/ErrorResults'}},
8821 'ControllerAPIInfoForModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8822 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
8824 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
8826 'ExportEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8827 'Result': {'$ref': '#/definitions/TokenResults'}},
8829 'GetTokens': {'properties': {'Params': {'$ref': '#/definitions/GetTokenArgs'},
8830 'Result': {'$ref': '#/definitions/StringResults'}},
8832 'ImportRemoteEntities': {'properties': {'Params': {'$ref': '#/definitions/RemoteEntityTokenArgs'},
8833 'Result': {'$ref': '#/definitions/ErrorResults'}},
8835 'RelationUnitSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
8836 'Result': {'$ref': '#/definitions/SettingsResults'}},
8838 'Relations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8839 'Result': {'$ref': '#/definitions/RemoteRelationResults'}},
8841 'RemoteApplications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8842 'Result': {'$ref': '#/definitions/RemoteApplicationResults'}},
8844 'SaveMacaroons': {'properties': {'Params': {'$ref': '#/definitions/EntityMacaroonArgs'},
8845 'Result': {'$ref': '#/definitions/ErrorResults'}},
8847 'SetRemoteApplicationsStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
8848 'Result': {'$ref': '#/definitions/ErrorResults'}},
8850 'WatchLocalRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8851 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
8853 'WatchRemoteApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8854 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
8856 'WatchRemoteApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
8858 'WatchRemoteRelations': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
8863 @ReturnMapping(ErrorResults
)
8864 async def ConsumeRemoteRelationChanges(self
, changes
):
8866 changes : typing.Sequence[~RemoteRelationChangeEvent]
8867 Returns -> typing.Sequence[~ErrorResult]
8869 # map input types to rpc msg
8871 msg
= dict(type='RemoteRelations',
8872 request
='ConsumeRemoteRelationChanges',
8875 _params
['changes'] = changes
8876 reply
= await self
.rpc(msg
)
8881 @ReturnMapping(ControllerAPIInfoResults
)
8882 async def ControllerAPIInfoForModels(self
, entities
):
8884 entities : typing.Sequence[~Entity]
8885 Returns -> typing.Sequence[~ControllerAPIInfoResult]
8887 # map input types to rpc msg
8889 msg
= dict(type='RemoteRelations',
8890 request
='ControllerAPIInfoForModels',
8893 _params
['entities'] = entities
8894 reply
= await self
.rpc(msg
)
8899 @ReturnMapping(ControllerConfigResult
)
8900 async def ControllerConfig(self
):
8903 Returns -> typing.Mapping[str, typing.Any]
8905 # map input types to rpc msg
8907 msg
= dict(type='RemoteRelations',
8908 request
='ControllerConfig',
8912 reply
= await self
.rpc(msg
)
8917 @ReturnMapping(TokenResults
)
8918 async def ExportEntities(self
, entities
):
8920 entities : typing.Sequence[~Entity]
8921 Returns -> typing.Sequence[~TokenResult]
8923 # map input types to rpc msg
8925 msg
= dict(type='RemoteRelations',
8926 request
='ExportEntities',
8929 _params
['entities'] = entities
8930 reply
= await self
.rpc(msg
)
8935 @ReturnMapping(StringResults
)
8936 async def GetTokens(self
, args
):
8938 args : typing.Sequence[~GetTokenArg]
8939 Returns -> typing.Sequence[~StringResult]
8941 # map input types to rpc msg
8943 msg
= dict(type='RemoteRelations',
8944 request
='GetTokens',
8947 _params
['Args'] = args
8948 reply
= await self
.rpc(msg
)
8953 @ReturnMapping(ErrorResults
)
8954 async def ImportRemoteEntities(self
, args
):
8956 args : typing.Sequence[~RemoteEntityTokenArg]
8957 Returns -> typing.Sequence[~ErrorResult]
8959 # map input types to rpc msg
8961 msg
= dict(type='RemoteRelations',
8962 request
='ImportRemoteEntities',
8965 _params
['Args'] = args
8966 reply
= await self
.rpc(msg
)
8971 @ReturnMapping(SettingsResults
)
8972 async def RelationUnitSettings(self
, relation_units
):
8974 relation_units : typing.Sequence[~RelationUnit]
8975 Returns -> typing.Sequence[~SettingsResult]
8977 # map input types to rpc msg
8979 msg
= dict(type='RemoteRelations',
8980 request
='RelationUnitSettings',
8983 _params
['relation-units'] = relation_units
8984 reply
= await self
.rpc(msg
)
8989 @ReturnMapping(RemoteRelationResults
)
8990 async def Relations(self
, entities
):
8992 entities : typing.Sequence[~Entity]
8993 Returns -> typing.Sequence[~RemoteRelationResult]
8995 # map input types to rpc msg
8997 msg
= dict(type='RemoteRelations',
8998 request
='Relations',
9001 _params
['entities'] = entities
9002 reply
= await self
.rpc(msg
)
9007 @ReturnMapping(RemoteApplicationResults
)
9008 async def RemoteApplications(self
, entities
):
9010 entities : typing.Sequence[~Entity]
9011 Returns -> typing.Sequence[~RemoteApplicationResult]
9013 # map input types to rpc msg
9015 msg
= dict(type='RemoteRelations',
9016 request
='RemoteApplications',
9019 _params
['entities'] = entities
9020 reply
= await self
.rpc(msg
)
9025 @ReturnMapping(ErrorResults
)
9026 async def SaveMacaroons(self
, args
):
9028 args : typing.Sequence[~EntityMacaroonArg]
9029 Returns -> typing.Sequence[~ErrorResult]
9031 # map input types to rpc msg
9033 msg
= dict(type='RemoteRelations',
9034 request
='SaveMacaroons',
9037 _params
['Args'] = args
9038 reply
= await self
.rpc(msg
)
9043 @ReturnMapping(ErrorResults
)
9044 async def SetRemoteApplicationsStatus(self
, entities
):
9046 entities : typing.Sequence[~EntityStatusArgs]
9047 Returns -> typing.Sequence[~ErrorResult]
9049 # map input types to rpc msg
9051 msg
= dict(type='RemoteRelations',
9052 request
='SetRemoteApplicationsStatus',
9055 _params
['entities'] = entities
9056 reply
= await self
.rpc(msg
)
9061 @ReturnMapping(RelationUnitsWatchResults
)
9062 async def WatchLocalRelationUnits(self
, entities
):
9064 entities : typing.Sequence[~Entity]
9065 Returns -> typing.Sequence[~RelationUnitsWatchResult]
9067 # map input types to rpc msg
9069 msg
= dict(type='RemoteRelations',
9070 request
='WatchLocalRelationUnits',
9073 _params
['entities'] = entities
9074 reply
= await self
.rpc(msg
)
9079 @ReturnMapping(StringsWatchResults
)
9080 async def WatchRemoteApplicationRelations(self
, entities
):
9082 entities : typing.Sequence[~Entity]
9083 Returns -> typing.Sequence[~StringsWatchResult]
9085 # map input types to rpc msg
9087 msg
= dict(type='RemoteRelations',
9088 request
='WatchRemoteApplicationRelations',
9091 _params
['entities'] = entities
9092 reply
= await self
.rpc(msg
)
9097 @ReturnMapping(StringsWatchResult
)
9098 async def WatchRemoteApplications(self
):
9101 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
9103 # map input types to rpc msg
9105 msg
= dict(type='RemoteRelations',
9106 request
='WatchRemoteApplications',
9110 reply
= await self
.rpc(msg
)
9115 @ReturnMapping(StringsWatchResult
)
9116 async def WatchRemoteRelations(self
):
9119 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
9121 # map input types to rpc msg
9123 msg
= dict(type='RemoteRelations',
9124 request
='WatchRemoteRelations',
9128 reply
= await self
.rpc(msg
)
9133 class RemoteRelationsWatcherFacade(Type
):
9134 name
= 'RemoteRelationsWatcher'
9136 schema
= {'definitions': {'Error': {'additionalProperties': False,
9137 'properties': {'code': {'type': 'string'},
9138 'info': {'$ref': '#/definitions/ErrorInfo'},
9139 'message': {'type': 'string'}},
9140 'required': ['message', 'code'],
9142 'ErrorInfo': {'additionalProperties': False,
9143 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9144 'macaroon-path': {'type': 'string'}},
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'],
9152 'RemoteRelationChange': {'additionalProperties': False,
9153 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
9155 'departed-units': {'items': {'type': 'string'},
9157 'id': {'type': 'integer'},
9158 'life': {'type': 'string'}},
9159 'required': ['id', 'life'],
9161 'RemoteRelationUnitChange': {'additionalProperties': False,
9162 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
9165 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
9166 'required': ['unit-id'],
9168 'RemoteRelationsChange': {'additionalProperties': False,
9169 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
9171 'initial': {'type': 'boolean'},
9172 'removed': {'items': {'type': 'integer'},
9174 'required': ['initial'],
9176 'RemoteRelationsWatchResult': {'additionalProperties': False,
9177 'properties': {'RemoteRelationsWatcherId': {'type': 'string'},
9178 'change': {'$ref': '#/definitions/RemoteRelationsChange'},
9179 'error': {'$ref': '#/definitions/Error'}},
9180 'required': ['RemoteRelationsWatcherId'],
9182 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteRelationsWatchResult'}},
9184 'Stop': {'type': 'object'}},
9188 @ReturnMapping(RemoteRelationsWatchResult
)
9189 async def Next(self
):
9192 Returns -> typing.Union[str, _ForwardRef('RemoteRelationsChange'), _ForwardRef('Error')]
9194 # map input types to rpc msg
9196 msg
= dict(type='RemoteRelationsWatcher',
9201 reply
= await self
.rpc(msg
)
9206 @ReturnMapping(None)
9207 async def Stop(self
):
9212 # map input types to rpc msg
9214 msg
= dict(type='RemoteRelationsWatcher',
9219 reply
= await self
.rpc(msg
)
9224 class ResourcesFacade(Type
):
9227 schema
= {'definitions': {'AddCharmWithAuthorization': {'additionalProperties': False,
9228 'properties': {'channel': {'type': 'string'},
9229 'force': {'type': 'boolean'},
9230 'macaroon': {'$ref': '#/definitions/Macaroon'},
9231 'url': {'type': 'string'}},
9237 'AddPendingResourcesArgs': {'additionalProperties': False,
9238 'properties': {'AddCharmWithAuthorization': {'$ref': '#/definitions/AddCharmWithAuthorization'},
9239 'Entity': {'$ref': '#/definitions/Entity'},
9240 'resources': {'items': {'$ref': '#/definitions/CharmResource'},
9242 'required': ['Entity',
9243 'AddCharmWithAuthorization',
9246 'AddPendingResourcesResult': {'additionalProperties': False,
9247 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
9248 'pending-ids': {'items': {'type': 'string'},
9250 'required': ['ErrorResult',
9253 'CharmResource': {'additionalProperties': False,
9254 'properties': {'description': {'type': 'string'},
9255 'fingerprint': {'items': {'type': 'integer'},
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',
9271 'Entity': {'additionalProperties': False,
9272 'properties': {'tag': {'type': 'string'}},
9273 'required': ['tag'],
9275 'Error': {'additionalProperties': False,
9276 'properties': {'code': {'type': 'string'},
9277 'info': {'$ref': '#/definitions/ErrorInfo'},
9278 'message': {'type': 'string'}},
9279 'required': ['message', 'code'],
9281 'ErrorInfo': {'additionalProperties': False,
9282 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9283 'macaroon-path': {'type': 'string'}},
9285 'ErrorResult': {'additionalProperties': False,
9286 'properties': {'error': {'$ref': '#/definitions/Error'}},
9288 'ListResourcesArgs': {'additionalProperties': False,
9289 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9291 'required': ['entities'],
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',
9301 'username': {'type': 'string'}},
9302 'required': ['CharmResource',
9309 'ResourcesResult': {'additionalProperties': False,
9310 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
9311 'charm-store-resources': {'items': {'$ref': '#/definitions/CharmResource'},
9313 'resources': {'items': {'$ref': '#/definitions/Resource'},
9315 'unit-resources': {'items': {'$ref': '#/definitions/UnitResources'},
9317 'required': ['ErrorResult',
9319 'charm-store-resources',
9322 'ResourcesResults': {'additionalProperties': False,
9323 'properties': {'results': {'items': {'$ref': '#/definitions/ResourcesResult'},
9325 'required': ['results'],
9327 'UnitResources': {'additionalProperties': False,
9328 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
9329 'download-progress': {'patternProperties': {'.*': {'type': 'integer'}},
9331 'resources': {'items': {'$ref': '#/definitions/Resource'},
9333 'required': ['Entity',
9335 'download-progress'],
9337 'properties': {'AddPendingResources': {'properties': {'Params': {'$ref': '#/definitions/AddPendingResourcesArgs'},
9338 'Result': {'$ref': '#/definitions/AddPendingResourcesResult'}},
9340 'ListResources': {'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'},
9341 'Result': {'$ref': '#/definitions/ResourcesResults'}},
9346 @ReturnMapping(AddPendingResourcesResult
)
9347 async def AddPendingResources(self
, addcharmwithauthorization
, entity
, resources
):
9349 addcharmwithauthorization : AddCharmWithAuthorization
9351 resources : typing.Sequence[~CharmResource]
9352 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence[str]]
9354 # map input types to rpc msg
9356 msg
= dict(type='Resources',
9357 request
='AddPendingResources',
9360 _params
['AddCharmWithAuthorization'] = addcharmwithauthorization
9361 _params
['Entity'] = entity
9362 _params
['Resources'] = resources
9363 reply
= await self
.rpc(msg
)
9368 @ReturnMapping(ResourcesResults
)
9369 async def ListResources(self
, entities
):
9371 entities : typing.Sequence[~Entity]
9372 Returns -> typing.Sequence[~ResourcesResult]
9374 # map input types to rpc msg
9376 msg
= dict(type='Resources',
9377 request
='ListResources',
9380 _params
['entities'] = entities
9381 reply
= await self
.rpc(msg
)
9386 class ResourcesHookContextFacade(Type
):
9387 name
= 'ResourcesHookContext'
9389 schema
= {'definitions': {'CharmResource': {'additionalProperties': False,
9390 'properties': {'description': {'type': 'string'},
9391 'fingerprint': {'items': {'type': 'integer'},
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',
9407 'Error': {'additionalProperties': False,
9408 'properties': {'code': {'type': 'string'},
9409 'info': {'$ref': '#/definitions/ErrorInfo'},
9410 'message': {'type': 'string'}},
9411 'required': ['message', 'code'],
9413 'ErrorInfo': {'additionalProperties': False,
9414 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9415 'macaroon-path': {'type': 'string'}},
9417 'ErrorResult': {'additionalProperties': False,
9418 'properties': {'error': {'$ref': '#/definitions/Error'}},
9420 'ListUnitResourcesArgs': {'additionalProperties': False,
9421 'properties': {'resource-names': {'items': {'type': 'string'},
9423 'required': ['resource-names'],
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',
9433 'username': {'type': 'string'}},
9434 'required': ['CharmResource',
9441 'UnitResourceResult': {'additionalProperties': False,
9442 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
9443 'resource': {'$ref': '#/definitions/Resource'}},
9444 'required': ['ErrorResult', 'resource'],
9446 'UnitResourcesResult': {'additionalProperties': False,
9447 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
9448 'resources': {'items': {'$ref': '#/definitions/UnitResourceResult'},
9450 'required': ['ErrorResult',
9453 'properties': {'GetResourceInfo': {'properties': {'Params': {'$ref': '#/definitions/ListUnitResourcesArgs'},
9454 'Result': {'$ref': '#/definitions/UnitResourcesResult'}},
9459 @ReturnMapping(UnitResourcesResult
)
9460 async def GetResourceInfo(self
, resource_names
):
9462 resource_names : typing.Sequence[str]
9463 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence[~UnitResourceResult]]
9465 # map input types to rpc msg
9467 msg
= dict(type='ResourcesHookContext',
9468 request
='GetResourceInfo',
9471 _params
['resource-names'] = resource_names
9472 reply
= await self
.rpc(msg
)
9477 class RetryStrategyFacade(Type
):
9478 name
= 'RetryStrategy'
9480 schema
= {'definitions': {'Entities': {'additionalProperties': False,
9481 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9483 'required': ['entities'],
9485 'Entity': {'additionalProperties': False,
9486 'properties': {'tag': {'type': 'string'}},
9487 'required': ['tag'],
9489 'Error': {'additionalProperties': False,
9490 'properties': {'code': {'type': 'string'},
9491 'info': {'$ref': '#/definitions/ErrorInfo'},
9492 'message': {'type': 'string'}},
9493 'required': ['message', 'code'],
9495 'ErrorInfo': {'additionalProperties': False,
9496 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9497 'macaroon-path': {'type': 'string'}},
9499 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9500 'NotifyWatchResult': {'additionalProperties': False,
9501 'properties': {'NotifyWatcherId': {'type': 'string'},
9502 'error': {'$ref': '#/definitions/Error'}},
9503 'required': ['NotifyWatcherId'],
9505 'NotifyWatchResults': {'additionalProperties': False,
9506 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9508 'required': ['results'],
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',
9519 'jitter-retry-time',
9520 'retry-time-factor'],
9522 'RetryStrategyResult': {'additionalProperties': False,
9523 'properties': {'error': {'$ref': '#/definitions/Error'},
9524 'result': {'$ref': '#/definitions/RetryStrategy'}},
9526 'RetryStrategyResults': {'additionalProperties': False,
9527 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
9529 'required': ['results'],
9531 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9532 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
9534 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9535 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
9540 @ReturnMapping(RetryStrategyResults
)
9541 async def RetryStrategy(self
, entities
):
9543 entities : typing.Sequence[~Entity]
9544 Returns -> typing.Sequence[~RetryStrategyResult]
9546 # map input types to rpc msg
9548 msg
= dict(type='RetryStrategy',
9549 request
='RetryStrategy',
9552 _params
['entities'] = entities
9553 reply
= await self
.rpc(msg
)
9558 @ReturnMapping(NotifyWatchResults
)
9559 async def WatchRetryStrategy(self
, entities
):
9561 entities : typing.Sequence[~Entity]
9562 Returns -> typing.Sequence[~NotifyWatchResult]
9564 # map input types to rpc msg
9566 msg
= dict(type='RetryStrategy',
9567 request
='WatchRetryStrategy',
9570 _params
['entities'] = entities
9571 reply
= await self
.rpc(msg
)
9576 class SSHClientFacade(Type
):
9579 schema
= {'definitions': {'Entities': {'additionalProperties': False,
9580 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9582 'required': ['entities'],
9584 'Entity': {'additionalProperties': False,
9585 'properties': {'tag': {'type': 'string'}},
9586 'required': ['tag'],
9588 'Error': {'additionalProperties': False,
9589 'properties': {'code': {'type': 'string'},
9590 'info': {'$ref': '#/definitions/ErrorInfo'},
9591 'message': {'type': 'string'}},
9592 'required': ['message', 'code'],
9594 'ErrorInfo': {'additionalProperties': False,
9595 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9596 'macaroon-path': {'type': 'string'}},
9598 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9599 'SSHAddressResult': {'additionalProperties': False,
9600 'properties': {'address': {'type': 'string'},
9601 'error': {'$ref': '#/definitions/Error'}},
9603 'SSHAddressResults': {'additionalProperties': False,
9604 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
9606 'required': ['results'],
9608 'SSHProxyResult': {'additionalProperties': False,
9609 'properties': {'use-proxy': {'type': 'boolean'}},
9610 'required': ['use-proxy'],
9612 'SSHPublicKeysResult': {'additionalProperties': False,
9613 'properties': {'error': {'$ref': '#/definitions/Error'},
9614 'public-keys': {'items': {'type': 'string'},
9617 'SSHPublicKeysResults': {'additionalProperties': False,
9618 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
9620 'required': ['results'],
9622 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9623 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
9625 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
9627 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9628 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
9630 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9631 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
9636 @ReturnMapping(SSHAddressResults
)
9637 async def PrivateAddress(self
, entities
):
9639 entities : typing.Sequence[~Entity]
9640 Returns -> typing.Sequence[~SSHAddressResult]
9642 # map input types to rpc msg
9644 msg
= dict(type='SSHClient',
9645 request
='PrivateAddress',
9648 _params
['entities'] = entities
9649 reply
= await self
.rpc(msg
)
9654 @ReturnMapping(SSHProxyResult
)
9655 async def Proxy(self
):
9660 # map input types to rpc msg
9662 msg
= dict(type='SSHClient',
9667 reply
= await self
.rpc(msg
)
9672 @ReturnMapping(SSHAddressResults
)
9673 async def PublicAddress(self
, entities
):
9675 entities : typing.Sequence[~Entity]
9676 Returns -> typing.Sequence[~SSHAddressResult]
9678 # map input types to rpc msg
9680 msg
= dict(type='SSHClient',
9681 request
='PublicAddress',
9684 _params
['entities'] = entities
9685 reply
= await self
.rpc(msg
)
9690 @ReturnMapping(SSHPublicKeysResults
)
9691 async def PublicKeys(self
, entities
):
9693 entities : typing.Sequence[~Entity]
9694 Returns -> typing.Sequence[~SSHPublicKeysResult]
9696 # map input types to rpc msg
9698 msg
= dict(type='SSHClient',
9699 request
='PublicKeys',
9702 _params
['entities'] = entities
9703 reply
= await self
.rpc(msg
)
9708 class SingularFacade(Type
):
9711 schema
= {'definitions': {'Entities': {'additionalProperties': False,
9712 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9714 'required': ['entities'],
9716 'Entity': {'additionalProperties': False,
9717 'properties': {'tag': {'type': 'string'}},
9718 'required': ['tag'],
9720 'Error': {'additionalProperties': False,
9721 'properties': {'code': {'type': 'string'},
9722 'info': {'$ref': '#/definitions/ErrorInfo'},
9723 'message': {'type': 'string'}},
9724 'required': ['message', 'code'],
9726 'ErrorInfo': {'additionalProperties': False,
9727 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9728 'macaroon-path': {'type': 'string'}},
9730 'ErrorResult': {'additionalProperties': False,
9731 'properties': {'error': {'$ref': '#/definitions/Error'}},
9733 'ErrorResults': {'additionalProperties': False,
9734 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9736 'required': ['results'],
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',
9747 'SingularClaims': {'additionalProperties': False,
9748 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
9750 'required': ['claims'],
9752 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
9753 'Result': {'$ref': '#/definitions/ErrorResults'}},
9755 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9756 'Result': {'$ref': '#/definitions/ErrorResults'}},
9761 @ReturnMapping(ErrorResults
)
9762 async def Claim(self
, claims
):
9764 claims : typing.Sequence[~SingularClaim]
9765 Returns -> typing.Sequence[~ErrorResult]
9767 # map input types to rpc msg
9769 msg
= dict(type='Singular',
9773 _params
['claims'] = claims
9774 reply
= await self
.rpc(msg
)
9779 @ReturnMapping(ErrorResults
)
9780 async def Wait(self
, entities
):
9782 entities : typing.Sequence[~Entity]
9783 Returns -> typing.Sequence[~ErrorResult]
9785 # map input types to rpc msg
9787 msg
= dict(type='Singular',
9791 _params
['entities'] = entities
9792 reply
= await self
.rpc(msg
)
9797 class StringsWatcherFacade(Type
):
9798 name
= 'StringsWatcher'
9800 schema
= {'definitions': {'Error': {'additionalProperties': False,
9801 'properties': {'code': {'type': 'string'},
9802 'info': {'$ref': '#/definitions/ErrorInfo'},
9803 'message': {'type': 'string'}},
9804 'required': ['message', 'code'],
9806 'ErrorInfo': {'additionalProperties': False,
9807 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9808 'macaroon-path': {'type': 'string'}},
9810 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9811 'StringsWatchResult': {'additionalProperties': False,
9812 'properties': {'changes': {'items': {'type': 'string'},
9814 'error': {'$ref': '#/definitions/Error'},
9815 'watcher-id': {'type': 'string'}},
9816 'required': ['watcher-id'],
9818 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
9820 'Stop': {'type': 'object'}},
9824 @ReturnMapping(StringsWatchResult
)
9825 async def Next(self
):
9828 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
9830 # map input types to rpc msg
9832 msg
= dict(type='StringsWatcher',
9837 reply
= await self
.rpc(msg
)
9842 @ReturnMapping(None)
9843 async def Stop(self
):
9848 # map input types to rpc msg
9850 msg
= dict(type='StringsWatcher',
9855 reply
= await self
.rpc(msg
)
9860 class UndertakerFacade(Type
):
9863 schema
= {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
9864 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
9867 'info': {'type': 'string'},
9868 'status': {'type': 'string'},
9869 'tag': {'type': 'string'}},
9875 'Error': {'additionalProperties': False,
9876 'properties': {'code': {'type': 'string'},
9877 'info': {'$ref': '#/definitions/ErrorInfo'},
9878 'message': {'type': 'string'}},
9879 'required': ['message', 'code'],
9881 'ErrorInfo': {'additionalProperties': False,
9882 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9883 'macaroon-path': {'type': 'string'}},
9885 'ErrorResult': {'additionalProperties': False,
9886 'properties': {'error': {'$ref': '#/definitions/Error'}},
9888 'ErrorResults': {'additionalProperties': False,
9889 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9891 'required': ['results'],
9893 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9894 'ModelConfigResult': {'additionalProperties': False,
9895 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
9898 'required': ['config'],
9900 'NotifyWatchResult': {'additionalProperties': False,
9901 'properties': {'NotifyWatcherId': {'type': 'string'},
9902 'error': {'$ref': '#/definitions/Error'}},
9903 'required': ['NotifyWatcherId'],
9905 'NotifyWatchResults': {'additionalProperties': False,
9906 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9908 'required': ['results'],
9910 'SetStatus': {'additionalProperties': False,
9911 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
9913 'required': ['entities'],
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',
9927 'UndertakerModelInfoResult': {'additionalProperties': False,
9928 'properties': {'error': {'$ref': '#/definitions/Error'},
9929 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
9930 'required': ['result'],
9932 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
9934 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
9936 'ProcessDyingModel': {'type': 'object'},
9937 'RemoveModel': {'type': 'object'},
9938 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
9939 'Result': {'$ref': '#/definitions/ErrorResults'}},
9941 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
9942 'Result': {'$ref': '#/definitions/ErrorResults'}},
9944 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
9949 @ReturnMapping(ModelConfigResult
)
9950 async def ModelConfig(self
):
9953 Returns -> typing.Mapping[str, typing.Any]
9955 # map input types to rpc msg
9957 msg
= dict(type='Undertaker',
9958 request
='ModelConfig',
9962 reply
= await self
.rpc(msg
)
9967 @ReturnMapping(UndertakerModelInfoResult
)
9968 async def ModelInfo(self
):
9971 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
9973 # map input types to rpc msg
9975 msg
= dict(type='Undertaker',
9976 request
='ModelInfo',
9980 reply
= await self
.rpc(msg
)
9985 @ReturnMapping(None)
9986 async def ProcessDyingModel(self
):
9991 # map input types to rpc msg
9993 msg
= dict(type='Undertaker',
9994 request
='ProcessDyingModel',
9998 reply
= await self
.rpc(msg
)
10003 @ReturnMapping(None)
10004 async def RemoveModel(self
):
10009 # map input types to rpc msg
10011 msg
= dict(type='Undertaker',
10012 request
='RemoveModel',
10016 reply
= await self
.rpc(msg
)
10021 @ReturnMapping(ErrorResults
)
10022 async def SetStatus(self
, entities
):
10024 entities : typing.Sequence[~EntityStatusArgs]
10025 Returns -> typing.Sequence[~ErrorResult]
10027 # map input types to rpc msg
10029 msg
= dict(type='Undertaker',
10030 request
='SetStatus',
10033 _params
['entities'] = entities
10034 reply
= await self
.rpc(msg
)
10039 @ReturnMapping(ErrorResults
)
10040 async def UpdateStatus(self
, entities
):
10042 entities : typing.Sequence[~EntityStatusArgs]
10043 Returns -> typing.Sequence[~ErrorResult]
10045 # map input types to rpc msg
10047 msg
= dict(type='Undertaker',
10048 request
='UpdateStatus',
10051 _params
['entities'] = entities
10052 reply
= await self
.rpc(msg
)
10057 @ReturnMapping(NotifyWatchResults
)
10058 async def WatchModelResources(self
):
10061 Returns -> typing.Sequence[~NotifyWatchResult]
10063 # map input types to rpc msg
10065 msg
= dict(type='Undertaker',
10066 request
='WatchModelResources',
10070 reply
= await self
.rpc(msg
)
10075 class UnitAssignerFacade(Type
):
10076 name
= 'UnitAssigner'
10078 schema
= {'definitions': {'Entities': {'additionalProperties': False,
10079 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10081 'required': ['entities'],
10083 'Entity': {'additionalProperties': False,
10084 'properties': {'tag': {'type': 'string'}},
10085 'required': ['tag'],
10087 'EntityStatusArgs': {'additionalProperties': False,
10088 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
10089 'type': 'object'}},
10091 'info': {'type': 'string'},
10092 'status': {'type': 'string'},
10093 'tag': {'type': 'string'}},
10094 'required': ['tag',
10099 'Error': {'additionalProperties': False,
10100 'properties': {'code': {'type': 'string'},
10101 'info': {'$ref': '#/definitions/ErrorInfo'},
10102 'message': {'type': 'string'}},
10103 'required': ['message', 'code'],
10105 'ErrorInfo': {'additionalProperties': False,
10106 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10107 'macaroon-path': {'type': 'string'}},
10109 'ErrorResult': {'additionalProperties': False,
10110 'properties': {'error': {'$ref': '#/definitions/Error'}},
10112 'ErrorResults': {'additionalProperties': False,
10113 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10115 'required': ['results'],
10117 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10118 'SetStatus': {'additionalProperties': False,
10119 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
10121 'required': ['entities'],
10123 'StringsWatchResult': {'additionalProperties': False,
10124 'properties': {'changes': {'items': {'type': 'string'},
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'}},
10133 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
10134 'Result': {'$ref': '#/definitions/ErrorResults'}},
10136 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
10137 'type': 'object'}},
10141 @ReturnMapping(ErrorResults
)
10142 async def AssignUnits(self
, entities
):
10144 entities : typing.Sequence[~Entity]
10145 Returns -> typing.Sequence[~ErrorResult]
10147 # map input types to rpc msg
10149 msg
= dict(type='UnitAssigner',
10150 request
='AssignUnits',
10153 _params
['entities'] = entities
10154 reply
= await self
.rpc(msg
)
10159 @ReturnMapping(ErrorResults
)
10160 async def SetAgentStatus(self
, entities
):
10162 entities : typing.Sequence[~EntityStatusArgs]
10163 Returns -> typing.Sequence[~ErrorResult]
10165 # map input types to rpc msg
10167 msg
= dict(type='UnitAssigner',
10168 request
='SetAgentStatus',
10171 _params
['entities'] = entities
10172 reply
= await self
.rpc(msg
)
10177 @ReturnMapping(StringsWatchResult
)
10178 async def WatchUnitAssignments(self
):
10181 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
10183 # map input types to rpc msg
10185 msg
= dict(type='UnitAssigner',
10186 request
='WatchUnitAssignments',
10190 reply
= await self
.rpc(msg
)
10195 class UpgradeSeriesFacade(Type
):
10196 name
= 'UpgradeSeries'
10198 schema
= {'definitions': {'Entities': {'additionalProperties': False,
10199 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10201 'required': ['entities'],
10203 'EntitiesResult': {'additionalProperties': False,
10204 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10206 'error': {'$ref': '#/definitions/Error'}},
10207 'required': ['entities'],
10209 'EntitiesResults': {'additionalProperties': False,
10210 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
10212 'required': ['results'],
10214 'Entity': {'additionalProperties': False,
10215 'properties': {'tag': {'type': 'string'}},
10216 'required': ['tag'],
10218 'Error': {'additionalProperties': False,
10219 'properties': {'code': {'type': 'string'},
10220 'info': {'$ref': '#/definitions/ErrorInfo'},
10221 'message': {'type': 'string'}},
10222 'required': ['message', 'code'],
10224 'ErrorInfo': {'additionalProperties': False,
10225 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10226 'macaroon-path': {'type': 'string'}},
10228 'ErrorResult': {'additionalProperties': False,
10229 'properties': {'error': {'$ref': '#/definitions/Error'}},
10231 'ErrorResults': {'additionalProperties': False,
10232 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10234 'required': ['results'],
10236 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10237 'NotifyWatchResult': {'additionalProperties': False,
10238 'properties': {'NotifyWatcherId': {'type': 'string'},
10239 'error': {'$ref': '#/definitions/Error'}},
10240 'required': ['NotifyWatcherId'],
10242 'NotifyWatchResults': {'additionalProperties': False,
10243 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10245 'required': ['results'],
10247 'PinApplicationResult': {'additionalProperties': False,
10248 'properties': {'application-name': {'type': 'string'},
10249 'error': {'$ref': '#/definitions/Error'}},
10250 'required': ['application-name'],
10252 'PinApplicationsResults': {'additionalProperties': False,
10253 'properties': {'results': {'items': {'$ref': '#/definitions/PinApplicationResult'},
10255 'required': ['results'],
10257 'PinnedLeadershipResult': {'additionalProperties': False,
10258 'properties': {'result': {'patternProperties': {'.*': {'items': {'type': 'string'},
10260 'type': 'object'}},
10262 'StringResult': {'additionalProperties': False,
10263 'properties': {'error': {'$ref': '#/definitions/Error'},
10264 'result': {'type': 'string'}},
10265 'required': ['result'],
10267 'StringResults': {'additionalProperties': False,
10268 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
10270 'required': ['results'],
10272 'UpdateSeriesArg': {'additionalProperties': False,
10273 'properties': {'force': {'type': 'boolean'},
10274 'series': {'type': 'string'},
10275 'tag': {'$ref': '#/definitions/Entity'}},
10276 'required': ['tag', 'force', 'series'],
10278 'UpdateSeriesArgs': {'additionalProperties': False,
10279 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSeriesArg'},
10281 'required': ['args'],
10283 'UpgradeSeriesStartUnitCompletionParam': {'additionalProperties': False,
10284 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10286 'message': {'type': 'string'}},
10287 'required': ['entities',
10290 'UpgradeSeriesStatusParam': {'additionalProperties': False,
10291 'properties': {'entity': {'$ref': '#/definitions/Entity'},
10292 'message': {'type': 'string'},
10293 'status': {'type': 'string'}},
10294 'required': ['entity',
10298 'UpgradeSeriesStatusParams': {'additionalProperties': False,
10299 'properties': {'params': {'items': {'$ref': '#/definitions/UpgradeSeriesStatusParam'},
10301 'required': ['params'],
10303 'UpgradeSeriesStatusResult': {'additionalProperties': False,
10304 'properties': {'error': {'$ref': '#/definitions/Error'},
10305 'status': {'type': 'string'}},
10307 'UpgradeSeriesStatusResults': {'additionalProperties': False,
10308 'properties': {'results': {'items': {'$ref': '#/definitions/UpgradeSeriesStatusResult'},
10310 'type': 'object'}},
10311 'properties': {'FinishUpgradeSeries': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArgs'},
10312 'Result': {'$ref': '#/definitions/ErrorResults'}},
10314 'MachineStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10315 'Result': {'$ref': '#/definitions/UpgradeSeriesStatusResults'}},
10317 'PinMachineApplications': {'properties': {'Result': {'$ref': '#/definitions/PinApplicationsResults'}},
10319 'PinnedLeadership': {'properties': {'Result': {'$ref': '#/definitions/PinnedLeadershipResult'}},
10321 'SetMachineStatus': {'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesStatusParams'},
10322 'Result': {'$ref': '#/definitions/ErrorResults'}},
10324 'SetUpgradeSeriesUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesStatusParams'},
10325 'Result': {'$ref': '#/definitions/ErrorResults'}},
10327 'StartUnitCompletion': {'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesStartUnitCompletionParam'},
10328 'Result': {'$ref': '#/definitions/ErrorResults'}},
10330 'TargetSeries': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10331 'Result': {'$ref': '#/definitions/StringResults'}},
10333 'UnitsCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10334 'Result': {'$ref': '#/definitions/EntitiesResults'}},
10336 'UnitsPrepared': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10337 'Result': {'$ref': '#/definitions/EntitiesResults'}},
10339 'UnpinMachineApplications': {'properties': {'Result': {'$ref': '#/definitions/PinApplicationsResults'}},
10341 'UpgradeSeriesUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10342 'Result': {'$ref': '#/definitions/UpgradeSeriesStatusResults'}},
10344 'WatchUpgradeSeriesNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10345 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10346 'type': 'object'}},
10350 @ReturnMapping(ErrorResults
)
10351 async def FinishUpgradeSeries(self
, args
):
10353 args : typing.Sequence[~UpdateSeriesArg]
10354 Returns -> typing.Sequence[~ErrorResult]
10356 # map input types to rpc msg
10358 msg
= dict(type='UpgradeSeries',
10359 request
='FinishUpgradeSeries',
10362 _params
['args'] = args
10363 reply
= await self
.rpc(msg
)
10368 @ReturnMapping(UpgradeSeriesStatusResults
)
10369 async def MachineStatus(self
, entities
):
10371 entities : typing.Sequence[~Entity]
10372 Returns -> typing.Sequence[~UpgradeSeriesStatusResult]
10374 # map input types to rpc msg
10376 msg
= dict(type='UpgradeSeries',
10377 request
='MachineStatus',
10380 _params
['entities'] = entities
10381 reply
= await self
.rpc(msg
)
10386 @ReturnMapping(PinApplicationsResults
)
10387 async def PinMachineApplications(self
):
10390 Returns -> typing.Sequence[~PinApplicationResult]
10392 # map input types to rpc msg
10394 msg
= dict(type='UpgradeSeries',
10395 request
='PinMachineApplications',
10399 reply
= await self
.rpc(msg
)
10404 @ReturnMapping(PinnedLeadershipResult
)
10405 async def PinnedLeadership(self
):
10408 Returns -> typing.Sequence[str]
10410 # map input types to rpc msg
10412 msg
= dict(type='UpgradeSeries',
10413 request
='PinnedLeadership',
10417 reply
= await self
.rpc(msg
)
10422 @ReturnMapping(ErrorResults
)
10423 async def SetMachineStatus(self
, params
):
10425 params : typing.Sequence[~UpgradeSeriesStatusParam]
10426 Returns -> typing.Sequence[~ErrorResult]
10428 # map input types to rpc msg
10430 msg
= dict(type='UpgradeSeries',
10431 request
='SetMachineStatus',
10434 _params
['params'] = params
10435 reply
= await self
.rpc(msg
)
10440 @ReturnMapping(ErrorResults
)
10441 async def SetUpgradeSeriesUnitStatus(self
, params
):
10443 params : typing.Sequence[~UpgradeSeriesStatusParam]
10444 Returns -> typing.Sequence[~ErrorResult]
10446 # map input types to rpc msg
10448 msg
= dict(type='UpgradeSeries',
10449 request
='SetUpgradeSeriesUnitStatus',
10452 _params
['params'] = params
10453 reply
= await self
.rpc(msg
)
10458 @ReturnMapping(ErrorResults
)
10459 async def StartUnitCompletion(self
, entities
, message
):
10461 entities : typing.Sequence[~Entity]
10463 Returns -> typing.Sequence[~ErrorResult]
10465 # map input types to rpc msg
10467 msg
= dict(type='UpgradeSeries',
10468 request
='StartUnitCompletion',
10471 _params
['entities'] = entities
10472 _params
['message'] = message
10473 reply
= await self
.rpc(msg
)
10478 @ReturnMapping(StringResults
)
10479 async def TargetSeries(self
, entities
):
10481 entities : typing.Sequence[~Entity]
10482 Returns -> typing.Sequence[~StringResult]
10484 # map input types to rpc msg
10486 msg
= dict(type='UpgradeSeries',
10487 request
='TargetSeries',
10490 _params
['entities'] = entities
10491 reply
= await self
.rpc(msg
)
10496 @ReturnMapping(EntitiesResults
)
10497 async def UnitsCompleted(self
, entities
):
10499 entities : typing.Sequence[~Entity]
10500 Returns -> typing.Sequence[~EntitiesResult]
10502 # map input types to rpc msg
10504 msg
= dict(type='UpgradeSeries',
10505 request
='UnitsCompleted',
10508 _params
['entities'] = entities
10509 reply
= await self
.rpc(msg
)
10514 @ReturnMapping(EntitiesResults
)
10515 async def UnitsPrepared(self
, entities
):
10517 entities : typing.Sequence[~Entity]
10518 Returns -> typing.Sequence[~EntitiesResult]
10520 # map input types to rpc msg
10522 msg
= dict(type='UpgradeSeries',
10523 request
='UnitsPrepared',
10526 _params
['entities'] = entities
10527 reply
= await self
.rpc(msg
)
10532 @ReturnMapping(PinApplicationsResults
)
10533 async def UnpinMachineApplications(self
):
10536 Returns -> typing.Sequence[~PinApplicationResult]
10538 # map input types to rpc msg
10540 msg
= dict(type='UpgradeSeries',
10541 request
='UnpinMachineApplications',
10545 reply
= await self
.rpc(msg
)
10550 @ReturnMapping(UpgradeSeriesStatusResults
)
10551 async def UpgradeSeriesUnitStatus(self
, entities
):
10553 entities : typing.Sequence[~Entity]
10554 Returns -> typing.Sequence[~UpgradeSeriesStatusResult]
10556 # map input types to rpc msg
10558 msg
= dict(type='UpgradeSeries',
10559 request
='UpgradeSeriesUnitStatus',
10562 _params
['entities'] = entities
10563 reply
= await self
.rpc(msg
)
10568 @ReturnMapping(NotifyWatchResults
)
10569 async def WatchUpgradeSeriesNotifications(self
, entities
):
10571 entities : typing.Sequence[~Entity]
10572 Returns -> typing.Sequence[~NotifyWatchResult]
10574 # map input types to rpc msg
10576 msg
= dict(type='UpgradeSeries',
10577 request
='WatchUpgradeSeriesNotifications',
10580 _params
['entities'] = entities
10581 reply
= await self
.rpc(msg
)
10586 class UpgraderFacade(Type
):
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'],
10595 'Entities': {'additionalProperties': False,
10596 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10598 'required': ['entities'],
10600 'EntitiesVersion': {'additionalProperties': False,
10601 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
10603 'required': ['agent-tools'],
10605 'Entity': {'additionalProperties': False,
10606 'properties': {'tag': {'type': 'string'}},
10607 'required': ['tag'],
10609 'EntityVersion': {'additionalProperties': False,
10610 'properties': {'tag': {'type': 'string'},
10611 'tools': {'$ref': '#/definitions/Version'}},
10612 'required': ['tag', 'tools'],
10614 'Error': {'additionalProperties': False,
10615 'properties': {'code': {'type': 'string'},
10616 'info': {'$ref': '#/definitions/ErrorInfo'},
10617 'message': {'type': 'string'}},
10618 'required': ['message', 'code'],
10620 'ErrorInfo': {'additionalProperties': False,
10621 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10622 'macaroon-path': {'type': 'string'}},
10624 'ErrorResult': {'additionalProperties': False,
10625 'properties': {'error': {'$ref': '#/definitions/Error'}},
10627 'ErrorResults': {'additionalProperties': False,
10628 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10630 'required': ['results'],
10632 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10633 'NotifyWatchResult': {'additionalProperties': False,
10634 'properties': {'NotifyWatcherId': {'type': 'string'},
10635 'error': {'$ref': '#/definitions/Error'}},
10636 'required': ['NotifyWatcherId'],
10638 'NotifyWatchResults': {'additionalProperties': False,
10639 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10641 'required': ['results'],
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',
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'],
10662 'ToolsResult': {'additionalProperties': False,
10663 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
10664 'error': {'$ref': '#/definitions/Error'},
10665 'tools': {'items': {'$ref': '#/definitions/Tools'},
10667 'required': ['tools',
10668 'disable-ssl-hostname-verification'],
10670 'ToolsResults': {'additionalProperties': False,
10671 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
10673 'required': ['results'],
10675 'Version': {'additionalProperties': False,
10676 'properties': {'version': {'$ref': '#/definitions/Binary'}},
10677 'required': ['version'],
10679 'VersionResult': {'additionalProperties': False,
10680 'properties': {'error': {'$ref': '#/definitions/Error'},
10681 'version': {'$ref': '#/definitions/Number'}},
10683 'VersionResults': {'additionalProperties': False,
10684 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
10686 'required': ['results'],
10687 'type': 'object'}},
10688 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10689 'Result': {'$ref': '#/definitions/VersionResults'}},
10691 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
10692 'Result': {'$ref': '#/definitions/ErrorResults'}},
10694 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10695 'Result': {'$ref': '#/definitions/ToolsResults'}},
10697 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10698 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10699 'type': 'object'}},
10703 @ReturnMapping(VersionResults
)
10704 async def DesiredVersion(self
, entities
):
10706 entities : typing.Sequence[~Entity]
10707 Returns -> typing.Sequence[~VersionResult]
10709 # map input types to rpc msg
10711 msg
= dict(type='Upgrader',
10712 request
='DesiredVersion',
10715 _params
['entities'] = entities
10716 reply
= await self
.rpc(msg
)
10721 @ReturnMapping(ErrorResults
)
10722 async def SetTools(self
, agent_tools
):
10724 agent_tools : typing.Sequence[~EntityVersion]
10725 Returns -> typing.Sequence[~ErrorResult]
10727 # map input types to rpc msg
10729 msg
= dict(type='Upgrader',
10730 request
='SetTools',
10733 _params
['agent-tools'] = agent_tools
10734 reply
= await self
.rpc(msg
)
10739 @ReturnMapping(ToolsResults
)
10740 async def Tools(self
, entities
):
10742 entities : typing.Sequence[~Entity]
10743 Returns -> typing.Sequence[~ToolsResult]
10745 # map input types to rpc msg
10747 msg
= dict(type='Upgrader',
10751 _params
['entities'] = entities
10752 reply
= await self
.rpc(msg
)
10757 @ReturnMapping(NotifyWatchResults
)
10758 async def WatchAPIVersion(self
, entities
):
10760 entities : typing.Sequence[~Entity]
10761 Returns -> typing.Sequence[~NotifyWatchResult]
10763 # map input types to rpc msg
10765 msg
= dict(type='Upgrader',
10766 request
='WatchAPIVersion',
10769 _params
['entities'] = entities
10770 reply
= await self
.rpc(msg
)
10775 class UserManagerFacade(Type
):
10776 name
= 'UserManager'
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'],
10784 'AddUserResult': {'additionalProperties': False,
10785 'properties': {'error': {'$ref': '#/definitions/Error'},
10786 'secret-key': {'items': {'type': 'integer'},
10788 'tag': {'type': 'string'}},
10790 'AddUserResults': {'additionalProperties': False,
10791 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
10793 'required': ['results'],
10795 'AddUsers': {'additionalProperties': False,
10796 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
10798 'required': ['users'],
10800 'Entities': {'additionalProperties': False,
10801 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10803 'required': ['entities'],
10805 'Entity': {'additionalProperties': False,
10806 'properties': {'tag': {'type': 'string'}},
10807 'required': ['tag'],
10809 'EntityPassword': {'additionalProperties': False,
10810 'properties': {'password': {'type': 'string'},
10811 'tag': {'type': 'string'}},
10812 'required': ['tag', 'password'],
10814 'EntityPasswords': {'additionalProperties': False,
10815 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
10817 'required': ['changes'],
10819 'Error': {'additionalProperties': False,
10820 'properties': {'code': {'type': 'string'},
10821 'info': {'$ref': '#/definitions/ErrorInfo'},
10822 'message': {'type': 'string'}},
10823 'required': ['message', 'code'],
10825 'ErrorInfo': {'additionalProperties': False,
10826 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10827 'macaroon-path': {'type': 'string'}},
10829 'ErrorResult': {'additionalProperties': False,
10830 'properties': {'error': {'$ref': '#/definitions/Error'}},
10832 'ErrorResults': {'additionalProperties': False,
10833 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10835 'required': ['results'],
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',
10843 'disabled': {'type': 'boolean'},
10844 'display-name': {'type': 'string'},
10845 'last-connection': {'format': 'date-time',
10847 'username': {'type': 'string'}},
10848 'required': ['username',
10855 'UserInfoRequest': {'additionalProperties': False,
10856 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10858 'include-disabled': {'type': 'boolean'}},
10859 'required': ['entities',
10860 'include-disabled'],
10862 'UserInfoResult': {'additionalProperties': False,
10863 'properties': {'error': {'$ref': '#/definitions/Error'},
10864 'result': {'$ref': '#/definitions/UserInfo'}},
10866 'UserInfoResults': {'additionalProperties': False,
10867 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
10869 'required': ['results'],
10870 'type': 'object'}},
10871 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
10872 'Result': {'$ref': '#/definitions/AddUserResults'}},
10874 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10875 'Result': {'$ref': '#/definitions/ErrorResults'}},
10877 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10878 'Result': {'$ref': '#/definitions/ErrorResults'}},
10880 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10881 'Result': {'$ref': '#/definitions/ErrorResults'}},
10883 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
10884 'Result': {'$ref': '#/definitions/ErrorResults'}},
10886 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
10887 'Result': {'$ref': '#/definitions/UserInfoResults'}},
10888 'type': 'object'}},
10892 @ReturnMapping(AddUserResults
)
10893 async def AddUser(self
, users
):
10895 users : typing.Sequence[~AddUser]
10896 Returns -> typing.Sequence[~AddUserResult]
10898 # map input types to rpc msg
10900 msg
= dict(type='UserManager',
10904 _params
['users'] = users
10905 reply
= await self
.rpc(msg
)
10910 @ReturnMapping(ErrorResults
)
10911 async def DisableUser(self
, entities
):
10913 entities : typing.Sequence[~Entity]
10914 Returns -> typing.Sequence[~ErrorResult]
10916 # map input types to rpc msg
10918 msg
= dict(type='UserManager',
10919 request
='DisableUser',
10922 _params
['entities'] = entities
10923 reply
= await self
.rpc(msg
)
10928 @ReturnMapping(ErrorResults
)
10929 async def EnableUser(self
, entities
):
10931 entities : typing.Sequence[~Entity]
10932 Returns -> typing.Sequence[~ErrorResult]
10934 # map input types to rpc msg
10936 msg
= dict(type='UserManager',
10937 request
='EnableUser',
10940 _params
['entities'] = entities
10941 reply
= await self
.rpc(msg
)
10946 @ReturnMapping(ErrorResults
)
10947 async def RemoveUser(self
, entities
):
10949 entities : typing.Sequence[~Entity]
10950 Returns -> typing.Sequence[~ErrorResult]
10952 # map input types to rpc msg
10954 msg
= dict(type='UserManager',
10955 request
='RemoveUser',
10958 _params
['entities'] = entities
10959 reply
= await self
.rpc(msg
)
10964 @ReturnMapping(ErrorResults
)
10965 async def SetPassword(self
, changes
):
10967 changes : typing.Sequence[~EntityPassword]
10968 Returns -> typing.Sequence[~ErrorResult]
10970 # map input types to rpc msg
10972 msg
= dict(type='UserManager',
10973 request
='SetPassword',
10976 _params
['changes'] = changes
10977 reply
= await self
.rpc(msg
)
10982 @ReturnMapping(UserInfoResults
)
10983 async def UserInfo(self
, entities
, include_disabled
):
10985 entities : typing.Sequence[~Entity]
10986 include_disabled : bool
10987 Returns -> typing.Sequence[~UserInfoResult]
10989 # map input types to rpc msg
10991 msg
= dict(type='UserManager',
10992 request
='UserInfo',
10995 _params
['entities'] = entities
10996 _params
['include-disabled'] = include_disabled
10997 reply
= await self
.rpc(msg
)
11002 class VolumeAttachmentPlansWatcherFacade(Type
):
11003 name
= 'VolumeAttachmentPlansWatcher'
11005 schema
= {'definitions': {'Error': {'additionalProperties': False,
11006 'properties': {'code': {'type': 'string'},
11007 'info': {'$ref': '#/definitions/ErrorInfo'},
11008 'message': {'type': 'string'}},
11009 'required': ['message', 'code'],
11011 'ErrorInfo': {'additionalProperties': False,
11012 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11013 'macaroon-path': {'type': 'string'}},
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',
11022 'MachineStorageIdsWatchResult': {'additionalProperties': False,
11023 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
11025 'error': {'$ref': '#/definitions/Error'},
11026 'watcher-id': {'type': 'string'}},
11027 'required': ['watcher-id',
11029 'type': 'object'}},
11030 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
11032 'Stop': {'type': 'object'}},
11036 @ReturnMapping(MachineStorageIdsWatchResult
)
11037 async def Next(self
):
11040 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error'), str]
11042 # map input types to rpc msg
11044 msg
= dict(type='VolumeAttachmentPlansWatcher',
11049 reply
= await self
.rpc(msg
)
11054 @ReturnMapping(None)
11055 async def Stop(self
):
11060 # map input types to rpc msg
11062 msg
= dict(type='VolumeAttachmentPlansWatcher',
11067 reply
= await self
.rpc(msg
)