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 ActionFacade(Type
):
11 schema
= {'definitions': {'Action': {'additionalProperties': False,
12 'properties': {'name': {'type': 'string'},
13 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
16 'receiver': {'type': 'string'},
17 'tag': {'type': 'string'}},
18 'required': ['tag', 'receiver', 'name'],
20 'ActionResult': {'additionalProperties': False,
21 'properties': {'action': {'$ref': '#/definitions/Action'},
22 'completed': {'format': 'date-time',
24 'enqueued': {'format': 'date-time',
26 'error': {'$ref': '#/definitions/Error'},
27 'message': {'type': 'string'},
28 'output': {'patternProperties': {'.*': {'additionalProperties': True,
31 'started': {'format': 'date-time',
33 'status': {'type': 'string'}},
35 'ActionResults': {'additionalProperties': False,
36 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
39 'ActionSpec': {'additionalProperties': False,
40 'properties': {'description': {'type': 'string'},
41 'params': {'patternProperties': {'.*': {'additionalProperties': True,
44 'required': ['description', 'params'],
46 'Actions': {'additionalProperties': False,
47 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
50 'ActionsByName': {'additionalProperties': False,
51 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
53 'error': {'$ref': '#/definitions/Error'},
54 'name': {'type': 'string'}},
56 'ActionsByNames': {'additionalProperties': False,
57 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
60 'ActionsByReceiver': {'additionalProperties': False,
61 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
63 'error': {'$ref': '#/definitions/Error'},
64 'receiver': {'type': 'string'}},
66 'ActionsByReceivers': {'additionalProperties': False,
67 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
70 'ApplicationCharmActionsResult': {'additionalProperties': False,
71 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
73 'application-tag': {'type': 'string'},
74 'error': {'$ref': '#/definitions/Error'}},
76 'ApplicationsCharmActionsResults': {'additionalProperties': False,
77 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
80 'Entities': {'additionalProperties': False,
81 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
83 'required': ['entities'],
85 'Entity': {'additionalProperties': False,
86 'properties': {'tag': {'type': 'string'}},
89 'Error': {'additionalProperties': False,
90 'properties': {'code': {'type': 'string'},
91 'info': {'$ref': '#/definitions/ErrorInfo'},
92 'message': {'type': 'string'}},
93 'required': ['message', 'code'],
95 'ErrorInfo': {'additionalProperties': False,
96 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
97 'macaroon-path': {'type': 'string'}},
99 'FindActionsByNames': {'additionalProperties': False,
100 'properties': {'names': {'items': {'type': 'string'},
103 'FindTags': {'additionalProperties': False,
104 'properties': {'prefixes': {'items': {'type': 'string'},
106 'required': ['prefixes'],
108 'FindTagsResults': {'additionalProperties': False,
109 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
112 'required': ['matches'],
114 'Macaroon': {'additionalProperties': False, 'type': 'object'},
115 'RunParams': {'additionalProperties': False,
116 'properties': {'applications': {'items': {'type': 'string'},
118 'commands': {'type': 'string'},
119 'machines': {'items': {'type': 'string'},
121 'timeout': {'type': 'integer'},
122 'units': {'items': {'type': 'string'},
124 'required': ['commands', 'timeout'],
126 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
127 'Result': {'$ref': '#/definitions/ActionResults'}},
129 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
130 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
132 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
133 'Result': {'$ref': '#/definitions/ActionResults'}},
135 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
136 'Result': {'$ref': '#/definitions/ActionResults'}},
138 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
139 'Result': {'$ref': '#/definitions/FindTagsResults'}},
141 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
142 'Result': {'$ref': '#/definitions/ActionsByNames'}},
144 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
145 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
147 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
148 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
150 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
151 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
153 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
154 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
156 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
157 'Result': {'$ref': '#/definitions/ActionResults'}},
159 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
160 'Result': {'$ref': '#/definitions/ActionResults'}},
165 @ReturnMapping(ActionResults
)
166 async def Actions(self
, entities
):
168 entities : typing.Sequence[~Entity]
169 Returns -> typing.Sequence[~ActionResult]
171 # map input types to rpc msg
173 msg
= dict(type='Action',
177 _params
['entities'] = entities
178 reply
= await self
.rpc(msg
)
183 @ReturnMapping(ApplicationsCharmActionsResults
)
184 async def ApplicationsCharmsActions(self
, entities
):
186 entities : typing.Sequence[~Entity]
187 Returns -> typing.Sequence[~ApplicationCharmActionsResult]
189 # map input types to rpc msg
191 msg
= dict(type='Action',
192 request
='ApplicationsCharmsActions',
195 _params
['entities'] = entities
196 reply
= await self
.rpc(msg
)
201 @ReturnMapping(ActionResults
)
202 async def Cancel(self
, entities
):
204 entities : typing.Sequence[~Entity]
205 Returns -> typing.Sequence[~ActionResult]
207 # map input types to rpc msg
209 msg
= dict(type='Action',
213 _params
['entities'] = entities
214 reply
= await self
.rpc(msg
)
219 @ReturnMapping(ActionResults
)
220 async def Enqueue(self
, actions
):
222 actions : typing.Sequence[~Action]
223 Returns -> typing.Sequence[~ActionResult]
225 # map input types to rpc msg
227 msg
= dict(type='Action',
231 _params
['actions'] = actions
232 reply
= await self
.rpc(msg
)
237 @ReturnMapping(FindTagsResults
)
238 async def FindActionTagsByPrefix(self
, prefixes
):
240 prefixes : typing.Sequence[str]
241 Returns -> typing.Sequence[~Entity]
243 # map input types to rpc msg
245 msg
= dict(type='Action',
246 request
='FindActionTagsByPrefix',
249 _params
['prefixes'] = prefixes
250 reply
= await self
.rpc(msg
)
255 @ReturnMapping(ActionsByNames
)
256 async def FindActionsByNames(self
, names
):
258 names : typing.Sequence[str]
259 Returns -> typing.Sequence[~ActionsByName]
261 # map input types to rpc msg
263 msg
= dict(type='Action',
264 request
='FindActionsByNames',
267 _params
['names'] = names
268 reply
= await self
.rpc(msg
)
273 @ReturnMapping(ActionsByReceivers
)
274 async def ListAll(self
, entities
):
276 entities : typing.Sequence[~Entity]
277 Returns -> typing.Sequence[~ActionsByReceiver]
279 # map input types to rpc msg
281 msg
= dict(type='Action',
285 _params
['entities'] = entities
286 reply
= await self
.rpc(msg
)
291 @ReturnMapping(ActionsByReceivers
)
292 async def ListCompleted(self
, entities
):
294 entities : typing.Sequence[~Entity]
295 Returns -> typing.Sequence[~ActionsByReceiver]
297 # map input types to rpc msg
299 msg
= dict(type='Action',
300 request
='ListCompleted',
303 _params
['entities'] = entities
304 reply
= await self
.rpc(msg
)
309 @ReturnMapping(ActionsByReceivers
)
310 async def ListPending(self
, entities
):
312 entities : typing.Sequence[~Entity]
313 Returns -> typing.Sequence[~ActionsByReceiver]
315 # map input types to rpc msg
317 msg
= dict(type='Action',
318 request
='ListPending',
321 _params
['entities'] = entities
322 reply
= await self
.rpc(msg
)
327 @ReturnMapping(ActionsByReceivers
)
328 async def ListRunning(self
, entities
):
330 entities : typing.Sequence[~Entity]
331 Returns -> typing.Sequence[~ActionsByReceiver]
333 # map input types to rpc msg
335 msg
= dict(type='Action',
336 request
='ListRunning',
339 _params
['entities'] = entities
340 reply
= await self
.rpc(msg
)
345 @ReturnMapping(ActionResults
)
346 async def Run(self
, applications
, commands
, machines
, timeout
, units
):
348 applications : typing.Sequence[str]
350 machines : typing.Sequence[str]
352 units : typing.Sequence[str]
353 Returns -> typing.Sequence[~ActionResult]
355 # map input types to rpc msg
357 msg
= dict(type='Action',
361 _params
['applications'] = applications
362 _params
['commands'] = commands
363 _params
['machines'] = machines
364 _params
['timeout'] = timeout
365 _params
['units'] = units
366 reply
= await self
.rpc(msg
)
371 @ReturnMapping(ActionResults
)
372 async def RunOnAllMachines(self
, applications
, commands
, machines
, timeout
, units
):
374 applications : typing.Sequence[str]
376 machines : typing.Sequence[str]
378 units : typing.Sequence[str]
379 Returns -> typing.Sequence[~ActionResult]
381 # map input types to rpc msg
383 msg
= dict(type='Action',
384 request
='RunOnAllMachines',
387 _params
['applications'] = applications
388 _params
['commands'] = commands
389 _params
['machines'] = machines
390 _params
['timeout'] = timeout
391 _params
['units'] = units
392 reply
= await self
.rpc(msg
)
397 class ApplicationFacade(Type
):
400 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
401 'properties': {'application': {'type': 'string'},
402 'num-units': {'type': 'integer'},
403 'placement': {'items': {'$ref': '#/definitions/Placement'},
405 'required': ['application',
409 'AddApplicationUnitsResults': {'additionalProperties': False,
410 'properties': {'units': {'items': {'type': 'string'},
412 'required': ['units'],
414 'AddRelation': {'additionalProperties': False,
415 'properties': {'endpoints': {'items': {'type': 'string'},
417 'required': ['endpoints'],
419 'AddRelationResults': {'additionalProperties': False,
420 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
422 'required': ['endpoints'],
424 'ApplicationCharmRelations': {'additionalProperties': False,
425 'properties': {'application': {'type': 'string'}},
426 'required': ['application'],
428 'ApplicationCharmRelationsResults': {'additionalProperties': False,
429 'properties': {'charm-relations': {'items': {'type': 'string'},
431 'required': ['charm-relations'],
433 'ApplicationDeploy': {'additionalProperties': False,
434 'properties': {'application': {'type': 'string'},
435 'channel': {'type': 'string'},
436 'charm-url': {'type': 'string'},
437 'config': {'patternProperties': {'.*': {'type': 'string'}},
439 'config-yaml': {'type': 'string'},
440 'constraints': {'$ref': '#/definitions/Value'},
441 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
443 'num-units': {'type': 'integer'},
444 'placement': {'items': {'$ref': '#/definitions/Placement'},
446 'resources': {'patternProperties': {'.*': {'type': 'string'}},
448 'series': {'type': 'string'},
449 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
451 'required': ['application',
459 'ApplicationDestroy': {'additionalProperties': False,
460 'properties': {'application': {'type': 'string'}},
461 'required': ['application'],
463 'ApplicationExpose': {'additionalProperties': False,
464 'properties': {'application': {'type': 'string'}},
465 'required': ['application'],
467 'ApplicationGet': {'additionalProperties': False,
468 'properties': {'application': {'type': 'string'}},
469 'required': ['application'],
471 'ApplicationGetResults': {'additionalProperties': False,
472 'properties': {'application': {'type': 'string'},
473 'charm': {'type': 'string'},
474 'config': {'patternProperties': {'.*': {'additionalProperties': True,
477 'constraints': {'$ref': '#/definitions/Value'},
478 'series': {'type': 'string'}},
479 'required': ['application',
485 'ApplicationMetricCredential': {'additionalProperties': False,
486 'properties': {'application': {'type': 'string'},
487 'metrics-credentials': {'items': {'type': 'integer'},
489 'required': ['application',
490 'metrics-credentials'],
492 'ApplicationMetricCredentials': {'additionalProperties': False,
493 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
495 'required': ['creds'],
497 'ApplicationSet': {'additionalProperties': False,
498 'properties': {'application': {'type': 'string'},
499 'options': {'patternProperties': {'.*': {'type': 'string'}},
501 'required': ['application', 'options'],
503 'ApplicationSetCharm': {'additionalProperties': False,
504 'properties': {'application': {'type': 'string'},
505 'channel': {'type': 'string'},
506 'charm-url': {'type': 'string'},
507 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
509 'config-settings-yaml': {'type': 'string'},
510 'force-series': {'type': 'boolean'},
511 'force-units': {'type': 'boolean'},
512 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
514 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
516 'required': ['application',
522 'ApplicationUnexpose': {'additionalProperties': False,
523 'properties': {'application': {'type': 'string'}},
524 'required': ['application'],
526 'ApplicationUnset': {'additionalProperties': False,
527 'properties': {'application': {'type': 'string'},
528 'options': {'items': {'type': 'string'},
530 'required': ['application', 'options'],
532 'ApplicationUpdate': {'additionalProperties': False,
533 'properties': {'application': {'type': 'string'},
534 'charm-url': {'type': 'string'},
535 'constraints': {'$ref': '#/definitions/Value'},
536 'force-charm-url': {'type': 'boolean'},
537 'force-series': {'type': 'boolean'},
538 'min-units': {'type': 'integer'},
539 'settings': {'patternProperties': {'.*': {'type': 'string'}},
541 'settings-yaml': {'type': 'string'}},
542 'required': ['application',
548 'ApplicationsDeploy': {'additionalProperties': False,
549 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
551 'required': ['applications'],
553 'CharmRelation': {'additionalProperties': False,
554 'properties': {'interface': {'type': 'string'},
555 'limit': {'type': 'integer'},
556 'name': {'type': 'string'},
557 'optional': {'type': 'boolean'},
558 'role': {'type': 'string'},
559 'scope': {'type': 'string'}},
567 'Constraints': {'additionalProperties': False,
568 'properties': {'Count': {'type': 'integer'},
569 'Pool': {'type': 'string'},
570 'Size': {'type': 'integer'}},
571 'required': ['Pool', 'Size', 'Count'],
573 'DestroyApplicationUnits': {'additionalProperties': False,
574 'properties': {'unit-names': {'items': {'type': 'string'},
576 'required': ['unit-names'],
578 'DestroyRelation': {'additionalProperties': False,
579 'properties': {'endpoints': {'items': {'type': 'string'},
581 'required': ['endpoints'],
583 'Error': {'additionalProperties': False,
584 'properties': {'code': {'type': 'string'},
585 'info': {'$ref': '#/definitions/ErrorInfo'},
586 'message': {'type': 'string'}},
587 'required': ['message', 'code'],
589 'ErrorInfo': {'additionalProperties': False,
590 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
591 'macaroon-path': {'type': 'string'}},
593 'ErrorResult': {'additionalProperties': False,
594 'properties': {'error': {'$ref': '#/definitions/Error'}},
596 'ErrorResults': {'additionalProperties': False,
597 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
599 'required': ['results'],
601 'GetApplicationConstraints': {'additionalProperties': False,
602 'properties': {'application': {'type': 'string'}},
603 'required': ['application'],
605 'GetConstraintsResults': {'additionalProperties': False,
606 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
607 'required': ['constraints'],
609 'Macaroon': {'additionalProperties': False, 'type': 'object'},
610 'Placement': {'additionalProperties': False,
611 'properties': {'directive': {'type': 'string'},
612 'scope': {'type': 'string'}},
613 'required': ['scope', 'directive'],
615 'SetConstraints': {'additionalProperties': False,
616 'properties': {'application': {'type': 'string'},
617 'constraints': {'$ref': '#/definitions/Value'}},
618 'required': ['application', 'constraints'],
620 'StorageConstraints': {'additionalProperties': False,
621 'properties': {'count': {'type': 'integer'},
622 'pool': {'type': 'string'},
623 'size': {'type': 'integer'}},
625 'StringResult': {'additionalProperties': False,
626 'properties': {'error': {'$ref': '#/definitions/Error'},
627 'result': {'type': 'string'}},
628 'required': ['result'],
630 'Value': {'additionalProperties': False,
631 'properties': {'arch': {'type': 'string'},
632 'container': {'type': 'string'},
633 'cores': {'type': 'integer'},
634 'cpu-power': {'type': 'integer'},
635 'instance-type': {'type': 'string'},
636 'mem': {'type': 'integer'},
637 'root-disk': {'type': 'integer'},
638 'spaces': {'items': {'type': 'string'},
640 'tags': {'items': {'type': 'string'},
642 'virt-type': {'type': 'string'}},
644 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
645 'Result': {'$ref': '#/definitions/AddRelationResults'}},
647 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
648 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
650 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
651 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
653 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
654 'Result': {'$ref': '#/definitions/ErrorResults'}},
656 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
658 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
660 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
662 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
664 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
665 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
667 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
668 'Result': {'$ref': '#/definitions/StringResult'}},
670 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
671 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
673 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
675 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
677 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
679 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
680 'Result': {'$ref': '#/definitions/ErrorResults'}},
682 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
684 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
686 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
691 @ReturnMapping(AddRelationResults
)
692 async def AddRelation(self
, endpoints
):
694 endpoints : typing.Sequence[str]
695 Returns -> typing.Mapping[str, ~CharmRelation]
697 # map input types to rpc msg
699 msg
= dict(type='Application',
700 request
='AddRelation',
703 _params
['endpoints'] = endpoints
704 reply
= await self
.rpc(msg
)
709 @ReturnMapping(AddApplicationUnitsResults
)
710 async def AddUnits(self
, application
, num_units
, placement
):
714 placement : typing.Sequence[~Placement]
715 Returns -> typing.Sequence[str]
717 # map input types to rpc msg
719 msg
= dict(type='Application',
723 _params
['application'] = application
724 _params
['num-units'] = num_units
725 _params
['placement'] = placement
726 reply
= await self
.rpc(msg
)
731 @ReturnMapping(ApplicationCharmRelationsResults
)
732 async def CharmRelations(self
, application
):
735 Returns -> typing.Sequence[str]
737 # map input types to rpc msg
739 msg
= dict(type='Application',
740 request
='CharmRelations',
743 _params
['application'] = application
744 reply
= await self
.rpc(msg
)
749 @ReturnMapping(ErrorResults
)
750 async def Deploy(self
, applications
):
752 applications : typing.Sequence[~ApplicationDeploy]
753 Returns -> typing.Sequence[~ErrorResult]
755 # map input types to rpc msg
757 msg
= dict(type='Application',
761 _params
['applications'] = applications
762 reply
= await self
.rpc(msg
)
768 async def Destroy(self
, application
):
773 # map input types to rpc msg
775 msg
= dict(type='Application',
779 _params
['application'] = application
780 reply
= await self
.rpc(msg
)
786 async def DestroyRelation(self
, endpoints
):
788 endpoints : typing.Sequence[str]
791 # map input types to rpc msg
793 msg
= dict(type='Application',
794 request
='DestroyRelation',
797 _params
['endpoints'] = endpoints
798 reply
= await self
.rpc(msg
)
804 async def DestroyUnits(self
, unit_names
):
806 unit_names : typing.Sequence[str]
809 # map input types to rpc msg
811 msg
= dict(type='Application',
812 request
='DestroyUnits',
815 _params
['unit-names'] = unit_names
816 reply
= await self
.rpc(msg
)
822 async def Expose(self
, application
):
827 # map input types to rpc msg
829 msg
= dict(type='Application',
833 _params
['application'] = application
834 reply
= await self
.rpc(msg
)
839 @ReturnMapping(ApplicationGetResults
)
840 async def Get(self
, application
):
843 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
845 # map input types to rpc msg
847 msg
= dict(type='Application',
851 _params
['application'] = application
852 reply
= await self
.rpc(msg
)
857 @ReturnMapping(StringResult
)
858 async def GetCharmURL(self
, application
):
861 Returns -> typing.Union[_ForwardRef('Error'), str]
863 # map input types to rpc msg
865 msg
= dict(type='Application',
866 request
='GetCharmURL',
869 _params
['application'] = application
870 reply
= await self
.rpc(msg
)
875 @ReturnMapping(GetConstraintsResults
)
876 async def GetConstraints(self
, application
):
881 # map input types to rpc msg
883 msg
= dict(type='Application',
884 request
='GetConstraints',
887 _params
['application'] = application
888 reply
= await self
.rpc(msg
)
894 async def Set(self
, application
, options
):
897 options : typing.Mapping[str, str]
900 # map input types to rpc msg
902 msg
= dict(type='Application',
906 _params
['application'] = application
907 _params
['options'] = options
908 reply
= await self
.rpc(msg
)
914 async def SetCharm(self
, application
, channel
, charm_url
, config_settings
, config_settings_yaml
, force_series
, force_units
, resource_ids
, storage_constraints
):
919 config_settings : typing.Mapping[str, str]
920 config_settings_yaml : str
923 resource_ids : typing.Mapping[str, str]
924 storage_constraints : typing.Mapping[str, ~StorageConstraints]
927 # map input types to rpc msg
929 msg
= dict(type='Application',
933 _params
['application'] = application
934 _params
['channel'] = channel
935 _params
['charm-url'] = charm_url
936 _params
['config-settings'] = config_settings
937 _params
['config-settings-yaml'] = config_settings_yaml
938 _params
['force-series'] = force_series
939 _params
['force-units'] = force_units
940 _params
['resource-ids'] = resource_ids
941 _params
['storage-constraints'] = storage_constraints
942 reply
= await self
.rpc(msg
)
948 async def SetConstraints(self
, application
, constraints
):
954 # map input types to rpc msg
956 msg
= dict(type='Application',
957 request
='SetConstraints',
960 _params
['application'] = application
961 _params
['constraints'] = constraints
962 reply
= await self
.rpc(msg
)
967 @ReturnMapping(ErrorResults
)
968 async def SetMetricCredentials(self
, creds
):
970 creds : typing.Sequence[~ApplicationMetricCredential]
971 Returns -> typing.Sequence[~ErrorResult]
973 # map input types to rpc msg
975 msg
= dict(type='Application',
976 request
='SetMetricCredentials',
979 _params
['creds'] = creds
980 reply
= await self
.rpc(msg
)
986 async def Unexpose(self
, application
):
991 # map input types to rpc msg
993 msg
= dict(type='Application',
997 _params
['application'] = application
998 reply
= await self
.rpc(msg
)
1003 @ReturnMapping(None)
1004 async def Unset(self
, application
, options
):
1007 options : typing.Sequence[str]
1010 # map input types to rpc msg
1012 msg
= dict(type='Application',
1016 _params
['application'] = application
1017 _params
['options'] = options
1018 reply
= await self
.rpc(msg
)
1023 @ReturnMapping(None)
1024 async def Update(self
, application
, charm_url
, constraints
, force_charm_url
, force_series
, min_units
, settings
, settings_yaml
):
1029 force_charm_url : bool
1032 settings : typing.Mapping[str, str]
1036 # map input types to rpc msg
1038 msg
= dict(type='Application',
1042 _params
['application'] = application
1043 _params
['charm-url'] = charm_url
1044 _params
['constraints'] = constraints
1045 _params
['force-charm-url'] = force_charm_url
1046 _params
['force-series'] = force_series
1047 _params
['min-units'] = min_units
1048 _params
['settings'] = settings
1049 _params
['settings-yaml'] = settings_yaml
1050 reply
= await self
.rpc(msg
)
1055 class CloudFacade(Type
):
1058 schema
= {'definitions': {'AddCloudArgs': {'additionalProperties': False,
1059 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
1060 'name': {'type': 'string'}},
1061 'required': ['cloud', 'name'],
1063 'Cloud': {'additionalProperties': False,
1064 'properties': {'auth-types': {'items': {'type': 'string'},
1066 'ca-certificates': {'items': {'type': 'string'},
1068 'endpoint': {'type': 'string'},
1069 'identity-endpoint': {'type': 'string'},
1070 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
1072 'storage-endpoint': {'type': 'string'},
1073 'type': {'type': 'string'}},
1074 'required': ['type'],
1076 'CloudCredential': {'additionalProperties': False,
1077 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1079 'auth-type': {'type': 'string'},
1080 'redacted': {'items': {'type': 'string'},
1082 'required': ['auth-type'],
1084 'CloudCredentialArg': {'additionalProperties': False,
1085 'properties': {'cloud-name': {'type': 'string'},
1086 'credential-name': {'type': 'string'}},
1087 'required': ['cloud-name',
1090 'CloudCredentialArgs': {'additionalProperties': False,
1091 'properties': {'credentials': {'items': {'$ref': '#/definitions/CloudCredentialArg'},
1093 'include-secrets': {'type': 'boolean'}},
1094 'required': ['include-secrets'],
1096 'CloudCredentialResult': {'additionalProperties': False,
1097 'properties': {'error': {'$ref': '#/definitions/Error'},
1098 'result': {'$ref': '#/definitions/CloudCredential'}},
1100 'CloudCredentialResults': {'additionalProperties': False,
1101 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
1104 'CloudDetails': {'additionalProperties': False,
1105 'properties': {'auth-types': {'items': {'type': 'string'},
1107 'endpoint': {'type': 'string'},
1108 'identity-endpoint': {'type': 'string'},
1109 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
1111 'storage-endpoint': {'type': 'string'},
1112 'type': {'type': 'string'}},
1113 'required': ['type'],
1115 'CloudInfo': {'additionalProperties': False,
1116 'properties': {'CloudDetails': {'$ref': '#/definitions/CloudDetails'},
1117 'users': {'items': {'$ref': '#/definitions/CloudUserInfo'},
1119 'required': ['CloudDetails', 'users'],
1121 'CloudInfoResult': {'additionalProperties': False,
1122 'properties': {'error': {'$ref': '#/definitions/Error'},
1123 'result': {'$ref': '#/definitions/CloudInfo'}},
1125 'CloudInfoResults': {'additionalProperties': False,
1126 'properties': {'results': {'items': {'$ref': '#/definitions/CloudInfoResult'},
1128 'required': ['results'],
1130 'CloudInstanceTypesConstraint': {'additionalProperties': False,
1131 'properties': {'cloud-tag': {'type': 'string'},
1132 'constraints': {'$ref': '#/definitions/Value'},
1133 'region': {'type': 'string'}},
1134 'required': ['cloud-tag',
1137 'CloudInstanceTypesConstraints': {'additionalProperties': False,
1138 'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'},
1140 'required': ['constraints'],
1142 'CloudRegion': {'additionalProperties': False,
1143 'properties': {'endpoint': {'type': 'string'},
1144 'identity-endpoint': {'type': 'string'},
1145 'name': {'type': 'string'},
1146 'storage-endpoint': {'type': 'string'}},
1147 'required': ['name'],
1149 'CloudResult': {'additionalProperties': False,
1150 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
1151 'error': {'$ref': '#/definitions/Error'}},
1153 'CloudResults': {'additionalProperties': False,
1154 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
1157 'CloudUserInfo': {'additionalProperties': False,
1158 'properties': {'access': {'type': 'string'},
1159 'display-name': {'type': 'string'},
1160 'user': {'type': 'string'}},
1161 'required': ['user',
1165 'CloudsResult': {'additionalProperties': False,
1166 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
1169 'ControllerCredentialInfo': {'additionalProperties': False,
1170 'properties': {'content': {'$ref': '#/definitions/CredentialContent'},
1171 'models': {'items': {'$ref': '#/definitions/ModelAccess'},
1174 'CredentialContent': {'additionalProperties': False,
1175 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1177 'auth-type': {'type': 'string'},
1178 'cloud': {'type': 'string'},
1179 'name': {'type': 'string'}},
1180 'required': ['name',
1184 'CredentialContentResult': {'additionalProperties': False,
1185 'properties': {'error': {'$ref': '#/definitions/Error'},
1186 'result': {'$ref': '#/definitions/ControllerCredentialInfo'}},
1188 'CredentialContentResults': {'additionalProperties': False,
1189 'properties': {'results': {'items': {'$ref': '#/definitions/CredentialContentResult'},
1192 'Entities': {'additionalProperties': False,
1193 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1195 'required': ['entities'],
1197 'Entity': {'additionalProperties': False,
1198 'properties': {'tag': {'type': 'string'}},
1199 'required': ['tag'],
1201 'Error': {'additionalProperties': False,
1202 'properties': {'code': {'type': 'string'},
1203 'info': {'$ref': '#/definitions/ErrorInfo'},
1204 'message': {'type': 'string'}},
1205 'required': ['message', 'code'],
1207 'ErrorInfo': {'additionalProperties': False,
1208 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1209 'macaroon-path': {'type': 'string'}},
1211 'ErrorResult': {'additionalProperties': False,
1212 'properties': {'error': {'$ref': '#/definitions/Error'}},
1214 'ErrorResults': {'additionalProperties': False,
1215 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1217 'required': ['results'],
1219 'InstanceType': {'additionalProperties': False,
1220 'properties': {'arches': {'items': {'type': 'string'},
1222 'cost': {'type': 'integer'},
1223 'cpu-cores': {'type': 'integer'},
1224 'deprecated': {'type': 'boolean'},
1225 'memory': {'type': 'integer'},
1226 'name': {'type': 'string'},
1227 'root-disk': {'type': 'integer'},
1228 'virt-type': {'type': 'string'}},
1229 'required': ['arches', 'cpu-cores', 'memory'],
1231 'InstanceTypesResult': {'additionalProperties': False,
1232 'properties': {'cost-currency': {'type': 'string'},
1233 'cost-divisor': {'type': 'integer'},
1234 'cost-unit': {'type': 'string'},
1235 'error': {'$ref': '#/definitions/Error'},
1236 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
1239 'InstanceTypesResults': {'additionalProperties': False,
1240 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
1242 'required': ['results'],
1244 'ListCloudInfo': {'additionalProperties': False,
1245 'properties': {'CloudDetails': {'$ref': '#/definitions/CloudDetails'},
1246 'user-access': {'type': 'string'}},
1247 'required': ['CloudDetails', 'user-access'],
1249 'ListCloudInfoResult': {'additionalProperties': False,
1250 'properties': {'error': {'$ref': '#/definitions/Error'},
1251 'result': {'$ref': '#/definitions/ListCloudInfo'}},
1253 'ListCloudInfoResults': {'additionalProperties': False,
1254 'properties': {'results': {'items': {'$ref': '#/definitions/ListCloudInfoResult'},
1256 'required': ['results'],
1258 'ListCloudsRequest': {'additionalProperties': False,
1259 'properties': {'all': {'type': 'boolean'},
1260 'user-tag': {'type': 'string'}},
1261 'required': ['user-tag'],
1263 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1264 'ModelAccess': {'additionalProperties': False,
1265 'properties': {'access': {'type': 'string'},
1266 'model': {'type': 'string'}},
1268 'ModifyCloudAccess': {'additionalProperties': False,
1269 'properties': {'access': {'type': 'string'},
1270 'action': {'type': 'string'},
1271 'cloud-tag': {'type': 'string'},
1272 'user-tag': {'type': 'string'}},
1273 'required': ['user-tag',
1278 'ModifyCloudAccessRequest': {'additionalProperties': False,
1279 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyCloudAccess'},
1281 'required': ['changes'],
1283 'RevokeCredentialArg': {'additionalProperties': False,
1284 'properties': {'force': {'type': 'boolean'},
1285 'tag': {'type': 'string'}},
1286 'required': ['tag', 'force'],
1288 'RevokeCredentialArgs': {'additionalProperties': False,
1289 'properties': {'credentials': {'items': {'$ref': '#/definitions/RevokeCredentialArg'},
1291 'required': ['credentials'],
1293 'StringResult': {'additionalProperties': False,
1294 'properties': {'error': {'$ref': '#/definitions/Error'},
1295 'result': {'type': 'string'}},
1296 'required': ['result'],
1298 'StringsResult': {'additionalProperties': False,
1299 'properties': {'error': {'$ref': '#/definitions/Error'},
1300 'result': {'items': {'type': 'string'},
1303 'StringsResults': {'additionalProperties': False,
1304 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1306 'required': ['results'],
1308 'TaggedCredential': {'additionalProperties': False,
1309 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
1310 'tag': {'type': 'string'}},
1311 'required': ['tag', 'credential'],
1313 'TaggedCredentials': {'additionalProperties': False,
1314 'properties': {'credentials': {'items': {'$ref': '#/definitions/TaggedCredential'},
1317 'UpdateCredentialArgs': {'additionalProperties': False,
1318 'properties': {'credentials': {'items': {'$ref': '#/definitions/TaggedCredential'},
1320 'force': {'type': 'boolean'}},
1321 'required': ['credentials', 'force'],
1323 'UpdateCredentialModelResult': {'additionalProperties': False,
1324 'properties': {'errors': {'items': {'$ref': '#/definitions/ErrorResult'},
1326 'name': {'type': 'string'},
1327 'uuid': {'type': 'string'}},
1328 'required': ['uuid', 'name'],
1330 'UpdateCredentialResult': {'additionalProperties': False,
1331 'properties': {'error': {'$ref': '#/definitions/Error'},
1332 'models': {'items': {'$ref': '#/definitions/UpdateCredentialModelResult'},
1334 'tag': {'type': 'string'}},
1335 'required': ['tag'],
1337 'UpdateCredentialResults': {'additionalProperties': False,
1338 'properties': {'results': {'items': {'$ref': '#/definitions/UpdateCredentialResult'},
1341 'UserCloud': {'additionalProperties': False,
1342 'properties': {'cloud-tag': {'type': 'string'},
1343 'user-tag': {'type': 'string'}},
1344 'required': ['user-tag', 'cloud-tag'],
1346 'UserClouds': {'additionalProperties': False,
1347 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
1350 'Value': {'additionalProperties': False,
1351 'properties': {'arch': {'type': 'string'},
1352 'container': {'type': 'string'},
1353 'cores': {'type': 'integer'},
1354 'cpu-power': {'type': 'integer'},
1355 'instance-type': {'type': 'string'},
1356 'mem': {'type': 'integer'},
1357 'root-disk': {'type': 'integer'},
1358 'spaces': {'items': {'type': 'string'},
1360 'tags': {'items': {'type': 'string'},
1362 'virt-type': {'type': 'string'},
1363 'zones': {'items': {'type': 'string'},
1366 'properties': {'AddCloud': {'properties': {'Params': {'$ref': '#/definitions/AddCloudArgs'}},
1368 'AddCredentials': {'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'},
1369 'Result': {'$ref': '#/definitions/ErrorResults'}},
1371 'CheckCredentialsModels': {'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'},
1372 'Result': {'$ref': '#/definitions/UpdateCredentialResults'}},
1374 'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1375 'Result': {'$ref': '#/definitions/CloudResults'}},
1377 'CloudInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1378 'Result': {'$ref': '#/definitions/CloudInfoResults'}},
1380 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
1382 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1383 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
1385 'CredentialContents': {'properties': {'Params': {'$ref': '#/definitions/CloudCredentialArgs'},
1386 'Result': {'$ref': '#/definitions/CredentialContentResults'}},
1388 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1390 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
1391 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
1393 'ListCloudInfo': {'properties': {'Params': {'$ref': '#/definitions/ListCloudsRequest'},
1394 'Result': {'$ref': '#/definitions/ListCloudInfoResults'}},
1396 'ModifyCloudAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyCloudAccessRequest'},
1397 'Result': {'$ref': '#/definitions/ErrorResults'}},
1399 'RemoveClouds': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1400 'Result': {'$ref': '#/definitions/ErrorResults'}},
1402 'RevokeCredentialsCheckModels': {'properties': {'Params': {'$ref': '#/definitions/RevokeCredentialArgs'},
1403 'Result': {'$ref': '#/definitions/ErrorResults'}},
1405 'UpdateCredentialsCheckModels': {'properties': {'Params': {'$ref': '#/definitions/UpdateCredentialArgs'},
1406 'Result': {'$ref': '#/definitions/UpdateCredentialResults'}},
1408 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
1409 'Result': {'$ref': '#/definitions/StringsResults'}},
1414 @ReturnMapping(None)
1415 async def AddCloud(self
, cloud
, name
):
1421 # map input types to rpc msg
1423 msg
= dict(type='Cloud',
1427 _params
['cloud'] = cloud
1428 _params
['name'] = name
1429 reply
= await self
.rpc(msg
)
1434 @ReturnMapping(ErrorResults
)
1435 async def AddCredentials(self
, credentials
):
1437 credentials : typing.Sequence[~TaggedCredential]
1438 Returns -> typing.Sequence[~ErrorResult]
1440 # map input types to rpc msg
1442 msg
= dict(type='Cloud',
1443 request
='AddCredentials',
1446 _params
['credentials'] = credentials
1447 reply
= await self
.rpc(msg
)
1452 @ReturnMapping(UpdateCredentialResults
)
1453 async def CheckCredentialsModels(self
, credentials
):
1455 credentials : typing.Sequence[~TaggedCredential]
1456 Returns -> typing.Sequence[~UpdateCredentialResult]
1458 # map input types to rpc msg
1460 msg
= dict(type='Cloud',
1461 request
='CheckCredentialsModels',
1464 _params
['credentials'] = credentials
1465 reply
= await self
.rpc(msg
)
1470 @ReturnMapping(CloudResults
)
1471 async def Cloud(self
, entities
):
1473 entities : typing.Sequence[~Entity]
1474 Returns -> typing.Sequence[~CloudResult]
1476 # map input types to rpc msg
1478 msg
= dict(type='Cloud',
1482 _params
['entities'] = entities
1483 reply
= await self
.rpc(msg
)
1488 @ReturnMapping(CloudInfoResults
)
1489 async def CloudInfo(self
, entities
):
1491 entities : typing.Sequence[~Entity]
1492 Returns -> typing.Sequence[~CloudInfoResult]
1494 # map input types to rpc msg
1496 msg
= dict(type='Cloud',
1497 request
='CloudInfo',
1500 _params
['entities'] = entities
1501 reply
= await self
.rpc(msg
)
1506 @ReturnMapping(CloudsResult
)
1507 async def Clouds(self
):
1510 Returns -> typing.Mapping[str, ~Cloud]
1512 # map input types to rpc msg
1514 msg
= dict(type='Cloud',
1519 reply
= await self
.rpc(msg
)
1524 @ReturnMapping(CloudCredentialResults
)
1525 async def Credential(self
, entities
):
1527 entities : typing.Sequence[~Entity]
1528 Returns -> typing.Sequence[~CloudCredentialResult]
1530 # map input types to rpc msg
1532 msg
= dict(type='Cloud',
1533 request
='Credential',
1536 _params
['entities'] = entities
1537 reply
= await self
.rpc(msg
)
1542 @ReturnMapping(CredentialContentResults
)
1543 async def CredentialContents(self
, credentials
, include_secrets
):
1545 credentials : typing.Sequence[~CloudCredentialArg]
1546 include_secrets : bool
1547 Returns -> typing.Sequence[~CredentialContentResult]
1549 # map input types to rpc msg
1551 msg
= dict(type='Cloud',
1552 request
='CredentialContents',
1555 _params
['credentials'] = credentials
1556 _params
['include-secrets'] = include_secrets
1557 reply
= await self
.rpc(msg
)
1562 @ReturnMapping(StringResult
)
1563 async def DefaultCloud(self
):
1566 Returns -> typing.Union[_ForwardRef('Error'), str]
1568 # map input types to rpc msg
1570 msg
= dict(type='Cloud',
1571 request
='DefaultCloud',
1575 reply
= await self
.rpc(msg
)
1580 @ReturnMapping(InstanceTypesResults
)
1581 async def InstanceTypes(self
, constraints
):
1583 constraints : typing.Sequence[~CloudInstanceTypesConstraint]
1584 Returns -> typing.Sequence[~InstanceTypesResult]
1586 # map input types to rpc msg
1588 msg
= dict(type='Cloud',
1589 request
='InstanceTypes',
1592 _params
['constraints'] = constraints
1593 reply
= await self
.rpc(msg
)
1598 @ReturnMapping(ListCloudInfoResults
)
1599 async def ListCloudInfo(self
, all_
, user_tag
):
1603 Returns -> typing.Sequence[~ListCloudInfoResult]
1605 # map input types to rpc msg
1607 msg
= dict(type='Cloud',
1608 request
='ListCloudInfo',
1611 _params
['all'] = all_
1612 _params
['user-tag'] = user_tag
1613 reply
= await self
.rpc(msg
)
1618 @ReturnMapping(ErrorResults
)
1619 async def ModifyCloudAccess(self
, changes
):
1621 changes : typing.Sequence[~ModifyCloudAccess]
1622 Returns -> typing.Sequence[~ErrorResult]
1624 # map input types to rpc msg
1626 msg
= dict(type='Cloud',
1627 request
='ModifyCloudAccess',
1630 _params
['changes'] = changes
1631 reply
= await self
.rpc(msg
)
1636 @ReturnMapping(ErrorResults
)
1637 async def RemoveClouds(self
, entities
):
1639 entities : typing.Sequence[~Entity]
1640 Returns -> typing.Sequence[~ErrorResult]
1642 # map input types to rpc msg
1644 msg
= dict(type='Cloud',
1645 request
='RemoveClouds',
1648 _params
['entities'] = entities
1649 reply
= await self
.rpc(msg
)
1654 @ReturnMapping(ErrorResults
)
1655 async def RevokeCredentialsCheckModels(self
, credentials
):
1657 credentials : typing.Sequence[~RevokeCredentialArg]
1658 Returns -> typing.Sequence[~ErrorResult]
1660 # map input types to rpc msg
1662 msg
= dict(type='Cloud',
1663 request
='RevokeCredentialsCheckModels',
1666 _params
['credentials'] = credentials
1667 reply
= await self
.rpc(msg
)
1672 @ReturnMapping(UpdateCredentialResults
)
1673 async def UpdateCredentialsCheckModels(self
, credentials
, force
):
1675 credentials : typing.Sequence[~TaggedCredential]
1677 Returns -> typing.Sequence[~UpdateCredentialResult]
1679 # map input types to rpc msg
1681 msg
= dict(type='Cloud',
1682 request
='UpdateCredentialsCheckModels',
1685 _params
['credentials'] = credentials
1686 _params
['force'] = force
1687 reply
= await self
.rpc(msg
)
1692 @ReturnMapping(StringsResults
)
1693 async def UserCredentials(self
, user_clouds
):
1695 user_clouds : typing.Sequence[~UserCloud]
1696 Returns -> typing.Sequence[~StringsResult]
1698 # map input types to rpc msg
1700 msg
= dict(type='Cloud',
1701 request
='UserCredentials',
1704 _params
['user-clouds'] = user_clouds
1705 reply
= await self
.rpc(msg
)
1710 class ControllerFacade(Type
):
1713 schema
= {'definitions': {'AllWatcherId': {'additionalProperties': False,
1714 'properties': {'watcher-id': {'type': 'string'}},
1715 'required': ['watcher-id'],
1717 'CloudCredential': {'additionalProperties': False,
1718 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1720 'auth-type': {'type': 'string'},
1721 'redacted': {'items': {'type': 'string'},
1723 'required': ['auth-type'],
1725 'CloudSpec': {'additionalProperties': False,
1726 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
1727 'endpoint': {'type': 'string'},
1728 'identity-endpoint': {'type': 'string'},
1729 'name': {'type': 'string'},
1730 'region': {'type': 'string'},
1731 'storage-endpoint': {'type': 'string'},
1732 'type': {'type': 'string'}},
1733 'required': ['type', 'name'],
1735 'CloudSpecResult': {'additionalProperties': False,
1736 'properties': {'error': {'$ref': '#/definitions/Error'},
1737 'result': {'$ref': '#/definitions/CloudSpec'}},
1739 'CloudSpecResults': {'additionalProperties': False,
1740 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
1743 'ConfigValue': {'additionalProperties': False,
1744 'properties': {'source': {'type': 'string'},
1745 'value': {'additionalProperties': True,
1747 'required': ['value', 'source'],
1749 'ControllerConfigResult': {'additionalProperties': False,
1750 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1753 'required': ['config'],
1755 'DestroyControllerArgs': {'additionalProperties': False,
1756 'properties': {'destroy-models': {'type': 'boolean'}},
1757 'required': ['destroy-models'],
1759 'Entities': {'additionalProperties': False,
1760 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1762 'required': ['entities'],
1764 'Entity': {'additionalProperties': False,
1765 'properties': {'tag': {'type': 'string'}},
1766 'required': ['tag'],
1768 'Error': {'additionalProperties': False,
1769 'properties': {'code': {'type': 'string'},
1770 'info': {'$ref': '#/definitions/ErrorInfo'},
1771 'message': {'type': 'string'}},
1772 'required': ['message', 'code'],
1774 'ErrorInfo': {'additionalProperties': False,
1775 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1776 'macaroon-path': {'type': 'string'}},
1778 'ErrorResult': {'additionalProperties': False,
1779 'properties': {'error': {'$ref': '#/definitions/Error'}},
1781 'ErrorResults': {'additionalProperties': False,
1782 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1784 'required': ['results'],
1786 'HostedModelConfig': {'additionalProperties': False,
1787 'properties': {'cloud-spec': {'$ref': '#/definitions/CloudSpec'},
1788 'config': {'patternProperties': {'.*': {'additionalProperties': True,
1791 'error': {'$ref': '#/definitions/Error'},
1792 'name': {'type': 'string'},
1793 'owner': {'type': 'string'}},
1794 'required': ['name', 'owner'],
1796 'HostedModelConfigsResults': {'additionalProperties': False,
1797 'properties': {'models': {'items': {'$ref': '#/definitions/HostedModelConfig'},
1799 'required': ['models'],
1801 'InitiateMigrationArgs': {'additionalProperties': False,
1802 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
1804 'required': ['specs'],
1806 'InitiateMigrationResult': {'additionalProperties': False,
1807 'properties': {'error': {'$ref': '#/definitions/Error'},
1808 'migration-id': {'type': 'string'},
1809 'model-tag': {'type': 'string'}},
1810 'required': ['model-tag',
1813 'InitiateMigrationResults': {'additionalProperties': False,
1814 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
1816 'required': ['results'],
1818 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1819 'MachineHardware': {'additionalProperties': False,
1820 'properties': {'arch': {'type': 'string'},
1821 'availability-zone': {'type': 'string'},
1822 'cores': {'type': 'integer'},
1823 'cpu-power': {'type': 'integer'},
1824 'mem': {'type': 'integer'},
1825 'root-disk': {'type': 'integer'},
1826 'tags': {'items': {'type': 'string'},
1829 'MigrationSpec': {'additionalProperties': False,
1830 'properties': {'model-tag': {'type': 'string'},
1831 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
1832 'required': ['model-tag', 'target-info'],
1834 'MigrationTargetInfo': {'additionalProperties': False,
1835 'properties': {'addrs': {'items': {'type': 'string'},
1837 'auth-tag': {'type': 'string'},
1838 'ca-cert': {'type': 'string'},
1839 'controller-tag': {'type': 'string'},
1840 'macaroons': {'type': 'string'},
1841 'password': {'type': 'string'}},
1842 'required': ['controller-tag',
1847 'Model': {'additionalProperties': False,
1848 'properties': {'name': {'type': 'string'},
1849 'owner-tag': {'type': 'string'},
1850 'uuid': {'type': 'string'}},
1851 'required': ['name', 'uuid', 'owner-tag'],
1853 'ModelBlockInfo': {'additionalProperties': False,
1854 'properties': {'blocks': {'items': {'type': 'string'},
1856 'model-uuid': {'type': 'string'},
1857 'name': {'type': 'string'},
1858 'owner-tag': {'type': 'string'}},
1859 'required': ['name',
1864 'ModelBlockInfoList': {'additionalProperties': False,
1865 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
1868 'ModelConfigResults': {'additionalProperties': False,
1869 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
1871 'required': ['config'],
1873 'ModelMachineInfo': {'additionalProperties': False,
1874 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
1875 'has-vote': {'type': 'boolean'},
1876 'id': {'type': 'string'},
1877 'instance-id': {'type': 'string'},
1878 'status': {'type': 'string'},
1879 'wants-vote': {'type': 'boolean'}},
1882 'ModelStatus': {'additionalProperties': False,
1883 'properties': {'application-count': {'type': 'integer'},
1884 'hosted-machine-count': {'type': 'integer'},
1885 'life': {'type': 'string'},
1886 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
1888 'model-tag': {'type': 'string'},
1889 'owner-tag': {'type': 'string'}},
1890 'required': ['model-tag',
1892 'hosted-machine-count',
1893 'application-count',
1896 'ModelStatusResults': {'additionalProperties': False,
1897 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
1899 'required': ['models'],
1901 'ModelTag': {'additionalProperties': False, 'type': 'object'},
1902 'ModifyControllerAccess': {'additionalProperties': False,
1903 'properties': {'access': {'type': 'string'},
1904 'action': {'type': 'string'},
1905 'user-tag': {'type': 'string'}},
1906 'required': ['user-tag',
1910 'ModifyControllerAccessRequest': {'additionalProperties': False,
1911 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
1913 'required': ['changes'],
1915 'RemoveBlocksArgs': {'additionalProperties': False,
1916 'properties': {'all': {'type': 'boolean'}},
1917 'required': ['all'],
1919 'UserAccess': {'additionalProperties': False,
1920 'properties': {'access': {'type': 'string'},
1921 'user-tag': {'type': 'string'}},
1922 'required': ['user-tag', 'access'],
1924 'UserAccessResult': {'additionalProperties': False,
1925 'properties': {'error': {'$ref': '#/definitions/Error'},
1926 'result': {'$ref': '#/definitions/UserAccess'}},
1928 'UserAccessResults': {'additionalProperties': False,
1929 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
1932 'UserModel': {'additionalProperties': False,
1933 'properties': {'last-connection': {'format': 'date-time',
1935 'model': {'$ref': '#/definitions/Model'}},
1936 'required': ['model', 'last-connection'],
1938 'UserModelList': {'additionalProperties': False,
1939 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
1941 'required': ['user-models'],
1943 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
1945 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1946 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
1948 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
1950 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
1952 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
1953 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
1955 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1956 'Result': {'$ref': '#/definitions/UserAccessResults'}},
1958 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}},
1960 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
1961 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
1963 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
1965 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
1967 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1968 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
1970 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
1971 'Result': {'$ref': '#/definitions/ErrorResults'}},
1973 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
1975 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
1980 @ReturnMapping(UserModelList
)
1981 async def AllModels(self
):
1984 Returns -> typing.Sequence[~UserModel]
1986 # map input types to rpc msg
1988 msg
= dict(type='Controller',
1989 request
='AllModels',
1993 reply
= await self
.rpc(msg
)
1998 @ReturnMapping(CloudSpecResults
)
1999 async def CloudSpec(self
, entities
):
2001 entities : typing.Sequence[~Entity]
2002 Returns -> typing.Sequence[~CloudSpecResult]
2004 # map input types to rpc msg
2006 msg
= dict(type='Controller',
2007 request
='CloudSpec',
2010 _params
['entities'] = entities
2011 reply
= await self
.rpc(msg
)
2016 @ReturnMapping(ControllerConfigResult
)
2017 async def ControllerConfig(self
):
2020 Returns -> typing.Mapping[str, typing.Any]
2022 # map input types to rpc msg
2024 msg
= dict(type='Controller',
2025 request
='ControllerConfig',
2029 reply
= await self
.rpc(msg
)
2034 @ReturnMapping(None)
2035 async def DestroyController(self
, destroy_models
):
2037 destroy_models : bool
2040 # map input types to rpc msg
2042 msg
= dict(type='Controller',
2043 request
='DestroyController',
2046 _params
['destroy-models'] = destroy_models
2047 reply
= await self
.rpc(msg
)
2052 @ReturnMapping(CloudSpecResult
)
2053 async def GetCloudSpec(self
):
2056 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
2058 # map input types to rpc msg
2060 msg
= dict(type='Controller',
2061 request
='GetCloudSpec',
2065 reply
= await self
.rpc(msg
)
2070 @ReturnMapping(UserAccessResults
)
2071 async def GetControllerAccess(self
, entities
):
2073 entities : typing.Sequence[~Entity]
2074 Returns -> typing.Sequence[~UserAccessResult]
2076 # map input types to rpc msg
2078 msg
= dict(type='Controller',
2079 request
='GetControllerAccess',
2082 _params
['entities'] = entities
2083 reply
= await self
.rpc(msg
)
2088 @ReturnMapping(HostedModelConfigsResults
)
2089 async def HostedModelConfigs(self
):
2092 Returns -> typing.Sequence[~HostedModelConfig]
2094 # map input types to rpc msg
2096 msg
= dict(type='Controller',
2097 request
='HostedModelConfigs',
2101 reply
= await self
.rpc(msg
)
2106 @ReturnMapping(InitiateMigrationResults
)
2107 async def InitiateMigration(self
, specs
):
2109 specs : typing.Sequence[~MigrationSpec]
2110 Returns -> typing.Sequence[~InitiateMigrationResult]
2112 # map input types to rpc msg
2114 msg
= dict(type='Controller',
2115 request
='InitiateMigration',
2118 _params
['specs'] = specs
2119 reply
= await self
.rpc(msg
)
2124 @ReturnMapping(ModelBlockInfoList
)
2125 async def ListBlockedModels(self
):
2128 Returns -> typing.Sequence[~ModelBlockInfo]
2130 # map input types to rpc msg
2132 msg
= dict(type='Controller',
2133 request
='ListBlockedModels',
2137 reply
= await self
.rpc(msg
)
2142 @ReturnMapping(ModelConfigResults
)
2143 async def ModelConfig(self
):
2146 Returns -> typing.Mapping[str, ~ConfigValue]
2148 # map input types to rpc msg
2150 msg
= dict(type='Controller',
2151 request
='ModelConfig',
2155 reply
= await self
.rpc(msg
)
2160 @ReturnMapping(ModelStatusResults
)
2161 async def ModelStatus(self
, entities
):
2163 entities : typing.Sequence[~Entity]
2164 Returns -> typing.Sequence[~ModelStatus]
2166 # map input types to rpc msg
2168 msg
= dict(type='Controller',
2169 request
='ModelStatus',
2172 _params
['entities'] = entities
2173 reply
= await self
.rpc(msg
)
2178 @ReturnMapping(ErrorResults
)
2179 async def ModifyControllerAccess(self
, changes
):
2181 changes : typing.Sequence[~ModifyControllerAccess]
2182 Returns -> typing.Sequence[~ErrorResult]
2184 # map input types to rpc msg
2186 msg
= dict(type='Controller',
2187 request
='ModifyControllerAccess',
2190 _params
['changes'] = changes
2191 reply
= await self
.rpc(msg
)
2196 @ReturnMapping(None)
2197 async def RemoveBlocks(self
, all_
):
2202 # map input types to rpc msg
2204 msg
= dict(type='Controller',
2205 request
='RemoveBlocks',
2208 _params
['all'] = all_
2209 reply
= await self
.rpc(msg
)
2214 @ReturnMapping(AllWatcherId
)
2215 async def WatchAllModels(self
):
2220 # map input types to rpc msg
2222 msg
= dict(type='Controller',
2223 request
='WatchAllModels',
2227 reply
= await self
.rpc(msg
)
2232 class FirewallerFacade(Type
):
2235 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
2236 'properties': {'error': {'$ref': '#/definitions/Error'},
2237 'result': {'type': 'boolean'}},
2238 'required': ['result'],
2240 'BoolResults': {'additionalProperties': False,
2241 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
2243 'required': ['results'],
2245 'CloudCredential': {'additionalProperties': False,
2246 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
2248 'auth-type': {'type': 'string'},
2249 'redacted': {'items': {'type': 'string'},
2251 'required': ['auth-type'],
2253 'CloudSpec': {'additionalProperties': False,
2254 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
2255 'endpoint': {'type': 'string'},
2256 'identity-endpoint': {'type': 'string'},
2257 'name': {'type': 'string'},
2258 'region': {'type': 'string'},
2259 'storage-endpoint': {'type': 'string'},
2260 'type': {'type': 'string'}},
2261 'required': ['type', 'name'],
2263 'CloudSpecResult': {'additionalProperties': False,
2264 'properties': {'error': {'$ref': '#/definitions/Error'},
2265 'result': {'$ref': '#/definitions/CloudSpec'}},
2267 'CloudSpecResults': {'additionalProperties': False,
2268 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
2271 'Entities': {'additionalProperties': False,
2272 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2274 'required': ['entities'],
2276 'Entity': {'additionalProperties': False,
2277 'properties': {'tag': {'type': 'string'}},
2278 'required': ['tag'],
2280 'Error': {'additionalProperties': False,
2281 'properties': {'code': {'type': 'string'},
2282 'info': {'$ref': '#/definitions/ErrorInfo'},
2283 'message': {'type': 'string'}},
2284 'required': ['message', 'code'],
2286 'ErrorInfo': {'additionalProperties': False,
2287 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2288 'macaroon-path': {'type': 'string'}},
2290 'LifeResult': {'additionalProperties': False,
2291 'properties': {'error': {'$ref': '#/definitions/Error'},
2292 'life': {'type': 'string'}},
2293 'required': ['life'],
2295 'LifeResults': {'additionalProperties': False,
2296 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2298 'required': ['results'],
2300 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2301 'MachinePortRange': {'additionalProperties': False,
2302 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
2303 'relation-tag': {'type': 'string'},
2304 'unit-tag': {'type': 'string'}},
2305 'required': ['unit-tag',
2309 'MachinePorts': {'additionalProperties': False,
2310 'properties': {'machine-tag': {'type': 'string'},
2311 'subnet-tag': {'type': 'string'}},
2312 'required': ['machine-tag', 'subnet-tag'],
2314 'MachinePortsParams': {'additionalProperties': False,
2315 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
2317 'required': ['params'],
2319 'MachinePortsResult': {'additionalProperties': False,
2320 'properties': {'error': {'$ref': '#/definitions/Error'},
2321 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
2323 'required': ['ports'],
2325 'MachinePortsResults': {'additionalProperties': False,
2326 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
2328 'required': ['results'],
2330 'ModelConfigResult': {'additionalProperties': False,
2331 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2334 'required': ['config'],
2336 'ModelTag': {'additionalProperties': False, 'type': 'object'},
2337 'NotifyWatchResult': {'additionalProperties': False,
2338 'properties': {'NotifyWatcherId': {'type': 'string'},
2339 'error': {'$ref': '#/definitions/Error'}},
2340 'required': ['NotifyWatcherId'],
2342 'NotifyWatchResults': {'additionalProperties': False,
2343 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2345 'required': ['results'],
2347 'PortRange': {'additionalProperties': False,
2348 'properties': {'from-port': {'type': 'integer'},
2349 'protocol': {'type': 'string'},
2350 'to-port': {'type': 'integer'}},
2351 'required': ['from-port', 'to-port', 'protocol'],
2353 'StringResult': {'additionalProperties': False,
2354 'properties': {'error': {'$ref': '#/definitions/Error'},
2355 'result': {'type': 'string'}},
2356 'required': ['result'],
2358 'StringResults': {'additionalProperties': False,
2359 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2361 'required': ['results'],
2363 'StringsResult': {'additionalProperties': False,
2364 'properties': {'error': {'$ref': '#/definitions/Error'},
2365 'result': {'items': {'type': 'string'},
2368 'StringsResults': {'additionalProperties': False,
2369 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
2371 'required': ['results'],
2373 'StringsWatchResult': {'additionalProperties': False,
2374 'properties': {'changes': {'items': {'type': 'string'},
2376 'error': {'$ref': '#/definitions/Error'},
2377 'watcher-id': {'type': 'string'}},
2378 'required': ['watcher-id'],
2380 'StringsWatchResults': {'additionalProperties': False,
2381 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
2383 'required': ['results'],
2385 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2386 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
2388 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2389 'Result': {'$ref': '#/definitions/StringResults'}},
2391 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
2392 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
2394 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2395 'Result': {'$ref': '#/definitions/BoolResults'}},
2397 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2398 'Result': {'$ref': '#/definitions/StringsResults'}},
2400 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
2401 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
2403 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2404 'Result': {'$ref': '#/definitions/StringResults'}},
2406 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2407 'Result': {'$ref': '#/definitions/LifeResults'}},
2409 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
2411 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2412 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2414 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2416 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
2418 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2419 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2421 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2422 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2427 @ReturnMapping(CloudSpecResults
)
2428 async def CloudSpec(self
, entities
):
2430 entities : typing.Sequence[~Entity]
2431 Returns -> typing.Sequence[~CloudSpecResult]
2433 # map input types to rpc msg
2435 msg
= dict(type='Firewaller',
2436 request
='CloudSpec',
2439 _params
['entities'] = entities
2440 reply
= await self
.rpc(msg
)
2445 @ReturnMapping(StringResults
)
2446 async def GetAssignedMachine(self
, entities
):
2448 entities : typing.Sequence[~Entity]
2449 Returns -> typing.Sequence[~StringResult]
2451 # map input types to rpc msg
2453 msg
= dict(type='Firewaller',
2454 request
='GetAssignedMachine',
2457 _params
['entities'] = entities
2458 reply
= await self
.rpc(msg
)
2463 @ReturnMapping(CloudSpecResult
)
2464 async def GetCloudSpec(self
):
2467 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
2469 # map input types to rpc msg
2471 msg
= dict(type='Firewaller',
2472 request
='GetCloudSpec',
2476 reply
= await self
.rpc(msg
)
2481 @ReturnMapping(BoolResults
)
2482 async def GetExposed(self
, entities
):
2484 entities : typing.Sequence[~Entity]
2485 Returns -> typing.Sequence[~BoolResult]
2487 # map input types to rpc msg
2489 msg
= dict(type='Firewaller',
2490 request
='GetExposed',
2493 _params
['entities'] = entities
2494 reply
= await self
.rpc(msg
)
2499 @ReturnMapping(StringsResults
)
2500 async def GetMachineActiveSubnets(self
, entities
):
2502 entities : typing.Sequence[~Entity]
2503 Returns -> typing.Sequence[~StringsResult]
2505 # map input types to rpc msg
2507 msg
= dict(type='Firewaller',
2508 request
='GetMachineActiveSubnets',
2511 _params
['entities'] = entities
2512 reply
= await self
.rpc(msg
)
2517 @ReturnMapping(MachinePortsResults
)
2518 async def GetMachinePorts(self
, params
):
2520 params : typing.Sequence[~MachinePorts]
2521 Returns -> typing.Sequence[~MachinePortsResult]
2523 # map input types to rpc msg
2525 msg
= dict(type='Firewaller',
2526 request
='GetMachinePorts',
2529 _params
['params'] = params
2530 reply
= await self
.rpc(msg
)
2535 @ReturnMapping(StringResults
)
2536 async def InstanceId(self
, entities
):
2538 entities : typing.Sequence[~Entity]
2539 Returns -> typing.Sequence[~StringResult]
2541 # map input types to rpc msg
2543 msg
= dict(type='Firewaller',
2544 request
='InstanceId',
2547 _params
['entities'] = entities
2548 reply
= await self
.rpc(msg
)
2553 @ReturnMapping(LifeResults
)
2554 async def Life(self
, entities
):
2556 entities : typing.Sequence[~Entity]
2557 Returns -> typing.Sequence[~LifeResult]
2559 # map input types to rpc msg
2561 msg
= dict(type='Firewaller',
2565 _params
['entities'] = entities
2566 reply
= await self
.rpc(msg
)
2571 @ReturnMapping(ModelConfigResult
)
2572 async def ModelConfig(self
):
2575 Returns -> typing.Mapping[str, typing.Any]
2577 # map input types to rpc msg
2579 msg
= dict(type='Firewaller',
2580 request
='ModelConfig',
2584 reply
= await self
.rpc(msg
)
2589 @ReturnMapping(NotifyWatchResults
)
2590 async def Watch(self
, entities
):
2592 entities : typing.Sequence[~Entity]
2593 Returns -> typing.Sequence[~NotifyWatchResult]
2595 # map input types to rpc msg
2597 msg
= dict(type='Firewaller',
2601 _params
['entities'] = entities
2602 reply
= await self
.rpc(msg
)
2607 @ReturnMapping(NotifyWatchResult
)
2608 async def WatchForModelConfigChanges(self
):
2611 Returns -> typing.Union[str, _ForwardRef('Error')]
2613 # map input types to rpc msg
2615 msg
= dict(type='Firewaller',
2616 request
='WatchForModelConfigChanges',
2620 reply
= await self
.rpc(msg
)
2625 @ReturnMapping(StringsWatchResult
)
2626 async def WatchModelMachines(self
):
2629 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
2631 # map input types to rpc msg
2633 msg
= dict(type='Firewaller',
2634 request
='WatchModelMachines',
2638 reply
= await self
.rpc(msg
)
2643 @ReturnMapping(StringsWatchResults
)
2644 async def WatchOpenedPorts(self
, entities
):
2646 entities : typing.Sequence[~Entity]
2647 Returns -> typing.Sequence[~StringsWatchResult]
2649 # map input types to rpc msg
2651 msg
= dict(type='Firewaller',
2652 request
='WatchOpenedPorts',
2655 _params
['entities'] = entities
2656 reply
= await self
.rpc(msg
)
2661 @ReturnMapping(StringsWatchResults
)
2662 async def WatchUnits(self
, entities
):
2664 entities : typing.Sequence[~Entity]
2665 Returns -> typing.Sequence[~StringsWatchResult]
2667 # map input types to rpc msg
2669 msg
= dict(type='Firewaller',
2670 request
='WatchUnits',
2673 _params
['entities'] = entities
2674 reply
= await self
.rpc(msg
)
2679 class ImageMetadataFacade(Type
):
2680 name
= 'ImageMetadata'
2682 schema
= {'properties': {'UpdateFromPublishedImages': {'type': 'object'}},
2686 @ReturnMapping(None)
2687 async def UpdateFromPublishedImages(self
):
2692 # map input types to rpc msg
2694 msg
= dict(type='ImageMetadata',
2695 request
='UpdateFromPublishedImages',
2699 reply
= await self
.rpc(msg
)
2704 class InstancePollerFacade(Type
):
2705 name
= 'InstancePoller'
2707 schema
= {'definitions': {'Address': {'additionalProperties': False,
2708 'properties': {'scope': {'type': 'string'},
2709 'space-name': {'type': 'string'},
2710 'type': {'type': 'string'},
2711 'value': {'type': 'string'}},
2712 'required': ['value', 'type', 'scope'],
2714 'BoolResult': {'additionalProperties': False,
2715 'properties': {'error': {'$ref': '#/definitions/Error'},
2716 'result': {'type': 'boolean'}},
2717 'required': ['result'],
2719 'BoolResults': {'additionalProperties': False,
2720 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
2722 'required': ['results'],
2724 'Entities': {'additionalProperties': False,
2725 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2727 'required': ['entities'],
2729 'Entity': {'additionalProperties': False,
2730 'properties': {'tag': {'type': 'string'}},
2731 'required': ['tag'],
2733 'EntityStatusArgs': {'additionalProperties': False,
2734 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2737 'info': {'type': 'string'},
2738 'status': {'type': 'string'},
2739 'tag': {'type': 'string'}},
2745 'Error': {'additionalProperties': False,
2746 'properties': {'code': {'type': 'string'},
2747 'info': {'$ref': '#/definitions/ErrorInfo'},
2748 'message': {'type': 'string'}},
2749 'required': ['message', 'code'],
2751 'ErrorInfo': {'additionalProperties': False,
2752 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2753 'macaroon-path': {'type': 'string'}},
2755 'ErrorResult': {'additionalProperties': False,
2756 'properties': {'error': {'$ref': '#/definitions/Error'}},
2758 'ErrorResults': {'additionalProperties': False,
2759 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2761 'required': ['results'],
2763 'LifeResult': {'additionalProperties': False,
2764 'properties': {'error': {'$ref': '#/definitions/Error'},
2765 'life': {'type': 'string'}},
2766 'required': ['life'],
2768 'LifeResults': {'additionalProperties': False,
2769 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2771 'required': ['results'],
2773 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2774 'MachineAddresses': {'additionalProperties': False,
2775 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
2777 'tag': {'type': 'string'}},
2778 'required': ['tag', 'addresses'],
2780 'MachineAddressesResult': {'additionalProperties': False,
2781 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
2783 'error': {'$ref': '#/definitions/Error'}},
2784 'required': ['addresses'],
2786 'MachineAddressesResults': {'additionalProperties': False,
2787 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
2789 'required': ['results'],
2791 'ModelConfigResult': {'additionalProperties': False,
2792 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2795 'required': ['config'],
2797 'NotifyWatchResult': {'additionalProperties': False,
2798 'properties': {'NotifyWatcherId': {'type': 'string'},
2799 'error': {'$ref': '#/definitions/Error'}},
2800 'required': ['NotifyWatcherId'],
2802 'SetMachinesAddresses': {'additionalProperties': False,
2803 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
2805 'required': ['machine-addresses'],
2807 'SetStatus': {'additionalProperties': False,
2808 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
2810 'required': ['entities'],
2812 'StatusResult': {'additionalProperties': False,
2813 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2816 'error': {'$ref': '#/definitions/Error'},
2817 'id': {'type': 'string'},
2818 'info': {'type': 'string'},
2819 'life': {'type': 'string'},
2820 'since': {'format': 'date-time',
2822 'status': {'type': 'string'}},
2830 'StatusResults': {'additionalProperties': False,
2831 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
2833 'required': ['results'],
2835 'StringResult': {'additionalProperties': False,
2836 'properties': {'error': {'$ref': '#/definitions/Error'},
2837 'result': {'type': 'string'}},
2838 'required': ['result'],
2840 'StringResults': {'additionalProperties': False,
2841 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2843 'required': ['results'],
2845 'StringsWatchResult': {'additionalProperties': False,
2846 'properties': {'changes': {'items': {'type': 'string'},
2848 'error': {'$ref': '#/definitions/Error'},
2849 'watcher-id': {'type': 'string'}},
2850 'required': ['watcher-id'],
2852 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2853 'Result': {'$ref': '#/definitions/BoolResults'}},
2855 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2856 'Result': {'$ref': '#/definitions/StringResults'}},
2858 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2859 'Result': {'$ref': '#/definitions/StatusResults'}},
2861 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2862 'Result': {'$ref': '#/definitions/LifeResults'}},
2864 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
2866 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2867 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
2869 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2870 'Result': {'$ref': '#/definitions/ErrorResults'}},
2872 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
2873 'Result': {'$ref': '#/definitions/ErrorResults'}},
2875 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2876 'Result': {'$ref': '#/definitions/StatusResults'}},
2878 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2880 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
2885 @ReturnMapping(BoolResults
)
2886 async def AreManuallyProvisioned(self
, entities
):
2888 entities : typing.Sequence[~Entity]
2889 Returns -> typing.Sequence[~BoolResult]
2891 # map input types to rpc msg
2893 msg
= dict(type='InstancePoller',
2894 request
='AreManuallyProvisioned',
2897 _params
['entities'] = entities
2898 reply
= await self
.rpc(msg
)
2903 @ReturnMapping(StringResults
)
2904 async def InstanceId(self
, entities
):
2906 entities : typing.Sequence[~Entity]
2907 Returns -> typing.Sequence[~StringResult]
2909 # map input types to rpc msg
2911 msg
= dict(type='InstancePoller',
2912 request
='InstanceId',
2915 _params
['entities'] = entities
2916 reply
= await self
.rpc(msg
)
2921 @ReturnMapping(StatusResults
)
2922 async def InstanceStatus(self
, entities
):
2924 entities : typing.Sequence[~Entity]
2925 Returns -> typing.Sequence[~StatusResult]
2927 # map input types to rpc msg
2929 msg
= dict(type='InstancePoller',
2930 request
='InstanceStatus',
2933 _params
['entities'] = entities
2934 reply
= await self
.rpc(msg
)
2939 @ReturnMapping(LifeResults
)
2940 async def Life(self
, entities
):
2942 entities : typing.Sequence[~Entity]
2943 Returns -> typing.Sequence[~LifeResult]
2945 # map input types to rpc msg
2947 msg
= dict(type='InstancePoller',
2951 _params
['entities'] = entities
2952 reply
= await self
.rpc(msg
)
2957 @ReturnMapping(ModelConfigResult
)
2958 async def ModelConfig(self
):
2961 Returns -> typing.Mapping[str, typing.Any]
2963 # map input types to rpc msg
2965 msg
= dict(type='InstancePoller',
2966 request
='ModelConfig',
2970 reply
= await self
.rpc(msg
)
2975 @ReturnMapping(MachineAddressesResults
)
2976 async def ProviderAddresses(self
, entities
):
2978 entities : typing.Sequence[~Entity]
2979 Returns -> typing.Sequence[~MachineAddressesResult]
2981 # map input types to rpc msg
2983 msg
= dict(type='InstancePoller',
2984 request
='ProviderAddresses',
2987 _params
['entities'] = entities
2988 reply
= await self
.rpc(msg
)
2993 @ReturnMapping(ErrorResults
)
2994 async def SetInstanceStatus(self
, entities
):
2996 entities : typing.Sequence[~EntityStatusArgs]
2997 Returns -> typing.Sequence[~ErrorResult]
2999 # map input types to rpc msg
3001 msg
= dict(type='InstancePoller',
3002 request
='SetInstanceStatus',
3005 _params
['entities'] = entities
3006 reply
= await self
.rpc(msg
)
3011 @ReturnMapping(ErrorResults
)
3012 async def SetProviderAddresses(self
, machine_addresses
):
3014 machine_addresses : typing.Sequence[~MachineAddresses]
3015 Returns -> typing.Sequence[~ErrorResult]
3017 # map input types to rpc msg
3019 msg
= dict(type='InstancePoller',
3020 request
='SetProviderAddresses',
3023 _params
['machine-addresses'] = machine_addresses
3024 reply
= await self
.rpc(msg
)
3029 @ReturnMapping(StatusResults
)
3030 async def Status(self
, entities
):
3032 entities : typing.Sequence[~Entity]
3033 Returns -> typing.Sequence[~StatusResult]
3035 # map input types to rpc msg
3037 msg
= dict(type='InstancePoller',
3041 _params
['entities'] = entities
3042 reply
= await self
.rpc(msg
)
3047 @ReturnMapping(NotifyWatchResult
)
3048 async def WatchForModelConfigChanges(self
):
3051 Returns -> typing.Union[str, _ForwardRef('Error')]
3053 # map input types to rpc msg
3055 msg
= dict(type='InstancePoller',
3056 request
='WatchForModelConfigChanges',
3060 reply
= await self
.rpc(msg
)
3065 @ReturnMapping(StringsWatchResult
)
3066 async def WatchModelMachines(self
):
3069 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
3071 # map input types to rpc msg
3073 msg
= dict(type='InstancePoller',
3074 request
='WatchModelMachines',
3078 reply
= await self
.rpc(msg
)
3083 class MachineManagerFacade(Type
):
3084 name
= 'MachineManager'
3086 schema
= {'definitions': {'AddMachineParams': {'additionalProperties': False,
3087 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
3089 'constraints': {'$ref': '#/definitions/Value'},
3090 'container-type': {'type': 'string'},
3091 'disks': {'items': {'$ref': '#/definitions/Constraints'},
3093 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
3094 'instance-id': {'type': 'string'},
3095 'jobs': {'items': {'type': 'string'},
3097 'nonce': {'type': 'string'},
3098 'parent-id': {'type': 'string'},
3099 'placement': {'$ref': '#/definitions/Placement'},
3100 'series': {'type': 'string'}},
3101 'required': ['series',
3108 'hardware-characteristics',
3111 'AddMachines': {'additionalProperties': False,
3112 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
3114 'required': ['params'],
3116 'AddMachinesResult': {'additionalProperties': False,
3117 'properties': {'error': {'$ref': '#/definitions/Error'},
3118 'machine': {'type': 'string'}},
3119 'required': ['machine'],
3121 'AddMachinesResults': {'additionalProperties': False,
3122 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
3124 'required': ['machines'],
3126 'Address': {'additionalProperties': False,
3127 'properties': {'scope': {'type': 'string'},
3128 'space-name': {'type': 'string'},
3129 'type': {'type': 'string'},
3130 'value': {'type': 'string'}},
3131 'required': ['value', 'type', 'scope'],
3133 'Constraints': {'additionalProperties': False,
3134 'properties': {'Count': {'type': 'integer'},
3135 'Pool': {'type': 'string'},
3136 'Size': {'type': 'integer'}},
3137 'required': ['Pool', 'Size', 'Count'],
3139 'DestroyMachineInfo': {'additionalProperties': False,
3140 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
3142 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
3144 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
3147 'DestroyMachineResult': {'additionalProperties': False,
3148 'properties': {'error': {'$ref': '#/definitions/Error'},
3149 'info': {'$ref': '#/definitions/DestroyMachineInfo'}},
3151 'DestroyMachineResults': {'additionalProperties': False,
3152 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyMachineResult'},
3155 'Entities': {'additionalProperties': False,
3156 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3158 'required': ['entities'],
3160 'Entity': {'additionalProperties': False,
3161 'properties': {'tag': {'type': 'string'}},
3162 'required': ['tag'],
3164 'Error': {'additionalProperties': False,
3165 'properties': {'code': {'type': 'string'},
3166 'info': {'$ref': '#/definitions/ErrorInfo'},
3167 'message': {'type': 'string'}},
3168 'required': ['message', 'code'],
3170 'ErrorInfo': {'additionalProperties': False,
3171 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3172 'macaroon-path': {'type': 'string'}},
3174 'HardwareCharacteristics': {'additionalProperties': False,
3175 'properties': {'arch': {'type': 'string'},
3176 'availability-zone': {'type': 'string'},
3177 'cpu-cores': {'type': 'integer'},
3178 'cpu-power': {'type': 'integer'},
3179 'mem': {'type': 'integer'},
3180 'root-disk': {'type': 'integer'},
3181 'tags': {'items': {'type': 'string'},
3184 'InstanceType': {'additionalProperties': False,
3185 'properties': {'arches': {'items': {'type': 'string'},
3187 'cost': {'type': 'integer'},
3188 'cpu-cores': {'type': 'integer'},
3189 'deprecated': {'type': 'boolean'},
3190 'memory': {'type': 'integer'},
3191 'name': {'type': 'string'},
3192 'root-disk': {'type': 'integer'},
3193 'virt-type': {'type': 'string'}},
3194 'required': ['arches', 'cpu-cores', 'memory'],
3196 'InstanceTypesResult': {'additionalProperties': False,
3197 'properties': {'cost-currency': {'type': 'string'},
3198 'cost-divisor': {'type': 'integer'},
3199 'cost-unit': {'type': 'string'},
3200 'error': {'$ref': '#/definitions/Error'},
3201 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
3204 'InstanceTypesResults': {'additionalProperties': False,
3205 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
3207 'required': ['results'],
3209 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3210 'ModelInstanceTypesConstraint': {'additionalProperties': False,
3211 'properties': {'value': {'$ref': '#/definitions/Value'}},
3213 'ModelInstanceTypesConstraints': {'additionalProperties': False,
3214 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
3216 'required': ['constraints'],
3218 'Placement': {'additionalProperties': False,
3219 'properties': {'directive': {'type': 'string'},
3220 'scope': {'type': 'string'}},
3221 'required': ['scope', 'directive'],
3223 'Value': {'additionalProperties': False,
3224 'properties': {'arch': {'type': 'string'},
3225 'container': {'type': 'string'},
3226 'cores': {'type': 'integer'},
3227 'cpu-power': {'type': 'integer'},
3228 'instance-type': {'type': 'string'},
3229 'mem': {'type': 'integer'},
3230 'root-disk': {'type': 'integer'},
3231 'spaces': {'items': {'type': 'string'},
3233 'tags': {'items': {'type': 'string'},
3235 'virt-type': {'type': 'string'}},
3237 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
3238 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
3240 'DestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3241 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
3243 'ForceDestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3244 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
3246 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
3247 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
3252 @ReturnMapping(AddMachinesResults
)
3253 async def AddMachines(self
, params
):
3255 params : typing.Sequence[~AddMachineParams]
3256 Returns -> typing.Sequence[~AddMachinesResult]
3258 # map input types to rpc msg
3260 msg
= dict(type='MachineManager',
3261 request
='AddMachines',
3264 _params
['params'] = params
3265 reply
= await self
.rpc(msg
)
3270 @ReturnMapping(DestroyMachineResults
)
3271 async def DestroyMachine(self
, entities
):
3273 entities : typing.Sequence[~Entity]
3274 Returns -> typing.Sequence[~DestroyMachineResult]
3276 # map input types to rpc msg
3278 msg
= dict(type='MachineManager',
3279 request
='DestroyMachine',
3282 _params
['entities'] = entities
3283 reply
= await self
.rpc(msg
)
3288 @ReturnMapping(DestroyMachineResults
)
3289 async def ForceDestroyMachine(self
, entities
):
3291 entities : typing.Sequence[~Entity]
3292 Returns -> typing.Sequence[~DestroyMachineResult]
3294 # map input types to rpc msg
3296 msg
= dict(type='MachineManager',
3297 request
='ForceDestroyMachine',
3300 _params
['entities'] = entities
3301 reply
= await self
.rpc(msg
)
3306 @ReturnMapping(InstanceTypesResults
)
3307 async def InstanceTypes(self
, constraints
):
3309 constraints : typing.Sequence[~ModelInstanceTypesConstraint]
3310 Returns -> typing.Sequence[~InstanceTypesResult]
3312 # map input types to rpc msg
3314 msg
= dict(type='MachineManager',
3315 request
='InstanceTypes',
3318 _params
['constraints'] = constraints
3319 reply
= await self
.rpc(msg
)
3324 class ModelManagerFacade(Type
):
3325 name
= 'ModelManager'
3327 schema
= {'definitions': {'DumpModelRequest': {'additionalProperties': False,
3328 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3330 'simplified': {'type': 'boolean'}},
3331 'required': ['entities', 'simplified'],
3333 'Entities': {'additionalProperties': False,
3334 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3336 'required': ['entities'],
3338 'Entity': {'additionalProperties': False,
3339 'properties': {'tag': {'type': 'string'}},
3340 'required': ['tag'],
3342 'EntityStatus': {'additionalProperties': False,
3343 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3346 'info': {'type': 'string'},
3347 'since': {'format': 'date-time',
3349 'status': {'type': 'string'}},
3350 'required': ['status', 'info', 'since'],
3352 'Error': {'additionalProperties': False,
3353 'properties': {'code': {'type': 'string'},
3354 'info': {'$ref': '#/definitions/ErrorInfo'},
3355 'message': {'type': 'string'}},
3356 'required': ['message', 'code'],
3358 'ErrorInfo': {'additionalProperties': False,
3359 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3360 'macaroon-path': {'type': 'string'}},
3362 'ErrorResult': {'additionalProperties': False,
3363 'properties': {'error': {'$ref': '#/definitions/Error'}},
3365 'ErrorResults': {'additionalProperties': False,
3366 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3368 'required': ['results'],
3370 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3371 'MachineHardware': {'additionalProperties': False,
3372 'properties': {'arch': {'type': 'string'},
3373 'availability-zone': {'type': 'string'},
3374 'cores': {'type': 'integer'},
3375 'cpu-power': {'type': 'integer'},
3376 'mem': {'type': 'integer'},
3377 'root-disk': {'type': 'integer'},
3378 'tags': {'items': {'type': 'string'},
3381 'MapResult': {'additionalProperties': False,
3382 'properties': {'error': {'$ref': '#/definitions/Error'},
3383 'result': {'patternProperties': {'.*': {'additionalProperties': True,
3386 'required': ['result'],
3388 'MapResults': {'additionalProperties': False,
3389 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
3391 'required': ['results'],
3393 'Model': {'additionalProperties': False,
3394 'properties': {'name': {'type': 'string'},
3395 'owner-tag': {'type': 'string'},
3396 'uuid': {'type': 'string'}},
3397 'required': ['name', 'uuid', 'owner-tag'],
3399 'ModelCreateArgs': {'additionalProperties': False,
3400 'properties': {'cloud-tag': {'type': 'string'},
3401 'config': {'patternProperties': {'.*': {'additionalProperties': True,
3404 'credential': {'type': 'string'},
3405 'name': {'type': 'string'},
3406 'owner-tag': {'type': 'string'},
3407 'region': {'type': 'string'}},
3408 'required': ['name', 'owner-tag'],
3410 'ModelDefaultValues': {'additionalProperties': False,
3411 'properties': {'cloud-region': {'type': 'string'},
3412 'cloud-tag': {'type': 'string'},
3413 'config': {'patternProperties': {'.*': {'additionalProperties': True,
3416 'required': ['config'],
3418 'ModelDefaults': {'additionalProperties': False,
3419 'properties': {'controller': {'additionalProperties': True,
3421 'default': {'additionalProperties': True,
3423 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
3426 'ModelDefaultsResult': {'additionalProperties': False,
3427 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
3429 'required': ['config'],
3431 'ModelInfo': {'additionalProperties': False,
3432 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
3433 'cloud-credential-tag': {'type': 'string'},
3434 'cloud-region': {'type': 'string'},
3435 'cloud-tag': {'type': 'string'},
3436 'controller-uuid': {'type': 'string'},
3437 'default-series': {'type': 'string'},
3438 'life': {'type': 'string'},
3439 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
3441 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
3442 'name': {'type': 'string'},
3443 'owner-tag': {'type': 'string'},
3444 'provider-type': {'type': 'string'},
3445 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
3446 'status': {'$ref': '#/definitions/EntityStatus'},
3447 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
3449 'uuid': {'type': 'string'}},
3450 'required': ['name',
3461 'ModelInfoResult': {'additionalProperties': False,
3462 'properties': {'error': {'$ref': '#/definitions/Error'},
3463 'result': {'$ref': '#/definitions/ModelInfo'}},
3465 'ModelInfoResults': {'additionalProperties': False,
3466 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
3468 'required': ['results'],
3470 'ModelMachineInfo': {'additionalProperties': False,
3471 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
3472 'has-vote': {'type': 'boolean'},
3473 'id': {'type': 'string'},
3474 'instance-id': {'type': 'string'},
3475 'status': {'type': 'string'},
3476 'wants-vote': {'type': 'boolean'}},
3479 'ModelMigrationStatus': {'additionalProperties': False,
3480 'properties': {'end': {'format': 'date-time',
3482 'start': {'format': 'date-time',
3484 'status': {'type': 'string'}},
3485 'required': ['status', 'start'],
3487 'ModelSLAInfo': {'additionalProperties': False,
3488 'properties': {'level': {'type': 'string'},
3489 'owner': {'type': 'string'}},
3490 'required': ['level', 'owner'],
3492 'ModelStatus': {'additionalProperties': False,
3493 'properties': {'application-count': {'type': 'integer'},
3494 'hosted-machine-count': {'type': 'integer'},
3495 'life': {'type': 'string'},
3496 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
3498 'model-tag': {'type': 'string'},
3499 'owner-tag': {'type': 'string'}},
3500 'required': ['model-tag',
3502 'hosted-machine-count',
3503 'application-count',
3506 'ModelStatusResults': {'additionalProperties': False,
3507 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
3509 'required': ['models'],
3511 'ModelUnsetKeys': {'additionalProperties': False,
3512 'properties': {'cloud-region': {'type': 'string'},
3513 'cloud-tag': {'type': 'string'},
3514 'keys': {'items': {'type': 'string'},
3516 'required': ['keys'],
3518 'ModelUserInfo': {'additionalProperties': False,
3519 'properties': {'access': {'type': 'string'},
3520 'display-name': {'type': 'string'},
3521 'last-connection': {'format': 'date-time',
3523 'user': {'type': 'string'}},
3524 'required': ['user',
3529 'ModifyModelAccess': {'additionalProperties': False,
3530 'properties': {'access': {'type': 'string'},
3531 'action': {'type': 'string'},
3532 'model-tag': {'type': 'string'},
3533 'user-tag': {'type': 'string'}},
3534 'required': ['user-tag',
3539 'ModifyModelAccessRequest': {'additionalProperties': False,
3540 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
3542 'required': ['changes'],
3544 'Number': {'additionalProperties': False,
3545 'properties': {'Build': {'type': 'integer'},
3546 'Major': {'type': 'integer'},
3547 'Minor': {'type': 'integer'},
3548 'Patch': {'type': 'integer'},
3549 'Tag': {'type': 'string'}},
3550 'required': ['Major',
3556 'RegionDefaults': {'additionalProperties': False,
3557 'properties': {'region-name': {'type': 'string'},
3558 'value': {'additionalProperties': True,
3560 'required': ['region-name', 'value'],
3562 'SetModelDefaults': {'additionalProperties': False,
3563 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
3565 'required': ['config'],
3567 'StringResult': {'additionalProperties': False,
3568 'properties': {'error': {'$ref': '#/definitions/Error'},
3569 'result': {'type': 'string'}},
3570 'required': ['result'],
3572 'StringResults': {'additionalProperties': False,
3573 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
3575 'required': ['results'],
3577 'UnsetModelDefaults': {'additionalProperties': False,
3578 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
3580 'required': ['keys'],
3582 'UserModel': {'additionalProperties': False,
3583 'properties': {'last-connection': {'format': 'date-time',
3585 'model': {'$ref': '#/definitions/Model'}},
3586 'required': ['model', 'last-connection'],
3588 'UserModelList': {'additionalProperties': False,
3589 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
3591 'required': ['user-models'],
3593 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
3594 'Result': {'$ref': '#/definitions/ModelInfo'}},
3596 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3597 'Result': {'$ref': '#/definitions/ErrorResults'}},
3599 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/DumpModelRequest'},
3600 'Result': {'$ref': '#/definitions/StringResults'}},
3602 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3603 'Result': {'$ref': '#/definitions/MapResults'}},
3605 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
3606 'Result': {'$ref': '#/definitions/UserModelList'}},
3608 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
3610 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3611 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
3613 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3614 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
3616 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
3617 'Result': {'$ref': '#/definitions/ErrorResults'}},
3619 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
3620 'Result': {'$ref': '#/definitions/ErrorResults'}},
3622 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
3623 'Result': {'$ref': '#/definitions/ErrorResults'}},
3628 @ReturnMapping(ModelInfo
)
3629 async def CreateModel(self
, cloud_tag
, config
, credential
, name
, owner_tag
, region
):
3632 config : typing.Mapping[str, typing.Any]
3637 Returns -> typing.Union[_ForwardRef('Number'), str, typing.Sequence[~ModelMachineInfo], _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
3639 # map input types to rpc msg
3641 msg
= dict(type='ModelManager',
3642 request
='CreateModel',
3645 _params
['cloud-tag'] = cloud_tag
3646 _params
['config'] = config
3647 _params
['credential'] = credential
3648 _params
['name'] = name
3649 _params
['owner-tag'] = owner_tag
3650 _params
['region'] = region
3651 reply
= await self
.rpc(msg
)
3656 @ReturnMapping(ErrorResults
)
3657 async def DestroyModels(self
, entities
):
3659 entities : typing.Sequence[~Entity]
3660 Returns -> typing.Sequence[~ErrorResult]
3662 # map input types to rpc msg
3664 msg
= dict(type='ModelManager',
3665 request
='DestroyModels',
3668 _params
['entities'] = entities
3669 reply
= await self
.rpc(msg
)
3674 @ReturnMapping(StringResults
)
3675 async def DumpModels(self
, entities
, simplified
):
3677 entities : typing.Sequence[~Entity]
3679 Returns -> typing.Sequence[~StringResult]
3681 # map input types to rpc msg
3683 msg
= dict(type='ModelManager',
3684 request
='DumpModels',
3687 _params
['entities'] = entities
3688 _params
['simplified'] = simplified
3689 reply
= await self
.rpc(msg
)
3694 @ReturnMapping(MapResults
)
3695 async def DumpModelsDB(self
, entities
):
3697 entities : typing.Sequence[~Entity]
3698 Returns -> typing.Sequence[~MapResult]
3700 # map input types to rpc msg
3702 msg
= dict(type='ModelManager',
3703 request
='DumpModelsDB',
3706 _params
['entities'] = entities
3707 reply
= await self
.rpc(msg
)
3712 @ReturnMapping(UserModelList
)
3713 async def ListModels(self
, tag
):
3716 Returns -> typing.Sequence[~UserModel]
3718 # map input types to rpc msg
3720 msg
= dict(type='ModelManager',
3721 request
='ListModels',
3724 _params
['tag'] = tag
3725 reply
= await self
.rpc(msg
)
3730 @ReturnMapping(ModelDefaultsResult
)
3731 async def ModelDefaults(self
):
3734 Returns -> typing.Mapping[str, ~ModelDefaults]
3736 # map input types to rpc msg
3738 msg
= dict(type='ModelManager',
3739 request
='ModelDefaults',
3743 reply
= await self
.rpc(msg
)
3748 @ReturnMapping(ModelInfoResults
)
3749 async def ModelInfo(self
, entities
):
3751 entities : typing.Sequence[~Entity]
3752 Returns -> typing.Sequence[~ModelInfoResult]
3754 # map input types to rpc msg
3756 msg
= dict(type='ModelManager',
3757 request
='ModelInfo',
3760 _params
['entities'] = entities
3761 reply
= await self
.rpc(msg
)
3766 @ReturnMapping(ModelStatusResults
)
3767 async def ModelStatus(self
, entities
):
3769 entities : typing.Sequence[~Entity]
3770 Returns -> typing.Sequence[~ModelStatus]
3772 # map input types to rpc msg
3774 msg
= dict(type='ModelManager',
3775 request
='ModelStatus',
3778 _params
['entities'] = entities
3779 reply
= await self
.rpc(msg
)
3784 @ReturnMapping(ErrorResults
)
3785 async def ModifyModelAccess(self
, changes
):
3787 changes : typing.Sequence[~ModifyModelAccess]
3788 Returns -> typing.Sequence[~ErrorResult]
3790 # map input types to rpc msg
3792 msg
= dict(type='ModelManager',
3793 request
='ModifyModelAccess',
3796 _params
['changes'] = changes
3797 reply
= await self
.rpc(msg
)
3802 @ReturnMapping(ErrorResults
)
3803 async def SetModelDefaults(self
, config
):
3805 config : typing.Sequence[~ModelDefaultValues]
3806 Returns -> typing.Sequence[~ErrorResult]
3808 # map input types to rpc msg
3810 msg
= dict(type='ModelManager',
3811 request
='SetModelDefaults',
3814 _params
['config'] = config
3815 reply
= await self
.rpc(msg
)
3820 @ReturnMapping(ErrorResults
)
3821 async def UnsetModelDefaults(self
, keys
):
3823 keys : typing.Sequence[~ModelUnsetKeys]
3824 Returns -> typing.Sequence[~ErrorResult]
3826 # map input types to rpc msg
3828 msg
= dict(type='ModelManager',
3829 request
='UnsetModelDefaults',
3832 _params
['keys'] = keys
3833 reply
= await self
.rpc(msg
)
3838 class ProvisionerFacade(Type
):
3839 name
= 'Provisioner'
3841 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
3842 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
3845 'required': ['servers'],
3847 'Address': {'additionalProperties': False,
3848 'properties': {'scope': {'type': 'string'},
3849 'space-name': {'type': 'string'},
3850 'type': {'type': 'string'},
3851 'value': {'type': 'string'}},
3852 'required': ['value', 'type', 'scope'],
3854 'Binary': {'additionalProperties': False,
3855 'properties': {'Arch': {'type': 'string'},
3856 'Number': {'$ref': '#/definitions/Number'},
3857 'Series': {'type': 'string'}},
3858 'required': ['Number', 'Series', 'Arch'],
3860 'BytesResult': {'additionalProperties': False,
3861 'properties': {'result': {'items': {'type': 'integer'},
3863 'required': ['result'],
3865 'CloudImageMetadata': {'additionalProperties': False,
3866 'properties': {'arch': {'type': 'string'},
3867 'image-id': {'type': 'string'},
3868 'priority': {'type': 'integer'},
3869 'region': {'type': 'string'},
3870 'root-storage-size': {'type': 'integer'},
3871 'root-storage-type': {'type': 'string'},
3872 'series': {'type': 'string'},
3873 'source': {'type': 'string'},
3874 'stream': {'type': 'string'},
3875 'version': {'type': 'string'},
3876 'virt-type': {'type': 'string'}},
3877 'required': ['image-id',
3885 'ConstraintsResult': {'additionalProperties': False,
3886 'properties': {'constraints': {'$ref': '#/definitions/Value'},
3887 'error': {'$ref': '#/definitions/Error'}},
3888 'required': ['constraints'],
3890 'ConstraintsResults': {'additionalProperties': False,
3891 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
3893 'required': ['results'],
3895 'ContainerConfig': {'additionalProperties': False,
3896 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
3897 'apt-mirror': {'type': 'string'},
3898 'apt-proxy': {'$ref': '#/definitions/Settings'},
3899 'authorized-keys': {'type': 'string'},
3900 'provider-type': {'type': 'string'},
3901 'proxy': {'$ref': '#/definitions/Settings'},
3902 'ssl-hostname-verification': {'type': 'boolean'}},
3903 'required': ['provider-type',
3905 'ssl-hostname-verification',
3911 'ContainerManagerConfig': {'additionalProperties': False,
3912 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
3914 'required': ['config'],
3916 'ContainerManagerConfigParams': {'additionalProperties': False,
3917 'properties': {'type': {'type': 'string'}},
3918 'required': ['type'],
3920 'ControllerConfigResult': {'additionalProperties': False,
3921 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
3924 'required': ['config'],
3926 'DeviceBridgeInfo': {'additionalProperties': False,
3927 'properties': {'bridge-name': {'type': 'string'},
3928 'host-device-name': {'type': 'string'}},
3929 'required': ['host-device-name',
3932 'DistributionGroupResult': {'additionalProperties': False,
3933 'properties': {'error': {'$ref': '#/definitions/Error'},
3934 'result': {'items': {'type': 'string'},
3936 'required': ['result'],
3938 'DistributionGroupResults': {'additionalProperties': False,
3939 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
3941 'required': ['results'],
3943 'Entities': {'additionalProperties': False,
3944 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3946 'required': ['entities'],
3948 'Entity': {'additionalProperties': False,
3949 'properties': {'tag': {'type': 'string'}},
3950 'required': ['tag'],
3952 'EntityPassword': {'additionalProperties': False,
3953 'properties': {'password': {'type': 'string'},
3954 'tag': {'type': 'string'}},
3955 'required': ['tag', 'password'],
3957 'EntityPasswords': {'additionalProperties': False,
3958 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
3960 'required': ['changes'],
3962 'EntityStatusArgs': {'additionalProperties': False,
3963 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3966 'info': {'type': 'string'},
3967 'status': {'type': 'string'},
3968 'tag': {'type': 'string'}},
3974 'Error': {'additionalProperties': False,
3975 'properties': {'code': {'type': 'string'},
3976 'info': {'$ref': '#/definitions/ErrorInfo'},
3977 'message': {'type': 'string'}},
3978 'required': ['message', 'code'],
3980 'ErrorInfo': {'additionalProperties': False,
3981 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3982 'macaroon-path': {'type': 'string'}},
3984 'ErrorResult': {'additionalProperties': False,
3985 'properties': {'error': {'$ref': '#/definitions/Error'}},
3987 'ErrorResults': {'additionalProperties': False,
3988 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3990 'required': ['results'],
3992 'FindToolsParams': {'additionalProperties': False,
3993 'properties': {'arch': {'type': 'string'},
3994 'major': {'type': 'integer'},
3995 'minor': {'type': 'integer'},
3996 'number': {'$ref': '#/definitions/Number'},
3997 'series': {'type': 'string'}},
3998 'required': ['number',
4004 'FindToolsResult': {'additionalProperties': False,
4005 'properties': {'error': {'$ref': '#/definitions/Error'},
4006 'list': {'items': {'$ref': '#/definitions/Tools'},
4008 'required': ['list'],
4010 'HardwareCharacteristics': {'additionalProperties': False,
4011 'properties': {'arch': {'type': 'string'},
4012 'availability-zone': {'type': 'string'},
4013 'cpu-cores': {'type': 'integer'},
4014 'cpu-power': {'type': 'integer'},
4015 'mem': {'type': 'integer'},
4016 'root-disk': {'type': 'integer'},
4017 'tags': {'items': {'type': 'string'},
4020 'HostNetworkChange': {'additionalProperties': False,
4021 'properties': {'error': {'$ref': '#/definitions/Error'},
4022 'new-bridges': {'items': {'$ref': '#/definitions/DeviceBridgeInfo'},
4024 'reconfigure-delay': {'type': 'integer'}},
4025 'required': ['new-bridges',
4026 'reconfigure-delay'],
4028 'HostNetworkChangeResults': {'additionalProperties': False,
4029 'properties': {'results': {'items': {'$ref': '#/definitions/HostNetworkChange'},
4031 'required': ['results'],
4033 'HostPort': {'additionalProperties': False,
4034 'properties': {'Address': {'$ref': '#/definitions/Address'},
4035 'port': {'type': 'integer'}},
4036 'required': ['Address', 'port'],
4038 'InstanceInfo': {'additionalProperties': False,
4039 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
4040 'instance-id': {'type': 'string'},
4041 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
4043 'nonce': {'type': 'string'},
4044 'tag': {'type': 'string'},
4045 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
4047 'volumes': {'items': {'$ref': '#/definitions/Volume'},
4054 'volume-attachments',
4057 'InstancesInfo': {'additionalProperties': False,
4058 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
4060 'required': ['machines'],
4062 'LifeResult': {'additionalProperties': False,
4063 'properties': {'error': {'$ref': '#/definitions/Error'},
4064 'life': {'type': 'string'}},
4065 'required': ['life'],
4067 'LifeResults': {'additionalProperties': False,
4068 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
4070 'required': ['results'],
4072 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4073 'MachineContainers': {'additionalProperties': False,
4074 'properties': {'container-types': {'items': {'type': 'string'},
4076 'machine-tag': {'type': 'string'}},
4077 'required': ['machine-tag',
4080 'MachineContainersParams': {'additionalProperties': False,
4081 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
4083 'required': ['params'],
4085 'MachineNetworkConfigResult': {'additionalProperties': False,
4086 'properties': {'error': {'$ref': '#/definitions/Error'},
4087 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
4089 'required': ['info'],
4091 'MachineNetworkConfigResults': {'additionalProperties': False,
4092 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
4094 'required': ['results'],
4096 'ModelConfigResult': {'additionalProperties': False,
4097 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
4100 'required': ['config'],
4102 'NetworkConfig': {'additionalProperties': False,
4103 'properties': {'address': {'type': 'string'},
4104 'cidr': {'type': 'string'},
4105 'config-type': {'type': 'string'},
4106 'device-index': {'type': 'integer'},
4107 'disabled': {'type': 'boolean'},
4108 'dns-search-domains': {'items': {'type': 'string'},
4110 'dns-servers': {'items': {'type': 'string'},
4112 'gateway-address': {'type': 'string'},
4113 'interface-name': {'type': 'string'},
4114 'interface-type': {'type': 'string'},
4115 'mac-address': {'type': 'string'},
4116 'mtu': {'type': 'integer'},
4117 'no-auto-start': {'type': 'boolean'},
4118 'parent-interface-name': {'type': 'string'},
4119 'provider-address-id': {'type': 'string'},
4120 'provider-id': {'type': 'string'},
4121 'provider-space-id': {'type': 'string'},
4122 'provider-subnet-id': {'type': 'string'},
4123 'provider-vlan-id': {'type': 'string'},
4124 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
4126 'vlan-tag': {'type': 'integer'}},
4127 'required': ['device-index',
4132 'provider-subnet-id',
4133 'provider-space-id',
4134 'provider-address-id',
4138 'parent-interface-name',
4142 'NetworkRoute': {'additionalProperties': False,
4143 'properties': {'destination-cidr': {'type': 'string'},
4144 'gateway-ip': {'type': 'string'},
4145 'metric': {'type': 'integer'}},
4146 'required': ['destination-cidr',
4150 'NotifyWatchResult': {'additionalProperties': False,
4151 'properties': {'NotifyWatcherId': {'type': 'string'},
4152 'error': {'$ref': '#/definitions/Error'}},
4153 'required': ['NotifyWatcherId'],
4155 'Number': {'additionalProperties': False,
4156 'properties': {'Build': {'type': 'integer'},
4157 'Major': {'type': 'integer'},
4158 'Minor': {'type': 'integer'},
4159 'Patch': {'type': 'integer'},
4160 'Tag': {'type': 'string'}},
4161 'required': ['Major',
4167 'ProvisioningInfo': {'additionalProperties': False,
4168 'properties': {'constraints': {'$ref': '#/definitions/Value'},
4169 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
4172 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
4174 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
4176 'jobs': {'items': {'type': 'string'},
4178 'placement': {'type': 'string'},
4179 'series': {'type': 'string'},
4180 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
4183 'tags': {'patternProperties': {'.*': {'type': 'string'}},
4185 'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachmentParams'},
4187 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
4189 'required': ['constraints',
4194 'ProvisioningInfoResult': {'additionalProperties': False,
4195 'properties': {'error': {'$ref': '#/definitions/Error'},
4196 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
4197 'required': ['result'],
4199 'ProvisioningInfoResults': {'additionalProperties': False,
4200 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
4202 'required': ['results'],
4204 'SetMachineNetworkConfig': {'additionalProperties': False,
4205 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
4207 'tag': {'type': 'string'}},
4208 'required': ['tag', 'config'],
4210 'SetStatus': {'additionalProperties': False,
4211 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
4213 'required': ['entities'],
4215 'Settings': {'additionalProperties': False,
4216 'properties': {'AutoNoProxy': {'type': 'string'},
4217 'Ftp': {'type': 'string'},
4218 'Http': {'type': 'string'},
4219 'Https': {'type': 'string'},
4220 'NoProxy': {'type': 'string'}},
4221 'required': ['Http',
4227 'StatusResult': {'additionalProperties': False,
4228 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
4231 'error': {'$ref': '#/definitions/Error'},
4232 'id': {'type': 'string'},
4233 'info': {'type': 'string'},
4234 'life': {'type': 'string'},
4235 'since': {'format': 'date-time',
4237 'status': {'type': 'string'}},
4245 'StatusResults': {'additionalProperties': False,
4246 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
4248 'required': ['results'],
4250 'StringResult': {'additionalProperties': False,
4251 'properties': {'error': {'$ref': '#/definitions/Error'},
4252 'result': {'type': 'string'}},
4253 'required': ['result'],
4255 'StringResults': {'additionalProperties': False,
4256 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
4258 'required': ['results'],
4260 'StringsResult': {'additionalProperties': False,
4261 'properties': {'error': {'$ref': '#/definitions/Error'},
4262 'result': {'items': {'type': 'string'},
4265 'StringsWatchResult': {'additionalProperties': False,
4266 'properties': {'changes': {'items': {'type': 'string'},
4268 'error': {'$ref': '#/definitions/Error'},
4269 'watcher-id': {'type': 'string'}},
4270 'required': ['watcher-id'],
4272 'StringsWatchResults': {'additionalProperties': False,
4273 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
4275 'required': ['results'],
4277 'Tools': {'additionalProperties': False,
4278 'properties': {'sha256': {'type': 'string'},
4279 'size': {'type': 'integer'},
4280 'url': {'type': 'string'},
4281 'version': {'$ref': '#/definitions/Binary'}},
4282 'required': ['version', 'url', 'size'],
4284 'ToolsResult': {'additionalProperties': False,
4285 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
4286 'error': {'$ref': '#/definitions/Error'},
4287 'tools': {'items': {'$ref': '#/definitions/Tools'},
4289 'required': ['tools',
4290 'disable-ssl-hostname-verification'],
4292 'ToolsResults': {'additionalProperties': False,
4293 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
4295 'required': ['results'],
4297 'UpdateBehavior': {'additionalProperties': False,
4298 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
4299 'enable-os-upgrade': {'type': 'boolean'}},
4300 'required': ['enable-os-refresh-update',
4301 'enable-os-upgrade'],
4303 'Value': {'additionalProperties': False,
4304 'properties': {'arch': {'type': 'string'},
4305 'container': {'type': 'string'},
4306 'cores': {'type': 'integer'},
4307 'cpu-power': {'type': 'integer'},
4308 'instance-type': {'type': 'string'},
4309 'mem': {'type': 'integer'},
4310 'root-disk': {'type': 'integer'},
4311 'spaces': {'items': {'type': 'string'},
4313 'tags': {'items': {'type': 'string'},
4315 'virt-type': {'type': 'string'}},
4317 'Volume': {'additionalProperties': False,
4318 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
4319 'volume-tag': {'type': 'string'}},
4320 'required': ['volume-tag', 'info'],
4322 'VolumeAttachmentInfo': {'additionalProperties': False,
4323 'properties': {'bus-address': {'type': 'string'},
4324 'device-link': {'type': 'string'},
4325 'device-name': {'type': 'string'},
4326 'read-only': {'type': 'boolean'}},
4328 'VolumeAttachmentParams': {'additionalProperties': False,
4329 'properties': {'instance-id': {'type': 'string'},
4330 'machine-tag': {'type': 'string'},
4331 'provider': {'type': 'string'},
4332 'read-only': {'type': 'boolean'},
4333 'volume-id': {'type': 'string'},
4334 'volume-tag': {'type': 'string'}},
4335 'required': ['volume-tag',
4339 'VolumeInfo': {'additionalProperties': False,
4340 'properties': {'hardware-id': {'type': 'string'},
4341 'persistent': {'type': 'boolean'},
4342 'pool': {'type': 'string'},
4343 'size': {'type': 'integer'},
4344 'volume-id': {'type': 'string'},
4345 'wwn': {'type': 'string'}},
4346 'required': ['volume-id', 'size', 'persistent'],
4348 'VolumeParams': {'additionalProperties': False,
4349 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
4350 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
4353 'provider': {'type': 'string'},
4354 'size': {'type': 'integer'},
4355 'tags': {'patternProperties': {'.*': {'type': 'string'}},
4357 'volume-tag': {'type': 'string'}},
4358 'required': ['volume-tag',
4362 'WatchContainer': {'additionalProperties': False,
4363 'properties': {'container-type': {'type': 'string'},
4364 'machine-tag': {'type': 'string'}},
4365 'required': ['machine-tag',
4368 'WatchContainers': {'additionalProperties': False,
4369 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
4371 'required': ['params'],
4373 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
4375 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
4377 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
4379 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4380 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
4382 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
4384 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
4385 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
4387 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
4389 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4390 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
4392 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4393 'Result': {'$ref': '#/definitions/ErrorResults'}},
4395 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
4396 'Result': {'$ref': '#/definitions/FindToolsResult'}},
4398 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4399 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
4401 'HostChangesForContainers': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4402 'Result': {'$ref': '#/definitions/HostNetworkChangeResults'}},
4404 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4405 'Result': {'$ref': '#/definitions/StringResults'}},
4407 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4408 'Result': {'$ref': '#/definitions/StatusResults'}},
4410 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4411 'Result': {'$ref': '#/definitions/LifeResults'}},
4413 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
4415 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4416 'Result': {'$ref': '#/definitions/ErrorResults'}},
4418 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
4420 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
4422 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4423 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
4425 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4426 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
4428 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4429 'Result': {'$ref': '#/definitions/ErrorResults'}},
4431 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4432 'Result': {'$ref': '#/definitions/ErrorResults'}},
4434 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4435 'Result': {'$ref': '#/definitions/StringResults'}},
4437 'SetHostMachineNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
4439 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
4440 'Result': {'$ref': '#/definitions/ErrorResults'}},
4442 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4443 'Result': {'$ref': '#/definitions/ErrorResults'}},
4445 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
4447 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
4448 'Result': {'$ref': '#/definitions/ErrorResults'}},
4450 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4451 'Result': {'$ref': '#/definitions/ErrorResults'}},
4453 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4454 'Result': {'$ref': '#/definitions/ErrorResults'}},
4456 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
4457 'Result': {'$ref': '#/definitions/ErrorResults'}},
4459 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
4461 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4462 'Result': {'$ref': '#/definitions/StatusResults'}},
4464 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4465 'Result': {'$ref': '#/definitions/ToolsResults'}},
4467 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4468 'Result': {'$ref': '#/definitions/ErrorResults'}},
4470 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4472 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
4473 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4475 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
4476 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4478 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4480 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4482 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
4487 @ReturnMapping(StringsResult
)
4488 async def APIAddresses(self
):
4491 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
4493 # map input types to rpc msg
4495 msg
= dict(type='Provisioner',
4496 request
='APIAddresses',
4500 reply
= await self
.rpc(msg
)
4505 @ReturnMapping(APIHostPortsResult
)
4506 async def APIHostPorts(self
):
4509 Returns -> typing.Sequence[~HostPort]
4511 # map input types to rpc msg
4513 msg
= dict(type='Provisioner',
4514 request
='APIHostPorts',
4518 reply
= await self
.rpc(msg
)
4523 @ReturnMapping(BytesResult
)
4524 async def CACert(self
):
4527 Returns -> typing.Sequence[int]
4529 # map input types to rpc msg
4531 msg
= dict(type='Provisioner',
4536 reply
= await self
.rpc(msg
)
4541 @ReturnMapping(ConstraintsResults
)
4542 async def Constraints(self
, entities
):
4544 entities : typing.Sequence[~Entity]
4545 Returns -> typing.Sequence[~ConstraintsResult]
4547 # map input types to rpc msg
4549 msg
= dict(type='Provisioner',
4550 request
='Constraints',
4553 _params
['entities'] = entities
4554 reply
= await self
.rpc(msg
)
4559 @ReturnMapping(ContainerConfig
)
4560 async def ContainerConfig(self
):
4563 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), bool]
4565 # map input types to rpc msg
4567 msg
= dict(type='Provisioner',
4568 request
='ContainerConfig',
4572 reply
= await self
.rpc(msg
)
4577 @ReturnMapping(ContainerManagerConfig
)
4578 async def ContainerManagerConfig(self
, type_
):
4581 Returns -> typing.Mapping[str, str]
4583 # map input types to rpc msg
4585 msg
= dict(type='Provisioner',
4586 request
='ContainerManagerConfig',
4589 _params
['type'] = type_
4590 reply
= await self
.rpc(msg
)
4595 @ReturnMapping(ControllerConfigResult
)
4596 async def ControllerConfig(self
):
4599 Returns -> typing.Mapping[str, typing.Any]
4601 # map input types to rpc msg
4603 msg
= dict(type='Provisioner',
4604 request
='ControllerConfig',
4608 reply
= await self
.rpc(msg
)
4613 @ReturnMapping(DistributionGroupResults
)
4614 async def DistributionGroup(self
, entities
):
4616 entities : typing.Sequence[~Entity]
4617 Returns -> typing.Sequence[~DistributionGroupResult]
4619 # map input types to rpc msg
4621 msg
= dict(type='Provisioner',
4622 request
='DistributionGroup',
4625 _params
['entities'] = entities
4626 reply
= await self
.rpc(msg
)
4631 @ReturnMapping(ErrorResults
)
4632 async def EnsureDead(self
, entities
):
4634 entities : typing.Sequence[~Entity]
4635 Returns -> typing.Sequence[~ErrorResult]
4637 # map input types to rpc msg
4639 msg
= dict(type='Provisioner',
4640 request
='EnsureDead',
4643 _params
['entities'] = entities
4644 reply
= await self
.rpc(msg
)
4649 @ReturnMapping(FindToolsResult
)
4650 async def FindTools(self
, arch
, major
, minor
, number
, series
):
4657 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
4659 # map input types to rpc msg
4661 msg
= dict(type='Provisioner',
4662 request
='FindTools',
4665 _params
['arch'] = arch
4666 _params
['major'] = major
4667 _params
['minor'] = minor
4668 _params
['number'] = number
4669 _params
['series'] = series
4670 reply
= await self
.rpc(msg
)
4675 @ReturnMapping(MachineNetworkConfigResults
)
4676 async def GetContainerInterfaceInfo(self
, entities
):
4678 entities : typing.Sequence[~Entity]
4679 Returns -> typing.Sequence[~MachineNetworkConfigResult]
4681 # map input types to rpc msg
4683 msg
= dict(type='Provisioner',
4684 request
='GetContainerInterfaceInfo',
4687 _params
['entities'] = entities
4688 reply
= await self
.rpc(msg
)
4693 @ReturnMapping(HostNetworkChangeResults
)
4694 async def HostChangesForContainers(self
, entities
):
4696 entities : typing.Sequence[~Entity]
4697 Returns -> typing.Sequence[~HostNetworkChange]
4699 # map input types to rpc msg
4701 msg
= dict(type='Provisioner',
4702 request
='HostChangesForContainers',
4705 _params
['entities'] = entities
4706 reply
= await self
.rpc(msg
)
4711 @ReturnMapping(StringResults
)
4712 async def InstanceId(self
, entities
):
4714 entities : typing.Sequence[~Entity]
4715 Returns -> typing.Sequence[~StringResult]
4717 # map input types to rpc msg
4719 msg
= dict(type='Provisioner',
4720 request
='InstanceId',
4723 _params
['entities'] = entities
4724 reply
= await self
.rpc(msg
)
4729 @ReturnMapping(StatusResults
)
4730 async def InstanceStatus(self
, entities
):
4732 entities : typing.Sequence[~Entity]
4733 Returns -> typing.Sequence[~StatusResult]
4735 # map input types to rpc msg
4737 msg
= dict(type='Provisioner',
4738 request
='InstanceStatus',
4741 _params
['entities'] = entities
4742 reply
= await self
.rpc(msg
)
4747 @ReturnMapping(LifeResults
)
4748 async def Life(self
, entities
):
4750 entities : typing.Sequence[~Entity]
4751 Returns -> typing.Sequence[~LifeResult]
4753 # map input types to rpc msg
4755 msg
= dict(type='Provisioner',
4759 _params
['entities'] = entities
4760 reply
= await self
.rpc(msg
)
4765 @ReturnMapping(StatusResults
)
4766 async def MachinesWithTransientErrors(self
):
4769 Returns -> typing.Sequence[~StatusResult]
4771 # map input types to rpc msg
4773 msg
= dict(type='Provisioner',
4774 request
='MachinesWithTransientErrors',
4778 reply
= await self
.rpc(msg
)
4783 @ReturnMapping(ErrorResults
)
4784 async def MarkMachinesForRemoval(self
, entities
):
4786 entities : typing.Sequence[~Entity]
4787 Returns -> typing.Sequence[~ErrorResult]
4789 # map input types to rpc msg
4791 msg
= dict(type='Provisioner',
4792 request
='MarkMachinesForRemoval',
4795 _params
['entities'] = entities
4796 reply
= await self
.rpc(msg
)
4801 @ReturnMapping(ModelConfigResult
)
4802 async def ModelConfig(self
):
4805 Returns -> typing.Mapping[str, typing.Any]
4807 # map input types to rpc msg
4809 msg
= dict(type='Provisioner',
4810 request
='ModelConfig',
4814 reply
= await self
.rpc(msg
)
4819 @ReturnMapping(StringResult
)
4820 async def ModelUUID(self
):
4823 Returns -> typing.Union[_ForwardRef('Error'), str]
4825 # map input types to rpc msg
4827 msg
= dict(type='Provisioner',
4828 request
='ModelUUID',
4832 reply
= await self
.rpc(msg
)
4837 @ReturnMapping(MachineNetworkConfigResults
)
4838 async def PrepareContainerInterfaceInfo(self
, entities
):
4840 entities : typing.Sequence[~Entity]
4841 Returns -> typing.Sequence[~MachineNetworkConfigResult]
4843 # map input types to rpc msg
4845 msg
= dict(type='Provisioner',
4846 request
='PrepareContainerInterfaceInfo',
4849 _params
['entities'] = entities
4850 reply
= await self
.rpc(msg
)
4855 @ReturnMapping(ProvisioningInfoResults
)
4856 async def ProvisioningInfo(self
, entities
):
4858 entities : typing.Sequence[~Entity]
4859 Returns -> typing.Sequence[~ProvisioningInfoResult]
4861 # map input types to rpc msg
4863 msg
= dict(type='Provisioner',
4864 request
='ProvisioningInfo',
4867 _params
['entities'] = entities
4868 reply
= await self
.rpc(msg
)
4873 @ReturnMapping(ErrorResults
)
4874 async def ReleaseContainerAddresses(self
, entities
):
4876 entities : typing.Sequence[~Entity]
4877 Returns -> typing.Sequence[~ErrorResult]
4879 # map input types to rpc msg
4881 msg
= dict(type='Provisioner',
4882 request
='ReleaseContainerAddresses',
4885 _params
['entities'] = entities
4886 reply
= await self
.rpc(msg
)
4891 @ReturnMapping(ErrorResults
)
4892 async def Remove(self
, entities
):
4894 entities : typing.Sequence[~Entity]
4895 Returns -> typing.Sequence[~ErrorResult]
4897 # map input types to rpc msg
4899 msg
= dict(type='Provisioner',
4903 _params
['entities'] = entities
4904 reply
= await self
.rpc(msg
)
4909 @ReturnMapping(StringResults
)
4910 async def Series(self
, entities
):
4912 entities : typing.Sequence[~Entity]
4913 Returns -> typing.Sequence[~StringResult]
4915 # map input types to rpc msg
4917 msg
= dict(type='Provisioner',
4921 _params
['entities'] = entities
4922 reply
= await self
.rpc(msg
)
4927 @ReturnMapping(None)
4928 async def SetHostMachineNetworkConfig(self
, config
, tag
):
4930 config : typing.Sequence[~NetworkConfig]
4934 # map input types to rpc msg
4936 msg
= dict(type='Provisioner',
4937 request
='SetHostMachineNetworkConfig',
4940 _params
['config'] = config
4941 _params
['tag'] = tag
4942 reply
= await self
.rpc(msg
)
4947 @ReturnMapping(ErrorResults
)
4948 async def SetInstanceInfo(self
, machines
):
4950 machines : typing.Sequence[~InstanceInfo]
4951 Returns -> typing.Sequence[~ErrorResult]
4953 # map input types to rpc msg
4955 msg
= dict(type='Provisioner',
4956 request
='SetInstanceInfo',
4959 _params
['machines'] = machines
4960 reply
= await self
.rpc(msg
)
4965 @ReturnMapping(ErrorResults
)
4966 async def SetInstanceStatus(self
, entities
):
4968 entities : typing.Sequence[~EntityStatusArgs]
4969 Returns -> typing.Sequence[~ErrorResult]
4971 # map input types to rpc msg
4973 msg
= dict(type='Provisioner',
4974 request
='SetInstanceStatus',
4977 _params
['entities'] = entities
4978 reply
= await self
.rpc(msg
)
4983 @ReturnMapping(None)
4984 async def SetObservedNetworkConfig(self
, config
, tag
):
4986 config : typing.Sequence[~NetworkConfig]
4990 # map input types to rpc msg
4992 msg
= dict(type='Provisioner',
4993 request
='SetObservedNetworkConfig',
4996 _params
['config'] = config
4997 _params
['tag'] = tag
4998 reply
= await self
.rpc(msg
)
5003 @ReturnMapping(ErrorResults
)
5004 async def SetPasswords(self
, changes
):
5006 changes : typing.Sequence[~EntityPassword]
5007 Returns -> typing.Sequence[~ErrorResult]
5009 # map input types to rpc msg
5011 msg
= dict(type='Provisioner',
5012 request
='SetPasswords',
5015 _params
['changes'] = changes
5016 reply
= await self
.rpc(msg
)
5021 @ReturnMapping(ErrorResults
)
5022 async def SetProviderNetworkConfig(self
, entities
):
5024 entities : typing.Sequence[~Entity]
5025 Returns -> typing.Sequence[~ErrorResult]
5027 # map input types to rpc msg
5029 msg
= dict(type='Provisioner',
5030 request
='SetProviderNetworkConfig',
5033 _params
['entities'] = entities
5034 reply
= await self
.rpc(msg
)
5039 @ReturnMapping(ErrorResults
)
5040 async def SetStatus(self
, entities
):
5042 entities : typing.Sequence[~EntityStatusArgs]
5043 Returns -> typing.Sequence[~ErrorResult]
5045 # map input types to rpc msg
5047 msg
= dict(type='Provisioner',
5048 request
='SetStatus',
5051 _params
['entities'] = entities
5052 reply
= await self
.rpc(msg
)
5057 @ReturnMapping(ErrorResults
)
5058 async def SetSupportedContainers(self
, params
):
5060 params : typing.Sequence[~MachineContainers]
5061 Returns -> typing.Sequence[~ErrorResult]
5063 # map input types to rpc msg
5065 msg
= dict(type='Provisioner',
5066 request
='SetSupportedContainers',
5069 _params
['params'] = params
5070 reply
= await self
.rpc(msg
)
5075 @ReturnMapping(StringsResult
)
5076 async def StateAddresses(self
):
5079 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
5081 # map input types to rpc msg
5083 msg
= dict(type='Provisioner',
5084 request
='StateAddresses',
5088 reply
= await self
.rpc(msg
)
5093 @ReturnMapping(StatusResults
)
5094 async def Status(self
, entities
):
5096 entities : typing.Sequence[~Entity]
5097 Returns -> typing.Sequence[~StatusResult]
5099 # map input types to rpc msg
5101 msg
= dict(type='Provisioner',
5105 _params
['entities'] = entities
5106 reply
= await self
.rpc(msg
)
5111 @ReturnMapping(ToolsResults
)
5112 async def Tools(self
, entities
):
5114 entities : typing.Sequence[~Entity]
5115 Returns -> typing.Sequence[~ToolsResult]
5117 # map input types to rpc msg
5119 msg
= dict(type='Provisioner',
5123 _params
['entities'] = entities
5124 reply
= await self
.rpc(msg
)
5129 @ReturnMapping(ErrorResults
)
5130 async def UpdateStatus(self
, entities
):
5132 entities : typing.Sequence[~EntityStatusArgs]
5133 Returns -> typing.Sequence[~ErrorResult]
5135 # map input types to rpc msg
5137 msg
= dict(type='Provisioner',
5138 request
='UpdateStatus',
5141 _params
['entities'] = entities
5142 reply
= await self
.rpc(msg
)
5147 @ReturnMapping(NotifyWatchResult
)
5148 async def WatchAPIHostPorts(self
):
5151 Returns -> typing.Union[str, _ForwardRef('Error')]
5153 # map input types to rpc msg
5155 msg
= dict(type='Provisioner',
5156 request
='WatchAPIHostPorts',
5160 reply
= await self
.rpc(msg
)
5165 @ReturnMapping(StringsWatchResults
)
5166 async def WatchAllContainers(self
, params
):
5168 params : typing.Sequence[~WatchContainer]
5169 Returns -> typing.Sequence[~StringsWatchResult]
5171 # map input types to rpc msg
5173 msg
= dict(type='Provisioner',
5174 request
='WatchAllContainers',
5177 _params
['params'] = params
5178 reply
= await self
.rpc(msg
)
5183 @ReturnMapping(StringsWatchResults
)
5184 async def WatchContainers(self
, params
):
5186 params : typing.Sequence[~WatchContainer]
5187 Returns -> typing.Sequence[~StringsWatchResult]
5189 # map input types to rpc msg
5191 msg
= dict(type='Provisioner',
5192 request
='WatchContainers',
5195 _params
['params'] = params
5196 reply
= await self
.rpc(msg
)
5201 @ReturnMapping(NotifyWatchResult
)
5202 async def WatchForModelConfigChanges(self
):
5205 Returns -> typing.Union[str, _ForwardRef('Error')]
5207 # map input types to rpc msg
5209 msg
= dict(type='Provisioner',
5210 request
='WatchForModelConfigChanges',
5214 reply
= await self
.rpc(msg
)
5219 @ReturnMapping(NotifyWatchResult
)
5220 async def WatchMachineErrorRetry(self
):
5223 Returns -> typing.Union[str, _ForwardRef('Error')]
5225 # map input types to rpc msg
5227 msg
= dict(type='Provisioner',
5228 request
='WatchMachineErrorRetry',
5232 reply
= await self
.rpc(msg
)
5237 @ReturnMapping(StringsWatchResult
)
5238 async def WatchModelMachines(self
):
5241 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
5243 # map input types to rpc msg
5245 msg
= dict(type='Provisioner',
5246 request
='WatchModelMachines',
5250 reply
= await self
.rpc(msg
)
5255 class SpacesFacade(Type
):
5258 schema
= {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
5259 'properties': {'provider-id': {'type': 'string'},
5260 'public': {'type': 'boolean'},
5261 'space-tag': {'type': 'string'},
5262 'subnet-tags': {'items': {'type': 'string'},
5264 'required': ['subnet-tags',
5268 'CreateSpacesParams': {'additionalProperties': False,
5269 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
5271 'required': ['spaces'],
5273 'Error': {'additionalProperties': False,
5274 'properties': {'code': {'type': 'string'},
5275 'info': {'$ref': '#/definitions/ErrorInfo'},
5276 'message': {'type': 'string'}},
5277 'required': ['message', 'code'],
5279 'ErrorInfo': {'additionalProperties': False,
5280 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5281 'macaroon-path': {'type': 'string'}},
5283 'ErrorResult': {'additionalProperties': False,
5284 'properties': {'error': {'$ref': '#/definitions/Error'}},
5286 'ErrorResults': {'additionalProperties': False,
5287 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5289 'required': ['results'],
5291 'ListSpacesResults': {'additionalProperties': False,
5292 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
5294 'required': ['results'],
5296 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5297 'Space': {'additionalProperties': False,
5298 'properties': {'error': {'$ref': '#/definitions/Error'},
5299 'name': {'type': 'string'},
5300 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
5302 'required': ['name', 'subnets'],
5304 'Subnet': {'additionalProperties': False,
5305 'properties': {'cidr': {'type': 'string'},
5306 'life': {'type': 'string'},
5307 'provider-id': {'type': 'string'},
5308 'provider-network-id': {'type': 'string'},
5309 'provider-space-id': {'type': 'string'},
5310 'space-tag': {'type': 'string'},
5311 'status': {'type': 'string'},
5312 'vlan-tag': {'type': 'integer'},
5313 'zones': {'items': {'type': 'string'},
5315 'required': ['cidr',
5321 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
5322 'Result': {'$ref': '#/definitions/ErrorResults'}},
5324 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
5326 'ReloadSpaces': {'type': 'object'}},
5330 @ReturnMapping(ErrorResults
)
5331 async def CreateSpaces(self
, spaces
):
5333 spaces : typing.Sequence[~CreateSpaceParams]
5334 Returns -> typing.Sequence[~ErrorResult]
5336 # map input types to rpc msg
5338 msg
= dict(type='Spaces',
5339 request
='CreateSpaces',
5342 _params
['spaces'] = spaces
5343 reply
= await self
.rpc(msg
)
5348 @ReturnMapping(ListSpacesResults
)
5349 async def ListSpaces(self
):
5352 Returns -> typing.Sequence[~Space]
5354 # map input types to rpc msg
5356 msg
= dict(type='Spaces',
5357 request
='ListSpaces',
5361 reply
= await self
.rpc(msg
)
5366 @ReturnMapping(None)
5367 async def ReloadSpaces(self
):
5372 # map input types to rpc msg
5374 msg
= dict(type='Spaces',
5375 request
='ReloadSpaces',
5379 reply
= await self
.rpc(msg
)
5384 class StorageFacade(Type
):
5387 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5388 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5390 'required': ['entities'],
5392 'Entity': {'additionalProperties': False,
5393 'properties': {'tag': {'type': 'string'}},
5394 'required': ['tag'],
5396 'EntityStatus': {'additionalProperties': False,
5397 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
5400 'info': {'type': 'string'},
5401 'since': {'format': 'date-time',
5403 'status': {'type': 'string'}},
5404 'required': ['status', 'info', 'since'],
5406 'Error': {'additionalProperties': False,
5407 'properties': {'code': {'type': 'string'},
5408 'info': {'$ref': '#/definitions/ErrorInfo'},
5409 'message': {'type': 'string'}},
5410 'required': ['message', 'code'],
5412 'ErrorInfo': {'additionalProperties': False,
5413 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5414 'macaroon-path': {'type': 'string'}},
5416 'ErrorResult': {'additionalProperties': False,
5417 'properties': {'error': {'$ref': '#/definitions/Error'}},
5419 'ErrorResults': {'additionalProperties': False,
5420 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5422 'required': ['results'],
5424 'FilesystemAttachmentDetails': {'additionalProperties': False,
5425 'properties': {'FilesystemAttachmentInfo': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
5426 'life': {'type': 'string'}},
5427 'required': ['FilesystemAttachmentInfo'],
5429 'FilesystemAttachmentInfo': {'additionalProperties': False,
5430 'properties': {'mount-point': {'type': 'string'},
5431 'read-only': {'type': 'boolean'}},
5433 'FilesystemDetails': {'additionalProperties': False,
5434 'properties': {'filesystem-tag': {'type': 'string'},
5435 'info': {'$ref': '#/definitions/FilesystemInfo'},
5436 'life': {'type': 'string'},
5437 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentDetails'}},
5439 'status': {'$ref': '#/definitions/EntityStatus'},
5440 'storage': {'$ref': '#/definitions/StorageDetails'},
5441 'volume-tag': {'type': 'string'}},
5442 'required': ['filesystem-tag',
5446 'FilesystemDetailsListResult': {'additionalProperties': False,
5447 'properties': {'error': {'$ref': '#/definitions/Error'},
5448 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
5451 'FilesystemDetailsListResults': {'additionalProperties': False,
5452 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
5455 'FilesystemFilter': {'additionalProperties': False,
5456 'properties': {'machines': {'items': {'type': 'string'},
5459 'FilesystemFilters': {'additionalProperties': False,
5460 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
5463 'FilesystemInfo': {'additionalProperties': False,
5464 'properties': {'filesystem-id': {'type': 'string'},
5465 'pool': {'type': 'string'},
5466 'size': {'type': 'integer'}},
5467 'required': ['filesystem-id',
5471 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5472 'StorageAddParams': {'additionalProperties': False,
5473 'properties': {'name': {'type': 'string'},
5474 'storage': {'$ref': '#/definitions/StorageConstraints'},
5475 'unit': {'type': 'string'}},
5476 'required': ['unit', 'name', 'storage'],
5478 'StorageAttachmentDetails': {'additionalProperties': False,
5479 'properties': {'life': {'type': 'string'},
5480 'location': {'type': 'string'},
5481 'machine-tag': {'type': 'string'},
5482 'storage-tag': {'type': 'string'},
5483 'unit-tag': {'type': 'string'}},
5484 'required': ['storage-tag',
5488 'StorageAttachmentId': {'additionalProperties': False,
5489 'properties': {'storage-tag': {'type': 'string'},
5490 'unit-tag': {'type': 'string'}},
5491 'required': ['storage-tag',
5494 'StorageAttachmentIds': {'additionalProperties': False,
5495 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
5497 'required': ['ids'],
5499 'StorageConstraints': {'additionalProperties': False,
5500 'properties': {'count': {'type': 'integer'},
5501 'pool': {'type': 'string'},
5502 'size': {'type': 'integer'}},
5504 'StorageDetails': {'additionalProperties': False,
5505 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
5507 'kind': {'type': 'integer'},
5508 'life': {'type': 'string'},
5509 'owner-tag': {'type': 'string'},
5510 'persistent': {'type': 'boolean'},
5511 'status': {'$ref': '#/definitions/EntityStatus'},
5512 'storage-tag': {'type': 'string'}},
5513 'required': ['storage-tag',
5519 'StorageDetailsListResult': {'additionalProperties': False,
5520 'properties': {'error': {'$ref': '#/definitions/Error'},
5521 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
5524 'StorageDetailsListResults': {'additionalProperties': False,
5525 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
5528 'StorageDetailsResult': {'additionalProperties': False,
5529 'properties': {'error': {'$ref': '#/definitions/Error'},
5530 'result': {'$ref': '#/definitions/StorageDetails'}},
5532 'StorageDetailsResults': {'additionalProperties': False,
5533 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
5536 'StorageFilter': {'additionalProperties': False,
5538 'StorageFilters': {'additionalProperties': False,
5539 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
5542 'StoragePool': {'additionalProperties': False,
5543 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
5546 'name': {'type': 'string'},
5547 'provider': {'type': 'string'}},
5548 'required': ['name', 'provider', 'attrs'],
5550 'StoragePoolFilter': {'additionalProperties': False,
5551 'properties': {'names': {'items': {'type': 'string'},
5553 'providers': {'items': {'type': 'string'},
5556 'StoragePoolFilters': {'additionalProperties': False,
5557 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
5560 'StoragePoolsResult': {'additionalProperties': False,
5561 'properties': {'error': {'$ref': '#/definitions/Error'},
5562 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
5565 'StoragePoolsResults': {'additionalProperties': False,
5566 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
5569 'StoragesAddParams': {'additionalProperties': False,
5570 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
5572 'required': ['storages'],
5574 'VolumeAttachmentDetails': {'additionalProperties': False,
5575 'properties': {'VolumeAttachmentInfo': {'$ref': '#/definitions/VolumeAttachmentInfo'},
5576 'life': {'type': 'string'}},
5577 'required': ['VolumeAttachmentInfo'],
5579 'VolumeAttachmentInfo': {'additionalProperties': False,
5580 'properties': {'bus-address': {'type': 'string'},
5581 'device-link': {'type': 'string'},
5582 'device-name': {'type': 'string'},
5583 'read-only': {'type': 'boolean'}},
5585 'VolumeDetails': {'additionalProperties': False,
5586 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
5587 'life': {'type': 'string'},
5588 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentDetails'}},
5590 'status': {'$ref': '#/definitions/EntityStatus'},
5591 'storage': {'$ref': '#/definitions/StorageDetails'},
5592 'volume-tag': {'type': 'string'}},
5593 'required': ['volume-tag', 'info', 'status'],
5595 'VolumeDetailsListResult': {'additionalProperties': False,
5596 'properties': {'error': {'$ref': '#/definitions/Error'},
5597 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
5600 'VolumeDetailsListResults': {'additionalProperties': False,
5601 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
5604 'VolumeFilter': {'additionalProperties': False,
5605 'properties': {'machines': {'items': {'type': 'string'},
5608 'VolumeFilters': {'additionalProperties': False,
5609 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
5612 'VolumeInfo': {'additionalProperties': False,
5613 'properties': {'hardware-id': {'type': 'string'},
5614 'persistent': {'type': 'boolean'},
5615 'pool': {'type': 'string'},
5616 'size': {'type': 'integer'},
5617 'volume-id': {'type': 'string'},
5618 'wwn': {'type': 'string'}},
5619 'required': ['volume-id', 'size', 'persistent'],
5621 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
5622 'Result': {'$ref': '#/definitions/ErrorResults'}},
5624 'Attach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
5625 'Result': {'$ref': '#/definitions/ErrorResults'}},
5627 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
5629 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5630 'Result': {'$ref': '#/definitions/ErrorResults'}},
5632 'Detach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
5633 'Result': {'$ref': '#/definitions/ErrorResults'}},
5635 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
5636 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
5638 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
5639 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
5641 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
5642 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
5644 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
5645 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
5647 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5648 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
5653 @ReturnMapping(ErrorResults
)
5654 async def AddToUnit(self
, storages
):
5656 storages : typing.Sequence[~StorageAddParams]
5657 Returns -> typing.Sequence[~ErrorResult]
5659 # map input types to rpc msg
5661 msg
= dict(type='Storage',
5662 request
='AddToUnit',
5665 _params
['storages'] = storages
5666 reply
= await self
.rpc(msg
)
5671 @ReturnMapping(ErrorResults
)
5672 async def Attach(self
, ids
):
5674 ids : typing.Sequence[~StorageAttachmentId]
5675 Returns -> typing.Sequence[~ErrorResult]
5677 # map input types to rpc msg
5679 msg
= dict(type='Storage',
5683 _params
['ids'] = ids
5684 reply
= await self
.rpc(msg
)
5689 @ReturnMapping(None)
5690 async def CreatePool(self
, attrs
, name
, provider
):
5692 attrs : typing.Mapping[str, typing.Any]
5697 # map input types to rpc msg
5699 msg
= dict(type='Storage',
5700 request
='CreatePool',
5703 _params
['attrs'] = attrs
5704 _params
['name'] = name
5705 _params
['provider'] = provider
5706 reply
= await self
.rpc(msg
)
5711 @ReturnMapping(ErrorResults
)
5712 async def Destroy(self
, entities
):
5714 entities : typing.Sequence[~Entity]
5715 Returns -> typing.Sequence[~ErrorResult]
5717 # map input types to rpc msg
5719 msg
= dict(type='Storage',
5723 _params
['entities'] = entities
5724 reply
= await self
.rpc(msg
)
5729 @ReturnMapping(ErrorResults
)
5730 async def Detach(self
, ids
):
5732 ids : typing.Sequence[~StorageAttachmentId]
5733 Returns -> typing.Sequence[~ErrorResult]
5735 # map input types to rpc msg
5737 msg
= dict(type='Storage',
5741 _params
['ids'] = ids
5742 reply
= await self
.rpc(msg
)
5747 @ReturnMapping(FilesystemDetailsListResults
)
5748 async def ListFilesystems(self
, filters
):
5750 filters : typing.Sequence[~FilesystemFilter]
5751 Returns -> typing.Sequence[~FilesystemDetailsListResult]
5753 # map input types to rpc msg
5755 msg
= dict(type='Storage',
5756 request
='ListFilesystems',
5759 _params
['filters'] = filters
5760 reply
= await self
.rpc(msg
)
5765 @ReturnMapping(StoragePoolsResults
)
5766 async def ListPools(self
, filters
):
5768 filters : typing.Sequence[~StoragePoolFilter]
5769 Returns -> typing.Sequence[~StoragePoolsResult]
5771 # map input types to rpc msg
5773 msg
= dict(type='Storage',
5774 request
='ListPools',
5777 _params
['filters'] = filters
5778 reply
= await self
.rpc(msg
)
5783 @ReturnMapping(StorageDetailsListResults
)
5784 async def ListStorageDetails(self
, filters
):
5786 filters : typing.Sequence[~StorageFilter]
5787 Returns -> typing.Sequence[~StorageDetailsListResult]
5789 # map input types to rpc msg
5791 msg
= dict(type='Storage',
5792 request
='ListStorageDetails',
5795 _params
['filters'] = filters
5796 reply
= await self
.rpc(msg
)
5801 @ReturnMapping(VolumeDetailsListResults
)
5802 async def ListVolumes(self
, filters
):
5804 filters : typing.Sequence[~VolumeFilter]
5805 Returns -> typing.Sequence[~VolumeDetailsListResult]
5807 # map input types to rpc msg
5809 msg
= dict(type='Storage',
5810 request
='ListVolumes',
5813 _params
['filters'] = filters
5814 reply
= await self
.rpc(msg
)
5819 @ReturnMapping(StorageDetailsResults
)
5820 async def StorageDetails(self
, entities
):
5822 entities : typing.Sequence[~Entity]
5823 Returns -> typing.Sequence[~StorageDetailsResult]
5825 # map input types to rpc msg
5827 msg
= dict(type='Storage',
5828 request
='StorageDetails',
5831 _params
['entities'] = entities
5832 reply
= await self
.rpc(msg
)
5837 class StorageProvisionerFacade(Type
):
5838 name
= 'StorageProvisioner'
5840 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
5841 'properties': {'BusAddress': {'type': 'string'},
5842 'DeviceLinks': {'items': {'type': 'string'},
5844 'DeviceName': {'type': 'string'},
5845 'FilesystemType': {'type': 'string'},
5846 'HardwareId': {'type': 'string'},
5847 'InUse': {'type': 'boolean'},
5848 'Label': {'type': 'string'},
5849 'MountPoint': {'type': 'string'},
5850 'Size': {'type': 'integer'},
5851 'UUID': {'type': 'string'},
5852 'WWN': {'type': 'string'}},
5853 'required': ['DeviceName',
5865 'BlockDeviceResult': {'additionalProperties': False,
5866 'properties': {'error': {'$ref': '#/definitions/Error'},
5867 'result': {'$ref': '#/definitions/BlockDevice'}},
5868 'required': ['result'],
5870 'BlockDeviceResults': {'additionalProperties': False,
5871 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
5874 'Entities': {'additionalProperties': False,
5875 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5877 'required': ['entities'],
5879 'Entity': {'additionalProperties': False,
5880 'properties': {'tag': {'type': 'string'}},
5881 'required': ['tag'],
5883 'EntityStatusArgs': {'additionalProperties': False,
5884 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
5887 'info': {'type': 'string'},
5888 'status': {'type': 'string'},
5889 'tag': {'type': 'string'}},
5895 'Error': {'additionalProperties': False,
5896 'properties': {'code': {'type': 'string'},
5897 'info': {'$ref': '#/definitions/ErrorInfo'},
5898 'message': {'type': 'string'}},
5899 'required': ['message', 'code'],
5901 'ErrorInfo': {'additionalProperties': False,
5902 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5903 'macaroon-path': {'type': 'string'}},
5905 'ErrorResult': {'additionalProperties': False,
5906 'properties': {'error': {'$ref': '#/definitions/Error'}},
5908 'ErrorResults': {'additionalProperties': False,
5909 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5911 'required': ['results'],
5913 'Filesystem': {'additionalProperties': False,
5914 'properties': {'filesystem-tag': {'type': 'string'},
5915 'info': {'$ref': '#/definitions/FilesystemInfo'},
5916 'volume-tag': {'type': 'string'}},
5917 'required': ['filesystem-tag', 'info'],
5919 'FilesystemAttachment': {'additionalProperties': False,
5920 'properties': {'filesystem-tag': {'type': 'string'},
5921 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
5922 'machine-tag': {'type': 'string'}},
5923 'required': ['filesystem-tag',
5927 'FilesystemAttachmentInfo': {'additionalProperties': False,
5928 'properties': {'mount-point': {'type': 'string'},
5929 'read-only': {'type': 'boolean'}},
5931 'FilesystemAttachmentParams': {'additionalProperties': False,
5932 'properties': {'filesystem-id': {'type': 'string'},
5933 'filesystem-tag': {'type': 'string'},
5934 'instance-id': {'type': 'string'},
5935 'machine-tag': {'type': 'string'},
5936 'mount-point': {'type': 'string'},
5937 'provider': {'type': 'string'},
5938 'read-only': {'type': 'boolean'}},
5939 'required': ['filesystem-tag',
5943 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
5944 'properties': {'error': {'$ref': '#/definitions/Error'},
5945 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
5946 'required': ['result'],
5948 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
5949 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
5952 'FilesystemAttachmentResult': {'additionalProperties': False,
5953 'properties': {'error': {'$ref': '#/definitions/Error'},
5954 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
5955 'required': ['result'],
5957 'FilesystemAttachmentResults': {'additionalProperties': False,
5958 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
5961 'FilesystemAttachments': {'additionalProperties': False,
5962 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
5964 'required': ['filesystem-attachments'],
5966 'FilesystemInfo': {'additionalProperties': False,
5967 'properties': {'filesystem-id': {'type': 'string'},
5968 'pool': {'type': 'string'},
5969 'size': {'type': 'integer'}},
5970 'required': ['filesystem-id',
5974 'FilesystemParams': {'additionalProperties': False,
5975 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
5976 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
5979 'filesystem-tag': {'type': 'string'},
5980 'provider': {'type': 'string'},
5981 'size': {'type': 'integer'},
5982 'tags': {'patternProperties': {'.*': {'type': 'string'}},
5984 'volume-tag': {'type': 'string'}},
5985 'required': ['filesystem-tag',
5989 'FilesystemParamsResult': {'additionalProperties': False,
5990 'properties': {'error': {'$ref': '#/definitions/Error'},
5991 'result': {'$ref': '#/definitions/FilesystemParams'}},
5992 'required': ['result'],
5994 'FilesystemParamsResults': {'additionalProperties': False,
5995 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
5998 'FilesystemResult': {'additionalProperties': False,
5999 'properties': {'error': {'$ref': '#/definitions/Error'},
6000 'result': {'$ref': '#/definitions/Filesystem'}},
6001 'required': ['result'],
6003 'FilesystemResults': {'additionalProperties': False,
6004 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
6007 'Filesystems': {'additionalProperties': False,
6008 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
6010 'required': ['filesystems'],
6012 'LifeResult': {'additionalProperties': False,
6013 'properties': {'error': {'$ref': '#/definitions/Error'},
6014 'life': {'type': 'string'}},
6015 'required': ['life'],
6017 'LifeResults': {'additionalProperties': False,
6018 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
6020 'required': ['results'],
6022 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6023 'MachineStorageId': {'additionalProperties': False,
6024 'properties': {'attachment-tag': {'type': 'string'},
6025 'machine-tag': {'type': 'string'}},
6026 'required': ['machine-tag',
6029 'MachineStorageIds': {'additionalProperties': False,
6030 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
6032 'required': ['ids'],
6034 'MachineStorageIdsWatchResult': {'additionalProperties': False,
6035 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
6037 'error': {'$ref': '#/definitions/Error'},
6038 'watcher-id': {'type': 'string'}},
6039 'required': ['watcher-id',
6042 'MachineStorageIdsWatchResults': {'additionalProperties': False,
6043 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
6045 'required': ['results'],
6047 'NotifyWatchResult': {'additionalProperties': False,
6048 'properties': {'NotifyWatcherId': {'type': 'string'},
6049 'error': {'$ref': '#/definitions/Error'}},
6050 'required': ['NotifyWatcherId'],
6052 'NotifyWatchResults': {'additionalProperties': False,
6053 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6055 'required': ['results'],
6057 'SetStatus': {'additionalProperties': False,
6058 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
6060 'required': ['entities'],
6062 'StringResult': {'additionalProperties': False,
6063 'properties': {'error': {'$ref': '#/definitions/Error'},
6064 'result': {'type': 'string'}},
6065 'required': ['result'],
6067 'StringResults': {'additionalProperties': False,
6068 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
6070 'required': ['results'],
6072 'StringsWatchResult': {'additionalProperties': False,
6073 'properties': {'changes': {'items': {'type': 'string'},
6075 'error': {'$ref': '#/definitions/Error'},
6076 'watcher-id': {'type': 'string'}},
6077 'required': ['watcher-id'],
6079 'StringsWatchResults': {'additionalProperties': False,
6080 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
6082 'required': ['results'],
6084 'Volume': {'additionalProperties': False,
6085 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
6086 'volume-tag': {'type': 'string'}},
6087 'required': ['volume-tag', 'info'],
6089 'VolumeAttachment': {'additionalProperties': False,
6090 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
6091 'machine-tag': {'type': 'string'},
6092 'volume-tag': {'type': 'string'}},
6093 'required': ['volume-tag',
6097 'VolumeAttachmentInfo': {'additionalProperties': False,
6098 'properties': {'bus-address': {'type': 'string'},
6099 'device-link': {'type': 'string'},
6100 'device-name': {'type': 'string'},
6101 'read-only': {'type': 'boolean'}},
6103 'VolumeAttachmentParams': {'additionalProperties': False,
6104 'properties': {'instance-id': {'type': 'string'},
6105 'machine-tag': {'type': 'string'},
6106 'provider': {'type': 'string'},
6107 'read-only': {'type': 'boolean'},
6108 'volume-id': {'type': 'string'},
6109 'volume-tag': {'type': 'string'}},
6110 'required': ['volume-tag',
6114 'VolumeAttachmentParamsResult': {'additionalProperties': False,
6115 'properties': {'error': {'$ref': '#/definitions/Error'},
6116 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
6117 'required': ['result'],
6119 'VolumeAttachmentParamsResults': {'additionalProperties': False,
6120 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
6123 'VolumeAttachmentResult': {'additionalProperties': False,
6124 'properties': {'error': {'$ref': '#/definitions/Error'},
6125 'result': {'$ref': '#/definitions/VolumeAttachment'}},
6126 'required': ['result'],
6128 'VolumeAttachmentResults': {'additionalProperties': False,
6129 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
6132 'VolumeAttachments': {'additionalProperties': False,
6133 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
6135 'required': ['volume-attachments'],
6137 'VolumeInfo': {'additionalProperties': False,
6138 'properties': {'hardware-id': {'type': 'string'},
6139 'persistent': {'type': 'boolean'},
6140 'pool': {'type': 'string'},
6141 'size': {'type': 'integer'},
6142 'volume-id': {'type': 'string'},
6143 'wwn': {'type': 'string'}},
6144 'required': ['volume-id', 'size', 'persistent'],
6146 'VolumeParams': {'additionalProperties': False,
6147 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
6148 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
6151 'provider': {'type': 'string'},
6152 'size': {'type': 'integer'},
6153 'tags': {'patternProperties': {'.*': {'type': 'string'}},
6155 'volume-tag': {'type': 'string'}},
6156 'required': ['volume-tag',
6160 'VolumeParamsResult': {'additionalProperties': False,
6161 'properties': {'error': {'$ref': '#/definitions/Error'},
6162 'result': {'$ref': '#/definitions/VolumeParams'}},
6163 'required': ['result'],
6165 'VolumeParamsResults': {'additionalProperties': False,
6166 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
6169 'VolumeResult': {'additionalProperties': False,
6170 'properties': {'error': {'$ref': '#/definitions/Error'},
6171 'result': {'$ref': '#/definitions/Volume'}},
6172 'required': ['result'],
6174 'VolumeResults': {'additionalProperties': False,
6175 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
6178 'Volumes': {'additionalProperties': False,
6179 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
6181 'required': ['volumes'],
6183 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
6184 'Result': {'$ref': '#/definitions/LifeResults'}},
6186 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6187 'Result': {'$ref': '#/definitions/ErrorResults'}},
6189 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
6190 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
6192 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
6193 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
6195 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6196 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
6198 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6199 'Result': {'$ref': '#/definitions/FilesystemResults'}},
6201 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6202 'Result': {'$ref': '#/definitions/StringResults'}},
6204 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6205 'Result': {'$ref': '#/definitions/LifeResults'}},
6207 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6208 'Result': {'$ref': '#/definitions/ErrorResults'}},
6210 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
6211 'Result': {'$ref': '#/definitions/ErrorResults'}},
6213 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
6214 'Result': {'$ref': '#/definitions/ErrorResults'}},
6216 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
6217 'Result': {'$ref': '#/definitions/ErrorResults'}},
6219 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6220 'Result': {'$ref': '#/definitions/ErrorResults'}},
6222 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
6223 'Result': {'$ref': '#/definitions/ErrorResults'}},
6225 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
6226 'Result': {'$ref': '#/definitions/ErrorResults'}},
6228 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6229 'Result': {'$ref': '#/definitions/ErrorResults'}},
6231 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
6232 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
6234 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
6235 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
6237 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
6238 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
6240 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6241 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
6243 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6244 'Result': {'$ref': '#/definitions/VolumeResults'}},
6246 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6247 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6249 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6250 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
6252 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6253 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
6255 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6256 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6258 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6259 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
6261 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6262 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
6267 @ReturnMapping(LifeResults
)
6268 async def AttachmentLife(self
, ids
):
6270 ids : typing.Sequence[~MachineStorageId]
6271 Returns -> typing.Sequence[~LifeResult]
6273 # map input types to rpc msg
6275 msg
= dict(type='StorageProvisioner',
6276 request
='AttachmentLife',
6279 _params
['ids'] = ids
6280 reply
= await self
.rpc(msg
)
6285 @ReturnMapping(ErrorResults
)
6286 async def EnsureDead(self
, entities
):
6288 entities : typing.Sequence[~Entity]
6289 Returns -> typing.Sequence[~ErrorResult]
6291 # map input types to rpc msg
6293 msg
= dict(type='StorageProvisioner',
6294 request
='EnsureDead',
6297 _params
['entities'] = entities
6298 reply
= await self
.rpc(msg
)
6303 @ReturnMapping(FilesystemAttachmentParamsResults
)
6304 async def FilesystemAttachmentParams(self
, ids
):
6306 ids : typing.Sequence[~MachineStorageId]
6307 Returns -> typing.Sequence[~FilesystemAttachmentParamsResult]
6309 # map input types to rpc msg
6311 msg
= dict(type='StorageProvisioner',
6312 request
='FilesystemAttachmentParams',
6315 _params
['ids'] = ids
6316 reply
= await self
.rpc(msg
)
6321 @ReturnMapping(FilesystemAttachmentResults
)
6322 async def FilesystemAttachments(self
, ids
):
6324 ids : typing.Sequence[~MachineStorageId]
6325 Returns -> typing.Sequence[~FilesystemAttachmentResult]
6327 # map input types to rpc msg
6329 msg
= dict(type='StorageProvisioner',
6330 request
='FilesystemAttachments',
6333 _params
['ids'] = ids
6334 reply
= await self
.rpc(msg
)
6339 @ReturnMapping(FilesystemParamsResults
)
6340 async def FilesystemParams(self
, entities
):
6342 entities : typing.Sequence[~Entity]
6343 Returns -> typing.Sequence[~FilesystemParamsResult]
6345 # map input types to rpc msg
6347 msg
= dict(type='StorageProvisioner',
6348 request
='FilesystemParams',
6351 _params
['entities'] = entities
6352 reply
= await self
.rpc(msg
)
6357 @ReturnMapping(FilesystemResults
)
6358 async def Filesystems(self
, entities
):
6360 entities : typing.Sequence[~Entity]
6361 Returns -> typing.Sequence[~FilesystemResult]
6363 # map input types to rpc msg
6365 msg
= dict(type='StorageProvisioner',
6366 request
='Filesystems',
6369 _params
['entities'] = entities
6370 reply
= await self
.rpc(msg
)
6375 @ReturnMapping(StringResults
)
6376 async def InstanceId(self
, entities
):
6378 entities : typing.Sequence[~Entity]
6379 Returns -> typing.Sequence[~StringResult]
6381 # map input types to rpc msg
6383 msg
= dict(type='StorageProvisioner',
6384 request
='InstanceId',
6387 _params
['entities'] = entities
6388 reply
= await self
.rpc(msg
)
6393 @ReturnMapping(LifeResults
)
6394 async def Life(self
, entities
):
6396 entities : typing.Sequence[~Entity]
6397 Returns -> typing.Sequence[~LifeResult]
6399 # map input types to rpc msg
6401 msg
= dict(type='StorageProvisioner',
6405 _params
['entities'] = entities
6406 reply
= await self
.rpc(msg
)
6411 @ReturnMapping(ErrorResults
)
6412 async def Remove(self
, entities
):
6414 entities : typing.Sequence[~Entity]
6415 Returns -> typing.Sequence[~ErrorResult]
6417 # map input types to rpc msg
6419 msg
= dict(type='StorageProvisioner',
6423 _params
['entities'] = entities
6424 reply
= await self
.rpc(msg
)
6429 @ReturnMapping(ErrorResults
)
6430 async def RemoveAttachment(self
, ids
):
6432 ids : typing.Sequence[~MachineStorageId]
6433 Returns -> typing.Sequence[~ErrorResult]
6435 # map input types to rpc msg
6437 msg
= dict(type='StorageProvisioner',
6438 request
='RemoveAttachment',
6441 _params
['ids'] = ids
6442 reply
= await self
.rpc(msg
)
6447 @ReturnMapping(ErrorResults
)
6448 async def SetFilesystemAttachmentInfo(self
, filesystem_attachments
):
6450 filesystem_attachments : typing.Sequence[~FilesystemAttachment]
6451 Returns -> typing.Sequence[~ErrorResult]
6453 # map input types to rpc msg
6455 msg
= dict(type='StorageProvisioner',
6456 request
='SetFilesystemAttachmentInfo',
6459 _params
['filesystem-attachments'] = filesystem_attachments
6460 reply
= await self
.rpc(msg
)
6465 @ReturnMapping(ErrorResults
)
6466 async def SetFilesystemInfo(self
, filesystems
):
6468 filesystems : typing.Sequence[~Filesystem]
6469 Returns -> typing.Sequence[~ErrorResult]
6471 # map input types to rpc msg
6473 msg
= dict(type='StorageProvisioner',
6474 request
='SetFilesystemInfo',
6477 _params
['filesystems'] = filesystems
6478 reply
= await self
.rpc(msg
)
6483 @ReturnMapping(ErrorResults
)
6484 async def SetStatus(self
, entities
):
6486 entities : typing.Sequence[~EntityStatusArgs]
6487 Returns -> typing.Sequence[~ErrorResult]
6489 # map input types to rpc msg
6491 msg
= dict(type='StorageProvisioner',
6492 request
='SetStatus',
6495 _params
['entities'] = entities
6496 reply
= await self
.rpc(msg
)
6501 @ReturnMapping(ErrorResults
)
6502 async def SetVolumeAttachmentInfo(self
, volume_attachments
):
6504 volume_attachments : typing.Sequence[~VolumeAttachment]
6505 Returns -> typing.Sequence[~ErrorResult]
6507 # map input types to rpc msg
6509 msg
= dict(type='StorageProvisioner',
6510 request
='SetVolumeAttachmentInfo',
6513 _params
['volume-attachments'] = volume_attachments
6514 reply
= await self
.rpc(msg
)
6519 @ReturnMapping(ErrorResults
)
6520 async def SetVolumeInfo(self
, volumes
):
6522 volumes : typing.Sequence[~Volume]
6523 Returns -> typing.Sequence[~ErrorResult]
6525 # map input types to rpc msg
6527 msg
= dict(type='StorageProvisioner',
6528 request
='SetVolumeInfo',
6531 _params
['volumes'] = volumes
6532 reply
= await self
.rpc(msg
)
6537 @ReturnMapping(ErrorResults
)
6538 async def UpdateStatus(self
, entities
):
6540 entities : typing.Sequence[~EntityStatusArgs]
6541 Returns -> typing.Sequence[~ErrorResult]
6543 # map input types to rpc msg
6545 msg
= dict(type='StorageProvisioner',
6546 request
='UpdateStatus',
6549 _params
['entities'] = entities
6550 reply
= await self
.rpc(msg
)
6555 @ReturnMapping(VolumeAttachmentParamsResults
)
6556 async def VolumeAttachmentParams(self
, ids
):
6558 ids : typing.Sequence[~MachineStorageId]
6559 Returns -> typing.Sequence[~VolumeAttachmentParamsResult]
6561 # map input types to rpc msg
6563 msg
= dict(type='StorageProvisioner',
6564 request
='VolumeAttachmentParams',
6567 _params
['ids'] = ids
6568 reply
= await self
.rpc(msg
)
6573 @ReturnMapping(VolumeAttachmentResults
)
6574 async def VolumeAttachments(self
, ids
):
6576 ids : typing.Sequence[~MachineStorageId]
6577 Returns -> typing.Sequence[~VolumeAttachmentResult]
6579 # map input types to rpc msg
6581 msg
= dict(type='StorageProvisioner',
6582 request
='VolumeAttachments',
6585 _params
['ids'] = ids
6586 reply
= await self
.rpc(msg
)
6591 @ReturnMapping(BlockDeviceResults
)
6592 async def VolumeBlockDevices(self
, ids
):
6594 ids : typing.Sequence[~MachineStorageId]
6595 Returns -> typing.Sequence[~BlockDeviceResult]
6597 # map input types to rpc msg
6599 msg
= dict(type='StorageProvisioner',
6600 request
='VolumeBlockDevices',
6603 _params
['ids'] = ids
6604 reply
= await self
.rpc(msg
)
6609 @ReturnMapping(VolumeParamsResults
)
6610 async def VolumeParams(self
, entities
):
6612 entities : typing.Sequence[~Entity]
6613 Returns -> typing.Sequence[~VolumeParamsResult]
6615 # map input types to rpc msg
6617 msg
= dict(type='StorageProvisioner',
6618 request
='VolumeParams',
6621 _params
['entities'] = entities
6622 reply
= await self
.rpc(msg
)
6627 @ReturnMapping(VolumeResults
)
6628 async def Volumes(self
, entities
):
6630 entities : typing.Sequence[~Entity]
6631 Returns -> typing.Sequence[~VolumeResult]
6633 # map input types to rpc msg
6635 msg
= dict(type='StorageProvisioner',
6639 _params
['entities'] = entities
6640 reply
= await self
.rpc(msg
)
6645 @ReturnMapping(NotifyWatchResults
)
6646 async def WatchBlockDevices(self
, entities
):
6648 entities : typing.Sequence[~Entity]
6649 Returns -> typing.Sequence[~NotifyWatchResult]
6651 # map input types to rpc msg
6653 msg
= dict(type='StorageProvisioner',
6654 request
='WatchBlockDevices',
6657 _params
['entities'] = entities
6658 reply
= await self
.rpc(msg
)
6663 @ReturnMapping(MachineStorageIdsWatchResults
)
6664 async def WatchFilesystemAttachments(self
, entities
):
6666 entities : typing.Sequence[~Entity]
6667 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
6669 # map input types to rpc msg
6671 msg
= dict(type='StorageProvisioner',
6672 request
='WatchFilesystemAttachments',
6675 _params
['entities'] = entities
6676 reply
= await self
.rpc(msg
)
6681 @ReturnMapping(StringsWatchResults
)
6682 async def WatchFilesystems(self
, entities
):
6684 entities : typing.Sequence[~Entity]
6685 Returns -> typing.Sequence[~StringsWatchResult]
6687 # map input types to rpc msg
6689 msg
= dict(type='StorageProvisioner',
6690 request
='WatchFilesystems',
6693 _params
['entities'] = entities
6694 reply
= await self
.rpc(msg
)
6699 @ReturnMapping(NotifyWatchResults
)
6700 async def WatchMachines(self
, entities
):
6702 entities : typing.Sequence[~Entity]
6703 Returns -> typing.Sequence[~NotifyWatchResult]
6705 # map input types to rpc msg
6707 msg
= dict(type='StorageProvisioner',
6708 request
='WatchMachines',
6711 _params
['entities'] = entities
6712 reply
= await self
.rpc(msg
)
6717 @ReturnMapping(MachineStorageIdsWatchResults
)
6718 async def WatchVolumeAttachments(self
, entities
):
6720 entities : typing.Sequence[~Entity]
6721 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
6723 # map input types to rpc msg
6725 msg
= dict(type='StorageProvisioner',
6726 request
='WatchVolumeAttachments',
6729 _params
['entities'] = entities
6730 reply
= await self
.rpc(msg
)
6735 @ReturnMapping(StringsWatchResults
)
6736 async def WatchVolumes(self
, entities
):
6738 entities : typing.Sequence[~Entity]
6739 Returns -> typing.Sequence[~StringsWatchResult]
6741 # map input types to rpc msg
6743 msg
= dict(type='StorageProvisioner',
6744 request
='WatchVolumes',
6747 _params
['entities'] = entities
6748 reply
= await self
.rpc(msg
)