1 # DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py.
2 # Changes will be overwritten/lost when the file is regenerated.
4 from juju
.client
.facade
import Type
, ReturnMapping
5 from juju
.client
._definitions
import *
8 class ApplicationFacade(Type
):
11 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
12 'properties': {'application': {'type': 'string'},
13 'attach-storage': {'items': {'type': 'string'},
15 'num-units': {'type': 'integer'},
16 'placement': {'items': {'$ref': '#/definitions/Placement'},
18 'policy': {'type': 'string'}},
19 'required': ['application',
23 'AddApplicationUnitsResults': {'additionalProperties': False,
24 'properties': {'units': {'items': {'type': 'string'},
26 'required': ['units'],
28 'AddRelation': {'additionalProperties': False,
29 'properties': {'endpoints': {'items': {'type': 'string'},
31 'via-cidrs': {'items': {'type': 'string'},
33 'required': ['endpoints'],
35 'AddRelationResults': {'additionalProperties': False,
36 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
38 'required': ['endpoints'],
40 'ApplicationCharmRelations': {'additionalProperties': False,
41 'properties': {'application': {'type': 'string'}},
42 'required': ['application'],
44 'ApplicationCharmRelationsResults': {'additionalProperties': False,
45 'properties': {'charm-relations': {'items': {'type': 'string'},
47 'required': ['charm-relations'],
49 'ApplicationConfigSet': {'additionalProperties': False,
50 'properties': {'application': {'type': 'string'},
51 'config': {'patternProperties': {'.*': {'type': 'string'}},
53 'required': ['application', 'config'],
55 'ApplicationConfigSetArgs': {'additionalProperties': False,
56 'properties': {'Args': {'items': {'$ref': '#/definitions/ApplicationConfigSet'},
60 'ApplicationConfigUnsetArgs': {'additionalProperties': False,
61 'properties': {'Args': {'items': {'$ref': '#/definitions/ApplicationUnset'},
65 'ApplicationConstraint': {'additionalProperties': False,
66 'properties': {'constraints': {'$ref': '#/definitions/Value'},
67 'error': {'$ref': '#/definitions/Error'}},
68 'required': ['constraints'],
70 'ApplicationDeploy': {'additionalProperties': False,
71 'properties': {'application': {'type': 'string'},
72 'attach-storage': {'items': {'type': 'string'},
74 'channel': {'type': 'string'},
75 'charm-url': {'type': 'string'},
76 'config': {'patternProperties': {'.*': {'type': 'string'}},
78 'config-yaml': {'type': 'string'},
79 'constraints': {'$ref': '#/definitions/Value'},
80 'devices': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
82 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
84 'num-units': {'type': 'integer'},
85 'placement': {'items': {'$ref': '#/definitions/Placement'},
87 'policy': {'type': 'string'},
88 'resources': {'patternProperties': {'.*': {'type': 'string'}},
90 'series': {'type': 'string'},
91 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
93 'required': ['application',
101 'ApplicationDestroy': {'additionalProperties': False,
102 'properties': {'application': {'type': 'string'}},
103 'required': ['application'],
105 'ApplicationExpose': {'additionalProperties': False,
106 'properties': {'application': {'type': 'string'}},
107 'required': ['application'],
109 'ApplicationGet': {'additionalProperties': False,
110 'properties': {'application': {'type': 'string'}},
111 'required': ['application'],
113 'ApplicationGetConfigResults': {'additionalProperties': False,
114 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigResult'},
116 'required': ['Results'],
118 'ApplicationGetConstraintsResults': {'additionalProperties': False,
119 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationConstraint'},
121 'required': ['results'],
123 'ApplicationGetResults': {'additionalProperties': False,
124 'properties': {'application': {'type': 'string'},
125 'application-config': {'patternProperties': {'.*': {'additionalProperties': True,
128 'charm': {'type': 'string'},
129 'config': {'patternProperties': {'.*': {'additionalProperties': True,
132 'constraints': {'$ref': '#/definitions/Value'},
133 'series': {'type': 'string'}},
134 'required': ['application',
140 'ApplicationMetricCredential': {'additionalProperties': False,
141 'properties': {'application': {'type': 'string'},
142 'metrics-credentials': {'items': {'type': 'integer'},
144 'required': ['application',
145 'metrics-credentials'],
147 'ApplicationMetricCredentials': {'additionalProperties': False,
148 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
150 'required': ['creds'],
152 'ApplicationOfferDetails': {'additionalProperties': False,
153 'properties': {'application-description': {'type': 'string'},
154 'bindings': {'patternProperties': {'.*': {'type': 'string'}},
156 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
158 'offer-name': {'type': 'string'},
159 'offer-url': {'type': 'string'},
160 'offer-uuid': {'type': 'string'},
161 'source-model-tag': {'type': 'string'},
162 'spaces': {'items': {'$ref': '#/definitions/RemoteSpace'},
164 'users': {'items': {'$ref': '#/definitions/OfferUserDetails'},
166 'required': ['source-model-tag',
170 'application-description'],
172 'ApplicationSet': {'additionalProperties': False,
173 'properties': {'application': {'type': 'string'},
174 'options': {'patternProperties': {'.*': {'type': 'string'}},
176 'required': ['application', 'options'],
178 'ApplicationSetCharm': {'additionalProperties': False,
179 'properties': {'application': {'type': 'string'},
180 'channel': {'type': 'string'},
181 'charm-url': {'type': 'string'},
182 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
184 'config-settings-yaml': {'type': 'string'},
185 'force': {'type': 'boolean'},
186 'force-series': {'type': 'boolean'},
187 'force-units': {'type': 'boolean'},
188 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
190 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
192 'required': ['application',
199 'ApplicationSetCharmProfile': {'additionalProperties': False,
200 'properties': {'application': {'type': 'string'},
201 'charm-url': {'type': 'string'}},
202 'required': ['application',
205 'ApplicationUnexpose': {'additionalProperties': False,
206 'properties': {'application': {'type': 'string'}},
207 'required': ['application'],
209 'ApplicationUnset': {'additionalProperties': False,
210 'properties': {'application': {'type': 'string'},
211 'options': {'items': {'type': 'string'},
213 'required': ['application', 'options'],
215 'ApplicationUpdate': {'additionalProperties': False,
216 'properties': {'application': {'type': 'string'},
217 'charm-url': {'type': 'string'},
218 'constraints': {'$ref': '#/definitions/Value'},
219 'force': {'type': 'boolean'},
220 'force-charm-url': {'type': 'boolean'},
221 'force-series': {'type': 'boolean'},
222 'min-units': {'type': 'integer'},
223 'settings': {'patternProperties': {'.*': {'type': 'string'}},
225 'settings-yaml': {'type': 'string'}},
226 'required': ['application',
233 'ApplicationsDeploy': {'additionalProperties': False,
234 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
236 'required': ['applications'],
238 'CharmRelation': {'additionalProperties': False,
239 'properties': {'interface': {'type': 'string'},
240 'limit': {'type': 'integer'},
241 'name': {'type': 'string'},
242 'optional': {'type': 'boolean'},
243 'role': {'type': 'string'},
244 'scope': {'type': 'string'}},
252 'ConfigResult': {'additionalProperties': False,
253 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
256 'error': {'$ref': '#/definitions/Error'}},
257 'required': ['config'],
259 'Constraints': {'additionalProperties': False,
260 'properties': {'Count': {'type': 'integer'},
261 'Pool': {'type': 'string'},
262 'Size': {'type': 'integer'}},
263 'required': ['Pool', 'Size', 'Count'],
265 'ConsumeApplicationArg': {'additionalProperties': False,
266 'properties': {'ApplicationOfferDetails': {'$ref': '#/definitions/ApplicationOfferDetails'},
267 'application-alias': {'type': 'string'},
268 'external-controller': {'$ref': '#/definitions/ExternalControllerInfo'},
269 'macaroon': {'$ref': '#/definitions/Macaroon'}},
270 'required': ['ApplicationOfferDetails'],
272 'ConsumeApplicationArgs': {'additionalProperties': False,
273 'properties': {'args': {'items': {'$ref': '#/definitions/ConsumeApplicationArg'},
276 'DestroyApplicationInfo': {'additionalProperties': False,
277 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
279 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
281 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
284 'DestroyApplicationParams': {'additionalProperties': False,
285 'properties': {'application-tag': {'type': 'string'},
286 'destroy-storage': {'type': 'boolean'}},
287 'required': ['application-tag'],
289 'DestroyApplicationResult': {'additionalProperties': False,
290 'properties': {'error': {'$ref': '#/definitions/Error'},
291 'info': {'$ref': '#/definitions/DestroyApplicationInfo'}},
293 'DestroyApplicationResults': {'additionalProperties': False,
294 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyApplicationResult'},
297 'DestroyApplicationUnits': {'additionalProperties': False,
298 'properties': {'unit-names': {'items': {'type': 'string'},
300 'required': ['unit-names'],
302 'DestroyApplicationsParams': {'additionalProperties': False,
303 'properties': {'applications': {'items': {'$ref': '#/definitions/DestroyApplicationParams'},
305 'required': ['applications'],
307 'DestroyConsumedApplicationParams': {'additionalProperties': False,
308 'properties': {'application-tag': {'type': 'string'}},
309 'required': ['application-tag'],
311 'DestroyConsumedApplicationsParams': {'additionalProperties': False,
312 'properties': {'applications': {'items': {'$ref': '#/definitions/DestroyConsumedApplicationParams'},
314 'required': ['applications'],
316 'DestroyRelation': {'additionalProperties': False,
317 'properties': {'endpoints': {'items': {'type': 'string'},
319 'relation-id': {'type': 'integer'}},
320 'required': ['relation-id'],
322 'DestroyUnitInfo': {'additionalProperties': False,
323 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
325 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
328 'DestroyUnitParams': {'additionalProperties': False,
329 'properties': {'destroy-storage': {'type': 'boolean'},
330 'unit-tag': {'type': 'string'}},
331 'required': ['unit-tag'],
333 'DestroyUnitResult': {'additionalProperties': False,
334 'properties': {'error': {'$ref': '#/definitions/Error'},
335 'info': {'$ref': '#/definitions/DestroyUnitInfo'}},
337 'DestroyUnitResults': {'additionalProperties': False,
338 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyUnitResult'},
341 'DestroyUnitsParams': {'additionalProperties': False,
342 'properties': {'units': {'items': {'$ref': '#/definitions/DestroyUnitParams'},
344 'required': ['units'],
346 'Entities': {'additionalProperties': False,
347 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
349 'required': ['entities'],
351 'Entity': {'additionalProperties': False,
352 'properties': {'tag': {'type': 'string'}},
355 'Error': {'additionalProperties': False,
356 'properties': {'code': {'type': 'string'},
357 'info': {'$ref': '#/definitions/ErrorInfo'},
358 'message': {'type': 'string'}},
359 'required': ['message', 'code'],
361 'ErrorInfo': {'additionalProperties': False,
362 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
363 'macaroon-path': {'type': 'string'}},
365 'ErrorResult': {'additionalProperties': False,
366 'properties': {'error': {'$ref': '#/definitions/Error'}},
368 'ErrorResults': {'additionalProperties': False,
369 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
371 'required': ['results'],
373 'ExternalControllerInfo': {'additionalProperties': False,
374 'properties': {'addrs': {'items': {'type': 'string'},
376 'ca-cert': {'type': 'string'},
377 'controller-alias': {'type': 'string'},
378 'controller-tag': {'type': 'string'}},
379 'required': ['controller-tag',
384 'LXDProfileUpgradeMessages': {'additionalProperties': False,
385 'properties': {'application': {'$ref': '#/definitions/Entity'},
386 'watcher-id': {'type': 'string'}},
387 'required': ['application',
390 'LXDProfileUpgradeMessagesResult': {'additionalProperties': False,
391 'properties': {'error': {'$ref': '#/definitions/Error'},
392 'message': {'type': 'string'},
393 'unit-name': {'type': 'string'}},
394 'required': ['unit-name',
397 'LXDProfileUpgradeMessagesResults': {'additionalProperties': False,
398 'properties': {'args': {'items': {'$ref': '#/definitions/LXDProfileUpgradeMessagesResult'},
400 'required': ['args'],
402 'Macaroon': {'additionalProperties': False, 'type': 'object'},
403 'NotifyWatchResult': {'additionalProperties': False,
404 'properties': {'NotifyWatcherId': {'type': 'string'},
405 'error': {'$ref': '#/definitions/Error'}},
406 'required': ['NotifyWatcherId'],
408 'OfferUserDetails': {'additionalProperties': False,
409 'properties': {'access': {'type': 'string'},
410 'display-name': {'type': 'string'},
411 'user': {'type': 'string'}},
416 'Placement': {'additionalProperties': False,
417 'properties': {'directive': {'type': 'string'},
418 'scope': {'type': 'string'}},
419 'required': ['scope', 'directive'],
421 'RelationSuspendedArg': {'additionalProperties': False,
422 'properties': {'message': {'type': 'string'},
423 'relation-id': {'type': 'integer'},
424 'suspended': {'type': 'boolean'}},
425 'required': ['relation-id',
429 'RelationSuspendedArgs': {'additionalProperties': False,
430 'properties': {'args': {'items': {'$ref': '#/definitions/RelationSuspendedArg'},
432 'required': ['args'],
434 'RemoteEndpoint': {'additionalProperties': False,
435 'properties': {'interface': {'type': 'string'},
436 'limit': {'type': 'integer'},
437 'name': {'type': 'string'},
438 'role': {'type': 'string'}},
444 'RemoteSpace': {'additionalProperties': False,
445 'properties': {'cloud-type': {'type': 'string'},
446 'name': {'type': 'string'},
447 'provider-attributes': {'patternProperties': {'.*': {'additionalProperties': True,
450 'provider-id': {'type': 'string'},
451 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
453 'required': ['cloud-type',
456 'provider-attributes',
459 'ScaleApplicationInfo': {'additionalProperties': False,
460 'properties': {'num-units': {'type': 'integer'}},
461 'required': ['num-units'],
463 'ScaleApplicationParams': {'additionalProperties': False,
464 'properties': {'application-tag': {'type': 'string'},
465 'scale': {'type': 'integer'},
466 'scale-change': {'type': 'integer'}},
467 'required': ['application-tag',
470 'ScaleApplicationResult': {'additionalProperties': False,
471 'properties': {'error': {'$ref': '#/definitions/Error'},
472 'info': {'$ref': '#/definitions/ScaleApplicationInfo'}},
474 'ScaleApplicationResults': {'additionalProperties': False,
475 'properties': {'results': {'items': {'$ref': '#/definitions/ScaleApplicationResult'},
478 'ScaleApplicationsParams': {'additionalProperties': False,
479 'properties': {'applications': {'items': {'$ref': '#/definitions/ScaleApplicationParams'},
481 'required': ['applications'],
483 'SetConstraints': {'additionalProperties': False,
484 'properties': {'application': {'type': 'string'},
485 'constraints': {'$ref': '#/definitions/Value'}},
486 'required': ['application', 'constraints'],
488 'StorageConstraints': {'additionalProperties': False,
489 'properties': {'count': {'type': 'integer'},
490 'pool': {'type': 'string'},
491 'size': {'type': 'integer'}},
493 'StringResult': {'additionalProperties': False,
494 'properties': {'error': {'$ref': '#/definitions/Error'},
495 'result': {'type': 'string'}},
496 'required': ['result'],
498 'Subnet': {'additionalProperties': False,
499 'properties': {'cidr': {'type': 'string'},
500 'life': {'type': 'string'},
501 'provider-id': {'type': 'string'},
502 'provider-network-id': {'type': 'string'},
503 'provider-space-id': {'type': 'string'},
504 'space-tag': {'type': 'string'},
505 'status': {'type': 'string'},
506 'vlan-tag': {'type': 'integer'},
507 'zones': {'items': {'type': 'string'},
515 'UnitsResolved': {'additionalProperties': False,
516 'properties': {'all': {'type': 'boolean'},
517 'retry': {'type': 'boolean'},
518 'tags': {'$ref': '#/definitions/Entities'}},
520 'UpdateSeriesArg': {'additionalProperties': False,
521 'properties': {'force': {'type': 'boolean'},
522 'series': {'type': 'string'},
523 'tag': {'$ref': '#/definitions/Entity'}},
524 'required': ['tag', 'force', 'series'],
526 'UpdateSeriesArgs': {'additionalProperties': False,
527 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSeriesArg'},
529 'required': ['args'],
531 'Value': {'additionalProperties': False,
532 'properties': {'arch': {'type': 'string'},
533 'container': {'type': 'string'},
534 'cores': {'type': 'integer'},
535 'cpu-power': {'type': 'integer'},
536 'instance-type': {'type': 'string'},
537 'mem': {'type': 'integer'},
538 'root-disk': {'type': 'integer'},
539 'spaces': {'items': {'type': 'string'},
541 'tags': {'items': {'type': 'string'},
543 'virt-type': {'type': 'string'},
544 'zones': {'items': {'type': 'string'},
547 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
548 'Result': {'$ref': '#/definitions/AddRelationResults'}},
550 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
551 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
553 'CharmConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
554 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}},
556 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
557 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
559 'Consume': {'properties': {'Params': {'$ref': '#/definitions/ConsumeApplicationArgs'},
560 'Result': {'$ref': '#/definitions/ErrorResults'}},
562 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
563 'Result': {'$ref': '#/definitions/ErrorResults'}},
565 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
567 'DestroyApplication': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationsParams'},
568 'Result': {'$ref': '#/definitions/DestroyApplicationResults'}},
570 'DestroyConsumedApplications': {'properties': {'Params': {'$ref': '#/definitions/DestroyConsumedApplicationsParams'},
571 'Result': {'$ref': '#/definitions/ErrorResults'}},
573 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
575 'DestroyUnit': {'properties': {'Params': {'$ref': '#/definitions/DestroyUnitsParams'},
576 'Result': {'$ref': '#/definitions/DestroyUnitResults'}},
578 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
580 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
582 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
583 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
585 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
586 'Result': {'$ref': '#/definitions/StringResult'}},
588 'GetConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
589 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}},
591 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
592 'Result': {'$ref': '#/definitions/ApplicationGetConstraintsResults'}},
594 'GetLXDProfileUpgradeMessages': {'properties': {'Params': {'$ref': '#/definitions/LXDProfileUpgradeMessages'},
595 'Result': {'$ref': '#/definitions/LXDProfileUpgradeMessagesResults'}},
597 'ResolveUnitErrors': {'properties': {'Params': {'$ref': '#/definitions/UnitsResolved'},
598 'Result': {'$ref': '#/definitions/ErrorResults'}},
600 'ScaleApplications': {'properties': {'Params': {'$ref': '#/definitions/ScaleApplicationsParams'},
601 'Result': {'$ref': '#/definitions/ScaleApplicationResults'}},
603 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
605 'SetApplicationsConfig': {'properties': {'Params': {'$ref': '#/definitions/ApplicationConfigSetArgs'},
606 'Result': {'$ref': '#/definitions/ErrorResults'}},
608 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
610 'SetCharmProfile': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharmProfile'}},
612 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
614 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
615 'Result': {'$ref': '#/definitions/ErrorResults'}},
617 'SetRelationsSuspended': {'properties': {'Params': {'$ref': '#/definitions/RelationSuspendedArgs'},
618 'Result': {'$ref': '#/definitions/ErrorResults'}},
620 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
622 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
624 'UnsetApplicationsConfig': {'properties': {'Params': {'$ref': '#/definitions/ApplicationConfigUnsetArgs'},
625 'Result': {'$ref': '#/definitions/ErrorResults'}},
627 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
629 'UpdateApplicationSeries': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArgs'},
630 'Result': {'$ref': '#/definitions/ErrorResults'}},
632 'WatchLXDProfileUpgradeNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
633 'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
638 @ReturnMapping(AddRelationResults
)
639 async def AddRelation(self
, endpoints
):
641 endpoints : typing.Sequence[str]
642 Returns -> typing.Mapping[str, ~CharmRelation]
644 # map input types to rpc msg
646 msg
= dict(type='Application',
647 request
='AddRelation',
650 _params
['endpoints'] = endpoints
651 reply
= await self
.rpc(msg
)
656 @ReturnMapping(AddApplicationUnitsResults
)
657 async def AddUnits(self
, application
, num_units
, placement
):
661 placement : typing.Sequence[~Placement]
662 Returns -> typing.Sequence[str]
664 # map input types to rpc msg
666 msg
= dict(type='Application',
670 _params
['application'] = application
671 _params
['num-units'] = num_units
672 _params
['placement'] = placement
673 reply
= await self
.rpc(msg
)
678 @ReturnMapping(ApplicationGetConfigResults
)
679 async def CharmConfig(self
, entities
):
681 entities : typing.Sequence[~Entity]
682 Returns -> typing.Sequence[~ConfigResult]
684 # map input types to rpc msg
686 msg
= dict(type='Application',
687 request
='CharmConfig',
690 _params
['entities'] = entities
691 reply
= await self
.rpc(msg
)
696 @ReturnMapping(ApplicationCharmRelationsResults
)
697 async def CharmRelations(self
, application
):
700 Returns -> typing.Sequence[str]
702 # map input types to rpc msg
704 msg
= dict(type='Application',
705 request
='CharmRelations',
708 _params
['application'] = application
709 reply
= await self
.rpc(msg
)
714 @ReturnMapping(ErrorResults
)
715 async def Consume(self
, args
):
717 args : typing.Sequence[~ConsumeApplicationArg]
718 Returns -> typing.Sequence[~ErrorResult]
720 # map input types to rpc msg
722 msg
= dict(type='Application',
726 _params
['args'] = args
727 reply
= await self
.rpc(msg
)
732 @ReturnMapping(ErrorResults
)
733 async def Deploy(self
, applications
):
735 applications : typing.Sequence[~ApplicationDeploy]
736 Returns -> typing.Sequence[~ErrorResult]
738 # map input types to rpc msg
740 msg
= dict(type='Application',
744 _params
['applications'] = applications
745 reply
= await self
.rpc(msg
)
751 async def Destroy(self
, application
):
756 # map input types to rpc msg
758 msg
= dict(type='Application',
762 _params
['application'] = application
763 reply
= await self
.rpc(msg
)
768 @ReturnMapping(DestroyApplicationResults
)
769 async def DestroyApplication(self
, applications
):
771 applications : typing.Sequence[~DestroyApplicationParams]
772 Returns -> typing.Sequence[~DestroyApplicationResult]
774 # map input types to rpc msg
776 msg
= dict(type='Application',
777 request
='DestroyApplication',
780 _params
['applications'] = applications
781 reply
= await self
.rpc(msg
)
786 @ReturnMapping(ErrorResults
)
787 async def DestroyConsumedApplications(self
, applications
):
789 applications : typing.Sequence[~DestroyConsumedApplicationParams]
790 Returns -> typing.Sequence[~ErrorResult]
792 # map input types to rpc msg
794 msg
= dict(type='Application',
795 request
='DestroyConsumedApplications',
798 _params
['applications'] = applications
799 reply
= await self
.rpc(msg
)
805 async def DestroyRelation(self
, endpoints
):
807 endpoints : typing.Sequence[str]
810 # map input types to rpc msg
812 msg
= dict(type='Application',
813 request
='DestroyRelation',
816 _params
['endpoints'] = endpoints
817 reply
= await self
.rpc(msg
)
822 @ReturnMapping(DestroyUnitResults
)
823 async def DestroyUnit(self
, units
):
825 units : typing.Sequence[~DestroyUnitParams]
826 Returns -> typing.Sequence[~DestroyUnitResult]
828 # map input types to rpc msg
830 msg
= dict(type='Application',
831 request
='DestroyUnit',
834 _params
['units'] = units
835 reply
= await self
.rpc(msg
)
841 async def DestroyUnits(self
, unit_names
):
843 unit_names : typing.Sequence[str]
846 # map input types to rpc msg
848 msg
= dict(type='Application',
849 request
='DestroyUnits',
852 _params
['unit-names'] = unit_names
853 reply
= await self
.rpc(msg
)
859 async def Expose(self
, application
):
864 # map input types to rpc msg
866 msg
= dict(type='Application',
870 _params
['application'] = application
871 reply
= await self
.rpc(msg
)
876 @ReturnMapping(ApplicationGetResults
)
877 async def Get(self
, application
):
880 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
882 # map input types to rpc msg
884 msg
= dict(type='Application',
888 _params
['application'] = application
889 reply
= await self
.rpc(msg
)
894 @ReturnMapping(StringResult
)
895 async def GetCharmURL(self
, application
):
898 Returns -> typing.Union[_ForwardRef('Error'), str]
900 # map input types to rpc msg
902 msg
= dict(type='Application',
903 request
='GetCharmURL',
906 _params
['application'] = application
907 reply
= await self
.rpc(msg
)
912 @ReturnMapping(ApplicationGetConfigResults
)
913 async def GetConfig(self
, entities
):
915 entities : typing.Sequence[~Entity]
916 Returns -> typing.Sequence[~ConfigResult]
918 # map input types to rpc msg
920 msg
= dict(type='Application',
924 _params
['entities'] = entities
925 reply
= await self
.rpc(msg
)
930 @ReturnMapping(ApplicationGetConstraintsResults
)
931 async def GetConstraints(self
, entities
):
933 entities : typing.Sequence[~Entity]
934 Returns -> typing.Sequence[~ApplicationConstraint]
936 # map input types to rpc msg
938 msg
= dict(type='Application',
939 request
='GetConstraints',
942 _params
['entities'] = entities
943 reply
= await self
.rpc(msg
)
948 @ReturnMapping(LXDProfileUpgradeMessagesResults
)
949 async def GetLXDProfileUpgradeMessages(self
, application
, watcher_id
):
953 Returns -> typing.Sequence[~LXDProfileUpgradeMessagesResult]
955 # map input types to rpc msg
957 msg
= dict(type='Application',
958 request
='GetLXDProfileUpgradeMessages',
961 _params
['application'] = application
962 _params
['watcher-id'] = watcher_id
963 reply
= await self
.rpc(msg
)
968 @ReturnMapping(ErrorResults
)
969 async def ResolveUnitErrors(self
, all_
, retry
, tags
):
974 Returns -> typing.Sequence[~ErrorResult]
976 # map input types to rpc msg
978 msg
= dict(type='Application',
979 request
='ResolveUnitErrors',
982 _params
['all'] = all_
983 _params
['retry'] = retry
984 _params
['tags'] = tags
985 reply
= await self
.rpc(msg
)
990 @ReturnMapping(ScaleApplicationResults
)
991 async def ScaleApplications(self
, applications
):
993 applications : typing.Sequence[~ScaleApplicationParams]
994 Returns -> typing.Sequence[~ScaleApplicationResult]
996 # map input types to rpc msg
998 msg
= dict(type='Application',
999 request
='ScaleApplications',
1002 _params
['applications'] = applications
1003 reply
= await self
.rpc(msg
)
1008 @ReturnMapping(None)
1009 async def Set(self
, application
, options
):
1012 options : typing.Mapping[str, str]
1015 # map input types to rpc msg
1017 msg
= dict(type='Application',
1021 _params
['application'] = application
1022 _params
['options'] = options
1023 reply
= await self
.rpc(msg
)
1028 @ReturnMapping(ErrorResults
)
1029 async def SetApplicationsConfig(self
, args
):
1031 args : typing.Sequence[~ApplicationConfigSet]
1032 Returns -> typing.Sequence[~ErrorResult]
1034 # map input types to rpc msg
1036 msg
= dict(type='Application',
1037 request
='SetApplicationsConfig',
1040 _params
['Args'] = args
1041 reply
= await self
.rpc(msg
)
1046 @ReturnMapping(None)
1047 async def SetCharm(self
, application
, channel
, charm_url
, config_settings
, config_settings_yaml
, force_series
, force_units
, resource_ids
, storage_constraints
):
1052 config_settings : typing.Mapping[str, str]
1053 config_settings_yaml : str
1056 resource_ids : typing.Mapping[str, str]
1057 storage_constraints : typing.Mapping[str, ~StorageConstraints]
1060 # map input types to rpc msg
1062 msg
= dict(type='Application',
1066 _params
['application'] = application
1067 _params
['channel'] = channel
1068 _params
['charm-url'] = charm_url
1069 _params
['config-settings'] = config_settings
1070 _params
['config-settings-yaml'] = config_settings_yaml
1071 _params
['force-series'] = force_series
1072 _params
['force-units'] = force_units
1073 _params
['resource-ids'] = resource_ids
1074 _params
['storage-constraints'] = storage_constraints
1075 reply
= await self
.rpc(msg
)
1080 @ReturnMapping(None)
1081 async def SetCharmProfile(self
, application
, charm_url
):
1087 # map input types to rpc msg
1089 msg
= dict(type='Application',
1090 request
='SetCharmProfile',
1093 _params
['application'] = application
1094 _params
['charm-url'] = charm_url
1095 reply
= await self
.rpc(msg
)
1100 @ReturnMapping(None)
1101 async def SetConstraints(self
, application
, constraints
):
1107 # map input types to rpc msg
1109 msg
= dict(type='Application',
1110 request
='SetConstraints',
1113 _params
['application'] = application
1114 _params
['constraints'] = constraints
1115 reply
= await self
.rpc(msg
)
1120 @ReturnMapping(ErrorResults
)
1121 async def SetMetricCredentials(self
, creds
):
1123 creds : typing.Sequence[~ApplicationMetricCredential]
1124 Returns -> typing.Sequence[~ErrorResult]
1126 # map input types to rpc msg
1128 msg
= dict(type='Application',
1129 request
='SetMetricCredentials',
1132 _params
['creds'] = creds
1133 reply
= await self
.rpc(msg
)
1138 @ReturnMapping(ErrorResults
)
1139 async def SetRelationsSuspended(self
, args
):
1141 args : typing.Sequence[~RelationSuspendedArg]
1142 Returns -> typing.Sequence[~ErrorResult]
1144 # map input types to rpc msg
1146 msg
= dict(type='Application',
1147 request
='SetRelationsSuspended',
1150 _params
['args'] = args
1151 reply
= await self
.rpc(msg
)
1156 @ReturnMapping(None)
1157 async def Unexpose(self
, application
):
1162 # map input types to rpc msg
1164 msg
= dict(type='Application',
1168 _params
['application'] = application
1169 reply
= await self
.rpc(msg
)
1174 @ReturnMapping(None)
1175 async def Unset(self
, application
, options
):
1178 options : typing.Sequence[str]
1181 # map input types to rpc msg
1183 msg
= dict(type='Application',
1187 _params
['application'] = application
1188 _params
['options'] = options
1189 reply
= await self
.rpc(msg
)
1194 @ReturnMapping(ErrorResults
)
1195 async def UnsetApplicationsConfig(self
, args
):
1197 args : typing.Sequence[~ApplicationUnset]
1198 Returns -> typing.Sequence[~ErrorResult]
1200 # map input types to rpc msg
1202 msg
= dict(type='Application',
1203 request
='UnsetApplicationsConfig',
1206 _params
['Args'] = args
1207 reply
= await self
.rpc(msg
)
1212 @ReturnMapping(None)
1213 async def Update(self
, application
, charm_url
, constraints
, force_charm_url
, force_series
, min_units
, settings
, settings_yaml
):
1218 force_charm_url : bool
1221 settings : typing.Mapping[str, str]
1225 # map input types to rpc msg
1227 msg
= dict(type='Application',
1231 _params
['application'] = application
1232 _params
['charm-url'] = charm_url
1233 _params
['constraints'] = constraints
1234 _params
['force-charm-url'] = force_charm_url
1235 _params
['force-series'] = force_series
1236 _params
['min-units'] = min_units
1237 _params
['settings'] = settings
1238 _params
['settings-yaml'] = settings_yaml
1239 reply
= await self
.rpc(msg
)
1244 @ReturnMapping(ErrorResults
)
1245 async def UpdateApplicationSeries(self
, args
):
1247 args : typing.Sequence[~UpdateSeriesArg]
1248 Returns -> typing.Sequence[~ErrorResult]
1250 # map input types to rpc msg
1252 msg
= dict(type='Application',
1253 request
='UpdateApplicationSeries',
1256 _params
['args'] = args
1257 reply
= await self
.rpc(msg
)
1262 @ReturnMapping(NotifyWatchResult
)
1263 async def WatchLXDProfileUpgradeNotifications(self
, tag
):
1266 Returns -> typing.Union[str, _ForwardRef('Error')]
1268 # map input types to rpc msg
1270 msg
= dict(type='Application',
1271 request
='WatchLXDProfileUpgradeNotifications',
1274 _params
['tag'] = tag
1275 reply
= await self
.rpc(msg
)