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 ApplicationFacade(Type
):
11 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
12 'properties': {'application': {'type': 'string'},
13 'attach-storage': {'items': {'type': 'string'},
15 'num-units': {'type': 'integer'},
16 'placement': {'items': {'$ref': '#/definitions/Placement'},
18 'required': ['application',
22 'AddApplicationUnitsResults': {'additionalProperties': False,
23 'properties': {'units': {'items': {'type': 'string'},
25 'required': ['units'],
27 'AddRelation': {'additionalProperties': False,
28 'properties': {'endpoints': {'items': {'type': 'string'},
30 'required': ['endpoints'],
32 'AddRelationResults': {'additionalProperties': False,
33 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
35 'required': ['endpoints'],
37 'ApplicationCharmRelations': {'additionalProperties': False,
38 'properties': {'application': {'type': 'string'}},
39 'required': ['application'],
41 'ApplicationCharmRelationsResults': {'additionalProperties': False,
42 'properties': {'charm-relations': {'items': {'type': 'string'},
44 'required': ['charm-relations'],
46 'ApplicationDeploy': {'additionalProperties': False,
47 'properties': {'application': {'type': 'string'},
48 'attach-storage': {'items': {'type': 'string'},
50 'channel': {'type': 'string'},
51 'charm-url': {'type': 'string'},
52 'config': {'patternProperties': {'.*': {'type': 'string'}},
54 'config-yaml': {'type': 'string'},
55 'constraints': {'$ref': '#/definitions/Value'},
56 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
58 'num-units': {'type': 'integer'},
59 'placement': {'items': {'$ref': '#/definitions/Placement'},
61 'resources': {'patternProperties': {'.*': {'type': 'string'}},
63 'series': {'type': 'string'},
64 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
66 'required': ['application',
74 'ApplicationDestroy': {'additionalProperties': False,
75 'properties': {'application': {'type': 'string'}},
76 'required': ['application'],
78 'ApplicationExpose': {'additionalProperties': False,
79 'properties': {'application': {'type': 'string'}},
80 'required': ['application'],
82 'ApplicationGet': {'additionalProperties': False,
83 'properties': {'application': {'type': 'string'}},
84 'required': ['application'],
86 'ApplicationGetResults': {'additionalProperties': False,
87 'properties': {'application': {'type': 'string'},
88 'charm': {'type': 'string'},
89 'config': {'patternProperties': {'.*': {'additionalProperties': True,
92 'constraints': {'$ref': '#/definitions/Value'},
93 'series': {'type': 'string'}},
94 'required': ['application',
100 'ApplicationMetricCredential': {'additionalProperties': False,
101 'properties': {'application': {'type': 'string'},
102 'metrics-credentials': {'items': {'type': 'integer'},
104 'required': ['application',
105 'metrics-credentials'],
107 'ApplicationMetricCredentials': {'additionalProperties': False,
108 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
110 'required': ['creds'],
112 'ApplicationOffer': {'additionalProperties': False,
113 'properties': {'access': {'type': 'string'},
114 'application-description': {'type': 'string'},
115 'bindings': {'patternProperties': {'.*': {'type': 'string'}},
117 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
119 'offer-name': {'type': 'string'},
120 'offer-url': {'type': 'string'},
121 'source-model-tag': {'type': 'string'},
122 'spaces': {'items': {'$ref': '#/definitions/RemoteSpace'},
124 'required': ['source-model-tag',
127 'application-description',
133 'ApplicationSet': {'additionalProperties': False,
134 'properties': {'application': {'type': 'string'},
135 'options': {'patternProperties': {'.*': {'type': 'string'}},
137 'required': ['application', 'options'],
139 'ApplicationSetCharm': {'additionalProperties': False,
140 'properties': {'application': {'type': 'string'},
141 'channel': {'type': 'string'},
142 'charm-url': {'type': 'string'},
143 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
145 'config-settings-yaml': {'type': 'string'},
146 'force-series': {'type': 'boolean'},
147 'force-units': {'type': 'boolean'},
148 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
150 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
152 'required': ['application',
158 'ApplicationUnexpose': {'additionalProperties': False,
159 'properties': {'application': {'type': 'string'}},
160 'required': ['application'],
162 'ApplicationUnset': {'additionalProperties': False,
163 'properties': {'application': {'type': 'string'},
164 'options': {'items': {'type': 'string'},
166 'required': ['application', 'options'],
168 'ApplicationUpdate': {'additionalProperties': False,
169 'properties': {'application': {'type': 'string'},
170 'charm-url': {'type': 'string'},
171 'constraints': {'$ref': '#/definitions/Value'},
172 'force-charm-url': {'type': 'boolean'},
173 'force-series': {'type': 'boolean'},
174 'min-units': {'type': 'integer'},
175 'settings': {'patternProperties': {'.*': {'type': 'string'}},
177 'settings-yaml': {'type': 'string'}},
178 'required': ['application',
184 'ApplicationsDeploy': {'additionalProperties': False,
185 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
187 'required': ['applications'],
189 'CharmRelation': {'additionalProperties': False,
190 'properties': {'interface': {'type': 'string'},
191 'limit': {'type': 'integer'},
192 'name': {'type': 'string'},
193 'optional': {'type': 'boolean'},
194 'role': {'type': 'string'},
195 'scope': {'type': 'string'}},
203 'Constraints': {'additionalProperties': False,
204 'properties': {'Count': {'type': 'integer'},
205 'Pool': {'type': 'string'},
206 'Size': {'type': 'integer'}},
207 'required': ['Pool', 'Size', 'Count'],
209 'ConsumeApplicationArg': {'additionalProperties': False,
210 'properties': {'ApplicationOffer': {'$ref': '#/definitions/ApplicationOffer'},
211 'application-alias': {'type': 'string'},
212 'macaroon': {'$ref': '#/definitions/Macaroon'}},
213 'required': ['ApplicationOffer'],
215 'ConsumeApplicationArgs': {'additionalProperties': False,
216 'properties': {'args': {'items': {'$ref': '#/definitions/ConsumeApplicationArg'},
219 'DestroyApplicationInfo': {'additionalProperties': False,
220 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
222 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
224 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
227 'DestroyApplicationResult': {'additionalProperties': False,
228 'properties': {'error': {'$ref': '#/definitions/Error'},
229 'info': {'$ref': '#/definitions/DestroyApplicationInfo'}},
231 'DestroyApplicationResults': {'additionalProperties': False,
232 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyApplicationResult'},
235 'DestroyApplicationUnits': {'additionalProperties': False,
236 'properties': {'unit-names': {'items': {'type': 'string'},
238 'required': ['unit-names'],
240 'DestroyRelation': {'additionalProperties': False,
241 'properties': {'endpoints': {'items': {'type': 'string'},
243 'required': ['endpoints'],
245 'DestroyUnitInfo': {'additionalProperties': False,
246 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
248 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
251 'DestroyUnitResult': {'additionalProperties': False,
252 'properties': {'error': {'$ref': '#/definitions/Error'},
253 'info': {'$ref': '#/definitions/DestroyUnitInfo'}},
255 'DestroyUnitResults': {'additionalProperties': False,
256 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyUnitResult'},
259 'Entities': {'additionalProperties': False,
260 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
262 'required': ['entities'],
264 'Entity': {'additionalProperties': False,
265 'properties': {'tag': {'type': 'string'}},
268 'Error': {'additionalProperties': False,
269 'properties': {'code': {'type': 'string'},
270 'info': {'$ref': '#/definitions/ErrorInfo'},
271 'message': {'type': 'string'}},
272 'required': ['message', 'code'],
274 'ErrorInfo': {'additionalProperties': False,
275 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
276 'macaroon-path': {'type': 'string'}},
278 'ErrorResult': {'additionalProperties': False,
279 'properties': {'error': {'$ref': '#/definitions/Error'}},
281 'ErrorResults': {'additionalProperties': False,
282 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
284 'required': ['results'],
286 'GetApplicationConstraints': {'additionalProperties': False,
287 'properties': {'application': {'type': 'string'}},
288 'required': ['application'],
290 'GetConstraintsResults': {'additionalProperties': False,
291 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
292 'required': ['constraints'],
294 'Macaroon': {'additionalProperties': False, 'type': 'object'},
295 'Placement': {'additionalProperties': False,
296 'properties': {'directive': {'type': 'string'},
297 'scope': {'type': 'string'}},
298 'required': ['scope', 'directive'],
300 'RemoteEndpoint': {'additionalProperties': False,
301 'properties': {'interface': {'type': 'string'},
302 'limit': {'type': 'integer'},
303 'name': {'type': 'string'},
304 'role': {'type': 'string'},
305 'scope': {'type': 'string'}},
312 'RemoteSpace': {'additionalProperties': False,
313 'properties': {'cloud-type': {'type': 'string'},
314 'name': {'type': 'string'},
315 'provider-attributes': {'patternProperties': {'.*': {'additionalProperties': True,
318 'provider-id': {'type': 'string'},
319 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
321 'required': ['cloud-type',
324 'provider-attributes',
327 'SetConstraints': {'additionalProperties': False,
328 'properties': {'application': {'type': 'string'},
329 'constraints': {'$ref': '#/definitions/Value'}},
330 'required': ['application', 'constraints'],
332 'StorageConstraints': {'additionalProperties': False,
333 'properties': {'count': {'type': 'integer'},
334 'pool': {'type': 'string'},
335 'size': {'type': 'integer'}},
337 'StringResult': {'additionalProperties': False,
338 'properties': {'error': {'$ref': '#/definitions/Error'},
339 'result': {'type': 'string'}},
340 'required': ['result'],
342 'Subnet': {'additionalProperties': False,
343 'properties': {'cidr': {'type': 'string'},
344 'life': {'type': 'string'},
345 'provider-id': {'type': 'string'},
346 'provider-network-id': {'type': 'string'},
347 'provider-space-id': {'type': 'string'},
348 'space-tag': {'type': 'string'},
349 'status': {'type': 'string'},
350 'vlan-tag': {'type': 'integer'},
351 'zones': {'items': {'type': 'string'},
359 'Value': {'additionalProperties': False,
360 'properties': {'arch': {'type': 'string'},
361 'container': {'type': 'string'},
362 'cores': {'type': 'integer'},
363 'cpu-power': {'type': 'integer'},
364 'instance-type': {'type': 'string'},
365 'mem': {'type': 'integer'},
366 'root-disk': {'type': 'integer'},
367 'spaces': {'items': {'type': 'string'},
369 'tags': {'items': {'type': 'string'},
371 'virt-type': {'type': 'string'}},
373 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
374 'Result': {'$ref': '#/definitions/AddRelationResults'}},
376 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
377 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
379 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
380 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
382 'Consume': {'properties': {'Params': {'$ref': '#/definitions/ConsumeApplicationArgs'},
383 'Result': {'$ref': '#/definitions/ErrorResults'}},
385 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
386 'Result': {'$ref': '#/definitions/ErrorResults'}},
388 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
390 'DestroyApplication': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
391 'Result': {'$ref': '#/definitions/DestroyApplicationResults'}},
393 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
395 'DestroyUnit': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
396 'Result': {'$ref': '#/definitions/DestroyUnitResults'}},
398 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
400 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
402 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
403 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
405 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
406 'Result': {'$ref': '#/definitions/StringResult'}},
408 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
409 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
411 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
413 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
415 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
417 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
418 'Result': {'$ref': '#/definitions/ErrorResults'}},
420 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
422 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
424 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
429 @ReturnMapping(AddRelationResults
)
430 async def AddRelation(self
, endpoints
):
432 endpoints : typing.Sequence[str]
433 Returns -> typing.Mapping[str, ~CharmRelation]
435 # map input types to rpc msg
437 msg
= dict(type='Application',
438 request
='AddRelation',
441 _params
['endpoints'] = endpoints
442 reply
= await self
.rpc(msg
)
447 @ReturnMapping(AddApplicationUnitsResults
)
448 async def AddUnits(self
, application
, num_units
, placement
):
452 placement : typing.Sequence[~Placement]
453 Returns -> typing.Sequence[str]
455 # map input types to rpc msg
457 msg
= dict(type='Application',
461 _params
['application'] = application
462 _params
['num-units'] = num_units
463 _params
['placement'] = placement
464 reply
= await self
.rpc(msg
)
469 @ReturnMapping(ApplicationCharmRelationsResults
)
470 async def CharmRelations(self
, application
):
473 Returns -> typing.Sequence[str]
475 # map input types to rpc msg
477 msg
= dict(type='Application',
478 request
='CharmRelations',
481 _params
['application'] = application
482 reply
= await self
.rpc(msg
)
487 @ReturnMapping(ErrorResults
)
488 async def Consume(self
, args
):
490 args : typing.Sequence[~ConsumeApplicationArg]
491 Returns -> typing.Sequence[~ErrorResult]
493 # map input types to rpc msg
495 msg
= dict(type='Application',
499 _params
['args'] = args
500 reply
= await self
.rpc(msg
)
505 @ReturnMapping(ErrorResults
)
506 async def Deploy(self
, applications
):
508 applications : typing.Sequence[~ApplicationDeploy]
509 Returns -> typing.Sequence[~ErrorResult]
511 # map input types to rpc msg
513 msg
= dict(type='Application',
517 _params
['applications'] = applications
518 reply
= await self
.rpc(msg
)
524 async def Destroy(self
, application
):
529 # map input types to rpc msg
531 msg
= dict(type='Application',
535 _params
['application'] = application
536 reply
= await self
.rpc(msg
)
541 @ReturnMapping(DestroyApplicationResults
)
542 async def DestroyApplication(self
, entities
):
544 entities : typing.Sequence[~Entity]
545 Returns -> typing.Sequence[~DestroyApplicationResult]
547 # map input types to rpc msg
549 msg
= dict(type='Application',
550 request
='DestroyApplication',
553 _params
['entities'] = entities
554 reply
= await self
.rpc(msg
)
560 async def DestroyRelation(self
, endpoints
):
562 endpoints : typing.Sequence[str]
565 # map input types to rpc msg
567 msg
= dict(type='Application',
568 request
='DestroyRelation',
571 _params
['endpoints'] = endpoints
572 reply
= await self
.rpc(msg
)
577 @ReturnMapping(DestroyUnitResults
)
578 async def DestroyUnit(self
, entities
):
580 entities : typing.Sequence[~Entity]
581 Returns -> typing.Sequence[~DestroyUnitResult]
583 # map input types to rpc msg
585 msg
= dict(type='Application',
586 request
='DestroyUnit',
589 _params
['entities'] = entities
590 reply
= await self
.rpc(msg
)
596 async def DestroyUnits(self
, unit_names
):
598 unit_names : typing.Sequence[str]
601 # map input types to rpc msg
603 msg
= dict(type='Application',
604 request
='DestroyUnits',
607 _params
['unit-names'] = unit_names
608 reply
= await self
.rpc(msg
)
614 async def Expose(self
, application
):
619 # map input types to rpc msg
621 msg
= dict(type='Application',
625 _params
['application'] = application
626 reply
= await self
.rpc(msg
)
631 @ReturnMapping(ApplicationGetResults
)
632 async def Get(self
, application
):
635 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
637 # map input types to rpc msg
639 msg
= dict(type='Application',
643 _params
['application'] = application
644 reply
= await self
.rpc(msg
)
649 @ReturnMapping(StringResult
)
650 async def GetCharmURL(self
, application
):
653 Returns -> typing.Union[_ForwardRef('Error'), str]
655 # map input types to rpc msg
657 msg
= dict(type='Application',
658 request
='GetCharmURL',
661 _params
['application'] = application
662 reply
= await self
.rpc(msg
)
667 @ReturnMapping(GetConstraintsResults
)
668 async def GetConstraints(self
, application
):
673 # map input types to rpc msg
675 msg
= dict(type='Application',
676 request
='GetConstraints',
679 _params
['application'] = application
680 reply
= await self
.rpc(msg
)
686 async def Set(self
, application
, options
):
689 options : typing.Mapping[str, str]
692 # map input types to rpc msg
694 msg
= dict(type='Application',
698 _params
['application'] = application
699 _params
['options'] = options
700 reply
= await self
.rpc(msg
)
706 async def SetCharm(self
, application
, channel
, charm_url
, config_settings
, config_settings_yaml
, force_series
, force_units
, resource_ids
, storage_constraints
):
711 config_settings : typing.Mapping[str, str]
712 config_settings_yaml : str
715 resource_ids : typing.Mapping[str, str]
716 storage_constraints : typing.Mapping[str, ~StorageConstraints]
719 # map input types to rpc msg
721 msg
= dict(type='Application',
725 _params
['application'] = application
726 _params
['channel'] = channel
727 _params
['charm-url'] = charm_url
728 _params
['config-settings'] = config_settings
729 _params
['config-settings-yaml'] = config_settings_yaml
730 _params
['force-series'] = force_series
731 _params
['force-units'] = force_units
732 _params
['resource-ids'] = resource_ids
733 _params
['storage-constraints'] = storage_constraints
734 reply
= await self
.rpc(msg
)
740 async def SetConstraints(self
, application
, constraints
):
746 # map input types to rpc msg
748 msg
= dict(type='Application',
749 request
='SetConstraints',
752 _params
['application'] = application
753 _params
['constraints'] = constraints
754 reply
= await self
.rpc(msg
)
759 @ReturnMapping(ErrorResults
)
760 async def SetMetricCredentials(self
, creds
):
762 creds : typing.Sequence[~ApplicationMetricCredential]
763 Returns -> typing.Sequence[~ErrorResult]
765 # map input types to rpc msg
767 msg
= dict(type='Application',
768 request
='SetMetricCredentials',
771 _params
['creds'] = creds
772 reply
= await self
.rpc(msg
)
778 async def Unexpose(self
, application
):
783 # map input types to rpc msg
785 msg
= dict(type='Application',
789 _params
['application'] = application
790 reply
= await self
.rpc(msg
)
796 async def Unset(self
, application
, options
):
799 options : typing.Sequence[str]
802 # map input types to rpc msg
804 msg
= dict(type='Application',
808 _params
['application'] = application
809 _params
['options'] = options
810 reply
= await self
.rpc(msg
)
816 async def Update(self
, application
, charm_url
, constraints
, force_charm_url
, force_series
, min_units
, settings
, settings_yaml
):
821 force_charm_url : bool
824 settings : typing.Mapping[str, str]
828 # map input types to rpc msg
830 msg
= dict(type='Application',
834 _params
['application'] = application
835 _params
['charm-url'] = charm_url
836 _params
['constraints'] = constraints
837 _params
['force-charm-url'] = force_charm_url
838 _params
['force-series'] = force_series
839 _params
['min-units'] = min_units
840 _params
['settings'] = settings
841 _params
['settings-yaml'] = settings_yaml
842 reply
= await self
.rpc(msg
)
847 class ControllerFacade(Type
):
850 schema
= {'definitions': {'AllWatcherId': {'additionalProperties': False,
851 'properties': {'watcher-id': {'type': 'string'}},
852 'required': ['watcher-id'],
854 'CloudCredential': {'additionalProperties': False,
855 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
857 'auth-type': {'type': 'string'},
858 'redacted': {'items': {'type': 'string'},
860 'required': ['auth-type'],
862 'CloudSpec': {'additionalProperties': False,
863 'properties': {'cacertificates': {'items': {'type': 'string'},
865 'credential': {'$ref': '#/definitions/CloudCredential'},
866 'endpoint': {'type': 'string'},
867 'identity-endpoint': {'type': 'string'},
868 'name': {'type': 'string'},
869 'region': {'type': 'string'},
870 'storage-endpoint': {'type': 'string'},
871 'type': {'type': 'string'}},
872 'required': ['type', 'name'],
874 'CloudSpecResult': {'additionalProperties': False,
875 'properties': {'error': {'$ref': '#/definitions/Error'},
876 'result': {'$ref': '#/definitions/CloudSpec'}},
878 'CloudSpecResults': {'additionalProperties': False,
879 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
882 'ConfigValue': {'additionalProperties': False,
883 'properties': {'source': {'type': 'string'},
884 'value': {'additionalProperties': True,
886 'required': ['value', 'source'],
888 'ControllerAPIInfoResult': {'additionalProperties': False,
889 'properties': {'addresses': {'items': {'type': 'string'},
891 'cacert': {'type': 'string'},
892 'error': {'$ref': '#/definitions/Error'}},
893 'required': ['addresses',
896 'ControllerAPIInfoResults': {'additionalProperties': False,
897 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
899 'required': ['results'],
901 'ControllerConfigResult': {'additionalProperties': False,
902 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
905 'required': ['config'],
907 'ControllerConfigSet': {'additionalProperties': False,
908 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
911 'required': ['config'],
913 'DestroyControllerArgs': {'additionalProperties': False,
914 'properties': {'destroy-models': {'type': 'boolean'},
915 'destroy-storage': {'type': 'boolean'}},
916 'required': ['destroy-models'],
918 'Entities': {'additionalProperties': False,
919 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
921 'required': ['entities'],
923 'Entity': {'additionalProperties': False,
924 'properties': {'tag': {'type': 'string'}},
927 'Error': {'additionalProperties': False,
928 'properties': {'code': {'type': 'string'},
929 'info': {'$ref': '#/definitions/ErrorInfo'},
930 'message': {'type': 'string'}},
931 'required': ['message', 'code'],
933 'ErrorInfo': {'additionalProperties': False,
934 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
935 'macaroon-path': {'type': 'string'}},
937 'ErrorResult': {'additionalProperties': False,
938 'properties': {'error': {'$ref': '#/definitions/Error'}},
940 'ErrorResults': {'additionalProperties': False,
941 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
943 'required': ['results'],
945 'HostedModelConfig': {'additionalProperties': False,
946 'properties': {'cloud-spec': {'$ref': '#/definitions/CloudSpec'},
947 'config': {'patternProperties': {'.*': {'additionalProperties': True,
950 'error': {'$ref': '#/definitions/Error'},
951 'name': {'type': 'string'},
952 'owner': {'type': 'string'}},
953 'required': ['name', 'owner'],
955 'HostedModelConfigsResults': {'additionalProperties': False,
956 'properties': {'models': {'items': {'$ref': '#/definitions/HostedModelConfig'},
958 'required': ['models'],
960 'InitiateMigrationArgs': {'additionalProperties': False,
961 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
963 'required': ['specs'],
965 'InitiateMigrationResult': {'additionalProperties': False,
966 'properties': {'error': {'$ref': '#/definitions/Error'},
967 'migration-id': {'type': 'string'},
968 'model-tag': {'type': 'string'}},
969 'required': ['model-tag',
972 'InitiateMigrationResults': {'additionalProperties': False,
973 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
975 'required': ['results'],
977 'Macaroon': {'additionalProperties': False, 'type': 'object'},
978 'MachineHardware': {'additionalProperties': False,
979 'properties': {'arch': {'type': 'string'},
980 'availability-zone': {'type': 'string'},
981 'cores': {'type': 'integer'},
982 'cpu-power': {'type': 'integer'},
983 'mem': {'type': 'integer'},
984 'root-disk': {'type': 'integer'},
985 'tags': {'items': {'type': 'string'},
988 'MigrationSpec': {'additionalProperties': False,
989 'properties': {'model-tag': {'type': 'string'},
990 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
991 'required': ['model-tag', 'target-info'],
993 'MigrationTargetInfo': {'additionalProperties': False,
994 'properties': {'addrs': {'items': {'type': 'string'},
996 'auth-tag': {'type': 'string'},
997 'ca-cert': {'type': 'string'},
998 'controller-tag': {'type': 'string'},
999 'macaroons': {'type': 'string'},
1000 'password': {'type': 'string'}},
1001 'required': ['controller-tag',
1006 'Model': {'additionalProperties': False,
1007 'properties': {'name': {'type': 'string'},
1008 'owner-tag': {'type': 'string'},
1009 'type': {'type': 'string'},
1010 'uuid': {'type': 'string'}},
1011 'required': ['name', 'uuid', 'type', 'owner-tag'],
1013 'ModelBlockInfo': {'additionalProperties': False,
1014 'properties': {'blocks': {'items': {'type': 'string'},
1016 'model-uuid': {'type': 'string'},
1017 'name': {'type': 'string'},
1018 'owner-tag': {'type': 'string'}},
1019 'required': ['name',
1024 'ModelBlockInfoList': {'additionalProperties': False,
1025 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
1028 'ModelConfigResults': {'additionalProperties': False,
1029 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
1031 'required': ['config'],
1033 'ModelFilesystemInfo': {'additionalProperties': False,
1034 'properties': {'detachable': {'type': 'boolean'},
1035 'id': {'type': 'string'},
1036 'message': {'type': 'string'},
1037 'provider-id': {'type': 'string'},
1038 'status': {'type': 'string'}},
1041 'ModelMachineInfo': {'additionalProperties': False,
1042 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
1043 'has-vote': {'type': 'boolean'},
1044 'id': {'type': 'string'},
1045 'instance-id': {'type': 'string'},
1046 'message': {'type': 'string'},
1047 'status': {'type': 'string'},
1048 'wants-vote': {'type': 'boolean'}},
1051 'ModelStatus': {'additionalProperties': False,
1052 'properties': {'application-count': {'type': 'integer'},
1053 'error': {'$ref': '#/definitions/Error'},
1054 'filesystems': {'items': {'$ref': '#/definitions/ModelFilesystemInfo'},
1056 'hosted-machine-count': {'type': 'integer'},
1057 'life': {'type': 'string'},
1058 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
1060 'model-tag': {'type': 'string'},
1061 'owner-tag': {'type': 'string'},
1062 'volumes': {'items': {'$ref': '#/definitions/ModelVolumeInfo'},
1064 'required': ['model-tag',
1066 'hosted-machine-count',
1067 'application-count',
1070 'ModelStatusResults': {'additionalProperties': False,
1071 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
1073 'required': ['models'],
1075 'ModelTag': {'additionalProperties': False, 'type': 'object'},
1076 'ModelVolumeInfo': {'additionalProperties': False,
1077 'properties': {'detachable': {'type': 'boolean'},
1078 'id': {'type': 'string'},
1079 'message': {'type': 'string'},
1080 'provider-id': {'type': 'string'},
1081 'status': {'type': 'string'}},
1084 'ModifyControllerAccess': {'additionalProperties': False,
1085 'properties': {'access': {'type': 'string'},
1086 'action': {'type': 'string'},
1087 'user-tag': {'type': 'string'}},
1088 'required': ['user-tag',
1092 'ModifyControllerAccessRequest': {'additionalProperties': False,
1093 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
1095 'required': ['changes'],
1097 'RemoveBlocksArgs': {'additionalProperties': False,
1098 'properties': {'all': {'type': 'boolean'}},
1099 'required': ['all'],
1101 'UserAccess': {'additionalProperties': False,
1102 'properties': {'access': {'type': 'string'},
1103 'user-tag': {'type': 'string'}},
1104 'required': ['user-tag', 'access'],
1106 'UserAccessResult': {'additionalProperties': False,
1107 'properties': {'error': {'$ref': '#/definitions/Error'},
1108 'result': {'$ref': '#/definitions/UserAccess'}},
1110 'UserAccessResults': {'additionalProperties': False,
1111 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
1114 'UserModel': {'additionalProperties': False,
1115 'properties': {'last-connection': {'format': 'date-time',
1117 'model': {'$ref': '#/definitions/Model'}},
1118 'required': ['model', 'last-connection'],
1120 'UserModelList': {'additionalProperties': False,
1121 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
1123 'required': ['user-models'],
1125 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
1127 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1128 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
1130 'ConfigSet': {'properties': {'Params': {'$ref': '#/definitions/ControllerConfigSet'}},
1132 'ControllerAPIInfoForModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1133 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
1135 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
1137 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
1139 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
1140 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
1142 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1143 'Result': {'$ref': '#/definitions/UserAccessResults'}},
1145 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}},
1147 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
1148 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
1150 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
1152 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
1154 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1155 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
1157 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
1158 'Result': {'$ref': '#/definitions/ErrorResults'}},
1160 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
1162 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
1167 @ReturnMapping(UserModelList
)
1168 async def AllModels(self
):
1171 Returns -> typing.Sequence[~UserModel]
1173 # map input types to rpc msg
1175 msg
= dict(type='Controller',
1176 request
='AllModels',
1180 reply
= await self
.rpc(msg
)
1185 @ReturnMapping(CloudSpecResults
)
1186 async def CloudSpec(self
, entities
):
1188 entities : typing.Sequence[~Entity]
1189 Returns -> typing.Sequence[~CloudSpecResult]
1191 # map input types to rpc msg
1193 msg
= dict(type='Controller',
1194 request
='CloudSpec',
1197 _params
['entities'] = entities
1198 reply
= await self
.rpc(msg
)
1203 @ReturnMapping(None)
1204 async def ConfigSet(self
, config
):
1206 config : typing.Mapping[str, typing.Any]
1209 # map input types to rpc msg
1211 msg
= dict(type='Controller',
1212 request
='ConfigSet',
1215 _params
['config'] = config
1216 reply
= await self
.rpc(msg
)
1221 @ReturnMapping(ControllerAPIInfoResults
)
1222 async def ControllerAPIInfoForModels(self
, entities
):
1224 entities : typing.Sequence[~Entity]
1225 Returns -> typing.Sequence[~ControllerAPIInfoResult]
1227 # map input types to rpc msg
1229 msg
= dict(type='Controller',
1230 request
='ControllerAPIInfoForModels',
1233 _params
['entities'] = entities
1234 reply
= await self
.rpc(msg
)
1239 @ReturnMapping(ControllerConfigResult
)
1240 async def ControllerConfig(self
):
1243 Returns -> typing.Mapping[str, typing.Any]
1245 # map input types to rpc msg
1247 msg
= dict(type='Controller',
1248 request
='ControllerConfig',
1252 reply
= await self
.rpc(msg
)
1257 @ReturnMapping(None)
1258 async def DestroyController(self
, destroy_models
):
1260 destroy_models : bool
1263 # map input types to rpc msg
1265 msg
= dict(type='Controller',
1266 request
='DestroyController',
1269 _params
['destroy-models'] = destroy_models
1270 reply
= await self
.rpc(msg
)
1275 @ReturnMapping(CloudSpecResult
)
1276 async def GetCloudSpec(self
):
1279 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
1281 # map input types to rpc msg
1283 msg
= dict(type='Controller',
1284 request
='GetCloudSpec',
1288 reply
= await self
.rpc(msg
)
1293 @ReturnMapping(UserAccessResults
)
1294 async def GetControllerAccess(self
, entities
):
1296 entities : typing.Sequence[~Entity]
1297 Returns -> typing.Sequence[~UserAccessResult]
1299 # map input types to rpc msg
1301 msg
= dict(type='Controller',
1302 request
='GetControllerAccess',
1305 _params
['entities'] = entities
1306 reply
= await self
.rpc(msg
)
1311 @ReturnMapping(HostedModelConfigsResults
)
1312 async def HostedModelConfigs(self
):
1315 Returns -> typing.Sequence[~HostedModelConfig]
1317 # map input types to rpc msg
1319 msg
= dict(type='Controller',
1320 request
='HostedModelConfigs',
1324 reply
= await self
.rpc(msg
)
1329 @ReturnMapping(InitiateMigrationResults
)
1330 async def InitiateMigration(self
, specs
):
1332 specs : typing.Sequence[~MigrationSpec]
1333 Returns -> typing.Sequence[~InitiateMigrationResult]
1335 # map input types to rpc msg
1337 msg
= dict(type='Controller',
1338 request
='InitiateMigration',
1341 _params
['specs'] = specs
1342 reply
= await self
.rpc(msg
)
1347 @ReturnMapping(ModelBlockInfoList
)
1348 async def ListBlockedModels(self
):
1351 Returns -> typing.Sequence[~ModelBlockInfo]
1353 # map input types to rpc msg
1355 msg
= dict(type='Controller',
1356 request
='ListBlockedModels',
1360 reply
= await self
.rpc(msg
)
1365 @ReturnMapping(ModelConfigResults
)
1366 async def ModelConfig(self
):
1369 Returns -> typing.Mapping[str, ~ConfigValue]
1371 # map input types to rpc msg
1373 msg
= dict(type='Controller',
1374 request
='ModelConfig',
1378 reply
= await self
.rpc(msg
)
1383 @ReturnMapping(ModelStatusResults
)
1384 async def ModelStatus(self
, entities
):
1386 entities : typing.Sequence[~Entity]
1387 Returns -> typing.Sequence[~ModelStatus]
1389 # map input types to rpc msg
1391 msg
= dict(type='Controller',
1392 request
='ModelStatus',
1395 _params
['entities'] = entities
1396 reply
= await self
.rpc(msg
)
1401 @ReturnMapping(ErrorResults
)
1402 async def ModifyControllerAccess(self
, changes
):
1404 changes : typing.Sequence[~ModifyControllerAccess]
1405 Returns -> typing.Sequence[~ErrorResult]
1407 # map input types to rpc msg
1409 msg
= dict(type='Controller',
1410 request
='ModifyControllerAccess',
1413 _params
['changes'] = changes
1414 reply
= await self
.rpc(msg
)
1419 @ReturnMapping(None)
1420 async def RemoveBlocks(self
, all_
):
1425 # map input types to rpc msg
1427 msg
= dict(type='Controller',
1428 request
='RemoveBlocks',
1431 _params
['all'] = all_
1432 reply
= await self
.rpc(msg
)
1437 @ReturnMapping(AllWatcherId
)
1438 async def WatchAllModels(self
):
1443 # map input types to rpc msg
1445 msg
= dict(type='Controller',
1446 request
='WatchAllModels',
1450 reply
= await self
.rpc(msg
)
1455 class FirewallerFacade(Type
):
1458 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
1459 'properties': {'error': {'$ref': '#/definitions/Error'},
1460 'result': {'type': 'boolean'}},
1461 'required': ['result'],
1463 'BoolResults': {'additionalProperties': False,
1464 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
1466 'required': ['results'],
1468 'CloudCredential': {'additionalProperties': False,
1469 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1471 'auth-type': {'type': 'string'},
1472 'redacted': {'items': {'type': 'string'},
1474 'required': ['auth-type'],
1476 'CloudSpec': {'additionalProperties': False,
1477 'properties': {'cacertificates': {'items': {'type': 'string'},
1479 'credential': {'$ref': '#/definitions/CloudCredential'},
1480 'endpoint': {'type': 'string'},
1481 'identity-endpoint': {'type': 'string'},
1482 'name': {'type': 'string'},
1483 'region': {'type': 'string'},
1484 'storage-endpoint': {'type': 'string'},
1485 'type': {'type': 'string'}},
1486 'required': ['type', 'name'],
1488 'CloudSpecResult': {'additionalProperties': False,
1489 'properties': {'error': {'$ref': '#/definitions/Error'},
1490 'result': {'$ref': '#/definitions/CloudSpec'}},
1492 'CloudSpecResults': {'additionalProperties': False,
1493 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
1496 'ControllerAPIInfoResult': {'additionalProperties': False,
1497 'properties': {'addresses': {'items': {'type': 'string'},
1499 'cacert': {'type': 'string'},
1500 'error': {'$ref': '#/definitions/Error'}},
1501 'required': ['addresses',
1504 'ControllerAPIInfoResults': {'additionalProperties': False,
1505 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
1507 'required': ['results'],
1509 'ControllerConfigResult': {'additionalProperties': False,
1510 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1513 'required': ['config'],
1515 'Entities': {'additionalProperties': False,
1516 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1518 'required': ['entities'],
1520 'Entity': {'additionalProperties': False,
1521 'properties': {'tag': {'type': 'string'}},
1522 'required': ['tag'],
1524 'EntityStatusArgs': {'additionalProperties': False,
1525 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1528 'info': {'type': 'string'},
1529 'status': {'type': 'string'},
1530 'tag': {'type': 'string'}},
1536 'Error': {'additionalProperties': False,
1537 'properties': {'code': {'type': 'string'},
1538 'info': {'$ref': '#/definitions/ErrorInfo'},
1539 'message': {'type': 'string'}},
1540 'required': ['message', 'code'],
1542 'ErrorInfo': {'additionalProperties': False,
1543 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1544 'macaroon-path': {'type': 'string'}},
1546 'ErrorResult': {'additionalProperties': False,
1547 'properties': {'error': {'$ref': '#/definitions/Error'}},
1549 'ErrorResults': {'additionalProperties': False,
1550 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1552 'required': ['results'],
1554 'FirewallRule': {'additionalProperties': False,
1555 'properties': {'known-service': {'type': 'string'},
1556 'whitelist-cidrs': {'items': {'type': 'string'},
1558 'required': ['known-service'],
1560 'KnownServiceArgs': {'additionalProperties': False,
1561 'properties': {'known-services': {'items': {'type': 'string'},
1563 'required': ['known-services'],
1565 'LifeResult': {'additionalProperties': False,
1566 'properties': {'error': {'$ref': '#/definitions/Error'},
1567 'life': {'type': 'string'}},
1568 'required': ['life'],
1570 'LifeResults': {'additionalProperties': False,
1571 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1573 'required': ['results'],
1575 'ListFirewallRulesResults': {'additionalProperties': False,
1576 'properties': {'Rules': {'items': {'$ref': '#/definitions/FirewallRule'},
1578 'required': ['Rules'],
1580 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1581 'MacaroonResult': {'additionalProperties': False,
1582 'properties': {'error': {'$ref': '#/definitions/Error'},
1583 'result': {'$ref': '#/definitions/Macaroon'}},
1585 'MacaroonResults': {'additionalProperties': False,
1586 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
1588 'required': ['results'],
1590 'MachinePortRange': {'additionalProperties': False,
1591 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
1592 'relation-tag': {'type': 'string'},
1593 'unit-tag': {'type': 'string'}},
1594 'required': ['unit-tag',
1598 'MachinePorts': {'additionalProperties': False,
1599 'properties': {'machine-tag': {'type': 'string'},
1600 'subnet-tag': {'type': 'string'}},
1601 'required': ['machine-tag', 'subnet-tag'],
1603 'MachinePortsParams': {'additionalProperties': False,
1604 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
1606 'required': ['params'],
1608 'MachinePortsResult': {'additionalProperties': False,
1609 'properties': {'error': {'$ref': '#/definitions/Error'},
1610 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
1612 'required': ['ports'],
1614 'MachinePortsResults': {'additionalProperties': False,
1615 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
1617 'required': ['results'],
1619 'ModelConfigResult': {'additionalProperties': False,
1620 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1623 'required': ['config'],
1625 'ModelTag': {'additionalProperties': False, 'type': 'object'},
1626 'NotifyWatchResult': {'additionalProperties': False,
1627 'properties': {'NotifyWatcherId': {'type': 'string'},
1628 'error': {'$ref': '#/definitions/Error'}},
1629 'required': ['NotifyWatcherId'],
1631 'NotifyWatchResults': {'additionalProperties': False,
1632 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1634 'required': ['results'],
1636 'PortRange': {'additionalProperties': False,
1637 'properties': {'from-port': {'type': 'integer'},
1638 'protocol': {'type': 'string'},
1639 'to-port': {'type': 'integer'}},
1640 'required': ['from-port', 'to-port', 'protocol'],
1642 'SetStatus': {'additionalProperties': False,
1643 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1645 'required': ['entities'],
1647 'StringResult': {'additionalProperties': False,
1648 'properties': {'error': {'$ref': '#/definitions/Error'},
1649 'result': {'type': 'string'}},
1650 'required': ['result'],
1652 'StringResults': {'additionalProperties': False,
1653 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
1655 'required': ['results'],
1657 'StringsResult': {'additionalProperties': False,
1658 'properties': {'error': {'$ref': '#/definitions/Error'},
1659 'result': {'items': {'type': 'string'},
1662 'StringsResults': {'additionalProperties': False,
1663 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1665 'required': ['results'],
1667 'StringsWatchResult': {'additionalProperties': False,
1668 'properties': {'changes': {'items': {'type': 'string'},
1670 'error': {'$ref': '#/definitions/Error'},
1671 'watcher-id': {'type': 'string'}},
1672 'required': ['watcher-id'],
1674 'StringsWatchResults': {'additionalProperties': False,
1675 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
1677 'required': ['results'],
1679 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1680 'Result': {'$ref': '#/definitions/BoolResults'}},
1682 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1683 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
1685 'ControllerAPIInfoForModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1686 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
1688 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
1690 'FirewallRules': {'properties': {'Params': {'$ref': '#/definitions/KnownServiceArgs'},
1691 'Result': {'$ref': '#/definitions/ListFirewallRulesResults'}},
1693 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1694 'Result': {'$ref': '#/definitions/StringResults'}},
1696 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
1697 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
1699 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1700 'Result': {'$ref': '#/definitions/BoolResults'}},
1702 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1703 'Result': {'$ref': '#/definitions/StringsResults'}},
1705 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
1706 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
1708 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1709 'Result': {'$ref': '#/definitions/StringResults'}},
1711 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1712 'Result': {'$ref': '#/definitions/LifeResults'}},
1714 'MacaroonForRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1715 'Result': {'$ref': '#/definitions/MacaroonResults'}},
1717 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1719 'SetRelationsStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1720 'Result': {'$ref': '#/definitions/ErrorResults'}},
1722 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1723 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1725 'WatchEgressAddressesForRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1726 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1728 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1730 'WatchIngressAddressesForRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1731 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1733 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1735 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1736 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1738 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1739 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1744 @ReturnMapping(BoolResults
)
1745 async def AreManuallyProvisioned(self
, entities
):
1747 entities : typing.Sequence[~Entity]
1748 Returns -> typing.Sequence[~BoolResult]
1750 # map input types to rpc msg
1752 msg
= dict(type='Firewaller',
1753 request
='AreManuallyProvisioned',
1756 _params
['entities'] = entities
1757 reply
= await self
.rpc(msg
)
1762 @ReturnMapping(CloudSpecResults
)
1763 async def CloudSpec(self
, entities
):
1765 entities : typing.Sequence[~Entity]
1766 Returns -> typing.Sequence[~CloudSpecResult]
1768 # map input types to rpc msg
1770 msg
= dict(type='Firewaller',
1771 request
='CloudSpec',
1774 _params
['entities'] = entities
1775 reply
= await self
.rpc(msg
)
1780 @ReturnMapping(ControllerAPIInfoResults
)
1781 async def ControllerAPIInfoForModels(self
, entities
):
1783 entities : typing.Sequence[~Entity]
1784 Returns -> typing.Sequence[~ControllerAPIInfoResult]
1786 # map input types to rpc msg
1788 msg
= dict(type='Firewaller',
1789 request
='ControllerAPIInfoForModels',
1792 _params
['entities'] = entities
1793 reply
= await self
.rpc(msg
)
1798 @ReturnMapping(ControllerConfigResult
)
1799 async def ControllerConfig(self
):
1802 Returns -> typing.Mapping[str, typing.Any]
1804 # map input types to rpc msg
1806 msg
= dict(type='Firewaller',
1807 request
='ControllerConfig',
1811 reply
= await self
.rpc(msg
)
1816 @ReturnMapping(ListFirewallRulesResults
)
1817 async def FirewallRules(self
, known_services
):
1819 known_services : typing.Sequence[str]
1820 Returns -> typing.Sequence[~FirewallRule]
1822 # map input types to rpc msg
1824 msg
= dict(type='Firewaller',
1825 request
='FirewallRules',
1828 _params
['known-services'] = known_services
1829 reply
= await self
.rpc(msg
)
1834 @ReturnMapping(StringResults
)
1835 async def GetAssignedMachine(self
, entities
):
1837 entities : typing.Sequence[~Entity]
1838 Returns -> typing.Sequence[~StringResult]
1840 # map input types to rpc msg
1842 msg
= dict(type='Firewaller',
1843 request
='GetAssignedMachine',
1846 _params
['entities'] = entities
1847 reply
= await self
.rpc(msg
)
1852 @ReturnMapping(CloudSpecResult
)
1853 async def GetCloudSpec(self
):
1856 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
1858 # map input types to rpc msg
1860 msg
= dict(type='Firewaller',
1861 request
='GetCloudSpec',
1865 reply
= await self
.rpc(msg
)
1870 @ReturnMapping(BoolResults
)
1871 async def GetExposed(self
, entities
):
1873 entities : typing.Sequence[~Entity]
1874 Returns -> typing.Sequence[~BoolResult]
1876 # map input types to rpc msg
1878 msg
= dict(type='Firewaller',
1879 request
='GetExposed',
1882 _params
['entities'] = entities
1883 reply
= await self
.rpc(msg
)
1888 @ReturnMapping(StringsResults
)
1889 async def GetMachineActiveSubnets(self
, entities
):
1891 entities : typing.Sequence[~Entity]
1892 Returns -> typing.Sequence[~StringsResult]
1894 # map input types to rpc msg
1896 msg
= dict(type='Firewaller',
1897 request
='GetMachineActiveSubnets',
1900 _params
['entities'] = entities
1901 reply
= await self
.rpc(msg
)
1906 @ReturnMapping(MachinePortsResults
)
1907 async def GetMachinePorts(self
, params
):
1909 params : typing.Sequence[~MachinePorts]
1910 Returns -> typing.Sequence[~MachinePortsResult]
1912 # map input types to rpc msg
1914 msg
= dict(type='Firewaller',
1915 request
='GetMachinePorts',
1918 _params
['params'] = params
1919 reply
= await self
.rpc(msg
)
1924 @ReturnMapping(StringResults
)
1925 async def InstanceId(self
, entities
):
1927 entities : typing.Sequence[~Entity]
1928 Returns -> typing.Sequence[~StringResult]
1930 # map input types to rpc msg
1932 msg
= dict(type='Firewaller',
1933 request
='InstanceId',
1936 _params
['entities'] = entities
1937 reply
= await self
.rpc(msg
)
1942 @ReturnMapping(LifeResults
)
1943 async def Life(self
, entities
):
1945 entities : typing.Sequence[~Entity]
1946 Returns -> typing.Sequence[~LifeResult]
1948 # map input types to rpc msg
1950 msg
= dict(type='Firewaller',
1954 _params
['entities'] = entities
1955 reply
= await self
.rpc(msg
)
1960 @ReturnMapping(MacaroonResults
)
1961 async def MacaroonForRelations(self
, entities
):
1963 entities : typing.Sequence[~Entity]
1964 Returns -> typing.Sequence[~MacaroonResult]
1966 # map input types to rpc msg
1968 msg
= dict(type='Firewaller',
1969 request
='MacaroonForRelations',
1972 _params
['entities'] = entities
1973 reply
= await self
.rpc(msg
)
1978 @ReturnMapping(ModelConfigResult
)
1979 async def ModelConfig(self
):
1982 Returns -> typing.Mapping[str, typing.Any]
1984 # map input types to rpc msg
1986 msg
= dict(type='Firewaller',
1987 request
='ModelConfig',
1991 reply
= await self
.rpc(msg
)
1996 @ReturnMapping(ErrorResults
)
1997 async def SetRelationsStatus(self
, entities
):
1999 entities : typing.Sequence[~EntityStatusArgs]
2000 Returns -> typing.Sequence[~ErrorResult]
2002 # map input types to rpc msg
2004 msg
= dict(type='Firewaller',
2005 request
='SetRelationsStatus',
2008 _params
['entities'] = entities
2009 reply
= await self
.rpc(msg
)
2014 @ReturnMapping(NotifyWatchResults
)
2015 async def Watch(self
, entities
):
2017 entities : typing.Sequence[~Entity]
2018 Returns -> typing.Sequence[~NotifyWatchResult]
2020 # map input types to rpc msg
2022 msg
= dict(type='Firewaller',
2026 _params
['entities'] = entities
2027 reply
= await self
.rpc(msg
)
2032 @ReturnMapping(StringsWatchResults
)
2033 async def WatchEgressAddressesForRelations(self
, entities
):
2035 entities : typing.Sequence[~Entity]
2036 Returns -> typing.Sequence[~StringsWatchResult]
2038 # map input types to rpc msg
2040 msg
= dict(type='Firewaller',
2041 request
='WatchEgressAddressesForRelations',
2044 _params
['entities'] = entities
2045 reply
= await self
.rpc(msg
)
2050 @ReturnMapping(NotifyWatchResult
)
2051 async def WatchForModelConfigChanges(self
):
2054 Returns -> typing.Union[str, _ForwardRef('Error')]
2056 # map input types to rpc msg
2058 msg
= dict(type='Firewaller',
2059 request
='WatchForModelConfigChanges',
2063 reply
= await self
.rpc(msg
)
2068 @ReturnMapping(StringsWatchResults
)
2069 async def WatchIngressAddressesForRelations(self
, entities
):
2071 entities : typing.Sequence[~Entity]
2072 Returns -> typing.Sequence[~StringsWatchResult]
2074 # map input types to rpc msg
2076 msg
= dict(type='Firewaller',
2077 request
='WatchIngressAddressesForRelations',
2080 _params
['entities'] = entities
2081 reply
= await self
.rpc(msg
)
2086 @ReturnMapping(StringsWatchResult
)
2087 async def WatchModelMachines(self
):
2090 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
2092 # map input types to rpc msg
2094 msg
= dict(type='Firewaller',
2095 request
='WatchModelMachines',
2099 reply
= await self
.rpc(msg
)
2104 @ReturnMapping(StringsWatchResults
)
2105 async def WatchOpenedPorts(self
, entities
):
2107 entities : typing.Sequence[~Entity]
2108 Returns -> typing.Sequence[~StringsWatchResult]
2110 # map input types to rpc msg
2112 msg
= dict(type='Firewaller',
2113 request
='WatchOpenedPorts',
2116 _params
['entities'] = entities
2117 reply
= await self
.rpc(msg
)
2122 @ReturnMapping(StringsWatchResults
)
2123 async def WatchUnits(self
, entities
):
2125 entities : typing.Sequence[~Entity]
2126 Returns -> typing.Sequence[~StringsWatchResult]
2128 # map input types to rpc msg
2130 msg
= dict(type='Firewaller',
2131 request
='WatchUnits',
2134 _params
['entities'] = entities
2135 reply
= await self
.rpc(msg
)
2140 class MachineManagerFacade(Type
):
2141 name
= 'MachineManager'
2143 schema
= {'definitions': {'AddMachineParams': {'additionalProperties': False,
2144 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
2146 'constraints': {'$ref': '#/definitions/Value'},
2147 'container-type': {'type': 'string'},
2148 'disks': {'items': {'$ref': '#/definitions/Constraints'},
2150 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2151 'instance-id': {'type': 'string'},
2152 'jobs': {'items': {'type': 'string'},
2154 'nonce': {'type': 'string'},
2155 'parent-id': {'type': 'string'},
2156 'placement': {'$ref': '#/definitions/Placement'},
2157 'series': {'type': 'string'}},
2158 'required': ['series',
2165 'hardware-characteristics',
2168 'AddMachines': {'additionalProperties': False,
2169 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
2171 'required': ['params'],
2173 'AddMachinesResult': {'additionalProperties': False,
2174 'properties': {'error': {'$ref': '#/definitions/Error'},
2175 'machine': {'type': 'string'}},
2176 'required': ['machine'],
2178 'AddMachinesResults': {'additionalProperties': False,
2179 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
2181 'required': ['machines'],
2183 'Address': {'additionalProperties': False,
2184 'properties': {'scope': {'type': 'string'},
2185 'space-name': {'type': 'string'},
2186 'type': {'type': 'string'},
2187 'value': {'type': 'string'}},
2188 'required': ['value', 'type', 'scope'],
2190 'Constraints': {'additionalProperties': False,
2191 'properties': {'Count': {'type': 'integer'},
2192 'Pool': {'type': 'string'},
2193 'Size': {'type': 'integer'}},
2194 'required': ['Pool', 'Size', 'Count'],
2196 'DestroyMachineInfo': {'additionalProperties': False,
2197 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
2199 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
2201 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
2204 'DestroyMachineResult': {'additionalProperties': False,
2205 'properties': {'error': {'$ref': '#/definitions/Error'},
2206 'info': {'$ref': '#/definitions/DestroyMachineInfo'}},
2208 'DestroyMachineResults': {'additionalProperties': False,
2209 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyMachineResult'},
2212 'DestroyMachinesParams': {'additionalProperties': False,
2213 'properties': {'force': {'type': 'boolean'},
2214 'keep': {'type': 'boolean'},
2215 'machine-tags': {'items': {'type': 'string'},
2217 'required': ['machine-tags'],
2219 'Entities': {'additionalProperties': False,
2220 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2222 'required': ['entities'],
2224 'Entity': {'additionalProperties': False,
2225 'properties': {'tag': {'type': 'string'}},
2226 'required': ['tag'],
2228 'Error': {'additionalProperties': False,
2229 'properties': {'code': {'type': 'string'},
2230 'info': {'$ref': '#/definitions/ErrorInfo'},
2231 'message': {'type': 'string'}},
2232 'required': ['message', 'code'],
2234 'ErrorInfo': {'additionalProperties': False,
2235 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2236 'macaroon-path': {'type': 'string'}},
2238 'ErrorResult': {'additionalProperties': False,
2239 'properties': {'error': {'$ref': '#/definitions/Error'}},
2241 'HardwareCharacteristics': {'additionalProperties': False,
2242 'properties': {'arch': {'type': 'string'},
2243 'availability-zone': {'type': 'string'},
2244 'cpu-cores': {'type': 'integer'},
2245 'cpu-power': {'type': 'integer'},
2246 'mem': {'type': 'integer'},
2247 'root-disk': {'type': 'integer'},
2248 'tags': {'items': {'type': 'string'},
2251 'InstanceType': {'additionalProperties': False,
2252 'properties': {'arches': {'items': {'type': 'string'},
2254 'cost': {'type': 'integer'},
2255 'cpu-cores': {'type': 'integer'},
2256 'deprecated': {'type': 'boolean'},
2257 'memory': {'type': 'integer'},
2258 'name': {'type': 'string'},
2259 'root-disk': {'type': 'integer'},
2260 'virt-type': {'type': 'string'}},
2261 'required': ['arches', 'cpu-cores', 'memory'],
2263 'InstanceTypesResult': {'additionalProperties': False,
2264 'properties': {'cost-currency': {'type': 'string'},
2265 'cost-divisor': {'type': 'integer'},
2266 'cost-unit': {'type': 'string'},
2267 'error': {'$ref': '#/definitions/Error'},
2268 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
2271 'InstanceTypesResults': {'additionalProperties': False,
2272 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
2274 'required': ['results'],
2276 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2277 'ModelInstanceTypesConstraint': {'additionalProperties': False,
2278 'properties': {'value': {'$ref': '#/definitions/Value'}},
2280 'ModelInstanceTypesConstraints': {'additionalProperties': False,
2281 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
2283 'required': ['constraints'],
2285 'NotifyWatchResult': {'additionalProperties': False,
2286 'properties': {'NotifyWatcherId': {'type': 'string'},
2287 'error': {'$ref': '#/definitions/Error'}},
2288 'required': ['NotifyWatcherId'],
2290 'NotifyWatchResults': {'additionalProperties': False,
2291 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2293 'required': ['results'],
2295 'Placement': {'additionalProperties': False,
2296 'properties': {'directive': {'type': 'string'},
2297 'scope': {'type': 'string'}},
2298 'required': ['scope', 'directive'],
2300 'StringsResult': {'additionalProperties': False,
2301 'properties': {'error': {'$ref': '#/definitions/Error'},
2302 'result': {'items': {'type': 'string'},
2305 'StringsResults': {'additionalProperties': False,
2306 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
2308 'required': ['results'],
2310 'UpdateSeriesArg': {'additionalProperties': False,
2311 'properties': {'force': {'type': 'boolean'},
2312 'series': {'type': 'string'},
2313 'tag': {'$ref': '#/definitions/Entity'}},
2314 'required': ['tag', 'force', 'series'],
2316 'UpdateSeriesArgs': {'additionalProperties': False,
2317 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSeriesArg'},
2319 'required': ['args'],
2321 'UpgradeSeriesNotificationParam': {'additionalProperties': False,
2322 'properties': {'entity': {'$ref': '#/definitions/Entity'},
2323 'watcher-id': {'type': 'string'}},
2324 'required': ['entity',
2327 'UpgradeSeriesNotificationParams': {'additionalProperties': False,
2328 'properties': {'params': {'items': {'$ref': '#/definitions/UpgradeSeriesNotificationParam'},
2330 'required': ['params'],
2332 'UpgradeSeriesUnitsResult': {'additionalProperties': False,
2333 'properties': {'error': {'$ref': '#/definitions/Error'},
2334 'unit-names': {'items': {'type': 'string'},
2336 'required': ['unit-names'],
2338 'UpgradeSeriesUnitsResults': {'additionalProperties': False,
2339 'properties': {'Results': {'items': {'$ref': '#/definitions/UpgradeSeriesUnitsResult'},
2341 'required': ['Results'],
2343 'Value': {'additionalProperties': False,
2344 'properties': {'arch': {'type': 'string'},
2345 'container': {'type': 'string'},
2346 'cores': {'type': 'integer'},
2347 'cpu-power': {'type': 'integer'},
2348 'instance-type': {'type': 'string'},
2349 'mem': {'type': 'integer'},
2350 'root-disk': {'type': 'integer'},
2351 'spaces': {'items': {'type': 'string'},
2353 'tags': {'items': {'type': 'string'},
2355 'virt-type': {'type': 'string'},
2356 'zones': {'items': {'type': 'string'},
2359 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2360 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2362 'DestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2363 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2365 'DestroyMachineWithParams': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachinesParams'},
2366 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2368 'ForceDestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2369 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2371 'GetUpgradeSeriesMessages': {'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesNotificationParams'},
2372 'Result': {'$ref': '#/definitions/StringsResults'}},
2374 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
2375 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
2377 'UpgradeSeriesComplete': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArg'},
2378 'Result': {'$ref': '#/definitions/ErrorResult'}},
2380 'UpgradeSeriesPrepare': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArg'},
2381 'Result': {'$ref': '#/definitions/ErrorResult'}},
2383 'UpgradeSeriesValidate': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArgs'},
2384 'Result': {'$ref': '#/definitions/UpgradeSeriesUnitsResults'}},
2386 'WatchUpgradeSeriesNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2387 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2392 @ReturnMapping(AddMachinesResults
)
2393 async def AddMachines(self
, params
):
2395 params : typing.Sequence[~AddMachineParams]
2396 Returns -> typing.Sequence[~AddMachinesResult]
2398 # map input types to rpc msg
2400 msg
= dict(type='MachineManager',
2401 request
='AddMachines',
2404 _params
['params'] = params
2405 reply
= await self
.rpc(msg
)
2410 @ReturnMapping(DestroyMachineResults
)
2411 async def DestroyMachine(self
, entities
):
2413 entities : typing.Sequence[~Entity]
2414 Returns -> typing.Sequence[~DestroyMachineResult]
2416 # map input types to rpc msg
2418 msg
= dict(type='MachineManager',
2419 request
='DestroyMachine',
2422 _params
['entities'] = entities
2423 reply
= await self
.rpc(msg
)
2428 @ReturnMapping(DestroyMachineResults
)
2429 async def DestroyMachineWithParams(self
, force
, keep
, machine_tags
):
2433 machine_tags : typing.Sequence[str]
2434 Returns -> typing.Sequence[~DestroyMachineResult]
2436 # map input types to rpc msg
2438 msg
= dict(type='MachineManager',
2439 request
='DestroyMachineWithParams',
2442 _params
['force'] = force
2443 _params
['keep'] = keep
2444 _params
['machine-tags'] = machine_tags
2445 reply
= await self
.rpc(msg
)
2450 @ReturnMapping(DestroyMachineResults
)
2451 async def ForceDestroyMachine(self
, entities
):
2453 entities : typing.Sequence[~Entity]
2454 Returns -> typing.Sequence[~DestroyMachineResult]
2456 # map input types to rpc msg
2458 msg
= dict(type='MachineManager',
2459 request
='ForceDestroyMachine',
2462 _params
['entities'] = entities
2463 reply
= await self
.rpc(msg
)
2468 @ReturnMapping(StringsResults
)
2469 async def GetUpgradeSeriesMessages(self
, params
):
2471 params : typing.Sequence[~UpgradeSeriesNotificationParam]
2472 Returns -> typing.Sequence[~StringsResult]
2474 # map input types to rpc msg
2476 msg
= dict(type='MachineManager',
2477 request
='GetUpgradeSeriesMessages',
2480 _params
['params'] = params
2481 reply
= await self
.rpc(msg
)
2486 @ReturnMapping(InstanceTypesResults
)
2487 async def InstanceTypes(self
, constraints
):
2489 constraints : typing.Sequence[~ModelInstanceTypesConstraint]
2490 Returns -> typing.Sequence[~InstanceTypesResult]
2492 # map input types to rpc msg
2494 msg
= dict(type='MachineManager',
2495 request
='InstanceTypes',
2498 _params
['constraints'] = constraints
2499 reply
= await self
.rpc(msg
)
2504 @ReturnMapping(ErrorResult
)
2505 async def UpgradeSeriesComplete(self
, force
, series
, tag
):
2512 # map input types to rpc msg
2514 msg
= dict(type='MachineManager',
2515 request
='UpgradeSeriesComplete',
2518 _params
['force'] = force
2519 _params
['series'] = series
2520 _params
['tag'] = tag
2521 reply
= await self
.rpc(msg
)
2526 @ReturnMapping(ErrorResult
)
2527 async def UpgradeSeriesPrepare(self
, force
, series
, tag
):
2534 # map input types to rpc msg
2536 msg
= dict(type='MachineManager',
2537 request
='UpgradeSeriesPrepare',
2540 _params
['force'] = force
2541 _params
['series'] = series
2542 _params
['tag'] = tag
2543 reply
= await self
.rpc(msg
)
2548 @ReturnMapping(UpgradeSeriesUnitsResults
)
2549 async def UpgradeSeriesValidate(self
, args
):
2551 args : typing.Sequence[~UpdateSeriesArg]
2552 Returns -> typing.Sequence[~UpgradeSeriesUnitsResult]
2554 # map input types to rpc msg
2556 msg
= dict(type='MachineManager',
2557 request
='UpgradeSeriesValidate',
2560 _params
['args'] = args
2561 reply
= await self
.rpc(msg
)
2566 @ReturnMapping(NotifyWatchResults
)
2567 async def WatchUpgradeSeriesNotifications(self
, entities
):
2569 entities : typing.Sequence[~Entity]
2570 Returns -> typing.Sequence[~NotifyWatchResult]
2572 # map input types to rpc msg
2574 msg
= dict(type='MachineManager',
2575 request
='WatchUpgradeSeriesNotifications',
2578 _params
['entities'] = entities
2579 reply
= await self
.rpc(msg
)
2584 class ModelManagerFacade(Type
):
2585 name
= 'ModelManager'
2587 schema
= {'definitions': {'ChangeModelCredentialParams': {'additionalProperties': False,
2588 'properties': {'credential-tag': {'type': 'string'},
2589 'model-tag': {'type': 'string'}},
2590 'required': ['model-tag',
2593 'ChangeModelCredentialsParams': {'additionalProperties': False,
2594 'properties': {'model-credentials': {'items': {'$ref': '#/definitions/ChangeModelCredentialParams'},
2596 'required': ['model-credentials'],
2598 'DestroyModelParams': {'additionalProperties': False,
2599 'properties': {'destroy-storage': {'type': 'boolean'},
2600 'model-tag': {'type': 'string'}},
2601 'required': ['model-tag'],
2603 'DestroyModelsParams': {'additionalProperties': False,
2604 'properties': {'models': {'items': {'$ref': '#/definitions/DestroyModelParams'},
2606 'required': ['models'],
2608 'DumpModelRequest': {'additionalProperties': False,
2609 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2611 'simplified': {'type': 'boolean'}},
2612 'required': ['entities', 'simplified'],
2614 'Entities': {'additionalProperties': False,
2615 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2617 'required': ['entities'],
2619 'Entity': {'additionalProperties': False,
2620 'properties': {'tag': {'type': 'string'}},
2621 'required': ['tag'],
2623 'EntityStatus': {'additionalProperties': False,
2624 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2627 'info': {'type': 'string'},
2628 'since': {'format': 'date-time',
2630 'status': {'type': 'string'}},
2631 'required': ['status', 'info', 'since'],
2633 'Error': {'additionalProperties': False,
2634 'properties': {'code': {'type': 'string'},
2635 'info': {'$ref': '#/definitions/ErrorInfo'},
2636 'message': {'type': 'string'}},
2637 'required': ['message', 'code'],
2639 'ErrorInfo': {'additionalProperties': False,
2640 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2641 'macaroon-path': {'type': 'string'}},
2643 'ErrorResult': {'additionalProperties': False,
2644 'properties': {'error': {'$ref': '#/definitions/Error'}},
2646 'ErrorResults': {'additionalProperties': False,
2647 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2649 'required': ['results'],
2651 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2652 'MachineHardware': {'additionalProperties': False,
2653 'properties': {'arch': {'type': 'string'},
2654 'availability-zone': {'type': 'string'},
2655 'cores': {'type': 'integer'},
2656 'cpu-power': {'type': 'integer'},
2657 'mem': {'type': 'integer'},
2658 'root-disk': {'type': 'integer'},
2659 'tags': {'items': {'type': 'string'},
2662 'MapResult': {'additionalProperties': False,
2663 'properties': {'error': {'$ref': '#/definitions/Error'},
2664 'result': {'patternProperties': {'.*': {'additionalProperties': True,
2667 'required': ['result'],
2669 'MapResults': {'additionalProperties': False,
2670 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
2672 'required': ['results'],
2674 'Model': {'additionalProperties': False,
2675 'properties': {'name': {'type': 'string'},
2676 'owner-tag': {'type': 'string'},
2677 'type': {'type': 'string'},
2678 'uuid': {'type': 'string'}},
2679 'required': ['name', 'uuid', 'type', 'owner-tag'],
2681 'ModelCreateArgs': {'additionalProperties': False,
2682 'properties': {'cloud-tag': {'type': 'string'},
2683 'config': {'patternProperties': {'.*': {'additionalProperties': True,
2686 'credential': {'type': 'string'},
2687 'name': {'type': 'string'},
2688 'owner-tag': {'type': 'string'},
2689 'region': {'type': 'string'}},
2690 'required': ['name', 'owner-tag'],
2692 'ModelDefaultValues': {'additionalProperties': False,
2693 'properties': {'cloud-region': {'type': 'string'},
2694 'cloud-tag': {'type': 'string'},
2695 'config': {'patternProperties': {'.*': {'additionalProperties': True,
2698 'required': ['config'],
2700 'ModelDefaults': {'additionalProperties': False,
2701 'properties': {'controller': {'additionalProperties': True,
2703 'default': {'additionalProperties': True,
2705 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
2708 'ModelDefaultsResult': {'additionalProperties': False,
2709 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
2711 'required': ['config'],
2713 'ModelEntityCount': {'additionalProperties': False,
2714 'properties': {'count': {'type': 'integer'},
2715 'entity': {'type': 'string'}},
2716 'required': ['entity', 'count'],
2718 'ModelFilesystemInfo': {'additionalProperties': False,
2719 'properties': {'detachable': {'type': 'boolean'},
2720 'id': {'type': 'string'},
2721 'message': {'type': 'string'},
2722 'provider-id': {'type': 'string'},
2723 'status': {'type': 'string'}},
2726 'ModelInfo': {'additionalProperties': False,
2727 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
2728 'cloud-credential-tag': {'type': 'string'},
2729 'cloud-region': {'type': 'string'},
2730 'cloud-tag': {'type': 'string'},
2731 'controller-uuid': {'type': 'string'},
2732 'default-series': {'type': 'string'},
2733 'life': {'type': 'string'},
2734 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
2736 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
2737 'name': {'type': 'string'},
2738 'owner-tag': {'type': 'string'},
2739 'provider-type': {'type': 'string'},
2740 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
2741 'status': {'$ref': '#/definitions/EntityStatus'},
2742 'type': {'type': 'string'},
2743 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
2745 'uuid': {'type': 'string'}},
2746 'required': ['name',
2758 'ModelInfoResult': {'additionalProperties': False,
2759 'properties': {'error': {'$ref': '#/definitions/Error'},
2760 'result': {'$ref': '#/definitions/ModelInfo'}},
2762 'ModelInfoResults': {'additionalProperties': False,
2763 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
2765 'required': ['results'],
2767 'ModelMachineInfo': {'additionalProperties': False,
2768 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
2769 'has-vote': {'type': 'boolean'},
2770 'id': {'type': 'string'},
2771 'instance-id': {'type': 'string'},
2772 'message': {'type': 'string'},
2773 'status': {'type': 'string'},
2774 'wants-vote': {'type': 'boolean'}},
2777 'ModelMigrationStatus': {'additionalProperties': False,
2778 'properties': {'end': {'format': 'date-time',
2780 'start': {'format': 'date-time',
2782 'status': {'type': 'string'}},
2783 'required': ['status', 'start'],
2785 'ModelSLAInfo': {'additionalProperties': False,
2786 'properties': {'level': {'type': 'string'},
2787 'owner': {'type': 'string'}},
2788 'required': ['level', 'owner'],
2790 'ModelStatus': {'additionalProperties': False,
2791 'properties': {'application-count': {'type': 'integer'},
2792 'error': {'$ref': '#/definitions/Error'},
2793 'filesystems': {'items': {'$ref': '#/definitions/ModelFilesystemInfo'},
2795 'hosted-machine-count': {'type': 'integer'},
2796 'life': {'type': 'string'},
2797 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
2799 'model-tag': {'type': 'string'},
2800 'owner-tag': {'type': 'string'},
2801 'volumes': {'items': {'$ref': '#/definitions/ModelVolumeInfo'},
2803 'required': ['model-tag',
2805 'hosted-machine-count',
2806 'application-count',
2809 'ModelStatusResults': {'additionalProperties': False,
2810 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
2812 'required': ['models'],
2814 'ModelSummariesRequest': {'additionalProperties': False,
2815 'properties': {'all': {'type': 'boolean'},
2816 'user-tag': {'type': 'string'}},
2817 'required': ['user-tag'],
2819 'ModelSummary': {'additionalProperties': False,
2820 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
2821 'cloud-credential-tag': {'type': 'string'},
2822 'cloud-region': {'type': 'string'},
2823 'cloud-tag': {'type': 'string'},
2824 'controller-uuid': {'type': 'string'},
2825 'counts': {'items': {'$ref': '#/definitions/ModelEntityCount'},
2827 'default-series': {'type': 'string'},
2828 'last-connection': {'format': 'date-time',
2830 'life': {'type': 'string'},
2831 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
2832 'name': {'type': 'string'},
2833 'owner-tag': {'type': 'string'},
2834 'provider-type': {'type': 'string'},
2835 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
2836 'status': {'$ref': '#/definitions/EntityStatus'},
2837 'type': {'type': 'string'},
2838 'user-access': {'type': 'string'},
2839 'uuid': {'type': 'string'}},
2840 'required': ['name',
2853 'ModelSummaryResult': {'additionalProperties': False,
2854 'properties': {'error': {'$ref': '#/definitions/Error'},
2855 'result': {'$ref': '#/definitions/ModelSummary'}},
2857 'ModelSummaryResults': {'additionalProperties': False,
2858 'properties': {'results': {'items': {'$ref': '#/definitions/ModelSummaryResult'},
2860 'required': ['results'],
2862 'ModelUnsetKeys': {'additionalProperties': False,
2863 'properties': {'cloud-region': {'type': 'string'},
2864 'cloud-tag': {'type': 'string'},
2865 'keys': {'items': {'type': 'string'},
2867 'required': ['keys'],
2869 'ModelUserInfo': {'additionalProperties': False,
2870 'properties': {'access': {'type': 'string'},
2871 'display-name': {'type': 'string'},
2872 'last-connection': {'format': 'date-time',
2874 'user': {'type': 'string'}},
2875 'required': ['user',
2880 'ModelVolumeInfo': {'additionalProperties': False,
2881 'properties': {'detachable': {'type': 'boolean'},
2882 'id': {'type': 'string'},
2883 'message': {'type': 'string'},
2884 'provider-id': {'type': 'string'},
2885 'status': {'type': 'string'}},
2888 'ModifyModelAccess': {'additionalProperties': False,
2889 'properties': {'access': {'type': 'string'},
2890 'action': {'type': 'string'},
2891 'model-tag': {'type': 'string'},
2892 'user-tag': {'type': 'string'}},
2893 'required': ['user-tag',
2898 'ModifyModelAccessRequest': {'additionalProperties': False,
2899 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
2901 'required': ['changes'],
2903 'Number': {'additionalProperties': False,
2904 'properties': {'Build': {'type': 'integer'},
2905 'Major': {'type': 'integer'},
2906 'Minor': {'type': 'integer'},
2907 'Patch': {'type': 'integer'},
2908 'Tag': {'type': 'string'}},
2909 'required': ['Major',
2915 'RegionDefaults': {'additionalProperties': False,
2916 'properties': {'region-name': {'type': 'string'},
2917 'value': {'additionalProperties': True,
2919 'required': ['region-name', 'value'],
2921 'SetModelDefaults': {'additionalProperties': False,
2922 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
2924 'required': ['config'],
2926 'StringResult': {'additionalProperties': False,
2927 'properties': {'error': {'$ref': '#/definitions/Error'},
2928 'result': {'type': 'string'}},
2929 'required': ['result'],
2931 'StringResults': {'additionalProperties': False,
2932 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2934 'required': ['results'],
2936 'UnsetModelDefaults': {'additionalProperties': False,
2937 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
2939 'required': ['keys'],
2941 'UserModel': {'additionalProperties': False,
2942 'properties': {'last-connection': {'format': 'date-time',
2944 'model': {'$ref': '#/definitions/Model'}},
2945 'required': ['model', 'last-connection'],
2947 'UserModelList': {'additionalProperties': False,
2948 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
2950 'required': ['user-models'],
2952 'properties': {'ChangeModelCredential': {'properties': {'Params': {'$ref': '#/definitions/ChangeModelCredentialsParams'},
2953 'Result': {'$ref': '#/definitions/ErrorResults'}},
2955 'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
2956 'Result': {'$ref': '#/definitions/ModelInfo'}},
2958 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/DestroyModelsParams'},
2959 'Result': {'$ref': '#/definitions/ErrorResults'}},
2961 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/DumpModelRequest'},
2962 'Result': {'$ref': '#/definitions/StringResults'}},
2964 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2965 'Result': {'$ref': '#/definitions/MapResults'}},
2967 'ListModelSummaries': {'properties': {'Params': {'$ref': '#/definitions/ModelSummariesRequest'},
2968 'Result': {'$ref': '#/definitions/ModelSummaryResults'}},
2970 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
2971 'Result': {'$ref': '#/definitions/UserModelList'}},
2973 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
2975 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2976 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
2978 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2979 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
2981 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
2982 'Result': {'$ref': '#/definitions/ErrorResults'}},
2984 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
2985 'Result': {'$ref': '#/definitions/ErrorResults'}},
2987 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
2988 'Result': {'$ref': '#/definitions/ErrorResults'}},
2993 @ReturnMapping(ErrorResults
)
2994 async def ChangeModelCredential(self
, model_credentials
):
2996 model_credentials : typing.Sequence[~ChangeModelCredentialParams]
2997 Returns -> typing.Sequence[~ErrorResult]
2999 # map input types to rpc msg
3001 msg
= dict(type='ModelManager',
3002 request
='ChangeModelCredential',
3005 _params
['model-credentials'] = model_credentials
3006 reply
= await self
.rpc(msg
)
3011 @ReturnMapping(ModelInfo
)
3012 async def CreateModel(self
, cloud_tag
, config
, credential
, name
, owner_tag
, region
):
3015 config : typing.Mapping[str, typing.Any]
3020 Returns -> typing.Union[_ForwardRef('Number'), str, typing.Sequence[~ModelMachineInfo], _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
3022 # map input types to rpc msg
3024 msg
= dict(type='ModelManager',
3025 request
='CreateModel',
3028 _params
['cloud-tag'] = cloud_tag
3029 _params
['config'] = config
3030 _params
['credential'] = credential
3031 _params
['name'] = name
3032 _params
['owner-tag'] = owner_tag
3033 _params
['region'] = region
3034 reply
= await self
.rpc(msg
)
3039 @ReturnMapping(ErrorResults
)
3040 async def DestroyModels(self
, models
):
3042 models : typing.Sequence[~DestroyModelParams]
3043 Returns -> typing.Sequence[~ErrorResult]
3045 # map input types to rpc msg
3047 msg
= dict(type='ModelManager',
3048 request
='DestroyModels',
3051 _params
['models'] = models
3052 reply
= await self
.rpc(msg
)
3057 @ReturnMapping(StringResults
)
3058 async def DumpModels(self
, entities
, simplified
):
3060 entities : typing.Sequence[~Entity]
3062 Returns -> typing.Sequence[~StringResult]
3064 # map input types to rpc msg
3066 msg
= dict(type='ModelManager',
3067 request
='DumpModels',
3070 _params
['entities'] = entities
3071 _params
['simplified'] = simplified
3072 reply
= await self
.rpc(msg
)
3077 @ReturnMapping(MapResults
)
3078 async def DumpModelsDB(self
, entities
):
3080 entities : typing.Sequence[~Entity]
3081 Returns -> typing.Sequence[~MapResult]
3083 # map input types to rpc msg
3085 msg
= dict(type='ModelManager',
3086 request
='DumpModelsDB',
3089 _params
['entities'] = entities
3090 reply
= await self
.rpc(msg
)
3095 @ReturnMapping(ModelSummaryResults
)
3096 async def ListModelSummaries(self
, all_
, user_tag
):
3100 Returns -> typing.Sequence[~ModelSummaryResult]
3102 # map input types to rpc msg
3104 msg
= dict(type='ModelManager',
3105 request
='ListModelSummaries',
3108 _params
['all'] = all_
3109 _params
['user-tag'] = user_tag
3110 reply
= await self
.rpc(msg
)
3115 @ReturnMapping(UserModelList
)
3116 async def ListModels(self
, tag
):
3119 Returns -> typing.Sequence[~UserModel]
3121 # map input types to rpc msg
3123 msg
= dict(type='ModelManager',
3124 request
='ListModels',
3127 _params
['tag'] = tag
3128 reply
= await self
.rpc(msg
)
3133 @ReturnMapping(ModelDefaultsResult
)
3134 async def ModelDefaults(self
):
3137 Returns -> typing.Mapping[str, ~ModelDefaults]
3139 # map input types to rpc msg
3141 msg
= dict(type='ModelManager',
3142 request
='ModelDefaults',
3146 reply
= await self
.rpc(msg
)
3151 @ReturnMapping(ModelInfoResults
)
3152 async def ModelInfo(self
, entities
):
3154 entities : typing.Sequence[~Entity]
3155 Returns -> typing.Sequence[~ModelInfoResult]
3157 # map input types to rpc msg
3159 msg
= dict(type='ModelManager',
3160 request
='ModelInfo',
3163 _params
['entities'] = entities
3164 reply
= await self
.rpc(msg
)
3169 @ReturnMapping(ModelStatusResults
)
3170 async def ModelStatus(self
, entities
):
3172 entities : typing.Sequence[~Entity]
3173 Returns -> typing.Sequence[~ModelStatus]
3175 # map input types to rpc msg
3177 msg
= dict(type='ModelManager',
3178 request
='ModelStatus',
3181 _params
['entities'] = entities
3182 reply
= await self
.rpc(msg
)
3187 @ReturnMapping(ErrorResults
)
3188 async def ModifyModelAccess(self
, changes
):
3190 changes : typing.Sequence[~ModifyModelAccess]
3191 Returns -> typing.Sequence[~ErrorResult]
3193 # map input types to rpc msg
3195 msg
= dict(type='ModelManager',
3196 request
='ModifyModelAccess',
3199 _params
['changes'] = changes
3200 reply
= await self
.rpc(msg
)
3205 @ReturnMapping(ErrorResults
)
3206 async def SetModelDefaults(self
, config
):
3208 config : typing.Sequence[~ModelDefaultValues]
3209 Returns -> typing.Sequence[~ErrorResult]
3211 # map input types to rpc msg
3213 msg
= dict(type='ModelManager',
3214 request
='SetModelDefaults',
3217 _params
['config'] = config
3218 reply
= await self
.rpc(msg
)
3223 @ReturnMapping(ErrorResults
)
3224 async def UnsetModelDefaults(self
, keys
):
3226 keys : typing.Sequence[~ModelUnsetKeys]
3227 Returns -> typing.Sequence[~ErrorResult]
3229 # map input types to rpc msg
3231 msg
= dict(type='ModelManager',
3232 request
='UnsetModelDefaults',
3235 _params
['keys'] = keys
3236 reply
= await self
.rpc(msg
)
3241 class UniterFacade(Type
):
3244 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
3245 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
3248 'required': ['servers'],
3250 'Action': {'additionalProperties': False,
3251 'properties': {'name': {'type': 'string'},
3252 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
3255 'receiver': {'type': 'string'},
3256 'tag': {'type': 'string'}},
3257 'required': ['tag', 'receiver', 'name'],
3259 'ActionExecutionResult': {'additionalProperties': False,
3260 'properties': {'action-tag': {'type': 'string'},
3261 'message': {'type': 'string'},
3262 'results': {'patternProperties': {'.*': {'additionalProperties': True,
3265 'status': {'type': 'string'}},
3266 'required': ['action-tag', 'status'],
3268 'ActionExecutionResults': {'additionalProperties': False,
3269 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
3272 'ActionResult': {'additionalProperties': False,
3273 'properties': {'action': {'$ref': '#/definitions/Action'},
3274 'completed': {'format': 'date-time',
3276 'enqueued': {'format': 'date-time',
3278 'error': {'$ref': '#/definitions/Error'},
3279 'message': {'type': 'string'},
3280 'output': {'patternProperties': {'.*': {'additionalProperties': True,
3283 'started': {'format': 'date-time',
3285 'status': {'type': 'string'}},
3287 'ActionResults': {'additionalProperties': False,
3288 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
3291 'Address': {'additionalProperties': False,
3292 'properties': {'scope': {'type': 'string'},
3293 'space-name': {'type': 'string'},
3294 'type': {'type': 'string'},
3295 'value': {'type': 'string'}},
3296 'required': ['value', 'type', 'scope'],
3298 'ApplicationStatusResult': {'additionalProperties': False,
3299 'properties': {'application': {'$ref': '#/definitions/StatusResult'},
3300 'error': {'$ref': '#/definitions/Error'},
3301 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
3303 'required': ['application',
3306 'ApplicationStatusResults': {'additionalProperties': False,
3307 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
3309 'required': ['results'],
3311 'BoolResult': {'additionalProperties': False,
3312 'properties': {'error': {'$ref': '#/definitions/Error'},
3313 'result': {'type': 'boolean'}},
3314 'required': ['result'],
3316 'BoolResults': {'additionalProperties': False,
3317 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
3319 'required': ['results'],
3321 'BytesResult': {'additionalProperties': False,
3322 'properties': {'result': {'items': {'type': 'integer'},
3324 'required': ['result'],
3326 'CharmRelation': {'additionalProperties': False,
3327 'properties': {'interface': {'type': 'string'},
3328 'limit': {'type': 'integer'},
3329 'name': {'type': 'string'},
3330 'optional': {'type': 'boolean'},
3331 'role': {'type': 'string'},
3332 'scope': {'type': 'string'}},
3333 'required': ['name',
3340 'CharmURL': {'additionalProperties': False,
3341 'properties': {'url': {'type': 'string'}},
3342 'required': ['url'],
3344 'CharmURLs': {'additionalProperties': False,
3345 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'},
3347 'required': ['urls'],
3349 'ConfigSettingsResult': {'additionalProperties': False,
3350 'properties': {'error': {'$ref': '#/definitions/Error'},
3351 'settings': {'patternProperties': {'.*': {'additionalProperties': True,
3354 'required': ['settings'],
3356 'ConfigSettingsResults': {'additionalProperties': False,
3357 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
3359 'required': ['results'],
3361 'Endpoint': {'additionalProperties': False,
3362 'properties': {'application-name': {'type': 'string'},
3363 'relation': {'$ref': '#/definitions/CharmRelation'}},
3364 'required': ['application-name', 'relation'],
3366 'Entities': {'additionalProperties': False,
3367 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3369 'required': ['entities'],
3371 'EntitiesCharmURL': {'additionalProperties': False,
3372 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
3374 'required': ['entities'],
3376 'EntitiesPortRanges': {'additionalProperties': False,
3377 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
3379 'required': ['entities'],
3381 'Entity': {'additionalProperties': False,
3382 'properties': {'tag': {'type': 'string'}},
3383 'required': ['tag'],
3385 'EntityCharmURL': {'additionalProperties': False,
3386 'properties': {'charm-url': {'type': 'string'},
3387 'tag': {'type': 'string'}},
3388 'required': ['tag', 'charm-url'],
3390 'EntityPortRange': {'additionalProperties': False,
3391 'properties': {'from-port': {'type': 'integer'},
3392 'protocol': {'type': 'string'},
3393 'tag': {'type': 'string'},
3394 'to-port': {'type': 'integer'}},
3400 'EntityStatusArgs': {'additionalProperties': False,
3401 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3404 'info': {'type': 'string'},
3405 'status': {'type': 'string'},
3406 'tag': {'type': 'string'}},
3412 'EntityWorkloadVersion': {'additionalProperties': False,
3413 'properties': {'tag': {'type': 'string'},
3414 'workload-version': {'type': 'string'}},
3416 'workload-version'],
3418 'EntityWorkloadVersions': {'additionalProperties': False,
3419 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'},
3421 'required': ['entities'],
3423 'Error': {'additionalProperties': False,
3424 'properties': {'code': {'type': 'string'},
3425 'info': {'$ref': '#/definitions/ErrorInfo'},
3426 'message': {'type': 'string'}},
3427 'required': ['message', 'code'],
3429 'ErrorInfo': {'additionalProperties': False,
3430 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3431 'macaroon-path': {'type': 'string'}},
3433 'ErrorResult': {'additionalProperties': False,
3434 'properties': {'error': {'$ref': '#/definitions/Error'}},
3436 'ErrorResults': {'additionalProperties': False,
3437 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3439 'required': ['results'],
3441 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
3442 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
3444 'required': ['results'],
3446 'GetLeadershipSettingsResult': {'additionalProperties': False,
3447 'properties': {'error': {'$ref': '#/definitions/Error'},
3448 'settings': {'patternProperties': {'.*': {'type': 'string'}},
3450 'required': ['settings'],
3452 'HostPort': {'additionalProperties': False,
3453 'properties': {'Address': {'$ref': '#/definitions/Address'},
3454 'port': {'type': 'integer'}},
3455 'required': ['Address', 'port'],
3457 'IntResult': {'additionalProperties': False,
3458 'properties': {'error': {'$ref': '#/definitions/Error'},
3459 'result': {'type': 'integer'}},
3460 'required': ['result'],
3462 'IntResults': {'additionalProperties': False,
3463 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
3465 'required': ['results'],
3467 'InterfaceAddress': {'additionalProperties': False,
3468 'properties': {'cidr': {'type': 'string'},
3469 'value': {'type': 'string'}},
3470 'required': ['value', 'cidr'],
3472 'LifeResult': {'additionalProperties': False,
3473 'properties': {'error': {'$ref': '#/definitions/Error'},
3474 'life': {'type': 'string'}},
3475 'required': ['life'],
3477 'LifeResults': {'additionalProperties': False,
3478 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
3480 'required': ['results'],
3482 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3483 'MachinePortRange': {'additionalProperties': False,
3484 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
3485 'relation-tag': {'type': 'string'},
3486 'unit-tag': {'type': 'string'}},
3487 'required': ['unit-tag',
3491 'MachinePortsResult': {'additionalProperties': False,
3492 'properties': {'error': {'$ref': '#/definitions/Error'},
3493 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
3495 'required': ['ports'],
3497 'MachinePortsResults': {'additionalProperties': False,
3498 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
3500 'required': ['results'],
3502 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
3503 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
3505 'required': ['params'],
3507 'MergeLeadershipSettingsParam': {'additionalProperties': False,
3508 'properties': {'application-tag': {'type': 'string'},
3509 'settings': {'patternProperties': {'.*': {'type': 'string'}},
3511 'required': ['application-tag',
3514 'MeterStatusResult': {'additionalProperties': False,
3515 'properties': {'code': {'type': 'string'},
3516 'error': {'$ref': '#/definitions/Error'},
3517 'info': {'type': 'string'}},
3518 'required': ['code', 'info'],
3520 'MeterStatusResults': {'additionalProperties': False,
3521 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
3523 'required': ['results'],
3525 'Metric': {'additionalProperties': False,
3526 'properties': {'key': {'type': 'string'},
3527 'time': {'format': 'date-time',
3529 'value': {'type': 'string'}},
3530 'required': ['key', 'value', 'time'],
3532 'MetricBatch': {'additionalProperties': False,
3533 'properties': {'charm-url': {'type': 'string'},
3534 'created': {'format': 'date-time',
3536 'metrics': {'items': {'$ref': '#/definitions/Metric'},
3538 'uuid': {'type': 'string'}},
3539 'required': ['uuid',
3544 'MetricBatchParam': {'additionalProperties': False,
3545 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
3546 'tag': {'type': 'string'}},
3547 'required': ['tag', 'batch'],
3549 'MetricBatchParams': {'additionalProperties': False,
3550 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
3552 'required': ['batches'],
3554 'ModelConfigResult': {'additionalProperties': False,
3555 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
3558 'required': ['config'],
3560 'ModelResult': {'additionalProperties': False,
3561 'properties': {'error': {'$ref': '#/definitions/Error'},
3562 'name': {'type': 'string'},
3563 'uuid': {'type': 'string'}},
3564 'required': ['name', 'uuid'],
3566 'NetworkInfo': {'additionalProperties': False,
3567 'properties': {'addresses': {'items': {'$ref': '#/definitions/InterfaceAddress'},
3569 'interface-name': {'type': 'string'},
3570 'mac-address': {'type': 'string'}},
3571 'required': ['mac-address',
3575 'NetworkInfoParams': {'additionalProperties': False,
3576 'properties': {'bindings': {'items': {'type': 'string'},
3578 'unit': {'type': 'string'}},
3579 'required': ['unit', 'bindings'],
3581 'NetworkInfoResult': {'additionalProperties': False,
3582 'properties': {'error': {'$ref': '#/definitions/Error'},
3583 'network-info': {'items': {'$ref': '#/definitions/NetworkInfo'},
3585 'required': ['network-info'],
3587 'NetworkInfoResults': {'additionalProperties': False,
3588 'properties': {'results': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInfoResult'}},
3590 'required': ['results'],
3592 'NotifyWatchResult': {'additionalProperties': False,
3593 'properties': {'NotifyWatcherId': {'type': 'string'},
3594 'error': {'$ref': '#/definitions/Error'}},
3595 'required': ['NotifyWatcherId'],
3597 'NotifyWatchResults': {'additionalProperties': False,
3598 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3600 'required': ['results'],
3602 'PortRange': {'additionalProperties': False,
3603 'properties': {'from-port': {'type': 'integer'},
3604 'protocol': {'type': 'string'},
3605 'to-port': {'type': 'integer'}},
3606 'required': ['from-port', 'to-port', 'protocol'],
3608 'RelationIds': {'additionalProperties': False,
3609 'properties': {'relation-ids': {'items': {'type': 'integer'},
3611 'required': ['relation-ids'],
3613 'RelationResult': {'additionalProperties': False,
3614 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'},
3615 'error': {'$ref': '#/definitions/Error'},
3616 'id': {'type': 'integer'},
3617 'key': {'type': 'string'},
3618 'life': {'type': 'string'}},
3619 'required': ['life',
3624 'RelationResults': {'additionalProperties': False,
3625 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'},
3627 'required': ['results'],
3629 'RelationUnit': {'additionalProperties': False,
3630 'properties': {'relation': {'type': 'string'},
3631 'unit': {'type': 'string'}},
3632 'required': ['relation', 'unit'],
3634 'RelationUnitPair': {'additionalProperties': False,
3635 'properties': {'local-unit': {'type': 'string'},
3636 'relation': {'type': 'string'},
3637 'remote-unit': {'type': 'string'}},
3638 'required': ['relation',
3642 'RelationUnitPairs': {'additionalProperties': False,
3643 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
3645 'required': ['relation-unit-pairs'],
3647 'RelationUnitSettings': {'additionalProperties': False,
3648 'properties': {'relation': {'type': 'string'},
3649 'settings': {'patternProperties': {'.*': {'type': 'string'}},
3651 'unit': {'type': 'string'}},
3652 'required': ['relation',
3656 'RelationUnits': {'additionalProperties': False,
3657 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
3659 'required': ['relation-units'],
3661 'RelationUnitsChange': {'additionalProperties': False,
3662 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
3664 'departed': {'items': {'type': 'string'},
3666 'required': ['changed'],
3668 'RelationUnitsSettings': {'additionalProperties': False,
3669 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
3671 'required': ['relation-units'],
3673 'RelationUnitsWatchResult': {'additionalProperties': False,
3674 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
3675 'error': {'$ref': '#/definitions/Error'},
3676 'watcher-id': {'type': 'string'}},
3677 'required': ['watcher-id',
3680 'RelationUnitsWatchResults': {'additionalProperties': False,
3681 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
3683 'required': ['results'],
3685 'ResolvedModeResult': {'additionalProperties': False,
3686 'properties': {'error': {'$ref': '#/definitions/Error'},
3687 'mode': {'type': 'string'}},
3688 'required': ['mode'],
3690 'ResolvedModeResults': {'additionalProperties': False,
3691 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
3693 'required': ['results'],
3695 'SetStatus': {'additionalProperties': False,
3696 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
3698 'required': ['entities'],
3700 'SettingsResult': {'additionalProperties': False,
3701 'properties': {'error': {'$ref': '#/definitions/Error'},
3702 'settings': {'patternProperties': {'.*': {'type': 'string'}},
3704 'required': ['settings'],
3706 'SettingsResults': {'additionalProperties': False,
3707 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
3709 'required': ['results'],
3711 'StatusResult': {'additionalProperties': False,
3712 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3715 'error': {'$ref': '#/definitions/Error'},
3716 'id': {'type': 'string'},
3717 'info': {'type': 'string'},
3718 'life': {'type': 'string'},
3719 'since': {'format': 'date-time',
3721 'status': {'type': 'string'}},
3729 'StatusResults': {'additionalProperties': False,
3730 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
3732 'required': ['results'],
3734 'StorageAddParams': {'additionalProperties': False,
3735 'properties': {'name': {'type': 'string'},
3736 'storage': {'$ref': '#/definitions/StorageConstraints'},
3737 'unit': {'type': 'string'}},
3738 'required': ['unit', 'name', 'storage'],
3740 'StorageAttachment': {'additionalProperties': False,
3741 'properties': {'kind': {'type': 'integer'},
3742 'life': {'type': 'string'},
3743 'location': {'type': 'string'},
3744 'owner-tag': {'type': 'string'},
3745 'storage-tag': {'type': 'string'},
3746 'unit-tag': {'type': 'string'}},
3747 'required': ['storage-tag',
3754 'StorageAttachmentId': {'additionalProperties': False,
3755 'properties': {'storage-tag': {'type': 'string'},
3756 'unit-tag': {'type': 'string'}},
3757 'required': ['storage-tag',
3760 'StorageAttachmentIds': {'additionalProperties': False,
3761 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
3763 'required': ['ids'],
3765 'StorageAttachmentIdsResult': {'additionalProperties': False,
3766 'properties': {'error': {'$ref': '#/definitions/Error'},
3767 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
3768 'required': ['result'],
3770 'StorageAttachmentIdsResults': {'additionalProperties': False,
3771 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
3774 'StorageAttachmentResult': {'additionalProperties': False,
3775 'properties': {'error': {'$ref': '#/definitions/Error'},
3776 'result': {'$ref': '#/definitions/StorageAttachment'}},
3777 'required': ['result'],
3779 'StorageAttachmentResults': {'additionalProperties': False,
3780 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
3783 'StorageConstraints': {'additionalProperties': False,
3784 'properties': {'count': {'type': 'integer'},
3785 'pool': {'type': 'string'},
3786 'size': {'type': 'integer'}},
3788 'StoragesAddParams': {'additionalProperties': False,
3789 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
3791 'required': ['storages'],
3793 'StringBoolResult': {'additionalProperties': False,
3794 'properties': {'error': {'$ref': '#/definitions/Error'},
3795 'ok': {'type': 'boolean'},
3796 'result': {'type': 'string'}},
3797 'required': ['result', 'ok'],
3799 'StringBoolResults': {'additionalProperties': False,
3800 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'},
3802 'required': ['results'],
3804 'StringResult': {'additionalProperties': False,
3805 'properties': {'error': {'$ref': '#/definitions/Error'},
3806 'result': {'type': 'string'}},
3807 'required': ['result'],
3809 'StringResults': {'additionalProperties': False,
3810 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
3812 'required': ['results'],
3814 'StringsResult': {'additionalProperties': False,
3815 'properties': {'error': {'$ref': '#/definitions/Error'},
3816 'result': {'items': {'type': 'string'},
3819 'StringsResults': {'additionalProperties': False,
3820 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
3822 'required': ['results'],
3824 'StringsWatchResult': {'additionalProperties': False,
3825 'properties': {'changes': {'items': {'type': 'string'},
3827 'error': {'$ref': '#/definitions/Error'},
3828 'watcher-id': {'type': 'string'}},
3829 'required': ['watcher-id'],
3831 'StringsWatchResults': {'additionalProperties': False,
3832 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
3834 'required': ['results'],
3836 'UnitSettings': {'additionalProperties': False,
3837 'properties': {'version': {'type': 'integer'}},
3838 'required': ['version'],
3840 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
3842 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
3844 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3845 'Result': {'$ref': '#/definitions/ActionResults'}},
3847 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
3848 'Result': {'$ref': '#/definitions/ErrorResults'}},
3850 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
3851 'Result': {'$ref': '#/definitions/ErrorResults'}},
3853 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3854 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
3856 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3857 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
3859 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3860 'Result': {'$ref': '#/definitions/StringResults'}},
3862 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3863 'Result': {'$ref': '#/definitions/StringResults'}},
3865 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3866 'Result': {'$ref': '#/definitions/ErrorResults'}},
3868 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
3870 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
3871 'Result': {'$ref': '#/definitions/StringResults'}},
3873 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3874 'Result': {'$ref': '#/definitions/IntResults'}},
3876 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3877 'Result': {'$ref': '#/definitions/StringBoolResults'}},
3879 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3880 'Result': {'$ref': '#/definitions/ErrorResults'}},
3882 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
3883 'Result': {'$ref': '#/definitions/ErrorResults'}},
3885 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3886 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
3888 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
3890 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3891 'Result': {'$ref': '#/definitions/ErrorResults'}},
3893 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3894 'Result': {'$ref': '#/definitions/ErrorResults'}},
3896 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3897 'Result': {'$ref': '#/definitions/ErrorResults'}},
3899 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3900 'Result': {'$ref': '#/definitions/ErrorResults'}},
3902 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
3903 'Result': {'$ref': '#/definitions/ErrorResults'}},
3905 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
3906 'Result': {'$ref': '#/definitions/ErrorResults'}},
3908 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3909 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
3911 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3912 'Result': {'$ref': '#/definitions/StringBoolResults'}},
3914 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3915 'Result': {'$ref': '#/definitions/BoolResults'}},
3917 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3918 'Result': {'$ref': '#/definitions/StringsResults'}},
3920 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
3921 'Result': {'$ref': '#/definitions/ErrorResults'}},
3923 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3924 'Result': {'$ref': '#/definitions/LifeResults'}},
3926 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
3927 'Result': {'$ref': '#/definitions/ErrorResults'}},
3929 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
3931 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3933 'NetworkInfo': {'properties': {'Params': {'$ref': '#/definitions/NetworkInfoParams'},
3934 'Result': {'$ref': '#/definitions/NetworkInfoResults'}},
3936 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
3937 'Result': {'$ref': '#/definitions/ErrorResults'}},
3939 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3940 'Result': {'$ref': '#/definitions/StringResults'}},
3942 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3944 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3945 'Result': {'$ref': '#/definitions/StringResults'}},
3947 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3948 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
3950 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
3951 'Result': {'$ref': '#/definitions/SettingsResults'}},
3953 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
3954 'Result': {'$ref': '#/definitions/SettingsResults'}},
3956 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
3957 'Result': {'$ref': '#/definitions/RelationResults'}},
3959 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
3960 'Result': {'$ref': '#/definitions/RelationResults'}},
3962 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3963 'Result': {'$ref': '#/definitions/ErrorResults'}},
3965 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3966 'Result': {'$ref': '#/definitions/ErrorResults'}},
3968 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3969 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
3971 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3973 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3974 'Result': {'$ref': '#/definitions/ErrorResults'}},
3976 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3977 'Result': {'$ref': '#/definitions/ErrorResults'}},
3979 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
3980 'Result': {'$ref': '#/definitions/ErrorResults'}},
3982 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3983 'Result': {'$ref': '#/definitions/ErrorResults'}},
3985 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3986 'Result': {'$ref': '#/definitions/ErrorResults'}},
3988 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'},
3989 'Result': {'$ref': '#/definitions/ErrorResults'}},
3991 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3992 'Result': {'$ref': '#/definitions/LifeResults'}},
3994 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3995 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
3997 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3998 'Result': {'$ref': '#/definitions/StatusResults'}},
4000 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4001 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
4003 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
4004 'Result': {'$ref': '#/definitions/ErrorResults'}},
4006 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4007 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4009 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4011 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4012 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4014 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4015 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4017 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4019 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4020 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4022 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4023 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4025 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
4026 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
4028 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
4029 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4031 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4032 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4034 'WatchUnitRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4035 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4037 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4038 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4040 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4041 'Result': {'$ref': '#/definitions/StringResults'}},
4046 @ReturnMapping(StringsResult
)
4047 async def APIAddresses(self
):
4050 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
4052 # map input types to rpc msg
4054 msg
= dict(type='Uniter',
4055 request
='APIAddresses',
4059 reply
= await self
.rpc(msg
)
4064 @ReturnMapping(APIHostPortsResult
)
4065 async def APIHostPorts(self
):
4068 Returns -> typing.Sequence[~HostPort]
4070 # map input types to rpc msg
4072 msg
= dict(type='Uniter',
4073 request
='APIHostPorts',
4077 reply
= await self
.rpc(msg
)
4082 @ReturnMapping(ActionResults
)
4083 async def Actions(self
, entities
):
4085 entities : typing.Sequence[~Entity]
4086 Returns -> typing.Sequence[~ActionResult]
4088 # map input types to rpc msg
4090 msg
= dict(type='Uniter',
4094 _params
['entities'] = entities
4095 reply
= await self
.rpc(msg
)
4100 @ReturnMapping(ErrorResults
)
4101 async def AddMetricBatches(self
, batches
):
4103 batches : typing.Sequence[~MetricBatchParam]
4104 Returns -> typing.Sequence[~ErrorResult]
4106 # map input types to rpc msg
4108 msg
= dict(type='Uniter',
4109 request
='AddMetricBatches',
4112 _params
['batches'] = batches
4113 reply
= await self
.rpc(msg
)
4118 @ReturnMapping(ErrorResults
)
4119 async def AddUnitStorage(self
, storages
):
4121 storages : typing.Sequence[~StorageAddParams]
4122 Returns -> typing.Sequence[~ErrorResult]
4124 # map input types to rpc msg
4126 msg
= dict(type='Uniter',
4127 request
='AddUnitStorage',
4130 _params
['storages'] = storages
4131 reply
= await self
.rpc(msg
)
4136 @ReturnMapping(MachinePortsResults
)
4137 async def AllMachinePorts(self
, entities
):
4139 entities : typing.Sequence[~Entity]
4140 Returns -> typing.Sequence[~MachinePortsResult]
4142 # map input types to rpc msg
4144 msg
= dict(type='Uniter',
4145 request
='AllMachinePorts',
4148 _params
['entities'] = entities
4149 reply
= await self
.rpc(msg
)
4154 @ReturnMapping(ApplicationStatusResults
)
4155 async def ApplicationStatus(self
, entities
):
4157 entities : typing.Sequence[~Entity]
4158 Returns -> typing.Sequence[~ApplicationStatusResult]
4160 # map input types to rpc msg
4162 msg
= dict(type='Uniter',
4163 request
='ApplicationStatus',
4166 _params
['entities'] = entities
4167 reply
= await self
.rpc(msg
)
4172 @ReturnMapping(StringResults
)
4173 async def AssignedMachine(self
, entities
):
4175 entities : typing.Sequence[~Entity]
4176 Returns -> typing.Sequence[~StringResult]
4178 # map input types to rpc msg
4180 msg
= dict(type='Uniter',
4181 request
='AssignedMachine',
4184 _params
['entities'] = entities
4185 reply
= await self
.rpc(msg
)
4190 @ReturnMapping(StringResults
)
4191 async def AvailabilityZone(self
, entities
):
4193 entities : typing.Sequence[~Entity]
4194 Returns -> typing.Sequence[~StringResult]
4196 # map input types to rpc msg
4198 msg
= dict(type='Uniter',
4199 request
='AvailabilityZone',
4202 _params
['entities'] = entities
4203 reply
= await self
.rpc(msg
)
4208 @ReturnMapping(ErrorResults
)
4209 async def BeginActions(self
, entities
):
4211 entities : typing.Sequence[~Entity]
4212 Returns -> typing.Sequence[~ErrorResult]
4214 # map input types to rpc msg
4216 msg
= dict(type='Uniter',
4217 request
='BeginActions',
4220 _params
['entities'] = entities
4221 reply
= await self
.rpc(msg
)
4226 @ReturnMapping(BytesResult
)
4227 async def CACert(self
):
4230 Returns -> typing.Sequence[int]
4232 # map input types to rpc msg
4234 msg
= dict(type='Uniter',
4239 reply
= await self
.rpc(msg
)
4244 @ReturnMapping(StringResults
)
4245 async def CharmArchiveSha256(self
, urls
):
4247 urls : typing.Sequence[~CharmURL]
4248 Returns -> typing.Sequence[~StringResult]
4250 # map input types to rpc msg
4252 msg
= dict(type='Uniter',
4253 request
='CharmArchiveSha256',
4256 _params
['urls'] = urls
4257 reply
= await self
.rpc(msg
)
4262 @ReturnMapping(IntResults
)
4263 async def CharmModifiedVersion(self
, entities
):
4265 entities : typing.Sequence[~Entity]
4266 Returns -> typing.Sequence[~IntResult]
4268 # map input types to rpc msg
4270 msg
= dict(type='Uniter',
4271 request
='CharmModifiedVersion',
4274 _params
['entities'] = entities
4275 reply
= await self
.rpc(msg
)
4280 @ReturnMapping(StringBoolResults
)
4281 async def CharmURL(self
, entities
):
4283 entities : typing.Sequence[~Entity]
4284 Returns -> typing.Sequence[~StringBoolResult]
4286 # map input types to rpc msg
4288 msg
= dict(type='Uniter',
4292 _params
['entities'] = entities
4293 reply
= await self
.rpc(msg
)
4298 @ReturnMapping(ErrorResults
)
4299 async def ClearResolved(self
, entities
):
4301 entities : typing.Sequence[~Entity]
4302 Returns -> typing.Sequence[~ErrorResult]
4304 # map input types to rpc msg
4306 msg
= dict(type='Uniter',
4307 request
='ClearResolved',
4310 _params
['entities'] = entities
4311 reply
= await self
.rpc(msg
)
4316 @ReturnMapping(ErrorResults
)
4317 async def ClosePorts(self
, entities
):
4319 entities : typing.Sequence[~EntityPortRange]
4320 Returns -> typing.Sequence[~ErrorResult]
4322 # map input types to rpc msg
4324 msg
= dict(type='Uniter',
4325 request
='ClosePorts',
4328 _params
['entities'] = entities
4329 reply
= await self
.rpc(msg
)
4334 @ReturnMapping(ConfigSettingsResults
)
4335 async def ConfigSettings(self
, entities
):
4337 entities : typing.Sequence[~Entity]
4338 Returns -> typing.Sequence[~ConfigSettingsResult]
4340 # map input types to rpc msg
4342 msg
= dict(type='Uniter',
4343 request
='ConfigSettings',
4346 _params
['entities'] = entities
4347 reply
= await self
.rpc(msg
)
4352 @ReturnMapping(ModelResult
)
4353 async def CurrentModel(self
):
4356 Returns -> typing.Union[_ForwardRef('Error'), str]
4358 # map input types to rpc msg
4360 msg
= dict(type='Uniter',
4361 request
='CurrentModel',
4365 reply
= await self
.rpc(msg
)
4370 @ReturnMapping(ErrorResults
)
4371 async def Destroy(self
, entities
):
4373 entities : typing.Sequence[~Entity]
4374 Returns -> typing.Sequence[~ErrorResult]
4376 # map input types to rpc msg
4378 msg
= dict(type='Uniter',
4382 _params
['entities'] = entities
4383 reply
= await self
.rpc(msg
)
4388 @ReturnMapping(ErrorResults
)
4389 async def DestroyAllSubordinates(self
, entities
):
4391 entities : typing.Sequence[~Entity]
4392 Returns -> typing.Sequence[~ErrorResult]
4394 # map input types to rpc msg
4396 msg
= dict(type='Uniter',
4397 request
='DestroyAllSubordinates',
4400 _params
['entities'] = entities
4401 reply
= await self
.rpc(msg
)
4406 @ReturnMapping(ErrorResults
)
4407 async def DestroyUnitStorageAttachments(self
, entities
):
4409 entities : typing.Sequence[~Entity]
4410 Returns -> typing.Sequence[~ErrorResult]
4412 # map input types to rpc msg
4414 msg
= dict(type='Uniter',
4415 request
='DestroyUnitStorageAttachments',
4418 _params
['entities'] = entities
4419 reply
= await self
.rpc(msg
)
4424 @ReturnMapping(ErrorResults
)
4425 async def EnsureDead(self
, entities
):
4427 entities : typing.Sequence[~Entity]
4428 Returns -> typing.Sequence[~ErrorResult]
4430 # map input types to rpc msg
4432 msg
= dict(type='Uniter',
4433 request
='EnsureDead',
4436 _params
['entities'] = entities
4437 reply
= await self
.rpc(msg
)
4442 @ReturnMapping(ErrorResults
)
4443 async def EnterScope(self
, relation_units
):
4445 relation_units : typing.Sequence[~RelationUnit]
4446 Returns -> typing.Sequence[~ErrorResult]
4448 # map input types to rpc msg
4450 msg
= dict(type='Uniter',
4451 request
='EnterScope',
4454 _params
['relation-units'] = relation_units
4455 reply
= await self
.rpc(msg
)
4460 @ReturnMapping(ErrorResults
)
4461 async def FinishActions(self
, results
):
4463 results : typing.Sequence[~ActionExecutionResult]
4464 Returns -> typing.Sequence[~ErrorResult]
4466 # map input types to rpc msg
4468 msg
= dict(type='Uniter',
4469 request
='FinishActions',
4472 _params
['results'] = results
4473 reply
= await self
.rpc(msg
)
4478 @ReturnMapping(MeterStatusResults
)
4479 async def GetMeterStatus(self
, entities
):
4481 entities : typing.Sequence[~Entity]
4482 Returns -> typing.Sequence[~MeterStatusResult]
4484 # map input types to rpc msg
4486 msg
= dict(type='Uniter',
4487 request
='GetMeterStatus',
4490 _params
['entities'] = entities
4491 reply
= await self
.rpc(msg
)
4496 @ReturnMapping(StringBoolResults
)
4497 async def GetPrincipal(self
, entities
):
4499 entities : typing.Sequence[~Entity]
4500 Returns -> typing.Sequence[~StringBoolResult]
4502 # map input types to rpc msg
4504 msg
= dict(type='Uniter',
4505 request
='GetPrincipal',
4508 _params
['entities'] = entities
4509 reply
= await self
.rpc(msg
)
4514 @ReturnMapping(BoolResults
)
4515 async def HasSubordinates(self
, entities
):
4517 entities : typing.Sequence[~Entity]
4518 Returns -> typing.Sequence[~BoolResult]
4520 # map input types to rpc msg
4522 msg
= dict(type='Uniter',
4523 request
='HasSubordinates',
4526 _params
['entities'] = entities
4527 reply
= await self
.rpc(msg
)
4532 @ReturnMapping(StringsResults
)
4533 async def JoinedRelations(self
, entities
):
4535 entities : typing.Sequence[~Entity]
4536 Returns -> typing.Sequence[~StringsResult]
4538 # map input types to rpc msg
4540 msg
= dict(type='Uniter',
4541 request
='JoinedRelations',
4544 _params
['entities'] = entities
4545 reply
= await self
.rpc(msg
)
4550 @ReturnMapping(ErrorResults
)
4551 async def LeaveScope(self
, relation_units
):
4553 relation_units : typing.Sequence[~RelationUnit]
4554 Returns -> typing.Sequence[~ErrorResult]
4556 # map input types to rpc msg
4558 msg
= dict(type='Uniter',
4559 request
='LeaveScope',
4562 _params
['relation-units'] = relation_units
4563 reply
= await self
.rpc(msg
)
4568 @ReturnMapping(LifeResults
)
4569 async def Life(self
, entities
):
4571 entities : typing.Sequence[~Entity]
4572 Returns -> typing.Sequence[~LifeResult]
4574 # map input types to rpc msg
4576 msg
= dict(type='Uniter',
4580 _params
['entities'] = entities
4581 reply
= await self
.rpc(msg
)
4586 @ReturnMapping(ErrorResults
)
4587 async def Merge(self
, params
):
4589 params : typing.Sequence[~MergeLeadershipSettingsParam]
4590 Returns -> typing.Sequence[~ErrorResult]
4592 # map input types to rpc msg
4594 msg
= dict(type='Uniter',
4598 _params
['params'] = params
4599 reply
= await self
.rpc(msg
)
4604 @ReturnMapping(ModelConfigResult
)
4605 async def ModelConfig(self
):
4608 Returns -> typing.Mapping[str, typing.Any]
4610 # map input types to rpc msg
4612 msg
= dict(type='Uniter',
4613 request
='ModelConfig',
4617 reply
= await self
.rpc(msg
)
4622 @ReturnMapping(StringResult
)
4623 async def ModelUUID(self
):
4626 Returns -> typing.Union[_ForwardRef('Error'), str]
4628 # map input types to rpc msg
4630 msg
= dict(type='Uniter',
4631 request
='ModelUUID',
4635 reply
= await self
.rpc(msg
)
4640 @ReturnMapping(NetworkInfoResults
)
4641 async def NetworkInfo(self
, bindings
, unit
):
4643 bindings : typing.Sequence[str]
4645 Returns -> typing.Mapping[str, ~NetworkInfoResult]
4647 # map input types to rpc msg
4649 msg
= dict(type='Uniter',
4650 request
='NetworkInfo',
4653 _params
['bindings'] = bindings
4654 _params
['unit'] = unit
4655 reply
= await self
.rpc(msg
)
4660 @ReturnMapping(ErrorResults
)
4661 async def OpenPorts(self
, entities
):
4663 entities : typing.Sequence[~EntityPortRange]
4664 Returns -> typing.Sequence[~ErrorResult]
4666 # map input types to rpc msg
4668 msg
= dict(type='Uniter',
4669 request
='OpenPorts',
4672 _params
['entities'] = entities
4673 reply
= await self
.rpc(msg
)
4678 @ReturnMapping(StringResults
)
4679 async def PrivateAddress(self
, entities
):
4681 entities : typing.Sequence[~Entity]
4682 Returns -> typing.Sequence[~StringResult]
4684 # map input types to rpc msg
4686 msg
= dict(type='Uniter',
4687 request
='PrivateAddress',
4690 _params
['entities'] = entities
4691 reply
= await self
.rpc(msg
)
4696 @ReturnMapping(StringResult
)
4697 async def ProviderType(self
):
4700 Returns -> typing.Union[_ForwardRef('Error'), str]
4702 # map input types to rpc msg
4704 msg
= dict(type='Uniter',
4705 request
='ProviderType',
4709 reply
= await self
.rpc(msg
)
4714 @ReturnMapping(StringResults
)
4715 async def PublicAddress(self
, entities
):
4717 entities : typing.Sequence[~Entity]
4718 Returns -> typing.Sequence[~StringResult]
4720 # map input types to rpc msg
4722 msg
= dict(type='Uniter',
4723 request
='PublicAddress',
4726 _params
['entities'] = entities
4727 reply
= await self
.rpc(msg
)
4732 @ReturnMapping(GetLeadershipSettingsBulkResults
)
4733 async def Read(self
, entities
):
4735 entities : typing.Sequence[~Entity]
4736 Returns -> typing.Sequence[~GetLeadershipSettingsResult]
4738 # map input types to rpc msg
4740 msg
= dict(type='Uniter',
4744 _params
['entities'] = entities
4745 reply
= await self
.rpc(msg
)
4750 @ReturnMapping(SettingsResults
)
4751 async def ReadRemoteSettings(self
, relation_unit_pairs
):
4753 relation_unit_pairs : typing.Sequence[~RelationUnitPair]
4754 Returns -> typing.Sequence[~SettingsResult]
4756 # map input types to rpc msg
4758 msg
= dict(type='Uniter',
4759 request
='ReadRemoteSettings',
4762 _params
['relation-unit-pairs'] = relation_unit_pairs
4763 reply
= await self
.rpc(msg
)
4768 @ReturnMapping(SettingsResults
)
4769 async def ReadSettings(self
, relation_units
):
4771 relation_units : typing.Sequence[~RelationUnit]
4772 Returns -> typing.Sequence[~SettingsResult]
4774 # map input types to rpc msg
4776 msg
= dict(type='Uniter',
4777 request
='ReadSettings',
4780 _params
['relation-units'] = relation_units
4781 reply
= await self
.rpc(msg
)
4786 @ReturnMapping(RelationResults
)
4787 async def Relation(self
, relation_units
):
4789 relation_units : typing.Sequence[~RelationUnit]
4790 Returns -> typing.Sequence[~RelationResult]
4792 # map input types to rpc msg
4794 msg
= dict(type='Uniter',
4798 _params
['relation-units'] = relation_units
4799 reply
= await self
.rpc(msg
)
4804 @ReturnMapping(RelationResults
)
4805 async def RelationById(self
, relation_ids
):
4807 relation_ids : typing.Sequence[int]
4808 Returns -> typing.Sequence[~RelationResult]
4810 # map input types to rpc msg
4812 msg
= dict(type='Uniter',
4813 request
='RelationById',
4816 _params
['relation-ids'] = relation_ids
4817 reply
= await self
.rpc(msg
)
4822 @ReturnMapping(ErrorResults
)
4823 async def RemoveStorageAttachments(self
, ids
):
4825 ids : typing.Sequence[~StorageAttachmentId]
4826 Returns -> typing.Sequence[~ErrorResult]
4828 # map input types to rpc msg
4830 msg
= dict(type='Uniter',
4831 request
='RemoveStorageAttachments',
4834 _params
['ids'] = ids
4835 reply
= await self
.rpc(msg
)
4840 @ReturnMapping(ErrorResults
)
4841 async def RequestReboot(self
, entities
):
4843 entities : typing.Sequence[~Entity]
4844 Returns -> typing.Sequence[~ErrorResult]
4846 # map input types to rpc msg
4848 msg
= dict(type='Uniter',
4849 request
='RequestReboot',
4852 _params
['entities'] = entities
4853 reply
= await self
.rpc(msg
)
4858 @ReturnMapping(ResolvedModeResults
)
4859 async def Resolved(self
, entities
):
4861 entities : typing.Sequence[~Entity]
4862 Returns -> typing.Sequence[~ResolvedModeResult]
4864 # map input types to rpc msg
4866 msg
= dict(type='Uniter',
4870 _params
['entities'] = entities
4871 reply
= await self
.rpc(msg
)
4876 @ReturnMapping(StringResult
)
4877 async def SLALevel(self
):
4880 Returns -> typing.Union[_ForwardRef('Error'), str]
4882 # map input types to rpc msg
4884 msg
= dict(type='Uniter',
4889 reply
= await self
.rpc(msg
)
4894 @ReturnMapping(ErrorResults
)
4895 async def SetAgentStatus(self
, entities
):
4897 entities : typing.Sequence[~EntityStatusArgs]
4898 Returns -> typing.Sequence[~ErrorResult]
4900 # map input types to rpc msg
4902 msg
= dict(type='Uniter',
4903 request
='SetAgentStatus',
4906 _params
['entities'] = entities
4907 reply
= await self
.rpc(msg
)
4912 @ReturnMapping(ErrorResults
)
4913 async def SetApplicationStatus(self
, entities
):
4915 entities : typing.Sequence[~EntityStatusArgs]
4916 Returns -> typing.Sequence[~ErrorResult]
4918 # map input types to rpc msg
4920 msg
= dict(type='Uniter',
4921 request
='SetApplicationStatus',
4924 _params
['entities'] = entities
4925 reply
= await self
.rpc(msg
)
4930 @ReturnMapping(ErrorResults
)
4931 async def SetCharmURL(self
, entities
):
4933 entities : typing.Sequence[~EntityCharmURL]
4934 Returns -> typing.Sequence[~ErrorResult]
4936 # map input types to rpc msg
4938 msg
= dict(type='Uniter',
4939 request
='SetCharmURL',
4942 _params
['entities'] = entities
4943 reply
= await self
.rpc(msg
)
4948 @ReturnMapping(ErrorResults
)
4949 async def SetStatus(self
, entities
):
4951 entities : typing.Sequence[~EntityStatusArgs]
4952 Returns -> typing.Sequence[~ErrorResult]
4954 # map input types to rpc msg
4956 msg
= dict(type='Uniter',
4957 request
='SetStatus',
4960 _params
['entities'] = entities
4961 reply
= await self
.rpc(msg
)
4966 @ReturnMapping(ErrorResults
)
4967 async def SetUnitStatus(self
, entities
):
4969 entities : typing.Sequence[~EntityStatusArgs]
4970 Returns -> typing.Sequence[~ErrorResult]
4972 # map input types to rpc msg
4974 msg
= dict(type='Uniter',
4975 request
='SetUnitStatus',
4978 _params
['entities'] = entities
4979 reply
= await self
.rpc(msg
)
4984 @ReturnMapping(ErrorResults
)
4985 async def SetWorkloadVersion(self
, entities
):
4987 entities : typing.Sequence[~EntityWorkloadVersion]
4988 Returns -> typing.Sequence[~ErrorResult]
4990 # map input types to rpc msg
4992 msg
= dict(type='Uniter',
4993 request
='SetWorkloadVersion',
4996 _params
['entities'] = entities
4997 reply
= await self
.rpc(msg
)
5002 @ReturnMapping(LifeResults
)
5003 async def StorageAttachmentLife(self
, ids
):
5005 ids : typing.Sequence[~StorageAttachmentId]
5006 Returns -> typing.Sequence[~LifeResult]
5008 # map input types to rpc msg
5010 msg
= dict(type='Uniter',
5011 request
='StorageAttachmentLife',
5014 _params
['ids'] = ids
5015 reply
= await self
.rpc(msg
)
5020 @ReturnMapping(StorageAttachmentResults
)
5021 async def StorageAttachments(self
, ids
):
5023 ids : typing.Sequence[~StorageAttachmentId]
5024 Returns -> typing.Sequence[~StorageAttachmentResult]
5026 # map input types to rpc msg
5028 msg
= dict(type='Uniter',
5029 request
='StorageAttachments',
5032 _params
['ids'] = ids
5033 reply
= await self
.rpc(msg
)
5038 @ReturnMapping(StatusResults
)
5039 async def UnitStatus(self
, entities
):
5041 entities : typing.Sequence[~Entity]
5042 Returns -> typing.Sequence[~StatusResult]
5044 # map input types to rpc msg
5046 msg
= dict(type='Uniter',
5047 request
='UnitStatus',
5050 _params
['entities'] = entities
5051 reply
= await self
.rpc(msg
)
5056 @ReturnMapping(StorageAttachmentIdsResults
)
5057 async def UnitStorageAttachments(self
, entities
):
5059 entities : typing.Sequence[~Entity]
5060 Returns -> typing.Sequence[~StorageAttachmentIdsResult]
5062 # map input types to rpc msg
5064 msg
= dict(type='Uniter',
5065 request
='UnitStorageAttachments',
5068 _params
['entities'] = entities
5069 reply
= await self
.rpc(msg
)
5074 @ReturnMapping(ErrorResults
)
5075 async def UpdateSettings(self
, relation_units
):
5077 relation_units : typing.Sequence[~RelationUnitSettings]
5078 Returns -> typing.Sequence[~ErrorResult]
5080 # map input types to rpc msg
5082 msg
= dict(type='Uniter',
5083 request
='UpdateSettings',
5086 _params
['relation-units'] = relation_units
5087 reply
= await self
.rpc(msg
)
5092 @ReturnMapping(NotifyWatchResults
)
5093 async def Watch(self
, entities
):
5095 entities : typing.Sequence[~Entity]
5096 Returns -> typing.Sequence[~NotifyWatchResult]
5098 # map input types to rpc msg
5100 msg
= dict(type='Uniter',
5104 _params
['entities'] = entities
5105 reply
= await self
.rpc(msg
)
5110 @ReturnMapping(NotifyWatchResult
)
5111 async def WatchAPIHostPorts(self
):
5114 Returns -> typing.Union[str, _ForwardRef('Error')]
5116 # map input types to rpc msg
5118 msg
= dict(type='Uniter',
5119 request
='WatchAPIHostPorts',
5123 reply
= await self
.rpc(msg
)
5128 @ReturnMapping(StringsWatchResults
)
5129 async def WatchActionNotifications(self
, entities
):
5131 entities : typing.Sequence[~Entity]
5132 Returns -> typing.Sequence[~StringsWatchResult]
5134 # map input types to rpc msg
5136 msg
= dict(type='Uniter',
5137 request
='WatchActionNotifications',
5140 _params
['entities'] = entities
5141 reply
= await self
.rpc(msg
)
5146 @ReturnMapping(NotifyWatchResults
)
5147 async def WatchConfigSettings(self
, entities
):
5149 entities : typing.Sequence[~Entity]
5150 Returns -> typing.Sequence[~NotifyWatchResult]
5152 # map input types to rpc msg
5154 msg
= dict(type='Uniter',
5155 request
='WatchConfigSettings',
5158 _params
['entities'] = entities
5159 reply
= await self
.rpc(msg
)
5164 @ReturnMapping(NotifyWatchResult
)
5165 async def WatchForModelConfigChanges(self
):
5168 Returns -> typing.Union[str, _ForwardRef('Error')]
5170 # map input types to rpc msg
5172 msg
= dict(type='Uniter',
5173 request
='WatchForModelConfigChanges',
5177 reply
= await self
.rpc(msg
)
5182 @ReturnMapping(NotifyWatchResults
)
5183 async def WatchLeadershipSettings(self
, entities
):
5185 entities : typing.Sequence[~Entity]
5186 Returns -> typing.Sequence[~NotifyWatchResult]
5188 # map input types to rpc msg
5190 msg
= dict(type='Uniter',
5191 request
='WatchLeadershipSettings',
5194 _params
['entities'] = entities
5195 reply
= await self
.rpc(msg
)
5200 @ReturnMapping(NotifyWatchResults
)
5201 async def WatchMeterStatus(self
, entities
):
5203 entities : typing.Sequence[~Entity]
5204 Returns -> typing.Sequence[~NotifyWatchResult]
5206 # map input types to rpc msg
5208 msg
= dict(type='Uniter',
5209 request
='WatchMeterStatus',
5212 _params
['entities'] = entities
5213 reply
= await self
.rpc(msg
)
5218 @ReturnMapping(RelationUnitsWatchResults
)
5219 async def WatchRelationUnits(self
, relation_units
):
5221 relation_units : typing.Sequence[~RelationUnit]
5222 Returns -> typing.Sequence[~RelationUnitsWatchResult]
5224 # map input types to rpc msg
5226 msg
= dict(type='Uniter',
5227 request
='WatchRelationUnits',
5230 _params
['relation-units'] = relation_units
5231 reply
= await self
.rpc(msg
)
5236 @ReturnMapping(NotifyWatchResults
)
5237 async def WatchStorageAttachments(self
, ids
):
5239 ids : typing.Sequence[~StorageAttachmentId]
5240 Returns -> typing.Sequence[~NotifyWatchResult]
5242 # map input types to rpc msg
5244 msg
= dict(type='Uniter',
5245 request
='WatchStorageAttachments',
5248 _params
['ids'] = ids
5249 reply
= await self
.rpc(msg
)
5254 @ReturnMapping(NotifyWatchResults
)
5255 async def WatchUnitAddresses(self
, entities
):
5257 entities : typing.Sequence[~Entity]
5258 Returns -> typing.Sequence[~NotifyWatchResult]
5260 # map input types to rpc msg
5262 msg
= dict(type='Uniter',
5263 request
='WatchUnitAddresses',
5266 _params
['entities'] = entities
5267 reply
= await self
.rpc(msg
)
5272 @ReturnMapping(StringsWatchResults
)
5273 async def WatchUnitRelations(self
, entities
):
5275 entities : typing.Sequence[~Entity]
5276 Returns -> typing.Sequence[~StringsWatchResult]
5278 # map input types to rpc msg
5280 msg
= dict(type='Uniter',
5281 request
='WatchUnitRelations',
5284 _params
['entities'] = entities
5285 reply
= await self
.rpc(msg
)
5290 @ReturnMapping(StringsWatchResults
)
5291 async def WatchUnitStorageAttachments(self
, entities
):
5293 entities : typing.Sequence[~Entity]
5294 Returns -> typing.Sequence[~StringsWatchResult]
5296 # map input types to rpc msg
5298 msg
= dict(type='Uniter',
5299 request
='WatchUnitStorageAttachments',
5302 _params
['entities'] = entities
5303 reply
= await self
.rpc(msg
)
5308 @ReturnMapping(StringResults
)
5309 async def WorkloadVersion(self
, entities
):
5311 entities : typing.Sequence[~Entity]
5312 Returns -> typing.Sequence[~StringResult]
5314 # map input types to rpc msg
5316 msg
= dict(type='Uniter',
5317 request
='WorkloadVersion',
5320 _params
['entities'] = entities
5321 reply
= await self
.rpc(msg
)