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<+T_co>[~Entity]<~Entity>
169 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
171 # map input types to rpc msg
173 msg
= dict(type='Action', request
='Actions', version
=2, params
=_params
)
174 _params
['entities'] = entities
175 reply
= await self
.rpc(msg
)
180 @ReturnMapping(ApplicationsCharmActionsResults
)
181 async def ApplicationsCharmsActions(self
, entities
):
183 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
184 Returns -> typing.Sequence<+T_co>[~ApplicationCharmActionsResult]<~ApplicationCharmActionsResult>
186 # map input types to rpc msg
188 msg
= dict(type='Action', request
='ApplicationsCharmsActions', version
=2, params
=_params
)
189 _params
['entities'] = entities
190 reply
= await self
.rpc(msg
)
195 @ReturnMapping(ActionResults
)
196 async def Cancel(self
, entities
):
198 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
199 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
201 # map input types to rpc msg
203 msg
= dict(type='Action', request
='Cancel', version
=2, params
=_params
)
204 _params
['entities'] = entities
205 reply
= await self
.rpc(msg
)
210 @ReturnMapping(ActionResults
)
211 async def Enqueue(self
, actions
):
213 actions : typing.Sequence<+T_co>[~Action]<~Action>
214 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
216 # map input types to rpc msg
218 msg
= dict(type='Action', request
='Enqueue', version
=2, params
=_params
)
219 _params
['actions'] = actions
220 reply
= await self
.rpc(msg
)
225 @ReturnMapping(FindTagsResults
)
226 async def FindActionTagsByPrefix(self
, prefixes
):
228 prefixes : typing.Sequence<+T_co>[str]
229 Returns -> typing.Sequence<+T_co>[~Entity]<~Entity>
231 # map input types to rpc msg
233 msg
= dict(type='Action', request
='FindActionTagsByPrefix', version
=2, params
=_params
)
234 _params
['prefixes'] = prefixes
235 reply
= await self
.rpc(msg
)
240 @ReturnMapping(ActionsByNames
)
241 async def FindActionsByNames(self
, names
):
243 names : typing.Sequence<+T_co>[str]
244 Returns -> typing.Sequence<+T_co>[~ActionsByName]<~ActionsByName>
246 # map input types to rpc msg
248 msg
= dict(type='Action', request
='FindActionsByNames', version
=2, params
=_params
)
249 _params
['names'] = names
250 reply
= await self
.rpc(msg
)
255 @ReturnMapping(ActionsByReceivers
)
256 async def ListAll(self
, entities
):
258 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
259 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
261 # map input types to rpc msg
263 msg
= dict(type='Action', request
='ListAll', version
=2, params
=_params
)
264 _params
['entities'] = entities
265 reply
= await self
.rpc(msg
)
270 @ReturnMapping(ActionsByReceivers
)
271 async def ListCompleted(self
, entities
):
273 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
274 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
276 # map input types to rpc msg
278 msg
= dict(type='Action', request
='ListCompleted', version
=2, params
=_params
)
279 _params
['entities'] = entities
280 reply
= await self
.rpc(msg
)
285 @ReturnMapping(ActionsByReceivers
)
286 async def ListPending(self
, entities
):
288 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
289 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
291 # map input types to rpc msg
293 msg
= dict(type='Action', request
='ListPending', version
=2, params
=_params
)
294 _params
['entities'] = entities
295 reply
= await self
.rpc(msg
)
300 @ReturnMapping(ActionsByReceivers
)
301 async def ListRunning(self
, entities
):
303 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
304 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
306 # map input types to rpc msg
308 msg
= dict(type='Action', request
='ListRunning', version
=2, params
=_params
)
309 _params
['entities'] = entities
310 reply
= await self
.rpc(msg
)
315 @ReturnMapping(ActionResults
)
316 async def Run(self
, applications
, commands
, machines
, timeout
, units
):
318 applications : typing.Sequence<+T_co>[str]
320 machines : typing.Sequence<+T_co>[str]
322 units : typing.Sequence<+T_co>[str]
323 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
325 # map input types to rpc msg
327 msg
= dict(type='Action', request
='Run', version
=2, params
=_params
)
328 _params
['applications'] = applications
329 _params
['commands'] = commands
330 _params
['machines'] = machines
331 _params
['timeout'] = timeout
332 _params
['units'] = units
333 reply
= await self
.rpc(msg
)
338 @ReturnMapping(ActionResults
)
339 async def RunOnAllMachines(self
, applications
, commands
, machines
, timeout
, units
):
341 applications : typing.Sequence<+T_co>[str]
343 machines : typing.Sequence<+T_co>[str]
345 units : typing.Sequence<+T_co>[str]
346 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
348 # map input types to rpc msg
350 msg
= dict(type='Action', request
='RunOnAllMachines', version
=2, params
=_params
)
351 _params
['applications'] = applications
352 _params
['commands'] = commands
353 _params
['machines'] = machines
354 _params
['timeout'] = timeout
355 _params
['units'] = units
356 reply
= await self
.rpc(msg
)
361 class AgentFacade(Type
):
364 schema
= {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
365 'properties': {'container-type': {'type': 'string'},
366 'error': {'$ref': '#/definitions/Error'},
367 'jobs': {'items': {'type': 'string'},
369 'life': {'type': 'string'}},
374 'AgentGetEntitiesResults': {'additionalProperties': False,
375 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
377 'required': ['entities'],
379 'CloudCredential': {'additionalProperties': False,
380 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
382 'auth-type': {'type': 'string'},
383 'redacted': {'items': {'type': 'string'},
385 'required': ['auth-type'],
387 'CloudSpec': {'additionalProperties': False,
388 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
389 'endpoint': {'type': 'string'},
390 'identity-endpoint': {'type': 'string'},
391 'name': {'type': 'string'},
392 'region': {'type': 'string'},
393 'storage-endpoint': {'type': 'string'},
394 'type': {'type': 'string'}},
395 'required': ['type', 'name'],
397 'CloudSpecResult': {'additionalProperties': False,
398 'properties': {'error': {'$ref': '#/definitions/Error'},
399 'result': {'$ref': '#/definitions/CloudSpec'}},
401 'CloudSpecResults': {'additionalProperties': False,
402 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
405 'ControllerConfigResult': {'additionalProperties': False,
406 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
409 'required': ['config'],
411 'Entities': {'additionalProperties': False,
412 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
414 'required': ['entities'],
416 'Entity': {'additionalProperties': False,
417 'properties': {'tag': {'type': 'string'}},
420 'EntityPassword': {'additionalProperties': False,
421 'properties': {'password': {'type': 'string'},
422 'tag': {'type': 'string'}},
423 'required': ['tag', 'password'],
425 'EntityPasswords': {'additionalProperties': False,
426 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
428 'required': ['changes'],
430 'Error': {'additionalProperties': False,
431 'properties': {'code': {'type': 'string'},
432 'info': {'$ref': '#/definitions/ErrorInfo'},
433 'message': {'type': 'string'}},
434 'required': ['message', 'code'],
436 'ErrorInfo': {'additionalProperties': False,
437 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
438 'macaroon-path': {'type': 'string'}},
440 'ErrorResult': {'additionalProperties': False,
441 'properties': {'error': {'$ref': '#/definitions/Error'}},
443 'ErrorResults': {'additionalProperties': False,
444 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
446 'required': ['results'],
448 'IsMasterResult': {'additionalProperties': False,
449 'properties': {'master': {'type': 'boolean'}},
450 'required': ['master'],
452 'Macaroon': {'additionalProperties': False, 'type': 'object'},
453 'ModelConfigResult': {'additionalProperties': False,
454 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
457 'required': ['config'],
459 'ModelTag': {'additionalProperties': False, 'type': 'object'},
460 'NotifyWatchResult': {'additionalProperties': False,
461 'properties': {'NotifyWatcherId': {'type': 'string'},
462 'error': {'$ref': '#/definitions/Error'}},
463 'required': ['NotifyWatcherId'],
465 'NotifyWatchResults': {'additionalProperties': False,
466 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
468 'required': ['results'],
470 'StateServingInfo': {'additionalProperties': False,
471 'properties': {'api-port': {'type': 'integer'},
472 'ca-private-key': {'type': 'string'},
473 'cert': {'type': 'string'},
474 'private-key': {'type': 'string'},
475 'shared-secret': {'type': 'string'},
476 'state-port': {'type': 'integer'},
477 'system-identity': {'type': 'string'}},
478 'required': ['api-port',
486 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
487 'Result': {'$ref': '#/definitions/ErrorResults'}},
489 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
490 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
492 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
494 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
495 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
497 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
498 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
500 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
502 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
504 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
505 'Result': {'$ref': '#/definitions/ErrorResults'}},
507 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
509 'WatchCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
510 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
512 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
517 @ReturnMapping(ErrorResults
)
518 async def ClearReboot(self
, entities
):
520 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
521 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
523 # map input types to rpc msg
525 msg
= dict(type='Agent', request
='ClearReboot', version
=2, params
=_params
)
526 _params
['entities'] = entities
527 reply
= await self
.rpc(msg
)
532 @ReturnMapping(CloudSpecResults
)
533 async def CloudSpec(self
, entities
):
535 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
536 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
538 # map input types to rpc msg
540 msg
= dict(type='Agent', request
='CloudSpec', version
=2, params
=_params
)
541 _params
['entities'] = entities
542 reply
= await self
.rpc(msg
)
547 @ReturnMapping(ControllerConfigResult
)
548 async def ControllerConfig(self
):
551 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
553 # map input types to rpc msg
555 msg
= dict(type='Agent', request
='ControllerConfig', version
=2, params
=_params
)
557 reply
= await self
.rpc(msg
)
562 @ReturnMapping(CloudSpecResult
)
563 async def GetCloudSpec(self
):
566 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
568 # map input types to rpc msg
570 msg
= dict(type='Agent', request
='GetCloudSpec', version
=2, params
=_params
)
572 reply
= await self
.rpc(msg
)
577 @ReturnMapping(AgentGetEntitiesResults
)
578 async def GetEntities(self
, entities
):
580 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
581 Returns -> typing.Sequence<+T_co>[~AgentGetEntitiesResult]<~AgentGetEntitiesResult>
583 # map input types to rpc msg
585 msg
= dict(type='Agent', request
='GetEntities', version
=2, params
=_params
)
586 _params
['entities'] = entities
587 reply
= await self
.rpc(msg
)
592 @ReturnMapping(IsMasterResult
)
593 async def IsMaster(self
):
598 # map input types to rpc msg
600 msg
= dict(type='Agent', request
='IsMaster', version
=2, params
=_params
)
602 reply
= await self
.rpc(msg
)
607 @ReturnMapping(ModelConfigResult
)
608 async def ModelConfig(self
):
611 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
613 # map input types to rpc msg
615 msg
= dict(type='Agent', request
='ModelConfig', version
=2, params
=_params
)
617 reply
= await self
.rpc(msg
)
622 @ReturnMapping(ErrorResults
)
623 async def SetPasswords(self
, changes
):
625 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
626 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
628 # map input types to rpc msg
630 msg
= dict(type='Agent', request
='SetPasswords', version
=2, params
=_params
)
631 _params
['changes'] = changes
632 reply
= await self
.rpc(msg
)
637 @ReturnMapping(StateServingInfo
)
638 async def StateServingInfo(self
):
641 Returns -> typing.Union[int, str]
643 # map input types to rpc msg
645 msg
= dict(type='Agent', request
='StateServingInfo', version
=2, params
=_params
)
647 reply
= await self
.rpc(msg
)
652 @ReturnMapping(NotifyWatchResults
)
653 async def WatchCredentials(self
, entities
):
655 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
656 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
658 # map input types to rpc msg
660 msg
= dict(type='Agent', request
='WatchCredentials', version
=2, params
=_params
)
661 _params
['entities'] = entities
662 reply
= await self
.rpc(msg
)
667 @ReturnMapping(NotifyWatchResult
)
668 async def WatchForModelConfigChanges(self
):
671 Returns -> typing.Union[str, _ForwardRef('Error')]
673 # map input types to rpc msg
675 msg
= dict(type='Agent', request
='WatchForModelConfigChanges', version
=2, params
=_params
)
677 reply
= await self
.rpc(msg
)
682 class AllModelWatcherFacade(Type
):
683 name
= 'AllModelWatcher'
685 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
686 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
688 'required': ['deltas'],
690 'Delta': {'additionalProperties': False,
691 'properties': {'entity': {'additionalProperties': True,
693 'removed': {'type': 'boolean'}},
694 'required': ['removed', 'entity'],
696 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
698 'Stop': {'type': 'object'}},
702 @ReturnMapping(AllWatcherNextResults
)
703 async def Next(self
):
706 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
708 # map input types to rpc msg
710 msg
= dict(type='AllModelWatcher', request
='Next', version
=2, params
=_params
)
712 reply
= await self
.rpc(msg
)
718 async def Stop(self
):
723 # map input types to rpc msg
725 msg
= dict(type='AllModelWatcher', request
='Stop', version
=2, params
=_params
)
727 reply
= await self
.rpc(msg
)
732 class AnnotationsFacade(Type
):
735 schema
= {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
736 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
738 'entity': {'type': 'string'},
739 'error': {'$ref': '#/definitions/ErrorResult'}},
740 'required': ['entity', 'annotations'],
742 'AnnotationsGetResults': {'additionalProperties': False,
743 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
745 'required': ['results'],
747 'AnnotationsSet': {'additionalProperties': False,
748 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
750 'required': ['annotations'],
752 'Entities': {'additionalProperties': False,
753 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
755 'required': ['entities'],
757 'Entity': {'additionalProperties': False,
758 'properties': {'tag': {'type': 'string'}},
761 'EntityAnnotations': {'additionalProperties': False,
762 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
764 'entity': {'type': 'string'}},
765 'required': ['entity', 'annotations'],
767 'Error': {'additionalProperties': False,
768 'properties': {'code': {'type': 'string'},
769 'info': {'$ref': '#/definitions/ErrorInfo'},
770 'message': {'type': 'string'}},
771 'required': ['message', 'code'],
773 'ErrorInfo': {'additionalProperties': False,
774 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
775 'macaroon-path': {'type': 'string'}},
777 'ErrorResult': {'additionalProperties': False,
778 'properties': {'error': {'$ref': '#/definitions/Error'}},
780 'ErrorResults': {'additionalProperties': False,
781 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
783 'required': ['results'],
785 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
786 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
787 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
789 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
790 'Result': {'$ref': '#/definitions/ErrorResults'}},
795 @ReturnMapping(AnnotationsGetResults
)
796 async def Get(self
, entities
):
798 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
799 Returns -> typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult>
801 # map input types to rpc msg
803 msg
= dict(type='Annotations', request
='Get', version
=2, params
=_params
)
804 _params
['entities'] = entities
805 reply
= await self
.rpc(msg
)
810 @ReturnMapping(ErrorResults
)
811 async def Set(self
, annotations
):
813 annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations>
814 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
816 # map input types to rpc msg
818 msg
= dict(type='Annotations', request
='Set', version
=2, params
=_params
)
819 _params
['annotations'] = annotations
820 reply
= await self
.rpc(msg
)
825 class ApplicationFacade(Type
):
828 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
829 'properties': {'application': {'type': 'string'},
830 'num-units': {'type': 'integer'},
831 'placement': {'items': {'$ref': '#/definitions/Placement'},
833 'required': ['application',
837 'AddApplicationUnitsResults': {'additionalProperties': False,
838 'properties': {'units': {'items': {'type': 'string'},
840 'required': ['units'],
842 'AddRelation': {'additionalProperties': False,
843 'properties': {'endpoints': {'items': {'type': 'string'},
845 'required': ['endpoints'],
847 'AddRelationResults': {'additionalProperties': False,
848 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
850 'required': ['endpoints'],
852 'ApplicationCharmRelations': {'additionalProperties': False,
853 'properties': {'application': {'type': 'string'}},
854 'required': ['application'],
856 'ApplicationCharmRelationsResults': {'additionalProperties': False,
857 'properties': {'charm-relations': {'items': {'type': 'string'},
859 'required': ['charm-relations'],
861 'ApplicationDeploy': {'additionalProperties': False,
862 'properties': {'application': {'type': 'string'},
863 'channel': {'type': 'string'},
864 'charm-url': {'type': 'string'},
865 'config': {'patternProperties': {'.*': {'type': 'string'}},
867 'config-yaml': {'type': 'string'},
868 'constraints': {'$ref': '#/definitions/Value'},
869 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
871 'num-units': {'type': 'integer'},
872 'placement': {'items': {'$ref': '#/definitions/Placement'},
874 'resources': {'patternProperties': {'.*': {'type': 'string'}},
876 'series': {'type': 'string'},
877 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
879 'required': ['application',
887 'ApplicationDestroy': {'additionalProperties': False,
888 'properties': {'application': {'type': 'string'}},
889 'required': ['application'],
891 'ApplicationExpose': {'additionalProperties': False,
892 'properties': {'application': {'type': 'string'}},
893 'required': ['application'],
895 'ApplicationGet': {'additionalProperties': False,
896 'properties': {'application': {'type': 'string'}},
897 'required': ['application'],
899 'ApplicationGetResults': {'additionalProperties': False,
900 'properties': {'application': {'type': 'string'},
901 'charm': {'type': 'string'},
902 'config': {'patternProperties': {'.*': {'additionalProperties': True,
905 'constraints': {'$ref': '#/definitions/Value'},
906 'series': {'type': 'string'}},
907 'required': ['application',
913 'ApplicationMetricCredential': {'additionalProperties': False,
914 'properties': {'application': {'type': 'string'},
915 'metrics-credentials': {'items': {'type': 'integer'},
917 'required': ['application',
918 'metrics-credentials'],
920 'ApplicationMetricCredentials': {'additionalProperties': False,
921 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
923 'required': ['creds'],
925 'ApplicationSet': {'additionalProperties': False,
926 'properties': {'application': {'type': 'string'},
927 'options': {'patternProperties': {'.*': {'type': 'string'}},
929 'required': ['application', 'options'],
931 'ApplicationSetCharm': {'additionalProperties': False,
932 'properties': {'application': {'type': 'string'},
933 'channel': {'type': 'string'},
934 'charm-url': {'type': 'string'},
935 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
937 'config-settings-yaml': {'type': 'string'},
938 'force-series': {'type': 'boolean'},
939 'force-units': {'type': 'boolean'},
940 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
942 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
944 'required': ['application',
950 'ApplicationUnexpose': {'additionalProperties': False,
951 'properties': {'application': {'type': 'string'}},
952 'required': ['application'],
954 'ApplicationUnset': {'additionalProperties': False,
955 'properties': {'application': {'type': 'string'},
956 'options': {'items': {'type': 'string'},
958 'required': ['application', 'options'],
960 'ApplicationUpdate': {'additionalProperties': False,
961 'properties': {'application': {'type': 'string'},
962 'charm-url': {'type': 'string'},
963 'constraints': {'$ref': '#/definitions/Value'},
964 'force-charm-url': {'type': 'boolean'},
965 'force-series': {'type': 'boolean'},
966 'min-units': {'type': 'integer'},
967 'settings': {'patternProperties': {'.*': {'type': 'string'}},
969 'settings-yaml': {'type': 'string'}},
970 'required': ['application',
976 'ApplicationsDeploy': {'additionalProperties': False,
977 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
979 'required': ['applications'],
981 'CharmRelation': {'additionalProperties': False,
982 'properties': {'interface': {'type': 'string'},
983 'limit': {'type': 'integer'},
984 'name': {'type': 'string'},
985 'optional': {'type': 'boolean'},
986 'role': {'type': 'string'},
987 'scope': {'type': 'string'}},
995 'Constraints': {'additionalProperties': False,
996 'properties': {'Count': {'type': 'integer'},
997 'Pool': {'type': 'string'},
998 'Size': {'type': 'integer'}},
999 'required': ['Pool', 'Size', 'Count'],
1001 'DestroyApplicationUnits': {'additionalProperties': False,
1002 'properties': {'unit-names': {'items': {'type': 'string'},
1004 'required': ['unit-names'],
1006 'DestroyRelation': {'additionalProperties': False,
1007 'properties': {'endpoints': {'items': {'type': 'string'},
1009 'required': ['endpoints'],
1011 'Error': {'additionalProperties': False,
1012 'properties': {'code': {'type': 'string'},
1013 'info': {'$ref': '#/definitions/ErrorInfo'},
1014 'message': {'type': 'string'}},
1015 'required': ['message', 'code'],
1017 'ErrorInfo': {'additionalProperties': False,
1018 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1019 'macaroon-path': {'type': 'string'}},
1021 'ErrorResult': {'additionalProperties': False,
1022 'properties': {'error': {'$ref': '#/definitions/Error'}},
1024 'ErrorResults': {'additionalProperties': False,
1025 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1027 'required': ['results'],
1029 'GetApplicationConstraints': {'additionalProperties': False,
1030 'properties': {'application': {'type': 'string'}},
1031 'required': ['application'],
1033 'GetConstraintsResults': {'additionalProperties': False,
1034 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
1035 'required': ['constraints'],
1037 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1038 'Placement': {'additionalProperties': False,
1039 'properties': {'directive': {'type': 'string'},
1040 'scope': {'type': 'string'}},
1041 'required': ['scope', 'directive'],
1043 'SetConstraints': {'additionalProperties': False,
1044 'properties': {'application': {'type': 'string'},
1045 'constraints': {'$ref': '#/definitions/Value'}},
1046 'required': ['application', 'constraints'],
1048 'StorageConstraints': {'additionalProperties': False,
1049 'properties': {'count': {'type': 'integer'},
1050 'pool': {'type': 'string'},
1051 'size': {'type': 'integer'}},
1053 'StringResult': {'additionalProperties': False,
1054 'properties': {'error': {'$ref': '#/definitions/Error'},
1055 'result': {'type': 'string'}},
1056 'required': ['result'],
1058 'Value': {'additionalProperties': False,
1059 'properties': {'arch': {'type': 'string'},
1060 'container': {'type': 'string'},
1061 'cores': {'type': 'integer'},
1062 'cpu-power': {'type': 'integer'},
1063 'instance-type': {'type': 'string'},
1064 'mem': {'type': 'integer'},
1065 'root-disk': {'type': 'integer'},
1066 'spaces': {'items': {'type': 'string'},
1068 'tags': {'items': {'type': 'string'},
1070 'virt-type': {'type': 'string'}},
1072 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
1073 'Result': {'$ref': '#/definitions/AddRelationResults'}},
1075 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
1076 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
1078 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
1079 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
1081 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
1082 'Result': {'$ref': '#/definitions/ErrorResults'}},
1084 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
1086 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
1088 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
1090 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
1092 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
1093 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
1095 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
1096 'Result': {'$ref': '#/definitions/StringResult'}},
1098 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
1099 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
1101 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
1103 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
1105 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
1107 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
1108 'Result': {'$ref': '#/definitions/ErrorResults'}},
1110 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
1112 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
1114 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
1119 @ReturnMapping(AddRelationResults
)
1120 async def AddRelation(self
, endpoints
):
1122 endpoints : typing.Sequence<+T_co>[str]
1123 Returns -> typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1125 # map input types to rpc msg
1127 msg
= dict(type='Application', request
='AddRelation', version
=2, params
=_params
)
1128 _params
['endpoints'] = endpoints
1129 reply
= await self
.rpc(msg
)
1134 @ReturnMapping(AddApplicationUnitsResults
)
1135 async def AddUnits(self
, application
, num_units
, placement
):
1139 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
1140 Returns -> typing.Sequence<+T_co>[str]
1142 # map input types to rpc msg
1144 msg
= dict(type='Application', request
='AddUnits', version
=2, params
=_params
)
1145 _params
['application'] = application
1146 _params
['num-units'] = num_units
1147 _params
['placement'] = placement
1148 reply
= await self
.rpc(msg
)
1153 @ReturnMapping(ApplicationCharmRelationsResults
)
1154 async def CharmRelations(self
, application
):
1157 Returns -> typing.Sequence<+T_co>[str]
1159 # map input types to rpc msg
1161 msg
= dict(type='Application', request
='CharmRelations', version
=2, params
=_params
)
1162 _params
['application'] = application
1163 reply
= await self
.rpc(msg
)
1168 @ReturnMapping(ErrorResults
)
1169 async def Deploy(self
, applications
):
1171 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
1172 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1174 # map input types to rpc msg
1176 msg
= dict(type='Application', request
='Deploy', version
=2, params
=_params
)
1177 _params
['applications'] = applications
1178 reply
= await self
.rpc(msg
)
1183 @ReturnMapping(None)
1184 async def Destroy(self
, application
):
1189 # map input types to rpc msg
1191 msg
= dict(type='Application', request
='Destroy', version
=2, params
=_params
)
1192 _params
['application'] = application
1193 reply
= await self
.rpc(msg
)
1198 @ReturnMapping(None)
1199 async def DestroyRelation(self
, endpoints
):
1201 endpoints : typing.Sequence<+T_co>[str]
1204 # map input types to rpc msg
1206 msg
= dict(type='Application', request
='DestroyRelation', version
=2, params
=_params
)
1207 _params
['endpoints'] = endpoints
1208 reply
= await self
.rpc(msg
)
1213 @ReturnMapping(None)
1214 async def DestroyUnits(self
, unit_names
):
1216 unit_names : typing.Sequence<+T_co>[str]
1219 # map input types to rpc msg
1221 msg
= dict(type='Application', request
='DestroyUnits', version
=2, params
=_params
)
1222 _params
['unit-names'] = unit_names
1223 reply
= await self
.rpc(msg
)
1228 @ReturnMapping(None)
1229 async def Expose(self
, application
):
1234 # map input types to rpc msg
1236 msg
= dict(type='Application', request
='Expose', version
=2, params
=_params
)
1237 _params
['application'] = application
1238 reply
= await self
.rpc(msg
)
1243 @ReturnMapping(ApplicationGetResults
)
1244 async def Get(self
, application
):
1247 Returns -> typing.Union[str, typing.Mapping<~KT, +VT_co>[str, typing.Any], _ForwardRef('Value')]
1249 # map input types to rpc msg
1251 msg
= dict(type='Application', request
='Get', version
=2, params
=_params
)
1252 _params
['application'] = application
1253 reply
= await self
.rpc(msg
)
1258 @ReturnMapping(StringResult
)
1259 async def GetCharmURL(self
, application
):
1262 Returns -> typing.Union[_ForwardRef('Error'), str]
1264 # map input types to rpc msg
1266 msg
= dict(type='Application', request
='GetCharmURL', version
=2, params
=_params
)
1267 _params
['application'] = application
1268 reply
= await self
.rpc(msg
)
1273 @ReturnMapping(GetConstraintsResults
)
1274 async def GetConstraints(self
, application
):
1279 # map input types to rpc msg
1281 msg
= dict(type='Application', request
='GetConstraints', version
=2, params
=_params
)
1282 _params
['application'] = application
1283 reply
= await self
.rpc(msg
)
1288 @ReturnMapping(None)
1289 async def Set(self
, application
, options
):
1292 options : typing.Mapping<~KT, +VT_co>[str, str]
1295 # map input types to rpc msg
1297 msg
= dict(type='Application', request
='Set', version
=2, params
=_params
)
1298 _params
['application'] = application
1299 _params
['options'] = options
1300 reply
= await self
.rpc(msg
)
1305 @ReturnMapping(None)
1306 async def SetCharm(self
, application
, channel
, charm_url
, config_settings
, config_settings_yaml
, force_series
, force_units
, resource_ids
, storage_constraints
):
1311 config_settings : typing.Mapping<~KT, +VT_co>[str, str]
1312 config_settings_yaml : str
1315 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
1316 storage_constraints : typing.Mapping<~KT, +VT_co>[str, ~StorageConstraints]<~StorageConstraints>
1319 # map input types to rpc msg
1321 msg
= dict(type='Application', request
='SetCharm', version
=2, params
=_params
)
1322 _params
['application'] = application
1323 _params
['channel'] = channel
1324 _params
['charm-url'] = charm_url
1325 _params
['config-settings'] = config_settings
1326 _params
['config-settings-yaml'] = config_settings_yaml
1327 _params
['force-series'] = force_series
1328 _params
['force-units'] = force_units
1329 _params
['resource-ids'] = resource_ids
1330 _params
['storage-constraints'] = storage_constraints
1331 reply
= await self
.rpc(msg
)
1336 @ReturnMapping(None)
1337 async def SetConstraints(self
, application
, constraints
):
1343 # map input types to rpc msg
1345 msg
= dict(type='Application', request
='SetConstraints', version
=2, params
=_params
)
1346 _params
['application'] = application
1347 _params
['constraints'] = constraints
1348 reply
= await self
.rpc(msg
)
1353 @ReturnMapping(ErrorResults
)
1354 async def SetMetricCredentials(self
, creds
):
1356 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
1357 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1359 # map input types to rpc msg
1361 msg
= dict(type='Application', request
='SetMetricCredentials', version
=2, params
=_params
)
1362 _params
['creds'] = creds
1363 reply
= await self
.rpc(msg
)
1368 @ReturnMapping(None)
1369 async def Unexpose(self
, application
):
1374 # map input types to rpc msg
1376 msg
= dict(type='Application', request
='Unexpose', version
=2, params
=_params
)
1377 _params
['application'] = application
1378 reply
= await self
.rpc(msg
)
1383 @ReturnMapping(None)
1384 async def Unset(self
, application
, options
):
1387 options : typing.Sequence<+T_co>[str]
1390 # map input types to rpc msg
1392 msg
= dict(type='Application', request
='Unset', version
=2, params
=_params
)
1393 _params
['application'] = application
1394 _params
['options'] = options
1395 reply
= await self
.rpc(msg
)
1400 @ReturnMapping(None)
1401 async def Update(self
, application
, charm_url
, constraints
, force_charm_url
, force_series
, min_units
, settings
, settings_yaml
):
1406 force_charm_url : bool
1409 settings : typing.Mapping<~KT, +VT_co>[str, str]
1413 # map input types to rpc msg
1415 msg
= dict(type='Application', request
='Update', version
=2, params
=_params
)
1416 _params
['application'] = application
1417 _params
['charm-url'] = charm_url
1418 _params
['constraints'] = constraints
1419 _params
['force-charm-url'] = force_charm_url
1420 _params
['force-series'] = force_series
1421 _params
['min-units'] = min_units
1422 _params
['settings'] = settings
1423 _params
['settings-yaml'] = settings_yaml
1424 reply
= await self
.rpc(msg
)
1429 class BlockFacade(Type
):
1432 schema
= {'definitions': {'Block': {'additionalProperties': False,
1433 'properties': {'id': {'type': 'string'},
1434 'message': {'type': 'string'},
1435 'tag': {'type': 'string'},
1436 'type': {'type': 'string'}},
1437 'required': ['id', 'tag', 'type'],
1439 'BlockResult': {'additionalProperties': False,
1440 'properties': {'error': {'$ref': '#/definitions/Error'},
1441 'result': {'$ref': '#/definitions/Block'}},
1442 'required': ['result'],
1444 'BlockResults': {'additionalProperties': False,
1445 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
1448 'BlockSwitchParams': {'additionalProperties': False,
1449 'properties': {'message': {'type': 'string'},
1450 'type': {'type': 'string'}},
1451 'required': ['type'],
1453 'Error': {'additionalProperties': False,
1454 'properties': {'code': {'type': 'string'},
1455 'info': {'$ref': '#/definitions/ErrorInfo'},
1456 'message': {'type': 'string'}},
1457 'required': ['message', 'code'],
1459 'ErrorInfo': {'additionalProperties': False,
1460 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1461 'macaroon-path': {'type': 'string'}},
1463 'ErrorResult': {'additionalProperties': False,
1464 'properties': {'error': {'$ref': '#/definitions/Error'}},
1466 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
1467 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
1469 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
1470 'Result': {'$ref': '#/definitions/ErrorResult'}},
1472 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
1473 'Result': {'$ref': '#/definitions/ErrorResult'}},
1478 @ReturnMapping(BlockResults
)
1479 async def List(self
):
1482 Returns -> typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
1484 # map input types to rpc msg
1486 msg
= dict(type='Block', request
='List', version
=2, params
=_params
)
1488 reply
= await self
.rpc(msg
)
1493 @ReturnMapping(ErrorResult
)
1494 async def SwitchBlockOff(self
, message
, type_
):
1500 # map input types to rpc msg
1502 msg
= dict(type='Block', request
='SwitchBlockOff', version
=2, params
=_params
)
1503 _params
['message'] = message
1504 _params
['type'] = type_
1505 reply
= await self
.rpc(msg
)
1510 @ReturnMapping(ErrorResult
)
1511 async def SwitchBlockOn(self
, message
, type_
):
1517 # map input types to rpc msg
1519 msg
= dict(type='Block', request
='SwitchBlockOn', version
=2, params
=_params
)
1520 _params
['message'] = message
1521 _params
['type'] = type_
1522 reply
= await self
.rpc(msg
)
1527 class CharmRevisionUpdaterFacade(Type
):
1528 name
= 'CharmRevisionUpdater'
1530 schema
= {'definitions': {'Error': {'additionalProperties': False,
1531 'properties': {'code': {'type': 'string'},
1532 'info': {'$ref': '#/definitions/ErrorInfo'},
1533 'message': {'type': 'string'}},
1534 'required': ['message', 'code'],
1536 'ErrorInfo': {'additionalProperties': False,
1537 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1538 'macaroon-path': {'type': 'string'}},
1540 'ErrorResult': {'additionalProperties': False,
1541 'properties': {'error': {'$ref': '#/definitions/Error'}},
1543 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
1544 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
1549 @ReturnMapping(ErrorResult
)
1550 async def UpdateLatestRevisions(self
):
1555 # map input types to rpc msg
1557 msg
= dict(type='CharmRevisionUpdater', request
='UpdateLatestRevisions', version
=2, params
=_params
)
1559 reply
= await self
.rpc(msg
)
1564 class CharmsFacade(Type
):
1567 schema
= {'definitions': {'CharmActionSpec': {'additionalProperties': False,
1568 'properties': {'description': {'type': 'string'},
1569 'params': {'patternProperties': {'.*': {'additionalProperties': True,
1572 'required': ['description', 'params'],
1574 'CharmActions': {'additionalProperties': False,
1575 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}},
1578 'CharmInfo': {'additionalProperties': False,
1579 'properties': {'actions': {'$ref': '#/definitions/CharmActions'},
1580 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}},
1582 'meta': {'$ref': '#/definitions/CharmMeta'},
1583 'metrics': {'$ref': '#/definitions/CharmMetrics'},
1584 'revision': {'type': 'integer'},
1585 'url': {'type': 'string'}},
1586 'required': ['revision', 'url', 'config'],
1588 'CharmMeta': {'additionalProperties': False,
1589 'properties': {'categories': {'items': {'type': 'string'},
1591 'description': {'type': 'string'},
1592 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}},
1594 'min-juju-version': {'type': 'string'},
1595 'name': {'type': 'string'},
1596 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}},
1598 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
1600 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
1602 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
1604 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}},
1606 'series': {'items': {'type': 'string'},
1608 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}},
1610 'subordinate': {'type': 'boolean'},
1611 'summary': {'type': 'string'},
1612 'tags': {'items': {'type': 'string'},
1614 'terms': {'items': {'type': 'string'},
1616 'required': ['name',
1621 'CharmMetric': {'additionalProperties': False,
1622 'properties': {'description': {'type': 'string'},
1623 'type': {'type': 'string'}},
1624 'required': ['type', 'description'],
1626 'CharmMetrics': {'additionalProperties': False,
1627 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}},
1629 'plan': {'$ref': '#/definitions/CharmPlan'}},
1630 'required': ['metrics', 'plan'],
1632 'CharmOption': {'additionalProperties': False,
1633 'properties': {'default': {'additionalProperties': True,
1635 'description': {'type': 'string'},
1636 'type': {'type': 'string'}},
1637 'required': ['type'],
1639 'CharmPayloadClass': {'additionalProperties': False,
1640 'properties': {'name': {'type': 'string'},
1641 'type': {'type': 'string'}},
1642 'required': ['name', 'type'],
1644 'CharmPlan': {'additionalProperties': False,
1645 'properties': {'required': {'type': 'boolean'}},
1646 'required': ['required'],
1648 'CharmRelation': {'additionalProperties': False,
1649 'properties': {'interface': {'type': 'string'},
1650 'limit': {'type': 'integer'},
1651 'name': {'type': 'string'},
1652 'optional': {'type': 'boolean'},
1653 'role': {'type': 'string'},
1654 'scope': {'type': 'string'}},
1655 'required': ['name',
1662 'CharmResourceMeta': {'additionalProperties': False,
1663 'properties': {'description': {'type': 'string'},
1664 'name': {'type': 'string'},
1665 'path': {'type': 'string'},
1666 'type': {'type': 'string'}},
1667 'required': ['name',
1672 'CharmStorage': {'additionalProperties': False,
1673 'properties': {'count-max': {'type': 'integer'},
1674 'count-min': {'type': 'integer'},
1675 'description': {'type': 'string'},
1676 'location': {'type': 'string'},
1677 'minimum-size': {'type': 'integer'},
1678 'name': {'type': 'string'},
1679 'properties': {'items': {'type': 'string'},
1681 'read-only': {'type': 'boolean'},
1682 'shared': {'type': 'boolean'},
1683 'type': {'type': 'string'}},
1684 'required': ['name',
1693 'CharmURL': {'additionalProperties': False,
1694 'properties': {'url': {'type': 'string'}},
1695 'required': ['url'],
1697 'CharmsList': {'additionalProperties': False,
1698 'properties': {'names': {'items': {'type': 'string'},
1700 'required': ['names'],
1702 'CharmsListResult': {'additionalProperties': False,
1703 'properties': {'charm-urls': {'items': {'type': 'string'},
1705 'required': ['charm-urls'],
1707 'IsMeteredResult': {'additionalProperties': False,
1708 'properties': {'metered': {'type': 'boolean'}},
1709 'required': ['metered'],
1711 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
1712 'Result': {'$ref': '#/definitions/CharmInfo'}},
1714 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
1715 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
1717 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
1718 'Result': {'$ref': '#/definitions/CharmsListResult'}},
1723 @ReturnMapping(CharmInfo
)
1724 async def CharmInfo(self
, url
):
1727 Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>, _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str]
1729 # map input types to rpc msg
1731 msg
= dict(type='Charms', request
='CharmInfo', version
=2, params
=_params
)
1732 _params
['url'] = url
1733 reply
= await self
.rpc(msg
)
1738 @ReturnMapping(IsMeteredResult
)
1739 async def IsMetered(self
, url
):
1744 # map input types to rpc msg
1746 msg
= dict(type='Charms', request
='IsMetered', version
=2, params
=_params
)
1747 _params
['url'] = url
1748 reply
= await self
.rpc(msg
)
1753 @ReturnMapping(CharmsListResult
)
1754 async def List(self
, names
):
1756 names : typing.Sequence<+T_co>[str]
1757 Returns -> typing.Sequence<+T_co>[str]
1759 # map input types to rpc msg
1761 msg
= dict(type='Charms', request
='List', version
=2, params
=_params
)
1762 _params
['names'] = names
1763 reply
= await self
.rpc(msg
)
1768 class CleanerFacade(Type
):
1771 schema
= {'definitions': {'Error': {'additionalProperties': False,
1772 'properties': {'code': {'type': 'string'},
1773 'info': {'$ref': '#/definitions/ErrorInfo'},
1774 'message': {'type': 'string'}},
1775 'required': ['message', 'code'],
1777 'ErrorInfo': {'additionalProperties': False,
1778 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1779 'macaroon-path': {'type': 'string'}},
1781 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1782 'NotifyWatchResult': {'additionalProperties': False,
1783 'properties': {'NotifyWatcherId': {'type': 'string'},
1784 'error': {'$ref': '#/definitions/Error'}},
1785 'required': ['NotifyWatcherId'],
1787 'properties': {'Cleanup': {'type': 'object'},
1788 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1793 @ReturnMapping(None)
1794 async def Cleanup(self
):
1799 # map input types to rpc msg
1801 msg
= dict(type='Cleaner', request
='Cleanup', version
=2, params
=_params
)
1803 reply
= await self
.rpc(msg
)
1808 @ReturnMapping(NotifyWatchResult
)
1809 async def WatchCleanups(self
):
1812 Returns -> typing.Union[str, _ForwardRef('Error')]
1814 # map input types to rpc msg
1816 msg
= dict(type='Cleaner', request
='WatchCleanups', version
=2, params
=_params
)
1818 reply
= await self
.rpc(msg
)
1823 class DiscoverSpacesFacade(Type
):
1824 name
= 'DiscoverSpaces'
1826 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
1827 'properties': {'provider-network-id': {'type': 'string'},
1828 'space-tag': {'type': 'string'},
1829 'subnet-provider-id': {'type': 'string'},
1830 'subnet-tag': {'type': 'string'},
1831 'vlan-tag': {'type': 'integer'},
1832 'zones': {'items': {'type': 'string'},
1834 'required': ['space-tag'],
1836 'AddSubnetsParams': {'additionalProperties': False,
1837 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
1839 'required': ['subnets'],
1841 'CreateSpaceParams': {'additionalProperties': False,
1842 'properties': {'provider-id': {'type': 'string'},
1843 'public': {'type': 'boolean'},
1844 'space-tag': {'type': 'string'},
1845 'subnet-tags': {'items': {'type': 'string'},
1847 'required': ['subnet-tags',
1851 'CreateSpacesParams': {'additionalProperties': False,
1852 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
1854 'required': ['spaces'],
1856 'DiscoverSpacesResults': {'additionalProperties': False,
1857 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'},
1859 'required': ['results'],
1861 'Error': {'additionalProperties': False,
1862 'properties': {'code': {'type': 'string'},
1863 'info': {'$ref': '#/definitions/ErrorInfo'},
1864 'message': {'type': 'string'}},
1865 'required': ['message', 'code'],
1867 'ErrorInfo': {'additionalProperties': False,
1868 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1869 'macaroon-path': {'type': 'string'}},
1871 'ErrorResult': {'additionalProperties': False,
1872 'properties': {'error': {'$ref': '#/definitions/Error'}},
1874 'ErrorResults': {'additionalProperties': False,
1875 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1877 'required': ['results'],
1879 'ListSubnetsResults': {'additionalProperties': False,
1880 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
1882 'required': ['results'],
1884 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1885 'ModelConfigResult': {'additionalProperties': False,
1886 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1889 'required': ['config'],
1891 'ProviderSpace': {'additionalProperties': False,
1892 'properties': {'error': {'$ref': '#/definitions/Error'},
1893 'name': {'type': 'string'},
1894 'provider-id': {'type': 'string'},
1895 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
1897 'required': ['name',
1901 'Subnet': {'additionalProperties': False,
1902 'properties': {'cidr': {'type': 'string'},
1903 'life': {'type': 'string'},
1904 'provider-id': {'type': 'string'},
1905 'provider-network-id': {'type': 'string'},
1906 'provider-space-id': {'type': 'string'},
1907 'space-tag': {'type': 'string'},
1908 'status': {'type': 'string'},
1909 'vlan-tag': {'type': 'integer'},
1910 'zones': {'items': {'type': 'string'},
1912 'required': ['cidr',
1918 'SubnetsFilters': {'additionalProperties': False,
1919 'properties': {'space-tag': {'type': 'string'},
1920 'zone': {'type': 'string'}},
1922 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
1923 'Result': {'$ref': '#/definitions/ErrorResults'}},
1925 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
1926 'Result': {'$ref': '#/definitions/ErrorResults'}},
1928 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
1930 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
1931 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
1933 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1938 @ReturnMapping(ErrorResults
)
1939 async def AddSubnets(self
, subnets
):
1941 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
1942 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1944 # map input types to rpc msg
1946 msg
= dict(type='DiscoverSpaces', request
='AddSubnets', version
=2, params
=_params
)
1947 _params
['subnets'] = subnets
1948 reply
= await self
.rpc(msg
)
1953 @ReturnMapping(ErrorResults
)
1954 async def CreateSpaces(self
, spaces
):
1956 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
1957 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1959 # map input types to rpc msg
1961 msg
= dict(type='DiscoverSpaces', request
='CreateSpaces', version
=2, params
=_params
)
1962 _params
['spaces'] = spaces
1963 reply
= await self
.rpc(msg
)
1968 @ReturnMapping(DiscoverSpacesResults
)
1969 async def ListSpaces(self
):
1972 Returns -> typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
1974 # map input types to rpc msg
1976 msg
= dict(type='DiscoverSpaces', request
='ListSpaces', version
=2, params
=_params
)
1978 reply
= await self
.rpc(msg
)
1983 @ReturnMapping(ListSubnetsResults
)
1984 async def ListSubnets(self
, space_tag
, zone
):
1988 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
1990 # map input types to rpc msg
1992 msg
= dict(type='DiscoverSpaces', request
='ListSubnets', version
=2, params
=_params
)
1993 _params
['space-tag'] = space_tag
1994 _params
['zone'] = zone
1995 reply
= await self
.rpc(msg
)
2000 @ReturnMapping(ModelConfigResult
)
2001 async def ModelConfig(self
):
2004 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
2006 # map input types to rpc msg
2008 msg
= dict(type='DiscoverSpaces', request
='ModelConfig', version
=2, params
=_params
)
2010 reply
= await self
.rpc(msg
)
2015 class DiskManagerFacade(Type
):
2016 name
= 'DiskManager'
2018 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
2019 'properties': {'BusAddress': {'type': 'string'},
2020 'DeviceLinks': {'items': {'type': 'string'},
2022 'DeviceName': {'type': 'string'},
2023 'FilesystemType': {'type': 'string'},
2024 'HardwareId': {'type': 'string'},
2025 'InUse': {'type': 'boolean'},
2026 'Label': {'type': 'string'},
2027 'MountPoint': {'type': 'string'},
2028 'Size': {'type': 'integer'},
2029 'UUID': {'type': 'string'},
2030 'WWN': {'type': 'string'}},
2031 'required': ['DeviceName',
2043 'Error': {'additionalProperties': False,
2044 'properties': {'code': {'type': 'string'},
2045 'info': {'$ref': '#/definitions/ErrorInfo'},
2046 'message': {'type': 'string'}},
2047 'required': ['message', 'code'],
2049 'ErrorInfo': {'additionalProperties': False,
2050 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2051 'macaroon-path': {'type': 'string'}},
2053 'ErrorResult': {'additionalProperties': False,
2054 'properties': {'error': {'$ref': '#/definitions/Error'}},
2056 'ErrorResults': {'additionalProperties': False,
2057 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2059 'required': ['results'],
2061 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2062 'MachineBlockDevices': {'additionalProperties': False,
2063 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
2065 'machine': {'type': 'string'}},
2066 'required': ['machine'],
2068 'SetMachineBlockDevices': {'additionalProperties': False,
2069 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
2071 'required': ['machine-block-devices'],
2073 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
2074 'Result': {'$ref': '#/definitions/ErrorResults'}},
2079 @ReturnMapping(ErrorResults
)
2080 async def SetMachineBlockDevices(self
, machine_block_devices
):
2082 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
2083 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2085 # map input types to rpc msg
2087 msg
= dict(type='DiskManager', request
='SetMachineBlockDevices', version
=2, params
=_params
)
2088 _params
['machine-block-devices'] = machine_block_devices
2089 reply
= await self
.rpc(msg
)
2094 class EntityWatcherFacade(Type
):
2095 name
= 'EntityWatcher'
2097 schema
= {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
2098 'properties': {'changes': {'items': {'type': 'string'},
2100 'error': {'$ref': '#/definitions/Error'},
2101 'watcher-id': {'type': 'string'}},
2102 'required': ['watcher-id'],
2104 'Error': {'additionalProperties': False,
2105 'properties': {'code': {'type': 'string'},
2106 'info': {'$ref': '#/definitions/ErrorInfo'},
2107 'message': {'type': 'string'}},
2108 'required': ['message', 'code'],
2110 'ErrorInfo': {'additionalProperties': False,
2111 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2112 'macaroon-path': {'type': 'string'}},
2114 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2115 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
2117 'Stop': {'type': 'object'}},
2121 @ReturnMapping(EntitiesWatchResult
)
2122 async def Next(self
):
2125 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
2127 # map input types to rpc msg
2129 msg
= dict(type='EntityWatcher', request
='Next', version
=2, params
=_params
)
2131 reply
= await self
.rpc(msg
)
2136 @ReturnMapping(None)
2137 async def Stop(self
):
2142 # map input types to rpc msg
2144 msg
= dict(type='EntityWatcher', request
='Stop', version
=2, params
=_params
)
2146 reply
= await self
.rpc(msg
)
2151 class FilesystemAttachmentsWatcherFacade(Type
):
2152 name
= 'FilesystemAttachmentsWatcher'
2154 schema
= {'definitions': {'Error': {'additionalProperties': False,
2155 'properties': {'code': {'type': 'string'},
2156 'info': {'$ref': '#/definitions/ErrorInfo'},
2157 'message': {'type': 'string'}},
2158 'required': ['message', 'code'],
2160 'ErrorInfo': {'additionalProperties': False,
2161 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2162 'macaroon-path': {'type': 'string'}},
2164 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2165 'MachineStorageId': {'additionalProperties': False,
2166 'properties': {'attachment-tag': {'type': 'string'},
2167 'machine-tag': {'type': 'string'}},
2168 'required': ['machine-tag',
2171 'MachineStorageIdsWatchResult': {'additionalProperties': False,
2172 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
2174 'error': {'$ref': '#/definitions/Error'},
2175 'watcher-id': {'type': 'string'}},
2176 'required': ['watcher-id',
2179 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
2181 'Stop': {'type': 'object'}},
2185 @ReturnMapping(MachineStorageIdsWatchResult
)
2186 async def Next(self
):
2189 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
2191 # map input types to rpc msg
2193 msg
= dict(type='FilesystemAttachmentsWatcher', request
='Next', version
=2, params
=_params
)
2195 reply
= await self
.rpc(msg
)
2200 @ReturnMapping(None)
2201 async def Stop(self
):
2206 # map input types to rpc msg
2208 msg
= dict(type='FilesystemAttachmentsWatcher', request
='Stop', version
=2, params
=_params
)
2210 reply
= await self
.rpc(msg
)
2215 class HighAvailabilityFacade(Type
):
2216 name
= 'HighAvailability'
2218 schema
= {'definitions': {'Address': {'additionalProperties': False,
2219 'properties': {'Scope': {'type': 'string'},
2220 'SpaceName': {'type': 'string'},
2221 'SpaceProviderId': {'type': 'string'},
2222 'Type': {'type': 'string'},
2223 'Value': {'type': 'string'}},
2224 'required': ['Value',
2230 'ControllersChangeResult': {'additionalProperties': False,
2231 'properties': {'error': {'$ref': '#/definitions/Error'},
2232 'result': {'$ref': '#/definitions/ControllersChanges'}},
2233 'required': ['result'],
2235 'ControllersChangeResults': {'additionalProperties': False,
2236 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
2238 'required': ['results'],
2240 'ControllersChanges': {'additionalProperties': False,
2241 'properties': {'added': {'items': {'type': 'string'},
2243 'converted': {'items': {'type': 'string'},
2245 'demoted': {'items': {'type': 'string'},
2247 'maintained': {'items': {'type': 'string'},
2249 'promoted': {'items': {'type': 'string'},
2251 'removed': {'items': {'type': 'string'},
2254 'ControllersSpec': {'additionalProperties': False,
2255 'properties': {'constraints': {'$ref': '#/definitions/Value'},
2256 'num-controllers': {'type': 'integer'},
2257 'placement': {'items': {'type': 'string'},
2259 'series': {'type': 'string'}},
2260 'required': ['num-controllers'],
2262 'ControllersSpecs': {'additionalProperties': False,
2263 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
2265 'required': ['specs'],
2267 'Error': {'additionalProperties': False,
2268 'properties': {'code': {'type': 'string'},
2269 'info': {'$ref': '#/definitions/ErrorInfo'},
2270 'message': {'type': 'string'}},
2271 'required': ['message', 'code'],
2273 'ErrorInfo': {'additionalProperties': False,
2274 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2275 'macaroon-path': {'type': 'string'}},
2277 'HAMember': {'additionalProperties': False,
2278 'properties': {'public-address': {'$ref': '#/definitions/Address'},
2279 'series': {'type': 'string'},
2280 'tag': {'type': 'string'}},
2281 'required': ['tag', 'public-address', 'series'],
2283 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2284 'Member': {'additionalProperties': False,
2285 'properties': {'Address': {'type': 'string'},
2286 'Arbiter': {'type': 'boolean'},
2287 'BuildIndexes': {'type': 'boolean'},
2288 'Hidden': {'type': 'boolean'},
2289 'Id': {'type': 'integer'},
2290 'Priority': {'type': 'number'},
2291 'SlaveDelay': {'type': 'integer'},
2292 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
2294 'Votes': {'type': 'integer'}},
2305 'MongoUpgradeResults': {'additionalProperties': False,
2306 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
2308 'master': {'$ref': '#/definitions/HAMember'},
2309 'rs-members': {'items': {'$ref': '#/definitions/Member'},
2311 'required': ['rs-members',
2315 'MongoVersion': {'additionalProperties': False,
2316 'properties': {'engine': {'type': 'string'},
2317 'major': {'type': 'integer'},
2318 'minor': {'type': 'integer'},
2319 'patch': {'type': 'string'}},
2320 'required': ['major',
2325 'ResumeReplicationParams': {'additionalProperties': False,
2326 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
2328 'required': ['members'],
2330 'UpgradeMongoParams': {'additionalProperties': False,
2331 'properties': {'target': {'$ref': '#/definitions/MongoVersion'}},
2332 'required': ['target'],
2334 'Value': {'additionalProperties': False,
2335 'properties': {'arch': {'type': 'string'},
2336 'container': {'type': 'string'},
2337 'cores': {'type': 'integer'},
2338 'cpu-power': {'type': 'integer'},
2339 'instance-type': {'type': 'string'},
2340 'mem': {'type': 'integer'},
2341 'root-disk': {'type': 'integer'},
2342 'spaces': {'items': {'type': 'string'},
2344 'tags': {'items': {'type': 'string'},
2346 'virt-type': {'type': 'string'}},
2348 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
2349 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
2351 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
2353 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
2354 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
2359 @ReturnMapping(ControllersChangeResults
)
2360 async def EnableHA(self
, specs
):
2362 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
2363 Returns -> typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
2365 # map input types to rpc msg
2367 msg
= dict(type='HighAvailability', request
='EnableHA', version
=2, params
=_params
)
2368 _params
['specs'] = specs
2369 reply
= await self
.rpc(msg
)
2374 @ReturnMapping(None)
2375 async def ResumeHAReplicationAfterUpgrade(self
, members
):
2377 members : typing.Sequence<+T_co>[~Member]<~Member>
2380 # map input types to rpc msg
2382 msg
= dict(type='HighAvailability', request
='ResumeHAReplicationAfterUpgrade', version
=2, params
=_params
)
2383 _params
['members'] = members
2384 reply
= await self
.rpc(msg
)
2389 @ReturnMapping(MongoUpgradeResults
)
2390 async def StopHAReplicationForUpgrade(self
, target
):
2392 target : MongoVersion
2393 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence<+T_co>[~Member]<~Member>]
2395 # map input types to rpc msg
2397 msg
= dict(type='HighAvailability', request
='StopHAReplicationForUpgrade', version
=2, params
=_params
)
2398 _params
['target'] = target
2399 reply
= await self
.rpc(msg
)
2404 class ImageManagerFacade(Type
):
2405 name
= 'ImageManager'
2407 schema
= {'definitions': {'Error': {'additionalProperties': False,
2408 'properties': {'code': {'type': 'string'},
2409 'info': {'$ref': '#/definitions/ErrorInfo'},
2410 'message': {'type': 'string'}},
2411 'required': ['message', 'code'],
2413 'ErrorInfo': {'additionalProperties': False,
2414 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2415 'macaroon-path': {'type': 'string'}},
2417 'ErrorResult': {'additionalProperties': False,
2418 'properties': {'error': {'$ref': '#/definitions/Error'}},
2420 'ErrorResults': {'additionalProperties': False,
2421 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2423 'required': ['results'],
2425 'ImageFilterParams': {'additionalProperties': False,
2426 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
2428 'required': ['images'],
2430 'ImageMetadata': {'additionalProperties': False,
2431 'properties': {'arch': {'type': 'string'},
2432 'created': {'format': 'date-time',
2434 'kind': {'type': 'string'},
2435 'series': {'type': 'string'},
2436 'url': {'type': 'string'}},
2437 'required': ['kind',
2443 'ImageSpec': {'additionalProperties': False,
2444 'properties': {'arch': {'type': 'string'},
2445 'kind': {'type': 'string'},
2446 'series': {'type': 'string'}},
2447 'required': ['kind', 'arch', 'series'],
2449 'ListImageResult': {'additionalProperties': False,
2450 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
2452 'required': ['result'],
2454 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2455 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
2456 'Result': {'$ref': '#/definitions/ErrorResults'}},
2458 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
2459 'Result': {'$ref': '#/definitions/ListImageResult'}},
2464 @ReturnMapping(ErrorResults
)
2465 async def DeleteImages(self
, images
):
2467 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
2468 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2470 # map input types to rpc msg
2472 msg
= dict(type='ImageManager', request
='DeleteImages', version
=2, params
=_params
)
2473 _params
['images'] = images
2474 reply
= await self
.rpc(msg
)
2479 @ReturnMapping(ListImageResult
)
2480 async def ListImages(self
, images
):
2482 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
2483 Returns -> typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
2485 # map input types to rpc msg
2487 msg
= dict(type='ImageManager', request
='ListImages', version
=2, params
=_params
)
2488 _params
['images'] = images
2489 reply
= await self
.rpc(msg
)
2494 class ImageMetadataFacade(Type
):
2495 name
= 'ImageMetadata'
2497 schema
= {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
2498 'properties': {'arch': {'type': 'string'},
2499 'image-id': {'type': 'string'},
2500 'priority': {'type': 'integer'},
2501 'region': {'type': 'string'},
2502 'root-storage-size': {'type': 'integer'},
2503 'root-storage-type': {'type': 'string'},
2504 'series': {'type': 'string'},
2505 'source': {'type': 'string'},
2506 'stream': {'type': 'string'},
2507 'version': {'type': 'string'},
2508 'virt-type': {'type': 'string'}},
2509 'required': ['image-id',
2517 'CloudImageMetadataList': {'additionalProperties': False,
2518 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
2521 'Error': {'additionalProperties': False,
2522 'properties': {'code': {'type': 'string'},
2523 'info': {'$ref': '#/definitions/ErrorInfo'},
2524 'message': {'type': 'string'}},
2525 'required': ['message', 'code'],
2527 'ErrorInfo': {'additionalProperties': False,
2528 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2529 'macaroon-path': {'type': 'string'}},
2531 'ErrorResult': {'additionalProperties': False,
2532 'properties': {'error': {'$ref': '#/definitions/Error'}},
2534 'ErrorResults': {'additionalProperties': False,
2535 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2537 'required': ['results'],
2539 'ImageMetadataFilter': {'additionalProperties': False,
2540 'properties': {'arches': {'items': {'type': 'string'},
2542 'region': {'type': 'string'},
2543 'root-storage-type': {'type': 'string'},
2544 'series': {'items': {'type': 'string'},
2546 'stream': {'type': 'string'},
2547 'virt-type': {'type': 'string'}},
2549 'ListCloudImageMetadataResult': {'additionalProperties': False,
2550 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
2552 'required': ['result'],
2554 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2555 'MetadataImageIds': {'additionalProperties': False,
2556 'properties': {'image-ids': {'items': {'type': 'string'},
2558 'required': ['image-ids'],
2560 'MetadataSaveParams': {'additionalProperties': False,
2561 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
2564 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
2565 'Result': {'$ref': '#/definitions/ErrorResults'}},
2567 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
2568 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
2570 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
2571 'Result': {'$ref': '#/definitions/ErrorResults'}},
2573 'UpdateFromPublishedImages': {'type': 'object'}},
2577 @ReturnMapping(ErrorResults
)
2578 async def Delete(self
, image_ids
):
2580 image_ids : typing.Sequence<+T_co>[str]
2581 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2583 # map input types to rpc msg
2585 msg
= dict(type='ImageMetadata', request
='Delete', version
=2, params
=_params
)
2586 _params
['image-ids'] = image_ids
2587 reply
= await self
.rpc(msg
)
2592 @ReturnMapping(ListCloudImageMetadataResult
)
2593 async def List(self
, arches
, region
, root_storage_type
, series
, stream
, virt_type
):
2595 arches : typing.Sequence<+T_co>[str]
2597 root_storage_type : str
2598 series : typing.Sequence<+T_co>[str]
2601 Returns -> typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
2603 # map input types to rpc msg
2605 msg
= dict(type='ImageMetadata', request
='List', version
=2, params
=_params
)
2606 _params
['arches'] = arches
2607 _params
['region'] = region
2608 _params
['root-storage-type'] = root_storage_type
2609 _params
['series'] = series
2610 _params
['stream'] = stream
2611 _params
['virt-type'] = virt_type
2612 reply
= await self
.rpc(msg
)
2617 @ReturnMapping(ErrorResults
)
2618 async def Save(self
, metadata
):
2620 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
2621 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2623 # map input types to rpc msg
2625 msg
= dict(type='ImageMetadata', request
='Save', version
=2, params
=_params
)
2626 _params
['metadata'] = metadata
2627 reply
= await self
.rpc(msg
)
2632 @ReturnMapping(None)
2633 async def UpdateFromPublishedImages(self
):
2638 # map input types to rpc msg
2640 msg
= dict(type='ImageMetadata', request
='UpdateFromPublishedImages', version
=2, params
=_params
)
2642 reply
= await self
.rpc(msg
)
2647 class LeadershipServiceFacade(Type
):
2648 name
= 'LeadershipService'
2650 schema
= {'definitions': {'ApplicationTag': {'additionalProperties': False,
2651 'properties': {'Name': {'type': 'string'}},
2652 'required': ['Name'],
2654 'ClaimLeadershipBulkParams': {'additionalProperties': False,
2655 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
2657 'required': ['params'],
2659 'ClaimLeadershipBulkResults': {'additionalProperties': False,
2660 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2662 'required': ['results'],
2664 'ClaimLeadershipParams': {'additionalProperties': False,
2665 'properties': {'application-tag': {'type': 'string'},
2666 'duration': {'type': 'number'},
2667 'unit-tag': {'type': 'string'}},
2668 'required': ['application-tag',
2672 'Error': {'additionalProperties': False,
2673 'properties': {'code': {'type': 'string'},
2674 'info': {'$ref': '#/definitions/ErrorInfo'},
2675 'message': {'type': 'string'}},
2676 'required': ['message', 'code'],
2678 'ErrorInfo': {'additionalProperties': False,
2679 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2680 'macaroon-path': {'type': 'string'}},
2682 'ErrorResult': {'additionalProperties': False,
2683 'properties': {'error': {'$ref': '#/definitions/Error'}},
2685 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2686 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
2687 'Result': {'$ref': '#/definitions/ErrorResult'}},
2689 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
2690 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
2695 @ReturnMapping(ErrorResult
)
2696 async def BlockUntilLeadershipReleased(self
, name
):
2701 # map input types to rpc msg
2703 msg
= dict(type='LeadershipService', request
='BlockUntilLeadershipReleased', version
=2, params
=_params
)
2704 _params
['Name'] = name
2705 reply
= await self
.rpc(msg
)
2710 @ReturnMapping(ClaimLeadershipBulkResults
)
2711 async def ClaimLeadership(self
, params
):
2713 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
2714 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2716 # map input types to rpc msg
2718 msg
= dict(type='LeadershipService', request
='ClaimLeadership', version
=2, params
=_params
)
2719 _params
['params'] = params
2720 reply
= await self
.rpc(msg
)
2725 class MachineManagerFacade(Type
):