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
._definitions
import *
5 from juju
.client
.facade
import ReturnMapping
, Type
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'},