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 AgentToolsFacade(Type
):
11 schema
= {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
15 async def UpdateToolsAvailable(self
):
20 # map input types to rpc msg
22 msg
= dict(type='AgentTools', request
='UpdateToolsAvailable', version
=1, params
=_params
)
24 reply
= await self
.rpc(msg
)
29 class AllWatcherFacade(Type
):
32 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
33 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
35 'required': ['deltas'],
37 'Delta': {'additionalProperties': False,
38 'properties': {'entity': {'additionalProperties': True,
40 'removed': {'type': 'boolean'}},
41 'required': ['removed', 'entity'],
43 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
45 'Stop': {'type': 'object'}},
49 @ReturnMapping(AllWatcherNextResults
)
53 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
55 # map input types to rpc msg
57 msg
= dict(type='AllWatcher', request
='Next', version
=1, params
=_params
)
59 reply
= await self
.rpc(msg
)
70 # map input types to rpc msg
72 msg
= dict(type='AllWatcher', request
='Stop', version
=1, params
=_params
)
74 reply
= await self
.rpc(msg
)
79 class ApplicationRelationsWatcherFacade(Type
):
80 name
= 'ApplicationRelationsWatcher'
82 schema
= {'definitions': {'ApplicationRelationsChange': {'additionalProperties': False,
83 'properties': {'changed': {'items': {'$ref': '#/definitions/RelationChange'},
85 'removed': {'items': {'type': 'integer'},
88 'ApplicationRelationsWatchResult': {'additionalProperties': False,
89 'properties': {'ApplicationRelationsWatcherId': {'type': 'string'},
90 'changes': {'$ref': '#/definitions/ApplicationRelationsChange'},
91 'error': {'$ref': '#/definitions/Error'}},
92 'required': ['ApplicationRelationsWatcherId'],
94 'Error': {'additionalProperties': False,
95 'properties': {'code': {'type': 'string'},
96 'info': {'$ref': '#/definitions/ErrorInfo'},
97 'message': {'type': 'string'}},
98 'required': ['message', 'code'],
100 'ErrorInfo': {'additionalProperties': False,
101 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
102 'macaroon-path': {'type': 'string'}},
104 'Macaroon': {'additionalProperties': False, 'type': 'object'},
105 'RelationChange': {'additionalProperties': False,
106 'properties': {'changedunits': {'patternProperties': {'.*': {'$ref': '#/definitions/RelationUnitChange'}},
108 'departedunits': {'items': {'type': 'string'},
110 'id': {'type': 'integer'},
111 'life': {'type': 'string'}},
112 'required': ['id', 'life'],
114 'RelationUnitChange': {'additionalProperties': False,
115 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
119 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/ApplicationRelationsWatchResult'}},
121 'Stop': {'type': 'object'}},
125 @ReturnMapping(ApplicationRelationsWatchResult
)
126 async def Next(self
):
129 Returns -> typing.Union[str, _ForwardRef('ApplicationRelationsChange'), _ForwardRef('Error')]
131 # map input types to rpc msg
133 msg
= dict(type='ApplicationRelationsWatcher', request
='Next', version
=1, params
=_params
)
135 reply
= await self
.rpc(msg
)
141 async def Stop(self
):
146 # map input types to rpc msg
148 msg
= dict(type='ApplicationRelationsWatcher', request
='Stop', version
=1, params
=_params
)
150 reply
= await self
.rpc(msg
)
155 class ApplicationScalerFacade(Type
):
156 name
= 'ApplicationScaler'
158 schema
= {'definitions': {'Entities': {'additionalProperties': False,
159 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
161 'required': ['entities'],
163 'Entity': {'additionalProperties': False,
164 'properties': {'tag': {'type': 'string'}},
167 'Error': {'additionalProperties': False,
168 'properties': {'code': {'type': 'string'},
169 'info': {'$ref': '#/definitions/ErrorInfo'},
170 'message': {'type': 'string'}},
171 'required': ['message', 'code'],
173 'ErrorInfo': {'additionalProperties': False,
174 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
175 'macaroon-path': {'type': 'string'}},
177 'ErrorResult': {'additionalProperties': False,
178 'properties': {'error': {'$ref': '#/definitions/Error'}},
180 'ErrorResults': {'additionalProperties': False,
181 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
183 'required': ['results'],
185 'Macaroon': {'additionalProperties': False, 'type': 'object'},
186 'StringsWatchResult': {'additionalProperties': False,
187 'properties': {'changes': {'items': {'type': 'string'},
189 'error': {'$ref': '#/definitions/Error'},
190 'watcher-id': {'type': 'string'}},
191 'required': ['watcher-id'],
193 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
194 'Result': {'$ref': '#/definitions/ErrorResults'}},
196 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
201 @ReturnMapping(ErrorResults
)
202 async def Rescale(self
, entities
):
204 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
205 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
207 # map input types to rpc msg
209 msg
= dict(type='ApplicationScaler', request
='Rescale', version
=1, params
=_params
)
210 _params
['entities'] = entities
211 reply
= await self
.rpc(msg
)
216 @ReturnMapping(StringsWatchResult
)
217 async def Watch(self
):
220 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
222 # map input types to rpc msg
224 msg
= dict(type='ApplicationScaler', request
='Watch', version
=1, params
=_params
)
226 reply
= await self
.rpc(msg
)
231 class BackupsFacade(Type
):
234 schema
= {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
235 'properties': {'notes': {'type': 'string'}},
236 'required': ['notes'],
238 'BackupsInfoArgs': {'additionalProperties': False,
239 'properties': {'id': {'type': 'string'}},
242 'BackupsListArgs': {'additionalProperties': False,
244 'BackupsListResult': {'additionalProperties': False,
245 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
247 'required': ['list'],
249 'BackupsMetadataResult': {'additionalProperties': False,
250 'properties': {'ca-cert': {'type': 'string'},
251 'ca-private-key': {'type': 'string'},
252 'checksum': {'type': 'string'},
253 'checksum-format': {'type': 'string'},
254 'finished': {'format': 'date-time',
256 'hostname': {'type': 'string'},
257 'id': {'type': 'string'},
258 'machine': {'type': 'string'},
259 'model': {'type': 'string'},
260 'notes': {'type': 'string'},
261 'series': {'type': 'string'},
262 'size': {'type': 'integer'},
263 'started': {'format': 'date-time',
265 'stored': {'format': 'date-time',
267 'version': {'$ref': '#/definitions/Number'}},
284 'BackupsRemoveArgs': {'additionalProperties': False,
285 'properties': {'id': {'type': 'string'}},
288 'Number': {'additionalProperties': False,
289 'properties': {'Build': {'type': 'integer'},
290 'Major': {'type': 'integer'},
291 'Minor': {'type': 'integer'},
292 'Patch': {'type': 'integer'},
293 'Tag': {'type': 'string'}},
294 'required': ['Major',
300 'RestoreArgs': {'additionalProperties': False,
301 'properties': {'backup-id': {'type': 'string'}},
302 'required': ['backup-id'],
304 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
305 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
307 'FinishRestore': {'type': 'object'},
308 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
309 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
311 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
312 'Result': {'$ref': '#/definitions/BackupsListResult'}},
314 'PrepareRestore': {'type': 'object'},
315 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
317 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
322 @ReturnMapping(BackupsMetadataResult
)
323 async def Create(self
, notes
):
326 Returns -> typing.Union[str, int, _ForwardRef('Number')]
328 # map input types to rpc msg
330 msg
= dict(type='Backups', request
='Create', version
=1, params
=_params
)
331 _params
['notes'] = notes
332 reply
= await self
.rpc(msg
)
338 async def FinishRestore(self
):
343 # map input types to rpc msg
345 msg
= dict(type='Backups', request
='FinishRestore', version
=1, params
=_params
)
347 reply
= await self
.rpc(msg
)
352 @ReturnMapping(BackupsMetadataResult
)
353 async def Info(self
, id_
):
356 Returns -> typing.Union[str, int, _ForwardRef('Number')]
358 # map input types to rpc msg
360 msg
= dict(type='Backups', request
='Info', version
=1, params
=_params
)
362 reply
= await self
.rpc(msg
)
367 @ReturnMapping(BackupsListResult
)
368 async def List(self
):
371 Returns -> typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
373 # map input types to rpc msg
375 msg
= dict(type='Backups', request
='List', version
=1, params
=_params
)
377 reply
= await self
.rpc(msg
)
383 async def PrepareRestore(self
):
388 # map input types to rpc msg
390 msg
= dict(type='Backups', request
='PrepareRestore', version
=1, params
=_params
)
392 reply
= await self
.rpc(msg
)
398 async def Remove(self
, id_
):
403 # map input types to rpc msg
405 msg
= dict(type='Backups', request
='Remove', version
=1, params
=_params
)
407 reply
= await self
.rpc(msg
)
413 async def Restore(self
, backup_id
):
418 # map input types to rpc msg
420 msg
= dict(type='Backups', request
='Restore', version
=1, params
=_params
)
421 _params
['backup-id'] = backup_id
422 reply
= await self
.rpc(msg
)
427 class BundleFacade(Type
):
430 schema
= {'definitions': {'BundleChange': {'additionalProperties': False,
431 'properties': {'args': {'items': {'additionalProperties': True,
434 'id': {'type': 'string'},
435 'method': {'type': 'string'},
436 'requires': {'items': {'type': 'string'},
443 'BundleChangesParams': {'additionalProperties': False,
444 'properties': {'yaml': {'type': 'string'}},
445 'required': ['yaml'],
447 'BundleChangesResults': {'additionalProperties': False,
448 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
450 'errors': {'items': {'type': 'string'},
453 'properties': {'GetChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
454 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
459 @ReturnMapping(BundleChangesResults
)
460 async def GetChanges(self
, yaml
):
463 Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
465 # map input types to rpc msg
467 msg
= dict(type='Bundle', request
='GetChanges', version
=1, params
=_params
)
468 _params
['yaml'] = yaml
469 reply
= await self
.rpc(msg
)
474 class ClientFacade(Type
):
477 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
478 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
481 'required': ['servers'],
483 'AddCharm': {'additionalProperties': False,
484 'properties': {'channel': {'type': 'string'},
485 'url': {'type': 'string'}},
486 'required': ['url', 'channel'],
488 'AddCharmWithAuthorization': {'additionalProperties': False,
489 'properties': {'channel': {'type': 'string'},
490 'macaroon': {'$ref': '#/definitions/Macaroon'},
491 'url': {'type': 'string'}},
496 'AddMachineParams': {'additionalProperties': False,
497 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
499 'constraints': {'$ref': '#/definitions/Value'},
500 'container-type': {'type': 'string'},
501 'disks': {'items': {'$ref': '#/definitions/Constraints'},
503 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
504 'instance-id': {'type': 'string'},
505 'jobs': {'items': {'type': 'string'},
507 'nonce': {'type': 'string'},
508 'parent-id': {'type': 'string'},
509 'placement': {'$ref': '#/definitions/Placement'},
510 'series': {'type': 'string'}},
511 'required': ['series',
518 'hardware-characteristics',
521 'AddMachines': {'additionalProperties': False,
522 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
524 'required': ['params'],
526 'AddMachinesResult': {'additionalProperties': False,
527 'properties': {'error': {'$ref': '#/definitions/Error'},
528 'machine': {'type': 'string'}},
529 'required': ['machine'],
531 'AddMachinesResults': {'additionalProperties': False,
532 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
534 'required': ['machines'],
536 'Address': {'additionalProperties': False,
537 'properties': {'scope': {'type': 'string'},
538 'space-name': {'type': 'string'},
539 'type': {'type': 'string'},
540 'value': {'type': 'string'}},
541 'required': ['value', 'type', 'scope'],
543 'AgentVersionResult': {'additionalProperties': False,
544 'properties': {'version': {'$ref': '#/definitions/Number'}},
545 'required': ['version'],
547 'AllWatcherId': {'additionalProperties': False,
548 'properties': {'watcher-id': {'type': 'string'}},
549 'required': ['watcher-id'],
551 'ApplicationStatus': {'additionalProperties': False,
552 'properties': {'can-upgrade-to': {'type': 'string'},
553 'charm': {'type': 'string'},
554 'err': {'additionalProperties': True,
556 'exposed': {'type': 'boolean'},
557 'life': {'type': 'string'},
558 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
560 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
563 'series': {'type': 'string'},
564 'status': {'$ref': '#/definitions/DetailedStatus'},
565 'subordinate-to': {'items': {'type': 'string'},
567 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
569 'workload-version': {'type': 'string'}},
570 'required': ['charm',
582 'Binary': {'additionalProperties': False,
583 'properties': {'Arch': {'type': 'string'},
584 'Number': {'$ref': '#/definitions/Number'},
585 'Series': {'type': 'string'}},
586 'required': ['Number', 'Series', 'Arch'],
588 'BundleChange': {'additionalProperties': False,
589 'properties': {'args': {'items': {'additionalProperties': True,
592 'id': {'type': 'string'},
593 'method': {'type': 'string'},
594 'requires': {'items': {'type': 'string'},
601 'BundleChangesParams': {'additionalProperties': False,
602 'properties': {'yaml': {'type': 'string'}},
603 'required': ['yaml'],
605 'BundleChangesResults': {'additionalProperties': False,
606 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
608 'errors': {'items': {'type': 'string'},
611 'BytesResult': {'additionalProperties': False,
612 'properties': {'result': {'items': {'type': 'integer'},
614 'required': ['result'],
616 'ConfigValue': {'additionalProperties': False,
617 'properties': {'source': {'type': 'string'},
618 'value': {'additionalProperties': True,
620 'required': ['value', 'source'],
622 'Constraints': {'additionalProperties': False,
623 'properties': {'Count': {'type': 'integer'},
624 'Pool': {'type': 'string'},
625 'Size': {'type': 'integer'}},
626 'required': ['Pool', 'Size', 'Count'],
628 'DestroyMachines': {'additionalProperties': False,
629 'properties': {'force': {'type': 'boolean'},
630 'machine-names': {'items': {'type': 'string'},
632 'required': ['machine-names', 'force'],
634 'DetailedStatus': {'additionalProperties': False,
635 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
638 'err': {'additionalProperties': True,
640 'info': {'type': 'string'},
641 'kind': {'type': 'string'},
642 'life': {'type': 'string'},
643 'since': {'format': 'date-time',
645 'status': {'type': 'string'},
646 'version': {'type': 'string'}},
647 'required': ['status',
655 'EndpointStatus': {'additionalProperties': False,
656 'properties': {'application': {'type': 'string'},
657 'name': {'type': 'string'},
658 'role': {'type': 'string'},
659 'subordinate': {'type': 'boolean'}},
660 'required': ['application',
665 'Entities': {'additionalProperties': False,
666 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
668 'required': ['entities'],
670 'Entity': {'additionalProperties': False,
671 'properties': {'tag': {'type': 'string'}},
674 'EntityStatus': {'additionalProperties': False,
675 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
678 'info': {'type': 'string'},
679 'since': {'format': 'date-time',
681 'status': {'type': 'string'}},
682 'required': ['status', 'info', 'since'],
684 'Error': {'additionalProperties': False,
685 'properties': {'code': {'type': 'string'},
686 'info': {'$ref': '#/definitions/ErrorInfo'},
687 'message': {'type': 'string'}},
688 'required': ['message', 'code'],
690 'ErrorInfo': {'additionalProperties': False,
691 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
692 'macaroon-path': {'type': 'string'}},
694 'ErrorResult': {'additionalProperties': False,
695 'properties': {'error': {'$ref': '#/definitions/Error'}},
697 'ErrorResults': {'additionalProperties': False,
698 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
700 'required': ['results'],
702 'FindToolsParams': {'additionalProperties': False,
703 'properties': {'arch': {'type': 'string'},
704 'major': {'type': 'integer'},
705 'minor': {'type': 'integer'},
706 'number': {'$ref': '#/definitions/Number'},
707 'series': {'type': 'string'}},
708 'required': ['number',
714 'FindToolsResult': {'additionalProperties': False,
715 'properties': {'error': {'$ref': '#/definitions/Error'},
716 'list': {'items': {'$ref': '#/definitions/Tools'},
718 'required': ['list'],
720 'FullStatus': {'additionalProperties': False,
721 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
723 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
725 'model': {'$ref': '#/definitions/ModelStatusInfo'},
726 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
728 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}},
730 'required': ['model',
733 'remote-applications',
736 'GetConstraintsResults': {'additionalProperties': False,
737 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
738 'required': ['constraints'],
740 'HardwareCharacteristics': {'additionalProperties': False,
741 'properties': {'arch': {'type': 'string'},
742 'availability-zone': {'type': 'string'},
743 'cpu-cores': {'type': 'integer'},
744 'cpu-power': {'type': 'integer'},
745 'mem': {'type': 'integer'},
746 'root-disk': {'type': 'integer'},
747 'tags': {'items': {'type': 'string'},
750 'History': {'additionalProperties': False,
751 'properties': {'error': {'$ref': '#/definitions/Error'},
752 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
754 'required': ['statuses'],
756 'HostPort': {'additionalProperties': False,
757 'properties': {'Address': {'$ref': '#/definitions/Address'},
758 'port': {'type': 'integer'}},
759 'required': ['Address', 'port'],
761 'Macaroon': {'additionalProperties': False, 'type': 'object'},
762 'MachineHardware': {'additionalProperties': False,
763 'properties': {'arch': {'type': 'string'},
764 'availability-zone': {'type': 'string'},
765 'cores': {'type': 'integer'},
766 'cpu-power': {'type': 'integer'},
767 'mem': {'type': 'integer'},
768 'root-disk': {'type': 'integer'},
769 'tags': {'items': {'type': 'string'},
772 'MachineStatus': {'additionalProperties': False,
773 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
774 'constraints': {'type': 'string'},
775 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
777 'dns-name': {'type': 'string'},
778 'hardware': {'type': 'string'},
779 'has-vote': {'type': 'boolean'},
780 'id': {'type': 'string'},
781 'instance-id': {'type': 'string'},
782 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
783 'ip-addresses': {'items': {'type': 'string'},
785 'jobs': {'items': {'type': 'string'},
787 'network-interfaces': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInterface'}},
789 'series': {'type': 'string'},
790 'wants-vote': {'type': 'boolean'}},
791 'required': ['agent-status',
804 'MeterStatus': {'additionalProperties': False,
805 'properties': {'color': {'type': 'string'},
806 'message': {'type': 'string'}},
807 'required': ['color', 'message'],
809 'ModelConfigResults': {'additionalProperties': False,
810 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
812 'required': ['config'],
814 'ModelInfo': {'additionalProperties': False,
815 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
816 'cloud-credential-tag': {'type': 'string'},
817 'cloud-region': {'type': 'string'},
818 'cloud-tag': {'type': 'string'},
819 'controller-uuid': {'type': 'string'},
820 'default-series': {'type': 'string'},
821 'life': {'type': 'string'},
822 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
824 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
825 'name': {'type': 'string'},
826 'owner-tag': {'type': 'string'},
827 'provider-type': {'type': 'string'},
828 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
829 'status': {'$ref': '#/definitions/EntityStatus'},
830 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
832 'uuid': {'type': 'string'}},
844 'ModelMachineInfo': {'additionalProperties': False,
845 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
846 'has-vote': {'type': 'boolean'},
847 'id': {'type': 'string'},
848 'instance-id': {'type': 'string'},
849 'status': {'type': 'string'},
850 'wants-vote': {'type': 'boolean'}},
853 'ModelMigrationStatus': {'additionalProperties': False,
854 'properties': {'end': {'format': 'date-time',
856 'start': {'format': 'date-time',
858 'status': {'type': 'string'}},
859 'required': ['status', 'start'],
861 'ModelSLA': {'additionalProperties': False,
862 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
863 'creds': {'items': {'type': 'integer'},
865 'required': ['ModelSLAInfo', 'creds'],
867 'ModelSLAInfo': {'additionalProperties': False,
868 'properties': {'level': {'type': 'string'},
869 'owner': {'type': 'string'}},
870 'required': ['level', 'owner'],
872 'ModelSet': {'additionalProperties': False,
873 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
876 'required': ['config'],
878 'ModelStatusInfo': {'additionalProperties': False,
879 'properties': {'available-version': {'type': 'string'},
880 'cloud-tag': {'type': 'string'},
881 'meter-status': {'$ref': '#/definitions/MeterStatus'},
882 'model-status': {'$ref': '#/definitions/DetailedStatus'},
883 'name': {'type': 'string'},
884 'region': {'type': 'string'},
885 'sla': {'type': 'string'},
886 'version': {'type': 'string'}},
895 'ModelUnset': {'additionalProperties': False,
896 'properties': {'keys': {'items': {'type': 'string'},
898 'required': ['keys'],
900 'ModelUserInfo': {'additionalProperties': False,
901 'properties': {'access': {'type': 'string'},
902 'display-name': {'type': 'string'},
903 'last-connection': {'format': 'date-time',
905 'user': {'type': 'string'}},
911 'ModelUserInfoResult': {'additionalProperties': False,
912 'properties': {'error': {'$ref': '#/definitions/Error'},
913 'result': {'$ref': '#/definitions/ModelUserInfo'}},
915 'ModelUserInfoResults': {'additionalProperties': False,
916 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
918 'required': ['results'],
920 'NetworkInterface': {'additionalProperties': False,
921 'properties': {'dns-nameservers': {'items': {'type': 'string'},
923 'gateway': {'type': 'string'},
924 'ip-addresses': {'items': {'type': 'string'},
926 'is-up': {'type': 'boolean'},
927 'mac-address': {'type': 'string'},
928 'space': {'type': 'string'}},
929 'required': ['ip-addresses',
933 'Number': {'additionalProperties': False,
934 'properties': {'Build': {'type': 'integer'},
935 'Major': {'type': 'integer'},
936 'Minor': {'type': 'integer'},
937 'Patch': {'type': 'integer'},
938 'Tag': {'type': 'string'}},
939 'required': ['Major',
945 'Placement': {'additionalProperties': False,
946 'properties': {'directive': {'type': 'string'},
947 'scope': {'type': 'string'}},
948 'required': ['scope', 'directive'],
950 'PrivateAddress': {'additionalProperties': False,
951 'properties': {'target': {'type': 'string'}},
952 'required': ['target'],
954 'PrivateAddressResults': {'additionalProperties': False,
955 'properties': {'private-address': {'type': 'string'}},
956 'required': ['private-address'],
958 'ProvisioningScriptParams': {'additionalProperties': False,
959 'properties': {'data-dir': {'type': 'string'},
960 'disable-package-commands': {'type': 'boolean'},
961 'machine-id': {'type': 'string'},
962 'nonce': {'type': 'string'}},
963 'required': ['machine-id',
966 'disable-package-commands'],
968 'ProvisioningScriptResult': {'additionalProperties': False,
969 'properties': {'script': {'type': 'string'}},
970 'required': ['script'],
972 'PublicAddress': {'additionalProperties': False,
973 'properties': {'target': {'type': 'string'}},
974 'required': ['target'],
976 'PublicAddressResults': {'additionalProperties': False,
977 'properties': {'public-address': {'type': 'string'}},
978 'required': ['public-address'],
980 'RelationStatus': {'additionalProperties': False,
981 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
983 'id': {'type': 'integer'},
984 'interface': {'type': 'string'},
985 'key': {'type': 'string'},
986 'scope': {'type': 'string'}},
993 'RemoteApplicationStatus': {'additionalProperties': False,
994 'properties': {'application-name': {'type': 'string'},
995 'application-url': {'type': 'string'},
996 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
998 'err': {'additionalProperties': True,
1000 'life': {'type': 'string'},
1001 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
1004 'status': {'$ref': '#/definitions/DetailedStatus'}},
1005 'required': ['application-url',
1012 'RemoteEndpoint': {'additionalProperties': False,
1013 'properties': {'interface': {'type': 'string'},
1014 'limit': {'type': 'integer'},
1015 'name': {'type': 'string'},
1016 'role': {'type': 'string'},
1017 'scope': {'type': 'string'}},
1018 'required': ['name',
1024 'ResolveCharmResult': {'additionalProperties': False,
1025 'properties': {'error': {'type': 'string'},
1026 'url': {'type': 'string'}},
1028 'ResolveCharmResults': {'additionalProperties': False,
1029 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
1031 'required': ['urls'],
1033 'ResolveCharms': {'additionalProperties': False,
1034 'properties': {'references': {'items': {'type': 'string'},
1036 'required': ['references'],
1038 'Resolved': {'additionalProperties': False,
1039 'properties': {'retry': {'type': 'boolean'},
1040 'unit-name': {'type': 'string'}},
1041 'required': ['unit-name', 'retry'],
1043 'SetConstraints': {'additionalProperties': False,
1044 'properties': {'application': {'type': 'string'},
1045 'constraints': {'$ref': '#/definitions/Value'}},
1046 'required': ['application', 'constraints'],
1048 'SetModelAgentVersion': {'additionalProperties': False,
1049 'properties': {'version': {'$ref': '#/definitions/Number'}},
1050 'required': ['version'],
1052 'StatusHistoryFilter': {'additionalProperties': False,
1053 'properties': {'date': {'format': 'date-time',
1055 'delta': {'type': 'integer'},
1056 'exclude': {'items': {'type': 'string'},
1058 'size': {'type': 'integer'}},
1059 'required': ['size',
1064 'StatusHistoryRequest': {'additionalProperties': False,
1065 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
1066 'historyKind': {'type': 'string'},
1067 'size': {'type': 'integer'},
1068 'tag': {'type': 'string'}},
1069 'required': ['historyKind',
1074 'StatusHistoryRequests': {'additionalProperties': False,
1075 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
1077 'required': ['requests'],
1079 'StatusHistoryResult': {'additionalProperties': False,
1080 'properties': {'error': {'$ref': '#/definitions/Error'},
1081 'history': {'$ref': '#/definitions/History'}},
1082 'required': ['history'],
1084 'StatusHistoryResults': {'additionalProperties': False,
1085 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
1087 'required': ['results'],
1089 'StatusParams': {'additionalProperties': False,
1090 'properties': {'patterns': {'items': {'type': 'string'},
1092 'required': ['patterns'],
1094 'StringResult': {'additionalProperties': False,
1095 'properties': {'error': {'$ref': '#/definitions/Error'},
1096 'result': {'type': 'string'}},
1097 'required': ['result'],
1099 'Tools': {'additionalProperties': False,
1100 'properties': {'sha256': {'type': 'string'},
1101 'size': {'type': 'integer'},
1102 'url': {'type': 'string'},
1103 'version': {'$ref': '#/definitions/Binary'}},
1104 'required': ['version', 'url', 'size'],
1106 'UnitStatus': {'additionalProperties': False,
1107 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
1108 'charm': {'type': 'string'},
1109 'leader': {'type': 'boolean'},
1110 'machine': {'type': 'string'},
1111 'opened-ports': {'items': {'type': 'string'},
1113 'public-address': {'type': 'string'},
1114 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
1116 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
1117 'workload-version': {'type': 'string'}},
1118 'required': ['agent-status',
1127 'Value': {'additionalProperties': False,
1128 'properties': {'arch': {'type': 'string'},
1129 'container': {'type': 'string'},
1130 'cores': {'type': 'integer'},
1131 'cpu-power': {'type': 'integer'},
1132 'instance-type': {'type': 'string'},
1133 'mem': {'type': 'integer'},
1134 'root-disk': {'type': 'integer'},
1135 'spaces': {'items': {'type': 'string'},
1137 'tags': {'items': {'type': 'string'},
1139 'virt-type': {'type': 'string'}},
1141 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
1143 'AbortCurrentUpgrade': {'type': 'object'},
1144 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
1146 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
1148 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
1149 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
1151 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
1152 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
1154 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
1156 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
1158 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
1160 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
1161 'Result': {'$ref': '#/definitions/FindToolsResult'}},
1163 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
1164 'Result': {'$ref': '#/definitions/FullStatus'}},
1166 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
1167 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
1169 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
1171 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
1172 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
1174 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
1176 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
1178 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
1180 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
1182 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
1184 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
1185 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
1187 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
1188 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
1190 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
1191 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
1193 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
1194 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
1196 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
1198 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1199 'Result': {'$ref': '#/definitions/ErrorResults'}},
1201 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1203 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
1205 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
1207 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
1209 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
1210 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
1212 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
1217 @ReturnMapping(APIHostPortsResult
)
1218 async def APIHostPorts(self
):
1221 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
1223 # map input types to rpc msg
1225 msg
= dict(type='Client', request
='APIHostPorts', version
=1, params
=_params
)
1227 reply
= await self
.rpc(msg
)
1232 @ReturnMapping(None)
1233 async def AbortCurrentUpgrade(self
):
1238 # map input types to rpc msg
1240 msg
= dict(type='Client', request
='AbortCurrentUpgrade', version
=1, params
=_params
)
1242 reply
= await self
.rpc(msg
)
1247 @ReturnMapping(None)
1248 async def AddCharm(self
, channel
, url
):
1254 # map input types to rpc msg
1256 msg
= dict(type='Client', request
='AddCharm', version
=1, params
=_params
)
1257 _params
['channel'] = channel
1258 _params
['url'] = url
1259 reply
= await self
.rpc(msg
)
1264 @ReturnMapping(None)
1265 async def AddCharmWithAuthorization(self
, channel
, macaroon
, url
):
1272 # map input types to rpc msg
1274 msg
= dict(type='Client', request
='AddCharmWithAuthorization', version
=1, params
=_params
)
1275 _params
['channel'] = channel
1276 _params
['macaroon'] = macaroon
1277 _params
['url'] = url
1278 reply
= await self
.rpc(msg
)
1283 @ReturnMapping(AddMachinesResults
)
1284 async def AddMachines(self
, params
):
1286 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1287 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1289 # map input types to rpc msg
1291 msg
= dict(type='Client', request
='AddMachines', version
=1, params
=_params
)
1292 _params
['params'] = params
1293 reply
= await self
.rpc(msg
)
1298 @ReturnMapping(AddMachinesResults
)
1299 async def AddMachinesV2(self
, params
):
1301 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1302 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1304 # map input types to rpc msg
1306 msg
= dict(type='Client', request
='AddMachinesV2', version
=1, params
=_params
)
1307 _params
['params'] = params
1308 reply
= await self
.rpc(msg
)
1313 @ReturnMapping(AgentVersionResult
)
1314 async def AgentVersion(self
):
1319 # map input types to rpc msg
1321 msg
= dict(type='Client', request
='AgentVersion', version
=1, params
=_params
)
1323 reply
= await self
.rpc(msg
)
1328 @ReturnMapping(BytesResult
)
1329 async def CACert(self
):
1332 Returns -> typing.Sequence<+T_co>[int]
1334 # map input types to rpc msg
1336 msg
= dict(type='Client', request
='CACert', version
=1, params
=_params
)
1338 reply
= await self
.rpc(msg
)
1343 @ReturnMapping(None)
1344 async def DestroyMachines(self
, force
, machine_names
):
1347 machine_names : typing.Sequence<+T_co>[str]
1350 # map input types to rpc msg
1352 msg
= dict(type='Client', request
='DestroyMachines', version
=1, params
=_params
)
1353 _params
['force'] = force
1354 _params
['machine-names'] = machine_names
1355 reply
= await self
.rpc(msg
)
1360 @ReturnMapping(FindToolsResult
)
1361 async def FindTools(self
, arch
, major
, minor
, number
, series
):
1368 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
1370 # map input types to rpc msg
1372 msg
= dict(type='Client', request
='FindTools', version
=1, params
=_params
)
1373 _params
['arch'] = arch
1374 _params
['major'] = major
1375 _params
['minor'] = minor
1376 _params
['number'] = number
1377 _params
['series'] = series
1378 reply
= await self
.rpc(msg
)
1383 @ReturnMapping(FullStatus
)
1384 async def FullStatus(self
, patterns
):
1386 patterns : typing.Sequence<+T_co>[str]
1387 Returns -> typing.Union[_ForwardRef('ModelStatusInfo'), typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>, typing.Mapping<~KT, +VT_co>[str, ~RemoteApplicationStatus]<~RemoteApplicationStatus>]
1389 # map input types to rpc msg
1391 msg
= dict(type='Client', request
='FullStatus', version
=1, params
=_params
)
1392 _params
['patterns'] = patterns
1393 reply
= await self
.rpc(msg
)
1398 @ReturnMapping(BundleChangesResults
)
1399 async def GetBundleChanges(self
, yaml
):
1402 Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
1404 # map input types to rpc msg
1406 msg
= dict(type='Client', request
='GetBundleChanges', version
=1, params
=_params
)
1407 _params
['yaml'] = yaml
1408 reply
= await self
.rpc(msg
)
1413 @ReturnMapping(GetConstraintsResults
)
1414 async def GetModelConstraints(self
):
1419 # map input types to rpc msg
1421 msg
= dict(type='Client', request
='GetModelConstraints', version
=1, params
=_params
)
1423 reply
= await self
.rpc(msg
)
1428 @ReturnMapping(AddMachinesResults
)
1429 async def InjectMachines(self
, params
):
1431 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1432 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1434 # map input types to rpc msg
1436 msg
= dict(type='Client', request
='InjectMachines', version
=1, params
=_params
)
1437 _params
['params'] = params
1438 reply
= await self
.rpc(msg
)
1443 @ReturnMapping(ModelConfigResults
)
1444 async def ModelGet(self
):
1447 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1449 # map input types to rpc msg
1451 msg
= dict(type='Client', request
='ModelGet', version
=1, params
=_params
)
1453 reply
= await self
.rpc(msg
)
1458 @ReturnMapping(ModelInfo
)
1459 async def ModelInfo(self
):
1462 Returns -> typing.Union[_ForwardRef('Number'), _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
1464 # map input types to rpc msg
1466 msg
= dict(type='Client', request
='ModelInfo', version
=1, params
=_params
)
1468 reply
= await self
.rpc(msg
)
1473 @ReturnMapping(None)
1474 async def ModelSet(self
, config
):
1476 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1479 # map input types to rpc msg
1481 msg
= dict(type='Client', request
='ModelSet', version
=1, params
=_params
)
1482 _params
['config'] = config
1483 reply
= await self
.rpc(msg
)
1488 @ReturnMapping(None)
1489 async def ModelUnset(self
, keys
):
1491 keys : typing.Sequence<+T_co>[str]
1494 # map input types to rpc msg
1496 msg
= dict(type='Client', request
='ModelUnset', version
=1, params
=_params
)
1497 _params
['keys'] = keys
1498 reply
= await self
.rpc(msg
)
1503 @ReturnMapping(ModelUserInfoResults
)
1504 async def ModelUserInfo(self
):
1507 Returns -> typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
1509 # map input types to rpc msg
1511 msg
= dict(type='Client', request
='ModelUserInfo', version
=1, params
=_params
)
1513 reply
= await self
.rpc(msg
)
1518 @ReturnMapping(PrivateAddressResults
)
1519 async def PrivateAddress(self
, target
):
1524 # map input types to rpc msg
1526 msg
= dict(type='Client', request
='PrivateAddress', version
=1, params
=_params
)
1527 _params
['target'] = target
1528 reply
= await self
.rpc(msg
)
1533 @ReturnMapping(ProvisioningScriptResult
)
1534 async def ProvisioningScript(self
, data_dir
, disable_package_commands
, machine_id
, nonce
):
1537 disable_package_commands : bool
1542 # map input types to rpc msg
1544 msg
= dict(type='Client', request
='ProvisioningScript', version
=1, params
=_params
)
1545 _params
['data-dir'] = data_dir
1546 _params
['disable-package-commands'] = disable_package_commands
1547 _params
['machine-id'] = machine_id
1548 _params
['nonce'] = nonce
1549 reply
= await self
.rpc(msg
)
1554 @ReturnMapping(PublicAddressResults
)
1555 async def PublicAddress(self
, target
):
1560 # map input types to rpc msg
1562 msg
= dict(type='Client', request
='PublicAddress', version
=1, params
=_params
)
1563 _params
['target'] = target
1564 reply
= await self
.rpc(msg
)
1569 @ReturnMapping(ResolveCharmResults
)
1570 async def ResolveCharms(self
, references
):
1572 references : typing.Sequence<+T_co>[str]
1573 Returns -> typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
1575 # map input types to rpc msg
1577 msg
= dict(type='Client', request
='ResolveCharms', version
=1, params
=_params
)
1578 _params
['references'] = references
1579 reply
= await self
.rpc(msg
)
1584 @ReturnMapping(None)
1585 async def Resolved(self
, retry
, unit_name
):
1591 # map input types to rpc msg
1593 msg
= dict(type='Client', request
='Resolved', version
=1, params
=_params
)
1594 _params
['retry'] = retry
1595 _params
['unit-name'] = unit_name
1596 reply
= await self
.rpc(msg
)
1601 @ReturnMapping(ErrorResults
)
1602 async def RetryProvisioning(self
, entities
):
1604 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1605 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1607 # map input types to rpc msg
1609 msg
= dict(type='Client', request
='RetryProvisioning', version
=1, params
=_params
)
1610 _params
['entities'] = entities
1611 reply
= await self
.rpc(msg
)
1616 @ReturnMapping(StringResult
)
1617 async def SLALevel(self
):
1620 Returns -> typing.Union[_ForwardRef('Error'), str]
1622 # map input types to rpc msg
1624 msg
= dict(type='Client', request
='SLALevel', version
=1, params
=_params
)
1626 reply
= await self
.rpc(msg
)
1631 @ReturnMapping(None)
1632 async def SetModelAgentVersion(self
, version
):
1637 # map input types to rpc msg
1639 msg
= dict(type='Client', request
='SetModelAgentVersion', version
=1, params
=_params
)
1640 _params
['version'] = version
1641 reply
= await self
.rpc(msg
)
1646 @ReturnMapping(None)
1647 async def SetModelConstraints(self
, application
, constraints
):
1653 # map input types to rpc msg
1655 msg
= dict(type='Client', request
='SetModelConstraints', version
=1, params
=_params
)
1656 _params
['application'] = application
1657 _params
['constraints'] = constraints
1658 reply
= await self
.rpc(msg
)
1663 @ReturnMapping(None)
1664 async def SetSLALevel(self
, creds
, level
):
1666 creds : typing.Sequence<+T_co>[int]
1670 # map input types to rpc msg
1672 msg
= dict(type='Client', request
='SetSLALevel', version
=1, params
=_params
)
1673 _params
['creds'] = creds
1674 _params
['level'] = level
1675 reply
= await self
.rpc(msg
)
1680 @ReturnMapping(StatusHistoryResults
)
1681 async def StatusHistory(self
, requests
):
1683 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
1684 Returns -> typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
1686 # map input types to rpc msg
1688 msg
= dict(type='Client', request
='StatusHistory', version
=1, params
=_params
)
1689 _params
['requests'] = requests
1690 reply
= await self
.rpc(msg
)
1695 @ReturnMapping(AllWatcherId
)
1696 async def WatchAll(self
):
1701 # map input types to rpc msg
1703 msg
= dict(type='Client', request
='WatchAll', version
=1, params
=_params
)
1705 reply
= await self
.rpc(msg
)
1710 class CloudFacade(Type
):
1713 schema
= {'definitions': {'Cloud': {'additionalProperties': False,
1714 'properties': {'auth-types': {'items': {'type': 'string'},
1716 'endpoint': {'type': 'string'},
1717 'identity-endpoint': {'type': 'string'},
1718 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
1720 'storage-endpoint': {'type': 'string'},
1721 'type': {'type': 'string'}},
1722 'required': ['type'],
1724 'CloudCredential': {'additionalProperties': False,
1725 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1727 'auth-type': {'type': 'string'},
1728 'redacted': {'items': {'type': 'string'},
1730 'required': ['auth-type'],
1732 'CloudCredentialResult': {'additionalProperties': False,
1733 'properties': {'error': {'$ref': '#/definitions/Error'},
1734 'result': {'$ref': '#/definitions/CloudCredential'}},
1736 'CloudCredentialResults': {'additionalProperties': False,
1737 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
1740 'CloudInstanceTypesConstraint': {'additionalProperties': False,
1741 'properties': {'cloud-tag': {'type': 'string'},
1742 'constraints': {'$ref': '#/definitions/Value'},
1743 'region': {'type': 'string'}},
1744 'required': ['cloud-tag',
1747 'CloudInstanceTypesConstraints': {'additionalProperties': False,
1748 'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'},
1750 'required': ['constraints'],
1752 'CloudRegion': {'additionalProperties': False,
1753 'properties': {'endpoint': {'type': 'string'},
1754 'identity-endpoint': {'type': 'string'},
1755 'name': {'type': 'string'},
1756 'storage-endpoint': {'type': 'string'}},
1757 'required': ['name'],
1759 'CloudResult': {'additionalProperties': False,
1760 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
1761 'error': {'$ref': '#/definitions/Error'}},
1763 'CloudResults': {'additionalProperties': False,
1764 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
1767 'CloudsResult': {'additionalProperties': False,
1768 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
1771 'Entities': {'additionalProperties': False,
1772 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1774 'required': ['entities'],
1776 'Entity': {'additionalProperties': False,
1777 'properties': {'tag': {'type': 'string'}},
1778 'required': ['tag'],
1780 'Error': {'additionalProperties': False,
1781 'properties': {'code': {'type': 'string'},
1782 'info': {'$ref': '#/definitions/ErrorInfo'},
1783 'message': {'type': 'string'}},
1784 'required': ['message', 'code'],
1786 'ErrorInfo': {'additionalProperties': False,
1787 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1788 'macaroon-path': {'type': 'string'}},
1790 'ErrorResult': {'additionalProperties': False,
1791 'properties': {'error': {'$ref': '#/definitions/Error'}},
1793 'ErrorResults': {'additionalProperties': False,
1794 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1796 'required': ['results'],
1798 'InstanceType': {'additionalProperties': False,
1799 'properties': {'arches': {'items': {'type': 'string'},
1801 'cost': {'type': 'integer'},
1802 'cpu-cores': {'type': 'integer'},
1803 'deprecated': {'type': 'boolean'},
1804 'memory': {'type': 'integer'},
1805 'name': {'type': 'string'},
1806 'root-disk': {'type': 'integer'},
1807 'virt-type': {'type': 'string'}},
1808 'required': ['arches', 'cpu-cores', 'memory'],
1810 'InstanceTypesResult': {'additionalProperties': False,
1811 'properties': {'cost-currency': {'type': 'string'},
1812 'cost-divisor': {'type': 'integer'},
1813 'cost-unit': {'type': 'string'},
1814 'error': {'$ref': '#/definitions/Error'},
1815 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
1818 'InstanceTypesResults': {'additionalProperties': False,
1819 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
1821 'required': ['results'],
1823 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1824 'StringResult': {'additionalProperties': False,
1825 'properties': {'error': {'$ref': '#/definitions/Error'},
1826 'result': {'type': 'string'}},
1827 'required': ['result'],
1829 'StringsResult': {'additionalProperties': False,
1830 'properties': {'error': {'$ref': '#/definitions/Error'},
1831 'result': {'items': {'type': 'string'},
1834 'StringsResults': {'additionalProperties': False,
1835 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1837 'required': ['results'],
1839 'UpdateCloudCredential': {'additionalProperties': False,
1840 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
1841 'tag': {'type': 'string'}},
1842 'required': ['tag', 'credential'],
1844 'UpdateCloudCredentials': {'additionalProperties': False,
1845 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'},
1848 'UserCloud': {'additionalProperties': False,
1849 'properties': {'cloud-tag': {'type': 'string'},
1850 'user-tag': {'type': 'string'}},
1851 'required': ['user-tag', 'cloud-tag'],
1853 'UserClouds': {'additionalProperties': False,
1854 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
1857 'Value': {'additionalProperties': False,
1858 'properties': {'arch': {'type': 'string'},
1859 'container': {'type': 'string'},
1860 'cores': {'type': 'integer'},
1861 'cpu-power': {'type': 'integer'},
1862 'instance-type': {'type': 'string'},
1863 'mem': {'type': 'integer'},
1864 'root-disk': {'type': 'integer'},
1865 'spaces': {'items': {'type': 'string'},
1867 'tags': {'items': {'type': 'string'},
1869 'virt-type': {'type': 'string'}},
1871 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1872 'Result': {'$ref': '#/definitions/CloudResults'}},
1874 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
1876 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1877 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
1879 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1881 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
1882 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
1884 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1885 'Result': {'$ref': '#/definitions/ErrorResults'}},
1887 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'},
1888 'Result': {'$ref': '#/definitions/ErrorResults'}},
1890 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
1891 'Result': {'$ref': '#/definitions/StringsResults'}},
1896 @ReturnMapping(CloudResults
)
1897 async def Cloud(self
, entities
):
1899 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1900 Returns -> typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
1902 # map input types to rpc msg
1904 msg
= dict(type='Cloud', request
='Cloud', version
=1, params
=_params
)
1905 _params
['entities'] = entities
1906 reply
= await self
.rpc(msg
)
1911 @ReturnMapping(CloudsResult
)
1912 async def Clouds(self
):
1915 Returns -> typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
1917 # map input types to rpc msg
1919 msg
= dict(type='Cloud', request
='Clouds', version
=1, params
=_params
)
1921 reply
= await self
.rpc(msg
)
1926 @ReturnMapping(CloudCredentialResults
)
1927 async def Credential(self
, entities
):
1929 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1930 Returns -> typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
1932 # map input types to rpc msg
1934 msg
= dict(type='Cloud', request
='Credential', version
=1, params
=_params
)
1935 _params
['entities'] = entities
1936 reply
= await self
.rpc(msg
)
1941 @ReturnMapping(StringResult
)
1942 async def DefaultCloud(self
):
1945 Returns -> typing.Union[_ForwardRef('Error'), str]
1947 # map input types to rpc msg
1949 msg
= dict(type='Cloud', request
='DefaultCloud', version
=1, params
=_params
)
1951 reply
= await self
.rpc(msg
)
1956 @ReturnMapping(InstanceTypesResults
)
1957 async def InstanceTypes(self
, constraints
):
1959 constraints : typing.Sequence<+T_co>[~CloudInstanceTypesConstraint]<~CloudInstanceTypesConstraint>
1960 Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
1962 # map input types to rpc msg
1964 msg
= dict(type='Cloud', request
='InstanceTypes', version
=1, params
=_params
)
1965 _params
['constraints'] = constraints
1966 reply
= await self
.rpc(msg
)
1971 @ReturnMapping(ErrorResults
)
1972 async def RevokeCredentials(self
, entities
):
1974 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1975 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1977 # map input types to rpc msg
1979 msg
= dict(type='Cloud', request
='RevokeCredentials', version
=1, params
=_params
)
1980 _params
['entities'] = entities
1981 reply
= await self
.rpc(msg
)
1986 @ReturnMapping(ErrorResults
)
1987 async def UpdateCredentials(self
, credentials
):
1989 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
1990 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1992 # map input types to rpc msg
1994 msg
= dict(type='Cloud', request
='UpdateCredentials', version
=1, params
=_params
)
1995 _params
['credentials'] = credentials
1996 reply
= await self
.rpc(msg
)
2001 @ReturnMapping(StringsResults
)
2002 async def UserCredentials(self
, user_clouds
):
2004 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
2005 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2007 # map input types to rpc msg
2009 msg
= dict(type='Cloud', request
='UserCredentials', version
=1, params
=_params
)
2010 _params
['user-clouds'] = user_clouds
2011 reply
= await self
.rpc(msg
)
2016 class DeployerFacade(Type
):
2019 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
2020 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2023 'required': ['servers'],
2025 'Address': {'additionalProperties': False,
2026 'properties': {'scope': {'type': 'string'},
2027 'space-name': {'type': 'string'},
2028 'type': {'type': 'string'},
2029 'value': {'type': 'string'}},
2030 'required': ['value', 'type', 'scope'],
2032 'BytesResult': {'additionalProperties': False,
2033 'properties': {'result': {'items': {'type': 'integer'},
2035 'required': ['result'],
2037 'DeployerConnectionValues': {'additionalProperties': False,
2038 'properties': {'api-addresses': {'items': {'type': 'string'},
2040 'state-addresses': {'items': {'type': 'string'},
2042 'required': ['state-addresses',
2045 'Entities': {'additionalProperties': False,
2046 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2048 'required': ['entities'],
2050 'Entity': {'additionalProperties': False,
2051 'properties': {'tag': {'type': 'string'}},
2052 'required': ['tag'],
2054 'EntityPassword': {'additionalProperties': False,
2055 'properties': {'password': {'type': 'string'},
2056 'tag': {'type': 'string'}},
2057 'required': ['tag', 'password'],
2059 'EntityPasswords': {'additionalProperties': False,
2060 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
2062 'required': ['changes'],
2064 'EntityStatusArgs': {'additionalProperties': False,
2065 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2068 'info': {'type': 'string'},
2069 'status': {'type': 'string'},
2070 'tag': {'type': 'string'}},
2076 'Error': {'additionalProperties': False,
2077 'properties': {'code': {'type': 'string'},
2078 'info': {'$ref': '#/definitions/ErrorInfo'},
2079 'message': {'type': 'string'}},
2080 'required': ['message', 'code'],
2082 'ErrorInfo': {'additionalProperties': False,
2083 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2084 'macaroon-path': {'type': 'string'}},
2086 'ErrorResult': {'additionalProperties': False,
2087 'properties': {'error': {'$ref': '#/definitions/Error'}},
2089 'ErrorResults': {'additionalProperties': False,
2090 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2092 'required': ['results'],
2094 'HostPort': {'additionalProperties': False,
2095 'properties': {'Address': {'$ref': '#/definitions/Address'},
2096 'port': {'type': 'integer'}},
2097 'required': ['Address', 'port'],
2099 'LifeResult': {'additionalProperties': False,
2100 'properties': {'error': {'$ref': '#/definitions/Error'},
2101 'life': {'type': 'string'}},
2102 'required': ['life'],
2104 'LifeResults': {'additionalProperties': False,
2105 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2107 'required': ['results'],
2109 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2110 'NotifyWatchResult': {'additionalProperties': False,
2111 'properties': {'NotifyWatcherId': {'type': 'string'},
2112 'error': {'$ref': '#/definitions/Error'}},
2113 'required': ['NotifyWatcherId'],
2115 'SetStatus': {'additionalProperties': False,
2116 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
2118 'required': ['entities'],
2120 'StringResult': {'additionalProperties': False,
2121 'properties': {'error': {'$ref': '#/definitions/Error'},
2122 'result': {'type': 'string'}},
2123 'required': ['result'],
2125 'StringsResult': {'additionalProperties': False,
2126 'properties': {'error': {'$ref': '#/definitions/Error'},
2127 'result': {'items': {'type': 'string'},
2130 'StringsWatchResult': {'additionalProperties': False,
2131 'properties': {'changes': {'items': {'type': 'string'},
2133 'error': {'$ref': '#/definitions/Error'},
2134 'watcher-id': {'type': 'string'}},
2135 'required': ['watcher-id'],
2137 'StringsWatchResults': {'additionalProperties': False,
2138 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
2140 'required': ['results'],
2142 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2144 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
2146 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
2148 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
2150 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2151 'Result': {'$ref': '#/definitions/LifeResults'}},
2153 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
2155 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2156 'Result': {'$ref': '#/definitions/ErrorResults'}},
2158 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
2159 'Result': {'$ref': '#/definitions/ErrorResults'}},
2161 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2162 'Result': {'$ref': '#/definitions/ErrorResults'}},
2164 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2166 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2167 'Result': {'$ref': '#/definitions/ErrorResults'}},
2169 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2171 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2172 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2177 @ReturnMapping(StringsResult
)
2178 async def APIAddresses(self
):
2181 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
2183 # map input types to rpc msg
2185 msg
= dict(type='Deployer', request
='APIAddresses', version
=1, params
=_params
)
2187 reply
= await self
.rpc(msg
)
2192 @ReturnMapping(APIHostPortsResult
)
2193 async def APIHostPorts(self
):
2196 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
2198 # map input types to rpc msg
2200 msg
= dict(type='Deployer', request
='APIHostPorts', version
=1, params
=_params
)
2202 reply
= await self
.rpc(msg
)
2207 @ReturnMapping(BytesResult
)
2208 async def CACert(self
):
2211 Returns -> typing.Sequence<+T_co>[int]
2213 # map input types to rpc msg
2215 msg
= dict(type='Deployer', request
='CACert', version
=1, params
=_params
)
2217 reply
= await self
.rpc(msg
)
2222 @ReturnMapping(DeployerConnectionValues
)
2223 async def ConnectionInfo(self
):
2226 Returns -> typing.Sequence<+T_co>[str]
2228 # map input types to rpc msg
2230 msg
= dict(type='Deployer', request
='ConnectionInfo', version
=1, params
=_params
)
2232 reply
= await self
.rpc(msg
)
2237 @ReturnMapping(LifeResults
)
2238 async def Life(self
, entities
):
2240 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2241 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2243 # map input types to rpc msg
2245 msg
= dict(type='Deployer', request
='Life', version
=1, params
=_params
)
2246 _params
['entities'] = entities
2247 reply
= await self
.rpc(msg
)
2252 @ReturnMapping(StringResult
)
2253 async def ModelUUID(self
):
2256 Returns -> typing.Union[_ForwardRef('Error'), str]
2258 # map input types to rpc msg
2260 msg
= dict(type='Deployer', request
='ModelUUID', version
=1, params
=_params
)
2262 reply
= await self
.rpc(msg
)
2267 @ReturnMapping(ErrorResults
)
2268 async def Remove(self
, entities
):
2270 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2271 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2273 # map input types to rpc msg
2275 msg
= dict(type='Deployer', request
='Remove', version
=1, params
=_params
)
2276 _params
['entities'] = entities
2277 reply
= await self
.rpc(msg
)
2282 @ReturnMapping(ErrorResults
)
2283 async def SetPasswords(self
, changes
):
2285 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
2286 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2288 # map input types to rpc msg
2290 msg
= dict(type='Deployer', request
='SetPasswords', version
=1, params
=_params
)
2291 _params
['changes'] = changes
2292 reply
= await self
.rpc(msg
)
2297 @ReturnMapping(ErrorResults
)
2298 async def SetStatus(self
, entities
):
2300 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2301 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2303 # map input types to rpc msg
2305 msg
= dict(type='Deployer', request
='SetStatus', version
=1, params
=_params
)
2306 _params
['entities'] = entities
2307 reply
= await self
.rpc(msg
)
2312 @ReturnMapping(StringsResult
)
2313 async def StateAddresses(self
):
2316 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
2318 # map input types to rpc msg
2320 msg
= dict(type='Deployer', request
='StateAddresses', version
=1, params
=_params
)
2322 reply
= await self
.rpc(msg
)
2327 @ReturnMapping(ErrorResults
)
2328 async def UpdateStatus(self
, entities
):
2330 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2331 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2333 # map input types to rpc msg
2335 msg
= dict(type='Deployer', request
='UpdateStatus', version
=1, params
=_params
)
2336 _params
['entities'] = entities
2337 reply
= await self
.rpc(msg
)
2342 @ReturnMapping(NotifyWatchResult
)
2343 async def WatchAPIHostPorts(self
):
2346 Returns -> typing.Union[str, _ForwardRef('Error')]
2348 # map input types to rpc msg
2350 msg
= dict(type='Deployer', request
='WatchAPIHostPorts', version
=1, params
=_params
)
2352 reply
= await self
.rpc(msg
)
2357 @ReturnMapping(StringsWatchResults
)
2358 async def WatchUnits(self
, entities
):
2360 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2361 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
2363 # map input types to rpc msg
2365 msg
= dict(type='Deployer', request
='WatchUnits', version
=1, params
=_params
)
2366 _params
['entities'] = entities
2367 reply
= await self
.rpc(msg
)
2372 class HostKeyReporterFacade(Type
):
2373 name
= 'HostKeyReporter'
2375 schema
= {'definitions': {'Error': {'additionalProperties': False,
2376 'properties': {'code': {'type': 'string'},
2377 'info': {'$ref': '#/definitions/ErrorInfo'},
2378 'message': {'type': 'string'}},
2379 'required': ['message', 'code'],
2381 'ErrorInfo': {'additionalProperties': False,
2382 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2383 'macaroon-path': {'type': 'string'}},
2385 'ErrorResult': {'additionalProperties': False,
2386 'properties': {'error': {'$ref': '#/definitions/Error'}},
2388 'ErrorResults': {'additionalProperties': False,
2389 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2391 'required': ['results'],
2393 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2394 'SSHHostKeySet': {'additionalProperties': False,
2395 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
2397 'required': ['entity-keys'],
2399 'SSHHostKeys': {'additionalProperties': False,
2400 'properties': {'public-keys': {'items': {'type': 'string'},
2402 'tag': {'type': 'string'}},
2403 'required': ['tag', 'public-keys'],
2405 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
2406 'Result': {'$ref': '#/definitions/ErrorResults'}},
2411 @ReturnMapping(ErrorResults
)
2412 async def ReportKeys(self
, entity_keys
):
2414 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
2415 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2417 # map input types to rpc msg
2419 msg
= dict(type='HostKeyReporter', request
='ReportKeys', version
=1, params
=_params
)
2420 _params
['entity-keys'] = entity_keys
2421 reply
= await self
.rpc(msg
)
2426 class KeyManagerFacade(Type
):
2429 schema
= {'definitions': {'Entities': {'additionalProperties': False,
2430 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2432 'required': ['entities'],
2434 'Entity': {'additionalProperties': False,
2435 'properties': {'tag': {'type': 'string'}},
2436 'required': ['tag'],
2438 'Error': {'additionalProperties': False,
2439 'properties': {'code': {'type': 'string'},
2440 'info': {'$ref': '#/definitions/ErrorInfo'},
2441 'message': {'type': 'string'}},
2442 'required': ['message', 'code'],
2444 'ErrorInfo': {'additionalProperties': False,
2445 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2446 'macaroon-path': {'type': 'string'}},
2448 'ErrorResult': {'additionalProperties': False,
2449 'properties': {'error': {'$ref': '#/definitions/Error'}},
2451 'ErrorResults': {'additionalProperties': False,
2452 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2454 'required': ['results'],
2456 'ListSSHKeys': {'additionalProperties': False,
2457 'properties': {'entities': {'$ref': '#/definitions/Entities'},
2458 'mode': {'type': 'boolean'}},
2459 'required': ['entities', 'mode'],
2461 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2462 'ModifyUserSSHKeys': {'additionalProperties': False,
2463 'properties': {'ssh-keys': {'items': {'type': 'string'},
2465 'user': {'type': 'string'}},
2466 'required': ['user', 'ssh-keys'],
2468 'StringsResult': {'additionalProperties': False,
2469 'properties': {'error': {'$ref': '#/definitions/Error'},
2470 'result': {'items': {'type': 'string'},
2473 'StringsResults': {'additionalProperties': False,
2474 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
2476 'required': ['results'],
2478 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
2479 'Result': {'$ref': '#/definitions/ErrorResults'}},
2481 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
2482 'Result': {'$ref': '#/definitions/ErrorResults'}},
2484 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
2485 'Result': {'$ref': '#/definitions/ErrorResults'}},
2487 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
2488 'Result': {'$ref': '#/definitions/StringsResults'}},
2493 @ReturnMapping(ErrorResults
)
2494 async def AddKeys(self
, ssh_keys
, user
):
2496 ssh_keys : typing.Sequence<+T_co>[str]
2498 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2500 # map input types to rpc msg
2502 msg
= dict(type='KeyManager', request
='AddKeys', version
=1, params
=_params
)
2503 _params
['ssh-keys'] = ssh_keys
2504 _params
['user'] = user
2505 reply
= await self
.rpc(msg
)
2510 @ReturnMapping(ErrorResults
)
2511 async def DeleteKeys(self
, ssh_keys
, user
):
2513 ssh_keys : typing.Sequence<+T_co>[str]
2515 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2517 # map input types to rpc msg
2519 msg
= dict(type='KeyManager', request
='DeleteKeys', version
=1, params
=_params
)
2520 _params
['ssh-keys'] = ssh_keys
2521 _params
['user'] = user
2522 reply
= await self
.rpc(msg
)
2527 @ReturnMapping(ErrorResults
)
2528 async def ImportKeys(self
, ssh_keys
, user
):
2530 ssh_keys : typing.Sequence<+T_co>[str]
2532 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2534 # map input types to rpc msg
2536 msg
= dict(type='KeyManager', request
='ImportKeys', version
=1, params
=_params
)
2537 _params
['ssh-keys'] = ssh_keys
2538 _params
['user'] = user
2539 reply
= await self
.rpc(msg
)
2544 @ReturnMapping(StringsResults
)
2545 async def ListKeys(self
, entities
, mode
):
2549 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2551 # map input types to rpc msg
2553 msg
= dict(type='KeyManager', request
='ListKeys', version
=1, params
=_params
)
2554 _params
['entities'] = entities
2555 _params
['mode'] = mode
2556 reply
= await self
.rpc(msg
)
2561 class KeyUpdaterFacade(Type
):
2564 schema
= {'definitions': {'Entities': {'additionalProperties': False,
2565 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2567 'required': ['entities'],
2569 'Entity': {'additionalProperties': False,
2570 'properties': {'tag': {'type': 'string'}},
2571 'required': ['tag'],
2573 'Error': {'additionalProperties': False,
2574 'properties': {'code': {'type': 'string'},
2575 'info': {'$ref': '#/definitions/ErrorInfo'},
2576 'message': {'type': 'string'}},
2577 'required': ['message', 'code'],
2579 'ErrorInfo': {'additionalProperties': False,
2580 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2581 'macaroon-path': {'type': 'string'}},
2583 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2584 'NotifyWatchResult': {'additionalProperties': False,
2585 'properties': {'NotifyWatcherId': {'type': 'string'},
2586 'error': {'$ref': '#/definitions/Error'}},
2587 'required': ['NotifyWatcherId'],
2589 'NotifyWatchResults': {'additionalProperties': False,
2590 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2592 'required': ['results'],
2594 'StringsResult': {'additionalProperties': False,
2595 'properties': {'error': {'$ref': '#/definitions/Error'},
2596 'result': {'items': {'type': 'string'},
2599 'StringsResults': {'additionalProperties': False,
2600 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
2602 'required': ['results'],
2604 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2605 'Result': {'$ref': '#/definitions/StringsResults'}},
2607 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2608 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2613 @ReturnMapping(StringsResults
)
2614 async def AuthorisedKeys(self
, entities
):
2616 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2617 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2619 # map input types to rpc msg
2621 msg
= dict(type='KeyUpdater', request
='AuthorisedKeys', version
=1, params
=_params
)
2622 _params
['entities'] = entities
2623 reply
= await self
.rpc(msg
)
2628 @ReturnMapping(NotifyWatchResults
)
2629 async def WatchAuthorisedKeys(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='KeyUpdater', request
='WatchAuthorisedKeys', version
=1, params
=_params
)
2637 _params
['entities'] = entities
2638 reply
= await self
.rpc(msg
)
2643 class LifeFlagFacade(Type
):
2646 schema
= {'definitions': {'Entities': {'additionalProperties': False,
2647 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2649 'required': ['entities'],
2651 'Entity': {'additionalProperties': False,
2652 'properties': {'tag': {'type': 'string'}},
2653 'required': ['tag'],
2655 'Error': {'additionalProperties': False,
2656 'properties': {'code': {'type': 'string'},
2657 'info': {'$ref': '#/definitions/ErrorInfo'},
2658 'message': {'type': 'string'}},
2659 'required': ['message', 'code'],
2661 'ErrorInfo': {'additionalProperties': False,
2662 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2663 'macaroon-path': {'type': 'string'}},
2665 'LifeResult': {'additionalProperties': False,
2666 'properties': {'error': {'$ref': '#/definitions/Error'},
2667 'life': {'type': 'string'}},
2668 'required': ['life'],
2670 'LifeResults': {'additionalProperties': False,
2671 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2673 'required': ['results'],
2675 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2676 'NotifyWatchResult': {'additionalProperties': False,
2677 'properties': {'NotifyWatcherId': {'type': 'string'},
2678 'error': {'$ref': '#/definitions/Error'}},
2679 'required': ['NotifyWatcherId'],
2681 'NotifyWatchResults': {'additionalProperties': False,
2682 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2684 'required': ['results'],
2686 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2687 'Result': {'$ref': '#/definitions/LifeResults'}},
2689 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2690 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2695 @ReturnMapping(LifeResults
)
2696 async def Life(self
, entities
):
2698 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2699 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2701 # map input types to rpc msg
2703 msg
= dict(type='LifeFlag', request
='Life', version
=1, params
=_params
)
2704 _params
['entities'] = entities
2705 reply
= await self
.rpc(msg
)
2710 @ReturnMapping(NotifyWatchResults
)
2711 async def Watch(self
, entities
):
2713 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2714 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2716 # map input types to rpc msg
2718 msg
= dict(type='LifeFlag', request
='Watch', version
=1, params
=_params
)
2719 _params
['entities'] = entities
2720 reply
= await self
.rpc(msg
)
2725 class LogForwardingFacade(Type
):
2726 name
= 'LogForwarding'
2728 schema
= {'definitions': {'Error': {'additionalProperties': False,
2729 'properties': {'code': {'type': 'string'},
2730 'info': {'$ref': '#/definitions/ErrorInfo'},
2731 'message': {'type': 'string'}},
2732 'required': ['message', 'code'],
2734 'ErrorInfo': {'additionalProperties': False,
2735 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2736 'macaroon-path': {'type': 'string'}},
2738 'ErrorResult': {'additionalProperties': False,
2739 'properties': {'error': {'$ref': '#/definitions/Error'}},
2741 'ErrorResults': {'additionalProperties': False,
2742 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2744 'required': ['results'],
2746 'LogForwardingGetLastSentParams': {'additionalProperties': False,
2747 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
2749 'required': ['ids'],
2751 'LogForwardingGetLastSentResult': {'additionalProperties': False,
2752 'properties': {'err': {'$ref': '#/definitions/Error'},
2753 'record-id': {'type': 'integer'},
2754 'record-timestamp': {'type': 'integer'}},
2755 'required': ['record-id',
2759 'LogForwardingGetLastSentResults': {'additionalProperties': False,
2760 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
2762 'required': ['results'],
2764 'LogForwardingID': {'additionalProperties': False,
2765 'properties': {'model': {'type': 'string'},
2766 'sink': {'type': 'string'}},
2767 'required': ['model', 'sink'],
2769 'LogForwardingSetLastSentParam': {'additionalProperties': False,
2770 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
2771 'record-id': {'type': 'integer'},
2772 'record-timestamp': {'type': 'integer'}},
2773 'required': ['LogForwardingID',
2775 'record-timestamp'],
2777 'LogForwardingSetLastSentParams': {'additionalProperties': False,
2778 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
2780 'required': ['params'],
2782 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2783 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
2784 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
2786 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
2787 'Result': {'$ref': '#/definitions/ErrorResults'}},
2792 @ReturnMapping(LogForwardingGetLastSentResults
)
2793 async def GetLastSent(self
, ids
):
2795 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
2796 Returns -> typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
2798 # map input types to rpc msg
2800 msg
= dict(type='LogForwarding', request
='GetLastSent', version
=1, params
=_params
)
2801 _params
['ids'] = ids
2802 reply
= await self
.rpc(msg
)
2807 @ReturnMapping(ErrorResults
)
2808 async def SetLastSent(self
, params
):
2810 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
2811 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2813 # map input types to rpc msg
2815 msg
= dict(type='LogForwarding', request
='SetLastSent', version
=1, params
=_params
)
2816 _params
['params'] = params
2817 reply
= await self
.rpc(msg
)
2822 class LoggerFacade(Type
):
2825 schema
= {'definitions': {'Entities': {'additionalProperties': False,
2826 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2828 'required': ['entities'],
2830 'Entity': {'additionalProperties': False,
2831 'properties': {'tag': {'type': 'string'}},
2832 'required': ['tag'],
2834 'Error': {'additionalProperties': False,
2835 'properties': {'code': {'type': 'string'},
2836 'info': {'$ref': '#/definitions/ErrorInfo'},
2837 'message': {'type': 'string'}},
2838 'required': ['message', 'code'],
2840 'ErrorInfo': {'additionalProperties': False,
2841 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2842 'macaroon-path': {'type': 'string'}},
2844 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2845 'NotifyWatchResult': {'additionalProperties': False,
2846 'properties': {'NotifyWatcherId': {'type': 'string'},
2847 'error': {'$ref': '#/definitions/Error'}},
2848 'required': ['NotifyWatcherId'],
2850 'NotifyWatchResults': {'additionalProperties': False,
2851 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2853 'required': ['results'],
2855 'StringResult': {'additionalProperties': False,
2856 'properties': {'error': {'$ref': '#/definitions/Error'},
2857 'result': {'type': 'string'}},
2858 'required': ['result'],
2860 'StringResults': {'additionalProperties': False,
2861 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2863 'required': ['results'],
2865 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2866 'Result': {'$ref': '#/definitions/StringResults'}},
2868 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2869 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2874 @ReturnMapping(StringResults
)
2875 async def LoggingConfig(self
, entities
):
2877 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2878 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
2880 # map input types to rpc msg
2882 msg
= dict(type='Logger', request
='LoggingConfig', version
=1, params
=_params
)
2883 _params
['entities'] = entities
2884 reply
= await self
.rpc(msg
)
2889 @ReturnMapping(NotifyWatchResults
)
2890 async def WatchLoggingConfig(self
, entities
):
2892 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2893 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2895 # map input types to rpc msg
2897 msg
= dict(type='Logger', request
='WatchLoggingConfig', version
=1, params
=_params
)
2898 _params
['entities'] = entities
2899 reply
= await self
.rpc(msg
)
2904 class MachineActionsFacade(Type
):
2905 name
= 'MachineActions'
2907 schema
= {'definitions': {'Action': {'additionalProperties': False,
2908 'properties': {'name': {'type': 'string'},
2909 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
2912 'receiver': {'type': 'string'},
2913 'tag': {'type': 'string'}},
2914 'required': ['tag', 'receiver', 'name'],
2916 'ActionExecutionResult': {'additionalProperties': False,
2917 'properties': {'action-tag': {'type': 'string'},
2918 'message': {'type': 'string'},
2919 'results': {'patternProperties': {'.*': {'additionalProperties': True,
2922 'status': {'type': 'string'}},
2923 'required': ['action-tag', 'status'],
2925 'ActionExecutionResults': {'additionalProperties': False,
2926 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
2929 'ActionResult': {'additionalProperties': False,
2930 'properties': {'action': {'$ref': '#/definitions/Action'},
2931 'completed': {'format': 'date-time',
2933 'enqueued': {'format': 'date-time',
2935 'error': {'$ref': '#/definitions/Error'},
2936 'message': {'type': 'string'},
2937 'output': {'patternProperties': {'.*': {'additionalProperties': True,
2940 'started': {'format': 'date-time',
2942 'status': {'type': 'string'}},
2944 'ActionResults': {'additionalProperties': False,
2945 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
2948 'ActionsByReceiver': {'additionalProperties': False,
2949 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
2951 'error': {'$ref': '#/definitions/Error'},
2952 'receiver': {'type': 'string'}},
2954 'ActionsByReceivers': {'additionalProperties': False,
2955 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
2958 'Entities': {'additionalProperties': False,
2959 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2961 'required': ['entities'],
2963 'Entity': {'additionalProperties': False,
2964 'properties': {'tag': {'type': 'string'}},
2965 'required': ['tag'],
2967 'Error': {'additionalProperties': False,
2968 'properties': {'code': {'type': 'string'},
2969 'info': {'$ref': '#/definitions/ErrorInfo'},
2970 'message': {'type': 'string'}},
2971 'required': ['message', 'code'],
2973 'ErrorInfo': {'additionalProperties': False,
2974 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2975 'macaroon-path': {'type': 'string'}},
2977 'ErrorResult': {'additionalProperties': False,
2978 'properties': {'error': {'$ref': '#/definitions/Error'}},
2980 'ErrorResults': {'additionalProperties': False,
2981 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2983 'required': ['results'],
2985 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2986 'StringsWatchResult': {'additionalProperties': False,
2987 'properties': {'changes': {'items': {'type': 'string'},
2989 'error': {'$ref': '#/definitions/Error'},
2990 'watcher-id': {'type': 'string'}},
2991 'required': ['watcher-id'],
2993 'StringsWatchResults': {'additionalProperties': False,
2994 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
2996 'required': ['results'],
2998 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2999 'Result': {'$ref': '#/definitions/ActionResults'}},
3001 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3002 'Result': {'$ref': '#/definitions/ErrorResults'}},
3004 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
3005 'Result': {'$ref': '#/definitions/ErrorResults'}},
3007 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3008 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
3010 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3011 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
3016 @ReturnMapping(ActionResults
)
3017 async def Actions(self
, entities
):
3019 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3020 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
3022 # map input types to rpc msg
3024 msg
= dict(type='MachineActions', request
='Actions', version
=1, params
=_params
)
3025 _params
['entities'] = entities
3026 reply
= await self
.rpc(msg
)
3031 @ReturnMapping(ErrorResults
)
3032 async def BeginActions(self
, entities
):
3034 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3035 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3037 # map input types to rpc msg
3039 msg
= dict(type='MachineActions', request
='BeginActions', version
=1, params
=_params
)
3040 _params
['entities'] = entities
3041 reply
= await self
.rpc(msg
)
3046 @ReturnMapping(ErrorResults
)
3047 async def FinishActions(self
, results
):
3049 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
3050 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3052 # map input types to rpc msg
3054 msg
= dict(type='MachineActions', request
='FinishActions', version
=1, params
=_params
)
3055 _params
['results'] = results
3056 reply
= await self
.rpc(msg
)
3061 @ReturnMapping(ActionsByReceivers
)
3062 async def RunningActions(self
, entities
):
3064 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3065 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
3067 # map input types to rpc msg
3069 msg
= dict(type='MachineActions', request
='RunningActions', version
=1, params
=_params
)
3070 _params
['entities'] = entities
3071 reply
= await self
.rpc(msg
)
3076 @ReturnMapping(StringsWatchResults
)
3077 async def WatchActionNotifications(self
, entities
):
3079 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3080 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
3082 # map input types to rpc msg
3084 msg
= dict(type='MachineActions', request
='WatchActionNotifications', version
=1, params
=_params
)
3085 _params
['entities'] = entities
3086 reply
= await self
.rpc(msg
)
3091 class MachineUndertakerFacade(Type
):
3092 name
= 'MachineUndertaker'
3094 schema
= {'definitions': {'Entities': {'additionalProperties': False,
3095 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3097 'required': ['entities'],
3099 'EntitiesResult': {'additionalProperties': False,
3100 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3102 'error': {'$ref': '#/definitions/Error'}},
3103 'required': ['entities'],
3105 'EntitiesResults': {'additionalProperties': False,
3106 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
3108 'required': ['results'],
3110 'Entity': {'additionalProperties': False,
3111 'properties': {'tag': {'type': 'string'}},
3112 'required': ['tag'],
3114 'Error': {'additionalProperties': False,
3115 'properties': {'code': {'type': 'string'},
3116 'info': {'$ref': '#/definitions/ErrorInfo'},
3117 'message': {'type': 'string'}},
3118 'required': ['message', 'code'],
3120 'ErrorInfo': {'additionalProperties': False,
3121 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3122 'macaroon-path': {'type': 'string'}},
3124 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3125 'NotifyWatchResult': {'additionalProperties': False,
3126 'properties': {'NotifyWatcherId': {'type': 'string'},
3127 'error': {'$ref': '#/definitions/Error'}},
3128 'required': ['NotifyWatcherId'],
3130 'NotifyWatchResults': {'additionalProperties': False,
3131 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3133 'required': ['results'],
3135 'ProviderInterfaceInfo': {'additionalProperties': False,
3136 'properties': {'interface-name': {'type': 'string'},
3137 'mac-address': {'type': 'string'},
3138 'provider-id': {'type': 'string'}},
3139 'required': ['interface-name',
3143 'ProviderInterfaceInfoResult': {'additionalProperties': False,
3144 'properties': {'error': {'$ref': '#/definitions/Error'},
3145 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'},
3147 'machine-tag': {'type': 'string'}},
3148 'required': ['machine-tag',
3151 'ProviderInterfaceInfoResults': {'additionalProperties': False,
3152 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'},
3154 'required': ['results'],
3156 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3157 'Result': {'$ref': '#/definitions/EntitiesResults'}},
3159 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}},
3161 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3162 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}},
3164 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3165 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3170 @ReturnMapping(EntitiesResults
)
3171 async def AllMachineRemovals(self
, entities
):
3173 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3174 Returns -> typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
3176 # map input types to rpc msg
3178 msg
= dict(type='MachineUndertaker', request
='AllMachineRemovals', version
=1, params
=_params
)
3179 _params
['entities'] = entities
3180 reply
= await self
.rpc(msg
)
3185 @ReturnMapping(None)
3186 async def CompleteMachineRemovals(self
, entities
):
3188 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3191 # map input types to rpc msg
3193 msg
= dict(type='MachineUndertaker', request
='CompleteMachineRemovals', version
=1, params
=_params
)
3194 _params
['entities'] = entities
3195 reply
= await self
.rpc(msg
)
3200 @ReturnMapping(ProviderInterfaceInfoResults
)
3201 async def GetMachineProviderInterfaceInfo(self
, entities
):
3203 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3204 Returns -> typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
3206 # map input types to rpc msg
3208 msg
= dict(type='MachineUndertaker', request
='GetMachineProviderInterfaceInfo', version
=1, params
=_params
)
3209 _params
['entities'] = entities
3210 reply
= await self
.rpc(msg
)
3215 @ReturnMapping(NotifyWatchResults
)
3216 async def WatchMachineRemovals(self
, entities
):
3218 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3219 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3221 # map input types to rpc msg
3223 msg
= dict(type='MachineUndertaker', request
='WatchMachineRemovals', version
=1, params
=_params
)
3224 _params
['entities'] = entities
3225 reply
= await self
.rpc(msg
)
3230 class MachinerFacade(Type
):
3233 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
3234 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
3237 'required': ['servers'],
3239 'Address': {'additionalProperties': False,
3240 'properties': {'scope': {'type': 'string'},
3241 'space-name': {'type': 'string'},
3242 'type': {'type': 'string'},
3243 'value': {'type': 'string'}},
3244 'required': ['value', 'type', 'scope'],
3246 'BytesResult': {'additionalProperties': False,
3247 'properties': {'result': {'items': {'type': 'integer'},
3249 'required': ['result'],
3251 'Entities': {'additionalProperties': False,
3252 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3254 'required': ['entities'],
3256 'Entity': {'additionalProperties': False,
3257 'properties': {'tag': {'type': 'string'}},
3258 'required': ['tag'],
3260 'EntityStatusArgs': {'additionalProperties': False,
3261 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3264 'info': {'type': 'string'},
3265 'status': {'type': 'string'},
3266 'tag': {'type': 'string'}},
3272 'Error': {'additionalProperties': False,
3273 'properties': {'code': {'type': 'string'},
3274 'info': {'$ref': '#/definitions/ErrorInfo'},
3275 'message': {'type': 'string'}},
3276 'required': ['message', 'code'],
3278 'ErrorInfo': {'additionalProperties': False,
3279 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3280 'macaroon-path': {'type': 'string'}},
3282 'ErrorResult': {'additionalProperties': False,
3283 'properties': {'error': {'$ref': '#/definitions/Error'}},
3285 'ErrorResults': {'additionalProperties': False,
3286 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3288 'required': ['results'],
3290 'HostPort': {'additionalProperties': False,
3291 'properties': {'Address': {'$ref': '#/definitions/Address'},
3292 'port': {'type': 'integer'}},
3293 'required': ['Address', 'port'],
3295 'JobsResult': {'additionalProperties': False,
3296 'properties': {'error': {'$ref': '#/definitions/Error'},
3297 'jobs': {'items': {'type': 'string'},
3299 'required': ['jobs'],
3301 'JobsResults': {'additionalProperties': False,
3302 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
3304 'required': ['results'],
3306 'LifeResult': {'additionalProperties': False,
3307 'properties': {'error': {'$ref': '#/definitions/Error'},
3308 'life': {'type': 'string'}},
3309 'required': ['life'],
3311 'LifeResults': {'additionalProperties': False,
3312 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
3314 'required': ['results'],
3316 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3317 'MachineAddresses': {'additionalProperties': False,
3318 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
3320 'tag': {'type': 'string'}},
3321 'required': ['tag', 'addresses'],
3323 'NetworkConfig': {'additionalProperties': False,
3324 'properties': {'address': {'type': 'string'},
3325 'cidr': {'type': 'string'},
3326 'config-type': {'type': 'string'},
3327 'device-index': {'type': 'integer'},
3328 'disabled': {'type': 'boolean'},
3329 'dns-search-domains': {'items': {'type': 'string'},
3331 'dns-servers': {'items': {'type': 'string'},
3333 'gateway-address': {'type': 'string'},
3334 'interface-name': {'type': 'string'},
3335 'interface-type': {'type': 'string'},
3336 'mac-address': {'type': 'string'},
3337 'mtu': {'type': 'integer'},
3338 'no-auto-start': {'type': 'boolean'},
3339 'parent-interface-name': {'type': 'string'},
3340 'provider-address-id': {'type': 'string'},
3341 'provider-id': {'type': 'string'},
3342 'provider-space-id': {'type': 'string'},
3343 'provider-subnet-id': {'type': 'string'},
3344 'provider-vlan-id': {'type': 'string'},
3345 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
3347 'vlan-tag': {'type': 'integer'}},
3348 'required': ['device-index',
3353 'provider-subnet-id',
3354 'provider-space-id',
3355 'provider-address-id',
3359 'parent-interface-name',
3363 'NetworkRoute': {'additionalProperties': False,
3364 'properties': {'destination-cidr': {'type': 'string'},
3365 'gateway-ip': {'type': 'string'},
3366 'metric': {'type': 'integer'}},
3367 'required': ['destination-cidr',
3371 'NotifyWatchResult': {'additionalProperties': False,
3372 'properties': {'NotifyWatcherId': {'type': 'string'},
3373 'error': {'$ref': '#/definitions/Error'}},
3374 'required': ['NotifyWatcherId'],
3376 'NotifyWatchResults': {'additionalProperties': False,
3377 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3379 'required': ['results'],
3381 'SetMachineNetworkConfig': {'additionalProperties': False,
3382 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
3384 'tag': {'type': 'string'}},
3385 'required': ['tag', 'config'],
3387 'SetMachinesAddresses': {'additionalProperties': False,
3388 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
3390 'required': ['machine-addresses'],
3392 'SetStatus': {'additionalProperties': False,
3393 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
3395 'required': ['entities'],
3397 'StringResult': {'additionalProperties': False,
3398 'properties': {'error': {'$ref': '#/definitions/Error'},
3399 'result': {'type': 'string'}},
3400 'required': ['result'],
3402 'StringsResult': {'additionalProperties': False,
3403 'properties': {'error': {'$ref': '#/definitions/Error'},
3404 'result': {'items': {'type': 'string'},
3407 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
3409 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
3411 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
3413 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3414 'Result': {'$ref': '#/definitions/ErrorResults'}},
3416 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3417 'Result': {'$ref': '#/definitions/JobsResults'}},
3419 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3420 'Result': {'$ref': '#/definitions/LifeResults'}},
3422 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3424 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
3425 'Result': {'$ref': '#/definitions/ErrorResults'}},
3427 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
3429 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3430 'Result': {'$ref': '#/definitions/ErrorResults'}},
3432 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3433 'Result': {'$ref': '#/definitions/ErrorResults'}},
3435 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3436 'Result': {'$ref': '#/definitions/ErrorResults'}},
3438 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3439 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3441 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3446 @ReturnMapping(StringsResult
)
3447 async def APIAddresses(self
):
3450 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
3452 # map input types to rpc msg
3454 msg
= dict(type='Machiner', request
='APIAddresses', version
=1, params
=_params
)
3456 reply
= await self
.rpc(msg
)
3461 @ReturnMapping(APIHostPortsResult
)
3462 async def APIHostPorts(self
):
3465 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
3467 # map input types to rpc msg
3469 msg
= dict(type='Machiner', request
='APIHostPorts', version
=1, params
=_params
)
3471 reply
= await self
.rpc(msg
)
3476 @ReturnMapping(BytesResult
)
3477 async def CACert(self
):
3480 Returns -> typing.Sequence<+T_co>[int]
3482 # map input types to rpc msg
3484 msg
= dict(type='Machiner', request
='CACert', version
=1, params
=_params
)
3486 reply
= await self
.rpc(msg
)
3491 @ReturnMapping(ErrorResults
)
3492 async def EnsureDead(self
, entities
):
3494 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3495 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3497 # map input types to rpc msg
3499 msg
= dict(type='Machiner', request
='EnsureDead', version
=1, params
=_params
)
3500 _params
['entities'] = entities
3501 reply
= await self
.rpc(msg
)
3506 @ReturnMapping(JobsResults
)
3507 async def Jobs(self
, entities
):
3509 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3510 Returns -> typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
3512 # map input types to rpc msg
3514 msg
= dict(type='Machiner', request
='Jobs', version
=1, params
=_params
)
3515 _params
['entities'] = entities
3516 reply
= await self
.rpc(msg
)
3521 @ReturnMapping(LifeResults
)
3522 async def Life(self
, entities
):
3524 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3525 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
3527 # map input types to rpc msg
3529 msg
= dict(type='Machiner', request
='Life', version
=1, params
=_params
)
3530 _params
['entities'] = entities
3531 reply
= await self
.rpc(msg
)
3536 @ReturnMapping(StringResult
)
3537 async def ModelUUID(self
):
3540 Returns -> typing.Union[_ForwardRef('Error'), str]
3542 # map input types to rpc msg
3544 msg
= dict(type='Machiner', request
='ModelUUID', version
=1, params
=_params
)
3546 reply
= await self
.rpc(msg
)
3551 @ReturnMapping(ErrorResults
)
3552 async def SetMachineAddresses(self
, machine_addresses
):
3554 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
3555 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3557 # map input types to rpc msg
3559 msg
= dict(type='Machiner', request
='SetMachineAddresses', version
=1, params
=_params
)
3560 _params
['machine-addresses'] = machine_addresses
3561 reply
= await self
.rpc(msg
)
3566 @ReturnMapping(None)
3567 async def SetObservedNetworkConfig(self
, config
, tag
):
3569 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3573 # map input types to rpc msg
3575 msg
= dict(type='Machiner', request
='SetObservedNetworkConfig', version
=1, params
=_params
)
3576 _params
['config'] = config
3577 _params
['tag'] = tag
3578 reply
= await self
.rpc(msg
)
3583 @ReturnMapping(ErrorResults
)
3584 async def SetProviderNetworkConfig(self
, entities
):
3586 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3587 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3589 # map input types to rpc msg
3591 msg
= dict(type='Machiner', request
='SetProviderNetworkConfig', version
=1, params
=_params
)
3592 _params
['entities'] = entities
3593 reply
= await self
.rpc(msg
)
3598 @ReturnMapping(ErrorResults
)
3599 async def SetStatus(self
, entities
):
3601 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3602 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3604 # map input types to rpc msg
3606 msg
= dict(type='Machiner', request
='SetStatus', version
=1, params
=_params
)
3607 _params
['entities'] = entities
3608 reply
= await self
.rpc(msg
)
3613 @ReturnMapping(ErrorResults
)
3614 async def UpdateStatus(self
, entities
):
3616 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3617 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3619 # map input types to rpc msg
3621 msg
= dict(type='Machiner', request
='UpdateStatus', version
=1, params
=_params
)
3622 _params
['entities'] = entities
3623 reply
= await self
.rpc(msg
)
3628 @ReturnMapping(NotifyWatchResults
)
3629 async def Watch(self
, entities
):
3631 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3632 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3634 # map input types to rpc msg
3636 msg
= dict(type='Machiner', request
='Watch', version
=1, params
=_params
)
3637 _params
['entities'] = entities
3638 reply
= await self
.rpc(msg
)
3643 @ReturnMapping(NotifyWatchResult
)
3644 async def WatchAPIHostPorts(self
):
3647 Returns -> typing.Union[str, _ForwardRef('Error')]
3649 # map input types to rpc msg
3651 msg
= dict(type='Machiner', request
='WatchAPIHostPorts', version
=1, params
=_params
)
3653 reply
= await self
.rpc(msg
)
3658 class MeterStatusFacade(Type
):
3659 name
= 'MeterStatus'
3661 schema
= {'definitions': {'Entities': {'additionalProperties': False,
3662 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3664 'required': ['entities'],
3666 'Entity': {'additionalProperties': False,
3667 'properties': {'tag': {'type': 'string'}},
3668 'required': ['tag'],
3670 'Error': {'additionalProperties': False,
3671 'properties': {'code': {'type': 'string'},
3672 'info': {'$ref': '#/definitions/ErrorInfo'},
3673 'message': {'type': 'string'}},
3674 'required': ['message', 'code'],
3676 'ErrorInfo': {'additionalProperties': False,
3677 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3678 'macaroon-path': {'type': 'string'}},
3680 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3681 'MeterStatusResult': {'additionalProperties': False,
3682 'properties': {'code': {'type': 'string'},
3683 'error': {'$ref': '#/definitions/Error'},
3684 'info': {'type': 'string'}},
3685 'required': ['code', 'info'],
3687 'MeterStatusResults': {'additionalProperties': False,
3688 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
3690 'required': ['results'],
3692 'NotifyWatchResult': {'additionalProperties': False,
3693 'properties': {'NotifyWatcherId': {'type': 'string'},
3694 'error': {'$ref': '#/definitions/Error'}},
3695 'required': ['NotifyWatcherId'],
3697 'NotifyWatchResults': {'additionalProperties': False,
3698 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3700 'required': ['results'],
3702 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3703 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
3705 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3706 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3711 @ReturnMapping(MeterStatusResults
)
3712 async def GetMeterStatus(self
, entities
):
3714 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3715 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
3717 # map input types to rpc msg
3719 msg
= dict(type='MeterStatus', request
='GetMeterStatus', version
=1, params
=_params
)
3720 _params
['entities'] = entities
3721 reply
= await self
.rpc(msg
)
3726 @ReturnMapping(NotifyWatchResults
)
3727 async def WatchMeterStatus(self
, entities
):
3729 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3730 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3732 # map input types to rpc msg
3734 msg
= dict(type='MeterStatus', request
='WatchMeterStatus', version
=1, params
=_params
)
3735 _params
['entities'] = entities
3736 reply
= await self
.rpc(msg
)
3741 class MetricsManagerFacade(Type
):
3742 name
= 'MetricsManager'
3744 schema
= {'definitions': {'Entities': {'additionalProperties': False,
3745 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3747 'required': ['entities'],
3749 'Entity': {'additionalProperties': False,
3750 'properties': {'tag': {'type': 'string'}},
3751 'required': ['tag'],
3753 'Error': {'additionalProperties': False,
3754 'properties': {'code': {'type': 'string'},
3755 'info': {'$ref': '#/definitions/ErrorInfo'},
3756 'message': {'type': 'string'}},
3757 'required': ['message', 'code'],
3759 'ErrorInfo': {'additionalProperties': False,
3760 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3761 'macaroon-path': {'type': 'string'}},
3763 'ErrorResult': {'additionalProperties': False,
3764 'properties': {'error': {'$ref': '#/definitions/Error'}},
3766 'ErrorResults': {'additionalProperties': False,
3767 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3769 'required': ['results'],
3771 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
3772 'properties': {'AddJujuMachineMetrics': {'type': 'object'},
3773 'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3774 'Result': {'$ref': '#/definitions/ErrorResults'}},
3776 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3777 'Result': {'$ref': '#/definitions/ErrorResults'}},
3782 @ReturnMapping(None)
3783 async def AddJujuMachineMetrics(self
):
3788 # map input types to rpc msg
3790 msg
= dict(type='MetricsManager', request
='AddJujuMachineMetrics', version
=1, params
=_params
)
3792 reply
= await self
.rpc(msg
)
3797 @ReturnMapping(ErrorResults
)
3798 async def CleanupOldMetrics(self
, entities
):
3800 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3801 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3803 # map input types to rpc msg
3805 msg
= dict(type='MetricsManager', request
='CleanupOldMetrics', version
=1, params
=_params
)
3806 _params
['entities'] = entities
3807 reply
= await self
.rpc(msg
)
3812 @ReturnMapping(ErrorResults
)
3813 async def SendMetrics(self
, entities
):
3815 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3816 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3818 # map input types to rpc msg
3820 msg
= dict(type='MetricsManager', request
='SendMetrics', version
=1, params
=_params
)
3821 _params
['entities'] = entities
3822 reply
= await self
.rpc(msg
)
3827 class MigrationFlagFacade(Type
):
3828 name
= 'MigrationFlag'
3830 schema
= {'definitions': {'Entities': {'additionalProperties': False,
3831 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3833 'required': ['entities'],
3835 'Entity': {'additionalProperties': False,
3836 'properties': {'tag': {'type': 'string'}},
3837 'required': ['tag'],
3839 'Error': {'additionalProperties': False,
3840 'properties': {'code': {'type': 'string'},
3841 'info': {'$ref': '#/definitions/ErrorInfo'},
3842 'message': {'type': 'string'}},
3843 'required': ['message', 'code'],
3845 'ErrorInfo': {'additionalProperties': False,
3846 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3847 'macaroon-path': {'type': 'string'}},
3849 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3850 'NotifyWatchResult': {'additionalProperties': False,
3851 'properties': {'NotifyWatcherId': {'type': 'string'},
3852 'error': {'$ref': '#/definitions/Error'}},
3853 'required': ['NotifyWatcherId'],
3855 'NotifyWatchResults': {'additionalProperties': False,
3856 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3858 'required': ['results'],
3860 'PhaseResult': {'additionalProperties': False,
3861 'properties': {'error': {'$ref': '#/definitions/Error'},
3862 'phase': {'type': 'string'}},
3864 'PhaseResults': {'additionalProperties': False,
3865 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
3867 'required': ['results'],
3869 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3870 'Result': {'$ref': '#/definitions/PhaseResults'}},
3872 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3873 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3878 @ReturnMapping(PhaseResults
)
3879 async def Phase(self
, entities
):
3881 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3882 Returns -> typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
3884 # map input types to rpc msg
3886 msg
= dict(type='MigrationFlag', request
='Phase', version
=1, params
=_params
)
3887 _params
['entities'] = entities
3888 reply
= await self
.rpc(msg
)
3893 @ReturnMapping(NotifyWatchResults
)
3894 async def Watch(self
, entities
):
3896 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3897 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3899 # map input types to rpc msg
3901 msg
= dict(type='MigrationFlag', request
='Watch', version
=1, params
=_params
)
3902 _params
['entities'] = entities
3903 reply
= await self
.rpc(msg
)
3908 class MigrationMasterFacade(Type
):
3909 name
= 'MigrationMaster'
3911 schema
= {'definitions': {'Error': {'additionalProperties': False,
3912 'properties': {'code': {'type': 'string'},
3913 'info': {'$ref': '#/definitions/ErrorInfo'},
3914 'message': {'type': 'string'}},
3915 'required': ['message', 'code'],
3917 'ErrorInfo': {'additionalProperties': False,
3918 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3919 'macaroon-path': {'type': 'string'}},
3921 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3922 'MasterMigrationStatus': {'additionalProperties': False,
3923 'properties': {'migration-id': {'type': 'string'},
3924 'phase': {'type': 'string'},
3925 'phase-changed-time': {'format': 'date-time',
3927 'spec': {'$ref': '#/definitions/MigrationSpec'}},
3928 'required': ['spec',
3931 'phase-changed-time'],
3933 'MigrationModelInfo': {'additionalProperties': False,
3934 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
3935 'controller-agent-version': {'$ref': '#/definitions/Number'},
3936 'name': {'type': 'string'},
3937 'owner-tag': {'type': 'string'},
3938 'uuid': {'type': 'string'}},
3939 'required': ['uuid',
3943 'controller-agent-version'],
3945 'MigrationSpec': {'additionalProperties': False,
3946 'properties': {'model-tag': {'type': 'string'},
3947 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
3948 'required': ['model-tag', 'target-info'],
3950 'MigrationTargetInfo': {'additionalProperties': False,
3951 'properties': {'addrs': {'items': {'type': 'string'},
3953 'auth-tag': {'type': 'string'},
3954 'ca-cert': {'type': 'string'},
3955 'controller-tag': {'type': 'string'},
3956 'macaroons': {'type': 'string'},
3957 'password': {'type': 'string'}},
3958 'required': ['controller-tag',
3963 'MinionReports': {'additionalProperties': False,
3964 'properties': {'failed': {'items': {'type': 'string'},
3966 'migration-id': {'type': 'string'},
3967 'phase': {'type': 'string'},
3968 'success-count': {'type': 'integer'},
3969 'unknown-count': {'type': 'integer'},
3970 'unknown-sample': {'items': {'type': 'string'},
3972 'required': ['migration-id',
3979 'NotifyWatchResult': {'additionalProperties': False,
3980 'properties': {'NotifyWatcherId': {'type': 'string'},
3981 'error': {'$ref': '#/definitions/Error'}},
3982 'required': ['NotifyWatcherId'],
3984 'Number': {'additionalProperties': False,
3985 'properties': {'Build': {'type': 'integer'},
3986 'Major': {'type': 'integer'},
3987 'Minor': {'type': 'integer'},
3988 'Patch': {'type': 'integer'},
3989 'Tag': {'type': 'string'}},
3990 'required': ['Major',
3996 'SerializedModel': {'additionalProperties': False,
3997 'properties': {'bytes': {'items': {'type': 'integer'},
3999 'charms': {'items': {'type': 'string'},
4001 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
4003 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
4005 'required': ['bytes',
4010 'SerializedModelResource': {'additionalProperties': False,
4011 'properties': {'application': {'type': 'string'},
4012 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
4013 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
4014 'name': {'type': 'string'},
4015 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}},
4017 'required': ['application',
4019 'application-revision',
4020 'charmstore-revision',
4023 'SerializedModelResourceRevision': {'additionalProperties': False,
4024 'properties': {'description': {'type': 'string'},
4025 'fingerprint': {'type': 'string'},
4026 'origin': {'type': 'string'},
4027 'path': {'type': 'string'},
4028 'revision': {'type': 'integer'},
4029 'size': {'type': 'integer'},
4030 'timestamp': {'format': 'date-time',
4032 'type': {'type': 'string'},
4033 'username': {'type': 'string'}},
4034 'required': ['revision',
4043 'SerializedModelTools': {'additionalProperties': False,
4044 'properties': {'uri': {'type': 'string'},
4045 'version': {'type': 'string'}},
4046 'required': ['version', 'uri'],
4048 'SetMigrationPhaseArgs': {'additionalProperties': False,
4049 'properties': {'phase': {'type': 'string'}},
4050 'required': ['phase'],
4052 'SetMigrationStatusMessageArgs': {'additionalProperties': False,
4053 'properties': {'message': {'type': 'string'}},
4054 'required': ['message'],
4056 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
4058 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}},
4060 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}},
4062 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}},
4064 'Prechecks': {'type': 'object'},
4065 'Reap': {'type': 'object'},
4066 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
4068 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
4070 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4072 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4077 @ReturnMapping(SerializedModel
)
4078 async def Export(self
):
4081 Returns -> typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
4083 # map input types to rpc msg
4085 msg
= dict(type='MigrationMaster', request
='Export', version
=1, params
=_params
)
4087 reply
= await self
.rpc(msg
)
4092 @ReturnMapping(MasterMigrationStatus
)
4093 async def MigrationStatus(self
):
4096 Returns -> typing.Union[str, _ForwardRef('MigrationSpec')]
4098 # map input types to rpc msg
4100 msg
= dict(type='MigrationMaster', request
='MigrationStatus', version
=1, params
=_params
)
4102 reply
= await self
.rpc(msg
)
4107 @ReturnMapping(MinionReports
)
4108 async def MinionReports(self
):
4111 Returns -> typing.Union[typing.Sequence<+T_co>[str], int]
4113 # map input types to rpc msg
4115 msg
= dict(type='MigrationMaster', request
='MinionReports', version
=1, params
=_params
)
4117 reply
= await self
.rpc(msg
)
4122 @ReturnMapping(MigrationModelInfo
)
4123 async def ModelInfo(self
):
4126 Returns -> typing.Union[_ForwardRef('Number'), str]
4128 # map input types to rpc msg
4130 msg
= dict(type='MigrationMaster', request
='ModelInfo', version
=1, params
=_params
)
4132 reply
= await self
.rpc(msg
)
4137 @ReturnMapping(None)
4138 async def Prechecks(self
):
4143 # map input types to rpc msg
4145 msg
= dict(type='MigrationMaster', request
='Prechecks', version
=1, params
=_params
)
4147 reply
= await self
.rpc(msg
)
4152 @ReturnMapping(None)
4153 async def Reap(self
):
4158 # map input types to rpc msg
4160 msg
= dict(type='MigrationMaster', request
='Reap', version
=1, params
=_params
)
4162 reply
= await self
.rpc(msg
)
4167 @ReturnMapping(None)
4168 async def SetPhase(self
, phase
):
4173 # map input types to rpc msg
4175 msg
= dict(type='MigrationMaster', request
='SetPhase', version
=1, params
=_params
)
4176 _params
['phase'] = phase
4177 reply
= await self
.rpc(msg
)
4182 @ReturnMapping(None)
4183 async def SetStatusMessage(self
, message
):
4188 # map input types to rpc msg
4190 msg
= dict(type='MigrationMaster', request
='SetStatusMessage', version
=1, params
=_params
)
4191 _params
['message'] = message
4192 reply
= await self
.rpc(msg
)
4197 @ReturnMapping(NotifyWatchResult
)
4198 async def Watch(self
):
4201 Returns -> typing.Union[str, _ForwardRef('Error')]
4203 # map input types to rpc msg
4205 msg
= dict(type='MigrationMaster', request
='Watch', version
=1, params
=_params
)
4207 reply
= await self
.rpc(msg
)
4212 @ReturnMapping(NotifyWatchResult
)
4213 async def WatchMinionReports(self
):
4216 Returns -> typing.Union[str, _ForwardRef('Error')]
4218 # map input types to rpc msg
4220 msg
= dict(type='MigrationMaster', request
='WatchMinionReports', version
=1, params
=_params
)
4222 reply
= await self
.rpc(msg
)
4227 class MigrationMinionFacade(Type
):
4228 name
= 'MigrationMinion'
4230 schema
= {'definitions': {'Error': {'additionalProperties': False,
4231 'properties': {'code': {'type': 'string'},
4232 'info': {'$ref': '#/definitions/ErrorInfo'},
4233 'message': {'type': 'string'}},
4234 'required': ['message', 'code'],
4236 'ErrorInfo': {'additionalProperties': False,
4237 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4238 'macaroon-path': {'type': 'string'}},
4240 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4241 'MinionReport': {'additionalProperties': False,
4242 'properties': {'migration-id': {'type': 'string'},
4243 'phase': {'type': 'string'},
4244 'success': {'type': 'boolean'}},
4245 'required': ['migration-id',
4249 'NotifyWatchResult': {'additionalProperties': False,
4250 'properties': {'NotifyWatcherId': {'type': 'string'},
4251 'error': {'$ref': '#/definitions/Error'}},
4252 'required': ['NotifyWatcherId'],
4254 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}},
4256 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4261 @ReturnMapping(None)
4262 async def Report(self
, migration_id
, phase
, success
):
4269 # map input types to rpc msg
4271 msg
= dict(type='MigrationMinion', request
='Report', version
=1, params
=_params
)
4272 _params
['migration-id'] = migration_id
4273 _params
['phase'] = phase
4274 _params
['success'] = success
4275 reply
= await self
.rpc(msg
)
4280 @ReturnMapping(NotifyWatchResult
)
4281 async def Watch(self
):
4284 Returns -> typing.Union[str, _ForwardRef('Error')]
4286 # map input types to rpc msg
4288 msg
= dict(type='MigrationMinion', request
='Watch', version
=1, params
=_params
)
4290 reply
= await self
.rpc(msg
)
4295 class MigrationStatusWatcherFacade(Type
):
4296 name
= 'MigrationStatusWatcher'
4298 schema
= {'definitions': {'MigrationStatus': {'additionalProperties': False,
4299 'properties': {'attempt': {'type': 'integer'},
4300 'migration-id': {'type': 'string'},
4301 'phase': {'type': 'string'},
4302 'source-api-addrs': {'items': {'type': 'string'},
4304 'source-ca-cert': {'type': 'string'},
4305 'target-api-addrs': {'items': {'type': 'string'},
4307 'target-ca-cert': {'type': 'string'}},
4308 'required': ['migration-id',
4316 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
4318 'Stop': {'type': 'object'}},
4322 @ReturnMapping(MigrationStatus
)
4323 async def Next(self
):
4326 Returns -> typing.Union[int, typing.Sequence<+T_co>[str]]
4328 # map input types to rpc msg
4330 msg
= dict(type='MigrationStatusWatcher', request
='Next', version
=1, params
=_params
)
4332 reply
= await self
.rpc(msg
)
4337 @ReturnMapping(None)
4338 async def Stop(self
):
4343 # map input types to rpc msg
4345 msg
= dict(type='MigrationStatusWatcher', request
='Stop', version
=1, params
=_params
)
4347 reply
= await self
.rpc(msg
)
4352 class MigrationTargetFacade(Type
):
4353 name
= 'MigrationTarget'
4355 schema
= {'definitions': {'AdoptResourcesArgs': {'additionalProperties': False,
4356 'properties': {'model-tag': {'type': 'string'},
4357 'source-controller-version': {'$ref': '#/definitions/Number'}},
4358 'required': ['model-tag',
4359 'source-controller-version'],
4361 'BytesResult': {'additionalProperties': False,
4362 'properties': {'result': {'items': {'type': 'integer'},
4364 'required': ['result'],
4366 'MigrationModelInfo': {'additionalProperties': False,
4367 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
4368 'controller-agent-version': {'$ref': '#/definitions/Number'},
4369 'name': {'type': 'string'},
4370 'owner-tag': {'type': 'string'},
4371 'uuid': {'type': 'string'}},
4372 'required': ['uuid',
4376 'controller-agent-version'],
4378 'ModelArgs': {'additionalProperties': False,
4379 'properties': {'model-tag': {'type': 'string'}},
4380 'required': ['model-tag'],
4382 'Number': {'additionalProperties': False,
4383 'properties': {'Build': {'type': 'integer'},
4384 'Major': {'type': 'integer'},
4385 'Minor': {'type': 'integer'},
4386 'Patch': {'type': 'integer'},
4387 'Tag': {'type': 'string'}},
4388 'required': ['Major',
4394 'SerializedModel': {'additionalProperties': False,
4395 'properties': {'bytes': {'items': {'type': 'integer'},
4397 'charms': {'items': {'type': 'string'},
4399 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
4401 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
4403 'required': ['bytes',
4408 'SerializedModelResource': {'additionalProperties': False,
4409 'properties': {'application': {'type': 'string'},
4410 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
4411 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
4412 'name': {'type': 'string'},
4413 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}},
4415 'required': ['application',
4417 'application-revision',
4418 'charmstore-revision',
4421 'SerializedModelResourceRevision': {'additionalProperties': False,
4422 'properties': {'description': {'type': 'string'},
4423 'fingerprint': {'type': 'string'},
4424 'origin': {'type': 'string'},
4425 'path': {'type': 'string'},
4426 'revision': {'type': 'integer'},
4427 'size': {'type': 'integer'},
4428 'timestamp': {'format': 'date-time',
4430 'type': {'type': 'string'},
4431 'username': {'type': 'string'}},
4432 'required': ['revision',
4441 'SerializedModelTools': {'additionalProperties': False,
4442 'properties': {'uri': {'type': 'string'},
4443 'version': {'type': 'string'}},
4444 'required': ['version', 'uri'],
4446 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
4448 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
4450 'AdoptResources': {'properties': {'Params': {'$ref': '#/definitions/AdoptResourcesArgs'}},
4452 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
4454 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
4456 'LatestLogTime': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'},
4457 'Result': {'format': 'date-time',
4460 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}},
4465 @ReturnMapping(None)
4466 async def Abort(self
, model_tag
):
4471 # map input types to rpc msg
4473 msg
= dict(type='MigrationTarget', request
='Abort', version
=1, params
=_params
)
4474 _params
['model-tag'] = model_tag
4475 reply
= await self
.rpc(msg
)
4480 @ReturnMapping(None)
4481 async def Activate(self
, model_tag
):
4486 # map input types to rpc msg
4488 msg
= dict(type='MigrationTarget', request
='Activate', version
=1, params
=_params
)
4489 _params
['model-tag'] = model_tag
4490 reply
= await self
.rpc(msg
)
4495 @ReturnMapping(None)
4496 async def AdoptResources(self
, model_tag
, source_controller_version
):
4499 source_controller_version : Number
4502 # map input types to rpc msg
4504 msg
= dict(type='MigrationTarget', request
='AdoptResources', version
=1, params
=_params
)
4505 _params
['model-tag'] = model_tag
4506 _params
['source-controller-version'] = source_controller_version
4507 reply
= await self
.rpc(msg
)
4512 @ReturnMapping(BytesResult
)
4513 async def CACert(self
):
4516 Returns -> typing.Sequence<+T_co>[int]
4518 # map input types to rpc msg
4520 msg
= dict(type='MigrationTarget', request
='CACert', version
=1, params
=_params
)
4522 reply
= await self
.rpc(msg
)
4527 @ReturnMapping(None)
4528 async def Import(self
, bytes_
, charms
, tools
):
4530 bytes_ : typing.Sequence<+T_co>[int]
4531 charms : typing.Sequence<+T_co>[str]
4532 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
4535 # map input types to rpc msg
4537 msg
= dict(type='MigrationTarget', request
='Import', version
=1, params
=_params
)
4538 _params
['bytes'] = bytes_
4539 _params
['charms'] = charms
4540 _params
['tools'] = tools
4541 reply
= await self
.rpc(msg
)
4547 async def LatestLogTime(self
, model_tag
):
4552 # map input types to rpc msg
4554 msg
= dict(type='MigrationTarget', request
='LatestLogTime', version
=1, params
=_params
)
4555 _params
['model-tag'] = model_tag
4556 reply
= await self
.rpc(msg
)
4561 @ReturnMapping(None)
4562 async def Prechecks(self
, agent_version
, name
, owner_tag
, uuid
):
4564 agent_version : Number
4570 # map input types to rpc msg
4572 msg
= dict(type='MigrationTarget', request
='Prechecks', version
=1, params
=_params
)
4573 _params
['agent-version'] = agent_version
4574 _params
['name'] = name
4575 _params
['owner-tag'] = owner_tag
4576 _params
['uuid'] = uuid
4577 reply
= await self
.rpc(msg
)
4582 class ModelConfigFacade(Type
):
4583 name
= 'ModelConfig'
4585 schema
= {'definitions': {'ConfigValue': {'additionalProperties': False,
4586 'properties': {'source': {'type': 'string'},
4587 'value': {'additionalProperties': True,
4589 'required': ['value', 'source'],
4591 'Error': {'additionalProperties': False,
4592 'properties': {'code': {'type': 'string'},
4593 'info': {'$ref': '#/definitions/ErrorInfo'},
4594 'message': {'type': 'string'}},
4595 'required': ['message', 'code'],
4597 'ErrorInfo': {'additionalProperties': False,
4598 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4599 'macaroon-path': {'type': 'string'}},
4601 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4602 'ModelConfigResults': {'additionalProperties': False,
4603 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
4605 'required': ['config'],
4607 'ModelSLA': {'additionalProperties': False,
4608 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
4609 'creds': {'items': {'type': 'integer'},
4611 'required': ['ModelSLAInfo', 'creds'],
4613 'ModelSLAInfo': {'additionalProperties': False,
4614 'properties': {'level': {'type': 'string'},
4615 'owner': {'type': 'string'}},
4616 'required': ['level', 'owner'],
4618 'ModelSet': {'additionalProperties': False,
4619 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
4622 'required': ['config'],
4624 'ModelUnset': {'additionalProperties': False,
4625 'properties': {'keys': {'items': {'type': 'string'},
4627 'required': ['keys'],
4629 'StringResult': {'additionalProperties': False,
4630 'properties': {'error': {'$ref': '#/definitions/Error'},
4631 'result': {'type': 'string'}},
4632 'required': ['result'],
4634 'properties': {'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
4636 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
4638 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
4640 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
4642 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
4647 @ReturnMapping(ModelConfigResults
)
4648 async def ModelGet(self
):
4651 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
4653 # map input types to rpc msg
4655 msg
= dict(type='ModelConfig', request
='ModelGet', version
=1, params
=_params
)
4657 reply
= await self
.rpc(msg
)
4662 @ReturnMapping(None)
4663 async def ModelSet(self
, config
):
4665 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4668 # map input types to rpc msg
4670 msg
= dict(type='ModelConfig', request
='ModelSet', version
=1, params
=_params
)
4671 _params
['config'] = config
4672 reply
= await self
.rpc(msg
)
4677 @ReturnMapping(None)
4678 async def ModelUnset(self
, keys
):
4680 keys : typing.Sequence<+T_co>[str]
4683 # map input types to rpc msg
4685 msg
= dict(type='ModelConfig', request
='ModelUnset', version
=1, params
=_params
)
4686 _params
['keys'] = keys
4687 reply
= await self
.rpc(msg
)
4692 @ReturnMapping(StringResult
)
4693 async def SLALevel(self
):
4696 Returns -> typing.Union[_ForwardRef('Error'), str]
4698 # map input types to rpc msg
4700 msg
= dict(type='ModelConfig', request
='SLALevel', version
=1, params
=_params
)
4702 reply
= await self
.rpc(msg
)
4707 @ReturnMapping(None)
4708 async def SetSLALevel(self
, creds
, level
):
4710 creds : typing.Sequence<+T_co>[int]
4714 # map input types to rpc msg
4716 msg
= dict(type='ModelConfig', request
='SetSLALevel', version
=1, params
=_params
)
4717 _params
['creds'] = creds
4718 _params
['level'] = level
4719 reply
= await self
.rpc(msg
)
4724 class NotifyWatcherFacade(Type
):
4725 name
= 'NotifyWatcher'
4727 schema
= {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
4731 @ReturnMapping(None)
4732 async def Next(self
):
4737 # map input types to rpc msg
4739 msg
= dict(type='NotifyWatcher', request
='Next', version
=1, params
=_params
)
4741 reply
= await self
.rpc(msg
)
4746 @ReturnMapping(None)
4747 async def Stop(self
):
4752 # map input types to rpc msg
4754 msg
= dict(type='NotifyWatcher', request
='Stop', version
=1, params
=_params
)
4756 reply
= await self
.rpc(msg
)
4761 class PayloadsFacade(Type
):
4764 schema
= {'definitions': {'Payload': {'additionalProperties': False,
4765 'properties': {'class': {'type': 'string'},
4766 'id': {'type': 'string'},
4767 'labels': {'items': {'type': 'string'},
4769 'machine': {'type': 'string'},
4770 'status': {'type': 'string'},
4771 'type': {'type': 'string'},
4772 'unit': {'type': 'string'}},
4773 'required': ['class',
4781 'PayloadListArgs': {'additionalProperties': False,
4782 'properties': {'patterns': {'items': {'type': 'string'},
4784 'required': ['patterns'],
4786 'PayloadListResults': {'additionalProperties': False,
4787 'properties': {'results': {'items': {'$ref': '#/definitions/Payload'},
4789 'required': ['results'],
4791 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/PayloadListArgs'},
4792 'Result': {'$ref': '#/definitions/PayloadListResults'}},
4797 @ReturnMapping(PayloadListResults
)
4798 async def List(self
, patterns
):
4800 patterns : typing.Sequence<+T_co>[str]
4801 Returns -> typing.Sequence<+T_co>[~Payload]<~Payload>
4803 # map input types to rpc msg
4805 msg
= dict(type='Payloads', request
='List', version
=1, params
=_params
)
4806 _params
['patterns'] = patterns
4807 reply
= await self
.rpc(msg
)
4812 class PayloadsHookContextFacade(Type
):
4813 name
= 'PayloadsHookContext'
4815 schema
= {'definitions': {'Entities': {'additionalProperties': False,
4816 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
4818 'required': ['entities'],
4820 'Entity': {'additionalProperties': False,
4821 'properties': {'tag': {'type': 'string'}},
4822 'required': ['tag'],
4824 'Error': {'additionalProperties': False,
4825 'properties': {'code': {'type': 'string'},
4826 'info': {'$ref': '#/definitions/ErrorInfo'},
4827 'message': {'type': 'string'}},
4828 'required': ['message', 'code'],
4830 'ErrorInfo': {'additionalProperties': False,
4831 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4832 'macaroon-path': {'type': 'string'}},
4834 'LookUpPayloadArg': {'additionalProperties': False,
4835 'properties': {'id': {'type': 'string'},
4836 'name': {'type': 'string'}},
4837 'required': ['name', 'id'],
4839 'LookUpPayloadArgs': {'additionalProperties': False,
4840 'properties': {'args': {'items': {'$ref': '#/definitions/LookUpPayloadArg'},
4842 'required': ['args'],
4844 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4845 'Payload': {'additionalProperties': False,
4846 'properties': {'class': {'type': 'string'},
4847 'id': {'type': 'string'},
4848 'labels': {'items': {'type': 'string'},
4850 'machine': {'type': 'string'},
4851 'status': {'type': 'string'},
4852 'type': {'type': 'string'},
4853 'unit': {'type': 'string'}},
4854 'required': ['class',
4862 'PayloadResult': {'additionalProperties': False,
4863 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
4864 'error': {'$ref': '#/definitions/Error'},
4865 'not-found': {'type': 'boolean'},
4866 'payload': {'$ref': '#/definitions/Payload'}},
4867 'required': ['Entity',
4871 'PayloadResults': {'additionalProperties': False,
4872 'properties': {'results': {'items': {'$ref': '#/definitions/PayloadResult'},
4874 'required': ['results'],
4876 'SetPayloadStatusArg': {'additionalProperties': False,
4877 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
4878 'status': {'type': 'string'}},
4879 'required': ['Entity', 'status'],
4881 'SetPayloadStatusArgs': {'additionalProperties': False,
4882 'properties': {'args': {'items': {'$ref': '#/definitions/SetPayloadStatusArg'},
4884 'required': ['args'],
4886 'TrackPayloadArgs': {'additionalProperties': False,
4887 'properties': {'payloads': {'items': {'$ref': '#/definitions/Payload'},
4889 'required': ['payloads'],
4891 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4892 'Result': {'$ref': '#/definitions/PayloadResults'}},
4894 'LookUp': {'properties': {'Params': {'$ref': '#/definitions/LookUpPayloadArgs'},
4895 'Result': {'$ref': '#/definitions/PayloadResults'}},
4897 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetPayloadStatusArgs'},
4898 'Result': {'$ref': '#/definitions/PayloadResults'}},
4900 'Track': {'properties': {'Params': {'$ref': '#/definitions/TrackPayloadArgs'},
4901 'Result': {'$ref': '#/definitions/PayloadResults'}},
4903 'Untrack': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4904 'Result': {'$ref': '#/definitions/PayloadResults'}},
4909 @ReturnMapping(PayloadResults
)
4910 async def List(self
, entities
):
4912 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4913 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4915 # map input types to rpc msg
4917 msg
= dict(type='PayloadsHookContext', request
='List', version
=1, params
=_params
)
4918 _params
['entities'] = entities
4919 reply
= await self
.rpc(msg
)
4924 @ReturnMapping(PayloadResults
)
4925 async def LookUp(self
, args
):
4927 args : typing.Sequence<+T_co>[~LookUpPayloadArg]<~LookUpPayloadArg>
4928 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4930 # map input types to rpc msg
4932 msg
= dict(type='PayloadsHookContext', request
='LookUp', version
=1, params
=_params
)
4933 _params
['args'] = args
4934 reply
= await self
.rpc(msg
)
4939 @ReturnMapping(PayloadResults
)
4940 async def SetStatus(self
, args
):
4942 args : typing.Sequence<+T_co>[~SetPayloadStatusArg]<~SetPayloadStatusArg>
4943 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4945 # map input types to rpc msg
4947 msg
= dict(type='PayloadsHookContext', request
='SetStatus', version
=1, params
=_params
)
4948 _params
['args'] = args
4949 reply
= await self
.rpc(msg
)
4954 @ReturnMapping(PayloadResults
)
4955 async def Track(self
, payloads
):
4957 payloads : typing.Sequence<+T_co>[~Payload]<~Payload>
4958 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4960 # map input types to rpc msg
4962 msg
= dict(type='PayloadsHookContext', request
='Track', version
=1, params
=_params
)
4963 _params
['payloads'] = payloads
4964 reply
= await self
.rpc(msg
)
4969 @ReturnMapping(PayloadResults
)
4970 async def Untrack(self
, entities
):
4972 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4973 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4975 # map input types to rpc msg
4977 msg
= dict(type='PayloadsHookContext', request
='Untrack', version
=1, params
=_params
)
4978 _params
['entities'] = entities
4979 reply
= await self
.rpc(msg
)
4984 class PingerFacade(Type
):
4987 schema
= {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
4991 @ReturnMapping(None)
4992 async def Ping(self
):
4997 # map input types to rpc msg
4999 msg
= dict(type='Pinger', request
='Ping', version
=1, params
=_params
)
5001 reply
= await self
.rpc(msg
)
5006 @ReturnMapping(None)
5007 async def Stop(self
):
5012 # map input types to rpc msg
5014 msg
= dict(type='Pinger', request
='Stop', version
=1, params
=_params
)
5016 reply
= await self
.rpc(msg
)
5021 class ProxyUpdaterFacade(Type
):
5022 name
= 'ProxyUpdater'
5024 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5025 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5027 'required': ['entities'],
5029 'Entity': {'additionalProperties': False,
5030 'properties': {'tag': {'type': 'string'}},
5031 'required': ['tag'],
5033 'Error': {'additionalProperties': False,
5034 'properties': {'code': {'type': 'string'},
5035 'info': {'$ref': '#/definitions/ErrorInfo'},
5036 'message': {'type': 'string'}},
5037 'required': ['message', 'code'],
5039 'ErrorInfo': {'additionalProperties': False,
5040 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5041 'macaroon-path': {'type': 'string'}},
5043 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5044 'NotifyWatchResult': {'additionalProperties': False,
5045 'properties': {'NotifyWatcherId': {'type': 'string'},
5046 'error': {'$ref': '#/definitions/Error'}},
5047 'required': ['NotifyWatcherId'],
5049 'NotifyWatchResults': {'additionalProperties': False,
5050 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5052 'required': ['results'],
5054 'ProxyConfig': {'additionalProperties': False,
5055 'properties': {'ftp': {'type': 'string'},
5056 'http': {'type': 'string'},
5057 'https': {'type': 'string'},
5058 'no-proxy': {'type': 'string'}},
5059 'required': ['http',
5064 'ProxyConfigResult': {'additionalProperties': False,
5065 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
5066 'error': {'$ref': '#/definitions/Error'},
5067 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}},
5068 'required': ['proxy-settings',
5069 'apt-proxy-settings'],
5071 'ProxyConfigResults': {'additionalProperties': False,
5072 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
5074 'required': ['results'],
5076 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5077 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
5079 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5080 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5085 @ReturnMapping(ProxyConfigResults
)
5086 async def ProxyConfig(self
, entities
):
5088 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5089 Returns -> typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
5091 # map input types to rpc msg
5093 msg
= dict(type='ProxyUpdater', request
='ProxyConfig', version
=1, params
=_params
)
5094 _params
['entities'] = entities
5095 reply
= await self
.rpc(msg
)
5100 @ReturnMapping(NotifyWatchResults
)
5101 async def WatchForProxyConfigAndAPIHostPortChanges(self
, entities
):
5103 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5104 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
5106 # map input types to rpc msg
5108 msg
= dict(type='ProxyUpdater', request
='WatchForProxyConfigAndAPIHostPortChanges', version
=1, params
=_params
)
5109 _params
['entities'] = entities
5110 reply
= await self
.rpc(msg
)
5115 class RelationUnitsWatcherFacade(Type
):
5116 name
= 'RelationUnitsWatcher'
5118 schema
= {'definitions': {'Error': {'additionalProperties': False,
5119 'properties': {'code': {'type': 'string'},
5120 'info': {'$ref': '#/definitions/ErrorInfo'},
5121 'message': {'type': 'string'}},
5122 'required': ['message', 'code'],
5124 'ErrorInfo': {'additionalProperties': False,
5125 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5126 'macaroon-path': {'type': 'string'}},
5128 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5129 'RelationUnitsChange': {'additionalProperties': False,
5130 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
5132 'departed': {'items': {'type': 'string'},
5134 'required': ['changed'],
5136 'RelationUnitsWatchResult': {'additionalProperties': False,
5137 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
5138 'error': {'$ref': '#/definitions/Error'},
5139 'watcher-id': {'type': 'string'}},
5140 'required': ['watcher-id',
5143 'UnitSettings': {'additionalProperties': False,
5144 'properties': {'version': {'type': 'integer'}},
5145 'required': ['version'],
5147 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
5149 'Stop': {'type': 'object'}},
5153 @ReturnMapping(RelationUnitsWatchResult
)
5154 async def Next(self
):
5157 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
5159 # map input types to rpc msg
5161 msg
= dict(type='RelationUnitsWatcher', request
='Next', version
=1, params
=_params
)
5163 reply
= await self
.rpc(msg
)
5168 @ReturnMapping(None)
5169 async def Stop(self
):
5174 # map input types to rpc msg
5176 msg
= dict(type='RelationUnitsWatcher', request
='Stop', version
=1, params
=_params
)
5178 reply
= await self
.rpc(msg
)
5183 class RemoteApplicationWatcherFacade(Type
):
5184 name
= 'RemoteApplicationWatcher'
5186 schema
= {'definitions': {'Error': {'additionalProperties': False,
5187 'properties': {'code': {'type': 'string'},
5188 'info': {'$ref': '#/definitions/ErrorInfo'},
5189 'message': {'type': 'string'}},
5190 'required': ['message', 'code'],
5192 'ErrorInfo': {'additionalProperties': False,
5193 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5194 'macaroon-path': {'type': 'string'}},
5196 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5197 'RemoteApplicationChange': {'additionalProperties': False,
5198 'properties': {'application-tag': {'type': 'string'},
5199 'life': {'type': 'string'},
5200 'relations': {'$ref': '#/definitions/RemoteRelationsChange'}},
5201 'required': ['application-tag',
5205 'RemoteApplicationWatchResult': {'additionalProperties': False,
5206 'properties': {'change': {'$ref': '#/definitions/RemoteApplicationChange'},
5207 'error': {'$ref': '#/definitions/Error'},
5208 'id': {'type': 'string'}},
5211 'RemoteEntityId': {'additionalProperties': False,
5212 'properties': {'model-uuid': {'type': 'string'},
5213 'token': {'type': 'string'}},
5214 'required': ['model-uuid', 'token'],
5216 'RemoteRelationChange': {'additionalProperties': False,
5217 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
5219 'departed-units': {'items': {'type': 'string'},
5221 'id': {'type': 'integer'},
5222 'life': {'type': 'string'}},
5223 'required': ['id', 'life'],
5225 'RemoteRelationUnitChange': {'additionalProperties': False,
5226 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
5229 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
5230 'required': ['unit-id'],
5232 'RemoteRelationsChange': {'additionalProperties': False,
5233 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
5235 'initial': {'type': 'boolean'},
5236 'removed': {'items': {'type': 'integer'},
5238 'required': ['initial'],
5240 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteApplicationWatchResult'}},
5242 'Stop': {'type': 'object'}},
5246 @ReturnMapping(RemoteApplicationWatchResult
)
5247 async def Next(self
):
5250 Returns -> typing.Union[_ForwardRef('RemoteApplicationChange'), _ForwardRef('Error'), str]
5252 # map input types to rpc msg
5254 msg
= dict(type='RemoteApplicationWatcher', request
='Next', version
=1, params
=_params
)
5256 reply
= await self
.rpc(msg
)
5261 @ReturnMapping(None)
5262 async def Stop(self
):
5267 # map input types to rpc msg
5269 msg
= dict(type='RemoteApplicationWatcher', request
='Stop', version
=1, params
=_params
)
5271 reply
= await self
.rpc(msg
)
5276 class RemoteRelationsWatcherFacade(Type
):
5277 name
= 'RemoteRelationsWatcher'
5279 schema
= {'definitions': {'Error': {'additionalProperties': False,
5280 'properties': {'code': {'type': 'string'},
5281 'info': {'$ref': '#/definitions/ErrorInfo'},
5282 'message': {'type': 'string'}},
5283 'required': ['message', 'code'],
5285 'ErrorInfo': {'additionalProperties': False,
5286 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5287 'macaroon-path': {'type': 'string'}},
5289 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5290 'RemoteEntityId': {'additionalProperties': False,
5291 'properties': {'model-uuid': {'type': 'string'},
5292 'token': {'type': 'string'}},
5293 'required': ['model-uuid', 'token'],
5295 'RemoteRelationChange': {'additionalProperties': False,
5296 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
5298 'departed-units': {'items': {'type': 'string'},
5300 'id': {'type': 'integer'},
5301 'life': {'type': 'string'}},
5302 'required': ['id', 'life'],
5304 'RemoteRelationUnitChange': {'additionalProperties': False,
5305 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
5308 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
5309 'required': ['unit-id'],
5311 'RemoteRelationsChange': {'additionalProperties': False,
5312 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
5314 'initial': {'type': 'boolean'},
5315 'removed': {'items': {'type': 'integer'},
5317 'required': ['initial'],
5319 'RemoteRelationsWatchResult': {'additionalProperties': False,
5320 'properties': {'RemoteRelationsWatcherId': {'type': 'string'},
5321 'change': {'$ref': '#/definitions/RemoteRelationsChange'},
5322 'error': {'$ref': '#/definitions/Error'}},
5323 'required': ['RemoteRelationsWatcherId'],
5325 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteRelationsWatchResult'}},
5327 'Stop': {'type': 'object'}},
5331 @ReturnMapping(RemoteRelationsWatchResult
)
5332 async def Next(self
):
5335 Returns -> typing.Union[str, _ForwardRef('RemoteRelationsChange'), _ForwardRef('Error')]
5337 # map input types to rpc msg
5339 msg
= dict(type='RemoteRelationsWatcher', request
='Next', version
=1, params
=_params
)
5341 reply
= await self
.rpc(msg
)
5346 @ReturnMapping(None)
5347 async def Stop(self
):
5352 # map input types to rpc msg
5354 msg
= dict(type='RemoteRelationsWatcher', request
='Stop', version
=1, params
=_params
)
5356 reply
= await self
.rpc(msg
)
5361 class ResourcesFacade(Type
):
5364 schema
= {'definitions': {'AddCharmWithAuthorization': {'additionalProperties': False,
5365 'properties': {'channel': {'type': 'string'},
5366 'macaroon': {'$ref': '#/definitions/Macaroon'},
5367 'url': {'type': 'string'}},
5372 'AddPendingResourcesArgs': {'additionalProperties': False,
5373 'properties': {'AddCharmWithAuthorization': {'$ref': '#/definitions/AddCharmWithAuthorization'},
5374 'Entity': {'$ref': '#/definitions/Entity'},
5375 'resources': {'items': {'$ref': '#/definitions/CharmResource'},
5377 'required': ['Entity',
5378 'AddCharmWithAuthorization',
5381 'AddPendingResourcesResult': {'additionalProperties': False,
5382 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5383 'pending-ids': {'items': {'type': 'string'},
5385 'required': ['ErrorResult',
5388 'CharmResource': {'additionalProperties': False,
5389 'properties': {'description': {'type': 'string'},
5390 'fingerprint': {'items': {'type': 'integer'},
5392 'name': {'type': 'string'},
5393 'origin': {'type': 'string'},
5394 'path': {'type': 'string'},
5395 'revision': {'type': 'integer'},
5396 'size': {'type': 'integer'},
5397 'type': {'type': 'string'}},
5398 'required': ['name',
5406 'Entity': {'additionalProperties': False,
5407 'properties': {'tag': {'type': 'string'}},
5408 'required': ['tag'],
5410 'Error': {'additionalProperties': False,
5411 'properties': {'code': {'type': 'string'},
5412 'info': {'$ref': '#/definitions/ErrorInfo'},
5413 'message': {'type': 'string'}},
5414 'required': ['message', 'code'],
5416 'ErrorInfo': {'additionalProperties': False,
5417 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5418 'macaroon-path': {'type': 'string'}},
5420 'ErrorResult': {'additionalProperties': False,
5421 'properties': {'error': {'$ref': '#/definitions/Error'}},
5423 'ListResourcesArgs': {'additionalProperties': False,
5424 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5426 'required': ['entities'],
5428 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5429 'Resource': {'additionalProperties': False,
5430 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'},
5431 'application': {'type': 'string'},
5432 'id': {'type': 'string'},
5433 'pending-id': {'type': 'string'},
5434 'timestamp': {'format': 'date-time',
5436 'username': {'type': 'string'}},
5437 'required': ['CharmResource',
5444 'ResourcesResult': {'additionalProperties': False,
5445 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5446 'charm-store-resources': {'items': {'$ref': '#/definitions/CharmResource'},
5448 'resources': {'items': {'$ref': '#/definitions/Resource'},
5450 'unit-resources': {'items': {'$ref': '#/definitions/UnitResources'},
5452 'required': ['ErrorResult',
5454 'charm-store-resources',
5457 'ResourcesResults': {'additionalProperties': False,
5458 'properties': {'results': {'items': {'$ref': '#/definitions/ResourcesResult'},
5460 'required': ['results'],
5462 'UnitResources': {'additionalProperties': False,
5463 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
5464 'download-progress': {'patternProperties': {'.*': {'type': 'integer'}},
5466 'resources': {'items': {'$ref': '#/definitions/Resource'},
5468 'required': ['Entity',
5470 'download-progress'],
5472 'properties': {'AddPendingResources': {'properties': {'Params': {'$ref': '#/definitions/AddPendingResourcesArgs'},
5473 'Result': {'$ref': '#/definitions/AddPendingResourcesResult'}},
5475 'ListResources': {'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'},
5476 'Result': {'$ref': '#/definitions/ResourcesResults'}},
5481 @ReturnMapping(AddPendingResourcesResult
)
5482 async def AddPendingResources(self
, addcharmwithauthorization
, entity
, resources
):
5484 addcharmwithauthorization : AddCharmWithAuthorization
5486 resources : typing.Sequence<+T_co>[~CharmResource]<~CharmResource>
5487 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[str]]
5489 # map input types to rpc msg
5491 msg
= dict(type='Resources', request
='AddPendingResources', version
=1, params
=_params
)
5492 _params
['AddCharmWithAuthorization'] = addcharmwithauthorization
5493 _params
['Entity'] = entity
5494 _params
['Resources'] = resources
5495 reply
= await self
.rpc(msg
)
5500 @ReturnMapping(ResourcesResults
)
5501 async def ListResources(self
, entities
):
5503 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5504 Returns -> typing.Sequence<+T_co>[~ResourcesResult]<~ResourcesResult>
5506 # map input types to rpc msg
5508 msg
= dict(type='Resources', request
='ListResources', version
=1, params
=_params
)
5509 _params
['entities'] = entities
5510 reply
= await self
.rpc(msg
)
5515 class ResourcesHookContextFacade(Type
):
5516 name
= 'ResourcesHookContext'
5518 schema
= {'definitions': {'CharmResource': {'additionalProperties': False,
5519 'properties': {'description': {'type': 'string'},
5520 'fingerprint': {'items': {'type': 'integer'},
5522 'name': {'type': 'string'},
5523 'origin': {'type': 'string'},
5524 'path': {'type': 'string'},
5525 'revision': {'type': 'integer'},
5526 'size': {'type': 'integer'},
5527 'type': {'type': 'string'}},
5528 'required': ['name',
5536 'Error': {'additionalProperties': False,
5537 'properties': {'code': {'type': 'string'},
5538 'info': {'$ref': '#/definitions/ErrorInfo'},
5539 'message': {'type': 'string'}},
5540 'required': ['message', 'code'],
5542 'ErrorInfo': {'additionalProperties': False,
5543 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5544 'macaroon-path': {'type': 'string'}},
5546 'ErrorResult': {'additionalProperties': False,
5547 'properties': {'error': {'$ref': '#/definitions/Error'}},
5549 'ListUnitResourcesArgs': {'additionalProperties': False,
5550 'properties': {'resource-names': {'items': {'type': 'string'},
5552 'required': ['resource-names'],
5554 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5555 'Resource': {'additionalProperties': False,
5556 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'},
5557 'application': {'type': 'string'},
5558 'id': {'type': 'string'},
5559 'pending-id': {'type': 'string'},
5560 'timestamp': {'format': 'date-time',
5562 'username': {'type': 'string'}},
5563 'required': ['CharmResource',
5570 'UnitResourceResult': {'additionalProperties': False,
5571 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5572 'resource': {'$ref': '#/definitions/Resource'}},
5573 'required': ['ErrorResult', 'resource'],
5575 'UnitResourcesResult': {'additionalProperties': False,
5576 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5577 'resources': {'items': {'$ref': '#/definitions/UnitResourceResult'},
5579 'required': ['ErrorResult',
5582 'properties': {'GetResourceInfo': {'properties': {'Params': {'$ref': '#/definitions/ListUnitResourcesArgs'},
5583 'Result': {'$ref': '#/definitions/UnitResourcesResult'}},
5588 @ReturnMapping(UnitResourcesResult
)
5589 async def GetResourceInfo(self
, resource_names
):
5591 resource_names : typing.Sequence<+T_co>[str]
5592 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[~UnitResourceResult]<~UnitResourceResult>]
5594 # map input types to rpc msg
5596 msg
= dict(type='ResourcesHookContext', request
='GetResourceInfo', version
=1, params
=_params
)
5597 _params
['resource-names'] = resource_names
5598 reply
= await self
.rpc(msg
)
5603 class RetryStrategyFacade(Type
):
5604 name
= 'RetryStrategy'
5606 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5607 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5609 'required': ['entities'],
5611 'Entity': {'additionalProperties': False,
5612 'properties': {'tag': {'type': 'string'}},
5613 'required': ['tag'],
5615 'Error': {'additionalProperties': False,
5616 'properties': {'code': {'type': 'string'},
5617 'info': {'$ref': '#/definitions/ErrorInfo'},
5618 'message': {'type': 'string'}},
5619 'required': ['message', 'code'],
5621 'ErrorInfo': {'additionalProperties': False,
5622 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5623 'macaroon-path': {'type': 'string'}},
5625 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5626 'NotifyWatchResult': {'additionalProperties': False,
5627 'properties': {'NotifyWatcherId': {'type': 'string'},
5628 'error': {'$ref': '#/definitions/Error'}},
5629 'required': ['NotifyWatcherId'],
5631 'NotifyWatchResults': {'additionalProperties': False,
5632 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5634 'required': ['results'],
5636 'RetryStrategy': {'additionalProperties': False,
5637 'properties': {'jitter-retry-time': {'type': 'boolean'},
5638 'max-retry-time': {'type': 'integer'},
5639 'min-retry-time': {'type': 'integer'},
5640 'retry-time-factor': {'type': 'integer'},
5641 'should-retry': {'type': 'boolean'}},
5642 'required': ['should-retry',
5645 'jitter-retry-time',
5646 'retry-time-factor'],
5648 'RetryStrategyResult': {'additionalProperties': False,
5649 'properties': {'error': {'$ref': '#/definitions/Error'},
5650 'result': {'$ref': '#/definitions/RetryStrategy'}},
5652 'RetryStrategyResults': {'additionalProperties': False,
5653 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
5655 'required': ['results'],
5657 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5658 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
5660 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5661 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5666 @ReturnMapping(RetryStrategyResults
)
5667 async def RetryStrategy(self
, entities
):
5669 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5670 Returns -> typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
5672 # map input types to rpc msg
5674 msg
= dict(type='RetryStrategy', request
='RetryStrategy', version
=1, params
=_params
)
5675 _params
['entities'] = entities
5676 reply
= await self
.rpc(msg
)
5681 @ReturnMapping(NotifyWatchResults
)
5682 async def WatchRetryStrategy(self
, entities
):
5684 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5685 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
5687 # map input types to rpc msg
5689 msg
= dict(type='RetryStrategy', request
='WatchRetryStrategy', version
=1, params
=_params
)
5690 _params
['entities'] = entities
5691 reply
= await self
.rpc(msg
)
5696 class SSHClientFacade(Type
):
5699 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5700 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5702 'required': ['entities'],
5704 'Entity': {'additionalProperties': False,
5705 'properties': {'tag': {'type': 'string'}},
5706 'required': ['tag'],
5708 'Error': {'additionalProperties': False,
5709 'properties': {'code': {'type': 'string'},
5710 'info': {'$ref': '#/definitions/ErrorInfo'},
5711 'message': {'type': 'string'}},
5712 'required': ['message', 'code'],
5714 'ErrorInfo': {'additionalProperties': False,
5715 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5716 'macaroon-path': {'type': 'string'}},
5718 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5719 'SSHAddressResult': {'additionalProperties': False,
5720 'properties': {'address': {'type': 'string'},
5721 'error': {'$ref': '#/definitions/Error'}},
5723 'SSHAddressResults': {'additionalProperties': False,
5724 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
5726 'required': ['results'],
5728 'SSHProxyResult': {'additionalProperties': False,
5729 'properties': {'use-proxy': {'type': 'boolean'}},
5730 'required': ['use-proxy'],
5732 'SSHPublicKeysResult': {'additionalProperties': False,
5733 'properties': {'error': {'$ref': '#/definitions/Error'},
5734 'public-keys': {'items': {'type': 'string'},
5737 'SSHPublicKeysResults': {'additionalProperties': False,
5738 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
5740 'required': ['results'],
5742 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5743 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
5745 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
5747 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5748 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
5750 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5751 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
5756 @ReturnMapping(SSHAddressResults
)
5757 async def PrivateAddress(self
, entities
):
5759 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5760 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
5762 # map input types to rpc msg
5764 msg
= dict(type='SSHClient', request
='PrivateAddress', version
=1, params
=_params
)
5765 _params
['entities'] = entities
5766 reply
= await self
.rpc(msg
)
5771 @ReturnMapping(SSHProxyResult
)
5772 async def Proxy(self
):
5777 # map input types to rpc msg
5779 msg
= dict(type='SSHClient', request
='Proxy', version
=1, params
=_params
)
5781 reply
= await self
.rpc(msg
)
5786 @ReturnMapping(SSHAddressResults
)
5787 async def PublicAddress(self
, entities
):
5789 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5790 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
5792 # map input types to rpc msg
5794 msg
= dict(type='SSHClient', request
='PublicAddress', version
=1, params
=_params
)
5795 _params
['entities'] = entities
5796 reply
= await self
.rpc(msg
)
5801 @ReturnMapping(SSHPublicKeysResults
)
5802 async def PublicKeys(self
, entities
):
5804 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5805 Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
5807 # map input types to rpc msg
5809 msg
= dict(type='SSHClient', request
='PublicKeys', version
=1, params
=_params
)
5810 _params
['entities'] = entities
5811 reply
= await self
.rpc(msg
)
5816 class SingularFacade(Type
):
5819 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5820 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5822 'required': ['entities'],
5824 'Entity': {'additionalProperties': False,
5825 'properties': {'tag': {'type': 'string'}},
5826 'required': ['tag'],
5828 'Error': {'additionalProperties': False,
5829 'properties': {'code': {'type': 'string'},
5830 'info': {'$ref': '#/definitions/ErrorInfo'},
5831 'message': {'type': 'string'}},
5832 'required': ['message', 'code'],
5834 'ErrorInfo': {'additionalProperties': False,
5835 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5836 'macaroon-path': {'type': 'string'}},
5838 'ErrorResult': {'additionalProperties': False,
5839 'properties': {'error': {'$ref': '#/definitions/Error'}},
5841 'ErrorResults': {'additionalProperties': False,
5842 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5844 'required': ['results'],
5846 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5847 'SingularClaim': {'additionalProperties': False,
5848 'properties': {'controller-tag': {'type': 'string'},
5849 'duration': {'type': 'integer'},
5850 'model-tag': {'type': 'string'}},
5851 'required': ['model-tag',
5855 'SingularClaims': {'additionalProperties': False,
5856 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
5858 'required': ['claims'],
5860 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
5861 'Result': {'$ref': '#/definitions/ErrorResults'}},
5863 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5864 'Result': {'$ref': '#/definitions/ErrorResults'}},
5869 @ReturnMapping(ErrorResults
)
5870 async def Claim(self
, claims
):
5872 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
5873 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
5875 # map input types to rpc msg
5877 msg
= dict(type='Singular', request
='Claim', version
=1, params
=_params
)
5878 _params
['claims'] = claims
5879 reply
= await self
.rpc(msg
)
5884 @ReturnMapping(ErrorResults
)
5885 async def Wait(self
, entities
):
5887 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5888 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
5890 # map input types to rpc msg
5892 msg
= dict(type='Singular', request
='Wait', version
=1, params
=_params
)
5893 _params
['entities'] = entities
5894 reply
= await self
.rpc(msg
)
5899 class StringsWatcherFacade(Type
):
5900 name
= 'StringsWatcher'
5902 schema
= {'definitions': {'Error': {'additionalProperties': False,
5903 'properties': {'code': {'type': 'string'},
5904 'info': {'$ref': '#/definitions/ErrorInfo'},
5905 'message': {'type': 'string'}},
5906 'required': ['message', 'code'],
5908 'ErrorInfo': {'additionalProperties': False,
5909 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5910 'macaroon-path': {'type': 'string'}},
5912 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5913 'StringsWatchResult': {'additionalProperties': False,
5914 'properties': {'changes': {'items': {'type': 'string'},
5916 'error': {'$ref': '#/definitions/Error'},
5917 'watcher-id': {'type': 'string'}},
5918 'required': ['watcher-id'],
5920 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
5922 'Stop': {'type': 'object'}},
5926 @ReturnMapping(StringsWatchResult
)
5927 async def Next(self
):
5930 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
5932 # map input types to rpc msg
5934 msg
= dict(type='StringsWatcher', request
='Next', version
=1, params
=_params
)
5936 reply
= await self
.rpc(msg
)
5941 @ReturnMapping(None)
5942 async def Stop(self
):
5947 # map input types to rpc msg
5949 msg
= dict(type='StringsWatcher', request
='Stop', version
=1, params
=_params
)
5951 reply
= await self
.rpc(msg
)
5956 class UndertakerFacade(Type
):
5959 schema
= {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
5960 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
5963 'info': {'type': 'string'},
5964 'status': {'type': 'string'},
5965 'tag': {'type': 'string'}},
5971 'Error': {'additionalProperties': False,
5972 'properties': {'code': {'type': 'string'},
5973 'info': {'$ref': '#/definitions/ErrorInfo'},
5974 'message': {'type': 'string'}},
5975 'required': ['message', 'code'],
5977 'ErrorInfo': {'additionalProperties': False,
5978 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5979 'macaroon-path': {'type': 'string'}},
5981 'ErrorResult': {'additionalProperties': False,
5982 'properties': {'error': {'$ref': '#/definitions/Error'}},
5984 'ErrorResults': {'additionalProperties': False,
5985 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5987 'required': ['results'],
5989 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5990 'ModelConfigResult': {'additionalProperties': False,
5991 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
5994 'required': ['config'],
5996 'NotifyWatchResult': {'additionalProperties': False,
5997 'properties': {'NotifyWatcherId': {'type': 'string'},
5998 'error': {'$ref': '#/definitions/Error'}},
5999 'required': ['NotifyWatcherId'],
6001 'NotifyWatchResults': {'additionalProperties': False,
6002 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6004 'required': ['results'],
6006 'SetStatus': {'additionalProperties': False,
6007 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
6009 'required': ['entities'],
6011 'UndertakerModelInfo': {'additionalProperties': False,
6012 'properties': {'global-name': {'type': 'string'},
6013 'is-system': {'type': 'boolean'},
6014 'life': {'type': 'string'},
6015 'name': {'type': 'string'},
6016 'uuid': {'type': 'string'}},
6017 'required': ['uuid',
6023 'UndertakerModelInfoResult': {'additionalProperties': False,
6024 'properties': {'error': {'$ref': '#/definitions/Error'},
6025 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
6026 'required': ['result'],
6028 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6030 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
6032 'ProcessDyingModel': {'type': 'object'},
6033 'RemoveModel': {'type': 'object'},
6034 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6035 'Result': {'$ref': '#/definitions/ErrorResults'}},
6037 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6038 'Result': {'$ref': '#/definitions/ErrorResults'}},
6040 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6045 @ReturnMapping(ModelConfigResult
)
6046 async def ModelConfig(self
):
6049 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
6051 # map input types to rpc msg
6053 msg
= dict(type='Undertaker', request
='ModelConfig', version
=1, params
=_params
)
6055 reply
= await self
.rpc(msg
)
6060 @ReturnMapping(UndertakerModelInfoResult
)
6061 async def ModelInfo(self
):
6064 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
6066 # map input types to rpc msg
6068 msg
= dict(type='Undertaker', request
='ModelInfo', version
=1, params
=_params
)
6070 reply
= await self
.rpc(msg
)
6075 @ReturnMapping(None)
6076 async def ProcessDyingModel(self
):
6081 # map input types to rpc msg
6083 msg
= dict(type='Undertaker', request
='ProcessDyingModel', version
=1, params
=_params
)
6085 reply
= await self
.rpc(msg
)
6090 @ReturnMapping(None)
6091 async def RemoveModel(self
):
6096 # map input types to rpc msg
6098 msg
= dict(type='Undertaker', request
='RemoveModel', version
=1, params
=_params
)
6100 reply
= await self
.rpc(msg
)
6105 @ReturnMapping(ErrorResults
)
6106 async def SetStatus(self
, entities
):
6108 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
6109 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6111 # map input types to rpc msg
6113 msg
= dict(type='Undertaker', request
='SetStatus', version
=1, params
=_params
)
6114 _params
['entities'] = entities
6115 reply
= await self
.rpc(msg
)
6120 @ReturnMapping(ErrorResults
)
6121 async def UpdateStatus(self
, entities
):
6123 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
6124 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6126 # map input types to rpc msg
6128 msg
= dict(type='Undertaker', request
='UpdateStatus', version
=1, params
=_params
)
6129 _params
['entities'] = entities
6130 reply
= await self
.rpc(msg
)
6135 @ReturnMapping(NotifyWatchResults
)
6136 async def WatchModelResources(self
):
6139 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
6141 # map input types to rpc msg
6143 msg
= dict(type='Undertaker', request
='WatchModelResources', version
=1, params
=_params
)
6145 reply
= await self
.rpc(msg
)
6150 class UnitAssignerFacade(Type
):
6151 name
= 'UnitAssigner'
6153 schema
= {'definitions': {'Entities': {'additionalProperties': False,
6154 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6156 'required': ['entities'],
6158 'Entity': {'additionalProperties': False,
6159 'properties': {'tag': {'type': 'string'}},
6160 'required': ['tag'],
6162 'EntityStatusArgs': {'additionalProperties': False,
6163 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
6166 'info': {'type': 'string'},
6167 'status': {'type': 'string'},
6168 'tag': {'type': 'string'}},
6174 'Error': {'additionalProperties': False,
6175 'properties': {'code': {'type': 'string'},
6176 'info': {'$ref': '#/definitions/ErrorInfo'},
6177 'message': {'type': 'string'}},
6178 'required': ['message', 'code'],
6180 'ErrorInfo': {'additionalProperties': False,
6181 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6182 'macaroon-path': {'type': 'string'}},
6184 'ErrorResult': {'additionalProperties': False,
6185 'properties': {'error': {'$ref': '#/definitions/Error'}},
6187 'ErrorResults': {'additionalProperties': False,
6188 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6190 'required': ['results'],
6192 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6193 'SetStatus': {'additionalProperties': False,
6194 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
6196 'required': ['entities'],
6198 'StringsWatchResult': {'additionalProperties': False,
6199 'properties': {'changes': {'items': {'type': 'string'},
6201 'error': {'$ref': '#/definitions/Error'},
6202 'watcher-id': {'type': 'string'}},
6203 'required': ['watcher-id'],
6205 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6206 'Result': {'$ref': '#/definitions/ErrorResults'}},
6208 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6209 'Result': {'$ref': '#/definitions/ErrorResults'}},
6211 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
6216 @ReturnMapping(ErrorResults
)
6217 async def AssignUnits(self
, entities
):
6219 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6220 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6222 # map input types to rpc msg
6224 msg
= dict(type='UnitAssigner', request
='AssignUnits', version
=1, params
=_params
)
6225 _params
['entities'] = entities
6226 reply
= await self
.rpc(msg
)
6231 @ReturnMapping(ErrorResults
)
6232 async def SetAgentStatus(self
, entities
):
6234 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
6235 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6237 # map input types to rpc msg
6239 msg
= dict(type='UnitAssigner', request
='SetAgentStatus', version
=1, params
=_params
)
6240 _params
['entities'] = entities
6241 reply
= await self
.rpc(msg
)
6246 @ReturnMapping(StringsWatchResult
)
6247 async def WatchUnitAssignments(self
):
6250 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
6252 # map input types to rpc msg
6254 msg
= dict(type='UnitAssigner', request
='WatchUnitAssignments', version
=1, params
=_params
)
6256 reply
= await self
.rpc(msg
)
6261 class UpgraderFacade(Type
):
6264 schema
= {'definitions': {'Binary': {'additionalProperties': False,
6265 'properties': {'Arch': {'type': 'string'},
6266 'Number': {'$ref': '#/definitions/Number'},
6267 'Series': {'type': 'string'}},
6268 'required': ['Number', 'Series', 'Arch'],
6270 'Entities': {'additionalProperties': False,
6271 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6273 'required': ['entities'],
6275 'EntitiesVersion': {'additionalProperties': False,
6276 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
6278 'required': ['agent-tools'],
6280 'Entity': {'additionalProperties': False,
6281 'properties': {'tag': {'type': 'string'}},
6282 'required': ['tag'],
6284 'EntityVersion': {'additionalProperties': False,
6285 'properties': {'tag': {'type': 'string'},
6286 'tools': {'$ref': '#/definitions/Version'}},
6287 'required': ['tag', 'tools'],
6289 'Error': {'additionalProperties': False,
6290 'properties': {'code': {'type': 'string'},
6291 'info': {'$ref': '#/definitions/ErrorInfo'},
6292 'message': {'type': 'string'}},
6293 'required': ['message', 'code'],
6295 'ErrorInfo': {'additionalProperties': False,
6296 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6297 'macaroon-path': {'type': 'string'}},
6299 'ErrorResult': {'additionalProperties': False,
6300 'properties': {'error': {'$ref': '#/definitions/Error'}},
6302 'ErrorResults': {'additionalProperties': False,
6303 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6305 'required': ['results'],
6307 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6308 'NotifyWatchResult': {'additionalProperties': False,
6309 'properties': {'NotifyWatcherId': {'type': 'string'},
6310 'error': {'$ref': '#/definitions/Error'}},
6311 'required': ['NotifyWatcherId'],
6313 'NotifyWatchResults': {'additionalProperties': False,
6314 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6316 'required': ['results'],
6318 'Number': {'additionalProperties': False,
6319 'properties': {'Build': {'type': 'integer'},
6320 'Major': {'type': 'integer'},
6321 'Minor': {'type': 'integer'},
6322 'Patch': {'type': 'integer'},
6323 'Tag': {'type': 'string'}},
6324 'required': ['Major',
6330 'Tools': {'additionalProperties': False,
6331 'properties': {'sha256': {'type': 'string'},
6332 'size': {'type': 'integer'},
6333 'url': {'type': 'string'},
6334 'version': {'$ref': '#/definitions/Binary'}},
6335 'required': ['version', 'url', 'size'],
6337 'ToolsResult': {'additionalProperties': False,
6338 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
6339 'error': {'$ref': '#/definitions/Error'},
6340 'tools': {'items': {'$ref': '#/definitions/Tools'},
6342 'required': ['tools',
6343 'disable-ssl-hostname-verification'],
6345 'ToolsResults': {'additionalProperties': False,
6346 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
6348 'required': ['results'],
6350 'Version': {'additionalProperties': False,
6351 'properties': {'version': {'$ref': '#/definitions/Binary'}},
6352 'required': ['version'],
6354 'VersionResult': {'additionalProperties': False,
6355 'properties': {'error': {'$ref': '#/definitions/Error'},
6356 'version': {'$ref': '#/definitions/Number'}},
6358 'VersionResults': {'additionalProperties': False,
6359 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
6361 'required': ['results'],
6363 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6364 'Result': {'$ref': '#/definitions/VersionResults'}},
6366 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
6367 'Result': {'$ref': '#/definitions/ErrorResults'}},
6369 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6370 'Result': {'$ref': '#/definitions/ToolsResults'}},
6372 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6373 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6378 @ReturnMapping(VersionResults
)
6379 async def DesiredVersion(self
, entities
):
6381 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6382 Returns -> typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
6384 # map input types to rpc msg
6386 msg
= dict(type='Upgrader', request
='DesiredVersion', version
=1, params
=_params
)
6387 _params
['entities'] = entities
6388 reply
= await self
.rpc(msg
)
6393 @ReturnMapping(ErrorResults
)
6394 async def SetTools(self
, agent_tools
):
6396 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
6397 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6399 # map input types to rpc msg
6401 msg
= dict(type='Upgrader', request
='SetTools', version
=1, params
=_params
)
6402 _params
['agent-tools'] = agent_tools
6403 reply
= await self
.rpc(msg
)
6408 @ReturnMapping(ToolsResults
)
6409 async def Tools(self
, entities
):
6411 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6412 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
6414 # map input types to rpc msg
6416 msg
= dict(type='Upgrader', request
='Tools', version
=1, params
=_params
)
6417 _params
['entities'] = entities
6418 reply
= await self
.rpc(msg
)
6423 @ReturnMapping(NotifyWatchResults
)
6424 async def WatchAPIVersion(self
, entities
):
6426 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6427 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
6429 # map input types to rpc msg
6431 msg
= dict(type='Upgrader', request
='WatchAPIVersion', version
=1, params
=_params
)
6432 _params
['entities'] = entities
6433 reply
= await self
.rpc(msg
)
6438 class UserManagerFacade(Type
):
6439 name
= 'UserManager'
6441 schema
= {'definitions': {'AddUser': {'additionalProperties': False,
6442 'properties': {'display-name': {'type': 'string'},
6443 'password': {'type': 'string'},
6444 'username': {'type': 'string'}},
6445 'required': ['username', 'display-name'],
6447 'AddUserResult': {'additionalProperties': False,
6448 'properties': {'error': {'$ref': '#/definitions/Error'},
6449 'secret-key': {'items': {'type': 'integer'},
6451 'tag': {'type': 'string'}},
6453 'AddUserResults': {'additionalProperties': False,
6454 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
6456 'required': ['results'],
6458 'AddUsers': {'additionalProperties': False,
6459 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
6461 'required': ['users'],
6463 'Entities': {'additionalProperties': False,
6464 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6466 'required': ['entities'],
6468 'Entity': {'additionalProperties': False,
6469 'properties': {'tag': {'type': 'string'}},
6470 'required': ['tag'],
6472 'EntityPassword': {'additionalProperties': False,
6473 'properties': {'password': {'type': 'string'},
6474 'tag': {'type': 'string'}},
6475 'required': ['tag', 'password'],
6477 'EntityPasswords': {'additionalProperties': False,
6478 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
6480 'required': ['changes'],
6482 'Error': {'additionalProperties': False,
6483 'properties': {'code': {'type': 'string'},
6484 'info': {'$ref': '#/definitions/ErrorInfo'},
6485 'message': {'type': 'string'}},
6486 'required': ['message', 'code'],
6488 'ErrorInfo': {'additionalProperties': False,
6489 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6490 'macaroon-path': {'type': 'string'}},
6492 'ErrorResult': {'additionalProperties': False,
6493 'properties': {'error': {'$ref': '#/definitions/Error'}},
6495 'ErrorResults': {'additionalProperties': False,
6496 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6498 'required': ['results'],
6500 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6501 'UserInfo': {'additionalProperties': False,
6502 'properties': {'access': {'type': 'string'},
6503 'created-by': {'type': 'string'},
6504 'date-created': {'format': 'date-time',
6506 'disabled': {'type': 'boolean'},
6507 'display-name': {'type': 'string'},
6508 'last-connection': {'format': 'date-time',
6510 'username': {'type': 'string'}},
6511 'required': ['username',
6518 'UserInfoRequest': {'additionalProperties': False,
6519 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6521 'include-disabled': {'type': 'boolean'}},
6522 'required': ['entities',
6523 'include-disabled'],
6525 'UserInfoResult': {'additionalProperties': False,
6526 'properties': {'error': {'$ref': '#/definitions/Error'},
6527 'result': {'$ref': '#/definitions/UserInfo'}},
6529 'UserInfoResults': {'additionalProperties': False,
6530 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
6532 'required': ['results'],
6534 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
6535 'Result': {'$ref': '#/definitions/AddUserResults'}},
6537 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6538 'Result': {'$ref': '#/definitions/ErrorResults'}},
6540 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6541 'Result': {'$ref': '#/definitions/ErrorResults'}},
6543 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6544 'Result': {'$ref': '#/definitions/ErrorResults'}},
6546 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6547 'Result': {'$ref': '#/definitions/ErrorResults'}},
6549 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
6550 'Result': {'$ref': '#/definitions/UserInfoResults'}},
6555 @ReturnMapping(AddUserResults
)
6556 async def AddUser(self
, users
):
6558 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
6559 Returns -> typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
6561 # map input types to rpc msg
6563 msg
= dict(type='UserManager', request
='AddUser', version
=1, params
=_params
)
6564 _params
['users'] = users
6565 reply
= await self
.rpc(msg
)
6570 @ReturnMapping(ErrorResults
)
6571 async def DisableUser(self
, entities
):
6573 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6574 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6576 # map input types to rpc msg
6578 msg
= dict(type='UserManager', request
='DisableUser', version
=1, params
=_params
)
6579 _params
['entities'] = entities
6580 reply
= await self
.rpc(msg
)
6585 @ReturnMapping(ErrorResults
)
6586 async def EnableUser(self
, entities
):
6588 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6589 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6591 # map input types to rpc msg
6593 msg
= dict(type='UserManager', request
='EnableUser', version
=1, params
=_params
)
6594 _params
['entities'] = entities
6595 reply
= await self
.rpc(msg
)
6600 @ReturnMapping(ErrorResults
)
6601 async def RemoveUser(self
, entities
):
6603 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6604 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6606 # map input types to rpc msg
6608 msg
= dict(type='UserManager', request
='RemoveUser', version
=1, params
=_params
)
6609 _params
['entities'] = entities
6610 reply
= await self
.rpc(msg
)
6615 @ReturnMapping(ErrorResults
)
6616 async def SetPassword(self
, changes
):
6618 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
6619 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6621 # map input types to rpc msg
6623 msg
= dict(type='UserManager', request
='SetPassword', version
=1, params
=_params
)
6624 _params
['changes'] = changes
6625 reply
= await self
.rpc(msg
)
6630 @ReturnMapping(UserInfoResults
)
6631 async def UserInfo(self
, entities
, include_disabled
):
6633 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6634 include_disabled : bool
6635 Returns -> typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
6637 # map input types to rpc msg
6639 msg
= dict(type='UserManager', request
='UserInfo', version
=1, params
=_params
)
6640 _params
['entities'] = entities
6641 _params
['include-disabled'] = include_disabled
6642 reply
= await self
.rpc(msg
)