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 ModelManagerFacade(Type
):
2073 name
= 'ModelManager'
2075 schema
= {'definitions': {'DumpModelRequest': {'additionalProperties': False,
2076 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2078 'simplified': {'type': 'boolean'}},
2079 'required': ['entities', 'simplified'],
2081 'Entities': {'additionalProperties': False,
2082 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2084 'required': ['entities'],
2086 'Entity': {'additionalProperties': False,
2087 'properties': {'tag': {'type': 'string'}},
2088 'required': ['tag'],
2090 'EntityStatus': {'additionalProperties': False,
2091 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2094 'info': {'type': 'string'},
2095 'since': {'format': 'date-time',
2097 'status': {'type': 'string'}},
2098 'required': ['status', 'info', 'since'],
2100 'Error': {'additionalProperties': False,
2101 'properties': {'code': {'type': 'string'},
2102 'info': {'$ref': '#/definitions/ErrorInfo'},
2103 'message': {'type': 'string'}},
2104 'required': ['message', 'code'],
2106 'ErrorInfo': {'additionalProperties': False,
2107 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2108 'macaroon-path': {'type': 'string'}},
2110 'ErrorResult': {'additionalProperties': False,
2111 'properties': {'error': {'$ref': '#/definitions/Error'}},
2113 'ErrorResults': {'additionalProperties': False,
2114 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2116 'required': ['results'],
2118 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2119 'MachineHardware': {'additionalProperties': False,
2120 'properties': {'arch': {'type': 'string'},
2121 'availability-zone': {'type': 'string'},
2122 'cores': {'type': 'integer'},
2123 'cpu-power': {'type': 'integer'},
2124 'mem': {'type': 'integer'},
2125 'root-disk': {'type': 'integer'},
2126 'tags': {'items': {'type': 'string'},
2129 'MapResult': {'additionalProperties': False,
2130 'properties': {'error': {'$ref': '#/definitions/Error'},
2131 'result': {'patternProperties': {'.*': {'additionalProperties': True,
2134 'required': ['result'],
2136 'MapResults': {'additionalProperties': False,
2137 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
2139 'required': ['results'],
2141 'Model': {'additionalProperties': False,
2142 'properties': {'name': {'type': 'string'},
2143 'owner-tag': {'type': 'string'},
2144 'uuid': {'type': 'string'}},
2145 'required': ['name', 'uuid', 'owner-tag'],
2147 'ModelCreateArgs': {'additionalProperties': False,
2148 'properties': {'cloud-tag': {'type': 'string'},
2149 'config': {'patternProperties': {'.*': {'additionalProperties': True,
2152 'credential': {'type': 'string'},
2153 'name': {'type': 'string'},
2154 'owner-tag': {'type': 'string'},
2155 'region': {'type': 'string'}},
2156 'required': ['name', 'owner-tag'],
2158 'ModelDefaultValues': {'additionalProperties': False,
2159 'properties': {'cloud-region': {'type': 'string'},
2160 'cloud-tag': {'type': 'string'},
2161 'config': {'patternProperties': {'.*': {'additionalProperties': True,
2164 'required': ['config'],
2166 'ModelDefaults': {'additionalProperties': False,
2167 'properties': {'controller': {'additionalProperties': True,
2169 'default': {'additionalProperties': True,
2171 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
2174 'ModelDefaultsResult': {'additionalProperties': False,
2175 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
2177 'required': ['config'],
2179 'ModelInfo': {'additionalProperties': False,
2180 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
2181 'cloud-credential-tag': {'type': 'string'},
2182 'cloud-region': {'type': 'string'},
2183 'cloud-tag': {'type': 'string'},
2184 'controller-uuid': {'type': 'string'},
2185 'default-series': {'type': 'string'},
2186 'life': {'type': 'string'},
2187 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
2189 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
2190 'name': {'type': 'string'},
2191 'owner-tag': {'type': 'string'},
2192 'provider-type': {'type': 'string'},
2193 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
2194 'status': {'$ref': '#/definitions/EntityStatus'},
2195 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
2197 'uuid': {'type': 'string'}},
2198 'required': ['name',
2209 'ModelInfoResult': {'additionalProperties': False,
2210 'properties': {'error': {'$ref': '#/definitions/Error'},
2211 'result': {'$ref': '#/definitions/ModelInfo'}},
2213 'ModelInfoResults': {'additionalProperties': False,
2214 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
2216 'required': ['results'],
2218 'ModelMachineInfo': {'additionalProperties': False,
2219 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
2220 'has-vote': {'type': 'boolean'},
2221 'id': {'type': 'string'},
2222 'instance-id': {'type': 'string'},
2223 'status': {'type': 'string'},
2224 'wants-vote': {'type': 'boolean'}},
2227 'ModelMigrationStatus': {'additionalProperties': False,
2228 'properties': {'end': {'format': 'date-time',
2230 'start': {'format': 'date-time',
2232 'status': {'type': 'string'}},
2233 'required': ['status', 'start'],
2235 'ModelSLAInfo': {'additionalProperties': False,
2236 'properties': {'level': {'type': 'string'},
2237 'owner': {'type': 'string'}},
2238 'required': ['level', 'owner'],
2240 'ModelStatus': {'additionalProperties': False,
2241 'properties': {'application-count': {'type': 'integer'},
2242 'hosted-machine-count': {'type': 'integer'},
2243 'life': {'type': 'string'},
2244 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
2246 'model-tag': {'type': 'string'},
2247 'owner-tag': {'type': 'string'}},
2248 'required': ['model-tag',
2250 'hosted-machine-count',
2251 'application-count',
2254 'ModelStatusResults': {'additionalProperties': False,
2255 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
2257 'required': ['models'],
2259 'ModelUnsetKeys': {'additionalProperties': False,
2260 'properties': {'cloud-region': {'type': 'string'},
2261 'cloud-tag': {'type': 'string'},
2262 'keys': {'items': {'type': 'string'},
2264 'required': ['keys'],
2266 'ModelUserInfo': {'additionalProperties': False,
2267 'properties': {'access': {'type': 'string'},
2268 'display-name': {'type': 'string'},
2269 'last-connection': {'format': 'date-time',
2271 'user': {'type': 'string'}},
2272 'required': ['user',
2277 'ModifyModelAccess': {'additionalProperties': False,
2278 'properties': {'access': {'type': 'string'},
2279 'action': {'type': 'string'},
2280 'model-tag': {'type': 'string'},
2281 'user-tag': {'type': 'string'}},
2282 'required': ['user-tag',
2287 'ModifyModelAccessRequest': {'additionalProperties': False,
2288 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
2290 'required': ['changes'],
2292 'Number': {'additionalProperties': False,
2293 'properties': {'Build': {'type': 'integer'},
2294 'Major': {'type': 'integer'},
2295 'Minor': {'type': 'integer'},
2296 'Patch': {'type': 'integer'},
2297 'Tag': {'type': 'string'}},
2298 'required': ['Major',
2304 'RegionDefaults': {'additionalProperties': False,
2305 'properties': {'region-name': {'type': 'string'},
2306 'value': {'additionalProperties': True,
2308 'required': ['region-name', 'value'],
2310 'SetModelDefaults': {'additionalProperties': False,
2311 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
2313 'required': ['config'],
2315 'StringResult': {'additionalProperties': False,
2316 'properties': {'error': {'$ref': '#/definitions/Error'},
2317 'result': {'type': 'string'}},
2318 'required': ['result'],
2320 'StringResults': {'additionalProperties': False,
2321 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2323 'required': ['results'],
2325 'UnsetModelDefaults': {'additionalProperties': False,
2326 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
2328 'required': ['keys'],
2330 'UserModel': {'additionalProperties': False,
2331 'properties': {'last-connection': {'format': 'date-time',
2333 'model': {'$ref': '#/definitions/Model'}},
2334 'required': ['model', 'last-connection'],
2336 'UserModelList': {'additionalProperties': False,
2337 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
2339 'required': ['user-models'],
2341 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
2342 'Result': {'$ref': '#/definitions/ModelInfo'}},
2344 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2345 'Result': {'$ref': '#/definitions/ErrorResults'}},
2347 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/DumpModelRequest'},
2348 'Result': {'$ref': '#/definitions/StringResults'}},
2350 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2351 'Result': {'$ref': '#/definitions/MapResults'}},
2353 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
2354 'Result': {'$ref': '#/definitions/UserModelList'}},
2356 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
2358 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2359 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
2361 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2362 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
2364 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
2365 'Result': {'$ref': '#/definitions/ErrorResults'}},
2367 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
2368 'Result': {'$ref': '#/definitions/ErrorResults'}},
2370 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
2371 'Result': {'$ref': '#/definitions/ErrorResults'}},
2376 @ReturnMapping(ModelInfo
)
2377 async def CreateModel(self
, cloud_tag
, config
, credential
, name
, owner_tag
, region
):
2380 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2385 Returns -> typing.Union[_ForwardRef('Number'), _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
2387 # map input types to rpc msg
2389 msg
= dict(type='ModelManager', request
='CreateModel', version
=3, params
=_params
)
2390 _params
['cloud-tag'] = cloud_tag
2391 _params
['config'] = config
2392 _params
['credential'] = credential
2393 _params
['name'] = name
2394 _params
['owner-tag'] = owner_tag
2395 _params
['region'] = region
2396 reply
= await self
.rpc(msg
)
2401 @ReturnMapping(ErrorResults
)
2402 async def DestroyModels(self
, entities
):
2404 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2405 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2407 # map input types to rpc msg
2409 msg
= dict(type='ModelManager', request
='DestroyModels', version
=3, params
=_params
)
2410 _params
['entities'] = entities
2411 reply
= await self
.rpc(msg
)
2416 @ReturnMapping(StringResults
)
2417 async def DumpModels(self
, entities
, simplified
):
2419 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2421 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
2423 # map input types to rpc msg
2425 msg
= dict(type='ModelManager', request
='DumpModels', version
=3, params
=_params
)
2426 _params
['entities'] = entities
2427 _params
['simplified'] = simplified
2428 reply
= await self
.rpc(msg
)
2433 @ReturnMapping(MapResults
)
2434 async def DumpModelsDB(self
, entities
):
2436 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2437 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
2439 # map input types to rpc msg
2441 msg
= dict(type='ModelManager', request
='DumpModelsDB', version
=3, params
=_params
)
2442 _params
['entities'] = entities
2443 reply
= await self
.rpc(msg
)
2448 @ReturnMapping(UserModelList
)
2449 async def ListModels(self
, tag
):
2452 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
2454 # map input types to rpc msg
2456 msg
= dict(type='ModelManager', request
='ListModels', version
=3, params
=_params
)
2457 _params
['tag'] = tag
2458 reply
= await self
.rpc(msg
)
2463 @ReturnMapping(ModelDefaultsResult
)
2464 async def ModelDefaults(self
):
2467 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
2469 # map input types to rpc msg
2471 msg
= dict(type='ModelManager', request
='ModelDefaults', version
=3, params
=_params
)
2473 reply
= await self
.rpc(msg
)
2478 @ReturnMapping(ModelInfoResults
)
2479 async def ModelInfo(self
, entities
):
2481 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2482 Returns -> typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
2484 # map input types to rpc msg
2486 msg
= dict(type='ModelManager', request
='ModelInfo', version
=3, params
=_params
)
2487 _params
['entities'] = entities
2488 reply
= await self
.rpc(msg
)
2493 @ReturnMapping(ModelStatusResults
)
2494 async def ModelStatus(self
, entities
):
2496 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2497 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
2499 # map input types to rpc msg
2501 msg
= dict(type='ModelManager', request
='ModelStatus', version
=3, params
=_params
)
2502 _params
['entities'] = entities
2503 reply
= await self
.rpc(msg
)
2508 @ReturnMapping(ErrorResults
)
2509 async def ModifyModelAccess(self
, changes
):
2511 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
2512 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2514 # map input types to rpc msg
2516 msg
= dict(type='ModelManager', request
='ModifyModelAccess', version
=3, params
=_params
)
2517 _params
['changes'] = changes
2518 reply
= await self
.rpc(msg
)
2523 @ReturnMapping(ErrorResults
)
2524 async def SetModelDefaults(self
, config
):
2526 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
2527 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2529 # map input types to rpc msg
2531 msg
= dict(type='ModelManager', request
='SetModelDefaults', version
=3, params
=_params
)
2532 _params
['config'] = config
2533 reply
= await self
.rpc(msg
)
2538 @ReturnMapping(ErrorResults
)
2539 async def UnsetModelDefaults(self
, keys
):
2541 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
2542 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2544 # map input types to rpc msg
2546 msg
= dict(type='ModelManager', request
='UnsetModelDefaults', version
=3, params
=_params
)
2547 _params
['keys'] = keys
2548 reply
= await self
.rpc(msg
)
2553 class ProvisionerFacade(Type
):
2554 name
= 'Provisioner'
2556 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
2557 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2560 'required': ['servers'],
2562 'Address': {'additionalProperties': False,
2563 'properties': {'scope': {'type': 'string'},
2564 'space-name': {'type': 'string'},
2565 'type': {'type': 'string'},
2566 'value': {'type': 'string'}},
2567 'required': ['value', 'type', 'scope'],
2569 'Binary': {'additionalProperties': False,
2570 'properties': {'Arch': {'type': 'string'},
2571 'Number': {'$ref': '#/definitions/Number'},
2572 'Series': {'type': 'string'}},
2573 'required': ['Number', 'Series', 'Arch'],
2575 'BytesResult': {'additionalProperties': False,
2576 'properties': {'result': {'items': {'type': 'integer'},
2578 'required': ['result'],
2580 'CloudImageMetadata': {'additionalProperties': False,
2581 'properties': {'arch': {'type': 'string'},
2582 'image-id': {'type': 'string'},
2583 'priority': {'type': 'integer'},
2584 'region': {'type': 'string'},
2585 'root-storage-size': {'type': 'integer'},
2586 'root-storage-type': {'type': 'string'},
2587 'series': {'type': 'string'},
2588 'source': {'type': 'string'},
2589 'stream': {'type': 'string'},
2590 'version': {'type': 'string'},
2591 'virt-type': {'type': 'string'}},
2592 'required': ['image-id',
2600 'ConstraintsResult': {'additionalProperties': False,
2601 'properties': {'constraints': {'$ref': '#/definitions/Value'},
2602 'error': {'$ref': '#/definitions/Error'}},
2603 'required': ['constraints'],
2605 'ConstraintsResults': {'additionalProperties': False,
2606 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
2608 'required': ['results'],
2610 'ContainerConfig': {'additionalProperties': False,
2611 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
2612 'apt-mirror': {'type': 'string'},
2613 'apt-proxy': {'$ref': '#/definitions/Settings'},
2614 'authorized-keys': {'type': 'string'},
2615 'provider-type': {'type': 'string'},
2616 'proxy': {'$ref': '#/definitions/Settings'},
2617 'ssl-hostname-verification': {'type': 'boolean'}},
2618 'required': ['provider-type',
2620 'ssl-hostname-verification',
2626 'ContainerManagerConfig': {'additionalProperties': False,
2627 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
2629 'required': ['config'],
2631 'ContainerManagerConfigParams': {'additionalProperties': False,
2632 'properties': {'type': {'type': 'string'}},
2633 'required': ['type'],
2635 'ControllerConfigResult': {'additionalProperties': False,
2636 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2639 'required': ['config'],
2641 'DeviceBridgeInfo': {'additionalProperties': False,
2642 'properties': {'bridge-name': {'type': 'string'},
2643 'host-device-name': {'type': 'string'}},
2644 'required': ['host-device-name',
2647 'DistributionGroupResult': {'additionalProperties': False,
2648 'properties': {'error': {'$ref': '#/definitions/Error'},
2649 'result': {'items': {'type': 'string'},
2651 'required': ['result'],
2653 'DistributionGroupResults': {'additionalProperties': False,
2654 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
2656 'required': ['results'],
2658 'Entities': {'additionalProperties': False,
2659 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2661 'required': ['entities'],
2663 'Entity': {'additionalProperties': False,
2664 'properties': {'tag': {'type': 'string'}},
2665 'required': ['tag'],
2667 'EntityPassword': {'additionalProperties': False,
2668 'properties': {'password': {'type': 'string'},
2669 'tag': {'type': 'string'}},
2670 'required': ['tag', 'password'],
2672 'EntityPasswords': {'additionalProperties': False,
2673 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
2675 'required': ['changes'],
2677 'EntityStatusArgs': {'additionalProperties': False,
2678 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2681 'info': {'type': 'string'},
2682 'status': {'type': 'string'},
2683 'tag': {'type': 'string'}},
2689 'Error': {'additionalProperties': False,
2690 'properties': {'code': {'type': 'string'},
2691 'info': {'$ref': '#/definitions/ErrorInfo'},
2692 'message': {'type': 'string'}},
2693 'required': ['message', 'code'],
2695 'ErrorInfo': {'additionalProperties': False,
2696 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2697 'macaroon-path': {'type': 'string'}},
2699 'ErrorResult': {'additionalProperties': False,
2700 'properties': {'error': {'$ref': '#/definitions/Error'}},
2702 'ErrorResults': {'additionalProperties': False,
2703 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2705 'required': ['results'],
2707 'FindToolsParams': {'additionalProperties': False,
2708 'properties': {'arch': {'type': 'string'},
2709 'major': {'type': 'integer'},
2710 'minor': {'type': 'integer'},
2711 'number': {'$ref': '#/definitions/Number'},
2712 'series': {'type': 'string'}},
2713 'required': ['number',
2719 'FindToolsResult': {'additionalProperties': False,
2720 'properties': {'error': {'$ref': '#/definitions/Error'},
2721 'list': {'items': {'$ref': '#/definitions/Tools'},
2723 'required': ['list'],
2725 'HardwareCharacteristics': {'additionalProperties': False,
2726 'properties': {'arch': {'type': 'string'},
2727 'availability-zone': {'type': 'string'},
2728 'cpu-cores': {'type': 'integer'},
2729 'cpu-power': {'type': 'integer'},
2730 'mem': {'type': 'integer'},
2731 'root-disk': {'type': 'integer'},
2732 'tags': {'items': {'type': 'string'},
2735 'HostNetworkChange': {'additionalProperties': False,
2736 'properties': {'error': {'$ref': '#/definitions/Error'},
2737 'new-bridges': {'items': {'$ref': '#/definitions/DeviceBridgeInfo'},
2739 'reconfigure-delay': {'type': 'integer'}},
2740 'required': ['new-bridges',
2741 'reconfigure-delay'],
2743 'HostNetworkChangeResults': {'additionalProperties': False,
2744 'properties': {'results': {'items': {'$ref': '#/definitions/HostNetworkChange'},
2746 'required': ['results'],
2748 'HostPort': {'additionalProperties': False,
2749 'properties': {'Address': {'$ref': '#/definitions/Address'},
2750 'port': {'type': 'integer'}},
2751 'required': ['Address', 'port'],
2753 'InstanceInfo': {'additionalProperties': False,
2754 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2755 'instance-id': {'type': 'string'},
2756 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
2758 'nonce': {'type': 'string'},
2759 'tag': {'type': 'string'},
2760 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
2762 'volumes': {'items': {'$ref': '#/definitions/Volume'},
2769 'volume-attachments',
2772 'InstancesInfo': {'additionalProperties': False,
2773 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
2775 'required': ['machines'],
2777 'LifeResult': {'additionalProperties': False,
2778 'properties': {'error': {'$ref': '#/definitions/Error'},
2779 'life': {'type': 'string'}},
2780 'required': ['life'],
2782 'LifeResults': {'additionalProperties': False,
2783 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2785 'required': ['results'],
2787 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2788 'MachineContainers': {'additionalProperties': False,
2789 'properties': {'container-types': {'items': {'type': 'string'},
2791 'machine-tag': {'type': 'string'}},
2792 'required': ['machine-tag',
2795 'MachineContainersParams': {'additionalProperties': False,
2796 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
2798 'required': ['params'],
2800 'MachineNetworkConfigResult': {'additionalProperties': False,
2801 'properties': {'error': {'$ref': '#/definitions/Error'},
2802 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
2804 'required': ['info'],
2806 'MachineNetworkConfigResults': {'additionalProperties': False,
2807 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
2809 'required': ['results'],
2811 'ModelConfigResult': {'additionalProperties': False,
2812 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2815 'required': ['config'],
2817 'NetworkConfig': {'additionalProperties': False,
2818 'properties': {'address': {'type': 'string'},
2819 'cidr': {'type': 'string'},
2820 'config-type': {'type': 'string'},
2821 'device-index': {'type': 'integer'},
2822 'disabled': {'type': 'boolean'},
2823 'dns-search-domains': {'items': {'type': 'string'},
2825 'dns-servers': {'items': {'type': 'string'},
2827 'gateway-address': {'type': 'string'},
2828 'interface-name': {'type': 'string'},
2829 'interface-type': {'type': 'string'},
2830 'mac-address': {'type': 'string'},
2831 'mtu': {'type': 'integer'},
2832 'no-auto-start': {'type': 'boolean'},
2833 'parent-interface-name': {'type': 'string'},
2834 'provider-address-id': {'type': 'string'},
2835 'provider-id': {'type': 'string'},
2836 'provider-space-id': {'type': 'string'},
2837 'provider-subnet-id': {'type': 'string'},
2838 'provider-vlan-id': {'type': 'string'},
2839 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
2841 'vlan-tag': {'type': 'integer'}},
2842 'required': ['device-index',
2847 'provider-subnet-id',
2848 'provider-space-id',
2849 'provider-address-id',
2853 'parent-interface-name',
2857 'NetworkRoute': {'additionalProperties': False,
2858 'properties': {'destination-cidr': {'type': 'string'},
2859 'gateway-ip': {'type': 'string'},
2860 'metric': {'type': 'integer'}},
2861 'required': ['destination-cidr',
2865 'NotifyWatchResult': {'additionalProperties': False,
2866 'properties': {'NotifyWatcherId': {'type': 'string'},
2867 'error': {'$ref': '#/definitions/Error'}},
2868 'required': ['NotifyWatcherId'],
2870 'Number': {'additionalProperties': False,
2871 'properties': {'Build': {'type': 'integer'},
2872 'Major': {'type': 'integer'},
2873 'Minor': {'type': 'integer'},
2874 'Patch': {'type': 'integer'},
2875 'Tag': {'type': 'string'}},
2876 'required': ['Major',
2882 'ProvisioningInfo': {'additionalProperties': False,
2883 'properties': {'constraints': {'$ref': '#/definitions/Value'},
2884 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
2887 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
2889 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
2891 'jobs': {'items': {'type': 'string'},
2893 'placement': {'type': 'string'},
2894 'series': {'type': 'string'},
2895 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
2898 'tags': {'patternProperties': {'.*': {'type': 'string'}},
2900 'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachmentParams'},
2902 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
2904 'required': ['constraints',
2909 'ProvisioningInfoResult': {'additionalProperties': False,
2910 'properties': {'error': {'$ref': '#/definitions/Error'},
2911 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
2912 'required': ['result'],
2914 'ProvisioningInfoResults': {'additionalProperties': False,
2915 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
2917 'required': ['results'],
2919 'SetMachineNetworkConfig': {'additionalProperties': False,
2920 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
2922 'tag': {'type': 'string'}},
2923 'required': ['tag', 'config'],
2925 'SetStatus': {'additionalProperties': False,
2926 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
2928 'required': ['entities'],
2930 'Settings': {'additionalProperties': False,
2931 'properties': {'AutoNoProxy': {'type': 'string'},
2932 'Ftp': {'type': 'string'},
2933 'Http': {'type': 'string'},
2934 'Https': {'type': 'string'},
2935 'NoProxy': {'type': 'string'}},
2936 'required': ['Http',
2942 'StatusResult': {'additionalProperties': False,
2943 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2946 'error': {'$ref': '#/definitions/Error'},
2947 'id': {'type': 'string'},
2948 'info': {'type': 'string'},
2949 'life': {'type': 'string'},
2950 'since': {'format': 'date-time',
2952 'status': {'type': 'string'}},
2960 'StatusResults': {'additionalProperties': False,
2961 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
2963 'required': ['results'],
2965 'StringResult': {'additionalProperties': False,
2966 'properties': {'error': {'$ref': '#/definitions/Error'},
2967 'result': {'type': 'string'}},
2968 'required': ['result'],
2970 'StringResults': {'additionalProperties': False,
2971 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2973 'required': ['results'],
2975 'StringsResult': {'additionalProperties': False,
2976 'properties': {'error': {'$ref': '#/definitions/Error'},
2977 'result': {'items': {'type': 'string'},
2980 'StringsWatchResult': {'additionalProperties': False,
2981 'properties': {'changes': {'items': {'type': 'string'},
2983 'error': {'$ref': '#/definitions/Error'},
2984 'watcher-id': {'type': 'string'}},
2985 'required': ['watcher-id'],
2987 'StringsWatchResults': {'additionalProperties': False,
2988 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
2990 'required': ['results'],
2992 'Tools': {'additionalProperties': False,
2993 'properties': {'sha256': {'type': 'string'},
2994 'size': {'type': 'integer'},
2995 'url': {'type': 'string'},
2996 'version': {'$ref': '#/definitions/Binary'}},
2997 'required': ['version', 'url', 'size'],
2999 'ToolsResult': {'additionalProperties': False,
3000 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
3001 'error': {'$ref': '#/definitions/Error'},
3002 'tools': {'items': {'$ref': '#/definitions/Tools'},
3004 'required': ['tools',
3005 'disable-ssl-hostname-verification'],
3007 'ToolsResults': {'additionalProperties': False,
3008 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
3010 'required': ['results'],
3012 'UpdateBehavior': {'additionalProperties': False,
3013 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
3014 'enable-os-upgrade': {'type': 'boolean'}},
3015 'required': ['enable-os-refresh-update',
3016 'enable-os-upgrade'],
3018 'Value': {'additionalProperties': False,
3019 'properties': {'arch': {'type': 'string'},
3020 'container': {'type': 'string'},
3021 'cores': {'type': 'integer'},
3022 'cpu-power': {'type': 'integer'},
3023 'instance-type': {'type': 'string'},
3024 'mem': {'type': 'integer'},
3025 'root-disk': {'type': 'integer'},
3026 'spaces': {'items': {'type': 'string'},
3028 'tags': {'items': {'type': 'string'},
3030 'virt-type': {'type': 'string'}},
3032 'Volume': {'additionalProperties': False,
3033 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
3034 'volume-tag': {'type': 'string'}},
3035 'required': ['volume-tag', 'info'],
3037 'VolumeAttachmentInfo': {'additionalProperties': False,
3038 'properties': {'bus-address': {'type': 'string'},
3039 'device-link': {'type': 'string'},
3040 'device-name': {'type': 'string'},
3041 'read-only': {'type': 'boolean'}},
3043 'VolumeAttachmentParams': {'additionalProperties': False,
3044 'properties': {'instance-id': {'type': 'string'},
3045 'machine-tag': {'type': 'string'},
3046 'provider': {'type': 'string'},
3047 'read-only': {'type': 'boolean'},
3048 'volume-id': {'type': 'string'},
3049 'volume-tag': {'type': 'string'}},
3050 'required': ['volume-tag',
3054 'VolumeInfo': {'additionalProperties': False,
3055 'properties': {'hardware-id': {'type': 'string'},
3056 'persistent': {'type': 'boolean'},
3057 'pool': {'type': 'string'},
3058 'size': {'type': 'integer'},
3059 'volume-id': {'type': 'string'},
3060 'wwn': {'type': 'string'}},
3061 'required': ['volume-id', 'size', 'persistent'],
3063 'VolumeParams': {'additionalProperties': False,
3064 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
3065 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
3068 'provider': {'type': 'string'},
3069 'size': {'type': 'integer'},
3070 'tags': {'patternProperties': {'.*': {'type': 'string'}},
3072 'volume-tag': {'type': 'string'}},
3073 'required': ['volume-tag',
3077 'WatchContainer': {'additionalProperties': False,
3078 'properties': {'container-type': {'type': 'string'},
3079 'machine-tag': {'type': 'string'}},
3080 'required': ['machine-tag',
3083 'WatchContainers': {'additionalProperties': False,
3084 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
3086 'required': ['params'],
3088 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
3090 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
3092 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
3094 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3095 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
3097 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
3099 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
3100 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
3102 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
3104 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3105 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
3107 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3108 'Result': {'$ref': '#/definitions/ErrorResults'}},
3110 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
3111 'Result': {'$ref': '#/definitions/FindToolsResult'}},
3113 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3114 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
3116 'HostChangesForContainers': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3117 'Result': {'$ref': '#/definitions/HostNetworkChangeResults'}},
3119 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3120 'Result': {'$ref': '#/definitions/StringResults'}},
3122 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3123 'Result': {'$ref': '#/definitions/StatusResults'}},
3125 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3126 'Result': {'$ref': '#/definitions/LifeResults'}},
3128 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
3130 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3131 'Result': {'$ref': '#/definitions/ErrorResults'}},
3133 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
3135 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3137 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3138 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
3140 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3141 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
3143 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3144 'Result': {'$ref': '#/definitions/ErrorResults'}},
3146 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3147 'Result': {'$ref': '#/definitions/ErrorResults'}},
3149 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3150 'Result': {'$ref': '#/definitions/StringResults'}},
3152 'SetHostMachineNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
3154 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
3155 'Result': {'$ref': '#/definitions/ErrorResults'}},
3157 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3158 'Result': {'$ref': '#/definitions/ErrorResults'}},
3160 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
3162 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
3163 'Result': {'$ref': '#/definitions/ErrorResults'}},
3165 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3166 'Result': {'$ref': '#/definitions/ErrorResults'}},
3168 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3169 'Result': {'$ref': '#/definitions/ErrorResults'}},
3171 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
3172 'Result': {'$ref': '#/definitions/ErrorResults'}},
3174 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
3176 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3177 'Result': {'$ref': '#/definitions/StatusResults'}},
3179 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3180 'Result': {'$ref': '#/definitions/ToolsResults'}},
3182 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3183 'Result': {'$ref': '#/definitions/ErrorResults'}},
3185 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3187 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
3188 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
3190 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
3191 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
3193 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3195 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3197 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
3202 @ReturnMapping(StringsResult
)
3203 async def APIAddresses(self
):
3206 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
3208 # map input types to rpc msg
3210 msg
= dict(type='Provisioner', request
='APIAddresses', version
=3, params
=_params
)
3212 reply
= await self
.rpc(msg
)
3217 @ReturnMapping(APIHostPortsResult
)
3218 async def APIHostPorts(self
):
3221 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
3223 # map input types to rpc msg
3225 msg
= dict(type='Provisioner', request
='APIHostPorts', version
=3, params
=_params
)
3227 reply
= await self
.rpc(msg
)
3232 @ReturnMapping(BytesResult
)
3233 async def CACert(self
):
3236 Returns -> typing.Sequence<+T_co>[int]
3238 # map input types to rpc msg
3240 msg
= dict(type='Provisioner', request
='CACert', version
=3, params
=_params
)
3242 reply
= await self
.rpc(msg
)
3247 @ReturnMapping(ConstraintsResults
)
3248 async def Constraints(self
, entities
):
3250 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3251 Returns -> typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
3253 # map input types to rpc msg
3255 msg
= dict(type='Provisioner', request
='Constraints', version
=3, params
=_params
)
3256 _params
['entities'] = entities
3257 reply
= await self
.rpc(msg
)
3262 @ReturnMapping(ContainerConfig
)
3263 async def ContainerConfig(self
):
3266 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool]
3268 # map input types to rpc msg
3270 msg
= dict(type='Provisioner', request
='ContainerConfig', version
=3, params
=_params
)
3272 reply
= await self
.rpc(msg
)
3277 @ReturnMapping(ContainerManagerConfig
)
3278 async def ContainerManagerConfig(self
, type_
):
3281 Returns -> typing.Mapping<~KT, +VT_co>[str, str]
3283 # map input types to rpc msg
3285 msg
= dict(type='Provisioner', request
='ContainerManagerConfig', version
=3, params
=_params
)
3286 _params
['type'] = type_
3287 reply
= await self
.rpc(msg
)
3292 @ReturnMapping(ControllerConfigResult
)
3293 async def ControllerConfig(self
):
3296 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
3298 # map input types to rpc msg
3300 msg
= dict(type='Provisioner', request
='ControllerConfig', version
=3, params
=_params
)
3302 reply
= await self
.rpc(msg
)
3307 @ReturnMapping(DistributionGroupResults
)
3308 async def DistributionGroup(self
, entities
):
3310 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3311 Returns -> typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
3313 # map input types to rpc msg
3315 msg
= dict(type='Provisioner', request
='DistributionGroup', version
=3, params
=_params
)
3316 _params
['entities'] = entities
3317 reply
= await self
.rpc(msg
)
3322 @ReturnMapping(ErrorResults
)
3323 async def EnsureDead(self
, entities
):
3325 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3326 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3328 # map input types to rpc msg
3330 msg
= dict(type='Provisioner', request
='EnsureDead', version
=3, params
=_params
)
3331 _params
['entities'] = entities
3332 reply
= await self
.rpc(msg
)
3337 @ReturnMapping(FindToolsResult
)
3338 async def FindTools(self
, arch
, major
, minor
, number
, series
):
3345 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
3347 # map input types to rpc msg
3349 msg
= dict(type='Provisioner', request
='FindTools', version
=3, params
=_params
)
3350 _params
['arch'] = arch
3351 _params
['major'] = major
3352 _params
['minor'] = minor
3353 _params
['number'] = number
3354 _params
['series'] = series
3355 reply
= await self
.rpc(msg
)
3360 @ReturnMapping(MachineNetworkConfigResults
)
3361 async def GetContainerInterfaceInfo(self
, entities
):
3363 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3364 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
3366 # map input types to rpc msg
3368 msg
= dict(type='Provisioner', request
='GetContainerInterfaceInfo', version
=3, params
=_params
)
3369 _params
['entities'] = entities
3370 reply
= await self
.rpc(msg
)
3375 @ReturnMapping(HostNetworkChangeResults
)
3376 async def HostChangesForContainers(self
, entities
):
3378 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3379 Returns -> typing.Sequence<+T_co>[~HostNetworkChange]<~HostNetworkChange>
3381 # map input types to rpc msg
3383 msg
= dict(type='Provisioner', request
='HostChangesForContainers', version
=3, params
=_params
)
3384 _params
['entities'] = entities
3385 reply
= await self
.rpc(msg
)
3390 @ReturnMapping(StringResults
)
3391 async def InstanceId(self
, entities
):
3393 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3394 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
3396 # map input types to rpc msg
3398 msg
= dict(type='Provisioner', request
='InstanceId', version
=3, params
=_params
)
3399 _params
['entities'] = entities
3400 reply
= await self
.rpc(msg
)
3405 @ReturnMapping(StatusResults
)
3406 async def InstanceStatus(self
, entities
):
3408 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3409 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
3411 # map input types to rpc msg
3413 msg
= dict(type='Provisioner', request
='InstanceStatus', version
=3, params
=_params
)
3414 _params
['entities'] = entities
3415 reply
= await self
.rpc(msg
)
3420 @ReturnMapping(LifeResults
)
3421 async def Life(self
, entities
):
3423 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3424 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
3426 # map input types to rpc msg
3428 msg
= dict(type='Provisioner', request
='Life', version
=3, params
=_params
)
3429 _params
['entities'] = entities
3430 reply
= await self
.rpc(msg
)
3435 @ReturnMapping(StatusResults
)
3436 async def MachinesWithTransientErrors(self
):
3439 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
3441 # map input types to rpc msg
3443 msg
= dict(type='Provisioner', request
='MachinesWithTransientErrors', version
=3, params
=_params
)
3445 reply
= await self
.rpc(msg
)
3450 @ReturnMapping(ErrorResults
)
3451 async def MarkMachinesForRemoval(self
, entities
):
3453 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3454 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3456 # map input types to rpc msg
3458 msg
= dict(type='Provisioner', request
='MarkMachinesForRemoval', version
=3, params
=_params
)
3459 _params
['entities'] = entities
3460 reply
= await self
.rpc(msg
)
3465 @ReturnMapping(ModelConfigResult
)
3466 async def ModelConfig(self
):
3469 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
3471 # map input types to rpc msg
3473 msg
= dict(type='Provisioner', request
='ModelConfig', version
=3, params
=_params
)
3475 reply
= await self
.rpc(msg
)
3480 @ReturnMapping(StringResult
)
3481 async def ModelUUID(self
):
3484 Returns -> typing.Union[_ForwardRef('Error'), str]
3486 # map input types to rpc msg
3488 msg
= dict(type='Provisioner', request
='ModelUUID', version
=3, params
=_params
)
3490 reply
= await self
.rpc(msg
)
3495 @ReturnMapping(MachineNetworkConfigResults
)
3496 async def PrepareContainerInterfaceInfo(self
, entities
):
3498 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3499 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
3501 # map input types to rpc msg
3503 msg
= dict(type='Provisioner', request
='PrepareContainerInterfaceInfo', version
=3, params
=_params
)
3504 _params
['entities'] = entities
3505 reply
= await self
.rpc(msg
)
3510 @ReturnMapping(ProvisioningInfoResults
)
3511 async def ProvisioningInfo(self
, entities
):
3513 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3514 Returns -> typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
3516 # map input types to rpc msg
3518 msg
= dict(type='Provisioner', request
='ProvisioningInfo', version
=3, params
=_params
)
3519 _params
['entities'] = entities
3520 reply
= await self
.rpc(msg
)
3525 @ReturnMapping(ErrorResults
)
3526 async def ReleaseContainerAddresses(self
, entities
):
3528 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3529 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3531 # map input types to rpc msg
3533 msg
= dict(type='Provisioner', request
='ReleaseContainerAddresses', version
=3, params
=_params
)
3534 _params
['entities'] = entities
3535 reply
= await self
.rpc(msg
)
3540 @ReturnMapping(ErrorResults
)
3541 async def Remove(self
, entities
):
3543 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3544 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3546 # map input types to rpc msg
3548 msg
= dict(type='Provisioner', request
='Remove', version
=3, params
=_params
)
3549 _params
['entities'] = entities
3550 reply
= await self
.rpc(msg
)
3555 @ReturnMapping(StringResults
)
3556 async def Series(self
, entities
):
3558 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3559 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
3561 # map input types to rpc msg
3563 msg
= dict(type='Provisioner', request
='Series', version
=3, params
=_params
)
3564 _params
['entities'] = entities
3565 reply
= await self
.rpc(msg
)
3570 @ReturnMapping(None)
3571 async def SetHostMachineNetworkConfig(self
, config
, tag
):
3573 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3577 # map input types to rpc msg
3579 msg
= dict(type='Provisioner', request
='SetHostMachineNetworkConfig', version
=3, params
=_params
)
3580 _params
['config'] = config
3581 _params
['tag'] = tag
3582 reply
= await self
.rpc(msg
)
3587 @ReturnMapping(ErrorResults
)
3588 async def SetInstanceInfo(self
, machines
):
3590 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
3591 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3593 # map input types to rpc msg
3595 msg
= dict(type='Provisioner', request
='SetInstanceInfo', version
=3, params
=_params
)
3596 _params
['machines'] = machines
3597 reply
= await self
.rpc(msg
)
3602 @ReturnMapping(ErrorResults
)
3603 async def SetInstanceStatus(self
, entities
):
3605 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3606 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3608 # map input types to rpc msg
3610 msg
= dict(type='Provisioner', request
='SetInstanceStatus', version
=3, params
=_params
)
3611 _params
['entities'] = entities
3612 reply
= await self
.rpc(msg
)
3617 @ReturnMapping(None)
3618 async def SetObservedNetworkConfig(self
, config
, tag
):
3620 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3624 # map input types to rpc msg
3626 msg
= dict(type='Provisioner', request
='SetObservedNetworkConfig', version
=3, params
=_params
)
3627 _params
['config'] = config
3628 _params
['tag'] = tag
3629 reply
= await self
.rpc(msg
)
3634 @ReturnMapping(ErrorResults
)
3635 async def SetPasswords(self
, changes
):
3637 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
3638 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3640 # map input types to rpc msg
3642 msg
= dict(type='Provisioner', request
='SetPasswords', version
=3, params
=_params
)
3643 _params
['changes'] = changes
3644 reply
= await self
.rpc(msg
)
3649 @ReturnMapping(ErrorResults
)
3650 async def SetProviderNetworkConfig(self
, entities
):
3652 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3653 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3655 # map input types to rpc msg
3657 msg
= dict(type='Provisioner', request
='SetProviderNetworkConfig', version
=3, params
=_params
)
3658 _params
['entities'] = entities
3659 reply
= await self
.rpc(msg
)
3664 @ReturnMapping(ErrorResults
)
3665 async def SetStatus(self
, entities
):
3667 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3668 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3670 # map input types to rpc msg
3672 msg
= dict(type='Provisioner', request
='SetStatus', version
=3, params
=_params
)
3673 _params
['entities'] = entities
3674 reply
= await self
.rpc(msg
)
3679 @ReturnMapping(ErrorResults
)
3680 async def SetSupportedContainers(self
, params
):
3682 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
3683 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3685 # map input types to rpc msg
3687 msg
= dict(type='Provisioner', request
='SetSupportedContainers', version
=3, params
=_params
)
3688 _params
['params'] = params
3689 reply
= await self
.rpc(msg
)
3694 @ReturnMapping(StringsResult
)
3695 async def StateAddresses(self
):
3698 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
3700 # map input types to rpc msg
3702 msg
= dict(type='Provisioner', request
='StateAddresses', version
=3, params
=_params
)
3704 reply
= await self
.rpc(msg
)
3709 @ReturnMapping(StatusResults
)
3710 async def Status(self
, entities
):
3712 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3713 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
3715 # map input types to rpc msg
3717 msg
= dict(type='Provisioner', request
='Status', version
=3, params
=_params
)
3718 _params
['entities'] = entities
3719 reply
= await self
.rpc(msg
)
3724 @ReturnMapping(ToolsResults
)
3725 async def Tools(self
, entities
):
3727 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3728 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
3730 # map input types to rpc msg
3732 msg
= dict(type='Provisioner', request
='Tools', version
=3, params
=_params
)
3733 _params
['entities'] = entities
3734 reply
= await self
.rpc(msg
)
3739 @ReturnMapping(ErrorResults
)
3740 async def UpdateStatus(self
, entities
):
3742 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3743 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3745 # map input types to rpc msg
3747 msg
= dict(type='Provisioner', request
='UpdateStatus', version
=3, params
=_params
)
3748 _params
['entities'] = entities
3749 reply
= await self
.rpc(msg
)
3754 @ReturnMapping(NotifyWatchResult
)
3755 async def WatchAPIHostPorts(self
):
3758 Returns -> typing.Union[str, _ForwardRef('Error')]
3760 # map input types to rpc msg
3762 msg
= dict(type='Provisioner', request
='WatchAPIHostPorts', version
=3, params
=_params
)
3764 reply
= await self
.rpc(msg
)
3769 @ReturnMapping(StringsWatchResults
)
3770 async def WatchAllContainers(self
, params
):
3772 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
3773 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
3775 # map input types to rpc msg
3777 msg
= dict(type='Provisioner', request
='WatchAllContainers', version
=3, params
=_params
)
3778 _params
['params'] = params
3779 reply
= await self
.rpc(msg
)
3784 @ReturnMapping(StringsWatchResults
)
3785 async def WatchContainers(self
, params
):
3787 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
3788 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
3790 # map input types to rpc msg
3792 msg
= dict(type='Provisioner', request
='WatchContainers', version
=3, params
=_params
)
3793 _params
['params'] = params
3794 reply
= await self
.rpc(msg
)
3799 @ReturnMapping(NotifyWatchResult
)
3800 async def WatchForModelConfigChanges(self
):
3803 Returns -> typing.Union[str, _ForwardRef('Error')]
3805 # map input types to rpc msg
3807 msg
= dict(type='Provisioner', request
='WatchForModelConfigChanges', version
=3, params
=_params
)
3809 reply
= await self
.rpc(msg
)
3814 @ReturnMapping(NotifyWatchResult
)
3815 async def WatchMachineErrorRetry(self
):
3818 Returns -> typing.Union[str, _ForwardRef('Error')]
3820 # map input types to rpc msg
3822 msg
= dict(type='Provisioner', request
='WatchMachineErrorRetry', version
=3, params
=_params
)
3824 reply
= await self
.rpc(msg
)
3829 @ReturnMapping(StringsWatchResult
)
3830 async def WatchModelMachines(self
):
3833 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
3835 # map input types to rpc msg
3837 msg
= dict(type='Provisioner', request
='WatchModelMachines', version
=3, params
=_params
)
3839 reply
= await self
.rpc(msg
)
3844 class SpacesFacade(Type
):
3847 schema
= {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
3848 'properties': {'provider-id': {'type': 'string'},
3849 'public': {'type': 'boolean'},
3850 'space-tag': {'type': 'string'},
3851 'subnet-tags': {'items': {'type': 'string'},
3853 'required': ['subnet-tags',
3857 'CreateSpacesParams': {'additionalProperties': False,
3858 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
3860 'required': ['spaces'],
3862 'Error': {'additionalProperties': False,
3863 'properties': {'code': {'type': 'string'},
3864 'info': {'$ref': '#/definitions/ErrorInfo'},
3865 'message': {'type': 'string'}},
3866 'required': ['message', 'code'],
3868 'ErrorInfo': {'additionalProperties': False,
3869 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3870 'macaroon-path': {'type': 'string'}},
3872 'ErrorResult': {'additionalProperties': False,
3873 'properties': {'error': {'$ref': '#/definitions/Error'}},
3875 'ErrorResults': {'additionalProperties': False,
3876 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3878 'required': ['results'],
3880 'ListSpacesResults': {'additionalProperties': False,
3881 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
3883 'required': ['results'],
3885 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3886 'Space': {'additionalProperties': False,
3887 'properties': {'error': {'$ref': '#/definitions/Error'},
3888 'name': {'type': 'string'},
3889 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
3891 'required': ['name', 'subnets'],
3893 'Subnet': {'additionalProperties': False,
3894 'properties': {'cidr': {'type': 'string'},
3895 'life': {'type': 'string'},
3896 'provider-id': {'type': 'string'},
3897 'provider-network-id': {'type': 'string'},
3898 'provider-space-id': {'type': 'string'},
3899 'space-tag': {'type': 'string'},
3900 'status': {'type': 'string'},
3901 'vlan-tag': {'type': 'integer'},
3902 'zones': {'items': {'type': 'string'},
3904 'required': ['cidr',
3910 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
3911 'Result': {'$ref': '#/definitions/ErrorResults'}},
3913 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
3915 'ReloadSpaces': {'type': 'object'}},
3919 @ReturnMapping(ErrorResults
)
3920 async def CreateSpaces(self
, spaces
):
3922 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
3923 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3925 # map input types to rpc msg
3927 msg
= dict(type='Spaces', request
='CreateSpaces', version
=3, params
=_params
)
3928 _params
['spaces'] = spaces
3929 reply
= await self
.rpc(msg
)
3934 @ReturnMapping(ListSpacesResults
)
3935 async def ListSpaces(self
):
3938 Returns -> typing.Sequence<+T_co>[~Space]<~Space>
3940 # map input types to rpc msg
3942 msg
= dict(type='Spaces', request
='ListSpaces', version
=3, params
=_params
)
3944 reply
= await self
.rpc(msg
)
3949 @ReturnMapping(None)
3950 async def ReloadSpaces(self
):
3955 # map input types to rpc msg
3957 msg
= dict(type='Spaces', request
='ReloadSpaces', version
=3, params
=_params
)
3959 reply
= await self
.rpc(msg
)
3964 class StorageFacade(Type
):
3967 schema
= {'definitions': {'Entities': {'additionalProperties': False,
3968 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3970 'required': ['entities'],
3972 'Entity': {'additionalProperties': False,
3973 'properties': {'tag': {'type': 'string'}},
3974 'required': ['tag'],
3976 'EntityStatus': {'additionalProperties': False,
3977 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3980 'info': {'type': 'string'},
3981 'since': {'format': 'date-time',
3983 'status': {'type': 'string'}},
3984 'required': ['status', 'info', 'since'],
3986 'Error': {'additionalProperties': False,
3987 'properties': {'code': {'type': 'string'},
3988 'info': {'$ref': '#/definitions/ErrorInfo'},
3989 'message': {'type': 'string'}},
3990 'required': ['message', 'code'],
3992 'ErrorInfo': {'additionalProperties': False,
3993 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3994 'macaroon-path': {'type': 'string'}},
3996 'ErrorResult': {'additionalProperties': False,
3997 'properties': {'error': {'$ref': '#/definitions/Error'}},
3999 'ErrorResults': {'additionalProperties': False,
4000 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4002 'required': ['results'],
4004 'FilesystemAttachmentDetails': {'additionalProperties': False,
4005 'properties': {'FilesystemAttachmentInfo': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
4006 'life': {'type': 'string'}},
4007 'required': ['FilesystemAttachmentInfo'],
4009 'FilesystemAttachmentInfo': {'additionalProperties': False,
4010 'properties': {'mount-point': {'type': 'string'},
4011 'read-only': {'type': 'boolean'}},
4013 'FilesystemDetails': {'additionalProperties': False,
4014 'properties': {'filesystem-tag': {'type': 'string'},
4015 'info': {'$ref': '#/definitions/FilesystemInfo'},
4016 'life': {'type': 'string'},
4017 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentDetails'}},
4019 'status': {'$ref': '#/definitions/EntityStatus'},
4020 'storage': {'$ref': '#/definitions/StorageDetails'},
4021 'volume-tag': {'type': 'string'}},
4022 'required': ['filesystem-tag',
4026 'FilesystemDetailsListResult': {'additionalProperties': False,
4027 'properties': {'error': {'$ref': '#/definitions/Error'},
4028 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
4031 'FilesystemDetailsListResults': {'additionalProperties': False,
4032 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
4035 'FilesystemFilter': {'additionalProperties': False,
4036 'properties': {'machines': {'items': {'type': 'string'},
4039 'FilesystemFilters': {'additionalProperties': False,
4040 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
4043 'FilesystemInfo': {'additionalProperties': False,
4044 'properties': {'filesystem-id': {'type': 'string'},
4045 'pool': {'type': 'string'},
4046 'size': {'type': 'integer'}},
4047 'required': ['filesystem-id',
4051 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4052 'StorageAddParams': {'additionalProperties': False,
4053 'properties': {'name': {'type': 'string'},
4054 'storage': {'$ref': '#/definitions/StorageConstraints'},
4055 'unit': {'type': 'string'}},
4056 'required': ['unit', 'name', 'storage'],
4058 'StorageAttachmentDetails': {'additionalProperties': False,
4059 'properties': {'life': {'type': 'string'},
4060 'location': {'type': 'string'},
4061 'machine-tag': {'type': 'string'},
4062 'storage-tag': {'type': 'string'},
4063 'unit-tag': {'type': 'string'}},
4064 'required': ['storage-tag',
4068 'StorageAttachmentId': {'additionalProperties': False,
4069 'properties': {'storage-tag': {'type': 'string'},
4070 'unit-tag': {'type': 'string'}},
4071 'required': ['storage-tag',
4074 'StorageAttachmentIds': {'additionalProperties': False,
4075 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
4077 'required': ['ids'],
4079 'StorageConstraints': {'additionalProperties': False,
4080 'properties': {'count': {'type': 'integer'},
4081 'pool': {'type': 'string'},
4082 'size': {'type': 'integer'}},
4084 'StorageDetails': {'additionalProperties': False,
4085 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
4087 'kind': {'type': 'integer'},
4088 'life': {'type': 'string'},
4089 'owner-tag': {'type': 'string'},
4090 'persistent': {'type': 'boolean'},
4091 'status': {'$ref': '#/definitions/EntityStatus'},
4092 'storage-tag': {'type': 'string'}},
4093 'required': ['storage-tag',
4099 'StorageDetailsListResult': {'additionalProperties': False,
4100 'properties': {'error': {'$ref': '#/definitions/Error'},
4101 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
4104 'StorageDetailsListResults': {'additionalProperties': False,
4105 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
4108 'StorageDetailsResult': {'additionalProperties': False,
4109 'properties': {'error': {'$ref': '#/definitions/Error'},
4110 'result': {'$ref': '#/definitions/StorageDetails'}},
4112 'StorageDetailsResults': {'additionalProperties': False,
4113 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
4116 'StorageFilter': {'additionalProperties': False,
4118 'StorageFilters': {'additionalProperties': False,
4119 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
4122 'StoragePool': {'additionalProperties': False,
4123 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
4126 'name': {'type': 'string'},
4127 'provider': {'type': 'string'}},
4128 'required': ['name', 'provider', 'attrs'],
4130 'StoragePoolFilter': {'additionalProperties': False,
4131 'properties': {'names': {'items': {'type': 'string'},
4133 'providers': {'items': {'type': 'string'},
4136 'StoragePoolFilters': {'additionalProperties': False,
4137 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
4140 'StoragePoolsResult': {'additionalProperties': False,
4141 'properties': {'error': {'$ref': '#/definitions/Error'},
4142 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
4145 'StoragePoolsResults': {'additionalProperties': False,
4146 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
4149 'StoragesAddParams': {'additionalProperties': False,
4150 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
4152 'required': ['storages'],
4154 'VolumeAttachmentDetails': {'additionalProperties': False,
4155 'properties': {'VolumeAttachmentInfo': {'$ref': '#/definitions/VolumeAttachmentInfo'},
4156 'life': {'type': 'string'}},
4157 'required': ['VolumeAttachmentInfo'],
4159 'VolumeAttachmentInfo': {'additionalProperties': False,
4160 'properties': {'bus-address': {'type': 'string'},
4161 'device-link': {'type': 'string'},
4162 'device-name': {'type': 'string'},
4163 'read-only': {'type': 'boolean'}},
4165 'VolumeDetails': {'additionalProperties': False,
4166 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
4167 'life': {'type': 'string'},
4168 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentDetails'}},
4170 'status': {'$ref': '#/definitions/EntityStatus'},
4171 'storage': {'$ref': '#/definitions/StorageDetails'},
4172 'volume-tag': {'type': 'string'}},
4173 'required': ['volume-tag', 'info', 'status'],
4175 'VolumeDetailsListResult': {'additionalProperties': False,
4176 'properties': {'error': {'$ref': '#/definitions/Error'},
4177 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
4180 'VolumeDetailsListResults': {'additionalProperties': False,
4181 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
4184 'VolumeFilter': {'additionalProperties': False,
4185 'properties': {'machines': {'items': {'type': 'string'},
4188 'VolumeFilters': {'additionalProperties': False,
4189 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
4192 'VolumeInfo': {'additionalProperties': False,
4193 'properties': {'hardware-id': {'type': 'string'},
4194 'persistent': {'type': 'boolean'},
4195 'pool': {'type': 'string'},
4196 'size': {'type': 'integer'},
4197 'volume-id': {'type': 'string'},
4198 'wwn': {'type': 'string'}},
4199 'required': ['volume-id', 'size', 'persistent'],
4201 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
4202 'Result': {'$ref': '#/definitions/ErrorResults'}},
4204 'Attach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
4205 'Result': {'$ref': '#/definitions/ErrorResults'}},
4207 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
4209 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4210 'Result': {'$ref': '#/definitions/ErrorResults'}},
4212 'Detach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
4213 'Result': {'$ref': '#/definitions/ErrorResults'}},
4215 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
4216 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
4218 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
4219 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
4221 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
4222 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
4224 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
4225 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
4227 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4228 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
4233 @ReturnMapping(ErrorResults
)
4234 async def AddToUnit(self
, storages
):
4236 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
4237 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4239 # map input types to rpc msg
4241 msg
= dict(type='Storage', request
='AddToUnit', version
=3, params
=_params
)
4242 _params
['storages'] = storages
4243 reply
= await self
.rpc(msg
)
4248 @ReturnMapping(ErrorResults
)
4249 async def Attach(self
, ids
):
4251 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
4252 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4254 # map input types to rpc msg
4256 msg
= dict(type='Storage', request
='Attach', version
=3, params
=_params
)
4257 _params
['ids'] = ids
4258 reply
= await self
.rpc(msg
)
4263 @ReturnMapping(None)
4264 async def CreatePool(self
, attrs
, name
, provider
):
4266 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4271 # map input types to rpc msg
4273 msg
= dict(type='Storage', request
='CreatePool', version
=3, params
=_params
)
4274 _params
['attrs'] = attrs
4275 _params
['name'] = name
4276 _params
['provider'] = provider
4277 reply
= await self
.rpc(msg
)
4282 @ReturnMapping(ErrorResults
)
4283 async def Destroy(self
, entities
):
4285 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4286 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4288 # map input types to rpc msg
4290 msg
= dict(type='Storage', request
='Destroy', version
=3, params
=_params
)
4291 _params
['entities'] = entities
4292 reply
= await self
.rpc(msg
)
4297 @ReturnMapping(ErrorResults
)
4298 async def Detach(self
, ids
):
4300 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
4301 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4303 # map input types to rpc msg
4305 msg
= dict(type='Storage', request
='Detach', version
=3, params
=_params
)
4306 _params
['ids'] = ids
4307 reply
= await self
.rpc(msg
)
4312 @ReturnMapping(FilesystemDetailsListResults
)
4313 async def ListFilesystems(self
, filters
):
4315 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
4316 Returns -> typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
4318 # map input types to rpc msg
4320 msg
= dict(type='Storage', request
='ListFilesystems', version
=3, params
=_params
)
4321 _params
['filters'] = filters
4322 reply
= await self
.rpc(msg
)
4327 @ReturnMapping(StoragePoolsResults
)
4328 async def ListPools(self
, filters
):
4330 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
4331 Returns -> typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
4333 # map input types to rpc msg
4335 msg
= dict(type='Storage', request
='ListPools', version
=3, params
=_params
)
4336 _params
['filters'] = filters
4337 reply
= await self
.rpc(msg
)
4342 @ReturnMapping(StorageDetailsListResults
)
4343 async def ListStorageDetails(self
, filters
):
4345 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
4346 Returns -> typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
4348 # map input types to rpc msg
4350 msg
= dict(type='Storage', request
='ListStorageDetails', version
=3, params
=_params
)
4351 _params
['filters'] = filters
4352 reply
= await self
.rpc(msg
)
4357 @ReturnMapping(VolumeDetailsListResults
)
4358 async def ListVolumes(self
, filters
):
4360 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
4361 Returns -> typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
4363 # map input types to rpc msg
4365 msg
= dict(type='Storage', request
='ListVolumes', version
=3, params
=_params
)
4366 _params
['filters'] = filters
4367 reply
= await self
.rpc(msg
)
4372 @ReturnMapping(StorageDetailsResults
)
4373 async def StorageDetails(self
, entities
):
4375 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4376 Returns -> typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
4378 # map input types to rpc msg
4380 msg
= dict(type='Storage', request
='StorageDetails', version
=3, params
=_params
)
4381 _params
['entities'] = entities
4382 reply
= await self
.rpc(msg
)
4387 class StorageProvisionerFacade(Type
):
4388 name
= 'StorageProvisioner'
4390 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
4391 'properties': {'BusAddress': {'type': 'string'},
4392 'DeviceLinks': {'items': {'type': 'string'},
4394 'DeviceName': {'type': 'string'},
4395 'FilesystemType': {'type': 'string'},
4396 'HardwareId': {'type': 'string'},
4397 'InUse': {'type': 'boolean'},
4398 'Label': {'type': 'string'},
4399 'MountPoint': {'type': 'string'},
4400 'Size': {'type': 'integer'},
4401 'UUID': {'type': 'string'},
4402 'WWN': {'type': 'string'}},
4403 'required': ['DeviceName',
4415 'BlockDeviceResult': {'additionalProperties': False,
4416 'properties': {'error': {'$ref': '#/definitions/Error'},
4417 'result': {'$ref': '#/definitions/BlockDevice'}},
4418 'required': ['result'],
4420 'BlockDeviceResults': {'additionalProperties': False,
4421 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
4424 'Entities': {'additionalProperties': False,
4425 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
4427 'required': ['entities'],
4429 'Entity': {'additionalProperties': False,
4430 'properties': {'tag': {'type': 'string'}},
4431 'required': ['tag'],
4433 'EntityStatusArgs': {'additionalProperties': False,
4434 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
4437 'info': {'type': 'string'},
4438 'status': {'type': 'string'},
4439 'tag': {'type': 'string'}},
4445 'Error': {'additionalProperties': False,
4446 'properties': {'code': {'type': 'string'},
4447 'info': {'$ref': '#/definitions/ErrorInfo'},
4448 'message': {'type': 'string'}},
4449 'required': ['message', 'code'],
4451 'ErrorInfo': {'additionalProperties': False,
4452 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4453 'macaroon-path': {'type': 'string'}},
4455 'ErrorResult': {'additionalProperties': False,
4456 'properties': {'error': {'$ref': '#/definitions/Error'}},
4458 'ErrorResults': {'additionalProperties': False,
4459 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4461 'required': ['results'],
4463 'Filesystem': {'additionalProperties': False,
4464 'properties': {'filesystem-tag': {'type': 'string'},
4465 'info': {'$ref': '#/definitions/FilesystemInfo'},
4466 'volume-tag': {'type': 'string'}},
4467 'required': ['filesystem-tag', 'info'],
4469 'FilesystemAttachment': {'additionalProperties': False,
4470 'properties': {'filesystem-tag': {'type': 'string'},
4471 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
4472 'machine-tag': {'type': 'string'}},
4473 'required': ['filesystem-tag',
4477 'FilesystemAttachmentInfo': {'additionalProperties': False,
4478 'properties': {'mount-point': {'type': 'string'},
4479 'read-only': {'type': 'boolean'}},
4481 'FilesystemAttachmentParams': {'additionalProperties': False,
4482 'properties': {'filesystem-id': {'type': 'string'},
4483 'filesystem-tag': {'type': 'string'},
4484 'instance-id': {'type': 'string'},
4485 'machine-tag': {'type': 'string'},
4486 'mount-point': {'type': 'string'},
4487 'provider': {'type': 'string'},
4488 'read-only': {'type': 'boolean'}},
4489 'required': ['filesystem-tag',
4493 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
4494 'properties': {'error': {'$ref': '#/definitions/Error'},
4495 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
4496 'required': ['result'],
4498 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
4499 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
4502 'FilesystemAttachmentResult': {'additionalProperties': False,
4503 'properties': {'error': {'$ref': '#/definitions/Error'},
4504 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
4505 'required': ['result'],
4507 'FilesystemAttachmentResults': {'additionalProperties': False,
4508 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
4511 'FilesystemAttachments': {'additionalProperties': False,
4512 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
4514 'required': ['filesystem-attachments'],
4516 'FilesystemInfo': {'additionalProperties': False,
4517 'properties': {'filesystem-id': {'type': 'string'},
4518 'pool': {'type': 'string'},
4519 'size': {'type': 'integer'}},
4520 'required': ['filesystem-id',
4524 'FilesystemParams': {'additionalProperties': False,
4525 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
4526 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
4529 'filesystem-tag': {'type': 'string'},
4530 'provider': {'type': 'string'},
4531 'size': {'type': 'integer'},
4532 'tags': {'patternProperties': {'.*': {'type': 'string'}},
4534 'volume-tag': {'type': 'string'}},
4535 'required': ['filesystem-tag',
4539 'FilesystemParamsResult': {'additionalProperties': False,
4540 'properties': {'error': {'$ref': '#/definitions/Error'},
4541 'result': {'$ref': '#/definitions/FilesystemParams'}},
4542 'required': ['result'],
4544 'FilesystemParamsResults': {'additionalProperties': False,
4545 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
4548 'FilesystemResult': {'additionalProperties': False,
4549 'properties': {'error': {'$ref': '#/definitions/Error'},
4550 'result': {'$ref': '#/definitions/Filesystem'}},
4551 'required': ['result'],
4553 'FilesystemResults': {'additionalProperties': False,
4554 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
4557 'Filesystems': {'additionalProperties': False,
4558 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
4560 'required': ['filesystems'],
4562 'LifeResult': {'additionalProperties': False,
4563 'properties': {'error': {'$ref': '#/definitions/Error'},
4564 'life': {'type': 'string'}},
4565 'required': ['life'],
4567 'LifeResults': {'additionalProperties': False,
4568 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
4570 'required': ['results'],
4572 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4573 'MachineStorageId': {'additionalProperties': False,
4574 'properties': {'attachment-tag': {'type': 'string'},
4575 'machine-tag': {'type': 'string'}},
4576 'required': ['machine-tag',
4579 'MachineStorageIds': {'additionalProperties': False,
4580 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
4582 'required': ['ids'],
4584 'MachineStorageIdsWatchResult': {'additionalProperties': False,
4585 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
4587 'error': {'$ref': '#/definitions/Error'},
4588 'watcher-id': {'type': 'string'}},
4589 'required': ['watcher-id',
4592 'MachineStorageIdsWatchResults': {'additionalProperties': False,
4593 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
4595 'required': ['results'],
4597 'NotifyWatchResult': {'additionalProperties': False,
4598 'properties': {'NotifyWatcherId': {'type': 'string'},
4599 'error': {'$ref': '#/definitions/Error'}},
4600 'required': ['NotifyWatcherId'],
4602 'NotifyWatchResults': {'additionalProperties': False,
4603 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
4605 'required': ['results'],
4607 'SetStatus': {'additionalProperties': False,
4608 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
4610 'required': ['entities'],
4612 'StringResult': {'additionalProperties': False,
4613 'properties': {'error': {'$ref': '#/definitions/Error'},
4614 'result': {'type': 'string'}},
4615 'required': ['result'],
4617 'StringResults': {'additionalProperties': False,
4618 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
4620 'required': ['results'],
4622 'StringsWatchResult': {'additionalProperties': False,
4623 'properties': {'changes': {'items': {'type': 'string'},
4625 'error': {'$ref': '#/definitions/Error'},
4626 'watcher-id': {'type': 'string'}},
4627 'required': ['watcher-id'],
4629 'StringsWatchResults': {'additionalProperties': False,
4630 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
4632 'required': ['results'],
4634 'Volume': {'additionalProperties': False,
4635 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
4636 'volume-tag': {'type': 'string'}},
4637 'required': ['volume-tag', 'info'],
4639 'VolumeAttachment': {'additionalProperties': False,
4640 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
4641 'machine-tag': {'type': 'string'},
4642 'volume-tag': {'type': 'string'}},
4643 'required': ['volume-tag',
4647 'VolumeAttachmentInfo': {'additionalProperties': False,
4648 'properties': {'bus-address': {'type': 'string'},
4649 'device-link': {'type': 'string'},
4650 'device-name': {'type': 'string'},
4651 'read-only': {'type': 'boolean'}},
4653 'VolumeAttachmentParams': {'additionalProperties': False,
4654 'properties': {'instance-id': {'type': 'string'},
4655 'machine-tag': {'type': 'string'},
4656 'provider': {'type': 'string'},
4657 'read-only': {'type': 'boolean'},
4658 'volume-id': {'type': 'string'},
4659 'volume-tag': {'type': 'string'}},
4660 'required': ['volume-tag',
4664 'VolumeAttachmentParamsResult': {'additionalProperties': False,
4665 'properties': {'error': {'$ref': '#/definitions/Error'},
4666 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
4667 'required': ['result'],
4669 'VolumeAttachmentParamsResults': {'additionalProperties': False,
4670 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
4673 'VolumeAttachmentResult': {'additionalProperties': False,
4674 'properties': {'error': {'$ref': '#/definitions/Error'},
4675 'result': {'$ref': '#/definitions/VolumeAttachment'}},
4676 'required': ['result'],
4678 'VolumeAttachmentResults': {'additionalProperties': False,
4679 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
4682 'VolumeAttachments': {'additionalProperties': False,
4683 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
4685 'required': ['volume-attachments'],
4687 'VolumeInfo': {'additionalProperties': False,
4688 'properties': {'hardware-id': {'type': 'string'},
4689 'persistent': {'type': 'boolean'},
4690 'pool': {'type': 'string'},
4691 'size': {'type': 'integer'},
4692 'volume-id': {'type': 'string'},
4693 'wwn': {'type': 'string'}},
4694 'required': ['volume-id', 'size', 'persistent'],
4696 'VolumeParams': {'additionalProperties': False,
4697 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
4698 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
4701 'provider': {'type': 'string'},
4702 'size': {'type': 'integer'},
4703 'tags': {'patternProperties': {'.*': {'type': 'string'}},
4705 'volume-tag': {'type': 'string'}},
4706 'required': ['volume-tag',
4710 'VolumeParamsResult': {'additionalProperties': False,
4711 'properties': {'error': {'$ref': '#/definitions/Error'},
4712 'result': {'$ref': '#/definitions/VolumeParams'}},
4713 'required': ['result'],
4715 'VolumeParamsResults': {'additionalProperties': False,
4716 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
4719 'VolumeResult': {'additionalProperties': False,
4720 'properties': {'error': {'$ref': '#/definitions/Error'},
4721 'result': {'$ref': '#/definitions/Volume'}},
4722 'required': ['result'],
4724 'VolumeResults': {'additionalProperties': False,
4725 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
4728 'Volumes': {'additionalProperties': False,
4729 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
4731 'required': ['volumes'],
4733 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4734 'Result': {'$ref': '#/definitions/LifeResults'}},
4736 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4737 'Result': {'$ref': '#/definitions/ErrorResults'}},
4739 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4740 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
4742 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4743 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
4745 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4746 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
4748 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4749 'Result': {'$ref': '#/definitions/FilesystemResults'}},
4751 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4752 'Result': {'$ref': '#/definitions/StringResults'}},
4754 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4755 'Result': {'$ref': '#/definitions/LifeResults'}},
4757 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4758 'Result': {'$ref': '#/definitions/ErrorResults'}},
4760 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4761 'Result': {'$ref': '#/definitions/ErrorResults'}},
4763 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
4764 'Result': {'$ref': '#/definitions/ErrorResults'}},
4766 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
4767 'Result': {'$ref': '#/definitions/ErrorResults'}},
4769 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4770 'Result': {'$ref': '#/definitions/ErrorResults'}},
4772 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
4773 'Result': {'$ref': '#/definitions/ErrorResults'}},
4775 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
4776 'Result': {'$ref': '#/definitions/ErrorResults'}},
4778 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4779 'Result': {'$ref': '#/definitions/ErrorResults'}},
4781 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4782 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
4784 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4785 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
4787 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4788 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
4790 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4791 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
4793 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4794 'Result': {'$ref': '#/definitions/VolumeResults'}},
4796 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4797 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4799 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4800 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
4802 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4803 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4805 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4806 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4808 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4809 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
4811 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4812 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4817 @ReturnMapping(LifeResults
)
4818 async def AttachmentLife(self
, ids
):
4820 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4821 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
4823 # map input types to rpc msg
4825 msg
= dict(type='StorageProvisioner', request
='AttachmentLife', version
=3, params
=_params
)
4826 _params
['ids'] = ids
4827 reply
= await self
.rpc(msg
)
4832 @ReturnMapping(ErrorResults
)
4833 async def EnsureDead(self
, entities
):
4835 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4836 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4838 # map input types to rpc msg
4840 msg
= dict(type='StorageProvisioner', request
='EnsureDead', version
=3, params
=_params
)
4841 _params
['entities'] = entities
4842 reply
= await self
.rpc(msg
)
4847 @ReturnMapping(FilesystemAttachmentParamsResults
)
4848 async def FilesystemAttachmentParams(self
, ids
):
4850 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4851 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
4853 # map input types to rpc msg
4855 msg
= dict(type='StorageProvisioner', request
='FilesystemAttachmentParams', version
=3, params
=_params
)
4856 _params
['ids'] = ids
4857 reply
= await self
.rpc(msg
)
4862 @ReturnMapping(FilesystemAttachmentResults
)
4863 async def FilesystemAttachments(self
, ids
):
4865 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4866 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
4868 # map input types to rpc msg
4870 msg
= dict(type='StorageProvisioner', request
='FilesystemAttachments', version
=3, params
=_params
)
4871 _params
['ids'] = ids
4872 reply
= await self
.rpc(msg
)
4877 @ReturnMapping(FilesystemParamsResults
)
4878 async def FilesystemParams(self
, entities
):
4880 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4881 Returns -> typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
4883 # map input types to rpc msg
4885 msg
= dict(type='StorageProvisioner', request
='FilesystemParams', version
=3, params
=_params
)
4886 _params
['entities'] = entities
4887 reply
= await self
.rpc(msg
)
4892 @ReturnMapping(FilesystemResults
)
4893 async def Filesystems(self
, entities
):
4895 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4896 Returns -> typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
4898 # map input types to rpc msg
4900 msg
= dict(type='StorageProvisioner', request
='Filesystems', version
=3, params
=_params
)
4901 _params
['entities'] = entities
4902 reply
= await self
.rpc(msg
)
4907 @ReturnMapping(StringResults
)
4908 async def InstanceId(self
, entities
):
4910 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4911 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
4913 # map input types to rpc msg
4915 msg
= dict(type='StorageProvisioner', request
='InstanceId', version
=3, params
=_params
)
4916 _params
['entities'] = entities
4917 reply
= await self
.rpc(msg
)
4922 @ReturnMapping(LifeResults
)
4923 async def Life(self
, entities
):
4925 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4926 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
4928 # map input types to rpc msg
4930 msg
= dict(type='StorageProvisioner', request
='Life', version
=3, params
=_params
)
4931 _params
['entities'] = entities
4932 reply
= await self
.rpc(msg
)
4937 @ReturnMapping(ErrorResults
)
4938 async def Remove(self
, entities
):
4940 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4941 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4943 # map input types to rpc msg
4945 msg
= dict(type='StorageProvisioner', request
='Remove', version
=3, params
=_params
)
4946 _params
['entities'] = entities
4947 reply
= await self
.rpc(msg
)
4952 @ReturnMapping(ErrorResults
)
4953 async def RemoveAttachment(self
, ids
):
4955 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4956 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4958 # map input types to rpc msg
4960 msg
= dict(type='StorageProvisioner', request
='RemoveAttachment', version
=3, params
=_params
)
4961 _params
['ids'] = ids
4962 reply
= await self
.rpc(msg
)
4967 @ReturnMapping(ErrorResults
)
4968 async def SetFilesystemAttachmentInfo(self
, filesystem_attachments
):
4970 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
4971 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4973 # map input types to rpc msg
4975 msg
= dict(type='StorageProvisioner', request
='SetFilesystemAttachmentInfo', version
=3, params
=_params
)
4976 _params
['filesystem-attachments'] = filesystem_attachments
4977 reply
= await self
.rpc(msg
)
4982 @ReturnMapping(ErrorResults
)
4983 async def SetFilesystemInfo(self
, filesystems
):
4985 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
4986 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4988 # map input types to rpc msg
4990 msg
= dict(type='StorageProvisioner', request
='SetFilesystemInfo', version
=3, params
=_params
)
4991 _params
['filesystems'] = filesystems
4992 reply
= await self
.rpc(msg
)
4997 @ReturnMapping(ErrorResults
)
4998 async def SetStatus(self
, entities
):
5000 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
5001 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
5003 # map input types to rpc msg
5005 msg
= dict(type='StorageProvisioner', request
='SetStatus', version
=3, params
=_params
)
5006 _params
['entities'] = entities
5007 reply
= await self
.rpc(msg
)
5012 @ReturnMapping(ErrorResults
)
5013 async def SetVolumeAttachmentInfo(self
, volume_attachments
):
5015 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
5016 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
5018 # map input types to rpc msg
5020 msg
= dict(type='StorageProvisioner', request
='SetVolumeAttachmentInfo', version
=3, params
=_params
)
5021 _params
['volume-attachments'] = volume_attachments
5022 reply
= await self
.rpc(msg
)
5027 @ReturnMapping(ErrorResults
)
5028 async def SetVolumeInfo(self
, volumes
):
5030 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
5031 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
5033 # map input types to rpc msg
5035 msg
= dict(type='StorageProvisioner', request
='SetVolumeInfo', version
=3, params
=_params
)
5036 _params
['volumes'] = volumes
5037 reply
= await self
.rpc(msg
)
5042 @ReturnMapping(ErrorResults
)
5043 async def UpdateStatus(self
, entities
):
5045 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
5046 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
5048 # map input types to rpc msg
5050 msg
= dict(type='StorageProvisioner', request
='UpdateStatus', version
=3, params
=_params
)
5051 _params
['entities'] = entities
5052 reply
= await self
.rpc(msg
)
5057 @ReturnMapping(VolumeAttachmentParamsResults
)
5058 async def VolumeAttachmentParams(self
, ids
):
5060 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
5061 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
5063 # map input types to rpc msg
5065 msg
= dict(type='StorageProvisioner', request
='VolumeAttachmentParams', version
=3, params
=_params
)
5066 _params
['ids'] = ids
5067 reply
= await self
.rpc(msg
)
5072 @ReturnMapping(VolumeAttachmentResults
)
5073 async def VolumeAttachments(self
, ids
):
5075 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
5076 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
5078 # map input types to rpc msg
5080 msg
= dict(type='StorageProvisioner', request
='VolumeAttachments', version
=3, params
=_params
)
5081 _params
['ids'] = ids
5082 reply
= await self
.rpc(msg
)
5087 @ReturnMapping(BlockDeviceResults
)
5088 async def VolumeBlockDevices(self
, ids
):
5090 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
5091 Returns -> typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
5093 # map input types to rpc msg
5095 msg
= dict(type='StorageProvisioner', request
='VolumeBlockDevices', version
=3, params
=_params
)
5096 _params
['ids'] = ids
5097 reply
= await self
.rpc(msg
)
5102 @ReturnMapping(VolumeParamsResults
)
5103 async def VolumeParams(self
, entities
):
5105 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5106 Returns -> typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
5108 # map input types to rpc msg
5110 msg
= dict(type='StorageProvisioner', request
='VolumeParams', version
=3, params
=_params
)
5111 _params
['entities'] = entities
5112 reply
= await self
.rpc(msg
)
5117 @ReturnMapping(VolumeResults
)
5118 async def Volumes(self
, entities
):
5120 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5121 Returns -> typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
5123 # map input types to rpc msg
5125 msg
= dict(type='StorageProvisioner', request
='Volumes', version
=3, params
=_params
)
5126 _params
['entities'] = entities
5127 reply
= await self
.rpc(msg
)
5132 @ReturnMapping(NotifyWatchResults
)
5133 async def WatchBlockDevices(self
, entities
):
5135 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5136 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
5138 # map input types to rpc msg
5140 msg
= dict(type='StorageProvisioner', request
='WatchBlockDevices', version
=3, params
=_params
)
5141 _params
['entities'] = entities
5142 reply
= await self
.rpc(msg
)
5147 @ReturnMapping(MachineStorageIdsWatchResults
)
5148 async def WatchFilesystemAttachments(self
, entities
):
5150 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5151 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
5153 # map input types to rpc msg
5155 msg
= dict(type='StorageProvisioner', request
='WatchFilesystemAttachments', version
=3, params
=_params
)
5156 _params
['entities'] = entities
5157 reply
= await self
.rpc(msg
)
5162 @ReturnMapping(StringsWatchResults
)
5163 async def WatchFilesystems(self
, entities
):
5165 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5166 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
5168 # map input types to rpc msg
5170 msg
= dict(type='StorageProvisioner', request
='WatchFilesystems', version
=3, params
=_params
)
5171 _params
['entities'] = entities
5172 reply
= await self
.rpc(msg
)
5177 @ReturnMapping(NotifyWatchResults
)
5178 async def WatchMachines(self
, entities
):
5180 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5181 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
5183 # map input types to rpc msg
5185 msg
= dict(type='StorageProvisioner', request
='WatchMachines', version
=3, params
=_params
)
5186 _params
['entities'] = entities
5187 reply
= await self
.rpc(msg
)
5192 @ReturnMapping(MachineStorageIdsWatchResults
)
5193 async def WatchVolumeAttachments(self
, entities
):
5195 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5196 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
5198 # map input types to rpc msg
5200 msg
= dict(type='StorageProvisioner', request
='WatchVolumeAttachments', version
=3, params
=_params
)
5201 _params
['entities'] = entities
5202 reply
= await self
.rpc(msg
)
5207 @ReturnMapping(StringsWatchResults
)
5208 async def WatchVolumes(self
, entities
):
5210 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5211 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
5213 # map input types to rpc msg
5215 msg
= dict(type='StorageProvisioner', request
='WatchVolumes', version
=3, params
=_params
)
5216 _params
['entities'] = entities
5217 reply
= await self
.rpc(msg
)