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