1 # DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py.
2 # Changes will be overwritten/lost when the file is regenerated.
4 from juju
.client
.facade
import Type
, ReturnMapping
5 from juju
.client
._definitions
import *
8 class 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 'ConfigValue': {'additionalProperties': False,
612 'properties': {'source': {'type': 'string'},
613 'value': {'additionalProperties': True,
615 'required': ['value', 'source'],
617 'Constraints': {'additionalProperties': False,
618 'properties': {'Count': {'type': 'integer'},
619 'Pool': {'type': 'string'},
620 'Size': {'type': 'integer'}},
621 'required': ['Pool', 'Size', 'Count'],
623 'DestroyMachines': {'additionalProperties': False,
624 'properties': {'force': {'type': 'boolean'},
625 'machine-names': {'items': {'type': 'string'},
627 'required': ['machine-names', 'force'],
629 'DetailedStatus': {'additionalProperties': False,
630 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
633 'err': {'additionalProperties': True,
635 'info': {'type': 'string'},
636 'kind': {'type': 'string'},
637 'life': {'type': 'string'},
638 'since': {'format': 'date-time',
640 'status': {'type': 'string'},
641 'version': {'type': 'string'}},
642 'required': ['status',
650 'EndpointStatus': {'additionalProperties': False,
651 'properties': {'application': {'type': 'string'},
652 'name': {'type': 'string'},
653 'role': {'type': 'string'},
654 'subordinate': {'type': 'boolean'}},
655 'required': ['application',
660 'Entities': {'additionalProperties': False,
661 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
663 'required': ['entities'],
665 'Entity': {'additionalProperties': False,
666 'properties': {'tag': {'type': 'string'}},
669 'EntityStatus': {'additionalProperties': False,
670 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
673 'info': {'type': 'string'},
674 'since': {'format': 'date-time',
676 'status': {'type': 'string'}},
677 'required': ['status', 'info', 'since'],
679 'Error': {'additionalProperties': False,
680 'properties': {'code': {'type': 'string'},
681 'info': {'$ref': '#/definitions/ErrorInfo'},
682 'message': {'type': 'string'}},
683 'required': ['message', 'code'],
685 'ErrorInfo': {'additionalProperties': False,
686 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
687 'macaroon-path': {'type': 'string'}},
689 'ErrorResult': {'additionalProperties': False,
690 'properties': {'error': {'$ref': '#/definitions/Error'}},
692 'ErrorResults': {'additionalProperties': False,
693 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
695 'required': ['results'],
697 'FindToolsParams': {'additionalProperties': False,
698 'properties': {'arch': {'type': 'string'},
699 'major': {'type': 'integer'},
700 'minor': {'type': 'integer'},
701 'number': {'$ref': '#/definitions/Number'},
702 'series': {'type': 'string'}},
703 'required': ['number',
709 'FindToolsResult': {'additionalProperties': False,
710 'properties': {'error': {'$ref': '#/definitions/Error'},
711 'list': {'items': {'$ref': '#/definitions/Tools'},
713 'required': ['list'],
715 'FullStatus': {'additionalProperties': False,
716 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
718 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
720 'model': {'$ref': '#/definitions/ModelStatusInfo'},
721 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
723 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}},
725 'required': ['model',
728 'remote-applications',
731 'GetConstraintsResults': {'additionalProperties': False,
732 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
733 'required': ['constraints'],
735 'HardwareCharacteristics': {'additionalProperties': False,
736 'properties': {'arch': {'type': 'string'},
737 'availability-zone': {'type': 'string'},
738 'cpu-cores': {'type': 'integer'},
739 'cpu-power': {'type': 'integer'},
740 'mem': {'type': 'integer'},
741 'root-disk': {'type': 'integer'},
742 'tags': {'items': {'type': 'string'},
745 'History': {'additionalProperties': False,
746 'properties': {'error': {'$ref': '#/definitions/Error'},
747 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
749 'required': ['statuses'],
751 'HostPort': {'additionalProperties': False,
752 'properties': {'Address': {'$ref': '#/definitions/Address'},
753 'port': {'type': 'integer'}},
754 'required': ['Address', 'port'],
756 'Macaroon': {'additionalProperties': False, 'type': 'object'},
757 'MachineHardware': {'additionalProperties': False,
758 'properties': {'arch': {'type': 'string'},
759 'availability-zone': {'type': 'string'},
760 'cores': {'type': 'integer'},
761 'cpu-power': {'type': 'integer'},
762 'mem': {'type': 'integer'},
763 'root-disk': {'type': 'integer'},
764 'tags': {'items': {'type': 'string'},
767 'MachineStatus': {'additionalProperties': False,
768 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
769 'constraints': {'type': 'string'},
770 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
772 'dns-name': {'type': 'string'},
773 'hardware': {'type': 'string'},
774 'has-vote': {'type': 'boolean'},
775 'id': {'type': 'string'},
776 'instance-id': {'type': 'string'},
777 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
778 'ip-addresses': {'items': {'type': 'string'},
780 'jobs': {'items': {'type': 'string'},
782 'network-interfaces': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInterface'}},
784 'series': {'type': 'string'},
785 'wants-vote': {'type': 'boolean'}},
786 'required': ['agent-status',
799 'MeterStatus': {'additionalProperties': False,
800 'properties': {'color': {'type': 'string'},
801 'message': {'type': 'string'}},
802 'required': ['color', 'message'],
804 'ModelConfigResults': {'additionalProperties': False,
805 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
807 'required': ['config'],
809 'ModelInfo': {'additionalProperties': False,
810 'properties': {'cloud-credential-tag': {'type': 'string'},
811 'cloud-region': {'type': 'string'},
812 'cloud-tag': {'type': 'string'},
813 'controller-uuid': {'type': 'string'},
814 'default-series': {'type': 'string'},
815 'life': {'type': 'string'},
816 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
818 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
819 'name': {'type': 'string'},
820 'owner-tag': {'type': 'string'},
821 'provider-type': {'type': 'string'},
822 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
823 'status': {'$ref': '#/definitions/EntityStatus'},
824 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
826 'uuid': {'type': 'string'}},
840 'ModelMachineInfo': {'additionalProperties': False,
841 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
842 'has-vote': {'type': 'boolean'},
843 'id': {'type': 'string'},
844 'instance-id': {'type': 'string'},
845 'status': {'type': 'string'},
846 'wants-vote': {'type': 'boolean'}},
849 'ModelMigrationStatus': {'additionalProperties': False,
850 'properties': {'end': {'format': 'date-time',
852 'start': {'format': 'date-time',
854 'status': {'type': 'string'}},
855 'required': ['status', 'start'],
857 'ModelSLA': {'additionalProperties': False,
858 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
859 'creds': {'items': {'type': 'integer'},
861 'required': ['ModelSLAInfo', 'creds'],
863 'ModelSLAInfo': {'additionalProperties': False,
864 'properties': {'level': {'type': 'string'},
865 'owner': {'type': 'string'}},
866 'required': ['level', 'owner'],
868 'ModelSet': {'additionalProperties': False,
869 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
872 'required': ['config'],
874 'ModelStatusInfo': {'additionalProperties': False,
875 'properties': {'available-version': {'type': 'string'},
876 'cloud-tag': {'type': 'string'},
877 'meter-status': {'$ref': '#/definitions/MeterStatus'},
878 'model-status': {'$ref': '#/definitions/DetailedStatus'},
879 'name': {'type': 'string'},
880 'region': {'type': 'string'},
881 'sla': {'type': 'string'},
882 'version': {'type': 'string'}},
891 'ModelUnset': {'additionalProperties': False,
892 'properties': {'keys': {'items': {'type': 'string'},
894 'required': ['keys'],
896 'ModelUserInfo': {'additionalProperties': False,
897 'properties': {'access': {'type': 'string'},
898 'display-name': {'type': 'string'},
899 'last-connection': {'format': 'date-time',
901 'user': {'type': 'string'}},
907 'ModelUserInfoResult': {'additionalProperties': False,
908 'properties': {'error': {'$ref': '#/definitions/Error'},
909 'result': {'$ref': '#/definitions/ModelUserInfo'}},
911 'ModelUserInfoResults': {'additionalProperties': False,
912 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
914 'required': ['results'],
916 'NetworkInterface': {'additionalProperties': False,
917 'properties': {'dns-nameservers': {'items': {'type': 'string'},
919 'gateway': {'type': 'string'},
920 'ip-addresses': {'items': {'type': 'string'},
922 'is-up': {'type': 'boolean'},
923 'mac-address': {'type': 'string'},
924 'space': {'type': 'string'}},
925 'required': ['ip-addresses',
929 'Number': {'additionalProperties': False,
930 'properties': {'Build': {'type': 'integer'},
931 'Major': {'type': 'integer'},
932 'Minor': {'type': 'integer'},
933 'Patch': {'type': 'integer'},
934 'Tag': {'type': 'string'}},
935 'required': ['Major',
941 'Placement': {'additionalProperties': False,
942 'properties': {'directive': {'type': 'string'},
943 'scope': {'type': 'string'}},
944 'required': ['scope', 'directive'],
946 'PrivateAddress': {'additionalProperties': False,
947 'properties': {'target': {'type': 'string'}},
948 'required': ['target'],
950 'PrivateAddressResults': {'additionalProperties': False,
951 'properties': {'private-address': {'type': 'string'}},
952 'required': ['private-address'],
954 'ProvisioningScriptParams': {'additionalProperties': False,
955 'properties': {'data-dir': {'type': 'string'},
956 'disable-package-commands': {'type': 'boolean'},
957 'machine-id': {'type': 'string'},
958 'nonce': {'type': 'string'}},
959 'required': ['machine-id',
962 'disable-package-commands'],
964 'ProvisioningScriptResult': {'additionalProperties': False,
965 'properties': {'script': {'type': 'string'}},
966 'required': ['script'],
968 'PublicAddress': {'additionalProperties': False,
969 'properties': {'target': {'type': 'string'}},
970 'required': ['target'],
972 'PublicAddressResults': {'additionalProperties': False,
973 'properties': {'public-address': {'type': 'string'}},
974 'required': ['public-address'],
976 'RelationStatus': {'additionalProperties': False,
977 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
979 'id': {'type': 'integer'},
980 'interface': {'type': 'string'},
981 'key': {'type': 'string'},
982 'scope': {'type': 'string'}},
989 'RemoteApplicationStatus': {'additionalProperties': False,
990 'properties': {'application-name': {'type': 'string'},
991 'application-url': {'type': 'string'},
992 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
994 'err': {'additionalProperties': True,
996 'life': {'type': 'string'},
997 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
1000 'status': {'$ref': '#/definitions/DetailedStatus'}},
1001 'required': ['application-url',
1008 'RemoteEndpoint': {'additionalProperties': False,
1009 'properties': {'interface': {'type': 'string'},
1010 'limit': {'type': 'integer'},
1011 'name': {'type': 'string'},
1012 'role': {'type': 'string'},
1013 'scope': {'type': 'string'}},
1014 'required': ['name',
1020 'ResolveCharmResult': {'additionalProperties': False,
1021 'properties': {'error': {'type': 'string'},
1022 'url': {'type': 'string'}},
1024 'ResolveCharmResults': {'additionalProperties': False,
1025 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
1027 'required': ['urls'],
1029 'ResolveCharms': {'additionalProperties': False,
1030 'properties': {'references': {'items': {'type': 'string'},
1032 'required': ['references'],
1034 'Resolved': {'additionalProperties': False,
1035 'properties': {'retry': {'type': 'boolean'},
1036 'unit-name': {'type': 'string'}},
1037 'required': ['unit-name', 'retry'],
1039 'SetConstraints': {'additionalProperties': False,
1040 'properties': {'application': {'type': 'string'},
1041 'constraints': {'$ref': '#/definitions/Value'}},
1042 'required': ['application', 'constraints'],
1044 'SetModelAgentVersion': {'additionalProperties': False,
1045 'properties': {'version': {'$ref': '#/definitions/Number'}},
1046 'required': ['version'],
1048 'StatusHistoryFilter': {'additionalProperties': False,
1049 'properties': {'date': {'format': 'date-time',
1051 'delta': {'type': 'integer'},
1052 'exclude': {'items': {'type': 'string'},
1054 'size': {'type': 'integer'}},
1055 'required': ['size',
1060 'StatusHistoryRequest': {'additionalProperties': False,
1061 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
1062 'historyKind': {'type': 'string'},
1063 'size': {'type': 'integer'},
1064 'tag': {'type': 'string'}},
1065 'required': ['historyKind',
1070 'StatusHistoryRequests': {'additionalProperties': False,
1071 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
1073 'required': ['requests'],
1075 'StatusHistoryResult': {'additionalProperties': False,
1076 'properties': {'error': {'$ref': '#/definitions/Error'},
1077 'history': {'$ref': '#/definitions/History'}},
1078 'required': ['history'],
1080 'StatusHistoryResults': {'additionalProperties': False,
1081 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
1083 'required': ['results'],
1085 'StatusParams': {'additionalProperties': False,
1086 'properties': {'patterns': {'items': {'type': 'string'},
1088 'required': ['patterns'],
1090 'StringResult': {'additionalProperties': False,
1091 'properties': {'error': {'$ref': '#/definitions/Error'},
1092 'result': {'type': 'string'}},
1093 'required': ['result'],
1095 'Tools': {'additionalProperties': False,
1096 'properties': {'sha256': {'type': 'string'},
1097 'size': {'type': 'integer'},
1098 'url': {'type': 'string'},
1099 'version': {'$ref': '#/definitions/Binary'}},
1100 'required': ['version', 'url', 'size'],
1102 'UnitStatus': {'additionalProperties': False,
1103 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
1104 'charm': {'type': 'string'},
1105 'leader': {'type': 'boolean'},
1106 'machine': {'type': 'string'},
1107 'opened-ports': {'items': {'type': 'string'},
1109 'public-address': {'type': 'string'},
1110 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
1112 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
1113 'workload-version': {'type': 'string'}},
1114 'required': ['agent-status',
1123 'Value': {'additionalProperties': False,
1124 'properties': {'arch': {'type': 'string'},
1125 'container': {'type': 'string'},
1126 'cores': {'type': 'integer'},
1127 'cpu-power': {'type': 'integer'},
1128 'instance-type': {'type': 'string'},
1129 'mem': {'type': 'integer'},
1130 'root-disk': {'type': 'integer'},
1131 'spaces': {'items': {'type': 'string'},
1133 'tags': {'items': {'type': 'string'},
1135 'virt-type': {'type': 'string'}},
1137 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
1139 'AbortCurrentUpgrade': {'type': 'object'},
1140 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
1142 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
1144 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
1145 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
1147 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
1148 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
1150 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
1152 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
1154 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
1155 'Result': {'$ref': '#/definitions/FindToolsResult'}},
1157 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
1158 'Result': {'$ref': '#/definitions/FullStatus'}},
1160 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
1161 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
1163 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
1165 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
1166 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
1168 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
1170 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
1172 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
1174 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
1176 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
1178 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
1179 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
1181 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
1182 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
1184 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
1185 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
1187 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
1188 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
1190 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
1192 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1193 'Result': {'$ref': '#/definitions/ErrorResults'}},
1195 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1197 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
1199 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
1201 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
1203 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
1204 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
1206 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
1211 @ReturnMapping(APIHostPortsResult
)
1212 async def APIHostPorts(self
):
1215 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
1217 # map input types to rpc msg
1219 msg
= dict(type='Client', request
='APIHostPorts', version
=1, params
=_params
)
1221 reply
= await self
.rpc(msg
)
1226 @ReturnMapping(None)
1227 async def AbortCurrentUpgrade(self
):
1232 # map input types to rpc msg
1234 msg
= dict(type='Client', request
='AbortCurrentUpgrade', version
=1, params
=_params
)
1236 reply
= await self
.rpc(msg
)
1241 @ReturnMapping(None)
1242 async def AddCharm(self
, channel
, url
):
1248 # map input types to rpc msg
1250 msg
= dict(type='Client', request
='AddCharm', version
=1, params
=_params
)
1251 _params
['channel'] = channel
1252 _params
['url'] = url
1253 reply
= await self
.rpc(msg
)
1258 @ReturnMapping(None)
1259 async def AddCharmWithAuthorization(self
, channel
, macaroon
, url
):
1266 # map input types to rpc msg
1268 msg
= dict(type='Client', request
='AddCharmWithAuthorization', version
=1, params
=_params
)
1269 _params
['channel'] = channel
1270 _params
['macaroon'] = macaroon
1271 _params
['url'] = url
1272 reply
= await self
.rpc(msg
)
1277 @ReturnMapping(AddMachinesResults
)
1278 async def AddMachines(self
, params
):
1280 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1281 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1283 # map input types to rpc msg
1285 msg
= dict(type='Client', request
='AddMachines', version
=1, params
=_params
)
1286 _params
['params'] = params
1287 reply
= await self
.rpc(msg
)
1292 @ReturnMapping(AddMachinesResults
)
1293 async def AddMachinesV2(self
, params
):
1295 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1296 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1298 # map input types to rpc msg
1300 msg
= dict(type='Client', request
='AddMachinesV2', version
=1, params
=_params
)
1301 _params
['params'] = params
1302 reply
= await self
.rpc(msg
)
1307 @ReturnMapping(AgentVersionResult
)
1308 async def AgentVersion(self
):
1313 # map input types to rpc msg
1315 msg
= dict(type='Client', request
='AgentVersion', version
=1, params
=_params
)
1317 reply
= await self
.rpc(msg
)
1322 @ReturnMapping(None)
1323 async def DestroyMachines(self
, force
, machine_names
):
1326 machine_names : typing.Sequence<+T_co>[str]
1329 # map input types to rpc msg
1331 msg
= dict(type='Client', request
='DestroyMachines', version
=1, params
=_params
)
1332 _params
['force'] = force
1333 _params
['machine-names'] = machine_names
1334 reply
= await self
.rpc(msg
)
1339 @ReturnMapping(FindToolsResult
)
1340 async def FindTools(self
, arch
, major
, minor
, number
, series
):
1347 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
1349 # map input types to rpc msg
1351 msg
= dict(type='Client', request
='FindTools', version
=1, params
=_params
)
1352 _params
['arch'] = arch
1353 _params
['major'] = major
1354 _params
['minor'] = minor
1355 _params
['number'] = number
1356 _params
['series'] = series
1357 reply
= await self
.rpc(msg
)
1362 @ReturnMapping(FullStatus
)
1363 async def FullStatus(self
, patterns
):
1365 patterns : typing.Sequence<+T_co>[str]
1366 Returns -> typing.Union[_ForwardRef('ModelStatusInfo'), typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>, typing.Mapping<~KT, +VT_co>[str, ~RemoteApplicationStatus]<~RemoteApplicationStatus>]
1368 # map input types to rpc msg
1370 msg
= dict(type='Client', request
='FullStatus', version
=1, params
=_params
)
1371 _params
['patterns'] = patterns
1372 reply
= await self
.rpc(msg
)
1377 @ReturnMapping(BundleChangesResults
)
1378 async def GetBundleChanges(self
, yaml
):
1381 Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
1383 # map input types to rpc msg
1385 msg
= dict(type='Client', request
='GetBundleChanges', version
=1, params
=_params
)
1386 _params
['yaml'] = yaml
1387 reply
= await self
.rpc(msg
)
1392 @ReturnMapping(GetConstraintsResults
)
1393 async def GetModelConstraints(self
):
1398 # map input types to rpc msg
1400 msg
= dict(type='Client', request
='GetModelConstraints', version
=1, params
=_params
)
1402 reply
= await self
.rpc(msg
)
1407 @ReturnMapping(AddMachinesResults
)
1408 async def InjectMachines(self
, params
):
1410 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1411 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1413 # map input types to rpc msg
1415 msg
= dict(type='Client', request
='InjectMachines', version
=1, params
=_params
)
1416 _params
['params'] = params
1417 reply
= await self
.rpc(msg
)
1422 @ReturnMapping(ModelConfigResults
)
1423 async def ModelGet(self
):
1426 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1428 # map input types to rpc msg
1430 msg
= dict(type='Client', request
='ModelGet', version
=1, params
=_params
)
1432 reply
= await self
.rpc(msg
)
1437 @ReturnMapping(ModelInfo
)
1438 async def ModelInfo(self
):
1441 Returns -> typing.Union[_ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
1443 # map input types to rpc msg
1445 msg
= dict(type='Client', request
='ModelInfo', version
=1, params
=_params
)
1447 reply
= await self
.rpc(msg
)
1452 @ReturnMapping(None)
1453 async def ModelSet(self
, config
):
1455 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1458 # map input types to rpc msg
1460 msg
= dict(type='Client', request
='ModelSet', version
=1, params
=_params
)
1461 _params
['config'] = config
1462 reply
= await self
.rpc(msg
)
1467 @ReturnMapping(None)
1468 async def ModelUnset(self
, keys
):
1470 keys : typing.Sequence<+T_co>[str]
1473 # map input types to rpc msg
1475 msg
= dict(type='Client', request
='ModelUnset', version
=1, params
=_params
)
1476 _params
['keys'] = keys
1477 reply
= await self
.rpc(msg
)
1482 @ReturnMapping(ModelUserInfoResults
)
1483 async def ModelUserInfo(self
):
1486 Returns -> typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
1488 # map input types to rpc msg
1490 msg
= dict(type='Client', request
='ModelUserInfo', version
=1, params
=_params
)
1492 reply
= await self
.rpc(msg
)
1497 @ReturnMapping(PrivateAddressResults
)
1498 async def PrivateAddress(self
, target
):
1503 # map input types to rpc msg
1505 msg
= dict(type='Client', request
='PrivateAddress', version
=1, params
=_params
)
1506 _params
['target'] = target
1507 reply
= await self
.rpc(msg
)
1512 @ReturnMapping(ProvisioningScriptResult
)
1513 async def ProvisioningScript(self
, data_dir
, disable_package_commands
, machine_id
, nonce
):
1516 disable_package_commands : bool
1521 # map input types to rpc msg
1523 msg
= dict(type='Client', request
='ProvisioningScript', version
=1, params
=_params
)
1524 _params
['data-dir'] = data_dir
1525 _params
['disable-package-commands'] = disable_package_commands
1526 _params
['machine-id'] = machine_id
1527 _params
['nonce'] = nonce
1528 reply
= await self
.rpc(msg
)
1533 @ReturnMapping(PublicAddressResults
)
1534 async def PublicAddress(self
, target
):
1539 # map input types to rpc msg
1541 msg
= dict(type='Client', request
='PublicAddress', version
=1, params
=_params
)
1542 _params
['target'] = target
1543 reply
= await self
.rpc(msg
)
1548 @ReturnMapping(ResolveCharmResults
)
1549 async def ResolveCharms(self
, references
):
1551 references : typing.Sequence<+T_co>[str]
1552 Returns -> typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
1554 # map input types to rpc msg
1556 msg
= dict(type='Client', request
='ResolveCharms', version
=1, params
=_params
)
1557 _params
['references'] = references
1558 reply
= await self
.rpc(msg
)
1563 @ReturnMapping(None)
1564 async def Resolved(self
, retry
, unit_name
):
1570 # map input types to rpc msg
1572 msg
= dict(type='Client', request
='Resolved', version
=1, params
=_params
)
1573 _params
['retry'] = retry
1574 _params
['unit-name'] = unit_name
1575 reply
= await self
.rpc(msg
)
1580 @ReturnMapping(ErrorResults
)
1581 async def RetryProvisioning(self
, entities
):
1583 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1584 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1586 # map input types to rpc msg
1588 msg
= dict(type='Client', request
='RetryProvisioning', version
=1, params
=_params
)
1589 _params
['entities'] = entities
1590 reply
= await self
.rpc(msg
)
1595 @ReturnMapping(StringResult
)
1596 async def SLALevel(self
):
1599 Returns -> typing.Union[_ForwardRef('Error'), str]
1601 # map input types to rpc msg
1603 msg
= dict(type='Client', request
='SLALevel', version
=1, params
=_params
)
1605 reply
= await self
.rpc(msg
)
1610 @ReturnMapping(None)
1611 async def SetModelAgentVersion(self
, version
):
1616 # map input types to rpc msg
1618 msg
= dict(type='Client', request
='SetModelAgentVersion', version
=1, params
=_params
)
1619 _params
['version'] = version
1620 reply
= await self
.rpc(msg
)
1625 @ReturnMapping(None)
1626 async def SetModelConstraints(self
, application
, constraints
):
1632 # map input types to rpc msg
1634 msg
= dict(type='Client', request
='SetModelConstraints', version
=1, params
=_params
)
1635 _params
['application'] = application
1636 _params
['constraints'] = constraints
1637 reply
= await self
.rpc(msg
)
1642 @ReturnMapping(None)
1643 async def SetSLALevel(self
, creds
, level
):
1645 creds : typing.Sequence<+T_co>[int]
1649 # map input types to rpc msg
1651 msg
= dict(type='Client', request
='SetSLALevel', version
=1, params
=_params
)
1652 _params
['creds'] = creds
1653 _params
['level'] = level
1654 reply
= await self
.rpc(msg
)
1659 @ReturnMapping(StatusHistoryResults
)
1660 async def StatusHistory(self
, requests
):
1662 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
1663 Returns -> typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
1665 # map input types to rpc msg
1667 msg
= dict(type='Client', request
='StatusHistory', version
=1, params
=_params
)
1668 _params
['requests'] = requests
1669 reply
= await self
.rpc(msg
)
1674 @ReturnMapping(AllWatcherId
)
1675 async def WatchAll(self
):
1680 # map input types to rpc msg
1682 msg
= dict(type='Client', request
='WatchAll', version
=1, params
=_params
)
1684 reply
= await self
.rpc(msg
)
1689 class CloudFacade(Type
):
1692 schema
= {'definitions': {'Cloud': {'additionalProperties': False,
1693 'properties': {'auth-types': {'items': {'type': 'string'},
1695 'endpoint': {'type': 'string'},
1696 'identity-endpoint': {'type': 'string'},
1697 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
1699 'storage-endpoint': {'type': 'string'},
1700 'type': {'type': 'string'}},
1701 'required': ['type'],
1703 'CloudCredential': {'additionalProperties': False,
1704 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1706 'auth-type': {'type': 'string'},
1707 'redacted': {'items': {'type': 'string'},
1709 'required': ['auth-type'],
1711 'CloudCredentialResult': {'additionalProperties': False,
1712 'properties': {'error': {'$ref': '#/definitions/Error'},
1713 'result': {'$ref': '#/definitions/CloudCredential'}},
1715 'CloudCredentialResults': {'additionalProperties': False,
1716 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
1719 'CloudInstanceTypesConstraint': {'additionalProperties': False,
1720 'properties': {'cloud-tag': {'type': 'string'},
1721 'constraints': {'$ref': '#/definitions/Value'},
1722 'region': {'type': 'string'}},
1723 'required': ['cloud-tag',
1726 'CloudInstanceTypesConstraints': {'additionalProperties': False,
1727 'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'},
1729 'required': ['constraints'],
1731 'CloudRegion': {'additionalProperties': False,
1732 'properties': {'endpoint': {'type': 'string'},
1733 'identity-endpoint': {'type': 'string'},
1734 'name': {'type': 'string'},
1735 'storage-endpoint': {'type': 'string'}},
1736 'required': ['name'],
1738 'CloudResult': {'additionalProperties': False,
1739 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
1740 'error': {'$ref': '#/definitions/Error'}},
1742 'CloudResults': {'additionalProperties': False,
1743 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
1746 'CloudsResult': {'additionalProperties': False,
1747 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
1750 'Entities': {'additionalProperties': False,
1751 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1753 'required': ['entities'],
1755 'Entity': {'additionalProperties': False,
1756 'properties': {'tag': {'type': 'string'}},
1757 'required': ['tag'],
1759 'Error': {'additionalProperties': False,
1760 'properties': {'code': {'type': 'string'},
1761 'info': {'$ref': '#/definitions/ErrorInfo'},
1762 'message': {'type': 'string'}},
1763 'required': ['message', 'code'],
1765 'ErrorInfo': {'additionalProperties': False,
1766 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1767 'macaroon-path': {'type': 'string'}},
1769 'ErrorResult': {'additionalProperties': False,
1770 'properties': {'error': {'$ref': '#/definitions/Error'}},
1772 'ErrorResults': {'additionalProperties': False,
1773 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1775 'required': ['results'],
1777 'InstanceType': {'additionalProperties': False,
1778 'properties': {'arches': {'items': {'type': 'string'},
1780 'cost': {'type': 'integer'},
1781 'cpu-cores': {'type': 'integer'},
1782 'deprecated': {'type': 'boolean'},
1783 'memory': {'type': 'integer'},
1784 'name': {'type': 'string'},
1785 'root-disk': {'type': 'integer'},
1786 'virt-type': {'type': 'string'}},
1787 'required': ['arches', 'cpu-cores', 'memory'],
1789 'InstanceTypesResult': {'additionalProperties': False,
1790 'properties': {'cost-currency': {'type': 'string'},
1791 'cost-divisor': {'type': 'integer'},
1792 'cost-unit': {'type': 'string'},
1793 'error': {'$ref': '#/definitions/Error'},
1794 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
1797 'InstanceTypesResults': {'additionalProperties': False,
1798 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
1800 'required': ['results'],
1802 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1803 'StringResult': {'additionalProperties': False,
1804 'properties': {'error': {'$ref': '#/definitions/Error'},
1805 'result': {'type': 'string'}},
1806 'required': ['result'],
1808 'StringsResult': {'additionalProperties': False,
1809 'properties': {'error': {'$ref': '#/definitions/Error'},
1810 'result': {'items': {'type': 'string'},
1813 'StringsResults': {'additionalProperties': False,
1814 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1816 'required': ['results'],
1818 'UpdateCloudCredential': {'additionalProperties': False,
1819 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
1820 'tag': {'type': 'string'}},
1821 'required': ['tag', 'credential'],
1823 'UpdateCloudCredentials': {'additionalProperties': False,
1824 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'},
1827 'UserCloud': {'additionalProperties': False,
1828 'properties': {'cloud-tag': {'type': 'string'},
1829 'user-tag': {'type': 'string'}},
1830 'required': ['user-tag', 'cloud-tag'],
1832 'UserClouds': {'additionalProperties': False,
1833 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
1836 'Value': {'additionalProperties': False,
1837 'properties': {'arch': {'type': 'string'},
1838 'container': {'type': 'string'},
1839 'cores': {'type': 'integer'},
1840 'cpu-power': {'type': 'integer'},
1841 'instance-type': {'type': 'string'},
1842 'mem': {'type': 'integer'},
1843 'root-disk': {'type': 'integer'},
1844 'spaces': {'items': {'type': 'string'},
1846 'tags': {'items': {'type': 'string'},
1848 'virt-type': {'type': 'string'}},
1850 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1851 'Result': {'$ref': '#/definitions/CloudResults'}},
1853 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
1855 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1856 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
1858 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1860 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
1861 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
1863 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1864 'Result': {'$ref': '#/definitions/ErrorResults'}},
1866 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'},
1867 'Result': {'$ref': '#/definitions/ErrorResults'}},
1869 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
1870 'Result': {'$ref': '#/definitions/StringsResults'}},
1875 @ReturnMapping(CloudResults
)
1876 async def Cloud(self
, entities
):
1878 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1879 Returns -> typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
1881 # map input types to rpc msg
1883 msg
= dict(type='Cloud', request
='Cloud', version
=1, params
=_params
)
1884 _params
['entities'] = entities
1885 reply
= await self
.rpc(msg
)
1890 @ReturnMapping(CloudsResult
)
1891 async def Clouds(self
):
1894 Returns -> typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
1896 # map input types to rpc msg
1898 msg
= dict(type='Cloud', request
='Clouds', version
=1, params
=_params
)
1900 reply
= await self
.rpc(msg
)
1905 @ReturnMapping(CloudCredentialResults
)
1906 async def Credential(self
, entities
):
1908 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1909 Returns -> typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
1911 # map input types to rpc msg
1913 msg
= dict(type='Cloud', request
='Credential', version
=1, params
=_params
)
1914 _params
['entities'] = entities
1915 reply
= await self
.rpc(msg
)
1920 @ReturnMapping(StringResult
)
1921 async def DefaultCloud(self
):
1924 Returns -> typing.Union[_ForwardRef('Error'), str]
1926 # map input types to rpc msg
1928 msg
= dict(type='Cloud', request
='DefaultCloud', version
=1, params
=_params
)
1930 reply
= await self
.rpc(msg
)
1935 @ReturnMapping(InstanceTypesResults
)
1936 async def InstanceTypes(self
, constraints
):
1938 constraints : typing.Sequence<+T_co>[~CloudInstanceTypesConstraint]<~CloudInstanceTypesConstraint>
1939 Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
1941 # map input types to rpc msg
1943 msg
= dict(type='Cloud', request
='InstanceTypes', version
=1, params
=_params
)
1944 _params
['constraints'] = constraints
1945 reply
= await self
.rpc(msg
)
1950 @ReturnMapping(ErrorResults
)
1951 async def RevokeCredentials(self
, entities
):
1953 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1954 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1956 # map input types to rpc msg
1958 msg
= dict(type='Cloud', request
='RevokeCredentials', version
=1, params
=_params
)
1959 _params
['entities'] = entities
1960 reply
= await self
.rpc(msg
)
1965 @ReturnMapping(ErrorResults
)
1966 async def UpdateCredentials(self
, credentials
):
1968 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
1969 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1971 # map input types to rpc msg
1973 msg
= dict(type='Cloud', request
='UpdateCredentials', version
=1, params
=_params
)
1974 _params
['credentials'] = credentials
1975 reply
= await self
.rpc(msg
)
1980 @ReturnMapping(StringsResults
)
1981 async def UserCredentials(self
, user_clouds
):
1983 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
1984 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
1986 # map input types to rpc msg
1988 msg
= dict(type='Cloud', request
='UserCredentials', version
=1, params
=_params
)
1989 _params
['user-clouds'] = user_clouds
1990 reply
= await self
.rpc(msg
)
1995 class DeployerFacade(Type
):
1998 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
1999 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2002 'required': ['servers'],
2004 'Address': {'additionalProperties': False,
2005 'properties': {'scope': {'type': 'string'},
2006 'space-name': {'type': 'string'},
2007 'type': {'type': 'string'},
2008 'value': {'type': 'string'}},
2009 'required': ['value', 'type', 'scope'],
2011 'BytesResult': {'additionalProperties': False,
2012 'properties': {'result': {'items': {'type': 'integer'},
2014 'required': ['result'],
2016 'DeployerConnectionValues': {'additionalProperties': False,
2017 'properties': {'api-addresses': {'items': {'type': 'string'},
2019 'state-addresses': {'items': {'type': 'string'},
2021 'required': ['state-addresses',
2024 'Entities': {'additionalProperties': False,
2025 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2027 'required': ['entities'],
2029 'Entity': {'additionalProperties': False,
2030 'properties': {'tag': {'type': 'string'}},
2031 'required': ['tag'],
2033 'EntityPassword': {'additionalProperties': False,
2034 'properties': {'password': {'type': 'string'},
2035 'tag': {'type': 'string'}},
2036 'required': ['tag', 'password'],
2038 'EntityPasswords': {'additionalProperties': False,
2039 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
2041 'required': ['changes'],
2043 'EntityStatusArgs': {'additionalProperties': False,
2044 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2047 'info': {'type': 'string'},
2048 'status': {'type': 'string'},
2049 'tag': {'type': 'string'}},
2055 'Error': {'additionalProperties': False,
2056 'properties': {'code': {'type': 'string'},
2057 'info': {'$ref': '#/definitions/ErrorInfo'},
2058 'message': {'type': 'string'}},
2059 'required': ['message', 'code'],
2061 'ErrorInfo': {'additionalProperties': False,
2062 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2063 'macaroon-path': {'type': 'string'}},
2065 'ErrorResult': {'additionalProperties': False,
2066 'properties': {'error': {'$ref': '#/definitions/Error'}},
2068 'ErrorResults': {'additionalProperties': False,
2069 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2071 'required': ['results'],
2073 'HostPort': {'additionalProperties': False,
2074 'properties': {'Address': {'$ref': '#/definitions/Address'},
2075 'port': {'type': 'integer'}},
2076 'required': ['Address', 'port'],
2078 'LifeResult': {'additionalProperties': False,
2079 'properties': {'error': {'$ref': '#/definitions/Error'},
2080 'life': {'type': 'string'}},
2081 'required': ['life'],
2083 'LifeResults': {'additionalProperties': False,
2084 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2086 'required': ['results'],
2088 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2089 'NotifyWatchResult': {'additionalProperties': False,
2090 'properties': {'NotifyWatcherId': {'type': 'string'},
2091 'error': {'$ref': '#/definitions/Error'}},
2092 'required': ['NotifyWatcherId'],
2094 'SetStatus': {'additionalProperties': False,
2095 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
2097 'required': ['entities'],
2099 'StringResult': {'additionalProperties': False,
2100 'properties': {'error': {'$ref': '#/definitions/Error'},
2101 'result': {'type': 'string'}},
2102 'required': ['result'],
2104 'StringsResult': {'additionalProperties': False,
2105 'properties': {'error': {'$ref': '#/definitions/Error'},
2106 'result': {'items': {'type': 'string'},
2109 'StringsWatchResult': {'additionalProperties': False,
2110 'properties': {'changes': {'items': {'type': 'string'},
2112 'error': {'$ref': '#/definitions/Error'},
2113 'watcher-id': {'type': 'string'}},
2114 'required': ['watcher-id'],
2116 'StringsWatchResults': {'additionalProperties': False,
2117 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
2119 'required': ['results'],
2121 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2123 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
2125 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
2127 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
2129 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2130 'Result': {'$ref': '#/definitions/LifeResults'}},
2132 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
2134 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2135 'Result': {'$ref': '#/definitions/ErrorResults'}},
2137 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
2138 'Result': {'$ref': '#/definitions/ErrorResults'}},
2140 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2141 'Result': {'$ref': '#/definitions/ErrorResults'}},
2143 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2145 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2146 'Result': {'$ref': '#/definitions/ErrorResults'}},
2148 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2150 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2151 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2156 @ReturnMapping(StringsResult
)
2157 async def APIAddresses(self
):
2160 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
2162 # map input types to rpc msg
2164 msg
= dict(type='Deployer', request
='APIAddresses', version
=1, params
=_params
)
2166 reply
= await self
.rpc(msg
)
2171 @ReturnMapping(APIHostPortsResult
)
2172 async def APIHostPorts(self
):
2175 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
2177 # map input types to rpc msg
2179 msg
= dict(type='Deployer', request
='APIHostPorts', version
=1, params
=_params
)
2181 reply
= await self
.rpc(msg
)
2186 @ReturnMapping(BytesResult
)
2187 async def CACert(self
):
2190 Returns -> typing.Sequence<+T_co>[int]
2192 # map input types to rpc msg
2194 msg
= dict(type='Deployer', request
='CACert', version
=1, params
=_params
)
2196 reply
= await self
.rpc(msg
)
2201 @ReturnMapping(DeployerConnectionValues
)
2202 async def ConnectionInfo(self
):
2205 Returns -> typing.Sequence<+T_co>[str]
2207 # map input types to rpc msg
2209 msg
= dict(type='Deployer', request
='ConnectionInfo', version
=1, params
=_params
)
2211 reply
= await self
.rpc(msg
)
2216 @ReturnMapping(LifeResults
)
2217 async def Life(self
, entities
):
2219 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2220 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2222 # map input types to rpc msg
2224 msg
= dict(type='Deployer', request
='Life', version
=1, params
=_params
)
2225 _params
['entities'] = entities
2226 reply
= await self
.rpc(msg
)
2231 @ReturnMapping(StringResult
)
2232 async def ModelUUID(self
):
2235 Returns -> typing.Union[_ForwardRef('Error'), str]
2237 # map input types to rpc msg
2239 msg
= dict(type='Deployer', request
='ModelUUID', version
=1, params
=_params
)
2241 reply
= await self
.rpc(msg
)
2246 @ReturnMapping(ErrorResults
)
2247 async def Remove(self
, entities
):
2249 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2250 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2252 # map input types to rpc msg
2254 msg
= dict(type='Deployer', request
='Remove', version
=1, params
=_params
)
2255 _params
['entities'] = entities
2256 reply
= await self
.rpc(msg
)
2261 @ReturnMapping(ErrorResults
)
2262 async def SetPasswords(self
, changes
):
2264 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
2265 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2267 # map input types to rpc msg
2269 msg
= dict(type='Deployer', request
='SetPasswords', version
=1, params
=_params
)
2270 _params
['changes'] = changes
2271 reply
= await self
.rpc(msg
)
2276 @ReturnMapping(ErrorResults
)
2277 async def SetStatus(self
, entities
):
2279 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2280 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2282 # map input types to rpc msg
2284 msg
= dict(type='Deployer', request
='SetStatus', version
=1, params
=_params
)
2285 _params
['entities'] = entities
2286 reply
= await self
.rpc(msg
)
2291 @ReturnMapping(StringsResult
)
2292 async def StateAddresses(self
):
2295 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
2297 # map input types to rpc msg
2299 msg
= dict(type='Deployer', request
='StateAddresses', version
=1, params
=_params
)
2301 reply
= await self
.rpc(msg
)
2306 @ReturnMapping(ErrorResults
)
2307 async def UpdateStatus(self
, entities
):
2309 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2310 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2312 # map input types to rpc msg
2314 msg
= dict(type='Deployer', request
='UpdateStatus', version
=1, params
=_params
)
2315 _params
['entities'] = entities
2316 reply
= await self
.rpc(msg
)
2321 @ReturnMapping(NotifyWatchResult
)
2322 async def WatchAPIHostPorts(self
):
2325 Returns -> typing.Union[str, _ForwardRef('Error')]
2327 # map input types to rpc msg
2329 msg
= dict(type='Deployer', request
='WatchAPIHostPorts', version
=1, params
=_params
)
2331 reply
= await self
.rpc(msg
)
2336 @ReturnMapping(StringsWatchResults
)
2337 async def WatchUnits(self
, entities
):
2339 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2340 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
2342 # map input types to rpc msg
2344 msg
= dict(type='Deployer', request
='WatchUnits', version
=1, params
=_params
)
2345 _params
['entities'] = entities
2346 reply
= await self
.rpc(msg
)
2351 class HostKeyReporterFacade(Type
):
2352 name
= 'HostKeyReporter'
2354 schema
= {'definitions': {'Error': {'additionalProperties': False,
2355 'properties': {'code': {'type': 'string'},
2356 'info': {'$ref': '#/definitions/ErrorInfo'},
2357 'message': {'type': 'string'}},
2358 'required': ['message', 'code'],
2360 'ErrorInfo': {'additionalProperties': False,
2361 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2362 'macaroon-path': {'type': 'string'}},
2364 'ErrorResult': {'additionalProperties': False,
2365 'properties': {'error': {'$ref': '#/definitions/Error'}},
2367 'ErrorResults': {'additionalProperties': False,
2368 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2370 'required': ['results'],
2372 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2373 'SSHHostKeySet': {'additionalProperties': False,
2374 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
2376 'required': ['entity-keys'],
2378 'SSHHostKeys': {'additionalProperties': False,
2379 'properties': {'public-keys': {'items': {'type': 'string'},
2381 'tag': {'type': 'string'}},
2382 'required': ['tag', 'public-keys'],
2384 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
2385 'Result': {'$ref': '#/definitions/ErrorResults'}},
2390 @ReturnMapping(ErrorResults
)
2391 async def ReportKeys(self
, entity_keys
):
2393 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
2394 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2396 # map input types to rpc msg
2398 msg
= dict(type='HostKeyReporter', request
='ReportKeys', version
=1, params
=_params
)
2399 _params
['entity-keys'] = entity_keys
2400 reply
= await self
.rpc(msg
)
2405 class KeyManagerFacade(Type
):
2408 schema
= {'definitions': {'Entities': {'additionalProperties': False,
2409 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2411 'required': ['entities'],
2413 'Entity': {'additionalProperties': False,
2414 'properties': {'tag': {'type': 'string'}},
2415 'required': ['tag'],
2417 'Error': {'additionalProperties': False,
2418 'properties': {'code': {'type': 'string'},
2419 'info': {'$ref': '#/definitions/ErrorInfo'},
2420 'message': {'type': 'string'}},
2421 'required': ['message', 'code'],
2423 'ErrorInfo': {'additionalProperties': False,
2424 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2425 'macaroon-path': {'type': 'string'}},
2427 'ErrorResult': {'additionalProperties': False,
2428 'properties': {'error': {'$ref': '#/definitions/Error'}},
2430 'ErrorResults': {'additionalProperties': False,
2431 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2433 'required': ['results'],
2435 'ListSSHKeys': {'additionalProperties': False,
2436 'properties': {'entities': {'$ref': '#/definitions/Entities'},
2437 'mode': {'type': 'boolean'}},
2438 'required': ['entities', 'mode'],
2440 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2441 'ModifyUserSSHKeys': {'additionalProperties': False,
2442 'properties': {'ssh-keys': {'items': {'type': 'string'},
2444 'user': {'type': 'string'}},
2445 'required': ['user', 'ssh-keys'],
2447 'StringsResult': {'additionalProperties': False,
2448 'properties': {'error': {'$ref': '#/definitions/Error'},
2449 'result': {'items': {'type': 'string'},
2452 'StringsResults': {'additionalProperties': False,
2453 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
2455 'required': ['results'],
2457 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
2458 'Result': {'$ref': '#/definitions/ErrorResults'}},
2460 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
2461 'Result': {'$ref': '#/definitions/ErrorResults'}},
2463 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
2464 'Result': {'$ref': '#/definitions/ErrorResults'}},
2466 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
2467 'Result': {'$ref': '#/definitions/StringsResults'}},
2472 @ReturnMapping(ErrorResults
)
2473 async def AddKeys(self
, ssh_keys
, user
):
2475 ssh_keys : typing.Sequence<+T_co>[str]
2477 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2479 # map input types to rpc msg
2481 msg
= dict(type='KeyManager', request
='AddKeys', version
=1, params
=_params
)
2482 _params
['ssh-keys'] = ssh_keys
2483 _params
['user'] = user
2484 reply
= await self
.rpc(msg
)
2489 @ReturnMapping(ErrorResults
)
2490 async def DeleteKeys(self
, ssh_keys
, user
):
2492 ssh_keys : typing.Sequence<+T_co>[str]
2494 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2496 # map input types to rpc msg
2498 msg
= dict(type='KeyManager', request
='DeleteKeys', version
=1, params
=_params
)
2499 _params
['ssh-keys'] = ssh_keys
2500 _params
['user'] = user
2501 reply
= await self
.rpc(msg
)
2506 @ReturnMapping(ErrorResults
)
2507 async def ImportKeys(self
, ssh_keys
, user
):
2509 ssh_keys : typing.Sequence<+T_co>[str]
2511 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2513 # map input types to rpc msg
2515 msg
= dict(type='KeyManager', request
='ImportKeys', version
=1, params
=_params
)
2516 _params
['ssh-keys'] = ssh_keys
2517 _params
['user'] = user
2518 reply
= await self
.rpc(msg
)
2523 @ReturnMapping(StringsResults
)
2524 async def ListKeys(self
, entities
, mode
):
2528 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2530 # map input types to rpc msg
2532 msg
= dict(type='KeyManager', request
='ListKeys', version
=1, params
=_params
)
2533 _params
['entities'] = entities
2534 _params
['mode'] = mode
2535 reply
= await self
.rpc(msg
)
2540 class KeyUpdaterFacade(Type
):
2543 schema
= {'definitions': {'Entities': {'additionalProperties': False,
2544 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2546 'required': ['entities'],
2548 'Entity': {'additionalProperties': False,
2549 'properties': {'tag': {'type': 'string'}},
2550 'required': ['tag'],
2552 'Error': {'additionalProperties': False,
2553 'properties': {'code': {'type': 'string'},
2554 'info': {'$ref': '#/definitions/ErrorInfo'},
2555 'message': {'type': 'string'}},
2556 'required': ['message', 'code'],
2558 'ErrorInfo': {'additionalProperties': False,
2559 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2560 'macaroon-path': {'type': 'string'}},
2562 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2563 'NotifyWatchResult': {'additionalProperties': False,
2564 'properties': {'NotifyWatcherId': {'type': 'string'},
2565 'error': {'$ref': '#/definitions/Error'}},
2566 'required': ['NotifyWatcherId'],
2568 'NotifyWatchResults': {'additionalProperties': False,
2569 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2571 'required': ['results'],
2573 'StringsResult': {'additionalProperties': False,
2574 'properties': {'error': {'$ref': '#/definitions/Error'},
2575 'result': {'items': {'type': 'string'},
2578 'StringsResults': {'additionalProperties': False,
2579 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
2581 'required': ['results'],
2583 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2584 'Result': {'$ref': '#/definitions/StringsResults'}},
2586 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2587 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2592 @ReturnMapping(StringsResults
)
2593 async def AuthorisedKeys(self
, entities
):
2595 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2596 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2598 # map input types to rpc msg
2600 msg
= dict(type='KeyUpdater', request
='AuthorisedKeys', version
=1, params
=_params
)
2601 _params
['entities'] = entities
2602 reply
= await self
.rpc(msg
)
2607 @ReturnMapping(NotifyWatchResults
)
2608 async def WatchAuthorisedKeys(self
, entities
):
2610 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2611 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2613 # map input types to rpc msg
2615 msg
= dict(type='KeyUpdater', request
='WatchAuthorisedKeys', version
=1, params
=_params
)
2616 _params
['entities'] = entities
2617 reply
= await self
.rpc(msg
)
2622 class LifeFlagFacade(Type
):
2625 schema
= {'definitions': {'Entities': {'additionalProperties': False,
2626 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2628 'required': ['entities'],
2630 'Entity': {'additionalProperties': False,
2631 'properties': {'tag': {'type': 'string'}},
2632 'required': ['tag'],
2634 'Error': {'additionalProperties': False,
2635 'properties': {'code': {'type': 'string'},
2636 'info': {'$ref': '#/definitions/ErrorInfo'},
2637 'message': {'type': 'string'}},
2638 'required': ['message', 'code'],
2640 'ErrorInfo': {'additionalProperties': False,
2641 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2642 'macaroon-path': {'type': 'string'}},
2644 'LifeResult': {'additionalProperties': False,
2645 'properties': {'error': {'$ref': '#/definitions/Error'},
2646 'life': {'type': 'string'}},
2647 'required': ['life'],
2649 'LifeResults': {'additionalProperties': False,
2650 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2652 'required': ['results'],
2654 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2655 'NotifyWatchResult': {'additionalProperties': False,
2656 'properties': {'NotifyWatcherId': {'type': 'string'},
2657 'error': {'$ref': '#/definitions/Error'}},
2658 'required': ['NotifyWatcherId'],
2660 'NotifyWatchResults': {'additionalProperties': False,
2661 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2663 'required': ['results'],
2665 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2666 'Result': {'$ref': '#/definitions/LifeResults'}},
2668 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2669 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2674 @ReturnMapping(LifeResults
)
2675 async def Life(self
, entities
):
2677 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2678 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2680 # map input types to rpc msg
2682 msg
= dict(type='LifeFlag', request
='Life', version
=1, params
=_params
)
2683 _params
['entities'] = entities
2684 reply
= await self
.rpc(msg
)
2689 @ReturnMapping(NotifyWatchResults
)
2690 async def Watch(self
, entities
):
2692 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2693 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2695 # map input types to rpc msg
2697 msg
= dict(type='LifeFlag', request
='Watch', version
=1, params
=_params
)
2698 _params
['entities'] = entities
2699 reply
= await self
.rpc(msg
)
2704 class LogForwardingFacade(Type
):
2705 name
= 'LogForwarding'
2707 schema
= {'definitions': {'Error': {'additionalProperties': False,
2708 'properties': {'code': {'type': 'string'},
2709 'info': {'$ref': '#/definitions/ErrorInfo'},
2710 'message': {'type': 'string'}},
2711 'required': ['message', 'code'],
2713 'ErrorInfo': {'additionalProperties': False,
2714 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2715 'macaroon-path': {'type': 'string'}},
2717 'ErrorResult': {'additionalProperties': False,
2718 'properties': {'error': {'$ref': '#/definitions/Error'}},
2720 'ErrorResults': {'additionalProperties': False,
2721 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2723 'required': ['results'],
2725 'LogForwardingGetLastSentParams': {'additionalProperties': False,
2726 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
2728 'required': ['ids'],
2730 'LogForwardingGetLastSentResult': {'additionalProperties': False,
2731 'properties': {'err': {'$ref': '#/definitions/Error'},
2732 'record-id': {'type': 'integer'},
2733 'record-timestamp': {'type': 'integer'}},
2734 'required': ['record-id',
2738 'LogForwardingGetLastSentResults': {'additionalProperties': False,
2739 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
2741 'required': ['results'],
2743 'LogForwardingID': {'additionalProperties': False,
2744 'properties': {'model': {'type': 'string'},
2745 'sink': {'type': 'string'}},
2746 'required': ['model', 'sink'],
2748 'LogForwardingSetLastSentParam': {'additionalProperties': False,
2749 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
2750 'record-id': {'type': 'integer'},
2751 'record-timestamp': {'type': 'integer'}},
2752 'required': ['LogForwardingID',
2754 'record-timestamp'],
2756 'LogForwardingSetLastSentParams': {'additionalProperties': False,
2757 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
2759 'required': ['params'],
2761 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2762 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
2763 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
2765 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
2766 'Result': {'$ref': '#/definitions/ErrorResults'}},
2771 @ReturnMapping(LogForwardingGetLastSentResults
)
2772 async def GetLastSent(self
, ids
):
2774 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
2775 Returns -> typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
2777 # map input types to rpc msg
2779 msg
= dict(type='LogForwarding', request
='GetLastSent', version
=1, params
=_params
)
2780 _params
['ids'] = ids
2781 reply
= await self
.rpc(msg
)
2786 @ReturnMapping(ErrorResults
)
2787 async def SetLastSent(self
, params
):
2789 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
2790 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2792 # map input types to rpc msg
2794 msg
= dict(type='LogForwarding', request
='SetLastSent', version
=1, params
=_params
)
2795 _params
['params'] = params
2796 reply
= await self
.rpc(msg
)
2801 class LoggerFacade(Type
):
2804 schema
= {'definitions': {'Entities': {'additionalProperties': False,
2805 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2807 'required': ['entities'],
2809 'Entity': {'additionalProperties': False,
2810 'properties': {'tag': {'type': 'string'}},
2811 'required': ['tag'],
2813 'Error': {'additionalProperties': False,
2814 'properties': {'code': {'type': 'string'},
2815 'info': {'$ref': '#/definitions/ErrorInfo'},
2816 'message': {'type': 'string'}},
2817 'required': ['message', 'code'],
2819 'ErrorInfo': {'additionalProperties': False,
2820 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2821 'macaroon-path': {'type': 'string'}},
2823 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2824 'NotifyWatchResult': {'additionalProperties': False,
2825 'properties': {'NotifyWatcherId': {'type': 'string'},
2826 'error': {'$ref': '#/definitions/Error'}},
2827 'required': ['NotifyWatcherId'],
2829 'NotifyWatchResults': {'additionalProperties': False,
2830 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2832 'required': ['results'],
2834 'StringResult': {'additionalProperties': False,
2835 'properties': {'error': {'$ref': '#/definitions/Error'},
2836 'result': {'type': 'string'}},
2837 'required': ['result'],
2839 'StringResults': {'additionalProperties': False,
2840 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2842 'required': ['results'],
2844 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2845 'Result': {'$ref': '#/definitions/StringResults'}},
2847 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2848 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2853 @ReturnMapping(StringResults
)
2854 async def LoggingConfig(self
, entities
):
2856 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2857 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
2859 # map input types to rpc msg
2861 msg
= dict(type='Logger', request
='LoggingConfig', version
=1, params
=_params
)
2862 _params
['entities'] = entities
2863 reply
= await self
.rpc(msg
)
2868 @ReturnMapping(NotifyWatchResults
)
2869 async def WatchLoggingConfig(self
, entities
):
2871 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2872 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2874 # map input types to rpc msg
2876 msg
= dict(type='Logger', request
='WatchLoggingConfig', version
=1, params
=_params
)
2877 _params
['entities'] = entities
2878 reply
= await self
.rpc(msg
)
2883 class MachineActionsFacade(Type
):
2884 name
= 'MachineActions'
2886 schema
= {'definitions': {'Action': {'additionalProperties': False,
2887 'properties': {'name': {'type': 'string'},
2888 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
2891 'receiver': {'type': 'string'},
2892 'tag': {'type': 'string'}},
2893 'required': ['tag', 'receiver', 'name'],
2895 'ActionExecutionResult': {'additionalProperties': False,
2896 'properties': {'action-tag': {'type': 'string'},
2897 'message': {'type': 'string'},
2898 'results': {'patternProperties': {'.*': {'additionalProperties': True,
2901 'status': {'type': 'string'}},
2902 'required': ['action-tag', 'status'],
2904 'ActionExecutionResults': {'additionalProperties': False,
2905 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
2908 'ActionResult': {'additionalProperties': False,
2909 'properties': {'action': {'$ref': '#/definitions/Action'},
2910 'completed': {'format': 'date-time',
2912 'enqueued': {'format': 'date-time',
2914 'error': {'$ref': '#/definitions/Error'},
2915 'message': {'type': 'string'},
2916 'output': {'patternProperties': {'.*': {'additionalProperties': True,
2919 'started': {'format': 'date-time',
2921 'status': {'type': 'string'}},
2923 'ActionResults': {'additionalProperties': False,
2924 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
2927 'ActionsByReceiver': {'additionalProperties': False,
2928 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
2930 'error': {'$ref': '#/definitions/Error'},
2931 'receiver': {'type': 'string'}},
2933 'ActionsByReceivers': {'additionalProperties': False,
2934 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
2937 'Entities': {'additionalProperties': False,
2938 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2940 'required': ['entities'],
2942 'Entity': {'additionalProperties': False,
2943 'properties': {'tag': {'type': 'string'}},
2944 'required': ['tag'],
2946 'Error': {'additionalProperties': False,
2947 'properties': {'code': {'type': 'string'},
2948 'info': {'$ref': '#/definitions/ErrorInfo'},
2949 'message': {'type': 'string'}},
2950 'required': ['message', 'code'],
2952 'ErrorInfo': {'additionalProperties': False,
2953 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2954 'macaroon-path': {'type': 'string'}},
2956 'ErrorResult': {'additionalProperties': False,
2957 'properties': {'error': {'$ref': '#/definitions/Error'}},
2959 'ErrorResults': {'additionalProperties': False,
2960 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2962 'required': ['results'],
2964 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2965 'StringsWatchResult': {'additionalProperties': False,
2966 'properties': {'changes': {'items': {'type': 'string'},
2968 'error': {'$ref': '#/definitions/Error'},
2969 'watcher-id': {'type': 'string'}},
2970 'required': ['watcher-id'],
2972 'StringsWatchResults': {'additionalProperties': False,
2973 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
2975 'required': ['results'],
2977 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2978 'Result': {'$ref': '#/definitions/ActionResults'}},
2980 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2981 'Result': {'$ref': '#/definitions/ErrorResults'}},
2983 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
2984 'Result': {'$ref': '#/definitions/ErrorResults'}},
2986 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2987 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
2989 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2990 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2995 @ReturnMapping(ActionResults
)
2996 async def Actions(self
, entities
):
2998 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2999 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
3001 # map input types to rpc msg
3003 msg
= dict(type='MachineActions', request
='Actions', version
=1, params
=_params
)
3004 _params
['entities'] = entities
3005 reply
= await self
.rpc(msg
)
3010 @ReturnMapping(ErrorResults
)
3011 async def BeginActions(self
, entities
):
3013 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3014 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3016 # map input types to rpc msg
3018 msg
= dict(type='MachineActions', request
='BeginActions', version
=1, params
=_params
)
3019 _params
['entities'] = entities
3020 reply
= await self
.rpc(msg
)
3025 @ReturnMapping(ErrorResults
)
3026 async def FinishActions(self
, results
):
3028 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
3029 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3031 # map input types to rpc msg
3033 msg
= dict(type='MachineActions', request
='FinishActions', version
=1, params
=_params
)
3034 _params
['results'] = results
3035 reply
= await self
.rpc(msg
)
3040 @ReturnMapping(ActionsByReceivers
)
3041 async def RunningActions(self
, entities
):
3043 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3044 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
3046 # map input types to rpc msg
3048 msg
= dict(type='MachineActions', request
='RunningActions', version
=1, params
=_params
)
3049 _params
['entities'] = entities
3050 reply
= await self
.rpc(msg
)
3055 @ReturnMapping(StringsWatchResults
)
3056 async def WatchActionNotifications(self
, entities
):
3058 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3059 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
3061 # map input types to rpc msg
3063 msg
= dict(type='MachineActions', request
='WatchActionNotifications', version
=1, params
=_params
)
3064 _params
['entities'] = entities
3065 reply
= await self
.rpc(msg
)
3070 class MachineUndertakerFacade(Type
):
3071 name
= 'MachineUndertaker'
3073 schema
= {'definitions': {'Entities': {'additionalProperties': False,
3074 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3076 'required': ['entities'],
3078 'EntitiesResult': {'additionalProperties': False,
3079 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3081 'error': {'$ref': '#/definitions/Error'}},
3082 'required': ['entities'],
3084 'EntitiesResults': {'additionalProperties': False,
3085 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
3087 'required': ['results'],
3089 'Entity': {'additionalProperties': False,
3090 'properties': {'tag': {'type': 'string'}},
3091 'required': ['tag'],
3093 'Error': {'additionalProperties': False,
3094 'properties': {'code': {'type': 'string'},
3095 'info': {'$ref': '#/definitions/ErrorInfo'},
3096 'message': {'type': 'string'}},
3097 'required': ['message', 'code'],
3099 'ErrorInfo': {'additionalProperties': False,
3100 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3101 'macaroon-path': {'type': 'string'}},
3103 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3104 'NotifyWatchResult': {'additionalProperties': False,
3105 'properties': {'NotifyWatcherId': {'type': 'string'},
3106 'error': {'$ref': '#/definitions/Error'}},
3107 'required': ['NotifyWatcherId'],
3109 'NotifyWatchResults': {'additionalProperties': False,
3110 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3112 'required': ['results'],
3114 'ProviderInterfaceInfo': {'additionalProperties': False,
3115 'properties': {'interface-name': {'type': 'string'},
3116 'mac-address': {'type': 'string'},
3117 'provider-id': {'type': 'string'}},
3118 'required': ['interface-name',
3122 'ProviderInterfaceInfoResult': {'additionalProperties': False,
3123 'properties': {'error': {'$ref': '#/definitions/Error'},
3124 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'},
3126 'machine-tag': {'type': 'string'}},
3127 'required': ['machine-tag',
3130 'ProviderInterfaceInfoResults': {'additionalProperties': False,
3131 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'},
3133 'required': ['results'],
3135 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3136 'Result': {'$ref': '#/definitions/EntitiesResults'}},
3138 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}},
3140 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3141 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}},
3143 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3144 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3149 @ReturnMapping(EntitiesResults
)
3150 async def AllMachineRemovals(self
, entities
):
3152 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3153 Returns -> typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
3155 # map input types to rpc msg
3157 msg
= dict(type='MachineUndertaker', request
='AllMachineRemovals', version
=1, params
=_params
)
3158 _params
['entities'] = entities
3159 reply
= await self
.rpc(msg
)
3164 @ReturnMapping(None)
3165 async def CompleteMachineRemovals(self
, entities
):
3167 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3170 # map input types to rpc msg
3172 msg
= dict(type='MachineUndertaker', request
='CompleteMachineRemovals', version
=1, params
=_params
)
3173 _params
['entities'] = entities
3174 reply
= await self
.rpc(msg
)
3179 @ReturnMapping(ProviderInterfaceInfoResults
)
3180 async def GetMachineProviderInterfaceInfo(self
, entities
):
3182 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3183 Returns -> typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
3185 # map input types to rpc msg
3187 msg
= dict(type='MachineUndertaker', request
='GetMachineProviderInterfaceInfo', version
=1, params
=_params
)
3188 _params
['entities'] = entities
3189 reply
= await self
.rpc(msg
)
3194 @ReturnMapping(NotifyWatchResults
)
3195 async def WatchMachineRemovals(self
, entities
):
3197 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3198 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3200 # map input types to rpc msg
3202 msg
= dict(type='MachineUndertaker', request
='WatchMachineRemovals', version
=1, params
=_params
)
3203 _params
['entities'] = entities
3204 reply
= await self
.rpc(msg
)
3209 class MachinerFacade(Type
):
3212 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
3213 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
3216 'required': ['servers'],
3218 'Address': {'additionalProperties': False,
3219 'properties': {'scope': {'type': 'string'},
3220 'space-name': {'type': 'string'},
3221 'type': {'type': 'string'},
3222 'value': {'type': 'string'}},
3223 'required': ['value', 'type', 'scope'],
3225 'BytesResult': {'additionalProperties': False,
3226 'properties': {'result': {'items': {'type': 'integer'},
3228 'required': ['result'],
3230 'Entities': {'additionalProperties': False,
3231 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3233 'required': ['entities'],
3235 'Entity': {'additionalProperties': False,
3236 'properties': {'tag': {'type': 'string'}},
3237 'required': ['tag'],
3239 'EntityStatusArgs': {'additionalProperties': False,
3240 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3243 'info': {'type': 'string'},
3244 'status': {'type': 'string'},
3245 'tag': {'type': 'string'}},
3251 'Error': {'additionalProperties': False,
3252 'properties': {'code': {'type': 'string'},
3253 'info': {'$ref': '#/definitions/ErrorInfo'},
3254 'message': {'type': 'string'}},
3255 'required': ['message', 'code'],
3257 'ErrorInfo': {'additionalProperties': False,
3258 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3259 'macaroon-path': {'type': 'string'}},
3261 'ErrorResult': {'additionalProperties': False,
3262 'properties': {'error': {'$ref': '#/definitions/Error'}},
3264 'ErrorResults': {'additionalProperties': False,
3265 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3267 'required': ['results'],
3269 'HostPort': {'additionalProperties': False,
3270 'properties': {'Address': {'$ref': '#/definitions/Address'},
3271 'port': {'type': 'integer'}},
3272 'required': ['Address', 'port'],
3274 'JobsResult': {'additionalProperties': False,
3275 'properties': {'error': {'$ref': '#/definitions/Error'},
3276 'jobs': {'items': {'type': 'string'},
3278 'required': ['jobs'],
3280 'JobsResults': {'additionalProperties': False,
3281 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
3283 'required': ['results'],
3285 'LifeResult': {'additionalProperties': False,
3286 'properties': {'error': {'$ref': '#/definitions/Error'},
3287 'life': {'type': 'string'}},
3288 'required': ['life'],
3290 'LifeResults': {'additionalProperties': False,
3291 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
3293 'required': ['results'],
3295 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3296 'MachineAddresses': {'additionalProperties': False,
3297 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
3299 'tag': {'type': 'string'}},
3300 'required': ['tag', 'addresses'],
3302 'NetworkConfig': {'additionalProperties': False,
3303 'properties': {'address': {'type': 'string'},
3304 'cidr': {'type': 'string'},
3305 'config-type': {'type': 'string'},
3306 'device-index': {'type': 'integer'},
3307 'disabled': {'type': 'boolean'},
3308 'dns-search-domains': {'items': {'type': 'string'},
3310 'dns-servers': {'items': {'type': 'string'},
3312 'gateway-address': {'type': 'string'},
3313 'interface-name': {'type': 'string'},
3314 'interface-type': {'type': 'string'},
3315 'mac-address': {'type': 'string'},
3316 'mtu': {'type': 'integer'},
3317 'no-auto-start': {'type': 'boolean'},
3318 'parent-interface-name': {'type': 'string'},
3319 'provider-address-id': {'type': 'string'},
3320 'provider-id': {'type': 'string'},
3321 'provider-space-id': {'type': 'string'},
3322 'provider-subnet-id': {'type': 'string'},
3323 'provider-vlan-id': {'type': 'string'},
3324 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
3326 'vlan-tag': {'type': 'integer'}},
3327 'required': ['device-index',
3332 'provider-subnet-id',
3333 'provider-space-id',
3334 'provider-address-id',
3338 'parent-interface-name',
3342 'NetworkRoute': {'additionalProperties': False,
3343 'properties': {'destination-cidr': {'type': 'string'},
3344 'gateway-ip': {'type': 'string'},
3345 'metric': {'type': 'integer'}},
3346 'required': ['destination-cidr',
3350 'NotifyWatchResult': {'additionalProperties': False,
3351 'properties': {'NotifyWatcherId': {'type': 'string'},
3352 'error': {'$ref': '#/definitions/Error'}},
3353 'required': ['NotifyWatcherId'],
3355 'NotifyWatchResults': {'additionalProperties': False,
3356 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3358 'required': ['results'],
3360 'SetMachineNetworkConfig': {'additionalProperties': False,
3361 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
3363 'tag': {'type': 'string'}},
3364 'required': ['tag', 'config'],
3366 'SetMachinesAddresses': {'additionalProperties': False,
3367 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
3369 'required': ['machine-addresses'],
3371 'SetStatus': {'additionalProperties': False,
3372 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
3374 'required': ['entities'],
3376 'StringResult': {'additionalProperties': False,
3377 'properties': {'error': {'$ref': '#/definitions/Error'},
3378 'result': {'type': 'string'}},
3379 'required': ['result'],
3381 'StringsResult': {'additionalProperties': False,
3382 'properties': {'error': {'$ref': '#/definitions/Error'},
3383 'result': {'items': {'type': 'string'},
3386 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
3388 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
3390 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
3392 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3393 'Result': {'$ref': '#/definitions/ErrorResults'}},
3395 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3396 'Result': {'$ref': '#/definitions/JobsResults'}},
3398 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3399 'Result': {'$ref': '#/definitions/LifeResults'}},
3401 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3403 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
3404 'Result': {'$ref': '#/definitions/ErrorResults'}},
3406 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
3408 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3409 'Result': {'$ref': '#/definitions/ErrorResults'}},
3411 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3412 'Result': {'$ref': '#/definitions/ErrorResults'}},
3414 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3415 'Result': {'$ref': '#/definitions/ErrorResults'}},
3417 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3418 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3420 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3425 @ReturnMapping(StringsResult
)
3426 async def APIAddresses(self
):
3429 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
3431 # map input types to rpc msg
3433 msg
= dict(type='Machiner', request
='APIAddresses', version
=1, params
=_params
)
3435 reply
= await self
.rpc(msg
)
3440 @ReturnMapping(APIHostPortsResult
)
3441 async def APIHostPorts(self
):
3444 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
3446 # map input types to rpc msg
3448 msg
= dict(type='Machiner', request
='APIHostPorts', version
=1, params
=_params
)
3450 reply
= await self
.rpc(msg
)
3455 @ReturnMapping(BytesResult
)
3456 async def CACert(self
):
3459 Returns -> typing.Sequence<+T_co>[int]
3461 # map input types to rpc msg
3463 msg
= dict(type='Machiner', request
='CACert', version
=1, params
=_params
)
3465 reply
= await self
.rpc(msg
)
3470 @ReturnMapping(ErrorResults
)
3471 async def EnsureDead(self
, entities
):
3473 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3474 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3476 # map input types to rpc msg
3478 msg
= dict(type='Machiner', request
='EnsureDead', version
=1, params
=_params
)
3479 _params
['entities'] = entities
3480 reply
= await self
.rpc(msg
)
3485 @ReturnMapping(JobsResults
)
3486 async def Jobs(self
, entities
):
3488 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3489 Returns -> typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
3491 # map input types to rpc msg
3493 msg
= dict(type='Machiner', request
='Jobs', version
=1, params
=_params
)
3494 _params
['entities'] = entities
3495 reply
= await self
.rpc(msg
)
3500 @ReturnMapping(LifeResults
)
3501 async def Life(self
, entities
):
3503 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3504 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
3506 # map input types to rpc msg
3508 msg
= dict(type='Machiner', request
='Life', version
=1, params
=_params
)
3509 _params
['entities'] = entities
3510 reply
= await self
.rpc(msg
)
3515 @ReturnMapping(StringResult
)
3516 async def ModelUUID(self
):
3519 Returns -> typing.Union[_ForwardRef('Error'), str]
3521 # map input types to rpc msg
3523 msg
= dict(type='Machiner', request
='ModelUUID', version
=1, params
=_params
)
3525 reply
= await self
.rpc(msg
)
3530 @ReturnMapping(ErrorResults
)
3531 async def SetMachineAddresses(self
, machine_addresses
):
3533 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
3534 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3536 # map input types to rpc msg
3538 msg
= dict(type='Machiner', request
='SetMachineAddresses', version
=1, params
=_params
)
3539 _params
['machine-addresses'] = machine_addresses
3540 reply
= await self
.rpc(msg
)
3545 @ReturnMapping(None)
3546 async def SetObservedNetworkConfig(self
, config
, tag
):
3548 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3552 # map input types to rpc msg
3554 msg
= dict(type='Machiner', request
='SetObservedNetworkConfig', version
=1, params
=_params
)
3555 _params
['config'] = config
3556 _params
['tag'] = tag
3557 reply
= await self
.rpc(msg
)
3562 @ReturnMapping(ErrorResults
)
3563 async def SetProviderNetworkConfig(self
, entities
):
3565 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3566 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3568 # map input types to rpc msg
3570 msg
= dict(type='Machiner', request
='SetProviderNetworkConfig', version
=1, params
=_params
)
3571 _params
['entities'] = entities
3572 reply
= await self
.rpc(msg
)
3577 @ReturnMapping(ErrorResults
)
3578 async def SetStatus(self
, entities
):
3580 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3581 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3583 # map input types to rpc msg
3585 msg
= dict(type='Machiner', request
='SetStatus', version
=1, params
=_params
)
3586 _params
['entities'] = entities
3587 reply
= await self
.rpc(msg
)
3592 @ReturnMapping(ErrorResults
)
3593 async def UpdateStatus(self
, entities
):
3595 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3596 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3598 # map input types to rpc msg
3600 msg
= dict(type='Machiner', request
='UpdateStatus', version
=1, params
=_params
)
3601 _params
['entities'] = entities
3602 reply
= await self
.rpc(msg
)
3607 @ReturnMapping(NotifyWatchResults
)
3608 async def Watch(self
, entities
):
3610 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3611 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3613 # map input types to rpc msg
3615 msg
= dict(type='Machiner', request
='Watch', version
=1, params
=_params
)
3616 _params
['entities'] = entities
3617 reply
= await self
.rpc(msg
)
3622 @ReturnMapping(NotifyWatchResult
)
3623 async def WatchAPIHostPorts(self
):
3626 Returns -> typing.Union[str, _ForwardRef('Error')]
3628 # map input types to rpc msg
3630 msg
= dict(type='Machiner', request
='WatchAPIHostPorts', version
=1, params
=_params
)
3632 reply
= await self
.rpc(msg
)
3637 class MeterStatusFacade(Type
):
3638 name
= 'MeterStatus'
3640 schema
= {'definitions': {'Entities': {'additionalProperties': False,
3641 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3643 'required': ['entities'],
3645 'Entity': {'additionalProperties': False,
3646 'properties': {'tag': {'type': 'string'}},
3647 'required': ['tag'],
3649 'Error': {'additionalProperties': False,
3650 'properties': {'code': {'type': 'string'},
3651 'info': {'$ref': '#/definitions/ErrorInfo'},
3652 'message': {'type': 'string'}},
3653 'required': ['message', 'code'],
3655 'ErrorInfo': {'additionalProperties': False,
3656 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3657 'macaroon-path': {'type': 'string'}},
3659 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3660 'MeterStatusResult': {'additionalProperties': False,
3661 'properties': {'code': {'type': 'string'},
3662 'error': {'$ref': '#/definitions/Error'},
3663 'info': {'type': 'string'}},
3664 'required': ['code', 'info'],
3666 'MeterStatusResults': {'additionalProperties': False,
3667 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
3669 'required': ['results'],
3671 'NotifyWatchResult': {'additionalProperties': False,
3672 'properties': {'NotifyWatcherId': {'type': 'string'},
3673 'error': {'$ref': '#/definitions/Error'}},
3674 'required': ['NotifyWatcherId'],
3676 'NotifyWatchResults': {'additionalProperties': False,
3677 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3679 'required': ['results'],
3681 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3682 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
3684 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3685 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3690 @ReturnMapping(MeterStatusResults
)
3691 async def GetMeterStatus(self
, entities
):
3693 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3694 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
3696 # map input types to rpc msg
3698 msg
= dict(type='MeterStatus', request
='GetMeterStatus', version
=1, params
=_params
)
3699 _params
['entities'] = entities
3700 reply
= await self
.rpc(msg
)
3705 @ReturnMapping(NotifyWatchResults
)
3706 async def WatchMeterStatus(self
, entities
):
3708 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3709 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3711 # map input types to rpc msg
3713 msg
= dict(type='MeterStatus', request
='WatchMeterStatus', version
=1, params
=_params
)
3714 _params
['entities'] = entities
3715 reply
= await self
.rpc(msg
)
3720 class MetricsManagerFacade(Type
):
3721 name
= 'MetricsManager'
3723 schema
= {'definitions': {'Entities': {'additionalProperties': False,
3724 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3726 'required': ['entities'],
3728 'Entity': {'additionalProperties': False,
3729 'properties': {'tag': {'type': 'string'}},
3730 'required': ['tag'],
3732 'Error': {'additionalProperties': False,
3733 'properties': {'code': {'type': 'string'},
3734 'info': {'$ref': '#/definitions/ErrorInfo'},
3735 'message': {'type': 'string'}},
3736 'required': ['message', 'code'],
3738 'ErrorInfo': {'additionalProperties': False,
3739 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3740 'macaroon-path': {'type': 'string'}},
3742 'ErrorResult': {'additionalProperties': False,
3743 'properties': {'error': {'$ref': '#/definitions/Error'}},
3745 'ErrorResults': {'additionalProperties': False,
3746 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3748 'required': ['results'],
3750 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
3751 'properties': {'AddJujuMachineMetrics': {'type': 'object'},
3752 'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3753 'Result': {'$ref': '#/definitions/ErrorResults'}},
3755 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3756 'Result': {'$ref': '#/definitions/ErrorResults'}},
3761 @ReturnMapping(None)
3762 async def AddJujuMachineMetrics(self
):
3767 # map input types to rpc msg
3769 msg
= dict(type='MetricsManager', request
='AddJujuMachineMetrics', version
=1, params
=_params
)
3771 reply
= await self
.rpc(msg
)
3776 @ReturnMapping(ErrorResults
)
3777 async def CleanupOldMetrics(self
, entities
):
3779 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3780 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3782 # map input types to rpc msg
3784 msg
= dict(type='MetricsManager', request
='CleanupOldMetrics', version
=1, params
=_params
)
3785 _params
['entities'] = entities
3786 reply
= await self
.rpc(msg
)
3791 @ReturnMapping(ErrorResults
)
3792 async def SendMetrics(self
, entities
):
3794 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3795 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3797 # map input types to rpc msg
3799 msg
= dict(type='MetricsManager', request
='SendMetrics', version
=1, params
=_params
)
3800 _params
['entities'] = entities
3801 reply
= await self
.rpc(msg
)
3806 class MigrationFlagFacade(Type
):
3807 name
= 'MigrationFlag'
3809 schema
= {'definitions': {'Entities': {'additionalProperties': False,
3810 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3812 'required': ['entities'],
3814 'Entity': {'additionalProperties': False,
3815 'properties': {'tag': {'type': 'string'}},
3816 'required': ['tag'],
3818 'Error': {'additionalProperties': False,
3819 'properties': {'code': {'type': 'string'},
3820 'info': {'$ref': '#/definitions/ErrorInfo'},
3821 'message': {'type': 'string'}},
3822 'required': ['message', 'code'],
3824 'ErrorInfo': {'additionalProperties': False,
3825 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3826 'macaroon-path': {'type': 'string'}},
3828 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3829 'NotifyWatchResult': {'additionalProperties': False,
3830 'properties': {'NotifyWatcherId': {'type': 'string'},
3831 'error': {'$ref': '#/definitions/Error'}},
3832 'required': ['NotifyWatcherId'],
3834 'NotifyWatchResults': {'additionalProperties': False,
3835 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3837 'required': ['results'],
3839 'PhaseResult': {'additionalProperties': False,
3840 'properties': {'error': {'$ref': '#/definitions/Error'},
3841 'phase': {'type': 'string'}},
3843 'PhaseResults': {'additionalProperties': False,
3844 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
3846 'required': ['results'],
3848 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3849 'Result': {'$ref': '#/definitions/PhaseResults'}},
3851 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3852 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3857 @ReturnMapping(PhaseResults
)
3858 async def Phase(self
, entities
):
3860 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3861 Returns -> typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
3863 # map input types to rpc msg
3865 msg
= dict(type='MigrationFlag', request
='Phase', version
=1, params
=_params
)
3866 _params
['entities'] = entities
3867 reply
= await self
.rpc(msg
)
3872 @ReturnMapping(NotifyWatchResults
)
3873 async def Watch(self
, entities
):
3875 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3876 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3878 # map input types to rpc msg
3880 msg
= dict(type='MigrationFlag', request
='Watch', version
=1, params
=_params
)
3881 _params
['entities'] = entities
3882 reply
= await self
.rpc(msg
)
3887 class MigrationMasterFacade(Type
):
3888 name
= 'MigrationMaster'
3890 schema
= {'definitions': {'Error': {'additionalProperties': False,
3891 'properties': {'code': {'type': 'string'},
3892 'info': {'$ref': '#/definitions/ErrorInfo'},
3893 'message': {'type': 'string'}},
3894 'required': ['message', 'code'],
3896 'ErrorInfo': {'additionalProperties': False,
3897 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3898 'macaroon-path': {'type': 'string'}},
3900 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3901 'MasterMigrationStatus': {'additionalProperties': False,
3902 'properties': {'migration-id': {'type': 'string'},
3903 'phase': {'type': 'string'},
3904 'phase-changed-time': {'format': 'date-time',
3906 'spec': {'$ref': '#/definitions/MigrationSpec'}},
3907 'required': ['spec',
3910 'phase-changed-time'],
3912 'MigrationModelInfo': {'additionalProperties': False,
3913 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
3914 'controller-agent-version': {'$ref': '#/definitions/Number'},
3915 'name': {'type': 'string'},
3916 'owner-tag': {'type': 'string'},
3917 'uuid': {'type': 'string'}},
3918 'required': ['uuid',
3922 'controller-agent-version'],
3924 'MigrationSpec': {'additionalProperties': False,
3925 'properties': {'external-control': {'type': 'boolean'},
3926 'model-tag': {'type': 'string'},
3927 'skip-initial-prechecks': {'type': 'boolean'},
3928 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
3929 'required': ['model-tag',
3932 'skip-initial-prechecks'],
3934 'MigrationTargetInfo': {'additionalProperties': False,
3935 'properties': {'addrs': {'items': {'type': 'string'},
3937 'auth-tag': {'type': 'string'},
3938 'ca-cert': {'type': 'string'},
3939 'controller-tag': {'type': 'string'},
3940 'macaroons': {'type': 'string'},
3941 'password': {'type': 'string'}},
3942 'required': ['controller-tag',
3947 'MinionReports': {'additionalProperties': False,
3948 'properties': {'failed': {'items': {'type': 'string'},
3950 'migration-id': {'type': 'string'},
3951 'phase': {'type': 'string'},
3952 'success-count': {'type': 'integer'},
3953 'unknown-count': {'type': 'integer'},
3954 'unknown-sample': {'items': {'type': 'string'},
3956 'required': ['migration-id',
3963 'NotifyWatchResult': {'additionalProperties': False,
3964 'properties': {'NotifyWatcherId': {'type': 'string'},
3965 'error': {'$ref': '#/definitions/Error'}},
3966 'required': ['NotifyWatcherId'],
3968 'Number': {'additionalProperties': False,
3969 'properties': {'Build': {'type': 'integer'},
3970 'Major': {'type': 'integer'},
3971 'Minor': {'type': 'integer'},
3972 'Patch': {'type': 'integer'},
3973 'Tag': {'type': 'string'}},
3974 'required': ['Major',
3980 'SerializedModel': {'additionalProperties': False,
3981 'properties': {'bytes': {'items': {'type': 'integer'},
3983 'charms': {'items': {'type': 'string'},
3985 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
3987 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
3989 'required': ['bytes',
3994 'SerializedModelResource': {'additionalProperties': False,
3995 'properties': {'application': {'type': 'string'},
3996 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
3997 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
3998 'name': {'type': 'string'},
3999 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}},
4001 'required': ['application',
4003 'application-revision',
4004 'charmstore-revision',
4007 'SerializedModelResourceRevision': {'additionalProperties': False,
4008 'properties': {'description': {'type': 'string'},
4009 'fingerprint': {'type': 'string'},
4010 'origin': {'type': 'string'},
4011 'path': {'type': 'string'},
4012 'revision': {'type': 'integer'},
4013 'size': {'type': 'integer'},
4014 'timestamp': {'format': 'date-time',
4016 'type': {'type': 'string'},
4017 'username': {'type': 'string'}},
4018 'required': ['revision',
4027 'SerializedModelTools': {'additionalProperties': False,
4028 'properties': {'uri': {'type': 'string'},
4029 'version': {'type': 'string'}},
4030 'required': ['version', 'uri'],
4032 'SetMigrationPhaseArgs': {'additionalProperties': False,
4033 'properties': {'phase': {'type': 'string'}},
4034 'required': ['phase'],
4036 'SetMigrationStatusMessageArgs': {'additionalProperties': False,
4037 'properties': {'message': {'type': 'string'}},
4038 'required': ['message'],
4040 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
4042 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}},
4044 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}},
4046 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}},
4048 'Prechecks': {'type': 'object'},
4049 'Reap': {'type': 'object'},
4050 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
4052 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
4054 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4056 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4061 @ReturnMapping(SerializedModel
)
4062 async def Export(self
):
4065 Returns -> typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
4067 # map input types to rpc msg
4069 msg
= dict(type='MigrationMaster', request
='Export', version
=1, params
=_params
)
4071 reply
= await self
.rpc(msg
)
4076 @ReturnMapping(MasterMigrationStatus
)
4077 async def MigrationStatus(self
):
4080 Returns -> typing.Union[str, _ForwardRef('MigrationSpec')]
4082 # map input types to rpc msg
4084 msg
= dict(type='MigrationMaster', request
='MigrationStatus', version
=1, params
=_params
)
4086 reply
= await self
.rpc(msg
)
4091 @ReturnMapping(MinionReports
)
4092 async def MinionReports(self
):
4095 Returns -> typing.Union[typing.Sequence<+T_co>[str], int]
4097 # map input types to rpc msg
4099 msg
= dict(type='MigrationMaster', request
='MinionReports', version
=1, params
=_params
)
4101 reply
= await self
.rpc(msg
)
4106 @ReturnMapping(MigrationModelInfo
)
4107 async def ModelInfo(self
):
4110 Returns -> typing.Union[_ForwardRef('Number'), str]
4112 # map input types to rpc msg
4114 msg
= dict(type='MigrationMaster', request
='ModelInfo', version
=1, params
=_params
)
4116 reply
= await self
.rpc(msg
)
4121 @ReturnMapping(None)
4122 async def Prechecks(self
):
4127 # map input types to rpc msg
4129 msg
= dict(type='MigrationMaster', request
='Prechecks', version
=1, params
=_params
)
4131 reply
= await self
.rpc(msg
)
4136 @ReturnMapping(None)
4137 async def Reap(self
):
4142 # map input types to rpc msg
4144 msg
= dict(type='MigrationMaster', request
='Reap', version
=1, params
=_params
)
4146 reply
= await self
.rpc(msg
)
4151 @ReturnMapping(None)
4152 async def SetPhase(self
, phase
):
4157 # map input types to rpc msg
4159 msg
= dict(type='MigrationMaster', request
='SetPhase', version
=1, params
=_params
)
4160 _params
['phase'] = phase
4161 reply
= await self
.rpc(msg
)
4166 @ReturnMapping(None)
4167 async def SetStatusMessage(self
, message
):
4172 # map input types to rpc msg
4174 msg
= dict(type='MigrationMaster', request
='SetStatusMessage', version
=1, params
=_params
)
4175 _params
['message'] = message
4176 reply
= await self
.rpc(msg
)
4181 @ReturnMapping(NotifyWatchResult
)
4182 async def Watch(self
):
4185 Returns -> typing.Union[str, _ForwardRef('Error')]
4187 # map input types to rpc msg
4189 msg
= dict(type='MigrationMaster', request
='Watch', version
=1, params
=_params
)
4191 reply
= await self
.rpc(msg
)
4196 @ReturnMapping(NotifyWatchResult
)
4197 async def WatchMinionReports(self
):
4200 Returns -> typing.Union[str, _ForwardRef('Error')]
4202 # map input types to rpc msg
4204 msg
= dict(type='MigrationMaster', request
='WatchMinionReports', version
=1, params
=_params
)
4206 reply
= await self
.rpc(msg
)
4211 class MigrationMinionFacade(Type
):
4212 name
= 'MigrationMinion'
4214 schema
= {'definitions': {'Error': {'additionalProperties': False,
4215 'properties': {'code': {'type': 'string'},
4216 'info': {'$ref': '#/definitions/ErrorInfo'},
4217 'message': {'type': 'string'}},
4218 'required': ['message', 'code'],
4220 'ErrorInfo': {'additionalProperties': False,
4221 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4222 'macaroon-path': {'type': 'string'}},
4224 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4225 'MinionReport': {'additionalProperties': False,
4226 'properties': {'migration-id': {'type': 'string'},
4227 'phase': {'type': 'string'},
4228 'success': {'type': 'boolean'}},
4229 'required': ['migration-id',
4233 'NotifyWatchResult': {'additionalProperties': False,
4234 'properties': {'NotifyWatcherId': {'type': 'string'},
4235 'error': {'$ref': '#/definitions/Error'}},
4236 'required': ['NotifyWatcherId'],
4238 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}},
4240 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4245 @ReturnMapping(None)
4246 async def Report(self
, migration_id
, phase
, success
):
4253 # map input types to rpc msg
4255 msg
= dict(type='MigrationMinion', request
='Report', version
=1, params
=_params
)
4256 _params
['migration-id'] = migration_id
4257 _params
['phase'] = phase
4258 _params
['success'] = success
4259 reply
= await self
.rpc(msg
)
4264 @ReturnMapping(NotifyWatchResult
)
4265 async def Watch(self
):
4268 Returns -> typing.Union[str, _ForwardRef('Error')]
4270 # map input types to rpc msg
4272 msg
= dict(type='MigrationMinion', request
='Watch', version
=1, params
=_params
)
4274 reply
= await self
.rpc(msg
)
4279 class MigrationStatusWatcherFacade(Type
):
4280 name
= 'MigrationStatusWatcher'
4282 schema
= {'definitions': {'MigrationStatus': {'additionalProperties': False,
4283 'properties': {'attempt': {'type': 'integer'},
4284 'external-control': {'type': 'boolean'},
4285 'migration-id': {'type': 'string'},
4286 'phase': {'type': 'string'},
4287 'source-api-addrs': {'items': {'type': 'string'},
4289 'source-ca-cert': {'type': 'string'},
4290 'target-api-addrs': {'items': {'type': 'string'},
4292 'target-ca-cert': {'type': 'string'}},
4293 'required': ['migration-id',
4302 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
4304 'Stop': {'type': 'object'}},
4308 @ReturnMapping(MigrationStatus
)
4309 async def Next(self
):
4312 Returns -> typing.Union[int, typing.Sequence<+T_co>[str]]
4314 # map input types to rpc msg
4316 msg
= dict(type='MigrationStatusWatcher', request
='Next', version
=1, params
=_params
)
4318 reply
= await self
.rpc(msg
)
4323 @ReturnMapping(None)
4324 async def Stop(self
):
4329 # map input types to rpc msg
4331 msg
= dict(type='MigrationStatusWatcher', request
='Stop', version
=1, params
=_params
)
4333 reply
= await self
.rpc(msg
)
4338 class MigrationTargetFacade(Type
):
4339 name
= 'MigrationTarget'
4341 schema
= {'definitions': {'AdoptResourcesArgs': {'additionalProperties': False,
4342 'properties': {'model-tag': {'type': 'string'},
4343 'source-controller-version': {'$ref': '#/definitions/Number'}},
4344 'required': ['model-tag',
4345 'source-controller-version'],
4347 'MigrationModelInfo': {'additionalProperties': False,
4348 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
4349 'controller-agent-version': {'$ref': '#/definitions/Number'},
4350 'name': {'type': 'string'},
4351 'owner-tag': {'type': 'string'},
4352 'uuid': {'type': 'string'}},
4353 'required': ['uuid',
4357 'controller-agent-version'],
4359 'ModelArgs': {'additionalProperties': False,
4360 'properties': {'model-tag': {'type': 'string'}},
4361 'required': ['model-tag'],
4363 'Number': {'additionalProperties': False,
4364 'properties': {'Build': {'type': 'integer'},
4365 'Major': {'type': 'integer'},
4366 'Minor': {'type': 'integer'},
4367 'Patch': {'type': 'integer'},
4368 'Tag': {'type': 'string'}},
4369 'required': ['Major',
4375 'SerializedModel': {'additionalProperties': False,
4376 'properties': {'bytes': {'items': {'type': 'integer'},
4378 'charms': {'items': {'type': 'string'},
4380 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
4382 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
4384 'required': ['bytes',
4389 'SerializedModelResource': {'additionalProperties': False,
4390 'properties': {'application': {'type': 'string'},
4391 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
4392 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
4393 'name': {'type': 'string'},
4394 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}},
4396 'required': ['application',
4398 'application-revision',
4399 'charmstore-revision',
4402 'SerializedModelResourceRevision': {'additionalProperties': False,
4403 'properties': {'description': {'type': 'string'},
4404 'fingerprint': {'type': 'string'},
4405 'origin': {'type': 'string'},
4406 'path': {'type': 'string'},
4407 'revision': {'type': 'integer'},
4408 'size': {'type': 'integer'},
4409 'timestamp': {'format': 'date-time',
4411 'type': {'type': 'string'},
4412 'username': {'type': 'string'}},
4413 'required': ['revision',
4422 'SerializedModelTools': {'additionalProperties': False,
4423 'properties': {'uri': {'type': 'string'},
4424 'version': {'type': 'string'}},
4425 'required': ['version', 'uri'],
4427 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
4429 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
4431 'AdoptResources': {'properties': {'Params': {'$ref': '#/definitions/AdoptResourcesArgs'}},
4433 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
4435 'LatestLogTime': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'},
4436 'Result': {'format': 'date-time',
4439 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}},
4444 @ReturnMapping(None)
4445 async def Abort(self
, model_tag
):
4450 # map input types to rpc msg
4452 msg
= dict(type='MigrationTarget', request
='Abort', version
=1, params
=_params
)
4453 _params
['model-tag'] = model_tag
4454 reply
= await self
.rpc(msg
)
4459 @ReturnMapping(None)
4460 async def Activate(self
, model_tag
):
4465 # map input types to rpc msg
4467 msg
= dict(type='MigrationTarget', request
='Activate', version
=1, params
=_params
)
4468 _params
['model-tag'] = model_tag
4469 reply
= await self
.rpc(msg
)
4474 @ReturnMapping(None)
4475 async def AdoptResources(self
, model_tag
, source_controller_version
):
4478 source_controller_version : Number
4481 # map input types to rpc msg
4483 msg
= dict(type='MigrationTarget', request
='AdoptResources', version
=1, params
=_params
)
4484 _params
['model-tag'] = model_tag
4485 _params
['source-controller-version'] = source_controller_version
4486 reply
= await self
.rpc(msg
)
4491 @ReturnMapping(None)
4492 async def Import(self
, bytes_
, charms
, tools
):
4494 bytes_ : typing.Sequence<+T_co>[int]
4495 charms : typing.Sequence<+T_co>[str]
4496 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
4499 # map input types to rpc msg
4501 msg
= dict(type='MigrationTarget', request
='Import', version
=1, params
=_params
)
4502 _params
['bytes'] = bytes_
4503 _params
['charms'] = charms
4504 _params
['tools'] = tools
4505 reply
= await self
.rpc(msg
)
4511 async def LatestLogTime(self
, model_tag
):
4516 # map input types to rpc msg
4518 msg
= dict(type='MigrationTarget', request
='LatestLogTime', version
=1, params
=_params
)
4519 _params
['model-tag'] = model_tag
4520 reply
= await self
.rpc(msg
)
4525 @ReturnMapping(None)
4526 async def Prechecks(self
, agent_version
, name
, owner_tag
, uuid
):
4528 agent_version : Number
4534 # map input types to rpc msg
4536 msg
= dict(type='MigrationTarget', request
='Prechecks', version
=1, params
=_params
)
4537 _params
['agent-version'] = agent_version
4538 _params
['name'] = name
4539 _params
['owner-tag'] = owner_tag
4540 _params
['uuid'] = uuid
4541 reply
= await self
.rpc(msg
)
4546 class ModelConfigFacade(Type
):
4547 name
= 'ModelConfig'
4549 schema
= {'definitions': {'ConfigValue': {'additionalProperties': False,
4550 'properties': {'source': {'type': 'string'},
4551 'value': {'additionalProperties': True,
4553 'required': ['value', 'source'],
4555 'Error': {'additionalProperties': False,
4556 'properties': {'code': {'type': 'string'},
4557 'info': {'$ref': '#/definitions/ErrorInfo'},
4558 'message': {'type': 'string'}},
4559 'required': ['message', 'code'],
4561 'ErrorInfo': {'additionalProperties': False,
4562 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4563 'macaroon-path': {'type': 'string'}},
4565 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4566 'ModelConfigResults': {'additionalProperties': False,
4567 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
4569 'required': ['config'],
4571 'ModelSLA': {'additionalProperties': False,
4572 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
4573 'creds': {'items': {'type': 'integer'},
4575 'required': ['ModelSLAInfo', 'creds'],
4577 'ModelSLAInfo': {'additionalProperties': False,
4578 'properties': {'level': {'type': 'string'},
4579 'owner': {'type': 'string'}},
4580 'required': ['level', 'owner'],
4582 'ModelSet': {'additionalProperties': False,
4583 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
4586 'required': ['config'],
4588 'ModelUnset': {'additionalProperties': False,
4589 'properties': {'keys': {'items': {'type': 'string'},
4591 'required': ['keys'],
4593 'StringResult': {'additionalProperties': False,
4594 'properties': {'error': {'$ref': '#/definitions/Error'},
4595 'result': {'type': 'string'}},
4596 'required': ['result'],
4598 'properties': {'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
4600 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
4602 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
4604 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
4606 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
4611 @ReturnMapping(ModelConfigResults
)
4612 async def ModelGet(self
):
4615 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
4617 # map input types to rpc msg
4619 msg
= dict(type='ModelConfig', request
='ModelGet', version
=1, params
=_params
)
4621 reply
= await self
.rpc(msg
)
4626 @ReturnMapping(None)
4627 async def ModelSet(self
, config
):
4629 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4632 # map input types to rpc msg
4634 msg
= dict(type='ModelConfig', request
='ModelSet', version
=1, params
=_params
)
4635 _params
['config'] = config
4636 reply
= await self
.rpc(msg
)
4641 @ReturnMapping(None)
4642 async def ModelUnset(self
, keys
):
4644 keys : typing.Sequence<+T_co>[str]
4647 # map input types to rpc msg
4649 msg
= dict(type='ModelConfig', request
='ModelUnset', version
=1, params
=_params
)
4650 _params
['keys'] = keys
4651 reply
= await self
.rpc(msg
)
4656 @ReturnMapping(StringResult
)
4657 async def SLALevel(self
):
4660 Returns -> typing.Union[_ForwardRef('Error'), str]
4662 # map input types to rpc msg
4664 msg
= dict(type='ModelConfig', request
='SLALevel', version
=1, params
=_params
)
4666 reply
= await self
.rpc(msg
)
4671 @ReturnMapping(None)
4672 async def SetSLALevel(self
, creds
, level
):
4674 creds : typing.Sequence<+T_co>[int]
4678 # map input types to rpc msg
4680 msg
= dict(type='ModelConfig', request
='SetSLALevel', version
=1, params
=_params
)
4681 _params
['creds'] = creds
4682 _params
['level'] = level
4683 reply
= await self
.rpc(msg
)
4688 class NotifyWatcherFacade(Type
):
4689 name
= 'NotifyWatcher'
4691 schema
= {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
4695 @ReturnMapping(None)
4696 async def Next(self
):
4701 # map input types to rpc msg
4703 msg
= dict(type='NotifyWatcher', request
='Next', version
=1, params
=_params
)
4705 reply
= await self
.rpc(msg
)
4710 @ReturnMapping(None)
4711 async def Stop(self
):
4716 # map input types to rpc msg
4718 msg
= dict(type='NotifyWatcher', request
='Stop', version
=1, params
=_params
)
4720 reply
= await self
.rpc(msg
)
4725 class PayloadsFacade(Type
):
4728 schema
= {'definitions': {'Payload': {'additionalProperties': False,
4729 'properties': {'class': {'type': 'string'},
4730 'id': {'type': 'string'},
4731 'labels': {'items': {'type': 'string'},
4733 'machine': {'type': 'string'},
4734 'status': {'type': 'string'},
4735 'type': {'type': 'string'},
4736 'unit': {'type': 'string'}},
4737 'required': ['class',
4745 'PayloadListArgs': {'additionalProperties': False,
4746 'properties': {'patterns': {'items': {'type': 'string'},
4748 'required': ['patterns'],
4750 'PayloadListResults': {'additionalProperties': False,
4751 'properties': {'results': {'items': {'$ref': '#/definitions/Payload'},
4753 'required': ['results'],
4755 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/PayloadListArgs'},
4756 'Result': {'$ref': '#/definitions/PayloadListResults'}},
4761 @ReturnMapping(PayloadListResults
)
4762 async def List(self
, patterns
):
4764 patterns : typing.Sequence<+T_co>[str]
4765 Returns -> typing.Sequence<+T_co>[~Payload]<~Payload>
4767 # map input types to rpc msg
4769 msg
= dict(type='Payloads', request
='List', version
=1, params
=_params
)
4770 _params
['patterns'] = patterns
4771 reply
= await self
.rpc(msg
)
4776 class PayloadsHookContextFacade(Type
):
4777 name
= 'PayloadsHookContext'
4779 schema
= {'definitions': {'Entities': {'additionalProperties': False,
4780 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
4782 'required': ['entities'],
4784 'Entity': {'additionalProperties': False,
4785 'properties': {'tag': {'type': 'string'}},
4786 'required': ['tag'],
4788 'Error': {'additionalProperties': False,
4789 'properties': {'code': {'type': 'string'},
4790 'info': {'$ref': '#/definitions/ErrorInfo'},
4791 'message': {'type': 'string'}},
4792 'required': ['message', 'code'],
4794 'ErrorInfo': {'additionalProperties': False,
4795 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4796 'macaroon-path': {'type': 'string'}},
4798 'LookUpPayloadArg': {'additionalProperties': False,
4799 'properties': {'id': {'type': 'string'},
4800 'name': {'type': 'string'}},
4801 'required': ['name', 'id'],
4803 'LookUpPayloadArgs': {'additionalProperties': False,
4804 'properties': {'args': {'items': {'$ref': '#/definitions/LookUpPayloadArg'},
4806 'required': ['args'],
4808 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4809 'Payload': {'additionalProperties': False,
4810 'properties': {'class': {'type': 'string'},
4811 'id': {'type': 'string'},
4812 'labels': {'items': {'type': 'string'},
4814 'machine': {'type': 'string'},
4815 'status': {'type': 'string'},
4816 'type': {'type': 'string'},
4817 'unit': {'type': 'string'}},
4818 'required': ['class',
4826 'PayloadResult': {'additionalProperties': False,
4827 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
4828 'error': {'$ref': '#/definitions/Error'},
4829 'not-found': {'type': 'boolean'},
4830 'payload': {'$ref': '#/definitions/Payload'}},
4831 'required': ['Entity',
4835 'PayloadResults': {'additionalProperties': False,
4836 'properties': {'results': {'items': {'$ref': '#/definitions/PayloadResult'},
4838 'required': ['results'],
4840 'SetPayloadStatusArg': {'additionalProperties': False,
4841 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
4842 'status': {'type': 'string'}},
4843 'required': ['Entity', 'status'],
4845 'SetPayloadStatusArgs': {'additionalProperties': False,
4846 'properties': {'args': {'items': {'$ref': '#/definitions/SetPayloadStatusArg'},
4848 'required': ['args'],
4850 'TrackPayloadArgs': {'additionalProperties': False,
4851 'properties': {'payloads': {'items': {'$ref': '#/definitions/Payload'},
4853 'required': ['payloads'],
4855 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4856 'Result': {'$ref': '#/definitions/PayloadResults'}},
4858 'LookUp': {'properties': {'Params': {'$ref': '#/definitions/LookUpPayloadArgs'},
4859 'Result': {'$ref': '#/definitions/PayloadResults'}},
4861 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetPayloadStatusArgs'},
4862 'Result': {'$ref': '#/definitions/PayloadResults'}},
4864 'Track': {'properties': {'Params': {'$ref': '#/definitions/TrackPayloadArgs'},
4865 'Result': {'$ref': '#/definitions/PayloadResults'}},
4867 'Untrack': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4868 'Result': {'$ref': '#/definitions/PayloadResults'}},
4873 @ReturnMapping(PayloadResults
)
4874 async def List(self
, entities
):
4876 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4877 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4879 # map input types to rpc msg
4881 msg
= dict(type='PayloadsHookContext', request
='List', version
=1, params
=_params
)
4882 _params
['entities'] = entities
4883 reply
= await self
.rpc(msg
)
4888 @ReturnMapping(PayloadResults
)
4889 async def LookUp(self
, args
):
4891 args : typing.Sequence<+T_co>[~LookUpPayloadArg]<~LookUpPayloadArg>
4892 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4894 # map input types to rpc msg
4896 msg
= dict(type='PayloadsHookContext', request
='LookUp', version
=1, params
=_params
)
4897 _params
['args'] = args
4898 reply
= await self
.rpc(msg
)
4903 @ReturnMapping(PayloadResults
)
4904 async def SetStatus(self
, args
):
4906 args : typing.Sequence<+T_co>[~SetPayloadStatusArg]<~SetPayloadStatusArg>
4907 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4909 # map input types to rpc msg
4911 msg
= dict(type='PayloadsHookContext', request
='SetStatus', version
=1, params
=_params
)
4912 _params
['args'] = args
4913 reply
= await self
.rpc(msg
)
4918 @ReturnMapping(PayloadResults
)
4919 async def Track(self
, payloads
):
4921 payloads : typing.Sequence<+T_co>[~Payload]<~Payload>
4922 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4924 # map input types to rpc msg
4926 msg
= dict(type='PayloadsHookContext', request
='Track', version
=1, params
=_params
)
4927 _params
['payloads'] = payloads
4928 reply
= await self
.rpc(msg
)
4933 @ReturnMapping(PayloadResults
)
4934 async def Untrack(self
, entities
):
4936 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4937 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4939 # map input types to rpc msg
4941 msg
= dict(type='PayloadsHookContext', request
='Untrack', version
=1, params
=_params
)
4942 _params
['entities'] = entities
4943 reply
= await self
.rpc(msg
)
4948 class PingerFacade(Type
):
4951 schema
= {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
4955 @ReturnMapping(None)
4956 async def Ping(self
):
4961 # map input types to rpc msg
4963 msg
= dict(type='Pinger', request
='Ping', version
=1, params
=_params
)
4965 reply
= await self
.rpc(msg
)
4970 @ReturnMapping(None)
4971 async def Stop(self
):
4976 # map input types to rpc msg
4978 msg
= dict(type='Pinger', request
='Stop', version
=1, params
=_params
)
4980 reply
= await self
.rpc(msg
)
4985 class ProxyUpdaterFacade(Type
):
4986 name
= 'ProxyUpdater'
4988 schema
= {'definitions': {'Entities': {'additionalProperties': False,
4989 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
4991 'required': ['entities'],
4993 'Entity': {'additionalProperties': False,
4994 'properties': {'tag': {'type': 'string'}},
4995 'required': ['tag'],
4997 'Error': {'additionalProperties': False,
4998 'properties': {'code': {'type': 'string'},
4999 'info': {'$ref': '#/definitions/ErrorInfo'},
5000 'message': {'type': 'string'}},
5001 'required': ['message', 'code'],
5003 'ErrorInfo': {'additionalProperties': False,
5004 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5005 'macaroon-path': {'type': 'string'}},
5007 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5008 'NotifyWatchResult': {'additionalProperties': False,
5009 'properties': {'NotifyWatcherId': {'type': 'string'},
5010 'error': {'$ref': '#/definitions/Error'}},
5011 'required': ['NotifyWatcherId'],
5013 'NotifyWatchResults': {'additionalProperties': False,
5014 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5016 'required': ['results'],
5018 'ProxyConfig': {'additionalProperties': False,
5019 'properties': {'ftp': {'type': 'string'},
5020 'http': {'type': 'string'},
5021 'https': {'type': 'string'},
5022 'no-proxy': {'type': 'string'}},
5023 'required': ['http',
5028 'ProxyConfigResult': {'additionalProperties': False,
5029 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
5030 'error': {'$ref': '#/definitions/Error'},
5031 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}},
5032 'required': ['proxy-settings',
5033 'apt-proxy-settings'],
5035 'ProxyConfigResults': {'additionalProperties': False,
5036 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
5038 'required': ['results'],
5040 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5041 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
5043 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5044 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5049 @ReturnMapping(ProxyConfigResults
)
5050 async def ProxyConfig(self
, entities
):
5052 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5053 Returns -> typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
5055 # map input types to rpc msg
5057 msg
= dict(type='ProxyUpdater', request
='ProxyConfig', version
=1, params
=_params
)
5058 _params
['entities'] = entities
5059 reply
= await self
.rpc(msg
)
5064 @ReturnMapping(NotifyWatchResults
)
5065 async def WatchForProxyConfigAndAPIHostPortChanges(self
, entities
):
5067 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5068 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
5070 # map input types to rpc msg
5072 msg
= dict(type='ProxyUpdater', request
='WatchForProxyConfigAndAPIHostPortChanges', version
=1, params
=_params
)
5073 _params
['entities'] = entities
5074 reply
= await self
.rpc(msg
)
5079 class RelationUnitsWatcherFacade(Type
):
5080 name
= 'RelationUnitsWatcher'
5082 schema
= {'definitions': {'Error': {'additionalProperties': False,
5083 'properties': {'code': {'type': 'string'},
5084 'info': {'$ref': '#/definitions/ErrorInfo'},
5085 'message': {'type': 'string'}},
5086 'required': ['message', 'code'],
5088 'ErrorInfo': {'additionalProperties': False,
5089 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5090 'macaroon-path': {'type': 'string'}},
5092 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5093 'RelationUnitsChange': {'additionalProperties': False,
5094 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
5096 'departed': {'items': {'type': 'string'},
5098 'required': ['changed'],
5100 'RelationUnitsWatchResult': {'additionalProperties': False,
5101 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
5102 'error': {'$ref': '#/definitions/Error'},
5103 'watcher-id': {'type': 'string'}},
5104 'required': ['watcher-id',
5107 'UnitSettings': {'additionalProperties': False,
5108 'properties': {'version': {'type': 'integer'}},
5109 'required': ['version'],
5111 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
5113 'Stop': {'type': 'object'}},
5117 @ReturnMapping(RelationUnitsWatchResult
)
5118 async def Next(self
):
5121 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
5123 # map input types to rpc msg
5125 msg
= dict(type='RelationUnitsWatcher', request
='Next', version
=1, params
=_params
)
5127 reply
= await self
.rpc(msg
)
5132 @ReturnMapping(None)
5133 async def Stop(self
):
5138 # map input types to rpc msg
5140 msg
= dict(type='RelationUnitsWatcher', request
='Stop', version
=1, params
=_params
)
5142 reply
= await self
.rpc(msg
)
5147 class RemoteApplicationWatcherFacade(Type
):
5148 name
= 'RemoteApplicationWatcher'
5150 schema
= {'definitions': {'Error': {'additionalProperties': False,
5151 'properties': {'code': {'type': 'string'},
5152 'info': {'$ref': '#/definitions/ErrorInfo'},
5153 'message': {'type': 'string'}},
5154 'required': ['message', 'code'],
5156 'ErrorInfo': {'additionalProperties': False,
5157 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5158 'macaroon-path': {'type': 'string'}},
5160 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5161 'RemoteApplicationChange': {'additionalProperties': False,
5162 'properties': {'application-tag': {'type': 'string'},
5163 'life': {'type': 'string'},
5164 'relations': {'$ref': '#/definitions/RemoteRelationsChange'}},
5165 'required': ['application-tag',
5169 'RemoteApplicationWatchResult': {'additionalProperties': False,
5170 'properties': {'change': {'$ref': '#/definitions/RemoteApplicationChange'},
5171 'error': {'$ref': '#/definitions/Error'},
5172 'id': {'type': 'string'}},
5175 'RemoteEntityId': {'additionalProperties': False,
5176 'properties': {'model-uuid': {'type': 'string'},
5177 'token': {'type': 'string'}},
5178 'required': ['model-uuid', 'token'],
5180 'RemoteRelationChange': {'additionalProperties': False,
5181 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
5183 'departed-units': {'items': {'type': 'string'},
5185 'id': {'type': 'integer'},
5186 'life': {'type': 'string'}},
5187 'required': ['id', 'life'],
5189 'RemoteRelationUnitChange': {'additionalProperties': False,
5190 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
5193 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
5194 'required': ['unit-id'],
5196 'RemoteRelationsChange': {'additionalProperties': False,
5197 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
5199 'initial': {'type': 'boolean'},
5200 'removed': {'items': {'type': 'integer'},
5202 'required': ['initial'],
5204 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteApplicationWatchResult'}},
5206 'Stop': {'type': 'object'}},
5210 @ReturnMapping(RemoteApplicationWatchResult
)
5211 async def Next(self
):
5214 Returns -> typing.Union[_ForwardRef('RemoteApplicationChange'), _ForwardRef('Error'), str]
5216 # map input types to rpc msg
5218 msg
= dict(type='RemoteApplicationWatcher', request
='Next', version
=1, params
=_params
)
5220 reply
= await self
.rpc(msg
)
5225 @ReturnMapping(None)
5226 async def Stop(self
):
5231 # map input types to rpc msg
5233 msg
= dict(type='RemoteApplicationWatcher', request
='Stop', version
=1, params
=_params
)
5235 reply
= await self
.rpc(msg
)
5240 class RemoteRelationsWatcherFacade(Type
):
5241 name
= 'RemoteRelationsWatcher'
5243 schema
= {'definitions': {'Error': {'additionalProperties': False,
5244 'properties': {'code': {'type': 'string'},
5245 'info': {'$ref': '#/definitions/ErrorInfo'},
5246 'message': {'type': 'string'}},
5247 'required': ['message', 'code'],
5249 'ErrorInfo': {'additionalProperties': False,
5250 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5251 'macaroon-path': {'type': 'string'}},
5253 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5254 'RemoteEntityId': {'additionalProperties': False,
5255 'properties': {'model-uuid': {'type': 'string'},
5256 'token': {'type': 'string'}},
5257 'required': ['model-uuid', 'token'],
5259 'RemoteRelationChange': {'additionalProperties': False,
5260 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
5262 'departed-units': {'items': {'type': 'string'},
5264 'id': {'type': 'integer'},
5265 'life': {'type': 'string'}},
5266 'required': ['id', 'life'],
5268 'RemoteRelationUnitChange': {'additionalProperties': False,
5269 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
5272 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
5273 'required': ['unit-id'],
5275 'RemoteRelationsChange': {'additionalProperties': False,
5276 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
5278 'initial': {'type': 'boolean'},
5279 'removed': {'items': {'type': 'integer'},
5281 'required': ['initial'],
5283 'RemoteRelationsWatchResult': {'additionalProperties': False,
5284 'properties': {'RemoteRelationsWatcherId': {'type': 'string'},
5285 'change': {'$ref': '#/definitions/RemoteRelationsChange'},
5286 'error': {'$ref': '#/definitions/Error'}},
5287 'required': ['RemoteRelationsWatcherId'],
5289 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteRelationsWatchResult'}},
5291 'Stop': {'type': 'object'}},
5295 @ReturnMapping(RemoteRelationsWatchResult
)
5296 async def Next(self
):
5299 Returns -> typing.Union[str, _ForwardRef('RemoteRelationsChange'), _ForwardRef('Error')]
5301 # map input types to rpc msg
5303 msg
= dict(type='RemoteRelationsWatcher', request
='Next', version
=1, params
=_params
)
5305 reply
= await self
.rpc(msg
)
5310 @ReturnMapping(None)
5311 async def Stop(self
):
5316 # map input types to rpc msg
5318 msg
= dict(type='RemoteRelationsWatcher', request
='Stop', version
=1, params
=_params
)
5320 reply
= await self
.rpc(msg
)
5325 class ResourcesFacade(Type
):
5328 schema
= {'definitions': {'AddCharmWithAuthorization': {'additionalProperties': False,
5329 'properties': {'channel': {'type': 'string'},
5330 'macaroon': {'$ref': '#/definitions/Macaroon'},
5331 'url': {'type': 'string'}},
5336 'AddPendingResourcesArgs': {'additionalProperties': False,
5337 'properties': {'AddCharmWithAuthorization': {'$ref': '#/definitions/AddCharmWithAuthorization'},
5338 'Entity': {'$ref': '#/definitions/Entity'},
5339 'resources': {'items': {'$ref': '#/definitions/CharmResource'},
5341 'required': ['Entity',
5342 'AddCharmWithAuthorization',
5345 'AddPendingResourcesResult': {'additionalProperties': False,
5346 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5347 'pending-ids': {'items': {'type': 'string'},
5349 'required': ['ErrorResult',
5352 'CharmResource': {'additionalProperties': False,
5353 'properties': {'description': {'type': 'string'},
5354 'fingerprint': {'items': {'type': 'integer'},
5356 'name': {'type': 'string'},
5357 'origin': {'type': 'string'},
5358 'path': {'type': 'string'},
5359 'revision': {'type': 'integer'},
5360 'size': {'type': 'integer'},
5361 'type': {'type': 'string'}},
5362 'required': ['name',
5370 'Entity': {'additionalProperties': False,
5371 'properties': {'tag': {'type': 'string'}},
5372 'required': ['tag'],
5374 'Error': {'additionalProperties': False,
5375 'properties': {'code': {'type': 'string'},
5376 'info': {'$ref': '#/definitions/ErrorInfo'},
5377 'message': {'type': 'string'}},
5378 'required': ['message', 'code'],
5380 'ErrorInfo': {'additionalProperties': False,
5381 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5382 'macaroon-path': {'type': 'string'}},
5384 'ErrorResult': {'additionalProperties': False,
5385 'properties': {'error': {'$ref': '#/definitions/Error'}},
5387 'ListResourcesArgs': {'additionalProperties': False,
5388 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5390 'required': ['entities'],
5392 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5393 'Resource': {'additionalProperties': False,
5394 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'},
5395 'application': {'type': 'string'},
5396 'id': {'type': 'string'},
5397 'pending-id': {'type': 'string'},
5398 'timestamp': {'format': 'date-time',
5400 'username': {'type': 'string'}},
5401 'required': ['CharmResource',
5408 'ResourcesResult': {'additionalProperties': False,
5409 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5410 'charm-store-resources': {'items': {'$ref': '#/definitions/CharmResource'},
5412 'resources': {'items': {'$ref': '#/definitions/Resource'},
5414 'unit-resources': {'items': {'$ref': '#/definitions/UnitResources'},
5416 'required': ['ErrorResult',
5418 'charm-store-resources',
5421 'ResourcesResults': {'additionalProperties': False,
5422 'properties': {'results': {'items': {'$ref': '#/definitions/ResourcesResult'},
5424 'required': ['results'],
5426 'UnitResources': {'additionalProperties': False,
5427 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
5428 'download-progress': {'patternProperties': {'.*': {'type': 'integer'}},
5430 'resources': {'items': {'$ref': '#/definitions/Resource'},
5432 'required': ['Entity',
5434 'download-progress'],
5436 'properties': {'AddPendingResources': {'properties': {'Params': {'$ref': '#/definitions/AddPendingResourcesArgs'},
5437 'Result': {'$ref': '#/definitions/AddPendingResourcesResult'}},
5439 'ListResources': {'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'},
5440 'Result': {'$ref': '#/definitions/ResourcesResults'}},
5445 @ReturnMapping(AddPendingResourcesResult
)
5446 async def AddPendingResources(self
, addcharmwithauthorization
, entity
, resources
):
5448 addcharmwithauthorization : AddCharmWithAuthorization
5450 resources : typing.Sequence<+T_co>[~CharmResource]<~CharmResource>
5451 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[str]]
5453 # map input types to rpc msg
5455 msg
= dict(type='Resources', request
='AddPendingResources', version
=1, params
=_params
)
5456 _params
['AddCharmWithAuthorization'] = addcharmwithauthorization
5457 _params
['Entity'] = entity
5458 _params
['Resources'] = resources
5459 reply
= await self
.rpc(msg
)
5464 @ReturnMapping(ResourcesResults
)
5465 async def ListResources(self
, entities
):
5467 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5468 Returns -> typing.Sequence<+T_co>[~ResourcesResult]<~ResourcesResult>
5470 # map input types to rpc msg
5472 msg
= dict(type='Resources', request
='ListResources', version
=1, params
=_params
)
5473 _params
['entities'] = entities
5474 reply
= await self
.rpc(msg
)
5479 class ResourcesHookContextFacade(Type
):
5480 name
= 'ResourcesHookContext'
5482 schema
= {'definitions': {'CharmResource': {'additionalProperties': False,
5483 'properties': {'description': {'type': 'string'},
5484 'fingerprint': {'items': {'type': 'integer'},
5486 'name': {'type': 'string'},
5487 'origin': {'type': 'string'},
5488 'path': {'type': 'string'},
5489 'revision': {'type': 'integer'},
5490 'size': {'type': 'integer'},
5491 'type': {'type': 'string'}},
5492 'required': ['name',
5500 'Error': {'additionalProperties': False,
5501 'properties': {'code': {'type': 'string'},
5502 'info': {'$ref': '#/definitions/ErrorInfo'},
5503 'message': {'type': 'string'}},
5504 'required': ['message', 'code'],
5506 'ErrorInfo': {'additionalProperties': False,
5507 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5508 'macaroon-path': {'type': 'string'}},
5510 'ErrorResult': {'additionalProperties': False,
5511 'properties': {'error': {'$ref': '#/definitions/Error'}},
5513 'ListUnitResourcesArgs': {'additionalProperties': False,
5514 'properties': {'resource-names': {'items': {'type': 'string'},
5516 'required': ['resource-names'],
5518 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5519 'Resource': {'additionalProperties': False,
5520 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'},
5521 'application': {'type': 'string'},
5522 'id': {'type': 'string'},
5523 'pending-id': {'type': 'string'},
5524 'timestamp': {'format': 'date-time',
5526 'username': {'type': 'string'}},
5527 'required': ['CharmResource',
5534 'UnitResourceResult': {'additionalProperties': False,
5535 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5536 'resource': {'$ref': '#/definitions/Resource'}},
5537 'required': ['ErrorResult', 'resource'],
5539 'UnitResourcesResult': {'additionalProperties': False,
5540 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5541 'resources': {'items': {'$ref': '#/definitions/UnitResourceResult'},
5543 'required': ['ErrorResult',
5546 'properties': {'GetResourceInfo': {'properties': {'Params': {'$ref': '#/definitions/ListUnitResourcesArgs'},
5547 'Result': {'$ref': '#/definitions/UnitResourcesResult'}},
5552 @ReturnMapping(UnitResourcesResult
)
5553 async def GetResourceInfo(self
, resource_names
):
5555 resource_names : typing.Sequence<+T_co>[str]
5556 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[~UnitResourceResult]<~UnitResourceResult>]
5558 # map input types to rpc msg
5560 msg
= dict(type='ResourcesHookContext', request
='GetResourceInfo', version
=1, params
=_params
)
5561 _params
['resource-names'] = resource_names
5562 reply
= await self
.rpc(msg
)
5567 class RetryStrategyFacade(Type
):
5568 name
= 'RetryStrategy'
5570 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5571 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5573 'required': ['entities'],
5575 'Entity': {'additionalProperties': False,
5576 'properties': {'tag': {'type': 'string'}},
5577 'required': ['tag'],
5579 'Error': {'additionalProperties': False,
5580 'properties': {'code': {'type': 'string'},
5581 'info': {'$ref': '#/definitions/ErrorInfo'},
5582 'message': {'type': 'string'}},
5583 'required': ['message', 'code'],
5585 'ErrorInfo': {'additionalProperties': False,
5586 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5587 'macaroon-path': {'type': 'string'}},
5589 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5590 'NotifyWatchResult': {'additionalProperties': False,
5591 'properties': {'NotifyWatcherId': {'type': 'string'},
5592 'error': {'$ref': '#/definitions/Error'}},
5593 'required': ['NotifyWatcherId'],
5595 'NotifyWatchResults': {'additionalProperties': False,
5596 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5598 'required': ['results'],
5600 'RetryStrategy': {'additionalProperties': False,
5601 'properties': {'jitter-retry-time': {'type': 'boolean'},
5602 'max-retry-time': {'type': 'integer'},
5603 'min-retry-time': {'type': 'integer'},
5604 'retry-time-factor': {'type': 'integer'},
5605 'should-retry': {'type': 'boolean'}},
5606 'required': ['should-retry',
5609 'jitter-retry-time',
5610 'retry-time-factor'],
5612 'RetryStrategyResult': {'additionalProperties': False,
5613 'properties': {'error': {'$ref': '#/definitions/Error'},
5614 'result': {'$ref': '#/definitions/RetryStrategy'}},
5616 'RetryStrategyResults': {'additionalProperties': False,
5617 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
5619 'required': ['results'],
5621 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5622 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
5624 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5625 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5630 @ReturnMapping(RetryStrategyResults
)
5631 async def RetryStrategy(self
, entities
):
5633 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5634 Returns -> typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
5636 # map input types to rpc msg
5638 msg
= dict(type='RetryStrategy', request
='RetryStrategy', version
=1, params
=_params
)
5639 _params
['entities'] = entities
5640 reply
= await self
.rpc(msg
)
5645 @ReturnMapping(NotifyWatchResults
)
5646 async def WatchRetryStrategy(self
, entities
):
5648 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5649 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
5651 # map input types to rpc msg
5653 msg
= dict(type='RetryStrategy', request
='WatchRetryStrategy', version
=1, params
=_params
)
5654 _params
['entities'] = entities
5655 reply
= await self
.rpc(msg
)
5660 class SSHClientFacade(Type
):
5663 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5664 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5666 'required': ['entities'],
5668 'Entity': {'additionalProperties': False,
5669 'properties': {'tag': {'type': 'string'}},
5670 'required': ['tag'],
5672 'Error': {'additionalProperties': False,
5673 'properties': {'code': {'type': 'string'},
5674 'info': {'$ref': '#/definitions/ErrorInfo'},
5675 'message': {'type': 'string'}},
5676 'required': ['message', 'code'],
5678 'ErrorInfo': {'additionalProperties': False,
5679 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5680 'macaroon-path': {'type': 'string'}},
5682 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5683 'SSHAddressResult': {'additionalProperties': False,
5684 'properties': {'address': {'type': 'string'},
5685 'error': {'$ref': '#/definitions/Error'}},
5687 'SSHAddressResults': {'additionalProperties': False,
5688 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
5690 'required': ['results'],
5692 'SSHProxyResult': {'additionalProperties': False,
5693 'properties': {'use-proxy': {'type': 'boolean'}},
5694 'required': ['use-proxy'],
5696 'SSHPublicKeysResult': {'additionalProperties': False,
5697 'properties': {'error': {'$ref': '#/definitions/Error'},
5698 'public-keys': {'items': {'type': 'string'},
5701 'SSHPublicKeysResults': {'additionalProperties': False,
5702 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
5704 'required': ['results'],
5706 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5707 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
5709 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
5711 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5712 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
5714 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5715 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
5720 @ReturnMapping(SSHAddressResults
)
5721 async def PrivateAddress(self
, entities
):
5723 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5724 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
5726 # map input types to rpc msg
5728 msg
= dict(type='SSHClient', request
='PrivateAddress', version
=1, params
=_params
)
5729 _params
['entities'] = entities
5730 reply
= await self
.rpc(msg
)
5735 @ReturnMapping(SSHProxyResult
)
5736 async def Proxy(self
):
5741 # map input types to rpc msg
5743 msg
= dict(type='SSHClient', request
='Proxy', version
=1, params
=_params
)
5745 reply
= await self
.rpc(msg
)
5750 @ReturnMapping(SSHAddressResults
)
5751 async def PublicAddress(self
, entities
):
5753 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5754 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
5756 # map input types to rpc msg
5758 msg
= dict(type='SSHClient', request
='PublicAddress', version
=1, params
=_params
)
5759 _params
['entities'] = entities
5760 reply
= await self
.rpc(msg
)
5765 @ReturnMapping(SSHPublicKeysResults
)
5766 async def PublicKeys(self
, entities
):
5768 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5769 Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
5771 # map input types to rpc msg
5773 msg
= dict(type='SSHClient', request
='PublicKeys', version
=1, params
=_params
)
5774 _params
['entities'] = entities
5775 reply
= await self
.rpc(msg
)
5780 class SingularFacade(Type
):
5783 schema
= {'definitions': {'Entities': {'additionalProperties': False,
5784 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5786 'required': ['entities'],
5788 'Entity': {'additionalProperties': False,
5789 'properties': {'tag': {'type': 'string'}},
5790 'required': ['tag'],
5792 'Error': {'additionalProperties': False,
5793 'properties': {'code': {'type': 'string'},
5794 'info': {'$ref': '#/definitions/ErrorInfo'},
5795 'message': {'type': 'string'}},
5796 'required': ['message', 'code'],
5798 'ErrorInfo': {'additionalProperties': False,
5799 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5800 'macaroon-path': {'type': 'string'}},
5802 'ErrorResult': {'additionalProperties': False,
5803 'properties': {'error': {'$ref': '#/definitions/Error'}},
5805 'ErrorResults': {'additionalProperties': False,
5806 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5808 'required': ['results'],
5810 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5811 'SingularClaim': {'additionalProperties': False,
5812 'properties': {'controller-tag': {'type': 'string'},
5813 'duration': {'type': 'integer'},
5814 'model-tag': {'type': 'string'}},
5815 'required': ['model-tag',
5819 'SingularClaims': {'additionalProperties': False,
5820 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
5822 'required': ['claims'],
5824 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
5825 'Result': {'$ref': '#/definitions/ErrorResults'}},
5827 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5828 'Result': {'$ref': '#/definitions/ErrorResults'}},
5833 @ReturnMapping(ErrorResults
)
5834 async def Claim(self
, claims
):
5836 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
5837 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
5839 # map input types to rpc msg
5841 msg
= dict(type='Singular', request
='Claim', version
=1, params
=_params
)
5842 _params
['claims'] = claims
5843 reply
= await self
.rpc(msg
)
5848 @ReturnMapping(ErrorResults
)
5849 async def Wait(self
, entities
):
5851 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5852 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
5854 # map input types to rpc msg
5856 msg
= dict(type='Singular', request
='Wait', version
=1, params
=_params
)
5857 _params
['entities'] = entities
5858 reply
= await self
.rpc(msg
)
5863 class StringsWatcherFacade(Type
):
5864 name
= 'StringsWatcher'
5866 schema
= {'definitions': {'Error': {'additionalProperties': False,
5867 'properties': {'code': {'type': 'string'},
5868 'info': {'$ref': '#/definitions/ErrorInfo'},
5869 'message': {'type': 'string'}},
5870 'required': ['message', 'code'],
5872 'ErrorInfo': {'additionalProperties': False,
5873 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5874 'macaroon-path': {'type': 'string'}},
5876 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5877 'StringsWatchResult': {'additionalProperties': False,
5878 'properties': {'changes': {'items': {'type': 'string'},
5880 'error': {'$ref': '#/definitions/Error'},
5881 'watcher-id': {'type': 'string'}},
5882 'required': ['watcher-id'],
5884 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
5886 'Stop': {'type': 'object'}},
5890 @ReturnMapping(StringsWatchResult
)
5891 async def Next(self
):
5894 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
5896 # map input types to rpc msg
5898 msg
= dict(type='StringsWatcher', request
='Next', version
=1, params
=_params
)
5900 reply
= await self
.rpc(msg
)
5905 @ReturnMapping(None)
5906 async def Stop(self
):
5911 # map input types to rpc msg
5913 msg
= dict(type='StringsWatcher', request
='Stop', version
=1, params
=_params
)
5915 reply
= await self
.rpc(msg
)
5920 class UndertakerFacade(Type
):
5923 schema
= {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
5924 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
5927 'info': {'type': 'string'},
5928 'status': {'type': 'string'},
5929 'tag': {'type': 'string'}},
5935 'Error': {'additionalProperties': False,
5936 'properties': {'code': {'type': 'string'},
5937 'info': {'$ref': '#/definitions/ErrorInfo'},
5938 'message': {'type': 'string'}},
5939 'required': ['message', 'code'],
5941 'ErrorInfo': {'additionalProperties': False,
5942 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5943 'macaroon-path': {'type': 'string'}},
5945 'ErrorResult': {'additionalProperties': False,
5946 'properties': {'error': {'$ref': '#/definitions/Error'}},
5948 'ErrorResults': {'additionalProperties': False,
5949 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5951 'required': ['results'],
5953 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5954 'ModelConfigResult': {'additionalProperties': False,
5955 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
5958 'required': ['config'],
5960 'NotifyWatchResult': {'additionalProperties': False,
5961 'properties': {'NotifyWatcherId': {'type': 'string'},
5962 'error': {'$ref': '#/definitions/Error'}},
5963 'required': ['NotifyWatcherId'],
5965 'NotifyWatchResults': {'additionalProperties': False,
5966 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5968 'required': ['results'],
5970 'SetStatus': {'additionalProperties': False,
5971 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
5973 'required': ['entities'],
5975 'UndertakerModelInfo': {'additionalProperties': False,
5976 'properties': {'global-name': {'type': 'string'},
5977 'is-system': {'type': 'boolean'},
5978 'life': {'type': 'string'},
5979 'name': {'type': 'string'},
5980 'uuid': {'type': 'string'}},
5981 'required': ['uuid',
5987 'UndertakerModelInfoResult': {'additionalProperties': False,
5988 'properties': {'error': {'$ref': '#/definitions/Error'},
5989 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
5990 'required': ['result'],
5992 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
5994 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
5996 'ProcessDyingModel': {'type': 'object'},
5997 'RemoveModel': {'type': 'object'},
5998 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
5999 'Result': {'$ref': '#/definitions/ErrorResults'}},
6001 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6002 'Result': {'$ref': '#/definitions/ErrorResults'}},
6004 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6009 @ReturnMapping(ModelConfigResult
)
6010 async def ModelConfig(self
):
6013 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
6015 # map input types to rpc msg
6017 msg
= dict(type='Undertaker', request
='ModelConfig', version
=1, params
=_params
)
6019 reply
= await self
.rpc(msg
)
6024 @ReturnMapping(UndertakerModelInfoResult
)
6025 async def ModelInfo(self
):
6028 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
6030 # map input types to rpc msg
6032 msg
= dict(type='Undertaker', request
='ModelInfo', version
=1, params
=_params
)
6034 reply
= await self
.rpc(msg
)
6039 @ReturnMapping(None)
6040 async def ProcessDyingModel(self
):
6045 # map input types to rpc msg
6047 msg
= dict(type='Undertaker', request
='ProcessDyingModel', version
=1, params
=_params
)
6049 reply
= await self
.rpc(msg
)
6054 @ReturnMapping(None)
6055 async def RemoveModel(self
):
6060 # map input types to rpc msg
6062 msg
= dict(type='Undertaker', request
='RemoveModel', version
=1, params
=_params
)
6064 reply
= await self
.rpc(msg
)
6069 @ReturnMapping(ErrorResults
)
6070 async def SetStatus(self
, entities
):
6072 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
6073 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6075 # map input types to rpc msg
6077 msg
= dict(type='Undertaker', request
='SetStatus', version
=1, params
=_params
)
6078 _params
['entities'] = entities
6079 reply
= await self
.rpc(msg
)
6084 @ReturnMapping(ErrorResults
)
6085 async def UpdateStatus(self
, entities
):
6087 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
6088 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6090 # map input types to rpc msg
6092 msg
= dict(type='Undertaker', request
='UpdateStatus', version
=1, params
=_params
)
6093 _params
['entities'] = entities
6094 reply
= await self
.rpc(msg
)
6099 @ReturnMapping(NotifyWatchResults
)
6100 async def WatchModelResources(self
):
6103 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
6105 # map input types to rpc msg
6107 msg
= dict(type='Undertaker', request
='WatchModelResources', version
=1, params
=_params
)
6109 reply
= await self
.rpc(msg
)
6114 class UnitAssignerFacade(Type
):
6115 name
= 'UnitAssigner'
6117 schema
= {'definitions': {'Entities': {'additionalProperties': False,
6118 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6120 'required': ['entities'],
6122 'Entity': {'additionalProperties': False,
6123 'properties': {'tag': {'type': 'string'}},
6124 'required': ['tag'],
6126 'EntityStatusArgs': {'additionalProperties': False,
6127 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
6130 'info': {'type': 'string'},
6131 'status': {'type': 'string'},
6132 'tag': {'type': 'string'}},
6138 'Error': {'additionalProperties': False,
6139 'properties': {'code': {'type': 'string'},
6140 'info': {'$ref': '#/definitions/ErrorInfo'},
6141 'message': {'type': 'string'}},
6142 'required': ['message', 'code'],
6144 'ErrorInfo': {'additionalProperties': False,
6145 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6146 'macaroon-path': {'type': 'string'}},
6148 'ErrorResult': {'additionalProperties': False,
6149 'properties': {'error': {'$ref': '#/definitions/Error'}},
6151 'ErrorResults': {'additionalProperties': False,
6152 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6154 'required': ['results'],
6156 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6157 'SetStatus': {'additionalProperties': False,
6158 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
6160 'required': ['entities'],
6162 'StringsWatchResult': {'additionalProperties': False,
6163 'properties': {'changes': {'items': {'type': 'string'},
6165 'error': {'$ref': '#/definitions/Error'},
6166 'watcher-id': {'type': 'string'}},
6167 'required': ['watcher-id'],
6169 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6170 'Result': {'$ref': '#/definitions/ErrorResults'}},
6172 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6173 'Result': {'$ref': '#/definitions/ErrorResults'}},
6175 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
6180 @ReturnMapping(ErrorResults
)
6181 async def AssignUnits(self
, entities
):
6183 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6184 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6186 # map input types to rpc msg
6188 msg
= dict(type='UnitAssigner', request
='AssignUnits', version
=1, params
=_params
)
6189 _params
['entities'] = entities
6190 reply
= await self
.rpc(msg
)
6195 @ReturnMapping(ErrorResults
)
6196 async def SetAgentStatus(self
, entities
):
6198 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
6199 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6201 # map input types to rpc msg
6203 msg
= dict(type='UnitAssigner', request
='SetAgentStatus', version
=1, params
=_params
)
6204 _params
['entities'] = entities
6205 reply
= await self
.rpc(msg
)
6210 @ReturnMapping(StringsWatchResult
)
6211 async def WatchUnitAssignments(self
):
6214 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
6216 # map input types to rpc msg
6218 msg
= dict(type='UnitAssigner', request
='WatchUnitAssignments', version
=1, params
=_params
)
6220 reply
= await self
.rpc(msg
)
6225 class UpgraderFacade(Type
):
6228 schema
= {'definitions': {'Binary': {'additionalProperties': False,
6229 'properties': {'Arch': {'type': 'string'},
6230 'Number': {'$ref': '#/definitions/Number'},
6231 'Series': {'type': 'string'}},
6232 'required': ['Number', 'Series', 'Arch'],
6234 'Entities': {'additionalProperties': False,
6235 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6237 'required': ['entities'],
6239 'EntitiesVersion': {'additionalProperties': False,
6240 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
6242 'required': ['agent-tools'],
6244 'Entity': {'additionalProperties': False,
6245 'properties': {'tag': {'type': 'string'}},
6246 'required': ['tag'],
6248 'EntityVersion': {'additionalProperties': False,
6249 'properties': {'tag': {'type': 'string'},
6250 'tools': {'$ref': '#/definitions/Version'}},
6251 'required': ['tag', 'tools'],
6253 'Error': {'additionalProperties': False,
6254 'properties': {'code': {'type': 'string'},
6255 'info': {'$ref': '#/definitions/ErrorInfo'},
6256 'message': {'type': 'string'}},
6257 'required': ['message', 'code'],
6259 'ErrorInfo': {'additionalProperties': False,
6260 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6261 'macaroon-path': {'type': 'string'}},
6263 'ErrorResult': {'additionalProperties': False,
6264 'properties': {'error': {'$ref': '#/definitions/Error'}},
6266 'ErrorResults': {'additionalProperties': False,
6267 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6269 'required': ['results'],
6271 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6272 'NotifyWatchResult': {'additionalProperties': False,
6273 'properties': {'NotifyWatcherId': {'type': 'string'},
6274 'error': {'$ref': '#/definitions/Error'}},
6275 'required': ['NotifyWatcherId'],
6277 'NotifyWatchResults': {'additionalProperties': False,
6278 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6280 'required': ['results'],
6282 'Number': {'additionalProperties': False,
6283 'properties': {'Build': {'type': 'integer'},
6284 'Major': {'type': 'integer'},
6285 'Minor': {'type': 'integer'},
6286 'Patch': {'type': 'integer'},
6287 'Tag': {'type': 'string'}},
6288 'required': ['Major',
6294 'Tools': {'additionalProperties': False,
6295 'properties': {'sha256': {'type': 'string'},
6296 'size': {'type': 'integer'},
6297 'url': {'type': 'string'},
6298 'version': {'$ref': '#/definitions/Binary'}},
6299 'required': ['version', 'url', 'size'],
6301 'ToolsResult': {'additionalProperties': False,
6302 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
6303 'error': {'$ref': '#/definitions/Error'},
6304 'tools': {'items': {'$ref': '#/definitions/Tools'},
6306 'required': ['tools',
6307 'disable-ssl-hostname-verification'],
6309 'ToolsResults': {'additionalProperties': False,
6310 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
6312 'required': ['results'],
6314 'Version': {'additionalProperties': False,
6315 'properties': {'version': {'$ref': '#/definitions/Binary'}},
6316 'required': ['version'],
6318 'VersionResult': {'additionalProperties': False,
6319 'properties': {'error': {'$ref': '#/definitions/Error'},
6320 'version': {'$ref': '#/definitions/Number'}},
6322 'VersionResults': {'additionalProperties': False,
6323 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
6325 'required': ['results'],
6327 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6328 'Result': {'$ref': '#/definitions/VersionResults'}},
6330 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
6331 'Result': {'$ref': '#/definitions/ErrorResults'}},
6333 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6334 'Result': {'$ref': '#/definitions/ToolsResults'}},
6336 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6337 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6342 @ReturnMapping(VersionResults
)
6343 async def DesiredVersion(self
, entities
):
6345 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6346 Returns -> typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
6348 # map input types to rpc msg
6350 msg
= dict(type='Upgrader', request
='DesiredVersion', version
=1, params
=_params
)
6351 _params
['entities'] = entities
6352 reply
= await self
.rpc(msg
)
6357 @ReturnMapping(ErrorResults
)
6358 async def SetTools(self
, agent_tools
):
6360 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
6361 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6363 # map input types to rpc msg
6365 msg
= dict(type='Upgrader', request
='SetTools', version
=1, params
=_params
)
6366 _params
['agent-tools'] = agent_tools
6367 reply
= await self
.rpc(msg
)
6372 @ReturnMapping(ToolsResults
)
6373 async def Tools(self
, entities
):
6375 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6376 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
6378 # map input types to rpc msg
6380 msg
= dict(type='Upgrader', request
='Tools', version
=1, params
=_params
)
6381 _params
['entities'] = entities
6382 reply
= await self
.rpc(msg
)
6387 @ReturnMapping(NotifyWatchResults
)
6388 async def WatchAPIVersion(self
, entities
):
6390 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6391 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
6393 # map input types to rpc msg
6395 msg
= dict(type='Upgrader', request
='WatchAPIVersion', version
=1, params
=_params
)
6396 _params
['entities'] = entities
6397 reply
= await self
.rpc(msg
)
6402 class UserManagerFacade(Type
):
6403 name
= 'UserManager'
6405 schema
= {'definitions': {'AddUser': {'additionalProperties': False,
6406 'properties': {'display-name': {'type': 'string'},
6407 'password': {'type': 'string'},
6408 'username': {'type': 'string'}},
6409 'required': ['username', 'display-name'],
6411 'AddUserResult': {'additionalProperties': False,
6412 'properties': {'error': {'$ref': '#/definitions/Error'},
6413 'secret-key': {'items': {'type': 'integer'},
6415 'tag': {'type': 'string'}},
6417 'AddUserResults': {'additionalProperties': False,
6418 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
6420 'required': ['results'],
6422 'AddUsers': {'additionalProperties': False,
6423 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
6425 'required': ['users'],
6427 'Entities': {'additionalProperties': False,
6428 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6430 'required': ['entities'],
6432 'Entity': {'additionalProperties': False,
6433 'properties': {'tag': {'type': 'string'}},
6434 'required': ['tag'],
6436 'EntityPassword': {'additionalProperties': False,
6437 'properties': {'password': {'type': 'string'},
6438 'tag': {'type': 'string'}},
6439 'required': ['tag', 'password'],
6441 'EntityPasswords': {'additionalProperties': False,
6442 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
6444 'required': ['changes'],
6446 'Error': {'additionalProperties': False,
6447 'properties': {'code': {'type': 'string'},
6448 'info': {'$ref': '#/definitions/ErrorInfo'},
6449 'message': {'type': 'string'}},
6450 'required': ['message', 'code'],
6452 'ErrorInfo': {'additionalProperties': False,
6453 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6454 'macaroon-path': {'type': 'string'}},
6456 'ErrorResult': {'additionalProperties': False,
6457 'properties': {'error': {'$ref': '#/definitions/Error'}},
6459 'ErrorResults': {'additionalProperties': False,
6460 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6462 'required': ['results'],
6464 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6465 'UserInfo': {'additionalProperties': False,
6466 'properties': {'access': {'type': 'string'},
6467 'created-by': {'type': 'string'},
6468 'date-created': {'format': 'date-time',
6470 'disabled': {'type': 'boolean'},
6471 'display-name': {'type': 'string'},
6472 'last-connection': {'format': 'date-time',
6474 'username': {'type': 'string'}},
6475 'required': ['username',
6482 'UserInfoRequest': {'additionalProperties': False,
6483 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6485 'include-disabled': {'type': 'boolean'}},
6486 'required': ['entities',
6487 'include-disabled'],
6489 'UserInfoResult': {'additionalProperties': False,
6490 'properties': {'error': {'$ref': '#/definitions/Error'},
6491 'result': {'$ref': '#/definitions/UserInfo'}},
6493 'UserInfoResults': {'additionalProperties': False,
6494 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
6496 'required': ['results'],
6498 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
6499 'Result': {'$ref': '#/definitions/AddUserResults'}},
6501 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6502 'Result': {'$ref': '#/definitions/ErrorResults'}},
6504 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6505 'Result': {'$ref': '#/definitions/ErrorResults'}},
6507 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6508 'Result': {'$ref': '#/definitions/ErrorResults'}},
6510 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6511 'Result': {'$ref': '#/definitions/ErrorResults'}},
6513 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
6514 'Result': {'$ref': '#/definitions/UserInfoResults'}},
6519 @ReturnMapping(AddUserResults
)
6520 async def AddUser(self
, users
):
6522 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
6523 Returns -> typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
6525 # map input types to rpc msg
6527 msg
= dict(type='UserManager', request
='AddUser', version
=1, params
=_params
)
6528 _params
['users'] = users
6529 reply
= await self
.rpc(msg
)
6534 @ReturnMapping(ErrorResults
)
6535 async def DisableUser(self
, entities
):
6537 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6538 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6540 # map input types to rpc msg
6542 msg
= dict(type='UserManager', request
='DisableUser', version
=1, params
=_params
)
6543 _params
['entities'] = entities
6544 reply
= await self
.rpc(msg
)
6549 @ReturnMapping(ErrorResults
)
6550 async def EnableUser(self
, entities
):
6552 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6553 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6555 # map input types to rpc msg
6557 msg
= dict(type='UserManager', request
='EnableUser', version
=1, params
=_params
)
6558 _params
['entities'] = entities
6559 reply
= await self
.rpc(msg
)
6564 @ReturnMapping(ErrorResults
)
6565 async def RemoveUser(self
, entities
):
6567 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6568 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6570 # map input types to rpc msg
6572 msg
= dict(type='UserManager', request
='RemoveUser', version
=1, params
=_params
)
6573 _params
['entities'] = entities
6574 reply
= await self
.rpc(msg
)
6579 @ReturnMapping(ErrorResults
)
6580 async def SetPassword(self
, changes
):
6582 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
6583 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6585 # map input types to rpc msg
6587 msg
= dict(type='UserManager', request
='SetPassword', version
=1, params
=_params
)
6588 _params
['changes'] = changes
6589 reply
= await self
.rpc(msg
)
6594 @ReturnMapping(UserInfoResults
)
6595 async def UserInfo(self
, entities
, include_disabled
):
6597 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6598 include_disabled : bool
6599 Returns -> typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
6601 # map input types to rpc msg
6603 msg
= dict(type='UserManager', request
='UserInfo', version
=1, params
=_params
)
6604 _params
['entities'] = entities
6605 _params
['include-disabled'] = include_disabled
6606 reply
= await self
.rpc(msg
)