Remove dependency on vendored libjuju
[osm/N2VC.git] / modules / libjuju / 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._definitions import *
5 from juju.client.facade import ReturnMapping, Type
6
7
8 class ActionPrunerFacade(Type):
9 name = 'ActionPruner'
10 version = 1
11 schema = {'definitions': {'ActionPruneArgs': {'additionalProperties': False,
12 'properties': {'max-history-mb': {'type': 'integer'},
13 'max-history-time': {'type': 'integer'}},
14 'required': ['max-history-time',
15 'max-history-mb'],
16 'type': 'object'},
17 'Error': {'additionalProperties': False,
18 'properties': {'code': {'type': 'string'},
19 'info': {'$ref': '#/definitions/ErrorInfo'},
20 'message': {'type': 'string'}},
21 'required': ['message', 'code'],
22 'type': 'object'},
23 'ErrorInfo': {'additionalProperties': False,
24 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
25 'macaroon-path': {'type': 'string'}},
26 'type': 'object'},
27 'Macaroon': {'additionalProperties': False, 'type': 'object'},
28 'ModelConfigResult': {'additionalProperties': False,
29 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
30 'type': 'object'}},
31 'type': 'object'}},
32 'required': ['config'],
33 'type': 'object'},
34 'NotifyWatchResult': {'additionalProperties': False,
35 'properties': {'NotifyWatcherId': {'type': 'string'},
36 'error': {'$ref': '#/definitions/Error'}},
37 'required': ['NotifyWatcherId'],
38 'type': 'object'}},
39 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
40 'type': 'object'},
41 'Prune': {'properties': {'Params': {'$ref': '#/definitions/ActionPruneArgs'}},
42 'type': 'object'},
43 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
44 'type': 'object'}},
45 'type': 'object'}
46
47
48 @ReturnMapping(ModelConfigResult)
49 async def ModelConfig(self):
50 '''
51
52 Returns -> typing.Mapping[str, typing.Any]
53 '''
54 # map input types to rpc msg
55 _params = dict()
56 msg = dict(type='ActionPruner',
57 request='ModelConfig',
58 version=1,
59 params=_params)
60
61 reply = await self.rpc(msg)
62 return reply
63
64
65
66 @ReturnMapping(None)
67 async def Prune(self, max_history_mb, max_history_time):
68 '''
69 max_history_mb : int
70 max_history_time : int
71 Returns -> None
72 '''
73 # map input types to rpc msg
74 _params = dict()
75 msg = dict(type='ActionPruner',
76 request='Prune',
77 version=1,
78 params=_params)
79 _params['max-history-mb'] = max_history_mb
80 _params['max-history-time'] = max_history_time
81 reply = await self.rpc(msg)
82 return reply
83
84
85
86 @ReturnMapping(NotifyWatchResult)
87 async def WatchForModelConfigChanges(self):
88 '''
89
90 Returns -> typing.Union[str, _ForwardRef('Error')]
91 '''
92 # map input types to rpc msg
93 _params = dict()
94 msg = dict(type='ActionPruner',
95 request='WatchForModelConfigChanges',
96 version=1,
97 params=_params)
98
99 reply = await self.rpc(msg)
100 return reply
101
102
103
104 class AgentToolsFacade(Type):
105 name = 'AgentTools'
106 version = 1
107 schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
108
109
110 @ReturnMapping(None)
111 async def UpdateToolsAvailable(self):
112 '''
113
114 Returns -> None
115 '''
116 # map input types to rpc msg
117 _params = dict()
118 msg = dict(type='AgentTools',
119 request='UpdateToolsAvailable',
120 version=1,
121 params=_params)
122
123 reply = await self.rpc(msg)
124 return reply
125
126
127
128 class AllWatcherFacade(Type):
129 name = 'AllWatcher'
130 version = 1
131 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
132 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
133 'type': 'array'}},
134 'required': ['deltas'],
135 'type': 'object'},
136 'Delta': {'additionalProperties': False,
137 'properties': {'entity': {'additionalProperties': True,
138 'type': 'object'},
139 'removed': {'type': 'boolean'}},
140 'required': ['removed', 'entity'],
141 'type': 'object'}},
142 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
143 'type': 'object'},
144 'Stop': {'type': 'object'}},
145 'type': 'object'}
146
147
148 @ReturnMapping(AllWatcherNextResults)
149 async def Next(self):
150 '''
151
152 Returns -> typing.Sequence[~Delta]
153 '''
154 # map input types to rpc msg
155 _params = dict()
156 msg = dict(type='AllWatcher',
157 request='Next',
158 version=1,
159 params=_params)
160
161 reply = await self.rpc(msg)
162 return reply
163
164
165
166 @ReturnMapping(None)
167 async def Stop(self):
168 '''
169
170 Returns -> None
171 '''
172 # map input types to rpc msg
173 _params = dict()
174 msg = dict(type='AllWatcher',
175 request='Stop',
176 version=1,
177 params=_params)
178
179 reply = await self.rpc(msg)
180 return reply
181
182
183
184 class ApplicationRelationsWatcherFacade(Type):
185 name = 'ApplicationRelationsWatcher'
186 version = 1
187 schema = {'definitions': {'ApplicationRelationsChange': {'additionalProperties': False,
188 'properties': {'changed': {'items': {'$ref': '#/definitions/RelationChange'},
189 'type': 'array'},
190 'removed': {'items': {'type': 'integer'},
191 'type': 'array'}},
192 'type': 'object'},
193 'ApplicationRelationsWatchResult': {'additionalProperties': False,
194 'properties': {'ApplicationRelationsWatcherId': {'type': 'string'},
195 'changes': {'$ref': '#/definitions/ApplicationRelationsChange'},
196 'error': {'$ref': '#/definitions/Error'}},
197 'required': ['ApplicationRelationsWatcherId'],
198 'type': 'object'},
199 'Error': {'additionalProperties': False,
200 'properties': {'code': {'type': 'string'},
201 'info': {'$ref': '#/definitions/ErrorInfo'},
202 'message': {'type': 'string'}},
203 'required': ['message', 'code'],
204 'type': 'object'},
205 'ErrorInfo': {'additionalProperties': False,
206 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
207 'macaroon-path': {'type': 'string'}},
208 'type': 'object'},
209 'Macaroon': {'additionalProperties': False, 'type': 'object'},
210 'RelationChange': {'additionalProperties': False,
211 'properties': {'changedunits': {'patternProperties': {'.*': {'$ref': '#/definitions/RelationUnitChange'}},
212 'type': 'object'},
213 'departedunits': {'items': {'type': 'string'},
214 'type': 'array'},
215 'id': {'type': 'integer'},
216 'life': {'type': 'string'}},
217 'required': ['id', 'life'],
218 'type': 'object'},
219 'RelationUnitChange': {'additionalProperties': False,
220 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
221 'type': 'object'}},
222 'type': 'object'}},
223 'type': 'object'}},
224 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/ApplicationRelationsWatchResult'}},
225 'type': 'object'},
226 'Stop': {'type': 'object'}},
227 'type': 'object'}
228
229
230 @ReturnMapping(ApplicationRelationsWatchResult)
231 async def Next(self):
232 '''
233
234 Returns -> typing.Union[str, _ForwardRef('ApplicationRelationsChange'), _ForwardRef('Error')]
235 '''
236 # map input types to rpc msg
237 _params = dict()
238 msg = dict(type='ApplicationRelationsWatcher',
239 request='Next',
240 version=1,
241 params=_params)
242
243 reply = await self.rpc(msg)
244 return reply
245
246
247
248 @ReturnMapping(None)
249 async def Stop(self):
250 '''
251
252 Returns -> None
253 '''
254 # map input types to rpc msg
255 _params = dict()
256 msg = dict(type='ApplicationRelationsWatcher',
257 request='Stop',
258 version=1,
259 params=_params)
260
261 reply = await self.rpc(msg)
262 return reply
263
264
265
266 class ApplicationScalerFacade(Type):
267 name = 'ApplicationScaler'
268 version = 1
269 schema = {'definitions': {'Entities': {'additionalProperties': False,
270 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
271 'type': 'array'}},
272 'required': ['entities'],
273 'type': 'object'},
274 'Entity': {'additionalProperties': False,
275 'properties': {'tag': {'type': 'string'}},
276 'required': ['tag'],
277 'type': 'object'},
278 'Error': {'additionalProperties': False,
279 'properties': {'code': {'type': 'string'},
280 'info': {'$ref': '#/definitions/ErrorInfo'},
281 'message': {'type': 'string'}},
282 'required': ['message', 'code'],
283 'type': 'object'},
284 'ErrorInfo': {'additionalProperties': False,
285 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
286 'macaroon-path': {'type': 'string'}},
287 'type': 'object'},
288 'ErrorResult': {'additionalProperties': False,
289 'properties': {'error': {'$ref': '#/definitions/Error'}},
290 'type': 'object'},
291 'ErrorResults': {'additionalProperties': False,
292 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
293 'type': 'array'}},
294 'required': ['results'],
295 'type': 'object'},
296 'Macaroon': {'additionalProperties': False, 'type': 'object'},
297 'StringsWatchResult': {'additionalProperties': False,
298 'properties': {'changes': {'items': {'type': 'string'},
299 'type': 'array'},
300 'error': {'$ref': '#/definitions/Error'},
301 'watcher-id': {'type': 'string'}},
302 'required': ['watcher-id'],
303 'type': 'object'}},
304 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
305 'Result': {'$ref': '#/definitions/ErrorResults'}},
306 'type': 'object'},
307 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
308 'type': 'object'}},
309 'type': 'object'}
310
311
312 @ReturnMapping(ErrorResults)
313 async def Rescale(self, entities):
314 '''
315 entities : typing.Sequence[~Entity]
316 Returns -> typing.Sequence[~ErrorResult]
317 '''
318 # map input types to rpc msg
319 _params = dict()
320 msg = dict(type='ApplicationScaler',
321 request='Rescale',
322 version=1,
323 params=_params)
324 _params['entities'] = entities
325 reply = await self.rpc(msg)
326 return reply
327
328
329
330 @ReturnMapping(StringsWatchResult)
331 async def Watch(self):
332 '''
333
334 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
335 '''
336 # map input types to rpc msg
337 _params = dict()
338 msg = dict(type='ApplicationScaler',
339 request='Watch',
340 version=1,
341 params=_params)
342
343 reply = await self.rpc(msg)
344 return reply
345
346
347
348 class BackupsFacade(Type):
349 name = 'Backups'
350 version = 1
351 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
352 'properties': {'notes': {'type': 'string'}},
353 'required': ['notes'],
354 'type': 'object'},
355 'BackupsInfoArgs': {'additionalProperties': False,
356 'properties': {'id': {'type': 'string'}},
357 'required': ['id'],
358 'type': 'object'},
359 'BackupsListArgs': {'additionalProperties': False,
360 'type': 'object'},
361 'BackupsListResult': {'additionalProperties': False,
362 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
363 'type': 'array'}},
364 'required': ['list'],
365 'type': 'object'},
366 'BackupsMetadataResult': {'additionalProperties': False,
367 'properties': {'ca-cert': {'type': 'string'},
368 'ca-private-key': {'type': 'string'},
369 'checksum': {'type': 'string'},
370 'checksum-format': {'type': 'string'},
371 'finished': {'format': 'date-time',
372 'type': 'string'},
373 'hostname': {'type': 'string'},
374 'id': {'type': 'string'},
375 'machine': {'type': 'string'},
376 'model': {'type': 'string'},
377 'notes': {'type': 'string'},
378 'series': {'type': 'string'},
379 'size': {'type': 'integer'},
380 'started': {'format': 'date-time',
381 'type': 'string'},
382 'stored': {'format': 'date-time',
383 'type': 'string'},
384 'version': {'$ref': '#/definitions/Number'}},
385 'required': ['id',
386 'checksum',
387 'checksum-format',
388 'size',
389 'stored',
390 'started',
391 'finished',
392 'notes',
393 'model',
394 'machine',
395 'hostname',
396 'version',
397 'series',
398 'ca-cert',
399 'ca-private-key'],
400 'type': 'object'},
401 'BackupsRemoveArgs': {'additionalProperties': False,
402 'properties': {'id': {'type': 'string'}},
403 'required': ['id'],
404 'type': 'object'},
405 'Number': {'additionalProperties': False,
406 'properties': {'Build': {'type': 'integer'},
407 'Major': {'type': 'integer'},
408 'Minor': {'type': 'integer'},
409 'Patch': {'type': 'integer'},
410 'Tag': {'type': 'string'}},
411 'required': ['Major',
412 'Minor',
413 'Tag',
414 'Patch',
415 'Build'],
416 'type': 'object'},
417 'RestoreArgs': {'additionalProperties': False,
418 'properties': {'backup-id': {'type': 'string'}},
419 'required': ['backup-id'],
420 'type': 'object'}},
421 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
422 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
423 'type': 'object'},
424 'FinishRestore': {'type': 'object'},
425 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
426 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
427 'type': 'object'},
428 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
429 'Result': {'$ref': '#/definitions/BackupsListResult'}},
430 'type': 'object'},
431 'PrepareRestore': {'type': 'object'},
432 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
433 'type': 'object'},
434 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
435 'type': 'object'}},
436 'type': 'object'}
437
438
439 @ReturnMapping(BackupsMetadataResult)
440 async def Create(self, notes):
441 '''
442 notes : str
443 Returns -> typing.Union[str, int, _ForwardRef('Number')]
444 '''
445 # map input types to rpc msg
446 _params = dict()
447 msg = dict(type='Backups',
448 request='Create',
449 version=1,
450 params=_params)
451 _params['notes'] = notes
452 reply = await self.rpc(msg)
453 return reply
454
455
456
457 @ReturnMapping(None)
458 async def FinishRestore(self):
459 '''
460
461 Returns -> None
462 '''
463 # map input types to rpc msg
464 _params = dict()
465 msg = dict(type='Backups',
466 request='FinishRestore',
467 version=1,
468 params=_params)
469
470 reply = await self.rpc(msg)
471 return reply
472
473
474
475 @ReturnMapping(BackupsMetadataResult)
476 async def Info(self, id_):
477 '''
478 id_ : str
479 Returns -> typing.Union[str, int, _ForwardRef('Number')]
480 '''
481 # map input types to rpc msg
482 _params = dict()
483 msg = dict(type='Backups',
484 request='Info',
485 version=1,
486 params=_params)
487 _params['id'] = id_
488 reply = await self.rpc(msg)
489 return reply
490
491
492
493 @ReturnMapping(BackupsListResult)
494 async def List(self):
495 '''
496
497 Returns -> typing.Sequence[~BackupsMetadataResult]
498 '''
499 # map input types to rpc msg
500 _params = dict()
501 msg = dict(type='Backups',
502 request='List',
503 version=1,
504 params=_params)
505
506 reply = await self.rpc(msg)
507 return reply
508
509
510
511 @ReturnMapping(None)
512 async def PrepareRestore(self):
513 '''
514
515 Returns -> None
516 '''
517 # map input types to rpc msg
518 _params = dict()
519 msg = dict(type='Backups',
520 request='PrepareRestore',
521 version=1,
522 params=_params)
523
524 reply = await self.rpc(msg)
525 return reply
526
527
528
529 @ReturnMapping(None)
530 async def Remove(self, id_):
531 '''
532 id_ : str
533 Returns -> None
534 '''
535 # map input types to rpc msg
536 _params = dict()
537 msg = dict(type='Backups',
538 request='Remove',
539 version=1,
540 params=_params)
541 _params['id'] = id_
542 reply = await self.rpc(msg)
543 return reply
544
545
546
547 @ReturnMapping(None)
548 async def Restore(self, backup_id):
549 '''
550 backup_id : str
551 Returns -> None
552 '''
553 # map input types to rpc msg
554 _params = dict()
555 msg = dict(type='Backups',
556 request='Restore',
557 version=1,
558 params=_params)
559 _params['backup-id'] = backup_id
560 reply = await self.rpc(msg)
561 return reply
562
563
564
565 class BundleFacade(Type):
566 name = 'Bundle'
567 version = 1
568 schema = {'definitions': {'BundleChange': {'additionalProperties': False,
569 'properties': {'args': {'items': {'additionalProperties': True,
570 'type': 'object'},
571 'type': 'array'},
572 'id': {'type': 'string'},
573 'method': {'type': 'string'},
574 'requires': {'items': {'type': 'string'},
575 'type': 'array'}},
576 'required': ['id',
577 'method',
578 'args',
579 'requires'],
580 'type': 'object'},
581 'BundleChangesParams': {'additionalProperties': False,
582 'properties': {'yaml': {'type': 'string'}},
583 'required': ['yaml'],
584 'type': 'object'},
585 'BundleChangesResults': {'additionalProperties': False,
586 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
587 'type': 'array'},
588 'errors': {'items': {'type': 'string'},
589 'type': 'array'}},
590 'type': 'object'}},
591 'properties': {'GetChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
592 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
593 'type': 'object'}},
594 'type': 'object'}
595
596
597 @ReturnMapping(BundleChangesResults)
598 async def GetChanges(self, yaml):
599 '''
600 yaml : str
601 Returns -> typing.Union[typing.Sequence[~BundleChange], typing.Sequence[str]]
602 '''
603 # map input types to rpc msg
604 _params = dict()
605 msg = dict(type='Bundle',
606 request='GetChanges',
607 version=1,
608 params=_params)
609 _params['yaml'] = yaml
610 reply = await self.rpc(msg)
611 return reply
612
613
614
615 class CAASAgentFacade(Type):
616 name = 'CAASAgent'
617 version = 1
618 schema = {'definitions': {'CloudCredential': {'additionalProperties': False,
619 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
620 'type': 'object'},
621 'auth-type': {'type': 'string'},
622 'redacted': {'items': {'type': 'string'},
623 'type': 'array'}},
624 'required': ['auth-type'],
625 'type': 'object'},
626 'CloudSpec': {'additionalProperties': False,
627 'properties': {'cacertificates': {'items': {'type': 'string'},
628 'type': 'array'},
629 'credential': {'$ref': '#/definitions/CloudCredential'},
630 'endpoint': {'type': 'string'},
631 'identity-endpoint': {'type': 'string'},
632 'name': {'type': 'string'},
633 'region': {'type': 'string'},
634 'storage-endpoint': {'type': 'string'},
635 'type': {'type': 'string'}},
636 'required': ['type', 'name'],
637 'type': 'object'},
638 'CloudSpecResult': {'additionalProperties': False,
639 'properties': {'error': {'$ref': '#/definitions/Error'},
640 'result': {'$ref': '#/definitions/CloudSpec'}},
641 'type': 'object'},
642 'CloudSpecResults': {'additionalProperties': False,
643 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
644 'type': 'array'}},
645 'type': 'object'},
646 'Entities': {'additionalProperties': False,
647 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
648 'type': 'array'}},
649 'required': ['entities'],
650 'type': 'object'},
651 'Entity': {'additionalProperties': False,
652 'properties': {'tag': {'type': 'string'}},
653 'required': ['tag'],
654 'type': 'object'},
655 'Error': {'additionalProperties': False,
656 'properties': {'code': {'type': 'string'},
657 'info': {'$ref': '#/definitions/ErrorInfo'},
658 'message': {'type': 'string'}},
659 'required': ['message', 'code'],
660 'type': 'object'},
661 'ErrorInfo': {'additionalProperties': False,
662 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
663 'macaroon-path': {'type': 'string'}},
664 'type': 'object'},
665 'Macaroon': {'additionalProperties': False, 'type': 'object'},
666 'ModelConfigResult': {'additionalProperties': False,
667 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
668 'type': 'object'}},
669 'type': 'object'}},
670 'required': ['config'],
671 'type': 'object'},
672 'ModelTag': {'additionalProperties': False, 'type': 'object'},
673 'NotifyWatchResult': {'additionalProperties': False,
674 'properties': {'NotifyWatcherId': {'type': 'string'},
675 'error': {'$ref': '#/definitions/Error'}},
676 'required': ['NotifyWatcherId'],
677 'type': 'object'}},
678 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
679 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
680 'type': 'object'},
681 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
682 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
683 'type': 'object'},
684 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
685 'type': 'object'},
686 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
687 'type': 'object'}},
688 'type': 'object'}
689
690
691 @ReturnMapping(CloudSpecResults)
692 async def CloudSpec(self, entities):
693 '''
694 entities : typing.Sequence[~Entity]
695 Returns -> typing.Sequence[~CloudSpecResult]
696 '''
697 # map input types to rpc msg
698 _params = dict()
699 msg = dict(type='CAASAgent',
700 request='CloudSpec',
701 version=1,
702 params=_params)
703 _params['entities'] = entities
704 reply = await self.rpc(msg)
705 return reply
706
707
708
709 @ReturnMapping(CloudSpecResult)
710 async def GetCloudSpec(self):
711 '''
712
713 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
714 '''
715 # map input types to rpc msg
716 _params = dict()
717 msg = dict(type='CAASAgent',
718 request='GetCloudSpec',
719 version=1,
720 params=_params)
721
722 reply = await self.rpc(msg)
723 return reply
724
725
726
727 @ReturnMapping(ModelConfigResult)
728 async def ModelConfig(self):
729 '''
730
731 Returns -> typing.Mapping[str, typing.Any]
732 '''
733 # map input types to rpc msg
734 _params = dict()
735 msg = dict(type='CAASAgent',
736 request='ModelConfig',
737 version=1,
738 params=_params)
739
740 reply = await self.rpc(msg)
741 return reply
742
743
744
745 @ReturnMapping(NotifyWatchResult)
746 async def WatchForModelConfigChanges(self):
747 '''
748
749 Returns -> typing.Union[str, _ForwardRef('Error')]
750 '''
751 # map input types to rpc msg
752 _params = dict()
753 msg = dict(type='CAASAgent',
754 request='WatchForModelConfigChanges',
755 version=1,
756 params=_params)
757
758 reply = await self.rpc(msg)
759 return reply
760
761
762
763 class CAASFirewallerFacade(Type):
764 name = 'CAASFirewaller'
765 version = 1
766 schema = {'definitions': {'ApplicationGetConfigResults': {'additionalProperties': False,
767 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigResult'},
768 'type': 'array'}},
769 'required': ['Results'],
770 'type': 'object'},
771 'BoolResult': {'additionalProperties': False,
772 'properties': {'error': {'$ref': '#/definitions/Error'},
773 'result': {'type': 'boolean'}},
774 'required': ['result'],
775 'type': 'object'},
776 'BoolResults': {'additionalProperties': False,
777 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
778 'type': 'array'}},
779 'required': ['results'],
780 'type': 'object'},
781 'ConfigResult': {'additionalProperties': False,
782 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
783 'type': 'object'}},
784 'type': 'object'},
785 'error': {'$ref': '#/definitions/Error'}},
786 'required': ['config'],
787 'type': 'object'},
788 'Entities': {'additionalProperties': False,
789 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
790 'type': 'array'}},
791 'required': ['entities'],
792 'type': 'object'},
793 'Entity': {'additionalProperties': False,
794 'properties': {'tag': {'type': 'string'}},
795 'required': ['tag'],
796 'type': 'object'},
797 'Error': {'additionalProperties': False,
798 'properties': {'code': {'type': 'string'},
799 'info': {'$ref': '#/definitions/ErrorInfo'},
800 'message': {'type': 'string'}},
801 'required': ['message', 'code'],
802 'type': 'object'},
803 'ErrorInfo': {'additionalProperties': False,
804 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
805 'macaroon-path': {'type': 'string'}},
806 'type': 'object'},
807 'LifeResult': {'additionalProperties': False,
808 'properties': {'error': {'$ref': '#/definitions/Error'},
809 'life': {'type': 'string'}},
810 'required': ['life'],
811 'type': 'object'},
812 'LifeResults': {'additionalProperties': False,
813 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
814 'type': 'array'}},
815 'required': ['results'],
816 'type': 'object'},
817 'Macaroon': {'additionalProperties': False, 'type': 'object'},
818 'NotifyWatchResult': {'additionalProperties': False,
819 'properties': {'NotifyWatcherId': {'type': 'string'},
820 'error': {'$ref': '#/definitions/Error'}},
821 'required': ['NotifyWatcherId'],
822 'type': 'object'},
823 'NotifyWatchResults': {'additionalProperties': False,
824 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
825 'type': 'array'}},
826 'required': ['results'],
827 'type': 'object'},
828 'StringsWatchResult': {'additionalProperties': False,
829 'properties': {'changes': {'items': {'type': 'string'},
830 'type': 'array'},
831 'error': {'$ref': '#/definitions/Error'},
832 'watcher-id': {'type': 'string'}},
833 'required': ['watcher-id'],
834 'type': 'object'}},
835 'properties': {'ApplicationsConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
836 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}},
837 'type': 'object'},
838 'IsExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
839 'Result': {'$ref': '#/definitions/BoolResults'}},
840 'type': 'object'},
841 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
842 'Result': {'$ref': '#/definitions/LifeResults'}},
843 'type': 'object'},
844 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
845 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
846 'type': 'object'},
847 'WatchApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
848 'type': 'object'}},
849 'type': 'object'}
850
851
852 @ReturnMapping(ApplicationGetConfigResults)
853 async def ApplicationsConfig(self, entities):
854 '''
855 entities : typing.Sequence[~Entity]
856 Returns -> typing.Sequence[~ConfigResult]
857 '''
858 # map input types to rpc msg
859 _params = dict()
860 msg = dict(type='CAASFirewaller',
861 request='ApplicationsConfig',
862 version=1,
863 params=_params)
864 _params['entities'] = entities
865 reply = await self.rpc(msg)
866 return reply
867
868
869
870 @ReturnMapping(BoolResults)
871 async def IsExposed(self, entities):
872 '''
873 entities : typing.Sequence[~Entity]
874 Returns -> typing.Sequence[~BoolResult]
875 '''
876 # map input types to rpc msg
877 _params = dict()
878 msg = dict(type='CAASFirewaller',
879 request='IsExposed',
880 version=1,
881 params=_params)
882 _params['entities'] = entities
883 reply = await self.rpc(msg)
884 return reply
885
886
887
888 @ReturnMapping(LifeResults)
889 async def Life(self, entities):
890 '''
891 entities : typing.Sequence[~Entity]
892 Returns -> typing.Sequence[~LifeResult]
893 '''
894 # map input types to rpc msg
895 _params = dict()
896 msg = dict(type='CAASFirewaller',
897 request='Life',
898 version=1,
899 params=_params)
900 _params['entities'] = entities
901 reply = await self.rpc(msg)
902 return reply
903
904
905
906 @ReturnMapping(NotifyWatchResults)
907 async def Watch(self, entities):
908 '''
909 entities : typing.Sequence[~Entity]
910 Returns -> typing.Sequence[~NotifyWatchResult]
911 '''
912 # map input types to rpc msg
913 _params = dict()
914 msg = dict(type='CAASFirewaller',
915 request='Watch',
916 version=1,
917 params=_params)
918 _params['entities'] = entities
919 reply = await self.rpc(msg)
920 return reply
921
922
923
924 @ReturnMapping(StringsWatchResult)
925 async def WatchApplications(self):
926 '''
927
928 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
929 '''
930 # map input types to rpc msg
931 _params = dict()
932 msg = dict(type='CAASFirewaller',
933 request='WatchApplications',
934 version=1,
935 params=_params)
936
937 reply = await self.rpc(msg)
938 return reply
939
940
941
942 class CAASOperatorFacade(Type):
943 name = 'CAASOperator'
944 version = 1
945 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
946 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
947 'type': 'array'},
948 'type': 'array'}},
949 'required': ['servers'],
950 'type': 'object'},
951 'Address': {'additionalProperties': False,
952 'properties': {'scope': {'type': 'string'},
953 'space-name': {'type': 'string'},
954 'type': {'type': 'string'},
955 'value': {'type': 'string'}},
956 'required': ['value', 'type', 'scope'],
957 'type': 'object'},
958 'ApplicationCharm': {'additionalProperties': False,
959 'properties': {'charm-modified-version': {'type': 'integer'},
960 'force-upgrade': {'type': 'boolean'},
961 'sha256': {'type': 'string'},
962 'url': {'type': 'string'}},
963 'required': ['url',
964 'sha256',
965 'charm-modified-version'],
966 'type': 'object'},
967 'ApplicationCharmResult': {'additionalProperties': False,
968 'properties': {'error': {'$ref': '#/definitions/Error'},
969 'result': {'$ref': '#/definitions/ApplicationCharm'}},
970 'type': 'object'},
971 'ApplicationCharmResults': {'additionalProperties': False,
972 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmResult'},
973 'type': 'array'}},
974 'required': ['results'],
975 'type': 'object'},
976 'Binary': {'additionalProperties': False,
977 'properties': {'Arch': {'type': 'string'},
978 'Number': {'$ref': '#/definitions/Number'},
979 'Series': {'type': 'string'}},
980 'required': ['Number', 'Series', 'Arch'],
981 'type': 'object'},
982 'Entities': {'additionalProperties': False,
983 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
984 'type': 'array'}},
985 'required': ['entities'],
986 'type': 'object'},
987 'EntitiesVersion': {'additionalProperties': False,
988 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
989 'type': 'array'}},
990 'required': ['agent-tools'],
991 'type': 'object'},
992 'Entity': {'additionalProperties': False,
993 'properties': {'tag': {'type': 'string'}},
994 'required': ['tag'],
995 'type': 'object'},
996 'EntityStatusArgs': {'additionalProperties': False,
997 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
998 'type': 'object'}},
999 'type': 'object'},
1000 'info': {'type': 'string'},
1001 'status': {'type': 'string'},
1002 'tag': {'type': 'string'}},
1003 'required': ['tag',
1004 'status',
1005 'info',
1006 'data'],
1007 'type': 'object'},
1008 'EntityString': {'additionalProperties': False,
1009 'properties': {'tag': {'type': 'string'},
1010 'value': {'type': 'string'}},
1011 'required': ['tag', 'value'],
1012 'type': 'object'},
1013 'EntityVersion': {'additionalProperties': False,
1014 'properties': {'tag': {'type': 'string'},
1015 'tools': {'$ref': '#/definitions/Version'}},
1016 'required': ['tag', 'tools'],
1017 'type': 'object'},
1018 'Error': {'additionalProperties': False,
1019 'properties': {'code': {'type': 'string'},
1020 'info': {'$ref': '#/definitions/ErrorInfo'},
1021 'message': {'type': 'string'}},
1022 'required': ['message', 'code'],
1023 'type': 'object'},
1024 'ErrorInfo': {'additionalProperties': False,
1025 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1026 'macaroon-path': {'type': 'string'}},
1027 'type': 'object'},
1028 'ErrorResult': {'additionalProperties': False,
1029 'properties': {'error': {'$ref': '#/definitions/Error'}},
1030 'type': 'object'},
1031 'ErrorResults': {'additionalProperties': False,
1032 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1033 'type': 'array'}},
1034 'required': ['results'],
1035 'type': 'object'},
1036 'HostPort': {'additionalProperties': False,
1037 'properties': {'Address': {'$ref': '#/definitions/Address'},
1038 'port': {'type': 'integer'}},
1039 'required': ['Address', 'port'],
1040 'type': 'object'},
1041 'LifeResult': {'additionalProperties': False,
1042 'properties': {'error': {'$ref': '#/definitions/Error'},
1043 'life': {'type': 'string'}},
1044 'required': ['life'],
1045 'type': 'object'},
1046 'LifeResults': {'additionalProperties': False,
1047 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1048 'type': 'array'}},
1049 'required': ['results'],
1050 'type': 'object'},
1051 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1052 'ModelResult': {'additionalProperties': False,
1053 'properties': {'error': {'$ref': '#/definitions/Error'},
1054 'name': {'type': 'string'},
1055 'type': {'type': 'string'},
1056 'uuid': {'type': 'string'}},
1057 'required': ['name', 'uuid', 'type'],
1058 'type': 'object'},
1059 'NotifyWatchResult': {'additionalProperties': False,
1060 'properties': {'NotifyWatcherId': {'type': 'string'},
1061 'error': {'$ref': '#/definitions/Error'}},
1062 'required': ['NotifyWatcherId'],
1063 'type': 'object'},
1064 'NotifyWatchResults': {'additionalProperties': False,
1065 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1066 'type': 'array'}},
1067 'required': ['results'],
1068 'type': 'object'},
1069 'Number': {'additionalProperties': False,
1070 'properties': {'Build': {'type': 'integer'},
1071 'Major': {'type': 'integer'},
1072 'Minor': {'type': 'integer'},
1073 'Patch': {'type': 'integer'},
1074 'Tag': {'type': 'string'}},
1075 'required': ['Major',
1076 'Minor',
1077 'Tag',
1078 'Patch',
1079 'Build'],
1080 'type': 'object'},
1081 'SetPodSpecParams': {'additionalProperties': False,
1082 'properties': {'specs': {'items': {'$ref': '#/definitions/EntityString'},
1083 'type': 'array'}},
1084 'required': ['specs'],
1085 'type': 'object'},
1086 'SetStatus': {'additionalProperties': False,
1087 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1088 'type': 'array'}},
1089 'required': ['entities'],
1090 'type': 'object'},
1091 'StringResult': {'additionalProperties': False,
1092 'properties': {'error': {'$ref': '#/definitions/Error'},
1093 'result': {'type': 'string'}},
1094 'required': ['result'],
1095 'type': 'object'},
1096 'StringsResult': {'additionalProperties': False,
1097 'properties': {'error': {'$ref': '#/definitions/Error'},
1098 'result': {'items': {'type': 'string'},
1099 'type': 'array'}},
1100 'type': 'object'},
1101 'StringsWatchResult': {'additionalProperties': False,
1102 'properties': {'changes': {'items': {'type': 'string'},
1103 'type': 'array'},
1104 'error': {'$ref': '#/definitions/Error'},
1105 'watcher-id': {'type': 'string'}},
1106 'required': ['watcher-id'],
1107 'type': 'object'},
1108 'StringsWatchResults': {'additionalProperties': False,
1109 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
1110 'type': 'array'}},
1111 'required': ['results'],
1112 'type': 'object'},
1113 'Version': {'additionalProperties': False,
1114 'properties': {'version': {'$ref': '#/definitions/Binary'}},
1115 'required': ['version'],
1116 'type': 'object'}},
1117 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
1118 'type': 'object'},
1119 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
1120 'type': 'object'},
1121 'Charm': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1122 'Result': {'$ref': '#/definitions/ApplicationCharmResults'}},
1123 'type': 'object'},
1124 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
1125 'type': 'object'},
1126 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1127 'Result': {'$ref': '#/definitions/LifeResults'}},
1128 'type': 'object'},
1129 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1130 'type': 'object'},
1131 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1132 'Result': {'$ref': '#/definitions/ErrorResults'}},
1133 'type': 'object'},
1134 'SetPodSpec': {'properties': {'Params': {'$ref': '#/definitions/SetPodSpecParams'},
1135 'Result': {'$ref': '#/definitions/ErrorResults'}},
1136 'type': 'object'},
1137 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1138 'Result': {'$ref': '#/definitions/ErrorResults'}},
1139 'type': 'object'},
1140 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
1141 'Result': {'$ref': '#/definitions/ErrorResults'}},
1142 'type': 'object'},
1143 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1144 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1145 'type': 'object'},
1146 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1147 'type': 'object'},
1148 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1149 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1150 'type': 'object'}},
1151 'type': 'object'}
1152
1153
1154 @ReturnMapping(StringsResult)
1155 async def APIAddresses(self):
1156 '''
1157
1158 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
1159 '''
1160 # map input types to rpc msg
1161 _params = dict()
1162 msg = dict(type='CAASOperator',
1163 request='APIAddresses',
1164 version=1,
1165 params=_params)
1166
1167 reply = await self.rpc(msg)
1168 return reply
1169
1170
1171
1172 @ReturnMapping(APIHostPortsResult)
1173 async def APIHostPorts(self):
1174 '''
1175
1176 Returns -> typing.Sequence[~HostPort]
1177 '''
1178 # map input types to rpc msg
1179 _params = dict()
1180 msg = dict(type='CAASOperator',
1181 request='APIHostPorts',
1182 version=1,
1183 params=_params)
1184
1185 reply = await self.rpc(msg)
1186 return reply
1187
1188
1189
1190 @ReturnMapping(ApplicationCharmResults)
1191 async def Charm(self, entities):
1192 '''
1193 entities : typing.Sequence[~Entity]
1194 Returns -> typing.Sequence[~ApplicationCharmResult]
1195 '''
1196 # map input types to rpc msg
1197 _params = dict()
1198 msg = dict(type='CAASOperator',
1199 request='Charm',
1200 version=1,
1201 params=_params)
1202 _params['entities'] = entities
1203 reply = await self.rpc(msg)
1204 return reply
1205
1206
1207
1208 @ReturnMapping(ModelResult)
1209 async def CurrentModel(self):
1210 '''
1211
1212 Returns -> typing.Union[_ForwardRef('Error'), str]
1213 '''
1214 # map input types to rpc msg
1215 _params = dict()
1216 msg = dict(type='CAASOperator',
1217 request='CurrentModel',
1218 version=1,
1219 params=_params)
1220
1221 reply = await self.rpc(msg)
1222 return reply
1223
1224
1225
1226 @ReturnMapping(LifeResults)
1227 async def Life(self, entities):
1228 '''
1229 entities : typing.Sequence[~Entity]
1230 Returns -> typing.Sequence[~LifeResult]
1231 '''
1232 # map input types to rpc msg
1233 _params = dict()
1234 msg = dict(type='CAASOperator',
1235 request='Life',
1236 version=1,
1237 params=_params)
1238 _params['entities'] = entities
1239 reply = await self.rpc(msg)
1240 return reply
1241
1242
1243
1244 @ReturnMapping(StringResult)
1245 async def ModelUUID(self):
1246 '''
1247
1248 Returns -> typing.Union[_ForwardRef('Error'), str]
1249 '''
1250 # map input types to rpc msg
1251 _params = dict()
1252 msg = dict(type='CAASOperator',
1253 request='ModelUUID',
1254 version=1,
1255 params=_params)
1256
1257 reply = await self.rpc(msg)
1258 return reply
1259
1260
1261
1262 @ReturnMapping(ErrorResults)
1263 async def Remove(self, entities):
1264 '''
1265 entities : typing.Sequence[~Entity]
1266 Returns -> typing.Sequence[~ErrorResult]
1267 '''
1268 # map input types to rpc msg
1269 _params = dict()
1270 msg = dict(type='CAASOperator',
1271 request='Remove',
1272 version=1,
1273 params=_params)
1274 _params['entities'] = entities
1275 reply = await self.rpc(msg)
1276 return reply
1277
1278
1279
1280 @ReturnMapping(ErrorResults)
1281 async def SetPodSpec(self, specs):
1282 '''
1283 specs : typing.Sequence[~EntityString]
1284 Returns -> typing.Sequence[~ErrorResult]
1285 '''
1286 # map input types to rpc msg
1287 _params = dict()
1288 msg = dict(type='CAASOperator',
1289 request='SetPodSpec',
1290 version=1,
1291 params=_params)
1292 _params['specs'] = specs
1293 reply = await self.rpc(msg)
1294 return reply
1295
1296
1297
1298 @ReturnMapping(ErrorResults)
1299 async def SetStatus(self, entities):
1300 '''
1301 entities : typing.Sequence[~EntityStatusArgs]
1302 Returns -> typing.Sequence[~ErrorResult]
1303 '''
1304 # map input types to rpc msg
1305 _params = dict()
1306 msg = dict(type='CAASOperator',
1307 request='SetStatus',
1308 version=1,
1309 params=_params)
1310 _params['entities'] = entities
1311 reply = await self.rpc(msg)
1312 return reply
1313
1314
1315
1316 @ReturnMapping(ErrorResults)
1317 async def SetTools(self, agent_tools):
1318 '''
1319 agent_tools : typing.Sequence[~EntityVersion]
1320 Returns -> typing.Sequence[~ErrorResult]
1321 '''
1322 # map input types to rpc msg
1323 _params = dict()
1324 msg = dict(type='CAASOperator',
1325 request='SetTools',
1326 version=1,
1327 params=_params)
1328 _params['agent-tools'] = agent_tools
1329 reply = await self.rpc(msg)
1330 return reply
1331
1332
1333
1334 @ReturnMapping(NotifyWatchResults)
1335 async def Watch(self, entities):
1336 '''
1337 entities : typing.Sequence[~Entity]
1338 Returns -> typing.Sequence[~NotifyWatchResult]
1339 '''
1340 # map input types to rpc msg
1341 _params = dict()
1342 msg = dict(type='CAASOperator',
1343 request='Watch',
1344 version=1,
1345 params=_params)
1346 _params['entities'] = entities
1347 reply = await self.rpc(msg)
1348 return reply
1349
1350
1351
1352 @ReturnMapping(NotifyWatchResult)
1353 async def WatchAPIHostPorts(self):
1354 '''
1355
1356 Returns -> typing.Union[str, _ForwardRef('Error')]
1357 '''
1358 # map input types to rpc msg
1359 _params = dict()
1360 msg = dict(type='CAASOperator',
1361 request='WatchAPIHostPorts',
1362 version=1,
1363 params=_params)
1364
1365 reply = await self.rpc(msg)
1366 return reply
1367
1368
1369
1370 @ReturnMapping(StringsWatchResults)
1371 async def WatchUnits(self, entities):
1372 '''
1373 entities : typing.Sequence[~Entity]
1374 Returns -> typing.Sequence[~StringsWatchResult]
1375 '''
1376 # map input types to rpc msg
1377 _params = dict()
1378 msg = dict(type='CAASOperator',
1379 request='WatchUnits',
1380 version=1,
1381 params=_params)
1382 _params['entities'] = entities
1383 reply = await self.rpc(msg)
1384 return reply
1385
1386
1387
1388 class CAASOperatorProvisionerFacade(Type):
1389 name = 'CAASOperatorProvisioner'
1390 version = 1
1391 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
1392 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
1393 'type': 'array'},
1394 'type': 'array'}},
1395 'required': ['servers'],
1396 'type': 'object'},
1397 'Address': {'additionalProperties': False,
1398 'properties': {'scope': {'type': 'string'},
1399 'space-name': {'type': 'string'},
1400 'type': {'type': 'string'},
1401 'value': {'type': 'string'}},
1402 'required': ['value', 'type', 'scope'],
1403 'type': 'object'},
1404 'Entities': {'additionalProperties': False,
1405 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1406 'type': 'array'}},
1407 'required': ['entities'],
1408 'type': 'object'},
1409 'Entity': {'additionalProperties': False,
1410 'properties': {'tag': {'type': 'string'}},
1411 'required': ['tag'],
1412 'type': 'object'},
1413 'EntityPassword': {'additionalProperties': False,
1414 'properties': {'password': {'type': 'string'},
1415 'tag': {'type': 'string'}},
1416 'required': ['tag', 'password'],
1417 'type': 'object'},
1418 'EntityPasswords': {'additionalProperties': False,
1419 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
1420 'type': 'array'}},
1421 'required': ['changes'],
1422 'type': 'object'},
1423 'Error': {'additionalProperties': False,
1424 'properties': {'code': {'type': 'string'},
1425 'info': {'$ref': '#/definitions/ErrorInfo'},
1426 'message': {'type': 'string'}},
1427 'required': ['message', 'code'],
1428 'type': 'object'},
1429 'ErrorInfo': {'additionalProperties': False,
1430 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1431 'macaroon-path': {'type': 'string'}},
1432 'type': 'object'},
1433 'ErrorResult': {'additionalProperties': False,
1434 'properties': {'error': {'$ref': '#/definitions/Error'}},
1435 'type': 'object'},
1436 'ErrorResults': {'additionalProperties': False,
1437 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1438 'type': 'array'}},
1439 'required': ['results'],
1440 'type': 'object'},
1441 'HostPort': {'additionalProperties': False,
1442 'properties': {'Address': {'$ref': '#/definitions/Address'},
1443 'port': {'type': 'integer'}},
1444 'required': ['Address', 'port'],
1445 'type': 'object'},
1446 'KubernetesFilesystemAttachmentParams': {'additionalProperties': False,
1447 'properties': {'mount-point': {'type': 'string'},
1448 'provider': {'type': 'string'},
1449 'read-only': {'type': 'boolean'}},
1450 'required': ['provider'],
1451 'type': 'object'},
1452 'KubernetesFilesystemParams': {'additionalProperties': False,
1453 'properties': {'attachment': {'$ref': '#/definitions/KubernetesFilesystemAttachmentParams'},
1454 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
1455 'type': 'object'}},
1456 'type': 'object'},
1457 'provider': {'type': 'string'},
1458 'size': {'type': 'integer'},
1459 'storagename': {'type': 'string'},
1460 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1461 'type': 'object'}},
1462 'required': ['storagename',
1463 'size',
1464 'provider'],
1465 'type': 'object'},
1466 'LifeResult': {'additionalProperties': False,
1467 'properties': {'error': {'$ref': '#/definitions/Error'},
1468 'life': {'type': 'string'}},
1469 'required': ['life'],
1470 'type': 'object'},
1471 'LifeResults': {'additionalProperties': False,
1472 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1473 'type': 'array'}},
1474 'required': ['results'],
1475 'type': 'object'},
1476 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1477 'NotifyWatchResult': {'additionalProperties': False,
1478 'properties': {'NotifyWatcherId': {'type': 'string'},
1479 'error': {'$ref': '#/definitions/Error'}},
1480 'required': ['NotifyWatcherId'],
1481 'type': 'object'},
1482 'Number': {'additionalProperties': False,
1483 'properties': {'Build': {'type': 'integer'},
1484 'Major': {'type': 'integer'},
1485 'Minor': {'type': 'integer'},
1486 'Patch': {'type': 'integer'},
1487 'Tag': {'type': 'string'}},
1488 'required': ['Major',
1489 'Minor',
1490 'Tag',
1491 'Patch',
1492 'Build'],
1493 'type': 'object'},
1494 'OperatorProvisioningInfo': {'additionalProperties': False,
1495 'properties': {'api-addresses': {'items': {'type': 'string'},
1496 'type': 'array'},
1497 'charm-storage': {'$ref': '#/definitions/KubernetesFilesystemParams'},
1498 'image-path': {'type': 'string'},
1499 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1500 'type': 'object'},
1501 'version': {'$ref': '#/definitions/Number'}},
1502 'required': ['image-path',
1503 'version',
1504 'api-addresses',
1505 'charm-storage'],
1506 'type': 'object'},
1507 'StringResult': {'additionalProperties': False,
1508 'properties': {'error': {'$ref': '#/definitions/Error'},
1509 'result': {'type': 'string'}},
1510 'required': ['result'],
1511 'type': 'object'},
1512 'StringsResult': {'additionalProperties': False,
1513 'properties': {'error': {'$ref': '#/definitions/Error'},
1514 'result': {'items': {'type': 'string'},
1515 'type': 'array'}},
1516 'type': 'object'},
1517 'StringsWatchResult': {'additionalProperties': False,
1518 'properties': {'changes': {'items': {'type': 'string'},
1519 'type': 'array'},
1520 'error': {'$ref': '#/definitions/Error'},
1521 'watcher-id': {'type': 'string'}},
1522 'required': ['watcher-id'],
1523 'type': 'object'}},
1524 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
1525 'type': 'object'},
1526 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
1527 'type': 'object'},
1528 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1529 'Result': {'$ref': '#/definitions/LifeResults'}},
1530 'type': 'object'},
1531 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
1532 'type': 'object'},
1533 'OperatorProvisioningInfo': {'properties': {'Result': {'$ref': '#/definitions/OperatorProvisioningInfo'}},
1534 'type': 'object'},
1535 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
1536 'Result': {'$ref': '#/definitions/ErrorResults'}},
1537 'type': 'object'},
1538 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1539 'type': 'object'},
1540 'WatchApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1541 'type': 'object'}},
1542 'type': 'object'}
1543
1544
1545 @ReturnMapping(StringsResult)
1546 async def APIAddresses(self):
1547 '''
1548
1549 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
1550 '''
1551 # map input types to rpc msg
1552 _params = dict()
1553 msg = dict(type='CAASOperatorProvisioner',
1554 request='APIAddresses',
1555 version=1,
1556 params=_params)
1557
1558 reply = await self.rpc(msg)
1559 return reply
1560
1561
1562
1563 @ReturnMapping(APIHostPortsResult)
1564 async def APIHostPorts(self):
1565 '''
1566
1567 Returns -> typing.Sequence[~HostPort]
1568 '''
1569 # map input types to rpc msg
1570 _params = dict()
1571 msg = dict(type='CAASOperatorProvisioner',
1572 request='APIHostPorts',
1573 version=1,
1574 params=_params)
1575
1576 reply = await self.rpc(msg)
1577 return reply
1578
1579
1580
1581 @ReturnMapping(LifeResults)
1582 async def Life(self, entities):
1583 '''
1584 entities : typing.Sequence[~Entity]
1585 Returns -> typing.Sequence[~LifeResult]
1586 '''
1587 # map input types to rpc msg
1588 _params = dict()
1589 msg = dict(type='CAASOperatorProvisioner',
1590 request='Life',
1591 version=1,
1592 params=_params)
1593 _params['entities'] = entities
1594 reply = await self.rpc(msg)
1595 return reply
1596
1597
1598
1599 @ReturnMapping(StringResult)
1600 async def ModelUUID(self):
1601 '''
1602
1603 Returns -> typing.Union[_ForwardRef('Error'), str]
1604 '''
1605 # map input types to rpc msg
1606 _params = dict()
1607 msg = dict(type='CAASOperatorProvisioner',
1608 request='ModelUUID',
1609 version=1,
1610 params=_params)
1611
1612 reply = await self.rpc(msg)
1613 return reply
1614
1615
1616
1617 @ReturnMapping(OperatorProvisioningInfo)
1618 async def OperatorProvisioningInfo(self):
1619 '''
1620
1621 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('KubernetesFilesystemParams'), str, typing.Mapping[str, str], _ForwardRef('Number')]
1622 '''
1623 # map input types to rpc msg
1624 _params = dict()
1625 msg = dict(type='CAASOperatorProvisioner',
1626 request='OperatorProvisioningInfo',
1627 version=1,
1628 params=_params)
1629
1630 reply = await self.rpc(msg)
1631 return reply
1632
1633
1634
1635 @ReturnMapping(ErrorResults)
1636 async def SetPasswords(self, changes):
1637 '''
1638 changes : typing.Sequence[~EntityPassword]
1639 Returns -> typing.Sequence[~ErrorResult]
1640 '''
1641 # map input types to rpc msg
1642 _params = dict()
1643 msg = dict(type='CAASOperatorProvisioner',
1644 request='SetPasswords',
1645 version=1,
1646 params=_params)
1647 _params['changes'] = changes
1648 reply = await self.rpc(msg)
1649 return reply
1650
1651
1652
1653 @ReturnMapping(NotifyWatchResult)
1654 async def WatchAPIHostPorts(self):
1655 '''
1656
1657 Returns -> typing.Union[str, _ForwardRef('Error')]
1658 '''
1659 # map input types to rpc msg
1660 _params = dict()
1661 msg = dict(type='CAASOperatorProvisioner',
1662 request='WatchAPIHostPorts',
1663 version=1,
1664 params=_params)
1665
1666 reply = await self.rpc(msg)
1667 return reply
1668
1669
1670
1671 @ReturnMapping(StringsWatchResult)
1672 async def WatchApplications(self):
1673 '''
1674
1675 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
1676 '''
1677 # map input types to rpc msg
1678 _params = dict()
1679 msg = dict(type='CAASOperatorProvisioner',
1680 request='WatchApplications',
1681 version=1,
1682 params=_params)
1683
1684 reply = await self.rpc(msg)
1685 return reply
1686
1687
1688
1689 class CAASUnitProvisionerFacade(Type):
1690 name = 'CAASUnitProvisioner'
1691 version = 1
1692 schema = {'definitions': {'Address': {'additionalProperties': False,
1693 'properties': {'scope': {'type': 'string'},
1694 'space-name': {'type': 'string'},
1695 'type': {'type': 'string'},
1696 'value': {'type': 'string'}},
1697 'required': ['value', 'type', 'scope'],
1698 'type': 'object'},
1699 'ApplicationGetConfigResults': {'additionalProperties': False,
1700 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigResult'},
1701 'type': 'array'}},
1702 'required': ['Results'],
1703 'type': 'object'},
1704 'ApplicationUnitParams': {'additionalProperties': False,
1705 'properties': {'address': {'type': 'string'},
1706 'data': {'patternProperties': {'.*': {'additionalProperties': True,
1707 'type': 'object'}},
1708 'type': 'object'},
1709 'filesystem-info': {'items': {'$ref': '#/definitions/KubernetesFilesystemInfo'},
1710 'type': 'array'},
1711 'info': {'type': 'string'},
1712 'ports': {'items': {'type': 'string'},
1713 'type': 'array'},
1714 'provider-id': {'type': 'string'},
1715 'status': {'type': 'string'},
1716 'unit-tag': {'type': 'string'}},
1717 'required': ['provider-id',
1718 'unit-tag',
1719 'address',
1720 'ports',
1721 'status',
1722 'info'],
1723 'type': 'object'},
1724 'ConfigResult': {'additionalProperties': False,
1725 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1726 'type': 'object'}},
1727 'type': 'object'},
1728 'error': {'$ref': '#/definitions/Error'}},
1729 'required': ['config'],
1730 'type': 'object'},
1731 'Entities': {'additionalProperties': False,
1732 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1733 'type': 'array'}},
1734 'required': ['entities'],
1735 'type': 'object'},
1736 'Entity': {'additionalProperties': False,
1737 'properties': {'tag': {'type': 'string'}},
1738 'required': ['tag'],
1739 'type': 'object'},
1740 'EntityStatusArgs': {'additionalProperties': False,
1741 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1742 'type': 'object'}},
1743 'type': 'object'},
1744 'info': {'type': 'string'},
1745 'status': {'type': 'string'},
1746 'tag': {'type': 'string'}},
1747 'required': ['tag',
1748 'status',
1749 'info',
1750 'data'],
1751 'type': 'object'},
1752 'Error': {'additionalProperties': False,
1753 'properties': {'code': {'type': 'string'},
1754 'info': {'$ref': '#/definitions/ErrorInfo'},
1755 'message': {'type': 'string'}},
1756 'required': ['message', 'code'],
1757 'type': 'object'},
1758 'ErrorInfo': {'additionalProperties': False,
1759 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1760 'macaroon-path': {'type': 'string'}},
1761 'type': 'object'},
1762 'ErrorResult': {'additionalProperties': False,
1763 'properties': {'error': {'$ref': '#/definitions/Error'}},
1764 'type': 'object'},
1765 'ErrorResults': {'additionalProperties': False,
1766 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1767 'type': 'array'}},
1768 'required': ['results'],
1769 'type': 'object'},
1770 'IntResult': {'additionalProperties': False,
1771 'properties': {'error': {'$ref': '#/definitions/Error'},
1772 'result': {'type': 'integer'}},
1773 'required': ['result'],
1774 'type': 'object'},
1775 'IntResults': {'additionalProperties': False,
1776 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
1777 'type': 'array'}},
1778 'required': ['results'],
1779 'type': 'object'},
1780 'KubernetesDeviceParams': {'additionalProperties': False,
1781 'properties': {'Attributes': {'patternProperties': {'.*': {'type': 'string'}},
1782 'type': 'object'},
1783 'Count': {'type': 'integer'},
1784 'Type': {'type': 'string'}},
1785 'required': ['Type',
1786 'Count',
1787 'Attributes'],
1788 'type': 'object'},
1789 'KubernetesFilesystemAttachmentParams': {'additionalProperties': False,
1790 'properties': {'mount-point': {'type': 'string'},
1791 'provider': {'type': 'string'},
1792 'read-only': {'type': 'boolean'}},
1793 'required': ['provider'],
1794 'type': 'object'},
1795 'KubernetesFilesystemInfo': {'additionalProperties': False,
1796 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1797 'type': 'object'}},
1798 'type': 'object'},
1799 'filesystem-id': {'type': 'string'},
1800 'info': {'type': 'string'},
1801 'mount-point': {'type': 'string'},
1802 'pool': {'type': 'string'},
1803 'read-only': {'type': 'boolean'},
1804 'size': {'type': 'integer'},
1805 'status': {'type': 'string'},
1806 'storagename': {'type': 'string'},
1807 'volume': {'$ref': '#/definitions/KubernetesVolumeInfo'}},
1808 'required': ['storagename',
1809 'pool',
1810 'size',
1811 'filesystem-id',
1812 'status',
1813 'info',
1814 'volume'],
1815 'type': 'object'},
1816 'KubernetesFilesystemParams': {'additionalProperties': False,
1817 'properties': {'attachment': {'$ref': '#/definitions/KubernetesFilesystemAttachmentParams'},
1818 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
1819 'type': 'object'}},
1820 'type': 'object'},
1821 'provider': {'type': 'string'},
1822 'size': {'type': 'integer'},
1823 'storagename': {'type': 'string'},
1824 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1825 'type': 'object'}},
1826 'required': ['storagename',
1827 'size',
1828 'provider'],
1829 'type': 'object'},
1830 'KubernetesProvisioningInfo': {'additionalProperties': False,
1831 'properties': {'constraints': {'$ref': '#/definitions/Value'},
1832 'devices': {'items': {'$ref': '#/definitions/KubernetesDeviceParams'},
1833 'type': 'array'},
1834 'filesystems': {'items': {'$ref': '#/definitions/KubernetesFilesystemParams'},
1835 'type': 'array'},
1836 'placement': {'type': 'string'},
1837 'pod-spec': {'type': 'string'},
1838 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1839 'type': 'object'},
1840 'volumes': {'items': {'$ref': '#/definitions/KubernetesVolumeParams'},
1841 'type': 'array'}},
1842 'required': ['pod-spec',
1843 'constraints'],
1844 'type': 'object'},
1845 'KubernetesProvisioningInfoResult': {'additionalProperties': False,
1846 'properties': {'error': {'$ref': '#/definitions/Error'},
1847 'result': {'$ref': '#/definitions/KubernetesProvisioningInfo'}},
1848 'required': ['result'],
1849 'type': 'object'},
1850 'KubernetesProvisioningInfoResults': {'additionalProperties': False,
1851 'properties': {'results': {'items': {'$ref': '#/definitions/KubernetesProvisioningInfoResult'},
1852 'type': 'array'}},
1853 'required': ['results'],
1854 'type': 'object'},
1855 'KubernetesVolumeAttachmentParams': {'additionalProperties': False,
1856 'properties': {'provider': {'type': 'string'},
1857 'read-only': {'type': 'boolean'}},
1858 'required': ['provider'],
1859 'type': 'object'},
1860 'KubernetesVolumeInfo': {'additionalProperties': False,
1861 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1862 'type': 'object'}},
1863 'type': 'object'},
1864 'info': {'type': 'string'},
1865 'persistent': {'type': 'boolean'},
1866 'pool': {'type': 'string'},
1867 'size': {'type': 'integer'},
1868 'status': {'type': 'string'},
1869 'volume-id': {'type': 'string'}},
1870 'required': ['volume-id',
1871 'size',
1872 'persistent',
1873 'status',
1874 'info'],
1875 'type': 'object'},
1876 'KubernetesVolumeParams': {'additionalProperties': False,
1877 'properties': {'attachment': {'$ref': '#/definitions/KubernetesVolumeAttachmentParams'},
1878 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
1879 'type': 'object'}},
1880 'type': 'object'},
1881 'provider': {'type': 'string'},
1882 'size': {'type': 'integer'},
1883 'storagename': {'type': 'string'},
1884 'tags': {'patternProperties': {'.*': {'type': 'string'}},
1885 'type': 'object'}},
1886 'required': ['storagename',
1887 'size',
1888 'provider'],
1889 'type': 'object'},
1890 'LifeResult': {'additionalProperties': False,
1891 'properties': {'error': {'$ref': '#/definitions/Error'},
1892 'life': {'type': 'string'}},
1893 'required': ['life'],
1894 'type': 'object'},
1895 'LifeResults': {'additionalProperties': False,
1896 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1897 'type': 'array'}},
1898 'required': ['results'],
1899 'type': 'object'},
1900 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1901 'NotifyWatchResult': {'additionalProperties': False,
1902 'properties': {'NotifyWatcherId': {'type': 'string'},
1903 'error': {'$ref': '#/definitions/Error'}},
1904 'required': ['NotifyWatcherId'],
1905 'type': 'object'},
1906 'NotifyWatchResults': {'additionalProperties': False,
1907 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1908 'type': 'array'}},
1909 'required': ['results'],
1910 'type': 'object'},
1911 'SetStatus': {'additionalProperties': False,
1912 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1913 'type': 'array'}},
1914 'required': ['entities'],
1915 'type': 'object'},
1916 'StringsWatchResult': {'additionalProperties': False,
1917 'properties': {'changes': {'items': {'type': 'string'},
1918 'type': 'array'},
1919 'error': {'$ref': '#/definitions/Error'},
1920 'watcher-id': {'type': 'string'}},
1921 'required': ['watcher-id'],
1922 'type': 'object'},
1923 'UpdateApplicationServiceArg': {'additionalProperties': False,
1924 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1925 'type': 'array'},
1926 'application-tag': {'type': 'string'},
1927 'provider-id': {'type': 'string'}},
1928 'required': ['application-tag',
1929 'provider-id',
1930 'addresses'],
1931 'type': 'object'},
1932 'UpdateApplicationServiceArgs': {'additionalProperties': False,
1933 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateApplicationServiceArg'},
1934 'type': 'array'}},
1935 'required': ['args'],
1936 'type': 'object'},
1937 'UpdateApplicationUnitArgs': {'additionalProperties': False,
1938 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateApplicationUnits'},
1939 'type': 'array'}},
1940 'required': ['args'],
1941 'type': 'object'},
1942 'UpdateApplicationUnits': {'additionalProperties': False,
1943 'properties': {'application-tag': {'type': 'string'},
1944 'units': {'items': {'$ref': '#/definitions/ApplicationUnitParams'},
1945 'type': 'array'}},
1946 'required': ['application-tag',
1947 'units'],
1948 'type': 'object'},
1949 'Value': {'additionalProperties': False,
1950 'properties': {'arch': {'type': 'string'},
1951 'container': {'type': 'string'},
1952 'cores': {'type': 'integer'},
1953 'cpu-power': {'type': 'integer'},
1954 'instance-type': {'type': 'string'},
1955 'mem': {'type': 'integer'},
1956 'root-disk': {'type': 'integer'},
1957 'spaces': {'items': {'type': 'string'},
1958 'type': 'array'},
1959 'tags': {'items': {'type': 'string'},
1960 'type': 'array'},
1961 'virt-type': {'type': 'string'},
1962 'zones': {'items': {'type': 'string'},
1963 'type': 'array'}},
1964 'type': 'object'}},
1965 'properties': {'ApplicationsConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1966 'Result': {'$ref': '#/definitions/ApplicationGetConfigResults'}},
1967 'type': 'object'},
1968 'ApplicationsScale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1969 'Result': {'$ref': '#/definitions/IntResults'}},
1970 'type': 'object'},
1971 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1972 'Result': {'$ref': '#/definitions/LifeResults'}},
1973 'type': 'object'},
1974 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1975 'Result': {'$ref': '#/definitions/KubernetesProvisioningInfoResults'}},
1976 'type': 'object'},
1977 'SetOperatorStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1978 'Result': {'$ref': '#/definitions/ErrorResults'}},
1979 'type': 'object'},
1980 'UpdateApplicationsService': {'properties': {'Params': {'$ref': '#/definitions/UpdateApplicationServiceArgs'},
1981 'Result': {'$ref': '#/definitions/ErrorResults'}},
1982 'type': 'object'},
1983 'UpdateApplicationsUnits': {'properties': {'Params': {'$ref': '#/definitions/UpdateApplicationUnitArgs'},
1984 'Result': {'$ref': '#/definitions/ErrorResults'}},
1985 'type': 'object'},
1986 'WatchApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1987 'type': 'object'},
1988 'WatchApplicationsScale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1989 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1990 'type': 'object'},
1991 'WatchPodSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1992 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1993 'type': 'object'}},
1994 'type': 'object'}
1995
1996
1997 @ReturnMapping(ApplicationGetConfigResults)
1998 async def ApplicationsConfig(self, entities):
1999 '''
2000 entities : typing.Sequence[~Entity]
2001 Returns -> typing.Sequence[~ConfigResult]
2002 '''
2003 # map input types to rpc msg
2004 _params = dict()
2005 msg = dict(type='CAASUnitProvisioner',
2006 request='ApplicationsConfig',
2007 version=1,
2008 params=_params)
2009 _params['entities'] = entities
2010 reply = await self.rpc(msg)
2011 return reply
2012
2013
2014
2015 @ReturnMapping(IntResults)
2016 async def ApplicationsScale(self, entities):
2017 '''
2018 entities : typing.Sequence[~Entity]
2019 Returns -> typing.Sequence[~IntResult]
2020 '''
2021 # map input types to rpc msg
2022 _params = dict()
2023 msg = dict(type='CAASUnitProvisioner',
2024 request='ApplicationsScale',
2025 version=1,
2026 params=_params)
2027 _params['entities'] = entities
2028 reply = await self.rpc(msg)
2029 return reply
2030
2031
2032
2033 @ReturnMapping(LifeResults)
2034 async def Life(self, entities):
2035 '''
2036 entities : typing.Sequence[~Entity]
2037 Returns -> typing.Sequence[~LifeResult]
2038 '''
2039 # map input types to rpc msg
2040 _params = dict()
2041 msg = dict(type='CAASUnitProvisioner',
2042 request='Life',
2043 version=1,
2044 params=_params)
2045 _params['entities'] = entities
2046 reply = await self.rpc(msg)
2047 return reply
2048
2049
2050
2051 @ReturnMapping(KubernetesProvisioningInfoResults)
2052 async def ProvisioningInfo(self, entities):
2053 '''
2054 entities : typing.Sequence[~Entity]
2055 Returns -> typing.Sequence[~KubernetesProvisioningInfoResult]
2056 '''
2057 # map input types to rpc msg
2058 _params = dict()
2059 msg = dict(type='CAASUnitProvisioner',
2060 request='ProvisioningInfo',
2061 version=1,
2062 params=_params)
2063 _params['entities'] = entities
2064 reply = await self.rpc(msg)
2065 return reply
2066
2067
2068
2069 @ReturnMapping(ErrorResults)
2070 async def SetOperatorStatus(self, entities):
2071 '''
2072 entities : typing.Sequence[~EntityStatusArgs]
2073 Returns -> typing.Sequence[~ErrorResult]
2074 '''
2075 # map input types to rpc msg
2076 _params = dict()
2077 msg = dict(type='CAASUnitProvisioner',
2078 request='SetOperatorStatus',
2079 version=1,
2080 params=_params)
2081 _params['entities'] = entities
2082 reply = await self.rpc(msg)
2083 return reply
2084
2085
2086
2087 @ReturnMapping(ErrorResults)
2088 async def UpdateApplicationsService(self, args):
2089 '''
2090 args : typing.Sequence[~UpdateApplicationServiceArg]
2091 Returns -> typing.Sequence[~ErrorResult]
2092 '''
2093 # map input types to rpc msg
2094 _params = dict()
2095 msg = dict(type='CAASUnitProvisioner',
2096 request='UpdateApplicationsService',
2097 version=1,
2098 params=_params)
2099 _params['args'] = args
2100 reply = await self.rpc(msg)
2101 return reply
2102
2103
2104
2105 @ReturnMapping(ErrorResults)
2106 async def UpdateApplicationsUnits(self, args):
2107 '''
2108 args : typing.Sequence[~UpdateApplicationUnits]
2109 Returns -> typing.Sequence[~ErrorResult]
2110 '''
2111 # map input types to rpc msg
2112 _params = dict()
2113 msg = dict(type='CAASUnitProvisioner',
2114 request='UpdateApplicationsUnits',
2115 version=1,
2116 params=_params)
2117 _params['args'] = args
2118 reply = await self.rpc(msg)
2119 return reply
2120
2121
2122
2123 @ReturnMapping(StringsWatchResult)
2124 async def WatchApplications(self):
2125 '''
2126
2127 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
2128 '''
2129 # map input types to rpc msg
2130 _params = dict()
2131 msg = dict(type='CAASUnitProvisioner',
2132 request='WatchApplications',
2133 version=1,
2134 params=_params)
2135
2136 reply = await self.rpc(msg)
2137 return reply
2138
2139
2140
2141 @ReturnMapping(NotifyWatchResults)
2142 async def WatchApplicationsScale(self, entities):
2143 '''
2144 entities : typing.Sequence[~Entity]
2145 Returns -> typing.Sequence[~NotifyWatchResult]
2146 '''
2147 # map input types to rpc msg
2148 _params = dict()
2149 msg = dict(type='CAASUnitProvisioner',
2150 request='WatchApplicationsScale',
2151 version=1,
2152 params=_params)
2153 _params['entities'] = entities
2154 reply = await self.rpc(msg)
2155 return reply
2156
2157
2158
2159 @ReturnMapping(NotifyWatchResults)
2160 async def WatchPodSpec(self, entities):
2161 '''
2162 entities : typing.Sequence[~Entity]
2163 Returns -> typing.Sequence[~NotifyWatchResult]
2164 '''
2165 # map input types to rpc msg
2166 _params = dict()
2167 msg = dict(type='CAASUnitProvisioner',
2168 request='WatchPodSpec',
2169 version=1,
2170 params=_params)
2171 _params['entities'] = entities
2172 reply = await self.rpc(msg)
2173 return reply
2174
2175
2176
2177 class ClientFacade(Type):
2178 name = 'Client'
2179 version = 1
2180 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
2181 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2182 'type': 'array'},
2183 'type': 'array'}},
2184 'required': ['servers'],
2185 'type': 'object'},
2186 'AddCharm': {'additionalProperties': False,
2187 'properties': {'channel': {'type': 'string'},
2188 'url': {'type': 'string'}},
2189 'required': ['url', 'channel'],
2190 'type': 'object'},
2191 'AddCharmWithAuthorization': {'additionalProperties': False,
2192 'properties': {'channel': {'type': 'string'},
2193 'macaroon': {'$ref': '#/definitions/Macaroon'},
2194 'url': {'type': 'string'}},
2195 'required': ['url',
2196 'channel',
2197 'macaroon'],
2198 'type': 'object'},
2199 'AddMachineParams': {'additionalProperties': False,
2200 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
2201 'type': 'array'},
2202 'constraints': {'$ref': '#/definitions/Value'},
2203 'container-type': {'type': 'string'},
2204 'disks': {'items': {'$ref': '#/definitions/Constraints'},
2205 'type': 'array'},
2206 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2207 'instance-id': {'type': 'string'},
2208 'jobs': {'items': {'type': 'string'},
2209 'type': 'array'},
2210 'nonce': {'type': 'string'},
2211 'parent-id': {'type': 'string'},
2212 'placement': {'$ref': '#/definitions/Placement'},
2213 'series': {'type': 'string'}},
2214 'required': ['series',
2215 'constraints',
2216 'jobs',
2217 'parent-id',
2218 'container-type',
2219 'instance-id',
2220 'nonce',
2221 'hardware-characteristics',
2222 'addresses'],
2223 'type': 'object'},
2224 'AddMachines': {'additionalProperties': False,
2225 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
2226 'type': 'array'}},
2227 'required': ['params'],
2228 'type': 'object'},
2229 'AddMachinesResult': {'additionalProperties': False,
2230 'properties': {'error': {'$ref': '#/definitions/Error'},
2231 'machine': {'type': 'string'}},
2232 'required': ['machine'],
2233 'type': 'object'},
2234 'AddMachinesResults': {'additionalProperties': False,
2235 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
2236 'type': 'array'}},
2237 'required': ['machines'],
2238 'type': 'object'},
2239 'Address': {'additionalProperties': False,
2240 'properties': {'scope': {'type': 'string'},
2241 'space-name': {'type': 'string'},
2242 'type': {'type': 'string'},
2243 'value': {'type': 'string'}},
2244 'required': ['value', 'type', 'scope'],
2245 'type': 'object'},
2246 'AgentVersionResult': {'additionalProperties': False,
2247 'properties': {'version': {'$ref': '#/definitions/Number'}},
2248 'required': ['version'],
2249 'type': 'object'},
2250 'AllWatcherId': {'additionalProperties': False,
2251 'properties': {'watcher-id': {'type': 'string'}},
2252 'required': ['watcher-id'],
2253 'type': 'object'},
2254 'ApplicationStatus': {'additionalProperties': False,
2255 'properties': {'can-upgrade-to': {'type': 'string'},
2256 'charm': {'type': 'string'},
2257 'err': {'additionalProperties': True,
2258 'type': 'object'},
2259 'exposed': {'type': 'boolean'},
2260 'life': {'type': 'string'},
2261 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
2262 'type': 'object'},
2263 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
2264 'type': 'array'}},
2265 'type': 'object'},
2266 'series': {'type': 'string'},
2267 'status': {'$ref': '#/definitions/DetailedStatus'},
2268 'subordinate-to': {'items': {'type': 'string'},
2269 'type': 'array'},
2270 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
2271 'type': 'object'},
2272 'workload-version': {'type': 'string'}},
2273 'required': ['charm',
2274 'series',
2275 'exposed',
2276 'life',
2277 'relations',
2278 'can-upgrade-to',
2279 'subordinate-to',
2280 'units',
2281 'meter-statuses',
2282 'status',
2283 'workload-version'],
2284 'type': 'object'},
2285 'Binary': {'additionalProperties': False,
2286 'properties': {'Arch': {'type': 'string'},
2287 'Number': {'$ref': '#/definitions/Number'},
2288 'Series': {'type': 'string'}},
2289 'required': ['Number', 'Series', 'Arch'],
2290 'type': 'object'},
2291 'BundleChange': {'additionalProperties': False,
2292 'properties': {'args': {'items': {'additionalProperties': True,
2293 'type': 'object'},
2294 'type': 'array'},
2295 'id': {'type': 'string'},
2296 'method': {'type': 'string'},
2297 'requires': {'items': {'type': 'string'},
2298 'type': 'array'}},
2299 'required': ['id',
2300 'method',
2301 'args',
2302 'requires'],
2303 'type': 'object'},
2304 'BundleChangesParams': {'additionalProperties': False,
2305 'properties': {'yaml': {'type': 'string'}},
2306 'required': ['yaml'],
2307 'type': 'object'},
2308 'BundleChangesResults': {'additionalProperties': False,
2309 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
2310 'type': 'array'},
2311 'errors': {'items': {'type': 'string'},
2312 'type': 'array'}},
2313 'type': 'object'},
2314 'BytesResult': {'additionalProperties': False,
2315 'properties': {'result': {'items': {'type': 'integer'},
2316 'type': 'array'}},
2317 'required': ['result'],
2318 'type': 'object'},
2319 'ConfigValue': {'additionalProperties': False,
2320 'properties': {'source': {'type': 'string'},
2321 'value': {'additionalProperties': True,
2322 'type': 'object'}},
2323 'required': ['value', 'source'],
2324 'type': 'object'},
2325 'Constraints': {'additionalProperties': False,
2326 'properties': {'Count': {'type': 'integer'},
2327 'Pool': {'type': 'string'},
2328 'Size': {'type': 'integer'}},
2329 'required': ['Pool', 'Size', 'Count'],
2330 'type': 'object'},
2331 'DestroyMachines': {'additionalProperties': False,
2332 'properties': {'force': {'type': 'boolean'},
2333 'machine-names': {'items': {'type': 'string'},
2334 'type': 'array'}},
2335 'required': ['machine-names', 'force'],
2336 'type': 'object'},
2337 'DetailedStatus': {'additionalProperties': False,
2338 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2339 'type': 'object'}},
2340 'type': 'object'},
2341 'err': {'additionalProperties': True,
2342 'type': 'object'},
2343 'info': {'type': 'string'},
2344 'kind': {'type': 'string'},
2345 'life': {'type': 'string'},
2346 'since': {'format': 'date-time',
2347 'type': 'string'},
2348 'status': {'type': 'string'},
2349 'version': {'type': 'string'}},
2350 'required': ['status',
2351 'info',
2352 'data',
2353 'since',
2354 'kind',
2355 'version',
2356 'life'],
2357 'type': 'object'},
2358 'EndpointStatus': {'additionalProperties': False,
2359 'properties': {'application': {'type': 'string'},
2360 'name': {'type': 'string'},
2361 'role': {'type': 'string'},
2362 'subordinate': {'type': 'boolean'}},
2363 'required': ['application',
2364 'name',
2365 'role',
2366 'subordinate'],
2367 'type': 'object'},
2368 'Entities': {'additionalProperties': False,
2369 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2370 'type': 'array'}},
2371 'required': ['entities'],
2372 'type': 'object'},
2373 'Entity': {'additionalProperties': False,
2374 'properties': {'tag': {'type': 'string'}},
2375 'required': ['tag'],
2376 'type': 'object'},
2377 'EntityStatus': {'additionalProperties': False,
2378 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2379 'type': 'object'}},
2380 'type': 'object'},
2381 'info': {'type': 'string'},
2382 'since': {'format': 'date-time',
2383 'type': 'string'},
2384 'status': {'type': 'string'}},
2385 'required': ['status', 'info', 'since'],
2386 'type': 'object'},
2387 'Error': {'additionalProperties': False,
2388 'properties': {'code': {'type': 'string'},
2389 'info': {'$ref': '#/definitions/ErrorInfo'},
2390 'message': {'type': 'string'}},
2391 'required': ['message', 'code'],
2392 'type': 'object'},
2393 'ErrorInfo': {'additionalProperties': False,
2394 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2395 'macaroon-path': {'type': 'string'}},
2396 'type': 'object'},
2397 'ErrorResult': {'additionalProperties': False,
2398 'properties': {'error': {'$ref': '#/definitions/Error'}},
2399 'type': 'object'},
2400 'ErrorResults': {'additionalProperties': False,
2401 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2402 'type': 'array'}},
2403 'required': ['results'],
2404 'type': 'object'},
2405 'FindToolsParams': {'additionalProperties': False,
2406 'properties': {'arch': {'type': 'string'},
2407 'major': {'type': 'integer'},
2408 'minor': {'type': 'integer'},
2409 'number': {'$ref': '#/definitions/Number'},
2410 'series': {'type': 'string'}},
2411 'required': ['number',
2412 'major',
2413 'minor',
2414 'arch',
2415 'series'],
2416 'type': 'object'},
2417 'FindToolsResult': {'additionalProperties': False,
2418 'properties': {'error': {'$ref': '#/definitions/Error'},
2419 'list': {'items': {'$ref': '#/definitions/Tools'},
2420 'type': 'array'}},
2421 'required': ['list'],
2422 'type': 'object'},
2423 'FullStatus': {'additionalProperties': False,
2424 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
2425 'type': 'object'},
2426 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
2427 'type': 'object'},
2428 'model': {'$ref': '#/definitions/ModelStatusInfo'},
2429 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
2430 'type': 'array'},
2431 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}},
2432 'type': 'object'}},
2433 'required': ['model',
2434 'machines',
2435 'applications',
2436 'remote-applications',
2437 'relations'],
2438 'type': 'object'},
2439 'GetConstraintsResults': {'additionalProperties': False,
2440 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
2441 'required': ['constraints'],
2442 'type': 'object'},
2443 'HardwareCharacteristics': {'additionalProperties': False,
2444 'properties': {'arch': {'type': 'string'},
2445 'availability-zone': {'type': 'string'},
2446 'cpu-cores': {'type': 'integer'},
2447 'cpu-power': {'type': 'integer'},
2448 'mem': {'type': 'integer'},
2449 'root-disk': {'type': 'integer'},
2450 'tags': {'items': {'type': 'string'},
2451 'type': 'array'}},
2452 'type': 'object'},
2453 'History': {'additionalProperties': False,
2454 'properties': {'error': {'$ref': '#/definitions/Error'},
2455 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
2456 'type': 'array'}},
2457 'required': ['statuses'],
2458 'type': 'object'},
2459 'HostPort': {'additionalProperties': False,
2460 'properties': {'Address': {'$ref': '#/definitions/Address'},
2461 'port': {'type': 'integer'}},
2462 'required': ['Address', 'port'],
2463 'type': 'object'},
2464 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2465 'MachineHardware': {'additionalProperties': False,
2466 'properties': {'arch': {'type': 'string'},
2467 'availability-zone': {'type': 'string'},
2468 'cores': {'type': 'integer'},
2469 'cpu-power': {'type': 'integer'},
2470 'mem': {'type': 'integer'},
2471 'root-disk': {'type': 'integer'},
2472 'tags': {'items': {'type': 'string'},
2473 'type': 'array'}},
2474 'type': 'object'},
2475 'MachineStatus': {'additionalProperties': False,
2476 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
2477 'constraints': {'type': 'string'},
2478 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
2479 'type': 'object'},
2480 'dns-name': {'type': 'string'},
2481 'hardware': {'type': 'string'},
2482 'has-vote': {'type': 'boolean'},
2483 'id': {'type': 'string'},
2484 'instance-id': {'type': 'string'},
2485 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
2486 'ip-addresses': {'items': {'type': 'string'},
2487 'type': 'array'},
2488 'jobs': {'items': {'type': 'string'},
2489 'type': 'array'},
2490 'network-interfaces': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInterface'}},
2491 'type': 'object'},
2492 'series': {'type': 'string'},
2493 'wants-vote': {'type': 'boolean'}},
2494 'required': ['agent-status',
2495 'instance-status',
2496 'dns-name',
2497 'instance-id',
2498 'series',
2499 'id',
2500 'containers',
2501 'constraints',
2502 'hardware',
2503 'jobs',
2504 'has-vote',
2505 'wants-vote'],
2506 'type': 'object'},
2507 'MeterStatus': {'additionalProperties': False,
2508 'properties': {'color': {'type': 'string'},
2509 'message': {'type': 'string'}},
2510 'required': ['color', 'message'],
2511 'type': 'object'},
2512 'ModelConfigResults': {'additionalProperties': False,
2513 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
2514 'type': 'object'}},
2515 'required': ['config'],
2516 'type': 'object'},
2517 'ModelInfo': {'additionalProperties': False,
2518 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
2519 'cloud-credential-tag': {'type': 'string'},
2520 'cloud-region': {'type': 'string'},
2521 'cloud-tag': {'type': 'string'},
2522 'controller-uuid': {'type': 'string'},
2523 'default-series': {'type': 'string'},
2524 'life': {'type': 'string'},
2525 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
2526 'type': 'array'},
2527 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
2528 'name': {'type': 'string'},
2529 'owner-tag': {'type': 'string'},
2530 'provider-type': {'type': 'string'},
2531 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
2532 'status': {'$ref': '#/definitions/EntityStatus'},
2533 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
2534 'type': 'array'},
2535 'uuid': {'type': 'string'}},
2536 'required': ['name',
2537 'uuid',
2538 'controller-uuid',
2539 'cloud-tag',
2540 'owner-tag',
2541 'life',
2542 'users',
2543 'machines',
2544 'sla',
2545 'agent-version'],
2546 'type': 'object'},
2547 'ModelMachineInfo': {'additionalProperties': False,
2548 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
2549 'has-vote': {'type': 'boolean'},
2550 'id': {'type': 'string'},
2551 'instance-id': {'type': 'string'},
2552 'status': {'type': 'string'},
2553 'wants-vote': {'type': 'boolean'}},
2554 'required': ['id'],
2555 'type': 'object'},
2556 'ModelMigrationStatus': {'additionalProperties': False,
2557 'properties': {'end': {'format': 'date-time',
2558 'type': 'string'},
2559 'start': {'format': 'date-time',
2560 'type': 'string'},
2561 'status': {'type': 'string'}},
2562 'required': ['status', 'start'],
2563 'type': 'object'},
2564 'ModelSLA': {'additionalProperties': False,
2565 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
2566 'creds': {'items': {'type': 'integer'},
2567 'type': 'array'}},
2568 'required': ['ModelSLAInfo', 'creds'],
2569 'type': 'object'},
2570 'ModelSLAInfo': {'additionalProperties': False,
2571 'properties': {'level': {'type': 'string'},
2572 'owner': {'type': 'string'}},
2573 'required': ['level', 'owner'],
2574 'type': 'object'},
2575 'ModelSet': {'additionalProperties': False,
2576 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,