Modified Jenkinsfile to disable TEST_INSTALL in branch feature7928
[osm/N2VC.git] / modules / libjuju / juju / client / _client5.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 ApplicationFacade(Type):
9 name = 'Application'
10 version = 5
11 schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
12 'properties': {'application': {'type': 'string'},
13 'attach-storage': {'items': {'type': 'string'},
14 'type': 'array'},
15 'num-units': {'type': 'integer'},
16 'placement': {'items': {'$ref': '#/definitions/Placement'},
17 'type': 'array'}},
18 'required': ['application',
19 'num-units',
20 'placement'],
21 'type': 'object'},
22 'AddApplicationUnitsResults': {'additionalProperties': False,
23 'properties': {'units': {'items': {'type': 'string'},
24 'type': 'array'}},
25 'required': ['units'],
26 'type': 'object'},
27 'AddRelation': {'additionalProperties': False,
28 'properties': {'endpoints': {'items': {'type': 'string'},
29 'type': 'array'}},
30 'required': ['endpoints'],
31 'type': 'object'},
32 'AddRelationResults': {'additionalProperties': False,
33 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
34 'type': 'object'}},
35 'required': ['endpoints'],
36 'type': 'object'},
37 'ApplicationCharmRelations': {'additionalProperties': False,
38 'properties': {'application': {'type': 'string'}},
39 'required': ['application'],
40 'type': 'object'},
41 'ApplicationCharmRelationsResults': {'additionalProperties': False,
42 'properties': {'charm-relations': {'items': {'type': 'string'},
43 'type': 'array'}},
44 'required': ['charm-relations'],
45 'type': 'object'},
46 'ApplicationDeploy': {'additionalProperties': False,
47 'properties': {'application': {'type': 'string'},
48 'attach-storage': {'items': {'type': 'string'},
49 'type': 'array'},
50 'channel': {'type': 'string'},
51 'charm-url': {'type': 'string'},
52 'config': {'patternProperties': {'.*': {'type': 'string'}},
53 'type': 'object'},
54 'config-yaml': {'type': 'string'},
55 'constraints': {'$ref': '#/definitions/Value'},
56 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
57 'type': 'object'},
58 'num-units': {'type': 'integer'},
59 'placement': {'items': {'$ref': '#/definitions/Placement'},
60 'type': 'array'},
61 'resources': {'patternProperties': {'.*': {'type': 'string'}},
62 'type': 'object'},
63 'series': {'type': 'string'},
64 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
65 'type': 'object'}},
66 'required': ['application',
67 'series',
68 'charm-url',
69 'channel',
70 'num-units',
71 'config-yaml',
72 'constraints'],
73 'type': 'object'},
74 'ApplicationDestroy': {'additionalProperties': False,
75 'properties': {'application': {'type': 'string'}},
76 'required': ['application'],
77 'type': 'object'},
78 'ApplicationExpose': {'additionalProperties': False,
79 'properties': {'application': {'type': 'string'}},
80 'required': ['application'],
81 'type': 'object'},
82 'ApplicationGet': {'additionalProperties': False,
83 'properties': {'application': {'type': 'string'}},
84 'required': ['application'],
85 'type': 'object'},
86 'ApplicationGetResults': {'additionalProperties': False,
87 'properties': {'application': {'type': 'string'},
88 'charm': {'type': 'string'},
89 'config': {'patternProperties': {'.*': {'additionalProperties': True,
90 'type': 'object'}},
91 'type': 'object'},
92 'constraints': {'$ref': '#/definitions/Value'},
93 'series': {'type': 'string'}},
94 'required': ['application',
95 'charm',
96 'config',
97 'constraints',
98 'series'],
99 'type': 'object'},
100 'ApplicationMetricCredential': {'additionalProperties': False,
101 'properties': {'application': {'type': 'string'},
102 'metrics-credentials': {'items': {'type': 'integer'},
103 'type': 'array'}},
104 'required': ['application',
105 'metrics-credentials'],
106 'type': 'object'},
107 'ApplicationMetricCredentials': {'additionalProperties': False,
108 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
109 'type': 'array'}},
110 'required': ['creds'],
111 'type': 'object'},
112 'ApplicationOffer': {'additionalProperties': False,
113 'properties': {'access': {'type': 'string'},
114 'application-description': {'type': 'string'},
115 'bindings': {'patternProperties': {'.*': {'type': 'string'}},
116 'type': 'object'},
117 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
118 'type': 'array'},
119 'offer-name': {'type': 'string'},
120 'offer-url': {'type': 'string'},
121 'source-model-tag': {'type': 'string'},
122 'spaces': {'items': {'$ref': '#/definitions/RemoteSpace'},
123 'type': 'array'}},
124 'required': ['source-model-tag',
125 'offer-url',
126 'offer-name',
127 'application-description',
128 'endpoints',
129 'spaces',
130 'bindings',
131 'access'],
132 'type': 'object'},
133 'ApplicationSet': {'additionalProperties': False,
134 'properties': {'application': {'type': 'string'},
135 'options': {'patternProperties': {'.*': {'type': 'string'}},
136 'type': 'object'}},
137 'required': ['application', 'options'],
138 'type': 'object'},
139 'ApplicationSetCharm': {'additionalProperties': False,
140 'properties': {'application': {'type': 'string'},
141 'channel': {'type': 'string'},
142 'charm-url': {'type': 'string'},
143 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
144 'type': 'object'},
145 'config-settings-yaml': {'type': 'string'},
146 'force-series': {'type': 'boolean'},
147 'force-units': {'type': 'boolean'},
148 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
149 'type': 'object'},
150 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
151 'type': 'object'}},
152 'required': ['application',
153 'charm-url',
154 'channel',
155 'force-units',
156 'force-series'],
157 'type': 'object'},
158 'ApplicationUnexpose': {'additionalProperties': False,
159 'properties': {'application': {'type': 'string'}},
160 'required': ['application'],
161 'type': 'object'},
162 'ApplicationUnset': {'additionalProperties': False,
163 'properties': {'application': {'type': 'string'},
164 'options': {'items': {'type': 'string'},
165 'type': 'array'}},
166 'required': ['application', 'options'],
167 'type': 'object'},
168 'ApplicationUpdate': {'additionalProperties': False,
169 'properties': {'application': {'type': 'string'},
170 'charm-url': {'type': 'string'},
171 'constraints': {'$ref': '#/definitions/Value'},
172 'force-charm-url': {'type': 'boolean'},
173 'force-series': {'type': 'boolean'},
174 'min-units': {'type': 'integer'},
175 'settings': {'patternProperties': {'.*': {'type': 'string'}},
176 'type': 'object'},
177 'settings-yaml': {'type': 'string'}},
178 'required': ['application',
179 'charm-url',
180 'force-charm-url',
181 'force-series',
182 'settings-yaml'],
183 'type': 'object'},
184 'ApplicationsDeploy': {'additionalProperties': False,
185 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
186 'type': 'array'}},
187 'required': ['applications'],
188 'type': 'object'},
189 'CharmRelation': {'additionalProperties': False,
190 'properties': {'interface': {'type': 'string'},
191 'limit': {'type': 'integer'},
192 'name': {'type': 'string'},
193 'optional': {'type': 'boolean'},
194 'role': {'type': 'string'},
195 'scope': {'type': 'string'}},
196 'required': ['name',
197 'role',
198 'interface',
199 'optional',
200 'limit',
201 'scope'],
202 'type': 'object'},
203 'Constraints': {'additionalProperties': False,
204 'properties': {'Count': {'type': 'integer'},
205 'Pool': {'type': 'string'},
206 'Size': {'type': 'integer'}},
207 'required': ['Pool', 'Size', 'Count'],
208 'type': 'object'},
209 'ConsumeApplicationArg': {'additionalProperties': False,
210 'properties': {'ApplicationOffer': {'$ref': '#/definitions/ApplicationOffer'},
211 'application-alias': {'type': 'string'},
212 'macaroon': {'$ref': '#/definitions/Macaroon'}},
213 'required': ['ApplicationOffer'],
214 'type': 'object'},
215 'ConsumeApplicationArgs': {'additionalProperties': False,
216 'properties': {'args': {'items': {'$ref': '#/definitions/ConsumeApplicationArg'},
217 'type': 'array'}},
218 'type': 'object'},
219 'DestroyApplicationInfo': {'additionalProperties': False,
220 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
221 'type': 'array'},
222 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
223 'type': 'array'},
224 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
225 'type': 'array'}},
226 'type': 'object'},
227 'DestroyApplicationResult': {'additionalProperties': False,
228 'properties': {'error': {'$ref': '#/definitions/Error'},
229 'info': {'$ref': '#/definitions/DestroyApplicationInfo'}},
230 'type': 'object'},
231 'DestroyApplicationResults': {'additionalProperties': False,
232 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyApplicationResult'},
233 'type': 'array'}},
234 'type': 'object'},
235 'DestroyApplicationUnits': {'additionalProperties': False,
236 'properties': {'unit-names': {'items': {'type': 'string'},
237 'type': 'array'}},
238 'required': ['unit-names'],
239 'type': 'object'},
240 'DestroyRelation': {'additionalProperties': False,
241 'properties': {'endpoints': {'items': {'type': 'string'},
242 'type': 'array'}},
243 'required': ['endpoints'],
244 'type': 'object'},
245 'DestroyUnitInfo': {'additionalProperties': False,
246 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
247 'type': 'array'},
248 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
249 'type': 'array'}},
250 'type': 'object'},
251 'DestroyUnitResult': {'additionalProperties': False,
252 'properties': {'error': {'$ref': '#/definitions/Error'},
253 'info': {'$ref': '#/definitions/DestroyUnitInfo'}},
254 'type': 'object'},
255 'DestroyUnitResults': {'additionalProperties': False,
256 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyUnitResult'},
257 'type': 'array'}},
258 'type': 'object'},
259 'Entities': {'additionalProperties': False,
260 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
261 'type': 'array'}},
262 'required': ['entities'],
263 'type': 'object'},
264 'Entity': {'additionalProperties': False,
265 'properties': {'tag': {'type': 'string'}},
266 'required': ['tag'],
267 'type': 'object'},
268 'Error': {'additionalProperties': False,
269 'properties': {'code': {'type': 'string'},
270 'info': {'$ref': '#/definitions/ErrorInfo'},
271 'message': {'type': 'string'}},
272 'required': ['message', 'code'],
273 'type': 'object'},
274 'ErrorInfo': {'additionalProperties': False,
275 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
276 'macaroon-path': {'type': 'string'}},
277 'type': 'object'},
278 'ErrorResult': {'additionalProperties': False,
279 'properties': {'error': {'$ref': '#/definitions/Error'}},
280 'type': 'object'},
281 'ErrorResults': {'additionalProperties': False,
282 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
283 'type': 'array'}},
284 'required': ['results'],
285 'type': 'object'},
286 'GetApplicationConstraints': {'additionalProperties': False,
287 'properties': {'application': {'type': 'string'}},
288 'required': ['application'],
289 'type': 'object'},
290 'GetConstraintsResults': {'additionalProperties': False,
291 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
292 'required': ['constraints'],
293 'type': 'object'},
294 'Macaroon': {'additionalProperties': False, 'type': 'object'},
295 'Placement': {'additionalProperties': False,
296 'properties': {'directive': {'type': 'string'},
297 'scope': {'type': 'string'}},
298 'required': ['scope', 'directive'],
299 'type': 'object'},
300 'RemoteEndpoint': {'additionalProperties': False,
301 'properties': {'interface': {'type': 'string'},
302 'limit': {'type': 'integer'},
303 'name': {'type': 'string'},
304 'role': {'type': 'string'},
305 'scope': {'type': 'string'}},
306 'required': ['name',
307 'role',
308 'interface',
309 'limit',
310 'scope'],
311 'type': 'object'},
312 'RemoteSpace': {'additionalProperties': False,
313 'properties': {'cloud-type': {'type': 'string'},
314 'name': {'type': 'string'},
315 'provider-attributes': {'patternProperties': {'.*': {'additionalProperties': True,
316 'type': 'object'}},
317 'type': 'object'},
318 'provider-id': {'type': 'string'},
319 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
320 'type': 'array'}},
321 'required': ['cloud-type',
322 'name',
323 'provider-id',
324 'provider-attributes',
325 'subnets'],
326 'type': 'object'},
327 'SetConstraints': {'additionalProperties': False,
328 'properties': {'application': {'type': 'string'},
329 'constraints': {'$ref': '#/definitions/Value'}},
330 'required': ['application', 'constraints'],
331 'type': 'object'},
332 'StorageConstraints': {'additionalProperties': False,
333 'properties': {'count': {'type': 'integer'},
334 'pool': {'type': 'string'},
335 'size': {'type': 'integer'}},
336 'type': 'object'},
337 'StringResult': {'additionalProperties': False,
338 'properties': {'error': {'$ref': '#/definitions/Error'},
339 'result': {'type': 'string'}},
340 'required': ['result'],
341 'type': 'object'},
342 'Subnet': {'additionalProperties': False,
343 'properties': {'cidr': {'type': 'string'},
344 'life': {'type': 'string'},
345 'provider-id': {'type': 'string'},
346 'provider-network-id': {'type': 'string'},
347 'provider-space-id': {'type': 'string'},
348 'space-tag': {'type': 'string'},
349 'status': {'type': 'string'},
350 'vlan-tag': {'type': 'integer'},
351 'zones': {'items': {'type': 'string'},
352 'type': 'array'}},
353 'required': ['cidr',
354 'vlan-tag',
355 'life',
356 'space-tag',
357 'zones'],
358 'type': 'object'},
359 'Value': {'additionalProperties': False,
360 'properties': {'arch': {'type': 'string'},
361 'container': {'type': 'string'},
362 'cores': {'type': 'integer'},
363 'cpu-power': {'type': 'integer'},
364 'instance-type': {'type': 'string'},
365 'mem': {'type': 'integer'},
366 'root-disk': {'type': 'integer'},
367 'spaces': {'items': {'type': 'string'},
368 'type': 'array'},
369 'tags': {'items': {'type': 'string'},
370 'type': 'array'},
371 'virt-type': {'type': 'string'}},
372 'type': 'object'}},
373 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
374 'Result': {'$ref': '#/definitions/AddRelationResults'}},
375 'type': 'object'},
376 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
377 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
378 'type': 'object'},
379 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
380 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
381 'type': 'object'},
382 'Consume': {'properties': {'Params': {'$ref': '#/definitions/ConsumeApplicationArgs'},
383 'Result': {'$ref': '#/definitions/ErrorResults'}},
384 'type': 'object'},
385 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
386 'Result': {'$ref': '#/definitions/ErrorResults'}},
387 'type': 'object'},
388 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
389 'type': 'object'},
390 'DestroyApplication': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
391 'Result': {'$ref': '#/definitions/DestroyApplicationResults'}},
392 'type': 'object'},
393 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
394 'type': 'object'},
395 'DestroyUnit': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
396 'Result': {'$ref': '#/definitions/DestroyUnitResults'}},
397 'type': 'object'},
398 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
399 'type': 'object'},
400 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
401 'type': 'object'},
402 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
403 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
404 'type': 'object'},
405 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
406 'Result': {'$ref': '#/definitions/StringResult'}},
407 'type': 'object'},
408 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
409 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
410 'type': 'object'},
411 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
412 'type': 'object'},
413 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
414 'type': 'object'},
415 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
416 'type': 'object'},
417 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
418 'Result': {'$ref': '#/definitions/ErrorResults'}},
419 'type': 'object'},
420 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
421 'type': 'object'},
422 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
423 'type': 'object'},
424 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
425 'type': 'object'}},
426 'type': 'object'}
427
428
429 @ReturnMapping(AddRelationResults)
430 async def AddRelation(self, endpoints):
431 '''
432 endpoints : typing.Sequence[str]
433 Returns -> typing.Mapping[str, ~CharmRelation]
434 '''
435 # map input types to rpc msg
436 _params = dict()
437 msg = dict(type='Application',
438 request='AddRelation',
439 version=5,
440 params=_params)
441 _params['endpoints'] = endpoints
442 reply = await self.rpc(msg)
443 return reply
444
445
446
447 @ReturnMapping(AddApplicationUnitsResults)
448 async def AddUnits(self, application, num_units, placement):
449 '''
450 application : str
451 num_units : int
452 placement : typing.Sequence[~Placement]
453 Returns -> typing.Sequence[str]
454 '''
455 # map input types to rpc msg
456 _params = dict()
457 msg = dict(type='Application',
458 request='AddUnits',
459 version=5,
460 params=_params)
461 _params['application'] = application
462 _params['num-units'] = num_units
463 _params['placement'] = placement
464 reply = await self.rpc(msg)
465 return reply
466
467
468
469 @ReturnMapping(ApplicationCharmRelationsResults)
470 async def CharmRelations(self, application):
471 '''
472 application : str
473 Returns -> typing.Sequence[str]
474 '''
475 # map input types to rpc msg
476 _params = dict()
477 msg = dict(type='Application',
478 request='CharmRelations',
479 version=5,
480 params=_params)
481 _params['application'] = application
482 reply = await self.rpc(msg)
483 return reply
484
485
486
487 @ReturnMapping(ErrorResults)
488 async def Consume(self, args):
489 '''
490 args : typing.Sequence[~ConsumeApplicationArg]
491 Returns -> typing.Sequence[~ErrorResult]
492 '''
493 # map input types to rpc msg
494 _params = dict()
495 msg = dict(type='Application',
496 request='Consume',
497 version=5,
498 params=_params)
499 _params['args'] = args
500 reply = await self.rpc(msg)
501 return reply
502
503
504
505 @ReturnMapping(ErrorResults)
506 async def Deploy(self, applications):
507 '''
508 applications : typing.Sequence[~ApplicationDeploy]
509 Returns -> typing.Sequence[~ErrorResult]
510 '''
511 # map input types to rpc msg
512 _params = dict()
513 msg = dict(type='Application',
514 request='Deploy',
515 version=5,
516 params=_params)
517 _params['applications'] = applications
518 reply = await self.rpc(msg)
519 return reply
520
521
522
523 @ReturnMapping(None)
524 async def Destroy(self, application):
525 '''
526 application : str
527 Returns -> None
528 '''
529 # map input types to rpc msg
530 _params = dict()
531 msg = dict(type='Application',
532 request='Destroy',
533 version=5,
534 params=_params)
535 _params['application'] = application
536 reply = await self.rpc(msg)
537 return reply
538
539
540
541 @ReturnMapping(DestroyApplicationResults)
542 async def DestroyApplication(self, entities):
543 '''
544 entities : typing.Sequence[~Entity]
545 Returns -> typing.Sequence[~DestroyApplicationResult]
546 '''
547 # map input types to rpc msg
548 _params = dict()
549 msg = dict(type='Application',
550 request='DestroyApplication',
551 version=5,
552 params=_params)
553 _params['entities'] = entities
554 reply = await self.rpc(msg)
555 return reply
556
557
558
559 @ReturnMapping(None)
560 async def DestroyRelation(self, endpoints):
561 '''
562 endpoints : typing.Sequence[str]
563 Returns -> None
564 '''
565 # map input types to rpc msg
566 _params = dict()
567 msg = dict(type='Application',
568 request='DestroyRelation',
569 version=5,
570 params=_params)
571 _params['endpoints'] = endpoints
572 reply = await self.rpc(msg)
573 return reply
574
575
576
577 @ReturnMapping(DestroyUnitResults)
578 async def DestroyUnit(self, entities):
579 '''
580 entities : typing.Sequence[~Entity]
581 Returns -> typing.Sequence[~DestroyUnitResult]
582 '''
583 # map input types to rpc msg
584 _params = dict()
585 msg = dict(type='Application',
586 request='DestroyUnit',
587 version=5,
588 params=_params)
589 _params['entities'] = entities
590 reply = await self.rpc(msg)
591 return reply
592
593
594
595 @ReturnMapping(None)
596 async def DestroyUnits(self, unit_names):
597 '''
598 unit_names : typing.Sequence[str]
599 Returns -> None
600 '''
601 # map input types to rpc msg
602 _params = dict()
603 msg = dict(type='Application',
604 request='DestroyUnits',
605 version=5,
606 params=_params)
607 _params['unit-names'] = unit_names
608 reply = await self.rpc(msg)
609 return reply
610
611
612
613 @ReturnMapping(None)
614 async def Expose(self, application):
615 '''
616 application : str
617 Returns -> None
618 '''
619 # map input types to rpc msg
620 _params = dict()
621 msg = dict(type='Application',
622 request='Expose',
623 version=5,
624 params=_params)
625 _params['application'] = application
626 reply = await self.rpc(msg)
627 return reply
628
629
630
631 @ReturnMapping(ApplicationGetResults)
632 async def Get(self, application):
633 '''
634 application : str
635 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
636 '''
637 # map input types to rpc msg
638 _params = dict()
639 msg = dict(type='Application',
640 request='Get',
641 version=5,
642 params=_params)
643 _params['application'] = application
644 reply = await self.rpc(msg)
645 return reply
646
647
648
649 @ReturnMapping(StringResult)
650 async def GetCharmURL(self, application):
651 '''
652 application : str
653 Returns -> typing.Union[_ForwardRef('Error'), str]
654 '''
655 # map input types to rpc msg
656 _params = dict()
657 msg = dict(type='Application',
658 request='GetCharmURL',
659 version=5,
660 params=_params)
661 _params['application'] = application
662 reply = await self.rpc(msg)
663 return reply
664
665
666
667 @ReturnMapping(GetConstraintsResults)
668 async def GetConstraints(self, application):
669 '''
670 application : str
671 Returns -> Value
672 '''
673 # map input types to rpc msg
674 _params = dict()
675 msg = dict(type='Application',
676 request='GetConstraints',
677 version=5,
678 params=_params)
679 _params['application'] = application
680 reply = await self.rpc(msg)
681 return reply
682
683
684
685 @ReturnMapping(None)
686 async def Set(self, application, options):
687 '''
688 application : str
689 options : typing.Mapping[str, str]
690 Returns -> None
691 '''
692 # map input types to rpc msg
693 _params = dict()
694 msg = dict(type='Application',
695 request='Set',
696 version=5,
697 params=_params)
698 _params['application'] = application
699 _params['options'] = options
700 reply = await self.rpc(msg)
701 return reply
702
703
704
705 @ReturnMapping(None)
706 async def SetCharm(self, application, channel, charm_url, config_settings, config_settings_yaml, force_series, force_units, resource_ids, storage_constraints):
707 '''
708 application : str
709 channel : str
710 charm_url : str
711 config_settings : typing.Mapping[str, str]
712 config_settings_yaml : str
713 force_series : bool
714 force_units : bool
715 resource_ids : typing.Mapping[str, str]
716 storage_constraints : typing.Mapping[str, ~StorageConstraints]
717 Returns -> None
718 '''
719 # map input types to rpc msg
720 _params = dict()
721 msg = dict(type='Application',
722 request='SetCharm',
723 version=5,
724 params=_params)
725 _params['application'] = application
726 _params['channel'] = channel
727 _params['charm-url'] = charm_url
728 _params['config-settings'] = config_settings
729 _params['config-settings-yaml'] = config_settings_yaml
730 _params['force-series'] = force_series
731 _params['force-units'] = force_units
732 _params['resource-ids'] = resource_ids
733 _params['storage-constraints'] = storage_constraints
734 reply = await self.rpc(msg)
735 return reply
736
737
738
739 @ReturnMapping(None)
740 async def SetConstraints(self, application, constraints):
741 '''
742 application : str
743 constraints : Value
744 Returns -> None
745 '''
746 # map input types to rpc msg
747 _params = dict()
748 msg = dict(type='Application',
749 request='SetConstraints',
750 version=5,
751 params=_params)
752 _params['application'] = application
753 _params['constraints'] = constraints
754 reply = await self.rpc(msg)
755 return reply
756
757
758
759 @ReturnMapping(ErrorResults)
760 async def SetMetricCredentials(self, creds):
761 '''
762 creds : typing.Sequence[~ApplicationMetricCredential]
763 Returns -> typing.Sequence[~ErrorResult]
764 '''
765 # map input types to rpc msg
766 _params = dict()
767 msg = dict(type='Application',
768 request='SetMetricCredentials',
769 version=5,
770 params=_params)
771 _params['creds'] = creds
772 reply = await self.rpc(msg)
773 return reply
774
775
776
777 @ReturnMapping(None)
778 async def Unexpose(self, application):
779 '''
780 application : str
781 Returns -> None
782 '''
783 # map input types to rpc msg
784 _params = dict()
785 msg = dict(type='Application',
786 request='Unexpose',
787 version=5,
788 params=_params)
789 _params['application'] = application
790 reply = await self.rpc(msg)
791 return reply
792
793
794
795 @ReturnMapping(None)
796 async def Unset(self, application, options):
797 '''
798 application : str
799 options : typing.Sequence[str]
800 Returns -> None
801 '''
802 # map input types to rpc msg
803 _params = dict()
804 msg = dict(type='Application',
805 request='Unset',
806 version=5,
807 params=_params)
808 _params['application'] = application
809 _params['options'] = options
810 reply = await self.rpc(msg)
811 return reply
812
813
814
815 @ReturnMapping(None)
816 async def Update(self, application, charm_url, constraints, force_charm_url, force_series, min_units, settings, settings_yaml):
817 '''
818 application : str
819 charm_url : str
820 constraints : Value
821 force_charm_url : bool
822 force_series : bool
823 min_units : int
824 settings : typing.Mapping[str, str]
825 settings_yaml : str
826 Returns -> None
827 '''
828 # map input types to rpc msg
829 _params = dict()
830 msg = dict(type='Application',
831 request='Update',
832 version=5,
833 params=_params)
834 _params['application'] = application
835 _params['charm-url'] = charm_url
836 _params['constraints'] = constraints
837 _params['force-charm-url'] = force_charm_url
838 _params['force-series'] = force_series
839 _params['min-units'] = min_units
840 _params['settings'] = settings
841 _params['settings-yaml'] = settings_yaml
842 reply = await self.rpc(msg)
843 return reply
844
845
846
847 class ControllerFacade(Type):
848 name = 'Controller'
849 version = 5
850 schema = {'definitions': {'AllWatcherId': {'additionalProperties': False,
851 'properties': {'watcher-id': {'type': 'string'}},
852 'required': ['watcher-id'],
853 'type': 'object'},
854 'CloudCredential': {'additionalProperties': False,
855 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
856 'type': 'object'},
857 'auth-type': {'type': 'string'},
858 'redacted': {'items': {'type': 'string'},
859 'type': 'array'}},
860 'required': ['auth-type'],
861 'type': 'object'},
862 'CloudSpec': {'additionalProperties': False,
863 'properties': {'cacertificates': {'items': {'type': 'string'},
864 'type': 'array'},
865 'credential': {'$ref': '#/definitions/CloudCredential'},
866 'endpoint': {'type': 'string'},
867 'identity-endpoint': {'type': 'string'},
868 'name': {'type': 'string'},
869 'region': {'type': 'string'},
870 'storage-endpoint': {'type': 'string'},
871 'type': {'type': 'string'}},
872 'required': ['type', 'name'],
873 'type': 'object'},
874 'CloudSpecResult': {'additionalProperties': False,
875 'properties': {'error': {'$ref': '#/definitions/Error'},
876 'result': {'$ref': '#/definitions/CloudSpec'}},
877 'type': 'object'},
878 'CloudSpecResults': {'additionalProperties': False,
879 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
880 'type': 'array'}},
881 'type': 'object'},
882 'ConfigValue': {'additionalProperties': False,
883 'properties': {'source': {'type': 'string'},
884 'value': {'additionalProperties': True,
885 'type': 'object'}},
886 'required': ['value', 'source'],
887 'type': 'object'},
888 'ControllerAPIInfoResult': {'additionalProperties': False,
889 'properties': {'addresses': {'items': {'type': 'string'},
890 'type': 'array'},
891 'cacert': {'type': 'string'},
892 'error': {'$ref': '#/definitions/Error'}},
893 'required': ['addresses',
894 'cacert'],
895 'type': 'object'},
896 'ControllerAPIInfoResults': {'additionalProperties': False,
897 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
898 'type': 'array'}},
899 'required': ['results'],
900 'type': 'object'},
901 'ControllerConfigResult': {'additionalProperties': False,
902 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
903 'type': 'object'}},
904 'type': 'object'}},
905 'required': ['config'],
906 'type': 'object'},
907 'ControllerConfigSet': {'additionalProperties': False,
908 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
909 'type': 'object'}},
910 'type': 'object'}},
911 'required': ['config'],
912 'type': 'object'},
913 'DestroyControllerArgs': {'additionalProperties': False,
914 'properties': {'destroy-models': {'type': 'boolean'},
915 'destroy-storage': {'type': 'boolean'}},
916 'required': ['destroy-models'],
917 'type': 'object'},
918 'Entities': {'additionalProperties': False,
919 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
920 'type': 'array'}},
921 'required': ['entities'],
922 'type': 'object'},
923 'Entity': {'additionalProperties': False,
924 'properties': {'tag': {'type': 'string'}},
925 'required': ['tag'],
926 'type': 'object'},
927 'Error': {'additionalProperties': False,
928 'properties': {'code': {'type': 'string'},
929 'info': {'$ref': '#/definitions/ErrorInfo'},
930 'message': {'type': 'string'}},
931 'required': ['message', 'code'],
932 'type': 'object'},
933 'ErrorInfo': {'additionalProperties': False,
934 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
935 'macaroon-path': {'type': 'string'}},
936 'type': 'object'},
937 'ErrorResult': {'additionalProperties': False,
938 'properties': {'error': {'$ref': '#/definitions/Error'}},
939 'type': 'object'},
940 'ErrorResults': {'additionalProperties': False,
941 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
942 'type': 'array'}},
943 'required': ['results'],
944 'type': 'object'},
945 'HostedModelConfig': {'additionalProperties': False,
946 'properties': {'cloud-spec': {'$ref': '#/definitions/CloudSpec'},
947 'config': {'patternProperties': {'.*': {'additionalProperties': True,
948 'type': 'object'}},
949 'type': 'object'},
950 'error': {'$ref': '#/definitions/Error'},
951 'name': {'type': 'string'},
952 'owner': {'type': 'string'}},
953 'required': ['name', 'owner'],
954 'type': 'object'},
955 'HostedModelConfigsResults': {'additionalProperties': False,
956 'properties': {'models': {'items': {'$ref': '#/definitions/HostedModelConfig'},
957 'type': 'array'}},
958 'required': ['models'],
959 'type': 'object'},
960 'InitiateMigrationArgs': {'additionalProperties': False,
961 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
962 'type': 'array'}},
963 'required': ['specs'],
964 'type': 'object'},
965 'InitiateMigrationResult': {'additionalProperties': False,
966 'properties': {'error': {'$ref': '#/definitions/Error'},
967 'migration-id': {'type': 'string'},
968 'model-tag': {'type': 'string'}},
969 'required': ['model-tag',
970 'migration-id'],
971 'type': 'object'},
972 'InitiateMigrationResults': {'additionalProperties': False,
973 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
974 'type': 'array'}},
975 'required': ['results'],
976 'type': 'object'},
977 'Macaroon': {'additionalProperties': False, 'type': 'object'},
978 'MachineHardware': {'additionalProperties': False,
979 'properties': {'arch': {'type': 'string'},
980 'availability-zone': {'type': 'string'},
981 'cores': {'type': 'integer'},
982 'cpu-power': {'type': 'integer'},
983 'mem': {'type': 'integer'},
984 'root-disk': {'type': 'integer'},
985 'tags': {'items': {'type': 'string'},
986 'type': 'array'}},
987 'type': 'object'},
988 'MigrationSpec': {'additionalProperties': False,
989 'properties': {'model-tag': {'type': 'string'},
990 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
991 'required': ['model-tag', 'target-info'],
992 'type': 'object'},
993 'MigrationTargetInfo': {'additionalProperties': False,
994 'properties': {'addrs': {'items': {'type': 'string'},
995 'type': 'array'},
996 'auth-tag': {'type': 'string'},
997 'ca-cert': {'type': 'string'},
998 'controller-tag': {'type': 'string'},
999 'macaroons': {'type': 'string'},
1000 'password': {'type': 'string'}},
1001 'required': ['controller-tag',
1002 'addrs',
1003 'ca-cert',
1004 'auth-tag'],
1005 'type': 'object'},
1006 'Model': {'additionalProperties': False,
1007 'properties': {'name': {'type': 'string'},
1008 'owner-tag': {'type': 'string'},
1009 'type': {'type': 'string'},
1010 'uuid': {'type': 'string'}},
1011 'required': ['name', 'uuid', 'type', 'owner-tag'],
1012 'type': 'object'},
1013 'ModelBlockInfo': {'additionalProperties': False,
1014 'properties': {'blocks': {'items': {'type': 'string'},
1015 'type': 'array'},
1016 'model-uuid': {'type': 'string'},
1017 'name': {'type': 'string'},
1018 'owner-tag': {'type': 'string'}},
1019 'required': ['name',
1020 'model-uuid',
1021 'owner-tag',
1022 'blocks'],
1023 'type': 'object'},
1024 'ModelBlockInfoList': {'additionalProperties': False,
1025 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
1026 'type': 'array'}},
1027 'type': 'object'},
1028 'ModelConfigResults': {'additionalProperties': False,
1029 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
1030 'type': 'object'}},
1031 'required': ['config'],
1032 'type': 'object'},
1033 'ModelFilesystemInfo': {'additionalProperties': False,
1034 'properties': {'detachable': {'type': 'boolean'},
1035 'id': {'type': 'string'},
1036 'message': {'type': 'string'},
1037 'provider-id': {'type': 'string'},
1038 'status': {'type': 'string'}},
1039 'required': ['id'],
1040 'type': 'object'},
1041 'ModelMachineInfo': {'additionalProperties': False,
1042 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
1043 'has-vote': {'type': 'boolean'},
1044 'id': {'type': 'string'},
1045 'instance-id': {'type': 'string'},
1046 'message': {'type': 'string'},
1047 'status': {'type': 'string'},
1048 'wants-vote': {'type': 'boolean'}},
1049 'required': ['id'],
1050 'type': 'object'},
1051 'ModelStatus': {'additionalProperties': False,
1052 'properties': {'application-count': {'type': 'integer'},
1053 'error': {'$ref': '#/definitions/Error'},
1054 'filesystems': {'items': {'$ref': '#/definitions/ModelFilesystemInfo'},
1055 'type': 'array'},
1056 'hosted-machine-count': {'type': 'integer'},
1057 'life': {'type': 'string'},
1058 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
1059 'type': 'array'},
1060 'model-tag': {'type': 'string'},
1061 'owner-tag': {'type': 'string'},
1062 'volumes': {'items': {'$ref': '#/definitions/ModelVolumeInfo'},
1063 'type': 'array'}},
1064 'required': ['model-tag',
1065 'life',
1066 'hosted-machine-count',
1067 'application-count',
1068 'owner-tag'],
1069 'type': 'object'},
1070 'ModelStatusResults': {'additionalProperties': False,
1071 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
1072 'type': 'array'}},
1073 'required': ['models'],
1074 'type': 'object'},
1075 'ModelTag': {'additionalProperties': False, 'type': 'object'},
1076 'ModelVolumeInfo': {'additionalProperties': False,
1077 'properties': {'detachable': {'type': 'boolean'},
1078 'id': {'type': 'string'},
1079 'message': {'type': 'string'},
1080 'provider-id': {'type': 'string'},
1081 'status': {'type': 'string'}},
1082 'required': ['id'],
1083 'type': 'object'},
1084 'ModifyControllerAccess': {'additionalProperties': False,
1085 'properties': {'access': {'type': 'string'},
1086 'action': {'type': 'string'},
1087 'user-tag': {'type': 'string'}},
1088 'required': ['user-tag',
1089 'action',
1090 'access'],
1091 'type': 'object'},
1092 'ModifyControllerAccessRequest': {'additionalProperties': False,
1093 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
1094 'type': 'array'}},
1095 'required': ['changes'],
1096 'type': 'object'},
1097 'RemoveBlocksArgs': {'additionalProperties': False,
1098 'properties': {'all': {'type': 'boolean'}},
1099 'required': ['all'],
1100 'type': 'object'},
1101 'UserAccess': {'additionalProperties': False,
1102 'properties': {'access': {'type': 'string'},
1103 'user-tag': {'type': 'string'}},
1104 'required': ['user-tag', 'access'],
1105 'type': 'object'},
1106 'UserAccessResult': {'additionalProperties': False,
1107 'properties': {'error': {'$ref': '#/definitions/Error'},
1108 'result': {'$ref': '#/definitions/UserAccess'}},
1109 'type': 'object'},
1110 'UserAccessResults': {'additionalProperties': False,
1111 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
1112 'type': 'array'}},
1113 'type': 'object'},
1114 'UserModel': {'additionalProperties': False,
1115 'properties': {'last-connection': {'format': 'date-time',
1116 'type': 'string'},
1117 'model': {'$ref': '#/definitions/Model'}},
1118 'required': ['model', 'last-connection'],
1119 'type': 'object'},
1120 'UserModelList': {'additionalProperties': False,
1121 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
1122 'type': 'array'}},
1123 'required': ['user-models'],
1124 'type': 'object'}},
1125 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
1126 'type': 'object'},
1127 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1128 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
1129 'type': 'object'},
1130 'ConfigSet': {'properties': {'Params': {'$ref': '#/definitions/ControllerConfigSet'}},
1131 'type': 'object'},
1132 'ControllerAPIInfoForModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1133 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
1134 'type': 'object'},
1135 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
1136 'type': 'object'},
1137 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
1138 'type': 'object'},
1139 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
1140 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
1141 'type': 'object'},
1142 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1143 'Result': {'$ref': '#/definitions/UserAccessResults'}},
1144 'type': 'object'},
1145 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}},
1146 'type': 'object'},
1147 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
1148 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
1149 'type': 'object'},
1150 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
1151 'type': 'object'},
1152 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
1153 'type': 'object'},
1154 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1155 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
1156 'type': 'object'},
1157 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
1158 'Result': {'$ref': '#/definitions/ErrorResults'}},
1159 'type': 'object'},
1160 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
1161 'type': 'object'},
1162 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
1163 'type': 'object'}},
1164 'type': 'object'}
1165
1166
1167 @ReturnMapping(UserModelList)
1168 async def AllModels(self):
1169 '''
1170
1171 Returns -> typing.Sequence[~UserModel]
1172 '''
1173 # map input types to rpc msg
1174 _params = dict()
1175 msg = dict(type='Controller',
1176 request='AllModels',
1177 version=5,
1178 params=_params)
1179
1180 reply = await self.rpc(msg)
1181 return reply
1182
1183
1184
1185 @ReturnMapping(CloudSpecResults)
1186 async def CloudSpec(self, entities):
1187 '''
1188 entities : typing.Sequence[~Entity]
1189 Returns -> typing.Sequence[~CloudSpecResult]
1190 '''
1191 # map input types to rpc msg
1192 _params = dict()
1193 msg = dict(type='Controller',
1194 request='CloudSpec',
1195 version=5,
1196 params=_params)
1197 _params['entities'] = entities
1198 reply = await self.rpc(msg)
1199 return reply
1200
1201
1202
1203 @ReturnMapping(None)
1204 async def ConfigSet(self, config):
1205 '''
1206 config : typing.Mapping[str, typing.Any]
1207 Returns -> None
1208 '''
1209 # map input types to rpc msg
1210 _params = dict()
1211 msg = dict(type='Controller',
1212 request='ConfigSet',
1213 version=5,
1214 params=_params)
1215 _params['config'] = config
1216 reply = await self.rpc(msg)
1217 return reply
1218
1219
1220
1221 @ReturnMapping(ControllerAPIInfoResults)
1222 async def ControllerAPIInfoForModels(self, entities):
1223 '''
1224 entities : typing.Sequence[~Entity]
1225 Returns -> typing.Sequence[~ControllerAPIInfoResult]
1226 '''
1227 # map input types to rpc msg
1228 _params = dict()
1229 msg = dict(type='Controller',
1230 request='ControllerAPIInfoForModels',
1231 version=5,
1232 params=_params)
1233 _params['entities'] = entities
1234 reply = await self.rpc(msg)
1235 return reply
1236
1237
1238
1239 @ReturnMapping(ControllerConfigResult)
1240 async def ControllerConfig(self):
1241 '''
1242
1243 Returns -> typing.Mapping[str, typing.Any]
1244 '''
1245 # map input types to rpc msg
1246 _params = dict()
1247 msg = dict(type='Controller',
1248 request='ControllerConfig',
1249 version=5,
1250 params=_params)
1251
1252 reply = await self.rpc(msg)
1253 return reply
1254
1255
1256
1257 @ReturnMapping(None)
1258 async def DestroyController(self, destroy_models):
1259 '''
1260 destroy_models : bool
1261 Returns -> None
1262 '''
1263 # map input types to rpc msg
1264 _params = dict()
1265 msg = dict(type='Controller',
1266 request='DestroyController',
1267 version=5,
1268 params=_params)
1269 _params['destroy-models'] = destroy_models
1270 reply = await self.rpc(msg)
1271 return reply
1272
1273
1274
1275 @ReturnMapping(CloudSpecResult)
1276 async def GetCloudSpec(self):
1277 '''
1278
1279 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
1280 '''
1281 # map input types to rpc msg
1282 _params = dict()
1283 msg = dict(type='Controller',
1284 request='GetCloudSpec',
1285 version=5,
1286 params=_params)
1287
1288 reply = await self.rpc(msg)
1289 return reply
1290
1291
1292
1293 @ReturnMapping(UserAccessResults)
1294 async def GetControllerAccess(self, entities):
1295 '''
1296 entities : typing.Sequence[~Entity]
1297 Returns -> typing.Sequence[~UserAccessResult]
1298 '''
1299 # map input types to rpc msg
1300 _params = dict()
1301 msg = dict(type='Controller',
1302 request='GetControllerAccess',
1303 version=5,
1304 params=_params)
1305 _params['entities'] = entities
1306 reply = await self.rpc(msg)
1307 return reply
1308
1309
1310
1311 @ReturnMapping(HostedModelConfigsResults)
1312 async def HostedModelConfigs(self):
1313 '''
1314
1315 Returns -> typing.Sequence[~HostedModelConfig]
1316 '''
1317 # map input types to rpc msg
1318 _params = dict()
1319 msg = dict(type='Controller',
1320 request='HostedModelConfigs',
1321 version=5,
1322 params=_params)
1323
1324 reply = await self.rpc(msg)
1325 return reply
1326
1327
1328
1329 @ReturnMapping(InitiateMigrationResults)
1330 async def InitiateMigration(self, specs):
1331 '''
1332 specs : typing.Sequence[~MigrationSpec]
1333 Returns -> typing.Sequence[~InitiateMigrationResult]
1334 '''
1335 # map input types to rpc msg
1336 _params = dict()
1337 msg = dict(type='Controller',
1338 request='InitiateMigration',
1339 version=5,
1340 params=_params)
1341 _params['specs'] = specs
1342 reply = await self.rpc(msg)
1343 return reply
1344
1345
1346
1347 @ReturnMapping(ModelBlockInfoList)
1348 async def ListBlockedModels(self):
1349 '''
1350
1351 Returns -> typing.Sequence[~ModelBlockInfo]
1352 '''
1353 # map input types to rpc msg
1354 _params = dict()
1355 msg = dict(type='Controller',
1356 request='ListBlockedModels',
1357 version=5,
1358 params=_params)
1359
1360 reply = await self.rpc(msg)
1361 return reply
1362
1363
1364
1365 @ReturnMapping(ModelConfigResults)
1366 async def ModelConfig(self):
1367 '''
1368
1369 Returns -> typing.Mapping[str, ~ConfigValue]
1370 '''
1371 # map input types to rpc msg
1372 _params = dict()
1373 msg = dict(type='Controller',
1374 request='ModelConfig',
1375 version=5,
1376 params=_params)
1377
1378 reply = await self.rpc(msg)
1379 return reply
1380
1381
1382
1383 @ReturnMapping(ModelStatusResults)
1384 async def ModelStatus(self, entities):
1385 '''
1386 entities : typing.Sequence[~Entity]
1387 Returns -> typing.Sequence[~ModelStatus]
1388 '''
1389 # map input types to rpc msg
1390 _params = dict()
1391 msg = dict(type='Controller',
1392 request='ModelStatus',
1393 version=5,
1394 params=_params)
1395 _params['entities'] = entities
1396 reply = await self.rpc(msg)
1397 return reply
1398
1399
1400
1401 @ReturnMapping(ErrorResults)
1402 async def ModifyControllerAccess(self, changes):
1403 '''
1404 changes : typing.Sequence[~ModifyControllerAccess]
1405 Returns -> typing.Sequence[~ErrorResult]
1406 '''
1407 # map input types to rpc msg
1408 _params = dict()
1409 msg = dict(type='Controller',
1410 request='ModifyControllerAccess',
1411 version=5,
1412 params=_params)
1413 _params['changes'] = changes
1414 reply = await self.rpc(msg)
1415 return reply
1416
1417
1418
1419 @ReturnMapping(None)
1420 async def RemoveBlocks(self, all_):
1421 '''
1422 all_ : bool
1423 Returns -> None
1424 '''
1425 # map input types to rpc msg
1426 _params = dict()
1427 msg = dict(type='Controller',
1428 request='RemoveBlocks',
1429 version=5,
1430 params=_params)
1431 _params['all'] = all_
1432 reply = await self.rpc(msg)
1433 return reply
1434
1435
1436
1437 @ReturnMapping(AllWatcherId)
1438 async def WatchAllModels(self):
1439 '''
1440
1441 Returns -> str
1442 '''
1443 # map input types to rpc msg
1444 _params = dict()
1445 msg = dict(type='Controller',
1446 request='WatchAllModels',
1447 version=5,
1448 params=_params)
1449
1450 reply = await self.rpc(msg)
1451 return reply
1452
1453
1454
1455 class FirewallerFacade(Type):
1456 name = 'Firewaller'
1457 version = 5
1458 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
1459 'properties': {'error': {'$ref': '#/definitions/Error'},
1460 'result': {'type': 'boolean'}},
1461 'required': ['result'],
1462 'type': 'object'},
1463 'BoolResults': {'additionalProperties': False,
1464 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
1465 'type': 'array'}},
1466 'required': ['results'],
1467 'type': 'object'},
1468 'CloudCredential': {'additionalProperties': False,
1469 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1470 'type': 'object'},
1471 'auth-type': {'type': 'string'},
1472 'redacted': {'items': {'type': 'string'},
1473 'type': 'array'}},
1474 'required': ['auth-type'],
1475 'type': 'object'},
1476 'CloudSpec': {'additionalProperties': False,
1477 'properties': {'cacertificates': {'items': {'type': 'string'},
1478 'type': 'array'},
1479 'credential': {'$ref': '#/definitions/CloudCredential'},
1480 'endpoint': {'type': 'string'},
1481 'identity-endpoint': {'type': 'string'},
1482 'name': {'type': 'string'},
1483 'region': {'type': 'string'},
1484 'storage-endpoint': {'type': 'string'},
1485 'type': {'type': 'string'}},
1486 'required': ['type', 'name'],
1487 'type': 'object'},
1488 'CloudSpecResult': {'additionalProperties': False,
1489 'properties': {'error': {'$ref': '#/definitions/Error'},
1490 'result': {'$ref': '#/definitions/CloudSpec'}},
1491 'type': 'object'},
1492 'CloudSpecResults': {'additionalProperties': False,
1493 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
1494 'type': 'array'}},
1495 'type': 'object'},
1496 'ControllerAPIInfoResult': {'additionalProperties': False,
1497 'properties': {'addresses': {'items': {'type': 'string'},
1498 'type': 'array'},
1499 'cacert': {'type': 'string'},
1500 'error': {'$ref': '#/definitions/Error'}},
1501 'required': ['addresses',
1502 'cacert'],
1503 'type': 'object'},
1504 'ControllerAPIInfoResults': {'additionalProperties': False,
1505 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
1506 'type': 'array'}},
1507 'required': ['results'],
1508 'type': 'object'},
1509 'ControllerConfigResult': {'additionalProperties': False,
1510 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1511 'type': 'object'}},
1512 'type': 'object'}},
1513 'required': ['config'],
1514 'type': 'object'},
1515 'Entities': {'additionalProperties': False,
1516 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1517 'type': 'array'}},
1518 'required': ['entities'],
1519 'type': 'object'},
1520 'Entity': {'additionalProperties': False,
1521 'properties': {'tag': {'type': 'string'}},
1522 'required': ['tag'],
1523 'type': 'object'},
1524 'EntityStatusArgs': {'additionalProperties': False,
1525 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1526 'type': 'object'}},
1527 'type': 'object'},
1528 'info': {'type': 'string'},
1529 'status': {'type': 'string'},
1530 'tag': {'type': 'string'}},
1531 'required': ['tag',
1532 'status',
1533 'info',
1534 'data'],
1535 'type': 'object'},
1536 'Error': {'additionalProperties': False,
1537 'properties': {'code': {'type': 'string'},
1538 'info': {'$ref': '#/definitions/ErrorInfo'},
1539 'message': {'type': 'string'}},
1540 'required': ['message', 'code'],
1541 'type': 'object'},
1542 'ErrorInfo': {'additionalProperties': False,
1543 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1544 'macaroon-path': {'type': 'string'}},
1545 'type': 'object'},
1546 'ErrorResult': {'additionalProperties': False,
1547 'properties': {'error': {'$ref': '#/definitions/Error'}},
1548 'type': 'object'},
1549 'ErrorResults': {'additionalProperties': False,
1550 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1551 'type': 'array'}},
1552 'required': ['results'],
1553 'type': 'object'},
1554 'FirewallRule': {'additionalProperties': False,
1555 'properties': {'known-service': {'type': 'string'},
1556 'whitelist-cidrs': {'items': {'type': 'string'},
1557 'type': 'array'}},
1558 'required': ['known-service'],
1559 'type': 'object'},
1560 'KnownServiceArgs': {'additionalProperties': False,
1561 'properties': {'known-services': {'items': {'type': 'string'},
1562 'type': 'array'}},
1563 'required': ['known-services'],
1564 'type': 'object'},
1565 'LifeResult': {'additionalProperties': False,
1566 'properties': {'error': {'$ref': '#/definitions/Error'},
1567 'life': {'type': 'string'}},
1568 'required': ['life'],
1569 'type': 'object'},
1570 'LifeResults': {'additionalProperties': False,
1571 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1572 'type': 'array'}},
1573 'required': ['results'],
1574 'type': 'object'},
1575 'ListFirewallRulesResults': {'additionalProperties': False,
1576 'properties': {'Rules': {'items': {'$ref': '#/definitions/FirewallRule'},
1577 'type': 'array'}},
1578 'required': ['Rules'],
1579 'type': 'object'},
1580 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1581 'MacaroonResult': {'additionalProperties': False,
1582 'properties': {'error': {'$ref': '#/definitions/Error'},
1583 'result': {'$ref': '#/definitions/Macaroon'}},
1584 'type': 'object'},
1585 'MacaroonResults': {'additionalProperties': False,
1586 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
1587 'type': 'array'}},
1588 'required': ['results'],
1589 'type': 'object'},
1590 'MachinePortRange': {'additionalProperties': False,
1591 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
1592 'relation-tag': {'type': 'string'},
1593 'unit-tag': {'type': 'string'}},
1594 'required': ['unit-tag',
1595 'relation-tag',
1596 'port-range'],
1597 'type': 'object'},
1598 'MachinePorts': {'additionalProperties': False,
1599 'properties': {'machine-tag': {'type': 'string'},
1600 'subnet-tag': {'type': 'string'}},
1601 'required': ['machine-tag', 'subnet-tag'],
1602 'type': 'object'},
1603 'MachinePortsParams': {'additionalProperties': False,
1604 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
1605 'type': 'array'}},
1606 'required': ['params'],
1607 'type': 'object'},
1608 'MachinePortsResult': {'additionalProperties': False,
1609 'properties': {'error': {'$ref': '#/definitions/Error'},
1610 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
1611 'type': 'array'}},
1612 'required': ['ports'],
1613 'type': 'object'},
1614 'MachinePortsResults': {'additionalProperties': False,
1615 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
1616 'type': 'array'}},
1617 'required': ['results'],
1618 'type': 'object'},
1619 'ModelConfigResult': {'additionalProperties': False,
1620 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1621 'type': 'object'}},
1622 'type': 'object'}},
1623 'required': ['config'],
1624 'type': 'object'},
1625 'ModelTag': {'additionalProperties': False, 'type': 'object'},
1626 'NotifyWatchResult': {'additionalProperties': False,
1627 'properties': {'NotifyWatcherId': {'type': 'string'},
1628 'error': {'$ref': '#/definitions/Error'}},
1629 'required': ['NotifyWatcherId'],
1630 'type': 'object'},
1631 'NotifyWatchResults': {'additionalProperties': False,
1632 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1633 'type': 'array'}},
1634 'required': ['results'],
1635 'type': 'object'},
1636 'PortRange': {'additionalProperties': False,
1637 'properties': {'from-port': {'type': 'integer'},
1638 'protocol': {'type': 'string'},
1639 'to-port': {'type': 'integer'}},
1640 'required': ['from-port', 'to-port', 'protocol'],
1641 'type': 'object'},
1642 'SetStatus': {'additionalProperties': False,
1643 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1644 'type': 'array'}},
1645 'required': ['entities'],
1646 'type': 'object'},
1647 'StringResult': {'additionalProperties': False,
1648 'properties': {'error': {'$ref': '#/definitions/Error'},
1649 'result': {'type': 'string'}},
1650 'required': ['result'],
1651 'type': 'object'},
1652 'StringResults': {'additionalProperties': False,
1653 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
1654 'type': 'array'}},
1655 'required': ['results'],
1656 'type': 'object'},
1657 'StringsResult': {'additionalProperties': False,
1658 'properties': {'error': {'$ref': '#/definitions/Error'},
1659 'result': {'items': {'type': 'string'},
1660 'type': 'array'}},
1661 'type': 'object'},
1662 'StringsResults': {'additionalProperties': False,
1663 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1664 'type': 'array'}},
1665 'required': ['results'],
1666 'type': 'object'},
1667 'StringsWatchResult': {'additionalProperties': False,
1668 'properties': {'changes': {'items': {'type': 'string'},
1669 'type': 'array'},
1670 'error': {'$ref': '#/definitions/Error'},
1671 'watcher-id': {'type': 'string'}},
1672 'required': ['watcher-id'],
1673 'type': 'object'},
1674 'StringsWatchResults': {'additionalProperties': False,
1675 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
1676 'type': 'array'}},
1677 'required': ['results'],
1678 'type': 'object'}},
1679 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1680 'Result': {'$ref': '#/definitions/BoolResults'}},
1681 'type': 'object'},
1682 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1683 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
1684 'type': 'object'},
1685 'ControllerAPIInfoForModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1686 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
1687 'type': 'object'},
1688 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
1689 'type': 'object'},
1690 'FirewallRules': {'properties': {'Params': {'$ref': '#/definitions/KnownServiceArgs'},
1691 'Result': {'$ref': '#/definitions/ListFirewallRulesResults'}},
1692 'type': 'object'},
1693 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1694 'Result': {'$ref': '#/definitions/StringResults'}},
1695 'type': 'object'},
1696 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
1697 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
1698 'type': 'object'},
1699 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1700 'Result': {'$ref': '#/definitions/BoolResults'}},
1701 'type': 'object'},
1702 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1703 'Result': {'$ref': '#/definitions/StringsResults'}},
1704 'type': 'object'},
1705 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
1706 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
1707 'type': 'object'},
1708 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1709 'Result': {'$ref': '#/definitions/StringResults'}},
1710 'type': 'object'},
1711 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1712 'Result': {'$ref': '#/definitions/LifeResults'}},
1713 'type': 'object'},
1714 'MacaroonForRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1715 'Result': {'$ref': '#/definitions/MacaroonResults'}},
1716 'type': 'object'},
1717 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1718 'type': 'object'},
1719 'SetRelationsStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1720 'Result': {'$ref': '#/definitions/ErrorResults'}},
1721 'type': 'object'},
1722 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1723 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1724 'type': 'object'},
1725 'WatchEgressAddressesForRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1726 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1727 'type': 'object'},
1728 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1729 'type': 'object'},
1730 'WatchIngressAddressesForRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1731 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1732 'type': 'object'},
1733 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1734 'type': 'object'},
1735 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1736 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1737 'type': 'object'},
1738 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1739 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1740 'type': 'object'}},
1741 'type': 'object'}
1742
1743
1744 @ReturnMapping(BoolResults)
1745 async def AreManuallyProvisioned(self, entities):
1746 '''
1747 entities : typing.Sequence[~Entity]
1748 Returns -> typing.Sequence[~BoolResult]
1749 '''
1750 # map input types to rpc msg
1751 _params = dict()
1752 msg = dict(type='Firewaller',
1753 request='AreManuallyProvisioned',
1754 version=5,
1755 params=_params)
1756 _params['entities'] = entities
1757 reply = await self.rpc(msg)
1758 return reply
1759
1760
1761
1762 @ReturnMapping(CloudSpecResults)
1763 async def CloudSpec(self, entities):
1764 '''
1765 entities : typing.Sequence[~Entity]
1766 Returns -> typing.Sequence[~CloudSpecResult]
1767 '''
1768 # map input types to rpc msg
1769 _params = dict()
1770 msg = dict(type='Firewaller',
1771 request='CloudSpec',
1772 version=5,
1773 params=_params)
1774 _params['entities'] = entities
1775 reply = await self.rpc(msg)
1776 return reply
1777
1778
1779
1780 @ReturnMapping(ControllerAPIInfoResults)
1781 async def ControllerAPIInfoForModels(self, entities):
1782 '''
1783 entities : typing.Sequence[~Entity]
1784 Returns -> typing.Sequence[~ControllerAPIInfoResult]
1785 '''
1786 # map input types to rpc msg
1787 _params = dict()
1788 msg = dict(type='Firewaller',
1789 request='ControllerAPIInfoForModels',
1790 version=5,
1791 params=_params)
1792 _params['entities'] = entities
1793 reply = await self.rpc(msg)
1794 return reply
1795
1796
1797
1798 @ReturnMapping(ControllerConfigResult)
1799 async def ControllerConfig(self):
1800 '''
1801
1802 Returns -> typing.Mapping[str, typing.Any]
1803 '''
1804 # map input types to rpc msg
1805 _params = dict()
1806 msg = dict(type='Firewaller',
1807 request='ControllerConfig',
1808 version=5,
1809 params=_params)
1810
1811 reply = await self.rpc(msg)
1812 return reply
1813
1814
1815
1816 @ReturnMapping(ListFirewallRulesResults)
1817 async def FirewallRules(self, known_services):
1818 '''
1819 known_services : typing.Sequence[str]
1820 Returns -> typing.Sequence[~FirewallRule]
1821 '''
1822 # map input types to rpc msg
1823 _params = dict()
1824 msg = dict(type='Firewaller',
1825 request='FirewallRules',
1826 version=5,
1827 params=_params)
1828 _params['known-services'] = known_services
1829 reply = await self.rpc(msg)
1830 return reply
1831
1832
1833
1834 @ReturnMapping(StringResults)
1835 async def GetAssignedMachine(self, entities):
1836 '''
1837 entities : typing.Sequence[~Entity]
1838 Returns -> typing.Sequence[~StringResult]
1839 '''
1840 # map input types to rpc msg
1841 _params = dict()
1842 msg = dict(type='Firewaller',
1843 request='GetAssignedMachine',
1844 version=5,
1845 params=_params)
1846 _params['entities'] = entities
1847 reply = await self.rpc(msg)
1848 return reply
1849
1850
1851
1852 @ReturnMapping(CloudSpecResult)
1853 async def GetCloudSpec(self):
1854 '''
1855
1856 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
1857 '''
1858 # map input types to rpc msg
1859 _params = dict()
1860 msg = dict(type='Firewaller',
1861 request='GetCloudSpec',
1862 version=5,
1863 params=_params)
1864
1865 reply = await self.rpc(msg)
1866 return reply
1867
1868
1869
1870 @ReturnMapping(BoolResults)
1871 async def GetExposed(self, entities):
1872 '''
1873 entities : typing.Sequence[~Entity]
1874 Returns -> typing.Sequence[~BoolResult]
1875 '''
1876 # map input types to rpc msg
1877 _params = dict()
1878 msg = dict(type='Firewaller',
1879 request='GetExposed',
1880 version=5,
1881 params=_params)
1882 _params['entities'] = entities
1883 reply = await self.rpc(msg)
1884 return reply
1885
1886
1887
1888 @ReturnMapping(StringsResults)
1889 async def GetMachineActiveSubnets(self, entities):
1890 '''
1891 entities : typing.Sequence[~Entity]
1892 Returns -> typing.Sequence[~StringsResult]
1893 '''
1894 # map input types to rpc msg
1895 _params = dict()
1896 msg = dict(type='Firewaller',
1897 request='GetMachineActiveSubnets',
1898 version=5,
1899 params=_params)
1900 _params['entities'] = entities
1901 reply = await self.rpc(msg)
1902 return reply
1903
1904
1905
1906 @ReturnMapping(MachinePortsResults)
1907 async def GetMachinePorts(self, params):
1908 '''
1909 params : typing.Sequence[~MachinePorts]
1910 Returns -> typing.Sequence[~MachinePortsResult]
1911 '''
1912 # map input types to rpc msg
1913 _params = dict()
1914 msg = dict(type='Firewaller',
1915 request='GetMachinePorts',
1916 version=5,
1917 params=_params)
1918 _params['params'] = params
1919 reply = await self.rpc(msg)
1920 return reply
1921
1922
1923
1924 @ReturnMapping(StringResults)
1925 async def InstanceId(self, entities):
1926 '''
1927 entities : typing.Sequence[~Entity]
1928 Returns -> typing.Sequence[~StringResult]
1929 '''
1930 # map input types to rpc msg
1931 _params = dict()
1932 msg = dict(type='Firewaller',
1933 request='InstanceId',
1934 version=5,
1935 params=_params)
1936 _params['entities'] = entities
1937 reply = await self.rpc(msg)
1938 return reply
1939
1940
1941
1942 @ReturnMapping(LifeResults)
1943 async def Life(self, entities):
1944 '''
1945 entities : typing.Sequence[~Entity]
1946 Returns -> typing.Sequence[~LifeResult]
1947 '''
1948 # map input types to rpc msg
1949 _params = dict()
1950 msg = dict(type='Firewaller',
1951 request='Life',
1952 version=5,
1953 params=_params)
1954 _params['entities'] = entities
1955 reply = await self.rpc(msg)
1956 return reply
1957
1958
1959
1960 @ReturnMapping(MacaroonResults)
1961 async def MacaroonForRelations(self, entities):
1962 '''
1963 entities : typing.Sequence[~Entity]
1964 Returns -> typing.Sequence[~MacaroonResult]
1965 '''
1966 # map input types to rpc msg
1967 _params = dict()
1968 msg = dict(type='Firewaller',
1969 request='MacaroonForRelations',
1970 version=5,
1971 params=_params)
1972 _params['entities'] = entities
1973 reply = await self.rpc(msg)
1974 return reply
1975
1976
1977
1978 @ReturnMapping(ModelConfigResult)
1979 async def ModelConfig(self):
1980 '''
1981
1982 Returns -> typing.Mapping[str, typing.Any]
1983 '''
1984 # map input types to rpc msg
1985 _params = dict()
1986 msg = dict(type='Firewaller',
1987 request='ModelConfig',
1988 version=5,
1989 params=_params)
1990
1991 reply = await self.rpc(msg)
1992 return reply
1993
1994
1995
1996 @ReturnMapping(ErrorResults)
1997 async def SetRelationsStatus(self, entities):
1998 '''
1999 entities : typing.Sequence[~EntityStatusArgs]
2000 Returns -> typing.Sequence[~ErrorResult]
2001 '''
2002 # map input types to rpc msg
2003 _params = dict()
2004 msg = dict(type='Firewaller',
2005 request='SetRelationsStatus',
2006 version=5,
2007 params=_params)
2008 _params['entities'] = entities
2009 reply = await self.rpc(msg)
2010 return reply
2011
2012
2013
2014 @ReturnMapping(NotifyWatchResults)
2015 async def Watch(self, entities):
2016 '''
2017 entities : typing.Sequence[~Entity]
2018 Returns -> typing.Sequence[~NotifyWatchResult]
2019 '''
2020 # map input types to rpc msg
2021 _params = dict()
2022 msg = dict(type='Firewaller',
2023 request='Watch',
2024 version=5,
2025 params=_params)
2026 _params['entities'] = entities
2027 reply = await self.rpc(msg)
2028 return reply
2029
2030
2031
2032 @ReturnMapping(StringsWatchResults)
2033 async def WatchEgressAddressesForRelations(self, entities):
2034 '''
2035 entities : typing.Sequence[~Entity]
2036 Returns -> typing.Sequence[~StringsWatchResult]
2037 '''
2038 # map input types to rpc msg
2039 _params = dict()
2040 msg = dict(type='Firewaller',
2041 request='WatchEgressAddressesForRelations',
2042 version=5,
2043 params=_params)
2044 _params['entities'] = entities
2045 reply = await self.rpc(msg)
2046 return reply
2047
2048
2049
2050 @ReturnMapping(NotifyWatchResult)
2051 async def WatchForModelConfigChanges(self):
2052 '''
2053
2054 Returns -> typing.Union[str, _ForwardRef('Error')]
2055 '''
2056 # map input types to rpc msg
2057 _params = dict()
2058 msg = dict(type='Firewaller',
2059 request='WatchForModelConfigChanges',
2060 version=5,
2061 params=_params)
2062
2063 reply = await self.rpc(msg)
2064 return reply
2065
2066
2067
2068 @ReturnMapping(StringsWatchResults)
2069 async def WatchIngressAddressesForRelations(self, entities):
2070 '''
2071 entities : typing.Sequence[~Entity]
2072 Returns -> typing.Sequence[~StringsWatchResult]
2073 '''
2074 # map input types to rpc msg
2075 _params = dict()
2076 msg = dict(type='Firewaller',
2077 request='WatchIngressAddressesForRelations',
2078 version=5,
2079 params=_params)
2080 _params['entities'] = entities
2081 reply = await self.rpc(msg)
2082 return reply
2083
2084
2085
2086 @ReturnMapping(StringsWatchResult)
2087 async def WatchModelMachines(self):
2088 '''
2089
2090 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
2091 '''
2092 # map input types to rpc msg
2093 _params = dict()
2094 msg = dict(type='Firewaller',
2095 request='WatchModelMachines',
2096 version=5,
2097 params=_params)
2098
2099 reply = await self.rpc(msg)
2100 return reply
2101
2102
2103
2104 @ReturnMapping(StringsWatchResults)
2105 async def WatchOpenedPorts(self, entities):
2106 '''
2107 entities : typing.Sequence[~Entity]
2108 Returns -> typing.Sequence[~StringsWatchResult]
2109 '''
2110 # map input types to rpc msg
2111 _params = dict()
2112 msg = dict(type='Firewaller',
2113 request='WatchOpenedPorts',
2114 version=5,
2115 params=_params)
2116 _params['entities'] = entities
2117 reply = await self.rpc(msg)
2118 return reply
2119
2120
2121
2122 @ReturnMapping(StringsWatchResults)
2123 async def WatchUnits(self, entities):
2124 '''
2125 entities : typing.Sequence[~Entity]
2126 Returns -> typing.Sequence[~StringsWatchResult]
2127 '''
2128 # map input types to rpc msg
2129 _params = dict()
2130 msg = dict(type='Firewaller',
2131 request='WatchUnits',
2132 version=5,
2133 params=_params)
2134 _params['entities'] = entities
2135 reply = await self.rpc(msg)
2136 return reply
2137
2138
2139
2140 class MachineManagerFacade(Type):
2141 name = 'MachineManager'
2142 version = 5
2143 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
2144 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
2145 'type': 'array'},
2146 'constraints': {'$ref': '#/definitions/Value'},
2147 'container-type': {'type': 'string'},
2148 'disks': {'items': {'$ref': '#/definitions/Constraints'},
2149 'type': 'array'},
2150 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2151 'instance-id': {'type': 'string'},
2152 'jobs': {'items': {'type': 'string'},
2153 'type': 'array'},
2154 'nonce': {'type': 'string'},
2155 'parent-id': {'type': 'string'},
2156 'placement': {'$ref': '#/definitions/Placement'},
2157 'series': {'type': 'string'}},
2158 'required': ['series',
2159 'constraints',
2160 'jobs',
2161 'parent-id',
2162 'container-type',
2163 'instance-id',
2164 'nonce',
2165 'hardware-characteristics',
2166 'addresses'],
2167 'type': 'object'},
2168 'AddMachines': {'additionalProperties': False,
2169 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
2170 'type': 'array'}},
2171 'required': ['params'],
2172 'type': 'object'},
2173 'AddMachinesResult': {'additionalProperties': False,
2174 'properties': {'error': {'$ref': '#/definitions/Error'},
2175 'machine': {'type': 'string'}},
2176 'required': ['machine'],
2177 'type': 'object'},
2178 'AddMachinesResults': {'additionalProperties': False,
2179 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
2180 'type': 'array'}},
2181 'required': ['machines'],
2182 'type': 'object'},
2183 'Address': {'additionalProperties': False,
2184 'properties': {'scope': {'type': 'string'},
2185 'space-name': {'type': 'string'},
2186 'type': {'type': 'string'},
2187 'value': {'type': 'string'}},
2188 'required': ['value', 'type', 'scope'],
2189 'type': 'object'},
2190 'Constraints': {'additionalProperties': False,
2191 'properties': {'Count': {'type': 'integer'},
2192 'Pool': {'type': 'string'},
2193 'Size': {'type': 'integer'}},
2194 'required': ['Pool', 'Size', 'Count'],
2195 'type': 'object'},
2196 'DestroyMachineInfo': {'additionalProperties': False,
2197 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
2198 'type': 'array'},
2199 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
2200 'type': 'array'},
2201 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
2202 'type': 'array'}},
2203 'type': 'object'},
2204 'DestroyMachineResult': {'additionalProperties': False,
2205 'properties': {'error': {'$ref': '#/definitions/Error'},
2206 'info': {'$ref': '#/definitions/DestroyMachineInfo'}},
2207 'type': 'object'},
2208 'DestroyMachineResults': {'additionalProperties': False,
2209 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyMachineResult'},
2210 'type': 'array'}},
2211 'type': 'object'},
2212 'DestroyMachinesParams': {'additionalProperties': False,
2213 'properties': {'force': {'type': 'boolean'},
2214 'keep': {'type': 'boolean'},
2215 'machine-tags': {'items': {'type': 'string'},
2216 'type': 'array'}},
2217 'required': ['machine-tags'],
2218 'type': 'object'},
2219 'Entities': {'additionalProperties': False,
2220 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2221 'type': 'array'}},
2222 'required': ['entities'],
2223 'type': 'object'},
2224 'Entity': {'additionalProperties': False,
2225 'properties': {'tag': {'type': 'string'}},
2226 'required': ['tag'],
2227 'type': 'object'},
2228 'Error': {'additionalProperties': False,
2229 'properties': {'code': {'type': 'string'},
2230 'info': {'$ref': '#/definitions/ErrorInfo'},
2231 'message': {'type': 'string'}},
2232 'required': ['message', 'code'],
2233 'type': 'object'},
2234 'ErrorInfo': {'additionalProperties': False,
2235 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2236 'macaroon-path': {'type': 'string'}},
2237 'type': 'object'},
2238 'ErrorResult': {'additionalProperties': False,
2239 'properties': {'error': {'$ref': '#/definitions/Error'}},
2240 'type': 'object'},
2241 'HardwareCharacteristics': {'additionalProperties': False,
2242 'properties': {'arch': {'type': 'string'},
2243 'availability-zone': {'type': 'string'},
2244 'cpu-cores': {'type': 'integer'},
2245 'cpu-power': {'type': 'integer'},
2246 'mem': {'type': 'integer'},
2247 'root-disk': {'type': 'integer'},
2248 'tags': {'items': {'type': 'string'},
2249 'type': 'array'}},
2250 'type': 'object'},
2251 'InstanceType': {'additionalProperties': False,
2252 'properties': {'arches': {'items': {'type': 'string'},
2253 'type': 'array'},
2254 'cost': {'type': 'integer'},
2255 'cpu-cores': {'type': 'integer'},
2256 'deprecated': {'type': 'boolean'},
2257 'memory': {'type': 'integer'},
2258 'name': {'type': 'string'},
2259 'root-disk': {'type': 'integer'},
2260 'virt-type': {'type': 'string'}},
2261 'required': ['arches', 'cpu-cores', 'memory'],
2262 'type': 'object'},
2263 'InstanceTypesResult': {'additionalProperties': False,
2264 'properties': {'cost-currency': {'type': 'string'},
2265 'cost-divisor': {'type': 'integer'},
2266 'cost-unit': {'type': 'string'},
2267 'error': {'$ref': '#/definitions/Error'},
2268 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
2269 'type': 'array'}},
2270 'type': 'object'},
2271 'InstanceTypesResults': {'additionalProperties': False,
2272 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
2273 'type': 'array'}},
2274 'required': ['results'],
2275 'type': 'object'},
2276 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2277 'ModelInstanceTypesConstraint': {'additionalProperties': False,
2278 'properties': {'value': {'$ref': '#/definitions/Value'}},
2279 'type': 'object'},
2280 'ModelInstanceTypesConstraints': {'additionalProperties': False,
2281 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
2282 'type': 'array'}},
2283 'required': ['constraints'],
2284 'type': 'object'},
2285 'NotifyWatchResult': {'additionalProperties': False,
2286 'properties': {'NotifyWatcherId': {'type': 'string'},
2287 'error': {'$ref': '#/definitions/Error'}},
2288 'required': ['NotifyWatcherId'],
2289 'type': 'object'},
2290 'NotifyWatchResults': {'additionalProperties': False,
2291 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
2292 'type': 'array'}},
2293 'required': ['results'],
2294 'type': 'object'},
2295 'Placement': {'additionalProperties': False,
2296 'properties': {'directive': {'type': 'string'},
2297 'scope': {'type': 'string'}},
2298 'required': ['scope', 'directive'],
2299 'type': 'object'},
2300 'StringsResult': {'additionalProperties': False,
2301 'properties': {'error': {'$ref': '#/definitions/Error'},
2302 'result': {'items': {'type': 'string'},
2303 'type': 'array'}},
2304 'type': 'object'},
2305 'StringsResults': {'additionalProperties': False,
2306 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
2307 'type': 'array'}},
2308 'required': ['results'],
2309 'type': 'object'},
2310 'UpdateSeriesArg': {'additionalProperties': False,
2311 'properties': {'force': {'type': 'boolean'},
2312 'series': {'type': 'string'},
2313 'tag': {'$ref': '#/definitions/Entity'}},
2314 'required': ['tag', 'force', 'series'],
2315 'type': 'object'},
2316 'UpdateSeriesArgs': {'additionalProperties': False,
2317 'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSeriesArg'},
2318 'type': 'array'}},
2319 'required': ['args'],
2320 'type': 'object'},
2321 'UpgradeSeriesNotificationParam': {'additionalProperties': False,
2322 'properties': {'entity': {'$ref': '#/definitions/Entity'},
2323 'watcher-id': {'type': 'string'}},
2324 'required': ['entity',
2325 'watcher-id'],
2326 'type': 'object'},
2327 'UpgradeSeriesNotificationParams': {'additionalProperties': False,
2328 'properties': {'params': {'items': {'$ref': '#/definitions/UpgradeSeriesNotificationParam'},
2329 'type': 'array'}},
2330 'required': ['params'],
2331 'type': 'object'},
2332 'UpgradeSeriesUnitsResult': {'additionalProperties': False,
2333 'properties': {'error': {'$ref': '#/definitions/Error'},
2334 'unit-names': {'items': {'type': 'string'},
2335 'type': 'array'}},
2336 'required': ['unit-names'],
2337 'type': 'object'},
2338 'UpgradeSeriesUnitsResults': {'additionalProperties': False,
2339 'properties': {'Results': {'items': {'$ref': '#/definitions/UpgradeSeriesUnitsResult'},
2340 'type': 'array'}},
2341 'required': ['Results'],
2342 'type': 'object'},
2343 'Value': {'additionalProperties': False,
2344 'properties': {'arch': {'type': 'string'},
2345 'container': {'type': 'string'},
2346 'cores': {'type': 'integer'},
2347 'cpu-power': {'type': 'integer'},
2348 'instance-type': {'type': 'string'},
2349 'mem': {'type': 'integer'},
2350 'root-disk': {'type': 'integer'},
2351 'spaces': {'items': {'type': 'string'},
2352 'type': 'array'},
2353 'tags': {'items': {'type': 'string'},
2354 'type': 'array'},
2355 'virt-type': {'type': 'string'},
2356 'zones': {'items': {'type': 'string'},
2357 'type': 'array'}},
2358 'type': 'object'}},
2359 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2360 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2361 'type': 'object'},
2362 'DestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2363 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2364 'type': 'object'},
2365 'DestroyMachineWithParams': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachinesParams'},
2366 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2367 'type': 'object'},
2368 'ForceDestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2369 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2370 'type': 'object'},
2371 'GetUpgradeSeriesMessages': {'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesNotificationParams'},
2372 'Result': {'$ref': '#/definitions/StringsResults'}},
2373 'type': 'object'},
2374 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
2375 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
2376 'type': 'object'},
2377 'UpgradeSeriesComplete': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArg'},
2378 'Result': {'$ref': '#/definitions/ErrorResult'}},
2379 'type': 'object'},
2380 'UpgradeSeriesPrepare': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArg'},
2381 'Result': {'$ref': '#/definitions/ErrorResult'}},
2382 'type': 'object'},
2383 'UpgradeSeriesValidate': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArgs'},
2384 'Result': {'$ref': '#/definitions/UpgradeSeriesUnitsResults'}},
2385 'type': 'object'},
2386 'WatchUpgradeSeriesNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2387 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
2388 'type': 'object'}},
2389 'type': 'object'}
2390
2391
2392 @ReturnMapping(AddMachinesResults)
2393 async def AddMachines(self, params):
2394 '''
2395 params : typing.Sequence[~AddMachineParams]
2396 Returns -> typing.Sequence[~AddMachinesResult]
2397 '''
2398 # map input types to rpc msg
2399 _params = dict()
2400 msg = dict(type='MachineManager',
2401 request='AddMachines',
2402 version=5,
2403 params=_params)
2404 _params['params'] = params
2405 reply = await self.rpc(msg)
2406 return reply
2407
2408
2409
2410 @ReturnMapping(DestroyMachineResults)
2411 async def DestroyMachine(self, entities):
2412 '''
2413 entities : typing.Sequence[~Entity]
2414 Returns -> typing.Sequence[~DestroyMachineResult]
2415 '''
2416 # map input types to rpc msg
2417 _params = dict()
2418 msg = dict(type='MachineManager',
2419 request='DestroyMachine',
2420 version=5,
2421 params=_params)
2422 _params['entities'] = entities
2423 reply = await self.rpc(msg)
2424 return reply
2425
2426
2427
2428 @ReturnMapping(DestroyMachineResults)
2429 async def DestroyMachineWithParams(self, force, keep, machine_tags):
2430 '''
2431 force : bool
2432 keep : bool
2433 machine_tags : typing.Sequence[str]
2434 Returns -> typing.Sequence[~DestroyMachineResult]
2435 '''
2436 # map input types to rpc msg
2437 _params = dict()
2438 msg = dict(type='MachineManager',
2439 request='DestroyMachineWithParams',
2440 version=5,
2441 params=_params)
2442 _params['force'] = force
2443 _params['keep'] = keep
2444 _params['machine-tags'] = machine_tags
2445 reply = await self.rpc(msg)
2446 return reply
2447
2448
2449
2450 @ReturnMapping(DestroyMachineResults)
2451 async def ForceDestroyMachine(self, entities):
2452 '''
2453 entities : typing.Sequence[~Entity]
2454 Returns -> typing.Sequence[~DestroyMachineResult]
2455 '''
2456 # map input types to rpc msg
2457 _params = dict()
2458 msg = dict(type='MachineManager',
2459 request='ForceDestroyMachine',
2460 version=5,
2461 params=_params)
2462 _params['entities'] = entities
2463 reply = await self.rpc(msg)
2464 return reply
2465
2466
2467
2468 @ReturnMapping(StringsResults)
2469 async def GetUpgradeSeriesMessages(self, params):
2470 '''
2471 params : typing.Sequence[~UpgradeSeriesNotificationParam]
2472 Returns -> typing.Sequence[~StringsResult]
2473 '''
2474 # map input types to rpc msg
2475 _params = dict()
2476 msg = dict(type='MachineManager',
2477 request='GetUpgradeSeriesMessages',
2478 version=5,
2479 params=_params)
2480 _params['params'] = params
2481 reply = await self.rpc(msg)
2482 return reply
2483
2484
2485
2486 @ReturnMapping(InstanceTypesResults)
2487 async def InstanceTypes(self, constraints):
2488 '''
2489 constraints : typing.Sequence[~ModelInstanceTypesConstraint]
2490 Returns -> typing.Sequence[~InstanceTypesResult]
2491 '''
2492 # map input types to rpc msg
2493 _params = dict()
2494 msg = dict(type='MachineManager',
2495 request='InstanceTypes',
2496 version=5,
2497 params=_params)
2498 _params['constraints'] = constraints
2499 reply = await self.rpc(msg)
2500 return reply
2501
2502
2503
2504 @ReturnMapping(ErrorResult)
2505 async def UpgradeSeriesComplete(self, force, series, tag):
2506 '''
2507 force : bool
2508 series : str
2509 tag : Entity
2510 Returns -> Error
2511 '''
2512 # map input types to rpc msg
2513 _params = dict()
2514 msg = dict(type='MachineManager',
2515 request='UpgradeSeriesComplete',
2516 version=5,
2517 params=_params)
2518 _params['force'] = force
2519 _params['series'] = series
2520 _params['tag'] = tag
2521 reply = await self.rpc(msg)
2522 return reply
2523
2524
2525
2526 @ReturnMapping(ErrorResult)
2527 async def UpgradeSeriesPrepare(self, force, series, tag):
2528 '''
2529 force : bool
2530 series : str
2531 tag : Entity
2532 Returns -> Error
2533 '''
2534 # map input types to rpc msg
2535 _params = dict()
2536 msg = dict(type='MachineManager',
2537 request='UpgradeSeriesPrepare',
2538 version=5,
2539 params=_params)
2540 _params['force'] = force
2541 _params['series'] = series
2542 _params['tag'] = tag
2543 reply = await self.rpc(msg)
2544 return reply
2545
2546
2547
2548 @ReturnMapping(UpgradeSeriesUnitsResults)
2549 async def UpgradeSeriesValidate(self, args):
2550 '''
2551 args : typing.Sequence[~UpdateSeriesArg]
2552 Returns -> typing.Sequence[~UpgradeSeriesUnitsResult]
2553 '''
2554 # map input types to rpc msg
2555 _params = dict()
2556 msg = dict(type='MachineManager',
2557 request='UpgradeSeriesValidate',
2558 version=5,
2559 params=_params)
2560 _params['args'] = args
2561 reply = await self.rpc(msg)
2562 return reply
2563
2564
2565
2566 @ReturnMapping(NotifyWatchResults)
2567 async def WatchUpgradeSeriesNotifications(self, entities):
2568 '''
2569 entities : typing.Sequence[~Entity]
2570 Returns -> typing.Sequence[~NotifyWatchResult]
2571 '''
2572 # map input types to rpc msg
2573 _params = dict()
2574 msg = dict(type='MachineManager',
2575 request='WatchUpgradeSeriesNotifications',
2576 version=5,
2577 params=_params)
2578 _params['entities'] = entities
2579 reply = await self.rpc(msg)
2580 return reply
2581
2582
2583
2584 class ModelManagerFacade(Type):
2585 name = 'ModelManager'
2586 version = 5
2587 schema = {'definitions': {'ChangeModelCredentialParams': {'additionalProperties': False,
2588 'properties': {'credential-tag': {'type': 'string'},
2589 'model-tag': {'type': 'string'}},
2590 'required': ['model-tag',
2591 'credential-tag'],
2592 'type': 'object'},
2593 'ChangeModelCredentialsParams': {'additionalProperties': False,
2594 'properties': {'model-credentials': {'items': {'$ref': '#/definitions/ChangeModelCredentialParams'},
2595 'type': 'array'}},
2596 'required': ['model-credentials'],
2597 'type': 'object'},
2598 'DestroyModelParams': {'additionalProperties': False,
2599 'properties': {'destroy-storage': {'type': 'boolean'},
2600 'model-tag': {'type': 'string'}},
2601 'required': ['model-tag'],
2602 'type': 'object'},
2603 'DestroyModelsParams': {'additionalProperties': False,
2604 'properties': {'models': {'items': {'$ref': '#/definitions/DestroyModelParams'},
2605 'type': 'array'}},
2606 'required': ['models'],
2607 'type': 'object'},
2608 'DumpModelRequest': {'additionalProperties': False,
2609 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2610 'type': 'array'},
2611 'simplified': {'type': 'boolean'}},
2612 'required': ['entities', 'simplified'],
2613 'type': 'object'},
2614 'Entities': {'additionalProperties': False,
2615 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2616 'type': 'array'}},
2617 'required': ['entities'],
2618 'type': 'object'},
2619 'Entity': {'additionalProperties': False,
2620 'properties': {'tag': {'type': 'string'}},
2621 'required': ['tag'],
2622 'type': 'object'},
2623 'EntityStatus': {'additionalProperties': False,
2624 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2625 'type': 'object'}},
2626 'type': 'object'},
2627 'info': {'type': 'string'},
2628 'since': {'format': 'date-time',
2629 'type': 'string'},
2630 'status': {'type': 'string'}},
2631 'required': ['status', 'info', 'since'],
2632 'type': 'object'},
2633 'Error': {'additionalProperties': False,
2634 'properties': {'code': {'type': 'string'},
2635 'info': {'$ref': '#/definitions/ErrorInfo'},
2636 'message': {'type': 'string'}},
2637 'required': ['message', 'code'],
2638 'type': 'object'},
2639 'ErrorInfo': {'additionalProperties': False,
2640 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2641 'macaroon-path': {'type': 'string'}},
2642 'type': 'object'},
2643 'ErrorResult': {'additionalProperties': False,
2644 'properties': {'error': {'$ref': '#/definitions/Error'}},
2645 'type': 'object'},
2646 'ErrorResults': {'additionalProperties': False,
2647 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2648 'type': 'array'}},
2649 'required': ['results'],
2650 'type': 'object'},
2651 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2652 'MachineHardware': {'additionalProperties': False,
2653 'properties': {'arch': {'type': 'string'},
2654 'availability-zone': {'type': 'string'},
2655 'cores': {'type': 'integer'},
2656 'cpu-power': {'type': 'integer'},
2657 'mem': {'type': 'integer'},
2658 'root-disk': {'type': 'integer'},
2659 'tags': {'items': {'type': 'string'},
2660 'type': 'array'}},
2661 'type': 'object'},
2662 'MapResult': {'additionalProperties': False,
2663 'properties': {'error': {'$ref': '#/definitions/Error'},
2664 'result': {'patternProperties': {'.*': {'additionalProperties': True,
2665 'type': 'object'}},
2666 'type': 'object'}},
2667 'required': ['result'],
2668 'type': 'object'},
2669 'MapResults': {'additionalProperties': False,
2670 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
2671 'type': 'array'}},
2672 'required': ['results'],
2673 'type': 'object'},
2674 'Model': {'additionalProperties': False,
2675 'properties': {'name': {'type': 'string'},
2676 'owner-tag': {'type': 'string'},
2677 'type': {'type': 'string'},
2678 'uuid': {'type': 'string'}},
2679 'required': ['name', 'uuid', 'type', 'owner-tag'],
2680 'type': 'object'},
2681 'ModelCreateArgs': {'additionalProperties': False,
2682 'properties': {'cloud-tag': {'type': 'string'},
2683 'config': {'patternProperties': {'.*': {'additionalProperties': True,
2684 'type': 'object'}},
2685 'type': 'object'},
2686 'credential': {'type': 'string'},
2687 'name': {'type': 'string'},
2688 'owner-tag': {'type': 'string'},
2689 'region': {'type': 'string'}},
2690 'required': ['name', 'owner-tag'],
2691 'type': 'object'},
2692 'ModelDefaultValues': {'additionalProperties': False,
2693 'properties': {'cloud-region': {'type': 'string'},
2694 'cloud-tag': {'type': 'string'},
2695 'config': {'patternProperties': {'.*': {'additionalProperties': True,
2696 'type': 'object'}},
2697 'type': 'object'}},
2698 'required': ['config'],
2699 'type': 'object'},
2700 'ModelDefaults': {'additionalProperties': False,
2701 'properties': {'controller': {'additionalProperties': True,
2702 'type': 'object'},
2703 'default': {'additionalProperties': True,
2704 'type': 'object'},
2705 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
2706 'type': 'array'}},
2707 'type': 'object'},
2708 'ModelDefaultsResult': {'additionalProperties': False,
2709 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
2710 'type': 'object'}},
2711 'required': ['config'],
2712 'type': 'object'},
2713 'ModelEntityCount': {'additionalProperties': False,
2714 'properties': {'count': {'type': 'integer'},
2715 'entity': {'type': 'string'}},
2716 'required': ['entity', 'count'],
2717 'type': 'object'},
2718 'ModelFilesystemInfo': {'additionalProperties': False,
2719 'properties': {'detachable': {'type': 'boolean'},
2720 'id': {'type': 'string'},
2721 'message': {'type': 'string'},
2722 'provider-id': {'type': 'string'},
2723 'status': {'type': 'string'}},
2724 'required': ['id'],
2725 'type': 'object'},
2726 'ModelInfo': {'additionalProperties': False,
2727 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
2728 'cloud-credential-tag': {'type': 'string'},
2729 'cloud-region': {'type': 'string'},
2730 'cloud-tag': {'type': 'string'},
2731 'controller-uuid': {'type': 'string'},
2732 'default-series': {'type': 'string'},
2733 'life': {'type': 'string'},
2734 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
2735 'type': 'array'},
2736 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
2737 'name': {'type': 'string'},
2738 'owner-tag': {'type': 'string'},
2739 'provider-type': {'type': 'string'},
2740 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
2741 'status': {'$ref': '#/definitions/EntityStatus'},
2742 'type': {'type': 'string'},
2743 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
2744 'type': 'array'},
2745 'uuid': {'type': 'string'}},
2746 'required': ['name',
2747 'type',
2748 'uuid',
2749 'controller-uuid',
2750 'cloud-tag',
2751 'owner-tag',
2752 'life',
2753 'users',
2754 'machines',
2755 'sla',
2756 'agent-version'],
2757 'type': 'object'},
2758 'ModelInfoResult': {'additionalProperties': False,
2759 'properties': {'error': {'$ref': '#/definitions/Error'},
2760 'result': {'$ref': '#/definitions/ModelInfo'}},
2761 'type': 'object'},
2762 'ModelInfoResults': {'additionalProperties': False,
2763 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
2764 'type': 'array'}},
2765 'required': ['results'],
2766 'type': 'object'},
2767 'ModelMachineInfo': {'additionalProperties': False,
2768 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
2769 'has-vote': {'type': 'boolean'},
2770 'id': {'type': 'string'},
2771 'instance-id': {'type': 'string'},
2772 'message': {'type': 'string'},
2773 'status': {'type': 'string'},
2774 'wants-vote': {'type': 'boolean'}},
2775 'required': ['id'],
2776 'type': 'object'},
2777 'ModelMigrationStatus': {'additionalProperties': False,
2778 'properties': {'end': {'format': 'date-time',
2779 'type': 'string'},
2780 'start': {'format': 'date-time',
2781 'type': 'string'},
2782 'status': {'type': 'string'}},
2783 'required': ['status', 'start'],
2784 'type': 'object'},
2785 'ModelSLAInfo': {'additionalProperties': False,
2786 'properties': {'level': {'type': 'string'},
2787 'owner': {'type': 'string'}},
2788 'required': ['level', 'owner'],
2789 'type': 'object'},
2790 'ModelStatus': {'additionalProperties': False,
2791 'properties': {'application-count': {'type': 'integer'},
2792 'error': {'$ref': '#/definitions/Error'},
2793 'filesystems': {'items': {'$ref': '#/definitions/ModelFilesystemInfo'},
2794 'type': 'array'},
2795 'hosted-machine-count': {'type': 'integer'},
2796 'life': {'type': 'string'},
2797 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
2798 'type': 'array'},
2799 'model-tag': {'type': 'string'},
2800 'owner-tag': {'type': 'string'},
2801 'volumes': {'items': {'$ref': '#/definitions/ModelVolumeInfo'},
2802 'type': 'array'}},
2803 'required': ['model-tag',
2804 'life',
2805 'hosted-machine-count',
2806 'application-count',
2807 'owner-tag'],
2808 'type': 'object'},
2809 'ModelStatusResults': {'additionalProperties': False,
2810 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
2811 'type': 'array'}},
2812 'required': ['models'],
2813 'type': 'object'},
2814 'ModelSummariesRequest': {'additionalProperties': False,
2815 'properties': {'all': {'type': 'boolean'},
2816 'user-tag': {'type': 'string'}},
2817 'required': ['user-tag'],
2818 'type': 'object'},
2819 'ModelSummary': {'additionalProperties': False,
2820 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
2821 'cloud-credential-tag': {'type': 'string'},
2822 'cloud-region': {'type': 'string'},
2823 'cloud-tag': {'type': 'string'},
2824 'controller-uuid': {'type': 'string'},
2825 'counts': {'items': {'$ref': '#/definitions/ModelEntityCount'},
2826 'type': 'array'},
2827 'default-series': {'type': 'string'},
2828 'last-connection': {'format': 'date-time',
2829 'type': 'string'},
2830 'life': {'type': 'string'},
2831 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
2832 'name': {'type': 'string'},
2833 'owner-tag': {'type': 'string'},
2834 'provider-type': {'type': 'string'},
2835 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
2836 'status': {'$ref': '#/definitions/EntityStatus'},
2837 'type': {'type': 'string'},
2838 'user-access': {'type': 'string'},
2839 'uuid': {'type': 'string'}},
2840 'required': ['name',
2841 'uuid',
2842 'type',
2843 'controller-uuid',
2844 'cloud-tag',
2845 'owner-tag',
2846 'life',
2847 'user-access',
2848 'last-connection',
2849 'counts',
2850 'sla',
2851 'agent-version'],
2852 'type': 'object'},
2853 'ModelSummaryResult': {'additionalProperties': False,
2854 'properties': {'error': {'$ref': '#/definitions/Error'},
2855 'result': {'$ref': '#/definitions/ModelSummary'}},
2856 'type': 'object'},
2857 'ModelSummaryResults': {'additionalProperties': False,
2858 'properties': {'results': {'items': {'$ref': '#/definitions/ModelSummaryResult'},
2859 'type': 'array'}},
2860 'required': ['results'],
2861 'type': 'object'},
2862 'ModelUnsetKeys': {'additionalProperties': False,
2863 'properties': {'cloud-region': {'type': 'string'},
2864 'cloud-tag': {'type': 'string'},
2865 'keys': {'items': {'type': 'string'},
2866 'type': 'array'}},
2867 'required': ['keys'],
2868 'type': 'object'},
2869 'ModelUserInfo': {'additionalProperties': False,
2870 'properties': {'access': {'type': 'string'},
2871 'display-name': {'type': 'string'},
2872 'last-connection': {'format': 'date-time',
2873 'type': 'string'},
2874 'user': {'type': 'string'}},
2875 'required': ['user',
2876 'display-name',
2877 'last-connection',
2878 'access'],
2879 'type': 'object'},
2880 'ModelVolumeInfo': {'additionalProperties': False,
2881 'properties': {'detachable': {'type': 'boolean'},
2882 'id': {'type': 'string'},
2883 'message': {'type': 'string'},
2884 'provider-id': {'type': 'string'},
2885 'status': {'type': 'string'}},
2886 'required': ['id'],
2887 'type': 'object'},
2888 'ModifyModelAccess': {'additionalProperties': False,
2889 'properties': {'access': {'type': 'string'},
2890 'action': {'type': 'string'},
2891 'model-tag': {'type': 'string'},
2892 'user-tag': {'type': 'string'}},
2893 'required': ['user-tag',
2894 'action',
2895 'access',
2896 'model-tag'],
2897 'type': 'object'},
2898 'ModifyModelAccessRequest': {'additionalProperties': False,
2899 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
2900 'type': 'array'}},
2901 'required': ['changes'],
2902 'type': 'object'},
2903 'Number': {'additionalProperties': False,
2904 'properties': {'Build': {'type': 'integer'},
2905 'Major': {'type': 'integer'},
2906 'Minor': {'type': 'integer'},
2907 'Patch': {'type': 'integer'},
2908 'Tag': {'type': 'string'}},
2909 'required': ['Major',
2910 'Minor',
2911 'Tag',
2912 'Patch',
2913 'Build'],
2914 'type': 'object'},
2915 'RegionDefaults': {'additionalProperties': False,
2916 'properties': {'region-name': {'type': 'string'},
2917 'value': {'additionalProperties': True,
2918 'type': 'object'}},
2919 'required': ['region-name', 'value'],
2920 'type': 'object'},
2921 'SetModelDefaults': {'additionalProperties': False,
2922 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
2923 'type': 'array'}},
2924 'required': ['config'],
2925 'type': 'object'},
2926 'StringResult': {'additionalProperties': False,
2927 'properties': {'error': {'$ref': '#/definitions/Error'},
2928 'result': {'type': 'string'}},
2929 'required': ['result'],
2930 'type': 'object'},
2931 'StringResults': {'additionalProperties': False,
2932 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2933 'type': 'array'}},
2934 'required': ['results'],
2935 'type': 'object'},
2936 'UnsetModelDefaults': {'additionalProperties': False,
2937 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
2938 'type': 'array'}},
2939 'required': ['keys'],
2940 'type': 'object'},
2941 'UserModel': {'additionalProperties': False,
2942 'properties': {'last-connection': {'format': 'date-time',
2943 'type': 'string'},
2944 'model': {'$ref': '#/definitions/Model'}},
2945 'required': ['model', 'last-connection'],
2946 'type': 'object'},
2947 'UserModelList': {'additionalProperties': False,
2948 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
2949 'type': 'array'}},
2950 'required': ['user-models'],
2951 'type': 'object'}},
2952 'properties': {'ChangeModelCredential': {'properties': {'Params': {'$ref': '#/definitions/ChangeModelCredentialsParams'},
2953 'Result': {'$ref': '#/definitions/ErrorResults'}},
2954 'type': 'object'},
2955 'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
2956 'Result': {'$ref': '#/definitions/ModelInfo'}},
2957 'type': 'object'},
2958 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/DestroyModelsParams'},
2959 'Result': {'$ref': '#/definitions/ErrorResults'}},
2960 'type': 'object'},
2961 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/DumpModelRequest'},
2962 'Result': {'$ref': '#/definitions/StringResults'}},
2963 'type': 'object'},
2964 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2965 'Result': {'$ref': '#/definitions/MapResults'}},
2966 'type': 'object'},
2967 'ListModelSummaries': {'properties': {'Params': {'$ref': '#/definitions/ModelSummariesRequest'},
2968 'Result': {'$ref': '#/definitions/ModelSummaryResults'}},
2969 'type': 'object'},
2970 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
2971 'Result': {'$ref': '#/definitions/UserModelList'}},
2972 'type': 'object'},
2973 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
2974 'type': 'object'},
2975 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2976 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
2977 'type': 'object'},
2978 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2979 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
2980 'type': 'object'},
2981 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
2982 'Result': {'$ref': '#/definitions/ErrorResults'}},
2983 'type': 'object'},
2984 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
2985 'Result': {'$ref': '#/definitions/ErrorResults'}},
2986 'type': 'object'},
2987 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
2988 'Result': {'$ref': '#/definitions/ErrorResults'}},
2989 'type': 'object'}},
2990 'type': 'object'}
2991
2992
2993 @ReturnMapping(ErrorResults)
2994 async def ChangeModelCredential(self, model_credentials):
2995 '''
2996 model_credentials : typing.Sequence[~ChangeModelCredentialParams]
2997 Returns -> typing.Sequence[~ErrorResult]
2998 '''
2999 # map input types to rpc msg
3000 _params = dict()
3001 msg = dict(type='ModelManager',
3002 request='ChangeModelCredential',
3003 version=5,
3004 params=_params)
3005 _params['model-credentials'] = model_credentials
3006 reply = await self.rpc(msg)
3007 return reply
3008
3009
3010
3011 @ReturnMapping(ModelInfo)
3012 async def CreateModel(self, cloud_tag, config, credential, name, owner_tag, region):
3013 '''
3014 cloud_tag : str
3015 config : typing.Mapping[str, typing.Any]
3016 credential : str
3017 name : str
3018 owner_tag : str
3019 region : str
3020 Returns -> typing.Union[_ForwardRef('Number'), str, typing.Sequence[~ModelMachineInfo], _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
3021 '''
3022 # map input types to rpc msg
3023 _params = dict()
3024 msg = dict(type='ModelManager',
3025 request='CreateModel',
3026 version=5,
3027 params=_params)
3028 _params['cloud-tag'] = cloud_tag
3029 _params['config'] = config
3030 _params['credential'] = credential
3031 _params['name'] = name
3032 _params['owner-tag'] = owner_tag
3033 _params['region'] = region
3034 reply = await self.rpc(msg)
3035 return reply
3036
3037
3038
3039 @ReturnMapping(ErrorResults)
3040 async def DestroyModels(self, models):
3041 '''
3042 models : typing.Sequence[~DestroyModelParams]
3043 Returns -> typing.Sequence[~ErrorResult]
3044 '''
3045 # map input types to rpc msg
3046 _params = dict()
3047 msg = dict(type='ModelManager',
3048 request='DestroyModels',
3049 version=5,
3050 params=_params)
3051 _params['models'] = models
3052 reply = await self.rpc(msg)
3053 return reply
3054
3055
3056
3057 @ReturnMapping(StringResults)
3058 async def DumpModels(self, entities, simplified):
3059 '''
3060 entities : typing.Sequence[~Entity]
3061 simplified : bool
3062 Returns -> typing.Sequence[~StringResult]
3063 '''
3064 # map input types to rpc msg
3065 _params = dict()
3066 msg = dict(type='ModelManager',
3067 request='DumpModels',
3068 version=5,
3069 params=_params)
3070 _params['entities'] = entities
3071 _params['simplified'] = simplified
3072 reply = await self.rpc(msg)
3073 return reply
3074
3075
3076
3077 @ReturnMapping(MapResults)
3078 async def DumpModelsDB(self, entities):
3079 '''
3080 entities : typing.Sequence[~Entity]
3081 Returns -> typing.Sequence[~MapResult]
3082 '''
3083 # map input types to rpc msg
3084 _params = dict()
3085 msg = dict(type='ModelManager',
3086 request='DumpModelsDB',
3087 version=5,
3088 params=_params)
3089 _params['entities'] = entities
3090 reply = await self.rpc(msg)
3091 return reply
3092
3093
3094
3095 @ReturnMapping(ModelSummaryResults)
3096 async def ListModelSummaries(self, all_, user_tag):
3097 '''
3098 all_ : bool
3099 user_tag : str
3100 Returns -> typing.Sequence[~ModelSummaryResult]
3101 '''
3102 # map input types to rpc msg
3103 _params = dict()
3104 msg = dict(type='ModelManager',
3105 request='ListModelSummaries',
3106 version=5,
3107 params=_params)
3108 _params['all'] = all_
3109 _params['user-tag'] = user_tag
3110 reply = await self.rpc(msg)
3111 return reply
3112
3113
3114
3115 @ReturnMapping(UserModelList)
3116 async def ListModels(self, tag):
3117 '''
3118 tag : str
3119 Returns -> typing.Sequence[~UserModel]
3120 '''
3121 # map input types to rpc msg
3122 _params = dict()
3123 msg = dict(type='ModelManager',
3124 request='ListModels',
3125 version=5,
3126 params=_params)
3127 _params['tag'] = tag
3128 reply = await self.rpc(msg)
3129 return reply
3130
3131
3132
3133 @ReturnMapping(ModelDefaultsResult)
3134 async def ModelDefaults(self):
3135 '''
3136
3137 Returns -> typing.Mapping[str, ~ModelDefaults]
3138 '''
3139 # map input types to rpc msg
3140 _params = dict()
3141 msg = dict(type='ModelManager',
3142 request='ModelDefaults',
3143 version=5,
3144 params=_params)
3145
3146 reply = await self.rpc(msg)
3147 return reply
3148
3149
3150
3151 @ReturnMapping(ModelInfoResults)
3152 async def ModelInfo(self, entities):
3153 '''
3154 entities : typing.Sequence[~Entity]
3155 Returns -> typing.Sequence[~ModelInfoResult]
3156 '''
3157 # map input types to rpc msg
3158 _params = dict()
3159 msg = dict(type='ModelManager',
3160 request='ModelInfo',
3161 version=5,
3162 params=_params)
3163 _params['entities'] = entities
3164 reply = await self.rpc(msg)
3165 return reply
3166
3167
3168
3169 @ReturnMapping(ModelStatusResults)
3170 async def ModelStatus(self, entities):
3171 '''
3172 entities : typing.Sequence[~Entity]
3173 Returns -> typing.Sequence[~ModelStatus]
3174 '''
3175 # map input types to rpc msg
3176 _params = dict()
3177 msg = dict(type='ModelManager',
3178 request='ModelStatus',
3179 version=5,
3180 params=_params)
3181 _params['entities'] = entities
3182 reply = await self.rpc(msg)
3183 return reply
3184
3185
3186
3187 @ReturnMapping(ErrorResults)
3188 async def ModifyModelAccess(self, changes):
3189 '''
3190 changes : typing.Sequence[~ModifyModelAccess]
3191 Returns -> typing.Sequence[~ErrorResult]
3192 '''
3193 # map input types to rpc msg
3194 _params = dict()
3195 msg = dict(type='ModelManager',
3196 request='ModifyModelAccess',
3197 version=5,
3198 params=_params)
3199 _params['changes'] = changes
3200 reply = await self.rpc(msg)
3201 return reply
3202
3203
3204
3205 @ReturnMapping(ErrorResults)
3206 async def SetModelDefaults(self, config):
3207 '''
3208 config : typing.Sequence[~ModelDefaultValues]
3209 Returns -> typing.Sequence[~ErrorResult]
3210 '''
3211 # map input types to rpc msg
3212 _params = dict()
3213 msg = dict(type='ModelManager',
3214 request='SetModelDefaults',
3215 version=5,
3216 params=_params)
3217 _params['config'] = config
3218 reply = await self.rpc(msg)
3219 return reply
3220
3221
3222
3223 @ReturnMapping(ErrorResults)
3224 async def UnsetModelDefaults(self, keys):
3225 '''
3226 keys : typing.Sequence[~ModelUnsetKeys]
3227 Returns -> typing.Sequence[~ErrorResult]
3228 '''
3229 # map input types to rpc msg
3230 _params = dict()
3231 msg = dict(type='ModelManager',
3232 request='UnsetModelDefaults',
3233 version=5,
3234 params=_params)
3235 _params['keys'] = keys
3236 reply = await self.rpc(msg)
3237 return reply
3238
3239
3240
3241 class UniterFacade(Type):
3242 name = 'Uniter'
3243 version = 5
3244 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
3245 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
3246 'type': 'array'},
3247 'type': 'array'}},
3248 'required': ['servers'],
3249 'type': 'object'},
3250 'Action': {'additionalProperties': False,
3251 'properties': {'name': {'type': 'string'},
3252 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
3253 'type': 'object'}},
3254 'type': 'object'},
3255 'receiver': {'type': 'string'},
3256 'tag': {'type': 'string'}},
3257 'required': ['tag', 'receiver', 'name'],
3258 'type': 'object'},
3259 'ActionExecutionResult': {'additionalProperties': False,
3260 'properties': {'action-tag': {'type': 'string'},
3261 'message': {'type': 'string'},
3262 'results': {'patternProperties': {'.*': {'additionalProperties': True,
3263 'type': 'object'}},
3264 'type': 'object'},
3265 'status': {'type': 'string'}},
3266 'required': ['action-tag', 'status'],
3267 'type': 'object'},
3268 'ActionExecutionResults': {'additionalProperties': False,
3269 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
3270 'type': 'array'}},
3271 'type': 'object'},
3272 'ActionResult': {'additionalProperties': False,
3273 'properties': {'action': {'$ref': '#/definitions/Action'},
3274 'completed': {'format': 'date-time',
3275 'type': 'string'},
3276 'enqueued': {'format': 'date-time',
3277 'type': 'string'},
3278 'error': {'$ref': '#/definitions/Error'},
3279 'message': {'type': 'string'},
3280 'output': {'patternProperties': {'.*': {'additionalProperties': True,
3281 'type': 'object'}},
3282 'type': 'object'},
3283 'started': {'format': 'date-time',
3284 'type': 'string'},
3285 'status': {'type': 'string'}},
3286 'type': 'object'},
3287 'ActionResults': {'additionalProperties': False,
3288 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
3289 'type': 'array'}},
3290 'type': 'object'},
3291 'Address': {'additionalProperties': False,
3292 'properties': {'scope': {'type': 'string'},
3293 'space-name': {'type': 'string'},
3294 'type': {'type': 'string'},
3295 'value': {'type': 'string'}},
3296 'required': ['value', 'type', 'scope'],
3297 'type': 'object'},
3298 'ApplicationStatusResult': {'additionalProperties': False,
3299 'properties': {'application': {'$ref': '#/definitions/StatusResult'},
3300 'error': {'$ref': '#/definitions/Error'},
3301 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
3302 'type': 'object'}},
3303 'required': ['application',
3304 'units'],
3305 'type': 'object'},
3306 'ApplicationStatusResults': {'additionalProperties': False,
3307 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
3308 'type': 'array'}},
3309 'required': ['results'],
3310 'type': 'object'},
3311 'BoolResult': {'additionalProperties': False,
3312 'properties': {'error': {'$ref': '#/definitions/Error'},
3313 'result': {'type': 'boolean'}},
3314 'required': ['result'],
3315 'type': 'object'},
3316 'BoolResults': {'additionalProperties': False,
3317 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
3318 'type': 'array'}},
3319 'required': ['results'],
3320 'type': 'object'},
3321 'BytesResult': {'additionalProperties': False,
3322 'properties': {'result': {'items': {'type': 'integer'},
3323 'type': 'array'}},
3324 'required': ['result'],
3325 'type': 'object'},
3326 'CharmRelation': {'additionalProperties': False,
3327 'properties': {'interface': {'type': 'string'},
3328 'limit': {'type': 'integer'},
3329 'name': {'type': 'string'},
3330 'optional': {'type': 'boolean'},
3331 'role': {'type': 'string'},
3332 'scope': {'type': 'string'}},
3333 'required': ['name',
3334 'role',
3335 'interface',
3336 'optional',
3337 'limit',
3338 'scope'],
3339 'type': 'object'},
3340 'CharmURL': {'additionalProperties': False,
3341 'properties': {'url': {'type': 'string'}},
3342 'required': ['url'],
3343 'type': 'object'},
3344 'CharmURLs': {'additionalProperties': False,
3345 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'},
3346 'type': 'array'}},
3347 'required': ['urls'],
3348 'type': 'object'},
3349 'ConfigSettingsResult': {'additionalProperties': False,
3350 'properties': {'error': {'$ref': '#/definitions/Error'},
3351 'settings': {'patternProperties': {'.*': {'additionalProperties': True,
3352 'type': 'object'}},
3353 'type': 'object'}},
3354 'required': ['settings'],
3355 'type': 'object'},
3356 'ConfigSettingsResults': {'additionalProperties': False,
3357 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
3358 'type': 'array'}},
3359 'required': ['results'],
3360 'type': 'object'},
3361 'Endpoint': {'additionalProperties': False,
3362 'properties': {'application-name': {'type': 'string'},
3363 'relation': {'$ref': '#/definitions/CharmRelation'}},
3364 'required': ['application-name', 'relation'],
3365 'type': 'object'},
3366 'Entities': {'additionalProperties': False,
3367 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3368 'type': 'array'}},
3369 'required': ['entities'],
3370 'type': 'object'},
3371 'EntitiesCharmURL': {'additionalProperties': False,
3372 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
3373 'type': 'array'}},
3374 'required': ['entities'],
3375 'type': 'object'},
3376 'EntitiesPortRanges': {'additionalProperties': False,
3377 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
3378 'type': 'array'}},
3379 'required': ['entities'],
3380 'type': 'object'},
3381 'Entity': {'additionalProperties': False,
3382 'properties': {'tag': {'type': 'string'}},
3383 'required': ['tag'],
3384 'type': 'object'},
3385 'EntityCharmURL': {'additionalProperties': False,
3386 'properties': {'charm-url': {'type': 'string'},
3387 'tag': {'type': 'string'}},
3388 'required': ['tag', 'charm-url'],
3389 'type': 'object'},
3390 'EntityPortRange': {'additionalProperties': False,
3391 'properties': {'from-port': {'type': 'integer'},
3392 'protocol': {'type': 'string'},
3393 'tag': {'type': 'string'},
3394 'to-port': {'type': 'integer'}},
3395 'required': ['tag',
3396 'protocol',
3397 'from-port',
3398 'to-port'],
3399 'type': 'object'},
3400 'EntityStatusArgs': {'additionalProperties': False,
3401 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3402 'type': 'object'}},
3403 'type': 'object'},
3404 'info': {'type': 'string'},
3405 'status': {'type': 'string'},
3406 'tag': {'type': 'string'}},
3407 'required': ['tag',
3408 'status',
3409 'info',
3410 'data'],
3411 'type': 'object'},
3412 'EntityWorkloadVersion': {'additionalProperties': False,
3413 'properties': {'tag': {'type': 'string'},
3414 'workload-version': {'type': 'string'}},
3415 'required': ['tag',
3416 'workload-version'],
3417 'type': 'object'},
3418 'EntityWorkloadVersions': {'additionalProperties': False,
3419 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'},
3420 'type': 'array'}},
3421 'required': ['entities'],
3422 'type': 'object'},
3423 'Error': {'additionalProperties': False,
3424 'properties': {'code': {'type': 'string'},
3425 'info': {'$ref': '#/definitions/ErrorInfo'},
3426 'message': {'type': 'string'}},
3427 'required': ['message', 'code'],
3428 'type': 'object'},
3429 'ErrorInfo': {'additionalProperties': False,
3430 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3431 'macaroon-path': {'type': 'string'}},
3432 'type': 'object'},
3433 'ErrorResult': {'additionalProperties': False,
3434 'properties': {'error': {'$ref': '#/definitions/Error'}},
3435 'type': 'object'},
3436 'ErrorResults': {'additionalProperties': False,
3437 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3438 'type': 'array'}},
3439 'required': ['results'],
3440 'type': 'object'},
3441 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
3442 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
3443 'type': 'array'}},
3444 'required': ['results'],
3445 'type': 'object'},
3446 'GetLeadershipSettingsResult': {'additionalProperties': False,
3447 'properties': {'error': {'$ref': '#/definitions/Error'},
3448 'settings': {'patternProperties': {'.*': {'type': 'string'}},
3449 'type': 'object'}},
3450 'required': ['settings'],
3451 'type': 'object'},
3452 'HostPort': {'additionalProperties': False,
3453 'properties': {'Address': {'$ref': '#/definitions/Address'},
3454 'port': {'type': 'integer'}},
3455 'required': ['Address', 'port'],
3456 'type': 'object'},
3457 'IntResult': {'additionalProperties': False,
3458 'properties': {'error': {'$ref': '#/definitions/Error'},
3459 'result': {'type': 'integer'}},
3460 'required': ['result'],
3461 'type': 'object'},
3462 'IntResults': {'additionalProperties': False,
3463 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
3464 'type': 'array'}},
3465 'required': ['results'],
3466 'type': 'object'},
3467 'InterfaceAddress': {'additionalProperties': False,
3468 'properties': {'cidr': {'type': 'string'},
3469 'value': {'type': 'string'}},
3470 'required': ['value', 'cidr'],
3471 'type': 'object'},
3472 'LifeResult': {'additionalProperties': False,
3473 'properties': {'error': {'$ref': '#/definitions/Error'},
3474 'life': {'type': 'string'}},
3475 'required': ['life'],
3476 'type': 'object'},
3477 'LifeResults': {'additionalProperties': False,
3478 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
3479 'type': 'array'}},
3480 'required': ['results'],
3481 'type': 'object'},
3482 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3483 'MachinePortRange': {'additionalProperties': False,
3484 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
3485 'relation-tag': {'type': 'string'},
3486 'unit-tag': {'type': 'string'}},
3487 'required': ['unit-tag',
3488 'relation-tag',
3489 'port-range'],
3490 'type': 'object'},
3491 'MachinePortsResult': {'additionalProperties': False,
3492 'properties': {'error': {'$ref': '#/definitions/Error'},
3493 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
3494 'type': 'array'}},
3495 'required': ['ports'],
3496 'type': 'object'},
3497 'MachinePortsResults': {'additionalProperties': False,
3498 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
3499 'type': 'array'}},
3500 'required': ['results'],
3501 'type': 'object'},
3502 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
3503 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
3504 'type': 'array'}},
3505 'required': ['params'],
3506 'type': 'object'},
3507 'MergeLeadershipSettingsParam': {'additionalProperties': False,
3508 'properties': {'application-tag': {'type': 'string'},
3509 'settings': {'patternProperties': {'.*': {'type': 'string'}},
3510 'type': 'object'}},
3511 'required': ['application-tag',
3512 'settings'],
3513 'type': 'object'},
3514 'MeterStatusResult': {'additionalProperties': False,
3515 'properties': {'code': {'type': 'string'},
3516 'error': {'$ref': '#/definitions/Error'},
3517 'info': {'type': 'string'}},
3518 'required': ['code', 'info'],
3519 'type': 'object'},
3520 'MeterStatusResults': {'additionalProperties': False,
3521 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
3522 'type': 'array'}},
3523 'required': ['results'],
3524 'type': 'object'},
3525 'Metric': {'additionalProperties': False,
3526 'properties': {'key': {'type': 'string'},
3527 'time': {'format': 'date-time',
3528 'type': 'string'},
3529 'value': {'type': 'string'}},
3530 'required': ['key', 'value', 'time'],
3531 'type': 'object'},
3532 'MetricBatch': {'additionalProperties': False,
3533 'properties': {'charm-url': {'type': 'string'},
3534 'created': {'format': 'date-time',
3535 'type': 'string'},
3536 'metrics': {'items': {'$ref': '#/definitions/Metric'},
3537 'type': 'array'},
3538 'uuid': {'type': 'string'}},
3539 'required': ['uuid',
3540 'charm-url',
3541 'created',
3542 'metrics'],
3543 'type': 'object'},
3544 'MetricBatchParam': {'additionalProperties': False,
3545 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
3546 'tag': {'type': 'string'}},
3547 'required': ['tag', 'batch'],
3548 'type': 'object'},
3549 'MetricBatchParams': {'additionalProperties': False,
3550 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
3551 'type': 'array'}},
3552 'required': ['batches'],
3553 'type': 'object'},
3554 'ModelConfigResult': {'additionalProperties': False,
3555 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
3556 'type': 'object'}},
3557 'type': 'object'}},
3558 'required': ['config'],
3559 'type': 'object'},
3560 'ModelResult': {'additionalProperties': False,
3561 'properties': {'error': {'$ref': '#/definitions/Error'},
3562 'name': {'type': 'string'},
3563 'uuid': {'type': 'string'}},
3564 'required': ['name', 'uuid'],
3565 'type': 'object'},
3566 'NetworkInfo': {'additionalProperties': False,
3567 'properties': {'addresses': {'items': {'$ref': '#/definitions/InterfaceAddress'},
3568 'type': 'array'},
3569 'interface-name': {'type': 'string'},
3570 'mac-address': {'type': 'string'}},
3571 'required': ['mac-address',
3572 'interface-name',
3573 'addresses'],
3574 'type': 'object'},
3575 'NetworkInfoParams': {'additionalProperties': False,
3576 'properties': {'bindings': {'items': {'type': 'string'},
3577 'type': 'array'},
3578 'unit': {'type': 'string'}},
3579 'required': ['unit', 'bindings'],
3580 'type': 'object'},
3581 'NetworkInfoResult': {'additionalProperties': False,
3582 'properties': {'error': {'$ref': '#/definitions/Error'},
3583 'network-info': {'items': {'$ref': '#/definitions/NetworkInfo'},
3584 'type': 'array'}},
3585 'required': ['network-info'],
3586 'type': 'object'},
3587 'NetworkInfoResults': {'additionalProperties': False,
3588 'properties': {'results': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInfoResult'}},
3589 'type': 'object'}},
3590 'required': ['results'],
3591 'type': 'object'},
3592 'NotifyWatchResult': {'additionalProperties': False,
3593 'properties': {'NotifyWatcherId': {'type': 'string'},
3594 'error': {'$ref': '#/definitions/Error'}},
3595 'required': ['NotifyWatcherId'],
3596 'type': 'object'},
3597 'NotifyWatchResults': {'additionalProperties': False,
3598 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3599 'type': 'array'}},
3600 'required': ['results'],
3601 'type': 'object'},
3602 'PortRange': {'additionalProperties': False,
3603 'properties': {'from-port': {'type': 'integer'},
3604 'protocol': {'type': 'string'},
3605 'to-port': {'type': 'integer'}},
3606 'required': ['from-port', 'to-port', 'protocol'],
3607 'type': 'object'},
3608 'RelationIds': {'additionalProperties': False,
3609 'properties': {'relation-ids': {'items': {'type': 'integer'},
3610 'type': 'array'}},
3611 'required': ['relation-ids'],
3612 'type': 'object'},
3613 'RelationResult': {'additionalProperties': False,
3614 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'},
3615 'error': {'$ref': '#/definitions/Error'},
3616 'id': {'type': 'integer'},
3617 'key': {'type': 'string'},
3618 'life': {'type': 'string'}},
3619 'required': ['life',
3620 'id',
3621 'key',
3622 'endpoint'],
3623 'type': 'object'},
3624 'RelationResults': {'additionalProperties': False,
3625 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'},
3626 'type': 'array'}},
3627 'required': ['results'],
3628 'type': 'object'},
3629 'RelationUnit': {'additionalProperties': False,
3630 'properties': {'relation': {'type': 'string'},
3631 'unit': {'type': 'string'}},
3632 'required': ['relation', 'unit'],
3633 'type': 'object'},
3634 'RelationUnitPair': {'additionalProperties': False,
3635 'properties': {'local-unit': {'type': 'string'},
3636 'relation': {'type': 'string'},
3637 'remote-unit': {'type': 'string'}},
3638 'required': ['relation',
3639 'local-unit',
3640 'remote-unit'],
3641 'type': 'object'},
3642 'RelationUnitPairs': {'additionalProperties': False,
3643 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
3644 'type': 'array'}},
3645 'required': ['relation-unit-pairs'],
3646 'type': 'object'},
3647 'RelationUnitSettings': {'additionalProperties': False,
3648 'properties': {'relation': {'type': 'string'},
3649 'settings': {'patternProperties': {'.*': {'type': 'string'}},
3650 'type': 'object'},
3651 'unit': {'type': 'string'}},
3652 'required': ['relation',
3653 'unit',
3654 'settings'],
3655 'type': 'object'},
3656 'RelationUnits': {'additionalProperties': False,
3657 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
3658 'type': 'array'}},
3659 'required': ['relation-units'],
3660 'type': 'object'},
3661 'RelationUnitsChange': {'additionalProperties': False,
3662 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
3663 'type': 'object'},
3664 'departed': {'items': {'type': 'string'},
3665 'type': 'array'}},
3666 'required': ['changed'],
3667 'type': 'object'},
3668 'RelationUnitsSettings': {'additionalProperties': False,
3669 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
3670 'type': 'array'}},
3671 'required': ['relation-units'],
3672 'type': 'object'},
3673 'RelationUnitsWatchResult': {'additionalProperties': False,
3674 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
3675 'error': {'$ref': '#/definitions/Error'},
3676 'watcher-id': {'type': 'string'}},
3677 'required': ['watcher-id',
3678 'changes'],
3679 'type': 'object'},
3680 'RelationUnitsWatchResults': {'additionalProperties': False,
3681 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
3682 'type': 'array'}},
3683 'required': ['results'],
3684 'type': 'object'},
3685 'ResolvedModeResult': {'additionalProperties': False,
3686 'properties': {'error': {'$ref': '#/definitions/Error'},
3687 'mode': {'type': 'string'}},
3688 'required': ['mode'],
3689 'type': 'object'},
3690 'ResolvedModeResults': {'additionalProperties': False,
3691 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
3692 'type': 'array'}},
3693 'required': ['results'],
3694 'type': 'object'},
3695 'SetStatus': {'additionalProperties': False,
3696 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
3697 'type': 'array'}},
3698 'required': ['entities'],
3699 'type': 'object'},
3700 'SettingsResult': {'additionalProperties': False,
3701 'properties': {'error': {'$ref': '#/definitions/Error'},
3702 'settings': {'patternProperties': {'.*': {'type': 'string'}},
3703 'type': 'object'}},
3704 'required': ['settings'],
3705 'type': 'object'},
3706 'SettingsResults': {'additionalProperties': False,
3707 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
3708 'type': 'array'}},
3709 'required': ['results'],
3710 'type': 'object'},
3711 'StatusResult': {'additionalProperties': False,
3712 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3713 'type': 'object'}},
3714 'type': 'object'},
3715 'error': {'$ref': '#/definitions/Error'},
3716 'id': {'type': 'string'},
3717 'info': {'type': 'string'},
3718 'life': {'type': 'string'},
3719 'since': {'format': 'date-time',
3720 'type': 'string'},
3721 'status': {'type': 'string'}},
3722 'required': ['id',
3723 'life',
3724 'status',
3725 'info',
3726 'data',
3727 'since'],
3728 'type': 'object'},
3729 'StatusResults': {'additionalProperties': False,
3730 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
3731 'type': 'array'}},
3732 'required': ['results'],
3733 'type': 'object'},
3734 'StorageAddParams': {'additionalProperties': False,
3735 'properties': {'name': {'type': 'string'},
3736 'storage': {'$ref': '#/definitions/StorageConstraints'},
3737 'unit': {'type': 'string'}},
3738 'required': ['unit', 'name', 'storage'],
3739 'type': 'object'},
3740 'StorageAttachment': {'additionalProperties': False,
3741 'properties': {'kind': {'type': 'integer'},
3742 'life': {'type': 'string'},
3743 'location': {'type': 'string'},
3744 'owner-tag': {'type': 'string'},
3745 'storage-tag': {'type': 'string'},
3746 'unit-tag': {'type': 'string'}},
3747 'required': ['storage-tag',
3748 'owner-tag',
3749 'unit-tag',
3750 'kind',
3751 'location',
3752 'life'],
3753 'type': 'object'},
3754 'StorageAttachmentId': {'additionalProperties': False,
3755 'properties': {'storage-tag': {'type': 'string'},
3756 'unit-tag': {'type': 'string'}},
3757 'required': ['storage-tag',
3758 'unit-tag'],
3759 'type': 'object'},
3760 'StorageAttachmentIds': {'additionalProperties': False,
3761 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
3762 'type': 'array'}},
3763 'required': ['ids'],
3764 'type': 'object'},
3765 'StorageAttachmentIdsResult': {'additionalProperties': False,
3766 'properties': {'error': {'$ref': '#/definitions/Error'},
3767 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
3768 'required': ['result'],
3769 'type': 'object'},
3770 'StorageAttachmentIdsResults': {'additionalProperties': False,
3771 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
3772 'type': 'array'}},
3773 'type': 'object'},
3774 'StorageAttachmentResult': {'additionalProperties': False,
3775 'properties': {'error': {'$ref': '#/definitions/Error'},
3776 'result': {'$ref': '#/definitions/StorageAttachment'}},
3777 'required': ['result'],
3778 'type': 'object'},
3779 'StorageAttachmentResults': {'additionalProperties': False,
3780 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
3781 'type': 'array'}},
3782 'type': 'object'},
3783 'StorageConstraints': {'additionalProperties': False,
3784 'properties': {'count': {'type': 'integer'},
3785 'pool': {'type': 'string'},
3786 'size': {'type': 'integer'}},
3787 'type': 'object'},
3788 'StoragesAddParams': {'additionalProperties': False,
3789 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
3790 'type': 'array'}},
3791 'required': ['storages'],
3792 'type': 'object'},
3793 'StringBoolResult': {'additionalProperties': False,
3794 'properties': {'error': {'$ref': '#/definitions/Error'},
3795 'ok': {'type': 'boolean'},
3796 'result': {'type': 'string'}},
3797 'required': ['result', 'ok'],
3798 'type': 'object'},
3799 'StringBoolResults': {'additionalProperties': False,
3800 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'},
3801 'type': 'array'}},
3802 'required': ['results'],
3803 'type': 'object'},
3804 'StringResult': {'additionalProperties': False,
3805 'properties': {'error': {'$ref': '#/definitions/Error'},
3806 'result': {'type': 'string'}},
3807 'required': ['result'],
3808 'type': 'object'},
3809 'StringResults': {'additionalProperties': False,
3810 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
3811 'type': 'array'}},
3812 'required': ['results'],
3813 'type': 'object'},
3814 'StringsResult': {'additionalProperties': False,
3815 'properties': {'error': {'$ref': '#/definitions/Error'},
3816 'result': {'items': {'type': 'string'},
3817 'type': 'array'}},
3818 'type': 'object'},
3819 'StringsResults': {'additionalProperties': False,
3820 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
3821 'type': 'array'}},
3822 'required': ['results'],
3823 'type': 'object'},
3824 'StringsWatchResult': {'additionalProperties': False,
3825 'properties': {'changes': {'items': {'type': 'string'},
3826 'type': 'array'},
3827 'error': {'$ref': '#/definitions/Error'},
3828 'watcher-id': {'type': 'string'}},
3829 'required': ['watcher-id'],
3830 'type': 'object'},
3831 'StringsWatchResults': {'additionalProperties': False,
3832 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
3833 'type': 'array'}},
3834 'required': ['results'],
3835 'type': 'object'},
3836 'UnitSettings': {'additionalProperties': False,
3837 'properties': {'version': {'type': 'integer'}},
3838 'required': ['version'],
3839 'type': 'object'}},
3840 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
3841 'type': 'object'},
3842 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
3843 'type': 'object'},
3844 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3845 'Result': {'$ref': '#/definitions/ActionResults'}},
3846 'type': 'object'},
3847 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
3848 'Result': {'$ref': '#/definitions/ErrorResults'}},
3849 'type': 'object'},
3850 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
3851 'Result': {'$ref': '#/definitions/ErrorResults'}},
3852 'type': 'object'},
3853 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3854 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
3855 'type': 'object'},
3856 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3857 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
3858 'type': 'object'},
3859 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3860 'Result': {'$ref': '#/definitions/StringResults'}},
3861 'type': 'object'},
3862 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3863 'Result': {'$ref': '#/definitions/StringResults'}},
3864 'type': 'object'},
3865 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3866 'Result': {'$ref': '#/definitions/ErrorResults'}},
3867 'type': 'object'},
3868 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
3869 'type': 'object'},
3870 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
3871 'Result': {'$ref': '#/definitions/StringResults'}},
3872 'type': 'object'},
3873 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3874 'Result': {'$ref': '#/definitions/IntResults'}},
3875 'type': 'object'},
3876 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3877 'Result': {'$ref': '#/definitions/StringBoolResults'}},
3878 'type': 'object'},
3879 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3880 'Result': {'$ref': '#/definitions/ErrorResults'}},
3881 'type': 'object'},
3882 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
3883 'Result': {'$ref': '#/definitions/ErrorResults'}},
3884 'type': 'object'},
3885 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3886 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
3887 'type': 'object'},
3888 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
3889 'type': 'object'},
3890 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3891 'Result': {'$ref': '#/definitions/ErrorResults'}},
3892 'type': 'object'},
3893 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3894 'Result': {'$ref': '#/definitions/ErrorResults'}},
3895 'type': 'object'},
3896 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3897 'Result': {'$ref': '#/definitions/ErrorResults'}},
3898 'type': 'object'},
3899 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3900 'Result': {'$ref': '#/definitions/ErrorResults'}},
3901 'type': 'object'},
3902 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
3903 'Result': {'$ref': '#/definitions/ErrorResults'}},
3904 'type': 'object'},
3905 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
3906 'Result': {'$ref': '#/definitions/ErrorResults'}},
3907 'type': 'object'},
3908 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3909 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
3910 'type': 'object'},
3911 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3912 'Result': {'$ref': '#/definitions/StringBoolResults'}},
3913 'type': 'object'},
3914 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3915 'Result': {'$ref': '#/definitions/BoolResults'}},
3916 'type': 'object'},
3917 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3918 'Result': {'$ref': '#/definitions/StringsResults'}},
3919 'type': 'object'},
3920 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
3921 'Result': {'$ref': '#/definitions/ErrorResults'}},
3922 'type': 'object'},
3923 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3924 'Result': {'$ref': '#/definitions/LifeResults'}},
3925 'type': 'object'},
3926 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
3927 'Result': {'$ref': '#/definitions/ErrorResults'}},
3928 'type': 'object'},
3929 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
3930 'type': 'object'},
3931 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3932 'type': 'object'},
3933 'NetworkInfo': {'properties': {'Params': {'$ref': '#/definitions/NetworkInfoParams'},
3934 'Result': {'$ref': '#/definitions/NetworkInfoResults'}},
3935 'type': 'object'},
3936 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
3937 'Result': {'$ref': '#/definitions/ErrorResults'}},
3938 'type': 'object'},
3939 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3940 'Result': {'$ref': '#/definitions/StringResults'}},
3941 'type': 'object'},
3942 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3943 'type': 'object'},
3944 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3945 'Result': {'$ref': '#/definitions/StringResults'}},
3946 'type': 'object'},
3947 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3948 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
3949 'type': 'object'},
3950 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
3951 'Result': {'$ref': '#/definitions/SettingsResults'}},
3952 'type': 'object'},
3953 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
3954 'Result': {'$ref': '#/definitions/SettingsResults'}},
3955 'type': 'object'},
3956 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
3957 'Result': {'$ref': '#/definitions/RelationResults'}},
3958 'type': 'object'},
3959 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
3960 'Result': {'$ref': '#/definitions/RelationResults'}},
3961 'type': 'object'},
3962 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3963 'Result': {'$ref': '#/definitions/ErrorResults'}},
3964 'type': 'object'},
3965 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3966 'Result': {'$ref': '#/definitions/ErrorResults'}},
3967 'type': 'object'},
3968 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3969 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
3970 'type': 'object'},
3971 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3972 'type': 'object'},
3973 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3974 'Result': {'$ref': '#/definitions/ErrorResults'}},
3975 'type': 'object'},
3976 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3977 'Result': {'$ref': '#/definitions/ErrorResults'}},
3978 'type': 'object'},
3979 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
3980 'Result': {'$ref': '#/definitions/ErrorResults'}},
3981 'type': 'object'},
3982 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3983 'Result': {'$ref': '#/definitions/ErrorResults'}},
3984 'type': 'object'},
3985 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
3986 'Result': {'$ref': '#/definitions/ErrorResults'}},
3987 'type': 'object'},
3988 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'},
3989 'Result': {'$ref': '#/definitions/ErrorResults'}},
3990 'type': 'object'},
3991 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3992 'Result': {'$ref': '#/definitions/LifeResults'}},
3993 'type': 'object'},
3994 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3995 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
3996 'type': 'object'},
3997 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3998 'Result': {'$ref': '#/definitions/StatusResults'}},
3999 'type': 'object'},
4000 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4001 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
4002 'type': 'object'},
4003 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
4004 'Result': {'$ref': '#/definitions/ErrorResults'}},
4005 'type': 'object'},
4006 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4007 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4008 'type': 'object'},
4009 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4010 'type': 'object'},
4011 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4012 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4013 'type': 'object'},
4014 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4015 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4016 'type': 'object'},
4017 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4018 'type': 'object'},
4019 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4020 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4021 'type': 'object'},
4022 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4023 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4024 'type': 'object'},
4025 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
4026 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
4027 'type': 'object'},
4028 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
4029 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4030 'type': 'object'},
4031 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4032 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4033 'type': 'object'},
4034 'WatchUnitRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4035 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4036 'type': 'object'},
4037 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4038 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4039 'type': 'object'},
4040 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4041 'Result': {'$ref': '#/definitions/StringResults'}},
4042 'type': 'object'}},
4043 'type': 'object'}
4044
4045
4046 @ReturnMapping(StringsResult)
4047 async def APIAddresses(self):
4048 '''
4049
4050 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
4051 '''
4052 # map input types to rpc msg
4053 _params = dict()
4054 msg = dict(type='Uniter',
4055 request='APIAddresses',
4056 version=5,
4057 params=_params)
4058
4059 reply = await self.rpc(msg)
4060 return reply
4061
4062
4063
4064 @ReturnMapping(APIHostPortsResult)
4065 async def APIHostPorts(self):
4066 '''
4067
4068 Returns -> typing.Sequence[~HostPort]
4069 '''
4070 # map input types to rpc msg
4071 _params = dict()
4072 msg = dict(type='Uniter',
4073 request='APIHostPorts',
4074 version=5,
4075 params=_params)
4076
4077 reply = await self.rpc(msg)
4078 return reply
4079
4080
4081
4082 @ReturnMapping(ActionResults)
4083 async def Actions(self, entities):
4084 '''
4085 entities : typing.Sequence[~Entity]
4086 Returns -> typing.Sequence[~ActionResult]
4087 '''
4088 # map input types to rpc msg
4089 _params = dict()
4090 msg = dict(type='Uniter',
4091 request='Actions',
4092 version=5,
4093 params=_params)
4094 _params['entities'] = entities
4095 reply = await self.rpc(msg)
4096 return reply
4097
4098
4099
4100 @ReturnMapping(ErrorResults)
4101 async def AddMetricBatches(self, batches):
4102 '''
4103 batches : typing.Sequence[~MetricBatchParam]
4104 Returns -> typing.Sequence[~ErrorResult]
4105 '''
4106 # map input types to rpc msg
4107 _params = dict()
4108 msg = dict(type='Uniter',
4109 request='AddMetricBatches',
4110 version=5,
4111 params=_params)
4112 _params['batches'] = batches
4113 reply = await self.rpc(msg)
4114 return reply
4115
4116
4117
4118 @ReturnMapping(ErrorResults)
4119 async def AddUnitStorage(self, storages):
4120 '''
4121 storages : typing.Sequence[~StorageAddParams]
4122 Returns -> typing.Sequence[~ErrorResult]
4123 '''
4124 # map input types to rpc msg
4125 _params = dict()
4126 msg = dict(type='Uniter',
4127 request='AddUnitStorage',
4128 version=5,
4129 params=_params)
4130 _params['storages'] = storages
4131 reply = await self.rpc(msg)
4132 return reply
4133
4134
4135
4136 @ReturnMapping(MachinePortsResults)
4137 async def AllMachinePorts(self, entities):
4138 '''
4139 entities : typing.Sequence[~Entity]
4140 Returns -> typing.Sequence[~MachinePortsResult]
4141 '''
4142 # map input types to rpc msg
4143 _params = dict()
4144 msg = dict(type='Uniter',
4145 request='AllMachinePorts',
4146 version=5,
4147 params=_params)
4148 _params['entities'] = entities
4149 reply = await self.rpc(msg)
4150 return reply
4151
4152
4153
4154 @ReturnMapping(ApplicationStatusResults)
4155 async def ApplicationStatus(self, entities):
4156 '''
4157 entities : typing.Sequence[~Entity]
4158 Returns -> typing.Sequence[~ApplicationStatusResult]
4159 '''
4160 # map input types to rpc msg
4161 _params = dict()
4162 msg = dict(type='Uniter',
4163 request='ApplicationStatus',
4164 version=5,
4165 params=_params)
4166 _params['entities'] = entities
4167 reply = await self.rpc(msg)
4168 return reply
4169
4170
4171
4172 @ReturnMapping(StringResults)
4173 async def AssignedMachine(self, entities):
4174 '''
4175 entities : typing.Sequence[~Entity]
4176 Returns -> typing.Sequence[~StringResult]
4177 '''
4178 # map input types to rpc msg
4179 _params = dict()
4180 msg = dict(type='Uniter',
4181 request='AssignedMachine',
4182 version=5,
4183 params=_params)
4184 _params['entities'] = entities
4185 reply = await self.rpc(msg)
4186 return reply
4187
4188
4189
4190 @ReturnMapping(StringResults)
4191 async def AvailabilityZone(self, entities):
4192 '''
4193 entities : typing.Sequence[~Entity]
4194 Returns -> typing.Sequence[~StringResult]
4195 '''
4196 # map input types to rpc msg
4197 _params = dict()
4198 msg = dict(type='Uniter',
4199 request='AvailabilityZone',
4200 version=5,
4201 params=_params)
4202 _params['entities'] = entities
4203 reply = await self.rpc(msg)
4204 return reply
4205
4206
4207
4208 @ReturnMapping(ErrorResults)
4209 async def BeginActions(self, entities):
4210 '''
4211 entities : typing.Sequence[~Entity]
4212 Returns -> typing.Sequence[~ErrorResult]
4213 '''
4214 # map input types to rpc msg
4215 _params = dict()
4216 msg = dict(type='Uniter',
4217 request='BeginActions',
4218 version=5,
4219 params=_params)
4220 _params['entities'] = entities
4221 reply = await self.rpc(msg)
4222 return reply
4223
4224
4225
4226 @ReturnMapping(BytesResult)
4227 async def CACert(self):
4228 '''
4229
4230 Returns -> typing.Sequence[int]
4231 '''
4232 # map input types to rpc msg
4233 _params = dict()
4234 msg = dict(type='Uniter',
4235 request='CACert',
4236 version=5,
4237 params=_params)
4238
4239 reply = await self.rpc(msg)
4240 return reply
4241
4242
4243
4244 @ReturnMapping(StringResults)
4245 async def CharmArchiveSha256(self, urls):
4246 '''
4247 urls : typing.Sequence[~CharmURL]
4248 Returns -> typing.Sequence[~StringResult]
4249 '''
4250 # map input types to rpc msg
4251 _params = dict()
4252 msg = dict(type='Uniter',
4253 request='CharmArchiveSha256',
4254 version=5,
4255 params=_params)
4256 _params['urls'] = urls
4257 reply = await self.rpc(msg)
4258 return reply
4259
4260
4261
4262 @ReturnMapping(IntResults)
4263 async def CharmModifiedVersion(self, entities):
4264 '''
4265 entities : typing.Sequence[~Entity]
4266 Returns -> typing.Sequence[~IntResult]
4267 '''
4268 # map input types to rpc msg
4269 _params = dict()
4270 msg = dict(type='Uniter',
4271 request='CharmModifiedVersion',
4272 version=5,
4273 params=_params)
4274 _params['entities'] = entities
4275 reply = await self.rpc(msg)
4276 return reply
4277
4278
4279
4280 @ReturnMapping(StringBoolResults)
4281 async def CharmURL(self, entities):
4282 '''
4283 entities : typing.Sequence[~Entity]
4284 Returns -> typing.Sequence[~StringBoolResult]
4285 '''
4286 # map input types to rpc msg
4287 _params = dict()
4288 msg = dict(type='Uniter',
4289 request='CharmURL',
4290 version=5,
4291 params=_params)
4292 _params['entities'] = entities
4293 reply = await self.rpc(msg)
4294 return reply
4295
4296
4297
4298 @ReturnMapping(ErrorResults)
4299 async def ClearResolved(self, entities):
4300 '''
4301 entities : typing.Sequence[~Entity]
4302 Returns -> typing.Sequence[~ErrorResult]
4303 '''
4304 # map input types to rpc msg
4305 _params = dict()
4306 msg = dict(type='Uniter',
4307 request='ClearResolved',
4308 version=5,
4309 params=_params)
4310 _params['entities'] = entities
4311 reply = await self.rpc(msg)
4312 return reply
4313
4314
4315
4316 @ReturnMapping(ErrorResults)
4317 async def ClosePorts(self, entities):
4318 '''
4319 entities : typing.Sequence[~EntityPortRange]
4320 Returns -> typing.Sequence[~ErrorResult]
4321 '''
4322 # map input types to rpc msg
4323 _params = dict()
4324 msg = dict(type='Uniter',
4325 request='ClosePorts',
4326 version=5,
4327 params=_params)
4328 _params['entities'] = entities
4329 reply = await self.rpc(msg)
4330 return reply
4331
4332
4333
4334 @ReturnMapping(ConfigSettingsResults)
4335 async def ConfigSettings(self, entities):
4336 '''
4337 entities : typing.Sequence[~Entity]
4338 Returns -> typing.Sequence[~ConfigSettingsResult]
4339 '''
4340 # map input types to rpc msg
4341 _params = dict()
4342 msg = dict(type='Uniter',
4343 request='ConfigSettings',
4344 version=5,
4345 params=_params)
4346 _params['entities'] = entities
4347 reply = await self.rpc(msg)
4348 return reply
4349
4350
4351
4352 @ReturnMapping(ModelResult)
4353 async def CurrentModel(self):
4354 '''
4355
4356 Returns -> typing.Union[_ForwardRef('Error'), str]
4357 '''
4358 # map input types to rpc msg
4359 _params = dict()
4360 msg = dict(type='Uniter',
4361 request='CurrentModel',
4362 version=5,
4363 params=_params)
4364
4365 reply = await self.rpc(msg)
4366 return reply
4367
4368
4369
4370 @ReturnMapping(ErrorResults)
4371 async def Destroy(self, entities):
4372 '''
4373 entities : typing.Sequence[~Entity]
4374 Returns -> typing.Sequence[~ErrorResult]
4375 '''
4376 # map input types to rpc msg
4377 _params = dict()
4378 msg = dict(type='Uniter',
4379 request='Destroy',
4380 version=5,
4381 params=_params)
4382 _params['entities'] = entities
4383 reply = await self.rpc(msg)
4384 return reply
4385
4386
4387
4388 @ReturnMapping(ErrorResults)
4389 async def DestroyAllSubordinates(self, entities):
4390 '''
4391 entities : typing.Sequence[~Entity]
4392 Returns -> typing.Sequence[~ErrorResult]
4393 '''
4394 # map input types to rpc msg
4395 _params = dict()
4396 msg = dict(type='Uniter',
4397 request='DestroyAllSubordinates',
4398 version=5,
4399 params=_params)
4400 _params['entities'] = entities
4401 reply = await self.rpc(msg)
4402 return reply
4403
4404
4405
4406 @ReturnMapping(ErrorResults)
4407 async def DestroyUnitStorageAttachments(self, entities):
4408 '''
4409 entities : typing.Sequence[~Entity]
4410 Returns -> typing.Sequence[~ErrorResult]
4411 '''
4412 # map input types to rpc msg
4413 _params = dict()
4414 msg = dict(type='Uniter',
4415 request='DestroyUnitStorageAttachments',
4416 version=5,
4417 params=_params)
4418 _params['entities'] = entities
4419 reply = await self.rpc(msg)
4420 return reply
4421
4422
4423
4424 @ReturnMapping(ErrorResults)
4425 async def EnsureDead(self, entities):
4426 '''
4427 entities : typing.Sequence[~Entity]
4428 Returns -> typing.Sequence[~ErrorResult]
4429 '''
4430 # map input types to rpc msg
4431 _params = dict()
4432 msg = dict(type='Uniter',
4433 request='EnsureDead',
4434 version=5,
4435 params=_params)
4436 _params['entities'] = entities
4437 reply = await self.rpc(msg)
4438 return reply
4439
4440
4441
4442 @ReturnMapping(ErrorResults)
4443 async def EnterScope(self, relation_units):
4444 '''
4445 relation_units : typing.Sequence[~RelationUnit]
4446 Returns -> typing.Sequence[~ErrorResult]
4447 '''
4448 # map input types to rpc msg
4449 _params = dict()
4450 msg = dict(type='Uniter',
4451 request='EnterScope',
4452 version=5,
4453 params=_params)
4454 _params['relation-units'] = relation_units
4455 reply = await self.rpc(msg)
4456 return reply
4457
4458
4459
4460 @ReturnMapping(ErrorResults)
4461 async def FinishActions(self, results):
4462 '''
4463 results : typing.Sequence[~ActionExecutionResult]
4464 Returns -> typing.Sequence[~ErrorResult]
4465 '''
4466 # map input types to rpc msg
4467 _params = dict()
4468 msg = dict(type='Uniter',
4469 request='FinishActions',
4470 version=5,
4471 params=_params)
4472 _params['results'] = results
4473 reply = await self.rpc(msg)
4474 return reply
4475
4476
4477
4478 @ReturnMapping(MeterStatusResults)
4479 async def GetMeterStatus(self, entities):
4480 '''
4481 entities : typing.Sequence[~Entity]
4482 Returns -> typing.Sequence[~MeterStatusResult]
4483 '''
4484 # map input types to rpc msg
4485 _params = dict()
4486 msg = dict(type='Uniter',
4487 request='GetMeterStatus',
4488 version=5,
4489 params=_params)
4490 _params['entities'] = entities
4491 reply = await self.rpc(msg)
4492 return reply
4493
4494
4495
4496 @ReturnMapping(StringBoolResults)
4497 async def GetPrincipal(self, entities):
4498 '''
4499 entities : typing.Sequence[~Entity]
4500 Returns -> typing.Sequence[~StringBoolResult]
4501 '''
4502 # map input types to rpc msg
4503 _params = dict()
4504 msg = dict(type='Uniter',
4505 request='GetPrincipal',
4506 version=5,
4507 params=_params)
4508 _params['entities'] = entities
4509 reply = await self.rpc(msg)
4510 return reply
4511
4512
4513
4514 @ReturnMapping(BoolResults)
4515 async def HasSubordinates(self, entities):
4516 '''
4517 entities : typing.Sequence[~Entity]
4518 Returns -> typing.Sequence[~BoolResult]
4519 '''
4520 # map input types to rpc msg
4521 _params = dict()
4522 msg = dict(type='Uniter',
4523 request='HasSubordinates',
4524 version=5,
4525 params=_params)
4526 _params['entities'] = entities
4527 reply = await self.rpc(msg)
4528 return reply
4529
4530
4531
4532 @ReturnMapping(StringsResults)
4533 async def JoinedRelations(self, entities):
4534 '''
4535 entities : typing.Sequence[~Entity]
4536 Returns -> typing.Sequence[~StringsResult]
4537 '''
4538 # map input types to rpc msg
4539 _params = dict()
4540 msg = dict(type='Uniter',
4541 request='JoinedRelations',
4542 version=5,
4543 params=_params)
4544 _params['entities'] = entities
4545 reply = await self.rpc(msg)
4546 return reply
4547
4548
4549
4550 @ReturnMapping(ErrorResults)
4551 async def LeaveScope(self, relation_units):
4552 '''
4553 relation_units : typing.Sequence[~RelationUnit]
4554 Returns -> typing.Sequence[~ErrorResult]
4555 '''
4556 # map input types to rpc msg
4557 _params = dict()
4558 msg = dict(type='Uniter',
4559 request='LeaveScope',
4560 version=5,
4561 params=_params)
4562 _params['relation-units'] = relation_units
4563 reply = await self.rpc(msg)
4564 return reply
4565
4566
4567
4568 @ReturnMapping(LifeResults)
4569 async def Life(self, entities):
4570 '''
4571 entities : typing.Sequence[~Entity]
4572 Returns -> typing.Sequence[~LifeResult]
4573 '''
4574 # map input types to rpc msg
4575 _params = dict()
4576 msg = dict(type='Uniter',
4577 request='Life',
4578 version=5,
4579 params=_params)
4580 _params['entities'] = entities
4581 reply = await self.rpc(msg)
4582 return reply
4583
4584
4585
4586 @ReturnMapping(ErrorResults)
4587 async def Merge(self, params):
4588 '''
4589 params : typing.Sequence[~MergeLeadershipSettingsParam]
4590 Returns -> typing.Sequence[~ErrorResult]
4591 '''
4592 # map input types to rpc msg
4593 _params = dict()
4594 msg = dict(type='Uniter',
4595 request='Merge',
4596 version=5,
4597 params=_params)
4598 _params['params'] = params
4599 reply = await self.rpc(msg)
4600 return reply
4601
4602
4603
4604 @ReturnMapping(ModelConfigResult)
4605 async def ModelConfig(self):
4606 '''
4607
4608 Returns -> typing.Mapping[str, typing.Any]
4609 '''
4610 # map input types to rpc msg
4611 _params = dict()
4612 msg = dict(type='Uniter',
4613 request='ModelConfig',
4614 version=5,
4615 params=_params)
4616
4617 reply = await self.rpc(msg)
4618 return reply
4619
4620
4621
4622 @ReturnMapping(StringResult)
4623 async def ModelUUID(self):
4624 '''
4625
4626 Returns -> typing.Union[_ForwardRef('Error'), str]
4627 '''
4628 # map input types to rpc msg
4629 _params = dict()
4630 msg = dict(type='Uniter',
4631 request='ModelUUID',
4632 version=5,
4633 params=_params)
4634
4635 reply = await self.rpc(msg)
4636 return reply
4637
4638
4639
4640 @ReturnMapping(NetworkInfoResults)
4641 async def NetworkInfo(self, bindings, unit):
4642 '''
4643 bindings : typing.Sequence[str]
4644 unit : str
4645 Returns -> typing.Mapping[str, ~NetworkInfoResult]
4646 '''
4647 # map input types to rpc msg
4648 _params = dict()
4649 msg = dict(type='Uniter',
4650 request='NetworkInfo',
4651 version=5,
4652 params=_params)
4653 _params['bindings'] = bindings
4654 _params['unit'] = unit
4655 reply = await self.rpc(msg)
4656 return reply
4657
4658
4659
4660 @ReturnMapping(ErrorResults)
4661 async def OpenPorts(self, entities):
4662 '''
4663 entities : typing.Sequence[~EntityPortRange]
4664 Returns -> typing.Sequence[~ErrorResult]
4665 '''
4666 # map input types to rpc msg
4667 _params = dict()
4668 msg = dict(type='Uniter',
4669 request='OpenPorts',
4670 version=5,
4671 params=_params)
4672 _params['entities'] = entities
4673 reply = await self.rpc(msg)
4674 return reply
4675
4676
4677
4678 @ReturnMapping(StringResults)
4679 async def PrivateAddress(self, entities):
4680 '''
4681 entities : typing.Sequence[~Entity]
4682 Returns -> typing.Sequence[~StringResult]
4683 '''
4684 # map input types to rpc msg
4685 _params = dict()
4686 msg = dict(type='Uniter',
4687 request='PrivateAddress',
4688 version=5,
4689 params=_params)
4690 _params['entities'] = entities
4691 reply = await self.rpc(msg)
4692 return reply
4693
4694
4695
4696 @ReturnMapping(StringResult)
4697 async def ProviderType(self):
4698 '''
4699
4700 Returns -> typing.Union[_ForwardRef('Error'), str]
4701 '''
4702 # map input types to rpc msg
4703 _params = dict()
4704 msg = dict(type='Uniter',
4705 request='ProviderType',
4706 version=5,
4707 params=_params)
4708
4709 reply = await self.rpc(msg)
4710 return reply
4711
4712
4713
4714 @ReturnMapping(StringResults)
4715 async def PublicAddress(self, entities):
4716 '''
4717 entities : typing.Sequence[~Entity]
4718 Returns -> typing.Sequence[~StringResult]
4719 '''
4720 # map input types to rpc msg
4721 _params = dict()
4722 msg = dict(type='Uniter',
4723 request='PublicAddress',
4724 version=5,
4725 params=_params)
4726 _params['entities'] = entities
4727 reply = await self.rpc(msg)
4728 return reply
4729
4730
4731
4732 @ReturnMapping(GetLeadershipSettingsBulkResults)
4733 async def Read(self, entities):
4734 '''
4735 entities : typing.Sequence[~Entity]
4736 Returns -> typing.Sequence[~GetLeadershipSettingsResult]
4737 '''
4738 # map input types to rpc msg
4739 _params = dict()
4740 msg = dict(type='Uniter',
4741 request='Read',
4742 version=5,
4743 params=_params)
4744 _params['entities'] = entities
4745 reply = await self.rpc(msg)
4746 return reply
4747
4748
4749
4750 @ReturnMapping(SettingsResults)
4751 async def ReadRemoteSettings(self, relation_unit_pairs):
4752 '''
4753 relation_unit_pairs : typing.Sequence[~RelationUnitPair]
4754 Returns -> typing.Sequence[~SettingsResult]
4755 '''
4756 # map input types to rpc msg
4757 _params = dict()
4758 msg = dict(type='Uniter',
4759 request='ReadRemoteSettings',
4760 version=5,
4761 params=_params)
4762 _params['relation-unit-pairs'] = relation_unit_pairs
4763 reply = await self.rpc(msg)
4764 return reply
4765
4766
4767
4768 @ReturnMapping(SettingsResults)
4769 async def ReadSettings(self, relation_units):
4770 '''
4771 relation_units : typing.Sequence[~RelationUnit]
4772 Returns -> typing.Sequence[~SettingsResult]
4773 '''
4774 # map input types to rpc msg
4775 _params = dict()
4776 msg = dict(type='Uniter',
4777 request='ReadSettings',
4778 version=5,
4779 params=_params)
4780 _params['relation-units'] = relation_units
4781 reply = await self.rpc(msg)
4782 return reply
4783
4784
4785
4786 @ReturnMapping(RelationResults)
4787 async def Relation(self, relation_units):
4788 '''
4789 relation_units : typing.Sequence[~RelationUnit]
4790 Returns -> typing.Sequence[~RelationResult]
4791 '''
4792 # map input types to rpc msg
4793 _params = dict()
4794 msg = dict(type='Uniter',
4795 request='Relation',
4796 version=5,
4797 params=_params)
4798 _params['relation-units'] = relation_units
4799 reply = await self.rpc(msg)
4800 return reply
4801
4802
4803
4804 @ReturnMapping(RelationResults)
4805 async def RelationById(self, relation_ids):
4806 '''
4807 relation_ids : typing.Sequence[int]
4808 Returns -> typing.Sequence[~RelationResult]
4809 '''
4810 # map input types to rpc msg
4811 _params = dict()
4812 msg = dict(type='Uniter',
4813 request='RelationById',
4814 version=5,
4815 params=_params)
4816 _params['relation-ids'] = relation_ids
4817 reply = await self.rpc(msg)
4818 return reply
4819
4820
4821
4822 @ReturnMapping(ErrorResults)
4823 async def RemoveStorageAttachments(self, ids):
4824 '''
4825 ids : typing.Sequence[~StorageAttachmentId]
4826 Returns -> typing.Sequence[~ErrorResult]
4827 '''
4828 # map input types to rpc msg
4829 _params = dict()
4830 msg = dict(type='Uniter',
4831 request='RemoveStorageAttachments',
4832 version=5,
4833 params=_params)
4834 _params['ids'] = ids
4835 reply = await self.rpc(msg)
4836 return reply
4837
4838
4839
4840 @ReturnMapping(ErrorResults)
4841 async def RequestReboot(self, entities):
4842 '''
4843 entities : typing.Sequence[~Entity]
4844 Returns -> typing.Sequence[~ErrorResult]
4845 '''
4846 # map input types to rpc msg
4847 _params = dict()
4848 msg = dict(type='Uniter',
4849 request='RequestReboot',
4850 version=5,
4851 params=_params)
4852 _params['entities'] = entities
4853 reply = await self.rpc(msg)
4854 return reply
4855
4856
4857
4858 @ReturnMapping(ResolvedModeResults)
4859 async def Resolved(self, entities):
4860 '''
4861 entities : typing.Sequence[~Entity]
4862 Returns -> typing.Sequence[~ResolvedModeResult]
4863 '''
4864 # map input types to rpc msg
4865 _params = dict()
4866 msg = dict(type='Uniter',
4867 request='Resolved',
4868 version=5,
4869 params=_params)
4870 _params['entities'] = entities
4871 reply = await self.rpc(msg)
4872 return reply
4873
4874
4875
4876 @ReturnMapping(StringResult)
4877 async def SLALevel(self):
4878 '''
4879
4880 Returns -> typing.Union[_ForwardRef('Error'), str]
4881 '''
4882 # map input types to rpc msg
4883 _params = dict()
4884 msg = dict(type='Uniter',
4885 request='SLALevel',
4886 version=5,
4887 params=_params)
4888
4889 reply = await self.rpc(msg)
4890 return reply
4891
4892
4893
4894 @ReturnMapping(ErrorResults)
4895 async def SetAgentStatus(self, entities):
4896 '''
4897 entities : typing.Sequence[~EntityStatusArgs]
4898 Returns -> typing.Sequence[~ErrorResult]
4899 '''
4900 # map input types to rpc msg
4901 _params = dict()
4902 msg = dict(type='Uniter',
4903 request='SetAgentStatus',
4904 version=5,
4905 params=_params)
4906 _params['entities'] = entities
4907 reply = await self.rpc(msg)
4908 return reply
4909
4910
4911
4912 @ReturnMapping(ErrorResults)
4913 async def SetApplicationStatus(self, entities):
4914 '''
4915 entities : typing.Sequence[~EntityStatusArgs]
4916 Returns -> typing.Sequence[~ErrorResult]
4917 '''
4918 # map input types to rpc msg
4919 _params = dict()
4920 msg = dict(type='Uniter',
4921 request='SetApplicationStatus',
4922 version=5,
4923 params=_params)
4924 _params['entities'] = entities
4925 reply = await self.rpc(msg)
4926 return reply
4927
4928
4929
4930 @ReturnMapping(ErrorResults)
4931 async def SetCharmURL(self, entities):
4932 '''
4933 entities : typing.Sequence[~EntityCharmURL]
4934 Returns -> typing.Sequence[~ErrorResult]
4935 '''
4936 # map input types to rpc msg
4937 _params = dict()
4938 msg = dict(type='Uniter',
4939 request='SetCharmURL',
4940 version=5,
4941 params=_params)
4942 _params['entities'] = entities
4943 reply = await self.rpc(msg)
4944 return reply
4945
4946
4947
4948 @ReturnMapping(ErrorResults)
4949 async def SetStatus(self, entities):
4950 '''
4951 entities : typing.Sequence[~EntityStatusArgs]
4952 Returns -> typing.Sequence[~ErrorResult]
4953 '''
4954 # map input types to rpc msg
4955 _params = dict()
4956 msg = dict(type='Uniter',
4957 request='SetStatus',
4958 version=5,
4959 params=_params)
4960 _params['entities'] = entities
4961 reply = await self.rpc(msg)
4962 return reply
4963
4964
4965
4966 @ReturnMapping(ErrorResults)
4967 async def SetUnitStatus(self, entities):
4968 '''
4969 entities : typing.Sequence[~EntityStatusArgs]
4970 Returns -> typing.Sequence[~ErrorResult]
4971 '''
4972 # map input types to rpc msg
4973 _params = dict()
4974 msg = dict(type='Uniter',
4975 request='SetUnitStatus',
4976 version=5,
4977 params=_params)
4978 _params['entities'] = entities
4979 reply = await self.rpc(msg)
4980 return reply
4981
4982
4983
4984 @ReturnMapping(ErrorResults)
4985 async def SetWorkloadVersion(self, entities):
4986 '''
4987 entities : typing.Sequence[~EntityWorkloadVersion]
4988 Returns -> typing.Sequence[~ErrorResult]
4989 '''
4990 # map input types to rpc msg
4991 _params = dict()
4992 msg = dict(type='Uniter',
4993 request='SetWorkloadVersion',
4994 version=5,
4995 params=_params)
4996 _params['entities'] = entities
4997 reply = await self.rpc(msg)
4998 return reply
4999
5000
5001
5002 @ReturnMapping(LifeResults)
5003 async def StorageAttachmentLife(self, ids):
5004 '''
5005 ids : typing.Sequence[~StorageAttachmentId]
5006 Returns -> typing.Sequence[~LifeResult]
5007 '''
5008 # map input types to rpc msg
5009 _params = dict()
5010 msg = dict(type='Uniter',
5011 request='StorageAttachmentLife',
5012 version=5,
5013 params=_params)
5014 _params['ids'] = ids
5015 reply = await self.rpc(msg)
5016 return reply
5017
5018
5019
5020 @ReturnMapping(StorageAttachmentResults)
5021 async def StorageAttachments(self, ids):
5022 '''
5023 ids : typing.Sequence[~StorageAttachmentId]
5024 Returns -> typing.Sequence[~StorageAttachmentResult]
5025 '''
5026 # map input types to rpc msg
5027 _params = dict()
5028 msg = dict(type='Uniter',
5029 request='StorageAttachments',
5030 version=5,
5031 params=_params)
5032 _params['ids'] = ids
5033 reply = await self.rpc(msg)
5034 return reply
5035
5036
5037
5038 @ReturnMapping(StatusResults)
5039 async def UnitStatus(self, entities):
5040 '''
5041 entities : typing.Sequence[~Entity]
5042 Returns -> typing.Sequence[~StatusResult]
5043 '''
5044 # map input types to rpc msg
5045 _params = dict()
5046 msg = dict(type='Uniter',
5047 request='UnitStatus',
5048 version=5,
5049 params=_params)
5050 _params['entities'] = entities
5051 reply = await self.rpc(msg)
5052 return reply
5053
5054
5055
5056 @ReturnMapping(StorageAttachmentIdsResults)
5057 async def UnitStorageAttachments(self, entities):
5058 '''
5059 entities : typing.Sequence[~Entity]
5060 Returns -> typing.Sequence[~StorageAttachmentIdsResult]
5061 '''
5062 # map input types to rpc msg
5063 _params = dict()
5064 msg = dict(type='Uniter',
5065 request='UnitStorageAttachments',
5066 version=5,
5067 params=_params)
5068 _params['entities'] = entities
5069 reply = await self.rpc(msg)
5070 return reply
5071
5072
5073
5074 @ReturnMapping(ErrorResults)
5075 async def UpdateSettings(self, relation_units):
5076 '''
5077 relation_units : typing.Sequence[~RelationUnitSettings]
5078 Returns -> typing.Sequence[~ErrorResult]
5079 '''
5080 # map input types to rpc msg
5081 _params = dict()
5082 msg = dict(type='Uniter',
5083 request='UpdateSettings',
5084 version=5,
5085 params=_params)
5086 _params['relation-units'] = relation_units
5087 reply = await self.rpc(msg)
5088 return reply
5089
5090
5091
5092 @ReturnMapping(NotifyWatchResults)
5093 async def Watch(self, entities):
5094 '''
5095 entities : typing.Sequence[~Entity]
5096 Returns -> typing.Sequence[~NotifyWatchResult]
5097 '''
5098 # map input types to rpc msg
5099 _params = dict()
5100 msg = dict(type='Uniter',
5101 request='Watch',
5102 version=5,
5103 params=_params)
5104 _params['entities'] = entities
5105 reply = await self.rpc(msg)
5106 return reply
5107
5108
5109
5110 @ReturnMapping(NotifyWatchResult)
5111 async def WatchAPIHostPorts(self):
5112 '''
5113
5114 Returns -> typing.Union[str, _ForwardRef('Error')]
5115 '''
5116 # map input types to rpc msg
5117 _params = dict()
5118 msg = dict(type='Uniter',
5119 request='WatchAPIHostPorts',
5120 version=5,
5121 params=_params)
5122
5123 reply = await self.rpc(msg)
5124 return reply
5125
5126
5127
5128 @ReturnMapping(StringsWatchResults)
5129 async def WatchActionNotifications(self, entities):
5130 '''
5131 entities : typing.Sequence[~Entity]
5132 Returns -> typing.Sequence[~StringsWatchResult]
5133 '''
5134 # map input types to rpc msg
5135 _params = dict()
5136 msg = dict(type='Uniter',
5137 request='WatchActionNotifications',
5138 version=5,
5139 params=_params)
5140 _params['entities'] = entities
5141 reply = await self.rpc(msg)
5142 return reply
5143
5144
5145
5146 @ReturnMapping(NotifyWatchResults)
5147 async def WatchConfigSettings(self, entities):
5148 '''
5149 entities : typing.Sequence[~Entity]
5150 Returns -> typing.Sequence[~NotifyWatchResult]
5151 '''
5152 # map input types to rpc msg
5153 _params = dict()
5154 msg = dict(type='Uniter',
5155 request='WatchConfigSettings',
5156 version=5,
5157 params=_params)
5158 _params['entities'] = entities
5159 reply = await self.rpc(msg)
5160 return reply
5161
5162
5163
5164 @ReturnMapping(NotifyWatchResult)
5165 async def WatchForModelConfigChanges(self):
5166 '''
5167
5168 Returns -> typing.Union[str, _ForwardRef('Error')]
5169 '''
5170 # map input types to rpc msg
5171 _params = dict()
5172 msg = dict(type='Uniter',
5173 request='WatchForModelConfigChanges',
5174 version=5,
5175 params=_params)
5176
5177 reply = await self.rpc(msg)
5178 return reply
5179
5180
5181
5182 @ReturnMapping(NotifyWatchResults)
5183 async def WatchLeadershipSettings(self, entities):
5184 '''
5185 entities : typing.Sequence[~Entity]
5186 Returns -> typing.Sequence[~NotifyWatchResult]
5187 '''
5188 # map input types to rpc msg
5189 _params = dict()
5190 msg = dict(type='Uniter',
5191 request='WatchLeadershipSettings',
5192 version=5,
5193 params=_params)
5194 _params['entities'] = entities
5195 reply = await self.rpc(msg)
5196 return reply
5197
5198
5199
5200 @ReturnMapping(NotifyWatchResults)
5201 async def WatchMeterStatus(self, entities):
5202 '''
5203 entities : typing.Sequence[~Entity]
5204 Returns -> typing.Sequence[~NotifyWatchResult]
5205 '''
5206 # map input types to rpc msg
5207 _params = dict()
5208 msg = dict(type='Uniter',
5209 request='WatchMeterStatus',
5210 version=5,
5211 params=_params)
5212 _params['entities'] = entities
5213 reply = await self.rpc(msg)
5214 return reply
5215
5216
5217
5218 @ReturnMapping(RelationUnitsWatchResults)
5219 async def WatchRelationUnits(self, relation_units):
5220 '''
5221 relation_units : typing.Sequence[~RelationUnit]
5222 Returns -> typing.Sequence[~RelationUnitsWatchResult]
5223 '''
5224 # map input types to rpc msg
5225 _params = dict()
5226 msg = dict(type='Uniter',
5227 request='WatchRelationUnits',
5228 version=5,
5229 params=_params)
5230 _params['relation-units'] = relation_units
5231 reply = await self.rpc(msg)
5232 return reply
5233
5234
5235
5236 @ReturnMapping(NotifyWatchResults)
5237 async def WatchStorageAttachments(self, ids):
5238 '''
5239 ids : typing.Sequence[~StorageAttachmentId]
5240 Returns -> typing.Sequence[~NotifyWatchResult]
5241 '''
5242 # map input types to rpc msg
5243 _params = dict()
5244 msg = dict(type='Uniter',
5245 request='WatchStorageAttachments',
5246 version=5,
5247 params=_params)
5248 _params['ids'] = ids
5249 reply = await self.rpc(msg)
5250 return reply
5251
5252
5253
5254 @ReturnMapping(NotifyWatchResults)
5255 async def WatchUnitAddresses(self, entities):
5256 '''
5257 entities : typing.Sequence[~Entity]
5258 Returns -> typing.Sequence[~NotifyWatchResult]
5259 '''
5260 # map input types to rpc msg
5261 _params = dict()
5262 msg = dict(type='Uniter',
5263 request='WatchUnitAddresses',
5264 version=5,
5265 params=_params)
5266 _params['entities'] = entities
5267 reply = await self.rpc(msg)
5268 return reply
5269
5270
5271
5272 @ReturnMapping(StringsWatchResults)
5273 async def WatchUnitRelations(self, entities):
5274 '''
5275 entities : typing.Sequence[~Entity]
5276 Returns -> typing.Sequence[~StringsWatchResult]
5277 '''
5278 # map input types to rpc msg
5279 _params = dict()
5280 msg = dict(type='Uniter',
5281 request='WatchUnitRelations',
5282 version=5,
5283 params=_params)
5284 _params['entities'] = entities
5285 reply = await self.rpc(msg)
5286 return reply
5287
5288
5289
5290 @ReturnMapping(StringsWatchResults)
5291 async def WatchUnitStorageAttachments(self, entities):
5292 '''
5293 entities : typing.Sequence[~Entity]
5294 Returns -> typing.Sequence[~StringsWatchResult]
5295 '''
5296 # map input types to rpc msg
5297 _params = dict()
5298 msg = dict(type='Uniter',
5299 request='WatchUnitStorageAttachments',
5300 version=5,
5301 params=_params)
5302 _params['entities'] = entities
5303 reply = await self.rpc(msg)
5304 return reply
5305
5306
5307
5308 @ReturnMapping(StringResults)
5309 async def WorkloadVersion(self, entities):
5310 '''
5311 entities : typing.Sequence[~Entity]
5312 Returns -> typing.Sequence[~StringResult]
5313 '''
5314 # map input types to rpc msg
5315 _params = dict()
5316 msg = dict(type='Uniter',
5317 request='WorkloadVersion',
5318 version=5,
5319 params=_params)
5320 _params['entities'] = entities
5321 reply = await self.rpc(msg)
5322 return reply