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
)