Squashed 'modules/libjuju/' changes from c50c361..c127833
[osm/N2VC.git] / 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.facade import Type, ReturnMapping
5 from juju.client._definitions import *
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,