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
.facade
import Type
, ReturnMapping
5 from juju
.client
._definitions
import *
8 class ApplicationFacade(Type
):
11 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
12 'properties': {'application': {'type': 'string'},
13 'num-units': {'type': 'integer'},
14 'placement': {'items': {'$ref': '#/definitions/Placement'},
16 'required': ['application',
20 'AddApplicationUnitsResults': {'additionalProperties': False,
21 'properties': {'units': {'items': {'type': 'string'},
23 'required': ['units'],
25 'AddRelation': {'additionalProperties': False,
26 'properties': {'endpoints': {'items': {'type': 'string'},
28 'required': ['endpoints'],
30 'AddRelationResults': {'additionalProperties': False,
31 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
33 'required': ['endpoints'],
35 'ApplicationCharmRelations': {'additionalProperties': False,
36 'properties': {'application': {'type': 'string'}},
37 'required': ['application'],
39 'ApplicationCharmRelationsResults': {'additionalProperties': False,
40 'properties': {'charm-relations': {'items': {'type': 'string'},
42 'required': ['charm-relations'],
44 'ApplicationDeploy': {'additionalProperties': False,
45 'properties': {'application': {'type': 'string'},
46 'channel': {'type': 'string'},
47 'charm-url': {'type': 'string'},
48 'config': {'patternProperties': {'.*': {'type': 'string'}},
50 'config-yaml': {'type': 'string'},
51 'constraints': {'$ref': '#/definitions/Value'},
52 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
54 'num-units': {'type': 'integer'},
55 'placement': {'items': {'$ref': '#/definitions/Placement'},
57 'resources': {'patternProperties': {'.*': {'type': 'string'}},
59 'series': {'type': 'string'},
60 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
62 'required': ['application',
70 'ApplicationDestroy': {'additionalProperties': False,
71 'properties': {'application': {'type': 'string'}},
72 'required': ['application'],
74 'ApplicationExpose': {'additionalProperties': False,
75 'properties': {'application': {'type': 'string'}},
76 'required': ['application'],
78 'ApplicationGet': {'additionalProperties': False,
79 'properties': {'application': {'type': 'string'}},
80 'required': ['application'],
82 'ApplicationGetResults': {'additionalProperties': False,
83 'properties': {'application': {'type': 'string'},
84 'charm': {'type': 'string'},
85 'config': {'patternProperties': {'.*': {'additionalProperties': True,
88 'constraints': {'$ref': '#/definitions/Value'},
89 'series': {'type': 'string'}},
90 'required': ['application',
96 'ApplicationMetricCredential': {'additionalProperties': False,
97 'properties': {'application': {'type': 'string'},
98 'metrics-credentials': {'items': {'type': 'integer'},
100 'required': ['application',
101 'metrics-credentials'],
103 'ApplicationMetricCredentials': {'additionalProperties': False,
104 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
106 'required': ['creds'],
108 'ApplicationSet': {'additionalProperties': False,
109 'properties': {'application': {'type': 'string'},
110 'options': {'patternProperties': {'.*': {'type': 'string'}},
112 'required': ['application', 'options'],
114 'ApplicationSetCharm': {'additionalProperties': False,
115 'properties': {'application': {'type': 'string'},
116 'channel': {'type': 'string'},
117 'charm-url': {'type': 'string'},
118 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
120 'config-settings-yaml': {'type': 'string'},
121 'force-series': {'type': 'boolean'},
122 'force-units': {'type': 'boolean'},
123 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
125 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
127 'required': ['application',
133 'ApplicationUnexpose': {'additionalProperties': False,
134 'properties': {'application': {'type': 'string'}},
135 'required': ['application'],
137 'ApplicationUnset': {'additionalProperties': False,
138 'properties': {'application': {'type': 'string'},
139 'options': {'items': {'type': 'string'},
141 'required': ['application', 'options'],
143 'ApplicationUpdate': {'additionalProperties': False,
144 'properties': {'application': {'type': 'string'},
145 'charm-url': {'type': 'string'},
146 'constraints': {'$ref': '#/definitions/Value'},
147 'force-charm-url': {'type': 'boolean'},
148 'force-series': {'type': 'boolean'},
149 'min-units': {'type': 'integer'},
150 'settings': {'patternProperties': {'.*': {'type': 'string'}},
152 'settings-yaml': {'type': 'string'}},
153 'required': ['application',
159 'ApplicationsDeploy': {'additionalProperties': False,
160 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
162 'required': ['applications'],
164 'CharmRelation': {'additionalProperties': False,
165 'properties': {'interface': {'type': 'string'},
166 'limit': {'type': 'integer'},
167 'name': {'type': 'string'},
168 'optional': {'type': 'boolean'},
169 'role': {'type': 'string'},
170 'scope': {'type': 'string'}},
178 'Constraints': {'additionalProperties': False,
179 'properties': {'Count': {'type': 'integer'},
180 'Pool': {'type': 'string'},
181 'Size': {'type': 'integer'}},
182 'required': ['Pool', 'Size', 'Count'],
184 'DestroyApplicationUnits': {'additionalProperties': False,
185 'properties': {'unit-names': {'items': {'type': 'string'},
187 'required': ['unit-names'],
189 'DestroyRelation': {'additionalProperties': False,
190 'properties': {'endpoints': {'items': {'type': 'string'},
192 'required': ['endpoints'],
194 'Error': {'additionalProperties': False,
195 'properties': {'code': {'type': 'string'},
196 'info': {'$ref': '#/definitions/ErrorInfo'},
197 'message': {'type': 'string'}},
198 'required': ['message', 'code'],
200 'ErrorInfo': {'additionalProperties': False,
201 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
202 'macaroon-path': {'type': 'string'}},
204 'ErrorResult': {'additionalProperties': False,
205 'properties': {'error': {'$ref': '#/definitions/Error'}},
207 'ErrorResults': {'additionalProperties': False,
208 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
210 'required': ['results'],
212 'GetApplicationConstraints': {'additionalProperties': False,
213 'properties': {'application': {'type': 'string'}},
214 'required': ['application'],
216 'GetConstraintsResults': {'additionalProperties': False,
217 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
218 'required': ['constraints'],
220 'Macaroon': {'additionalProperties': False, 'type': 'object'},
221 'Placement': {'additionalProperties': False,
222 'properties': {'directive': {'type': 'string'},
223 'scope': {'type': 'string'}},
224 'required': ['scope', 'directive'],
226 'SetConstraints': {'additionalProperties': False,
227 'properties': {'application': {'type': 'string'},
228 'constraints': {'$ref': '#/definitions/Value'}},
229 'required': ['application', 'constraints'],
231 'StorageConstraints': {'additionalProperties': False,
232 'properties': {'count': {'type': 'integer'},
233 'pool': {'type': 'string'},
234 'size': {'type': 'integer'}},
236 'StringResult': {'additionalProperties': False,
237 'properties': {'error': {'$ref': '#/definitions/Error'},
238 'result': {'type': 'string'}},
239 'required': ['result'],
241 'Value': {'additionalProperties': False,
242 'properties': {'arch': {'type': 'string'},
243 'container': {'type': 'string'},
244 'cores': {'type': 'integer'},
245 'cpu-power': {'type': 'integer'},
246 'instance-type': {'type': 'string'},
247 'mem': {'type': 'integer'},
248 'root-disk': {'type': 'integer'},
249 'spaces': {'items': {'type': 'string'},
251 'tags': {'items': {'type': 'string'},
253 'virt-type': {'type': 'string'}},
255 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
256 'Result': {'$ref': '#/definitions/AddRelationResults'}},
258 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
259 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
261 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
262 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
264 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
265 'Result': {'$ref': '#/definitions/ErrorResults'}},
267 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
269 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
271 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
273 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
275 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
276 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
278 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
279 'Result': {'$ref': '#/definitions/StringResult'}},
281 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
282 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
284 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
286 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
288 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
290 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
291 'Result': {'$ref': '#/definitions/ErrorResults'}},
293 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
295 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
297 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
302 @ReturnMapping(AddRelationResults
)
303 async def AddRelation(self
, endpoints
):
305 endpoints : typing.Sequence<+T_co>[str]
306 Returns -> typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
308 # map input types to rpc msg
310 msg
= dict(type='Application', request
='AddRelation', version
=3, params
=_params
)
311 _params
['endpoints'] = endpoints
312 reply
= await self
.rpc(msg
)
317 @ReturnMapping(AddApplicationUnitsResults
)
318 async def AddUnits(self
, application
, num_units
, placement
):
322 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
323 Returns -> typing.Sequence<+T_co>[str]
325 # map input types to rpc msg
327 msg
= dict(type='Application', request
='AddUnits', version
=3, params
=_params
)
328 _params
['application'] = application
329 _params
['num-units'] = num_units
330 _params
['placement'] = placement
331 reply
= await self
.rpc(msg
)
336 @ReturnMapping(ApplicationCharmRelationsResults
)
337 async def CharmRelations(self
, application
):
340 Returns -> typing.Sequence<+T_co>[str]
342 # map input types to rpc msg
344 msg
= dict(type='Application', request
='CharmRelations', version
=3, params
=_params
)
345 _params
['application'] = application
346 reply
= await self
.rpc(msg
)
351 @ReturnMapping(ErrorResults
)
352 async def Deploy(self
, applications
):
354 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
355 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
357 # map input types to rpc msg
359 msg
= dict(type='Application', request
='Deploy', version
=3, params
=_params
)
360 _params
['applications'] = applications
361 reply
= await self
.rpc(msg
)
367 async def Destroy(self
, application
):
372 # map input types to rpc msg
374 msg
= dict(type='Application', request
='Destroy', version
=3, params
=_params
)
375 _params
['application'] = application
376 reply
= await self
.rpc(msg
)
382 async def DestroyRelation(self
, endpoints
):
384 endpoints : typing.Sequence<+T_co>[str]
387 # map input types to rpc msg
389 msg
= dict(type='Application', request
='DestroyRelation', version
=3, params
=_params
)
390 _params
['endpoints'] = endpoints
391 reply
= await self
.rpc(msg
)
397 async def DestroyUnits(self
, unit_names
):
399 unit_names : typing.Sequence<+T_co>[str]
402 # map input types to rpc msg
404 msg
= dict(type='Application', request
='DestroyUnits', version
=3, params
=_params
)
405 _params
['unit-names'] = unit_names
406 reply
= await self
.rpc(msg
)
412 async def Expose(self
, application
):
417 # map input types to rpc msg
419 msg
= dict(type='Application', request
='Expose', version
=3, params
=_params
)
420 _params
['application'] = application
421 reply
= await self
.rpc(msg
)
426 @ReturnMapping(ApplicationGetResults
)
427 async def Get(self
, application
):
430 Returns -> typing.Union[str, typing.Mapping<~KT, +VT_co>[str, typing.Any], _ForwardRef('Value')]
432 # map input types to rpc msg
434 msg
= dict(type='Application', request
='Get', version
=3, params
=_params
)
435 _params
['application'] = application
436 reply
= await self
.rpc(msg
)
441 @ReturnMapping(StringResult
)
442 async def GetCharmURL(self
, application
):
445 Returns -> typing.Union[_ForwardRef('Error'), str]
447 # map input types to rpc msg
449 msg
= dict(type='Application', request
='GetCharmURL', version
=3, params
=_params
)
450 _params
['application'] = application
451 reply
= await self
.rpc(msg
)
456 @ReturnMapping(GetConstraintsResults
)
457 async def GetConstraints(self
, application
):
462 # map input types to rpc msg
464 msg
= dict(type='Application', request
='GetConstraints', version
=3, params
=_params
)
465 _params
['application'] = application
466 reply
= await self
.rpc(msg
)
472 async def Set(self
, application
, options
):
475 options : typing.Mapping<~KT, +VT_co>[str, str]
478 # map input types to rpc msg
480 msg
= dict(type='Application', request
='Set', version
=3, params
=_params
)
481 _params
['application'] = application
482 _params
['options'] = options
483 reply
= await self
.rpc(msg
)
489 async def SetCharm(self
, application
, channel
, charm_url
, config_settings
, config_settings_yaml
, force_series
, force_units
, resource_ids
, storage_constraints
):
494 config_settings : typing.Mapping<~KT, +VT_co>[str, str]
495 config_settings_yaml : str
498 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
499 storage_constraints : typing.Mapping<~KT, +VT_co>[str, ~StorageConstraints]<~StorageConstraints>
502 # map input types to rpc msg
504 msg
= dict(type='Application', request
='SetCharm', version
=3, params
=_params
)
505 _params
['application'] = application
506 _params
['channel'] = channel
507 _params
['charm-url'] = charm_url
508 _params
['config-settings'] = config_settings
509 _params
['config-settings-yaml'] = config_settings_yaml
510 _params
['force-series'] = force_series
511 _params
['force-units'] = force_units
512 _params
['resource-ids'] = resource_ids
513 _params
['storage-constraints'] = storage_constraints
514 reply
= await self
.rpc(msg
)
520 async def SetConstraints(self
, application
, constraints
):
526 # map input types to rpc msg
528 msg
= dict(type='Application', request
='SetConstraints', version
=3, params
=_params
)
529 _params
['application'] = application
530 _params
['constraints'] = constraints
531 reply
= await self
.rpc(msg
)
536 @ReturnMapping(ErrorResults
)
537 async def SetMetricCredentials(self
, creds
):
539 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
540 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
542 # map input types to rpc msg
544 msg
= dict(type='Application', request
='SetMetricCredentials', version
=3, params
=_params
)
545 _params
['creds'] = creds
546 reply
= await self
.rpc(msg
)
552 async def Unexpose(self
, application
):
557 # map input types to rpc msg
559 msg
= dict(type='Application', request
='Unexpose', version
=3, params
=_params
)
560 _params
['application'] = application
561 reply
= await self
.rpc(msg
)
567 async def Unset(self
, application
, options
):
570 options : typing.Sequence<+T_co>[str]
573 # map input types to rpc msg
575 msg
= dict(type='Application', request
='Unset', version
=3, params
=_params
)
576 _params
['application'] = application
577 _params
['options'] = options
578 reply
= await self
.rpc(msg
)
584 async def Update(self
, application
, charm_url
, constraints
, force_charm_url
, force_series
, min_units
, settings
, settings_yaml
):
589 force_charm_url : bool
592 settings : typing.Mapping<~KT, +VT_co>[str, str]
596 # map input types to rpc msg
598 msg
= dict(type='Application', request
='Update', version
=3, params
=_params
)
599 _params
['application'] = application
600 _params
['charm-url'] = charm_url
601 _params
['constraints'] = constraints
602 _params
['force-charm-url'] = force_charm_url
603 _params
['force-series'] = force_series
604 _params
['min-units'] = min_units
605 _params
['settings'] = settings
606 _params
['settings-yaml'] = settings_yaml
607 reply
= await self
.rpc(msg
)
612 class ControllerFacade(Type
):
615 schema
= {'definitions': {'AllWatcherId': {'additionalProperties': False,
616 'properties': {'watcher-id': {'type': 'string'}},
617 'required': ['watcher-id'],
619 'CloudCredential': {'additionalProperties': False,
620 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
622 'auth-type': {'type': 'string'},
623 'redacted': {'items': {'type': 'string'},
625 'required': ['auth-type'],
627 'CloudSpec': {'additionalProperties': False,
628 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
629 'endpoint': {'type': 'string'},
630 'identity-endpoint': {'type': 'string'},
631 'name': {'type': 'string'},
632 'region': {'type': 'string'},
633 'storage-endpoint': {'type': 'string'},
634 'type': {'type': 'string'}},
635 'required': ['type', 'name'],
637 'CloudSpecResult': {'additionalProperties': False,
638 'properties': {'error': {'$ref': '#/definitions/Error'},
639 'result': {'$ref': '#/definitions/CloudSpec'}},
641 'CloudSpecResults': {'additionalProperties': False,
642 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
645 'ConfigValue': {'additionalProperties': False,
646 'properties': {'source': {'type': 'string'},
647 'value': {'additionalProperties': True,
649 'required': ['value', 'source'],
651 'ControllerConfigResult': {'additionalProperties': False,
652 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
655 'required': ['config'],
657 'DestroyControllerArgs': {'additionalProperties': False,
658 'properties': {'destroy-models': {'type': 'boolean'}},
659 'required': ['destroy-models'],
661 'Entities': {'additionalProperties': False,
662 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
664 'required': ['entities'],
666 'Entity': {'additionalProperties': False,
667 'properties': {'tag': {'type': 'string'}},
670 'Error': {'additionalProperties': False,
671 'properties': {'code': {'type': 'string'},
672 'info': {'$ref': '#/definitions/ErrorInfo'},
673 'message': {'type': 'string'}},
674 'required': ['message', 'code'],
676 'ErrorInfo': {'additionalProperties': False,
677 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
678 'macaroon-path': {'type': 'string'}},
680 'ErrorResult': {'additionalProperties': False,
681 'properties': {'error': {'$ref': '#/definitions/Error'}},
683 'ErrorResults': {'additionalProperties': False,
684 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
686 'required': ['results'],
688 'HostedModelConfig': {'additionalProperties': False,
689 'properties': {'cloud-spec': {'$ref': '#/definitions/CloudSpec'},
690 'config': {'patternProperties': {'.*': {'additionalProperties': True,
693 'error': {'$ref': '#/definitions/Error'},
694 'name': {'type': 'string'},
695 'owner': {'type': 'string'}},
696 'required': ['name', 'owner'],
698 'HostedModelConfigsResults': {'additionalProperties': False,
699 'properties': {'models': {'items': {'$ref': '#/definitions/HostedModelConfig'},
701 'required': ['models'],
703 'InitiateMigrationArgs': {'additionalProperties': False,
704 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
706 'required': ['specs'],
708 'InitiateMigrationResult': {'additionalProperties': False,
709 'properties': {'error': {'$ref': '#/definitions/Error'},
710 'migration-id': {'type': 'string'},
711 'model-tag': {'type': 'string'}},
712 'required': ['model-tag',
715 'InitiateMigrationResults': {'additionalProperties': False,
716 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
718 'required': ['results'],
720 'Macaroon': {'additionalProperties': False, 'type': 'object'},
721 'MachineHardware': {'additionalProperties': False,
722 'properties': {'arch': {'type': 'string'},
723 'availability-zone': {'type': 'string'},
724 'cores': {'type': 'integer'},
725 'cpu-power': {'type': 'integer'},
726 'mem': {'type': 'integer'},
727 'root-disk': {'type': 'integer'},
728 'tags': {'items': {'type': 'string'},
731 'MigrationSpec': {'additionalProperties': False,
732 'properties': {'external-control': {'type': 'boolean'},
733 'model-tag': {'type': 'string'},
734 'skip-initial-prechecks': {'type': 'boolean'},
735 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
736 'required': ['model-tag',
739 'skip-initial-prechecks'],
741 'MigrationTargetInfo': {'additionalProperties': False,
742 'properties': {'addrs': {'items': {'type': 'string'},
744 'auth-tag': {'type': 'string'},
745 'ca-cert': {'type': 'string'},
746 'controller-tag': {'type': 'string'},
747 'macaroons': {'type': 'string'},
748 'password': {'type': 'string'}},
749 'required': ['controller-tag',
754 'Model': {'additionalProperties': False,
755 'properties': {'name': {'type': 'string'},
756 'owner-tag': {'type': 'string'},
757 'uuid': {'type': 'string'}},
758 'required': ['name', 'uuid', 'owner-tag'],
760 'ModelBlockInfo': {'additionalProperties': False,
761 'properties': {'blocks': {'items': {'type': 'string'},
763 'model-uuid': {'type': 'string'},
764 'name': {'type': 'string'},
765 'owner-tag': {'type': 'string'}},
771 'ModelBlockInfoList': {'additionalProperties': False,
772 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
775 'ModelConfigResults': {'additionalProperties': False,
776 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
778 'required': ['config'],
780 'ModelMachineInfo': {'additionalProperties': False,
781 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
782 'has-vote': {'type': 'boolean'},
783 'id': {'type': 'string'},
784 'instance-id': {'type': 'string'},
785 'status': {'type': 'string'},
786 'wants-vote': {'type': 'boolean'}},
789 'ModelStatus': {'additionalProperties': False,
790 'properties': {'application-count': {'type': 'integer'},
791 'hosted-machine-count': {'type': 'integer'},
792 'life': {'type': 'string'},
793 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
795 'model-tag': {'type': 'string'},
796 'owner-tag': {'type': 'string'}},
797 'required': ['model-tag',
799 'hosted-machine-count',
803 'ModelStatusResults': {'additionalProperties': False,
804 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
806 'required': ['models'],
808 'ModelTag': {'additionalProperties': False, 'type': 'object'},
809 'ModifyControllerAccess': {'additionalProperties': False,
810 'properties': {'access': {'type': 'string'},
811 'action': {'type': 'string'},
812 'user-tag': {'type': 'string'}},
813 'required': ['user-tag',
817 'ModifyControllerAccessRequest': {'additionalProperties': False,
818 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
820 'required': ['changes'],
822 'RemoveBlocksArgs': {'additionalProperties': False,
823 'properties': {'all': {'type': 'boolean'}},
826 'UserAccess': {'additionalProperties': False,
827 'properties': {'access': {'type': 'string'},
828 'user-tag': {'type': 'string'}},
829 'required': ['user-tag', 'access'],
831 'UserAccessResult': {'additionalProperties': False,
832 'properties': {'error': {'$ref': '#/definitions/Error'},
833 'result': {'$ref': '#/definitions/UserAccess'}},
835 'UserAccessResults': {'additionalProperties': False,
836 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
839 'UserModel': {'additionalProperties': False,
840 'properties': {'last-connection': {'format': 'date-time',
842 'model': {'$ref': '#/definitions/Model'}},
843 'required': ['model', 'last-connection'],
845 'UserModelList': {'additionalProperties': False,
846 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
848 'required': ['user-models'],
850 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
852 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
853 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
855 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
857 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
859 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
860 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
862 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
863 'Result': {'$ref': '#/definitions/UserAccessResults'}},
865 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}},
867 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
868 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
870 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
872 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
874 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
875 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
877 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
878 'Result': {'$ref': '#/definitions/ErrorResults'}},
880 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
882 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
887 @ReturnMapping(UserModelList
)
888 async def AllModels(self
):
891 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
893 # map input types to rpc msg
895 msg
= dict(type='Controller', request
='AllModels', version
=3, params
=_params
)
897 reply
= await self
.rpc(msg
)
902 @ReturnMapping(CloudSpecResults
)
903 async def CloudSpec(self
, entities
):
905 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
906 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
908 # map input types to rpc msg
910 msg
= dict(type='Controller', request
='CloudSpec', version
=3, params
=_params
)
911 _params
['entities'] = entities
912 reply
= await self
.rpc(msg
)
917 @ReturnMapping(ControllerConfigResult
)
918 async def ControllerConfig(self
):
921 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
923 # map input types to rpc msg
925 msg
= dict(type='Controller', request
='ControllerConfig', version
=3, params
=_params
)
927 reply
= await self
.rpc(msg
)
933 async def DestroyController(self
, destroy_models
):
935 destroy_models : bool
938 # map input types to rpc msg
940 msg
= dict(type='Controller', request
='DestroyController', version
=3, params
=_params
)
941 _params
['destroy-models'] = destroy_models
942 reply
= await self
.rpc(msg
)
947 @ReturnMapping(CloudSpecResult
)
948 async def GetCloudSpec(self
):
951 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
953 # map input types to rpc msg
955 msg
= dict(type='Controller', request
='GetCloudSpec', version
=3, params
=_params
)
957 reply
= await self
.rpc(msg
)
962 @ReturnMapping(UserAccessResults
)
963 async def GetControllerAccess(self
, entities
):
965 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
966 Returns -> typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
968 # map input types to rpc msg
970 msg
= dict(type='Controller', request
='GetControllerAccess', version
=3, params
=_params
)
971 _params
['entities'] = entities
972 reply
= await self
.rpc(msg
)
977 @ReturnMapping(HostedModelConfigsResults
)
978 async def HostedModelConfigs(self
):
981 Returns -> typing.Sequence<+T_co>[~HostedModelConfig]<~HostedModelConfig>
983 # map input types to rpc msg
985 msg
= dict(type='Controller', request
='HostedModelConfigs', version
=3, params
=_params
)
987 reply
= await self
.rpc(msg
)
992 @ReturnMapping(InitiateMigrationResults
)
993 async def InitiateMigration(self
, specs
):
995 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
996 Returns -> typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
998 # map input types to rpc msg
1000 msg
= dict(type='Controller', request
='InitiateMigration', version
=3, params
=_params
)
1001 _params
['specs'] = specs
1002 reply
= await self
.rpc(msg
)
1007 @ReturnMapping(ModelBlockInfoList
)
1008 async def ListBlockedModels(self
):
1011 Returns -> typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
1013 # map input types to rpc msg
1015 msg
= dict(type='Controller', request
='ListBlockedModels', version
=3, params
=_params
)
1017 reply
= await self
.rpc(msg
)
1022 @ReturnMapping(ModelConfigResults
)
1023 async def ModelConfig(self
):
1026 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1028 # map input types to rpc msg
1030 msg
= dict(type='Controller', request
='ModelConfig', version
=3, params
=_params
)
1032 reply
= await self
.rpc(msg
)
1037 @ReturnMapping(ModelStatusResults
)
1038 async def ModelStatus(self
, entities
):
1040 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1041 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
1043 # map input types to rpc msg
1045 msg
= dict(type='Controller', request
='ModelStatus', version
=3, params
=_params
)
1046 _params
['entities'] = entities
1047 reply
= await self
.rpc(msg
)
1052 @ReturnMapping(ErrorResults
)
1053 async def ModifyControllerAccess(self
, changes
):
1055 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
1056 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1058 # map input types to rpc msg
1060 msg
= dict(type='Controller', request
='ModifyControllerAccess', version
=3, params
=_params
)
1061 _params
['changes'] = changes
1062 reply
= await self
.rpc(msg
)
1067 @ReturnMapping(None)
1068 async def RemoveBlocks(self
, all_
):
1073 # map input types to rpc msg
1075 msg
= dict(type='Controller', request
='RemoveBlocks', version
=3, params
=_params
)
1076 _params
['all'] = all_
1077 reply
= await self
.rpc(msg
)
1082 @ReturnMapping(AllWatcherId
)
1083 async def WatchAllModels(self
):
1088 # map input types to rpc msg
1090 msg
= dict(type='Controller', request
='WatchAllModels', version
=3, params
=_params
)
1092 reply
= await self
.rpc(msg
)
1097 class FirewallerFacade(Type
):
1100 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
1101 'properties': {'error': {'$ref': '#/definitions/Error'},
1102 'result': {'type': 'boolean'}},
1103 'required': ['result'],
1105 'BoolResults': {'additionalProperties': False,
1106 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
1108 'required': ['results'],
1110 'CloudCredential': {'additionalProperties': False,
1111 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1113 'auth-type': {'type': 'string'},
1114 'redacted': {'items': {'type': 'string'},
1116 'required': ['auth-type'],
1118 'CloudSpec': {'additionalProperties': False,
1119 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
1120 'endpoint': {'type': 'string'},
1121 'identity-endpoint': {'type': 'string'},
1122 'name': {'type': 'string'},
1123 'region': {'type': 'string'},
1124 'storage-endpoint': {'type': 'string'},
1125 'type': {'type': 'string'}},
1126 'required': ['type', 'name'],
1128 'CloudSpecResult': {'additionalProperties': False,
1129 'properties': {'error': {'$ref': '#/definitions/Error'},
1130 'result': {'$ref': '#/definitions/CloudSpec'}},
1132 'CloudSpecResults': {'additionalProperties': False,
1133 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
1136 'Entities': {'additionalProperties': False,
1137 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1139 'required': ['entities'],
1141 'Entity': {'additionalProperties': False,
1142 'properties': {'tag': {'type': 'string'}},
1143 'required': ['tag'],
1145 'Error': {'additionalProperties': False,
1146 'properties': {'code': {'type': 'string'},
1147 'info': {'$ref': '#/definitions/ErrorInfo'},
1148 'message': {'type': 'string'}},
1149 'required': ['message', 'code'],
1151 'ErrorInfo': {'additionalProperties': False,
1152 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1153 'macaroon-path': {'type': 'string'}},
1155 'LifeResult': {'additionalProperties': False,
1156 'properties': {'error': {'$ref': '#/definitions/Error'},
1157 'life': {'type': 'string'}},
1158 'required': ['life'],
1160 'LifeResults': {'additionalProperties': False,
1161 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1163 'required': ['results'],
1165 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1166 'MachinePortRange': {'additionalProperties': False,
1167 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
1168 'relation-tag': {'type': 'string'},
1169 'unit-tag': {'type': 'string'}},
1170 'required': ['unit-tag',
1174 'MachinePorts': {'additionalProperties': False,
1175 'properties': {'machine-tag': {'type': 'string'},
1176 'subnet-tag': {'type': 'string'}},
1177 'required': ['machine-tag', 'subnet-tag'],
1179 'MachinePortsParams': {'additionalProperties': False,
1180 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
1182 'required': ['params'],
1184 'MachinePortsResult': {'additionalProperties': False,
1185 'properties': {'error': {'$ref': '#/definitions/Error'},
1186 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
1188 'required': ['ports'],
1190 'MachinePortsResults': {'additionalProperties': False,
1191 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
1193 'required': ['results'],
1195 'ModelConfigResult': {'additionalProperties': False,
1196 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1199 'required': ['config'],
1201 'ModelTag': {'additionalProperties': False, 'type': 'object'},
1202 'NotifyWatchResult': {'additionalProperties': False,
1203 'properties': {'NotifyWatcherId': {'type': 'string'},
1204 'error': {'$ref': '#/definitions/Error'}},
1205 'required': ['NotifyWatcherId'],
1207 'NotifyWatchResults': {'additionalProperties': False,
1208 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1210 'required': ['results'],
1212 'PortRange': {'additionalProperties': False,
1213 'properties': {'from-port': {'type': 'integer'},
1214 'protocol': {'type': 'string'},
1215 'to-port': {'type': 'integer'}},
1216 'required': ['from-port', 'to-port', 'protocol'],
1218 'StringResult': {'additionalProperties': False,
1219 'properties': {'error': {'$ref': '#/definitions/Error'},
1220 'result': {'type': 'string'}},
1221 'required': ['result'],
1223 'StringResults': {'additionalProperties': False,
1224 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
1226 'required': ['results'],
1228 'StringsResult': {'additionalProperties': False,
1229 'properties': {'error': {'$ref': '#/definitions/Error'},
1230 'result': {'items': {'type': 'string'},
1233 'StringsResults': {'additionalProperties': False,
1234 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1236 'required': ['results'],
1238 'StringsWatchResult': {'additionalProperties': False,
1239 'properties': {'changes': {'items': {'type': 'string'},
1241 'error': {'$ref': '#/definitions/Error'},
1242 'watcher-id': {'type': 'string'}},
1243 'required': ['watcher-id'],
1245 'StringsWatchResults': {'additionalProperties': False,
1246 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
1248 'required': ['results'],
1250 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1251 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
1253 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1254 'Result': {'$ref': '#/definitions/StringResults'}},
1256 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
1257 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
1259 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1260 'Result': {'$ref': '#/definitions/BoolResults'}},
1262 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1263 'Result': {'$ref': '#/definitions/StringsResults'}},
1265 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
1266 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
1268 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1269 'Result': {'$ref': '#/definitions/StringResults'}},
1271 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1272 'Result': {'$ref': '#/definitions/LifeResults'}},
1274 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1276 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1277 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1279 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1281 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1283 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1284 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1286 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1287 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1292 @ReturnMapping(CloudSpecResults
)
1293 async def CloudSpec(self
, entities
):
1295 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1296 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
1298 # map input types to rpc msg
1300 msg
= dict(type='Firewaller', request
='CloudSpec', version
=3, params
=_params
)
1301 _params
['entities'] = entities
1302 reply
= await self
.rpc(msg
)
1307 @ReturnMapping(StringResults
)
1308 async def GetAssignedMachine(self
, entities
):
1310 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1311 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1313 # map input types to rpc msg
1315 msg
= dict(type='Firewaller', request
='GetAssignedMachine', version
=3, params
=_params
)
1316 _params
['entities'] = entities
1317 reply
= await self
.rpc(msg
)
1322 @ReturnMapping(CloudSpecResult
)
1323 async def GetCloudSpec(self
):
1326 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
1328 # map input types to rpc msg
1330 msg
= dict(type='Firewaller', request
='GetCloudSpec', version
=3, params
=_params
)
1332 reply
= await self
.rpc(msg
)
1337 @ReturnMapping(BoolResults
)
1338 async def GetExposed(self
, entities
):
1340 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1341 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
1343 # map input types to rpc msg
1345 msg
= dict(type='Firewaller', request
='GetExposed', version
=3, params
=_params
)
1346 _params
['entities'] = entities
1347 reply
= await self
.rpc(msg
)
1352 @ReturnMapping(StringsResults
)
1353 async def GetMachineActiveSubnets(self
, entities
):
1355 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1356 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
1358 # map input types to rpc msg
1360 msg
= dict(type='Firewaller', request
='GetMachineActiveSubnets', version
=3, params
=_params
)
1361 _params
['entities'] = entities
1362 reply
= await self
.rpc(msg
)
1367 @ReturnMapping(MachinePortsResults
)
1368 async def GetMachinePorts(self
, params
):
1370 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
1371 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
1373 # map input types to rpc msg
1375 msg
= dict(type='Firewaller', request
='GetMachinePorts', version
=3, params
=_params
)
1376 _params
['params'] = params
1377 reply
= await self
.rpc(msg
)
1382 @ReturnMapping(StringResults
)
1383 async def InstanceId(self
, entities
):
1385 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1386 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1388 # map input types to rpc msg
1390 msg
= dict(type='Firewaller', request
='InstanceId', version
=3, params
=_params
)
1391 _params
['entities'] = entities
1392 reply
= await self
.rpc(msg
)
1397 @ReturnMapping(LifeResults
)
1398 async def Life(self
, entities
):
1400 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1401 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
1403 # map input types to rpc msg
1405 msg
= dict(type='Firewaller', request
='Life', version
=3, params
=_params
)
1406 _params
['entities'] = entities
1407 reply
= await self
.rpc(msg
)
1412 @ReturnMapping(ModelConfigResult
)
1413 async def ModelConfig(self
):
1416 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
1418 # map input types to rpc msg
1420 msg
= dict(type='Firewaller', request
='ModelConfig', version
=3, params
=_params
)
1422 reply
= await self
.rpc(msg
)
1427 @ReturnMapping(NotifyWatchResults
)
1428 async def Watch(self
, entities
):
1430 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1431 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
1433 # map input types to rpc msg
1435 msg
= dict(type='Firewaller', request
='Watch', version
=3, params
=_params
)
1436 _params
['entities'] = entities
1437 reply
= await self
.rpc(msg
)
1442 @ReturnMapping(NotifyWatchResult
)
1443 async def WatchForModelConfigChanges(self
):
1446 Returns -> typing.Union[str, _ForwardRef('Error')]
1448 # map input types to rpc msg
1450 msg
= dict(type='Firewaller', request
='WatchForModelConfigChanges', version
=3, params
=_params
)
1452 reply
= await self
.rpc(msg
)
1457 @ReturnMapping(StringsWatchResult
)
1458 async def WatchModelMachines(self
):
1461 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
1463 # map input types to rpc msg
1465 msg
= dict(type='Firewaller', request
='WatchModelMachines', version
=3, params
=_params
)
1467 reply
= await self
.rpc(msg
)
1472 @ReturnMapping(StringsWatchResults
)
1473 async def WatchOpenedPorts(self
, entities
):
1475 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1476 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
1478 # map input types to rpc msg
1480 msg
= dict(type='Firewaller', request
='WatchOpenedPorts', version
=3, params
=_params
)
1481 _params
['entities'] = entities
1482 reply
= await self
.rpc(msg
)
1487 @ReturnMapping(StringsWatchResults
)
1488 async def WatchUnits(self
, entities
):
1490 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1491 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
1493 # map input types to rpc msg
1495 msg
= dict(type='Firewaller', request
='WatchUnits', version
=3, params
=_params
)
1496 _params
['entities'] = entities
1497 reply
= await self
.rpc(msg
)
1502 class InstancePollerFacade(Type
):
1503 name
= 'InstancePoller'
1505 schema
= {'definitions': {'Address': {'additionalProperties': False,
1506 'properties': {'scope': {'type': 'string'},
1507 'space-name': {'type': 'string'},
1508 'type': {'type': 'string'},
1509 'value': {'type': 'string'}},
1510 'required': ['value', 'type', 'scope'],
1512 'BoolResult': {'additionalProperties': False,
1513 'properties': {'error': {'$ref': '#/definitions/Error'},
1514 'result': {'type': 'boolean'}},
1515 'required': ['result'],
1517 'BoolResults': {'additionalProperties': False,
1518 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
1520 'required': ['results'],
1522 'Entities': {'additionalProperties': False,
1523 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1525 'required': ['entities'],
1527 'Entity': {'additionalProperties': False,
1528 'properties': {'tag': {'type': 'string'}},
1529 'required': ['tag'],
1531 'EntityStatusArgs': {'additionalProperties': False,
1532 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1535 'info': {'type': 'string'},
1536 'status': {'type': 'string'},
1537 'tag': {'type': 'string'}},
1543 'Error': {'additionalProperties': False,
1544 'properties': {'code': {'type': 'string'},
1545 'info': {'$ref': '#/definitions/ErrorInfo'},
1546 'message': {'type': 'string'}},
1547 'required': ['message', 'code'],
1549 'ErrorInfo': {'additionalProperties': False,
1550 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1551 'macaroon-path': {'type': 'string'}},
1553 'ErrorResult': {'additionalProperties': False,
1554 'properties': {'error': {'$ref': '#/definitions/Error'}},
1556 'ErrorResults': {'additionalProperties': False,
1557 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1559 'required': ['results'],
1561 'LifeResult': {'additionalProperties': False,
1562 'properties': {'error': {'$ref': '#/definitions/Error'},
1563 'life': {'type': 'string'}},
1564 'required': ['life'],
1566 'LifeResults': {'additionalProperties': False,
1567 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1569 'required': ['results'],
1571 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1572 'MachineAddresses': {'additionalProperties': False,
1573 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1575 'tag': {'type': 'string'}},
1576 'required': ['tag', 'addresses'],
1578 'MachineAddressesResult': {'additionalProperties': False,
1579 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1581 'error': {'$ref': '#/definitions/Error'}},
1582 'required': ['addresses'],
1584 'MachineAddressesResults': {'additionalProperties': False,
1585 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
1587 'required': ['results'],
1589 'ModelConfigResult': {'additionalProperties': False,
1590 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1593 'required': ['config'],
1595 'NotifyWatchResult': {'additionalProperties': False,
1596 'properties': {'NotifyWatcherId': {'type': 'string'},
1597 'error': {'$ref': '#/definitions/Error'}},
1598 'required': ['NotifyWatcherId'],
1600 'SetMachinesAddresses': {'additionalProperties': False,
1601 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
1603 'required': ['machine-addresses'],
1605 'SetStatus': {'additionalProperties': False,
1606 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1608 'required': ['entities'],
1610 'StatusResult': {'additionalProperties': False,
1611 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1614 'error': {'$ref': '#/definitions/Error'},
1615 'id': {'type': 'string'},
1616 'info': {'type': 'string'},
1617 'life': {'type': 'string'},
1618 'since': {'format': 'date-time',
1620 'status': {'type': 'string'}},
1628 'StatusResults': {'additionalProperties': False,
1629 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
1631 'required': ['results'],
1633 'StringResult': {'additionalProperties': False,
1634 'properties': {'error': {'$ref': '#/definitions/Error'},
1635 'result': {'type': 'string'}},
1636 'required': ['result'],
1638 'StringResults': {'additionalProperties': False,
1639 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
1641 'required': ['results'],
1643 'StringsWatchResult': {'additionalProperties': False,
1644 'properties': {'changes': {'items': {'type': 'string'},
1646 'error': {'$ref': '#/definitions/Error'},
1647 'watcher-id': {'type': 'string'}},
1648 'required': ['watcher-id'],
1650 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1651 'Result': {'$ref': '#/definitions/BoolResults'}},
1653 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1654 'Result': {'$ref': '#/definitions/StringResults'}},
1656 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1657 'Result': {'$ref': '#/definitions/StatusResults'}},
1659 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1660 'Result': {'$ref': '#/definitions/LifeResults'}},
1662 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1664 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1665 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
1667 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1668 'Result': {'$ref': '#/definitions/ErrorResults'}},
1670 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
1671 'Result': {'$ref': '#/definitions/ErrorResults'}},
1673 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1674 'Result': {'$ref': '#/definitions/StatusResults'}},
1676 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1678 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1683 @ReturnMapping(BoolResults
)
1684 async def AreManuallyProvisioned(self
, entities
):
1686 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1687 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
1689 # map input types to rpc msg
1691 msg
= dict(type='InstancePoller', request
='AreManuallyProvisioned', version
=3, params
=_params
)
1692 _params
['entities'] = entities
1693 reply
= await self
.rpc(msg
)
1698 @ReturnMapping(StringResults
)
1699 async def InstanceId(self
, entities
):
1701 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1702 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1704 # map input types to rpc msg
1706 msg
= dict(type='InstancePoller', request
='InstanceId', version
=3, params
=_params
)
1707 _params
['entities'] = entities
1708 reply
= await self
.rpc(msg
)
1713 @ReturnMapping(StatusResults
)
1714 async def InstanceStatus(self
, entities
):
1716 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1717 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
1719 # map input types to rpc msg
1721 msg
= dict(type='InstancePoller', request
='InstanceStatus', version
=3, params
=_params
)
1722 _params
['entities'] = entities
1723 reply
= await self
.rpc(msg
)
1728 @ReturnMapping(LifeResults
)
1729 async def Life(self
, entities
):
1731 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1732 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
1734 # map input types to rpc msg
1736 msg
= dict(type='InstancePoller', request
='Life', version
=3, params
=_params
)
1737 _params
['entities'] = entities
1738 reply
= await self
.rpc(msg
)
1743 @ReturnMapping(ModelConfigResult
)
1744 async def ModelConfig(self
):
1747 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
1749 # map input types to rpc msg
1751 msg
= dict(type='InstancePoller', request
='ModelConfig', version
=3, params
=_params
)
1753 reply
= await self
.rpc(msg
)
1758 @ReturnMapping(MachineAddressesResults
)
1759 async def ProviderAddresses(self
, entities
):
1761 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1762 Returns -> typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
1764 # map input types to rpc msg
1766 msg
= dict(type='InstancePoller', request
='ProviderAddresses', version
=3, params
=_params
)
1767 _params
['entities'] = entities
1768 reply
= await self
.rpc(msg
)
1773 @ReturnMapping(ErrorResults
)
1774 async def SetInstanceStatus(self
, entities
):
1776 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
1777 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1779 # map input types to rpc msg
1781 msg
= dict(type='InstancePoller', request
='SetInstanceStatus', version
=3, params
=_params
)
1782 _params
['entities'] = entities
1783 reply
= await self
.rpc(msg
)
1788 @ReturnMapping(ErrorResults
)
1789 async def SetProviderAddresses(self
, machine_addresses
):
1791 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
1792 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1794 # map input types to rpc msg
1796 msg
= dict(type='InstancePoller', request
='SetProviderAddresses', version
=3, params
=_params
)
1797 _params
['machine-addresses'] = machine_addresses
1798 reply
= await self
.rpc(msg
)
1803 @ReturnMapping(StatusResults
)
1804 async def Status(self
, entities
):
1806 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1807 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
1809 # map input types to rpc msg
1811 msg
= dict(type='InstancePoller', request
='Status', version
=3, params
=_params
)
1812 _params
['entities'] = entities
1813 reply
= await self
.rpc(msg
)
1818 @ReturnMapping(NotifyWatchResult
)
1819 async def WatchForModelConfigChanges(self
):
1822 Returns -> typing.Union[str, _ForwardRef('Error')]
1824 # map input types to rpc msg
1826 msg
= dict(type='InstancePoller', request
='WatchForModelConfigChanges', version
=3, params
=_params
)
1828 reply
= await self
.rpc(msg
)
1833 @ReturnMapping(StringsWatchResult
)
1834 async def WatchModelMachines(self
):
1837 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
1839 # map input types to rpc msg
1841 msg
= dict(type='InstancePoller', request
='WatchModelMachines', version
=3, params
=_params
)
1843 reply
= await self
.rpc(msg
)
1848 class MachineManagerFacade(Type
):
1849 name
= 'MachineManager'
1851 schema
= {'definitions': {'AddMachineParams': {'additionalProperties': False,
1852 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1854 'constraints': {'$ref': '#/definitions/Value'},
1855 'container-type': {'type': 'string'},
1856 'disks': {'items': {'$ref': '#/definitions/Constraints'},
1858 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
1859 'instance-id': {'type': 'string'},
1860 'jobs': {'items': {'type': 'string'},
1862 'nonce': {'type': 'string'},
1863 'parent-id': {'type': 'string'},
1864 'placement': {'$ref': '#/definitions/Placement'},
1865 'series': {'type': 'string'}},
1866 'required': ['series',
1873 'hardware-characteristics',
1876 'AddMachines': {'additionalProperties': False,
1877 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
1879 'required': ['params'],
1881 'AddMachinesResult': {'additionalProperties': False,
1882 'properties': {'error': {'$ref': '#/definitions/Error'},
1883 'machine': {'type': 'string'}},
1884 'required': ['machine'],
1886 'AddMachinesResults': {'additionalProperties': False,
1887 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
1889 'required': ['machines'],
1891 'Address': {'additionalProperties': False,
1892 'properties': {'scope': {'type': 'string'},
1893 'space-name': {'type': 'string'},
1894 'type': {'type': 'string'},
1895 'value': {'type': 'string'}},
1896 'required': ['value', 'type', 'scope'],
1898 'Constraints': {'additionalProperties': False,
1899 'properties': {'Count': {'type': 'integer'},
1900 'Pool': {'type': 'string'},
1901 'Size': {'type': 'integer'}},
1902 'required': ['Pool', 'Size', 'Count'],
1904 'DestroyMachineInfo': {'additionalProperties': False,
1905 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
1907 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
1909 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
1912 'DestroyMachineResult': {'additionalProperties': False,
1913 'properties': {'error': {'$ref': '#/definitions/Error'},
1914 'info': {'$ref': '#/definitions/DestroyMachineInfo'}},
1916 'DestroyMachineResults': {'additionalProperties': False,
1917 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyMachineResult'},
1920 'Entities': {'additionalProperties': False,
1921 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1923 'required': ['entities'],
1925 'Entity': {'additionalProperties': False,
1926 'properties': {'tag': {'type': 'string'}},
1927 'required': ['tag'],
1929 'Error': {'additionalProperties': False,
1930 'properties': {'code': {'type': 'string'},
1931 'info': {'$ref': '#/definitions/ErrorInfo'},
1932 'message': {'type': 'string'}},
1933 'required': ['message', 'code'],
1935 'ErrorInfo': {'additionalProperties': False,
1936 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1937 'macaroon-path': {'type': 'string'}},
1939 'HardwareCharacteristics': {'additionalProperties': False,
1940 'properties': {'arch': {'type': 'string'},
1941 'availability-zone': {'type': 'string'},
1942 'cpu-cores': {'type': 'integer'},
1943 'cpu-power': {'type': 'integer'},
1944 'mem': {'type': 'integer'},
1945 'root-disk': {'type': 'integer'},
1946 'tags': {'items': {'type': 'string'},
1949 'InstanceType': {'additionalProperties': False,
1950 'properties': {'arches': {'items': {'type': 'string'},
1952 'cost': {'type': 'integer'},
1953 'cpu-cores': {'type': 'integer'},
1954 'deprecated': {'type': 'boolean'},
1955 'memory': {'type': 'integer'},
1956 'name': {'type': 'string'},
1957 'root-disk': {'type': 'integer'},
1958 'virt-type': {'type': 'string'}},
1959 'required': ['arches', 'cpu-cores', 'memory'],
1961 'InstanceTypesResult': {'additionalProperties': False,
1962 'properties': {'cost-currency': {'type': 'string'},
1963 'cost-divisor': {'type': 'integer'},
1964 'cost-unit': {'type': 'string'},
1965 'error': {'$ref': '#/definitions/Error'},
1966 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
1969 'InstanceTypesResults': {'additionalProperties': False,
1970 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
1972 'required': ['results'],
1974 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1975 'ModelInstanceTypesConstraint': {'additionalProperties': False,
1976 'properties': {'value': {'$ref': '#/definitions/Value'}},
1978 'ModelInstanceTypesConstraints': {'additionalProperties': False,
1979 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
1981 'required': ['constraints'],
1983 'Placement': {'additionalProperties': False,
1984 'properties': {'directive': {'type': 'string'},
1985 'scope': {'type': 'string'}},
1986 'required': ['scope', 'directive'],
1988 'Value': {'additionalProperties': False,
1989 'properties': {'arch': {'type': 'string'},
1990 'container': {'type': 'string'},
1991 'cores': {'type': 'integer'},
1992 'cpu-power': {'type': 'integer'},
1993 'instance-type': {'type': 'string'},
1994 'mem': {'type': 'integer'},
1995 'root-disk': {'type': 'integer'},
1996 'spaces': {'items': {'type': 'string'},
1998 'tags': {'items': {'type': 'string'},
2000 'virt-type': {'type': 'string'}},
2002 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2003 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2005 'DestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2006 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2008 'ForceDestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2009 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2011 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
2012 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
2017 @ReturnMapping(AddMachinesResults
)
2018 async def AddMachines(self
, params
):
2020 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
2021 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
2023 # map input types to rpc msg
2025 msg
= dict(type='MachineManager', request
='AddMachines', version
=3, params
=_params
)
2026 _params
['params'] = params
2027 reply
= await self
.rpc(msg
)
2032 @ReturnMapping(DestroyMachineResults
)
2033 async def DestroyMachine(self
, entities
):
2035 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2036 Returns -> typing.Sequence<+T_co>[~DestroyMachineResult]<~DestroyMachineResult>
2038 # map input types to rpc msg
2040 msg
= dict(type='MachineManager', request
='DestroyMachine', version
=3, params
=_params
)
2041 _params
['entities'] = entities
2042 reply
= await self
.rpc(msg
)
2047 @ReturnMapping(DestroyMachineResults
)
2048 async def ForceDestroyMachine(self
, entities
):
2050 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2051 Returns -> typing.Sequence<+T_co>[~DestroyMachineResult]<~DestroyMachineResult>
2053 # map input types to rpc msg
2055 msg
= dict(type='MachineManager', request
='ForceDestroyMachine', version
=3, params
=_params
)
2056 _params
['entities'] = entities
2057 reply
= await self
.rpc(msg
)
2062 @ReturnMapping(InstanceTypesResults
)
2063 async def InstanceTypes(self
, constraints
):
2065 constraints : typing.Sequence<+T_co>[~ModelInstanceTypesConstraint]<~ModelInstanceTypesConstraint>
2066 Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
2068 # map input types to rpc msg
2070 msg
= dict(type='MachineManager', request
='InstanceTypes', version
=3, params
=_params
)
2071 _params
['constraints'] = constraints
2072 reply
= await self
.rpc(msg
)
2077 class ProvisionerFacade(Type
):
2078 name
= 'Provisioner'
2080 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
2081 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2084 'required': ['servers'],
2086 'Address': {'additionalProperties': False,
2087 'properties': {'scope': {'type': 'string'},
2088 'space-name': {'type': 'string'},
2089 'type': {'type': 'string'},
2090 'value': {'type': 'string'}},
2091 'required': ['value', 'type', 'scope'],
2093 'Binary': {'additionalProperties': False,
2094 'properties': {'Arch': {'type': 'string'},
2095 'Number': {'$ref': '#/definitions/Number'},
2096 'Series': {'type': 'string'}},
2097 'required': ['Number', 'Series', 'Arch'],
2099 'BytesResult': {'additionalProperties': False,
2100 'properties': {'result': {'items': {'type': 'integer'},
2102 'required': ['result'],
2104 'CloudImageMetadata': {'additionalProperties': False,
2105 'properties': {'arch': {'type': 'string'},
2106 'image-id': {'type': 'string'},
2107 'priority': {'type': 'integer'},
2108 'region': {'type': 'string'},
2109 'root-storage-size': {'type': 'integer'},
2110 'root-storage-type': {'type': 'string'},
2111 'series': {'type': 'string'},
2112 'source': {'type': 'string'},
2113 'stream': {'type': 'string'},
2114 'version': {'type': 'string'},
2115 'virt-type': {'type': 'string'}},
2116 'required': ['image-id',
2124 'ConstraintsResult': {'additionalProperties': False,
2125 'properties': {'constraints': {'$ref': '#/definitions/Value'},
2126 'error': {'$ref': '#/definitions/Error'}},
2127 'required': ['constraints'],
2129 'ConstraintsResults': {'additionalProperties': False,
2130 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
2132 'required': ['results'],
2134 'ContainerConfig': {'additionalProperties': False,
2135 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
2136 'apt-mirror': {'type': 'string'},
2137 'apt-proxy': {'$ref': '#/definitions/Settings'},
2138 'authorized-keys': {'type': 'string'},
2139 'provider-type': {'type': 'string'},
2140 'proxy': {'$ref': '#/definitions/Settings'},
2141 'ssl-hostname-verification': {'type': 'boolean'}},
2142 'required': ['provider-type',
2144 'ssl-hostname-verification',
2150 'ContainerManagerConfig': {'additionalProperties': False,
2151 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
2153 'required': ['config'],
2155 'ContainerManagerConfigParams': {'additionalProperties': False,
2156 'properties': {'type': {'type': 'string'}},
2157 'required': ['type'],
2159 'ControllerConfigResult': {'additionalProperties': False,
2160 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2163 'required': ['config'],
2165 'DeviceBridgeInfo': {'additionalProperties': False,
2166 'properties': {'bridge-name': {'type': 'string'},
2167 'host-device-name': {'type': 'string'}},
2168 'required': ['host-device-name',
2171 'DistributionGroupResult': {'additionalProperties': False,
2172 'properties': {'error': {'$ref': '#/definitions/Error'},
2173 'result': {'items': {'type': 'string'},
2175 'required': ['result'],
2177 'DistributionGroupResults': {'additionalProperties': False,
2178 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
2180 'required': ['results'],
2182 'Entities': {'additionalProperties': False,
2183 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2185 'required': ['entities'],
2187 'Entity': {'additionalProperties': False,
2188 'properties': {'tag': {'type': 'string'}},
2189 'required': ['tag'],
2191 'EntityPassword': {'additionalProperties': False,
2192 'properties': {'password': {'type': 'string'},
2193 'tag': {'type': 'string'}},
2194 'required': ['tag', 'password'],
2196 'EntityPasswords': {'additionalProperties': False,
2197 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
2199 'required': ['changes'],
2201 'EntityStatusArgs': {'additionalProperties': False,
2202 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2205 'info': {'type': 'string'},
2206 'status': {'type': 'string'},
2207 'tag': {'type': 'string'}},
2213 'Error': {'additionalProperties': False,
2214 'properties': {'code': {'type': 'string'},
2215 'info': {'$ref': '#/definitions/ErrorInfo'},
2216 'message': {'type': 'string'}},
2217 'required': ['message', 'code'],
2219 'ErrorInfo': {'additionalProperties': False,
2220 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2221 'macaroon-path': {'type': 'string'}},
2223 'ErrorResult': {'additionalProperties': False,
2224 'properties': {'error': {'$ref': '#/definitions/Error'}},
2226 'ErrorResults': {'additionalProperties': False,
2227 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2229 'required': ['results'],
2231 'FindToolsParams': {'additionalProperties': False,
2232 'properties': {'arch': {'type': 'string'},
2233 'major': {'type': 'integer'},
2234 'minor': {'type': 'integer'},
2235 'number': {'$ref': '#/definitions/Number'},
2236 'series': {'type': 'string'}},
2237 'required': ['number',
2243 'FindToolsResult': {'additionalProperties': False,
2244 'properties': {'error': {'$ref': '#/definitions/Error'},
2245 'list': {'items': {'$ref': '#/definitions/Tools'},
2247 'required': ['list'],
2249 'HardwareCharacteristics': {'additionalProperties': False,
2250 'properties': {'arch': {'type': 'string'},
2251 'availability-zone': {'type': 'string'},
2252 'cpu-cores': {'type': 'integer'},
2253 'cpu-power': {'type': 'integer'},
2254 'mem': {'type': 'integer'},
2255 'root-disk': {'type': 'integer'},
2256 'tags': {'items': {'type': 'string'},
2259 'HostNetworkChange': {'additionalProperties': False,
2260 'properties': {'error': {'$ref': '#/definitions/Error'},
2261 'new-bridges': {'items': {'$ref': '#/definitions/DeviceBridgeInfo'},
2263 'reconfigure-delay': {'type': 'integer'}},
2264 'required': ['new-bridges',
2265 'reconfigure-delay'],
2267 'HostNetworkChangeResults': {'additionalProperties': False,
2268 'properties': {'results': {'items': {'$ref': '#/definitions/HostNetworkChange'},
2270 'required': ['results'],
2272 'HostPort': {'additionalProperties': False,
2273 'properties': {'Address': {'$ref': '#/definitions/Address'},
2274 'port': {'type': 'integer'}},
2275 'required': ['Address', 'port'],
2277 'InstanceInfo': {'additionalProperties': False,
2278 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2279 'instance-id': {'type': 'string'},
2280 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
2282 'nonce': {'type': 'string'},
2283 'tag': {'type': 'string'},
2284 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
2286 'volumes': {'items': {'$ref': '#/definitions/Volume'},
2293 'volume-attachments',
2296 'InstancesInfo': {'additionalProperties': False,
2297 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
2299 'required': ['machines'],
2301 'LifeResult': {'additionalProperties': False,
2302 'properties': {'error': {'$ref': '#/definitions/Error'},
2303 'life': {'type': 'string'}},
2304 'required': ['life'],
2306 'LifeResults': {'additionalProperties': False,
2307 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2309 'required': ['results'],
2311 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2312 'MachineContainers': {'additionalProperties': False,
2313 'properties': {'container-types': {'items': {'type': 'string'},
2315 'machine-tag': {'type': 'string'}},
2316 'required': ['machine-tag',
2319 'MachineContainersParams': {'additionalProperties': False,
2320 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
2322 'required': ['params'],
2324 'MachineNetworkConfigResult': {'additionalProperties': False,
2325 'properties': {'error': {'$ref': '#/definitions/Error'},
2326 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
2328 'required': ['info'],
2330 'MachineNetworkConfigResults': {'additionalProperties': False,
2331 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
2333 'required': ['results'],
2335 'ModelConfigResult': {'additionalProperties': False,
2336 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2339 'required': ['config'],
2341 'NetworkConfig': {'additionalProperties': False,
2342 'properties': {'address': {'type': 'string'},
2343 'cidr': {'type': 'string'},
2344 'config-type': {'type': 'string'},
2345 'device-index': {'type': 'integer'},
2346 'disabled': {'type': 'boolean'},
2347 'dns-search-domains': {'items': {'type': 'string'},
2349 'dns-servers': {'items': {'type': 'string'},
2351 'gateway-address': {'type': 'string'},
2352 'interface-name': {'type': 'string'},
2353 'interface-type': {'type': 'string'},
2354 'mac-address': {'type': 'string'},
2355 'mtu': {'type': 'integer'},
2356 'no-auto-start': {'type': 'boolean'},
2357 'parent-interface-name': {'type': 'string'},
2358 'provider-address-id': {'type': 'string'},
2359 'provider-id': {'type': 'string'},
2360 'provider-space-id': {'type': 'string'},
2361 'provider-subnet-id': {'type': 'string'},
2362 'provider-vlan-id': {'type': 'string'},
2363 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
2365 'vlan-tag': {'type': 'integer'}},
2366 'required': ['device-index',
2371 'provider-subnet-id',
2372 'provider-space-id',
2373 'provider-address-id',
2377 'parent-interface-name',
2381 'NetworkRoute': {'additionalProperties': False,
2382 'properties': {'destination-cidr': {'type': 'string'},
2383 'gateway-ip': {'type': 'string'},
2384 'metric': {'type': 'integer'}},
2385 'required': ['destination-cidr',
2389 'NotifyWatchResult': {'additionalProperties': False,
2390 'properties': {'NotifyWatcherId': {'type': 'string'},
2391 'error': {'$ref': '#/definitions/Error'}},
2392 'required': ['NotifyWatcherId'],
2394 'Number': {'additionalProperties': False,
2395 'properties': {'Build': {'type': 'integer'},
2396 'Major': {'type': 'integer'},
2397 'Minor': {'type': 'integer'},
2398 'Patch': {'type': 'integer'},
2399 'Tag': {'type': 'string'}},
2400 'required': ['Major',
2406 'ProvisioningInfo': {'additionalProperties': False,
2407 'properties': {'constraints': {'$ref': '#/definitions/Value'},
2408 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
2411 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
2413 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
2415 'jobs': {'items': {'type': 'string'},
2417 'placement': {'type': 'string'},
2418 'series': {'type': 'string'},
2419 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
2422 'tags': {'patternProperties': {'.*': {'type': 'string'}},
2424 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
2426 'required': ['constraints',
2431 'ProvisioningInfoResult': {'additionalProperties': False,
2432 'properties': {'error': {'$ref': '#/definitions/Error'},
2433 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
2434 'required': ['result'],
2436 'ProvisioningInfoResults': {'additionalProperties': False,
2437 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
2439 'required': ['results'],
2441 'SetMachineNetworkConfig': {'additionalProperties': False,
2442 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
2444 'tag': {'type': 'string'}},
2445 'required': ['tag', 'config'],
2447 'SetStatus': {'additionalProperties': False,
2448 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
2450 'required': ['entities'],
2452 'Settings': {'additionalProperties': False,
2453 'properties': {'Ftp': {'type': 'string'},
2454 'Http': {'type': 'string'},
2455 'Https': {'type': 'string'},
2456 'NoProxy': {'type': 'string'}},
2457 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
2459 'StatusResult': {'additionalProperties': False,
2460 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2463 'error': {'$ref': '#/definitions/Error'},
2464 'id': {'type': 'string'},
2465 'info': {'type': 'string'},
2466 'life': {'type': 'string'},
2467 'since': {'format': 'date-time',
2469 'status': {'type': 'string'}},
2477 'StatusResults': {'additionalProperties': False,
2478 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
2480 'required': ['results'],
2482 'StringResult': {'additionalProperties': False,
2483 'properties': {'error': {'$ref': '#/definitions/Error'},
2484 'result': {'type': 'string'}},
2485 'required': ['result'],
2487 'StringResults': {'additionalProperties': False,
2488 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2490 'required': ['results'],
2492 'StringsResult': {'additionalProperties': False,
2493 'properties': {'error': {'$ref': '#/definitions/Error'},
2494 'result': {'items': {'type': 'string'},
2497 'StringsWatchResult': {'additionalProperties': False,
2498 'properties': {'changes': {'items': {'type': 'string'},
2500 'error': {'$ref': '#/definitions/Error'},
2501 'watcher-id': {'type': 'string'}},
2502 'required': ['watcher-id'],
2504 'StringsWatchResults': {'additionalProperties': False,
2505 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
2507 'required': ['results'],
2509 'Tools': {'additionalProperties': False,
2510 'properties': {'sha256': {'type': 'string'},
2511 'size': {'type': 'integer'},
2512 'url': {'type': 'string'},
2513 'version': {'$ref': '#/definitions/Binary'}},
2514 'required': ['version', 'url', 'size'],
2516 'ToolsResult': {'additionalProperties': False,
2517 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
2518 'error': {'$ref': '#/definitions/Error'},
2519 'tools': {'items': {'$ref': '#/definitions/Tools'},
2521 'required': ['tools',
2522 'disable-ssl-hostname-verification'],
2524 'ToolsResults': {'additionalProperties': False,
2525 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
2527 'required': ['results'],
2529 'UpdateBehavior': {'additionalProperties': False,
2530 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
2531 'enable-os-upgrade': {'type': 'boolean'}},
2532 'required': ['enable-os-refresh-update',
2533 'enable-os-upgrade'],
2535 'Value': {'additionalProperties': False,
2536 'properties': {'arch': {'type': 'string'},
2537 'container': {'type': 'string'},
2538 'cores': {'type': 'integer'},
2539 'cpu-power': {'type': 'integer'},
2540 'instance-type': {'type': 'string'},
2541 'mem': {'type': 'integer'},
2542 'root-disk': {'type': 'integer'},
2543 'spaces': {'items': {'type': 'string'},
2545 'tags': {'items': {'type': 'string'},
2547 'virt-type': {'type': 'string'}},
2549 'Volume': {'additionalProperties': False,
2550 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
2551 'volume-tag': {'type': 'string'}},
2552 'required': ['volume-tag', 'info'],
2554 'VolumeAttachmentInfo': {'additionalProperties': False,
2555 'properties': {'bus-address': {'type': 'string'},
2556 'device-link': {'type': 'string'},
2557 'device-name': {'type': 'string'},
2558 'read-only': {'type': 'boolean'}},
2560 'VolumeAttachmentParams': {'additionalProperties': False,
2561 'properties': {'instance-id': {'type': 'string'},
2562 'machine-tag': {'type': 'string'},
2563 'provider': {'type': 'string'},
2564 'read-only': {'type': 'boolean'},
2565 'volume-id': {'type': 'string'},
2566 'volume-tag': {'type': 'string'}},
2567 'required': ['volume-tag',
2571 'VolumeInfo': {'additionalProperties': False,
2572 'properties': {'hardware-id': {'type': 'string'},
2573 'persistent': {'type': 'boolean'},
2574 'pool': {'type': 'string'},
2575 'size': {'type': 'integer'},
2576 'volume-id': {'type': 'string'}},
2577 'required': ['volume-id', 'size', 'persistent'],
2579 'VolumeParams': {'additionalProperties': False,
2580 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
2581 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
2584 'provider': {'type': 'string'},
2585 'size': {'type': 'integer'},
2586 'tags': {'patternProperties': {'.*': {'type': 'string'}},
2588 'volume-tag': {'type': 'string'}},
2589 'required': ['volume-tag',
2593 'WatchContainer': {'additionalProperties': False,
2594 'properties': {'container-type': {'type': 'string'},
2595 'machine-tag': {'type': 'string'}},
2596 'required': ['machine-tag',
2599 'WatchContainers': {'additionalProperties': False,
2600 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
2602 'required': ['params'],
2604 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2606 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
2608 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
2610 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2611 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
2613 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
2615 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
2616 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
2618 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
2620 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2621 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
2623 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2624 'Result': {'$ref': '#/definitions/ErrorResults'}},
2626 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
2627 'Result': {'$ref': '#/definitions/FindToolsResult'}},
2629 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2630 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
2632 'HostChangesForContainers': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2633 'Result': {'$ref': '#/definitions/HostNetworkChangeResults'}},
2635 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2636 'Result': {'$ref': '#/definitions/StringResults'}},
2638 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2639 'Result': {'$ref': '#/definitions/StatusResults'}},
2641 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2642 'Result': {'$ref': '#/definitions/LifeResults'}},
2644 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
2646 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2647 'Result': {'$ref': '#/definitions/ErrorResults'}},
2649 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
2651 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
2653 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2654 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
2656 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2657 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
2659 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2660 'Result': {'$ref': '#/definitions/ErrorResults'}},
2662 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2663 'Result': {'$ref': '#/definitions/ErrorResults'}},
2665 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2666 'Result': {'$ref': '#/definitions/StringResults'}},
2668 'SetHostMachineNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
2670 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
2671 'Result': {'$ref': '#/definitions/ErrorResults'}},
2673 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2674 'Result': {'$ref': '#/definitions/ErrorResults'}},
2676 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
2678 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
2679 'Result': {'$ref': '#/definitions/ErrorResults'}},
2681 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2682 'Result': {'$ref': '#/definitions/ErrorResults'}},
2684 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2685 'Result': {'$ref': '#/definitions/ErrorResults'}},
2687 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
2688 'Result': {'$ref': '#/definitions/ErrorResults'}},
2690 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2692 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2693 'Result': {'$ref': '#/definitions/StatusResults'}},
2695 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2696 'Result': {'$ref': '#/definitions/ToolsResults'}},
2698 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2699 'Result': {'$ref': '#/definitions/ErrorResults'}},
2701 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2703 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
2704 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2706 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
2707 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2709 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2711 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2713 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
2718 @ReturnMapping(StringsResult
)
2719 async def APIAddresses(self
):
2722 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
2724 # map input types to rpc msg
2726 msg
= dict(type='Provisioner', request
='APIAddresses', version
=3, params
=_params
)
2728 reply
= await self
.rpc(msg
)
2733 @ReturnMapping(APIHostPortsResult
)
2734 async def APIHostPorts(self
):
2737 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
2739 # map input types to rpc msg
2741 msg
= dict(type='Provisioner', request
='APIHostPorts', version
=3, params
=_params
)
2743 reply
= await self
.rpc(msg
)
2748 @ReturnMapping(BytesResult
)
2749 async def CACert(self
):
2752 Returns -> typing.Sequence<+T_co>[int]
2754 # map input types to rpc msg
2756 msg
= dict(type='Provisioner', request
='CACert', version
=3, params
=_params
)
2758 reply
= await self
.rpc(msg
)
2763 @ReturnMapping(ConstraintsResults
)
2764 async def Constraints(self
, entities
):
2766 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2767 Returns -> typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
2769 # map input types to rpc msg
2771 msg
= dict(type='Provisioner', request
='Constraints', version
=3, params
=_params
)
2772 _params
['entities'] = entities
2773 reply
= await self
.rpc(msg
)
2778 @ReturnMapping(ContainerConfig
)
2779 async def ContainerConfig(self
):
2782 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool]
2784 # map input types to rpc msg
2786 msg
= dict(type='Provisioner', request
='ContainerConfig', version
=3, params
=_params
)
2788 reply
= await self
.rpc(msg
)
2793 @ReturnMapping(ContainerManagerConfig
)
2794 async def ContainerManagerConfig(self
, type_
):
2797 Returns -> typing.Mapping<~KT, +VT_co>[str, str]
2799 # map input types to rpc msg
2801 msg
= dict(type='Provisioner', request
='ContainerManagerConfig', version
=3, params
=_params
)
2802 _params
['type'] = type_
2803 reply
= await self
.rpc(msg
)
2808 @ReturnMapping(ControllerConfigResult
)
2809 async def ControllerConfig(self
):
2812 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
2814 # map input types to rpc msg
2816 msg
= dict(type='Provisioner', request
='ControllerConfig', version
=3, params
=_params
)
2818 reply
= await self
.rpc(msg
)
2823 @ReturnMapping(DistributionGroupResults
)
2824 async def DistributionGroup(self
, entities
):
2826 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2827 Returns -> typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
2829 # map input types to rpc msg
2831 msg
= dict(type='Provisioner', request
='DistributionGroup', version
=3, params
=_params
)
2832 _params
['entities'] = entities
2833 reply
= await self
.rpc(msg
)
2838 @ReturnMapping(ErrorResults
)
2839 async def EnsureDead(self
, entities
):
2841 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2842 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2844 # map input types to rpc msg
2846 msg
= dict(type='Provisioner', request
='EnsureDead', version
=3, params
=_params
)
2847 _params
['entities'] = entities
2848 reply
= await self
.rpc(msg
)
2853 @ReturnMapping(FindToolsResult
)
2854 async def FindTools(self
, arch
, major
, minor
, number
, series
):
2861 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
2863 # map input types to rpc msg
2865 msg
= dict(type='Provisioner', request
='FindTools', version
=3, params
=_params
)
2866 _params
['arch'] = arch
2867 _params
['major'] = major
2868 _params
['minor'] = minor
2869 _params
['number'] = number
2870 _params
['series'] = series
2871 reply
= await self
.rpc(msg
)
2876 @ReturnMapping(MachineNetworkConfigResults
)
2877 async def GetContainerInterfaceInfo(self
, entities
):
2879 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2880 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
2882 # map input types to rpc msg
2884 msg
= dict(type='Provisioner', request
='GetContainerInterfaceInfo', version
=3, params
=_params
)
2885 _params
['entities'] = entities
2886 reply
= await self
.rpc(msg
)
2891 @ReturnMapping(HostNetworkChangeResults
)
2892 async def HostChangesForContainers(self
, entities
):
2894 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2895 Returns -> typing.Sequence<+T_co>[~HostNetworkChange]<~HostNetworkChange>
2897 # map input types to rpc msg
2899 msg
= dict(type='Provisioner', request
='HostChangesForContainers', version
=3, params
=_params
)
2900 _params
['entities'] = entities
2901 reply
= await self
.rpc(msg
)
2906 @ReturnMapping(StringResults
)
2907 async def InstanceId(self
, entities
):
2909 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2910 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
2912 # map input types to rpc msg
2914 msg
= dict(type='Provisioner', request
='InstanceId', version
=3, params
=_params
)
2915 _params
['entities'] = entities
2916 reply
= await self
.rpc(msg
)
2921 @ReturnMapping(StatusResults
)
2922 async def InstanceStatus(self
, entities
):
2924 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2925 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
2927 # map input types to rpc msg
2929 msg
= dict(type='Provisioner', request
='InstanceStatus', version
=3, params
=_params
)
2930 _params
['entities'] = entities
2931 reply
= await self
.rpc(msg
)
2936 @ReturnMapping(LifeResults
)
2937 async def Life(self
, entities
):
2939 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2940 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2942 # map input types to rpc msg
2944 msg
= dict(type='Provisioner', request
='Life', version
=3, params
=_params
)
2945 _params
['entities'] = entities
2946 reply
= await self
.rpc(msg
)
2951 @ReturnMapping(StatusResults
)
2952 async def MachinesWithTransientErrors(self
):
2955 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
2957 # map input types to rpc msg
2959 msg
= dict(type='Provisioner', request
='MachinesWithTransientErrors', version
=3, params
=_params
)
2961 reply
= await self
.rpc(msg
)
2966 @ReturnMapping(ErrorResults
)
2967 async def MarkMachinesForRemoval(self
, entities
):
2969 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2970 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2972 # map input types to rpc msg
2974 msg
= dict(type='Provisioner', request
='MarkMachinesForRemoval', version
=3, params
=_params
)
2975 _params
['entities'] = entities
2976 reply
= await self
.rpc(msg
)
2981 @ReturnMapping(ModelConfigResult
)
2982 async def ModelConfig(self
):
2985 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
2987 # map input types to rpc msg
2989 msg
= dict(type='Provisioner', request
='ModelConfig', version
=3, params
=_params
)
2991 reply
= await self
.rpc(msg
)
2996 @ReturnMapping(StringResult
)
2997 async def ModelUUID(self
):
3000 Returns -> typing.Union[_ForwardRef('Error'), str]
3002 # map input types to rpc msg
3004 msg
= dict(type='Provisioner', request
='ModelUUID', version
=3, params
=_params
)
3006 reply
= await self
.rpc(msg
)
3011 @ReturnMapping(MachineNetworkConfigResults
)
3012 async def PrepareContainerInterfaceInfo(self
, entities
):
3014 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3015 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
3017 # map input types to rpc msg
3019 msg
= dict(type='Provisioner', request
='PrepareContainerInterfaceInfo', version
=3, params
=_params
)
3020 _params
['entities'] = entities
3021 reply
= await self
.rpc(msg
)
3026 @ReturnMapping(ProvisioningInfoResults
)
3027 async def ProvisioningInfo(self
, entities
):
3029 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3030 Returns -> typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
3032 # map input types to rpc msg
3034 msg
= dict(type='Provisioner', request
='ProvisioningInfo', version
=3, params
=_params
)
3035 _params
['entities'] = entities
3036 reply
= await self
.rpc(msg
)
3041 @ReturnMapping(ErrorResults
)
3042 async def ReleaseContainerAddresses(self
, entities
):
3044 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3045 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3047 # map input types to rpc msg
3049 msg
= dict(type='Provisioner', request
='ReleaseContainerAddresses', version
=3, params
=_params
)
3050 _params
['entities'] = entities
3051 reply
= await self
.rpc(msg
)
3056 @ReturnMapping(ErrorResults
)
3057 async def Remove(self
, entities
):
3059 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3060 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3062 # map input types to rpc msg
3064 msg
= dict(type='Provisioner', request
='Remove', version
=3, params
=_params
)
3065 _params
['entities'] = entities
3066 reply
= await self
.rpc(msg
)
3071 @ReturnMapping(StringResults
)
3072 async def Series(self
, entities
):
3074 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3075 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
3077 # map input types to rpc msg
3079 msg
= dict(type='Provisioner', request
='Series', version
=3, params
=_params
)
3080 _params
['entities'] = entities
3081 reply
= await self
.rpc(msg
)
3086 @ReturnMapping(None)
3087 async def SetHostMachineNetworkConfig(self
, config
, tag
):
3089 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3093 # map input types to rpc msg
3095 msg
= dict(type='Provisioner', request
='SetHostMachineNetworkConfig', version
=3, params
=_params
)
3096 _params
['config'] = config
3097 _params
['tag'] = tag
3098 reply
= await self
.rpc(msg
)
3103 @ReturnMapping(ErrorResults
)
3104 async def SetInstanceInfo(self
, machines
):
3106 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
3107 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3109 # map input types to rpc msg
3111 msg
= dict(type='Provisioner', request
='SetInstanceInfo', version
=3, params
=_params
)
3112 _params
['machines'] = machines
3113 reply
= await self
.rpc(msg
)
3118 @ReturnMapping(ErrorResults
)
3119 async def SetInstanceStatus(self
, entities
):
3121 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3122 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3124 # map input types to rpc msg
3126 msg
= dict(type='Provisioner', request
='SetInstanceStatus', version
=3, params
=_params
)
3127 _params
['entities'] = entities
3128 reply
= await self
.rpc(msg
)
3133 @ReturnMapping(None)
3134 async def SetObservedNetworkConfig(self
, config
, tag
):
3136 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3140 # map input types to rpc msg
3142 msg
= dict(type='Provisioner', request
='SetObservedNetworkConfig', version
=3, params
=_params
)
3143 _params
['config'] = config
3144 _params
['tag'] = tag
3145 reply
= await self
.rpc(msg
)
3150 @ReturnMapping(ErrorResults
)
3151 async def SetPasswords(self
, changes
):
3153 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
3154 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3156 # map input types to rpc msg
3158 msg
= dict(type='Provisioner', request
='SetPasswords', version
=3, params
=_params
)
3159 _params
['changes'] = changes
3160 reply
= await self
.rpc(msg
)
3165 @ReturnMapping(ErrorResults
)
3166 async def SetProviderNetworkConfig(self
, entities
):
3168 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3169 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3171 # map input types to rpc msg
3173 msg
= dict(type='Provisioner', request
='SetProviderNetworkConfig', version
=3, params
=_params
)
3174 _params
['entities'] = entities
3175 reply
= await self
.rpc(msg
)
3180 @ReturnMapping(ErrorResults
)
3181 async def SetStatus(self
, entities
):
3183 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3184 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3186 # map input types to rpc msg
3188 msg
= dict(type='Provisioner', request
='SetStatus', version
=3, params
=_params
)
3189 _params
['entities'] = entities
3190 reply
= await self
.rpc(msg
)
3195 @ReturnMapping(ErrorResults
)
3196 async def SetSupportedContainers(self
, params
):
3198 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
3199 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3201 # map input types to rpc msg
3203 msg
= dict(type='Provisioner', request
='SetSupportedContainers', version
=3, params
=_params
)
3204 _params
['params'] = params
3205 reply
= await self
.rpc(msg
)
3210 @ReturnMapping(StringsResult
)
3211 async def StateAddresses(self
):
3214 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
3216 # map input types to rpc msg
3218 msg
= dict(type='Provisioner', request
='StateAddresses', version
=3, params
=_params
)
3220 reply
= await self
.rpc(msg
)
3225 @ReturnMapping(StatusResults
)
3226 async def Status(self
, entities
):
3228 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3229 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
3231 # map input types to rpc msg
3233 msg
= dict(type='Provisioner', request
='Status', version
=3, params
=_params
)
3234 _params
['entities'] = entities
3235 reply
= await self
.rpc(msg
)
3240 @ReturnMapping(ToolsResults
)
3241 async def Tools(self
, entities
):
3243 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3244 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
3246 # map input types to rpc msg
3248 msg
= dict(type='Provisioner', request
='Tools', version
=3, params
=_params
)
3249 _params
['entities'] = entities
3250 reply
= await self
.rpc(msg
)
3255 @ReturnMapping(ErrorResults
)
3256 async def UpdateStatus(self
, entities
):
3258 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3259 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3261 # map input types to rpc msg
3263 msg
= dict(type='Provisioner', request
='UpdateStatus', version
=3, params
=_params
)
3264 _params
['entities'] = entities
3265 reply
= await self
.rpc(msg
)
3270 @ReturnMapping(NotifyWatchResult
)
3271 async def WatchAPIHostPorts(self
):
3274 Returns -> typing.Union[str, _ForwardRef('Error')]
3276 # map input types to rpc msg
3278 msg
= dict(type='Provisioner', request
='WatchAPIHostPorts', version
=3, params
=_params
)
3280 reply
= await self
.rpc(msg
)
3285 @ReturnMapping(StringsWatchResults
)
3286 async def WatchAllContainers(self
, params
):
3288 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
3289 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
3291 # map input types to rpc msg
3293 msg
= dict(type='Provisioner', request
='WatchAllContainers', version
=3, params
=_params
)
3294 _params
['params'] = params
3295 reply
= await self
.rpc(msg
)
3300 @ReturnMapping(StringsWatchResults
)
3301 async def WatchContainers(self
, params
):
3303 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
3304 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
3306 # map input types to rpc msg
3308 msg
= dict(type='Provisioner', request
='WatchContainers', version
=3, params
=_params
)
3309 _params
['params'] = params
3310 reply
= await self
.rpc(msg
)
3315 @ReturnMapping(NotifyWatchResult
)
3316 async def WatchForModelConfigChanges(self
):
3319 Returns -> typing.Union[str, _ForwardRef('Error')]
3321 # map input types to rpc msg
3323 msg
= dict(type='Provisioner', request
='WatchForModelConfigChanges', version
=3, params
=_params
)
3325 reply
= await self
.rpc(msg
)
3330 @ReturnMapping(NotifyWatchResult
)
3331 async def WatchMachineErrorRetry(self
):
3334 Returns -> typing.Union[str, _ForwardRef('Error')]
3336 # map input types to rpc msg
3338 msg
= dict(type='Provisioner', request
='WatchMachineErrorRetry', version
=3, params
=_params
)
3340 reply
= await self
.rpc(msg
)
3345 @ReturnMapping(StringsWatchResult
)
3346 async def WatchModelMachines(self
):
3349 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
3351 # map input types to rpc msg
3353 msg
= dict(type='Provisioner', request
='WatchModelMachines', version
=3, params
=_params
)
3355 reply
= await self
.rpc(msg
)
3360 class StorageFacade(Type
):
3363 schema
= {'definitions': {'Entities': {'additionalProperties': False,
3364 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3366 'required': ['entities'],
3368 'Entity': {'additionalProperties': False,
3369 'properties': {'tag': {'type': 'string'}},
3370 'required': ['tag'],
3372 'EntityStatus': {'additionalProperties': False,
3373 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3376 'info': {'type': 'string'},
3377 'since': {'format': 'date-time',
3379 'status': {'type': 'string'}},
3380 'required': ['status', 'info', 'since'],
3382 'Error': {'additionalProperties': False,
3383 'properties': {'code': {'type': 'string'},
3384 'info': {'$ref': '#/definitions/ErrorInfo'},
3385 'message': {'type': 'string'}},
3386 'required': ['message', 'code'],
3388 'ErrorInfo': {'additionalProperties': False,
3389 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3390 'macaroon-path': {'type': 'string'}},
3392 'ErrorResult': {'additionalProperties': False,
3393 'properties': {'error': {'$ref': '#/definitions/Error'}},
3395 'ErrorResults': {'additionalProperties': False,
3396 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3398 'required': ['results'],
3400 'FilesystemAttachmentDetails': {'additionalProperties': False,
3401 'properties': {'FilesystemAttachmentInfo': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
3402 'life': {'type': 'string'}},
3403 'required': ['FilesystemAttachmentInfo'],
3405 'FilesystemAttachmentInfo': {'additionalProperties': False,
3406 'properties': {'mount-point': {'type': 'string'},
3407 'read-only': {'type': 'boolean'}},
3409 'FilesystemDetails': {'additionalProperties': False,
3410 'properties': {'filesystem-tag': {'type': 'string'},
3411 'info': {'$ref': '#/definitions/FilesystemInfo'},
3412 'life': {'type': 'string'},
3413 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentDetails'}},
3415 'status': {'$ref': '#/definitions/EntityStatus'},
3416 'storage': {'$ref': '#/definitions/StorageDetails'},
3417 'volume-tag': {'type': 'string'}},
3418 'required': ['filesystem-tag',
3422 'FilesystemDetailsListResult': {'additionalProperties': False,
3423 'properties': {'error': {'$ref': '#/definitions/Error'},
3424 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
3427 'FilesystemDetailsListResults': {'additionalProperties': False,
3428 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
3431 'FilesystemFilter': {'additionalProperties': False,
3432 'properties': {'machines': {'items': {'type': 'string'},
3435 'FilesystemFilters': {'additionalProperties': False,
3436 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
3439 'FilesystemInfo': {'additionalProperties': False,
3440 'properties': {'filesystem-id': {'type': 'string'},
3441 'pool': {'type': 'string'},
3442 'size': {'type': 'integer'}},
3443 'required': ['filesystem-id',
3447 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3448 'StorageAddParams': {'additionalProperties': False,
3449 'properties': {'name': {'type': 'string'},
3450 'storage': {'$ref': '#/definitions/StorageConstraints'},
3451 'unit': {'type': 'string'}},
3452 'required': ['unit', 'name', 'storage'],
3454 'StorageAttachmentDetails': {'additionalProperties': False,
3455 'properties': {'life': {'type': 'string'},
3456 'location': {'type': 'string'},
3457 'machine-tag': {'type': 'string'},
3458 'storage-tag': {'type': 'string'},
3459 'unit-tag': {'type': 'string'}},
3460 'required': ['storage-tag',
3464 'StorageAttachmentId': {'additionalProperties': False,
3465 'properties': {'storage-tag': {'type': 'string'},
3466 'unit-tag': {'type': 'string'}},
3467 'required': ['storage-tag',
3470 'StorageAttachmentIds': {'additionalProperties': False,
3471 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
3473 'required': ['ids'],
3475 'StorageConstraints': {'additionalProperties': False,
3476 'properties': {'count': {'type': 'integer'},
3477 'pool': {'type': 'string'},
3478 'size': {'type': 'integer'}},
3480 'StorageDetails': {'additionalProperties': False,
3481 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
3483 'kind': {'type': 'integer'},
3484 'life': {'type': 'string'},
3485 'owner-tag': {'type': 'string'},
3486 'persistent': {'type': 'boolean'},
3487 'status': {'$ref': '#/definitions/EntityStatus'},
3488 'storage-tag': {'type': 'string'}},
3489 'required': ['storage-tag',
3495 'StorageDetailsListResult': {'additionalProperties': False,
3496 'properties': {'error': {'$ref': '#/definitions/Error'},
3497 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
3500 'StorageDetailsListResults': {'additionalProperties': False,
3501 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
3504 'StorageDetailsResult': {'additionalProperties': False,
3505 'properties': {'error': {'$ref': '#/definitions/Error'},
3506 'result': {'$ref': '#/definitions/StorageDetails'}},
3508 'StorageDetailsResults': {'additionalProperties': False,
3509 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
3512 'StorageFilter': {'additionalProperties': False,
3514 'StorageFilters': {'additionalProperties': False,
3515 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
3518 'StoragePool': {'additionalProperties': False,
3519 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
3522 'name': {'type': 'string'},
3523 'provider': {'type': 'string'}},
3524 'required': ['name', 'provider', 'attrs'],
3526 'StoragePoolFilter': {'additionalProperties': False,
3527 'properties': {'names': {'items': {'type': 'string'},
3529 'providers': {'items': {'type': 'string'},
3532 'StoragePoolFilters': {'additionalProperties': False,
3533 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
3536 'StoragePoolsResult': {'additionalProperties': False,
3537 'properties': {'error': {'$ref': '#/definitions/Error'},
3538 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
3541 'StoragePoolsResults': {'additionalProperties': False,
3542 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
3545 'StoragesAddParams': {'additionalProperties': False,
3546 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
3548 'required': ['storages'],
3550 'VolumeAttachmentDetails': {'additionalProperties': False,
3551 'properties': {'VolumeAttachmentInfo': {'$ref': '#/definitions/VolumeAttachmentInfo'},
3552 'life': {'type': 'string'}},
3553 'required': ['VolumeAttachmentInfo'],
3555 'VolumeAttachmentInfo': {'additionalProperties': False,
3556 'properties': {'bus-address': {'type': 'string'},
3557 'device-link': {'type': 'string'},
3558 'device-name': {'type': 'string'},
3559 'read-only': {'type': 'boolean'}},
3561 'VolumeDetails': {'additionalProperties': False,
3562 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
3563 'life': {'type': 'string'},
3564 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentDetails'}},
3566 'status': {'$ref': '#/definitions/EntityStatus'},
3567 'storage': {'$ref': '#/definitions/StorageDetails'},
3568 'volume-tag': {'type': 'string'}},
3569 'required': ['volume-tag', 'info', 'status'],
3571 'VolumeDetailsListResult': {'additionalProperties': False,
3572 'properties': {'error': {'$ref': '#/definitions/Error'},
3573 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
3576 'VolumeDetailsListResults': {'additionalProperties': False,
3577 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
3580 'VolumeFilter': {'additionalProperties': False,
3581 'properties': {'machines': {'items': {'type': 'string'},
3584 'VolumeFilters': {'additionalProperties': False,
3585 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
3588 'VolumeInfo': {'additionalProperties': False,
3589 'properties': {'hardware-id': {'type': 'string'},
3590 'persistent': {'type': 'boolean'},
3591 'pool': {'type': 'string'},
3592 'size': {'type': 'integer'},
3593 'volume-id': {'type': 'string'}},
3594 'required': ['volume-id', 'size', 'persistent'],
3596 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
3597 'Result': {'$ref': '#/definitions/ErrorResults'}},
3599 'Attach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3600 'Result': {'$ref': '#/definitions/ErrorResults'}},
3602 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
3604 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3605 'Result': {'$ref': '#/definitions/ErrorResults'}},
3607 'Detach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3608 'Result': {'$ref': '#/definitions/ErrorResults'}},
3610 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
3611 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
3613 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
3614 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
3616 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
3617 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
3619 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
3620 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
3622 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3623 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
3628 @ReturnMapping(ErrorResults
)
3629 async def AddToUnit(self
, storages
):
3631 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
3632 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3634 # map input types to rpc msg
3636 msg
= dict(type='Storage', request
='AddToUnit', version
=3, params
=_params
)
3637 _params
['storages'] = storages
3638 reply
= await self
.rpc(msg
)
3643 @ReturnMapping(ErrorResults
)
3644 async def Attach(self
, ids
):
3646 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
3647 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3649 # map input types to rpc msg
3651 msg
= dict(type='Storage', request
='Attach', version
=3, params
=_params
)
3652 _params
['ids'] = ids
3653 reply
= await self
.rpc(msg
)
3658 @ReturnMapping(None)
3659 async def CreatePool(self
, attrs
, name
, provider
):
3661 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3666 # map input types to rpc msg
3668 msg
= dict(type='Storage', request
='CreatePool', version
=3, params
=_params
)
3669 _params
['attrs'] = attrs
3670 _params
['name'] = name
3671 _params
['provider'] = provider
3672 reply
= await self
.rpc(msg
)
3677 @ReturnMapping(ErrorResults
)
3678 async def Destroy(self
, entities
):
3680 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3681 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3683 # map input types to rpc msg
3685 msg
= dict(type='Storage', request
='Destroy', version
=3, params
=_params
)
3686 _params
['entities'] = entities
3687 reply
= await self
.rpc(msg
)
3692 @ReturnMapping(ErrorResults
)
3693 async def Detach(self
, ids
):
3695 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
3696 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3698 # map input types to rpc msg
3700 msg
= dict(type='Storage', request
='Detach', version
=3, params
=_params
)
3701 _params
['ids'] = ids
3702 reply
= await self
.rpc(msg
)
3707 @ReturnMapping(FilesystemDetailsListResults
)
3708 async def ListFilesystems(self
, filters
):
3710 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
3711 Returns -> typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
3713 # map input types to rpc msg
3715 msg
= dict(type='Storage', request
='ListFilesystems', version
=3, params
=_params
)
3716 _params
['filters'] = filters
3717 reply
= await self
.rpc(msg
)
3722 @ReturnMapping(StoragePoolsResults
)
3723 async def ListPools(self
, filters
):
3725 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
3726 Returns -> typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
3728 # map input types to rpc msg
3730 msg
= dict(type='Storage', request
='ListPools', version
=3, params
=_params
)
3731 _params
['filters'] = filters
3732 reply
= await self
.rpc(msg
)
3737 @ReturnMapping(StorageDetailsListResults
)
3738 async def ListStorageDetails(self
, filters
):
3740 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
3741 Returns -> typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
3743 # map input types to rpc msg
3745 msg
= dict(type='Storage', request
='ListStorageDetails', version
=3, params
=_params
)
3746 _params
['filters'] = filters
3747 reply
= await self
.rpc(msg
)
3752 @ReturnMapping(VolumeDetailsListResults
)
3753 async def ListVolumes(self
, filters
):
3755 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
3756 Returns -> typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
3758 # map input types to rpc msg
3760 msg
= dict(type='Storage', request
='ListVolumes', version
=3, params
=_params
)
3761 _params
['filters'] = filters
3762 reply
= await self
.rpc(msg
)
3767 @ReturnMapping(StorageDetailsResults
)
3768 async def StorageDetails(self
, entities
):
3770 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3771 Returns -> typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
3773 # map input types to rpc msg
3775 msg
= dict(type='Storage', request
='StorageDetails', version
=3, params
=_params
)
3776 _params
['entities'] = entities
3777 reply
= await self
.rpc(msg
)
3782 class StorageProvisionerFacade(Type
):
3783 name
= 'StorageProvisioner'
3785 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
3786 'properties': {'BusAddress': {'type': 'string'},
3787 'DeviceLinks': {'items': {'type': 'string'},
3789 'DeviceName': {'type': 'string'},
3790 'FilesystemType': {'type': 'string'},
3791 'HardwareId': {'type': 'string'},
3792 'InUse': {'type': 'boolean'},
3793 'Label': {'type': 'string'},
3794 'MountPoint': {'type': 'string'},
3795 'Size': {'type': 'integer'},
3796 'UUID': {'type': 'string'}},
3797 'required': ['DeviceName',
3808 'BlockDeviceResult': {'additionalProperties': False,
3809 'properties': {'error': {'$ref': '#/definitions/Error'},
3810 'result': {'$ref': '#/definitions/BlockDevice'}},
3811 'required': ['result'],
3813 'BlockDeviceResults': {'additionalProperties': False,
3814 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
3817 'Entities': {'additionalProperties': False,
3818 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3820 'required': ['entities'],
3822 'Entity': {'additionalProperties': False,
3823 'properties': {'tag': {'type': 'string'}},
3824 'required': ['tag'],
3826 'EntityStatusArgs': {'additionalProperties': False,
3827 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3830 'info': {'type': 'string'},
3831 'status': {'type': 'string'},
3832 'tag': {'type': 'string'}},
3838 'Error': {'additionalProperties': False,
3839 'properties': {'code': {'type': 'string'},
3840 'info': {'$ref': '#/definitions/ErrorInfo'},
3841 'message': {'type': 'string'}},
3842 'required': ['message', 'code'],
3844 'ErrorInfo': {'additionalProperties': False,
3845 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3846 'macaroon-path': {'type': 'string'}},
3848 'ErrorResult': {'additionalProperties': False,
3849 'properties': {'error': {'$ref': '#/definitions/Error'}},
3851 'ErrorResults': {'additionalProperties': False,
3852 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3854 'required': ['results'],
3856 'Filesystem': {'additionalProperties': False,
3857 'properties': {'filesystem-tag': {'type': 'string'},
3858 'info': {'$ref': '#/definitions/FilesystemInfo'},
3859 'volume-tag': {'type': 'string'}},
3860 'required': ['filesystem-tag', 'info'],
3862 'FilesystemAttachment': {'additionalProperties': False,
3863 'properties': {'filesystem-tag': {'type': 'string'},
3864 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
3865 'machine-tag': {'type': 'string'}},
3866 'required': ['filesystem-tag',
3870 'FilesystemAttachmentInfo': {'additionalProperties': False,
3871 'properties': {'mount-point': {'type': 'string'},
3872 'read-only': {'type': 'boolean'}},
3874 'FilesystemAttachmentParams': {'additionalProperties': False,
3875 'properties': {'filesystem-id': {'type': 'string'},
3876 'filesystem-tag': {'type': 'string'},
3877 'instance-id': {'type': 'string'},
3878 'machine-tag': {'type': 'string'},
3879 'mount-point': {'type': 'string'},
3880 'provider': {'type': 'string'},
3881 'read-only': {'type': 'boolean'}},
3882 'required': ['filesystem-tag',
3886 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
3887 'properties': {'error': {'$ref': '#/definitions/Error'},
3888 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
3889 'required': ['result'],
3891 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
3892 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
3895 'FilesystemAttachmentResult': {'additionalProperties': False,
3896 'properties': {'error': {'$ref': '#/definitions/Error'},
3897 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
3898 'required': ['result'],
3900 'FilesystemAttachmentResults': {'additionalProperties': False,
3901 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
3904 'FilesystemAttachments': {'additionalProperties': False,
3905 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
3907 'required': ['filesystem-attachments'],
3909 'FilesystemInfo': {'additionalProperties': False,
3910 'properties': {'filesystem-id': {'type': 'string'},
3911 'pool': {'type': 'string'},
3912 'size': {'type': 'integer'}},
3913 'required': ['filesystem-id',
3917 'FilesystemParams': {'additionalProperties': False,
3918 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
3919 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
3922 'filesystem-tag': {'type': 'string'},
3923 'provider': {'type': 'string'},
3924 'size': {'type': 'integer'},
3925 'tags': {'patternProperties': {'.*': {'type': 'string'}},
3927 'volume-tag': {'type': 'string'}},
3928 'required': ['filesystem-tag',
3932 'FilesystemParamsResult': {'additionalProperties': False,
3933 'properties': {'error': {'$ref': '#/definitions/Error'},
3934 'result': {'$ref': '#/definitions/FilesystemParams'}},
3935 'required': ['result'],
3937 'FilesystemParamsResults': {'additionalProperties': False,
3938 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
3941 'FilesystemResult': {'additionalProperties': False,
3942 'properties': {'error': {'$ref': '#/definitions/Error'},
3943 'result': {'$ref': '#/definitions/Filesystem'}},
3944 'required': ['result'],
3946 'FilesystemResults': {'additionalProperties': False,
3947 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
3950 'Filesystems': {'additionalProperties': False,
3951 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
3953 'required': ['filesystems'],
3955 'LifeResult': {'additionalProperties': False,
3956 'properties': {'error': {'$ref': '#/definitions/Error'},
3957 'life': {'type': 'string'}},
3958 'required': ['life'],
3960 'LifeResults': {'additionalProperties': False,
3961 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
3963 'required': ['results'],
3965 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3966 'MachineStorageId': {'additionalProperties': False,
3967 'properties': {'attachment-tag': {'type': 'string'},
3968 'machine-tag': {'type': 'string'}},
3969 'required': ['machine-tag',
3972 'MachineStorageIds': {'additionalProperties': False,
3973 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
3975 'required': ['ids'],
3977 'MachineStorageIdsWatchResult': {'additionalProperties': False,
3978 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
3980 'error': {'$ref': '#/definitions/Error'},
3981 'watcher-id': {'type': 'string'}},
3982 'required': ['watcher-id',
3985 'MachineStorageIdsWatchResults': {'additionalProperties': False,
3986 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
3988 'required': ['results'],
3990 'NotifyWatchResult': {'additionalProperties': False,
3991 'properties': {'NotifyWatcherId': {'type': 'string'},
3992 'error': {'$ref': '#/definitions/Error'}},
3993 'required': ['NotifyWatcherId'],
3995 'NotifyWatchResults': {'additionalProperties': False,
3996 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3998 'required': ['results'],
4000 'SetStatus': {'additionalProperties': False,
4001 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
4003 'required': ['entities'],
4005 'StringResult': {'additionalProperties': False,
4006 'properties': {'error': {'$ref': '#/definitions/Error'},
4007 'result': {'type': 'string'}},
4008 'required': ['result'],
4010 'StringResults': {'additionalProperties': False,
4011 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
4013 'required': ['results'],
4015 'StringsWatchResult': {'additionalProperties': False,
4016 'properties': {'changes': {'items': {'type': 'string'},
4018 'error': {'$ref': '#/definitions/Error'},
4019 'watcher-id': {'type': 'string'}},
4020 'required': ['watcher-id'],
4022 'StringsWatchResults': {'additionalProperties': False,
4023 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
4025 'required': ['results'],
4027 'Volume': {'additionalProperties': False,
4028 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
4029 'volume-tag': {'type': 'string'}},
4030 'required': ['volume-tag', 'info'],
4032 'VolumeAttachment': {'additionalProperties': False,
4033 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
4034 'machine-tag': {'type': 'string'},
4035 'volume-tag': {'type': 'string'}},
4036 'required': ['volume-tag',
4040 'VolumeAttachmentInfo': {'additionalProperties': False,
4041 'properties': {'bus-address': {'type': 'string'},
4042 'device-link': {'type': 'string'},
4043 'device-name': {'type': 'string'},
4044 'read-only': {'type': 'boolean'}},
4046 'VolumeAttachmentParams': {'additionalProperties': False,
4047 'properties': {'instance-id': {'type': 'string'},
4048 'machine-tag': {'type': 'string'},
4049 'provider': {'type': 'string'},
4050 'read-only': {'type': 'boolean'},
4051 'volume-id': {'type': 'string'},
4052 'volume-tag': {'type': 'string'}},
4053 'required': ['volume-tag',
4057 'VolumeAttachmentParamsResult': {'additionalProperties': False,
4058 'properties': {'error': {'$ref': '#/definitions/Error'},
4059 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
4060 'required': ['result'],
4062 'VolumeAttachmentParamsResults': {'additionalProperties': False,
4063 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
4066 'VolumeAttachmentResult': {'additionalProperties': False,
4067 'properties': {'error': {'$ref': '#/definitions/Error'},
4068 'result': {'$ref': '#/definitions/VolumeAttachment'}},
4069 'required': ['result'],
4071 'VolumeAttachmentResults': {'additionalProperties': False,
4072 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
4075 'VolumeAttachments': {'additionalProperties': False,
4076 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
4078 'required': ['volume-attachments'],
4080 'VolumeInfo': {'additionalProperties': False,
4081 'properties': {'hardware-id': {'type': 'string'},
4082 'persistent': {'type': 'boolean'},
4083 'pool': {'type': 'string'},
4084 'size': {'type': 'integer'},
4085 'volume-id': {'type': 'string'}},
4086 'required': ['volume-id', 'size', 'persistent'],
4088 'VolumeParams': {'additionalProperties': False,
4089 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
4090 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
4093 'provider': {'type': 'string'},
4094 'size': {'type': 'integer'},
4095 'tags': {'patternProperties': {'.*': {'type': 'string'}},
4097 'volume-tag': {'type': 'string'}},
4098 'required': ['volume-tag',
4102 'VolumeParamsResult': {'additionalProperties': False,
4103 'properties': {'error': {'$ref': '#/definitions/Error'},
4104 'result': {'$ref': '#/definitions/VolumeParams'}},
4105 'required': ['result'],
4107 'VolumeParamsResults': {'additionalProperties': False,
4108 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
4111 'VolumeResult': {'additionalProperties': False,
4112 'properties': {'error': {'$ref': '#/definitions/Error'},
4113 'result': {'$ref': '#/definitions/Volume'}},
4114 'required': ['result'],
4116 'VolumeResults': {'additionalProperties': False,
4117 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
4120 'Volumes': {'additionalProperties': False,
4121 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
4123 'required': ['volumes'],
4125 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4126 'Result': {'$ref': '#/definitions/LifeResults'}},
4128 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4129 'Result': {'$ref': '#/definitions/ErrorResults'}},
4131 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4132 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
4134 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4135 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
4137 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4138 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
4140 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4141 'Result': {'$ref': '#/definitions/FilesystemResults'}},
4143 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4144 'Result': {'$ref': '#/definitions/StringResults'}},
4146 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4147 'Result': {'$ref': '#/definitions/LifeResults'}},
4149 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4150 'Result': {'$ref': '#/definitions/ErrorResults'}},
4152 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4153 'Result': {'$ref': '#/definitions/ErrorResults'}},
4155 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
4156 'Result': {'$ref': '#/definitions/ErrorResults'}},
4158 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
4159 'Result': {'$ref': '#/definitions/ErrorResults'}},
4161 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4162 'Result': {'$ref': '#/definitions/ErrorResults'}},
4164 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
4165 'Result': {'$ref': '#/definitions/ErrorResults'}},
4167 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
4168 'Result': {'$ref': '#/definitions/ErrorResults'}},
4170 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4171 'Result': {'$ref': '#/definitions/ErrorResults'}},
4173 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4174 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
4176 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4177 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
4179 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4180 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
4182 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4183 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
4185 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4186 'Result': {'$ref': '#/definitions/VolumeResults'}},
4188 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4189 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4191 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4192 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
4194 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4195 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4197 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4198 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4200 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4201 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
4203 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4204 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4209 @ReturnMapping(LifeResults
)
4210 async def AttachmentLife(self
, ids
):
4212 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4213 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
4215 # map input types to rpc msg
4217 msg
= dict(type='StorageProvisioner', request
='AttachmentLife', version
=3, params
=_params
)
4218 _params
['ids'] = ids
4219 reply
= await self
.rpc(msg
)
4224 @ReturnMapping(ErrorResults
)
4225 async def EnsureDead(self
, entities
):
4227 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4228 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4230 # map input types to rpc msg
4232 msg
= dict(type='StorageProvisioner', request
='EnsureDead', version
=3, params
=_params
)
4233 _params
['entities'] = entities
4234 reply
= await self
.rpc(msg
)
4239 @ReturnMapping(FilesystemAttachmentParamsResults
)
4240 async def FilesystemAttachmentParams(self
, ids
):
4242 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4243 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
4245 # map input types to rpc msg
4247 msg
= dict(type='StorageProvisioner', request
='FilesystemAttachmentParams', version
=3, params
=_params
)
4248 _params
['ids'] = ids
4249 reply
= await self
.rpc(msg
)
4254 @ReturnMapping(FilesystemAttachmentResults
)
4255 async def FilesystemAttachments(self
, ids
):
4257 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4258 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
4260 # map input types to rpc msg
4262 msg
= dict(type='StorageProvisioner', request
='FilesystemAttachments', version
=3, params
=_params
)
4263 _params
['ids'] = ids
4264 reply
= await self
.rpc(msg
)
4269 @ReturnMapping(FilesystemParamsResults
)
4270 async def FilesystemParams(self
, entities
):
4272 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4273 Returns -> typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
4275 # map input types to rpc msg
4277 msg
= dict(type='StorageProvisioner', request
='FilesystemParams', version
=3, params
=_params
)
4278 _params
['entities'] = entities
4279 reply
= await self
.rpc(msg
)
4284 @ReturnMapping(FilesystemResults
)
4285 async def Filesystems(self
, entities
):
4287 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4288 Returns -> typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
4290 # map input types to rpc msg
4292 msg
= dict(type='StorageProvisioner', request
='Filesystems', version
=3, params
=_params
)
4293 _params
['entities'] = entities
4294 reply
= await self
.rpc(msg
)
4299 @ReturnMapping(StringResults
)
4300 async def InstanceId(self
, entities
):
4302 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4303 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
4305 # map input types to rpc msg
4307 msg
= dict(type='StorageProvisioner', request
='InstanceId', version
=3, params
=_params
)
4308 _params
['entities'] = entities
4309 reply
= await self
.rpc(msg
)
4314 @ReturnMapping(LifeResults
)
4315 async def Life(self
, entities
):
4317 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4318 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
4320 # map input types to rpc msg
4322 msg
= dict(type='StorageProvisioner', request
='Life', version
=3, params
=_params
)
4323 _params
['entities'] = entities
4324 reply
= await self
.rpc(msg
)
4329 @ReturnMapping(ErrorResults
)
4330 async def Remove(self
, entities
):
4332 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4333 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4335 # map input types to rpc msg
4337 msg
= dict(type='StorageProvisioner', request
='Remove', version
=3, params
=_params
)
4338 _params
['entities'] = entities
4339 reply
= await self
.rpc(msg
)
4344 @ReturnMapping(ErrorResults
)
4345 async def RemoveAttachment(self
, ids
):
4347 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4348 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4350 # map input types to rpc msg
4352 msg
= dict(type='StorageProvisioner', request
='RemoveAttachment', version
=3, params
=_params
)
4353 _params
['ids'] = ids
4354 reply
= await self
.rpc(msg
)
4359 @ReturnMapping(ErrorResults
)
4360 async def SetFilesystemAttachmentInfo(self
, filesystem_attachments
):
4362 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
4363 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4365 # map input types to rpc msg
4367 msg
= dict(type='StorageProvisioner', request
='SetFilesystemAttachmentInfo', version
=3, params
=_params
)
4368 _params
['filesystem-attachments'] = filesystem_attachments
4369 reply
= await self
.rpc(msg
)
4374 @ReturnMapping(ErrorResults
)
4375 async def SetFilesystemInfo(self
, filesystems
):
4377 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
4378 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4380 # map input types to rpc msg
4382 msg
= dict(type='StorageProvisioner', request
='SetFilesystemInfo', version
=3, params
=_params
)
4383 _params
['filesystems'] = filesystems
4384 reply
= await self
.rpc(msg
)
4389 @ReturnMapping(ErrorResults
)
4390 async def SetStatus(self
, entities
):
4392 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
4393 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4395 # map input types to rpc msg
4397 msg
= dict(type='StorageProvisioner', request
='SetStatus', version
=3, params
=_params
)
4398 _params
['entities'] = entities
4399 reply
= await self
.rpc(msg
)
4404 @ReturnMapping(ErrorResults
)
4405 async def SetVolumeAttachmentInfo(self
, volume_attachments
):
4407 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
4408 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4410 # map input types to rpc msg
4412 msg
= dict(type='StorageProvisioner', request
='SetVolumeAttachmentInfo', version
=3, params
=_params
)
4413 _params
['volume-attachments'] = volume_attachments
4414 reply
= await self
.rpc(msg
)
4419 @ReturnMapping(ErrorResults
)
4420 async def SetVolumeInfo(self
, volumes
):
4422 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
4423 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4425 # map input types to rpc msg
4427 msg
= dict(type='StorageProvisioner', request
='SetVolumeInfo', version
=3, params
=_params
)
4428 _params
['volumes'] = volumes
4429 reply
= await self
.rpc(msg
)
4434 @ReturnMapping(ErrorResults
)
4435 async def UpdateStatus(self
, entities
):
4437 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
4438 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4440 # map input types to rpc msg
4442 msg
= dict(type='StorageProvisioner', request
='UpdateStatus', version
=3, params
=_params
)
4443 _params
['entities'] = entities
4444 reply
= await self
.rpc(msg
)
4449 @ReturnMapping(VolumeAttachmentParamsResults
)
4450 async def VolumeAttachmentParams(self
, ids
):
4452 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4453 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
4455 # map input types to rpc msg
4457 msg
= dict(type='StorageProvisioner', request
='VolumeAttachmentParams', version
=3, params
=_params
)
4458 _params
['ids'] = ids
4459 reply
= await self
.rpc(msg
)
4464 @ReturnMapping(VolumeAttachmentResults
)
4465 async def VolumeAttachments(self
, ids
):
4467 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4468 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
4470 # map input types to rpc msg
4472 msg
= dict(type='StorageProvisioner', request
='VolumeAttachments', version
=3, params
=_params
)
4473 _params
['ids'] = ids
4474 reply
= await self
.rpc(msg
)
4479 @ReturnMapping(BlockDeviceResults
)
4480 async def VolumeBlockDevices(self
, ids
):
4482 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4483 Returns -> typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
4485 # map input types to rpc msg
4487 msg
= dict(type='StorageProvisioner', request
='VolumeBlockDevices', version
=3, params
=_params
)
4488 _params
['ids'] = ids
4489 reply
= await self
.rpc(msg
)
4494 @ReturnMapping(VolumeParamsResults
)
4495 async def VolumeParams(self
, entities
):
4497 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4498 Returns -> typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
4500 # map input types to rpc msg
4502 msg
= dict(type='StorageProvisioner', request
='VolumeParams', version
=3, params
=_params
)
4503 _params
['entities'] = entities
4504 reply
= await self
.rpc(msg
)
4509 @ReturnMapping(VolumeResults
)
4510 async def Volumes(self
, entities
):
4512 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4513 Returns -> typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
4515 # map input types to rpc msg
4517 msg
= dict(type='StorageProvisioner', request
='Volumes', version
=3, params
=_params
)
4518 _params
['entities'] = entities
4519 reply
= await self
.rpc(msg
)
4524 @ReturnMapping(NotifyWatchResults
)
4525 async def WatchBlockDevices(self
, entities
):
4527 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4528 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
4530 # map input types to rpc msg
4532 msg
= dict(type='StorageProvisioner', request
='WatchBlockDevices', version
=3, params
=_params
)
4533 _params
['entities'] = entities
4534 reply
= await self
.rpc(msg
)
4539 @ReturnMapping(MachineStorageIdsWatchResults
)
4540 async def WatchFilesystemAttachments(self
, entities
):
4542 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4543 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
4545 # map input types to rpc msg
4547 msg
= dict(type='StorageProvisioner', request
='WatchFilesystemAttachments', version
=3, params
=_params
)
4548 _params
['entities'] = entities
4549 reply
= await self
.rpc(msg
)
4554 @ReturnMapping(StringsWatchResults
)
4555 async def WatchFilesystems(self
, entities
):
4557 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4558 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
4560 # map input types to rpc msg
4562 msg
= dict(type='StorageProvisioner', request
='WatchFilesystems', version
=3, params
=_params
)
4563 _params
['entities'] = entities
4564 reply
= await self
.rpc(msg
)
4569 @ReturnMapping(NotifyWatchResults
)
4570 async def WatchMachines(self
, entities
):
4572 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4573 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
4575 # map input types to rpc msg
4577 msg
= dict(type='StorageProvisioner', request
='WatchMachines', version
=3, params
=_params
)
4578 _params
['entities'] = entities
4579 reply
= await self
.rpc(msg
)
4584 @ReturnMapping(MachineStorageIdsWatchResults
)
4585 async def WatchVolumeAttachments(self
, entities
):
4587 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4588 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
4590 # map input types to rpc msg
4592 msg
= dict(type='StorageProvisioner', request
='WatchVolumeAttachments', version
=3, params
=_params
)
4593 _params
['entities'] = entities
4594 reply
= await self
.rpc(msg
)
4599 @ReturnMapping(StringsWatchResults
)
4600 async def WatchVolumes(self
, entities
):
4602 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4603 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
4605 # map input types to rpc msg
4607 msg
= dict(type='StorageProvisioner', request
='WatchVolumes', version
=3, params
=_params
)
4608 _params
['entities'] = entities
4609 reply
= await self
.rpc(msg
)