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': {'model-tag': {'type': 'string'},
733 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
734 'required': ['model-tag', 'target-info'],
736 'MigrationTargetInfo': {'additionalProperties': False,
737 'properties': {'addrs': {'items': {'type': 'string'},
739 'auth-tag': {'type': 'string'},
740 'ca-cert': {'type': 'string'},
741 'controller-tag': {'type': 'string'},
742 'macaroons': {'type': 'string'},
743 'password': {'type': 'string'}},
744 'required': ['controller-tag',
749 'Model': {'additionalProperties': False,
750 'properties': {'name': {'type': 'string'},
751 'owner-tag': {'type': 'string'},
752 'uuid': {'type': 'string'}},
753 'required': ['name', 'uuid', 'owner-tag'],
755 'ModelBlockInfo': {'additionalProperties': False,
756 'properties': {'blocks': {'items': {'type': 'string'},
758 'model-uuid': {'type': 'string'},
759 'name': {'type': 'string'},
760 'owner-tag': {'type': 'string'}},
766 'ModelBlockInfoList': {'additionalProperties': False,
767 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
770 'ModelConfigResults': {'additionalProperties': False,
771 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
773 'required': ['config'],
775 'ModelMachineInfo': {'additionalProperties': False,
776 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
777 'has-vote': {'type': 'boolean'},
778 'id': {'type': 'string'},
779 'instance-id': {'type': 'string'},
780 'status': {'type': 'string'},
781 'wants-vote': {'type': 'boolean'}},
784 'ModelStatus': {'additionalProperties': False,
785 'properties': {'application-count': {'type': 'integer'},
786 'hosted-machine-count': {'type': 'integer'},
787 'life': {'type': 'string'},
788 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
790 'model-tag': {'type': 'string'},
791 'owner-tag': {'type': 'string'}},
792 'required': ['model-tag',
794 'hosted-machine-count',
798 'ModelStatusResults': {'additionalProperties': False,
799 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
801 'required': ['models'],
803 'ModelTag': {'additionalProperties': False, 'type': 'object'},
804 'ModifyControllerAccess': {'additionalProperties': False,
805 'properties': {'access': {'type': 'string'},
806 'action': {'type': 'string'},
807 'user-tag': {'type': 'string'}},
808 'required': ['user-tag',
812 'ModifyControllerAccessRequest': {'additionalProperties': False,
813 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
815 'required': ['changes'],
817 'RemoveBlocksArgs': {'additionalProperties': False,
818 'properties': {'all': {'type': 'boolean'}},
821 'UserAccess': {'additionalProperties': False,
822 'properties': {'access': {'type': 'string'},
823 'user-tag': {'type': 'string'}},
824 'required': ['user-tag', 'access'],
826 'UserAccessResult': {'additionalProperties': False,
827 'properties': {'error': {'$ref': '#/definitions/Error'},
828 'result': {'$ref': '#/definitions/UserAccess'}},
830 'UserAccessResults': {'additionalProperties': False,
831 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
834 'UserModel': {'additionalProperties': False,
835 'properties': {'last-connection': {'format': 'date-time',
837 'model': {'$ref': '#/definitions/Model'}},
838 'required': ['model', 'last-connection'],
840 'UserModelList': {'additionalProperties': False,
841 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
843 'required': ['user-models'],
845 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
847 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
848 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
850 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
852 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
854 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
855 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
857 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
858 'Result': {'$ref': '#/definitions/UserAccessResults'}},
860 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}},
862 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
863 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
865 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
867 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
869 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
870 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
872 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
873 'Result': {'$ref': '#/definitions/ErrorResults'}},
875 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
877 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
882 @ReturnMapping(UserModelList
)
883 async def AllModels(self
):
886 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
888 # map input types to rpc msg
890 msg
= dict(type='Controller', request
='AllModels', version
=3, params
=_params
)
892 reply
= await self
.rpc(msg
)
897 @ReturnMapping(CloudSpecResults
)
898 async def CloudSpec(self
, entities
):
900 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
901 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
903 # map input types to rpc msg
905 msg
= dict(type='Controller', request
='CloudSpec', version
=3, params
=_params
)
906 _params
['entities'] = entities
907 reply
= await self
.rpc(msg
)
912 @ReturnMapping(ControllerConfigResult
)
913 async def ControllerConfig(self
):
916 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
918 # map input types to rpc msg
920 msg
= dict(type='Controller', request
='ControllerConfig', version
=3, params
=_params
)
922 reply
= await self
.rpc(msg
)
928 async def DestroyController(self
, destroy_models
):
930 destroy_models : bool
933 # map input types to rpc msg
935 msg
= dict(type='Controller', request
='DestroyController', version
=3, params
=_params
)
936 _params
['destroy-models'] = destroy_models
937 reply
= await self
.rpc(msg
)
942 @ReturnMapping(CloudSpecResult
)
943 async def GetCloudSpec(self
):
946 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
948 # map input types to rpc msg
950 msg
= dict(type='Controller', request
='GetCloudSpec', version
=3, params
=_params
)
952 reply
= await self
.rpc(msg
)
957 @ReturnMapping(UserAccessResults
)
958 async def GetControllerAccess(self
, entities
):
960 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
961 Returns -> typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
963 # map input types to rpc msg
965 msg
= dict(type='Controller', request
='GetControllerAccess', version
=3, params
=_params
)
966 _params
['entities'] = entities
967 reply
= await self
.rpc(msg
)
972 @ReturnMapping(HostedModelConfigsResults
)
973 async def HostedModelConfigs(self
):
976 Returns -> typing.Sequence<+T_co>[~HostedModelConfig]<~HostedModelConfig>
978 # map input types to rpc msg
980 msg
= dict(type='Controller', request
='HostedModelConfigs', version
=3, params
=_params
)
982 reply
= await self
.rpc(msg
)
987 @ReturnMapping(InitiateMigrationResults
)
988 async def InitiateMigration(self
, specs
):
990 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
991 Returns -> typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
993 # map input types to rpc msg
995 msg
= dict(type='Controller', request
='InitiateMigration', version
=3, params
=_params
)
996 _params
['specs'] = specs
997 reply
= await self
.rpc(msg
)
1002 @ReturnMapping(ModelBlockInfoList
)
1003 async def ListBlockedModels(self
):
1006 Returns -> typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
1008 # map input types to rpc msg
1010 msg
= dict(type='Controller', request
='ListBlockedModels', version
=3, params
=_params
)
1012 reply
= await self
.rpc(msg
)
1017 @ReturnMapping(ModelConfigResults
)
1018 async def ModelConfig(self
):
1021 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1023 # map input types to rpc msg
1025 msg
= dict(type='Controller', request
='ModelConfig', version
=3, params
=_params
)
1027 reply
= await self
.rpc(msg
)
1032 @ReturnMapping(ModelStatusResults
)
1033 async def ModelStatus(self
, entities
):
1035 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1036 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
1038 # map input types to rpc msg
1040 msg
= dict(type='Controller', request
='ModelStatus', version
=3, params
=_params
)
1041 _params
['entities'] = entities
1042 reply
= await self
.rpc(msg
)
1047 @ReturnMapping(ErrorResults
)
1048 async def ModifyControllerAccess(self
, changes
):
1050 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
1051 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1053 # map input types to rpc msg
1055 msg
= dict(type='Controller', request
='ModifyControllerAccess', version
=3, params
=_params
)
1056 _params
['changes'] = changes
1057 reply
= await self
.rpc(msg
)
1062 @ReturnMapping(None)
1063 async def RemoveBlocks(self
, all_
):
1068 # map input types to rpc msg
1070 msg
= dict(type='Controller', request
='RemoveBlocks', version
=3, params
=_params
)
1071 _params
['all'] = all_
1072 reply
= await self
.rpc(msg
)
1077 @ReturnMapping(AllWatcherId
)
1078 async def WatchAllModels(self
):
1083 # map input types to rpc msg
1085 msg
= dict(type='Controller', request
='WatchAllModels', version
=3, params
=_params
)
1087 reply
= await self
.rpc(msg
)
1092 class FirewallerFacade(Type
):
1095 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
1096 'properties': {'error': {'$ref': '#/definitions/Error'},
1097 'result': {'type': 'boolean'}},
1098 'required': ['result'],
1100 'BoolResults': {'additionalProperties': False,
1101 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
1103 'required': ['results'],
1105 'CloudCredential': {'additionalProperties': False,
1106 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1108 'auth-type': {'type': 'string'},
1109 'redacted': {'items': {'type': 'string'},
1111 'required': ['auth-type'],
1113 'CloudSpec': {'additionalProperties': False,
1114 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
1115 'endpoint': {'type': 'string'},
1116 'identity-endpoint': {'type': 'string'},
1117 'name': {'type': 'string'},
1118 'region': {'type': 'string'},
1119 'storage-endpoint': {'type': 'string'},
1120 'type': {'type': 'string'}},
1121 'required': ['type', 'name'],
1123 'CloudSpecResult': {'additionalProperties': False,
1124 'properties': {'error': {'$ref': '#/definitions/Error'},
1125 'result': {'$ref': '#/definitions/CloudSpec'}},
1127 'CloudSpecResults': {'additionalProperties': False,
1128 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
1131 'Entities': {'additionalProperties': False,
1132 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1134 'required': ['entities'],
1136 'Entity': {'additionalProperties': False,
1137 'properties': {'tag': {'type': 'string'}},
1138 'required': ['tag'],
1140 'Error': {'additionalProperties': False,
1141 'properties': {'code': {'type': 'string'},
1142 'info': {'$ref': '#/definitions/ErrorInfo'},
1143 'message': {'type': 'string'}},
1144 'required': ['message', 'code'],
1146 'ErrorInfo': {'additionalProperties': False,
1147 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1148 'macaroon-path': {'type': 'string'}},
1150 'LifeResult': {'additionalProperties': False,
1151 'properties': {'error': {'$ref': '#/definitions/Error'},
1152 'life': {'type': 'string'}},
1153 'required': ['life'],
1155 'LifeResults': {'additionalProperties': False,
1156 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1158 'required': ['results'],
1160 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1161 'MachinePortRange': {'additionalProperties': False,
1162 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
1163 'relation-tag': {'type': 'string'},
1164 'unit-tag': {'type': 'string'}},
1165 'required': ['unit-tag',
1169 'MachinePorts': {'additionalProperties': False,
1170 'properties': {'machine-tag': {'type': 'string'},
1171 'subnet-tag': {'type': 'string'}},
1172 'required': ['machine-tag', 'subnet-tag'],
1174 'MachinePortsParams': {'additionalProperties': False,
1175 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
1177 'required': ['params'],
1179 'MachinePortsResult': {'additionalProperties': False,
1180 'properties': {'error': {'$ref': '#/definitions/Error'},
1181 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
1183 'required': ['ports'],
1185 'MachinePortsResults': {'additionalProperties': False,
1186 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
1188 'required': ['results'],
1190 'ModelConfigResult': {'additionalProperties': False,
1191 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1194 'required': ['config'],
1196 'ModelTag': {'additionalProperties': False, 'type': 'object'},
1197 'NotifyWatchResult': {'additionalProperties': False,
1198 'properties': {'NotifyWatcherId': {'type': 'string'},
1199 'error': {'$ref': '#/definitions/Error'}},
1200 'required': ['NotifyWatcherId'],
1202 'NotifyWatchResults': {'additionalProperties': False,
1203 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1205 'required': ['results'],
1207 'PortRange': {'additionalProperties': False,
1208 'properties': {'from-port': {'type': 'integer'},
1209 'protocol': {'type': 'string'},
1210 'to-port': {'type': 'integer'}},
1211 'required': ['from-port', 'to-port', 'protocol'],
1213 'StringResult': {'additionalProperties': False,
1214 'properties': {'error': {'$ref': '#/definitions/Error'},
1215 'result': {'type': 'string'}},
1216 'required': ['result'],
1218 'StringResults': {'additionalProperties': False,
1219 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
1221 'required': ['results'],
1223 'StringsResult': {'additionalProperties': False,
1224 'properties': {'error': {'$ref': '#/definitions/Error'},
1225 'result': {'items': {'type': 'string'},
1228 'StringsResults': {'additionalProperties': False,
1229 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1231 'required': ['results'],
1233 'StringsWatchResult': {'additionalProperties': False,
1234 'properties': {'changes': {'items': {'type': 'string'},
1236 'error': {'$ref': '#/definitions/Error'},
1237 'watcher-id': {'type': 'string'}},
1238 'required': ['watcher-id'],
1240 'StringsWatchResults': {'additionalProperties': False,
1241 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
1243 'required': ['results'],
1245 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1246 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
1248 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1249 'Result': {'$ref': '#/definitions/StringResults'}},
1251 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
1252 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
1254 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1255 'Result': {'$ref': '#/definitions/BoolResults'}},
1257 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1258 'Result': {'$ref': '#/definitions/StringsResults'}},
1260 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
1261 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
1263 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1264 'Result': {'$ref': '#/definitions/StringResults'}},
1266 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1267 'Result': {'$ref': '#/definitions/LifeResults'}},
1269 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1271 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1272 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1274 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1276 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1278 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1279 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1281 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1282 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1287 @ReturnMapping(CloudSpecResults
)
1288 async def CloudSpec(self
, entities
):
1290 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1291 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
1293 # map input types to rpc msg
1295 msg
= dict(type='Firewaller', request
='CloudSpec', version
=3, params
=_params
)
1296 _params
['entities'] = entities
1297 reply
= await self
.rpc(msg
)
1302 @ReturnMapping(StringResults
)
1303 async def GetAssignedMachine(self
, entities
):
1305 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1306 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1308 # map input types to rpc msg
1310 msg
= dict(type='Firewaller', request
='GetAssignedMachine', version
=3, params
=_params
)
1311 _params
['entities'] = entities
1312 reply
= await self
.rpc(msg
)
1317 @ReturnMapping(CloudSpecResult
)
1318 async def GetCloudSpec(self
):
1321 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
1323 # map input types to rpc msg
1325 msg
= dict(type='Firewaller', request
='GetCloudSpec', version
=3, params
=_params
)
1327 reply
= await self
.rpc(msg
)
1332 @ReturnMapping(BoolResults
)
1333 async def GetExposed(self
, entities
):
1335 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1336 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
1338 # map input types to rpc msg
1340 msg
= dict(type='Firewaller', request
='GetExposed', version
=3, params
=_params
)
1341 _params
['entities'] = entities
1342 reply
= await self
.rpc(msg
)
1347 @ReturnMapping(StringsResults
)
1348 async def GetMachineActiveSubnets(self
, entities
):
1350 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1351 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
1353 # map input types to rpc msg
1355 msg
= dict(type='Firewaller', request
='GetMachineActiveSubnets', version
=3, params
=_params
)
1356 _params
['entities'] = entities
1357 reply
= await self
.rpc(msg
)
1362 @ReturnMapping(MachinePortsResults
)
1363 async def GetMachinePorts(self
, params
):
1365 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
1366 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
1368 # map input types to rpc msg
1370 msg
= dict(type='Firewaller', request
='GetMachinePorts', version
=3, params
=_params
)
1371 _params
['params'] = params
1372 reply
= await self
.rpc(msg
)
1377 @ReturnMapping(StringResults
)
1378 async def InstanceId(self
, entities
):
1380 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1381 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1383 # map input types to rpc msg
1385 msg
= dict(type='Firewaller', request
='InstanceId', version
=3, params
=_params
)
1386 _params
['entities'] = entities
1387 reply
= await self
.rpc(msg
)
1392 @ReturnMapping(LifeResults
)
1393 async def Life(self
, entities
):
1395 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1396 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
1398 # map input types to rpc msg
1400 msg
= dict(type='Firewaller', request
='Life', version
=3, params
=_params
)
1401 _params
['entities'] = entities
1402 reply
= await self
.rpc(msg
)
1407 @ReturnMapping(ModelConfigResult
)
1408 async def ModelConfig(self
):
1411 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
1413 # map input types to rpc msg
1415 msg
= dict(type='Firewaller', request
='ModelConfig', version
=3, params
=_params
)
1417 reply
= await self
.rpc(msg
)
1422 @ReturnMapping(NotifyWatchResults
)
1423 async def Watch(self
, entities
):
1425 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1426 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
1428 # map input types to rpc msg
1430 msg
= dict(type='Firewaller', request
='Watch', version
=3, params
=_params
)
1431 _params
['entities'] = entities
1432 reply
= await self
.rpc(msg
)
1437 @ReturnMapping(NotifyWatchResult
)
1438 async def WatchForModelConfigChanges(self
):
1441 Returns -> typing.Union[str, _ForwardRef('Error')]
1443 # map input types to rpc msg
1445 msg
= dict(type='Firewaller', request
='WatchForModelConfigChanges', version
=3, params
=_params
)
1447 reply
= await self
.rpc(msg
)
1452 @ReturnMapping(StringsWatchResult
)
1453 async def WatchModelMachines(self
):
1456 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
1458 # map input types to rpc msg
1460 msg
= dict(type='Firewaller', request
='WatchModelMachines', version
=3, params
=_params
)
1462 reply
= await self
.rpc(msg
)
1467 @ReturnMapping(StringsWatchResults
)
1468 async def WatchOpenedPorts(self
, entities
):
1470 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1471 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
1473 # map input types to rpc msg
1475 msg
= dict(type='Firewaller', request
='WatchOpenedPorts', version
=3, params
=_params
)
1476 _params
['entities'] = entities
1477 reply
= await self
.rpc(msg
)
1482 @ReturnMapping(StringsWatchResults
)
1483 async def WatchUnits(self
, entities
):
1485 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1486 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
1488 # map input types to rpc msg
1490 msg
= dict(type='Firewaller', request
='WatchUnits', version
=3, params
=_params
)
1491 _params
['entities'] = entities
1492 reply
= await self
.rpc(msg
)
1497 class InstancePollerFacade(Type
):
1498 name
= 'InstancePoller'
1500 schema
= {'definitions': {'Address': {'additionalProperties': False,
1501 'properties': {'scope': {'type': 'string'},
1502 'space-name': {'type': 'string'},
1503 'type': {'type': 'string'},
1504 'value': {'type': 'string'}},
1505 'required': ['value', 'type', 'scope'],
1507 'BoolResult': {'additionalProperties': False,
1508 'properties': {'error': {'$ref': '#/definitions/Error'},
1509 'result': {'type': 'boolean'}},
1510 'required': ['result'],
1512 'BoolResults': {'additionalProperties': False,
1513 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
1515 'required': ['results'],
1517 'Entities': {'additionalProperties': False,
1518 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1520 'required': ['entities'],
1522 'Entity': {'additionalProperties': False,
1523 'properties': {'tag': {'type': 'string'}},
1524 'required': ['tag'],
1526 'EntityStatusArgs': {'additionalProperties': False,
1527 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1530 'info': {'type': 'string'},
1531 'status': {'type': 'string'},
1532 'tag': {'type': 'string'}},
1538 'Error': {'additionalProperties': False,
1539 'properties': {'code': {'type': 'string'},
1540 'info': {'$ref': '#/definitions/ErrorInfo'},
1541 'message': {'type': 'string'}},
1542 'required': ['message', 'code'],
1544 'ErrorInfo': {'additionalProperties': False,
1545 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1546 'macaroon-path': {'type': 'string'}},
1548 'ErrorResult': {'additionalProperties': False,
1549 'properties': {'error': {'$ref': '#/definitions/Error'}},
1551 'ErrorResults': {'additionalProperties': False,
1552 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1554 'required': ['results'],
1556 'LifeResult': {'additionalProperties': False,
1557 'properties': {'error': {'$ref': '#/definitions/Error'},
1558 'life': {'type': 'string'}},
1559 'required': ['life'],
1561 'LifeResults': {'additionalProperties': False,
1562 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1564 'required': ['results'],
1566 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1567 'MachineAddresses': {'additionalProperties': False,
1568 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1570 'tag': {'type': 'string'}},
1571 'required': ['tag', 'addresses'],
1573 'MachineAddressesResult': {'additionalProperties': False,
1574 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1576 'error': {'$ref': '#/definitions/Error'}},
1577 'required': ['addresses'],
1579 'MachineAddressesResults': {'additionalProperties': False,
1580 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
1582 'required': ['results'],
1584 'ModelConfigResult': {'additionalProperties': False,
1585 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1588 'required': ['config'],
1590 'NotifyWatchResult': {'additionalProperties': False,
1591 'properties': {'NotifyWatcherId': {'type': 'string'},
1592 'error': {'$ref': '#/definitions/Error'}},
1593 'required': ['NotifyWatcherId'],
1595 'SetMachinesAddresses': {'additionalProperties': False,
1596 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
1598 'required': ['machine-addresses'],
1600 'SetStatus': {'additionalProperties': False,
1601 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1603 'required': ['entities'],
1605 'StatusResult': {'additionalProperties': False,
1606 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1609 'error': {'$ref': '#/definitions/Error'},
1610 'id': {'type': 'string'},
1611 'info': {'type': 'string'},
1612 'life': {'type': 'string'},
1613 'since': {'format': 'date-time',
1615 'status': {'type': 'string'}},
1623 'StatusResults': {'additionalProperties': False,
1624 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
1626 'required': ['results'],
1628 'StringResult': {'additionalProperties': False,
1629 'properties': {'error': {'$ref': '#/definitions/Error'},
1630 'result': {'type': 'string'}},
1631 'required': ['result'],
1633 'StringResults': {'additionalProperties': False,
1634 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
1636 'required': ['results'],
1638 'StringsWatchResult': {'additionalProperties': False,
1639 'properties': {'changes': {'items': {'type': 'string'},
1641 'error': {'$ref': '#/definitions/Error'},
1642 'watcher-id': {'type': 'string'}},
1643 'required': ['watcher-id'],
1645 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1646 'Result': {'$ref': '#/definitions/BoolResults'}},
1648 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1649 'Result': {'$ref': '#/definitions/StringResults'}},
1651 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1652 'Result': {'$ref': '#/definitions/StatusResults'}},
1654 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1655 'Result': {'$ref': '#/definitions/LifeResults'}},
1657 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1659 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1660 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
1662 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1663 'Result': {'$ref': '#/definitions/ErrorResults'}},
1665 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
1666 'Result': {'$ref': '#/definitions/ErrorResults'}},
1668 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1669 'Result': {'$ref': '#/definitions/StatusResults'}},
1671 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1673 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1678 @ReturnMapping(BoolResults
)
1679 async def AreManuallyProvisioned(self
, entities
):
1681 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1682 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
1684 # map input types to rpc msg
1686 msg
= dict(type='InstancePoller', request
='AreManuallyProvisioned', version
=3, params
=_params
)
1687 _params
['entities'] = entities
1688 reply
= await self
.rpc(msg
)
1693 @ReturnMapping(StringResults
)
1694 async def InstanceId(self
, entities
):
1696 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1697 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1699 # map input types to rpc msg
1701 msg
= dict(type='InstancePoller', request
='InstanceId', version
=3, params
=_params
)
1702 _params
['entities'] = entities
1703 reply
= await self
.rpc(msg
)
1708 @ReturnMapping(StatusResults
)
1709 async def InstanceStatus(self
, entities
):
1711 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1712 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
1714 # map input types to rpc msg
1716 msg
= dict(type='InstancePoller', request
='InstanceStatus', version
=3, params
=_params
)
1717 _params
['entities'] = entities
1718 reply
= await self
.rpc(msg
)
1723 @ReturnMapping(LifeResults
)
1724 async def Life(self
, entities
):
1726 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1727 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
1729 # map input types to rpc msg
1731 msg
= dict(type='InstancePoller', request
='Life', version
=3, params
=_params
)
1732 _params
['entities'] = entities
1733 reply
= await self
.rpc(msg
)
1738 @ReturnMapping(ModelConfigResult
)
1739 async def ModelConfig(self
):
1742 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
1744 # map input types to rpc msg
1746 msg
= dict(type='InstancePoller', request
='ModelConfig', version
=3, params
=_params
)
1748 reply
= await self
.rpc(msg
)
1753 @ReturnMapping(MachineAddressesResults
)
1754 async def ProviderAddresses(self
, entities
):
1756 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1757 Returns -> typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
1759 # map input types to rpc msg
1761 msg
= dict(type='InstancePoller', request
='ProviderAddresses', version
=3, params
=_params
)
1762 _params
['entities'] = entities
1763 reply
= await self
.rpc(msg
)
1768 @ReturnMapping(ErrorResults
)
1769 async def SetInstanceStatus(self
, entities
):
1771 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
1772 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1774 # map input types to rpc msg
1776 msg
= dict(type='InstancePoller', request
='SetInstanceStatus', version
=3, params
=_params
)
1777 _params
['entities'] = entities
1778 reply
= await self
.rpc(msg
)
1783 @ReturnMapping(ErrorResults
)
1784 async def SetProviderAddresses(self
, machine_addresses
):
1786 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
1787 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1789 # map input types to rpc msg
1791 msg
= dict(type='InstancePoller', request
='SetProviderAddresses', version
=3, params
=_params
)
1792 _params
['machine-addresses'] = machine_addresses
1793 reply
= await self
.rpc(msg
)
1798 @ReturnMapping(StatusResults
)
1799 async def Status(self
, entities
):
1801 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1802 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
1804 # map input types to rpc msg
1806 msg
= dict(type='InstancePoller', request
='Status', version
=3, params
=_params
)
1807 _params
['entities'] = entities
1808 reply
= await self
.rpc(msg
)
1813 @ReturnMapping(NotifyWatchResult
)
1814 async def WatchForModelConfigChanges(self
):
1817 Returns -> typing.Union[str, _ForwardRef('Error')]
1819 # map input types to rpc msg
1821 msg
= dict(type='InstancePoller', request
='WatchForModelConfigChanges', version
=3, params
=_params
)
1823 reply
= await self
.rpc(msg
)
1828 @ReturnMapping(StringsWatchResult
)
1829 async def WatchModelMachines(self
):
1832 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
1834 # map input types to rpc msg
1836 msg
= dict(type='InstancePoller', request
='WatchModelMachines', version
=3, params
=_params
)
1838 reply
= await self
.rpc(msg
)
1843 class MachineManagerFacade(Type
):
1844 name
= 'MachineManager'
1846 schema
= {'definitions': {'AddMachineParams': {'additionalProperties': False,
1847 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1849 'constraints': {'$ref': '#/definitions/Value'},
1850 'container-type': {'type': 'string'},
1851 'disks': {'items': {'$ref': '#/definitions/Constraints'},
1853 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
1854 'instance-id': {'type': 'string'},
1855 'jobs': {'items': {'type': 'string'},
1857 'nonce': {'type': 'string'},
1858 'parent-id': {'type': 'string'},
1859 'placement': {'$ref': '#/definitions/Placement'},
1860 'series': {'type': 'string'}},
1861 'required': ['series',
1868 'hardware-characteristics',
1871 'AddMachines': {'additionalProperties': False,
1872 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
1874 'required': ['params'],
1876 'AddMachinesResult': {'additionalProperties': False,
1877 'properties': {'error': {'$ref': '#/definitions/Error'},
1878 'machine': {'type': 'string'}},
1879 'required': ['machine'],
1881 'AddMachinesResults': {'additionalProperties': False,
1882 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
1884 'required': ['machines'],
1886 'Address': {'additionalProperties': False,
1887 'properties': {'scope': {'type': 'string'},
1888 'space-name': {'type': 'string'},
1889 'type': {'type': 'string'},
1890 'value': {'type': 'string'}},
1891 'required': ['value', 'type', 'scope'],
1893 'Constraints': {'additionalProperties': False,
1894 'properties': {'Count': {'type': 'integer'},
1895 'Pool': {'type': 'string'},
1896 'Size': {'type': 'integer'}},
1897 'required': ['Pool', 'Size', 'Count'],
1899 'DestroyMachineInfo': {'additionalProperties': False,
1900 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
1902 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
1904 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
1907 'DestroyMachineResult': {'additionalProperties': False,
1908 'properties': {'error': {'$ref': '#/definitions/Error'},
1909 'info': {'$ref': '#/definitions/DestroyMachineInfo'}},
1911 'DestroyMachineResults': {'additionalProperties': False,
1912 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyMachineResult'},
1915 'Entities': {'additionalProperties': False,
1916 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1918 'required': ['entities'],
1920 'Entity': {'additionalProperties': False,
1921 'properties': {'tag': {'type': 'string'}},
1922 'required': ['tag'],
1924 'Error': {'additionalProperties': False,
1925 'properties': {'code': {'type': 'string'},
1926 'info': {'$ref': '#/definitions/ErrorInfo'},
1927 'message': {'type': 'string'}},
1928 'required': ['message', 'code'],
1930 'ErrorInfo': {'additionalProperties': False,
1931 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1932 'macaroon-path': {'type': 'string'}},
1934 'HardwareCharacteristics': {'additionalProperties': False,
1935 'properties': {'arch': {'type': 'string'},
1936 'availability-zone': {'type': 'string'},
1937 'cpu-cores': {'type': 'integer'},
1938 'cpu-power': {'type': 'integer'},
1939 'mem': {'type': 'integer'},
1940 'root-disk': {'type': 'integer'},
1941 'tags': {'items': {'type': 'string'},
1944 'InstanceType': {'additionalProperties': False,
1945 'properties': {'arches': {'items': {'type': 'string'},
1947 'cost': {'type': 'integer'},
1948 'cpu-cores': {'type': 'integer'},
1949 'deprecated': {'type': 'boolean'},
1950 'memory': {'type': 'integer'},
1951 'name': {'type': 'string'},
1952 'root-disk': {'type': 'integer'},
1953 'virt-type': {'type': 'string'}},
1954 'required': ['arches', 'cpu-cores', 'memory'],
1956 'InstanceTypesResult': {'additionalProperties': False,
1957 'properties': {'cost-currency': {'type': 'string'},
1958 'cost-divisor': {'type': 'integer'},
1959 'cost-unit': {'type': 'string'},
1960 'error': {'$ref': '#/definitions/Error'},
1961 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
1964 'InstanceTypesResults': {'additionalProperties': False,
1965 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
1967 'required': ['results'],
1969 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1970 'ModelInstanceTypesConstraint': {'additionalProperties': False,
1971 'properties': {'value': {'$ref': '#/definitions/Value'}},
1973 'ModelInstanceTypesConstraints': {'additionalProperties': False,
1974 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
1976 'required': ['constraints'],
1978 'Placement': {'additionalProperties': False,
1979 'properties': {'directive': {'type': 'string'},
1980 'scope': {'type': 'string'}},
1981 'required': ['scope', 'directive'],
1983 'Value': {'additionalProperties': False,
1984 'properties': {'arch': {'type': 'string'},
1985 'container': {'type': 'string'},
1986 'cores': {'type': 'integer'},
1987 'cpu-power': {'type': 'integer'},
1988 'instance-type': {'type': 'string'},
1989 'mem': {'type': 'integer'},
1990 'root-disk': {'type': 'integer'},
1991 'spaces': {'items': {'type': 'string'},
1993 'tags': {'items': {'type': 'string'},
1995 'virt-type': {'type': 'string'}},
1997 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
1998 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2000 'DestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2001 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2003 'ForceDestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2004 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2006 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
2007 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
2012 @ReturnMapping(AddMachinesResults
)
2013 async def AddMachines(self
, params
):
2015 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
2016 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
2018 # map input types to rpc msg
2020 msg
= dict(type='MachineManager', request
='AddMachines', version
=3, params
=_params
)
2021 _params
['params'] = params
2022 reply
= await self
.rpc(msg
)
2027 @ReturnMapping(DestroyMachineResults
)
2028 async def DestroyMachine(self
, entities
):
2030 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2031 Returns -> typing.Sequence<+T_co>[~DestroyMachineResult]<~DestroyMachineResult>
2033 # map input types to rpc msg
2035 msg
= dict(type='MachineManager', request
='DestroyMachine', version
=3, params
=_params
)
2036 _params
['entities'] = entities
2037 reply
= await self
.rpc(msg
)
2042 @ReturnMapping(DestroyMachineResults
)
2043 async def ForceDestroyMachine(self
, entities
):
2045 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2046 Returns -> typing.Sequence<+T_co>[~DestroyMachineResult]<~DestroyMachineResult>
2048 # map input types to rpc msg
2050 msg
= dict(type='MachineManager', request
='ForceDestroyMachine', version
=3, params
=_params
)
2051 _params
['entities'] = entities
2052 reply
= await self
.rpc(msg
)
2057 @ReturnMapping(InstanceTypesResults
)
2058 async def InstanceTypes(self
, constraints
):
2060 constraints : typing.Sequence<+T_co>[~ModelInstanceTypesConstraint]<~ModelInstanceTypesConstraint>
2061 Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
2063 # map input types to rpc msg
2065 msg
= dict(type='MachineManager', request
='InstanceTypes', version
=3, params
=_params
)
2066 _params
['constraints'] = constraints
2067 reply
= await self
.rpc(msg
)
2072 class ProvisionerFacade(Type
):
2073 name
= 'Provisioner'
2075 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
2076 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2079 'required': ['servers'],
2081 'Address': {'additionalProperties': False,
2082 'properties': {'scope': {'type': 'string'},
2083 'space-name': {'type': 'string'},
2084 'type': {'type': 'string'},
2085 'value': {'type': 'string'}},
2086 'required': ['value', 'type', 'scope'],
2088 'Binary': {'additionalProperties': False,
2089 'properties': {'Arch': {'type': 'string'},
2090 'Number': {'$ref': '#/definitions/Number'},
2091 'Series': {'type': 'string'}},
2092 'required': ['Number', 'Series', 'Arch'],
2094 'BytesResult': {'additionalProperties': False,
2095 'properties': {'result': {'items': {'type': 'integer'},
2097 'required': ['result'],
2099 'CloudImageMetadata': {'additionalProperties': False,
2100 'properties': {'arch': {'type': 'string'},
2101 'image-id': {'type': 'string'},
2102 'priority': {'type': 'integer'},
2103 'region': {'type': 'string'},
2104 'root-storage-size': {'type': 'integer'},
2105 'root-storage-type': {'type': 'string'},
2106 'series': {'type': 'string'},
2107 'source': {'type': 'string'},
2108 'stream': {'type': 'string'},
2109 'version': {'type': 'string'},
2110 'virt-type': {'type': 'string'}},
2111 'required': ['image-id',
2119 'ConstraintsResult': {'additionalProperties': False,
2120 'properties': {'constraints': {'$ref': '#/definitions/Value'},
2121 'error': {'$ref': '#/definitions/Error'}},
2122 'required': ['constraints'],
2124 'ConstraintsResults': {'additionalProperties': False,
2125 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
2127 'required': ['results'],
2129 'ContainerConfig': {'additionalProperties': False,
2130 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
2131 'apt-mirror': {'type': 'string'},
2132 'apt-proxy': {'$ref': '#/definitions/Settings'},
2133 'authorized-keys': {'type': 'string'},
2134 'provider-type': {'type': 'string'},
2135 'proxy': {'$ref': '#/definitions/Settings'},
2136 'ssl-hostname-verification': {'type': 'boolean'}},
2137 'required': ['provider-type',
2139 'ssl-hostname-verification',
2145 'ContainerManagerConfig': {'additionalProperties': False,
2146 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
2148 'required': ['config'],
2150 'ContainerManagerConfigParams': {'additionalProperties': False,
2151 'properties': {'type': {'type': 'string'}},
2152 'required': ['type'],
2154 'ControllerConfigResult': {'additionalProperties': False,
2155 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2158 'required': ['config'],
2160 'DeviceBridgeInfo': {'additionalProperties': False,
2161 'properties': {'bridge-name': {'type': 'string'},
2162 'host-device-name': {'type': 'string'}},
2163 'required': ['host-device-name',
2166 'DistributionGroupResult': {'additionalProperties': False,
2167 'properties': {'error': {'$ref': '#/definitions/Error'},
2168 'result': {'items': {'type': 'string'},
2170 'required': ['result'],
2172 'DistributionGroupResults': {'additionalProperties': False,
2173 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
2175 'required': ['results'],
2177 'Entities': {'additionalProperties': False,
2178 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2180 'required': ['entities'],
2182 'Entity': {'additionalProperties': False,
2183 'properties': {'tag': {'type': 'string'}},
2184 'required': ['tag'],
2186 'EntityPassword': {'additionalProperties': False,
2187 'properties': {'password': {'type': 'string'},
2188 'tag': {'type': 'string'}},
2189 'required': ['tag', 'password'],
2191 'EntityPasswords': {'additionalProperties': False,
2192 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
2194 'required': ['changes'],
2196 'EntityStatusArgs': {'additionalProperties': False,
2197 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2200 'info': {'type': 'string'},
2201 'status': {'type': 'string'},
2202 'tag': {'type': 'string'}},
2208 'Error': {'additionalProperties': False,
2209 'properties': {'code': {'type': 'string'},
2210 'info': {'$ref': '#/definitions/ErrorInfo'},
2211 'message': {'type': 'string'}},
2212 'required': ['message', 'code'],
2214 'ErrorInfo': {'additionalProperties': False,
2215 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2216 'macaroon-path': {'type': 'string'}},
2218 'ErrorResult': {'additionalProperties': False,
2219 'properties': {'error': {'$ref': '#/definitions/Error'}},
2221 'ErrorResults': {'additionalProperties': False,
2222 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2224 'required': ['results'],
2226 'FindToolsParams': {'additionalProperties': False,
2227 'properties': {'arch': {'type': 'string'},
2228 'major': {'type': 'integer'},
2229 'minor': {'type': 'integer'},
2230 'number': {'$ref': '#/definitions/Number'},
2231 'series': {'type': 'string'}},
2232 'required': ['number',
2238 'FindToolsResult': {'additionalProperties': False,
2239 'properties': {'error': {'$ref': '#/definitions/Error'},
2240 'list': {'items': {'$ref': '#/definitions/Tools'},
2242 'required': ['list'],
2244 'HardwareCharacteristics': {'additionalProperties': False,
2245 'properties': {'arch': {'type': 'string'},
2246 'availability-zone': {'type': 'string'},
2247 'cpu-cores': {'type': 'integer'},
2248 'cpu-power': {'type': 'integer'},
2249 'mem': {'type': 'integer'},
2250 'root-disk': {'type': 'integer'},
2251 'tags': {'items': {'type': 'string'},
2254 'HostNetworkChange': {'additionalProperties': False,
2255 'properties': {'error': {'$ref': '#/definitions/Error'},
2256 'new-bridges': {'items': {'$ref': '#/definitions/DeviceBridgeInfo'},
2258 'reconfigure-delay': {'type': 'integer'}},
2259 'required': ['new-bridges',
2260 'reconfigure-delay'],
2262 'HostNetworkChangeResults': {'additionalProperties': False,
2263 'properties': {'results': {'items': {'$ref': '#/definitions/HostNetworkChange'},
2265 'required': ['results'],
2267 'HostPort': {'additionalProperties': False,
2268 'properties': {'Address': {'$ref': '#/definitions/Address'},
2269 'port': {'type': 'integer'}},
2270 'required': ['Address', 'port'],
2272 'InstanceInfo': {'additionalProperties': False,
2273 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2274 'instance-id': {'type': 'string'},
2275 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
2277 'nonce': {'type': 'string'},
2278 'tag': {'type': 'string'},
2279 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
2281 'volumes': {'items': {'$ref': '#/definitions/Volume'},
2288 'volume-attachments',
2291 'InstancesInfo': {'additionalProperties': False,
2292 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
2294 'required': ['machines'],
2296 'LifeResult': {'additionalProperties': False,
2297 'properties': {'error': {'$ref': '#/definitions/Error'},
2298 'life': {'type': 'string'}},
2299 'required': ['life'],
2301 'LifeResults': {'additionalProperties': False,
2302 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2304 'required': ['results'],
2306 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2307 'MachineContainers': {'additionalProperties': False,
2308 'properties': {'container-types': {'items': {'type': 'string'},
2310 'machine-tag': {'type': 'string'}},
2311 'required': ['machine-tag',
2314 'MachineContainersParams': {'additionalProperties': False,
2315 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
2317 'required': ['params'],
2319 'MachineNetworkConfigResult': {'additionalProperties': False,
2320 'properties': {'error': {'$ref': '#/definitions/Error'},
2321 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
2323 'required': ['info'],
2325 'MachineNetworkConfigResults': {'additionalProperties': False,
2326 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
2328 'required': ['results'],
2330 'ModelConfigResult': {'additionalProperties': False,
2331 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2334 'required': ['config'],
2336 'NetworkConfig': {'additionalProperties': False,
2337 'properties': {'address': {'type': 'string'},
2338 'cidr': {'type': 'string'},
2339 'config-type': {'type': 'string'},
2340 'device-index': {'type': 'integer'},
2341 'disabled': {'type': 'boolean'},
2342 'dns-search-domains': {'items': {'type': 'string'},
2344 'dns-servers': {'items': {'type': 'string'},
2346 'gateway-address': {'type': 'string'},
2347 'interface-name': {'type': 'string'},
2348 'interface-type': {'type': 'string'},
2349 'mac-address': {'type': 'string'},
2350 'mtu': {'type': 'integer'},
2351 'no-auto-start': {'type': 'boolean'},
2352 'parent-interface-name': {'type': 'string'},
2353 'provider-address-id': {'type': 'string'},
2354 'provider-id': {'type': 'string'},
2355 'provider-space-id': {'type': 'string'},
2356 'provider-subnet-id': {'type': 'string'},
2357 'provider-vlan-id': {'type': 'string'},
2358 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
2360 'vlan-tag': {'type': 'integer'}},
2361 'required': ['device-index',
2366 'provider-subnet-id',
2367 'provider-space-id',
2368 'provider-address-id',
2372 'parent-interface-name',
2376 'NetworkRoute': {'additionalProperties': False,
2377 'properties': {'destination-cidr': {'type': 'string'},
2378 'gateway-ip': {'type': 'string'},
2379 'metric': {'type': 'integer'}},
2380 'required': ['destination-cidr',
2384 'NotifyWatchResult': {'additionalProperties': False,
2385 'properties': {'NotifyWatcherId': {'type': 'string'},
2386 'error': {'$ref': '#/definitions/Error'}},
2387 'required': ['NotifyWatcherId'],
2389 'Number': {'additionalProperties': False,
2390 'properties': {'Build': {'type': 'integer'},
2391 'Major': {'type': 'integer'},
2392 'Minor': {'type': 'integer'},
2393 'Patch': {'type': 'integer'},
2394 'Tag': {'type': 'string'}},
2395 'required': ['Major',
2401 'ProvisioningInfo': {'additionalProperties': False,
2402 'properties': {'constraints': {'$ref': '#/definitions/Value'},
2403 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
2406 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
2408 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
2410 'jobs': {'items': {'type': 'string'},
2412 'placement': {'type': 'string'},
2413 'series': {'type': 'string'},
2414 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
2417 'tags': {'patternProperties': {'.*': {'type': 'string'}},
2419 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
2421 'required': ['constraints',
2426 'ProvisioningInfoResult': {'additionalProperties': False,
2427 'properties': {'error': {'$ref': '#/definitions/Error'},
2428 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
2429 'required': ['result'],
2431 'ProvisioningInfoResults': {'additionalProperties': False,
2432 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
2434 'required': ['results'],
2436 'SetMachineNetworkConfig': {'additionalProperties': False,
2437 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
2439 'tag': {'type': 'string'}},
2440 'required': ['tag', 'config'],
2442 'SetStatus': {'additionalProperties': False,
2443 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
2445 'required': ['entities'],
2447 'Settings': {'additionalProperties': False,
2448 'properties': {'AutoNoProxy': {'type': 'string'},
2449 'Ftp': {'type': 'string'},
2450 'Http': {'type': 'string'},
2451 'Https': {'type': 'string'},
2452 'NoProxy': {'type': 'string'}},
2453 'required': ['Http',
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 'wwn': {'type': 'string'}},
2578 'required': ['volume-id', 'size', 'persistent'],
2580 'VolumeParams': {'additionalProperties': False,
2581 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
2582 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
2585 'provider': {'type': 'string'},
2586 'size': {'type': 'integer'},
2587 'tags': {'patternProperties': {'.*': {'type': 'string'}},
2589 'volume-tag': {'type': 'string'}},
2590 'required': ['volume-tag',
2594 'WatchContainer': {'additionalProperties': False,
2595 'properties': {'container-type': {'type': 'string'},
2596 'machine-tag': {'type': 'string'}},
2597 'required': ['machine-tag',
2600 'WatchContainers': {'additionalProperties': False,
2601 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
2603 'required': ['params'],
2605 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2607 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
2609 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
2611 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2612 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
2614 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
2616 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
2617 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
2619 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
2621 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2622 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
2624 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2625 'Result': {'$ref': '#/definitions/ErrorResults'}},
2627 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
2628 'Result': {'$ref': '#/definitions/FindToolsResult'}},
2630 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2631 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
2633 'HostChangesForContainers': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2634 'Result': {'$ref': '#/definitions/HostNetworkChangeResults'}},
2636 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2637 'Result': {'$ref': '#/definitions/StringResults'}},
2639 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2640 'Result': {'$ref': '#/definitions/StatusResults'}},
2642 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2643 'Result': {'$ref': '#/definitions/LifeResults'}},
2645 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
2647 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2648 'Result': {'$ref': '#/definitions/ErrorResults'}},
2650 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
2652 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
2654 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2655 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
2657 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2658 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
2660 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2661 'Result': {'$ref': '#/definitions/ErrorResults'}},
2663 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2664 'Result': {'$ref': '#/definitions/ErrorResults'}},
2666 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2667 'Result': {'$ref': '#/definitions/StringResults'}},
2669 'SetHostMachineNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
2671 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
2672 'Result': {'$ref': '#/definitions/ErrorResults'}},
2674 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2675 'Result': {'$ref': '#/definitions/ErrorResults'}},
2677 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
2679 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
2680 'Result': {'$ref': '#/definitions/ErrorResults'}},
2682 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2683 'Result': {'$ref': '#/definitions/ErrorResults'}},
2685 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2686 'Result': {'$ref': '#/definitions/ErrorResults'}},
2688 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
2689 'Result': {'$ref': '#/definitions/ErrorResults'}},
2691 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2693 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2694 'Result': {'$ref': '#/definitions/StatusResults'}},
2696 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2697 'Result': {'$ref': '#/definitions/ToolsResults'}},
2699 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2700 'Result': {'$ref': '#/definitions/ErrorResults'}},
2702 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2704 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
2705 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2707 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
2708 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2710 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2712 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2714 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
2719 @ReturnMapping(StringsResult
)
2720 async def APIAddresses(self
):
2723 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
2725 # map input types to rpc msg
2727 msg
= dict(type='Provisioner', request
='APIAddresses', version
=3, params
=_params
)
2729 reply
= await self
.rpc(msg
)
2734 @ReturnMapping(APIHostPortsResult
)
2735 async def APIHostPorts(self
):
2738 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
2740 # map input types to rpc msg
2742 msg
= dict(type='Provisioner', request
='APIHostPorts', version
=3, params
=_params
)
2744 reply
= await self
.rpc(msg
)
2749 @ReturnMapping(BytesResult
)
2750 async def CACert(self
):
2753 Returns -> typing.Sequence<+T_co>[int]
2755 # map input types to rpc msg
2757 msg
= dict(type='Provisioner', request
='CACert', version
=3, params
=_params
)
2759 reply
= await self
.rpc(msg
)
2764 @ReturnMapping(ConstraintsResults
)
2765 async def Constraints(self
, entities
):
2767 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2768 Returns -> typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
2770 # map input types to rpc msg
2772 msg
= dict(type='Provisioner', request
='Constraints', version
=3, params
=_params
)
2773 _params
['entities'] = entities
2774 reply
= await self
.rpc(msg
)
2779 @ReturnMapping(ContainerConfig
)
2780 async def ContainerConfig(self
):
2783 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool]
2785 # map input types to rpc msg
2787 msg
= dict(type='Provisioner', request
='ContainerConfig', version
=3, params
=_params
)
2789 reply
= await self
.rpc(msg
)
2794 @ReturnMapping(ContainerManagerConfig
)
2795 async def ContainerManagerConfig(self
, type_
):
2798 Returns -> typing.Mapping<~KT, +VT_co>[str, str]
2800 # map input types to rpc msg
2802 msg
= dict(type='Provisioner', request
='ContainerManagerConfig', version
=3, params
=_params
)
2803 _params
['type'] = type_
2804 reply
= await self
.rpc(msg
)
2809 @ReturnMapping(ControllerConfigResult
)
2810 async def ControllerConfig(self
):
2813 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
2815 # map input types to rpc msg
2817 msg
= dict(type='Provisioner', request
='ControllerConfig', version
=3, params
=_params
)
2819 reply
= await self
.rpc(msg
)
2824 @ReturnMapping(DistributionGroupResults
)
2825 async def DistributionGroup(self
, entities
):
2827 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2828 Returns -> typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
2830 # map input types to rpc msg
2832 msg
= dict(type='Provisioner', request
='DistributionGroup', version
=3, params
=_params
)
2833 _params
['entities'] = entities
2834 reply
= await self
.rpc(msg
)
2839 @ReturnMapping(ErrorResults
)
2840 async def EnsureDead(self
, entities
):
2842 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2843 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2845 # map input types to rpc msg
2847 msg
= dict(type='Provisioner', request
='EnsureDead', version
=3, params
=_params
)
2848 _params
['entities'] = entities
2849 reply
= await self
.rpc(msg
)
2854 @ReturnMapping(FindToolsResult
)
2855 async def FindTools(self
, arch
, major
, minor
, number
, series
):
2862 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
2864 # map input types to rpc msg
2866 msg
= dict(type='Provisioner', request
='FindTools', version
=3, params
=_params
)
2867 _params
['arch'] = arch
2868 _params
['major'] = major
2869 _params
['minor'] = minor
2870 _params
['number'] = number
2871 _params
['series'] = series
2872 reply
= await self
.rpc(msg
)
2877 @ReturnMapping(MachineNetworkConfigResults
)
2878 async def GetContainerInterfaceInfo(self
, entities
):
2880 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2881 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
2883 # map input types to rpc msg
2885 msg
= dict(type='Provisioner', request
='GetContainerInterfaceInfo', version
=3, params
=_params
)
2886 _params
['entities'] = entities
2887 reply
= await self
.rpc(msg
)
2892 @ReturnMapping(HostNetworkChangeResults
)
2893 async def HostChangesForContainers(self
, entities
):
2895 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2896 Returns -> typing.Sequence<+T_co>[~HostNetworkChange]<~HostNetworkChange>
2898 # map input types to rpc msg
2900 msg
= dict(type='Provisioner', request
='HostChangesForContainers', version
=3, params
=_params
)
2901 _params
['entities'] = entities
2902 reply
= await self
.rpc(msg
)
2907 @ReturnMapping(StringResults
)
2908 async def InstanceId(self
, entities
):
2910 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2911 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
2913 # map input types to rpc msg
2915 msg
= dict(type='Provisioner', request
='InstanceId', version
=3, params
=_params
)
2916 _params
['entities'] = entities
2917 reply
= await self
.rpc(msg
)
2922 @ReturnMapping(StatusResults
)
2923 async def InstanceStatus(self
, entities
):
2925 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2926 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
2928 # map input types to rpc msg
2930 msg
= dict(type='Provisioner', request
='InstanceStatus', version
=3, params
=_params
)
2931 _params
['entities'] = entities
2932 reply
= await self
.rpc(msg
)
2937 @ReturnMapping(LifeResults
)
2938 async def Life(self
, entities
):
2940 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2941 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2943 # map input types to rpc msg
2945 msg
= dict(type='Provisioner', request
='Life', version
=3, params
=_params
)
2946 _params
['entities'] = entities
2947 reply
= await self
.rpc(msg
)
2952 @ReturnMapping(StatusResults
)
2953 async def MachinesWithTransientErrors(self
):
2956 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
2958 # map input types to rpc msg
2960 msg
= dict(type='Provisioner', request
='MachinesWithTransientErrors', version
=3, params
=_params
)
2962 reply
= await self
.rpc(msg
)
2967 @ReturnMapping(ErrorResults
)
2968 async def MarkMachinesForRemoval(self
, entities
):
2970 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2971 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2973 # map input types to rpc msg
2975 msg
= dict(type='Provisioner', request
='MarkMachinesForRemoval', version
=3, params
=_params
)
2976 _params
['entities'] = entities
2977 reply
= await self
.rpc(msg
)
2982 @ReturnMapping(ModelConfigResult
)
2983 async def ModelConfig(self
):
2986 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
2988 # map input types to rpc msg
2990 msg
= dict(type='Provisioner', request
='ModelConfig', version
=3, params
=_params
)
2992 reply
= await self
.rpc(msg
)
2997 @ReturnMapping(StringResult
)
2998 async def ModelUUID(self
):
3001 Returns -> typing.Union[_ForwardRef('Error'), str]
3003 # map input types to rpc msg
3005 msg
= dict(type='Provisioner', request
='ModelUUID', version
=3, params
=_params
)
3007 reply
= await self
.rpc(msg
)
3012 @ReturnMapping(MachineNetworkConfigResults
)
3013 async def PrepareContainerInterfaceInfo(self
, entities
):
3015 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3016 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
3018 # map input types to rpc msg
3020 msg
= dict(type='Provisioner', request
='PrepareContainerInterfaceInfo', version
=3, params
=_params
)
3021 _params
['entities'] = entities
3022 reply
= await self
.rpc(msg
)
3027 @ReturnMapping(ProvisioningInfoResults
)
3028 async def ProvisioningInfo(self
, entities
):
3030 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3031 Returns -> typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
3033 # map input types to rpc msg
3035 msg
= dict(type='Provisioner', request
='ProvisioningInfo', version
=3, params
=_params
)
3036 _params
['entities'] = entities
3037 reply
= await self
.rpc(msg
)
3042 @ReturnMapping(ErrorResults
)
3043 async def ReleaseContainerAddresses(self
, entities
):
3045 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3046 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3048 # map input types to rpc msg
3050 msg
= dict(type='Provisioner', request
='ReleaseContainerAddresses', version
=3, params
=_params
)
3051 _params
['entities'] = entities
3052 reply
= await self
.rpc(msg
)
3057 @ReturnMapping(ErrorResults
)
3058 async def Remove(self
, entities
):
3060 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3061 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3063 # map input types to rpc msg
3065 msg
= dict(type='Provisioner', request
='Remove', version
=3, params
=_params
)
3066 _params
['entities'] = entities
3067 reply
= await self
.rpc(msg
)
3072 @ReturnMapping(StringResults
)
3073 async def Series(self
, entities
):
3075 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3076 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
3078 # map input types to rpc msg
3080 msg
= dict(type='Provisioner', request
='Series', version
=3, params
=_params
)
3081 _params
['entities'] = entities
3082 reply
= await self
.rpc(msg
)
3087 @ReturnMapping(None)
3088 async def SetHostMachineNetworkConfig(self
, config
, tag
):
3090 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3094 # map input types to rpc msg
3096 msg
= dict(type='Provisioner', request
='SetHostMachineNetworkConfig', version
=3, params
=_params
)
3097 _params
['config'] = config
3098 _params
['tag'] = tag
3099 reply
= await self
.rpc(msg
)
3104 @ReturnMapping(ErrorResults
)
3105 async def SetInstanceInfo(self
, machines
):
3107 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
3108 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3110 # map input types to rpc msg
3112 msg
= dict(type='Provisioner', request
='SetInstanceInfo', version
=3, params
=_params
)
3113 _params
['machines'] = machines
3114 reply
= await self
.rpc(msg
)
3119 @ReturnMapping(ErrorResults
)
3120 async def SetInstanceStatus(self
, entities
):
3122 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3123 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3125 # map input types to rpc msg
3127 msg
= dict(type='Provisioner', request
='SetInstanceStatus', version
=3, params
=_params
)
3128 _params
['entities'] = entities
3129 reply
= await self
.rpc(msg
)
3134 @ReturnMapping(None)
3135 async def SetObservedNetworkConfig(self
, config
, tag
):
3137 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3141 # map input types to rpc msg
3143 msg
= dict(type='Provisioner', request
='SetObservedNetworkConfig', version
=3, params
=_params
)
3144 _params
['config'] = config
3145 _params
['tag'] = tag
3146 reply
= await self
.rpc(msg
)
3151 @ReturnMapping(ErrorResults
)
3152 async def SetPasswords(self
, changes
):
3154 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
3155 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3157 # map input types to rpc msg
3159 msg
= dict(type='Provisioner', request
='SetPasswords', version
=3, params
=_params
)
3160 _params
['changes'] = changes
3161 reply
= await self
.rpc(msg
)
3166 @ReturnMapping(ErrorResults
)
3167 async def SetProviderNetworkConfig(self
, entities
):
3169 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3170 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3172 # map input types to rpc msg
3174 msg
= dict(type='Provisioner', request
='SetProviderNetworkConfig', version
=3, params
=_params
)
3175 _params
['entities'] = entities
3176 reply
= await self
.rpc(msg
)
3181 @ReturnMapping(ErrorResults
)
3182 async def SetStatus(self
, entities
):
3184 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3185 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3187 # map input types to rpc msg
3189 msg
= dict(type='Provisioner', request
='SetStatus', version
=3, params
=_params
)
3190 _params
['entities'] = entities
3191 reply
= await self
.rpc(msg
)
3196 @ReturnMapping(ErrorResults
)
3197 async def SetSupportedContainers(self
, params
):
3199 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
3200 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3202 # map input types to rpc msg
3204 msg
= dict(type='Provisioner', request
='SetSupportedContainers', version
=3, params
=_params
)
3205 _params
['params'] = params
3206 reply
= await self
.rpc(msg
)
3211 @ReturnMapping(StringsResult
)
3212 async def StateAddresses(self
):
3215 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
3217 # map input types to rpc msg
3219 msg
= dict(type='Provisioner', request
='StateAddresses', version
=3, params
=_params
)
3221 reply
= await self
.rpc(msg
)
3226 @ReturnMapping(StatusResults
)
3227 async def Status(self
, entities
):
3229 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3230 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
3232 # map input types to rpc msg
3234 msg
= dict(type='Provisioner', request
='Status', version
=3, params
=_params
)
3235 _params
['entities'] = entities
3236 reply
= await self
.rpc(msg
)
3241 @ReturnMapping(ToolsResults
)
3242 async def Tools(self
, entities
):
3244 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3245 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
3247 # map input types to rpc msg
3249 msg
= dict(type='Provisioner', request
='Tools', version
=3, params
=_params
)
3250 _params
['entities'] = entities
3251 reply
= await self
.rpc(msg
)
3256 @ReturnMapping(ErrorResults
)
3257 async def UpdateStatus(self
, entities
):
3259 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3260 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3262 # map input types to rpc msg
3264 msg
= dict(type='Provisioner', request
='UpdateStatus', version
=3, params
=_params
)
3265 _params
['entities'] = entities
3266 reply
= await self
.rpc(msg
)
3271 @ReturnMapping(NotifyWatchResult
)
3272 async def WatchAPIHostPorts(self
):
3275 Returns -> typing.Union[str, _ForwardRef('Error')]
3277 # map input types to rpc msg
3279 msg
= dict(type='Provisioner', request
='WatchAPIHostPorts', version
=3, params
=_params
)
3281 reply
= await self
.rpc(msg
)
3286 @ReturnMapping(StringsWatchResults
)
3287 async def WatchAllContainers(self
, params
):
3289 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
3290 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
3292 # map input types to rpc msg
3294 msg
= dict(type='Provisioner', request
='WatchAllContainers', version
=3, params
=_params
)
3295 _params
['params'] = params
3296 reply
= await self
.rpc(msg
)
3301 @ReturnMapping(StringsWatchResults
)
3302 async def WatchContainers(self
, params
):
3304 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
3305 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
3307 # map input types to rpc msg
3309 msg
= dict(type='Provisioner', request
='WatchContainers', version
=3, params
=_params
)
3310 _params
['params'] = params
3311 reply
= await self
.rpc(msg
)
3316 @ReturnMapping(NotifyWatchResult
)
3317 async def WatchForModelConfigChanges(self
):
3320 Returns -> typing.Union[str, _ForwardRef('Error')]
3322 # map input types to rpc msg
3324 msg
= dict(type='Provisioner', request
='WatchForModelConfigChanges', version
=3, params
=_params
)
3326 reply
= await self
.rpc(msg
)
3331 @ReturnMapping(NotifyWatchResult
)
3332 async def WatchMachineErrorRetry(self
):
3335 Returns -> typing.Union[str, _ForwardRef('Error')]
3337 # map input types to rpc msg
3339 msg
= dict(type='Provisioner', request
='WatchMachineErrorRetry', version
=3, params
=_params
)
3341 reply
= await self
.rpc(msg
)
3346 @ReturnMapping(StringsWatchResult
)
3347 async def WatchModelMachines(self
):
3350 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
3352 # map input types to rpc msg
3354 msg
= dict(type='Provisioner', request
='WatchModelMachines', version
=3, params
=_params
)
3356 reply
= await self
.rpc(msg
)
3361 class StorageFacade(Type
):
3364 schema
= {'definitions': {'Entities': {'additionalProperties': False,
3365 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3367 'required': ['entities'],
3369 'Entity': {'additionalProperties': False,
3370 'properties': {'tag': {'type': 'string'}},
3371 'required': ['tag'],
3373 'EntityStatus': {'additionalProperties': False,
3374 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3377 'info': {'type': 'string'},
3378 'since': {'format': 'date-time',
3380 'status': {'type': 'string'}},
3381 'required': ['status', 'info', 'since'],
3383 'Error': {'additionalProperties': False,
3384 'properties': {'code': {'type': 'string'},
3385 'info': {'$ref': '#/definitions/ErrorInfo'},
3386 'message': {'type': 'string'}},
3387 'required': ['message', 'code'],
3389 'ErrorInfo': {'additionalProperties': False,
3390 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3391 'macaroon-path': {'type': 'string'}},
3393 'ErrorResult': {'additionalProperties': False,
3394 'properties': {'error': {'$ref': '#/definitions/Error'}},
3396 'ErrorResults': {'additionalProperties': False,
3397 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3399 'required': ['results'],
3401 'FilesystemAttachmentDetails': {'additionalProperties': False,
3402 'properties': {'FilesystemAttachmentInfo': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
3403 'life': {'type': 'string'}},
3404 'required': ['FilesystemAttachmentInfo'],
3406 'FilesystemAttachmentInfo': {'additionalProperties': False,
3407 'properties': {'mount-point': {'type': 'string'},
3408 'read-only': {'type': 'boolean'}},
3410 'FilesystemDetails': {'additionalProperties': False,
3411 'properties': {'filesystem-tag': {'type': 'string'},
3412 'info': {'$ref': '#/definitions/FilesystemInfo'},
3413 'life': {'type': 'string'},
3414 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentDetails'}},
3416 'status': {'$ref': '#/definitions/EntityStatus'},
3417 'storage': {'$ref': '#/definitions/StorageDetails'},
3418 'volume-tag': {'type': 'string'}},
3419 'required': ['filesystem-tag',
3423 'FilesystemDetailsListResult': {'additionalProperties': False,
3424 'properties': {'error': {'$ref': '#/definitions/Error'},
3425 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
3428 'FilesystemDetailsListResults': {'additionalProperties': False,
3429 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
3432 'FilesystemFilter': {'additionalProperties': False,
3433 'properties': {'machines': {'items': {'type': 'string'},
3436 'FilesystemFilters': {'additionalProperties': False,
3437 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
3440 'FilesystemInfo': {'additionalProperties': False,
3441 'properties': {'filesystem-id': {'type': 'string'},
3442 'pool': {'type': 'string'},
3443 'size': {'type': 'integer'}},
3444 'required': ['filesystem-id',
3448 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3449 'StorageAddParams': {'additionalProperties': False,
3450 'properties': {'name': {'type': 'string'},
3451 'storage': {'$ref': '#/definitions/StorageConstraints'},
3452 'unit': {'type': 'string'}},
3453 'required': ['unit', 'name', 'storage'],
3455 'StorageAttachmentDetails': {'additionalProperties': False,
3456 'properties': {'life': {'type': 'string'},
3457 'location': {'type': 'string'},
3458 'machine-tag': {'type': 'string'},
3459 'storage-tag': {'type': 'string'},
3460 'unit-tag': {'type': 'string'}},
3461 'required': ['storage-tag',
3465 'StorageAttachmentId': {'additionalProperties': False,
3466 'properties': {'storage-tag': {'type': 'string'},
3467 'unit-tag': {'type': 'string'}},
3468 'required': ['storage-tag',
3471 'StorageAttachmentIds': {'additionalProperties': False,
3472 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
3474 'required': ['ids'],
3476 'StorageConstraints': {'additionalProperties': False,
3477 'properties': {'count': {'type': 'integer'},
3478 'pool': {'type': 'string'},
3479 'size': {'type': 'integer'}},
3481 'StorageDetails': {'additionalProperties': False,
3482 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
3484 'kind': {'type': 'integer'},
3485 'life': {'type': 'string'},
3486 'owner-tag': {'type': 'string'},
3487 'persistent': {'type': 'boolean'},
3488 'status': {'$ref': '#/definitions/EntityStatus'},
3489 'storage-tag': {'type': 'string'}},
3490 'required': ['storage-tag',
3496 'StorageDetailsListResult': {'additionalProperties': False,
3497 'properties': {'error': {'$ref': '#/definitions/Error'},
3498 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
3501 'StorageDetailsListResults': {'additionalProperties': False,
3502 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
3505 'StorageDetailsResult': {'additionalProperties': False,
3506 'properties': {'error': {'$ref': '#/definitions/Error'},
3507 'result': {'$ref': '#/definitions/StorageDetails'}},
3509 'StorageDetailsResults': {'additionalProperties': False,
3510 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
3513 'StorageFilter': {'additionalProperties': False,
3515 'StorageFilters': {'additionalProperties': False,
3516 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
3519 'StoragePool': {'additionalProperties': False,
3520 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
3523 'name': {'type': 'string'},
3524 'provider': {'type': 'string'}},
3525 'required': ['name', 'provider', 'attrs'],
3527 'StoragePoolFilter': {'additionalProperties': False,
3528 'properties': {'names': {'items': {'type': 'string'},
3530 'providers': {'items': {'type': 'string'},
3533 'StoragePoolFilters': {'additionalProperties': False,
3534 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
3537 'StoragePoolsResult': {'additionalProperties': False,
3538 'properties': {'error': {'$ref': '#/definitions/Error'},
3539 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
3542 'StoragePoolsResults': {'additionalProperties': False,
3543 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
3546 'StoragesAddParams': {'additionalProperties': False,
3547 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
3549 'required': ['storages'],
3551 'VolumeAttachmentDetails': {'additionalProperties': False,
3552 'properties': {'VolumeAttachmentInfo': {'$ref': '#/definitions/VolumeAttachmentInfo'},
3553 'life': {'type': 'string'}},
3554 'required': ['VolumeAttachmentInfo'],
3556 'VolumeAttachmentInfo': {'additionalProperties': False,
3557 'properties': {'bus-address': {'type': 'string'},
3558 'device-link': {'type': 'string'},
3559 'device-name': {'type': 'string'},
3560 'read-only': {'type': 'boolean'}},
3562 'VolumeDetails': {'additionalProperties': False,
3563 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
3564 'life': {'type': 'string'},
3565 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentDetails'}},
3567 'status': {'$ref': '#/definitions/EntityStatus'},
3568 'storage': {'$ref': '#/definitions/StorageDetails'},
3569 'volume-tag': {'type': 'string'}},
3570 'required': ['volume-tag', 'info', 'status'],
3572 'VolumeDetailsListResult': {'additionalProperties': False,
3573 'properties': {'error': {'$ref': '#/definitions/Error'},
3574 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
3577 'VolumeDetailsListResults': {'additionalProperties': False,
3578 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
3581 'VolumeFilter': {'additionalProperties': False,
3582 'properties': {'machines': {'items': {'type': 'string'},
3585 'VolumeFilters': {'additionalProperties': False,
3586 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
3589 'VolumeInfo': {'additionalProperties': False,
3590 'properties': {'hardware-id': {'type': 'string'},
3591 'persistent': {'type': 'boolean'},
3592 'pool': {'type': 'string'},
3593 'size': {'type': 'integer'},
3594 'volume-id': {'type': 'string'},
3595 'wwn': {'type': 'string'}},
3596 'required': ['volume-id', 'size', 'persistent'],
3598 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
3599 'Result': {'$ref': '#/definitions/ErrorResults'}},
3601 'Attach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3602 'Result': {'$ref': '#/definitions/ErrorResults'}},
3604 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
3606 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3607 'Result': {'$ref': '#/definitions/ErrorResults'}},
3609 'Detach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3610 'Result': {'$ref': '#/definitions/ErrorResults'}},
3612 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
3613 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
3615 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
3616 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
3618 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
3619 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
3621 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
3622 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
3624 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3625 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
3630 @ReturnMapping(ErrorResults
)
3631 async def AddToUnit(self
, storages
):
3633 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
3634 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3636 # map input types to rpc msg
3638 msg
= dict(type='Storage', request
='AddToUnit', version
=3, params
=_params
)
3639 _params
['storages'] = storages
3640 reply
= await self
.rpc(msg
)
3645 @ReturnMapping(ErrorResults
)
3646 async def Attach(self
, ids
):
3648 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
3649 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3651 # map input types to rpc msg
3653 msg
= dict(type='Storage', request
='Attach', version
=3, params
=_params
)
3654 _params
['ids'] = ids
3655 reply
= await self
.rpc(msg
)
3660 @ReturnMapping(None)
3661 async def CreatePool(self
, attrs
, name
, provider
):
3663 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3668 # map input types to rpc msg
3670 msg
= dict(type='Storage', request
='CreatePool', version
=3, params
=_params
)
3671 _params
['attrs'] = attrs
3672 _params
['name'] = name
3673 _params
['provider'] = provider
3674 reply
= await self
.rpc(msg
)
3679 @ReturnMapping(ErrorResults
)
3680 async def Destroy(self
, entities
):
3682 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3683 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3685 # map input types to rpc msg
3687 msg
= dict(type='Storage', request
='Destroy', version
=3, params
=_params
)
3688 _params
['entities'] = entities
3689 reply
= await self
.rpc(msg
)
3694 @ReturnMapping(ErrorResults
)
3695 async def Detach(self
, ids
):
3697 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
3698 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3700 # map input types to rpc msg
3702 msg
= dict(type='Storage', request
='Detach', version
=3, params
=_params
)
3703 _params
['ids'] = ids
3704 reply
= await self
.rpc(msg
)
3709 @ReturnMapping(FilesystemDetailsListResults
)
3710 async def ListFilesystems(self
, filters
):
3712 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
3713 Returns -> typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
3715 # map input types to rpc msg
3717 msg
= dict(type='Storage', request
='ListFilesystems', version
=3, params
=_params
)
3718 _params
['filters'] = filters
3719 reply
= await self
.rpc(msg
)
3724 @ReturnMapping(StoragePoolsResults
)
3725 async def ListPools(self
, filters
):
3727 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
3728 Returns -> typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
3730 # map input types to rpc msg
3732 msg
= dict(type='Storage', request
='ListPools', version
=3, params
=_params
)
3733 _params
['filters'] = filters
3734 reply
= await self
.rpc(msg
)
3739 @ReturnMapping(StorageDetailsListResults
)
3740 async def ListStorageDetails(self
, filters
):
3742 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
3743 Returns -> typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
3745 # map input types to rpc msg
3747 msg
= dict(type='Storage', request
='ListStorageDetails', version
=3, params
=_params
)
3748 _params
['filters'] = filters
3749 reply
= await self
.rpc(msg
)
3754 @ReturnMapping(VolumeDetailsListResults
)
3755 async def ListVolumes(self
, filters
):
3757 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
3758 Returns -> typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
3760 # map input types to rpc msg
3762 msg
= dict(type='Storage', request
='ListVolumes', version
=3, params
=_params
)
3763 _params
['filters'] = filters
3764 reply
= await self
.rpc(msg
)
3769 @ReturnMapping(StorageDetailsResults
)
3770 async def StorageDetails(self
, entities
):
3772 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3773 Returns -> typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
3775 # map input types to rpc msg
3777 msg
= dict(type='Storage', request
='StorageDetails', version
=3, params
=_params
)
3778 _params
['entities'] = entities
3779 reply
= await self
.rpc(msg
)
3784 class StorageProvisionerFacade(Type
):
3785 name
= 'StorageProvisioner'
3787 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
3788 'properties': {'BusAddress': {'type': 'string'},
3789 'DeviceLinks': {'items': {'type': 'string'},
3791 'DeviceName': {'type': 'string'},
3792 'FilesystemType': {'type': 'string'},
3793 'HardwareId': {'type': 'string'},
3794 'InUse': {'type': 'boolean'},
3795 'Label': {'type': 'string'},
3796 'MountPoint': {'type': 'string'},
3797 'Size': {'type': 'integer'},
3798 'UUID': {'type': 'string'},
3799 'WWN': {'type': 'string'}},
3800 'required': ['DeviceName',
3812 'BlockDeviceResult': {'additionalProperties': False,
3813 'properties': {'error': {'$ref': '#/definitions/Error'},
3814 'result': {'$ref': '#/definitions/BlockDevice'}},
3815 'required': ['result'],
3817 'BlockDeviceResults': {'additionalProperties': False,
3818 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
3821 'Entities': {'additionalProperties': False,
3822 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3824 'required': ['entities'],
3826 'Entity': {'additionalProperties': False,
3827 'properties': {'tag': {'type': 'string'}},
3828 'required': ['tag'],
3830 'EntityStatusArgs': {'additionalProperties': False,
3831 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3834 'info': {'type': 'string'},
3835 'status': {'type': 'string'},
3836 'tag': {'type': 'string'}},
3842 'Error': {'additionalProperties': False,
3843 'properties': {'code': {'type': 'string'},
3844 'info': {'$ref': '#/definitions/ErrorInfo'},
3845 'message': {'type': 'string'}},
3846 'required': ['message', 'code'],
3848 'ErrorInfo': {'additionalProperties': False,
3849 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3850 'macaroon-path': {'type': 'string'}},
3852 'ErrorResult': {'additionalProperties': False,
3853 'properties': {'error': {'$ref': '#/definitions/Error'}},
3855 'ErrorResults': {'additionalProperties': False,
3856 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3858 'required': ['results'],
3860 'Filesystem': {'additionalProperties': False,
3861 'properties': {'filesystem-tag': {'type': 'string'},
3862 'info': {'$ref': '#/definitions/FilesystemInfo'},
3863 'volume-tag': {'type': 'string'}},
3864 'required': ['filesystem-tag', 'info'],
3866 'FilesystemAttachment': {'additionalProperties': False,
3867 'properties': {'filesystem-tag': {'type': 'string'},
3868 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
3869 'machine-tag': {'type': 'string'}},
3870 'required': ['filesystem-tag',
3874 'FilesystemAttachmentInfo': {'additionalProperties': False,
3875 'properties': {'mount-point': {'type': 'string'},
3876 'read-only': {'type': 'boolean'}},
3878 'FilesystemAttachmentParams': {'additionalProperties': False,
3879 'properties': {'filesystem-id': {'type': 'string'},
3880 'filesystem-tag': {'type': 'string'},
3881 'instance-id': {'type': 'string'},
3882 'machine-tag': {'type': 'string'},
3883 'mount-point': {'type': 'string'},
3884 'provider': {'type': 'string'},
3885 'read-only': {'type': 'boolean'}},
3886 'required': ['filesystem-tag',
3890 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
3891 'properties': {'error': {'$ref': '#/definitions/Error'},
3892 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
3893 'required': ['result'],
3895 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
3896 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
3899 'FilesystemAttachmentResult': {'additionalProperties': False,
3900 'properties': {'error': {'$ref': '#/definitions/Error'},
3901 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
3902 'required': ['result'],
3904 'FilesystemAttachmentResults': {'additionalProperties': False,
3905 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
3908 'FilesystemAttachments': {'additionalProperties': False,
3909 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
3911 'required': ['filesystem-attachments'],
3913 'FilesystemInfo': {'additionalProperties': False,
3914 'properties': {'filesystem-id': {'type': 'string'},
3915 'pool': {'type': 'string'},
3916 'size': {'type': 'integer'}},
3917 'required': ['filesystem-id',
3921 'FilesystemParams': {'additionalProperties': False,
3922 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
3923 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
3926 'filesystem-tag': {'type': 'string'},
3927 'provider': {'type': 'string'},
3928 'size': {'type': 'integer'},
3929 'tags': {'patternProperties': {'.*': {'type': 'string'}},
3931 'volume-tag': {'type': 'string'}},
3932 'required': ['filesystem-tag',
3936 'FilesystemParamsResult': {'additionalProperties': False,
3937 'properties': {'error': {'$ref': '#/definitions/Error'},
3938 'result': {'$ref': '#/definitions/FilesystemParams'}},
3939 'required': ['result'],
3941 'FilesystemParamsResults': {'additionalProperties': False,
3942 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
3945 'FilesystemResult': {'additionalProperties': False,
3946 'properties': {'error': {'$ref': '#/definitions/Error'},
3947 'result': {'$ref': '#/definitions/Filesystem'}},
3948 'required': ['result'],
3950 'FilesystemResults': {'additionalProperties': False,
3951 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
3954 'Filesystems': {'additionalProperties': False,
3955 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
3957 'required': ['filesystems'],
3959 'LifeResult': {'additionalProperties': False,
3960 'properties': {'error': {'$ref': '#/definitions/Error'},
3961 'life': {'type': 'string'}},
3962 'required': ['life'],
3964 'LifeResults': {'additionalProperties': False,
3965 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
3967 'required': ['results'],
3969 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3970 'MachineStorageId': {'additionalProperties': False,
3971 'properties': {'attachment-tag': {'type': 'string'},
3972 'machine-tag': {'type': 'string'}},
3973 'required': ['machine-tag',
3976 'MachineStorageIds': {'additionalProperties': False,
3977 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
3979 'required': ['ids'],
3981 'MachineStorageIdsWatchResult': {'additionalProperties': False,
3982 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
3984 'error': {'$ref': '#/definitions/Error'},
3985 'watcher-id': {'type': 'string'}},
3986 'required': ['watcher-id',
3989 'MachineStorageIdsWatchResults': {'additionalProperties': False,
3990 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
3992 'required': ['results'],
3994 'NotifyWatchResult': {'additionalProperties': False,
3995 'properties': {'NotifyWatcherId': {'type': 'string'},
3996 'error': {'$ref': '#/definitions/Error'}},
3997 'required': ['NotifyWatcherId'],
3999 'NotifyWatchResults': {'additionalProperties': False,
4000 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
4002 'required': ['results'],
4004 'SetStatus': {'additionalProperties': False,
4005 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
4007 'required': ['entities'],
4009 'StringResult': {'additionalProperties': False,
4010 'properties': {'error': {'$ref': '#/definitions/Error'},
4011 'result': {'type': 'string'}},
4012 'required': ['result'],
4014 'StringResults': {'additionalProperties': False,
4015 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
4017 'required': ['results'],
4019 'StringsWatchResult': {'additionalProperties': False,
4020 'properties': {'changes': {'items': {'type': 'string'},
4022 'error': {'$ref': '#/definitions/Error'},
4023 'watcher-id': {'type': 'string'}},
4024 'required': ['watcher-id'],
4026 'StringsWatchResults': {'additionalProperties': False,
4027 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
4029 'required': ['results'],
4031 'Volume': {'additionalProperties': False,
4032 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
4033 'volume-tag': {'type': 'string'}},
4034 'required': ['volume-tag', 'info'],
4036 'VolumeAttachment': {'additionalProperties': False,
4037 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
4038 'machine-tag': {'type': 'string'},
4039 'volume-tag': {'type': 'string'}},
4040 'required': ['volume-tag',
4044 'VolumeAttachmentInfo': {'additionalProperties': False,
4045 'properties': {'bus-address': {'type': 'string'},
4046 'device-link': {'type': 'string'},
4047 'device-name': {'type': 'string'},
4048 'read-only': {'type': 'boolean'}},
4050 'VolumeAttachmentParams': {'additionalProperties': False,
4051 'properties': {'instance-id': {'type': 'string'},
4052 'machine-tag': {'type': 'string'},
4053 'provider': {'type': 'string'},
4054 'read-only': {'type': 'boolean'},
4055 'volume-id': {'type': 'string'},
4056 'volume-tag': {'type': 'string'}},
4057 'required': ['volume-tag',
4061 'VolumeAttachmentParamsResult': {'additionalProperties': False,
4062 'properties': {'error': {'$ref': '#/definitions/Error'},
4063 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
4064 'required': ['result'],
4066 'VolumeAttachmentParamsResults': {'additionalProperties': False,
4067 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
4070 'VolumeAttachmentResult': {'additionalProperties': False,
4071 'properties': {'error': {'$ref': '#/definitions/Error'},
4072 'result': {'$ref': '#/definitions/VolumeAttachment'}},
4073 'required': ['result'],
4075 'VolumeAttachmentResults': {'additionalProperties': False,
4076 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
4079 'VolumeAttachments': {'additionalProperties': False,
4080 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
4082 'required': ['volume-attachments'],
4084 'VolumeInfo': {'additionalProperties': False,
4085 'properties': {'hardware-id': {'type': 'string'},
4086 'persistent': {'type': 'boolean'},
4087 'pool': {'type': 'string'},
4088 'size': {'type': 'integer'},
4089 'volume-id': {'type': 'string'},
4090 'wwn': {'type': 'string'}},
4091 'required': ['volume-id', 'size', 'persistent'],
4093 'VolumeParams': {'additionalProperties': False,
4094 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
4095 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
4098 'provider': {'type': 'string'},
4099 'size': {'type': 'integer'},
4100 'tags': {'patternProperties': {'.*': {'type': 'string'}},
4102 'volume-tag': {'type': 'string'}},
4103 'required': ['volume-tag',
4107 'VolumeParamsResult': {'additionalProperties': False,
4108 'properties': {'error': {'$ref': '#/definitions/Error'},
4109 'result': {'$ref': '#/definitions/VolumeParams'}},
4110 'required': ['result'],
4112 'VolumeParamsResults': {'additionalProperties': False,
4113 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
4116 'VolumeResult': {'additionalProperties': False,
4117 'properties': {'error': {'$ref': '#/definitions/Error'},
4118 'result': {'$ref': '#/definitions/Volume'}},
4119 'required': ['result'],
4121 'VolumeResults': {'additionalProperties': False,
4122 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
4125 'Volumes': {'additionalProperties': False,
4126 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
4128 'required': ['volumes'],
4130 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4131 'Result': {'$ref': '#/definitions/LifeResults'}},
4133 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4134 'Result': {'$ref': '#/definitions/ErrorResults'}},
4136 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4137 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
4139 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4140 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
4142 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4143 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
4145 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4146 'Result': {'$ref': '#/definitions/FilesystemResults'}},
4148 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4149 'Result': {'$ref': '#/definitions/StringResults'}},
4151 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4152 'Result': {'$ref': '#/definitions/LifeResults'}},
4154 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4155 'Result': {'$ref': '#/definitions/ErrorResults'}},
4157 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4158 'Result': {'$ref': '#/definitions/ErrorResults'}},
4160 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
4161 'Result': {'$ref': '#/definitions/ErrorResults'}},
4163 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
4164 'Result': {'$ref': '#/definitions/ErrorResults'}},
4166 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4167 'Result': {'$ref': '#/definitions/ErrorResults'}},
4169 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
4170 'Result': {'$ref': '#/definitions/ErrorResults'}},
4172 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
4173 'Result': {'$ref': '#/definitions/ErrorResults'}},
4175 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4176 'Result': {'$ref': '#/definitions/ErrorResults'}},
4178 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4179 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
4181 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4182 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
4184 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4185 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
4187 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4188 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
4190 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4191 'Result': {'$ref': '#/definitions/VolumeResults'}},
4193 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4194 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4196 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4197 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
4199 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4200 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4202 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4203 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4205 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4206 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
4208 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4209 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4214 @ReturnMapping(LifeResults
)
4215 async def AttachmentLife(self
, ids
):
4217 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4218 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
4220 # map input types to rpc msg
4222 msg
= dict(type='StorageProvisioner', request
='AttachmentLife', version
=3, params
=_params
)
4223 _params
['ids'] = ids
4224 reply
= await self
.rpc(msg
)
4229 @ReturnMapping(ErrorResults
)
4230 async def EnsureDead(self
, entities
):
4232 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4233 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4235 # map input types to rpc msg
4237 msg
= dict(type='StorageProvisioner', request
='EnsureDead', version
=3, params
=_params
)
4238 _params
['entities'] = entities
4239 reply
= await self
.rpc(msg
)
4244 @ReturnMapping(FilesystemAttachmentParamsResults
)
4245 async def FilesystemAttachmentParams(self
, ids
):
4247 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4248 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
4250 # map input types to rpc msg
4252 msg
= dict(type='StorageProvisioner', request
='FilesystemAttachmentParams', version
=3, params
=_params
)
4253 _params
['ids'] = ids
4254 reply
= await self
.rpc(msg
)
4259 @ReturnMapping(FilesystemAttachmentResults
)
4260 async def FilesystemAttachments(self
, ids
):
4262 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4263 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
4265 # map input types to rpc msg
4267 msg
= dict(type='StorageProvisioner', request
='FilesystemAttachments', version
=3, params
=_params
)
4268 _params
['ids'] = ids
4269 reply
= await self
.rpc(msg
)
4274 @ReturnMapping(FilesystemParamsResults
)
4275 async def FilesystemParams(self
, entities
):
4277 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4278 Returns -> typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
4280 # map input types to rpc msg
4282 msg
= dict(type='StorageProvisioner', request
='FilesystemParams', version
=3, params
=_params
)
4283 _params
['entities'] = entities
4284 reply
= await self
.rpc(msg
)
4289 @ReturnMapping(FilesystemResults
)
4290 async def Filesystems(self
, entities
):
4292 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4293 Returns -> typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
4295 # map input types to rpc msg
4297 msg
= dict(type='StorageProvisioner', request
='Filesystems', version
=3, params
=_params
)
4298 _params
['entities'] = entities
4299 reply
= await self
.rpc(msg
)
4304 @ReturnMapping(StringResults
)
4305 async def InstanceId(self
, entities
):
4307 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4308 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
4310 # map input types to rpc msg
4312 msg
= dict(type='StorageProvisioner', request
='InstanceId', version
=3, params
=_params
)
4313 _params
['entities'] = entities
4314 reply
= await self
.rpc(msg
)
4319 @ReturnMapping(LifeResults
)
4320 async def Life(self
, entities
):
4322 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4323 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
4325 # map input types to rpc msg
4327 msg
= dict(type='StorageProvisioner', request
='Life', version
=3, params
=_params
)
4328 _params
['entities'] = entities
4329 reply
= await self
.rpc(msg
)
4334 @ReturnMapping(ErrorResults
)
4335 async def Remove(self
, entities
):
4337 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4338 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4340 # map input types to rpc msg
4342 msg
= dict(type='StorageProvisioner', request
='Remove', version
=3, params
=_params
)
4343 _params
['entities'] = entities
4344 reply
= await self
.rpc(msg
)
4349 @ReturnMapping(ErrorResults
)
4350 async def RemoveAttachment(self
, ids
):
4352 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4353 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4355 # map input types to rpc msg
4357 msg
= dict(type='StorageProvisioner', request
='RemoveAttachment', version
=3, params
=_params
)
4358 _params
['ids'] = ids
4359 reply
= await self
.rpc(msg
)
4364 @ReturnMapping(ErrorResults
)
4365 async def SetFilesystemAttachmentInfo(self
, filesystem_attachments
):
4367 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
4368 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4370 # map input types to rpc msg
4372 msg
= dict(type='StorageProvisioner', request
='SetFilesystemAttachmentInfo', version
=3, params
=_params
)
4373 _params
['filesystem-attachments'] = filesystem_attachments
4374 reply
= await self
.rpc(msg
)
4379 @ReturnMapping(ErrorResults
)
4380 async def SetFilesystemInfo(self
, filesystems
):
4382 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
4383 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4385 # map input types to rpc msg
4387 msg
= dict(type='StorageProvisioner', request
='SetFilesystemInfo', version
=3, params
=_params
)
4388 _params
['filesystems'] = filesystems
4389 reply
= await self
.rpc(msg
)
4394 @ReturnMapping(ErrorResults
)
4395 async def SetStatus(self
, entities
):
4397 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
4398 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4400 # map input types to rpc msg
4402 msg
= dict(type='StorageProvisioner', request
='SetStatus', version
=3, params
=_params
)
4403 _params
['entities'] = entities
4404 reply
= await self
.rpc(msg
)
4409 @ReturnMapping(ErrorResults
)
4410 async def SetVolumeAttachmentInfo(self
, volume_attachments
):
4412 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
4413 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4415 # map input types to rpc msg
4417 msg
= dict(type='StorageProvisioner', request
='SetVolumeAttachmentInfo', version
=3, params
=_params
)
4418 _params
['volume-attachments'] = volume_attachments
4419 reply
= await self
.rpc(msg
)
4424 @ReturnMapping(ErrorResults
)
4425 async def SetVolumeInfo(self
, volumes
):
4427 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
4428 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4430 # map input types to rpc msg
4432 msg
= dict(type='StorageProvisioner', request
='SetVolumeInfo', version
=3, params
=_params
)
4433 _params
['volumes'] = volumes
4434 reply
= await self
.rpc(msg
)
4439 @ReturnMapping(ErrorResults
)
4440 async def UpdateStatus(self
, entities
):
4442 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
4443 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4445 # map input types to rpc msg
4447 msg
= dict(type='StorageProvisioner', request
='UpdateStatus', version
=3, params
=_params
)
4448 _params
['entities'] = entities
4449 reply
= await self
.rpc(msg
)
4454 @ReturnMapping(VolumeAttachmentParamsResults
)
4455 async def VolumeAttachmentParams(self
, ids
):
4457 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4458 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
4460 # map input types to rpc msg
4462 msg
= dict(type='StorageProvisioner', request
='VolumeAttachmentParams', version
=3, params
=_params
)
4463 _params
['ids'] = ids
4464 reply
= await self
.rpc(msg
)
4469 @ReturnMapping(VolumeAttachmentResults
)
4470 async def VolumeAttachments(self
, ids
):
4472 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4473 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
4475 # map input types to rpc msg
4477 msg
= dict(type='StorageProvisioner', request
='VolumeAttachments', version
=3, params
=_params
)
4478 _params
['ids'] = ids
4479 reply
= await self
.rpc(msg
)
4484 @ReturnMapping(BlockDeviceResults
)
4485 async def VolumeBlockDevices(self
, ids
):
4487 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4488 Returns -> typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
4490 # map input types to rpc msg
4492 msg
= dict(type='StorageProvisioner', request
='VolumeBlockDevices', version
=3, params
=_params
)
4493 _params
['ids'] = ids
4494 reply
= await self
.rpc(msg
)
4499 @ReturnMapping(VolumeParamsResults
)
4500 async def VolumeParams(self
, entities
):
4502 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4503 Returns -> typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
4505 # map input types to rpc msg
4507 msg
= dict(type='StorageProvisioner', request
='VolumeParams', version
=3, params
=_params
)
4508 _params
['entities'] = entities
4509 reply
= await self
.rpc(msg
)
4514 @ReturnMapping(VolumeResults
)
4515 async def Volumes(self
, entities
):
4517 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4518 Returns -> typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
4520 # map input types to rpc msg
4522 msg
= dict(type='StorageProvisioner', request
='Volumes', version
=3, params
=_params
)
4523 _params
['entities'] = entities
4524 reply
= await self
.rpc(msg
)
4529 @ReturnMapping(NotifyWatchResults
)
4530 async def WatchBlockDevices(self
, entities
):
4532 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4533 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
4535 # map input types to rpc msg
4537 msg
= dict(type='StorageProvisioner', request
='WatchBlockDevices', version
=3, params
=_params
)
4538 _params
['entities'] = entities
4539 reply
= await self
.rpc(msg
)
4544 @ReturnMapping(MachineStorageIdsWatchResults
)
4545 async def WatchFilesystemAttachments(self
, entities
):
4547 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4548 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
4550 # map input types to rpc msg
4552 msg
= dict(type='StorageProvisioner', request
='WatchFilesystemAttachments', version
=3, params
=_params
)
4553 _params
['entities'] = entities
4554 reply
= await self
.rpc(msg
)
4559 @ReturnMapping(StringsWatchResults
)
4560 async def WatchFilesystems(self
, entities
):
4562 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4563 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
4565 # map input types to rpc msg
4567 msg
= dict(type='StorageProvisioner', request
='WatchFilesystems', version
=3, params
=_params
)
4568 _params
['entities'] = entities
4569 reply
= await self
.rpc(msg
)
4574 @ReturnMapping(NotifyWatchResults
)
4575 async def WatchMachines(self
, entities
):
4577 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4578 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
4580 # map input types to rpc msg
4582 msg
= dict(type='StorageProvisioner', request
='WatchMachines', version
=3, params
=_params
)
4583 _params
['entities'] = entities
4584 reply
= await self
.rpc(msg
)
4589 @ReturnMapping(MachineStorageIdsWatchResults
)
4590 async def WatchVolumeAttachments(self
, entities
):
4592 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4593 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
4595 # map input types to rpc msg
4597 msg
= dict(type='StorageProvisioner', request
='WatchVolumeAttachments', version
=3, params
=_params
)
4598 _params
['entities'] = entities
4599 reply
= await self
.rpc(msg
)
4604 @ReturnMapping(StringsWatchResults
)
4605 async def WatchVolumes(self
, entities
):
4607 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4608 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
4610 # map input types to rpc msg
4612 msg
= dict(type='StorageProvisioner', request
='WatchVolumes', version
=3, params
=_params
)
4613 _params
['entities'] = entities
4614 reply
= await self
.rpc(msg
)