1 # DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py.
2 # Changes will be overwritten/lost when the file is regenerated.
4 from juju
.client
._definitions
import *
5 from juju
.client
.facade
import ReturnMapping
, Type
8 class ApplicationFacade(Type
):
11 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
12 'properties': {'application': {'type': 'string'},
13 'num-units': {'type': 'integer'},
14 'placement': {'items': {'$ref': '#/definitions/Placement'},
16 'required': ['application',
20 'AddApplicationUnitsResults': {'additionalProperties': False,
21 'properties': {'units': {'items': {'type': 'string'},
23 'required': ['units'],
25 'AddRelation': {'additionalProperties': False,
26 'properties': {'endpoints': {'items': {'type': 'string'},
28 'required': ['endpoints'],
30 'AddRelationResults': {'additionalProperties': False,
31 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
33 'required': ['endpoints'],
35 'ApplicationCharmRelations': {'additionalProperties': False,
36 'properties': {'application': {'type': 'string'}},
37 'required': ['application'],
39 'ApplicationCharmRelationsResults': {'additionalProperties': False,
40 'properties': {'charm-relations': {'items': {'type': 'string'},
42 'required': ['charm-relations'],
44 'ApplicationDeploy': {'additionalProperties': False,
45 'properties': {'application': {'type': 'string'},
46 'channel': {'type': 'string'},
47 'charm-url': {'type': 'string'},
48 'config': {'patternProperties': {'.*': {'type': 'string'}},
50 'config-yaml': {'type': 'string'},
51 'constraints': {'$ref': '#/definitions/Value'},
52 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
54 'num-units': {'type': 'integer'},
55 'placement': {'items': {'$ref': '#/definitions/Placement'},
57 'resources': {'patternProperties': {'.*': {'type': 'string'}},
59 'series': {'type': 'string'},
60 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
62 'required': ['application',
70 'ApplicationDestroy': {'additionalProperties': False,
71 'properties': {'application': {'type': 'string'}},
72 'required': ['application'],
74 'ApplicationExpose': {'additionalProperties': False,
75 'properties': {'application': {'type': 'string'}},
76 'required': ['application'],
78 'ApplicationGet': {'additionalProperties': False,
79 'properties': {'application': {'type': 'string'}},
80 'required': ['application'],
82 'ApplicationGetResults': {'additionalProperties': False,
83 'properties': {'application': {'type': 'string'},
84 'charm': {'type': 'string'},
85 'config': {'patternProperties': {'.*': {'additionalProperties': True,
88 'constraints': {'$ref': '#/definitions/Value'},
89 'series': {'type': 'string'}},
90 'required': ['application',
96 'ApplicationMetricCredential': {'additionalProperties': False,
97 'properties': {'application': {'type': 'string'},
98 'metrics-credentials': {'items': {'type': 'integer'},
100 'required': ['application',
101 'metrics-credentials'],
103 'ApplicationMetricCredentials': {'additionalProperties': False,
104 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
106 'required': ['creds'],
108 'ApplicationSet': {'additionalProperties': False,
109 'properties': {'application': {'type': 'string'},
110 'options': {'patternProperties': {'.*': {'type': 'string'}},
112 'required': ['application', 'options'],
114 'ApplicationSetCharm': {'additionalProperties': False,
115 'properties': {'application': {'type': 'string'},
116 'channel': {'type': 'string'},
117 'charm-url': {'type': 'string'},
118 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
120 'config-settings-yaml': {'type': 'string'},
121 'force-series': {'type': 'boolean'},
122 'force-units': {'type': 'boolean'},
123 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
125 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
127 'required': ['application',
133 'ApplicationURLs': {'additionalProperties': False,
134 'properties': {'application-urls': {'items': {'type': 'string'},
137 'ApplicationUnexpose': {'additionalProperties': False,
138 'properties': {'application': {'type': 'string'}},
139 'required': ['application'],
141 'ApplicationUnset': {'additionalProperties': False,
142 'properties': {'application': {'type': 'string'},
143 'options': {'items': {'type': 'string'},
145 'required': ['application', 'options'],
147 'ApplicationUpdate': {'additionalProperties': False,
148 'properties': {'application': {'type': 'string'},
149 'charm-url': {'type': 'string'},
150 'constraints': {'$ref': '#/definitions/Value'},
151 'force-charm-url': {'type': 'boolean'},
152 'force-series': {'type': 'boolean'},
153 'min-units': {'type': 'integer'},
154 'settings': {'patternProperties': {'.*': {'type': 'string'}},
156 'settings-yaml': {'type': 'string'}},
157 'required': ['application',
163 'ApplicationsDeploy': {'additionalProperties': False,
164 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
166 'required': ['applications'],
168 'CharmRelation': {'additionalProperties': False,
169 'properties': {'interface': {'type': 'string'},
170 'limit': {'type': 'integer'},
171 'name': {'type': 'string'},
172 'optional': {'type': 'boolean'},
173 'role': {'type': 'string'},
174 'scope': {'type': 'string'}},
182 'Constraints': {'additionalProperties': False,
183 'properties': {'Count': {'type': 'integer'},
184 'Pool': {'type': 'string'},
185 'Size': {'type': 'integer'}},
186 'required': ['Pool', 'Size', 'Count'],
188 'ConsumeApplicationArg': {'additionalProperties': False,
189 'properties': {'application-alias': {'type': 'string'},
190 'application-url': {'type': 'string'}},
191 'required': ['application-url'],
193 'ConsumeApplicationArgs': {'additionalProperties': False,
194 'properties': {'args': {'items': {'$ref': '#/definitions/ConsumeApplicationArg'},
197 'ConsumeApplicationResult': {'additionalProperties': False,
198 'properties': {'error': {'$ref': '#/definitions/Error'},
199 'local-name': {'type': 'string'}},
201 'ConsumeApplicationResults': {'additionalProperties': False,
202 'properties': {'results': {'items': {'$ref': '#/definitions/ConsumeApplicationResult'},
204 'required': ['results'],
206 'DestroyApplicationInfo': {'additionalProperties': False,
207 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
209 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
211 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
214 'DestroyApplicationResult': {'additionalProperties': False,
215 'properties': {'error': {'$ref': '#/definitions/Error'},
216 'info': {'$ref': '#/definitions/DestroyApplicationInfo'}},
218 'DestroyApplicationResults': {'additionalProperties': False,
219 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyApplicationResult'},
222 'DestroyApplicationUnits': {'additionalProperties': False,
223 'properties': {'unit-names': {'items': {'type': 'string'},
225 'required': ['unit-names'],
227 'DestroyRelation': {'additionalProperties': False,
228 'properties': {'endpoints': {'items': {'type': 'string'},
230 'required': ['endpoints'],
232 'DestroyUnitInfo': {'additionalProperties': False,
233 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
235 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
238 'DestroyUnitResult': {'additionalProperties': False,
239 'properties': {'error': {'$ref': '#/definitions/Error'},
240 'info': {'$ref': '#/definitions/DestroyUnitInfo'}},
242 'DestroyUnitResults': {'additionalProperties': False,
243 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyUnitResult'},
246 'Entities': {'additionalProperties': False,
247 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
249 'required': ['entities'],
251 'Entity': {'additionalProperties': False,
252 'properties': {'tag': {'type': 'string'}},
255 'Error': {'additionalProperties': False,
256 'properties': {'code': {'type': 'string'},
257 'info': {'$ref': '#/definitions/ErrorInfo'},
258 'message': {'type': 'string'}},
259 'required': ['message', 'code'],
261 'ErrorInfo': {'additionalProperties': False,
262 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
263 'macaroon-path': {'type': 'string'}},
265 'ErrorResult': {'additionalProperties': False,
266 'properties': {'error': {'$ref': '#/definitions/Error'}},
268 'ErrorResults': {'additionalProperties': False,
269 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
271 'required': ['results'],
273 'GetApplicationConstraints': {'additionalProperties': False,
274 'properties': {'application': {'type': 'string'}},
275 'required': ['application'],
277 'GetConstraintsResults': {'additionalProperties': False,
278 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
279 'required': ['constraints'],
281 'Macaroon': {'additionalProperties': False, 'type': 'object'},
282 'Placement': {'additionalProperties': False,
283 'properties': {'directive': {'type': 'string'},
284 'scope': {'type': 'string'}},
285 'required': ['scope', 'directive'],
287 'RemoteApplicationInfo': {'additionalProperties': False,
288 'properties': {'application-url': {'type': 'string'},
289 'description': {'type': 'string'},
290 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
292 'icon-url-path': {'type': 'string'},
293 'model-tag': {'type': 'string'},
294 'name': {'type': 'string'},
295 'source-model-label': {'type': 'string'}},
296 'required': ['model-tag',
303 'RemoteApplicationInfoResult': {'additionalProperties': False,
304 'properties': {'error': {'$ref': '#/definitions/Error'},
305 'result': {'$ref': '#/definitions/RemoteApplicationInfo'}},
307 'RemoteApplicationInfoResults': {'additionalProperties': False,
308 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteApplicationInfoResult'},
310 'required': ['results'],
312 'RemoteEndpoint': {'additionalProperties': False,
313 'properties': {'interface': {'type': 'string'},
314 'limit': {'type': 'integer'},
315 'name': {'type': 'string'},
316 'role': {'type': 'string'},
317 'scope': {'type': 'string'}},
324 'SetConstraints': {'additionalProperties': False,
325 'properties': {'application': {'type': 'string'},
326 'constraints': {'$ref': '#/definitions/Value'}},
327 'required': ['application', 'constraints'],
329 'StorageConstraints': {'additionalProperties': False,
330 'properties': {'count': {'type': 'integer'},
331 'pool': {'type': 'string'},
332 'size': {'type': 'integer'}},
334 'StringResult': {'additionalProperties': False,
335 'properties': {'error': {'$ref': '#/definitions/Error'},
336 'result': {'type': 'string'}},
337 'required': ['result'],
339 'Value': {'additionalProperties': False,
340 'properties': {'arch': {'type': 'string'},
341 'container': {'type': 'string'},
342 'cores': {'type': 'integer'},
343 'cpu-power': {'type': 'integer'},
344 'instance-type': {'type': 'string'},
345 'mem': {'type': 'integer'},
346 'root-disk': {'type': 'integer'},
347 'spaces': {'items': {'type': 'string'},
349 'tags': {'items': {'type': 'string'},
351 'virt-type': {'type': 'string'}},
353 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
354 'Result': {'$ref': '#/definitions/AddRelationResults'}},
356 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
357 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
359 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
360 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
362 'Consume': {'properties': {'Params': {'$ref': '#/definitions/ConsumeApplicationArgs'},
363 'Result': {'$ref': '#/definitions/ConsumeApplicationResults'}},
365 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
366 'Result': {'$ref': '#/definitions/ErrorResults'}},
368 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
370 'DestroyApplication': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
371 'Result': {'$ref': '#/definitions/DestroyApplicationResults'}},
373 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
375 'DestroyUnit': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
376 'Result': {'$ref': '#/definitions/DestroyUnitResults'}},
378 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
380 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
382 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
383 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
385 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
386 'Result': {'$ref': '#/definitions/StringResult'}},
388 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
389 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
391 'RemoteApplicationInfo': {'properties': {'Params': {'$ref': '#/definitions/ApplicationURLs'},
392 'Result': {'$ref': '#/definitions/RemoteApplicationInfoResults'}},
394 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
396 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
398 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
400 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
401 'Result': {'$ref': '#/definitions/ErrorResults'}},
403 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
405 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
407 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
412 @ReturnMapping(AddRelationResults
)
413 async def AddRelation(self
, endpoints
):
415 endpoints : typing.Sequence<+T_co>[str]
416 Returns -> typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
418 # map input types to rpc msg
420 msg
= dict(type='Application', request
='AddRelation', version
=4, params
=_params
)
421 _params
['endpoints'] = endpoints
422 reply
= await self
.rpc(msg
)
427 @ReturnMapping(AddApplicationUnitsResults
)
428 async def AddUnits(self
, application
, num_units
, placement
):
432 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
433 Returns -> typing.Sequence<+T_co>[str]
435 # map input types to rpc msg
437 msg
= dict(type='Application', request
='AddUnits', version
=4, params
=_params
)
438 _params
['application'] = application
439 _params
['num-units'] = num_units
440 _params
['placement'] = placement
441 reply
= await self
.rpc(msg
)
446 @ReturnMapping(ApplicationCharmRelationsResults
)
447 async def CharmRelations(self
, application
):
450 Returns -> typing.Sequence<+T_co>[str]
452 # map input types to rpc msg
454 msg
= dict(type='Application', request
='CharmRelations', version
=4, params
=_params
)
455 _params
['application'] = application
456 reply
= await self
.rpc(msg
)
461 @ReturnMapping(ConsumeApplicationResults
)
462 async def Consume(self
, args
):
464 args : typing.Sequence<+T_co>[~ConsumeApplicationArg]<~ConsumeApplicationArg>
465 Returns -> typing.Sequence<+T_co>[~ConsumeApplicationResult]<~ConsumeApplicationResult>
467 # map input types to rpc msg
469 msg
= dict(type='Application', request
='Consume', version
=4, params
=_params
)
470 _params
['args'] = args
471 reply
= await self
.rpc(msg
)
476 @ReturnMapping(ErrorResults
)
477 async def Deploy(self
, applications
):
479 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
480 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
482 # map input types to rpc msg
484 msg
= dict(type='Application', request
='Deploy', version
=4, params
=_params
)
485 _params
['applications'] = applications
486 reply
= await self
.rpc(msg
)
492 async def Destroy(self
, application
):
497 # map input types to rpc msg
499 msg
= dict(type='Application', request
='Destroy', version
=4, params
=_params
)
500 _params
['application'] = application
501 reply
= await self
.rpc(msg
)
506 @ReturnMapping(DestroyApplicationResults
)
507 async def DestroyApplication(self
, entities
):
509 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
510 Returns -> typing.Sequence<+T_co>[~DestroyApplicationResult]<~DestroyApplicationResult>
512 # map input types to rpc msg
514 msg
= dict(type='Application', request
='DestroyApplication', version
=4, params
=_params
)
515 _params
['entities'] = entities
516 reply
= await self
.rpc(msg
)
522 async def DestroyRelation(self
, endpoints
):
524 endpoints : typing.Sequence<+T_co>[str]
527 # map input types to rpc msg
529 msg
= dict(type='Application', request
='DestroyRelation', version
=4, params
=_params
)
530 _params
['endpoints'] = endpoints
531 reply
= await self
.rpc(msg
)
536 @ReturnMapping(DestroyUnitResults
)
537 async def DestroyUnit(self
, entities
):
539 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
540 Returns -> typing.Sequence<+T_co>[~DestroyUnitResult]<~DestroyUnitResult>
542 # map input types to rpc msg
544 msg
= dict(type='Application', request
='DestroyUnit', version
=4, params
=_params
)
545 _params
['entities'] = entities
546 reply
= await self
.rpc(msg
)
552 async def DestroyUnits(self
, unit_names
):
554 unit_names : typing.Sequence<+T_co>[str]
557 # map input types to rpc msg
559 msg
= dict(type='Application', request
='DestroyUnits', version
=4, params
=_params
)
560 _params
['unit-names'] = unit_names
561 reply
= await self
.rpc(msg
)
567 async def Expose(self
, application
):
572 # map input types to rpc msg
574 msg
= dict(type='Application', request
='Expose', version
=4, params
=_params
)
575 _params
['application'] = application
576 reply
= await self
.rpc(msg
)
581 @ReturnMapping(ApplicationGetResults
)
582 async def Get(self
, application
):
585 Returns -> typing.Union[str, typing.Mapping<~KT, +VT_co>[str, typing.Any], _ForwardRef('Value')]
587 # map input types to rpc msg
589 msg
= dict(type='Application', request
='Get', version
=4, params
=_params
)
590 _params
['application'] = application
591 reply
= await self
.rpc(msg
)
596 @ReturnMapping(StringResult
)
597 async def GetCharmURL(self
, application
):
600 Returns -> typing.Union[_ForwardRef('Error'), str]
602 # map input types to rpc msg
604 msg
= dict(type='Application', request
='GetCharmURL', version
=4, params
=_params
)
605 _params
['application'] = application
606 reply
= await self
.rpc(msg
)
611 @ReturnMapping(GetConstraintsResults
)
612 async def GetConstraints(self
, application
):
617 # map input types to rpc msg
619 msg
= dict(type='Application', request
='GetConstraints', version
=4, params
=_params
)
620 _params
['application'] = application
621 reply
= await self
.rpc(msg
)
626 @ReturnMapping(RemoteApplicationInfoResults
)
627 async def RemoteApplicationInfo(self
, application_urls
):
629 application_urls : typing.Sequence<+T_co>[str]
630 Returns -> typing.Sequence<+T_co>[~RemoteApplicationInfoResult]<~RemoteApplicationInfoResult>
632 # map input types to rpc msg
634 msg
= dict(type='Application', request
='RemoteApplicationInfo', version
=4, params
=_params
)
635 _params
['application-urls'] = application_urls
636 reply
= await self
.rpc(msg
)
642 async def Set(self
, application
, options
):
645 options : typing.Mapping<~KT, +VT_co>[str, str]
648 # map input types to rpc msg
650 msg
= dict(type='Application', request
='Set', version
=4, params
=_params
)
651 _params
['application'] = application
652 _params
['options'] = options
653 reply
= await self
.rpc(msg
)
659 async def SetCharm(self
, application
, channel
, charm_url
, config_settings
, config_settings_yaml
, force_series
, force_units
, resource_ids
, storage_constraints
):
664 config_settings : typing.Mapping<~KT, +VT_co>[str, str]
665 config_settings_yaml : str
668 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
669 storage_constraints : typing.Mapping<~KT, +VT_co>[str, ~StorageConstraints]<~StorageConstraints>
672 # map input types to rpc msg
674 msg
= dict(type='Application', request
='SetCharm', version
=4, params
=_params
)
675 _params
['application'] = application
676 _params
['channel'] = channel
677 _params
['charm-url'] = charm_url
678 _params
['config-settings'] = config_settings
679 _params
['config-settings-yaml'] = config_settings_yaml
680 _params
['force-series'] = force_series
681 _params
['force-units'] = force_units
682 _params
['resource-ids'] = resource_ids
683 _params
['storage-constraints'] = storage_constraints
684 reply
= await self
.rpc(msg
)
690 async def SetConstraints(self
, application
, constraints
):
696 # map input types to rpc msg
698 msg
= dict(type='Application', request
='SetConstraints', version
=4, params
=_params
)
699 _params
['application'] = application
700 _params
['constraints'] = constraints
701 reply
= await self
.rpc(msg
)
706 @ReturnMapping(ErrorResults
)
707 async def SetMetricCredentials(self
, creds
):
709 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
710 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
712 # map input types to rpc msg
714 msg
= dict(type='Application', request
='SetMetricCredentials', version
=4, params
=_params
)
715 _params
['creds'] = creds
716 reply
= await self
.rpc(msg
)
722 async def Unexpose(self
, application
):
727 # map input types to rpc msg
729 msg
= dict(type='Application', request
='Unexpose', version
=4, params
=_params
)
730 _params
['application'] = application
731 reply
= await self
.rpc(msg
)
737 async def Unset(self
, application
, options
):
740 options : typing.Sequence<+T_co>[str]
743 # map input types to rpc msg
745 msg
= dict(type='Application', request
='Unset', version
=4, params
=_params
)
746 _params
['application'] = application
747 _params
['options'] = options
748 reply
= await self
.rpc(msg
)
754 async def Update(self
, application
, charm_url
, constraints
, force_charm_url
, force_series
, min_units
, settings
, settings_yaml
):
759 force_charm_url : bool
762 settings : typing.Mapping<~KT, +VT_co>[str, str]
766 # map input types to rpc msg
768 msg
= dict(type='Application', request
='Update', version
=4, params
=_params
)
769 _params
['application'] = application
770 _params
['charm-url'] = charm_url
771 _params
['constraints'] = constraints
772 _params
['force-charm-url'] = force_charm_url
773 _params
['force-series'] = force_series
774 _params
['min-units'] = min_units
775 _params
['settings'] = settings
776 _params
['settings-yaml'] = settings_yaml
777 reply
= await self
.rpc(msg
)
782 class UniterFacade(Type
):
785 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
786 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
789 'required': ['servers'],
791 'Action': {'additionalProperties': False,
792 'properties': {'name': {'type': 'string'},
793 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
796 'receiver': {'type': 'string'},
797 'tag': {'type': 'string'}},
798 'required': ['tag', 'receiver', 'name'],
800 'ActionExecutionResult': {'additionalProperties': False,
801 'properties': {'action-tag': {'type': 'string'},
802 'message': {'type': 'string'},
803 'results': {'patternProperties': {'.*': {'additionalProperties': True,
806 'status': {'type': 'string'}},
807 'required': ['action-tag', 'status'],
809 'ActionExecutionResults': {'additionalProperties': False,
810 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
813 'ActionResult': {'additionalProperties': False,
814 'properties': {'action': {'$ref': '#/definitions/Action'},
815 'completed': {'format': 'date-time',
817 'enqueued': {'format': 'date-time',
819 'error': {'$ref': '#/definitions/Error'},
820 'message': {'type': 'string'},
821 'output': {'patternProperties': {'.*': {'additionalProperties': True,
824 'started': {'format': 'date-time',
826 'status': {'type': 'string'}},
828 'ActionResults': {'additionalProperties': False,
829 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
832 'Address': {'additionalProperties': False,
833 'properties': {'scope': {'type': 'string'},
834 'space-name': {'type': 'string'},
835 'type': {'type': 'string'},
836 'value': {'type': 'string'}},
837 'required': ['value', 'type', 'scope'],
839 'ApplicationStatusResult': {'additionalProperties': False,
840 'properties': {'application': {'$ref': '#/definitions/StatusResult'},
841 'error': {'$ref': '#/definitions/Error'},
842 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
844 'required': ['application',
847 'ApplicationStatusResults': {'additionalProperties': False,
848 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
850 'required': ['results'],
852 'BoolResult': {'additionalProperties': False,
853 'properties': {'error': {'$ref': '#/definitions/Error'},
854 'result': {'type': 'boolean'}},
855 'required': ['result'],
857 'BoolResults': {'additionalProperties': False,
858 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
860 'required': ['results'],
862 'BytesResult': {'additionalProperties': False,
863 'properties': {'result': {'items': {'type': 'integer'},
865 'required': ['result'],
867 'CharmRelation': {'additionalProperties': False,
868 'properties': {'interface': {'type': 'string'},
869 'limit': {'type': 'integer'},
870 'name': {'type': 'string'},
871 'optional': {'type': 'boolean'},
872 'role': {'type': 'string'},
873 'scope': {'type': 'string'}},
881 'CharmURL': {'additionalProperties': False,
882 'properties': {'url': {'type': 'string'}},
885 'CharmURLs': {'additionalProperties': False,
886 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'},
888 'required': ['urls'],
890 'ConfigSettingsResult': {'additionalProperties': False,
891 'properties': {'error': {'$ref': '#/definitions/Error'},
892 'settings': {'patternProperties': {'.*': {'additionalProperties': True,
895 'required': ['settings'],
897 'ConfigSettingsResults': {'additionalProperties': False,
898 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
900 'required': ['results'],
902 'Endpoint': {'additionalProperties': False,
903 'properties': {'application-name': {'type': 'string'},
904 'relation': {'$ref': '#/definitions/CharmRelation'}},
905 'required': ['application-name', 'relation'],
907 'Entities': {'additionalProperties': False,
908 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
910 'required': ['entities'],
912 'EntitiesCharmURL': {'additionalProperties': False,
913 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
915 'required': ['entities'],
917 'EntitiesPortRanges': {'additionalProperties': False,
918 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
920 'required': ['entities'],
922 'Entity': {'additionalProperties': False,
923 'properties': {'tag': {'type': 'string'}},
926 'EntityCharmURL': {'additionalProperties': False,
927 'properties': {'charm-url': {'type': 'string'},
928 'tag': {'type': 'string'}},
929 'required': ['tag', 'charm-url'],
931 'EntityPortRange': {'additionalProperties': False,
932 'properties': {'from-port': {'type': 'integer'},
933 'protocol': {'type': 'string'},
934 'tag': {'type': 'string'},
935 'to-port': {'type': 'integer'}},
941 'EntityStatusArgs': {'additionalProperties': False,
942 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
945 'info': {'type': 'string'},
946 'status': {'type': 'string'},
947 'tag': {'type': 'string'}},
953 'EntityWorkloadVersion': {'additionalProperties': False,
954 'properties': {'tag': {'type': 'string'},
955 'workload-version': {'type': 'string'}},
959 'EntityWorkloadVersions': {'additionalProperties': False,
960 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'},
962 'required': ['entities'],
964 'Error': {'additionalProperties': False,
965 'properties': {'code': {'type': 'string'},
966 'info': {'$ref': '#/definitions/ErrorInfo'},
967 'message': {'type': 'string'}},
968 'required': ['message', 'code'],
970 'ErrorInfo': {'additionalProperties': False,
971 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
972 'macaroon-path': {'type': 'string'}},
974 'ErrorResult': {'additionalProperties': False,
975 'properties': {'error': {'$ref': '#/definitions/Error'}},
977 'ErrorResults': {'additionalProperties': False,
978 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
980 'required': ['results'],
982 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
983 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
985 'required': ['results'],
987 'GetLeadershipSettingsResult': {'additionalProperties': False,
988 'properties': {'error': {'$ref': '#/definitions/Error'},
989 'settings': {'patternProperties': {'.*': {'type': 'string'}},
991 'required': ['settings'],
993 'HostPort': {'additionalProperties': False,
994 'properties': {'Address': {'$ref': '#/definitions/Address'},
995 'port': {'type': 'integer'}},
996 'required': ['Address', 'port'],
998 'IntResult': {'additionalProperties': False,
999 'properties': {'error': {'$ref': '#/definitions/Error'},
1000 'result': {'type': 'integer'}},
1001 'required': ['result'],
1003 'IntResults': {'additionalProperties': False,
1004 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
1006 'required': ['results'],
1008 'LifeResult': {'additionalProperties': False,
1009 'properties': {'error': {'$ref': '#/definitions/Error'},
1010 'life': {'type': 'string'}},
1011 'required': ['life'],
1013 'LifeResults': {'additionalProperties': False,
1014 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1016 'required': ['results'],
1018 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1019 'MachinePortRange': {'additionalProperties': False,
1020 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
1021 'relation-tag': {'type': 'string'},
1022 'unit-tag': {'type': 'string'}},
1023 'required': ['unit-tag',
1027 'MachinePortsResult': {'additionalProperties': False,
1028 'properties': {'error': {'$ref': '#/definitions/Error'},
1029 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
1031 'required': ['ports'],
1033 'MachinePortsResults': {'additionalProperties': False,
1034 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
1036 'required': ['results'],
1038 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
1039 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
1041 'required': ['params'],
1043 'MergeLeadershipSettingsParam': {'additionalProperties': False,
1044 'properties': {'application-tag': {'type': 'string'},
1045 'settings': {'patternProperties': {'.*': {'type': 'string'}},
1047 'required': ['application-tag',
1050 'MeterStatusResult': {'additionalProperties': False,
1051 'properties': {'code': {'type': 'string'},
1052 'error': {'$ref': '#/definitions/Error'},
1053 'info': {'type': 'string'}},
1054 'required': ['code', 'info'],
1056 'MeterStatusResults': {'additionalProperties': False,
1057 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
1059 'required': ['results'],
1061 'Metric': {'additionalProperties': False,
1062 'properties': {'key': {'type': 'string'},
1063 'time': {'format': 'date-time',
1065 'value': {'type': 'string'}},
1066 'required': ['key', 'value', 'time'],
1068 'MetricBatch': {'additionalProperties': False,
1069 'properties': {'charm-url': {'type': 'string'},
1070 'created': {'format': 'date-time',
1072 'metrics': {'items': {'$ref': '#/definitions/Metric'},
1074 'uuid': {'type': 'string'}},
1075 'required': ['uuid',
1080 'MetricBatchParam': {'additionalProperties': False,
1081 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
1082 'tag': {'type': 'string'}},
1083 'required': ['tag', 'batch'],
1085 'MetricBatchParams': {'additionalProperties': False,
1086 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
1088 'required': ['batches'],
1090 'ModelConfigResult': {'additionalProperties': False,
1091 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1094 'required': ['config'],
1096 'ModelResult': {'additionalProperties': False,
1097 'properties': {'error': {'$ref': '#/definitions/Error'},
1098 'name': {'type': 'string'},
1099 'uuid': {'type': 'string'}},
1100 'required': ['name', 'uuid'],
1102 'NetworkConfig': {'additionalProperties': False,
1103 'properties': {'address': {'type': 'string'},
1104 'cidr': {'type': 'string'},
1105 'config-type': {'type': 'string'},
1106 'device-index': {'type': 'integer'},
1107 'disabled': {'type': 'boolean'},
1108 'dns-search-domains': {'items': {'type': 'string'},
1110 'dns-servers': {'items': {'type': 'string'},
1112 'gateway-address': {'type': 'string'},
1113 'interface-name': {'type': 'string'},
1114 'interface-type': {'type': 'string'},
1115 'mac-address': {'type': 'string'},
1116 'mtu': {'type': 'integer'},
1117 'no-auto-start': {'type': 'boolean'},
1118 'parent-interface-name': {'type': 'string'},
1119 'provider-address-id': {'type': 'string'},
1120 'provider-id': {'type': 'string'},
1121 'provider-space-id': {'type': 'string'},
1122 'provider-subnet-id': {'type': 'string'},
1123 'provider-vlan-id': {'type': 'string'},
1124 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
1126 'vlan-tag': {'type': 'integer'}},
1127 'required': ['device-index',
1132 'provider-subnet-id',
1133 'provider-space-id',
1134 'provider-address-id',
1138 'parent-interface-name',
1142 'NetworkRoute': {'additionalProperties': False,
1143 'properties': {'destination-cidr': {'type': 'string'},
1144 'gateway-ip': {'type': 'string'},
1145 'metric': {'type': 'integer'}},
1146 'required': ['destination-cidr',
1150 'NotifyWatchResult': {'additionalProperties': False,
1151 'properties': {'NotifyWatcherId': {'type': 'string'},
1152 'error': {'$ref': '#/definitions/Error'}},
1153 'required': ['NotifyWatcherId'],
1155 'NotifyWatchResults': {'additionalProperties': False,
1156 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1158 'required': ['results'],
1160 'PortRange': {'additionalProperties': False,
1161 'properties': {'from-port': {'type': 'integer'},
1162 'protocol': {'type': 'string'},
1163 'to-port': {'type': 'integer'}},
1164 'required': ['from-port', 'to-port', 'protocol'],
1166 'RelationIds': {'additionalProperties': False,
1167 'properties': {'relation-ids': {'items': {'type': 'integer'},
1169 'required': ['relation-ids'],
1171 'RelationResult': {'additionalProperties': False,
1172 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'},
1173 'error': {'$ref': '#/definitions/Error'},
1174 'id': {'type': 'integer'},
1175 'key': {'type': 'string'},
1176 'life': {'type': 'string'}},
1177 'required': ['life',
1182 'RelationResults': {'additionalProperties': False,
1183 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'},
1185 'required': ['results'],
1187 'RelationUnit': {'additionalProperties': False,
1188 'properties': {'relation': {'type': 'string'},
1189 'unit': {'type': 'string'}},
1190 'required': ['relation', 'unit'],
1192 'RelationUnitPair': {'additionalProperties': False,
1193 'properties': {'local-unit': {'type': 'string'},
1194 'relation': {'type': 'string'},
1195 'remote-unit': {'type': 'string'}},
1196 'required': ['relation',
1200 'RelationUnitPairs': {'additionalProperties': False,
1201 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
1203 'required': ['relation-unit-pairs'],
1205 'RelationUnitSettings': {'additionalProperties': False,
1206 'properties': {'relation': {'type': 'string'},
1207 'settings': {'patternProperties': {'.*': {'type': 'string'}},
1209 'unit': {'type': 'string'}},
1210 'required': ['relation',
1214 'RelationUnits': {'additionalProperties': False,
1215 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
1217 'required': ['relation-units'],
1219 'RelationUnitsChange': {'additionalProperties': False,
1220 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
1222 'departed': {'items': {'type': 'string'},
1224 'required': ['changed'],
1226 'RelationUnitsSettings': {'additionalProperties': False,
1227 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
1229 'required': ['relation-units'],
1231 'RelationUnitsWatchResult': {'additionalProperties': False,
1232 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
1233 'error': {'$ref': '#/definitions/Error'},
1234 'watcher-id': {'type': 'string'}},
1235 'required': ['watcher-id',
1238 'RelationUnitsWatchResults': {'additionalProperties': False,
1239 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
1241 'required': ['results'],
1243 'ResolvedModeResult': {'additionalProperties': False,
1244 'properties': {'error': {'$ref': '#/definitions/Error'},
1245 'mode': {'type': 'string'}},
1246 'required': ['mode'],
1248 'ResolvedModeResults': {'additionalProperties': False,
1249 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
1251 'required': ['results'],
1253 'SetStatus': {'additionalProperties': False,
1254 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1256 'required': ['entities'],
1258 'SettingsResult': {'additionalProperties': False,
1259 'properties': {'error': {'$ref': '#/definitions/Error'},
1260 'settings': {'patternProperties': {'.*': {'type': 'string'}},
1262 'required': ['settings'],
1264 'SettingsResults': {'additionalProperties': False,
1265 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
1267 'required': ['results'],
1269 'StatusResult': {'additionalProperties': False,
1270 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1273 'error': {'$ref': '#/definitions/Error'},
1274 'id': {'type': 'string'},
1275 'info': {'type': 'string'},
1276 'life': {'type': 'string'},
1277 'since': {'format': 'date-time',
1279 'status': {'type': 'string'}},
1287 'StatusResults': {'additionalProperties': False,
1288 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
1290 'required': ['results'],
1292 'StorageAddParams': {'additionalProperties': False,
1293 'properties': {'name': {'type': 'string'},
1294 'storage': {'$ref': '#/definitions/StorageConstraints'},
1295 'unit': {'type': 'string'}},
1296 'required': ['unit', 'name', 'storage'],
1298 'StorageAttachment': {'additionalProperties': False,
1299 'properties': {'kind': {'type': 'integer'},
1300 'life': {'type': 'string'},
1301 'location': {'type': 'string'},
1302 'owner-tag': {'type': 'string'},
1303 'storage-tag': {'type': 'string'},
1304 'unit-tag': {'type': 'string'}},
1305 'required': ['storage-tag',
1312 'StorageAttachmentId': {'additionalProperties': False,
1313 'properties': {'storage-tag': {'type': 'string'},
1314 'unit-tag': {'type': 'string'}},
1315 'required': ['storage-tag',
1318 'StorageAttachmentIds': {'additionalProperties': False,
1319 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
1321 'required': ['ids'],
1323 'StorageAttachmentIdsResult': {'additionalProperties': False,
1324 'properties': {'error': {'$ref': '#/definitions/Error'},
1325 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
1326 'required': ['result'],
1328 'StorageAttachmentIdsResults': {'additionalProperties': False,
1329 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
1332 'StorageAttachmentResult': {'additionalProperties': False,
1333 'properties': {'error': {'$ref': '#/definitions/Error'},
1334 'result': {'$ref': '#/definitions/StorageAttachment'}},
1335 'required': ['result'],
1337 'StorageAttachmentResults': {'additionalProperties': False,
1338 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
1341 'StorageConstraints': {'additionalProperties': False,
1342 'properties': {'count': {'type': 'integer'},
1343 'pool': {'type': 'string'},
1344 'size': {'type': 'integer'}},
1346 'StoragesAddParams': {'additionalProperties': False,
1347 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
1349 'required': ['storages'],
1351 'StringBoolResult': {'additionalProperties': False,
1352 'properties': {'error': {'$ref': '#/definitions/Error'},
1353 'ok': {'type': 'boolean'},
1354 'result': {'type': 'string'}},
1355 'required': ['result', 'ok'],
1357 'StringBoolResults': {'additionalProperties': False,
1358 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'},
1360 'required': ['results'],
1362 'StringResult': {'additionalProperties': False,
1363 'properties': {'error': {'$ref': '#/definitions/Error'},
1364 'result': {'type': 'string'}},
1365 'required': ['result'],
1367 'StringResults': {'additionalProperties': False,
1368 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
1370 'required': ['results'],
1372 'StringsResult': {'additionalProperties': False,
1373 'properties': {'error': {'$ref': '#/definitions/Error'},
1374 'result': {'items': {'type': 'string'},
1377 'StringsResults': {'additionalProperties': False,
1378 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1380 'required': ['results'],
1382 'StringsWatchResult': {'additionalProperties': False,
1383 'properties': {'changes': {'items': {'type': 'string'},
1385 'error': {'$ref': '#/definitions/Error'},
1386 'watcher-id': {'type': 'string'}},
1387 'required': ['watcher-id'],
1389 'StringsWatchResults': {'additionalProperties': False,
1390 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
1392 'required': ['results'],
1394 'UnitNetworkConfig': {'additionalProperties': False,
1395 'properties': {'binding-name': {'type': 'string'},
1396 'unit-tag': {'type': 'string'}},
1397 'required': ['unit-tag', 'binding-name'],
1399 'UnitNetworkConfigResult': {'additionalProperties': False,
1400 'properties': {'error': {'$ref': '#/definitions/Error'},
1401 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
1403 'required': ['info'],
1405 'UnitNetworkConfigResults': {'additionalProperties': False,
1406 'properties': {'results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
1408 'required': ['results'],
1410 'UnitSettings': {'additionalProperties': False,
1411 'properties': {'version': {'type': 'integer'}},
1412 'required': ['version'],
1414 'UnitsNetworkConfig': {'additionalProperties': False,
1415 'properties': {'args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
1417 'required': ['args'],
1419 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
1421 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
1423 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1424 'Result': {'$ref': '#/definitions/ActionResults'}},
1426 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
1427 'Result': {'$ref': '#/definitions/ErrorResults'}},
1429 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
1430 'Result': {'$ref': '#/definitions/ErrorResults'}},
1432 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1433 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
1435 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1436 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
1438 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1439 'Result': {'$ref': '#/definitions/StringResults'}},
1441 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1442 'Result': {'$ref': '#/definitions/StringResults'}},
1444 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1445 'Result': {'$ref': '#/definitions/ErrorResults'}},
1447 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
1449 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
1450 'Result': {'$ref': '#/definitions/StringResults'}},
1452 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1453 'Result': {'$ref': '#/definitions/IntResults'}},
1455 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1456 'Result': {'$ref': '#/definitions/StringBoolResults'}},
1458 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1459 'Result': {'$ref': '#/definitions/ErrorResults'}},
1461 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
1462 'Result': {'$ref': '#/definitions/ErrorResults'}},
1464 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1465 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
1467 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
1469 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1470 'Result': {'$ref': '#/definitions/ErrorResults'}},
1472 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1473 'Result': {'$ref': '#/definitions/ErrorResults'}},
1475 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1476 'Result': {'$ref': '#/definitions/ErrorResults'}},
1478 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1479 'Result': {'$ref': '#/definitions/ErrorResults'}},
1481 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
1482 'Result': {'$ref': '#/definitions/ErrorResults'}},
1484 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
1485 'Result': {'$ref': '#/definitions/ErrorResults'}},
1487 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1488 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
1490 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1491 'Result': {'$ref': '#/definitions/StringBoolResults'}},
1493 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1494 'Result': {'$ref': '#/definitions/BoolResults'}},
1496 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1497 'Result': {'$ref': '#/definitions/StringsResults'}},
1499 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
1500 'Result': {'$ref': '#/definitions/ErrorResults'}},
1502 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1503 'Result': {'$ref': '#/definitions/LifeResults'}},
1505 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
1506 'Result': {'$ref': '#/definitions/ErrorResults'}},
1508 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1510 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1512 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
1513 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
1515 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
1516 'Result': {'$ref': '#/definitions/ErrorResults'}},
1518 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1519 'Result': {'$ref': '#/definitions/StringResults'}},
1521 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1523 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1524 'Result': {'$ref': '#/definitions/StringResults'}},
1526 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1527 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
1529 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
1530 'Result': {'$ref': '#/definitions/SettingsResults'}},
1532 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
1533 'Result': {'$ref': '#/definitions/SettingsResults'}},
1535 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
1536 'Result': {'$ref': '#/definitions/RelationResults'}},
1538 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
1539 'Result': {'$ref': '#/definitions/RelationResults'}},
1541 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
1542 'Result': {'$ref': '#/definitions/ErrorResults'}},
1544 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1545 'Result': {'$ref': '#/definitions/ErrorResults'}},
1547 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1548 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
1550 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1551 'Result': {'$ref': '#/definitions/ErrorResults'}},
1553 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1554 'Result': {'$ref': '#/definitions/ErrorResults'}},
1556 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
1557 'Result': {'$ref': '#/definitions/ErrorResults'}},
1559 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1560 'Result': {'$ref': '#/definitions/ErrorResults'}},
1562 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1563 'Result': {'$ref': '#/definitions/ErrorResults'}},
1565 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'},
1566 'Result': {'$ref': '#/definitions/ErrorResults'}},
1568 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
1569 'Result': {'$ref': '#/definitions/LifeResults'}},
1571 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
1572 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
1574 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1575 'Result': {'$ref': '#/definitions/StatusResults'}},
1577 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1578 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
1580 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
1581 'Result': {'$ref': '#/definitions/ErrorResults'}},
1583 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1584 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1586 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1588 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1589 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1591 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1592 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1594 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1595 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1597 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1599 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1600 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1602 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1603 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1605 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
1606 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
1608 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
1609 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1611 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1612 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1614 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1615 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1617 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1618 'Result': {'$ref': '#/definitions/StringResults'}},
1623 @ReturnMapping(StringsResult
)
1624 async def APIAddresses(self
):
1627 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
1629 # map input types to rpc msg
1631 msg
= dict(type='Uniter', request
='APIAddresses', version
=4, params
=_params
)
1633 reply
= await self
.rpc(msg
)
1638 @ReturnMapping(APIHostPortsResult
)
1639 async def APIHostPorts(self
):
1642 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
1644 # map input types to rpc msg
1646 msg
= dict(type='Uniter', request
='APIHostPorts', version
=4, params
=_params
)
1648 reply
= await self
.rpc(msg
)
1653 @ReturnMapping(ActionResults
)
1654 async def Actions(self
, entities
):
1656 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1657 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
1659 # map input types to rpc msg
1661 msg
= dict(type='Uniter', request
='Actions', version
=4, params
=_params
)
1662 _params
['entities'] = entities
1663 reply
= await self
.rpc(msg
)
1668 @ReturnMapping(ErrorResults
)
1669 async def AddMetricBatches(self
, batches
):
1671 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
1672 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1674 # map input types to rpc msg
1676 msg
= dict(type='Uniter', request
='AddMetricBatches', version
=4, params
=_params
)
1677 _params
['batches'] = batches
1678 reply
= await self
.rpc(msg
)
1683 @ReturnMapping(ErrorResults
)
1684 async def AddUnitStorage(self
, storages
):
1686 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
1687 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1689 # map input types to rpc msg
1691 msg
= dict(type='Uniter', request
='AddUnitStorage', version
=4, params
=_params
)
1692 _params
['storages'] = storages
1693 reply
= await self
.rpc(msg
)
1698 @ReturnMapping(MachinePortsResults
)
1699 async def AllMachinePorts(self
, entities
):
1701 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1702 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
1704 # map input types to rpc msg
1706 msg
= dict(type='Uniter', request
='AllMachinePorts', version
=4, params
=_params
)
1707 _params
['entities'] = entities
1708 reply
= await self
.rpc(msg
)
1713 @ReturnMapping(ApplicationStatusResults
)
1714 async def ApplicationStatus(self
, entities
):
1716 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1717 Returns -> typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult>
1719 # map input types to rpc msg
1721 msg
= dict(type='Uniter', request
='ApplicationStatus', version
=4, params
=_params
)
1722 _params
['entities'] = entities
1723 reply
= await self
.rpc(msg
)
1728 @ReturnMapping(StringResults
)
1729 async def AssignedMachine(self
, entities
):
1731 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1732 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1734 # map input types to rpc msg
1736 msg
= dict(type='Uniter', request
='AssignedMachine', version
=4, params
=_params
)
1737 _params
['entities'] = entities
1738 reply
= await self
.rpc(msg
)
1743 @ReturnMapping(StringResults
)
1744 async def AvailabilityZone(self
, entities
):
1746 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1747 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1749 # map input types to rpc msg
1751 msg
= dict(type='Uniter', request
='AvailabilityZone', version
=4, params
=_params
)
1752 _params
['entities'] = entities
1753 reply
= await self
.rpc(msg
)
1758 @ReturnMapping(ErrorResults
)
1759 async def BeginActions(self
, entities
):
1761 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1762 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1764 # map input types to rpc msg
1766 msg
= dict(type='Uniter', request
='BeginActions', version
=4, params
=_params
)
1767 _params
['entities'] = entities
1768 reply
= await self
.rpc(msg
)
1773 @ReturnMapping(BytesResult
)
1774 async def CACert(self
):
1777 Returns -> typing.Sequence<+T_co>[int]
1779 # map input types to rpc msg
1781 msg
= dict(type='Uniter', request
='CACert', version
=4, params
=_params
)
1783 reply
= await self
.rpc(msg
)
1788 @ReturnMapping(StringResults
)
1789 async def CharmArchiveSha256(self
, urls
):
1791 urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL>
1792 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1794 # map input types to rpc msg
1796 msg
= dict(type='Uniter', request
='CharmArchiveSha256', version
=4, params
=_params
)
1797 _params
['urls'] = urls
1798 reply
= await self
.rpc(msg
)
1803 @ReturnMapping(IntResults
)
1804 async def CharmModifiedVersion(self
, entities
):
1806 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1807 Returns -> typing.Sequence<+T_co>[~IntResult]<~IntResult>
1809 # map input types to rpc msg
1811 msg
= dict(type='Uniter', request
='CharmModifiedVersion', version
=4, params
=_params
)
1812 _params
['entities'] = entities
1813 reply
= await self
.rpc(msg
)
1818 @ReturnMapping(StringBoolResults
)
1819 async def CharmURL(self
, entities
):
1821 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1822 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
1824 # map input types to rpc msg
1826 msg
= dict(type='Uniter', request
='CharmURL', version
=4, params
=_params
)
1827 _params
['entities'] = entities
1828 reply
= await self
.rpc(msg
)
1833 @ReturnMapping(ErrorResults
)
1834 async def ClearResolved(self
, entities
):
1836 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1837 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1839 # map input types to rpc msg
1841 msg
= dict(type='Uniter', request
='ClearResolved', version
=4, params
=_params
)
1842 _params
['entities'] = entities
1843 reply
= await self
.rpc(msg
)
1848 @ReturnMapping(ErrorResults
)
1849 async def ClosePorts(self
, entities
):
1851 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
1852 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1854 # map input types to rpc msg
1856 msg
= dict(type='Uniter', request
='ClosePorts', version
=4, params
=_params
)
1857 _params
['entities'] = entities
1858 reply
= await self
.rpc(msg
)
1863 @ReturnMapping(ConfigSettingsResults
)
1864 async def ConfigSettings(self
, entities
):
1866 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1867 Returns -> typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult>
1869 # map input types to rpc msg
1871 msg
= dict(type='Uniter', request
='ConfigSettings', version
=4, params
=_params
)
1872 _params
['entities'] = entities
1873 reply
= await self
.rpc(msg
)
1878 @ReturnMapping(ModelResult
)
1879 async def CurrentModel(self
):
1882 Returns -> typing.Union[_ForwardRef('Error'), str]
1884 # map input types to rpc msg
1886 msg
= dict(type='Uniter', request
='CurrentModel', version
=4, params
=_params
)
1888 reply
= await self
.rpc(msg
)
1893 @ReturnMapping(ErrorResults
)
1894 async def Destroy(self
, entities
):
1896 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1897 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1899 # map input types to rpc msg
1901 msg
= dict(type='Uniter', request
='Destroy', version
=4, params
=_params
)
1902 _params
['entities'] = entities
1903 reply
= await self
.rpc(msg
)
1908 @ReturnMapping(ErrorResults
)
1909 async def DestroyAllSubordinates(self
, entities
):
1911 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1912 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1914 # map input types to rpc msg
1916 msg
= dict(type='Uniter', request
='DestroyAllSubordinates', version
=4, params
=_params
)
1917 _params
['entities'] = entities
1918 reply
= await self
.rpc(msg
)
1923 @ReturnMapping(ErrorResults
)
1924 async def DestroyUnitStorageAttachments(self
, entities
):
1926 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1927 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1929 # map input types to rpc msg
1931 msg
= dict(type='Uniter', request
='DestroyUnitStorageAttachments', version
=4, params
=_params
)
1932 _params
['entities'] = entities
1933 reply
= await self
.rpc(msg
)
1938 @ReturnMapping(ErrorResults
)
1939 async def EnsureDead(self
, entities
):
1941 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1942 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1944 # map input types to rpc msg
1946 msg
= dict(type='Uniter', request
='EnsureDead', version
=4, params
=_params
)
1947 _params
['entities'] = entities
1948 reply
= await self
.rpc(msg
)
1953 @ReturnMapping(ErrorResults
)
1954 async def EnterScope(self
, relation_units
):
1956 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
1957 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1959 # map input types to rpc msg
1961 msg
= dict(type='Uniter', request
='EnterScope', version
=4, params
=_params
)
1962 _params
['relation-units'] = relation_units
1963 reply
= await self
.rpc(msg
)
1968 @ReturnMapping(ErrorResults
)
1969 async def FinishActions(self
, results
):
1971 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
1972 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1974 # map input types to rpc msg
1976 msg
= dict(type='Uniter', request
='FinishActions', version
=4, params
=_params
)
1977 _params
['results'] = results
1978 reply
= await self
.rpc(msg
)
1983 @ReturnMapping(MeterStatusResults
)
1984 async def GetMeterStatus(self
, entities
):
1986 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1987 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
1989 # map input types to rpc msg
1991 msg
= dict(type='Uniter', request
='GetMeterStatus', version
=4, params
=_params
)
1992 _params
['entities'] = entities
1993 reply
= await self
.rpc(msg
)
1998 @ReturnMapping(StringBoolResults
)
1999 async def GetPrincipal(self
, entities
):
2001 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2002 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
2004 # map input types to rpc msg
2006 msg
= dict(type='Uniter', request
='GetPrincipal', version
=4, params
=_params
)
2007 _params
['entities'] = entities
2008 reply
= await self
.rpc(msg
)
2013 @ReturnMapping(BoolResults
)
2014 async def HasSubordinates(self
, entities
):
2016 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2017 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
2019 # map input types to rpc msg
2021 msg
= dict(type='Uniter', request
='HasSubordinates', version
=4, params
=_params
)
2022 _params
['entities'] = entities
2023 reply
= await self
.rpc(msg
)
2028 @ReturnMapping(StringsResults
)
2029 async def JoinedRelations(self
, entities
):
2031 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2032 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2034 # map input types to rpc msg
2036 msg
= dict(type='Uniter', request
='JoinedRelations', version
=4, params
=_params
)
2037 _params
['entities'] = entities
2038 reply
= await self
.rpc(msg
)
2043 @ReturnMapping(ErrorResults
)
2044 async def LeaveScope(self
, relation_units
):
2046 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
2047 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2049 # map input types to rpc msg
2051 msg
= dict(type='Uniter', request
='LeaveScope', version
=4, params
=_params
)
2052 _params
['relation-units'] = relation_units
2053 reply
= await self
.rpc(msg
)
2058 @ReturnMapping(LifeResults
)
2059 async def Life(self
, entities
):
2061 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2062 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2064 # map input types to rpc msg
2066 msg
= dict(type='Uniter', request
='Life', version
=4, params
=_params
)
2067 _params
['entities'] = entities
2068 reply
= await self
.rpc(msg
)
2073 @ReturnMapping(ErrorResults
)
2074 async def Merge(self
, params
):
2076 params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam>
2077 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2079 # map input types to rpc msg
2081 msg
= dict(type='Uniter', request
='Merge', version
=4, params
=_params
)
2082 _params
['params'] = params
2083 reply
= await self
.rpc(msg
)
2088 @ReturnMapping(ModelConfigResult
)
2089 async def ModelConfig(self
):
2092 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
2094 # map input types to rpc msg
2096 msg
= dict(type='Uniter', request
='ModelConfig', version
=4, params
=_params
)
2098 reply
= await self
.rpc(msg
)
2103 @ReturnMapping(StringResult
)
2104 async def ModelUUID(self
):
2107 Returns -> typing.Union[_ForwardRef('Error'), str]
2109 # map input types to rpc msg
2111 msg
= dict(type='Uniter', request
='ModelUUID', version
=4, params
=_params
)
2113 reply
= await self
.rpc(msg
)
2118 @ReturnMapping(UnitNetworkConfigResults
)
2119 async def NetworkConfig(self
, args
):
2121 args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig>
2122 Returns -> typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult>
2124 # map input types to rpc msg
2126 msg
= dict(type='Uniter', request
='NetworkConfig', version
=4, params
=_params
)
2127 _params
['args'] = args
2128 reply
= await self
.rpc(msg
)
2133 @ReturnMapping(ErrorResults
)
2134 async def OpenPorts(self
, entities
):
2136 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
2137 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2139 # map input types to rpc msg
2141 msg
= dict(type='Uniter', request
='OpenPorts', version
=4, params
=_params
)
2142 _params
['entities'] = entities
2143 reply
= await self
.rpc(msg
)
2148 @ReturnMapping(StringResults
)
2149 async def PrivateAddress(self
, entities
):
2151 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2152 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
2154 # map input types to rpc msg
2156 msg
= dict(type='Uniter', request
='PrivateAddress', version
=4, params
=_params
)
2157 _params
['entities'] = entities
2158 reply
= await self
.rpc(msg
)
2163 @ReturnMapping(StringResult
)
2164 async def ProviderType(self
):
2167 Returns -> typing.Union[_ForwardRef('Error'), str]
2169 # map input types to rpc msg
2171 msg
= dict(type='Uniter', request
='ProviderType', version
=4, params
=_params
)
2173 reply
= await self
.rpc(msg
)
2178 @ReturnMapping(StringResults
)
2179 async def PublicAddress(self
, entities
):
2181 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2182 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
2184 # map input types to rpc msg
2186 msg
= dict(type='Uniter', request
='PublicAddress', version
=4, params
=_params
)
2187 _params
['entities'] = entities
2188 reply
= await self
.rpc(msg
)
2193 @ReturnMapping(GetLeadershipSettingsBulkResults
)
2194 async def Read(self
, entities
):
2196 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2197 Returns -> typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult>
2199 # map input types to rpc msg
2201 msg
= dict(type='Uniter', request
='Read', version
=4, params
=_params
)
2202 _params
['entities'] = entities
2203 reply
= await self
.rpc(msg
)
2208 @ReturnMapping(SettingsResults
)
2209 async def ReadRemoteSettings(self
, relation_unit_pairs
):
2211 relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair>
2212 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
2214 # map input types to rpc msg
2216 msg
= dict(type='Uniter', request
='ReadRemoteSettings', version
=4, params
=_params
)
2217 _params
['relation-unit-pairs'] = relation_unit_pairs
2218 reply
= await self
.rpc(msg
)
2223 @ReturnMapping(SettingsResults
)
2224 async def ReadSettings(self
, relation_units
):
2226 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
2227 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
2229 # map input types to rpc msg
2231 msg
= dict(type='Uniter', request
='ReadSettings', version
=4, params
=_params
)
2232 _params
['relation-units'] = relation_units
2233 reply
= await self
.rpc(msg
)
2238 @ReturnMapping(RelationResults
)
2239 async def Relation(self
, relation_units
):
2241 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
2242 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
2244 # map input types to rpc msg
2246 msg
= dict(type='Uniter', request
='Relation', version
=4, params
=_params
)
2247 _params
['relation-units'] = relation_units
2248 reply
= await self
.rpc(msg
)
2253 @ReturnMapping(RelationResults
)
2254 async def RelationById(self
, relation_ids
):
2256 relation_ids : typing.Sequence<+T_co>[int]
2257 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
2259 # map input types to rpc msg
2261 msg
= dict(type='Uniter', request
='RelationById', version
=4, params
=_params
)
2262 _params
['relation-ids'] = relation_ids
2263 reply
= await self
.rpc(msg
)
2268 @ReturnMapping(ErrorResults
)
2269 async def RemoveStorageAttachments(self
, ids
):
2271 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
2272 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2274 # map input types to rpc msg
2276 msg
= dict(type='Uniter', request
='RemoveStorageAttachments', version
=4, params
=_params
)
2277 _params
['ids'] = ids
2278 reply
= await self
.rpc(msg
)
2283 @ReturnMapping(ErrorResults
)
2284 async def RequestReboot(self
, entities
):
2286 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2287 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2289 # map input types to rpc msg
2291 msg
= dict(type='Uniter', request
='RequestReboot', version
=4, params
=_params
)
2292 _params
['entities'] = entities
2293 reply
= await self
.rpc(msg
)
2298 @ReturnMapping(ResolvedModeResults
)
2299 async def Resolved(self
, entities
):
2301 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2302 Returns -> typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult>
2304 # map input types to rpc msg
2306 msg
= dict(type='Uniter', request
='Resolved', version
=4, params
=_params
)
2307 _params
['entities'] = entities
2308 reply
= await self
.rpc(msg
)
2313 @ReturnMapping(ErrorResults
)
2314 async def SetAgentStatus(self
, entities
):
2316 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2317 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2319 # map input types to rpc msg
2321 msg
= dict(type='Uniter', request
='SetAgentStatus', version
=4, params
=_params
)
2322 _params
['entities'] = entities
2323 reply
= await self
.rpc(msg
)
2328 @ReturnMapping(ErrorResults
)
2329 async def SetApplicationStatus(self
, entities
):
2331 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2332 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2334 # map input types to rpc msg
2336 msg
= dict(type='Uniter', request
='SetApplicationStatus', version
=4, params
=_params
)
2337 _params
['entities'] = entities
2338 reply
= await self
.rpc(msg
)
2343 @ReturnMapping(ErrorResults
)
2344 async def SetCharmURL(self
, entities
):
2346 entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL>
2347 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2349 # map input types to rpc msg
2351 msg
= dict(type='Uniter', request
='SetCharmURL', version
=4, params
=_params
)
2352 _params
['entities'] = entities
2353 reply
= await self
.rpc(msg
)
2358 @ReturnMapping(ErrorResults
)
2359 async def SetStatus(self
, entities
):
2361 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2362 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2364 # map input types to rpc msg
2366 msg
= dict(type='Uniter', request
='SetStatus', version
=4, params
=_params
)
2367 _params
['entities'] = entities
2368 reply
= await self
.rpc(msg
)
2373 @ReturnMapping(ErrorResults
)
2374 async def SetUnitStatus(self
, entities
):
2376 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2377 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2379 # map input types to rpc msg
2381 msg
= dict(type='Uniter', request
='SetUnitStatus', version
=4, params
=_params
)
2382 _params
['entities'] = entities
2383 reply
= await self
.rpc(msg
)
2388 @ReturnMapping(ErrorResults
)
2389 async def SetWorkloadVersion(self
, entities
):
2391 entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion>
2392 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2394 # map input types to rpc msg
2396 msg
= dict(type='Uniter', request
='SetWorkloadVersion', version
=4, params
=_params
)
2397 _params
['entities'] = entities
2398 reply
= await self
.rpc(msg
)
2403 @ReturnMapping(LifeResults
)
2404 async def StorageAttachmentLife(self
, ids
):
2406 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
2407 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2409 # map input types to rpc msg
2411 msg
= dict(type='Uniter', request
='StorageAttachmentLife', version
=4, params
=_params
)
2412 _params
['ids'] = ids
2413 reply
= await self
.rpc(msg
)
2418 @ReturnMapping(StorageAttachmentResults
)
2419 async def StorageAttachments(self
, ids
):
2421 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
2422 Returns -> typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult>
2424 # map input types to rpc msg
2426 msg
= dict(type='Uniter', request
='StorageAttachments', version
=4, params
=_params
)
2427 _params
['ids'] = ids
2428 reply
= await self
.rpc(msg
)
2433 @ReturnMapping(StatusResults
)
2434 async def UnitStatus(self
, entities
):
2436 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2437 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
2439 # map input types to rpc msg
2441 msg
= dict(type='Uniter', request
='UnitStatus', version
=4, params
=_params
)
2442 _params
['entities'] = entities
2443 reply
= await self
.rpc(msg
)
2448 @ReturnMapping(StorageAttachmentIdsResults
)
2449 async def UnitStorageAttachments(self
, entities
):
2451 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2452 Returns -> typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult>
2454 # map input types to rpc msg
2456 msg
= dict(type='Uniter', request
='UnitStorageAttachments', version
=4, params
=_params
)
2457 _params
['entities'] = entities
2458 reply
= await self
.rpc(msg
)
2463 @ReturnMapping(ErrorResults
)
2464 async def UpdateSettings(self
, relation_units
):
2466 relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings>
2467 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2469 # map input types to rpc msg
2471 msg
= dict(type='Uniter', request
='UpdateSettings', version
=4, params
=_params
)
2472 _params
['relation-units'] = relation_units
2473 reply
= await self
.rpc(msg
)
2478 @ReturnMapping(NotifyWatchResults
)
2479 async def Watch(self
, entities
):
2481 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2482 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2484 # map input types to rpc msg
2486 msg
= dict(type='Uniter', request
='Watch', version
=4, params
=_params
)
2487 _params
['entities'] = entities
2488 reply
= await self
.rpc(msg
)
2493 @ReturnMapping(NotifyWatchResult
)
2494 async def WatchAPIHostPorts(self
):
2497 Returns -> typing.Union[str, _ForwardRef('Error')]
2499 # map input types to rpc msg
2501 msg
= dict(type='Uniter', request
='WatchAPIHostPorts', version
=4, params
=_params
)
2503 reply
= await self
.rpc(msg
)
2508 @ReturnMapping(StringsWatchResults
)
2509 async def WatchActionNotifications(self
, entities
):
2511 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2512 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
2514 # map input types to rpc msg
2516 msg
= dict(type='Uniter', request
='WatchActionNotifications', version
=4, params
=_params
)
2517 _params
['entities'] = entities
2518 reply
= await self
.rpc(msg
)
2523 @ReturnMapping(StringsWatchResults
)
2524 async def WatchApplicationRelations(self
, entities
):
2526 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2527 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
2529 # map input types to rpc msg
2531 msg
= dict(type='Uniter', request
='WatchApplicationRelations', version
=4, params
=_params
)
2532 _params
['entities'] = entities
2533 reply
= await self
.rpc(msg
)
2538 @ReturnMapping(NotifyWatchResults
)
2539 async def WatchConfigSettings(self
, entities
):
2541 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2542 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2544 # map input types to rpc msg
2546 msg
= dict(type='Uniter', request
='WatchConfigSettings', version
=4, params
=_params
)
2547 _params
['entities'] = entities
2548 reply
= await self
.rpc(msg
)
2553 @ReturnMapping(NotifyWatchResult
)
2554 async def WatchForModelConfigChanges(self
):
2557 Returns -> typing.Union[str, _ForwardRef('Error')]
2559 # map input types to rpc msg
2561 msg
= dict(type='Uniter', request
='WatchForModelConfigChanges', version
=4, params
=_params
)
2563 reply
= await self
.rpc(msg
)
2568 @ReturnMapping(NotifyWatchResults
)
2569 async def WatchLeadershipSettings(self
, entities
):
2571 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2572 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2574 # map input types to rpc msg
2576 msg
= dict(type='Uniter', request
='WatchLeadershipSettings', version
=4, params
=_params
)
2577 _params
['entities'] = entities
2578 reply
= await self
.rpc(msg
)
2583 @ReturnMapping(NotifyWatchResults
)
2584 async def WatchMeterStatus(self
, entities
):
2586 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2587 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2589 # map input types to rpc msg
2591 msg
= dict(type='Uniter', request
='WatchMeterStatus', version
=4, params
=_params
)
2592 _params
['entities'] = entities
2593 reply
= await self
.rpc(msg
)
2598 @ReturnMapping(RelationUnitsWatchResults
)
2599 async def WatchRelationUnits(self
, relation_units
):
2601 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
2602 Returns -> typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult>
2604 # map input types to rpc msg
2606 msg
= dict(type='Uniter', request
='WatchRelationUnits', version
=4, params
=_params
)
2607 _params
['relation-units'] = relation_units
2608 reply
= await self
.rpc(msg
)
2613 @ReturnMapping(NotifyWatchResults
)
2614 async def WatchStorageAttachments(self
, ids
):
2616 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
2617 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2619 # map input types to rpc msg
2621 msg
= dict(type='Uniter', request
='WatchStorageAttachments', version
=4, params
=_params
)
2622 _params
['ids'] = ids
2623 reply
= await self
.rpc(msg
)
2628 @ReturnMapping(NotifyWatchResults
)
2629 async def WatchUnitAddresses(self
, entities
):
2631 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2632 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2634 # map input types to rpc msg
2636 msg
= dict(type='Uniter', request
='WatchUnitAddresses', version
=4, params
=_params
)
2637 _params
['entities'] = entities
2638 reply
= await self
.rpc(msg
)
2643 @ReturnMapping(StringsWatchResults
)
2644 async def WatchUnitStorageAttachments(self
, entities
):
2646 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2647 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
2649 # map input types to rpc msg
2651 msg
= dict(type='Uniter', request
='WatchUnitStorageAttachments', version
=4, params
=_params
)
2652 _params
['entities'] = entities
2653 reply
= await self
.rpc(msg
)
2658 @ReturnMapping(StringResults
)
2659 async def WorkloadVersion(self
, entities
):
2661 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2662 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
2664 # map input types to rpc msg
2666 msg
= dict(type='Uniter', request
='WorkloadVersion', version
=4, params
=_params
)
2667 _params
['entities'] = entities
2668 reply
= await self
.rpc(msg
)