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 ActionFacade(Type
):
11 schema
= {'definitions': {'Action': {'additionalProperties': False,
12 'properties': {'name': {'type': 'string'},
13 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
16 'receiver': {'type': 'string'},
17 'tag': {'type': 'string'}},
18 'required': ['tag', 'receiver', 'name'],
20 'ActionResult': {'additionalProperties': False,
21 'properties': {'action': {'$ref': '#/definitions/Action'},
22 'completed': {'format': 'date-time',
24 'enqueued': {'format': 'date-time',
26 'error': {'$ref': '#/definitions/Error'},
27 'message': {'type': 'string'},
28 'output': {'patternProperties': {'.*': {'additionalProperties': True,
31 'started': {'format': 'date-time',
33 'status': {'type': 'string'}},
35 'ActionResults': {'additionalProperties': False,
36 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
39 'ActionSpec': {'additionalProperties': False,
40 'properties': {'description': {'type': 'string'},
41 'params': {'patternProperties': {'.*': {'additionalProperties': True,
44 'required': ['description', 'params'],
46 'Actions': {'additionalProperties': False,
47 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
50 'ActionsByName': {'additionalProperties': False,
51 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
53 'error': {'$ref': '#/definitions/Error'},
54 'name': {'type': 'string'}},
56 'ActionsByNames': {'additionalProperties': False,
57 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
60 'ActionsByReceiver': {'additionalProperties': False,
61 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
63 'error': {'$ref': '#/definitions/Error'},
64 'receiver': {'type': 'string'}},
66 'ActionsByReceivers': {'additionalProperties': False,
67 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
70 'ApplicationCharmActionsResult': {'additionalProperties': False,
71 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
73 'application-tag': {'type': 'string'},
74 'error': {'$ref': '#/definitions/Error'}},
76 'ApplicationsCharmActionsResults': {'additionalProperties': False,
77 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
80 'Entities': {'additionalProperties': False,
81 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
83 'required': ['entities'],
85 'Entity': {'additionalProperties': False,
86 'properties': {'tag': {'type': 'string'}},
89 'Error': {'additionalProperties': False,
90 'properties': {'code': {'type': 'string'},
91 'info': {'$ref': '#/definitions/ErrorInfo'},
92 'message': {'type': 'string'}},
93 'required': ['message', 'code'],
95 'ErrorInfo': {'additionalProperties': False,
96 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
97 'macaroon-path': {'type': 'string'}},
99 'FindActionsByNames': {'additionalProperties': False,
100 'properties': {'names': {'items': {'type': 'string'},
103 'FindTags': {'additionalProperties': False,
104 'properties': {'prefixes': {'items': {'type': 'string'},
106 'required': ['prefixes'],
108 'FindTagsResults': {'additionalProperties': False,
109 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
112 'required': ['matches'],
114 'Macaroon': {'additionalProperties': False, 'type': 'object'},
115 'RunParams': {'additionalProperties': False,
116 'properties': {'applications': {'items': {'type': 'string'},
118 'commands': {'type': 'string'},
119 'machines': {'items': {'type': 'string'},
121 'timeout': {'type': 'integer'},
122 'units': {'items': {'type': 'string'},
124 'required': ['commands', 'timeout'],
126 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
127 'Result': {'$ref': '#/definitions/ActionResults'}},
129 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
130 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
132 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
133 'Result': {'$ref': '#/definitions/ActionResults'}},
135 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
136 'Result': {'$ref': '#/definitions/ActionResults'}},
138 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
139 'Result': {'$ref': '#/definitions/FindTagsResults'}},
141 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
142 'Result': {'$ref': '#/definitions/ActionsByNames'}},
144 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
145 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
147 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
148 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
150 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
151 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
153 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
154 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
156 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
157 'Result': {'$ref': '#/definitions/ActionResults'}},
159 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
160 'Result': {'$ref': '#/definitions/ActionResults'}},
165 @ReturnMapping(ActionResults
)
166 async def Actions(self
, entities
):
168 entities : typing.Sequence[~Entity]
169 Returns -> typing.Sequence[~ActionResult]
171 # map input types to rpc msg
173 msg
= dict(type='Action',
177 _params
['entities'] = entities
178 reply
= await self
.rpc(msg
)
183 @ReturnMapping(ApplicationsCharmActionsResults
)
184 async def ApplicationsCharmsActions(self
, entities
):
186 entities : typing.Sequence[~Entity]
187 Returns -> typing.Sequence[~ApplicationCharmActionsResult]
189 # map input types to rpc msg
191 msg
= dict(type='Action',
192 request
='ApplicationsCharmsActions',
195 _params
['entities'] = entities
196 reply
= await self
.rpc(msg
)
201 @ReturnMapping(ActionResults
)
202 async def Cancel(self
, entities
):
204 entities : typing.Sequence[~Entity]
205 Returns -> typing.Sequence[~ActionResult]
207 # map input types to rpc msg
209 msg
= dict(type='Action',
213 _params
['entities'] = entities
214 reply
= await self
.rpc(msg
)
219 @ReturnMapping(ActionResults
)
220 async def Enqueue(self
, actions
):
222 actions : typing.Sequence[~Action]
223 Returns -> typing.Sequence[~ActionResult]
225 # map input types to rpc msg
227 msg
= dict(type='Action',
231 _params
['actions'] = actions
232 reply
= await self
.rpc(msg
)
237 @ReturnMapping(FindTagsResults
)
238 async def FindActionTagsByPrefix(self
, prefixes
):
240 prefixes : typing.Sequence[str]
241 Returns -> typing.Sequence[~Entity]
243 # map input types to rpc msg
245 msg
= dict(type='Action',
246 request
='FindActionTagsByPrefix',
249 _params
['prefixes'] = prefixes
250 reply
= await self
.rpc(msg
)
255 @ReturnMapping(ActionsByNames
)
256 async def FindActionsByNames(self
, names
):
258 names : typing.Sequence[str]
259 Returns -> typing.Sequence[~ActionsByName]
261 # map input types to rpc msg
263 msg
= dict(type='Action',
264 request
='FindActionsByNames',
267 _params
['names'] = names
268 reply
= await self
.rpc(msg
)
273 @ReturnMapping(ActionsByReceivers
)
274 async def ListAll(self
, entities
):
276 entities : typing.Sequence[~Entity]
277 Returns -> typing.Sequence[~ActionsByReceiver]
279 # map input types to rpc msg
281 msg
= dict(type='Action',
285 _params
['entities'] = entities
286 reply
= await self
.rpc(msg
)
291 @ReturnMapping(ActionsByReceivers
)
292 async def ListCompleted(self
, entities
):
294 entities : typing.Sequence[~Entity]
295 Returns -> typing.Sequence[~ActionsByReceiver]
297 # map input types to rpc msg
299 msg
= dict(type='Action',
300 request
='ListCompleted',
303 _params
['entities'] = entities
304 reply
= await self
.rpc(msg
)
309 @ReturnMapping(ActionsByReceivers
)
310 async def ListPending(self
, entities
):
312 entities : typing.Sequence[~Entity]
313 Returns -> typing.Sequence[~ActionsByReceiver]
315 # map input types to rpc msg
317 msg
= dict(type='Action',
318 request
='ListPending',
321 _params
['entities'] = entities
322 reply
= await self
.rpc(msg
)
327 @ReturnMapping(ActionsByReceivers
)
328 async def ListRunning(self
, entities
):
330 entities : typing.Sequence[~Entity]
331 Returns -> typing.Sequence[~ActionsByReceiver]
333 # map input types to rpc msg
335 msg
= dict(type='Action',
336 request
='ListRunning',
339 _params
['entities'] = entities
340 reply
= await self
.rpc(msg
)
345 @ReturnMapping(ActionResults
)
346 async def Run(self
, applications
, commands
, machines
, timeout
, units
):
348 applications : typing.Sequence[str]
350 machines : typing.Sequence[str]
352 units : typing.Sequence[str]
353 Returns -> typing.Sequence[~ActionResult]
355 # map input types to rpc msg
357 msg
= dict(type='Action',
361 _params
['applications'] = applications
362 _params
['commands'] = commands
363 _params
['machines'] = machines
364 _params
['timeout'] = timeout
365 _params
['units'] = units
366 reply
= await self
.rpc(msg
)
371 @ReturnMapping(ActionResults
)
372 async def RunOnAllMachines(self
, applications
, commands
, machines
, timeout
, units
):
374 applications : typing.Sequence[str]
376 machines : typing.Sequence[str]
378 units : typing.Sequence[str]
379 Returns -> typing.Sequence[~ActionResult]
381 # map input types to rpc msg
383 msg
= dict(type='Action',
384 request
='RunOnAllMachines',
387 _params
['applications'] = applications
388 _params
['commands'] = commands
389 _params
['machines'] = machines
390 _params
['timeout'] = timeout
391 _params
['units'] = units
392 reply
= await self
.rpc(msg
)
397 class AgentFacade(Type
):
400 schema
= {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
401 'properties': {'container-type': {'type': 'string'},
402 'error': {'$ref': '#/definitions/Error'},
403 'jobs': {'items': {'type': 'string'},
405 'life': {'type': 'string'}},
410 'AgentGetEntitiesResults': {'additionalProperties': False,
411 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
413 'required': ['entities'],
415 'CloudCredential': {'additionalProperties': False,
416 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
418 'auth-type': {'type': 'string'},
419 'redacted': {'items': {'type': 'string'},
421 'required': ['auth-type'],
423 'CloudSpec': {'additionalProperties': False,
424 'properties': {'cacertificates': {'items': {'type': 'string'},
426 'credential': {'$ref': '#/definitions/CloudCredential'},
427 'endpoint': {'type': 'string'},
428 'identity-endpoint': {'type': 'string'},
429 'name': {'type': 'string'},
430 'region': {'type': 'string'},
431 'storage-endpoint': {'type': 'string'},
432 'type': {'type': 'string'}},
433 'required': ['type', 'name'],
435 'CloudSpecResult': {'additionalProperties': False,
436 'properties': {'error': {'$ref': '#/definitions/Error'},
437 'result': {'$ref': '#/definitions/CloudSpec'}},
439 'CloudSpecResults': {'additionalProperties': False,
440 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
443 'ControllerAPIInfoResult': {'additionalProperties': False,
444 'properties': {'addresses': {'items': {'type': 'string'},
446 'cacert': {'type': 'string'},
447 'error': {'$ref': '#/definitions/Error'}},
448 'required': ['addresses',
451 'ControllerAPIInfoResults': {'additionalProperties': False,
452 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
454 'required': ['results'],
456 'ControllerConfigResult': {'additionalProperties': False,
457 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
460 'required': ['config'],
462 'Entities': {'additionalProperties': False,
463 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
465 'required': ['entities'],
467 'Entity': {'additionalProperties': False,
468 'properties': {'tag': {'type': 'string'}},
471 'EntityPassword': {'additionalProperties': False,
472 'properties': {'password': {'type': 'string'},
473 'tag': {'type': 'string'}},
474 'required': ['tag', 'password'],
476 'EntityPasswords': {'additionalProperties': False,
477 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
479 'required': ['changes'],
481 'Error': {'additionalProperties': False,
482 'properties': {'code': {'type': 'string'},
483 'info': {'$ref': '#/definitions/ErrorInfo'},
484 'message': {'type': 'string'}},
485 'required': ['message', 'code'],
487 'ErrorInfo': {'additionalProperties': False,
488 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
489 'macaroon-path': {'type': 'string'}},
491 'ErrorResult': {'additionalProperties': False,
492 'properties': {'error': {'$ref': '#/definitions/Error'}},
494 'ErrorResults': {'additionalProperties': False,
495 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
497 'required': ['results'],
499 'IsMasterResult': {'additionalProperties': False,
500 'properties': {'master': {'type': 'boolean'}},
501 'required': ['master'],
503 'Macaroon': {'additionalProperties': False, 'type': 'object'},
504 'ModelConfigResult': {'additionalProperties': False,
505 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
508 'required': ['config'],
510 'ModelTag': {'additionalProperties': False, 'type': 'object'},
511 'NotifyWatchResult': {'additionalProperties': False,
512 'properties': {'NotifyWatcherId': {'type': 'string'},
513 'error': {'$ref': '#/definitions/Error'}},
514 'required': ['NotifyWatcherId'],
516 'NotifyWatchResults': {'additionalProperties': False,
517 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
519 'required': ['results'],
521 'StateServingInfo': {'additionalProperties': False,
522 'properties': {'api-port': {'type': 'integer'},
523 'ca-private-key': {'type': 'string'},
524 'cert': {'type': 'string'},
525 'controller-api-port': {'type': 'integer'},
526 'private-key': {'type': 'string'},
527 'shared-secret': {'type': 'string'},
528 'state-port': {'type': 'integer'},
529 'system-identity': {'type': 'string'}},
530 'required': ['api-port',
538 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
539 'Result': {'$ref': '#/definitions/ErrorResults'}},
541 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
542 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
544 'ControllerAPIInfoForModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
545 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
547 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
549 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
550 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
552 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
553 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
555 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
557 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
559 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
560 'Result': {'$ref': '#/definitions/ErrorResults'}},
562 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
564 'WatchCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
565 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
567 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
572 @ReturnMapping(ErrorResults
)
573 async def ClearReboot(self
, entities
):
575 entities : typing.Sequence[~Entity]
576 Returns -> typing.Sequence[~ErrorResult]
578 # map input types to rpc msg
580 msg
= dict(type='Agent',
581 request
='ClearReboot',
584 _params
['entities'] = entities
585 reply
= await self
.rpc(msg
)
590 @ReturnMapping(CloudSpecResults
)
591 async def CloudSpec(self
, entities
):
593 entities : typing.Sequence[~Entity]
594 Returns -> typing.Sequence[~CloudSpecResult]
596 # map input types to rpc msg
598 msg
= dict(type='Agent',
602 _params
['entities'] = entities
603 reply
= await self
.rpc(msg
)
608 @ReturnMapping(ControllerAPIInfoResults
)
609 async def ControllerAPIInfoForModels(self
, entities
):
611 entities : typing.Sequence[~Entity]
612 Returns -> typing.Sequence[~ControllerAPIInfoResult]
614 # map input types to rpc msg
616 msg
= dict(type='Agent',
617 request
='ControllerAPIInfoForModels',
620 _params
['entities'] = entities
621 reply
= await self
.rpc(msg
)
626 @ReturnMapping(ControllerConfigResult
)
627 async def ControllerConfig(self
):
630 Returns -> typing.Mapping[str, typing.Any]
632 # map input types to rpc msg
634 msg
= dict(type='Agent',
635 request
='ControllerConfig',
639 reply
= await self
.rpc(msg
)
644 @ReturnMapping(CloudSpecResult
)
645 async def GetCloudSpec(self
):
648 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
650 # map input types to rpc msg
652 msg
= dict(type='Agent',
653 request
='GetCloudSpec',
657 reply
= await self
.rpc(msg
)
662 @ReturnMapping(AgentGetEntitiesResults
)
663 async def GetEntities(self
, entities
):
665 entities : typing.Sequence[~Entity]
666 Returns -> typing.Sequence[~AgentGetEntitiesResult]
668 # map input types to rpc msg
670 msg
= dict(type='Agent',
671 request
='GetEntities',
674 _params
['entities'] = entities
675 reply
= await self
.rpc(msg
)
680 @ReturnMapping(IsMasterResult
)
681 async def IsMaster(self
):
686 # map input types to rpc msg
688 msg
= dict(type='Agent',
693 reply
= await self
.rpc(msg
)
698 @ReturnMapping(ModelConfigResult
)
699 async def ModelConfig(self
):
702 Returns -> typing.Mapping[str, typing.Any]
704 # map input types to rpc msg
706 msg
= dict(type='Agent',
707 request
='ModelConfig',
711 reply
= await self
.rpc(msg
)
716 @ReturnMapping(ErrorResults
)
717 async def SetPasswords(self
, changes
):
719 changes : typing.Sequence[~EntityPassword]
720 Returns -> typing.Sequence[~ErrorResult]
722 # map input types to rpc msg
724 msg
= dict(type='Agent',
725 request
='SetPasswords',
728 _params
['changes'] = changes
729 reply
= await self
.rpc(msg
)
734 @ReturnMapping(StateServingInfo
)
735 async def StateServingInfo(self
):
738 Returns -> typing.Union[int, str]
740 # map input types to rpc msg
742 msg
= dict(type='Agent',
743 request
='StateServingInfo',
747 reply
= await self
.rpc(msg
)
752 @ReturnMapping(NotifyWatchResults
)
753 async def WatchCredentials(self
, entities
):
755 entities : typing.Sequence[~Entity]
756 Returns -> typing.Sequence[~NotifyWatchResult]
758 # map input types to rpc msg
760 msg
= dict(type='Agent',
761 request
='WatchCredentials',
764 _params
['entities'] = entities
765 reply
= await self
.rpc(msg
)
770 @ReturnMapping(NotifyWatchResult
)
771 async def WatchForModelConfigChanges(self
):
774 Returns -> typing.Union[str, _ForwardRef('Error')]
776 # map input types to rpc msg
778 msg
= dict(type='Agent',
779 request
='WatchForModelConfigChanges',
783 reply
= await self
.rpc(msg
)
788 class AllModelWatcherFacade(Type
):
789 name
= 'AllModelWatcher'
791 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
792 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
794 'required': ['deltas'],
796 'Delta': {'additionalProperties': False,
797 'properties': {'entity': {'additionalProperties': True,
799 'removed': {'type': 'boolean'}},
800 'required': ['removed', 'entity'],
802 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
804 'Stop': {'type': 'object'}},
808 @ReturnMapping(AllWatcherNextResults
)
809 async def Next(self
):
812 Returns -> typing.Sequence[~Delta]
814 # map input types to rpc msg
816 msg
= dict(type='AllModelWatcher',
821 reply
= await self
.rpc(msg
)
827 async def Stop(self
):
832 # map input types to rpc msg
834 msg
= dict(type='AllModelWatcher',
839 reply
= await self
.rpc(msg
)
844 class AnnotationsFacade(Type
):
847 schema
= {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
848 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
850 'entity': {'type': 'string'},
851 'error': {'$ref': '#/definitions/ErrorResult'}},
852 'required': ['entity', 'annotations'],
854 'AnnotationsGetResults': {'additionalProperties': False,
855 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
857 'required': ['results'],
859 'AnnotationsSet': {'additionalProperties': False,
860 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
862 'required': ['annotations'],
864 'Entities': {'additionalProperties': False,
865 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
867 'required': ['entities'],
869 'Entity': {'additionalProperties': False,
870 'properties': {'tag': {'type': 'string'}},
873 'EntityAnnotations': {'additionalProperties': False,
874 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
876 'entity': {'type': 'string'}},
877 'required': ['entity', 'annotations'],
879 'Error': {'additionalProperties': False,
880 'properties': {'code': {'type': 'string'},
881 'info': {'$ref': '#/definitions/ErrorInfo'},
882 'message': {'type': 'string'}},
883 'required': ['message', 'code'],
885 'ErrorInfo': {'additionalProperties': False,
886 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
887 'macaroon-path': {'type': 'string'}},
889 'ErrorResult': {'additionalProperties': False,
890 'properties': {'error': {'$ref': '#/definitions/Error'}},
892 'ErrorResults': {'additionalProperties': False,
893 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
895 'required': ['results'],
897 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
898 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
899 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
901 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
902 'Result': {'$ref': '#/definitions/ErrorResults'}},
907 @ReturnMapping(AnnotationsGetResults
)
908 async def Get(self
, entities
):
910 entities : typing.Sequence[~Entity]
911 Returns -> typing.Sequence[~AnnotationsGetResult]
913 # map input types to rpc msg
915 msg
= dict(type='Annotations',
919 _params
['entities'] = entities
920 reply
= await self
.rpc(msg
)
925 @ReturnMapping(ErrorResults
)
926 async def Set(self
, annotations
):
928 annotations : typing.Sequence[~EntityAnnotations]
929 Returns -> typing.Sequence[~ErrorResult]
931 # map input types to rpc msg
933 msg
= dict(type='Annotations',
937 _params
['annotations'] = annotations
938 reply
= await self
.rpc(msg
)
943 class ApplicationFacade(Type
):
946 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
947 'properties': {'application': {'type': 'string'},
948 'num-units': {'type': 'integer'},
949 'placement': {'items': {'$ref': '#/definitions/Placement'},
951 'required': ['application',
955 'AddApplicationUnitsResults': {'additionalProperties': False,
956 'properties': {'units': {'items': {'type': 'string'},
958 'required': ['units'],
960 'AddRelation': {'additionalProperties': False,
961 'properties': {'endpoints': {'items': {'type': 'string'},
963 'required': ['endpoints'],
965 'AddRelationResults': {'additionalProperties': False,
966 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
968 'required': ['endpoints'],
970 'ApplicationCharmRelations': {'additionalProperties': False,
971 'properties': {'application': {'type': 'string'}},
972 'required': ['application'],
974 'ApplicationCharmRelationsResults': {'additionalProperties': False,
975 'properties': {'charm-relations': {'items': {'type': 'string'},
977 'required': ['charm-relations'],
979 'ApplicationDeploy': {'additionalProperties': False,
980 'properties': {'application': {'type': 'string'},
981 'channel': {'type': 'string'},
982 'charm-url': {'type': 'string'},
983 'config': {'patternProperties': {'.*': {'type': 'string'}},
985 'config-yaml': {'type': 'string'},
986 'constraints': {'$ref': '#/definitions/Value'},
987 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
989 'num-units': {'type': 'integer'},
990 'placement': {'items': {'$ref': '#/definitions/Placement'},
992 'resources': {'patternProperties': {'.*': {'type': 'string'}},
994 'series': {'type': 'string'},
995 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
997 'required': ['application',
1005 'ApplicationDestroy': {'additionalProperties': False,
1006 'properties': {'application': {'type': 'string'}},
1007 'required': ['application'],
1009 'ApplicationExpose': {'additionalProperties': False,
1010 'properties': {'application': {'type': 'string'}},
1011 'required': ['application'],
1013 'ApplicationGet': {'additionalProperties': False,
1014 'properties': {'application': {'type': 'string'}},
1015 'required': ['application'],
1017 'ApplicationGetResults': {'additionalProperties': False,
1018 'properties': {'application': {'type': 'string'},
1019 'charm': {'type': 'string'},
1020 'config': {'patternProperties': {'.*': {'additionalProperties': True,
1023 'constraints': {'$ref': '#/definitions/Value'},
1024 'series': {'type': 'string'}},
1025 'required': ['application',
1031 'ApplicationMetricCredential': {'additionalProperties': False,
1032 'properties': {'application': {'type': 'string'},
1033 'metrics-credentials': {'items': {'type': 'integer'},
1035 'required': ['application',
1036 'metrics-credentials'],
1038 'ApplicationMetricCredentials': {'additionalProperties': False,
1039 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
1041 'required': ['creds'],
1043 'ApplicationSet': {'additionalProperties': False,
1044 'properties': {'application': {'type': 'string'},
1045 'options': {'patternProperties': {'.*': {'type': 'string'}},
1047 'required': ['application', 'options'],
1049 'ApplicationSetCharm': {'additionalProperties': False,
1050 'properties': {'application': {'type': 'string'},
1051 'channel': {'type': 'string'},
1052 'charm-url': {'type': 'string'},
1053 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
1055 'config-settings-yaml': {'type': 'string'},
1056 'force-series': {'type': 'boolean'},
1057 'force-units': {'type': 'boolean'},
1058 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
1060 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
1062 'required': ['application',
1068 'ApplicationUnexpose': {'additionalProperties': False,
1069 'properties': {'application': {'type': 'string'}},
1070 'required': ['application'],
1072 'ApplicationUnset': {'additionalProperties': False,
1073 'properties': {'application': {'type': 'string'},
1074 'options': {'items': {'type': 'string'},
1076 'required': ['application', 'options'],
1078 'ApplicationUpdate': {'additionalProperties': False,
1079 'properties': {'application': {'type': 'string'},
1080 'charm-url': {'type': 'string'},
1081 'constraints': {'$ref': '#/definitions/Value'},
1082 'force-charm-url': {'type': 'boolean'},
1083 'force-series': {'type': 'boolean'},
1084 'min-units': {'type': 'integer'},
1085 'settings': {'patternProperties': {'.*': {'type': 'string'}},
1087 'settings-yaml': {'type': 'string'}},
1088 'required': ['application',
1094 'ApplicationsDeploy': {'additionalProperties': False,
1095 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
1097 'required': ['applications'],
1099 'CharmRelation': {'additionalProperties': False,
1100 'properties': {'interface': {'type': 'string'},
1101 'limit': {'type': 'integer'},
1102 'name': {'type': 'string'},
1103 'optional': {'type': 'boolean'},
1104 'role': {'type': 'string'},
1105 'scope': {'type': 'string'}},
1106 'required': ['name',
1113 'Constraints': {'additionalProperties': False,
1114 'properties': {'Count': {'type': 'integer'},
1115 'Pool': {'type': 'string'},
1116 'Size': {'type': 'integer'}},
1117 'required': ['Pool', 'Size', 'Count'],
1119 'DestroyApplicationUnits': {'additionalProperties': False,
1120 'properties': {'unit-names': {'items': {'type': 'string'},
1122 'required': ['unit-names'],
1124 'DestroyRelation': {'additionalProperties': False,
1125 'properties': {'endpoints': {'items': {'type': 'string'},
1127 'required': ['endpoints'],
1129 'Error': {'additionalProperties': False,
1130 'properties': {'code': {'type': 'string'},
1131 'info': {'$ref': '#/definitions/ErrorInfo'},
1132 'message': {'type': 'string'}},
1133 'required': ['message', 'code'],
1135 'ErrorInfo': {'additionalProperties': False,
1136 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1137 'macaroon-path': {'type': 'string'}},
1139 'ErrorResult': {'additionalProperties': False,
1140 'properties': {'error': {'$ref': '#/definitions/Error'}},
1142 'ErrorResults': {'additionalProperties': False,
1143 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1145 'required': ['results'],
1147 'GetApplicationConstraints': {'additionalProperties': False,
1148 'properties': {'application': {'type': 'string'}},
1149 'required': ['application'],
1151 'GetConstraintsResults': {'additionalProperties': False,
1152 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
1153 'required': ['constraints'],
1155 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1156 'Placement': {'additionalProperties': False,
1157 'properties': {'directive': {'type': 'string'},
1158 'scope': {'type': 'string'}},
1159 'required': ['scope', 'directive'],
1161 'SetConstraints': {'additionalProperties': False,
1162 'properties': {'application': {'type': 'string'},
1163 'constraints': {'$ref': '#/definitions/Value'}},
1164 'required': ['application', 'constraints'],
1166 'StorageConstraints': {'additionalProperties': False,
1167 'properties': {'count': {'type': 'integer'},
1168 'pool': {'type': 'string'},
1169 'size': {'type': 'integer'}},
1171 'StringResult': {'additionalProperties': False,
1172 'properties': {'error': {'$ref': '#/definitions/Error'},
1173 'result': {'type': 'string'}},
1174 'required': ['result'],
1176 'Value': {'additionalProperties': False,
1177 'properties': {'arch': {'type': 'string'},
1178 'container': {'type': 'string'},
1179 'cores': {'type': 'integer'},
1180 'cpu-power': {'type': 'integer'},
1181 'instance-type': {'type': 'string'},
1182 'mem': {'type': 'integer'},
1183 'root-disk': {'type': 'integer'},
1184 'spaces': {'items': {'type': 'string'},
1186 'tags': {'items': {'type': 'string'},
1188 'virt-type': {'type': 'string'}},
1190 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
1191 'Result': {'$ref': '#/definitions/AddRelationResults'}},
1193 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
1194 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
1196 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
1197 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
1199 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
1200 'Result': {'$ref': '#/definitions/ErrorResults'}},
1202 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
1204 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
1206 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
1208 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
1210 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
1211 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
1213 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
1214 'Result': {'$ref': '#/definitions/StringResult'}},
1216 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
1217 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
1219 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
1221 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
1223 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
1225 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
1226 'Result': {'$ref': '#/definitions/ErrorResults'}},
1228 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
1230 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
1232 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
1237 @ReturnMapping(AddRelationResults
)
1238 async def AddRelation(self
, endpoints
):
1240 endpoints : typing.Sequence[str]
1241 Returns -> typing.Mapping[str, ~CharmRelation]
1243 # map input types to rpc msg
1245 msg
= dict(type='Application',
1246 request
='AddRelation',
1249 _params
['endpoints'] = endpoints
1250 reply
= await self
.rpc(msg
)
1255 @ReturnMapping(AddApplicationUnitsResults
)
1256 async def AddUnits(self
, application
, num_units
, placement
):
1260 placement : typing.Sequence[~Placement]
1261 Returns -> typing.Sequence[str]
1263 # map input types to rpc msg
1265 msg
= dict(type='Application',
1269 _params
['application'] = application
1270 _params
['num-units'] = num_units
1271 _params
['placement'] = placement
1272 reply
= await self
.rpc(msg
)
1277 @ReturnMapping(ApplicationCharmRelationsResults
)
1278 async def CharmRelations(self
, application
):
1281 Returns -> typing.Sequence[str]
1283 # map input types to rpc msg
1285 msg
= dict(type='Application',
1286 request
='CharmRelations',
1289 _params
['application'] = application
1290 reply
= await self
.rpc(msg
)
1295 @ReturnMapping(ErrorResults
)
1296 async def Deploy(self
, applications
):
1298 applications : typing.Sequence[~ApplicationDeploy]
1299 Returns -> typing.Sequence[~ErrorResult]
1301 # map input types to rpc msg
1303 msg
= dict(type='Application',
1307 _params
['applications'] = applications
1308 reply
= await self
.rpc(msg
)
1313 @ReturnMapping(None)
1314 async def Destroy(self
, application
):
1319 # map input types to rpc msg
1321 msg
= dict(type='Application',
1325 _params
['application'] = application
1326 reply
= await self
.rpc(msg
)
1331 @ReturnMapping(None)
1332 async def DestroyRelation(self
, endpoints
):
1334 endpoints : typing.Sequence[str]
1337 # map input types to rpc msg
1339 msg
= dict(type='Application',
1340 request
='DestroyRelation',
1343 _params
['endpoints'] = endpoints
1344 reply
= await self
.rpc(msg
)
1349 @ReturnMapping(None)
1350 async def DestroyUnits(self
, unit_names
):
1352 unit_names : typing.Sequence[str]
1355 # map input types to rpc msg
1357 msg
= dict(type='Application',
1358 request
='DestroyUnits',
1361 _params
['unit-names'] = unit_names
1362 reply
= await self
.rpc(msg
)
1367 @ReturnMapping(None)
1368 async def Expose(self
, application
):
1373 # map input types to rpc msg
1375 msg
= dict(type='Application',
1379 _params
['application'] = application
1380 reply
= await self
.rpc(msg
)
1385 @ReturnMapping(ApplicationGetResults
)
1386 async def Get(self
, application
):
1389 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
1391 # map input types to rpc msg
1393 msg
= dict(type='Application',
1397 _params
['application'] = application
1398 reply
= await self
.rpc(msg
)
1403 @ReturnMapping(StringResult
)
1404 async def GetCharmURL(self
, application
):
1407 Returns -> typing.Union[_ForwardRef('Error'), str]
1409 # map input types to rpc msg
1411 msg
= dict(type='Application',
1412 request
='GetCharmURL',
1415 _params
['application'] = application
1416 reply
= await self
.rpc(msg
)
1421 @ReturnMapping(GetConstraintsResults
)
1422 async def GetConstraints(self
, application
):
1427 # map input types to rpc msg
1429 msg
= dict(type='Application',
1430 request
='GetConstraints',
1433 _params
['application'] = application
1434 reply
= await self
.rpc(msg
)
1439 @ReturnMapping(None)
1440 async def Set(self
, application
, options
):
1443 options : typing.Mapping[str, str]
1446 # map input types to rpc msg
1448 msg
= dict(type='Application',
1452 _params
['application'] = application
1453 _params
['options'] = options
1454 reply
= await self
.rpc(msg
)
1459 @ReturnMapping(None)
1460 async def SetCharm(self
, application
, channel
, charm_url
, config_settings
, config_settings_yaml
, force_series
, force_units
, resource_ids
, storage_constraints
):
1465 config_settings : typing.Mapping[str, str]
1466 config_settings_yaml : str
1469 resource_ids : typing.Mapping[str, str]
1470 storage_constraints : typing.Mapping[str, ~StorageConstraints]
1473 # map input types to rpc msg
1475 msg
= dict(type='Application',
1479 _params
['application'] = application
1480 _params
['channel'] = channel
1481 _params
['charm-url'] = charm_url
1482 _params
['config-settings'] = config_settings
1483 _params
['config-settings-yaml'] = config_settings_yaml
1484 _params
['force-series'] = force_series
1485 _params
['force-units'] = force_units
1486 _params
['resource-ids'] = resource_ids
1487 _params
['storage-constraints'] = storage_constraints
1488 reply
= await self
.rpc(msg
)
1493 @ReturnMapping(None)
1494 async def SetConstraints(self
, application
, constraints
):
1500 # map input types to rpc msg
1502 msg
= dict(type='Application',
1503 request
='SetConstraints',
1506 _params
['application'] = application
1507 _params
['constraints'] = constraints
1508 reply
= await self
.rpc(msg
)
1513 @ReturnMapping(ErrorResults
)
1514 async def SetMetricCredentials(self
, creds
):
1516 creds : typing.Sequence[~ApplicationMetricCredential]
1517 Returns -> typing.Sequence[~ErrorResult]
1519 # map input types to rpc msg
1521 msg
= dict(type='Application',
1522 request
='SetMetricCredentials',
1525 _params
['creds'] = creds
1526 reply
= await self
.rpc(msg
)
1531 @ReturnMapping(None)
1532 async def Unexpose(self
, application
):
1537 # map input types to rpc msg
1539 msg
= dict(type='Application',
1543 _params
['application'] = application
1544 reply
= await self
.rpc(msg
)
1549 @ReturnMapping(None)
1550 async def Unset(self
, application
, options
):
1553 options : typing.Sequence[str]
1556 # map input types to rpc msg
1558 msg
= dict(type='Application',
1562 _params
['application'] = application
1563 _params
['options'] = options
1564 reply
= await self
.rpc(msg
)
1569 @ReturnMapping(None)
1570 async def Update(self
, application
, charm_url
, constraints
, force_charm_url
, force_series
, min_units
, settings
, settings_yaml
):
1575 force_charm_url : bool
1578 settings : typing.Mapping[str, str]
1582 # map input types to rpc msg
1584 msg
= dict(type='Application',
1588 _params
['application'] = application
1589 _params
['charm-url'] = charm_url
1590 _params
['constraints'] = constraints
1591 _params
['force-charm-url'] = force_charm_url
1592 _params
['force-series'] = force_series
1593 _params
['min-units'] = min_units
1594 _params
['settings'] = settings
1595 _params
['settings-yaml'] = settings_yaml
1596 reply
= await self
.rpc(msg
)
1601 class ApplicationOffersFacade(Type
):
1602 name
= 'ApplicationOffers'
1604 schema
= {'definitions': {'AddApplicationOffer': {'additionalProperties': False,
1605 'properties': {'application-description': {'type': 'string'},
1606 'application-name': {'type': 'string'},
1607 'endpoints': {'patternProperties': {'.*': {'type': 'string'}},
1609 'model-tag': {'type': 'string'},
1610 'offer-name': {'type': 'string'}},
1611 'required': ['model-tag',
1614 'application-description',
1617 'AddApplicationOffers': {'additionalProperties': False,
1618 'properties': {'Offers': {'items': {'$ref': '#/definitions/AddApplicationOffer'},
1620 'required': ['Offers'],
1622 'ApplicationOfferAdminDetails': {'additionalProperties': False,
1623 'properties': {'ApplicationOfferDetails': {'$ref': '#/definitions/ApplicationOfferDetails'},
1624 'application-name': {'type': 'string'},
1625 'charm-url': {'type': 'string'},
1626 'connections': {'items': {'$ref': '#/definitions/OfferConnection'},
1628 'required': ['ApplicationOfferDetails',
1632 'ApplicationOfferDetails': {'additionalProperties': False,
1633 'properties': {'application-description': {'type': 'string'},
1634 'bindings': {'patternProperties': {'.*': {'type': 'string'}},
1636 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
1638 'offer-name': {'type': 'string'},
1639 'offer-url': {'type': 'string'},
1640 'offer-uuid': {'type': 'string'},
1641 'source-model-tag': {'type': 'string'},
1642 'spaces': {'items': {'$ref': '#/definitions/RemoteSpace'},
1644 'users': {'items': {'$ref': '#/definitions/OfferUserDetails'},
1646 'required': ['source-model-tag',
1650 'application-description'],
1652 'ApplicationOfferResult': {'additionalProperties': False,
1653 'properties': {'error': {'$ref': '#/definitions/Error'},
1654 'result': {'$ref': '#/definitions/ApplicationOfferAdminDetails'}},
1656 'ApplicationOffersResults': {'additionalProperties': False,
1657 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationOfferResult'},
1660 'ConsumeOfferDetails': {'additionalProperties': False,
1661 'properties': {'external-controller': {'$ref': '#/definitions/ExternalControllerInfo'},
1662 'macaroon': {'$ref': '#/definitions/Macaroon'},
1663 'offer': {'$ref': '#/definitions/ApplicationOfferDetails'}},
1665 'ConsumeOfferDetailsResult': {'additionalProperties': False,
1666 'properties': {'ConsumeOfferDetails': {'$ref': '#/definitions/ConsumeOfferDetails'},
1667 'error': {'$ref': '#/definitions/Error'}},
1668 'required': ['ConsumeOfferDetails'],
1670 'ConsumeOfferDetailsResults': {'additionalProperties': False,
1671 'properties': {'results': {'items': {'$ref': '#/definitions/ConsumeOfferDetailsResult'},
1674 'DestroyApplicationOffers': {'additionalProperties': False,
1675 'properties': {'force': {'type': 'boolean'},
1676 'offer-urls': {'items': {'type': 'string'},
1678 'required': ['offer-urls'],
1680 'EndpointFilterAttributes': {'additionalProperties': False,
1681 'properties': {'interface': {'type': 'string'},
1682 'name': {'type': 'string'},
1683 'role': {'type': 'string'}},
1684 'required': ['role',
1688 'EntityStatus': {'additionalProperties': False,
1689 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1692 'info': {'type': 'string'},
1693 'since': {'format': 'date-time',
1695 'status': {'type': 'string'}},
1696 'required': ['status', 'info', 'since'],
1698 'Error': {'additionalProperties': False,
1699 'properties': {'code': {'type': 'string'},
1700 'info': {'$ref': '#/definitions/ErrorInfo'},
1701 'message': {'type': 'string'}},
1702 'required': ['message', 'code'],
1704 'ErrorInfo': {'additionalProperties': False,
1705 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1706 'macaroon-path': {'type': 'string'}},
1708 'ErrorResult': {'additionalProperties': False,
1709 'properties': {'error': {'$ref': '#/definitions/Error'}},
1711 'ErrorResults': {'additionalProperties': False,
1712 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1714 'required': ['results'],
1716 'ExternalControllerInfo': {'additionalProperties': False,
1717 'properties': {'addrs': {'items': {'type': 'string'},
1719 'ca-cert': {'type': 'string'},
1720 'controller-alias': {'type': 'string'},
1721 'controller-tag': {'type': 'string'}},
1722 'required': ['controller-tag',
1727 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1728 'ModifyOfferAccess': {'additionalProperties': False,
1729 'properties': {'access': {'type': 'string'},
1730 'action': {'type': 'string'},
1731 'offer-url': {'type': 'string'},
1732 'user-tag': {'type': 'string'}},
1733 'required': ['user-tag',
1738 'ModifyOfferAccessRequest': {'additionalProperties': False,
1739 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyOfferAccess'},
1741 'required': ['changes'],
1743 'OfferConnection': {'additionalProperties': False,
1744 'properties': {'endpoint': {'type': 'string'},
1745 'ingress-subnets': {'items': {'type': 'string'},
1747 'relation-id': {'type': 'integer'},
1748 'source-model-tag': {'type': 'string'},
1749 'status': {'$ref': '#/definitions/EntityStatus'},
1750 'username': {'type': 'string'}},
1751 'required': ['source-model-tag',
1758 'OfferFilter': {'additionalProperties': False,
1759 'properties': {'allowed-users': {'items': {'type': 'string'},
1761 'application-description': {'type': 'string'},
1762 'application-name': {'type': 'string'},
1763 'application-user': {'type': 'string'},
1764 'connected-users': {'items': {'type': 'string'},
1766 'endpoints': {'items': {'$ref': '#/definitions/EndpointFilterAttributes'},
1768 'model-name': {'type': 'string'},
1769 'offer-name': {'type': 'string'},
1770 'owner-name': {'type': 'string'}},
1771 'required': ['owner-name',
1775 'application-description',
1781 'OfferFilters': {'additionalProperties': False,
1782 'properties': {'Filters': {'items': {'$ref': '#/definitions/OfferFilter'},
1784 'required': ['Filters'],
1786 'OfferURLs': {'additionalProperties': False,
1787 'properties': {'offer-urls': {'items': {'type': 'string'},
1790 'OfferUserDetails': {'additionalProperties': False,
1791 'properties': {'access': {'type': 'string'},
1792 'display-name': {'type': 'string'},
1793 'user': {'type': 'string'}},
1794 'required': ['user',
1798 'QueryApplicationOffersResults': {'additionalProperties': False,
1799 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationOfferAdminDetails'},
1801 'required': ['results'],
1803 'RemoteApplicationInfo': {'additionalProperties': False,
1804 'properties': {'description': {'type': 'string'},
1805 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
1807 'icon-url-path': {'type': 'string'},
1808 'model-tag': {'type': 'string'},
1809 'name': {'type': 'string'},
1810 'offer-url': {'type': 'string'},
1811 'source-model-label': {'type': 'string'}},
1812 'required': ['model-tag',
1819 'RemoteApplicationInfoResult': {'additionalProperties': False,
1820 'properties': {'error': {'$ref': '#/definitions/Error'},
1821 'result': {'$ref': '#/definitions/RemoteApplicationInfo'}},
1823 'RemoteApplicationInfoResults': {'additionalProperties': False,
1824 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteApplicationInfoResult'},
1826 'required': ['results'],
1828 'RemoteEndpoint': {'additionalProperties': False,
1829 'properties': {'interface': {'type': 'string'},
1830 'limit': {'type': 'integer'},
1831 'name': {'type': 'string'},
1832 'role': {'type': 'string'}},
1833 'required': ['name',
1838 'RemoteSpace': {'additionalProperties': False,
1839 'properties': {'cloud-type': {'type': 'string'},
1840 'name': {'type': 'string'},
1841 'provider-attributes': {'patternProperties': {'.*': {'additionalProperties': True,
1844 'provider-id': {'type': 'string'},
1845 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
1847 'required': ['cloud-type',
1850 'provider-attributes',
1853 'Subnet': {'additionalProperties': False,
1854 'properties': {'cidr': {'type': 'string'},
1855 'life': {'type': 'string'},
1856 'provider-id': {'type': 'string'},
1857 'provider-network-id': {'type': 'string'},
1858 'provider-space-id': {'type': 'string'},
1859 'space-tag': {'type': 'string'},
1860 'status': {'type': 'string'},
1861 'vlan-tag': {'type': 'integer'},
1862 'zones': {'items': {'type': 'string'},
1864 'required': ['cidr',
1870 'properties': {'ApplicationOffers': {'properties': {'Params': {'$ref': '#/definitions/OfferURLs'},
1871 'Result': {'$ref': '#/definitions/ApplicationOffersResults'}},
1873 'DestroyOffers': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationOffers'},
1874 'Result': {'$ref': '#/definitions/ErrorResults'}},
1876 'FindApplicationOffers': {'properties': {'Params': {'$ref': '#/definitions/OfferFilters'},
1877 'Result': {'$ref': '#/definitions/QueryApplicationOffersResults'}},
1879 'GetConsumeDetails': {'properties': {'Params': {'$ref': '#/definitions/OfferURLs'},
1880 'Result': {'$ref': '#/definitions/ConsumeOfferDetailsResults'}},
1882 'ListApplicationOffers': {'properties': {'Params': {'$ref': '#/definitions/OfferFilters'},
1883 'Result': {'$ref': '#/definitions/QueryApplicationOffersResults'}},
1885 'ModifyOfferAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyOfferAccessRequest'},
1886 'Result': {'$ref': '#/definitions/ErrorResults'}},
1888 'Offer': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationOffers'},
1889 'Result': {'$ref': '#/definitions/ErrorResults'}},
1891 'RemoteApplicationInfo': {'properties': {'Params': {'$ref': '#/definitions/OfferURLs'},
1892 'Result': {'$ref': '#/definitions/RemoteApplicationInfoResults'}},
1897 @ReturnMapping(ApplicationOffersResults
)
1898 async def ApplicationOffers(self
, offer_urls
):
1900 offer_urls : typing.Sequence[str]
1901 Returns -> typing.Sequence[~ApplicationOfferResult]
1903 # map input types to rpc msg
1905 msg
= dict(type='ApplicationOffers',
1906 request
='ApplicationOffers',
1909 _params
['offer-urls'] = offer_urls
1910 reply
= await self
.rpc(msg
)
1915 @ReturnMapping(ErrorResults
)
1916 async def DestroyOffers(self
, force
, offer_urls
):
1919 offer_urls : typing.Sequence[str]
1920 Returns -> typing.Sequence[~ErrorResult]
1922 # map input types to rpc msg
1924 msg
= dict(type='ApplicationOffers',
1925 request
='DestroyOffers',
1928 _params
['force'] = force
1929 _params
['offer-urls'] = offer_urls
1930 reply
= await self
.rpc(msg
)
1935 @ReturnMapping(QueryApplicationOffersResults
)
1936 async def FindApplicationOffers(self
, filters
):
1938 filters : typing.Sequence[~OfferFilter]
1939 Returns -> typing.Sequence[~ApplicationOfferAdminDetails]
1941 # map input types to rpc msg
1943 msg
= dict(type='ApplicationOffers',
1944 request
='FindApplicationOffers',
1947 _params
['Filters'] = filters
1948 reply
= await self
.rpc(msg
)
1953 @ReturnMapping(ConsumeOfferDetailsResults
)
1954 async def GetConsumeDetails(self
, offer_urls
):
1956 offer_urls : typing.Sequence[str]
1957 Returns -> typing.Sequence[~ConsumeOfferDetailsResult]
1959 # map input types to rpc msg
1961 msg
= dict(type='ApplicationOffers',
1962 request
='GetConsumeDetails',
1965 _params
['offer-urls'] = offer_urls
1966 reply
= await self
.rpc(msg
)
1971 @ReturnMapping(QueryApplicationOffersResults
)
1972 async def ListApplicationOffers(self
, filters
):
1974 filters : typing.Sequence[~OfferFilter]
1975 Returns -> typing.Sequence[~ApplicationOfferAdminDetails]
1977 # map input types to rpc msg
1979 msg
= dict(type='ApplicationOffers',
1980 request
='ListApplicationOffers',
1983 _params
['Filters'] = filters
1984 reply
= await self
.rpc(msg
)
1989 @ReturnMapping(ErrorResults
)
1990 async def ModifyOfferAccess(self
, changes
):
1992 changes : typing.Sequence[~ModifyOfferAccess]
1993 Returns -> typing.Sequence[~ErrorResult]
1995 # map input types to rpc msg
1997 msg
= dict(type='ApplicationOffers',
1998 request
='ModifyOfferAccess',
2001 _params
['changes'] = changes
2002 reply
= await self
.rpc(msg
)
2007 @ReturnMapping(ErrorResults
)
2008 async def Offer(self
, offers
):
2010 offers : typing.Sequence[~AddApplicationOffer]
2011 Returns -> typing.Sequence[~ErrorResult]
2013 # map input types to rpc msg
2015 msg
= dict(type='ApplicationOffers',
2019 _params
['Offers'] = offers
2020 reply
= await self
.rpc(msg
)
2025 @ReturnMapping(RemoteApplicationInfoResults
)
2026 async def RemoteApplicationInfo(self
, offer_urls
):
2028 offer_urls : typing.Sequence[str]
2029 Returns -> typing.Sequence[~RemoteApplicationInfoResult]
2031 # map input types to rpc msg
2033 msg
= dict(type='ApplicationOffers',
2034 request
='RemoteApplicationInfo',
2037 _params
['offer-urls'] = offer_urls
2038 reply
= await self
.rpc(msg
)
2043 class BackupsFacade(Type
):
2046 schema
= {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
2047 'properties': {'keep-copy': {'type': 'boolean'},
2048 'no-download': {'type': 'boolean'},
2049 'notes': {'type': 'string'}},
2050 'required': ['notes',
2054 'BackupsInfoArgs': {'additionalProperties': False,
2055 'properties': {'id': {'type': 'string'}},
2058 'BackupsListArgs': {'additionalProperties': False,
2060 'BackupsListResult': {'additionalProperties': False,
2061 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
2063 'required': ['list'],
2065 'BackupsMetadataResult': {'additionalProperties': False,
2066 'properties': {'ca-cert': {'type': 'string'},
2067 'ca-private-key': {'type': 'string'},
2068 'checksum': {'type': 'string'},
2069 'checksum-format': {'type': 'string'},
2070 'filename': {'type': 'string'},
2071 'finished': {'format': 'date-time',
2073 'hostname': {'type': 'string'},
2074 'id': {'type': 'string'},
2075 'machine': {'type': 'string'},
2076 'model': {'type': 'string'},
2077 'notes': {'type': 'string'},
2078 'series': {'type': 'string'},
2079 'size': {'type': 'integer'},
2080 'started': {'format': 'date-time',
2082 'stored': {'format': 'date-time',
2084 'version': {'$ref': '#/definitions/Number'}},
2102 'BackupsRemoveArgs': {'additionalProperties': False,
2103 'properties': {'ids': {'items': {'type': 'string'},
2105 'required': ['ids'],
2107 'Error': {'additionalProperties': False,
2108 'properties': {'code': {'type': 'string'},
2109 'info': {'$ref': '#/definitions/ErrorInfo'},
2110 'message': {'type': 'string'}},
2111 'required': ['message', 'code'],
2113 'ErrorInfo': {'additionalProperties': False,
2114 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2115 'macaroon-path': {'type': 'string'}},
2117 'ErrorResult': {'additionalProperties': False,
2118 'properties': {'error': {'$ref': '#/definitions/Error'}},
2120 'ErrorResults': {'additionalProperties': False,
2121 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2123 'required': ['results'],
2125 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2126 'Number': {'additionalProperties': False,
2127 'properties': {'Build': {'type': 'integer'},
2128 'Major': {'type': 'integer'},
2129 'Minor': {'type': 'integer'},
2130 'Patch': {'type': 'integer'},
2131 'Tag': {'type': 'string'}},
2132 'required': ['Major',
2138 'RestoreArgs': {'additionalProperties': False,
2139 'properties': {'backup-id': {'type': 'string'}},
2140 'required': ['backup-id'],
2142 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
2143 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
2145 'FinishRestore': {'type': 'object'},
2146 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
2147 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
2149 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
2150 'Result': {'$ref': '#/definitions/BackupsListResult'}},
2152 'PrepareRestore': {'type': 'object'},
2153 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'},
2154 'Result': {'$ref': '#/definitions/ErrorResults'}},
2156 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
2161 @ReturnMapping(BackupsMetadataResult
)
2162 async def Create(self
, notes
):
2165 Returns -> typing.Union[str, int, _ForwardRef('Number')]
2167 # map input types to rpc msg
2169 msg
= dict(type='Backups',
2173 _params
['notes'] = notes
2174 reply
= await self
.rpc(msg
)
2179 @ReturnMapping(None)
2180 async def FinishRestore(self
):
2185 # map input types to rpc msg
2187 msg
= dict(type='Backups',
2188 request
='FinishRestore',
2192 reply
= await self
.rpc(msg
)
2197 @ReturnMapping(BackupsMetadataResult
)
2198 async def Info(self
, id_
):
2201 Returns -> typing.Union[str, int, _ForwardRef('Number')]
2203 # map input types to rpc msg
2205 msg
= dict(type='Backups',
2210 reply
= await self
.rpc(msg
)
2215 @ReturnMapping(BackupsListResult
)
2216 async def List(self
):
2219 Returns -> typing.Sequence[~BackupsMetadataResult]
2221 # map input types to rpc msg
2223 msg
= dict(type='Backups',
2228 reply
= await self
.rpc(msg
)
2233 @ReturnMapping(None)
2234 async def PrepareRestore(self
):
2239 # map input types to rpc msg
2241 msg
= dict(type='Backups',
2242 request
='PrepareRestore',
2246 reply
= await self
.rpc(msg
)
2251 @ReturnMapping(ErrorResults
)
2252 async def Remove(self
, id_
):
2255 Returns -> typing.Sequence[~ErrorResult]
2257 # map input types to rpc msg
2259 msg
= dict(type='Backups',
2264 reply
= await self
.rpc(msg
)
2269 @ReturnMapping(None)
2270 async def Restore(self
, backup_id
):
2275 # map input types to rpc msg
2277 msg
= dict(type='Backups',
2281 _params
['backup-id'] = backup_id
2282 reply
= await self
.rpc(msg
)
2287 class BlockFacade(Type
):
2290 schema
= {'definitions': {'Block': {'additionalProperties': False,
2291 'properties': {'id': {'type': 'string'},
2292 'message': {'type': 'string'},
2293 'tag': {'type': 'string'},
2294 'type': {'type': 'string'}},
2295 'required': ['id', 'tag', 'type'],
2297 'BlockResult': {'additionalProperties': False,
2298 'properties': {'error': {'$ref': '#/definitions/Error'},
2299 'result': {'$ref': '#/definitions/Block'}},
2300 'required': ['result'],
2302 'BlockResults': {'additionalProperties': False,
2303 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
2306 'BlockSwitchParams': {'additionalProperties': False,
2307 'properties': {'message': {'type': 'string'},
2308 'type': {'type': 'string'}},
2309 'required': ['type'],
2311 'Error': {'additionalProperties': False,
2312 'properties': {'code': {'type': 'string'},
2313 'info': {'$ref': '#/definitions/ErrorInfo'},
2314 'message': {'type': 'string'}},
2315 'required': ['message', 'code'],
2317 'ErrorInfo': {'additionalProperties': False,
2318 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2319 'macaroon-path': {'type': 'string'}},
2321 'ErrorResult': {'additionalProperties': False,
2322 'properties': {'error': {'$ref': '#/definitions/Error'}},
2324 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2325 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
2327 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
2328 'Result': {'$ref': '#/definitions/ErrorResult'}},
2330 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
2331 'Result': {'$ref': '#/definitions/ErrorResult'}},
2336 @ReturnMapping(BlockResults
)
2337 async def List(self
):
2340 Returns -> typing.Sequence[~BlockResult]
2342 # map input types to rpc msg
2344 msg
= dict(type='Block',
2349 reply
= await self
.rpc(msg
)
2354 @ReturnMapping(ErrorResult
)
2355 async def SwitchBlockOff(self
, message
, type_
):
2361 # map input types to rpc msg
2363 msg
= dict(type='Block',
2364 request
='SwitchBlockOff',
2367 _params
['message'] = message
2368 _params
['type'] = type_
2369 reply
= await self
.rpc(msg
)
2374 @ReturnMapping(ErrorResult
)
2375 async def SwitchBlockOn(self
, message
, type_
):
2381 # map input types to rpc msg
2383 msg
= dict(type='Block',
2384 request
='SwitchBlockOn',
2387 _params
['message'] = message
2388 _params
['type'] = type_
2389 reply
= await self
.rpc(msg
)
2394 class BundleFacade(Type
):
2397 schema
= {'definitions': {'BundleChange': {'additionalProperties': False,
2398 'properties': {'args': {'items': {'additionalProperties': True,
2401 'id': {'type': 'string'},
2402 'method': {'type': 'string'},
2403 'requires': {'items': {'type': 'string'},
2410 'BundleChangesParams': {'additionalProperties': False,
2411 'properties': {'bundleURL': {'type': 'string'},
2412 'yaml': {'type': 'string'}},
2413 'required': ['yaml', 'bundleURL'],
2415 'BundleChangesResults': {'additionalProperties': False,
2416 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
2418 'errors': {'items': {'type': 'string'},
2421 'Error': {'additionalProperties': False,
2422 'properties': {'code': {'type': 'string'},
2423 'info': {'$ref': '#/definitions/ErrorInfo'},
2424 'message': {'type': 'string'}},
2425 'required': ['message', 'code'],
2427 'ErrorInfo': {'additionalProperties': False,
2428 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2429 'macaroon-path': {'type': 'string'}},
2431 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2432 'StringResult': {'additionalProperties': False,
2433 'properties': {'error': {'$ref': '#/definitions/Error'},
2434 'result': {'type': 'string'}},
2435 'required': ['result'],
2437 'properties': {'ExportBundle': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
2439 'GetChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
2440 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
2445 @ReturnMapping(StringResult
)
2446 async def ExportBundle(self
):
2449 Returns -> typing.Union[_ForwardRef('Error'), str]
2451 # map input types to rpc msg
2453 msg
= dict(type='Bundle',
2454 request
='ExportBundle',
2458 reply
= await self
.rpc(msg
)
2463 @ReturnMapping(BundleChangesResults
)
2464 async def GetChanges(self
, yaml
):
2467 Returns -> typing.Union[typing.Sequence[~BundleChange], typing.Sequence[str]]
2469 # map input types to rpc msg
2471 msg
= dict(type='Bundle',
2472 request
='GetChanges',
2475 _params
['yaml'] = yaml
2476 reply
= await self
.rpc(msg
)
2481 class CharmRevisionUpdaterFacade(Type
):
2482 name
= 'CharmRevisionUpdater'
2484 schema
= {'definitions': {'Error': {'additionalProperties': False,
2485 'properties': {'code': {'type': 'string'},
2486 'info': {'$ref': '#/definitions/ErrorInfo'},
2487 'message': {'type': 'string'}},
2488 'required': ['message', 'code'],
2490 'ErrorInfo': {'additionalProperties': False,
2491 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2492 'macaroon-path': {'type': 'string'}},
2494 'ErrorResult': {'additionalProperties': False,
2495 'properties': {'error': {'$ref': '#/definitions/Error'}},
2497 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2498 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
2503 @ReturnMapping(ErrorResult
)
2504 async def UpdateLatestRevisions(self
):
2509 # map input types to rpc msg
2511 msg
= dict(type='CharmRevisionUpdater',
2512 request
='UpdateLatestRevisions',
2516 reply
= await self
.rpc(msg
)
2521 class CharmsFacade(Type
):
2524 schema
= {'definitions': {'CharmActionSpec': {'additionalProperties': False,
2525 'properties': {'description': {'type': 'string'},
2526 'params': {'patternProperties': {'.*': {'additionalProperties': True,
2529 'required': ['description', 'params'],
2531 'CharmActions': {'additionalProperties': False,
2532 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}},
2535 'CharmDevice': {'additionalProperties': False,
2536 'properties': {'CountMax': {'type': 'integer'},
2537 'CountMin': {'type': 'integer'},
2538 'Description': {'type': 'string'},
2539 'Name': {'type': 'string'},
2540 'Type': {'type': 'string'}},
2541 'required': ['Name',