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',
2547 'CharmInfo': {'additionalProperties': False,
2548 'properties': {'actions': {'$ref': '#/definitions/CharmActions'},
2549 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}},
2551 'lxd-profile': {'$ref': '#/definitions/CharmLXDProfile'},
2552 'meta': {'$ref': '#/definitions/CharmMeta'},
2553 'metrics': {'$ref': '#/definitions/CharmMetrics'},
2554 'revision': {'type': 'integer'},
2555 'url': {'type': 'string'}},
2556 'required': ['revision', 'url', 'config'],
2558 'CharmLXDProfile': {'additionalProperties': False,
2559 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
2561 'description': {'type': 'string'},
2562 'devices': {'patternProperties': {'.*': {'patternProperties': {'.*': {'type': 'string'}},
2565 'required': ['config',
2569 'CharmMeta': {'additionalProperties': False,
2570 'properties': {'categories': {'items': {'type': 'string'},
2572 'description': {'type': 'string'},
2573 'devices': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmDevice'}},
2575 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}},
2577 'min-juju-version': {'type': 'string'},
2578 'name': {'type': 'string'},
2579 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}},
2581 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
2583 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
2585 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
2587 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}},
2589 'series': {'items': {'type': 'string'},
2591 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}},
2593 'subordinate': {'type': 'boolean'},
2594 'summary': {'type': 'string'},
2595 'tags': {'items': {'type': 'string'},
2597 'terms': {'items': {'type': 'string'},
2599 'required': ['name',
2604 'CharmMetric': {'additionalProperties': False,
2605 'properties': {'description': {'type': 'string'},
2606 'type': {'type': 'string'}},
2607 'required': ['type', 'description'],
2609 'CharmMetrics': {'additionalProperties': False,
2610 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}},
2612 'plan': {'$ref': '#/definitions/CharmPlan'}},
2613 'required': ['metrics', 'plan'],
2615 'CharmOption': {'additionalProperties': False,
2616 'properties': {'default': {'additionalProperties': True,
2618 'description': {'type': 'string'},
2619 'type': {'type': 'string'}},
2620 'required': ['type'],
2622 'CharmPayloadClass': {'additionalProperties': False,
2623 'properties': {'name': {'type': 'string'},
2624 'type': {'type': 'string'}},
2625 'required': ['name', 'type'],
2627 'CharmPlan': {'additionalProperties': False,
2628 'properties': {'required': {'type': 'boolean'}},
2629 'required': ['required'],
2631 'CharmRelation': {'additionalProperties': False,
2632 'properties': {'interface': {'type': 'string'},
2633 'limit': {'type': 'integer'},
2634 'name': {'type': 'string'},
2635 'optional': {'type': 'boolean'},
2636 'role': {'type': 'string'},
2637 'scope': {'type': 'string'}},
2638 'required': ['name',
2645 'CharmResourceMeta': {'additionalProperties': False,
2646 'properties': {'description': {'type': 'string'},
2647 'name': {'type': 'string'},
2648 'path': {'type': 'string'},
2649 'type': {'type': 'string'}},
2650 'required': ['name',
2655 'CharmStorage': {'additionalProperties': False,
2656 'properties': {'count-max': {'type': 'integer'},
2657 'count-min': {'type': 'integer'},
2658 'description': {'type': 'string'},
2659 'location': {'type': 'string'},
2660 'minimum-size': {'type': 'integer'},
2661 'name': {'type': 'string'},
2662 'properties': {'items': {'type': 'string'},
2664 'read-only': {'type': 'boolean'},
2665 'shared': {'type': 'boolean'},
2666 'type': {'type': 'string'}},
2667 'required': ['name',
2676 'CharmURL': {'additionalProperties': False,
2677 'properties': {'url': {'type': 'string'}},
2678 'required': ['url'],
2680 'CharmsList': {'additionalProperties': False,
2681 'properties': {'names': {'items': {'type': 'string'},
2683 'required': ['names'],
2685 'CharmsListResult': {'additionalProperties': False,
2686 'properties': {'charm-urls': {'items': {'type': 'string'},
2688 'required': ['charm-urls'],
2690 'IsMeteredResult': {'additionalProperties': False,
2691 'properties': {'metered': {'type': 'boolean'}},
2692 'required': ['metered'],
2694 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
2695 'Result': {'$ref': '#/definitions/CharmInfo'}},
2697 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
2698 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
2700 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
2701 'Result': {'$ref': '#/definitions/CharmsListResult'}},
2706 @ReturnMapping(CharmInfo
)
2707 async def CharmInfo(self
, url
):
2710 Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping[str, ~CharmOption], _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str]
2712 # map input types to rpc msg
2714 msg
= dict(type='Charms',
2715 request
='CharmInfo',
2718 _params
['url'] = url
2719 reply
= await self
.rpc(msg
)
2724 @ReturnMapping(IsMeteredResult
)
2725 async def IsMetered(self
, url
):
2730 # map input types to rpc msg
2732 msg
= dict(type='Charms',
2733 request
='IsMetered',
2736 _params
['url'] = url
2737 reply
= await self
.rpc(msg
)
2742 @ReturnMapping(CharmsListResult
)
2743 async def List(self
, names
):
2745 names : typing.Sequence[str]
2746 Returns -> typing.Sequence[str]
2748 # map input types to rpc msg
2750 msg
= dict(type='Charms',
2754 _params
['names'] = names
2755 reply
= await self
.rpc(msg
)
2760 class CleanerFacade(Type
):
2763 schema
= {'definitions': {'Error': {'additionalProperties': False,
2764 'properties': {'code': {'type': 'string'},
2765 'info': {'$ref': '#/definitions/ErrorInfo'},
2766 'message': {'type': 'string'}},
2767 'required': ['message', 'code'],
2769 'ErrorInfo': {'additionalProperties': False,
2770 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2771 'macaroon-path': {'type': 'string'}},
2773 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2774 'NotifyWatchResult': {'additionalProperties': False,
2775 'properties': {'NotifyWatcherId': {'type': 'string'},
2776 'error': {'$ref': '#/definitions/Error'}},
2777 'required': ['NotifyWatcherId'],
2779 'properties': {'Cleanup': {'type': 'object'},
2780 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2785 @ReturnMapping(None)
2786 async def Cleanup(self
):
2791 # map input types to rpc msg
2793 msg
= dict(type='Cleaner',
2798 reply
= await self
.rpc(msg
)
2803 @ReturnMapping(NotifyWatchResult
)
2804 async def WatchCleanups(self
):
2807 Returns -> typing.Union[str, _ForwardRef('Error')]
2809 # map input types to rpc msg
2811 msg
= dict(type='Cleaner',
2812 request
='WatchCleanups',
2816 reply
= await self
.rpc(msg
)
2821 class ClientFacade(Type
):
2824 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
2825 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2828 'required': ['servers'],
2830 'AddCharm': {'additionalProperties': False,
2831 'properties': {'channel': {'type': 'string'},
2832 'force': {'type': 'boolean'},
2833 'url': {'type': 'string'}},
2834 'required': ['url', 'channel', 'force'],
2836 'AddCharmWithAuthorization': {'additionalProperties': False,
2837 'properties': {'channel': {'type': 'string'},
2838 'force': {'type': 'boolean'},
2839 'macaroon': {'$ref': '#/definitions/Macaroon'},
2840 'url': {'type': 'string'}},
2846 'AddMachineParams': {'additionalProperties': False,
2847 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
2849 'constraints': {'$ref': '#/definitions/Value'},
2850 'container-type': {'type': 'string'},
2851 'disks': {'items': {'$ref': '#/definitions/Constraints'},
2853 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2854 'instance-id': {'type': 'string'},
2855 'jobs': {'items': {'type': 'string'},
2857 'nonce': {'type': 'string'},
2858 'parent-id': {'type': 'string'},
2859 'placement': {'$ref': '#/definitions/Placement'},
2860 'series': {'type': 'string'}},
2861 'required': ['series',
2868 'hardware-characteristics',
2871 'AddMachines': {'additionalProperties': False,
2872 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
2874 'required': ['params'],
2876 'AddMachinesResult': {'additionalProperties': False,
2877 'properties': {'error': {'$ref': '#/definitions/Error'},
2878 'machine': {'type': 'string'}},
2879 'required': ['machine'],
2881 'AddMachinesResults': {'additionalProperties': False,
2882 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
2884 'required': ['machines'],
2886 'Address': {'additionalProperties': False,
2887 'properties': {'scope': {'type': 'string'},
2888 'space-name': {'type': 'string'},
2889 'type': {'type': 'string'},
2890 'value': {'type': 'string'}},
2891 'required': ['value', 'type', 'scope'],
2893 'AgentVersionResult': {'additionalProperties': False,
2894 'properties': {'version': {'$ref': '#/definitions/Number'}},
2895 'required': ['version'],
2897 'AllWatcherId': {'additionalProperties': False,
2898 'properties': {'watcher-id': {'type': 'string'}},
2899 'required': ['watcher-id'],
2901 'ApplicationOfferStatus': {'additionalProperties': False,
2902 'properties': {'active-connected-count': {'type': 'integer'},
2903 'application-name': {'type': 'string'},
2904 'charm': {'type': 'string'},
2905 'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteEndpoint'}},
2907 'err': {'additionalProperties': True,
2909 'offer-name': {'type': 'string'},
2910 'total-connected-count': {'type': 'integer'}},
2911 'required': ['offer-name',
2915 'active-connected-count',
2916 'total-connected-count'],
2918 'ApplicationStatus': {'additionalProperties': False,
2919 'properties': {'can-upgrade-to': {'type': 'string'},
2920 'charm': {'type': 'string'},
2921 'charm-verion': {'type': 'string'},
2922 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
2924 'err': {'additionalProperties': True,
2926 'exposed': {'type': 'boolean'},
2927 'int': {'type': 'integer'},
2928 'life': {'type': 'string'},
2929 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
2931 'provider-id': {'type': 'string'},
2932 'public-address': {'type': 'string'},
2933 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
2936 'series': {'type': 'string'},
2937 'status': {'$ref': '#/definitions/DetailedStatus'},
2938 'string': {'type': 'string'},
2939 'subordinate-to': {'items': {'type': 'string'},
2941 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
2943 'workload-version': {'type': 'string'}},
2944 'required': ['charm',
2956 'endpoint-bindings',
2959 'Binary': {'additionalProperties': False,
2960 'properties': {'Arch': {'type': 'string'},
2961 'Number': {'$ref': '#/definitions/Number'},
2962 'Series': {'type': 'string'}},
2963 'required': ['Number', 'Series', 'Arch'],
2965 'BundleChange': {'additionalProperties': False,
2966 'properties': {'args': {'items': {'additionalProperties': True,
2969 'id': {'type': 'string'},
2970 'method': {'type': 'string'},
2971 'requires': {'items': {'type': 'string'},
2978 'BundleChangesParams': {'additionalProperties': False,
2979 'properties': {'bundleURL': {'type': 'string'},
2980 'yaml': {'type': 'string'}},
2981 'required': ['yaml', 'bundleURL'],
2983 'BundleChangesResults': {'additionalProperties': False,
2984 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
2986 'errors': {'items': {'type': 'string'},
2989 'BytesResult': {'additionalProperties': False,
2990 'properties': {'result': {'items': {'type': 'integer'},
2992 'required': ['result'],
2994 'ConfigValue': {'additionalProperties': False,
2995 'properties': {'source': {'type': 'string'},
2996 'value': {'additionalProperties': True,
2998 'required': ['value', 'source'],
3000 'Constraints': {'additionalProperties': False,
3001 'properties': {'Count': {'type': 'integer'},
3002 'Pool': {'type': 'string'},
3003 'Size': {'type': 'integer'}},
3004 'required': ['Pool', 'Size', 'Count'],
3006 'DestroyMachines': {'additionalProperties': False,
3007 'properties': {'force': {'type': 'boolean'},
3008 'machine-names': {'items': {'type': 'string'},
3010 'required': ['machine-names', 'force'],
3012 'DetailedStatus': {'additionalProperties': False,
3013 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3016 'err': {'additionalProperties': True,
3018 'info': {'type': 'string'},
3019 'kind': {'type': 'string'},
3020 'life': {'type': 'string'},
3021 'since': {'format': 'date-time',
3023 'status': {'type': 'string'},
3024 'version': {'type': 'string'}},
3025 'required': ['status',
3033 'EndpointStatus': {'additionalProperties': False,
3034 'properties': {'application': {'type': 'string'},
3035 'name': {'type': 'string'},
3036 'role': {'type': 'string'},
3037 'subordinate': {'type': 'boolean'}},
3038 'required': ['application',
3043 'Entities': {'additionalProperties': False,
3044 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3046 'required': ['entities'],
3048 'Entity': {'additionalProperties': False,
3049 'properties': {'tag': {'type': 'string'}},
3050 'required': ['tag'],
3052 'EntityStatus': {'additionalProperties': False,
3053 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3056 'info': {'type': 'string'},
3057 'since': {'format': 'date-time',
3059 'status': {'type': 'string'}},
3060 'required': ['status', 'info', 'since'],
3062 'Error': {'additionalProperties': False,
3063 'properties': {'code': {'type': 'string'},
3064 'info': {'$ref': '#/definitions/ErrorInfo'},
3065 'message': {'type': 'string'}},
3066 'required': ['message', 'code'],
3068 'ErrorInfo': {'additionalProperties': False,
3069 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3070 'macaroon-path': {'type': 'string'}},
3072 'ErrorResult': {'additionalProperties': False,
3073 'properties': {'error': {'$ref': '#/definitions/Error'}},
3075 'ErrorResults': {'additionalProperties': False,
3076 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3078 'required': ['results'],
3080 'FindToolsParams': {'additionalProperties': False,
3081 'properties': {'agentstream': {'type': 'string'},
3082 'arch': {'type': 'string'},
3083 'major': {'type': 'integer'},
3084 'minor': {'type': 'integer'},
3085 'number': {'$ref': '#/definitions/Number'},
3086 'series': {'type': 'string'}},
3087 'required': ['number',
3094 'FindToolsResult': {'additionalProperties': False,
3095 'properties': {'error': {'$ref': '#/definitions/Error'},
3096 'list': {'items': {'$ref': '#/definitions/Tools'},
3098 'required': ['list'],
3100 'FullStatus': {'additionalProperties': False,
3101 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
3103 'controller-timestamp': {'format': 'date-time',
3105 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
3107 'model': {'$ref': '#/definitions/ModelStatusInfo'},
3108 'offers': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationOfferStatus'}},
3110 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
3112 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}},
3114 'required': ['model',
3117 'remote-applications',
3120 'controller-timestamp'],
3122 'GetConstraintsResults': {'additionalProperties': False,
3123 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
3124 'required': ['constraints'],
3126 'HardwareCharacteristics': {'additionalProperties': False,
3127 'properties': {'arch': {'type': 'string'},
3128 'availability-zone': {'type': 'string'},
3129 'cpu-cores': {'type': 'integer'},
3130 'cpu-power': {'type': 'integer'},
3131 'mem': {'type': 'integer'},
3132 'root-disk': {'type': 'integer'},
3133 'tags': {'items': {'type': 'string'},
3136 'History': {'additionalProperties': False,
3137 'properties': {'error': {'$ref': '#/definitions/Error'},
3138 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
3140 'required': ['statuses'],
3142 'HostPort': {'additionalProperties': False,
3143 'properties': {'Address': {'$ref': '#/definitions/Address'},
3144 'port': {'type': 'integer'}},
3145 'required': ['Address', 'port'],
3147 'LXDProfile': {'additionalProperties': False,
3148 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
3150 'description': {'type': 'string'},
3151 'devices': {'patternProperties': {'.*': {'patternProperties': {'.*': {'type': 'string'}},
3154 'required': ['config',
3158 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3159 'MachineHardware': {'additionalProperties': False,
3160 'properties': {'arch': {'type': 'string'},
3161 'availability-zone': {'type': 'string'},
3162 'cores': {'type': 'integer'},
3163 'cpu-power': {'type': 'integer'},
3164 'mem': {'type': 'integer'},
3165 'root-disk': {'type': 'integer'},
3166 'tags': {'items': {'type': 'string'},
3169 'MachineStatus': {'additionalProperties': False,
3170 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
3171 'constraints': {'type': 'string'},
3172 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
3174 'dns-name': {'type': 'string'},
3175 'hardware': {'type': 'string'},
3176 'has-vote': {'type': 'boolean'},
3177 'id': {'type': 'string'},
3178 'instance-id': {'type': 'string'},
3179 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
3180 'ip-addresses': {'items': {'type': 'string'},
3182 'jobs': {'items': {'type': 'string'},
3184 'lxd-profiles': {'patternProperties': {'.*': {'$ref': '#/definitions/LXDProfile'}},
3186 'network-interfaces': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInterface'}},
3188 'series': {'type': 'string'},
3189 'wants-vote': {'type': 'boolean'}},
3190 'required': ['agent-status',
3203 'MeterStatus': {'additionalProperties': False,
3204 'properties': {'color': {'type': 'string'},
3205 'message': {'type': 'string'}},
3206 'required': ['color', 'message'],
3208 'ModelConfigResults': {'additionalProperties': False,
3209 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
3211 'required': ['config'],
3213 'ModelInfo': {'additionalProperties': False,
3214 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
3215 'cloud-credential-tag': {'type': 'string'},
3216 'cloud-region': {'type': 'string'},
3217 'cloud-tag': {'type': 'string'},
3218 'controller-uuid': {'type': 'string'},
3219 'default-series': {'type': 'string'},
3220 'life': {'type': 'string'},
3221 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
3223 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
3224 'name': {'type': 'string'},
3225 'owner-tag': {'type': 'string'},
3226 'provider-type': {'type': 'string'},
3227 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
3228 'status': {'$ref': '#/definitions/EntityStatus'},
3229 'type': {'type': 'string'},
3230 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
3232 'uuid': {'type': 'string'}},
3233 'required': ['name',
3245 'ModelMachineInfo': {'additionalProperties': False,
3246 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
3247 'has-vote': {'type': 'boolean'},
3248 'id': {'type': 'string'},
3249 'instance-id': {'type': 'string'},
3250 'message': {'type': 'string'},
3251 'status': {'type': 'string'},
3252 'wants-vote': {'type': 'boolean'}},
3255 'ModelMigrationStatus': {'additionalProperties': False,
3256 'properties': {'end': {'format': 'date-time',
3258 'start': {'format': 'date-time',
3260 'status': {'type': 'string'}},
3261 'required': ['status', 'start'],
3263 'ModelSLA': {'additionalProperties': False,
3264 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
3265 'creds': {'items': {'type': 'integer'},
3267 'required': ['ModelSLAInfo', 'creds'],
3269 'ModelSLAInfo': {'additionalProperties': False,
3270 'properties': {'level': {'type': 'string'},
3271 'owner': {'type': 'string'}},
3272 'required': ['level', 'owner'],
3274 'ModelSet': {'additionalProperties': False,
3275 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
3278 'required': ['config'],
3280 'ModelStatusInfo': {'additionalProperties': False,
3281 'properties': {'available-version': {'type': 'string'},
3282 'cloud-tag': {'type': 'string'},
3283 'meter-status': {'$ref': '#/definitions/MeterStatus'},
3284 'model-status': {'$ref': '#/definitions/DetailedStatus'},
3285 'name': {'type': 'string'},
3286 'region': {'type': 'string'},
3287 'sla': {'type': 'string'},
3288 'type': {'type': 'string'},
3289 'version': {'type': 'string'}},
3290 'required': ['name',
3294 'available-version',
3299 'ModelUnset': {'additionalProperties': False,
3300 'properties': {'keys': {'items': {'type': 'string'},
3302 'required': ['keys'],
3304 'ModelUserInfo': {'additionalProperties': False,
3305 'properties': {'access': {'type': 'string'},
3306 'display-name': {'type': 'string'},
3307 'last-connection': {'format': 'date-time',
3309 'user': {'type': 'string'}},
3310 'required': ['user',
3315 'ModelUserInfoResult': {'additionalProperties': False,
3316 'properties': {'error': {'$ref': '#/definitions/Error'},
3317 'result': {'$ref': '#/definitions/ModelUserInfo'}},
3319 'ModelUserInfoResults': {'additionalProperties': False,
3320 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
3322 'required': ['results'],
3324 'NetworkInterface': {'additionalProperties': False,
3325 'properties': {'dns-nameservers': {'items': {'type': 'string'},
3327 'gateway': {'type': 'string'},
3328 'ip-addresses': {'items': {'type': 'string'},
3330 'is-up': {'type': 'boolean'},
3331 'mac-address': {'type': 'string'},
3332 'space': {'type': 'string'}},
3333 'required': ['ip-addresses',
3337 'Number': {'additionalProperties': False,
3338 'properties': {'Build': {'type': 'integer'},
3339 'Major': {'type': 'integer'},
3340 'Minor': {'type': 'integer'},
3341 'Patch': {'type': 'integer'},
3342 'Tag': {'type': 'string'}},
3343 'required': ['Major',
3349 'Placement': {'additionalProperties': False,
3350 'properties': {'directive': {'type': 'string'},
3351 'scope': {'type': 'string'}},
3352 'required': ['scope', 'directive'],
3354 'PrivateAddress': {'additionalProperties': False,
3355 'properties': {'target': {'type': 'string'}},
3356 'required': ['target'],
3358 'PrivateAddressResults': {'additionalProperties': False,
3359 'properties': {'private-address': {'type': 'string'}},
3360 'required': ['private-address'],
3362 'ProvisioningScriptParams': {'additionalProperties': False,
3363 'properties': {'data-dir': {'type': 'string'},
3364 'disable-package-commands': {'type': 'boolean'},
3365 'machine-id': {'type': 'string'},
3366 'nonce': {'type': 'string'}},
3367 'required': ['machine-id',
3370 'disable-package-commands'],
3372 'ProvisioningScriptResult': {'additionalProperties': False,
3373 'properties': {'script': {'type': 'string'}},
3374 'required': ['script'],
3376 'PublicAddress': {'additionalProperties': False,
3377 'properties': {'target': {'type': 'string'}},
3378 'required': ['target'],
3380 'PublicAddressResults': {'additionalProperties': False,
3381 'properties': {'public-address': {'type': 'string'}},
3382 'required': ['public-address'],
3384 'RelationStatus': {'additionalProperties': False,
3385 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
3387 'id': {'type': 'integer'},
3388 'interface': {'type': 'string'},
3389 'key': {'type': 'string'},
3390 'scope': {'type': 'string'},
3391 'status': {'$ref': '#/definitions/DetailedStatus'}},
3399 'RemoteApplicationStatus': {'additionalProperties': False,
3400 'properties': {'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
3402 'err': {'additionalProperties': True,
3404 'life': {'type': 'string'},
3405 'offer-name': {'type': 'string'},
3406 'offer-url': {'type': 'string'},
3407 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
3410 'status': {'$ref': '#/definitions/DetailedStatus'}},
3411 'required': ['offer-url',
3418 'RemoteEndpoint': {'additionalProperties': False,
3419 'properties': {'interface': {'type': 'string'},
3420 'limit': {'type': 'integer'},
3421 'name': {'type': 'string'},
3422 'role': {'type': 'string'}},
3423 'required': ['name',
3428 'ResolveCharmResult': {'additionalProperties': False,
3429 'properties': {'error': {'type': 'string'},
3430 'url': {'type': 'string'}},
3432 'ResolveCharmResults': {'additionalProperties': False,
3433 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
3435 'required': ['urls'],
3437 'ResolveCharms': {'additionalProperties': False,
3438 'properties': {'references': {'items': {'type': 'string'},
3440 'required': ['references'],
3442 'Resolved': {'additionalProperties': False,
3443 'properties': {'retry': {'type': 'boolean'},
3444 'unit-name': {'type': 'string'}},
3445 'required': ['unit-name', 'retry'],
3447 'SetConstraints': {'additionalProperties': False,
3448 'properties': {'application': {'type': 'string'},
3449 'constraints': {'$ref': '#/definitions/Value'}},
3450 'required': ['application', 'constraints'],
3452 'SetModelAgentVersion': {'additionalProperties': False,
3453 'properties': {'force': {'type': 'boolean'},
3454 'version': {'$ref': '#/definitions/Number'}},
3455 'required': ['version'],
3457 'StatusHistoryFilter': {'additionalProperties': False,
3458 'properties': {'date': {'format': 'date-time',
3460 'delta': {'type': 'integer'},
3461 'exclude': {'items': {'type': 'string'},
3463 'size': {'type': 'integer'}},
3464 'required': ['size',
3469 'StatusHistoryRequest': {'additionalProperties': False,
3470 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
3471 'historyKind': {'type': 'string'},
3472 'size': {'type': 'integer'},
3473 'tag': {'type': 'string'}},
3474 'required': ['historyKind',
3479 'StatusHistoryRequests': {'additionalProperties': False,
3480 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
3482 'required': ['requests'],
3484 'StatusHistoryResult': {'additionalProperties': False,
3485 'properties': {'error': {'$ref': '#/definitions/Error'},
3486 'history': {'$ref': '#/definitions/History'}},
3487 'required': ['history'],
3489 'StatusHistoryResults': {'additionalProperties': False,
3490 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
3492 'required': ['results'],
3494 'StatusParams': {'additionalProperties': False,
3495 'properties': {'patterns': {'items': {'type': 'string'},
3497 'required': ['patterns'],
3499 'StringResult': {'additionalProperties': False,
3500 'properties': {'error': {'$ref': '#/definitions/Error'},
3501 'result': {'type': 'string'}},
3502 'required': ['result'],
3504 'Tools': {'additionalProperties': False,
3505 'properties': {'sha256': {'type': 'string'},
3506 'size': {'type': 'integer'},
3507 'url': {'type': 'string'},
3508 'version': {'$ref': '#/definitions/Binary'}},
3509 'required': ['version', 'url', 'size'],
3511 'UnitStatus': {'additionalProperties': False,
3512 'properties': {'address': {'type': 'string'},
3513 'agent-status': {'$ref': '#/definitions/DetailedStatus'},
3514 'charm': {'type': 'string'},
3515 'leader': {'type': 'boolean'},
3516 'machine': {'type': 'string'},
3517 'opened-ports': {'items': {'type': 'string'},
3519 'provider-id': {'type': 'string'},
3520 'public-address': {'type': 'string'},
3521 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
3523 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
3524 'workload-version': {'type': 'string'}},
3525 'required': ['agent-status',
3534 'Value': {'additionalProperties': False,
3535 'properties': {'arch': {'type': 'string'},
3536 'container': {'type': 'string'},
3537 'cores': {'type': 'integer'},
3538 'cpu-power': {'type': 'integer'},
3539 'instance-type': {'type': 'string'},
3540 'mem': {'type': 'integer'},
3541 'root-disk': {'type': 'integer'},
3542 'spaces': {'items': {'type': 'string'},
3544 'tags': {'items': {'type': 'string'},
3546 'virt-type': {'type': 'string'},
3547 'zones': {'items': {'type': 'string'},
3550 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
3552 'AbortCurrentUpgrade': {'type': 'object'},
3553 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
3555 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
3557 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
3558 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
3560 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
3561 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
3563 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
3565 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
3567 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
3569 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
3570 'Result': {'$ref': '#/definitions/FindToolsResult'}},
3572 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
3573 'Result': {'$ref': '#/definitions/FullStatus'}},
3575 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
3576 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
3578 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
3580 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
3581 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
3583 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
3585 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
3587 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
3589 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
3591 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
3593 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
3594 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
3596 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
3597 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
3599 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
3600 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
3602 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
3603 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
3605 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
3607 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3608 'Result': {'$ref': '#/definitions/ErrorResults'}},
3610 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3612 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
3614 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
3616 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
3618 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
3619 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
3621 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
3626 @ReturnMapping(APIHostPortsResult
)
3627 async def APIHostPorts(self
):
3630 Returns -> typing.Sequence[~HostPort]
3632 # map input types to rpc msg
3634 msg
= dict(type='Client',
3635 request
='APIHostPorts',
3639 reply
= await self
.rpc(msg
)
3644 @ReturnMapping(None)
3645 async def AbortCurrentUpgrade(self
):
3650 # map input types to rpc msg
3652 msg
= dict(type='Client',
3653 request
='AbortCurrentUpgrade',
3657 reply
= await self
.rpc(msg
)
3662 @ReturnMapping(None)
3663 async def AddCharm(self
, channel
, url
):
3669 # map input types to rpc msg
3671 msg
= dict(type='Client',
3675 _params
['channel'] = channel
3676 _params
['url'] = url
3677 reply
= await self
.rpc(msg
)
3682 @ReturnMapping(None)
3683 async def AddCharmWithAuthorization(self
, channel
, macaroon
, url
):
3690 # map input types to rpc msg
3692 msg
= dict(type='Client',
3693 request
='AddCharmWithAuthorization',
3696 _params
['channel'] = channel
3697 _params
['macaroon'] = macaroon
3698 _params
['url'] = url
3699 reply
= await self
.rpc(msg
)
3704 @ReturnMapping(AddMachinesResults
)
3705 async def AddMachines(self
, params
):
3707 params : typing.Sequence[~AddMachineParams]
3708 Returns -> typing.Sequence[~AddMachinesResult]
3710 # map input types to rpc msg
3712 msg
= dict(type='Client',
3713 request
='AddMachines',
3716 _params
['params'] = params
3717 reply
= await self
.rpc(msg
)
3722 @ReturnMapping(AddMachinesResults
)
3723 async def AddMachinesV2(self
, params
):
3725 params : typing.Sequence[~AddMachineParams]
3726 Returns -> typing.Sequence[~AddMachinesResult]
3728 # map input types to rpc msg
3730 msg
= dict(type='Client',
3731 request
='AddMachinesV2',
3734 _params
['params'] = params
3735 reply
= await self
.rpc(msg
)
3740 @ReturnMapping(AgentVersionResult
)
3741 async def AgentVersion(self
):
3746 # map input types to rpc msg
3748 msg
= dict(type='Client',
3749 request
='AgentVersion',
3753 reply
= await self
.rpc(msg
)
3758 @ReturnMapping(BytesResult
)
3759 async def CACert(self
):
3762 Returns -> typing.Sequence[int]
3764 # map input types to rpc msg
3766 msg
= dict(type='Client',
3771 reply
= await self
.rpc(msg
)
3776 @ReturnMapping(None)
3777 async def DestroyMachines(self
, force
, machine_names
):
3780 machine_names : typing.Sequence[str]
3783 # map input types to rpc msg
3785 msg
= dict(type='Client',
3786 request
='DestroyMachines',
3789 _params
['force'] = force
3790 _params
['machine-names'] = machine_names
3791 reply
= await self
.rpc(msg
)
3796 @ReturnMapping(FindToolsResult
)
3797 async def FindTools(self
, arch
, major
, minor
, number
, series
):
3804 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
3806 # map input types to rpc msg
3808 msg
= dict(type='Client',
3809 request
='FindTools',
3812 _params
['arch'] = arch
3813 _params
['major'] = major
3814 _params
['minor'] = minor
3815 _params
['number'] = number
3816 _params
['series'] = series
3817 reply
= await self
.rpc(msg
)
3822 @ReturnMapping(FullStatus
)
3823 async def FullStatus(self
, patterns
):
3825 patterns : typing.Sequence[str]
3826 Returns -> typing.Union[typing.Mapping[str, ~ApplicationStatus], str, typing.Mapping[str, ~MachineStatus], _ForwardRef('ModelStatusInfo'), typing.Mapping[str, ~ApplicationOfferStatus], typing.Sequence[~RelationStatus], typing.Mapping[str, ~RemoteApplicationStatus]]
3828 # map input types to rpc msg
3830 msg
= dict(type='Client',
3831 request
='FullStatus',
3834 _params
['patterns'] = patterns
3835 reply
= await self
.rpc(msg
)
3840 @ReturnMapping(BundleChangesResults
)
3841 async def GetBundleChanges(self
, yaml
):
3844 Returns -> typing.Union[typing.Sequence[~BundleChange], typing.Sequence[str]]
3846 # map input types to rpc msg
3848 msg
= dict(type='Client',
3849 request
='GetBundleChanges',
3852 _params
['yaml'] = yaml
3853 reply
= await self
.rpc(msg
)
3858 @ReturnMapping(GetConstraintsResults
)
3859 async def GetModelConstraints(self
):
3864 # map input types to rpc msg
3866 msg
= dict(type='Client',
3867 request
='GetModelConstraints',
3871 reply
= await self
.rpc(msg
)
3876 @ReturnMapping(AddMachinesResults
)
3877 async def InjectMachines(self
, params
):
3879 params : typing.Sequence[~AddMachineParams]
3880 Returns -> typing.Sequence[~AddMachinesResult]
3882 # map input types to rpc msg
3884 msg
= dict(type='Client',
3885 request
='InjectMachines',
3888 _params
['params'] = params
3889 reply
= await self
.rpc(msg
)
3894 @ReturnMapping(ModelConfigResults
)
3895 async def ModelGet(self
):
3898 Returns -> typing.Mapping[str, ~ConfigValue]
3900 # map input types to rpc msg
3902 msg
= dict(type='Client',
3907 reply
= await self
.rpc(msg
)
3912 @ReturnMapping(ModelInfo
)
3913 async def ModelInfo(self
):
3916 Returns -> typing.Union[_ForwardRef('Number'), str, typing.Sequence[~ModelMachineInfo], _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
3918 # map input types to rpc msg
3920 msg
= dict(type='Client',
3921 request
='ModelInfo',
3925 reply
= await self
.rpc(msg
)
3930 @ReturnMapping(None)
3931 async def ModelSet(self
, config
):
3933 config : typing.Mapping[str, typing.Any]
3936 # map input types to rpc msg
3938 msg
= dict(type='Client',
3942 _params
['config'] = config
3943 reply
= await self
.rpc(msg
)
3948 @ReturnMapping(None)
3949 async def ModelUnset(self
, keys
):
3951 keys : typing.Sequence[str]
3954 # map input types to rpc msg
3956 msg
= dict(type='Client',
3957 request
='ModelUnset',
3960 _params
['keys'] = keys
3961 reply
= await self
.rpc(msg
)
3966 @ReturnMapping(ModelUserInfoResults
)
3967 async def ModelUserInfo(self
):
3970 Returns -> typing.Sequence[~ModelUserInfoResult]
3972 # map input types to rpc msg
3974 msg
= dict(type='Client',
3975 request
='ModelUserInfo',
3979 reply
= await self
.rpc(msg
)
3984 @ReturnMapping(PrivateAddressResults
)
3985 async def PrivateAddress(self
, target
):
3990 # map input types to rpc msg
3992 msg
= dict(type='Client',
3993 request
='PrivateAddress',
3996 _params
['target'] = target
3997 reply
= await self
.rpc(msg
)
4002 @ReturnMapping(ProvisioningScriptResult
)
4003 async def ProvisioningScript(self
, data_dir
, disable_package_commands
, machine_id
, nonce
):
4006 disable_package_commands : bool
4011 # map input types to rpc msg
4013 msg
= dict(type='Client',
4014 request
='ProvisioningScript',
4017 _params
['data-dir'] = data_dir
4018 _params
['disable-package-commands'] = disable_package_commands
4019 _params
['machine-id'] = machine_id
4020 _params
['nonce'] = nonce
4021 reply
= await self
.rpc(msg
)
4026 @ReturnMapping(PublicAddressResults
)
4027 async def PublicAddress(self
, target
):
4032 # map input types to rpc msg
4034 msg
= dict(type='Client',
4035 request
='PublicAddress',
4038 _params
['target'] = target
4039 reply
= await self
.rpc(msg
)
4044 @ReturnMapping(ResolveCharmResults
)
4045 async def ResolveCharms(self
, references
):
4047 references : typing.Sequence[str]
4048 Returns -> typing.Sequence[~ResolveCharmResult]
4050 # map input types to rpc msg
4052 msg
= dict(type='Client',
4053 request
='ResolveCharms',
4056 _params
['references'] = references
4057 reply
= await self
.rpc(msg
)
4062 @ReturnMapping(None)
4063 async def Resolved(self
, retry
, unit_name
):
4069 # map input types to rpc msg
4071 msg
= dict(type='Client',
4075 _params
['retry'] = retry
4076 _params
['unit-name'] = unit_name
4077 reply
= await self
.rpc(msg
)
4082 @ReturnMapping(ErrorResults
)
4083 async def RetryProvisioning(self
, entities
):
4085 entities : typing.Sequence[~Entity]
4086 Returns -> typing.Sequence[~ErrorResult]
4088 # map input types to rpc msg
4090 msg
= dict(type='Client',
4091 request
='RetryProvisioning',
4094 _params
['entities'] = entities
4095 reply
= await self
.rpc(msg
)
4100 @ReturnMapping(StringResult
)
4101 async def SLALevel(self
):
4104 Returns -> typing.Union[_ForwardRef('Error'), str]
4106 # map input types to rpc msg
4108 msg
= dict(type='Client',
4113 reply
= await self
.rpc(msg
)
4118 @ReturnMapping(None)
4119 async def SetModelAgentVersion(self
, version
):
4124 # map input types to rpc msg
4126 msg
= dict(type='Client',
4127 request
='SetModelAgentVersion',
4130 _params
['version'] = version
4131 reply
= await self
.rpc(msg
)
4136 @ReturnMapping(None)
4137 async def SetModelConstraints(self
, application
, constraints
):
4143 # map input types to rpc msg
4145 msg
= dict(type='Client',
4146 request
='SetModelConstraints',
4149 _params
['application'] = application
4150 _params
['constraints'] = constraints
4151 reply
= await self
.rpc(msg
)
4156 @ReturnMapping(None)
4157 async def SetSLALevel(self
, creds
, level
):
4159 creds : typing.Sequence[int]
4163 # map input types to rpc msg
4165 msg
= dict(type='Client',
4166 request
='SetSLALevel',
4169 _params
['creds'] = creds
4170 _params
['level'] = level
4171 reply
= await self
.rpc(msg
)
4176 @ReturnMapping(StatusHistoryResults
)
4177 async def StatusHistory(self
, requests
):
4179 requests : typing.Sequence[~StatusHistoryRequest]
4180 Returns -> typing.Sequence[~StatusHistoryResult]
4182 # map input types to rpc msg
4184 msg
= dict(type='Client',
4185 request
='StatusHistory',
4188 _params
['requests'] = requests
4189 reply
= await self
.rpc(msg
)
4194 @ReturnMapping(AllWatcherId
)
4195 async def WatchAll(self
):
4200 # map input types to rpc msg
4202 msg
= dict(type='Client',
4207 reply
= await self
.rpc(msg
)
4212 class CredentialValidatorFacade(Type
):
4213 name
= 'CredentialValidator'
4215 schema
= {'definitions': {'Entity': {'additionalProperties': False,
4216 'properties': {'tag': {'type': 'string'}},
4217 'required': ['tag'],
4219 'Error': {'additionalProperties': False,
4220 'properties': {'code': {'type': 'string'},
4221 'info': {'$ref': '#/definitions/ErrorInfo'},
4222 'message': {'type': 'string'}},
4223 'required': ['message', 'code'],
4225 'ErrorInfo': {'additionalProperties': False,
4226 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4227 'macaroon-path': {'type': 'string'}},
4229 'ErrorResult': {'additionalProperties': False,
4230 'properties': {'error': {'$ref': '#/definitions/Error'}},
4232 'InvalidateCredentialArg': {'additionalProperties': False,
4233 'properties': {'reason': {'type': 'string'}},
4235 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4236 'ModelCredential': {'additionalProperties': False,
4237 'properties': {'credential-tag': {'type': 'string'},
4238 'exists': {'type': 'boolean'},
4239 'model-tag': {'type': 'string'},
4240 'valid': {'type': 'boolean'}},
4241 'required': ['model-tag',
4244 'NotifyWatchResult': {'additionalProperties': False,
4245 'properties': {'NotifyWatcherId': {'type': 'string'},
4246 'error': {'$ref': '#/definitions/Error'}},
4247 'required': ['NotifyWatcherId'],
4249 'properties': {'InvalidateModelCredential': {'properties': {'Params': {'$ref': '#/definitions/InvalidateCredentialArg'},
4250 'Result': {'$ref': '#/definitions/ErrorResult'}},
4252 'ModelCredential': {'properties': {'Result': {'$ref': '#/definitions/ModelCredential'}},
4254 'WatchCredential': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
4255 'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4257 'WatchModelCredential': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4262 @ReturnMapping(ErrorResult
)
4263 async def InvalidateModelCredential(self
, reason
):
4268 # map input types to rpc msg
4270 msg
= dict(type='CredentialValidator',
4271 request
='InvalidateModelCredential',
4274 _params
['reason'] = reason
4275 reply
= await self
.rpc(msg
)
4280 @ReturnMapping(ModelCredential
)
4281 async def ModelCredential(self
):
4284 Returns -> typing.Union[str, bool]
4286 # map input types to rpc msg
4288 msg
= dict(type='CredentialValidator',
4289 request
='ModelCredential',
4293 reply
= await self
.rpc(msg
)
4298 @ReturnMapping(NotifyWatchResult
)
4299 async def WatchCredential(self
, tag
):
4302 Returns -> typing.Union[str, _ForwardRef('Error')]
4304 # map input types to rpc msg
4306 msg
= dict(type='CredentialValidator',
4307 request
='WatchCredential',
4310 _params
['tag'] = tag
4311 reply
= await self
.rpc(msg
)
4316 @ReturnMapping(NotifyWatchResult
)
4317 async def WatchModelCredential(self
):
4320 Returns -> typing.Union[str, _ForwardRef('Error')]
4322 # map input types to rpc msg
4324 msg
= dict(type='CredentialValidator',
4325 request
='WatchModelCredential',
4329 reply
= await self
.rpc(msg
)
4334 class DiscoverSpacesFacade(Type
):
4335 name
= 'DiscoverSpaces'
4337 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
4338 'properties': {'provider-network-id': {'type': 'string'},
4339 'space-tag': {'type': 'string'},
4340 'subnet-provider-id': {'type': 'string'},
4341 'subnet-tag': {'type': 'string'},
4342 'vlan-tag': {'type': 'integer'},
4343 'zones': {'items': {'type': 'string'},
4345 'required': ['space-tag'],
4347 'AddSubnetsParams': {'additionalProperties': False,
4348 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
4350 'required': ['subnets'],
4352 'CreateSpaceParams': {'additionalProperties': False,
4353 'properties': {'provider-id': {'type': 'string'},
4354 'public': {'type': 'boolean'},
4355 'space-tag': {'type': 'string'},
4356 'subnet-tags': {'items': {'type': 'string'},
4358 'required': ['subnet-tags',
4362 'CreateSpacesParams': {'additionalProperties': False,
4363 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
4365 'required': ['spaces'],
4367 'DiscoverSpacesResults': {'additionalProperties': False,
4368 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'},
4370 'required': ['results'],
4372 'Error': {'additionalProperties': False,
4373 'properties': {'code': {'type': 'string'},
4374 'info': {'$ref': '#/definitions/ErrorInfo'},
4375 'message': {'type': 'string'}},
4376 'required': ['message', 'code'],
4378 'ErrorInfo': {'additionalProperties': False,
4379 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4380 'macaroon-path': {'type': 'string'}},
4382 'ErrorResult': {'additionalProperties': False,
4383 'properties': {'error': {'$ref': '#/definitions/Error'}},
4385 'ErrorResults': {'additionalProperties': False,
4386 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4388 'required': ['results'],
4390 'ListSubnetsResults': {'additionalProperties': False,
4391 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
4393 'required': ['results'],
4395 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4396 'ModelConfigResult': {'additionalProperties': False,
4397 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
4400 'required': ['config'],
4402 'ProviderSpace': {'additionalProperties': False,
4403 'properties': {'error': {'$ref': '#/definitions/Error'},
4404 'name': {'type': 'string'},
4405 'provider-id': {'type': 'string'},
4406 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
4408 'required': ['name',
4412 'Subnet': {'additionalProperties': False,
4413 'properties': {'cidr': {'type': 'string'},
4414 'life': {'type': 'string'},
4415 'provider-id': {'type': 'string'},
4416 'provider-network-id': {'type': 'string'},
4417 'provider-space-id': {'type': 'string'},
4418 'space-tag': {'type': 'string'},
4419 'status': {'type': 'string'},
4420 'vlan-tag': {'type': 'integer'},
4421 'zones': {'items': {'type': 'string'},
4423 'required': ['cidr',
4429 'SubnetsFilters': {'additionalProperties': False,
4430 'properties': {'space-tag': {'type': 'string'},
4431 'zone': {'type': 'string'}},
4433 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
4434 'Result': {'$ref': '#/definitions/ErrorResults'}},
4436 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
4437 'Result': {'$ref': '#/definitions/ErrorResults'}},
4439 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
4441 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
4442 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
4444 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
4449 @ReturnMapping(ErrorResults
)
4450 async def AddSubnets(self
, subnets
):
4452 subnets : typing.Sequence[~AddSubnetParams]
4453 Returns -> typing.Sequence[~ErrorResult]
4455 # map input types to rpc msg
4457 msg
= dict(type='DiscoverSpaces',
4458 request
='AddSubnets',
4461 _params
['subnets'] = subnets
4462 reply
= await self
.rpc(msg
)
4467 @ReturnMapping(ErrorResults
)
4468 async def CreateSpaces(self
, spaces
):
4470 spaces : typing.Sequence[~CreateSpaceParams]
4471 Returns -> typing.Sequence[~ErrorResult]
4473 # map input types to rpc msg
4475 msg
= dict(type='DiscoverSpaces',
4476 request
='CreateSpaces',
4479 _params
['spaces'] = spaces
4480 reply
= await self
.rpc(msg
)
4485 @ReturnMapping(DiscoverSpacesResults
)
4486 async def ListSpaces(self
):
4489 Returns -> typing.Sequence[~ProviderSpace]
4491 # map input types to rpc msg
4493 msg
= dict(type='DiscoverSpaces',
4494 request
='ListSpaces',
4498 reply
= await self
.rpc(msg
)
4503 @ReturnMapping(ListSubnetsResults
)
4504 async def ListSubnets(self
, space_tag
, zone
):
4508 Returns -> typing.Sequence[~Subnet]
4510 # map input types to rpc msg
4512 msg
= dict(type='DiscoverSpaces',
4513 request
='ListSubnets',
4516 _params
['space-tag'] = space_tag
4517 _params
['zone'] = zone
4518 reply
= await self
.rpc(msg
)
4523 @ReturnMapping(ModelConfigResult
)
4524 async def ModelConfig(self
):
4527 Returns -> typing.Mapping[str, typing.Any]
4529 # map input types to rpc msg
4531 msg
= dict(type='DiscoverSpaces',
4532 request
='ModelConfig',
4536 reply
= await self
.rpc(msg
)
4541 class DiskManagerFacade(Type
):
4542 name
= 'DiskManager'
4544 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
4545 'properties': {'BusAddress': {'type': 'string'},
4546 'DeviceLinks': {'items': {'type': 'string'},
4548 'DeviceName': {'type': 'string'},
4549 'FilesystemType': {'type': 'string'},
4550 'HardwareId': {'type': 'string'},
4551 'InUse': {'type': 'boolean'},
4552 'Label': {'type': 'string'},
4553 'MountPoint': {'type': 'string'},
4554 'Size': {'type': 'integer'},
4555 'UUID': {'type': 'string'},
4556 'WWN': {'type': 'string'}},
4557 'required': ['DeviceName',
4569 'Error': {'additionalProperties': False,
4570 'properties': {'code': {'type': 'string'},
4571 'info': {'$ref': '#/definitions/ErrorInfo'},
4572 'message': {'type': 'string'}},
4573 'required': ['message', 'code'],
4575 'ErrorInfo': {'additionalProperties': False,
4576 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4577 'macaroon-path': {'type': 'string'}},
4579 'ErrorResult': {'additionalProperties': False,
4580 'properties': {'error': {'$ref': '#/definitions/Error'}},
4582 'ErrorResults': {'additionalProperties': False,
4583 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4585 'required': ['results'],
4587 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4588 'MachineBlockDevices': {'additionalProperties': False,
4589 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
4591 'machine': {'type': 'string'}},
4592 'required': ['machine'],
4594 'SetMachineBlockDevices': {'additionalProperties': False,
4595 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
4597 'required': ['machine-block-devices'],
4599 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
4600 'Result': {'$ref': '#/definitions/ErrorResults'}},
4605 @ReturnMapping(ErrorResults
)
4606 async def SetMachineBlockDevices(self
, machine_block_devices
):
4608 machine_block_devices : typing.Sequence[~MachineBlockDevices]
4609 Returns -> typing.Sequence[~ErrorResult]
4611 # map input types to rpc msg
4613 msg
= dict(type='DiskManager',
4614 request
='SetMachineBlockDevices',
4617 _params
['machine-block-devices'] = machine_block_devices
4618 reply
= await self
.rpc(msg
)
4623 class EntityWatcherFacade(Type
):
4624 name
= 'EntityWatcher'
4626 schema
= {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
4627 'properties': {'changes': {'items': {'type': 'string'},
4629 'error': {'$ref': '#/definitions/Error'},
4630 'watcher-id': {'type': 'string'}},
4631 'required': ['watcher-id'],
4633 'Error': {'additionalProperties': False,
4634 'properties': {'code': {'type': 'string'},
4635 'info': {'$ref': '#/definitions/ErrorInfo'},
4636 'message': {'type': 'string'}},
4637 'required': ['message', 'code'],
4639 'ErrorInfo': {'additionalProperties': False,
4640 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4641 'macaroon-path': {'type': 'string'}},
4643 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
4644 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
4646 'Stop': {'type': 'object'}},
4650 @ReturnMapping(EntitiesWatchResult
)
4651 async def Next(self
):
4654 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
4656 # map input types to rpc msg
4658 msg
= dict(type='EntityWatcher',
4663 reply
= await self
.rpc(msg
)
4668 @ReturnMapping(None)
4669 async def Stop(self
):
4674 # map input types to rpc msg
4676 msg
= dict(type='EntityWatcher',
4681 reply
= await self
.rpc(msg
)
4686 class FilesystemAttachmentsWatcherFacade(Type
):
4687 name
= 'FilesystemAttachmentsWatcher'
4689 schema
= {'definitions': {'Error': {'additionalProperties': False,
4690 'properties': {'code': {'type': 'string'},
4691 'info': {'$ref': '#/definitions/ErrorInfo'},
4692 'message': {'type': 'string'}},
4693 'required': ['message', 'code'],
4695 'ErrorInfo': {'additionalProperties': False,
4696 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4697 'macaroon-path': {'type': 'string'}},
4699 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4700 'MachineStorageId': {'additionalProperties': False,
4701 'properties': {'attachment-tag': {'type': 'string'},
4702 'machine-tag': {'type': 'string'}},
4703 'required': ['machine-tag',
4706 'MachineStorageIdsWatchResult': {'additionalProperties': False,
4707 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
4709 'error': {'$ref': '#/definitions/Error'},
4710 'watcher-id': {'type': 'string'}},
4711 'required': ['watcher-id',
4714 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
4716 'Stop': {'type': 'object'}},
4720 @ReturnMapping(MachineStorageIdsWatchResult
)
4721 async def Next(self
):
4724 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error'), str]
4726 # map input types to rpc msg
4728 msg
= dict(type='FilesystemAttachmentsWatcher',
4733 reply
= await self
.rpc(msg
)
4738 @ReturnMapping(None)
4739 async def Stop(self
):
4744 # map input types to rpc msg
4746 msg
= dict(type='FilesystemAttachmentsWatcher',
4751 reply
= await self
.rpc(msg
)
4756 class HighAvailabilityFacade(Type
):
4757 name
= 'HighAvailability'
4759 schema
= {'definitions': {'Address': {'additionalProperties': False,
4760 'properties': {'Scope': {'type': 'string'},
4761 'SpaceName': {'type': 'string'},
4762 'SpaceProviderId': {'type': 'string'},
4763 'Type': {'type': 'string'},
4764 'Value': {'type': 'string'}},
4765 'required': ['Value',
4771 'ControllersChangeResult': {'additionalProperties': False,
4772 'properties': {'error': {'$ref': '#/definitions/Error'},
4773 'result': {'$ref': '#/definitions/ControllersChanges'}},
4774 'required': ['result'],
4776 'ControllersChangeResults': {'additionalProperties': False,
4777 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
4779 'required': ['results'],
4781 'ControllersChanges': {'additionalProperties': False,
4782 'properties': {'added': {'items': {'type': 'string'},
4784 'converted': {'items': {'type': 'string'},
4786 'demoted': {'items': {'type': 'string'},
4788 'maintained': {'items': {'type': 'string'},
4790 'promoted': {'items': {'type': 'string'},
4792 'removed': {'items': {'type': 'string'},
4795 'ControllersSpec': {'additionalProperties': False,
4796 'properties': {'constraints': {'$ref': '#/definitions/Value'},
4797 'num-controllers': {'type': 'integer'},
4798 'placement': {'items': {'type': 'string'},
4800 'series': {'type': 'string'}},
4801 'required': ['num-controllers'],
4803 'ControllersSpecs': {'additionalProperties': False,
4804 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
4806 'required': ['specs'],
4808 'Error': {'additionalProperties': False,
4809 'properties': {'code': {'type': 'string'},
4810 'info': {'$ref': '#/definitions/ErrorInfo'},
4811 'message': {'type': 'string'}},
4812 'required': ['message', 'code'],
4814 'ErrorInfo': {'additionalProperties': False,
4815 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4816 'macaroon-path': {'type': 'string'}},
4818 'HAMember': {'additionalProperties': False,
4819 'properties': {'public-address': {'$ref': '#/definitions/Address'},
4820 'series': {'type': 'string'},
4821 'tag': {'type': 'string'}},
4822 'required': ['tag', 'public-address', 'series'],
4824 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4825 'Member': {'additionalProperties': False,
4826 'properties': {'Address': {'type': 'string'},
4827 'Id': {'type': 'integer'},
4828 'Priority': {'type': 'number'},
4829 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
4831 'Votes': {'type': 'integer'}},
4838 'MongoUpgradeResults': {'additionalProperties': False,
4839 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
4841 'master': {'$ref': '#/definitions/HAMember'},
4842 'rs-members': {'items': {'$ref': '#/definitions/Member'},
4844 'required': ['rs-members',
4848 'MongoVersion': {'additionalProperties': False,
4849 'properties': {'engine': {'type': 'string'},
4850 'major': {'type': 'integer'},
4851 'minor': {'type': 'integer'},
4852 'patch': {'type': 'string'}},
4853 'required': ['major',
4858 'ResumeReplicationParams': {'additionalProperties': False,
4859 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
4861 'required': ['members'],
4863 'UpgradeMongoParams': {'additionalProperties': False,
4864 'properties': {'target': {'$ref': '#/definitions/MongoVersion'}},
4865 'required': ['target'],
4867 'Value': {'additionalProperties': False,
4868 'properties': {'arch': {'type': 'string'},
4869 'container': {'type': 'string'},
4870 'cores': {'type': 'integer'},
4871 'cpu-power': {'type': 'integer'},
4872 'instance-type': {'type': 'string'},
4873 'mem': {'type': 'integer'},
4874 'root-disk': {'type': 'integer'},
4875 'spaces': {'items': {'type': 'string'},
4877 'tags': {'items': {'type': 'string'},
4879 'virt-type': {'type': 'string'},
4880 'zones': {'items': {'type': 'string'},
4883 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
4884 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
4886 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
4888 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
4889 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
4894 @ReturnMapping(ControllersChangeResults
)
4895 async def EnableHA(self
, specs
):
4897 specs : typing.Sequence[~ControllersSpec]
4898 Returns -> typing.Sequence[~ControllersChangeResult]
4900 # map input types to rpc msg
4902 msg
= dict(type='HighAvailability',
4906 _params
['specs'] = specs
4907 reply
= await self
.rpc(msg
)
4912 @ReturnMapping(None)
4913 async def ResumeHAReplicationAfterUpgrade(self
, members
):
4915 members : typing.Sequence[~Member]
4918 # map input types to rpc msg
4920 msg
= dict(type='HighAvailability',
4921 request
='ResumeHAReplicationAfterUpgrade',
4924 _params
['members'] = members
4925 reply
= await self
.rpc(msg
)
4930 @ReturnMapping(MongoUpgradeResults
)
4931 async def StopHAReplicationForUpgrade(self
, target
):
4933 target : MongoVersion
4934 Returns -> typing.Union[typing.Sequence[~HAMember], _ForwardRef('HAMember'), typing.Sequence[~Member]]
4936 # map input types to rpc msg
4938 msg
= dict(type='HighAvailability',
4939 request
='StopHAReplicationForUpgrade',
4942 _params
['target'] = target
4943 reply
= await self
.rpc(msg
)
4948 class ImageManagerFacade(Type
):
4949 name
= 'ImageManager'
4951 schema
= {'definitions': {'Error': {'additionalProperties': False,
4952 'properties': {'code': {'type': 'string'},
4953 'info': {'$ref': '#/definitions/ErrorInfo'},
4954 'message': {'type': 'string'}},
4955 'required': ['message', 'code'],
4957 'ErrorInfo': {'additionalProperties': False,
4958 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4959 'macaroon-path': {'type': 'string'}},
4961 'ErrorResult': {'additionalProperties': False,
4962 'properties': {'error': {'$ref': '#/definitions/Error'}},
4964 'ErrorResults': {'additionalProperties': False,
4965 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4967 'required': ['results'],
4969 'ImageFilterParams': {'additionalProperties': False,
4970 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
4972 'required': ['images'],
4974 'ImageMetadata': {'additionalProperties': False,
4975 'properties': {'arch': {'type': 'string'},
4976 'created': {'format': 'date-time',
4978 'kind': {'type': 'string'},
4979 'series': {'type': 'string'},
4980 'url': {'type': 'string'}},
4981 'required': ['kind',
4987 'ImageSpec': {'additionalProperties': False,
4988 'properties': {'arch': {'type': 'string'},
4989 'kind': {'type': 'string'},
4990 'series': {'type': 'string'}},
4991 'required': ['kind', 'arch', 'series'],
4993 'ListImageResult': {'additionalProperties': False,
4994 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
4996 'required': ['result'],
4998 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
4999 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
5000 'Result': {'$ref': '#/definitions/ErrorResults'}},
5002 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
5003 'Result': {'$ref': '#/definitions/ListImageResult'}},
5008 @ReturnMapping(ErrorResults
)
5009 async def DeleteImages(self
, images
):
5011 images : typing.Sequence[~ImageSpec]
5012 Returns -> typing.Sequence[~ErrorResult]
5014 # map input types to rpc msg
5016 msg
= dict(type='ImageManager',
5017 request
='DeleteImages',
5020 _params
['images'] = images
5021 reply
= await self
.rpc(msg
)
5026 @ReturnMapping(ListImageResult
)
5027 async def ListImages(self
, images
):
5029 images : typing.Sequence[~ImageSpec]
5030 Returns -> typing.Sequence[~ImageMetadata]
5032 # map input types to rpc msg
5034 msg
= dict(type='ImageManager',
5035 request
='ListImages',
5038 _params
['images'] = images
5039 reply
= await self
.rpc(msg
)
5044 class ImageMetadataFacade(Type
):
5045 name
= 'ImageMetadata'
5047 schema
= {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
5048 'properties': {'arch': {'type': 'string'},
5049 'image-id': {'type': 'string'},
5050 'priority': {'type': 'integer'},
5051 'region': {'type': 'string'},
5052 'root-storage-size': {'type': 'integer'},
5053 'root-storage-type': {'type': 'string'},
5054 'series': {'type': 'string'},
5055 'source': {'type': 'string'},
5056 'stream': {'type': 'string'},
5057 'version': {'type': 'string'},
5058 'virt-type': {'type': 'string'}},
5059 'required': ['image-id',
5067 'CloudImageMetadataList': {'additionalProperties': False,
5068 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
5071 'Error': {'additionalProperties': False,
5072 'properties': {'code': {'type': 'string'},
5073 'info': {'$ref': '#/definitions/ErrorInfo'},
5074 'message': {'type': 'string'}},
5075 'required': ['message', 'code'],
5077 'ErrorInfo': {'additionalProperties': False,
5078 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5079 'macaroon-path': {'type': 'string'}},
5081 'ErrorResult': {'additionalProperties': False,
5082 'properties': {'error': {'$ref': '#/definitions/Error'}},
5084 'ErrorResults': {'additionalProperties': False,
5085 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5087 'required': ['results'],
5089 'ImageMetadataFilter': {'additionalProperties': False,
5090 'properties': {'arches': {'items': {'type': 'string'},
5092 'region': {'type': 'string'},
5093 'root-storage-type': {'type': 'string'},
5094 'series': {'items': {'type': 'string'},
5096 'stream': {'type': 'string'},
5097 'virt-type': {'type': 'string'}},
5099 'ListCloudImageMetadataResult': {'additionalProperties': False,
5100 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
5102 'required': ['result'],
5104 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5105 'MetadataImageIds': {'additionalProperties': False,
5106 'properties': {'image-ids': {'items': {'type': 'string'},
5108 'required': ['image-ids'],
5110 'MetadataSaveParams': {'additionalProperties': False,
5111 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
5114 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
5115 'Result': {'$ref': '#/definitions/ErrorResults'}},
5117 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
5118 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
5120 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
5121 'Result': {'$ref': '#/definitions/ErrorResults'}},
5123 'UpdateFromPublishedImages': {'type': 'object'}},
5127 @ReturnMapping(ErrorResults
)
5128 async def Delete(self
, image_ids
):
5130 image_ids : typing.Sequence[str]
5131 Returns -> typing.Sequence[~ErrorResult]
5133 # map input types to rpc msg
5135 msg
= dict(type='ImageMetadata',
5139 _params
['image-ids'] = image_ids
5140 reply
= await self
.rpc(msg
)
5145 @ReturnMapping(ListCloudImageMetadataResult
)
5146 async def List(self
, arches
, region
, root_storage_type
, series
, stream
, virt_type
):
5148 arches : typing.Sequence[str]
5150 root_storage_type : str
5151 series : typing.Sequence[str]
5154 Returns -> typing.Sequence[~CloudImageMetadata]
5156 # map input types to rpc msg
5158 msg
= dict(type='ImageMetadata',
5162 _params
['arches'] = arches
5163 _params
['region'] = region
5164 _params
['root-storage-type'] = root_storage_type
5165 _params
['series'] = series
5166 _params
['stream'] = stream
5167 _params
['virt-type'] = virt_type
5168 reply
= await self
.rpc(msg
)
5173 @ReturnMapping(ErrorResults
)
5174 async def Save(self
, metadata
):
5176 metadata : typing.Sequence[~CloudImageMetadataList]
5177 Returns -> typing.Sequence[~ErrorResult]
5179 # map input types to rpc msg
5181 msg
= dict(type='ImageMetadata',
5185 _params
['metadata'] = metadata
5186 reply
= await self
.rpc(msg
)
5191 @ReturnMapping(None)
5192 async def UpdateFromPublishedImages(self
):
5197 # map input types to rpc msg
5199 msg
= dict(type='ImageMetadata',
5200 request
='UpdateFromPublishedImages',
5204 reply
= await self
.rpc(msg
)
5209 class LeadershipServiceFacade(Type
):
5210 name
= 'LeadershipService'
5212 schema
= {'definitions': {'ApplicationTag': {'additionalProperties': False,
5213 'properties': {'Name': {'type': 'string'}},
5214 'required': ['Name'],
5216 'ClaimLeadershipBulkParams': {'additionalProperties': False,
5217 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
5219 'required': ['params'],
5221 'ClaimLeadershipBulkResults': {'additionalProperties': False,
5222 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5224 'required': ['results'],
5226 'ClaimLeadershipParams': {'additionalProperties': False,
5227 'properties': {'application-tag': {'type': 'string'},
5228 'duration': {'type': 'number'},
5229 'unit-tag': {'type': 'string'}},
5230 'required': ['application-tag',
5234 'Error': {'additionalProperties': False,
5235 'properties': {'code': {'type': 'string'},
5236 'info': {'$ref': '#/definitions/ErrorInfo'},
5237 'message': {'type': 'string'}},
5238 'required': ['message', 'code'],
5240 'ErrorInfo': {'additionalProperties': False,
5241 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5242 'macaroon-path': {'type': 'string'}},
5244 'ErrorResult': {'additionalProperties': False,
5245 'properties': {'error': {'$ref': '#/definitions/Error'}},
5247 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
5248 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
5249 'Result': {'$ref': '#/definitions/ErrorResult'}},
5251 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
5252 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
5257 @ReturnMapping(ErrorResult
)
5258 async def BlockUntilLeadershipReleased(self
, name
):
5263 # map input types to rpc msg
5265 msg
= dict(type='LeadershipService',
5266 request
='BlockUntilLeadershipReleased',
5269 _params
['Name'] = name
5270 reply
= await self
.rpc(msg
)
5275 @ReturnMapping(ClaimLeadershipBulkResults
)
5276 async def ClaimLeadership(self
, params
):
5278 params : typing.Sequence[~ClaimLeadershipParams]
5279 Returns -> typing.Sequence[~ErrorResult]
5281 # map input types to rpc msg
5283 msg
= dict(type='LeadershipService',
5284 request
='ClaimLeadership',
5287 _params
['params'] = params
5288 reply
= await self
.rpc(msg
)
5293 class MachineManagerFacade(Type
):
5294 name
= 'MachineManager'
5296 schema
= {'definitions': {'AddMachineParams': {'additionalProperties': False,
5297 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
5299 'constraints': {'$ref': '#/definitions/Value'},
5300 'container-type': {'type': 'string'},
5301 'disks': {'items': {'$ref': '#/definitions/Constraints'},
5303 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
5304 'instance-id': {'type': 'string'},
5305 'jobs': {'items': {'type': 'string'},
5307 'nonce': {'type': 'string'},
5308 'parent-id': {'type': 'string'},
5309 'placement': {'$ref': '#/definitions/Placement'},
5310 'series': {'type': 'string'}},
5311 'required': ['series',
5318 'hardware-characteristics',
5321 'AddMachines': {'additionalProperties': False,
5322 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
5324 'required': ['params'],
5326 'AddMachinesResult': {'additionalProperties': False,
5327 'properties': {'error': {'$ref': '#/definitions/Error'},
5328 'machine': {'type': 'string'}},
5329 'required': ['machine'],
5331 'AddMachinesResults': {'additionalProperties': False,
5332 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
5334 'required': ['machines'],
5336 'Address': {'additionalProperties': False,
5337 'properties': {'scope': {'type': 'string'},
5338 'space-name': {'type': 'string'},
5339 'type': {'type': 'string'},
5340 'value': {'type': 'string'}},
5341 'required': ['value', 'type', 'scope'],
5343 'Constraints': {'additionalProperties': False,
5344 'properties': {'Count': {'type': 'integer'},
5345 'Pool': {'type': 'string'},
5346 'Size': {'type': 'integer'}},
5347 'required': ['Pool', 'Size', 'Count'],
5349 'Error': {'additionalProperties': False,
5350 'properties': {'code': {'type': 'string'},
5351 'info': {'$ref': '#/definitions/ErrorInfo'},
5352 'message': {'type': 'string'}},
5353 'required': ['message', 'code'],
5355 'ErrorInfo': {'additionalProperties': False,
5356 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5357 'macaroon-path': {'type': 'string'}},
5359 'HardwareCharacteristics': {'additionalProperties': False,
5360 'properties': {'arch': {'type': 'string'},
5361 'availability-zone': {'type': 'string'},
5362 'cpu-cores': {'type': 'integer'},
5363 'cpu-power': {'type': 'integer'},
5364 'mem': {'type': 'integer'},
5365 'root-disk': {'type': 'integer'},
5366 'tags': {'items': {'type': 'string'},
5369 'InstanceType': {'additionalProperties': False,
5370 'properties': {'arches': {'items': {'type': 'string'},
5372 'cost': {'type': 'integer'},
5373 'cpu-cores': {'type': 'integer'},
5374 'deprecated': {'type': 'boolean'},
5375 'memory': {'type': 'integer'},
5376 'name': {'type': 'string'},
5377 'root-disk': {'type': 'integer'},
5378 'virt-type': {'type': 'string'}},
5379 'required': ['arches', 'cpu-cores', 'memory'],
5381 'InstanceTypesResult': {'additionalProperties': False,
5382 'properties': {'cost-currency': {'type': 'string'},
5383 'cost-divisor': {'type': 'integer'},
5384 'cost-unit': {'type': 'string'},
5385 'error': {'$ref': '#/definitions/Error'},
5386 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
5389 'InstanceTypesResults': {'additionalProperties': False,
5390 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
5392 'required': ['results'],
5394 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5395 'ModelInstanceTypesConstraint': {'additionalProperties': False,
5396 'properties': {'value': {'$ref': '#/definitions/Value'}},
5398 'ModelInstanceTypesConstraints': {'additionalProperties': False,
5399 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
5401 'required': ['constraints'],
5403 'Placement': {'additionalProperties': False,
5404 'properties': {'directive': {'type': 'string'},
5405 'scope': {'type': 'string'}},
5406 'required': ['scope', 'directive'],
5408 'Value': {'additionalProperties': False,
5409 'properties': {'arch': {'type': 'string'},
5410 'container': {'type': 'string'},
5411 'cores': {'type': 'integer'},
5412 'cpu-power': {'type': 'integer'},
5413 'instance-type': {'type': 'string'},
5414 'mem': {'type': 'integer'},
5415 'root-disk': {'type': 'integer'},
5416 'spaces': {'items': {'type': 'string'},
5418 'tags': {'items': {'type': 'string'},
5420 'virt-type': {'type': 'string'}},
5422 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
5423 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
5425 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
5426 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
5431 @ReturnMapping(AddMachinesResults
)
5432 async def AddMachines(self
, params
):
5434 params : typing.Sequence[~AddMachineParams]
5435 Returns -> typing.Sequence[~AddMachinesResult]
5437 # map input types to rpc msg
5439 msg
= dict(type='MachineManager',
5440 request
='AddMachines',
5443 _params
['params'] = params
5444 reply
= await self
.rpc(msg
)
5449 @ReturnMapping(InstanceTypesResults
)
5450 async def InstanceTypes(self
, constraints
):
5452 constraints : typing.Sequence[~ModelInstanceTypesConstraint]
5453 Returns -> typing.Sequence[~InstanceTypesResult]
5455 # map input types to rpc msg
5457 msg
= dict(type='MachineManager',
5458 request
='InstanceTypes',
5461 _params
['constraints'] = constraints
5462 reply
= await self
.rpc(msg
)
5467 class MetricsAdderFacade(Type
):
5468 name
= 'MetricsAdder'
5470 schema
= {'definitions': {'Error': {'additionalProperties': False,
5471 'properties': {'code': {'type': 'string'},
5472 'info': {'$ref': '#/definitions/ErrorInfo'},
5473 'message': {'type': 'string'}},
5474 'required': ['message', 'code'],
5476 'ErrorInfo': {'additionalProperties': False,
5477 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5478 'macaroon-path': {'type': 'string'}},
5480 'ErrorResult': {'additionalProperties': False,
5481 'properties': {'error': {'$ref': '#/definitions/Error'}},
5483 'ErrorResults': {'additionalProperties': False,
5484 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5486 'required': ['results'],
5488 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5489 'Metric': {'additionalProperties': False,
5490 'properties': {'key': {'type': 'string'},
5491 'labels': {'patternProperties': {'.*': {'type': 'string'}},
5493 'time': {'format': 'date-time',
5495 'value': {'type': 'string'}},
5496 'required': ['key', 'value', 'time'],
5498 'MetricBatch': {'additionalProperties': False,
5499 'properties': {'charm-url': {'type': 'string'},
5500 'created': {'format': 'date-time',
5502 'metrics': {'items': {'$ref': '#/definitions/Metric'},
5504 'uuid': {'type': 'string'}},
5505 'required': ['uuid',
5510 'MetricBatchParam': {'additionalProperties': False,
5511 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
5512 'tag': {'type': 'string'}},
5513 'required': ['tag', 'batch'],
5515 'MetricBatchParams': {'additionalProperties': False,
5516 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
5518 'required': ['batches'],
5520 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
5521 'Result': {'$ref': '#/definitions/ErrorResults'}},
5526 @ReturnMapping(ErrorResults
)
5527 async def AddMetricBatches(self
, batches
):
5529 batches : typing.Sequence[~MetricBatchParam]
5530 Returns -> typing.Sequence[~ErrorResult]
5532 # map input types to rpc msg
5534 msg
= dict(type='MetricsAdder',
5535 request
='AddMetricBatches',
5538 _params
['batches'] = batches
5539 reply
= await self
.rpc(msg
)
5544 class MetricsDebugFacade(Type
):
5545 name
= 'MetricsDebug'
5547 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5548 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5550 'required': ['entities'],
5552 'Entity': {'additionalProperties': False,
5553 'properties': {'tag': {'type': 'string'}},
5554 'required': ['tag'],
5556 'EntityMetrics': {'additionalProperties': False,
5557 'properties': {'error': {'$ref': '#/definitions/Error'},
5558 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
5561 'Error': {'additionalProperties': False,
5562 'properties': {'code': {'type': 'string'},
5563 'info': {'$ref': '#/definitions/ErrorInfo'},
5564 'message': {'type': 'string'}},
5565 'required': ['message', 'code'],
5567 'ErrorInfo': {'additionalProperties': False,
5568 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5569 'macaroon-path': {'type': 'string'}},
5571 'ErrorResult': {'additionalProperties': False,
5572 'properties': {'error': {'$ref': '#/definitions/Error'}},
5574 'ErrorResults': {'additionalProperties': False,
5575 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5577 'required': ['results'],
5579 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5580 'MeterStatusParam': {'additionalProperties': False,
5581 'properties': {'code': {'type': 'string'},
5582 'info': {'type': 'string'},
5583 'tag': {'type': 'string'}},
5584 'required': ['tag', 'code'],
5586 'MeterStatusParams': {'additionalProperties': False,
5587 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
5589 'required': ['statues'],
5591 'MetricResult': {'additionalProperties': False,
5592 'properties': {'key': {'type': 'string'},
5593 'labels': {'patternProperties': {'.*': {'type': 'string'}},
5595 'time': {'format': 'date-time',
5597 'unit': {'type': 'string'},
5598 'value': {'type': 'string'}},
5599 'required': ['time',
5605 'MetricResults': {'additionalProperties': False,
5606 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
5608 'required': ['results'],
5610 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5611 'Result': {'$ref': '#/definitions/MetricResults'}},
5613 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
5614 'Result': {'$ref': '#/definitions/ErrorResults'}},
5619 @ReturnMapping(MetricResults
)
5620 async def GetMetrics(self
, entities
):
5622 entities : typing.Sequence[~Entity]
5623 Returns -> typing.Sequence[~EntityMetrics]
5625 # map input types to rpc msg
5627 msg
= dict(type='MetricsDebug',
5628 request
='GetMetrics',
5631 _params
['entities'] = entities
5632 reply
= await self
.rpc(msg
)
5637 @ReturnMapping(ErrorResults
)
5638 async def SetMeterStatus(self
, statues
):
5640 statues : typing.Sequence[~MeterStatusParam]
5641 Returns -> typing.Sequence[~ErrorResult]
5643 # map input types to rpc msg
5645 msg
= dict(type='MetricsDebug',
5646 request
='SetMeterStatus',
5649 _params
['statues'] = statues
5650 reply
= await self
.rpc(msg
)
5655 class ModelConfigFacade(Type
):
5656 name
= 'ModelConfig'
5658 schema
= {'definitions': {'ConfigValue': {'additionalProperties': False,
5659 'properties': {'source': {'type': 'string'},
5660 'value': {'additionalProperties': True,
5662 'required': ['value', 'source'],
5664 'Error': {'additionalProperties': False,
5665 'properties': {'code': {'type': 'string'},
5666 'info': {'$ref': '#/definitions/ErrorInfo'},
5667 'message': {'type': 'string'}},
5668 'required': ['message', 'code'],
5670 'ErrorInfo': {'additionalProperties': False,
5671 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5672 'macaroon-path': {'type': 'string'}},
5674 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5675 'ModelConfigResults': {'additionalProperties': False,
5676 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
5678 'required': ['config'],
5680 'ModelSLA': {'additionalProperties': False,
5681 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
5682 'creds': {'items': {'type': 'integer'},
5684 'required': ['ModelSLAInfo', 'creds'],
5686 'ModelSLAInfo': {'additionalProperties': False,
5687 'properties': {'level': {'type': 'string'},
5688 'owner': {'type': 'string'}},
5689 'required': ['level', 'owner'],
5691 'ModelSequencesResult': {'additionalProperties': False,
5692 'properties': {'sequences': {'patternProperties': {'.*': {'type': 'integer'}},
5694 'required': ['sequences'],
5696 'ModelSet': {'additionalProperties': False,
5697 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
5700 'required': ['config'],
5702 'ModelUnset': {'additionalProperties': False,
5703 'properties': {'keys': {'items': {'type': 'string'},
5705 'required': ['keys'],
5707 'StringResult': {'additionalProperties': False,
5708 'properties': {'error': {'$ref': '#/definitions/Error'},
5709 'result': {'type': 'string'}},
5710 'required': ['result'],
5712 'properties': {'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
5714 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
5716 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
5718 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
5720 'Sequences': {'properties': {'Result': {'$ref': '#/definitions/ModelSequencesResult'}},
5722 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
5727 @ReturnMapping(ModelConfigResults
)
5728 async def ModelGet(self
):
5731 Returns -> typing.Mapping[str, ~ConfigValue]
5733 # map input types to rpc msg
5735 msg
= dict(type='ModelConfig',
5740 reply
= await self
.rpc(msg
)
5745 @ReturnMapping(None)
5746 async def ModelSet(self
, config
):
5748 config : typing.Mapping[str, typing.Any]
5751 # map input types to rpc msg
5753 msg
= dict(type='ModelConfig',
5757 _params
['config'] = config
5758 reply
= await self
.rpc(msg
)
5763 @ReturnMapping(None)
5764 async def ModelUnset(self
, keys
):
5766 keys : typing.Sequence[str]
5769 # map input types to rpc msg
5771 msg
= dict(type='ModelConfig',
5772 request
='ModelUnset',
5775 _params
['keys'] = keys
5776 reply
= await self
.rpc(msg
)
5781 @ReturnMapping(StringResult
)
5782 async def SLALevel(self
):
5785 Returns -> typing.Union[_ForwardRef('Error'), str]
5787 # map input types to rpc msg
5789 msg
= dict(type='ModelConfig',
5794 reply
= await self
.rpc(msg
)
5799 @ReturnMapping(ModelSequencesResult
)
5800 async def Sequences(self
):
5803 Returns -> typing.Mapping[str, int]
5805 # map input types to rpc msg
5807 msg
= dict(type='ModelConfig',
5808 request
='Sequences',
5812 reply
= await self
.rpc(msg
)
5817 @ReturnMapping(None)
5818 async def SetSLALevel(self
, creds
, level
):
5820 creds : typing.Sequence[int]
5824 # map input types to rpc msg
5826 msg
= dict(type='ModelConfig',
5827 request
='SetSLALevel',
5830 _params
['creds'] = creds
5831 _params
['level'] = level
5832 reply
= await self
.rpc(msg
)
5837 class ModelManagerFacade(Type
):
5838 name
= 'ModelManager'
5840 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5841 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5843 'required': ['entities'],
5845 'Entity': {'additionalProperties': False,
5846 'properties': {'tag': {'type': 'string'}},
5847 'required': ['tag'],
5849 'EntityStatus': {'additionalProperties': False,
5850 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
5853 'info': {'type': 'string'},
5854 'since': {'format': 'date-time',
5856 'status': {'type': 'string'}},
5857 'required': ['status', 'info', 'since'],
5859 'Error': {'additionalProperties': False,
5860 'properties': {'code': {'type': 'string'},
5861 'info': {'$ref': '#/definitions/ErrorInfo'},
5862 'message': {'type': 'string'}},
5863 'required': ['message', 'code'],
5865 'ErrorInfo': {'additionalProperties': False,
5866 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5867 'macaroon-path': {'type': 'string'}},
5869 'ErrorResult': {'additionalProperties': False,
5870 'properties': {'error': {'$ref': '#/definitions/Error'}},
5872 'ErrorResults': {'additionalProperties': False,
5873 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5875 'required': ['results'],
5877 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5878 'MachineHardware': {'additionalProperties': False,
5879 'properties': {'arch': {'type': 'string'},
5880 'availability-zone': {'type': 'string'},
5881 'cores': {'type': 'integer'},
5882 'cpu-power': {'type': 'integer'},
5883 'mem': {'type': 'integer'},
5884 'root-disk': {'type': 'integer'},
5885 'tags': {'items': {'type': 'string'},
5888 'MapResult': {'additionalProperties': False,
5889 'properties': {'error': {'$ref': '#/definitions/Error'},
5890 'result': {'patternProperties': {'.*': {'additionalProperties': True,
5893 'required': ['result'],
5895 'MapResults': {'additionalProperties': False,
5896 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
5898 'required': ['results'],
5900 'Model': {'additionalProperties': False,
5901 'properties': {'name': {'type': 'string'},
5902 'owner-tag': {'type': 'string'},
5903 'uuid': {'type': 'string'}},
5904 'required': ['name', 'uuid', 'owner-tag'],
5906 'ModelCreateArgs': {'additionalProperties': False,
5907 'properties': {'cloud-tag': {'type': 'string'},
5908 'config': {'patternProperties': {'.*': {'additionalProperties': True,
5911 'credential': {'type': 'string'},
5912 'name': {'type': 'string'},
5913 'owner-tag': {'type': 'string'},
5914 'region': {'type': 'string'}},
5915 'required': ['name', 'owner-tag'],
5917 'ModelDefaultValues': {'additionalProperties': False,
5918 'properties': {'cloud-region': {'type': 'string'},
5919 'cloud-tag': {'type': 'string'},
5920 'config': {'patternProperties': {'.*': {'additionalProperties': True,
5923 'required': ['config'],
5925 'ModelDefaults': {'additionalProperties': False,
5926 'properties': {'controller': {'additionalProperties': True,
5928 'default': {'additionalProperties': True,
5930 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
5933 'ModelDefaultsResult': {'additionalProperties': False,
5934 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
5936 'required': ['config'],
5938 'ModelInfo': {'additionalProperties': False,
5939 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
5940 'cloud-credential-tag': {'type': 'string'},
5941 'cloud-region': {'type': 'string'},
5942 'cloud-tag': {'type': 'string'},
5943 'controller-uuid': {'type': 'string'},
5944 'default-series': {'type': 'string'},
5945 'life': {'type': 'string'},
5946 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
5948 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
5949 'name': {'type': 'string'},
5950 'owner-tag': {'type': 'string'},
5951 'provider-type': {'type': 'string'},
5952 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
5953 'status': {'$ref': '#/definitions/EntityStatus'},
5954 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
5956 'uuid': {'type': 'string'}},
5957 'required': ['name',
5968 'ModelInfoResult': {'additionalProperties': False,
5969 'properties': {'error': {'$ref': '#/definitions/Error'},
5970 'result': {'$ref': '#/definitions/ModelInfo'}},
5972 'ModelInfoResults': {'additionalProperties': False,
5973 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
5975 'required': ['results'],
5977 'ModelMachineInfo': {'additionalProperties': False,
5978 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
5979 'has-vote': {'type': 'boolean'},
5980 'id': {'type': 'string'},
5981 'instance-id': {'type': 'string'},
5982 'status': {'type': 'string'},
5983 'wants-vote': {'type': 'boolean'}},
5986 'ModelMigrationStatus': {'additionalProperties': False,
5987 'properties': {'end': {'format': 'date-time',
5989 'start': {'format': 'date-time',
5991 'status': {'type': 'string'}},
5992 'required': ['status', 'start'],
5994 'ModelSLAInfo': {'additionalProperties': False,
5995 'properties': {'level': {'type': 'string'},
5996 'owner': {'type': 'string'}},
5997 'required': ['level', 'owner'],
5999 'ModelStatus': {'additionalProperties': False,
6000 'properties': {'application-count': {'type': 'integer'},
6001 'hosted-machine-count': {'type': 'integer'},
6002 'life': {'type': 'string'},
6003 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
6005 'model-tag': {'type': 'string'},
6006 'owner-tag': {'type': 'string'}},
6007 'required': ['model-tag',
6009 'hosted-machine-count',
6010 'application-count',
6013 'ModelStatusResults': {'additionalProperties': False,
6014 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
6016 'required': ['models'],
6018 'ModelUnsetKeys': {'additionalProperties': False,
6019 'properties': {'cloud-region': {'type': 'string'},
6020 'cloud-tag': {'type': 'string'},
6021 'keys': {'items': {'type': 'string'},
6023 'required': ['keys'],
6025 'ModelUserInfo': {'additionalProperties': False,
6026 'properties': {'access': {'type': 'string'},
6027 'display-name': {'type': 'string'},
6028 'last-connection': {'format': 'date-time',
6030 'user': {'type': 'string'}},
6031 'required': ['user',
6036 'ModifyModelAccess': {'additionalProperties': False,
6037 'properties': {'access': {'type': 'string'},
6038 'action': {'type': 'string'},
6039 'model-tag': {'type': 'string'},
6040 'user-tag': {'type': 'string'}},
6041 'required': ['user-tag',
6046 'ModifyModelAccessRequest': {'additionalProperties': False,
6047 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
6049 'required': ['changes'],
6051 'Number': {'additionalProperties': False,
6052 'properties': {'Build': {'type': 'integer'},
6053 'Major': {'type': 'integer'},
6054 'Minor': {'type': 'integer'},
6055 'Patch': {'type': 'integer'},
6056 'Tag': {'type': 'string'}},
6057 'required': ['Major',
6063 'RegionDefaults': {'additionalProperties': False,
6064 'properties': {'region-name': {'type': 'string'},
6065 'value': {'additionalProperties': True,
6067 'required': ['region-name', 'value'],
6069 'SetModelDefaults': {'additionalProperties': False,
6070 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
6072 'required': ['config'],
6074 'UnsetModelDefaults': {'additionalProperties': False,
6075 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
6077 'required': ['keys'],
6079 'UserModel': {'additionalProperties': False,
6080 'properties': {'last-connection': {'format': 'date-time',
6082 'model': {'$ref': '#/definitions/Model'}},
6083 'required': ['model', 'last-connection'],
6085 'UserModelList': {'additionalProperties': False,
6086 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
6088 'required': ['user-models'],
6090 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
6091 'Result': {'$ref': '#/definitions/ModelInfo'}},
6093 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6094 'Result': {'$ref': '#/definitions/ErrorResults'}},
6096 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6097 'Result': {'$ref': '#/definitions/MapResults'}},
6099 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6100 'Result': {'$ref': '#/definitions/MapResults'}},
6102 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
6103 'Result': {'$ref': '#/definitions/UserModelList'}},
6105 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
6107 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6108 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
6110 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6111 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
6113 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
6114 'Result': {'$ref': '#/definitions/ErrorResults'}},
6116 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
6117 'Result': {'$ref': '#/definitions/ErrorResults'}},
6119 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
6120 'Result': {'$ref': '#/definitions/ErrorResults'}},
6125 @ReturnMapping(ModelInfo
)
6126 async def CreateModel(self
, cloud_tag
, config
, credential
, name
, owner_tag
, region
):
6129 config : typing.Mapping[str, typing.Any]
6134 Returns -> typing.Union[_ForwardRef('Number'), str, typing.Sequence[~ModelMachineInfo], _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
6136 # map input types to rpc msg
6138 msg
= dict(type='ModelManager',
6139 request
='CreateModel',
6142 _params
['cloud-tag'] = cloud_tag
6143 _params
['config'] = config
6144 _params
['credential'] = credential
6145 _params
['name'] = name
6146 _params
['owner-tag'] = owner_tag
6147 _params
['region'] = region
6148 reply
= await self
.rpc(msg
)
6153 @ReturnMapping(ErrorResults
)
6154 async def DestroyModels(self
, entities
):
6156 entities : typing.Sequence[~Entity]
6157 Returns -> typing.Sequence[~ErrorResult]
6159 # map input types to rpc msg
6161 msg
= dict(type='ModelManager',
6162 request
='DestroyModels',
6165 _params
['entities'] = entities
6166 reply
= await self
.rpc(msg
)
6171 @ReturnMapping(MapResults
)
6172 async def DumpModels(self
, entities
):
6174 entities : typing.Sequence[~Entity]
6175 Returns -> typing.Sequence[~MapResult]
6177 # map input types to rpc msg
6179 msg
= dict(type='ModelManager',
6180 request
='DumpModels',
6183 _params
['entities'] = entities
6184 reply
= await self
.rpc(msg
)
6189 @ReturnMapping(MapResults
)
6190 async def DumpModelsDB(self
, entities
):
6192 entities : typing.Sequence[~Entity]
6193 Returns -> typing.Sequence[~MapResult]
6195 # map input types to rpc msg
6197 msg
= dict(type='ModelManager',
6198 request
='DumpModelsDB',
6201 _params
['entities'] = entities
6202 reply
= await self
.rpc(msg
)
6207 @ReturnMapping(UserModelList
)
6208 async def ListModels(self
, tag
):
6211 Returns -> typing.Sequence[~UserModel]
6213 # map input types to rpc msg
6215 msg
= dict(type='ModelManager',
6216 request
='ListModels',
6219 _params
['tag'] = tag
6220 reply
= await self
.rpc(msg
)
6225 @ReturnMapping(ModelDefaultsResult
)
6226 async def ModelDefaults(self
):
6229 Returns -> typing.Mapping[str, ~ModelDefaults]
6231 # map input types to rpc msg
6233 msg
= dict(type='ModelManager',
6234 request
='ModelDefaults',
6238 reply
= await self
.rpc(msg
)
6243 @ReturnMapping(ModelInfoResults
)
6244 async def ModelInfo(self
, entities
):
6246 entities : typing.Sequence[~Entity]
6247 Returns -> typing.Sequence[~ModelInfoResult]
6249 # map input types to rpc msg
6251 msg
= dict(type='ModelManager',
6252 request
='ModelInfo',
6255 _params
['entities'] = entities
6256 reply
= await self
.rpc(msg
)
6261 @ReturnMapping(ModelStatusResults
)
6262 async def ModelStatus(self
, entities
):
6264 entities : typing.Sequence[~Entity]
6265 Returns -> typing.Sequence[~ModelStatus]
6267 # map input types to rpc msg
6269 msg
= dict(type='ModelManager',
6270 request
='ModelStatus',
6273 _params
['entities'] = entities
6274 reply
= await self
.rpc(msg
)
6279 @ReturnMapping(ErrorResults
)
6280 async def ModifyModelAccess(self
, changes
):
6282 changes : typing.Sequence[~ModifyModelAccess]
6283 Returns -> typing.Sequence[~ErrorResult]
6285 # map input types to rpc msg
6287 msg
= dict(type='ModelManager',
6288 request
='ModifyModelAccess',
6291 _params
['changes'] = changes
6292 reply
= await self
.rpc(msg
)
6297 @ReturnMapping(ErrorResults
)
6298 async def SetModelDefaults(self
, config
):
6300 config : typing.Sequence[~ModelDefaultValues]
6301 Returns -> typing.Sequence[~ErrorResult]
6303 # map input types to rpc msg
6305 msg
= dict(type='ModelManager',
6306 request
='SetModelDefaults',
6309 _params
['config'] = config
6310 reply
= await self
.rpc(msg
)
6315 @ReturnMapping(ErrorResults
)
6316 async def UnsetModelDefaults(self
, keys
):
6318 keys : typing.Sequence[~ModelUnsetKeys]
6319 Returns -> typing.Sequence[~ErrorResult]
6321 # map input types to rpc msg
6323 msg
= dict(type='ModelManager',
6324 request
='UnsetModelDefaults',
6327 _params
['keys'] = keys
6328 reply
= await self
.rpc(msg
)
6333 class ProxyUpdaterFacade(Type
):
6334 name
= 'ProxyUpdater'
6336 schema
= {'definitions': {'Entities': {'additionalProperties': False,
6337 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6339 'required': ['entities'],
6341 'Entity': {'additionalProperties': False,
6342 'properties': {'tag': {'type': 'string'}},
6343 'required': ['tag'],
6345 'Error': {'additionalProperties': False,
6346 'properties': {'code': {'type': 'string'},
6347 'info': {'$ref': '#/definitions/ErrorInfo'},
6348 'message': {'type': 'string'}},
6349 'required': ['message', 'code'],
6351 'ErrorInfo': {'additionalProperties': False,
6352 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6353 'macaroon-path': {'type': 'string'}},
6355 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6356 'NotifyWatchResult': {'additionalProperties': False,
6357 'properties': {'NotifyWatcherId': {'type': 'string'},
6358 'error': {'$ref': '#/definitions/Error'}},
6359 'required': ['NotifyWatcherId'],
6361 'NotifyWatchResults': {'additionalProperties': False,
6362 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6364 'required': ['results'],
6366 'ProxyConfig': {'additionalProperties': False,
6367 'properties': {'ftp': {'type': 'string'},
6368 'http': {'type': 'string'},
6369 'https': {'type': 'string'},
6370 'no-proxy': {'type': 'string'}},
6371 'required': ['http',
6376 'ProxyConfigResult': {'additionalProperties': False,
6377 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
6378 'error': {'$ref': '#/definitions/Error'},
6379 'juju-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
6380 'legacy-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
6381 'snap-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
6382 'snap-store-assertions': {'type': 'string'},
6383 'snap-store-id': {'type': 'string'}},
6384 'required': ['legacy-proxy-settings',
6385 'juju-proxy-settings'],
6387 'ProxyConfigResults': {'additionalProperties': False,
6388 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
6390 'required': ['results'],
6392 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6393 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
6395 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6396 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6401 @ReturnMapping(ProxyConfigResults
)
6402 async def ProxyConfig(self
, entities
):
6404 entities : typing.Sequence[~Entity]
6405 Returns -> typing.Sequence[~ProxyConfigResult]
6407 # map input types to rpc msg
6409 msg
= dict(type='ProxyUpdater',
6410 request
='ProxyConfig',
6413 _params
['entities'] = entities
6414 reply
= await self
.rpc(msg
)
6419 @ReturnMapping(NotifyWatchResults
)
6420 async def WatchForProxyConfigAndAPIHostPortChanges(self
, entities
):
6422 entities : typing.Sequence[~Entity]
6423 Returns -> typing.Sequence[~NotifyWatchResult]
6425 # map input types to rpc msg
6427 msg
= dict(type='ProxyUpdater',
6428 request
='WatchForProxyConfigAndAPIHostPortChanges',
6431 _params
['entities'] = entities
6432 reply
= await self
.rpc(msg
)
6437 class RebootFacade(Type
):
6440 schema
= {'definitions': {'Entities': {'additionalProperties': False,
6441 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6443 'required': ['entities'],
6445 'Entity': {'additionalProperties': False,
6446 'properties': {'tag': {'type': 'string'}},
6447 'required': ['tag'],
6449 'Error': {'additionalProperties': False,
6450 'properties': {'code': {'type': 'string'},
6451 'info': {'$ref': '#/definitions/ErrorInfo'},
6452 'message': {'type': 'string'}},
6453 'required': ['message', 'code'],
6455 'ErrorInfo': {'additionalProperties': False,
6456 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6457 'macaroon-path': {'type': 'string'}},
6459 'ErrorResult': {'additionalProperties': False,
6460 'properties': {'error': {'$ref': '#/definitions/Error'}},
6462 'ErrorResults': {'additionalProperties': False,
6463 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6465 'required': ['results'],
6467 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6468 'NotifyWatchResult': {'additionalProperties': False,
6469 'properties': {'NotifyWatcherId': {'type': 'string'},
6470 'error': {'$ref': '#/definitions/Error'}},
6471 'required': ['NotifyWatcherId'],
6473 'RebootActionResult': {'additionalProperties': False,
6474 'properties': {'error': {'$ref': '#/definitions/Error'},
6475 'result': {'type': 'string'}},
6477 'RebootActionResults': {'additionalProperties': False,
6478 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
6481 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6482 'Result': {'$ref': '#/definitions/ErrorResults'}},
6484 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6485 'Result': {'$ref': '#/definitions/RebootActionResults'}},
6487 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6488 'Result': {'$ref': '#/definitions/ErrorResults'}},
6490 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6495 @ReturnMapping(ErrorResults
)
6496 async def ClearReboot(self
, entities
):
6498 entities : typing.Sequence[~Entity]
6499 Returns -> typing.Sequence[~ErrorResult]
6501 # map input types to rpc msg
6503 msg
= dict(type='Reboot',
6504 request
='ClearReboot',
6507 _params
['entities'] = entities
6508 reply
= await self
.rpc(msg
)
6513 @ReturnMapping(RebootActionResults
)
6514 async def GetRebootAction(self
, entities
):
6516 entities : typing.Sequence[~Entity]
6517 Returns -> typing.Sequence[~RebootActionResult]
6519 # map input types to rpc msg
6521 msg
= dict(type='Reboot',
6522 request
='GetRebootAction',
6525 _params
['entities'] = entities
6526 reply
= await self
.rpc(msg
)
6531 @ReturnMapping(ErrorResults
)
6532 async def RequestReboot(self
, entities
):
6534 entities : typing.Sequence[~Entity]
6535 Returns -> typing.Sequence[~ErrorResult]
6537 # map input types to rpc msg
6539 msg
= dict(type='Reboot',
6540 request
='RequestReboot',
6543 _params
['entities'] = entities
6544 reply
= await self
.rpc(msg
)
6549 @ReturnMapping(NotifyWatchResult
)
6550 async def WatchForRebootEvent(self
):
6553 Returns -> typing.Union[str, _ForwardRef('Error')]
6555 # map input types to rpc msg
6557 msg
= dict(type='Reboot',
6558 request
='WatchForRebootEvent',
6562 reply
= await self
.rpc(msg
)
6567 class ResumerFacade(Type
):
6570 schema
= {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
6573 @ReturnMapping(None)
6574 async def ResumeTransactions(self
):
6579 # map input types to rpc msg
6581 msg
= dict(type='Resumer',
6582 request
='ResumeTransactions',
6586 reply
= await self
.rpc(msg
)
6591 class SSHClientFacade(Type
):
6594 schema
= {'definitions': {'Entities': {'additionalProperties': False,
6595 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6597 'required': ['entities'],
6599 'Entity': {'additionalProperties': False,
6600 'properties': {'tag': {'type': 'string'}},
6601 'required': ['tag'],
6603 'Error': {'additionalProperties': False,
6604 'properties': {'code': {'type': 'string'},
6605 'info': {'$ref': '#/definitions/ErrorInfo'},
6606 'message': {'type': 'string'}},
6607 'required': ['message', 'code'],
6609 'ErrorInfo': {'additionalProperties': False,
6610 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6611 'macaroon-path': {'type': 'string'}},
6613 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6614 'SSHAddressResult': {'additionalProperties': False,
6615 'properties': {'address': {'type': 'string'},
6616 'error': {'$ref': '#/definitions/Error'}},
6618 'SSHAddressResults': {'additionalProperties': False,
6619 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
6621 'required': ['results'],
6623 'SSHAddressesResult': {'additionalProperties': False,
6624 'properties': {'addresses': {'items': {'type': 'string'},
6626 'error': {'$ref': '#/definitions/Error'}},
6627 'required': ['addresses'],
6629 'SSHAddressesResults': {'additionalProperties': False,
6630 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressesResult'},
6632 'required': ['results'],
6634 'SSHProxyResult': {'additionalProperties': False,
6635 'properties': {'use-proxy': {'type': 'boolean'}},
6636 'required': ['use-proxy'],
6638 'SSHPublicKeysResult': {'additionalProperties': False,
6639 'properties': {'error': {'$ref': '#/definitions/Error'},
6640 'public-keys': {'items': {'type': 'string'},
6643 'SSHPublicKeysResults': {'additionalProperties': False,
6644 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
6646 'required': ['results'],
6648 'properties': {'AllAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6649 'Result': {'$ref': '#/definitions/SSHAddressesResults'}},
6651 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6652 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
6654 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
6656 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6657 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
6659 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6660 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
6665 @ReturnMapping(SSHAddressesResults
)
6666 async def AllAddresses(self
, entities
):
6668 entities : typing.Sequence[~Entity]
6669 Returns -> typing.Sequence[~SSHAddressesResult]
6671 # map input types to rpc msg
6673 msg
= dict(type='SSHClient',
6674 request
='AllAddresses',
6677 _params
['entities'] = entities
6678 reply
= await self
.rpc(msg
)
6683 @ReturnMapping(SSHAddressResults
)
6684 async def PrivateAddress(self
, entities
):
6686 entities : typing.Sequence[~Entity]
6687 Returns -> typing.Sequence[~SSHAddressResult]
6689 # map input types to rpc msg
6691 msg
= dict(type='SSHClient',
6692 request
='PrivateAddress',
6695 _params
['entities'] = entities
6696 reply
= await self
.rpc(msg
)
6701 @ReturnMapping(SSHProxyResult
)
6702 async def Proxy(self
):
6707 # map input types to rpc msg
6709 msg
= dict(type='SSHClient',
6714 reply
= await self
.rpc(msg
)
6719 @ReturnMapping(SSHAddressResults
)
6720 async def PublicAddress(self
, entities
):
6722 entities : typing.Sequence[~Entity]
6723 Returns -> typing.Sequence[~SSHAddressResult]
6725 # map input types to rpc msg
6727 msg
= dict(type='SSHClient',
6728 request
='PublicAddress',
6731 _params
['entities'] = entities
6732 reply
= await self
.rpc(msg
)
6737 @ReturnMapping(SSHPublicKeysResults
)
6738 async def PublicKeys(self
, entities
):
6740 entities : typing.Sequence[~Entity]
6741 Returns -> typing.Sequence[~SSHPublicKeysResult]
6743 # map input types to rpc msg
6745 msg
= dict(type='SSHClient',
6746 request
='PublicKeys',
6749 _params
['entities'] = entities
6750 reply
= await self
.rpc(msg
)
6755 class SingularFacade(Type
):
6758 schema
= {'definitions': {'Entities': {'additionalProperties': False,
6759 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6761 'required': ['entities'],
6763 'Entity': {'additionalProperties': False,
6764 'properties': {'tag': {'type': 'string'}},
6765 'required': ['tag'],
6767 'Error': {'additionalProperties': False,
6768 'properties': {'code': {'type': 'string'},
6769 'info': {'$ref': '#/definitions/ErrorInfo'},
6770 'message': {'type': 'string'}},
6771 'required': ['message', 'code'],
6773 'ErrorInfo': {'additionalProperties': False,
6774 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6775 'macaroon-path': {'type': 'string'}},
6777 'ErrorResult': {'additionalProperties': False,
6778 'properties': {'error': {'$ref': '#/definitions/Error'}},
6780 'ErrorResults': {'additionalProperties': False,
6781 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6783 'required': ['results'],
6785 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6786 'SingularClaim': {'additionalProperties': False,
6787 'properties': {'claimant-tag': {'type': 'string'},
6788 'duration': {'type': 'integer'},
6789 'entity-tag': {'type': 'string'}},
6790 'required': ['entity-tag',
6794 'SingularClaims': {'additionalProperties': False,
6795 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
6797 'required': ['claims'],
6799 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
6800 'Result': {'$ref': '#/definitions/ErrorResults'}},
6802 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6803 'Result': {'$ref': '#/definitions/ErrorResults'}},
6808 @ReturnMapping(ErrorResults
)
6809 async def Claim(self
, claims
):
6811 claims : typing.Sequence[~SingularClaim]
6812 Returns -> typing.Sequence[~ErrorResult]
6814 # map input types to rpc msg
6816 msg
= dict(type='Singular',
6820 _params
['claims'] = claims
6821 reply
= await self
.rpc(msg
)
6826 @ReturnMapping(ErrorResults
)
6827 async def Wait(self
, entities
):
6829 entities : typing.Sequence[~Entity]
6830 Returns -> typing.Sequence[~ErrorResult]
6832 # map input types to rpc msg
6834 msg
= dict(type='Singular',
6838 _params
['entities'] = entities
6839 reply
= await self
.rpc(msg
)
6844 class SpacesFacade(Type
):
6847 schema
= {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
6848 'properties': {'provider-id': {'type': 'string'},
6849 'public': {'type': 'boolean'},
6850 'space-tag': {'type': 'string'},
6851 'subnet-tags': {'items': {'type': 'string'},
6853 'required': ['subnet-tags',
6857 'CreateSpacesParams': {'additionalProperties': False,
6858 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
6860 'required': ['spaces'],
6862 'Error': {'additionalProperties': False,
6863 'properties': {'code': {'type': 'string'},
6864 'info': {'$ref': '#/definitions/ErrorInfo'},
6865 'message': {'type': 'string'}},
6866 'required': ['message', 'code'],
6868 'ErrorInfo': {'additionalProperties': False,
6869 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6870 'macaroon-path': {'type': 'string'}},
6872 'ErrorResult': {'additionalProperties': False,
6873 'properties': {'error': {'$ref': '#/definitions/Error'}},
6875 'ErrorResults': {'additionalProperties': False,
6876 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6878 'required': ['results'],
6880 'ListSpacesResults': {'additionalProperties': False,
6881 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
6883 'required': ['results'],
6885 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6886 'Space': {'additionalProperties': False,
6887 'properties': {'error': {'$ref': '#/definitions/Error'},
6888 'name': {'type': 'string'},
6889 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
6891 'required': ['name', 'subnets'],
6893 'Subnet': {'additionalProperties': False,
6894 'properties': {'cidr': {'type': 'string'},
6895 'life': {'type': 'string'},
6896 'provider-id': {'type': 'string'},
6897 'provider-network-id': {'type': 'string'},
6898 'provider-space-id': {'type': 'string'},
6899 'space-tag': {'type': 'string'},
6900 'status': {'type': 'string'},
6901 'vlan-tag': {'type': 'integer'},
6902 'zones': {'items': {'type': 'string'},
6904 'required': ['cidr',
6910 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
6911 'Result': {'$ref': '#/definitions/ErrorResults'}},
6913 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
6918 @ReturnMapping(ErrorResults
)
6919 async def CreateSpaces(self
, spaces
):
6921 spaces : typing.Sequence[~CreateSpaceParams]
6922 Returns -> typing.Sequence[~ErrorResult]
6924 # map input types to rpc msg
6926 msg
= dict(type='Spaces',
6927 request
='CreateSpaces',
6930 _params
['spaces'] = spaces
6931 reply
= await self
.rpc(msg
)
6936 @ReturnMapping(ListSpacesResults
)
6937 async def ListSpaces(self
):
6940 Returns -> typing.Sequence[~Space]
6942 # map input types to rpc msg
6944 msg
= dict(type='Spaces',
6945 request
='ListSpaces',
6949 reply
= await self
.rpc(msg
)
6954 class StatusHistoryFacade(Type
):
6955 name
= 'StatusHistory'
6957 schema
= {'definitions': {'Error': {'additionalProperties': False,
6958 'properties': {'code': {'type': 'string'},
6959 'info': {'$ref': '#/definitions/ErrorInfo'},
6960 'message': {'type': 'string'}},
6961 'required': ['message', 'code'],
6963 'ErrorInfo': {'additionalProperties': False,
6964 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6965 'macaroon-path': {'type': 'string'}},
6967 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6968 'ModelConfigResult': {'additionalProperties': False,
6969 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6972 'required': ['config'],
6974 'NotifyWatchResult': {'additionalProperties': False,
6975 'properties': {'NotifyWatcherId': {'type': 'string'},
6976 'error': {'$ref': '#/definitions/Error'}},
6977 'required': ['NotifyWatcherId'],
6979 'StatusHistoryPruneArgs': {'additionalProperties': False,
6980 'properties': {'max-history-mb': {'type': 'integer'},
6981 'max-history-time': {'type': 'integer'}},
6982 'required': ['max-history-time',
6985 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6987 'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
6989 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6994 @ReturnMapping(ModelConfigResult
)
6995 async def ModelConfig(self
):
6998 Returns -> typing.Mapping[str, typing.Any]
7000 # map input types to rpc msg
7002 msg
= dict(type='StatusHistory',
7003 request
='ModelConfig',
7007 reply
= await self
.rpc(msg
)
7012 @ReturnMapping(None)
7013 async def Prune(self
, max_history_mb
, max_history_time
):
7015 max_history_mb : int
7016 max_history_time : int
7019 # map input types to rpc msg
7021 msg
= dict(type='StatusHistory',
7025 _params
['max-history-mb'] = max_history_mb
7026 _params
['max-history-time'] = max_history_time
7027 reply
= await self
.rpc(msg
)
7032 @ReturnMapping(NotifyWatchResult
)
7033 async def WatchForModelConfigChanges(self
):
7036 Returns -> typing.Union[str, _ForwardRef('Error')]
7038 # map input types to rpc msg
7040 msg
= dict(type='StatusHistory',
7041 request
='WatchForModelConfigChanges',
7045 reply
= await self
.rpc(msg
)
7050 class SubnetsFacade(Type
):
7053 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
7054 'properties': {'provider-network-id': {'type': 'string'},
7055 'space-tag': {'type': 'string'},
7056 'subnet-provider-id': {'type': 'string'},
7057 'subnet-tag': {'type': 'string'},
7058 'vlan-tag': {'type': 'integer'},
7059 'zones': {'items': {'type': 'string'},
7061 'required': ['space-tag'],
7063 'AddSubnetsParams': {'additionalProperties': False,
7064 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
7066 'required': ['subnets'],
7068 'Error': {'additionalProperties': False,
7069 'properties': {'code': {'type': 'string'},
7070 'info': {'$ref': '#/definitions/ErrorInfo'},
7071 'message': {'type': 'string'}},
7072 'required': ['message', 'code'],
7074 'ErrorInfo': {'additionalProperties': False,
7075 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7076 'macaroon-path': {'type': 'string'}},
7078 'ErrorResult': {'additionalProperties': False,
7079 'properties': {'error': {'$ref': '#/definitions/Error'}},
7081 'ErrorResults': {'additionalProperties': False,
7082 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7084 'required': ['results'],
7086 'ListSubnetsResults': {'additionalProperties': False,
7087 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
7089 'required': ['results'],
7091 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7092 'SpaceResult': {'additionalProperties': False,
7093 'properties': {'error': {'$ref': '#/definitions/Error'},
7094 'tag': {'type': 'string'}},
7095 'required': ['tag'],
7097 'SpaceResults': {'additionalProperties': False,
7098 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'},
7100 'required': ['results'],
7102 'Subnet': {'additionalProperties': False,
7103 'properties': {'cidr': {'type': 'string'},
7104 'life': {'type': 'string'},
7105 'provider-id': {'type': 'string'},
7106 'provider-network-id': {'type': 'string'},
7107 'provider-space-id': {'type': 'string'},
7108 'space-tag': {'type': 'string'},
7109 'status': {'type': 'string'},
7110 'vlan-tag': {'type': 'integer'},
7111 'zones': {'items': {'type': 'string'},
7113 'required': ['cidr',
7119 'SubnetsFilters': {'additionalProperties': False,
7120 'properties': {'space-tag': {'type': 'string'},
7121 'zone': {'type': 'string'}},
7123 'ZoneResult': {'additionalProperties': False,
7124 'properties': {'available': {'type': 'boolean'},
7125 'error': {'$ref': '#/definitions/Error'},
7126 'name': {'type': 'string'}},
7127 'required': ['name', 'available'],
7129 'ZoneResults': {'additionalProperties': False,
7130 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'},
7132 'required': ['results'],
7134 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
7135 'Result': {'$ref': '#/definitions/ErrorResults'}},
7137 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
7139 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
7141 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
7142 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
7147 @ReturnMapping(ErrorResults
)
7148 async def AddSubnets(self
, subnets
):
7150 subnets : typing.Sequence[~AddSubnetParams]
7151 Returns -> typing.Sequence[~ErrorResult]
7153 # map input types to rpc msg
7155 msg
= dict(type='Subnets',
7156 request
='AddSubnets',
7159 _params
['subnets'] = subnets
7160 reply
= await self
.rpc(msg
)
7165 @ReturnMapping(SpaceResults
)
7166 async def AllSpaces(self
):
7169 Returns -> typing.Sequence[~SpaceResult]
7171 # map input types to rpc msg
7173 msg
= dict(type='Subnets',
7174 request
='AllSpaces',
7178 reply
= await self
.rpc(msg
)
7183 @ReturnMapping(ZoneResults
)
7184 async def AllZones(self
):
7187 Returns -> typing.Sequence[~ZoneResult]
7189 # map input types to rpc msg
7191 msg
= dict(type='Subnets',
7196 reply
= await self
.rpc(msg
)
7201 @ReturnMapping(ListSubnetsResults
)
7202 async def ListSubnets(self
, space_tag
, zone
):
7206 Returns -> typing.Sequence[~Subnet]
7208 # map input types to rpc msg
7210 msg
= dict(type='Subnets',
7211 request
='ListSubnets',
7214 _params
['space-tag'] = space_tag
7215 _params
['zone'] = zone
7216 reply
= await self
.rpc(msg
)
7221 class UserManagerFacade(Type
):
7222 name
= 'UserManager'
7224 schema
= {'definitions': {'AddUser': {'additionalProperties': False,
7225 'properties': {'display-name': {'type': 'string'},
7226 'password': {'type': 'string'},
7227 'username': {'type': 'string'}},
7228 'required': ['username', 'display-name'],
7230 'AddUserResult': {'additionalProperties': False,
7231 'properties': {'error': {'$ref': '#/definitions/Error'},
7232 'secret-key': {'items': {'type': 'integer'},
7234 'tag': {'type': 'string'}},
7236 'AddUserResults': {'additionalProperties': False,
7237 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
7239 'required': ['results'],
7241 'AddUsers': {'additionalProperties': False,
7242 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
7244 'required': ['users'],
7246 'Entities': {'additionalProperties': False,
7247 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7249 'required': ['entities'],
7251 'Entity': {'additionalProperties': False,
7252 'properties': {'tag': {'type': 'string'}},
7253 'required': ['tag'],
7255 'EntityPassword': {'additionalProperties': False,
7256 'properties': {'password': {'type': 'string'},
7257 'tag': {'type': 'string'}},
7258 'required': ['tag', 'password'],
7260 'EntityPasswords': {'additionalProperties': False,
7261 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
7263 'required': ['changes'],
7265 'Error': {'additionalProperties': False,
7266 'properties': {'code': {'type': 'string'},
7267 'info': {'$ref': '#/definitions/ErrorInfo'},
7268 'message': {'type': 'string'}},
7269 'required': ['message', 'code'],
7271 'ErrorInfo': {'additionalProperties': False,
7272 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7273 'macaroon-path': {'type': 'string'}},
7275 'ErrorResult': {'additionalProperties': False,
7276 'properties': {'error': {'$ref': '#/definitions/Error'}},
7278 'ErrorResults': {'additionalProperties': False,
7279 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7281 'required': ['results'],
7283 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7284 'UserInfo': {'additionalProperties': False,
7285 'properties': {'access': {'type': 'string'},
7286 'created-by': {'type': 'string'},
7287 'date-created': {'format': 'date-time',
7289 'disabled': {'type': 'boolean'},
7290 'display-name': {'type': 'string'},
7291 'last-connection': {'format': 'date-time',
7293 'username': {'type': 'string'}},
7294 'required': ['username',
7301 'UserInfoRequest': {'additionalProperties': False,
7302 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7304 'include-disabled': {'type': 'boolean'}},
7305 'required': ['entities',
7306 'include-disabled'],
7308 'UserInfoResult': {'additionalProperties': False,
7309 'properties': {'error': {'$ref': '#/definitions/Error'},
7310 'result': {'$ref': '#/definitions/UserInfo'}},
7312 'UserInfoResults': {'additionalProperties': False,
7313 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
7315 'required': ['results'],
7317 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
7318 'Result': {'$ref': '#/definitions/AddUserResults'}},
7320 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7321 'Result': {'$ref': '#/definitions/ErrorResults'}},
7323 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7324 'Result': {'$ref': '#/definitions/ErrorResults'}},
7326 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7327 'Result': {'$ref': '#/definitions/ErrorResults'}},
7329 'ResetPassword': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7330 'Result': {'$ref': '#/definitions/AddUserResults'}},
7332 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
7333 'Result': {'$ref': '#/definitions/ErrorResults'}},
7335 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
7336 'Result': {'$ref': '#/definitions/UserInfoResults'}},
7341 @ReturnMapping(AddUserResults
)
7342 async def AddUser(self
, users
):
7344 users : typing.Sequence[~AddUser]
7345 Returns -> typing.Sequence[~AddUserResult]
7347 # map input types to rpc msg
7349 msg
= dict(type='UserManager',
7353 _params
['users'] = users
7354 reply
= await self
.rpc(msg
)
7359 @ReturnMapping(ErrorResults
)
7360 async def DisableUser(self
, entities
):
7362 entities : typing.Sequence[~Entity]
7363 Returns -> typing.Sequence[~ErrorResult]
7365 # map input types to rpc msg
7367 msg
= dict(type='UserManager',
7368 request
='DisableUser',
7371 _params
['entities'] = entities
7372 reply
= await self
.rpc(msg
)
7377 @ReturnMapping(ErrorResults
)
7378 async def EnableUser(self
, entities
):
7380 entities : typing.Sequence[~Entity]
7381 Returns -> typing.Sequence[~ErrorResult]
7383 # map input types to rpc msg
7385 msg
= dict(type='UserManager',
7386 request
='EnableUser',
7389 _params
['entities'] = entities
7390 reply
= await self
.rpc(msg
)
7395 @ReturnMapping(ErrorResults
)
7396 async def RemoveUser(self
, entities
):
7398 entities : typing.Sequence[~Entity]
7399 Returns -> typing.Sequence[~ErrorResult]
7401 # map input types to rpc msg
7403 msg
= dict(type='UserManager',
7404 request
='RemoveUser',
7407 _params
['entities'] = entities
7408 reply
= await self
.rpc(msg
)
7413 @ReturnMapping(AddUserResults
)
7414 async def ResetPassword(self
, entities
):
7416 entities : typing.Sequence[~Entity]
7417 Returns -> typing.Sequence[~AddUserResult]
7419 # map input types to rpc msg
7421 msg
= dict(type='UserManager',
7422 request
='ResetPassword',
7425 _params
['entities'] = entities
7426 reply
= await self
.rpc(msg
)
7431 @ReturnMapping(ErrorResults
)
7432 async def SetPassword(self
, changes
):
7434 changes : typing.Sequence[~EntityPassword]
7435 Returns -> typing.Sequence[~ErrorResult]
7437 # map input types to rpc msg
7439 msg
= dict(type='UserManager',
7440 request
='SetPassword',
7443 _params
['changes'] = changes
7444 reply
= await self
.rpc(msg
)
7449 @ReturnMapping(UserInfoResults
)
7450 async def UserInfo(self
, entities
, include_disabled
):
7452 entities : typing.Sequence[~Entity]
7453 include_disabled : bool
7454 Returns -> typing.Sequence[~UserInfoResult]
7456 # map input types to rpc msg
7458 msg
= dict(type='UserManager',
7462 _params
['entities'] = entities
7463 _params
['include-disabled'] = include_disabled
7464 reply
= await self
.rpc(msg
)
7469 class VolumeAttachmentsWatcherFacade(Type
):
7470 name
= 'VolumeAttachmentsWatcher'
7472 schema
= {'definitions': {'Error': {'additionalProperties': False,
7473 'properties': {'code': {'type': 'string'},
7474 'info': {'$ref': '#/definitions/ErrorInfo'},
7475 'message': {'type': 'string'}},
7476 'required': ['message', 'code'],
7478 'ErrorInfo': {'additionalProperties': False,
7479 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7480 'macaroon-path': {'type': 'string'}},
7482 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7483 'MachineStorageId': {'additionalProperties': False,
7484 'properties': {'attachment-tag': {'type': 'string'},
7485 'machine-tag': {'type': 'string'}},
7486 'required': ['machine-tag',
7489 'MachineStorageIdsWatchResult': {'additionalProperties': False,
7490 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
7492 'error': {'$ref': '#/definitions/Error'},
7493 'watcher-id': {'type': 'string'}},
7494 'required': ['watcher-id',
7497 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
7499 'Stop': {'type': 'object'}},
7503 @ReturnMapping(MachineStorageIdsWatchResult
)
7504 async def Next(self
):
7507 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error'), str]
7509 # map input types to rpc msg
7511 msg
= dict(type='VolumeAttachmentsWatcher',
7516 reply
= await self
.rpc(msg
)
7521 @ReturnMapping(None)
7522 async def Stop(self
):
7527 # map input types to rpc msg
7529 msg
= dict(type='VolumeAttachmentsWatcher',
7534 reply
= await self
.rpc(msg
)