1 # DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py.
2 # Changes will be overwritten/lost when the file is regenerated.
4 from juju
.client
._definitions
import *
5 from juju
.client
.facade
import ReturnMapping
, Type
8 class ActionFacade(Type
):
11 schema
= {'definitions': {'Action': {'additionalProperties': False,
12 'properties': {'name': {'type': 'string'},
13 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
16 'receiver': {'type': 'string'},
17 'tag': {'type': 'string'}},
18 'required': ['tag', 'receiver', 'name'],
20 'ActionResult': {'additionalProperties': False,
21 'properties': {'action': {'$ref': '#/definitions/Action'},
22 'completed': {'format': 'date-time',
24 'enqueued': {'format': 'date-time',
26 'error': {'$ref': '#/definitions/Error'},
27 'message': {'type': 'string'},
28 'output': {'patternProperties': {'.*': {'additionalProperties': True,
31 'started': {'format': 'date-time',
33 'status': {'type': 'string'}},
35 'ActionResults': {'additionalProperties': False,
36 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
39 'ActionSpec': {'additionalProperties': False,
40 'properties': {'description': {'type': 'string'},
41 'params': {'patternProperties': {'.*': {'additionalProperties': True,
44 'required': ['description', 'params'],
46 'Actions': {'additionalProperties': False,
47 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
50 'ActionsByName': {'additionalProperties': False,
51 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
53 'error': {'$ref': '#/definitions/Error'},
54 'name': {'type': 'string'}},
56 'ActionsByNames': {'additionalProperties': False,
57 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
60 'ActionsByReceiver': {'additionalProperties': False,
61 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
63 'error': {'$ref': '#/definitions/Error'},
64 'receiver': {'type': 'string'}},
66 'ActionsByReceivers': {'additionalProperties': False,
67 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
70 'ApplicationCharmActionsResult': {'additionalProperties': False,
71 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
73 'application-tag': {'type': 'string'},
74 'error': {'$ref': '#/definitions/Error'}},
76 'ApplicationsCharmActionsResults': {'additionalProperties': False,
77 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
80 'Entities': {'additionalProperties': False,
81 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
83 'required': ['entities'],
85 'Entity': {'additionalProperties': False,
86 'properties': {'tag': {'type': 'string'}},
89 'Error': {'additionalProperties': False,
90 'properties': {'code': {'type': 'string'},
91 'info': {'$ref': '#/definitions/ErrorInfo'},
92 'message': {'type': 'string'}},
93 'required': ['message', 'code'],
95 'ErrorInfo': {'additionalProperties': False,
96 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
97 'macaroon-path': {'type': 'string'}},
99 'FindActionsByNames': {'additionalProperties': False,
100 'properties': {'names': {'items': {'type': 'string'},
103 'FindTags': {'additionalProperties': False,
104 'properties': {'prefixes': {'items': {'type': 'string'},
106 'required': ['prefixes'],
108 'FindTagsResults': {'additionalProperties': False,
109 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
112 'required': ['matches'],
114 'Macaroon': {'additionalProperties': False, 'type': 'object'},
115 'RunParams': {'additionalProperties': False,
116 'properties': {'applications': {'items': {'type': 'string'},
118 'commands': {'type': 'string'},
119 'machines': {'items': {'type': 'string'},
121 'timeout': {'type': 'integer'},
122 'units': {'items': {'type': 'string'},
124 'required': ['commands', 'timeout'],
126 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
127 'Result': {'$ref': '#/definitions/ActionResults'}},
129 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
130 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
132 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
133 'Result': {'$ref': '#/definitions/ActionResults'}},
135 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
136 'Result': {'$ref': '#/definitions/ActionResults'}},
138 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
139 'Result': {'$ref': '#/definitions/FindTagsResults'}},
141 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
142 'Result': {'$ref': '#/definitions/ActionsByNames'}},
144 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
145 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
147 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
148 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
150 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
151 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
153 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
154 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
156 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
157 'Result': {'$ref': '#/definitions/ActionResults'}},
159 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
160 'Result': {'$ref': '#/definitions/ActionResults'}},
165 @ReturnMapping(ActionResults
)
166 async def Actions(self
, entities
):
168 entities : typing.Sequence[~Entity]
169 Returns -> typing.Sequence[~ActionResult]
171 # map input types to rpc msg
173 msg
= dict(type='Action',
177 _params
['entities'] = entities
178 reply
= await self
.rpc(msg
)
183 @ReturnMapping(ApplicationsCharmActionsResults
)
184 async def ApplicationsCharmsActions(self
, entities
):
186 entities : typing.Sequence[~Entity]
187 Returns -> typing.Sequence[~ApplicationCharmActionsResult]
189 # map input types to rpc msg
191 msg
= dict(type='Action',
192 request
='ApplicationsCharmsActions',
195 _params
['entities'] = entities
196 reply
= await self
.rpc(msg
)
201 @ReturnMapping(ActionResults
)
202 async def Cancel(self
, entities
):
204 entities : typing.Sequence[~Entity]
205 Returns -> typing.Sequence[~ActionResult]
207 # map input types to rpc msg
209 msg
= dict(type='Action',
213 _params
['entities'] = entities
214 reply
= await self
.rpc(msg
)
219 @ReturnMapping(ActionResults
)
220 async def Enqueue(self
, actions
):
222 actions : typing.Sequence[~Action]
223 Returns -> typing.Sequence[~ActionResult]
225 # map input types to rpc msg
227 msg
= dict(type='Action',
231 _params
['actions'] = actions
232 reply
= await self
.rpc(msg
)
237 @ReturnMapping(FindTagsResults
)
238 async def FindActionTagsByPrefix(self
, prefixes
):
240 prefixes : typing.Sequence[str]
241 Returns -> typing.Sequence[~Entity]
243 # map input types to rpc msg
245 msg
= dict(type='Action',
246 request
='FindActionTagsByPrefix',
249 _params
['prefixes'] = prefixes
250 reply
= await self
.rpc(msg
)
255 @ReturnMapping(ActionsByNames
)
256 async def FindActionsByNames(self
, names
):
258 names : typing.Sequence[str]
259 Returns -> typing.Sequence[~ActionsByName]
261 # map input types to rpc msg
263 msg
= dict(type='Action',
264 request
='FindActionsByNames',
267 _params
['names'] = names
268 reply
= await self
.rpc(msg
)
273 @ReturnMapping(ActionsByReceivers
)
274 async def ListAll(self
, entities
):
276 entities : typing.Sequence[~Entity]
277 Returns -> typing.Sequence[~ActionsByReceiver]
279 # map input types to rpc msg
281 msg
= dict(type='Action',
285 _params
['entities'] = entities
286 reply
= await self
.rpc(msg
)
291 @ReturnMapping(ActionsByReceivers
)
292 async def ListCompleted(self
, entities
):
294 entities : typing.Sequence[~Entity]
295 Returns -> typing.Sequence[~ActionsByReceiver]
297 # map input types to rpc msg
299 msg
= dict(type='Action',
300 request
='ListCompleted',
303 _params
['entities'] = entities
304 reply
= await self
.rpc(msg
)
309 @ReturnMapping(ActionsByReceivers
)
310 async def ListPending(self
, entities
):
312 entities : typing.Sequence[~Entity]
313 Returns -> typing.Sequence[~ActionsByReceiver]
315 # map input types to rpc msg
317 msg
= dict(type='Action',
318 request
='ListPending',
321 _params
['entities'] = entities
322 reply
= await self
.rpc(msg
)
327 @ReturnMapping(ActionsByReceivers
)
328 async def ListRunning(self
, entities
):
330 entities : typing.Sequence[~Entity]
331 Returns -> typing.Sequence[~ActionsByReceiver]
333 # map input types to rpc msg
335 msg
= dict(type='Action',
336 request
='ListRunning',
339 _params
['entities'] = entities
340 reply
= await self
.rpc(msg
)
345 @ReturnMapping(ActionResults
)
346 async def Run(self
, applications
, commands
, machines
, timeout
, units
):
348 applications : typing.Sequence[str]
350 machines : typing.Sequence[str]
352 units : typing.Sequence[str]
353 Returns -> typing.Sequence[~ActionResult]
355 # map input types to rpc msg
357 msg
= dict(type='Action',
361 _params
['applications'] = applications
362 _params
['commands'] = commands
363 _params
['machines'] = machines
364 _params
['timeout'] = timeout
365 _params
['units'] = units
366 reply
= await self
.rpc(msg
)
371 @ReturnMapping(ActionResults
)
372 async def RunOnAllMachines(self
, applications
, commands
, machines
, timeout
, units
):
374 applications : typing.Sequence[str]
376 machines : typing.Sequence[str]
378 units : typing.Sequence[str]
379 Returns -> typing.Sequence[~ActionResult]
381 # map input types to rpc msg
383 msg
= dict(type='Action',
384 request
='RunOnAllMachines',
387 _params
['applications'] = applications
388 _params
['commands'] = commands
389 _params
['machines'] = machines
390 _params
['timeout'] = timeout
391 _params
['units'] = units
392 reply
= await self
.rpc(msg
)
397 class ApplicationFacade(Type
):
400 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
401 'properties': {'application': {'type': 'string'},
402 'num-units': {'type': 'integer'},
403 'placement': {'items': {'$ref': '#/definitions/Placement'},
405 'required': ['application',
409 'AddApplicationUnitsResults': {'additionalProperties': False,
410 'properties': {'units': {'items': {'type': 'string'},
412 'required': ['units'],
414 'AddRelation': {'additionalProperties': False,
415 'properties': {'endpoints': {'items': {'type': 'string'},
417 'required': ['endpoints'],
419 'AddRelationResults': {'additionalProperties': False,
420 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
422 'required': ['endpoints'],
424 'ApplicationCharmRelations': {'additionalProperties': False,
425 'properties': {'application': {'type': 'string'}},
426 'required': ['application'],
428 'ApplicationCharmRelationsResults': {'additionalProperties': False,
429 'properties': {'charm-relations': {'items': {'type': 'string'},
431 'required': ['charm-relations'],
433 'ApplicationDeploy': {'additionalProperties': False,
434 'properties': {'application': {'type': 'string'},
435 'channel': {'type': 'string'},
436 'charm-url': {'type': 'string'},
437 'config': {'patternProperties': {'.*': {'type': 'string'}},
439 'config-yaml': {'type': 'string'},
440 'constraints': {'$ref': '#/definitions/Value'},
441 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
443 'num-units': {'type': 'integer'},
444 'placement': {'items': {'$ref': '#/definitions/Placement'},
446 'resources': {'patternProperties': {'.*': {'type': 'string'}},
448 'series': {'type': 'string'},
449 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
451 'required': ['application',
459 'ApplicationDestroy': {'additionalProperties': False,
460 'properties': {'application': {'type': 'string'}},
461 'required': ['application'],
463 'ApplicationExpose': {'additionalProperties': False,
464 'properties': {'application': {'type': 'string'}},
465 'required': ['application'],
467 'ApplicationGet': {'additionalProperties': False,
468 'properties': {'application': {'type': 'string'}},
469 'required': ['application'],
471 'ApplicationGetResults': {'additionalProperties': False,
472 'properties': {'application': {'type': 'string'},
473 'charm': {'type': 'string'},
474 'config': {'patternProperties': {'.*': {'additionalProperties': True,
477 'constraints': {'$ref': '#/definitions/Value'},
478 'series': {'type': 'string'}},
479 'required': ['application',
485 'ApplicationMetricCredential': {'additionalProperties': False,
486 'properties': {'application': {'type': 'string'},
487 'metrics-credentials': {'items': {'type': 'integer'},
489 'required': ['application',
490 'metrics-credentials'],
492 'ApplicationMetricCredentials': {'additionalProperties': False,
493 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
495 'required': ['creds'],
497 'ApplicationSet': {'additionalProperties': False,
498 'properties': {'application': {'type': 'string'},
499 'options': {'patternProperties': {'.*': {'type': 'string'}},
501 'required': ['application', 'options'],
503 'ApplicationSetCharm': {'additionalProperties': False,
504 'properties': {'application': {'type': 'string'},
505 'channel': {'type': 'string'},
506 'charm-url': {'type': 'string'},
507 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
509 'config-settings-yaml': {'type': 'string'},
510 'force-series': {'type': 'boolean'},
511 'force-units': {'type': 'boolean'},
512 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
514 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
516 'required': ['application',
522 'ApplicationUnexpose': {'additionalProperties': False,
523 'properties': {'application': {'type': 'string'}},
524 'required': ['application'],
526 'ApplicationUnset': {'additionalProperties': False,
527 'properties': {'application': {'type': 'string'},
528 'options': {'items': {'type': 'string'},
530 'required': ['application', 'options'],
532 'ApplicationUpdate': {'additionalProperties': False,
533 'properties': {'application': {'type': 'string'},
534 'charm-url': {'type': 'string'},
535 'constraints': {'$ref': '#/definitions/Value'},
536 'force-charm-url': {'type': 'boolean'},
537 'force-series': {'type': 'boolean'},
538 'min-units': {'type': 'integer'},
539 'settings': {'patternProperties': {'.*': {'type': 'string'}},
541 'settings-yaml': {'type': 'string'}},
542 'required': ['application',
548 'ApplicationsDeploy': {'additionalProperties': False,
549 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
551 'required': ['applications'],
553 'CharmRelation': {'additionalProperties': False,
554 'properties': {'interface': {'type': 'string'},
555 'limit': {'type': 'integer'},
556 'name': {'type': 'string'},
557 'optional': {'type': 'boolean'},
558 'role': {'type': 'string'},
559 'scope': {'type': 'string'}},
567 'Constraints': {'additionalProperties': False,
568 'properties': {'Count': {'type': 'integer'},
569 'Pool': {'type': 'string'},
570 'Size': {'type': 'integer'}},
571 'required': ['Pool', 'Size', 'Count'],
573 'DestroyApplicationUnits': {'additionalProperties': False,
574 'properties': {'unit-names': {'items': {'type': 'string'},
576 'required': ['unit-names'],
578 'DestroyRelation': {'additionalProperties': False,
579 'properties': {'endpoints': {'items': {'type': 'string'},
581 'required': ['endpoints'],
583 'Error': {'additionalProperties': False,
584 'properties': {'code': {'type': 'string'},
585 'info': {'$ref': '#/definitions/ErrorInfo'},
586 'message': {'type': 'string'}},
587 'required': ['message', 'code'],
589 'ErrorInfo': {'additionalProperties': False,
590 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
591 'macaroon-path': {'type': 'string'}},
593 'ErrorResult': {'additionalProperties': False,
594 'properties': {'error': {'$ref': '#/definitions/Error'}},
596 'ErrorResults': {'additionalProperties': False,
597 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
599 'required': ['results'],
601 'GetApplicationConstraints': {'additionalProperties': False,
602 'properties': {'application': {'type': 'string'}},
603 'required': ['application'],
605 'GetConstraintsResults': {'additionalProperties': False,
606 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
607 'required': ['constraints'],
609 'Macaroon': {'additionalProperties': False, 'type': 'object'},
610 'Placement': {'additionalProperties': False,
611 'properties': {'directive': {'type': 'string'},
612 'scope': {'type': 'string'}},
613 'required': ['scope', 'directive'],
615 'SetConstraints': {'additionalProperties': False,
616 'properties': {'application': {'type': 'string'},
617 'constraints': {'$ref': '#/definitions/Value'}},
618 'required': ['application', 'constraints'],
620 'StorageConstraints': {'additionalProperties': False,
621 'properties': {'count': {'type': 'integer'},
622 'pool': {'type': 'string'},
623 'size': {'type': 'integer'}},
625 'StringResult': {'additionalProperties': False,
626 'properties': {'error': {'$ref': '#/definitions/Error'},
627 'result': {'type': 'string'}},
628 'required': ['result'],
630 'Value': {'additionalProperties': False,
631 'properties': {'arch': {'type': 'string'},
632 'container': {'type': 'string'},
633 'cores': {'type': 'integer'},
634 'cpu-power': {'type': 'integer'},
635 'instance-type': {'type': 'string'},
636 'mem': {'type': 'integer'},
637 'root-disk': {'type': 'integer'},
638 'spaces': {'items': {'type': 'string'},
640 'tags': {'items': {'type': 'string'},
642 'virt-type': {'type': 'string'}},
644 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
645 'Result': {'$ref': '#/definitions/AddRelationResults'}},
647 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
648 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
650 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
651 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
653 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
654 'Result': {'$ref': '#/definitions/ErrorResults'}},
656 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
658 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
660 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
662 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
664 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
665 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
667 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
668 'Result': {'$ref': '#/definitions/StringResult'}},
670 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
671 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
673 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
675 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
677 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
679 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
680 'Result': {'$ref': '#/definitions/ErrorResults'}},
682 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
684 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
686 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
691 @ReturnMapping(AddRelationResults
)
692 async def AddRelation(self
, endpoints
):
694 endpoints : typing.Sequence[str]
695 Returns -> typing.Mapping[str, ~CharmRelation]
697 # map input types to rpc msg
699 msg
= dict(type='Application',
700 request
='AddRelation',
703 _params
['endpoints'] = endpoints
704 reply
= await self
.rpc(msg
)
709 @ReturnMapping(AddApplicationUnitsResults
)
710 async def AddUnits(self
, application
, num_units
, placement
):
714 placement : typing.Sequence[~Placement]
715 Returns -> typing.Sequence[str]
717 # map input types to rpc msg
719 msg
= dict(type='Application',
723 _params
['application'] = application
724 _params
['num-units'] = num_units
725 _params
['placement'] = placement
726 reply
= await self
.rpc(msg
)
731 @ReturnMapping(ApplicationCharmRelationsResults
)
732 async def CharmRelations(self
, application
):
735 Returns -> typing.Sequence[str]
737 # map input types to rpc msg
739 msg
= dict(type='Application',
740 request
='CharmRelations',
743 _params
['application'] = application
744 reply
= await self
.rpc(msg
)
749 @ReturnMapping(ErrorResults
)
750 async def Deploy(self
, applications
):
752 applications : typing.Sequence[~ApplicationDeploy]
753 Returns -> typing.Sequence[~ErrorResult]
755 # map input types to rpc msg
757 msg
= dict(type='Application',
761 _params
['applications'] = applications
762 reply
= await self
.rpc(msg
)
768 async def Destroy(self
, application
):
773 # map input types to rpc msg
775 msg
= dict(type='Application',
779 _params
['application'] = application
780 reply
= await self
.rpc(msg
)
786 async def DestroyRelation(self
, endpoints
):
788 endpoints : typing.Sequence[str]
791 # map input types to rpc msg
793 msg
= dict(type='Application',
794 request
='DestroyRelation',
797 _params
['endpoints'] = endpoints
798 reply
= await self
.rpc(msg
)
804 async def DestroyUnits(self
, unit_names
):
806 unit_names : typing.Sequence[str]
809 # map input types to rpc msg
811 msg
= dict(type='Application',
812 request
='DestroyUnits',
815 _params
['unit-names'] = unit_names
816 reply
= await self
.rpc(msg
)
822 async def Expose(self
, application
):
827 # map input types to rpc msg
829 msg
= dict(type='Application',
833 _params
['application'] = application
834 reply
= await self
.rpc(msg
)
839 @ReturnMapping(ApplicationGetResults
)
840 async def Get(self
, application
):
843 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
845 # map input types to rpc msg
847 msg
= dict(type='Application',
851 _params
['application'] = application
852 reply
= await self
.rpc(msg
)
857 @ReturnMapping(StringResult
)
858 async def GetCharmURL(self
, application
):
861 Returns -> typing.Union[_ForwardRef('Error'), str]
863 # map input types to rpc msg
865 msg
= dict(type='Application',
866 request
='GetCharmURL',
869 _params
['application'] = application
870 reply
= await self
.rpc(msg
)
875 @ReturnMapping(GetConstraintsResults
)
876 async def GetConstraints(self
, application
):
881 # map input types to rpc msg
883 msg
= dict(type='Application',
884 request
='GetConstraints',
887 _params
['application'] = application
888 reply
= await self
.rpc(msg
)
894 async def Set(self
, application
, options
):
897 options : typing.Mapping[str, str]
900 # map input types to rpc msg
902 msg
= dict(type='Application',
906 _params
['application'] = application
907 _params
['options'] = options
908 reply
= await self
.rpc(msg
)
914 async def SetCharm(self
, application
, channel
, charm_url
, config_settings
, config_settings_yaml
, force_series
, force_units
, resource_ids
, storage_constraints
):
919 config_settings : typing.Mapping[str, str]
920 config_settings_yaml : str
923 resource_ids : typing.Mapping[str, str]
924 storage_constraints : typing.Mapping[str, ~StorageConstraints]
927 # map input types to rpc msg
929 msg
= dict(type='Application',
933 _params
['application'] = application
934 _params
['channel'] = channel
935 _params
['charm-url'] = charm_url
936 _params
['config-settings'] = config_settings
937 _params
['config-settings-yaml'] = config_settings_yaml
938 _params
['force-series'] = force_series
939 _params
['force-units'] = force_units
940 _params
['resource-ids'] = resource_ids
941 _params
['storage-constraints'] = storage_constraints
942 reply
= await self
.rpc(msg
)
948 async def SetConstraints(self
, application
, constraints
):
954 # map input types to rpc msg
956 msg
= dict(type='Application',
957 request
='SetConstraints',
960 _params
['application'] = application
961 _params
['constraints'] = constraints
962 reply
= await self
.rpc(msg
)
967 @ReturnMapping(ErrorResults
)
968 async def SetMetricCredentials(self
, creds
):
970 creds : typing.Sequence[~ApplicationMetricCredential]
971 Returns -> typing.Sequence[~ErrorResult]
973 # map input types to rpc msg
975 msg
= dict(type='Application',
976 request
='SetMetricCredentials',
979 _params
['creds'] = creds
980 reply
= await self
.rpc(msg
)
986 async def Unexpose(self
, application
):
991 # map input types to rpc msg
993 msg
= dict(type='Application',
997 _params
['application'] = application
998 reply
= await self
.rpc(msg
)
1003 @ReturnMapping(None)
1004 async def Unset(self
, application
, options
):
1007 options : typing.Sequence[str]
1010 # map input types to rpc msg
1012 msg
= dict(type='Application',
1016 _params
['application'] = application
1017 _params
['options'] = options
1018 reply
= await self
.rpc(msg
)
1023 @ReturnMapping(None)
1024 async def Update(self
, application
, charm_url
, constraints
, force_charm_url
, force_series
, min_units
, settings
, settings_yaml
):
1029 force_charm_url : bool
1032 settings : typing.Mapping[str, str]
1036 # map input types to rpc msg
1038 msg
= dict(type='Application',
1042 _params
['application'] = application
1043 _params
['charm-url'] = charm_url
1044 _params
['constraints'] = constraints
1045 _params
['force-charm-url'] = force_charm_url
1046 _params
['force-series'] = force_series
1047 _params
['min-units'] = min_units
1048 _params
['settings'] = settings
1049 _params
['settings-yaml'] = settings_yaml
1050 reply
= await self
.rpc(msg
)
1055 class CloudFacade(Type
):
1058 schema
= {'definitions': {'AddCloudArgs': {'additionalProperties': False,
1059 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
1060 'name': {'type': 'string'}},
1061 'required': ['cloud', 'name'],
1063 'Cloud': {'additionalProperties': False,
1064 'properties': {'auth-types': {'items': {'type': 'string'},
1066 'ca-certificates': {'items': {'type': 'string'},
1068 'endpoint': {'type': 'string'},
1069 'identity-endpoint': {'type': 'string'},
1070 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
1072 'storage-endpoint': {'type': 'string'},
1073 'type': {'type': 'string'}},
1074 'required': ['type'],
1076 'CloudCredential': {'additionalProperties': False,
1077 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1079 'auth-type': {'type': 'string'},
1080 'redacted': {'items': {'type': 'string'},
1082 'required': ['auth-type'],
1084 'CloudCredentialArg': {'additionalProperties': False,
1085 'properties': {'cloud-name': {'type': 'string'},
1086 'credential-name': {'type': 'string'}},
1087 'required': ['cloud-name',
1090 'CloudCredentialArgs': {'additionalProperties': False,
1091 'properties': {'credentials': {'items': {'$ref': '#/definitions/CloudCredentialArg'},
1093 'include-secrets': {'type': 'boolean'}},
1094 'required': ['include-secrets'],
1096 'CloudCredentialResult': {'additionalProperties': False,
1097 'properties': {'error': {'$ref': '#/definitions/Error'},
1098 'result': {'$ref': '#/definitions/CloudCredential'}},
1100 'CloudCredentialResults': {'additionalProperties': False,
1101 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
1104 'CloudDetails': {'additionalProperties': False,
1105 'properties': {'auth-types': {'items': {'type': 'string'},
1107 'endpoint': {'type': 'string'},
1108 'identity-endpoint': {'type': 'string'},
1109 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
1111 'storage-endpoint': {'type': 'string'},
1112 'type': {'type': 'string'}},
1113 'required': ['type'],
1115 'CloudInfo': {'additionalProperties': False,
1116 'properties': {'CloudDetails': {'$ref': '#/definitions/CloudDetails'},
1117 'users': {'items': {'$ref': '#/definitions/CloudUserInfo'},
1119 'required': ['CloudDetails', 'users'],
1121 'CloudInfoResult': {'additionalProperties': False,
1122 'properties': {'error': {'$ref': '#/definitions/Error'},
1123 'result': {'$ref': '#/definitions/CloudInfo'}},
1125 'CloudInfoResults': {'additionalProperties': False,
1126 'properties': {'results': {'items': {'$ref': '#/definitions/CloudInfoResult'},
1128 'required': ['results'],
1130 'CloudInstanceTypesConstraint': {'additionalProperties': False,
1131 'properties': {'cloud-tag': {'type': 'string'},
1132 'constraints': {'$ref': '#/definitions/Value'},
1133 'region': {'type': 'string'}},
1134 'required': ['cloud-tag',
1137 'CloudInstanceTypesConstraints': {'additionalProperties': False,
1138 'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'},
1140 'required': ['constraints'],
1142 'CloudRegion': {'additionalProperties': False,
1143 'properties': {'endpoint': {'type': 'string'},
1144 'identity-endpoint': {'type': 'string'},
1145 'name': {'type': 'string'},
1146 'storage-endpoint': {'type': 'string'}},
1147 'required': ['name'],
1149 'CloudResult': {'additionalProperties': False,
1150 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
1151 'error': {'$ref': '#/definitions/Error'}},
1153 'CloudResults': {'additionalProperties': False,
1154 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
1157 'CloudUserInfo': {'additionalProperties': False,
1158 'properties': {'access': {'type': 'string'},
1159 'display-name': {'type': 'string'},
1160 'user': {'type': 'string'}},
1161 'required': ['user',
1165 'CloudsResult': {'additionalProperties': False,
1166 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
1169 'ControllerCredentialInfo': {'additionalProperties': False,
1170 'properties': {'content': {'$ref': '#/definitions/CredentialContent'},
1171 'models': {'items': {'$ref': '#/definitions/ModelAccess'},
1174 'CredentialContent': {'additionalProperties': False,
1175 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1177 'auth-type': {'type': 'string'},
1178 'cloud': {'type': 'string'},
1179 'name': {'type': 'string'}},
1180 'required': ['name',
1184 'CredentialContentResult': {'additionalProperties': False,
1185 'properties': {'error': {'$ref': '#/definitions/Error'},
1186 'result': {'$ref': '#/definitions/ControllerCredentialInfo'}},
1188 'CredentialContentResults': {'additionalProperties': False,
1189 'properties': {'results': {'items': {'$ref': '#/definitions/CredentialContentResult'},
1192 'Entities': {'additionalProperties': False,
1193 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1195 'required': ['entities'],
1197 'Entity': {'additionalProperties': False,
1198 'properties': {'tag': {'type': 'string'}},
1199 'required': ['tag'],
1201 'Error': {'additionalProperties': False,
1202 'properties': {'code': {'type': 'string'},
1203 'info': {'$ref': '#/definitions/ErrorInfo'},
1204 'message': {'type': 'string'}},
1205 'required': ['message', 'code'],
1207 'ErrorInfo': {'additionalProperties': False,
1208 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1209 'macaroon-path': {'type': 'string'}},
1211 'ErrorResult': {'additionalProperties': False,
1212 'properties': {'error': {'$ref': '#/definitions/Error'}},
1214 'ErrorResults': {'additionalProperties': False,
1215 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1217 'required': ['results'],
1219 'InstanceType': {'additionalProperties': False,
1220 'properties': {'arches': {'items': {'type': 'string'},
1222 'cost': {'type': 'integer'},
1223 'cpu-cores': {'type': 'integer'},
1224 'deprecated': {'type': 'boolean'},
1225 'memory': {'type': 'integer'},
1226 'name': {'type': 'string'},
1227 'root-disk': {'type': 'integer'},
1228 'virt-type': {'type': 'string'}},
1229 'required': ['arches', 'cpu-cores', 'memory'],
1231 'InstanceTypesResult': {'additionalProperties': False,
1232 'properties': {'cost-currency': {'type': 'string'},
1233 'cost-divisor': {'type': 'integer'},
1234 'cost-unit': {'type': 'string'},
1235 'error': {'$ref': '#/definitions/Error'},
1236 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
1239 'InstanceTypesResults': {'additionalProperties': False,
1240 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
1242 'required': ['results'],
1244 'ListCloudInfo': {'additionalProperties': False,
1245 'properties': {'CloudDetails': {'$ref': '#/definitions/CloudDetails'},
1246 'user-access': {'type': 'string'}},
1247 'required': ['CloudDetails', 'user-access'],
1249 'ListCloudInfoResult': {'additionalProperties': False,
1250 'properties': {'error': {'$ref': '#/definitions/Error'},
1251 'result': {'$ref': '#/definitions/ListCloudInfo'}},
1253 'ListCloudInfoResults': {'additionalProperties': False,
1254 'properties': {'results': {'items': {'$ref': '#/definitions/ListCloudInfoResult'},
1256 'required': ['results'],
1258 'ListCloudsRequest': {'additionalProperties': False,
1259 'properties': {'all': {'type': 'boolean'},
1260 'user-tag': {'type': 'string'}},
1261 'required': ['user-tag'],
1263 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1264 'ModelAccess': {'additionalProperties': False,
1265 'properties': {'access': {'type': 'string'},
1266 'model': {'type': 'string'}},
1268 'ModifyCloudAccess': {'additionalProperties': False,
1269 'properties': {'access': {'type': 'string'},
1270 'action': {'type': 'string'},
1271 'cloud-tag': {'type': 'string'},
1272 'user-tag': {'type': 'string'}},
1273 'required': ['user-tag',
1278 'ModifyCloudAccessRequest': {'additionalProperties': False,
1279 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyCloudAccess'},
1281 'required': ['changes'],
1283 'RevokeCredentialArg': {'additionalProperties': False,
1284 'properties': {'force': {'type': 'boolean'},
1285 'tag': {'type': 'string'}},
1286 'required': ['tag', 'force'],
1288 'RevokeCredentialArgs': {'additionalProperties': False,
1289 'properties': {'credentials': {'items': {'$ref': '#/definitions/RevokeCredentialArg'},
1291 'required': ['credentials'],
1293 'StringResult': {'additionalProperties': False,
1294 'properties': {'error': {'$ref': '#/definitions/Error'},
1295 'result': {'type': 'string'}},
1296 'required': ['result'],
1298 'StringsResult': {'additionalProperties': False,
1299 'properties': {'error': {'$ref': '#/definitions/Error'},
1300 'result': {'items': {'type': 'string'},
1303 'StringsResults': {'additionalProperties': False,
1304 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1306 'required': ['results'],
1308 'TaggedCredential': {'additionalProperties': False,
1309 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
1310 'tag': {'type': 'string'}},
1311 'required': ['tag', 'credential'],
1313 'TaggedCredentials': {'additionalProperties': False,
1314 'properties': {'credentials': {'items': {'$ref': '#/definitions/TaggedCredential'},
1317 'UpdateCredentialArgs': {'additionalProperties': False,
1318 'properties': {'credentials': {'items': {'$ref': '#/definitions/TaggedCredential'},
1320 'force': {'type': 'boolean'}},
1321 'required': ['credentials', 'force'],
1323 'UpdateCredentialModelResult': {'additionalProperties': False,
1324 'properties': {'errors': {'items': {'$ref': '#/definitions/ErrorResult'},
1326 'name': {'type': 'string'},
1327 'uuid': {'type': 'string'}},
1328 'required': ['uuid', 'name'],
1330 'UpdateCredentialResult': {'additionalProperties': False,
1331 'properties': {'error': {'$ref': '#/definitions/Error'},
1332 'models': {'items': {'$ref': '#/definitions/UpdateCredentialModelResult'},
1334 'tag': {'type': 'string'}},
1335 'required': ['tag'],
1337 'UpdateCredentialResults': {'additionalProperties': False,
1338 'properties': {'results': {'items': {'$ref': '#/definitions/UpdateCredentialResult'},
1341 'UserCloud': {'additionalProperties': False,
1342 'properties': {'cloud-tag': {'type': 'string'},
1343 'user-tag': {'type': 'string'}},
1344 'required': ['user-tag', 'cloud-tag'],
1346 'UserClouds': {'additionalProperties': False,
1347 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
1350 'Value': {'additionalProperties': False,
1351 'properties': {'arch': {'type': 'string'},
1352 'container': {'type': 'string'},
1353 'cores': {'type': 'integer'},
1354 'cpu-power': {'type': 'integer'},
1355 'instance-type': {'type': 'string'},
1356 'mem': {'type': 'integer'},
1357 'root-disk': {'type': 'integer'},
1358 'spaces': {'items': {'type': 'string'},
1360 'tags': {'items': {'type': 'string'},
1362 'virt-type': {'type': 'string'},
1363 'zones': {'items': {'type': 'string'},
1366 'properties': {'AddCloud': {'properties': {'Params': {'$ref': '#/definitions/AddCloudArgs'}},
1368 'AddCredentials': {'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'},
1369 'Result': {'$ref': '#/definitions/ErrorResults'}},
1371 'CheckCredentialsModels': {'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'},
1372 'Result': {'$ref': '#/definitions/UpdateCredentialResults'}},
1374 'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1375 'Result': {'$ref': '#/definitions/CloudResults'}},
1377 'CloudInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1378 'Result': {'$ref': '#/definitions/CloudInfoResults'}},
1380 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
1382 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1383 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
1385 'CredentialContents': {'properties': {'Params': {'$ref': '#/definitions/CloudCredentialArgs'},
1386 'Result': {'$ref': '#/definitions/CredentialContentResults'}},
1388 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1390 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
1391 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
1393 'ListCloudInfo': {'properties': {'Params': {'$ref': '#/definitions/ListCloudsRequest'},
1394 'Result': {'$ref': '#/definitions/ListCloudInfoResults'}},
1396 'ModifyCloudAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyCloudAccessRequest'},
1397 'Result': {'$ref': '#/definitions/ErrorResults'}},
1399 'RemoveClouds': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1400 'Result': {'$ref': '#/definitions/ErrorResults'}},
1402 'RevokeCredentialsCheckModels': {'properties': {'Params': {'$ref': '#/definitions/RevokeCredentialArgs'},
1403 'Result': {'$ref': '#/definitions/ErrorResults'}},
1405 'UpdateCredentialsCheckModels': {'properties': {'Params': {'$ref': '#/definitions/UpdateCredentialArgs'},
1406 'Result': {'$ref': '#/definitions/UpdateCredentialResults'}},
1408 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
1409 'Result': {'$ref': '#/definitions/StringsResults'}},
1414 @ReturnMapping(None)
1415 async def AddCloud(self
, cloud
, name
):
1421 # map input types to rpc msg
1423 msg
= dict(type='Cloud',
1427 _params
['cloud'] = cloud
1428 _params
['name'] = name
1429 reply
= await self
.rpc(msg
)
1434 @ReturnMapping(ErrorResults
)
1435 async def AddCredentials(self
, credentials
):
1437 credentials : typing.Sequence[~TaggedCredential]
1438 Returns -> typing.Sequence[~ErrorResult]
1440 # map input types to rpc msg
1442 msg
= dict(type='Cloud',
1443 request
='AddCredentials',
1446 _params
['credentials'] = credentials
1447 reply
= await self
.rpc(msg
)
1452 @ReturnMapping(UpdateCredentialResults
)
1453 async def CheckCredentialsModels(self
, credentials
):
1455 credentials : typing.Sequence[~TaggedCredential]
1456 Returns -> typing.Sequence[~UpdateCredentialResult]
1458 # map input types to rpc msg
1460 msg
= dict(type='Cloud',
1461 request
='CheckCredentialsModels',
1464 _params
['credentials'] = credentials
1465 reply
= await self
.rpc(msg
)
1470 @ReturnMapping(CloudResults
)
1471 async def Cloud(self
, entities
):
1473 entities : typing.Sequence[~Entity]
1474 Returns -> typing.Sequence[~CloudResult]
1476 # map input types to rpc msg
1478 msg
= dict(type='Cloud',
1482 _params
['entities'] = entities
1483 reply
= await self
.rpc(msg
)
1488 @ReturnMapping(CloudInfoResults
)
1489 async def CloudInfo(self
, entities
):
1491 entities : typing.Sequence[~Entity]
1492 Returns -> typing.Sequence[~CloudInfoResult]
1494 # map input types to rpc msg
1496 msg
= dict(type='Cloud',
1497 request
='CloudInfo',
1500 _params
['entities'] = entities
1501 reply
= await self
.rpc(msg
)
1506 @ReturnMapping(CloudsResult
)
1507 async def Clouds(self
):
1510 Returns -> typing.Mapping[str, ~Cloud]
1512 # map input types to rpc msg
1514 msg
= dict(type='Cloud',
1519 reply
= await self
.rpc(msg
)
1524 @ReturnMapping(CloudCredentialResults
)
1525 async def Credential(self
, entities
):
1527 entities : typing.Sequence[~Entity]
1528 Returns -> typing.Sequence[~CloudCredentialResult]
1530 # map input types to rpc msg
1532 msg
= dict(type='Cloud',
1533 request
='Credential',
1536 _params
['entities'] = entities
1537 reply
= await self
.rpc(msg
)
1542 @ReturnMapping(CredentialContentResults
)
1543 async def CredentialContents(self
, credentials
, include_secrets
):
1545 credentials : typing.Sequence[~CloudCredentialArg]
1546 include_secrets : bool
1547 Returns -> typing.Sequence[~CredentialContentResult]
1549 # map input types to rpc msg
1551 msg
= dict(type='Cloud',
1552 request
='CredentialContents',
1555 _params
['credentials'] = credentials
1556 _params
['include-secrets'] = include_secrets
1557 reply
= await self
.rpc(msg
)
1562 @ReturnMapping(StringResult
)
1563 async def DefaultCloud(self
):
1566 Returns -> typing.Union[_ForwardRef('Error'), str]
1568 # map input types to rpc msg
1570 msg
= dict(type='Cloud',
1571 request
='DefaultCloud',
1575 reply
= await self
.rpc(msg
)
1580 @ReturnMapping(InstanceTypesResults
)
1581 async def InstanceTypes(self
, constraints
):
1583 constraints : typing.Sequence[~CloudInstanceTypesConstraint]
1584 Returns -> typing.Sequence[~InstanceTypesResult]
1586 # map input types to rpc msg
1588 msg
= dict(type='Cloud',
1589 request
='InstanceTypes',
1592 _params
['constraints'] = constraints
1593 reply
= await self
.rpc(msg
)
1598 @ReturnMapping(ListCloudInfoResults
)
1599 async def ListCloudInfo(self
, all_
, user_tag
):
1603 Returns -> typing.Sequence[~ListCloudInfoResult]
1605 # map input types to rpc msg
1607 msg
= dict(type='Cloud',
1608 request
='ListCloudInfo',
1611 _params
['all'] = all_
1612 _params
['user-tag'] = user_tag
1613 reply
= await self
.rpc(msg
)
1618 @ReturnMapping(ErrorResults
)
1619 async def ModifyCloudAccess(self
, changes
):
1621 changes : typing.Sequence[~ModifyCloudAccess]
1622 Returns -> typing.Sequence[~ErrorResult]
1624 # map input types to rpc msg
1626 msg
= dict(type='Cloud',
1627 request
='ModifyCloudAccess',
1630 _params
['changes'] = changes
1631 reply
= await self
.rpc(msg
)
1636 @ReturnMapping(ErrorResults
)
1637 async def RemoveClouds(self
, entities
):
1639 entities : typing.Sequence[~Entity]
1640 Returns -> typing.Sequence[~ErrorResult]
1642 # map input types to rpc msg
1644 msg
= dict(type='Cloud',
1645 request
='RemoveClouds',
1648 _params
['entities'] = entities
1649 reply
= await self
.rpc(msg
)
1654 @ReturnMapping(ErrorResults
)
1655 async def RevokeCredentialsCheckModels(self
, credentials
):
1657 credentials : typing.Sequence[~RevokeCredentialArg]
1658 Returns -> typing.Sequence[~ErrorResult]
1660 # map input types to rpc msg
1662 msg
= dict(type='Cloud',
1663 request
='RevokeCredentialsCheckModels',
1666 _params
['credentials'] = credentials
1667 reply
= await self
.rpc(msg
)
1672 @ReturnMapping(UpdateCredentialResults
)
1673 async def UpdateCredentialsCheckModels(self
, credentials
, force
):
1675 credentials : typing.Sequence[~TaggedCredential]
1677 Returns -> typing.Sequence[~UpdateCredentialResult]
1679 # map input types to rpc msg
1681 msg
= dict(type='Cloud',
1682 request
='UpdateCredentialsCheckModels',
1685 _params
['credentials'] = credentials
1686 _params
['force'] = force
1687 reply
= await self
.rpc(msg
)
1692 @ReturnMapping(StringsResults
)
1693 async def UserCredentials(self
, user_clouds
):
1695 user_clouds : typing.Sequence[~UserCloud]
1696 Returns -> typing.Sequence[~StringsResult]
1698 # map input types to rpc msg
1700 msg
= dict(type='Cloud',
1701 request
='UserCredentials',
1704 _params
['user-clouds'] = user_clouds
1705 reply
= await self
.rpc(msg
)
1710 class ControllerFacade(Type
):
1713 schema
= {'definitions': {'AllWatcherId': {'additionalProperties': False,
1714 'properties': {'watcher-id': {'type': 'string'}},
1715 'required': ['watcher-id'],
1717 'CloudCredential': {'additionalProperties': False,
1718 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1720 'auth-type': {'type': 'string'},
1721 'redacted': {'items': {'type': 'string'},
1723 'required': ['auth-type'],
1725 'CloudSpec': {'additionalProperties': False,
1726 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
1727 'endpoint': {'type': 'string'},
1728 'identity-endpoint': {'type': 'string'},
1729 'name': {'type': 'string'},
1730 'region': {'type': 'string'},
1731 'storage-endpoint': {'type': 'string'},
1732 'type': {'type': 'string'}},
1733 'required': ['type', 'name'],
1735 'CloudSpecResult': {'additionalProperties': False,
1736 'properties': {'error': {'$ref': '#/definitions/Error'},
1737 'result': {'$ref': '#/definitions/CloudSpec'}},
1739 'CloudSpecResults': {'additionalProperties': False,
1740 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
1743 'ConfigValue': {'additionalProperties': False,
1744 'properties': {'source': {'type': 'string'},
1745 'value': {'additionalProperties': True,
1747 'required': ['value', 'source'],
1749 'ControllerConfigResult': {'additionalProperties': False,
1750 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1753 'required': ['config'],
1755 'DestroyControllerArgs': {'additionalProperties': False,
1756 'properties': {'destroy-models': {'type': 'boolean'}},
1757 'required': ['destroy-models'],
1759 'Entities': {'additionalProperties': False,
1760 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1762 'required': ['entities'],
1764 'Entity': {'additionalProperties': False,
1765 'properties': {'tag': {'type': 'string'}},
1766 'required': ['tag'],
1768 'Error': {'additionalProperties': False,
1769 'properties': {'code': {'type': 'string'},
1770 'info': {'$ref': '#/definitions/ErrorInfo'},
1771 'message': {'type': 'string'}},
1772 'required': ['message', 'code'],
1774 'ErrorInfo': {'additionalProperties': False,
1775 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1776 'macaroon-path': {'type': 'string'}},
1778 'ErrorResult': {'additionalProperties': False,
1779 'properties': {'error': {'$ref': '#/definitions/Error'}},
1781 'ErrorResults': {'additionalProperties': False,
1782 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1784 'required': ['results'],
1786 'HostedModelConfig': {'additionalProperties': False,
1787 'properties': {'cloud-spec': {'$ref': '#/definitions/CloudSpec'},
1788 'config': {'patternProperties': {'.*': {'additionalProperties': True,
1791 'error': {'$ref': '#/definitions/Error'},
1792 'name': {'type': 'string'},
1793 'owner': {'type': 'string'}},
1794 'required': ['name', 'owner'],
1796 'HostedModelConfigsResults': {'additionalProperties': False,
1797 'properties': {'models': {'items': {'$ref': '#/definitions/HostedModelConfig'},
1799 'required': ['models'],
1801 'InitiateMigrationArgs': {'additionalProperties': False,
1802 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
1804 'required': ['specs'],
1806 'InitiateMigrationResult': {'additionalProperties': False,
1807 'properties': {'error': {'$ref': '#/definitions/Error'},
1808 'migration-id': {'type': 'string'},
1809 'model-tag': {'type': 'string'}},
1810 'required': ['model-tag',
1813 'InitiateMigrationResults': {'additionalProperties': False,
1814 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
1816 'required': ['results'],
1818 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1819 'MachineHardware': {'additionalProperties': False,
1820 'properties': {'arch': {'type': 'string'},
1821 'availability-zone': {'type': 'string'},
1822 'cores': {'type': 'integer'},
1823 'cpu-power': {'type': 'integer'},
1824 'mem': {'type': 'integer'},
1825 'root-disk': {'type': 'integer'},
1826 'tags': {'items': {'type': 'string'},
1829 'MigrationSpec': {'additionalProperties': False,
1830 'properties': {'model-tag': {'type': 'string'},
1831 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
1832 'required': ['model-tag', 'target-info'],
1834 'MigrationTargetInfo': {'additionalProperties': False,
1835 'properties': {'addrs': {'items': {'type': 'string'},
1837 'auth-tag': {'type': 'string'},
1838 'ca-cert': {'type': 'string'},
1839 'controller-tag': {'type': 'string'},
1840 'macaroons': {'type': 'string'},
1841 'password': {'type': 'string'}},
1842 'required': ['controller-tag',
1847 'Model': {'additionalProperties': False,
1848 'properties': {'name': {'type': 'string'},
1849 'owner-tag': {'type': 'string'},
1850 'uuid': {'type': 'string'}},
1851 'required': ['name', 'uuid', 'owner-tag'],
1853 'ModelBlockInfo': {'additionalProperties': False,
1854 'properties': {'blocks': {'items': {'type': 'string'},
1856 'model-uuid': {'type': 'string'},
1857 'name': {'type': 'string'},
1858 'owner-tag': {'type': 'string'}},
1859 'required': ['name',
1864 'ModelBlockInfoList': {'additionalProperties': False,
1865 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
1868 'ModelConfigResults': {'additionalProperties': False,
1869 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
1871 'required': ['config'],
1873 'ModelMachineInfo': {'additionalProperties': False,
1874 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
1875 'has-vote': {'type': 'boolean'},
1876 'id': {'type': 'string'},
1877 'instance-id': {'type': 'string'},
1878 'status': {'type': 'string'},
1879 'wants-vote': {'type': 'boolean'}},
1882 'ModelStatus': {'additionalProperties': False,
1883 'properties': {'application-count': {'type': 'integer'},
1884 'hosted-machine-count': {'type': 'integer'},
1885 'life': {'type': 'string'},
1886 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
1888 'model-tag': {'type': 'string'},
1889 'owner-tag': {'type': 'string'}},
1890 'required': ['model-tag',
1892 'hosted-machine-count',
1893 'application-count',
1896 'ModelStatusResults': {'additionalProperties': False,
1897 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
1899 'required': ['models'],
1901 'ModelTag': {'additionalProperties': False, 'type': 'object'},
1902 'ModifyControllerAccess': {'additionalProperties': False,
1903 'properties': {'access': {'type': 'string'},
1904 'action': {'type': 'string'},
1905 'user-tag': {'type': 'string'}},
1906 'required': ['user-tag',
1910 'ModifyControllerAccessRequest': {'additionalProperties': False,
1911 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
1913 'required': ['changes'],
1915 'RemoveBlocksArgs': {'additionalProperties': False,
1916 'properties': {'all': {'type': 'boolean'}},
1917 'required': ['all'],
1919 'UserAccess': {'additionalProperties': False,
1920 'properties': {'access': {'type': 'string'},
1921 'user-tag': {'type': 'string'}},
1922 'required': ['user-tag', 'access'],
1924 'UserAccessResult': {'additionalProperties': False,
1925 'properties': {'error': {'$ref': '#/definitions/Error'},
1926 'result': {'$ref': '#/definitions/UserAccess'}},
1928 'UserAccessResults': {'additionalProperties': False,
1929 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
1932 'UserModel': {'additionalProperties': False,
1933 'properties': {'last-connection': {'format': 'date-time',
1935 'model': {'$ref': '#/definitions/Model'}},
1936 'required': ['model', 'last-connection'],
1938 'UserModelList': {'additionalProperties': False,
1939 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
1941 'required': ['user-models'],
1943 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
1945 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1946 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
1948 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
1950 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
1952 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
1953 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
1955 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1956 'Result': {'$ref': '#/definitions/UserAccessResults'}},
1958 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}},
1960 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
1961 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
1963 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
1965 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
1967 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1968 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
1970 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
1971 'Result': {'$ref': '#/definitions/ErrorResults'}},
1973 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
1975 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
1980 @ReturnMapping(UserModelList
)
1981 async def AllModels(self
):
1984 Returns -> typing.Sequence[~UserModel]
1986 # map input types to rpc msg
1988 msg
= dict(type='Controller',
1989 request
='AllModels',
1993 reply
= await self
.rpc(msg
)
1998 @ReturnMapping(CloudSpecResults
)
1999 async def CloudSpec(self
, entities
):
2001 entities : typing.Sequence[~Entity]
2002 Returns -> typing.Sequence[~CloudSpecResult]
2004 # map input types to rpc msg
2006 msg
= dict(type='Controller',
2007 request
='CloudSpec',
2010 _params
['entities'] = entities
2011 reply
= await self
.rpc(msg
)
2016 @ReturnMapping(ControllerConfigResult
)
2017 async def ControllerConfig(self
):
2020 Returns -> typing.Mapping[str, typing.Any]
2022 # map input types to rpc msg
2024 msg
= dict(type='Controller',
2025 request
='ControllerConfig',
2029 reply
= await self
.rpc(msg
)
2034 @ReturnMapping(None)
2035 async def DestroyController(self
, destroy_models
):
2037 destroy_models : bool
2040 # map input types to rpc msg
2042 msg
= dict(type='Controller',
2043 request
='DestroyController',
2046 _params
['destroy-models'] = destroy_models
2047 reply
= await self
.rpc(msg
)
2052 @ReturnMapping(CloudSpecResult
)
2053 async def GetCloudSpec(self
):
2056 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
2058 # map input types to rpc msg
2060 msg
= dict(type='Controller',
2061 request
='GetCloudSpec',
2065 reply
= await self
.rpc(msg
)
2070 @ReturnMapping(UserAccessResults
)
2071 async def GetControllerAccess(self
, entities
):
2073 entities : typing.Sequence[~Entity]
2074 Returns -> typing.Sequence[~UserAccessResult]
2076 # map input types to rpc msg
2078 msg
= dict(type='Controller',
2079 request
='GetControllerAccess',
2082 _params
['entities'] = entities
2083 reply
= await self
.rpc(msg
)
2088 @ReturnMapping(HostedModelConfigsResults
)
2089 async def HostedModelConfigs(self
):
2092 Returns -> typing.Sequence[~HostedModelConfig]
2094 # map input types to rpc msg
2096 msg
= dict(type='Controller',
2097 request
='HostedModelConfigs',
2101 reply
= await self
.rpc(msg
)
2106 @ReturnMapping(InitiateMigrationResults
)
2107 async def InitiateMigration(self
, specs
):
2109 specs : typing.Sequence[~MigrationSpec]
2110 Returns -> typing.Sequence[~InitiateMigrationResult]
2112 # map input types to rpc msg
2114 msg
= dict(type='Controller',
2115 request
='InitiateMigration',
2118 _params
['specs'] = specs
2119 reply
= await self
.rpc(msg
)
2124 @ReturnMapping(ModelBlockInfoList
)
2125 async def ListBlockedModels(self
):
2128 Returns -> typing.Sequence[~ModelBlockInfo]
2130 # map input types to rpc msg
2132 msg
= dict(type='Controller',
2133 request
='ListBlockedModels',
2137 reply
= await self
.rpc(msg
)
2142 @ReturnMapping(ModelConfigResults
)
2143 async def ModelConfig(self
):
2146 Returns -> typing.Mapping[str, ~ConfigValue]
2148 # map input types to rpc msg
2150 msg
= dict(type='Controller',
2151 request
='ModelConfig',
2155 reply
= await self
.rpc(msg
)
2160 @ReturnMapping(ModelStatusResults
)
2161 async def ModelStatus(self
, entities
):
2163 entities : typing.Sequence[~Entity]
2164 Returns -> typing.Sequence[~ModelStatus]
2166 # map input types to rpc msg
2168 msg
= dict(type='Controller',
2169 request
='ModelStatus',
2172 _params
['entities'] = entities
2173 reply
= await self
.rpc(msg
)
2178 @ReturnMapping(ErrorResults
)
2179 async def ModifyControllerAccess(self
, changes
):
2181 changes : typing.Sequence[~ModifyControllerAccess]
2182 Returns -> typing.Sequence[~ErrorResult]
2184 # map input types to rpc msg
2186 msg
= dict(type='Controller',
2187 request
='ModifyControllerAccess',
2190 _params
['changes'] = changes
2191 reply
= await self
.rpc(msg
)
2196 @ReturnMapping(None)
2197 async def RemoveBlocks(self
, all_
):
2202 # map input types to rpc msg
2204 msg
= dict(type='Controller',
2205 request
='RemoveBlocks',
2208 _params
['all'] = all_
2209 reply
= await self
.rpc(msg
)
2214 @ReturnMapping(AllWatcherId
)
2215 async def WatchAllModels(self
):
2220 # map input types to rpc msg
2222 msg
= dict(type='Controller',
2223 request
='WatchAllModels',
2227 reply
= await self
.rpc(msg
)
2232 class FirewallerFacade(Type
):
2235 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
2236 'properties': {'error': {'$ref': '#/definitions/Error'},
2237 'result': {'type': 'boolean'}},
2238 'required': ['result'],
2240 'BoolResults': {'additionalProperties': False,
2241 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
2243 'required': ['results'],
2245 'CloudCredential': {'additionalProperties': False,
2246 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
2248 'auth-type': {'type': 'string'},
2249 'redacted': {'items': {'type': 'string'},
2251 'required': ['auth-type'],
2253 'CloudSpec': {'additionalProperties': False,
2254 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
2255 'endpoint': {'type': 'string'},
2256 'identity-endpoint': {'type': 'string'},
2257 'name': {'type': 'string'},
2258 'region': {'type': 'string'},
2259 'storage-endpoint': {'type': 'string'},
2260 'type': {'type': 'string'}},
2261 'required': ['type', 'name'],
2263 'CloudSpecResult': {'additionalProperties': False,
2264 'properties': {'error': {'$ref': '#/definitions/Error'},
2265 'result': {'$ref': '#/definitions/CloudSpec'}},
2267 'CloudSpecResults': {'additionalProperties': False,
2268 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
2271 'Entities': {'additionalProperties': False,
2272 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2274 'required': ['entities'],
2276 'Entity': {'additionalProperties': False,
2277 'properties': {'tag': {'type': 'string'}},
2278 'required': ['tag'],
2280 'Error': {'additionalProperties': False,
2281 'properties': {'code': {'type': 'string'},
2282 'info': {'$ref': '#/definitions/ErrorInfo'},
2283 'message': {'type': 'string'}},
2284 'required': ['message', 'code'],
2286 'ErrorInfo': {'additionalProperties': False,
2287 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2288 'macaroon-path': {'type': 'string'}},
2290 'LifeResult': {'additionalProperties': False,
2291 'properties': {'error': {'$ref': '#/definitions/Error'},
2292 'life': {'type': 'string'}},
2293 'required': ['life'],
2295 'LifeResults': {'additionalProperties': False,
2296 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2298 'required': ['results'],
2300 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2301 'MachinePortRange': {'additionalProperties': False,
2302 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
2303 'relation-tag': {'type': 'string'},
2304 'unit-tag': {'type': 'string'}},
2305 'required': ['unit-tag',
2309 'MachinePorts': {'additionalProperties': False,
2310 'properties': {'machine-tag': {'type': 'string'},
2311 'subnet-tag': {'type': 'string'}},
2312 'required': ['machine-tag', 'subnet-tag'],
2314 'MachinePortsParams': {'additionalProperties': False,
2315 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
2317 'required': ['params'],
2319 'MachinePortsResult': {'additionalProperties': False,
2320 'properties': {'error': {'$ref': '#/definitions/Error'},
2321 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
2323 'required': ['ports'],
2325 'MachinePortsResults': {'additionalProperties': False,
2326 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
2328 'required': ['results'],
2330 'ModelConfigResult': {'additionalProperties': False,
2331 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2334 'required': ['config'],
2336 'ModelTag': {'additionalProperties': False, 'type': 'object'},
2337 'NotifyWatchResult': {'additionalProperties': False,
2338 'properties': {'NotifyWatcherId': {'type': 'string'},
2339 'error': {'$ref': '#/definitions/Error'}},
2340 'required': ['NotifyWatcherId'],
2342 'NotifyWatchResults': {'additionalProperties': False,
2343 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2345 'required': ['results'],
2347 'PortRange': {'additionalProperties': False,
2348 'properties': {'from-port': {'type': 'integer'},
2349 'protocol': {'type': 'string'},
2350 'to-port': {'type': 'integer'}},
2351 'required': ['from-port', 'to-port', 'protocol'],
2353 'StringResult': {'additionalProperties': False,
2354 'properties': {'error': {'$ref': '#/definitions/Error'},
2355 'result': {'type': 'string'}},
2356 'required': ['result'],
2358 'StringResults': {'additionalProperties': False,
2359 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2361 'required': ['results'],
2363 'StringsResult': {'additionalProperties': False,
2364 'properties': {'error': {'$ref': '#/definitions/Error'},
2365 'result': {'items': {'type': 'string'},
2368 'StringsResults': {'additionalProperties': False,
2369 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
2371 'required': ['results'],
2373 'StringsWatchResult': {'additionalProperties': False,
2374 'properties': {'changes': {'items': {'type': 'string'},
2376 'error': {'$ref': '#/definitions/Error'},
2377 'watcher-id': {'type': 'string'}},
2378 'required': ['watcher-id'],
2380 'StringsWatchResults': {'additionalProperties': False,
2381 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
2383 'required': ['results'],
2385 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2386 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
2388 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2389 'Result': {'$ref': '#/definitions/StringResults'}},
2391 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
2392 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
2394 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2395 'Result': {'$ref': '#/definitions/BoolResults'}},
2397 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2398 'Result': {'$ref': '#/definitions/StringsResults'}},
2400 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
2401 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
2403 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2404 'Result': {'$ref': '#/definitions/StringResults'}},
2406 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2407 'Result': {'$ref': '#/definitions/LifeResults'}},
2409 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
2411 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2412 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2414 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2416 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
2418 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2419 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2421 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2422 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2427 @ReturnMapping(CloudSpecResults
)
2428 async def CloudSpec(self
, entities
):
2430 entities : typing.Sequence[~Entity]
2431 Returns -> typing.Sequence[~CloudSpecResult]
2433 # map input types to rpc msg
2435 msg
= dict(type='Firewaller',
2436 request
='CloudSpec',
2439 _params
['entities'] = entities
2440 reply
= await self
.rpc(msg
)
2445 @ReturnMapping(StringResults
)
2446 async def GetAssignedMachine(self
, entities
):
2448 entities : typing.Sequence[~Entity]
2449 Returns -> typing.Sequence[~StringResult]
2451 # map input types to rpc msg
2453 msg
= dict(type='Firewaller',
2454 request
='GetAssignedMachine',
2457 _params
['entities'] = entities
2458 reply
= await self
.rpc(msg
)
2463 @ReturnMapping(CloudSpecResult
)
2464 async def GetCloudSpec(self
):
2467 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
2469 # map input types to rpc msg
2471 msg
= dict(type='Firewaller',
2472 request
='GetCloudSpec',
2476 reply
= await self
.rpc(msg
)
2481 @ReturnMapping(BoolResults
)
2482 async def GetExposed(self
, entities
):
2484 entities : typing.Sequence[~Entity]
2485 Returns -> typing.Sequence[~BoolResult]
2487 # map input types to rpc msg
2489 msg
= dict(type='Firewaller',
2490 request
='GetExposed',
2493 _params
['entities'] = entities
2494 reply
= await self
.rpc(msg
)