Feature/api version support (#109)
[osm/N2VC.git] / juju / client / _client1.py
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.
3
4 from juju.client.facade import Type, ReturnMapping
5 from juju.client._definitions import *
6
7
8 class AgentToolsFacade(Type):
9 name = 'AgentTools'
10 version = 1
11 schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
12
13
14 @ReturnMapping(None)
15 async def UpdateToolsAvailable(self):
16 '''
17
18 Returns -> None
19 '''
20 # map input types to rpc msg
21 _params = dict()
22 msg = dict(type='AgentTools', request='UpdateToolsAvailable', version=1, params=_params)
23
24 reply = await self.rpc(msg)
25 return reply
26
27
28
29 class AllWatcherFacade(Type):
30 name = 'AllWatcher'
31 version = 1
32 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
33 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
34 'type': 'array'}},
35 'required': ['deltas'],
36 'type': 'object'},
37 'Delta': {'additionalProperties': False,
38 'properties': {'entity': {'additionalProperties': True,
39 'type': 'object'},
40 'removed': {'type': 'boolean'}},
41 'required': ['removed', 'entity'],
42 'type': 'object'}},
43 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
44 'type': 'object'},
45 'Stop': {'type': 'object'}},
46 'type': 'object'}
47
48
49 @ReturnMapping(AllWatcherNextResults)
50 async def Next(self):
51 '''
52
53 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
54 '''
55 # map input types to rpc msg
56 _params = dict()
57 msg = dict(type='AllWatcher', request='Next', version=1, params=_params)
58
59 reply = await self.rpc(msg)
60 return reply
61
62
63
64 @ReturnMapping(None)
65 async def Stop(self):
66 '''
67
68 Returns -> None
69 '''
70 # map input types to rpc msg
71 _params = dict()
72 msg = dict(type='AllWatcher', request='Stop', version=1, params=_params)
73
74 reply = await self.rpc(msg)
75 return reply
76
77
78
79 class ApplicationRelationsWatcherFacade(Type):
80 name = 'ApplicationRelationsWatcher'
81 version = 1
82 schema = {'definitions': {'ApplicationRelationsChange': {'additionalProperties': False,
83 'properties': {'changed': {'items': {'$ref': '#/definitions/RelationChange'},
84 'type': 'array'},
85 'removed': {'items': {'type': 'integer'},
86 'type': 'array'}},
87 'type': 'object'},
88 'ApplicationRelationsWatchResult': {'additionalProperties': False,
89 'properties': {'ApplicationRelationsWatcherId': {'type': 'string'},
90 'changes': {'$ref': '#/definitions/ApplicationRelationsChange'},
91 'error': {'$ref': '#/definitions/Error'}},
92 'required': ['ApplicationRelationsWatcherId'],
93 'type': 'object'},
94 'Error': {'additionalProperties': False,
95 'properties': {'code': {'type': 'string'},
96 'info': {'$ref': '#/definitions/ErrorInfo'},
97 'message': {'type': 'string'}},
98 'required': ['message', 'code'],
99 'type': 'object'},
100 'ErrorInfo': {'additionalProperties': False,
101 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
102 'macaroon-path': {'type': 'string'}},
103 'type': 'object'},
104 'Macaroon': {'additionalProperties': False, 'type': 'object'},
105 'RelationChange': {'additionalProperties': False,
106 'properties': {'changedunits': {'patternProperties': {'.*': {'$ref': '#/definitions/RelationUnitChange'}},
107 'type': 'object'},
108 'departedunits': {'items': {'type': 'string'},
109 'type': 'array'},
110 'id': {'type': 'integer'},
111 'life': {'type': 'string'}},
112 'required': ['id', 'life'],
113 'type': 'object'},
114 'RelationUnitChange': {'additionalProperties': False,
115 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
116 'type': 'object'}},
117 'type': 'object'}},
118 'type': 'object'}},
119 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/ApplicationRelationsWatchResult'}},
120 'type': 'object'},
121 'Stop': {'type': 'object'}},
122 'type': 'object'}
123
124
125 @ReturnMapping(ApplicationRelationsWatchResult)
126 async def Next(self):
127 '''
128
129 Returns -> typing.Union[str, _ForwardRef('ApplicationRelationsChange'), _ForwardRef('Error')]
130 '''
131 # map input types to rpc msg
132 _params = dict()
133 msg = dict(type='ApplicationRelationsWatcher', request='Next', version=1, params=_params)
134
135 reply = await self.rpc(msg)
136 return reply
137
138
139
140 @ReturnMapping(None)
141 async def Stop(self):
142 '''
143
144 Returns -> None
145 '''
146 # map input types to rpc msg
147 _params = dict()
148 msg = dict(type='ApplicationRelationsWatcher', request='Stop', version=1, params=_params)
149
150 reply = await self.rpc(msg)
151 return reply
152
153
154
155 class ApplicationScalerFacade(Type):
156 name = 'ApplicationScaler'
157 version = 1
158 schema = {'definitions': {'Entities': {'additionalProperties': False,
159 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
160 'type': 'array'}},
161 'required': ['entities'],
162 'type': 'object'},
163 'Entity': {'additionalProperties': False,
164 'properties': {'tag': {'type': 'string'}},
165 'required': ['tag'],
166 'type': 'object'},
167 'Error': {'additionalProperties': False,
168 'properties': {'code': {'type': 'string'},
169 'info': {'$ref': '#/definitions/ErrorInfo'},
170 'message': {'type': 'string'}},
171 'required': ['message', 'code'],
172 'type': 'object'},
173 'ErrorInfo': {'additionalProperties': False,
174 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
175 'macaroon-path': {'type': 'string'}},
176 'type': 'object'},
177 'ErrorResult': {'additionalProperties': False,
178 'properties': {'error': {'$ref': '#/definitions/Error'}},
179 'type': 'object'},
180 'ErrorResults': {'additionalProperties': False,
181 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
182 'type': 'array'}},
183 'required': ['results'],
184 'type': 'object'},
185 'Macaroon': {'additionalProperties': False, 'type': 'object'},
186 'StringsWatchResult': {'additionalProperties': False,
187 'properties': {'changes': {'items': {'type': 'string'},
188 'type': 'array'},
189 'error': {'$ref': '#/definitions/Error'},
190 'watcher-id': {'type': 'string'}},
191 'required': ['watcher-id'],
192 'type': 'object'}},
193 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
194 'Result': {'$ref': '#/definitions/ErrorResults'}},
195 'type': 'object'},
196 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
197 'type': 'object'}},
198 'type': 'object'}
199
200
201 @ReturnMapping(ErrorResults)
202 async def Rescale(self, entities):
203 '''
204 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
205 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
206 '''
207 # map input types to rpc msg
208 _params = dict()
209 msg = dict(type='ApplicationScaler', request='Rescale', version=1, params=_params)
210 _params['entities'] = entities
211 reply = await self.rpc(msg)
212 return reply
213
214
215
216 @ReturnMapping(StringsWatchResult)
217 async def Watch(self):
218 '''
219
220 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
221 '''
222 # map input types to rpc msg
223 _params = dict()
224 msg = dict(type='ApplicationScaler', request='Watch', version=1, params=_params)
225
226 reply = await self.rpc(msg)
227 return reply
228
229
230
231 class BackupsFacade(Type):
232 name = 'Backups'
233 version = 1
234 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
235 'properties': {'notes': {'type': 'string'}},
236 'required': ['notes'],
237 'type': 'object'},
238 'BackupsInfoArgs': {'additionalProperties': False,
239 'properties': {'id': {'type': 'string'}},
240 'required': ['id'],
241 'type': 'object'},
242 'BackupsListArgs': {'additionalProperties': False,
243 'type': 'object'},
244 'BackupsListResult': {'additionalProperties': False,
245 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
246 'type': 'array'}},
247 'required': ['list'],
248 'type': 'object'},
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',
255 'type': 'string'},
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',
264 'type': 'string'},
265 'stored': {'format': 'date-time',
266 'type': 'string'},
267 'version': {'$ref': '#/definitions/Number'}},
268 'required': ['id',
269 'checksum',
270 'checksum-format',
271 'size',
272 'stored',
273 'started',
274 'finished',
275 'notes',
276 'model',
277 'machine',
278 'hostname',
279 'version',
280 'series',
281 'ca-cert',
282 'ca-private-key'],
283 'type': 'object'},
284 'BackupsRemoveArgs': {'additionalProperties': False,
285 'properties': {'id': {'type': 'string'}},
286 'required': ['id'],
287 'type': 'object'},
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',
295 'Minor',
296 'Tag',
297 'Patch',
298 'Build'],
299 'type': 'object'},
300 'RestoreArgs': {'additionalProperties': False,
301 'properties': {'backup-id': {'type': 'string'}},
302 'required': ['backup-id'],
303 'type': 'object'}},
304 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
305 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
306 'type': 'object'},
307 'FinishRestore': {'type': 'object'},
308 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
309 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
310 'type': 'object'},
311 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
312 'Result': {'$ref': '#/definitions/BackupsListResult'}},
313 'type': 'object'},
314 'PrepareRestore': {'type': 'object'},
315 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
316 'type': 'object'},
317 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
318 'type': 'object'}},
319 'type': 'object'}
320
321
322 @ReturnMapping(BackupsMetadataResult)
323 async def Create(self, notes):
324 '''
325 notes : str
326 Returns -> typing.Union[str, int, _ForwardRef('Number')]
327 '''
328 # map input types to rpc msg
329 _params = dict()
330 msg = dict(type='Backups', request='Create', version=1, params=_params)
331 _params['notes'] = notes
332 reply = await self.rpc(msg)
333 return reply
334
335
336
337 @ReturnMapping(None)
338 async def FinishRestore(self):
339 '''
340
341 Returns -> None
342 '''
343 # map input types to rpc msg
344 _params = dict()
345 msg = dict(type='Backups', request='FinishRestore', version=1, params=_params)
346
347 reply = await self.rpc(msg)
348 return reply
349
350
351
352 @ReturnMapping(BackupsMetadataResult)
353 async def Info(self, id_):
354 '''
355 id_ : str
356 Returns -> typing.Union[str, int, _ForwardRef('Number')]
357 '''
358 # map input types to rpc msg
359 _params = dict()
360 msg = dict(type='Backups', request='Info', version=1, params=_params)
361 _params['id'] = id_
362 reply = await self.rpc(msg)
363 return reply
364
365
366
367 @ReturnMapping(BackupsListResult)
368 async def List(self):
369 '''
370
371 Returns -> typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
372 '''
373 # map input types to rpc msg
374 _params = dict()
375 msg = dict(type='Backups', request='List', version=1, params=_params)
376
377 reply = await self.rpc(msg)
378 return reply
379
380
381
382 @ReturnMapping(None)
383 async def PrepareRestore(self):
384 '''
385
386 Returns -> None
387 '''
388 # map input types to rpc msg
389 _params = dict()
390 msg = dict(type='Backups', request='PrepareRestore', version=1, params=_params)
391
392 reply = await self.rpc(msg)
393 return reply
394
395
396
397 @ReturnMapping(None)
398 async def Remove(self, id_):
399 '''
400 id_ : str
401 Returns -> None
402 '''
403 # map input types to rpc msg
404 _params = dict()
405 msg = dict(type='Backups', request='Remove', version=1, params=_params)
406 _params['id'] = id_
407 reply = await self.rpc(msg)
408 return reply
409
410
411
412 @ReturnMapping(None)
413 async def Restore(self, backup_id):
414 '''
415 backup_id : str
416 Returns -> None
417 '''
418 # map input types to rpc msg
419 _params = dict()
420 msg = dict(type='Backups', request='Restore', version=1, params=_params)
421 _params['backup-id'] = backup_id
422 reply = await self.rpc(msg)
423 return reply
424
425
426
427 class BundleFacade(Type):
428 name = 'Bundle'
429 version = 1
430 schema = {'definitions': {'BundleChange': {'additionalProperties': False,
431 'properties': {'args': {'items': {'additionalProperties': True,
432 'type': 'object'},
433 'type': 'array'},
434 'id': {'type': 'string'},
435 'method': {'type': 'string'},
436 'requires': {'items': {'type': 'string'},
437 'type': 'array'}},
438 'required': ['id',
439 'method',
440 'args',
441 'requires'],
442 'type': 'object'},
443 'BundleChangesParams': {'additionalProperties': False,
444 'properties': {'yaml': {'type': 'string'}},
445 'required': ['yaml'],
446 'type': 'object'},
447 'BundleChangesResults': {'additionalProperties': False,
448 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
449 'type': 'array'},
450 'errors': {'items': {'type': 'string'},
451 'type': 'array'}},
452 'type': 'object'}},
453 'properties': {'GetChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
454 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
455 'type': 'object'}},
456 'type': 'object'}
457
458
459 @ReturnMapping(BundleChangesResults)
460 async def GetChanges(self, yaml):
461 '''
462 yaml : str
463 Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
464 '''
465 # map input types to rpc msg
466 _params = dict()
467 msg = dict(type='Bundle', request='GetChanges', version=1, params=_params)
468 _params['yaml'] = yaml
469 reply = await self.rpc(msg)
470 return reply
471
472
473
474 class ClientFacade(Type):
475 name = 'Client'
476 version = 1
477 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
478 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
479 'type': 'array'},
480 'type': 'array'}},
481 'required': ['servers'],
482 'type': 'object'},
483 'AddCharm': {'additionalProperties': False,
484 'properties': {'channel': {'type': 'string'},
485 'url': {'type': 'string'}},
486 'required': ['url', 'channel'],
487 'type': 'object'},
488 'AddCharmWithAuthorization': {'additionalProperties': False,
489 'properties': {'channel': {'type': 'string'},
490 'macaroon': {'$ref': '#/definitions/Macaroon'},
491 'url': {'type': 'string'}},
492 'required': ['url',
493 'channel',
494 'macaroon'],
495 'type': 'object'},
496 'AddMachineParams': {'additionalProperties': False,
497 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
498 'type': 'array'},
499 'constraints': {'$ref': '#/definitions/Value'},
500 'container-type': {'type': 'string'},
501 'disks': {'items': {'$ref': '#/definitions/Constraints'},
502 'type': 'array'},
503 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
504 'instance-id': {'type': 'string'},
505 'jobs': {'items': {'type': 'string'},
506 'type': 'array'},
507 'nonce': {'type': 'string'},
508 'parent-id': {'type': 'string'},
509 'placement': {'$ref': '#/definitions/Placement'},
510 'series': {'type': 'string'}},
511 'required': ['series',
512 'constraints',
513 'jobs',
514 'parent-id',
515 'container-type',
516 'instance-id',
517 'nonce',
518 'hardware-characteristics',
519 'addresses'],
520 'type': 'object'},
521 'AddMachines': {'additionalProperties': False,
522 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
523 'type': 'array'}},
524 'required': ['params'],
525 'type': 'object'},
526 'AddMachinesResult': {'additionalProperties': False,
527 'properties': {'error': {'$ref': '#/definitions/Error'},
528 'machine': {'type': 'string'}},
529 'required': ['machine'],
530 'type': 'object'},
531 'AddMachinesResults': {'additionalProperties': False,
532 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
533 'type': 'array'}},
534 'required': ['machines'],
535 'type': 'object'},
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'],
542 'type': 'object'},
543 'AgentVersionResult': {'additionalProperties': False,
544 'properties': {'version': {'$ref': '#/definitions/Number'}},
545 'required': ['version'],
546 'type': 'object'},
547 'AllWatcherId': {'additionalProperties': False,
548 'properties': {'watcher-id': {'type': 'string'}},
549 'required': ['watcher-id'],
550 'type': 'object'},
551 'ApplicationStatus': {'additionalProperties': False,
552 'properties': {'can-upgrade-to': {'type': 'string'},
553 'charm': {'type': 'string'},
554 'err': {'additionalProperties': True,
555 'type': 'object'},
556 'exposed': {'type': 'boolean'},
557 'life': {'type': 'string'},
558 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
559 'type': 'object'},
560 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
561 'type': 'array'}},
562 'type': 'object'},
563 'series': {'type': 'string'},
564 'status': {'$ref': '#/definitions/DetailedStatus'},
565 'subordinate-to': {'items': {'type': 'string'},
566 'type': 'array'},
567 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
568 'type': 'object'},
569 'workload-version': {'type': 'string'}},
570 'required': ['charm',
571 'series',
572 'exposed',
573 'life',
574 'relations',
575 'can-upgrade-to',
576 'subordinate-to',
577 'units',
578 'meter-statuses',
579 'status',
580 'workload-version'],
581 'type': 'object'},
582 'Binary': {'additionalProperties': False,
583 'properties': {'Arch': {'type': 'string'},
584 'Number': {'$ref': '#/definitions/Number'},
585 'Series': {'type': 'string'}},
586 'required': ['Number', 'Series', 'Arch'],
587 'type': 'object'},
588 'BundleChange': {'additionalProperties': False,
589 'properties': {'args': {'items': {'additionalProperties': True,
590 'type': 'object'},
591 'type': 'array'},
592 'id': {'type': 'string'},
593 'method': {'type': 'string'},
594 'requires': {'items': {'type': 'string'},
595 'type': 'array'}},
596 'required': ['id',
597 'method',
598 'args',
599 'requires'],
600 'type': 'object'},
601 'BundleChangesParams': {'additionalProperties': False,
602 'properties': {'yaml': {'type': 'string'}},
603 'required': ['yaml'],
604 'type': 'object'},
605 'BundleChangesResults': {'additionalProperties': False,
606 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
607 'type': 'array'},
608 'errors': {'items': {'type': 'string'},
609 'type': 'array'}},
610 'type': 'object'},
611 'ConfigValue': {'additionalProperties': False,
612 'properties': {'source': {'type': 'string'},
613 'value': {'additionalProperties': True,
614 'type': 'object'}},
615 'required': ['value', 'source'],
616 'type': 'object'},
617 'Constraints': {'additionalProperties': False,
618 'properties': {'Count': {'type': 'integer'},
619 'Pool': {'type': 'string'},
620 'Size': {'type': 'integer'}},
621 'required': ['Pool', 'Size', 'Count'],
622 'type': 'object'},
623 'DestroyMachines': {'additionalProperties': False,
624 'properties': {'force': {'type': 'boolean'},
625 'machine-names': {'items': {'type': 'string'},
626 'type': 'array'}},
627 'required': ['machine-names', 'force'],
628 'type': 'object'},
629 'DetailedStatus': {'additionalProperties': False,
630 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
631 'type': 'object'}},
632 'type': 'object'},
633 'err': {'additionalProperties': True,
634 'type': 'object'},
635 'info': {'type': 'string'},
636 'kind': {'type': 'string'},
637 'life': {'type': 'string'},
638 'since': {'format': 'date-time',
639 'type': 'string'},
640 'status': {'type': 'string'},
641 'version': {'type': 'string'}},
642 'required': ['status',
643 'info',
644 'data',
645 'since',
646 'kind',
647 'version',
648 'life'],
649 'type': 'object'},
650 'EndpointStatus': {'additionalProperties': False,
651 'properties': {'application': {'type': 'string'},
652 'name': {'type': 'string'},
653 'role': {'type': 'string'},
654 'subordinate': {'type': 'boolean'}},
655 'required': ['application',
656 'name',
657 'role',
658 'subordinate'],
659 'type': 'object'},
660 'Entities': {'additionalProperties': False,
661 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
662 'type': 'array'}},
663 'required': ['entities'],
664 'type': 'object'},
665 'Entity': {'additionalProperties': False,
666 'properties': {'tag': {'type': 'string'}},
667 'required': ['tag'],
668 'type': 'object'},
669 'EntityStatus': {'additionalProperties': False,
670 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
671 'type': 'object'}},
672 'type': 'object'},
673 'info': {'type': 'string'},
674 'since': {'format': 'date-time',
675 'type': 'string'},
676 'status': {'type': 'string'}},
677 'required': ['status', 'info', 'since'],
678 'type': 'object'},
679 'Error': {'additionalProperties': False,
680 'properties': {'code': {'type': 'string'},
681 'info': {'$ref': '#/definitions/ErrorInfo'},
682 'message': {'type': 'string'}},
683 'required': ['message', 'code'],
684 'type': 'object'},
685 'ErrorInfo': {'additionalProperties': False,
686 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
687 'macaroon-path': {'type': 'string'}},
688 'type': 'object'},
689 'ErrorResult': {'additionalProperties': False,
690 'properties': {'error': {'$ref': '#/definitions/Error'}},
691 'type': 'object'},
692 'ErrorResults': {'additionalProperties': False,
693 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
694 'type': 'array'}},
695 'required': ['results'],
696 'type': 'object'},
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',
704 'major',
705 'minor',
706 'arch',
707 'series'],
708 'type': 'object'},
709 'FindToolsResult': {'additionalProperties': False,
710 'properties': {'error': {'$ref': '#/definitions/Error'},
711 'list': {'items': {'$ref': '#/definitions/Tools'},
712 'type': 'array'}},
713 'required': ['list'],
714 'type': 'object'},
715 'FullStatus': {'additionalProperties': False,
716 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
717 'type': 'object'},
718 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
719 'type': 'object'},
720 'model': {'$ref': '#/definitions/ModelStatusInfo'},
721 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
722 'type': 'array'},
723 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}},
724 'type': 'object'}},
725 'required': ['model',
726 'machines',
727 'applications',
728 'remote-applications',
729 'relations'],
730 'type': 'object'},
731 'GetConstraintsResults': {'additionalProperties': False,
732 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
733 'required': ['constraints'],
734 'type': 'object'},
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'},
743 'type': 'array'}},
744 'type': 'object'},
745 'History': {'additionalProperties': False,
746 'properties': {'error': {'$ref': '#/definitions/Error'},
747 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
748 'type': 'array'}},
749 'required': ['statuses'],
750 'type': 'object'},
751 'HostPort': {'additionalProperties': False,
752 'properties': {'Address': {'$ref': '#/definitions/Address'},
753 'port': {'type': 'integer'}},
754 'required': ['Address', 'port'],
755 'type': 'object'},
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'},
765 'type': 'array'}},
766 'type': 'object'},
767 'MachineStatus': {'additionalProperties': False,
768 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
769 'constraints': {'type': 'string'},
770 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
771 'type': 'object'},
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'},
779 'type': 'array'},
780 'jobs': {'items': {'type': 'string'},
781 'type': 'array'},
782 'network-interfaces': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInterface'}},
783 'type': 'object'},
784 'series': {'type': 'string'},
785 'wants-vote': {'type': 'boolean'}},
786 'required': ['agent-status',
787 'instance-status',
788 'dns-name',
789 'instance-id',
790 'series',
791 'id',
792 'containers',
793 'constraints',
794 'hardware',
795 'jobs',
796 'has-vote',
797 'wants-vote'],
798 'type': 'object'},
799 'MeterStatus': {'additionalProperties': False,
800 'properties': {'color': {'type': 'string'},
801 'message': {'type': 'string'}},
802 'required': ['color', 'message'],
803 'type': 'object'},
804 'ModelConfigResults': {'additionalProperties': False,
805 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
806 'type': 'object'}},
807 'required': ['config'],
808 'type': 'object'},
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'},
817 'type': 'array'},
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'},
825 'type': 'array'},
826 'uuid': {'type': 'string'}},
827 'required': ['name',
828 'uuid',
829 'controller-uuid',
830 'provider-type',
831 'default-series',
832 'cloud-tag',
833 'owner-tag',
834 'life',
835 'status',
836 'users',
837 'machines',
838 'sla'],
839 'type': 'object'},
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'}},
847 'required': ['id'],
848 'type': 'object'},
849 'ModelMigrationStatus': {'additionalProperties': False,
850 'properties': {'end': {'format': 'date-time',
851 'type': 'string'},
852 'start': {'format': 'date-time',
853 'type': 'string'},
854 'status': {'type': 'string'}},
855 'required': ['status', 'start'],
856 'type': 'object'},
857 'ModelSLA': {'additionalProperties': False,
858 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
859 'creds': {'items': {'type': 'integer'},
860 'type': 'array'}},
861 'required': ['ModelSLAInfo', 'creds'],
862 'type': 'object'},
863 'ModelSLAInfo': {'additionalProperties': False,
864 'properties': {'level': {'type': 'string'},
865 'owner': {'type': 'string'}},
866 'required': ['level', 'owner'],
867 'type': 'object'},
868 'ModelSet': {'additionalProperties': False,
869 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
870 'type': 'object'}},
871 'type': 'object'}},
872 'required': ['config'],
873 'type': 'object'},
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'}},
883 'required': ['name',
884 'cloud-tag',
885 'version',
886 'available-version',
887 'model-status',
888 'meter-status',
889 'sla'],
890 'type': 'object'},
891 'ModelUnset': {'additionalProperties': False,
892 'properties': {'keys': {'items': {'type': 'string'},
893 'type': 'array'}},
894 'required': ['keys'],
895 'type': 'object'},
896 'ModelUserInfo': {'additionalProperties': False,
897 'properties': {'access': {'type': 'string'},
898 'display-name': {'type': 'string'},
899 'last-connection': {'format': 'date-time',
900 'type': 'string'},
901 'user': {'type': 'string'}},
902 'required': ['user',
903 'display-name',
904 'last-connection',
905 'access'],
906 'type': 'object'},
907 'ModelUserInfoResult': {'additionalProperties': False,
908 'properties': {'error': {'$ref': '#/definitions/Error'},
909 'result': {'$ref': '#/definitions/ModelUserInfo'}},
910 'type': 'object'},
911 'ModelUserInfoResults': {'additionalProperties': False,
912 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
913 'type': 'array'}},
914 'required': ['results'],
915 'type': 'object'},
916 'NetworkInterface': {'additionalProperties': False,
917 'properties': {'dns-nameservers': {'items': {'type': 'string'},
918 'type': 'array'},
919 'gateway': {'type': 'string'},
920 'ip-addresses': {'items': {'type': 'string'},
921 'type': 'array'},
922 'is-up': {'type': 'boolean'},
923 'mac-address': {'type': 'string'},
924 'space': {'type': 'string'}},
925 'required': ['ip-addresses',
926 'mac-address',
927 'is-up'],
928 'type': 'object'},
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',
936 'Minor',
937 'Tag',
938 'Patch',
939 'Build'],
940 'type': 'object'},
941 'Placement': {'additionalProperties': False,
942 'properties': {'directive': {'type': 'string'},
943 'scope': {'type': 'string'}},
944 'required': ['scope', 'directive'],
945 'type': 'object'},
946 'PrivateAddress': {'additionalProperties': False,
947 'properties': {'target': {'type': 'string'}},
948 'required': ['target'],
949 'type': 'object'},
950 'PrivateAddressResults': {'additionalProperties': False,
951 'properties': {'private-address': {'type': 'string'}},
952 'required': ['private-address'],
953 'type': 'object'},
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',
960 'nonce',
961 'data-dir',
962 'disable-package-commands'],
963 'type': 'object'},
964 'ProvisioningScriptResult': {'additionalProperties': False,
965 'properties': {'script': {'type': 'string'}},
966 'required': ['script'],
967 'type': 'object'},
968 'PublicAddress': {'additionalProperties': False,
969 'properties': {'target': {'type': 'string'}},
970 'required': ['target'],
971 'type': 'object'},
972 'PublicAddressResults': {'additionalProperties': False,
973 'properties': {'public-address': {'type': 'string'}},
974 'required': ['public-address'],
975 'type': 'object'},
976 'RelationStatus': {'additionalProperties': False,
977 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
978 'type': 'array'},
979 'id': {'type': 'integer'},
980 'interface': {'type': 'string'},
981 'key': {'type': 'string'},
982 'scope': {'type': 'string'}},
983 'required': ['id',
984 'key',
985 'interface',
986 'scope',
987 'endpoints'],
988 'type': 'object'},
989 'RemoteApplicationStatus': {'additionalProperties': False,
990 'properties': {'application-name': {'type': 'string'},
991 'application-url': {'type': 'string'},
992 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
993 'type': 'array'},
994 'err': {'additionalProperties': True,
995 'type': 'object'},
996 'life': {'type': 'string'},
997 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
998 'type': 'array'}},
999 'type': 'object'},
1000 'status': {'$ref': '#/definitions/DetailedStatus'}},
1001 'required': ['application-url',
1002 'application-name',
1003 'endpoints',
1004 'life',
1005 'relations',
1006 'status'],
1007 'type': 'object'},
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',
1015 'role',
1016 'interface',
1017 'limit',
1018 'scope'],
1019 'type': 'object'},
1020 'ResolveCharmResult': {'additionalProperties': False,
1021 'properties': {'error': {'type': 'string'},
1022 'url': {'type': 'string'}},
1023 'type': 'object'},
1024 'ResolveCharmResults': {'additionalProperties': False,
1025 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
1026 'type': 'array'}},
1027 'required': ['urls'],
1028 'type': 'object'},
1029 'ResolveCharms': {'additionalProperties': False,
1030 'properties': {'references': {'items': {'type': 'string'},
1031 'type': 'array'}},
1032 'required': ['references'],
1033 'type': 'object'},
1034 'Resolved': {'additionalProperties': False,
1035 'properties': {'retry': {'type': 'boolean'},
1036 'unit-name': {'type': 'string'}},
1037 'required': ['unit-name', 'retry'],
1038 'type': 'object'},
1039 'SetConstraints': {'additionalProperties': False,
1040 'properties': {'application': {'type': 'string'},
1041 'constraints': {'$ref': '#/definitions/Value'}},
1042 'required': ['application', 'constraints'],
1043 'type': 'object'},
1044 'SetModelAgentVersion': {'additionalProperties': False,
1045 'properties': {'version': {'$ref': '#/definitions/Number'}},
1046 'required': ['version'],
1047 'type': 'object'},
1048 'StatusHistoryFilter': {'additionalProperties': False,
1049 'properties': {'date': {'format': 'date-time',
1050 'type': 'string'},
1051 'delta': {'type': 'integer'},
1052 'exclude': {'items': {'type': 'string'},
1053 'type': 'array'},
1054 'size': {'type': 'integer'}},
1055 'required': ['size',
1056 'date',
1057 'delta',
1058 'exclude'],
1059 'type': 'object'},
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',
1066 'size',
1067 'filter',
1068 'tag'],
1069 'type': 'object'},
1070 'StatusHistoryRequests': {'additionalProperties': False,
1071 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
1072 'type': 'array'}},
1073 'required': ['requests'],
1074 'type': 'object'},
1075 'StatusHistoryResult': {'additionalProperties': False,
1076 'properties': {'error': {'$ref': '#/definitions/Error'},
1077 'history': {'$ref': '#/definitions/History'}},
1078 'required': ['history'],
1079 'type': 'object'},
1080 'StatusHistoryResults': {'additionalProperties': False,
1081 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
1082 'type': 'array'}},
1083 'required': ['results'],
1084 'type': 'object'},
1085 'StatusParams': {'additionalProperties': False,
1086 'properties': {'patterns': {'items': {'type': 'string'},
1087 'type': 'array'}},
1088 'required': ['patterns'],
1089 'type': 'object'},
1090 'StringResult': {'additionalProperties': False,
1091 'properties': {'error': {'$ref': '#/definitions/Error'},
1092 'result': {'type': 'string'}},
1093 'required': ['result'],
1094 'type': 'object'},
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'],
1101 'type': 'object'},
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'},
1108 'type': 'array'},
1109 'public-address': {'type': 'string'},
1110 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
1111 'type': 'object'},
1112 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
1113 'workload-version': {'type': 'string'}},
1114 'required': ['agent-status',
1115 'workload-status',
1116 'workload-version',
1117 'machine',
1118 'opened-ports',
1119 'public-address',
1120 'charm',
1121 'subordinates'],
1122 'type': 'object'},
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'},
1132 'type': 'array'},
1133 'tags': {'items': {'type': 'string'},
1134 'type': 'array'},
1135 'virt-type': {'type': 'string'}},
1136 'type': 'object'}},
1137 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
1138 'type': 'object'},
1139 'AbortCurrentUpgrade': {'type': 'object'},
1140 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
1141 'type': 'object'},
1142 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
1143 'type': 'object'},
1144 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
1145 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
1146 'type': 'object'},
1147 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
1148 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
1149 'type': 'object'},
1150 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
1151 'type': 'object'},
1152 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
1153 'type': 'object'},
1154 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
1155 'Result': {'$ref': '#/definitions/FindToolsResult'}},
1156 'type': 'object'},
1157 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
1158 'Result': {'$ref': '#/definitions/FullStatus'}},
1159 'type': 'object'},
1160 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
1161 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
1162 'type': 'object'},
1163 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
1164 'type': 'object'},
1165 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
1166 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
1167 'type': 'object'},
1168 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
1169 'type': 'object'},
1170 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
1171 'type': 'object'},
1172 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
1173 'type': 'object'},
1174 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
1175 'type': 'object'},
1176 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
1177 'type': 'object'},
1178 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
1179 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
1180 'type': 'object'},
1181 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
1182 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
1183 'type': 'object'},
1184 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
1185 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
1186 'type': 'object'},
1187 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
1188 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
1189 'type': 'object'},
1190 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
1191 'type': 'object'},
1192 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1193 'Result': {'$ref': '#/definitions/ErrorResults'}},
1194 'type': 'object'},
1195 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1196 'type': 'object'},
1197 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
1198 'type': 'object'},
1199 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
1200 'type': 'object'},
1201 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
1202 'type': 'object'},
1203 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
1204 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
1205 'type': 'object'},
1206 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
1207 'type': 'object'}},
1208 'type': 'object'}
1209
1210
1211 @ReturnMapping(APIHostPortsResult)
1212 async def APIHostPorts(self):
1213 '''
1214
1215 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
1216 '''
1217 # map input types to rpc msg
1218 _params = dict()
1219 msg = dict(type='Client', request='APIHostPorts', version=1, params=_params)
1220
1221 reply = await self.rpc(msg)
1222 return reply
1223
1224
1225
1226 @ReturnMapping(None)
1227 async def AbortCurrentUpgrade(self):
1228 '''
1229
1230 Returns -> None
1231 '''
1232 # map input types to rpc msg
1233 _params = dict()
1234 msg = dict(type='Client', request='AbortCurrentUpgrade', version=1, params=_params)
1235
1236 reply = await self.rpc(msg)
1237 return reply
1238
1239
1240
1241 @ReturnMapping(None)
1242 async def AddCharm(self, channel, url):
1243 '''
1244 channel : str
1245 url : str
1246 Returns -> None
1247 '''
1248 # map input types to rpc msg
1249 _params = dict()
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)
1254 return reply
1255
1256
1257
1258 @ReturnMapping(None)
1259 async def AddCharmWithAuthorization(self, channel, macaroon, url):
1260 '''
1261 channel : str
1262 macaroon : Macaroon
1263 url : str
1264 Returns -> None
1265 '''
1266 # map input types to rpc msg
1267 _params = dict()
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)
1273 return reply
1274
1275
1276
1277 @ReturnMapping(AddMachinesResults)
1278 async def AddMachines(self, params):
1279 '''
1280 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1281 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1282 '''
1283 # map input types to rpc msg
1284 _params = dict()
1285 msg = dict(type='Client', request='AddMachines', version=1, params=_params)
1286 _params['params'] = params
1287 reply = await self.rpc(msg)
1288 return reply
1289
1290
1291
1292 @ReturnMapping(AddMachinesResults)
1293 async def AddMachinesV2(self, params):
1294 '''
1295 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1296 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1297 '''
1298 # map input types to rpc msg
1299 _params = dict()
1300 msg = dict(type='Client', request='AddMachinesV2', version=1, params=_params)
1301 _params['params'] = params
1302 reply = await self.rpc(msg)
1303 return reply
1304
1305
1306
1307 @ReturnMapping(AgentVersionResult)
1308 async def AgentVersion(self):
1309 '''
1310
1311 Returns -> Number
1312 '''
1313 # map input types to rpc msg
1314 _params = dict()
1315 msg = dict(type='Client', request='AgentVersion', version=1, params=_params)
1316
1317 reply = await self.rpc(msg)
1318 return reply
1319
1320
1321
1322 @ReturnMapping(None)
1323 async def DestroyMachines(self, force, machine_names):
1324 '''
1325 force : bool
1326 machine_names : typing.Sequence<+T_co>[str]
1327 Returns -> None
1328 '''
1329 # map input types to rpc msg
1330 _params = dict()
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)
1335 return reply
1336
1337
1338
1339 @ReturnMapping(FindToolsResult)
1340 async def FindTools(self, arch, major, minor, number, series):
1341 '''
1342 arch : str
1343 major : int
1344 minor : int
1345 number : Number
1346 series : str
1347 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
1348 '''
1349 # map input types to rpc msg
1350 _params = dict()
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)
1358 return reply
1359
1360
1361
1362 @ReturnMapping(FullStatus)
1363 async def FullStatus(self, patterns):
1364 '''
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>]
1367 '''
1368 # map input types to rpc msg
1369 _params = dict()
1370 msg = dict(type='Client', request='FullStatus', version=1, params=_params)
1371 _params['patterns'] = patterns
1372 reply = await self.rpc(msg)
1373 return reply
1374
1375
1376
1377 @ReturnMapping(BundleChangesResults)
1378 async def GetBundleChanges(self, yaml):
1379 '''
1380 yaml : str
1381 Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
1382 '''
1383 # map input types to rpc msg
1384 _params = dict()
1385 msg = dict(type='Client', request='GetBundleChanges', version=1, params=_params)
1386 _params['yaml'] = yaml
1387 reply = await self.rpc(msg)
1388 return reply
1389
1390
1391
1392 @ReturnMapping(GetConstraintsResults)
1393 async def GetModelConstraints(self):
1394 '''
1395
1396 Returns -> Value
1397 '''
1398 # map input types to rpc msg
1399 _params = dict()
1400 msg = dict(type='Client', request='GetModelConstraints', version=1, params=_params)
1401
1402 reply = await self.rpc(msg)
1403 return reply
1404
1405
1406
1407 @ReturnMapping(AddMachinesResults)
1408 async def InjectMachines(self, params):
1409 '''
1410 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1411 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1412 '''
1413 # map input types to rpc msg
1414 _params = dict()
1415 msg = dict(type='Client', request='InjectMachines', version=1, params=_params)
1416 _params['params'] = params
1417 reply = await self.rpc(msg)
1418 return reply
1419
1420
1421
1422 @ReturnMapping(ModelConfigResults)
1423 async def ModelGet(self):
1424 '''
1425
1426 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1427 '''
1428 # map input types to rpc msg
1429 _params = dict()
1430 msg = dict(type='Client', request='ModelGet', version=1, params=_params)
1431
1432 reply = await self.rpc(msg)
1433 return reply
1434
1435
1436
1437 @ReturnMapping(ModelInfo)
1438 async def ModelInfo(self):
1439 '''
1440
1441 Returns -> typing.Union[_ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
1442 '''
1443 # map input types to rpc msg
1444 _params = dict()
1445 msg = dict(type='Client', request='ModelInfo', version=1, params=_params)
1446
1447 reply = await self.rpc(msg)
1448 return reply
1449
1450
1451
1452 @ReturnMapping(None)
1453 async def ModelSet(self, config):
1454 '''
1455 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1456 Returns -> None
1457 '''
1458 # map input types to rpc msg
1459 _params = dict()
1460 msg = dict(type='Client', request='ModelSet', version=1, params=_params)
1461 _params['config'] = config
1462 reply = await self.rpc(msg)
1463 return reply
1464
1465
1466
1467 @ReturnMapping(None)
1468 async def ModelUnset(self, keys):
1469 '''
1470 keys : typing.Sequence<+T_co>[str]
1471 Returns -> None
1472 '''
1473 # map input types to rpc msg
1474 _params = dict()
1475 msg = dict(type='Client', request='ModelUnset', version=1, params=_params)
1476 _params['keys'] = keys
1477 reply = await self.rpc(msg)
1478 return reply
1479
1480
1481
1482 @ReturnMapping(ModelUserInfoResults)
1483 async def ModelUserInfo(self):
1484 '''
1485
1486 Returns -> typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
1487 '''
1488 # map input types to rpc msg
1489 _params = dict()
1490 msg = dict(type='Client', request='ModelUserInfo', version=1, params=_params)
1491
1492 reply = await self.rpc(msg)
1493 return reply
1494
1495
1496
1497 @ReturnMapping(PrivateAddressResults)
1498 async def PrivateAddress(self, target):
1499 '''
1500 target : str
1501 Returns -> str
1502 '''
1503 # map input types to rpc msg
1504 _params = dict()
1505 msg = dict(type='Client', request='PrivateAddress', version=1, params=_params)
1506 _params['target'] = target
1507 reply = await self.rpc(msg)
1508 return reply
1509
1510
1511
1512 @ReturnMapping(ProvisioningScriptResult)
1513 async def ProvisioningScript(self, data_dir, disable_package_commands, machine_id, nonce):
1514 '''
1515 data_dir : str
1516 disable_package_commands : bool
1517 machine_id : str
1518 nonce : str
1519 Returns -> str
1520 '''
1521 # map input types to rpc msg
1522 _params = dict()
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)
1529 return reply
1530
1531
1532
1533 @ReturnMapping(PublicAddressResults)
1534 async def PublicAddress(self, target):
1535 '''
1536 target : str
1537 Returns -> str
1538 '''
1539 # map input types to rpc msg
1540 _params = dict()
1541 msg = dict(type='Client', request='PublicAddress', version=1, params=_params)
1542 _params['target'] = target
1543 reply = await self.rpc(msg)
1544 return reply
1545
1546
1547
1548 @ReturnMapping(ResolveCharmResults)
1549 async def ResolveCharms(self, references):
1550 '''
1551 references : typing.Sequence<+T_co>[str]
1552 Returns -> typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
1553 '''
1554 # map input types to rpc msg
1555 _params = dict()
1556 msg = dict(type='Client', request='ResolveCharms', version=1, params=_params)
1557 _params['references'] = references
1558 reply = await self.rpc(msg)
1559 return reply
1560
1561
1562
1563 @ReturnMapping(None)
1564 async def Resolved(self, retry, unit_name):
1565 '''
1566 retry : bool
1567 unit_name : str
1568 Returns -> None
1569 '''
1570 # map input types to rpc msg
1571 _params = dict()
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)
1576 return reply
1577
1578
1579
1580 @ReturnMapping(ErrorResults)
1581 async def RetryProvisioning(self, entities):
1582 '''
1583 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1584 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1585 '''
1586 # map input types to rpc msg
1587 _params = dict()
1588 msg = dict(type='Client', request='RetryProvisioning', version=1, params=_params)
1589 _params['entities'] = entities
1590 reply = await self.rpc(msg)
1591 return reply
1592
1593
1594
1595 @ReturnMapping(StringResult)
1596 async def SLALevel(self):
1597 '''
1598
1599 Returns -> typing.Union[_ForwardRef('Error'), str]
1600 '''
1601 # map input types to rpc msg
1602 _params = dict()
1603 msg = dict(type='Client', request='SLALevel', version=1, params=_params)
1604
1605 reply = await self.rpc(msg)
1606 return reply
1607
1608
1609
1610 @ReturnMapping(None)
1611 async def SetModelAgentVersion(self, version):
1612 '''
1613 version : Number
1614 Returns -> None
1615 '''
1616 # map input types to rpc msg
1617 _params = dict()
1618 msg = dict(type='Client', request='SetModelAgentVersion', version=1, params=_params)
1619 _params['version'] = version
1620 reply = await self.rpc(msg)
1621 return reply
1622
1623
1624
1625 @ReturnMapping(None)
1626 async def SetModelConstraints(self, application, constraints):
1627 '''
1628 application : str
1629 constraints : Value
1630 Returns -> None
1631 '''
1632 # map input types to rpc msg
1633 _params = dict()
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)
1638 return reply
1639
1640
1641
1642 @ReturnMapping(None)
1643 async def SetSLALevel(self, creds, level):
1644 '''
1645 creds : typing.Sequence<+T_co>[int]
1646 level : str
1647 Returns -> None
1648 '''
1649 # map input types to rpc msg
1650 _params = dict()
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)
1655 return reply
1656
1657
1658
1659 @ReturnMapping(StatusHistoryResults)
1660 async def StatusHistory(self, requests):
1661 '''
1662 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
1663 Returns -> typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
1664 '''
1665 # map input types to rpc msg
1666 _params = dict()
1667 msg = dict(type='Client', request='StatusHistory', version=1, params=_params)
1668 _params['requests'] = requests
1669 reply = await self.rpc(msg)
1670 return reply
1671
1672
1673
1674 @ReturnMapping(AllWatcherId)
1675 async def WatchAll(self):
1676 '''
1677
1678 Returns -> str
1679 '''
1680 # map input types to rpc msg
1681 _params = dict()
1682 msg = dict(type='Client', request='WatchAll', version=1, params=_params)
1683
1684 reply = await self.rpc(msg)
1685 return reply
1686
1687
1688
1689 class CloudFacade(Type):
1690 name = 'Cloud'
1691 version = 1
1692 schema = {'definitions': {'Cloud': {'additionalProperties': False,
1693 'properties': {'auth-types': {'items': {'type': 'string'},
1694 'type': 'array'},
1695 'endpoint': {'type': 'string'},
1696 'identity-endpoint': {'type': 'string'},
1697 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
1698 'type': 'array'},
1699 'storage-endpoint': {'type': 'string'},
1700 'type': {'type': 'string'}},
1701 'required': ['type'],
1702 'type': 'object'},
1703 'CloudCredential': {'additionalProperties': False,
1704 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1705 'type': 'object'},
1706 'auth-type': {'type': 'string'},
1707 'redacted': {'items': {'type': 'string'},
1708 'type': 'array'}},
1709 'required': ['auth-type'],
1710 'type': 'object'},
1711 'CloudCredentialResult': {'additionalProperties': False,
1712 'properties': {'error': {'$ref': '#/definitions/Error'},
1713 'result': {'$ref': '#/definitions/CloudCredential'}},
1714 'type': 'object'},
1715 'CloudCredentialResults': {'additionalProperties': False,
1716 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
1717 'type': 'array'}},
1718 'type': 'object'},
1719 'CloudInstanceTypesConstraint': {'additionalProperties': False,
1720 'properties': {'cloud-tag': {'type': 'string'},
1721 'constraints': {'$ref': '#/definitions/Value'},
1722 'region': {'type': 'string'}},
1723 'required': ['cloud-tag',
1724 'region'],
1725 'type': 'object'},
1726 'CloudInstanceTypesConstraints': {'additionalProperties': False,
1727 'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'},
1728 'type': 'array'}},
1729 'required': ['constraints'],
1730 'type': 'object'},
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'],
1737 'type': 'object'},
1738 'CloudResult': {'additionalProperties': False,
1739 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
1740 'error': {'$ref': '#/definitions/Error'}},
1741 'type': 'object'},
1742 'CloudResults': {'additionalProperties': False,
1743 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
1744 'type': 'array'}},
1745 'type': 'object'},
1746 'CloudsResult': {'additionalProperties': False,
1747 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
1748 'type': 'object'}},
1749 'type': 'object'},
1750 'Entities': {'additionalProperties': False,
1751 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1752 'type': 'array'}},
1753 'required': ['entities'],
1754 'type': 'object'},
1755 'Entity': {'additionalProperties': False,
1756 'properties': {'tag': {'type': 'string'}},
1757 'required': ['tag'],
1758 'type': 'object'},
1759 'Error': {'additionalProperties': False,
1760 'properties': {'code': {'type': 'string'},
1761 'info': {'$ref': '#/definitions/ErrorInfo'},
1762 'message': {'type': 'string'}},
1763 'required': ['message', 'code'],
1764 'type': 'object'},
1765 'ErrorInfo': {'additionalProperties': False,
1766 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1767 'macaroon-path': {'type': 'string'}},
1768 'type': 'object'},
1769 'ErrorResult': {'additionalProperties': False,
1770 'properties': {'error': {'$ref': '#/definitions/Error'}},
1771 'type': 'object'},
1772 'ErrorResults': {'additionalProperties': False,
1773 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1774 'type': 'array'}},
1775 'required': ['results'],
1776 'type': 'object'},
1777 'InstanceType': {'additionalProperties': False,
1778 'properties': {'arches': {'items': {'type': 'string'},
1779 'type': 'array'},
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'],
1788 'type': 'object'},
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'},
1795 'type': 'array'}},
1796 'type': 'object'},
1797 'InstanceTypesResults': {'additionalProperties': False,
1798 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
1799 'type': 'array'}},
1800 'required': ['results'],
1801 'type': 'object'},
1802 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1803 'StringResult': {'additionalProperties': False,
1804 'properties': {'error': {'$ref': '#/definitions/Error'},
1805 'result': {'type': 'string'}},
1806 'required': ['result'],
1807 'type': 'object'},
1808 'StringsResult': {'additionalProperties': False,
1809 'properties': {'error': {'$ref': '#/definitions/Error'},
1810 'result': {'items': {'type': 'string'},
1811 'type': 'array'}},
1812 'type': 'object'},
1813 'StringsResults': {'additionalProperties': False,
1814 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1815 'type': 'array'}},
1816 'required': ['results'],
1817 'type': 'object'},
1818 'UpdateCloudCredential': {'additionalProperties': False,
1819 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
1820 'tag': {'type': 'string'}},
1821 'required': ['tag', 'credential'],
1822 'type': 'object'},
1823 'UpdateCloudCredentials': {'additionalProperties': False,
1824 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'},
1825 'type': 'array'}},
1826 'type': 'object'},
1827 'UserCloud': {'additionalProperties': False,
1828 'properties': {'cloud-tag': {'type': 'string'},
1829 'user-tag': {'type': 'string'}},
1830 'required': ['user-tag', 'cloud-tag'],
1831 'type': 'object'},
1832 'UserClouds': {'additionalProperties': False,
1833 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
1834 'type': 'array'}},
1835 'type': 'object'},
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'},
1845 'type': 'array'},
1846 'tags': {'items': {'type': 'string'},
1847 'type': 'array'},
1848 'virt-type': {'type': 'string'}},
1849 'type': 'object'}},
1850 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1851 'Result': {'$ref': '#/definitions/CloudResults'}},
1852 'type': 'object'},
1853 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
1854 'type': 'object'},
1855 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1856 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
1857 'type': 'object'},
1858 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1859 'type': 'object'},
1860 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
1861 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
1862 'type': 'object'},
1863 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1864 'Result': {'$ref': '#/definitions/ErrorResults'}},
1865 'type': 'object'},
1866 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'},
1867 'Result': {'$ref': '#/definitions/ErrorResults'}},
1868 'type': 'object'},
1869 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
1870 'Result': {'$ref': '#/definitions/StringsResults'}},
1871 'type': 'object'}},
1872 'type': 'object'}
1873
1874
1875 @ReturnMapping(CloudResults)
1876 async def Cloud(self, entities):
1877 '''
1878 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1879 Returns -> typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
1880 '''
1881 # map input types to rpc msg
1882 _params = dict()
1883 msg = dict(type='Cloud', request='Cloud', version=1, params=_params)
1884 _params['entities'] = entities
1885 reply = await self.rpc(msg)
1886 return reply
1887
1888
1889
1890 @ReturnMapping(CloudsResult)
1891 async def Clouds(self):
1892 '''
1893
1894 Returns -> typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
1895 '''
1896 # map input types to rpc msg
1897 _params = dict()
1898 msg = dict(type='Cloud', request='Clouds', version=1, params=_params)
1899
1900 reply = await self.rpc(msg)
1901 return reply
1902
1903
1904
1905 @ReturnMapping(CloudCredentialResults)
1906 async def Credential(self, entities):
1907 '''
1908 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1909 Returns -> typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
1910 '''
1911 # map input types to rpc msg
1912 _params = dict()
1913 msg = dict(type='Cloud', request='Credential', version=1, params=_params)
1914 _params['entities'] = entities
1915 reply = await self.rpc(msg)
1916 return reply
1917
1918
1919
1920 @ReturnMapping(StringResult)
1921 async def DefaultCloud(self):
1922 '''
1923
1924 Returns -> typing.Union[_ForwardRef('Error'), str]
1925 '''
1926 # map input types to rpc msg
1927 _params = dict()
1928 msg = dict(type='Cloud', request='DefaultCloud', version=1, params=_params)
1929
1930 reply = await self.rpc(msg)
1931 return reply
1932
1933
1934
1935 @ReturnMapping(InstanceTypesResults)
1936 async def InstanceTypes(self, constraints):
1937 '''
1938 constraints : typing.Sequence<+T_co>[~CloudInstanceTypesConstraint]<~CloudInstanceTypesConstraint>
1939 Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
1940 '''
1941 # map input types to rpc msg
1942 _params = dict()
1943 msg = dict(type='Cloud', request='InstanceTypes', version=1, params=_params)
1944 _params['constraints'] = constraints
1945 reply = await self.rpc(msg)
1946 return reply
1947
1948
1949
1950 @ReturnMapping(ErrorResults)
1951 async def RevokeCredentials(self, entities):
1952 '''
1953 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1954 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1955 '''
1956 # map input types to rpc msg
1957 _params = dict()
1958 msg = dict(type='Cloud', request='RevokeCredentials', version=1, params=_params)
1959 _params['entities'] = entities
1960 reply = await self.rpc(msg)
1961 return reply
1962
1963
1964
1965 @ReturnMapping(ErrorResults)
1966 async def UpdateCredentials(self, credentials):
1967 '''
1968 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
1969 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1970 '''
1971 # map input types to rpc msg
1972 _params = dict()
1973 msg = dict(type='Cloud', request='UpdateCredentials', version=1, params=_params)
1974 _params['credentials'] = credentials
1975 reply = await self.rpc(msg)
1976 return reply
1977
1978
1979
1980 @ReturnMapping(StringsResults)
1981 async def UserCredentials(self, user_clouds):
1982 '''
1983 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
1984 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
1985 '''
1986 # map input types to rpc msg
1987 _params = dict()
1988 msg = dict(type='Cloud', request='UserCredentials', version=1, params=_params)
1989 _params['user-clouds'] = user_clouds
1990 reply = await self.rpc(msg)
1991 return reply
1992
1993
1994
1995 class DeployerFacade(Type):
1996 name = 'Deployer'
1997 version = 1
1998 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
1999 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2000 'type': 'array'},
2001 'type': 'array'}},
2002 'required': ['servers'],
2003 'type': 'object'},
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'],
2010 'type': 'object'},
2011 'BytesResult': {'additionalProperties': False,
2012 'properties': {'result': {'items': {'type': 'integer'},
2013 'type': 'array'}},
2014 'required': ['result'],
2015 'type': 'object'},
2016 'DeployerConnectionValues': {'additionalProperties': False,
2017 'properties': {'api-addresses': {'items': {'type': 'string'},
2018 'type': 'array'},
2019 'state-addresses': {'items': {'type': 'string'},
2020 'type': 'array'}},
2021 'required': ['state-addresses',
2022 'api-addresses'],
2023 'type': 'object'},
2024 'Entities': {'additionalProperties': False,
2025 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2026 'type': 'array'}},
2027 'required': ['entities'],
2028 'type': 'object'},
2029 'Entity': {'additionalProperties': False,
2030 'properties': {'tag': {'type': 'string'}},
2031 'required': ['tag'],
2032 'type': 'object'},
2033 'EntityPassword': {'additionalProperties': False,
2034 'properties': {'password': {'type': 'string'},
2035 'tag': {'type': 'string'}},
2036 'required': ['tag', 'password'],
2037 'type': 'object'},
2038 'EntityPasswords': {'additionalProperties': False,
2039 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
2040 'type': 'array'}},
2041 'required': ['changes'],
2042 'type': 'object'},
2043 'EntityStatusArgs': {'additionalProperties': False,
2044 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2045 'type': 'object'}},
2046 'type': 'object'},
2047 'info': {'type': 'string'},
2048 'status': {'type': 'string'},
2049 'tag': {'type': 'string'}},
2050 'required': ['tag',
2051 'status',
2052 'info',
2053 'data'],
2054 'type': 'object'},
2055 'Error': {'additionalProperties': False,
2056 'properties': {'code': {'type': 'string'},
2057 'info': {'$ref': '#/definitions/ErrorInfo'},
2058 'message': {'type': 'string'}},
2059 'required': ['message', 'code'],
2060 'type': 'object'},
2061 'ErrorInfo': {'additionalProperties': False,
2062 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2063 'macaroon-path': {'type': 'string'}},
2064 'type': 'object'},
2065 'ErrorResult': {'additionalProperties': False,
2066 'properties': {'error': {'$ref': '#/definitions/Error'}},
2067 'type': 'object'},
2068 'ErrorResults': {'additionalProperties': False,
2069 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2070 'type': 'array'}},
2071 'required': ['results'],
2072 'type': 'object'},
2073 'HostPort': {'additionalProperties': False,
2074 'properties': {'Address': {'$ref': '#/definitions/Address'},
2075 'port': {'type': 'integer'}},
2076 'required': ['Address', 'port'],
2077 'type': 'object'},
2078 'LifeResult': {'additionalProperties': False,
2079 'properties': {'error': {'$ref': '#/definitions/Error'},
2080 'life': {'type': 'string'}},
2081 'required': ['life'],
2082 'type': 'object'},
2083 'LifeResults': {'additionalProperties': False,
2084 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2085 'type': 'array'}},
2086 'required': ['results'],
2087 'type': 'object'},
2088 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2089 'NotifyWatchResult': {'additionalProperties': False,
2090 'properties': {'NotifyWatcherId': {'type': 'string'},
2091 'error': {'$ref': '#/definitions/Error'}},
2092 'required': ['NotifyWatcherId'],
2093 'type': 'object'},
2094 'SetStatus': {'additionalProperties': False,
2095 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
2096 'type': 'array'}},
2097 'required': ['entities'],
2098 'type': 'object'},
2099 'StringResult': {'additionalProperties': False,
2100 'properties': {'error': {'$ref': '#/definitions/Error'},
2101 'result': {'type': 'string'}},
2102 'required': ['result'],
2103 'type': 'object'},
2104 'StringsResult': {'additionalProperties': False,
2105 'properties': {'error': {'$ref': '#/definitions/Error'},
2106 'result': {'items': {'type': 'string'},
2107 'type': 'array'}},
2108 'type': 'object'},
2109 'StringsWatchResult': {'additionalProperties': False,
2110 'properties': {'changes': {'items': {'type': 'string'},
2111 'type': 'array'},
2112 'error': {'$ref': '#/definitions/Error'},
2113 'watcher-id': {'type': 'string'}},
2114 'required': ['watcher-id'],
2115 'type': 'object'},
2116 'StringsWatchResults': {'additionalProperties': False,
2117 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
2118 'type': 'array'}},
2119 'required': ['results'],
2120 'type': 'object'}},
2121 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2122 'type': 'object'},
2123 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
2124 'type': 'object'},
2125 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
2126 'type': 'object'},
2127 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
2128 'type': 'object'},
2129 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2130 'Result': {'$ref': '#/definitions/LifeResults'}},
2131 'type': 'object'},
2132 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
2133 'type': 'object'},
2134 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2135 'Result': {'$ref': '#/definitions/ErrorResults'}},
2136 'type': 'object'},
2137 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
2138 'Result': {'$ref': '#/definitions/ErrorResults'}},
2139 'type': 'object'},
2140 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2141 'Result': {'$ref': '#/definitions/ErrorResults'}},
2142 'type': 'object'},
2143 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2144 'type': 'object'},
2145 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2146 'Result': {'$ref': '#/definitions/ErrorResults'}},
2147 'type': 'object'},
2148 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2149 'type': 'object'},
2150 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2151 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2152 'type': 'object'}},
2153 'type': 'object'}
2154
2155
2156 @ReturnMapping(StringsResult)
2157 async def APIAddresses(self):
2158 '''
2159
2160 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
2161 '''
2162 # map input types to rpc msg
2163 _params = dict()
2164 msg = dict(type='Deployer', request='APIAddresses', version=1, params=_params)
2165
2166 reply = await self.rpc(msg)
2167 return reply
2168
2169
2170
2171 @ReturnMapping(APIHostPortsResult)
2172 async def APIHostPorts(self):
2173 '''
2174
2175 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
2176 '''
2177 # map input types to rpc msg
2178 _params = dict()
2179 msg = dict(type='Deployer', request='APIHostPorts', version=1, params=_params)
2180
2181 reply = await self.rpc(msg)
2182 return reply
2183
2184
2185
2186 @ReturnMapping(BytesResult)
2187 async def CACert(self):
2188 '''
2189
2190 Returns -> typing.Sequence<+T_co>[int]
2191 '''
2192 # map input types to rpc msg
2193 _params = dict()
2194 msg = dict(type='Deployer', request='CACert', version=1, params=_params)
2195
2196 reply = await self.rpc(msg)
2197 return reply
2198
2199
2200
2201 @ReturnMapping(DeployerConnectionValues)
2202 async def ConnectionInfo(self):
2203 '''
2204
2205 Returns -> typing.Sequence<+T_co>[str]
2206 '''
2207 # map input types to rpc msg
2208 _params = dict()
2209 msg = dict(type='Deployer', request='ConnectionInfo', version=1, params=_params)
2210
2211 reply = await self.rpc(msg)
2212 return reply
2213
2214
2215
2216 @ReturnMapping(LifeResults)
2217 async def Life(self, entities):
2218 '''
2219 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2220 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2221 '''
2222 # map input types to rpc msg
2223 _params = dict()
2224 msg = dict(type='Deployer', request='Life', version=1, params=_params)
2225 _params['entities'] = entities
2226 reply = await self.rpc(msg)
2227 return reply
2228
2229
2230
2231 @ReturnMapping(StringResult)
2232 async def ModelUUID(self):
2233 '''
2234
2235 Returns -> typing.Union[_ForwardRef('Error'), str]
2236 '''
2237 # map input types to rpc msg
2238 _params = dict()
2239 msg = dict(type='Deployer', request='ModelUUID', version=1, params=_params)
2240
2241 reply = await self.rpc(msg)
2242 return reply
2243
2244
2245
2246 @ReturnMapping(ErrorResults)
2247 async def Remove(self, entities):
2248 '''
2249 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2250 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2251 '''
2252 # map input types to rpc msg
2253 _params = dict()
2254 msg = dict(type='Deployer', request='Remove', version=1, params=_params)
2255 _params['entities'] = entities
2256 reply = await self.rpc(msg)
2257 return reply
2258
2259
2260
2261 @ReturnMapping(ErrorResults)
2262 async def SetPasswords(self, changes):
2263 '''
2264 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
2265 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2266 '''
2267 # map input types to rpc msg
2268 _params = dict()
2269 msg = dict(type='Deployer', request='SetPasswords', version=1, params=_params)
2270 _params['changes'] = changes
2271 reply = await self.rpc(msg)
2272 return reply
2273
2274
2275
2276 @ReturnMapping(ErrorResults)
2277 async def SetStatus(self, entities):
2278 '''
2279 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2280 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2281 '''
2282 # map input types to rpc msg
2283 _params = dict()
2284 msg = dict(type='Deployer', request='SetStatus', version=1, params=_params)
2285 _params['entities'] = entities
2286 reply = await self.rpc(msg)
2287 return reply
2288
2289
2290
2291 @ReturnMapping(StringsResult)
2292 async def StateAddresses(self):
2293 '''
2294
2295 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
2296 '''
2297 # map input types to rpc msg
2298 _params = dict()
2299 msg = dict(type='Deployer', request='StateAddresses', version=1, params=_params)
2300
2301 reply = await self.rpc(msg)
2302 return reply
2303
2304
2305
2306 @ReturnMapping(ErrorResults)
2307 async def UpdateStatus(self, entities):
2308 '''
2309 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2310 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2311 '''
2312 # map input types to rpc msg
2313 _params = dict()
2314 msg = dict(type='Deployer', request='UpdateStatus', version=1, params=_params)
2315 _params['entities'] = entities
2316 reply = await self.rpc(msg)
2317 return reply
2318
2319
2320
2321 @ReturnMapping(NotifyWatchResult)
2322 async def WatchAPIHostPorts(self):
2323 '''
2324
2325 Returns -> typing.Union[str, _ForwardRef('Error')]
2326 '''
2327 # map input types to rpc msg
2328 _params = dict()
2329 msg = dict(type='Deployer', request='WatchAPIHostPorts', version=1, params=_params)
2330
2331 reply = await self.rpc(msg)
2332 return reply
2333
2334
2335
2336 @ReturnMapping(StringsWatchResults)
2337 async def WatchUnits(self, entities):
2338 '''
2339 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2340 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
2341 '''
2342 # map input types to rpc msg
2343 _params = dict()
2344 msg = dict(type='Deployer', request='WatchUnits', version=1, params=_params)
2345 _params['entities'] = entities
2346 reply = await self.rpc(msg)
2347 return reply
2348
2349
2350
2351 class HostKeyReporterFacade(Type):
2352 name = 'HostKeyReporter'
2353 version = 1
2354 schema = {'definitions': {'Error': {'additionalProperties': False,
2355 'properties': {'code': {'type': 'string'},
2356 'info': {'$ref': '#/definitions/ErrorInfo'},
2357 'message': {'type': 'string'}},
2358 'required': ['message', 'code'],
2359 'type': 'object'},
2360 'ErrorInfo': {'additionalProperties': False,
2361 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2362 'macaroon-path': {'type': 'string'}},
2363 'type': 'object'},
2364 'ErrorResult': {'additionalProperties': False,
2365 'properties': {'error': {'$ref': '#/definitions/Error'}},
2366 'type': 'object'},
2367 'ErrorResults': {'additionalProperties': False,
2368 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2369 'type': 'array'}},
2370 'required': ['results'],
2371 'type': 'object'},
2372 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2373 'SSHHostKeySet': {'additionalProperties': False,
2374 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
2375 'type': 'array'}},
2376 'required': ['entity-keys'],
2377 'type': 'object'},
2378 'SSHHostKeys': {'additionalProperties': False,
2379 'properties': {'public-keys': {'items': {'type': 'string'},
2380 'type': 'array'},
2381 'tag': {'type': 'string'}},
2382 'required': ['tag', 'public-keys'],
2383 'type': 'object'}},
2384 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
2385 'Result': {'$ref': '#/definitions/ErrorResults'}},
2386 'type': 'object'}},
2387 'type': 'object'}
2388
2389
2390 @ReturnMapping(ErrorResults)
2391 async def ReportKeys(self, entity_keys):
2392 '''
2393 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
2394 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2395 '''
2396 # map input types to rpc msg
2397 _params = dict()
2398 msg = dict(type='HostKeyReporter', request='ReportKeys', version=1, params=_params)
2399 _params['entity-keys'] = entity_keys
2400 reply = await self.rpc(msg)
2401 return reply
2402
2403
2404
2405 class KeyManagerFacade(Type):
2406 name = 'KeyManager'
2407 version = 1
2408 schema = {'definitions': {'Entities': {'additionalProperties': False,
2409 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2410 'type': 'array'}},
2411 'required': ['entities'],
2412 'type': 'object'},
2413 'Entity': {'additionalProperties': False,
2414 'properties': {'tag': {'type': 'string'}},
2415 'required': ['tag'],
2416 'type': 'object'},
2417 'Error': {'additionalProperties': False,
2418 'properties': {'code': {'type': 'string'},
2419 'info': {'$ref': '#/definitions/ErrorInfo'},
2420 'message': {'type': 'string'}},
2421 'required': ['message', 'code'],
2422 'type': 'object'},
2423 'ErrorInfo': {'additionalProperties': False,
2424 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2425 'macaroon-path': {'type': 'string'}},
2426 'type': 'object'},
2427 'ErrorResult': {'additionalProperties': False,
2428 'properties': {'error': {'$ref': '#/definitions/Error'}},
2429 'type': 'object'},
2430 'ErrorResults': {'additionalProperties': False,
2431 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2432 'type': 'array'}},
2433 'required': ['results'],
2434 'type': 'object'},
2435 'ListSSHKeys': {'additionalProperties': False,
2436 'properties': {'entities': {'$ref': '#/definitions/Entities'},
2437 'mode': {'type': 'boolean'}},
2438 'required': ['entities', 'mode'],
2439 'type': 'object'},
2440 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2441 'ModifyUserSSHKeys': {'additionalProperties': False,
2442 'properties': {'ssh-keys': {'items': {'type': 'string'},
2443 'type': 'array'},
2444 'user': {'type': 'string'}},
2445 'required': ['user', 'ssh-keys'],
2446 'type': 'object'},
2447 'StringsResult': {'additionalProperties': False,
2448 'properties': {'error': {'$ref': '#/definitions/Error'},
2449 'result': {'items': {'type': 'string'},
2450 'type': 'array'}},
2451 'type': 'object'},
2452 'StringsResults': {'additionalProperties': False,
2453 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
2454 'type': 'array'}},
2455 'required': ['results'],
2456 'type': 'object'}},
2457 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
2458 'Result': {'$ref': '#/definitions/ErrorResults'}},
2459 'type': 'object'},
2460 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
2461 'Result': {'$ref': '#/definitions/ErrorResults'}},
2462 'type': 'object'},
2463 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
2464 'Result': {'$ref': '#/definitions/ErrorResults'}},
2465 'type': 'object'},
2466 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
2467 'Result': {'$ref': '#/definitions/StringsResults'}},
2468 'type': 'object'}},
2469 'type': 'object'}
2470
2471
2472 @ReturnMapping(ErrorResults)
2473 async def AddKeys(self, ssh_keys, user):
2474 '''
2475 ssh_keys : typing.Sequence<+T_co>[str]
2476 user : str
2477 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2478 '''
2479 # map input types to rpc msg
2480 _params = dict()
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)
2485 return reply
2486
2487
2488
2489 @ReturnMapping(ErrorResults)
2490 async def DeleteKeys(self, ssh_keys, user):
2491 '''
2492 ssh_keys : typing.Sequence<+T_co>[str]
2493 user : str
2494 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2495 '''
2496 # map input types to rpc msg
2497 _params = dict()
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)
2502 return reply
2503
2504
2505
2506 @ReturnMapping(ErrorResults)
2507 async def ImportKeys(self, ssh_keys, user):
2508 '''
2509 ssh_keys : typing.Sequence<+T_co>[str]
2510 user : str
2511 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2512 '''
2513 # map input types to rpc msg
2514 _params = dict()
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)
2519 return reply
2520
2521
2522
2523 @ReturnMapping(StringsResults)
2524 async def ListKeys(self, entities, mode):
2525 '''
2526 entities : Entities
2527 mode : bool
2528 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2529 '''
2530 # map input types to rpc msg
2531 _params = dict()
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)
2536 return reply
2537
2538
2539
2540 class KeyUpdaterFacade(Type):
2541 name = 'KeyUpdater'
2542 version = 1
2543 schema = {'definitions': {'Entities': {'additionalProperties': False,
2544 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2545 'type': 'array'}},
2546 'required': ['entities'],
2547 'type': 'object'},
2548 'Entity': {'additionalProperties': False,
2549 'properties': {'tag': {'type': 'string'}},
2550 'required': ['tag'],
2551 'type': 'object'},
2552 'Error': {'additionalProperties': False,
2553 'properties': {'code': {'type': 'string'},
2554 'info': {'$ref': '#/definitions/ErrorInfo'},
2555 'message': {'type': 'string'}},
2556 'required': ['message', 'code'],
2557 'type': 'object'},
2558 'ErrorInfo': {'additionalProperties': False,
2559 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2560 'macaroon-path': {'type': 'string'}},
2561 'type': 'object'},
2562 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2563 'NotifyWatchResult': {'additionalProperties': False,
2564 'properties': {'NotifyWatcherId': {'type': 'string'},
2565 'error': {'$ref': '#/definitions/Error'}},
2566 'required': ['NotifyWatcherId'],
2567 'type': 'object'},
2568 'NotifyWatchResults': {'additionalProperties': False,
2569 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2570 'type': 'array'}},
2571 'required': ['results'],
2572 'type': 'object'},
2573 'StringsResult': {'additionalProperties': False,
2574 'properties': {'error': {'$ref': '#/definitions/Error'},
2575 'result': {'items': {'type': 'string'},
2576 'type': 'array'}},
2577 'type': 'object'},
2578 'StringsResults': {'additionalProperties': False,
2579 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
2580 'type': 'array'}},
2581 'required': ['results'],
2582 'type': 'object'}},
2583 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2584 'Result': {'$ref': '#/definitions/StringsResults'}},
2585 'type': 'object'},
2586 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2587 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2588 'type': 'object'}},
2589 'type': 'object'}
2590
2591
2592 @ReturnMapping(StringsResults)
2593 async def AuthorisedKeys(self, entities):
2594 '''
2595 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2596 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2597 '''
2598 # map input types to rpc msg
2599 _params = dict()
2600 msg = dict(type='KeyUpdater', request='AuthorisedKeys', version=1, params=_params)
2601 _params['entities'] = entities
2602 reply = await self.rpc(msg)
2603 return reply
2604
2605
2606
2607 @ReturnMapping(NotifyWatchResults)
2608 async def WatchAuthorisedKeys(self, entities):
2609 '''
2610 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2611 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2612 '''
2613 # map input types to rpc msg
2614 _params = dict()
2615 msg = dict(type='KeyUpdater', request='WatchAuthorisedKeys', version=1, params=_params)
2616 _params['entities'] = entities
2617 reply = await self.rpc(msg)
2618 return reply
2619
2620
2621
2622 class LifeFlagFacade(Type):
2623 name = 'LifeFlag'
2624 version = 1
2625 schema = {'definitions': {'Entities': {'additionalProperties': False,
2626 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2627 'type': 'array'}},
2628 'required': ['entities'],
2629 'type': 'object'},
2630 'Entity': {'additionalProperties': False,
2631 'properties': {'tag': {'type': 'string'}},
2632 'required': ['tag'],
2633 'type': 'object'},
2634 'Error': {'additionalProperties': False,
2635 'properties': {'code': {'type': 'string'},
2636 'info': {'$ref': '#/definitions/ErrorInfo'},
2637 'message': {'type': 'string'}},
2638 'required': ['message', 'code'],
2639 'type': 'object'},
2640 'ErrorInfo': {'additionalProperties': False,
2641 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2642 'macaroon-path': {'type': 'string'}},
2643 'type': 'object'},
2644 'LifeResult': {'additionalProperties': False,
2645 'properties': {'error': {'$ref': '#/definitions/Error'},
2646 'life': {'type': 'string'}},
2647 'required': ['life'],
2648 'type': 'object'},
2649 'LifeResults': {'additionalProperties': False,
2650 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2651 'type': 'array'}},
2652 'required': ['results'],
2653 'type': 'object'},
2654 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2655 'NotifyWatchResult': {'additionalProperties': False,
2656 'properties': {'NotifyWatcherId': {'type': 'string'},
2657 'error': {'$ref': '#/definitions/Error'}},
2658 'required': ['NotifyWatcherId'],
2659 'type': 'object'},
2660 'NotifyWatchResults': {'additionalProperties': False,
2661 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2662 'type': 'array'}},
2663 'required': ['results'],
2664 'type': 'object'}},
2665 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2666 'Result': {'$ref': '#/definitions/LifeResults'}},
2667 'type': 'object'},
2668 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2669 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2670 'type': 'object'}},
2671 'type': 'object'}
2672
2673
2674 @ReturnMapping(LifeResults)
2675 async def Life(self, entities):
2676 '''
2677 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2678 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2679 '''
2680 # map input types to rpc msg
2681 _params = dict()
2682 msg = dict(type='LifeFlag', request='Life', version=1, params=_params)
2683 _params['entities'] = entities
2684 reply = await self.rpc(msg)
2685 return reply
2686
2687
2688
2689 @ReturnMapping(NotifyWatchResults)
2690 async def Watch(self, entities):
2691 '''
2692 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2693 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2694 '''
2695 # map input types to rpc msg
2696 _params = dict()
2697 msg = dict(type='LifeFlag', request='Watch', version=1, params=_params)
2698 _params['entities'] = entities
2699 reply = await self.rpc(msg)
2700 return reply
2701
2702
2703
2704 class LogForwardingFacade(Type):
2705 name = 'LogForwarding'
2706 version = 1
2707 schema = {'definitions': {'Error': {'additionalProperties': False,
2708 'properties': {'code': {'type': 'string'},
2709 'info': {'$ref': '#/definitions/ErrorInfo'},
2710 'message': {'type': 'string'}},
2711 'required': ['message', 'code'],
2712 'type': 'object'},
2713 'ErrorInfo': {'additionalProperties': False,
2714 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2715 'macaroon-path': {'type': 'string'}},
2716 'type': 'object'},
2717 'ErrorResult': {'additionalProperties': False,
2718 'properties': {'error': {'$ref': '#/definitions/Error'}},
2719 'type': 'object'},
2720 'ErrorResults': {'additionalProperties': False,
2721 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2722 'type': 'array'}},
2723 'required': ['results'],
2724 'type': 'object'},
2725 'LogForwardingGetLastSentParams': {'additionalProperties': False,
2726 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
2727 'type': 'array'}},
2728 'required': ['ids'],
2729 'type': 'object'},
2730 'LogForwardingGetLastSentResult': {'additionalProperties': False,
2731 'properties': {'err': {'$ref': '#/definitions/Error'},
2732 'record-id': {'type': 'integer'},
2733 'record-timestamp': {'type': 'integer'}},
2734 'required': ['record-id',
2735 'record-timestamp',
2736 'err'],
2737 'type': 'object'},
2738 'LogForwardingGetLastSentResults': {'additionalProperties': False,
2739 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
2740 'type': 'array'}},
2741 'required': ['results'],
2742 'type': 'object'},
2743 'LogForwardingID': {'additionalProperties': False,
2744 'properties': {'model': {'type': 'string'},
2745 'sink': {'type': 'string'}},
2746 'required': ['model', 'sink'],
2747 'type': 'object'},
2748 'LogForwardingSetLastSentParam': {'additionalProperties': False,
2749 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
2750 'record-id': {'type': 'integer'},
2751 'record-timestamp': {'type': 'integer'}},
2752 'required': ['LogForwardingID',
2753 'record-id',
2754 'record-timestamp'],
2755 'type': 'object'},
2756 'LogForwardingSetLastSentParams': {'additionalProperties': False,
2757 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
2758 'type': 'array'}},
2759 'required': ['params'],
2760 'type': 'object'},
2761 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2762 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
2763 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
2764 'type': 'object'},
2765 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
2766 'Result': {'$ref': '#/definitions/ErrorResults'}},
2767 'type': 'object'}},
2768 'type': 'object'}
2769
2770
2771 @ReturnMapping(LogForwardingGetLastSentResults)
2772 async def GetLastSent(self, ids):
2773 '''
2774 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
2775 Returns -> typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
2776 '''
2777 # map input types to rpc msg
2778 _params = dict()
2779 msg = dict(type='LogForwarding', request='GetLastSent', version=1, params=_params)
2780 _params['ids'] = ids
2781 reply = await self.rpc(msg)
2782 return reply
2783
2784
2785
2786 @ReturnMapping(ErrorResults)
2787 async def SetLastSent(self, params):
2788 '''
2789 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
2790 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2791 '''
2792 # map input types to rpc msg
2793 _params = dict()
2794 msg = dict(type='LogForwarding', request='SetLastSent', version=1, params=_params)
2795 _params['params'] = params
2796 reply = await self.rpc(msg)
2797 return reply
2798
2799
2800
2801 class LoggerFacade(Type):
2802 name = 'Logger'
2803 version = 1
2804 schema = {'definitions': {'Entities': {'additionalProperties': False,
2805 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2806 'type': 'array'}},
2807 'required': ['entities'],
2808 'type': 'object'},
2809 'Entity': {'additionalProperties': False,
2810 'properties': {'tag': {'type': 'string'}},
2811 'required': ['tag'],
2812 'type': 'object'},
2813 'Error': {'additionalProperties': False,
2814 'properties': {'code': {'type': 'string'},
2815 'info': {'$ref': '#/definitions/ErrorInfo'},
2816 'message': {'type': 'string'}},
2817 'required': ['message', 'code'],
2818 'type': 'object'},
2819 'ErrorInfo': {'additionalProperties': False,
2820 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2821 'macaroon-path': {'type': 'string'}},
2822 'type': 'object'},
2823 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2824 'NotifyWatchResult': {'additionalProperties': False,
2825 'properties': {'NotifyWatcherId': {'type': 'string'},
2826 'error': {'$ref': '#/definitions/Error'}},
2827 'required': ['NotifyWatcherId'],
2828 'type': 'object'},
2829 'NotifyWatchResults': {'additionalProperties': False,
2830 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2831 'type': 'array'}},
2832 'required': ['results'],
2833 'type': 'object'},
2834 'StringResult': {'additionalProperties': False,
2835 'properties': {'error': {'$ref': '#/definitions/Error'},
2836 'result': {'type': 'string'}},
2837 'required': ['result'],
2838 'type': 'object'},
2839 'StringResults': {'additionalProperties': False,
2840 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2841 'type': 'array'}},
2842 'required': ['results'],
2843 'type': 'object'}},
2844 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2845 'Result': {'$ref': '#/definitions/StringResults'}},
2846 'type': 'object'},
2847 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2848 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2849 'type': 'object'}},
2850 'type': 'object'}
2851
2852
2853 @ReturnMapping(StringResults)
2854 async def LoggingConfig(self, entities):
2855 '''
2856 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2857 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
2858 '''
2859 # map input types to rpc msg
2860 _params = dict()
2861 msg = dict(type='Logger', request='LoggingConfig', version=1, params=_params)
2862 _params['entities'] = entities
2863 reply = await self.rpc(msg)
2864 return reply
2865
2866
2867
2868 @ReturnMapping(NotifyWatchResults)
2869 async def WatchLoggingConfig(self, entities):
2870 '''
2871 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2872 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2873 '''
2874 # map input types to rpc msg
2875 _params = dict()
2876 msg = dict(type='Logger', request='WatchLoggingConfig', version=1, params=_params)
2877 _params['entities'] = entities
2878 reply = await self.rpc(msg)
2879 return reply
2880
2881
2882
2883 class MachineActionsFacade(Type):
2884 name = 'MachineActions'
2885 version = 1
2886 schema = {'definitions': {'Action': {'additionalProperties': False,
2887 'properties': {'name': {'type': 'string'},
2888 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
2889 'type': 'object'}},
2890 'type': 'object'},
2891 'receiver': {'type': 'string'},
2892 'tag': {'type': 'string'}},
2893 'required': ['tag', 'receiver', 'name'],
2894 'type': 'object'},
2895 'ActionExecutionResult': {'additionalProperties': False,
2896 'properties': {'action-tag': {'type': 'string'},
2897 'message': {'type': 'string'},
2898 'results': {'patternProperties': {'.*': {'additionalProperties': True,
2899 'type': 'object'}},
2900 'type': 'object'},
2901 'status': {'type': 'string'}},
2902 'required': ['action-tag', 'status'],
2903 'type': 'object'},
2904 'ActionExecutionResults': {'additionalProperties': False,
2905 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
2906 'type': 'array'}},
2907 'type': 'object'},
2908 'ActionResult': {'additionalProperties': False,
2909 'properties': {'action': {'$ref': '#/definitions/Action'},
2910 'completed': {'format': 'date-time',
2911 'type': 'string'},
2912 'enqueued': {'format': 'date-time',
2913 'type': 'string'},
2914 'error': {'$ref': '#/definitions/Error'},
2915 'message': {'type': 'string'},
2916 'output': {'patternProperties': {'.*': {'additionalProperties': True,
2917 'type': 'object'}},
2918 'type': 'object'},
2919 'started': {'format': 'date-time',
2920 'type': 'string'},
2921 'status': {'type': 'string'}},
2922 'type': 'object'},
2923 'ActionResults': {'additionalProperties': False,
2924 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
2925 'type': 'array'}},
2926 'type': 'object'},
2927 'ActionsByReceiver': {'additionalProperties': False,
2928 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
2929 'type': 'array'},
2930 'error': {'$ref': '#/definitions/Error'},
2931 'receiver': {'type': 'string'}},
2932 'type': 'object'},
2933 'ActionsByReceivers': {'additionalProperties': False,
2934 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
2935 'type': 'array'}},
2936 'type': 'object'},
2937 'Entities': {'additionalProperties': False,
2938 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2939 'type': 'array'}},
2940 'required': ['entities'],
2941 'type': 'object'},
2942 'Entity': {'additionalProperties': False,
2943 'properties': {'tag': {'type': 'string'}},
2944 'required': ['tag'],
2945 'type': 'object'},
2946 'Error': {'additionalProperties': False,
2947 'properties': {'code': {'type': 'string'},
2948 'info': {'$ref': '#/definitions/ErrorInfo'},
2949 'message': {'type': 'string'}},
2950 'required': ['message', 'code'],
2951 'type': 'object'},
2952 'ErrorInfo': {'additionalProperties': False,
2953 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2954 'macaroon-path': {'type': 'string'}},
2955 'type': 'object'},
2956 'ErrorResult': {'additionalProperties': False,
2957 'properties': {'error': {'$ref': '#/definitions/Error'}},
2958 'type': 'object'},
2959 'ErrorResults': {'additionalProperties': False,
2960 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2961 'type': 'array'}},
2962 'required': ['results'],
2963 'type': 'object'},
2964 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2965 'StringsWatchResult': {'additionalProperties': False,
2966 'properties': {'changes': {'items': {'type': 'string'},
2967 'type': 'array'},
2968 'error': {'$ref': '#/definitions/Error'},
2969 'watcher-id': {'type': 'string'}},
2970 'required': ['watcher-id'],
2971 'type': 'object'},
2972 'StringsWatchResults': {'additionalProperties': False,
2973 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
2974 'type': 'array'}},
2975 'required': ['results'],
2976 'type': 'object'}},
2977 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2978 'Result': {'$ref': '#/definitions/ActionResults'}},
2979 'type': 'object'},
2980 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2981 'Result': {'$ref': '#/definitions/ErrorResults'}},
2982 'type': 'object'},
2983 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
2984 'Result': {'$ref': '#/definitions/ErrorResults'}},
2985 'type': 'object'},
2986 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2987 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
2988 'type': 'object'},
2989 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2990 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2991 'type': 'object'}},
2992 'type': 'object'}
2993
2994
2995 @ReturnMapping(ActionResults)
2996 async def Actions(self, entities):
2997 '''
2998 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2999 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
3000 '''
3001 # map input types to rpc msg
3002 _params = dict()
3003 msg = dict(type='MachineActions', request='Actions', version=1, params=_params)
3004 _params['entities'] = entities
3005 reply = await self.rpc(msg)
3006 return reply
3007
3008
3009
3010 @ReturnMapping(ErrorResults)
3011 async def BeginActions(self, entities):
3012 '''
3013 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3014 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3015 '''
3016 # map input types to rpc msg
3017 _params = dict()
3018 msg = dict(type='MachineActions', request='BeginActions', version=1, params=_params)
3019 _params['entities'] = entities
3020 reply = await self.rpc(msg)
3021 return reply
3022
3023
3024
3025 @ReturnMapping(ErrorResults)
3026 async def FinishActions(self, results):
3027 '''
3028 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
3029 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3030 '''
3031 # map input types to rpc msg
3032 _params = dict()
3033 msg = dict(type='MachineActions', request='FinishActions', version=1, params=_params)
3034 _params['results'] = results
3035 reply = await self.rpc(msg)
3036 return reply
3037
3038
3039
3040 @ReturnMapping(ActionsByReceivers)
3041 async def RunningActions(self, entities):
3042 '''
3043 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3044 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
3045 '''
3046 # map input types to rpc msg
3047 _params = dict()
3048 msg = dict(type='MachineActions', request='RunningActions', version=1, params=_params)
3049 _params['entities'] = entities
3050 reply = await self.rpc(msg)
3051 return reply
3052
3053
3054
3055 @ReturnMapping(StringsWatchResults)
3056 async def WatchActionNotifications(self, entities):
3057 '''
3058 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3059 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
3060 '''
3061 # map input types to rpc msg
3062 _params = dict()
3063 msg = dict(type='MachineActions', request='WatchActionNotifications', version=1, params=_params)
3064 _params['entities'] = entities
3065 reply = await self.rpc(msg)
3066 return reply
3067
3068
3069
3070 class MachineUndertakerFacade(Type):
3071 name = 'MachineUndertaker'
3072 version = 1
3073 schema = {'definitions': {'Entities': {'additionalProperties': False,
3074 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3075 'type': 'array'}},
3076 'required': ['entities'],
3077 'type': 'object'},
3078 'EntitiesResult': {'additionalProperties': False,
3079 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3080 'type': 'array'},
3081 'error': {'$ref': '#/definitions/Error'}},
3082 'required': ['entities'],
3083 'type': 'object'},
3084 'EntitiesResults': {'additionalProperties': False,
3085 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
3086 'type': 'array'}},
3087 'required': ['results'],
3088 'type': 'object'},
3089 'Entity': {'additionalProperties': False,
3090 'properties': {'tag': {'type': 'string'}},
3091 'required': ['tag'],
3092 'type': 'object'},
3093 'Error': {'additionalProperties': False,
3094 'properties': {'code': {'type': 'string'},
3095 'info': {'$ref': '#/definitions/ErrorInfo'},
3096 'message': {'type': 'string'}},
3097 'required': ['message', 'code'],
3098 'type': 'object'},
3099 'ErrorInfo': {'additionalProperties': False,
3100 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3101 'macaroon-path': {'type': 'string'}},
3102 'type': 'object'},
3103 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3104 'NotifyWatchResult': {'additionalProperties': False,
3105 'properties': {'NotifyWatcherId': {'type': 'string'},
3106 'error': {'$ref': '#/definitions/Error'}},
3107 'required': ['NotifyWatcherId'],
3108 'type': 'object'},
3109 'NotifyWatchResults': {'additionalProperties': False,
3110 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3111 'type': 'array'}},
3112 'required': ['results'],
3113 'type': 'object'},
3114 'ProviderInterfaceInfo': {'additionalProperties': False,
3115 'properties': {'interface-name': {'type': 'string'},
3116 'mac-address': {'type': 'string'},
3117 'provider-id': {'type': 'string'}},
3118 'required': ['interface-name',
3119 'mac-address',
3120 'provider-id'],
3121 'type': 'object'},
3122 'ProviderInterfaceInfoResult': {'additionalProperties': False,
3123 'properties': {'error': {'$ref': '#/definitions/Error'},
3124 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'},
3125 'type': 'array'},
3126 'machine-tag': {'type': 'string'}},
3127 'required': ['machine-tag',
3128 'interfaces'],
3129 'type': 'object'},
3130 'ProviderInterfaceInfoResults': {'additionalProperties': False,
3131 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'},
3132 'type': 'array'}},
3133 'required': ['results'],
3134 'type': 'object'}},
3135 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3136 'Result': {'$ref': '#/definitions/EntitiesResults'}},
3137 'type': 'object'},
3138 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}},
3139 'type': 'object'},
3140 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3141 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}},
3142 'type': 'object'},
3143 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3144 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3145 'type': 'object'}},
3146 'type': 'object'}
3147
3148
3149 @ReturnMapping(EntitiesResults)
3150 async def AllMachineRemovals(self, entities):
3151 '''
3152 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3153 Returns -> typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
3154 '''
3155 # map input types to rpc msg
3156 _params = dict()
3157 msg = dict(type='MachineUndertaker', request='AllMachineRemovals', version=1, params=_params)
3158 _params['entities'] = entities
3159 reply = await self.rpc(msg)
3160 return reply
3161
3162
3163
3164 @ReturnMapping(None)
3165 async def CompleteMachineRemovals(self, entities):
3166 '''
3167 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3168 Returns -> None
3169 '''
3170 # map input types to rpc msg
3171 _params = dict()
3172 msg = dict(type='MachineUndertaker', request='CompleteMachineRemovals', version=1, params=_params)
3173 _params['entities'] = entities
3174 reply = await self.rpc(msg)
3175 return reply
3176
3177
3178
3179 @ReturnMapping(ProviderInterfaceInfoResults)
3180 async def GetMachineProviderInterfaceInfo(self, entities):
3181 '''
3182 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3183 Returns -> typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
3184 '''
3185 # map input types to rpc msg
3186 _params = dict()
3187 msg = dict(type='MachineUndertaker', request='GetMachineProviderInterfaceInfo', version=1, params=_params)
3188 _params['entities'] = entities
3189 reply = await self.rpc(msg)
3190 return reply
3191
3192
3193
3194 @ReturnMapping(NotifyWatchResults)
3195 async def WatchMachineRemovals(self, entities):
3196 '''
3197 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3198 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3199 '''
3200 # map input types to rpc msg
3201 _params = dict()
3202 msg = dict(type='MachineUndertaker', request='WatchMachineRemovals', version=1, params=_params)
3203 _params['entities'] = entities
3204 reply = await self.rpc(msg)
3205 return reply
3206
3207
3208
3209 class MachinerFacade(Type):
3210 name = 'Machiner'
3211 version = 1
3212 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
3213 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
3214 'type': 'array'},
3215 'type': 'array'}},
3216 'required': ['servers'],
3217 'type': 'object'},
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'],
3224 'type': 'object'},
3225 'BytesResult': {'additionalProperties': False,
3226 'properties': {'result': {'items': {'type': 'integer'},
3227 'type': 'array'}},
3228 'required': ['result'],
3229 'type': 'object'},
3230 'Entities': {'additionalProperties': False,
3231 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3232 'type': 'array'}},
3233 'required': ['entities'],
3234 'type': 'object'},
3235 'Entity': {'additionalProperties': False,
3236 'properties': {'tag': {'type': 'string'}},
3237 'required': ['tag'],
3238 'type': 'object'},
3239 'EntityStatusArgs': {'additionalProperties': False,
3240 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3241 'type': 'object'}},
3242 'type': 'object'},
3243 'info': {'type': 'string'},
3244 'status': {'type': 'string'},
3245 'tag': {'type': 'string'}},
3246 'required': ['tag',
3247 'status',
3248 'info',
3249 'data'],
3250 'type': 'object'},
3251 'Error': {'additionalProperties': False,
3252 'properties': {'code': {'type': 'string'},
3253 'info': {'$ref': '#/definitions/ErrorInfo'},
3254 'message': {'type': 'string'}},
3255 'required': ['message', 'code'],
3256 'type': 'object'},
3257 'ErrorInfo': {'additionalProperties': False,
3258 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3259 'macaroon-path': {'type': 'string'}},
3260 'type': 'object'},
3261 'ErrorResult': {'additionalProperties': False,
3262 'properties': {'error': {'$ref': '#/definitions/Error'}},
3263 'type': 'object'},
3264 'ErrorResults': {'additionalProperties': False,
3265 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3266 'type': 'array'}},
3267 'required': ['results'],
3268 'type': 'object'},
3269 'HostPort': {'additionalProperties': False,
3270 'properties': {'Address': {'$ref': '#/definitions/Address'},
3271 'port': {'type': 'integer'}},
3272 'required': ['Address', 'port'],
3273 'type': 'object'},
3274 'JobsResult': {'additionalProperties': False,
3275 'properties': {'error': {'$ref': '#/definitions/Error'},
3276 'jobs': {'items': {'type': 'string'},
3277 'type': 'array'}},
3278 'required': ['jobs'],
3279 'type': 'object'},
3280 'JobsResults': {'additionalProperties': False,
3281 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
3282 'type': 'array'}},
3283 'required': ['results'],
3284 'type': 'object'},
3285 'LifeResult': {'additionalProperties': False,
3286 'properties': {'error': {'$ref': '#/definitions/Error'},
3287 'life': {'type': 'string'}},
3288 'required': ['life'],
3289 'type': 'object'},
3290 'LifeResults': {'additionalProperties': False,
3291 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
3292 'type': 'array'}},
3293 'required': ['results'],
3294 'type': 'object'},
3295 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3296 'MachineAddresses': {'additionalProperties': False,
3297 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
3298 'type': 'array'},
3299 'tag': {'type': 'string'}},
3300 'required': ['tag', 'addresses'],
3301 'type': 'object'},
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'},
3309 'type': 'array'},
3310 'dns-servers': {'items': {'type': 'string'},
3311 'type': 'array'},
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'},
3325 'type': 'array'},
3326 'vlan-tag': {'type': 'integer'}},
3327 'required': ['device-index',
3328 'mac-address',
3329 'cidr',
3330 'mtu',
3331 'provider-id',
3332 'provider-subnet-id',
3333 'provider-space-id',
3334 'provider-address-id',
3335 'provider-vlan-id',
3336 'vlan-tag',
3337 'interface-name',
3338 'parent-interface-name',
3339 'interface-type',
3340 'disabled'],
3341 'type': 'object'},
3342 'NetworkRoute': {'additionalProperties': False,
3343 'properties': {'destination-cidr': {'type': 'string'},
3344 'gateway-ip': {'type': 'string'},
3345 'metric': {'type': 'integer'}},
3346 'required': ['destination-cidr',
3347 'gateway-ip',
3348 'metric'],
3349 'type': 'object'},
3350 'NotifyWatchResult': {'additionalProperties': False,
3351 'properties': {'NotifyWatcherId': {'type': 'string'},
3352 'error': {'$ref': '#/definitions/Error'}},
3353 'required': ['NotifyWatcherId'],
3354 'type': 'object'},
3355 'NotifyWatchResults': {'additionalProperties': False,
3356 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3357 'type': 'array'}},
3358 'required': ['results'],
3359 'type': 'object'},
3360 'SetMachineNetworkConfig': {'additionalProperties': False,
3361 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
3362 'type': 'array'},
3363 'tag': {'type': 'string'}},
3364 'required': ['tag', 'config'],
3365 'type': 'object'},
3366 'SetMachinesAddresses': {'additionalProperties': False,
3367 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
3368 'type': 'array'}},
3369 'required': ['machine-addresses'],
3370 'type': 'object'},
3371 'SetStatus': {'additionalProperties': False,
3372 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
3373 'type': 'array'}},
3374 'required': ['entities'],
3375 'type': 'object'},
3376 'StringResult': {'additionalProperties': False,
3377 'properties': {'error': {'$ref': '#/definitions/Error'},
3378 'result': {'type': 'string'}},
3379 'required': ['result'],
3380 'type': 'object'},
3381 'StringsResult': {'additionalProperties': False,
3382 'properties': {'error': {'$ref': '#/definitions/Error'},
3383 'result': {'items': {'type': 'string'},
3384 'type': 'array'}},
3385 'type': 'object'}},
3386 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
3387 'type': 'object'},
3388 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
3389 'type': 'object'},
3390 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
3391 'type': 'object'},
3392 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3393 'Result': {'$ref': '#/definitions/ErrorResults'}},
3394 'type': 'object'},
3395 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3396 'Result': {'$ref': '#/definitions/JobsResults'}},
3397 'type': 'object'},
3398 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3399 'Result': {'$ref': '#/definitions/LifeResults'}},
3400 'type': 'object'},
3401 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3402 'type': 'object'},
3403 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
3404 'Result': {'$ref': '#/definitions/ErrorResults'}},
3405 'type': 'object'},
3406 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
3407 'type': 'object'},
3408 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3409 'Result': {'$ref': '#/definitions/ErrorResults'}},
3410 'type': 'object'},
3411 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3412 'Result': {'$ref': '#/definitions/ErrorResults'}},
3413 'type': 'object'},
3414 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3415 'Result': {'$ref': '#/definitions/ErrorResults'}},
3416 'type': 'object'},
3417 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3418 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3419 'type': 'object'},
3420 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3421 'type': 'object'}},
3422 'type': 'object'}
3423
3424
3425 @ReturnMapping(StringsResult)
3426 async def APIAddresses(self):
3427 '''
3428
3429 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
3430 '''
3431 # map input types to rpc msg
3432 _params = dict()
3433 msg = dict(type='Machiner', request='APIAddresses', version=1, params=_params)
3434
3435 reply = await self.rpc(msg)
3436 return reply
3437
3438
3439
3440 @ReturnMapping(APIHostPortsResult)
3441 async def APIHostPorts(self):
3442 '''
3443
3444 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
3445 '''
3446 # map input types to rpc msg
3447 _params = dict()
3448 msg = dict(type='Machiner', request='APIHostPorts', version=1, params=_params)
3449
3450 reply = await self.rpc(msg)
3451 return reply
3452
3453
3454
3455 @ReturnMapping(BytesResult)
3456 async def CACert(self):
3457 '''
3458
3459 Returns -> typing.Sequence<+T_co>[int]
3460 '''
3461 # map input types to rpc msg
3462 _params = dict()
3463 msg = dict(type='Machiner', request='CACert', version=1, params=_params)
3464
3465 reply = await self.rpc(msg)
3466 return reply
3467
3468
3469
3470 @ReturnMapping(ErrorResults)
3471 async def EnsureDead(self, entities):
3472 '''
3473 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3474 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3475 '''
3476 # map input types to rpc msg
3477 _params = dict()
3478 msg = dict(type='Machiner', request='EnsureDead', version=1, params=_params)
3479 _params['entities'] = entities
3480 reply = await self.rpc(msg)
3481 return reply
3482
3483
3484
3485 @ReturnMapping(JobsResults)
3486 async def Jobs(self, entities):
3487 '''
3488 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3489 Returns -> typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
3490 '''
3491 # map input types to rpc msg
3492 _params = dict()
3493 msg = dict(type='Machiner', request='Jobs', version=1, params=_params)
3494 _params['entities'] = entities
3495 reply = await self.rpc(msg)
3496 return reply
3497
3498
3499
3500 @ReturnMapping(LifeResults)
3501 async def Life(self, entities):
3502 '''
3503 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3504 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
3505 '''
3506 # map input types to rpc msg
3507 _params = dict()
3508 msg = dict(type='Machiner', request='Life', version=1, params=_params)
3509 _params['entities'] = entities
3510 reply = await self.rpc(msg)
3511 return reply
3512
3513
3514
3515 @ReturnMapping(StringResult)
3516 async def ModelUUID(self):
3517 '''
3518
3519 Returns -> typing.Union[_ForwardRef('Error'), str]
3520 '''
3521 # map input types to rpc msg
3522 _params = dict()
3523 msg = dict(type='Machiner', request='ModelUUID', version=1, params=_params)
3524
3525 reply = await self.rpc(msg)
3526 return reply
3527
3528
3529
3530 @ReturnMapping(ErrorResults)
3531 async def SetMachineAddresses(self, machine_addresses):
3532 '''
3533 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
3534 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3535 '''
3536 # map input types to rpc msg
3537 _params = dict()
3538 msg = dict(type='Machiner', request='SetMachineAddresses', version=1, params=_params)
3539 _params['machine-addresses'] = machine_addresses
3540 reply = await self.rpc(msg)
3541 return reply
3542
3543
3544
3545 @ReturnMapping(None)
3546 async def SetObservedNetworkConfig(self, config, tag):
3547 '''
3548 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3549 tag : str
3550 Returns -> None
3551 '''
3552 # map input types to rpc msg
3553 _params = dict()
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)
3558 return reply
3559
3560
3561
3562 @ReturnMapping(ErrorResults)
3563 async def SetProviderNetworkConfig(self, entities):
3564 '''
3565 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3566 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3567 '''
3568 # map input types to rpc msg
3569 _params = dict()
3570 msg = dict(type='Machiner', request='SetProviderNetworkConfig', version=1, params=_params)
3571 _params['entities'] = entities
3572 reply = await self.rpc(msg)
3573 return reply
3574
3575
3576
3577 @ReturnMapping(ErrorResults)
3578 async def SetStatus(self, entities):
3579 '''
3580 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3581 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3582 '''
3583 # map input types to rpc msg
3584 _params = dict()
3585 msg = dict(type='Machiner', request='SetStatus', version=1, params=_params)
3586 _params['entities'] = entities
3587 reply = await self.rpc(msg)
3588 return reply
3589
3590
3591
3592 @ReturnMapping(ErrorResults)
3593 async def UpdateStatus(self, entities):
3594 '''
3595 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3596 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3597 '''
3598 # map input types to rpc msg
3599 _params = dict()
3600 msg = dict(type='Machiner', request='UpdateStatus', version=1, params=_params)
3601 _params['entities'] = entities
3602 reply = await self.rpc(msg)
3603 return reply
3604
3605
3606
3607 @ReturnMapping(NotifyWatchResults)
3608 async def Watch(self, entities):
3609 '''
3610 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3611 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3612 '''
3613 # map input types to rpc msg
3614 _params = dict()
3615 msg = dict(type='Machiner', request='Watch', version=1, params=_params)
3616 _params['entities'] = entities
3617 reply = await self.rpc(msg)
3618 return reply
3619
3620
3621
3622 @ReturnMapping(NotifyWatchResult)
3623 async def WatchAPIHostPorts(self):
3624 '''
3625
3626 Returns -> typing.Union[str, _ForwardRef('Error')]
3627 '''
3628 # map input types to rpc msg
3629 _params = dict()
3630 msg = dict(type='Machiner', request='WatchAPIHostPorts', version=1, params=_params)
3631
3632 reply = await self.rpc(msg)
3633 return reply
3634
3635
3636
3637 class MeterStatusFacade(Type):
3638 name = 'MeterStatus'
3639 version = 1
3640 schema = {'definitions': {'Entities': {'additionalProperties': False,
3641 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3642 'type': 'array'}},
3643 'required': ['entities'],
3644 'type': 'object'},
3645 'Entity': {'additionalProperties': False,
3646 'properties': {'tag': {'type': 'string'}},
3647 'required': ['tag'],
3648 'type': 'object'},
3649 'Error': {'additionalProperties': False,
3650 'properties': {'code': {'type': 'string'},
3651 'info': {'$ref': '#/definitions/ErrorInfo'},
3652 'message': {'type': 'string'}},
3653 'required': ['message', 'code'],
3654 'type': 'object'},
3655 'ErrorInfo': {'additionalProperties': False,
3656 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3657 'macaroon-path': {'type': 'string'}},
3658 'type': 'object'},
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'],
3665 'type': 'object'},
3666 'MeterStatusResults': {'additionalProperties': False,
3667 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
3668 'type': 'array'}},
3669 'required': ['results'],
3670 'type': 'object'},
3671 'NotifyWatchResult': {'additionalProperties': False,
3672 'properties': {'NotifyWatcherId': {'type': 'string'},
3673 'error': {'$ref': '#/definitions/Error'}},
3674 'required': ['NotifyWatcherId'],
3675 'type': 'object'},
3676 'NotifyWatchResults': {'additionalProperties': False,
3677 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3678 'type': 'array'}},
3679 'required': ['results'],
3680 'type': 'object'}},
3681 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3682 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
3683 'type': 'object'},
3684 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3685 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3686 'type': 'object'}},
3687 'type': 'object'}
3688
3689
3690 @ReturnMapping(MeterStatusResults)
3691 async def GetMeterStatus(self, entities):
3692 '''
3693 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3694 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
3695 '''
3696 # map input types to rpc msg
3697 _params = dict()
3698 msg = dict(type='MeterStatus', request='GetMeterStatus', version=1, params=_params)
3699 _params['entities'] = entities
3700 reply = await self.rpc(msg)
3701 return reply
3702
3703
3704
3705 @ReturnMapping(NotifyWatchResults)
3706 async def WatchMeterStatus(self, entities):
3707 '''
3708 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3709 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3710 '''
3711 # map input types to rpc msg
3712 _params = dict()
3713 msg = dict(type='MeterStatus', request='WatchMeterStatus', version=1, params=_params)
3714 _params['entities'] = entities
3715 reply = await self.rpc(msg)
3716 return reply
3717
3718
3719
3720 class MetricsManagerFacade(Type):
3721 name = 'MetricsManager'
3722 version = 1
3723 schema = {'definitions': {'Entities': {'additionalProperties': False,
3724 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3725 'type': 'array'}},
3726 'required': ['entities'],
3727 'type': 'object'},
3728 'Entity': {'additionalProperties': False,
3729 'properties': {'tag': {'type': 'string'}},
3730 'required': ['tag'],
3731 'type': 'object'},
3732 'Error': {'additionalProperties': False,
3733 'properties': {'code': {'type': 'string'},
3734 'info': {'$ref': '#/definitions/ErrorInfo'},
3735 'message': {'type': 'string'}},
3736 'required': ['message', 'code'],
3737 'type': 'object'},
3738 'ErrorInfo': {'additionalProperties': False,
3739 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3740 'macaroon-path': {'type': 'string'}},
3741 'type': 'object'},
3742 'ErrorResult': {'additionalProperties': False,
3743 'properties': {'error': {'$ref': '#/definitions/Error'}},
3744 'type': 'object'},
3745 'ErrorResults': {'additionalProperties': False,
3746 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3747 'type': 'array'}},
3748 'required': ['results'],
3749 'type': 'object'},
3750 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
3751 'properties': {'AddJujuMachineMetrics': {'type': 'object'},
3752 'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3753 'Result': {'$ref': '#/definitions/ErrorResults'}},
3754 'type': 'object'},
3755 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3756 'Result': {'$ref': '#/definitions/ErrorResults'}},
3757 'type': 'object'}},
3758 'type': 'object'}
3759
3760
3761 @ReturnMapping(None)
3762 async def AddJujuMachineMetrics(self):
3763 '''
3764
3765 Returns -> None
3766 '''
3767 # map input types to rpc msg
3768 _params = dict()
3769 msg = dict(type='MetricsManager', request='AddJujuMachineMetrics', version=1, params=_params)
3770
3771 reply = await self.rpc(msg)
3772 return reply
3773
3774
3775
3776 @ReturnMapping(ErrorResults)
3777 async def CleanupOldMetrics(self, entities):
3778 '''
3779 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3780 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3781 '''
3782 # map input types to rpc msg
3783 _params = dict()
3784 msg = dict(type='MetricsManager', request='CleanupOldMetrics', version=1, params=_params)
3785 _params['entities'] = entities
3786 reply = await self.rpc(msg)
3787 return reply
3788
3789
3790
3791 @ReturnMapping(ErrorResults)
3792 async def SendMetrics(self, entities):
3793 '''
3794 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3795 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3796 '''
3797 # map input types to rpc msg
3798 _params = dict()
3799 msg = dict(type='MetricsManager', request='SendMetrics', version=1, params=_params)
3800 _params['entities'] = entities
3801 reply = await self.rpc(msg)
3802 return reply
3803
3804
3805
3806 class MigrationFlagFacade(Type):
3807 name = 'MigrationFlag'
3808 version = 1
3809 schema = {'definitions': {'Entities': {'additionalProperties': False,
3810 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3811 'type': 'array'}},
3812 'required': ['entities'],
3813 'type': 'object'},
3814 'Entity': {'additionalProperties': False,
3815 'properties': {'tag': {'type': 'string'}},
3816 'required': ['tag'],
3817 'type': 'object'},
3818 'Error': {'additionalProperties': False,
3819 'properties': {'code': {'type': 'string'},
3820 'info': {'$ref': '#/definitions/ErrorInfo'},
3821 'message': {'type': 'string'}},
3822 'required': ['message', 'code'],
3823 'type': 'object'},
3824 'ErrorInfo': {'additionalProperties': False,
3825 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3826 'macaroon-path': {'type': 'string'}},
3827 'type': 'object'},
3828 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3829 'NotifyWatchResult': {'additionalProperties': False,
3830 'properties': {'NotifyWatcherId': {'type': 'string'},
3831 'error': {'$ref': '#/definitions/Error'}},
3832 'required': ['NotifyWatcherId'],
3833 'type': 'object'},
3834 'NotifyWatchResults': {'additionalProperties': False,
3835 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3836 'type': 'array'}},
3837 'required': ['results'],
3838 'type': 'object'},
3839 'PhaseResult': {'additionalProperties': False,
3840 'properties': {'error': {'$ref': '#/definitions/Error'},
3841 'phase': {'type': 'string'}},
3842 'type': 'object'},
3843 'PhaseResults': {'additionalProperties': False,
3844 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
3845 'type': 'array'}},
3846 'required': ['results'],
3847 'type': 'object'}},
3848 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3849 'Result': {'$ref': '#/definitions/PhaseResults'}},
3850 'type': 'object'},
3851 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3852 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
3853 'type': 'object'}},
3854 'type': 'object'}
3855
3856
3857 @ReturnMapping(PhaseResults)
3858 async def Phase(self, entities):
3859 '''
3860 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3861 Returns -> typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
3862 '''
3863 # map input types to rpc msg
3864 _params = dict()
3865 msg = dict(type='MigrationFlag', request='Phase', version=1, params=_params)
3866 _params['entities'] = entities
3867 reply = await self.rpc(msg)
3868 return reply
3869
3870
3871
3872 @ReturnMapping(NotifyWatchResults)
3873 async def Watch(self, entities):
3874 '''
3875 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3876 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
3877 '''
3878 # map input types to rpc msg
3879 _params = dict()
3880 msg = dict(type='MigrationFlag', request='Watch', version=1, params=_params)
3881 _params['entities'] = entities
3882 reply = await self.rpc(msg)
3883 return reply
3884
3885
3886
3887 class MigrationMasterFacade(Type):
3888 name = 'MigrationMaster'
3889 version = 1
3890 schema = {'definitions': {'Error': {'additionalProperties': False,
3891 'properties': {'code': {'type': 'string'},
3892 'info': {'$ref': '#/definitions/ErrorInfo'},
3893 'message': {'type': 'string'}},
3894 'required': ['message', 'code'],
3895 'type': 'object'},
3896 'ErrorInfo': {'additionalProperties': False,
3897 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3898 'macaroon-path': {'type': 'string'}},
3899 'type': 'object'},
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',
3905 'type': 'string'},
3906 'spec': {'$ref': '#/definitions/MigrationSpec'}},
3907 'required': ['spec',
3908 'migration-id',
3909 'phase',
3910 'phase-changed-time'],
3911 'type': 'object'},
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',
3919 'name',
3920 'owner-tag',
3921 'agent-version',
3922 'controller-agent-version'],
3923 'type': 'object'},
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',
3930 'target-info',
3931 'external-control',
3932 'skip-initial-prechecks'],
3933 'type': 'object'},
3934 'MigrationTargetInfo': {'additionalProperties': False,
3935 'properties': {'addrs': {'items': {'type': 'string'},
3936 'type': 'array'},
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',
3943 'addrs',
3944 'ca-cert',
3945 'auth-tag'],
3946 'type': 'object'},
3947 'MinionReports': {'additionalProperties': False,
3948 'properties': {'failed': {'items': {'type': 'string'},
3949 'type': 'array'},
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'},
3955 'type': 'array'}},
3956 'required': ['migration-id',
3957 'phase',
3958 'success-count',
3959 'unknown-count',
3960 'unknown-sample',
3961 'failed'],
3962 'type': 'object'},
3963 'NotifyWatchResult': {'additionalProperties': False,
3964 'properties': {'NotifyWatcherId': {'type': 'string'},
3965 'error': {'$ref': '#/definitions/Error'}},
3966 'required': ['NotifyWatcherId'],
3967 'type': 'object'},
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',
3975 'Minor',
3976 'Tag',
3977 'Patch',
3978 'Build'],
3979 'type': 'object'},
3980 'SerializedModel': {'additionalProperties': False,
3981 'properties': {'bytes': {'items': {'type': 'integer'},
3982 'type': 'array'},
3983 'charms': {'items': {'type': 'string'},
3984 'type': 'array'},
3985 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
3986 'type': 'array'},
3987 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
3988 'type': 'array'}},
3989 'required': ['bytes',
3990 'charms',
3991 'tools',
3992 'resources'],
3993 'type': 'object'},
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'}},
4000 'type': 'object'}},
4001 'required': ['application',
4002 'name',
4003 'application-revision',
4004 'charmstore-revision',
4005 'unit-revisions'],
4006 'type': 'object'},
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',
4015 'type': 'string'},
4016 'type': {'type': 'string'},
4017 'username': {'type': 'string'}},
4018 'required': ['revision',
4019 'type',
4020 'path',
4021 'description',
4022 'origin',
4023 'fingerprint',
4024 'size',
4025 'timestamp'],
4026 'type': 'object'},
4027 'SerializedModelTools': {'additionalProperties': False,
4028 'properties': {'uri': {'type': 'string'},
4029 'version': {'type': 'string'}},
4030 'required': ['version', 'uri'],
4031 'type': 'object'},
4032 'SetMigrationPhaseArgs': {'additionalProperties': False,
4033 'properties': {'phase': {'type': 'string'}},
4034 'required': ['phase'],
4035 'type': 'object'},
4036 'SetMigrationStatusMessageArgs': {'additionalProperties': False,
4037 'properties': {'message': {'type': 'string'}},
4038 'required': ['message'],
4039 'type': 'object'}},
4040 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
4041 'type': 'object'},
4042 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}},
4043 'type': 'object'},
4044 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}},
4045 'type': 'object'},
4046 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}},
4047 'type': 'object'},
4048 'Prechecks': {'type': 'object'},
4049 'Reap': {'type': 'object'},
4050 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
4051 'type': 'object'},
4052 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
4053 'type': 'object'},
4054 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4055 'type': 'object'},
4056 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4057 'type': 'object'}},
4058 'type': 'object'}
4059
4060
4061 @ReturnMapping(SerializedModel)
4062 async def Export(self):
4063 '''
4064
4065 Returns -> typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
4066 '''
4067 # map input types to rpc msg
4068 _params = dict()
4069 msg = dict(type='MigrationMaster', request='Export', version=1, params=_params)
4070
4071 reply = await self.rpc(msg)
4072 return reply
4073
4074
4075
4076 @ReturnMapping(MasterMigrationStatus)
4077 async def MigrationStatus(self):
4078 '''
4079
4080 Returns -> typing.Union[str, _ForwardRef('MigrationSpec')]
4081 '''
4082 # map input types to rpc msg
4083 _params = dict()
4084 msg = dict(type='MigrationMaster', request='MigrationStatus', version=1, params=_params)
4085
4086 reply = await self.rpc(msg)
4087 return reply
4088
4089
4090
4091 @ReturnMapping(MinionReports)
4092 async def MinionReports(self):
4093 '''
4094
4095 Returns -> typing.Union[typing.Sequence<+T_co>[str], int]
4096 '''
4097 # map input types to rpc msg
4098 _params = dict()
4099 msg = dict(type='MigrationMaster', request='MinionReports', version=1, params=_params)
4100
4101 reply = await self.rpc(msg)
4102 return reply
4103
4104
4105
4106 @ReturnMapping(MigrationModelInfo)
4107 async def ModelInfo(self):
4108 '''
4109
4110 Returns -> typing.Union[_ForwardRef('Number'), str]
4111 '''
4112 # map input types to rpc msg
4113 _params = dict()
4114 msg = dict(type='MigrationMaster', request='ModelInfo', version=1, params=_params)
4115
4116 reply = await self.rpc(msg)
4117 return reply
4118
4119
4120
4121 @ReturnMapping(None)
4122 async def Prechecks(self):
4123 '''
4124
4125 Returns -> None
4126 '''
4127 # map input types to rpc msg
4128 _params = dict()
4129 msg = dict(type='MigrationMaster', request='Prechecks', version=1, params=_params)
4130
4131 reply = await self.rpc(msg)
4132 return reply
4133
4134
4135
4136 @ReturnMapping(None)
4137 async def Reap(self):
4138 '''
4139
4140 Returns -> None
4141 '''
4142 # map input types to rpc msg
4143 _params = dict()
4144 msg = dict(type='MigrationMaster', request='Reap', version=1, params=_params)
4145
4146 reply = await self.rpc(msg)
4147 return reply
4148
4149
4150
4151 @ReturnMapping(None)
4152 async def SetPhase(self, phase):
4153 '''
4154 phase : str
4155 Returns -> None
4156 '''
4157 # map input types to rpc msg
4158 _params = dict()
4159 msg = dict(type='MigrationMaster', request='SetPhase', version=1, params=_params)
4160 _params['phase'] = phase
4161 reply = await self.rpc(msg)
4162 return reply
4163
4164
4165
4166 @ReturnMapping(None)
4167 async def SetStatusMessage(self, message):
4168 '''
4169 message : str
4170 Returns -> None
4171 '''
4172 # map input types to rpc msg
4173 _params = dict()
4174 msg = dict(type='MigrationMaster', request='SetStatusMessage', version=1, params=_params)
4175 _params['message'] = message
4176 reply = await self.rpc(msg)
4177 return reply
4178
4179
4180
4181 @ReturnMapping(NotifyWatchResult)
4182 async def Watch(self):
4183 '''
4184
4185 Returns -> typing.Union[str, _ForwardRef('Error')]
4186 '''
4187 # map input types to rpc msg
4188 _params = dict()
4189 msg = dict(type='MigrationMaster', request='Watch', version=1, params=_params)
4190
4191 reply = await self.rpc(msg)
4192 return reply
4193
4194
4195
4196 @ReturnMapping(NotifyWatchResult)
4197 async def WatchMinionReports(self):
4198 '''
4199
4200 Returns -> typing.Union[str, _ForwardRef('Error')]
4201 '''
4202 # map input types to rpc msg
4203 _params = dict()
4204 msg = dict(type='MigrationMaster', request='WatchMinionReports', version=1, params=_params)
4205
4206 reply = await self.rpc(msg)
4207 return reply
4208
4209
4210
4211 class MigrationMinionFacade(Type):
4212 name = 'MigrationMinion'
4213 version = 1
4214 schema = {'definitions': {'Error': {'additionalProperties': False,
4215 'properties': {'code': {'type': 'string'},
4216 'info': {'$ref': '#/definitions/ErrorInfo'},
4217 'message': {'type': 'string'}},
4218 'required': ['message', 'code'],
4219 'type': 'object'},
4220 'ErrorInfo': {'additionalProperties': False,
4221 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4222 'macaroon-path': {'type': 'string'}},
4223 'type': 'object'},
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',
4230 'phase',
4231 'success'],
4232 'type': 'object'},
4233 'NotifyWatchResult': {'additionalProperties': False,
4234 'properties': {'NotifyWatcherId': {'type': 'string'},
4235 'error': {'$ref': '#/definitions/Error'}},
4236 'required': ['NotifyWatcherId'],
4237 'type': 'object'}},
4238 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}},
4239 'type': 'object'},
4240 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4241 'type': 'object'}},
4242 'type': 'object'}
4243
4244
4245 @ReturnMapping(None)
4246 async def Report(self, migration_id, phase, success):
4247 '''
4248 migration_id : str
4249 phase : str
4250 success : bool
4251 Returns -> None
4252 '''
4253 # map input types to rpc msg
4254 _params = dict()
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)
4260 return reply
4261
4262
4263
4264 @ReturnMapping(NotifyWatchResult)
4265 async def Watch(self):
4266 '''
4267
4268 Returns -> typing.Union[str, _ForwardRef('Error')]
4269 '''
4270 # map input types to rpc msg
4271 _params = dict()
4272 msg = dict(type='MigrationMinion', request='Watch', version=1, params=_params)
4273
4274 reply = await self.rpc(msg)
4275 return reply
4276
4277
4278
4279 class MigrationStatusWatcherFacade(Type):
4280 name = 'MigrationStatusWatcher'
4281 version = 1
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'},
4288 'type': 'array'},
4289 'source-ca-cert': {'type': 'string'},
4290 'target-api-addrs': {'items': {'type': 'string'},
4291 'type': 'array'},
4292 'target-ca-cert': {'type': 'string'}},
4293 'required': ['migration-id',
4294 'attempt',
4295 'phase',
4296 'external-control',
4297 'source-api-addrs',
4298 'source-ca-cert',
4299 'target-api-addrs',
4300 'target-ca-cert'],
4301 'type': 'object'}},
4302 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
4303 'type': 'object'},
4304 'Stop': {'type': 'object'}},
4305 'type': 'object'}
4306
4307
4308 @ReturnMapping(MigrationStatus)
4309 async def Next(self):
4310 '''
4311
4312 Returns -> typing.Union[int, typing.Sequence<+T_co>[str]]
4313 '''
4314 # map input types to rpc msg
4315 _params = dict()
4316 msg = dict(type='MigrationStatusWatcher', request='Next', version=1, params=_params)
4317
4318 reply = await self.rpc(msg)
4319 return reply
4320
4321
4322
4323 @ReturnMapping(None)
4324 async def Stop(self):
4325 '''
4326
4327 Returns -> None
4328 '''
4329 # map input types to rpc msg
4330 _params = dict()
4331 msg = dict(type='MigrationStatusWatcher', request='Stop', version=1, params=_params)
4332
4333 reply = await self.rpc(msg)
4334 return reply
4335
4336
4337
4338 class MigrationTargetFacade(Type):
4339 name = 'MigrationTarget'
4340 version = 1
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'],
4346 'type': 'object'},
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',
4354 'name',
4355 'owner-tag',
4356 'agent-version',
4357 'controller-agent-version'],
4358 'type': 'object'},
4359 'ModelArgs': {'additionalProperties': False,
4360 'properties': {'model-tag': {'type': 'string'}},
4361 'required': ['model-tag'],
4362 'type': 'object'},
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',
4370 'Minor',
4371 'Tag',
4372 'Patch',
4373 'Build'],
4374 'type': 'object'},
4375 'SerializedModel': {'additionalProperties': False,
4376 'properties': {'bytes': {'items': {'type': 'integer'},
4377 'type': 'array'},
4378 'charms': {'items': {'type': 'string'},
4379 'type': 'array'},
4380 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
4381 'type': 'array'},
4382 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
4383 'type': 'array'}},
4384 'required': ['bytes',
4385 'charms',
4386 'tools',
4387 'resources'],
4388 'type': 'object'},
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'}},
4395 'type': 'object'}},
4396 'required': ['application',
4397 'name',
4398 'application-revision',
4399 'charmstore-revision',
4400 'unit-revisions'],
4401 'type': 'object'},
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',
4410 'type': 'string'},
4411 'type': {'type': 'string'},
4412 'username': {'type': 'string'}},
4413 'required': ['revision',
4414 'type',
4415 'path',
4416 'description',
4417 'origin',
4418 'fingerprint',
4419 'size',
4420 'timestamp'],
4421 'type': 'object'},
4422 'SerializedModelTools': {'additionalProperties': False,
4423 'properties': {'uri': {'type': 'string'},
4424 'version': {'type': 'string'}},
4425 'required': ['version', 'uri'],
4426 'type': 'object'}},
4427 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
4428 'type': 'object'},
4429 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
4430 'type': 'object'},
4431 'AdoptResources': {'properties': {'Params': {'$ref': '#/definitions/AdoptResourcesArgs'}},
4432 'type': 'object'},
4433 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
4434 'type': 'object'},
4435 'LatestLogTime': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'},
4436 'Result': {'format': 'date-time',
4437 'type': 'string'}},
4438 'type': 'object'},
4439 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}},
4440 'type': 'object'}},
4441 'type': 'object'}
4442
4443
4444 @ReturnMapping(None)
4445 async def Abort(self, model_tag):
4446 '''
4447 model_tag : str
4448 Returns -> None
4449 '''
4450 # map input types to rpc msg
4451 _params = dict()
4452 msg = dict(type='MigrationTarget', request='Abort', version=1, params=_params)
4453 _params['model-tag'] = model_tag
4454 reply = await self.rpc(msg)
4455 return reply
4456
4457
4458
4459 @ReturnMapping(None)
4460 async def Activate(self, model_tag):
4461 '''
4462 model_tag : str
4463 Returns -> None
4464 '''
4465 # map input types to rpc msg
4466 _params = dict()
4467 msg = dict(type='MigrationTarget', request='Activate', version=1, params=_params)
4468 _params['model-tag'] = model_tag
4469 reply = await self.rpc(msg)
4470 return reply
4471
4472
4473
4474 @ReturnMapping(None)
4475 async def AdoptResources(self, model_tag, source_controller_version):
4476 '''
4477 model_tag : str
4478 source_controller_version : Number
4479 Returns -> None
4480 '''
4481 # map input types to rpc msg
4482 _params = dict()
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)
4487 return reply
4488
4489
4490
4491 @ReturnMapping(None)
4492 async def Import(self, bytes_, charms, tools):
4493 '''
4494 bytes_ : typing.Sequence<+T_co>[int]
4495 charms : typing.Sequence<+T_co>[str]
4496 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
4497 Returns -> None
4498 '''
4499 # map input types to rpc msg
4500 _params = dict()
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)
4506 return reply
4507
4508
4509
4510 @ReturnMapping(str)
4511 async def LatestLogTime(self, model_tag):
4512 '''
4513 model_tag : str
4514 Returns -> str
4515 '''
4516 # map input types to rpc msg
4517 _params = dict()
4518 msg = dict(type='MigrationTarget', request='LatestLogTime', version=1, params=_params)
4519 _params['model-tag'] = model_tag
4520 reply = await self.rpc(msg)
4521 return reply
4522
4523
4524
4525 @ReturnMapping(None)
4526 async def Prechecks(self, agent_version, name, owner_tag, uuid):
4527 '''
4528 agent_version : Number
4529 name : str
4530 owner_tag : str
4531 uuid : str
4532 Returns -> None
4533 '''
4534 # map input types to rpc msg
4535 _params = dict()
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)
4542 return reply
4543
4544
4545
4546 class ModelConfigFacade(Type):
4547 name = 'ModelConfig'
4548 version = 1
4549 schema = {'definitions': {'ConfigValue': {'additionalProperties': False,
4550 'properties': {'source': {'type': 'string'},
4551 'value': {'additionalProperties': True,
4552 'type': 'object'}},
4553 'required': ['value', 'source'],
4554 'type': 'object'},
4555 'Error': {'additionalProperties': False,
4556 'properties': {'code': {'type': 'string'},
4557 'info': {'$ref': '#/definitions/ErrorInfo'},
4558 'message': {'type': 'string'}},
4559 'required': ['message', 'code'],
4560 'type': 'object'},
4561 'ErrorInfo': {'additionalProperties': False,
4562 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4563 'macaroon-path': {'type': 'string'}},
4564 'type': 'object'},
4565 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4566 'ModelConfigResults': {'additionalProperties': False,
4567 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
4568 'type': 'object'}},
4569 'required': ['config'],
4570 'type': 'object'},
4571 'ModelSLA': {'additionalProperties': False,
4572 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
4573 'creds': {'items': {'type': 'integer'},
4574 'type': 'array'}},
4575 'required': ['ModelSLAInfo', 'creds'],
4576 'type': 'object'},
4577 'ModelSLAInfo': {'additionalProperties': False,
4578 'properties': {'level': {'type': 'string'},
4579 'owner': {'type': 'string'}},
4580 'required': ['level', 'owner'],
4581 'type': 'object'},
4582 'ModelSet': {'additionalProperties': False,
4583 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
4584 'type': 'object'}},
4585 'type': 'object'}},
4586 'required': ['config'],
4587 'type': 'object'},
4588 'ModelUnset': {'additionalProperties': False,
4589 'properties': {'keys': {'items': {'type': 'string'},
4590 'type': 'array'}},
4591 'required': ['keys'],
4592 'type': 'object'},
4593 'StringResult': {'additionalProperties': False,
4594 'properties': {'error': {'$ref': '#/definitions/Error'},
4595 'result': {'type': 'string'}},
4596 'required': ['result'],
4597 'type': 'object'}},
4598 'properties': {'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
4599 'type': 'object'},
4600 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
4601 'type': 'object'},
4602 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
4603 'type': 'object'},
4604 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
4605 'type': 'object'},
4606 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
4607 'type': 'object'}},
4608 'type': 'object'}
4609
4610
4611 @ReturnMapping(ModelConfigResults)
4612 async def ModelGet(self):
4613 '''
4614
4615 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
4616 '''
4617 # map input types to rpc msg
4618 _params = dict()
4619 msg = dict(type='ModelConfig', request='ModelGet', version=1, params=_params)
4620
4621 reply = await self.rpc(msg)
4622 return reply
4623
4624
4625
4626 @ReturnMapping(None)
4627 async def ModelSet(self, config):
4628 '''
4629 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4630 Returns -> None
4631 '''
4632 # map input types to rpc msg
4633 _params = dict()
4634 msg = dict(type='ModelConfig', request='ModelSet', version=1, params=_params)
4635 _params['config'] = config
4636 reply = await self.rpc(msg)
4637 return reply
4638
4639
4640
4641 @ReturnMapping(None)
4642 async def ModelUnset(self, keys):
4643 '''
4644 keys : typing.Sequence<+T_co>[str]
4645 Returns -> None
4646 '''
4647 # map input types to rpc msg
4648 _params = dict()
4649 msg = dict(type='ModelConfig', request='ModelUnset', version=1, params=_params)
4650 _params['keys'] = keys
4651 reply = await self.rpc(msg)
4652 return reply
4653
4654
4655
4656 @ReturnMapping(StringResult)
4657 async def SLALevel(self):
4658 '''
4659
4660 Returns -> typing.Union[_ForwardRef('Error'), str]
4661 '''
4662 # map input types to rpc msg
4663 _params = dict()
4664 msg = dict(type='ModelConfig', request='SLALevel', version=1, params=_params)
4665
4666 reply = await self.rpc(msg)
4667 return reply
4668
4669
4670
4671 @ReturnMapping(None)
4672 async def SetSLALevel(self, creds, level):
4673 '''
4674 creds : typing.Sequence<+T_co>[int]
4675 level : str
4676 Returns -> None
4677 '''
4678 # map input types to rpc msg
4679 _params = dict()
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)
4684 return reply
4685
4686
4687
4688 class NotifyWatcherFacade(Type):
4689 name = 'NotifyWatcher'
4690 version = 1
4691 schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
4692 'type': 'object'}
4693
4694
4695 @ReturnMapping(None)
4696 async def Next(self):
4697 '''
4698
4699 Returns -> None
4700 '''
4701 # map input types to rpc msg
4702 _params = dict()
4703 msg = dict(type='NotifyWatcher', request='Next', version=1, params=_params)
4704
4705 reply = await self.rpc(msg)
4706 return reply
4707
4708
4709
4710 @ReturnMapping(None)
4711 async def Stop(self):
4712 '''
4713
4714 Returns -> None
4715 '''
4716 # map input types to rpc msg
4717 _params = dict()
4718 msg = dict(type='NotifyWatcher', request='Stop', version=1, params=_params)
4719
4720 reply = await self.rpc(msg)
4721 return reply
4722
4723
4724
4725 class PayloadsFacade(Type):
4726 name = 'Payloads'
4727 version = 1
4728 schema = {'definitions': {'Payload': {'additionalProperties': False,
4729 'properties': {'class': {'type': 'string'},
4730 'id': {'type': 'string'},
4731 'labels': {'items': {'type': 'string'},
4732 'type': 'array'},
4733 'machine': {'type': 'string'},
4734 'status': {'type': 'string'},
4735 'type': {'type': 'string'},
4736 'unit': {'type': 'string'}},
4737 'required': ['class',
4738 'type',
4739 'id',
4740 'status',
4741 'labels',
4742 'unit',
4743 'machine'],
4744 'type': 'object'},
4745 'PayloadListArgs': {'additionalProperties': False,
4746 'properties': {'patterns': {'items': {'type': 'string'},
4747 'type': 'array'}},
4748 'required': ['patterns'],
4749 'type': 'object'},
4750 'PayloadListResults': {'additionalProperties': False,
4751 'properties': {'results': {'items': {'$ref': '#/definitions/Payload'},
4752 'type': 'array'}},
4753 'required': ['results'],
4754 'type': 'object'}},
4755 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/PayloadListArgs'},
4756 'Result': {'$ref': '#/definitions/PayloadListResults'}},
4757 'type': 'object'}},
4758 'type': 'object'}
4759
4760
4761 @ReturnMapping(PayloadListResults)
4762 async def List(self, patterns):
4763 '''
4764 patterns : typing.Sequence<+T_co>[str]
4765 Returns -> typing.Sequence<+T_co>[~Payload]<~Payload>
4766 '''
4767 # map input types to rpc msg
4768 _params = dict()
4769 msg = dict(type='Payloads', request='List', version=1, params=_params)
4770 _params['patterns'] = patterns
4771 reply = await self.rpc(msg)
4772 return reply
4773
4774
4775
4776 class PayloadsHookContextFacade(Type):
4777 name = 'PayloadsHookContext'
4778 version = 1
4779 schema = {'definitions': {'Entities': {'additionalProperties': False,
4780 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
4781 'type': 'array'}},
4782 'required': ['entities'],
4783 'type': 'object'},
4784 'Entity': {'additionalProperties': False,
4785 'properties': {'tag': {'type': 'string'}},
4786 'required': ['tag'],
4787 'type': 'object'},
4788 'Error': {'additionalProperties': False,
4789 'properties': {'code': {'type': 'string'},
4790 'info': {'$ref': '#/definitions/ErrorInfo'},
4791 'message': {'type': 'string'}},
4792 'required': ['message', 'code'],
4793 'type': 'object'},
4794 'ErrorInfo': {'additionalProperties': False,
4795 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4796 'macaroon-path': {'type': 'string'}},
4797 'type': 'object'},
4798 'LookUpPayloadArg': {'additionalProperties': False,
4799 'properties': {'id': {'type': 'string'},
4800 'name': {'type': 'string'}},
4801 'required': ['name', 'id'],
4802 'type': 'object'},
4803 'LookUpPayloadArgs': {'additionalProperties': False,
4804 'properties': {'args': {'items': {'$ref': '#/definitions/LookUpPayloadArg'},
4805 'type': 'array'}},
4806 'required': ['args'],
4807 'type': 'object'},
4808 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4809 'Payload': {'additionalProperties': False,
4810 'properties': {'class': {'type': 'string'},
4811 'id': {'type': 'string'},
4812 'labels': {'items': {'type': 'string'},
4813 'type': 'array'},
4814 'machine': {'type': 'string'},
4815 'status': {'type': 'string'},
4816 'type': {'type': 'string'},
4817 'unit': {'type': 'string'}},
4818 'required': ['class',
4819 'type',
4820 'id',
4821 'status',
4822 'labels',
4823 'unit',
4824 'machine'],
4825 'type': 'object'},
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',
4832 'payload',
4833 'not-found'],
4834 'type': 'object'},
4835 'PayloadResults': {'additionalProperties': False,
4836 'properties': {'results': {'items': {'$ref': '#/definitions/PayloadResult'},
4837 'type': 'array'}},
4838 'required': ['results'],
4839 'type': 'object'},
4840 'SetPayloadStatusArg': {'additionalProperties': False,
4841 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
4842 'status': {'type': 'string'}},
4843 'required': ['Entity', 'status'],
4844 'type': 'object'},
4845 'SetPayloadStatusArgs': {'additionalProperties': False,
4846 'properties': {'args': {'items': {'$ref': '#/definitions/SetPayloadStatusArg'},
4847 'type': 'array'}},
4848 'required': ['args'],
4849 'type': 'object'},
4850 'TrackPayloadArgs': {'additionalProperties': False,
4851 'properties': {'payloads': {'items': {'$ref': '#/definitions/Payload'},
4852 'type': 'array'}},
4853 'required': ['payloads'],
4854 'type': 'object'}},
4855 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4856 'Result': {'$ref': '#/definitions/PayloadResults'}},
4857 'type': 'object'},
4858 'LookUp': {'properties': {'Params': {'$ref': '#/definitions/LookUpPayloadArgs'},
4859 'Result': {'$ref': '#/definitions/PayloadResults'}},
4860 'type': 'object'},
4861 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetPayloadStatusArgs'},
4862 'Result': {'$ref': '#/definitions/PayloadResults'}},
4863 'type': 'object'},
4864 'Track': {'properties': {'Params': {'$ref': '#/definitions/TrackPayloadArgs'},
4865 'Result': {'$ref': '#/definitions/PayloadResults'}},
4866 'type': 'object'},
4867 'Untrack': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4868 'Result': {'$ref': '#/definitions/PayloadResults'}},
4869 'type': 'object'}},
4870 'type': 'object'}
4871
4872
4873 @ReturnMapping(PayloadResults)
4874 async def List(self, entities):
4875 '''
4876 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4877 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4878 '''
4879 # map input types to rpc msg
4880 _params = dict()
4881 msg = dict(type='PayloadsHookContext', request='List', version=1, params=_params)
4882 _params['entities'] = entities
4883 reply = await self.rpc(msg)
4884 return reply
4885
4886
4887
4888 @ReturnMapping(PayloadResults)
4889 async def LookUp(self, args):
4890 '''
4891 args : typing.Sequence<+T_co>[~LookUpPayloadArg]<~LookUpPayloadArg>
4892 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4893 '''
4894 # map input types to rpc msg
4895 _params = dict()
4896 msg = dict(type='PayloadsHookContext', request='LookUp', version=1, params=_params)
4897 _params['args'] = args
4898 reply = await self.rpc(msg)
4899 return reply
4900
4901
4902
4903 @ReturnMapping(PayloadResults)
4904 async def SetStatus(self, args):
4905 '''
4906 args : typing.Sequence<+T_co>[~SetPayloadStatusArg]<~SetPayloadStatusArg>
4907 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4908 '''
4909 # map input types to rpc msg
4910 _params = dict()
4911 msg = dict(type='PayloadsHookContext', request='SetStatus', version=1, params=_params)
4912 _params['args'] = args
4913 reply = await self.rpc(msg)
4914 return reply
4915
4916
4917
4918 @ReturnMapping(PayloadResults)
4919 async def Track(self, payloads):
4920 '''
4921 payloads : typing.Sequence<+T_co>[~Payload]<~Payload>
4922 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4923 '''
4924 # map input types to rpc msg
4925 _params = dict()
4926 msg = dict(type='PayloadsHookContext', request='Track', version=1, params=_params)
4927 _params['payloads'] = payloads
4928 reply = await self.rpc(msg)
4929 return reply
4930
4931
4932
4933 @ReturnMapping(PayloadResults)
4934 async def Untrack(self, entities):
4935 '''
4936 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4937 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4938 '''
4939 # map input types to rpc msg
4940 _params = dict()
4941 msg = dict(type='PayloadsHookContext', request='Untrack', version=1, params=_params)
4942 _params['entities'] = entities
4943 reply = await self.rpc(msg)
4944 return reply
4945
4946
4947
4948 class PingerFacade(Type):
4949 name = 'Pinger'
4950 version = 1
4951 schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
4952 'type': 'object'}
4953
4954
4955 @ReturnMapping(None)
4956 async def Ping(self):
4957 '''
4958
4959 Returns -> None
4960 '''
4961 # map input types to rpc msg
4962 _params = dict()
4963 msg = dict(type='Pinger', request='Ping', version=1, params=_params)
4964
4965 reply = await self.rpc(msg)
4966 return reply
4967
4968
4969
4970 @ReturnMapping(None)
4971 async def Stop(self):
4972 '''
4973
4974 Returns -> None
4975 '''
4976 # map input types to rpc msg
4977 _params = dict()
4978 msg = dict(type='Pinger', request='Stop', version=1, params=_params)
4979
4980 reply = await self.rpc(msg)
4981 return reply
4982
4983
4984
4985 class ProxyUpdaterFacade(Type):
4986 name = 'ProxyUpdater'
4987 version = 1
4988 schema = {'definitions': {'Entities': {'additionalProperties': False,
4989 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
4990 'type': 'array'}},
4991 'required': ['entities'],
4992 'type': 'object'},
4993 'Entity': {'additionalProperties': False,
4994 'properties': {'tag': {'type': 'string'}},
4995 'required': ['tag'],
4996 'type': 'object'},
4997 'Error': {'additionalProperties': False,
4998 'properties': {'code': {'type': 'string'},
4999 'info': {'$ref': '#/definitions/ErrorInfo'},
5000 'message': {'type': 'string'}},
5001 'required': ['message', 'code'],
5002 'type': 'object'},
5003 'ErrorInfo': {'additionalProperties': False,
5004 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5005 'macaroon-path': {'type': 'string'}},
5006 'type': 'object'},
5007 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5008 'NotifyWatchResult': {'additionalProperties': False,
5009 'properties': {'NotifyWatcherId': {'type': 'string'},
5010 'error': {'$ref': '#/definitions/Error'}},
5011 'required': ['NotifyWatcherId'],
5012 'type': 'object'},
5013 'NotifyWatchResults': {'additionalProperties': False,
5014 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5015 'type': 'array'}},
5016 'required': ['results'],
5017 'type': 'object'},
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',
5024 'https',
5025 'ftp',
5026 'no-proxy'],
5027 'type': 'object'},
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'],
5034 'type': 'object'},
5035 'ProxyConfigResults': {'additionalProperties': False,
5036 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
5037 'type': 'array'}},
5038 'required': ['results'],
5039 'type': 'object'}},
5040 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5041 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
5042 'type': 'object'},
5043 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5044 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5045 'type': 'object'}},
5046 'type': 'object'}
5047
5048
5049 @ReturnMapping(ProxyConfigResults)
5050 async def ProxyConfig(self, entities):
5051 '''
5052 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5053 Returns -> typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
5054 '''
5055 # map input types to rpc msg
5056 _params = dict()
5057 msg = dict(type='ProxyUpdater', request='ProxyConfig', version=1, params=_params)
5058 _params['entities'] = entities
5059 reply = await self.rpc(msg)
5060 return reply
5061
5062
5063
5064 @ReturnMapping(NotifyWatchResults)
5065 async def WatchForProxyConfigAndAPIHostPortChanges(self, entities):
5066 '''
5067 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5068 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
5069 '''
5070 # map input types to rpc msg
5071 _params = dict()
5072 msg = dict(type='ProxyUpdater', request='WatchForProxyConfigAndAPIHostPortChanges', version=1, params=_params)
5073 _params['entities'] = entities
5074 reply = await self.rpc(msg)
5075 return reply
5076
5077
5078
5079 class RelationUnitsWatcherFacade(Type):
5080 name = 'RelationUnitsWatcher'
5081 version = 1
5082 schema = {'definitions': {'Error': {'additionalProperties': False,
5083 'properties': {'code': {'type': 'string'},
5084 'info': {'$ref': '#/definitions/ErrorInfo'},
5085 'message': {'type': 'string'}},
5086 'required': ['message', 'code'],
5087 'type': 'object'},
5088 'ErrorInfo': {'additionalProperties': False,
5089 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5090 'macaroon-path': {'type': 'string'}},
5091 'type': 'object'},
5092 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5093 'RelationUnitsChange': {'additionalProperties': False,
5094 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
5095 'type': 'object'},
5096 'departed': {'items': {'type': 'string'},
5097 'type': 'array'}},
5098 'required': ['changed'],
5099 'type': 'object'},
5100 'RelationUnitsWatchResult': {'additionalProperties': False,
5101 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
5102 'error': {'$ref': '#/definitions/Error'},
5103 'watcher-id': {'type': 'string'}},
5104 'required': ['watcher-id',
5105 'changes'],
5106 'type': 'object'},
5107 'UnitSettings': {'additionalProperties': False,
5108 'properties': {'version': {'type': 'integer'}},
5109 'required': ['version'],
5110 'type': 'object'}},
5111 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
5112 'type': 'object'},
5113 'Stop': {'type': 'object'}},
5114 'type': 'object'}
5115
5116
5117 @ReturnMapping(RelationUnitsWatchResult)
5118 async def Next(self):
5119 '''
5120
5121 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
5122 '''
5123 # map input types to rpc msg
5124 _params = dict()
5125 msg = dict(type='RelationUnitsWatcher', request='Next', version=1, params=_params)
5126
5127 reply = await self.rpc(msg)
5128 return reply
5129
5130
5131
5132 @ReturnMapping(None)
5133 async def Stop(self):
5134 '''
5135
5136 Returns -> None
5137 '''
5138 # map input types to rpc msg
5139 _params = dict()
5140 msg = dict(type='RelationUnitsWatcher', request='Stop', version=1, params=_params)
5141
5142 reply = await self.rpc(msg)
5143 return reply
5144
5145
5146
5147 class RemoteApplicationWatcherFacade(Type):
5148 name = 'RemoteApplicationWatcher'
5149 version = 1
5150 schema = {'definitions': {'Error': {'additionalProperties': False,
5151 'properties': {'code': {'type': 'string'},
5152 'info': {'$ref': '#/definitions/ErrorInfo'},
5153 'message': {'type': 'string'}},
5154 'required': ['message', 'code'],
5155 'type': 'object'},
5156 'ErrorInfo': {'additionalProperties': False,
5157 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5158 'macaroon-path': {'type': 'string'}},
5159 'type': 'object'},
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',
5166 'life',
5167 'relations'],
5168 'type': 'object'},
5169 'RemoteApplicationWatchResult': {'additionalProperties': False,
5170 'properties': {'change': {'$ref': '#/definitions/RemoteApplicationChange'},
5171 'error': {'$ref': '#/definitions/Error'},
5172 'id': {'type': 'string'}},
5173 'required': ['id'],
5174 'type': 'object'},
5175 'RemoteEntityId': {'additionalProperties': False,
5176 'properties': {'model-uuid': {'type': 'string'},
5177 'token': {'type': 'string'}},
5178 'required': ['model-uuid', 'token'],
5179 'type': 'object'},
5180 'RemoteRelationChange': {'additionalProperties': False,
5181 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
5182 'type': 'object'},
5183 'departed-units': {'items': {'type': 'string'},
5184 'type': 'array'},
5185 'id': {'type': 'integer'},
5186 'life': {'type': 'string'}},
5187 'required': ['id', 'life'],
5188 'type': 'object'},
5189 'RemoteRelationUnitChange': {'additionalProperties': False,
5190 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
5191 'type': 'object'}},
5192 'type': 'object'},
5193 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
5194 'required': ['unit-id'],
5195 'type': 'object'},
5196 'RemoteRelationsChange': {'additionalProperties': False,
5197 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
5198 'type': 'array'},
5199 'initial': {'type': 'boolean'},
5200 'removed': {'items': {'type': 'integer'},
5201 'type': 'array'}},
5202 'required': ['initial'],
5203 'type': 'object'}},
5204 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteApplicationWatchResult'}},
5205 'type': 'object'},
5206 'Stop': {'type': 'object'}},
5207 'type': 'object'}
5208
5209
5210 @ReturnMapping(RemoteApplicationWatchResult)
5211 async def Next(self):
5212 '''
5213
5214 Returns -> typing.Union[_ForwardRef('RemoteApplicationChange'), _ForwardRef('Error'), str]
5215 '''
5216 # map input types to rpc msg
5217 _params = dict()
5218 msg = dict(type='RemoteApplicationWatcher', request='Next', version=1, params=_params)
5219
5220 reply = await self.rpc(msg)
5221 return reply
5222
5223
5224
5225 @ReturnMapping(None)
5226 async def Stop(self):
5227 '''
5228
5229 Returns -> None
5230 '''
5231 # map input types to rpc msg
5232 _params = dict()
5233 msg = dict(type='RemoteApplicationWatcher', request='Stop', version=1, params=_params)
5234
5235 reply = await self.rpc(msg)
5236 return reply
5237
5238
5239
5240 class RemoteRelationsWatcherFacade(Type):
5241 name = 'RemoteRelationsWatcher'
5242 version = 1
5243 schema = {'definitions': {'Error': {'additionalProperties': False,
5244 'properties': {'code': {'type': 'string'},
5245 'info': {'$ref': '#/definitions/ErrorInfo'},
5246 'message': {'type': 'string'}},
5247 'required': ['message', 'code'],
5248 'type': 'object'},
5249 'ErrorInfo': {'additionalProperties': False,
5250 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5251 'macaroon-path': {'type': 'string'}},
5252 'type': 'object'},
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'],
5258 'type': 'object'},
5259 'RemoteRelationChange': {'additionalProperties': False,
5260 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
5261 'type': 'object'},
5262 'departed-units': {'items': {'type': 'string'},
5263 'type': 'array'},
5264 'id': {'type': 'integer'},
5265 'life': {'type': 'string'}},
5266 'required': ['id', 'life'],
5267 'type': 'object'},
5268 'RemoteRelationUnitChange': {'additionalProperties': False,
5269 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
5270 'type': 'object'}},
5271 'type': 'object'},
5272 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
5273 'required': ['unit-id'],
5274 'type': 'object'},
5275 'RemoteRelationsChange': {'additionalProperties': False,
5276 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
5277 'type': 'array'},
5278 'initial': {'type': 'boolean'},
5279 'removed': {'items': {'type': 'integer'},
5280 'type': 'array'}},
5281 'required': ['initial'],
5282 'type': 'object'},
5283 'RemoteRelationsWatchResult': {'additionalProperties': False,
5284 'properties': {'RemoteRelationsWatcherId': {'type': 'string'},
5285 'change': {'$ref': '#/definitions/RemoteRelationsChange'},
5286 'error': {'$ref': '#/definitions/Error'}},
5287 'required': ['RemoteRelationsWatcherId'],
5288 'type': 'object'}},
5289 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteRelationsWatchResult'}},
5290 'type': 'object'},
5291 'Stop': {'type': 'object'}},
5292 'type': 'object'}
5293
5294
5295 @ReturnMapping(RemoteRelationsWatchResult)
5296 async def Next(self):
5297 '''
5298
5299 Returns -> typing.Union[str, _ForwardRef('RemoteRelationsChange'), _ForwardRef('Error')]
5300 '''
5301 # map input types to rpc msg
5302 _params = dict()
5303 msg = dict(type='RemoteRelationsWatcher', request='Next', version=1, params=_params)
5304
5305 reply = await self.rpc(msg)
5306 return reply
5307
5308
5309
5310 @ReturnMapping(None)
5311 async def Stop(self):
5312 '''
5313
5314 Returns -> None
5315 '''
5316 # map input types to rpc msg
5317 _params = dict()
5318 msg = dict(type='RemoteRelationsWatcher', request='Stop', version=1, params=_params)
5319
5320 reply = await self.rpc(msg)
5321 return reply
5322
5323
5324
5325 class ResourcesFacade(Type):
5326 name = 'Resources'
5327 version = 1
5328 schema = {'definitions': {'AddCharmWithAuthorization': {'additionalProperties': False,
5329 'properties': {'channel': {'type': 'string'},
5330 'macaroon': {'$ref': '#/definitions/Macaroon'},
5331 'url': {'type': 'string'}},
5332 'required': ['url',
5333 'channel',
5334 'macaroon'],
5335 'type': 'object'},
5336 'AddPendingResourcesArgs': {'additionalProperties': False,
5337 'properties': {'AddCharmWithAuthorization': {'$ref': '#/definitions/AddCharmWithAuthorization'},
5338 'Entity': {'$ref': '#/definitions/Entity'},
5339 'resources': {'items': {'$ref': '#/definitions/CharmResource'},
5340 'type': 'array'}},
5341 'required': ['Entity',
5342 'AddCharmWithAuthorization',
5343 'resources'],
5344 'type': 'object'},
5345 'AddPendingResourcesResult': {'additionalProperties': False,
5346 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5347 'pending-ids': {'items': {'type': 'string'},
5348 'type': 'array'}},
5349 'required': ['ErrorResult',
5350 'pending-ids'],
5351 'type': 'object'},
5352 'CharmResource': {'additionalProperties': False,
5353 'properties': {'description': {'type': 'string'},
5354 'fingerprint': {'items': {'type': 'integer'},
5355 'type': 'array'},
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',
5363 'type',
5364 'path',
5365 'origin',
5366 'revision',
5367 'fingerprint',
5368 'size'],
5369 'type': 'object'},
5370 'Entity': {'additionalProperties': False,
5371 'properties': {'tag': {'type': 'string'}},
5372 'required': ['tag'],
5373 'type': 'object'},
5374 'Error': {'additionalProperties': False,
5375 'properties': {'code': {'type': 'string'},
5376 'info': {'$ref': '#/definitions/ErrorInfo'},
5377 'message': {'type': 'string'}},
5378 'required': ['message', 'code'],
5379 'type': 'object'},
5380 'ErrorInfo': {'additionalProperties': False,
5381 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5382 'macaroon-path': {'type': 'string'}},
5383 'type': 'object'},
5384 'ErrorResult': {'additionalProperties': False,
5385 'properties': {'error': {'$ref': '#/definitions/Error'}},
5386 'type': 'object'},
5387 'ListResourcesArgs': {'additionalProperties': False,
5388 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5389 'type': 'array'}},
5390 'required': ['entities'],
5391 'type': 'object'},
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',
5399 'type': 'string'},
5400 'username': {'type': 'string'}},
5401 'required': ['CharmResource',
5402 'id',
5403 'pending-id',
5404 'application',
5405 'username',
5406 'timestamp'],
5407 'type': 'object'},
5408 'ResourcesResult': {'additionalProperties': False,
5409 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5410 'charm-store-resources': {'items': {'$ref': '#/definitions/CharmResource'},
5411 'type': 'array'},
5412 'resources': {'items': {'$ref': '#/definitions/Resource'},
5413 'type': 'array'},
5414 'unit-resources': {'items': {'$ref': '#/definitions/UnitResources'},
5415 'type': 'array'}},
5416 'required': ['ErrorResult',
5417 'resources',
5418 'charm-store-resources',
5419 'unit-resources'],
5420 'type': 'object'},
5421 'ResourcesResults': {'additionalProperties': False,
5422 'properties': {'results': {'items': {'$ref': '#/definitions/ResourcesResult'},
5423 'type': 'array'}},
5424 'required': ['results'],
5425 'type': 'object'},
5426 'UnitResources': {'additionalProperties': False,
5427 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
5428 'download-progress': {'patternProperties': {'.*': {'type': 'integer'}},
5429 'type': 'object'},
5430 'resources': {'items': {'$ref': '#/definitions/Resource'},
5431 'type': 'array'}},
5432 'required': ['Entity',
5433 'resources',
5434 'download-progress'],
5435 'type': 'object'}},
5436 'properties': {'AddPendingResources': {'properties': {'Params': {'$ref': '#/definitions/AddPendingResourcesArgs'},
5437 'Result': {'$ref': '#/definitions/AddPendingResourcesResult'}},
5438 'type': 'object'},
5439 'ListResources': {'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'},
5440 'Result': {'$ref': '#/definitions/ResourcesResults'}},
5441 'type': 'object'}},
5442 'type': 'object'}
5443
5444
5445 @ReturnMapping(AddPendingResourcesResult)
5446 async def AddPendingResources(self, addcharmwithauthorization, entity, resources):
5447 '''
5448 addcharmwithauthorization : AddCharmWithAuthorization
5449 entity : Entity
5450 resources : typing.Sequence<+T_co>[~CharmResource]<~CharmResource>
5451 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[str]]
5452 '''
5453 # map input types to rpc msg
5454 _params = dict()
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)
5460 return reply
5461
5462
5463
5464 @ReturnMapping(ResourcesResults)
5465 async def ListResources(self, entities):
5466 '''
5467 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5468 Returns -> typing.Sequence<+T_co>[~ResourcesResult]<~ResourcesResult>
5469 '''
5470 # map input types to rpc msg
5471 _params = dict()
5472 msg = dict(type='Resources', request='ListResources', version=1, params=_params)
5473 _params['entities'] = entities
5474 reply = await self.rpc(msg)
5475 return reply
5476
5477
5478
5479 class ResourcesHookContextFacade(Type):
5480 name = 'ResourcesHookContext'
5481 version = 1
5482 schema = {'definitions': {'CharmResource': {'additionalProperties': False,
5483 'properties': {'description': {'type': 'string'},
5484 'fingerprint': {'items': {'type': 'integer'},
5485 'type': 'array'},
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',
5493 'type',
5494 'path',
5495 'origin',
5496 'revision',
5497 'fingerprint',
5498 'size'],
5499 'type': 'object'},
5500 'Error': {'additionalProperties': False,
5501 'properties': {'code': {'type': 'string'},
5502 'info': {'$ref': '#/definitions/ErrorInfo'},
5503 'message': {'type': 'string'}},
5504 'required': ['message', 'code'],
5505 'type': 'object'},
5506 'ErrorInfo': {'additionalProperties': False,
5507 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5508 'macaroon-path': {'type': 'string'}},
5509 'type': 'object'},
5510 'ErrorResult': {'additionalProperties': False,
5511 'properties': {'error': {'$ref': '#/definitions/Error'}},
5512 'type': 'object'},
5513 'ListUnitResourcesArgs': {'additionalProperties': False,
5514 'properties': {'resource-names': {'items': {'type': 'string'},
5515 'type': 'array'}},
5516 'required': ['resource-names'],
5517 'type': 'object'},
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',
5525 'type': 'string'},
5526 'username': {'type': 'string'}},
5527 'required': ['CharmResource',
5528 'id',
5529 'pending-id',
5530 'application',
5531 'username',
5532 'timestamp'],
5533 'type': 'object'},
5534 'UnitResourceResult': {'additionalProperties': False,
5535 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5536 'resource': {'$ref': '#/definitions/Resource'}},
5537 'required': ['ErrorResult', 'resource'],
5538 'type': 'object'},
5539 'UnitResourcesResult': {'additionalProperties': False,
5540 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
5541 'resources': {'items': {'$ref': '#/definitions/UnitResourceResult'},
5542 'type': 'array'}},
5543 'required': ['ErrorResult',
5544 'resources'],
5545 'type': 'object'}},
5546 'properties': {'GetResourceInfo': {'properties': {'Params': {'$ref': '#/definitions/ListUnitResourcesArgs'},
5547 'Result': {'$ref': '#/definitions/UnitResourcesResult'}},
5548 'type': 'object'}},
5549 'type': 'object'}
5550
5551
5552 @ReturnMapping(UnitResourcesResult)
5553 async def GetResourceInfo(self, resource_names):
5554 '''
5555 resource_names : typing.Sequence<+T_co>[str]
5556 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[~UnitResourceResult]<~UnitResourceResult>]
5557 '''
5558 # map input types to rpc msg
5559 _params = dict()
5560 msg = dict(type='ResourcesHookContext', request='GetResourceInfo', version=1, params=_params)
5561 _params['resource-names'] = resource_names
5562 reply = await self.rpc(msg)
5563 return reply
5564
5565
5566
5567 class RetryStrategyFacade(Type):
5568 name = 'RetryStrategy'
5569 version = 1
5570 schema = {'definitions': {'Entities': {'additionalProperties': False,
5571 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5572 'type': 'array'}},
5573 'required': ['entities'],
5574 'type': 'object'},
5575 'Entity': {'additionalProperties': False,
5576 'properties': {'tag': {'type': 'string'}},
5577 'required': ['tag'],
5578 'type': 'object'},
5579 'Error': {'additionalProperties': False,
5580 'properties': {'code': {'type': 'string'},
5581 'info': {'$ref': '#/definitions/ErrorInfo'},
5582 'message': {'type': 'string'}},
5583 'required': ['message', 'code'],
5584 'type': 'object'},
5585 'ErrorInfo': {'additionalProperties': False,
5586 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5587 'macaroon-path': {'type': 'string'}},
5588 'type': 'object'},
5589 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5590 'NotifyWatchResult': {'additionalProperties': False,
5591 'properties': {'NotifyWatcherId': {'type': 'string'},
5592 'error': {'$ref': '#/definitions/Error'}},
5593 'required': ['NotifyWatcherId'],
5594 'type': 'object'},
5595 'NotifyWatchResults': {'additionalProperties': False,
5596 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5597 'type': 'array'}},
5598 'required': ['results'],
5599 'type': 'object'},
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',
5607 'min-retry-time',
5608 'max-retry-time',
5609 'jitter-retry-time',
5610 'retry-time-factor'],
5611 'type': 'object'},
5612 'RetryStrategyResult': {'additionalProperties': False,
5613 'properties': {'error': {'$ref': '#/definitions/Error'},
5614 'result': {'$ref': '#/definitions/RetryStrategy'}},
5615 'type': 'object'},
5616 'RetryStrategyResults': {'additionalProperties': False,
5617 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
5618 'type': 'array'}},
5619 'required': ['results'],
5620 'type': 'object'}},
5621 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5622 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
5623 'type': 'object'},
5624 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5625 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
5626 'type': 'object'}},
5627 'type': 'object'}
5628
5629
5630 @ReturnMapping(RetryStrategyResults)
5631 async def RetryStrategy(self, entities):
5632 '''
5633 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5634 Returns -> typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
5635 '''
5636 # map input types to rpc msg
5637 _params = dict()
5638 msg = dict(type='RetryStrategy', request='RetryStrategy', version=1, params=_params)
5639 _params['entities'] = entities
5640 reply = await self.rpc(msg)
5641 return reply
5642
5643
5644
5645 @ReturnMapping(NotifyWatchResults)
5646 async def WatchRetryStrategy(self, entities):
5647 '''
5648 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5649 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
5650 '''
5651 # map input types to rpc msg
5652 _params = dict()
5653 msg = dict(type='RetryStrategy', request='WatchRetryStrategy', version=1, params=_params)
5654 _params['entities'] = entities
5655 reply = await self.rpc(msg)
5656 return reply
5657
5658
5659
5660 class SSHClientFacade(Type):
5661 name = 'SSHClient'
5662 version = 1
5663 schema = {'definitions': {'Entities': {'additionalProperties': False,
5664 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5665 'type': 'array'}},
5666 'required': ['entities'],
5667 'type': 'object'},
5668 'Entity': {'additionalProperties': False,
5669 'properties': {'tag': {'type': 'string'}},
5670 'required': ['tag'],
5671 'type': 'object'},
5672 'Error': {'additionalProperties': False,
5673 'properties': {'code': {'type': 'string'},
5674 'info': {'$ref': '#/definitions/ErrorInfo'},
5675 'message': {'type': 'string'}},
5676 'required': ['message', 'code'],
5677 'type': 'object'},
5678 'ErrorInfo': {'additionalProperties': False,
5679 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5680 'macaroon-path': {'type': 'string'}},
5681 'type': 'object'},
5682 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5683 'SSHAddressResult': {'additionalProperties': False,
5684 'properties': {'address': {'type': 'string'},
5685 'error': {'$ref': '#/definitions/Error'}},
5686 'type': 'object'},
5687 'SSHAddressResults': {'additionalProperties': False,
5688 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
5689 'type': 'array'}},
5690 'required': ['results'],
5691 'type': 'object'},
5692 'SSHProxyResult': {'additionalProperties': False,
5693 'properties': {'use-proxy': {'type': 'boolean'}},
5694 'required': ['use-proxy'],
5695 'type': 'object'},
5696 'SSHPublicKeysResult': {'additionalProperties': False,
5697 'properties': {'error': {'$ref': '#/definitions/Error'},
5698 'public-keys': {'items': {'type': 'string'},
5699 'type': 'array'}},
5700 'type': 'object'},
5701 'SSHPublicKeysResults': {'additionalProperties': False,
5702 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
5703 'type': 'array'}},
5704 'required': ['results'],
5705 'type': 'object'}},
5706 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5707 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
5708 'type': 'object'},
5709 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
5710 'type': 'object'},
5711 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5712 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
5713 'type': 'object'},
5714 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5715 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
5716 'type': 'object'}},
5717 'type': 'object'}
5718
5719
5720 @ReturnMapping(SSHAddressResults)
5721 async def PrivateAddress(self, entities):
5722 '''
5723 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5724 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
5725 '''
5726 # map input types to rpc msg
5727 _params = dict()
5728 msg = dict(type='SSHClient', request='PrivateAddress', version=1, params=_params)
5729 _params['entities'] = entities
5730 reply = await self.rpc(msg)
5731 return reply
5732
5733
5734
5735 @ReturnMapping(SSHProxyResult)
5736 async def Proxy(self):
5737 '''
5738
5739 Returns -> bool
5740 '''
5741 # map input types to rpc msg
5742 _params = dict()
5743 msg = dict(type='SSHClient', request='Proxy', version=1, params=_params)
5744
5745 reply = await self.rpc(msg)
5746 return reply
5747
5748
5749
5750 @ReturnMapping(SSHAddressResults)
5751 async def PublicAddress(self, entities):
5752 '''
5753 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5754 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
5755 '''
5756 # map input types to rpc msg
5757 _params = dict()
5758 msg = dict(type='SSHClient', request='PublicAddress', version=1, params=_params)
5759 _params['entities'] = entities
5760 reply = await self.rpc(msg)
5761 return reply
5762
5763
5764
5765 @ReturnMapping(SSHPublicKeysResults)
5766 async def PublicKeys(self, entities):
5767 '''
5768 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5769 Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
5770 '''
5771 # map input types to rpc msg
5772 _params = dict()
5773 msg = dict(type='SSHClient', request='PublicKeys', version=1, params=_params)
5774 _params['entities'] = entities
5775 reply = await self.rpc(msg)
5776 return reply
5777
5778
5779
5780 class SingularFacade(Type):
5781 name = 'Singular'
5782 version = 1
5783 schema = {'definitions': {'Entities': {'additionalProperties': False,
5784 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5785 'type': 'array'}},
5786 'required': ['entities'],
5787 'type': 'object'},
5788 'Entity': {'additionalProperties': False,
5789 'properties': {'tag': {'type': 'string'}},
5790 'required': ['tag'],
5791 'type': 'object'},
5792 'Error': {'additionalProperties': False,
5793 'properties': {'code': {'type': 'string'},
5794 'info': {'$ref': '#/definitions/ErrorInfo'},
5795 'message': {'type': 'string'}},
5796 'required': ['message', 'code'],
5797 'type': 'object'},
5798 'ErrorInfo': {'additionalProperties': False,
5799 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5800 'macaroon-path': {'type': 'string'}},
5801 'type': 'object'},
5802 'ErrorResult': {'additionalProperties': False,
5803 'properties': {'error': {'$ref': '#/definitions/Error'}},
5804 'type': 'object'},
5805 'ErrorResults': {'additionalProperties': False,
5806 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5807 'type': 'array'}},
5808 'required': ['results'],
5809 'type': 'object'},
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',
5816 'controller-tag',
5817 'duration'],
5818 'type': 'object'},
5819 'SingularClaims': {'additionalProperties': False,
5820 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
5821 'type': 'array'}},
5822 'required': ['claims'],
5823 'type': 'object'}},
5824 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
5825 'Result': {'$ref': '#/definitions/ErrorResults'}},
5826 'type': 'object'},
5827 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5828 'Result': {'$ref': '#/definitions/ErrorResults'}},
5829 'type': 'object'}},
5830 'type': 'object'}
5831
5832
5833 @ReturnMapping(ErrorResults)
5834 async def Claim(self, claims):
5835 '''
5836 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
5837 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
5838 '''
5839 # map input types to rpc msg
5840 _params = dict()
5841 msg = dict(type='Singular', request='Claim', version=1, params=_params)
5842 _params['claims'] = claims
5843 reply = await self.rpc(msg)
5844 return reply
5845
5846
5847
5848 @ReturnMapping(ErrorResults)
5849 async def Wait(self, entities):
5850 '''
5851 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5852 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
5853 '''
5854 # map input types to rpc msg
5855 _params = dict()
5856 msg = dict(type='Singular', request='Wait', version=1, params=_params)
5857 _params['entities'] = entities
5858 reply = await self.rpc(msg)
5859 return reply
5860
5861
5862
5863 class StringsWatcherFacade(Type):
5864 name = 'StringsWatcher'
5865 version = 1
5866 schema = {'definitions': {'Error': {'additionalProperties': False,
5867 'properties': {'code': {'type': 'string'},
5868 'info': {'$ref': '#/definitions/ErrorInfo'},
5869 'message': {'type': 'string'}},
5870 'required': ['message', 'code'],
5871 'type': 'object'},
5872 'ErrorInfo': {'additionalProperties': False,
5873 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5874 'macaroon-path': {'type': 'string'}},
5875 'type': 'object'},
5876 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5877 'StringsWatchResult': {'additionalProperties': False,
5878 'properties': {'changes': {'items': {'type': 'string'},
5879 'type': 'array'},
5880 'error': {'$ref': '#/definitions/Error'},
5881 'watcher-id': {'type': 'string'}},
5882 'required': ['watcher-id'],
5883 'type': 'object'}},
5884 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
5885 'type': 'object'},
5886 'Stop': {'type': 'object'}},
5887 'type': 'object'}
5888
5889
5890 @ReturnMapping(StringsWatchResult)
5891 async def Next(self):
5892 '''
5893
5894 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
5895 '''
5896 # map input types to rpc msg
5897 _params = dict()
5898 msg = dict(type='StringsWatcher', request='Next', version=1, params=_params)
5899
5900 reply = await self.rpc(msg)
5901 return reply
5902
5903
5904
5905 @ReturnMapping(None)
5906 async def Stop(self):
5907 '''
5908
5909 Returns -> None
5910 '''
5911 # map input types to rpc msg
5912 _params = dict()
5913 msg = dict(type='StringsWatcher', request='Stop', version=1, params=_params)
5914
5915 reply = await self.rpc(msg)
5916 return reply
5917
5918
5919
5920 class UndertakerFacade(Type):
5921 name = 'Undertaker'
5922 version = 1
5923 schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
5924 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
5925 'type': 'object'}},
5926 'type': 'object'},
5927 'info': {'type': 'string'},
5928 'status': {'type': 'string'},
5929 'tag': {'type': 'string'}},
5930 'required': ['tag',
5931 'status',
5932 'info',
5933 'data'],
5934 'type': 'object'},
5935 'Error': {'additionalProperties': False,
5936 'properties': {'code': {'type': 'string'},
5937 'info': {'$ref': '#/definitions/ErrorInfo'},
5938 'message': {'type': 'string'}},
5939 'required': ['message', 'code'],
5940 'type': 'object'},
5941 'ErrorInfo': {'additionalProperties': False,
5942 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5943 'macaroon-path': {'type': 'string'}},
5944 'type': 'object'},
5945 'ErrorResult': {'additionalProperties': False,
5946 'properties': {'error': {'$ref': '#/definitions/Error'}},
5947 'type': 'object'},
5948 'ErrorResults': {'additionalProperties': False,
5949 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5950 'type': 'array'}},
5951 'required': ['results'],
5952 'type': 'object'},
5953 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5954 'ModelConfigResult': {'additionalProperties': False,
5955 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
5956 'type': 'object'}},
5957 'type': 'object'}},
5958 'required': ['config'],
5959 'type': 'object'},
5960 'NotifyWatchResult': {'additionalProperties': False,
5961 'properties': {'NotifyWatcherId': {'type': 'string'},
5962 'error': {'$ref': '#/definitions/Error'}},
5963 'required': ['NotifyWatcherId'],
5964 'type': 'object'},
5965 'NotifyWatchResults': {'additionalProperties': False,
5966 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
5967 'type': 'array'}},
5968 'required': ['results'],
5969 'type': 'object'},
5970 'SetStatus': {'additionalProperties': False,
5971 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
5972 'type': 'array'}},
5973 'required': ['entities'],
5974 'type': 'object'},
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',
5982 'name',
5983 'global-name',
5984 'is-system',
5985 'life'],
5986 'type': 'object'},
5987 'UndertakerModelInfoResult': {'additionalProperties': False,
5988 'properties': {'error': {'$ref': '#/definitions/Error'},
5989 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
5990 'required': ['result'],
5991 'type': 'object'}},
5992 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
5993 'type': 'object'},
5994 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
5995 'type': 'object'},
5996 'ProcessDyingModel': {'type': 'object'},
5997 'RemoveModel': {'type': 'object'},
5998 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
5999 'Result': {'$ref': '#/definitions/ErrorResults'}},
6000 'type': 'object'},
6001 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6002 'Result': {'$ref': '#/definitions/ErrorResults'}},
6003 'type': 'object'},
6004 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6005 'type': 'object'}},
6006 'type': 'object'}
6007
6008
6009 @ReturnMapping(ModelConfigResult)
6010 async def ModelConfig(self):
6011 '''
6012
6013 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
6014 '''
6015 # map input types to rpc msg
6016 _params = dict()
6017 msg = dict(type='Undertaker', request='ModelConfig', version=1, params=_params)
6018
6019 reply = await self.rpc(msg)
6020 return reply
6021
6022
6023
6024 @ReturnMapping(UndertakerModelInfoResult)
6025 async def ModelInfo(self):
6026 '''
6027
6028 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
6029 '''
6030 # map input types to rpc msg
6031 _params = dict()
6032 msg = dict(type='Undertaker', request='ModelInfo', version=1, params=_params)
6033
6034 reply = await self.rpc(msg)
6035 return reply
6036
6037
6038
6039 @ReturnMapping(None)
6040 async def ProcessDyingModel(self):
6041 '''
6042
6043 Returns -> None
6044 '''
6045 # map input types to rpc msg
6046 _params = dict()
6047 msg = dict(type='Undertaker', request='ProcessDyingModel', version=1, params=_params)
6048
6049 reply = await self.rpc(msg)
6050 return reply
6051
6052
6053
6054 @ReturnMapping(None)
6055 async def RemoveModel(self):
6056 '''
6057
6058 Returns -> None
6059 '''
6060 # map input types to rpc msg
6061 _params = dict()
6062 msg = dict(type='Undertaker', request='RemoveModel', version=1, params=_params)
6063
6064 reply = await self.rpc(msg)
6065 return reply
6066
6067
6068
6069 @ReturnMapping(ErrorResults)
6070 async def SetStatus(self, entities):
6071 '''
6072 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
6073 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6074 '''
6075 # map input types to rpc msg
6076 _params = dict()
6077 msg = dict(type='Undertaker', request='SetStatus', version=1, params=_params)
6078 _params['entities'] = entities
6079 reply = await self.rpc(msg)
6080 return reply
6081
6082
6083
6084 @ReturnMapping(ErrorResults)
6085 async def UpdateStatus(self, entities):
6086 '''
6087 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
6088 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6089 '''
6090 # map input types to rpc msg
6091 _params = dict()
6092 msg = dict(type='Undertaker', request='UpdateStatus', version=1, params=_params)
6093 _params['entities'] = entities
6094 reply = await self.rpc(msg)
6095 return reply
6096
6097
6098
6099 @ReturnMapping(NotifyWatchResults)
6100 async def WatchModelResources(self):
6101 '''
6102
6103 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
6104 '''
6105 # map input types to rpc msg
6106 _params = dict()
6107 msg = dict(type='Undertaker', request='WatchModelResources', version=1, params=_params)
6108
6109 reply = await self.rpc(msg)
6110 return reply
6111
6112
6113
6114 class UnitAssignerFacade(Type):
6115 name = 'UnitAssigner'
6116 version = 1
6117 schema = {'definitions': {'Entities': {'additionalProperties': False,
6118 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6119 'type': 'array'}},
6120 'required': ['entities'],
6121 'type': 'object'},
6122 'Entity': {'additionalProperties': False,
6123 'properties': {'tag': {'type': 'string'}},
6124 'required': ['tag'],
6125 'type': 'object'},
6126 'EntityStatusArgs': {'additionalProperties': False,
6127 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
6128 'type': 'object'}},
6129 'type': 'object'},
6130 'info': {'type': 'string'},
6131 'status': {'type': 'string'},
6132 'tag': {'type': 'string'}},
6133 'required': ['tag',
6134 'status',
6135 'info',
6136 'data'],
6137 'type': 'object'},
6138 'Error': {'additionalProperties': False,
6139 'properties': {'code': {'type': 'string'},
6140 'info': {'$ref': '#/definitions/ErrorInfo'},
6141 'message': {'type': 'string'}},
6142 'required': ['message', 'code'],
6143 'type': 'object'},
6144 'ErrorInfo': {'additionalProperties': False,
6145 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6146 'macaroon-path': {'type': 'string'}},
6147 'type': 'object'},
6148 'ErrorResult': {'additionalProperties': False,
6149 'properties': {'error': {'$ref': '#/definitions/Error'}},
6150 'type': 'object'},
6151 'ErrorResults': {'additionalProperties': False,
6152 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6153 'type': 'array'}},
6154 'required': ['results'],
6155 'type': 'object'},
6156 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6157 'SetStatus': {'additionalProperties': False,
6158 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
6159 'type': 'array'}},
6160 'required': ['entities'],
6161 'type': 'object'},
6162 'StringsWatchResult': {'additionalProperties': False,
6163 'properties': {'changes': {'items': {'type': 'string'},
6164 'type': 'array'},
6165 'error': {'$ref': '#/definitions/Error'},
6166 'watcher-id': {'type': 'string'}},
6167 'required': ['watcher-id'],
6168 'type': 'object'}},
6169 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6170 'Result': {'$ref': '#/definitions/ErrorResults'}},
6171 'type': 'object'},
6172 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
6173 'Result': {'$ref': '#/definitions/ErrorResults'}},
6174 'type': 'object'},
6175 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
6176 'type': 'object'}},
6177 'type': 'object'}
6178
6179
6180 @ReturnMapping(ErrorResults)
6181 async def AssignUnits(self, entities):
6182 '''
6183 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6184 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6185 '''
6186 # map input types to rpc msg
6187 _params = dict()
6188 msg = dict(type='UnitAssigner', request='AssignUnits', version=1, params=_params)
6189 _params['entities'] = entities
6190 reply = await self.rpc(msg)
6191 return reply
6192
6193
6194
6195 @ReturnMapping(ErrorResults)
6196 async def SetAgentStatus(self, entities):
6197 '''
6198 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
6199 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6200 '''
6201 # map input types to rpc msg
6202 _params = dict()
6203 msg = dict(type='UnitAssigner', request='SetAgentStatus', version=1, params=_params)
6204 _params['entities'] = entities
6205 reply = await self.rpc(msg)
6206 return reply
6207
6208
6209
6210 @ReturnMapping(StringsWatchResult)
6211 async def WatchUnitAssignments(self):
6212 '''
6213
6214 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
6215 '''
6216 # map input types to rpc msg
6217 _params = dict()
6218 msg = dict(type='UnitAssigner', request='WatchUnitAssignments', version=1, params=_params)
6219
6220 reply = await self.rpc(msg)
6221 return reply
6222
6223
6224
6225 class UpgraderFacade(Type):
6226 name = 'Upgrader'
6227 version = 1
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'],
6233 'type': 'object'},
6234 'Entities': {'additionalProperties': False,
6235 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6236 'type': 'array'}},
6237 'required': ['entities'],
6238 'type': 'object'},
6239 'EntitiesVersion': {'additionalProperties': False,
6240 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
6241 'type': 'array'}},
6242 'required': ['agent-tools'],
6243 'type': 'object'},
6244 'Entity': {'additionalProperties': False,
6245 'properties': {'tag': {'type': 'string'}},
6246 'required': ['tag'],
6247 'type': 'object'},
6248 'EntityVersion': {'additionalProperties': False,
6249 'properties': {'tag': {'type': 'string'},
6250 'tools': {'$ref': '#/definitions/Version'}},
6251 'required': ['tag', 'tools'],
6252 'type': 'object'},
6253 'Error': {'additionalProperties': False,
6254 'properties': {'code': {'type': 'string'},
6255 'info': {'$ref': '#/definitions/ErrorInfo'},
6256 'message': {'type': 'string'}},
6257 'required': ['message', 'code'],
6258 'type': 'object'},
6259 'ErrorInfo': {'additionalProperties': False,
6260 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6261 'macaroon-path': {'type': 'string'}},
6262 'type': 'object'},
6263 'ErrorResult': {'additionalProperties': False,
6264 'properties': {'error': {'$ref': '#/definitions/Error'}},
6265 'type': 'object'},
6266 'ErrorResults': {'additionalProperties': False,
6267 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6268 'type': 'array'}},
6269 'required': ['results'],
6270 'type': 'object'},
6271 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6272 'NotifyWatchResult': {'additionalProperties': False,
6273 'properties': {'NotifyWatcherId': {'type': 'string'},
6274 'error': {'$ref': '#/definitions/Error'}},
6275 'required': ['NotifyWatcherId'],
6276 'type': 'object'},
6277 'NotifyWatchResults': {'additionalProperties': False,
6278 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6279 'type': 'array'}},
6280 'required': ['results'],
6281 'type': 'object'},
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',
6289 'Minor',
6290 'Tag',
6291 'Patch',
6292 'Build'],
6293 'type': 'object'},
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'],
6300 'type': 'object'},
6301 'ToolsResult': {'additionalProperties': False,
6302 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
6303 'error': {'$ref': '#/definitions/Error'},
6304 'tools': {'items': {'$ref': '#/definitions/Tools'},
6305 'type': 'array'}},
6306 'required': ['tools',
6307 'disable-ssl-hostname-verification'],
6308 'type': 'object'},
6309 'ToolsResults': {'additionalProperties': False,
6310 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
6311 'type': 'array'}},
6312 'required': ['results'],
6313 'type': 'object'},
6314 'Version': {'additionalProperties': False,
6315 'properties': {'version': {'$ref': '#/definitions/Binary'}},
6316 'required': ['version'],
6317 'type': 'object'},
6318 'VersionResult': {'additionalProperties': False,
6319 'properties': {'error': {'$ref': '#/definitions/Error'},
6320 'version': {'$ref': '#/definitions/Number'}},
6321 'type': 'object'},
6322 'VersionResults': {'additionalProperties': False,
6323 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
6324 'type': 'array'}},
6325 'required': ['results'],
6326 'type': 'object'}},
6327 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6328 'Result': {'$ref': '#/definitions/VersionResults'}},
6329 'type': 'object'},
6330 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
6331 'Result': {'$ref': '#/definitions/ErrorResults'}},
6332 'type': 'object'},
6333 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6334 'Result': {'$ref': '#/definitions/ToolsResults'}},
6335 'type': 'object'},
6336 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6337 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6338 'type': 'object'}},
6339 'type': 'object'}
6340
6341
6342 @ReturnMapping(VersionResults)
6343 async def DesiredVersion(self, entities):
6344 '''
6345 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6346 Returns -> typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
6347 '''
6348 # map input types to rpc msg
6349 _params = dict()
6350 msg = dict(type='Upgrader', request='DesiredVersion', version=1, params=_params)
6351 _params['entities'] = entities
6352 reply = await self.rpc(msg)
6353 return reply
6354
6355
6356
6357 @ReturnMapping(ErrorResults)
6358 async def SetTools(self, agent_tools):
6359 '''
6360 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
6361 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6362 '''
6363 # map input types to rpc msg
6364 _params = dict()
6365 msg = dict(type='Upgrader', request='SetTools', version=1, params=_params)
6366 _params['agent-tools'] = agent_tools
6367 reply = await self.rpc(msg)
6368 return reply
6369
6370
6371
6372 @ReturnMapping(ToolsResults)
6373 async def Tools(self, entities):
6374 '''
6375 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6376 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
6377 '''
6378 # map input types to rpc msg
6379 _params = dict()
6380 msg = dict(type='Upgrader', request='Tools', version=1, params=_params)
6381 _params['entities'] = entities
6382 reply = await self.rpc(msg)
6383 return reply
6384
6385
6386
6387 @ReturnMapping(NotifyWatchResults)
6388 async def WatchAPIVersion(self, entities):
6389 '''
6390 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6391 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
6392 '''
6393 # map input types to rpc msg
6394 _params = dict()
6395 msg = dict(type='Upgrader', request='WatchAPIVersion', version=1, params=_params)
6396 _params['entities'] = entities
6397 reply = await self.rpc(msg)
6398 return reply
6399
6400
6401
6402 class UserManagerFacade(Type):
6403 name = 'UserManager'
6404 version = 1
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'],
6410 'type': 'object'},
6411 'AddUserResult': {'additionalProperties': False,
6412 'properties': {'error': {'$ref': '#/definitions/Error'},
6413 'secret-key': {'items': {'type': 'integer'},
6414 'type': 'array'},
6415 'tag': {'type': 'string'}},
6416 'type': 'object'},
6417 'AddUserResults': {'additionalProperties': False,
6418 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
6419 'type': 'array'}},
6420 'required': ['results'],
6421 'type': 'object'},
6422 'AddUsers': {'additionalProperties': False,
6423 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
6424 'type': 'array'}},
6425 'required': ['users'],
6426 'type': 'object'},
6427 'Entities': {'additionalProperties': False,
6428 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6429 'type': 'array'}},
6430 'required': ['entities'],
6431 'type': 'object'},
6432 'Entity': {'additionalProperties': False,
6433 'properties': {'tag': {'type': 'string'}},
6434 'required': ['tag'],
6435 'type': 'object'},
6436 'EntityPassword': {'additionalProperties': False,
6437 'properties': {'password': {'type': 'string'},
6438 'tag': {'type': 'string'}},
6439 'required': ['tag', 'password'],
6440 'type': 'object'},
6441 'EntityPasswords': {'additionalProperties': False,
6442 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
6443 'type': 'array'}},
6444 'required': ['changes'],
6445 'type': 'object'},
6446 'Error': {'additionalProperties': False,
6447 'properties': {'code': {'type': 'string'},
6448 'info': {'$ref': '#/definitions/ErrorInfo'},
6449 'message': {'type': 'string'}},
6450 'required': ['message', 'code'],
6451 'type': 'object'},
6452 'ErrorInfo': {'additionalProperties': False,
6453 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6454 'macaroon-path': {'type': 'string'}},
6455 'type': 'object'},
6456 'ErrorResult': {'additionalProperties': False,
6457 'properties': {'error': {'$ref': '#/definitions/Error'}},
6458 'type': 'object'},
6459 'ErrorResults': {'additionalProperties': False,
6460 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6461 'type': 'array'}},
6462 'required': ['results'],
6463 'type': 'object'},
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',
6469 'type': 'string'},
6470 'disabled': {'type': 'boolean'},
6471 'display-name': {'type': 'string'},
6472 'last-connection': {'format': 'date-time',
6473 'type': 'string'},
6474 'username': {'type': 'string'}},
6475 'required': ['username',
6476 'display-name',
6477 'access',
6478 'created-by',
6479 'date-created',
6480 'disabled'],
6481 'type': 'object'},
6482 'UserInfoRequest': {'additionalProperties': False,
6483 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6484 'type': 'array'},
6485 'include-disabled': {'type': 'boolean'}},
6486 'required': ['entities',
6487 'include-disabled'],
6488 'type': 'object'},
6489 'UserInfoResult': {'additionalProperties': False,
6490 'properties': {'error': {'$ref': '#/definitions/Error'},
6491 'result': {'$ref': '#/definitions/UserInfo'}},
6492 'type': 'object'},
6493 'UserInfoResults': {'additionalProperties': False,
6494 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
6495 'type': 'array'}},
6496 'required': ['results'],
6497 'type': 'object'}},
6498 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
6499 'Result': {'$ref': '#/definitions/AddUserResults'}},
6500 'type': 'object'},
6501 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6502 'Result': {'$ref': '#/definitions/ErrorResults'}},
6503 'type': 'object'},
6504 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6505 'Result': {'$ref': '#/definitions/ErrorResults'}},
6506 'type': 'object'},
6507 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6508 'Result': {'$ref': '#/definitions/ErrorResults'}},
6509 'type': 'object'},
6510 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6511 'Result': {'$ref': '#/definitions/ErrorResults'}},
6512 'type': 'object'},
6513 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
6514 'Result': {'$ref': '#/definitions/UserInfoResults'}},
6515 'type': 'object'}},
6516 'type': 'object'}
6517
6518
6519 @ReturnMapping(AddUserResults)
6520 async def AddUser(self, users):
6521 '''
6522 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
6523 Returns -> typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
6524 '''
6525 # map input types to rpc msg
6526 _params = dict()
6527 msg = dict(type='UserManager', request='AddUser', version=1, params=_params)
6528 _params['users'] = users
6529 reply = await self.rpc(msg)
6530 return reply
6531
6532
6533
6534 @ReturnMapping(ErrorResults)
6535 async def DisableUser(self, entities):
6536 '''
6537 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6538 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6539 '''
6540 # map input types to rpc msg
6541 _params = dict()
6542 msg = dict(type='UserManager', request='DisableUser', version=1, params=_params)
6543 _params['entities'] = entities
6544 reply = await self.rpc(msg)
6545 return reply
6546
6547
6548
6549 @ReturnMapping(ErrorResults)
6550 async def EnableUser(self, entities):
6551 '''
6552 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6553 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6554 '''
6555 # map input types to rpc msg
6556 _params = dict()
6557 msg = dict(type='UserManager', request='EnableUser', version=1, params=_params)
6558 _params['entities'] = entities
6559 reply = await self.rpc(msg)
6560 return reply
6561
6562
6563
6564 @ReturnMapping(ErrorResults)
6565 async def RemoveUser(self, entities):
6566 '''
6567 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6568 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6569 '''
6570 # map input types to rpc msg
6571 _params = dict()
6572 msg = dict(type='UserManager', request='RemoveUser', version=1, params=_params)
6573 _params['entities'] = entities
6574 reply = await self.rpc(msg)
6575 return reply
6576
6577
6578
6579 @ReturnMapping(ErrorResults)
6580 async def SetPassword(self, changes):
6581 '''
6582 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
6583 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6584 '''
6585 # map input types to rpc msg
6586 _params = dict()
6587 msg = dict(type='UserManager', request='SetPassword', version=1, params=_params)
6588 _params['changes'] = changes
6589 reply = await self.rpc(msg)
6590 return reply
6591
6592
6593
6594 @ReturnMapping(UserInfoResults)
6595 async def UserInfo(self, entities, include_disabled):
6596 '''
6597 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6598 include_disabled : bool
6599 Returns -> typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
6600 '''
6601 # map input types to rpc msg
6602 _params = dict()
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)
6607 return reply
6608
6609