Squashed 'modules/libjuju/' changes from c50c361..c127833
[osm/N2VC.git] / juju / client / _client2.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 ActionFacade(Type):
9 name = 'Action'
10 version = 2
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=2,
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=2,
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=2,
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=2,
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=2,
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=2,
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=2,
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=2,
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=2,
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=2,
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=2,
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=2,
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 AgentFacade(Type):
398 name = 'Agent'
399 version = 2
400 schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
401 'properties': {'container-type': {'type': 'string'},
402 'error': {'$ref': '#/definitions/Error'},
403 'jobs': {'items': {'type': 'string'},
404 'type': 'array'},
405 'life': {'type': 'string'}},
406 'required': ['life',
407 'jobs',
408 'container-type'],
409 'type': 'object'},
410 'AgentGetEntitiesResults': {'additionalProperties': False,
411 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
412 'type': 'array'}},
413 'required': ['entities'],
414 'type': 'object'},
415 'CloudCredential': {'additionalProperties': False,
416 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
417 'type': 'object'},
418 'auth-type': {'type': 'string'},
419 'redacted': {'items': {'type': 'string'},
420 'type': 'array'}},
421 'required': ['auth-type'],
422 'type': 'object'},
423 'CloudSpec': {'additionalProperties': False,
424 'properties': {'cacertificates': {'items': {'type': 'string'},
425 'type': 'array'},
426 'credential': {'$ref': '#/definitions/CloudCredential'},
427 'endpoint': {'type': 'string'},
428 'identity-endpoint': {'type': 'string'},
429 'name': {'type': 'string'},
430 'region': {'type': 'string'},
431 'storage-endpoint': {'type': 'string'},
432 'type': {'type': 'string'}},
433 'required': ['type', 'name'],
434 'type': 'object'},
435 'CloudSpecResult': {'additionalProperties': False,
436 'properties': {'error': {'$ref': '#/definitions/Error'},
437 'result': {'$ref': '#/definitions/CloudSpec'}},
438 'type': 'object'},
439 'CloudSpecResults': {'additionalProperties': False,
440 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
441 'type': 'array'}},
442 'type': 'object'},
443 'ControllerAPIInfoResult': {'additionalProperties': False,
444 'properties': {'addresses': {'items': {'type': 'string'},
445 'type': 'array'},
446 'cacert': {'type': 'string'},
447 'error': {'$ref': '#/definitions/Error'}},
448 'required': ['addresses',
449 'cacert'],
450 'type': 'object'},
451 'ControllerAPIInfoResults': {'additionalProperties': False,
452 'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
453 'type': 'array'}},
454 'required': ['results'],
455 'type': 'object'},
456 'ControllerConfigResult': {'additionalProperties': False,
457 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
458 'type': 'object'}},
459 'type': 'object'}},
460 'required': ['config'],
461 'type': 'object'},
462 'Entities': {'additionalProperties': False,
463 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
464 'type': 'array'}},
465 'required': ['entities'],
466 'type': 'object'},
467 'Entity': {'additionalProperties': False,
468 'properties': {'tag': {'type': 'string'}},
469 'required': ['tag'],
470 'type': 'object'},
471 'EntityPassword': {'additionalProperties': False,
472 'properties': {'password': {'type': 'string'},
473 'tag': {'type': 'string'}},
474 'required': ['tag', 'password'],
475 'type': 'object'},
476 'EntityPasswords': {'additionalProperties': False,
477 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
478 'type': 'array'}},
479 'required': ['changes'],
480 'type': 'object'},
481 'Error': {'additionalProperties': False,
482 'properties': {'code': {'type': 'string'},
483 'info': {'$ref': '#/definitions/ErrorInfo'},
484 'message': {'type': 'string'}},
485 'required': ['message', 'code'],
486 'type': 'object'},
487 'ErrorInfo': {'additionalProperties': False,
488 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
489 'macaroon-path': {'type': 'string'}},
490 'type': 'object'},
491 'ErrorResult': {'additionalProperties': False,
492 'properties': {'error': {'$ref': '#/definitions/Error'}},
493 'type': 'object'},
494 'ErrorResults': {'additionalProperties': False,
495 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
496 'type': 'array'}},
497 'required': ['results'],
498 'type': 'object'},
499 'IsMasterResult': {'additionalProperties': False,
500 'properties': {'master': {'type': 'boolean'}},
501 'required': ['master'],
502 'type': 'object'},
503 'Macaroon': {'additionalProperties': False, 'type': 'object'},
504 'ModelConfigResult': {'additionalProperties': False,
505 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
506 'type': 'object'}},
507 'type': 'object'}},
508 'required': ['config'],
509 'type': 'object'},
510 'ModelTag': {'additionalProperties': False, 'type': 'object'},
511 'NotifyWatchResult': {'additionalProperties': False,
512 'properties': {'NotifyWatcherId': {'type': 'string'},
513 'error': {'$ref': '#/definitions/Error'}},
514 'required': ['NotifyWatcherId'],
515 'type': 'object'},
516 'NotifyWatchResults': {'additionalProperties': False,
517 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
518 'type': 'array'}},
519 'required': ['results'],
520 'type': 'object'},
521 'StateServingInfo': {'additionalProperties': False,
522 'properties': {'api-port': {'type': 'integer'},
523 'ca-private-key': {'type': 'string'},
524 'cert': {'type': 'string'},
525 'controller-api-port': {'type': 'integer'},
526 'private-key': {'type': 'string'},
527 'shared-secret': {'type': 'string'},
528 'state-port': {'type': 'integer'},
529 'system-identity': {'type': 'string'}},
530 'required': ['api-port',
531 'state-port',
532 'cert',
533 'private-key',
534 'ca-private-key',
535 'shared-secret',
536 'system-identity'],
537 'type': 'object'}},
538 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
539 'Result': {'$ref': '#/definitions/ErrorResults'}},
540 'type': 'object'},
541 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
542 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
543 'type': 'object'},
544 'ControllerAPIInfoForModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
545 'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
546 'type': 'object'},
547 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
548 'type': 'object'},
549 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
550 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
551 'type': 'object'},
552 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
553 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
554 'type': 'object'},
555 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
556 'type': 'object'},
557 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
558 'type': 'object'},
559 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
560 'Result': {'$ref': '#/definitions/ErrorResults'}},
561 'type': 'object'},
562 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
563 'type': 'object'},
564 'WatchCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
565 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
566 'type': 'object'},
567 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
568 'type': 'object'}},
569 'type': 'object'}
570
571
572 @ReturnMapping(ErrorResults)
573 async def ClearReboot(self, entities):
574 '''
575 entities : typing.Sequence[~Entity]
576 Returns -> typing.Sequence[~ErrorResult]
577 '''
578 # map input types to rpc msg
579 _params = dict()
580 msg = dict(type='Agent',
581 request='ClearReboot',
582 version=2,
583 params=_params)
584 _params['entities'] = entities
585 reply = await self.rpc(msg)
586 return reply
587
588
589
590 @ReturnMapping(CloudSpecResults)
591 async def CloudSpec(self, entities):
592 '''
593 entities : typing.Sequence[~Entity]
594 Returns -> typing.Sequence[~CloudSpecResult]
595 '''
596 # map input types to rpc msg
597 _params = dict()
598 msg = dict(type='Agent',
599 request='CloudSpec',
600 version=2,
601 params=_params)
602 _params['entities'] = entities
603 reply = await self.rpc(msg)
604 return reply
605
606
607
608 @ReturnMapping(ControllerAPIInfoResults)
609 async def ControllerAPIInfoForModels(self, entities):
610 '''
611 entities : typing.Sequence[~Entity]
612 Returns -> typing.Sequence[~ControllerAPIInfoResult]
613 '''
614 # map input types to rpc msg
615 _params = dict()
616 msg = dict(type='Agent',
617 request='ControllerAPIInfoForModels',
618 version=2,
619 params=_params)
620 _params['entities'] = entities
621 reply = await self.rpc(msg)
622 return reply
623
624
625
626 @ReturnMapping(ControllerConfigResult)
627 async def ControllerConfig(self):
628 '''
629
630 Returns -> typing.Mapping[str, typing.Any]
631 '''
632 # map input types to rpc msg
633 _params = dict()
634 msg = dict(type='Agent',
635 request='ControllerConfig',
636 version=2,
637 params=_params)
638
639 reply = await self.rpc(msg)
640 return reply
641
642
643
644 @ReturnMapping(CloudSpecResult)
645 async def GetCloudSpec(self):
646 '''
647
648 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
649 '''
650 # map input types to rpc msg
651 _params = dict()
652 msg = dict(type='Agent',
653 request='GetCloudSpec',
654 version=2,
655 params=_params)
656
657 reply = await self.rpc(msg)
658 return reply
659
660
661
662 @ReturnMapping(AgentGetEntitiesResults)
663 async def GetEntities(self, entities):
664 '''
665 entities : typing.Sequence[~Entity]
666 Returns -> typing.Sequence[~AgentGetEntitiesResult]
667 '''
668 # map input types to rpc msg
669 _params = dict()
670 msg = dict(type='Agent',
671 request='GetEntities',
672 version=2,
673 params=_params)
674 _params['entities'] = entities
675 reply = await self.rpc(msg)
676 return reply
677
678
679
680 @ReturnMapping(IsMasterResult)
681 async def IsMaster(self):
682 '''
683
684 Returns -> bool
685 '''
686 # map input types to rpc msg
687 _params = dict()
688 msg = dict(type='Agent',
689 request='IsMaster',
690 version=2,
691 params=_params)
692
693 reply = await self.rpc(msg)
694 return reply
695
696
697
698 @ReturnMapping(ModelConfigResult)
699 async def ModelConfig(self):
700 '''
701
702 Returns -> typing.Mapping[str, typing.Any]
703 '''
704 # map input types to rpc msg
705 _params = dict()
706 msg = dict(type='Agent',
707 request='ModelConfig',
708 version=2,
709 params=_params)
710
711 reply = await self.rpc(msg)
712 return reply
713
714
715
716 @ReturnMapping(ErrorResults)
717 async def SetPasswords(self, changes):
718 '''
719 changes : typing.Sequence[~EntityPassword]
720 Returns -> typing.Sequence[~ErrorResult]
721 '''
722 # map input types to rpc msg
723 _params = dict()
724 msg = dict(type='Agent',
725 request='SetPasswords',
726 version=2,
727 params=_params)
728 _params['changes'] = changes
729 reply = await self.rpc(msg)
730 return reply
731
732
733
734 @ReturnMapping(StateServingInfo)
735 async def StateServingInfo(self):
736 '''
737
738 Returns -> typing.Union[int, str]
739 '''
740 # map input types to rpc msg
741 _params = dict()
742 msg = dict(type='Agent',
743 request='StateServingInfo',
744 version=2,
745 params=_params)
746
747 reply = await self.rpc(msg)
748 return reply
749
750
751
752 @ReturnMapping(NotifyWatchResults)
753 async def WatchCredentials(self, entities):
754 '''
755 entities : typing.Sequence[~Entity]
756 Returns -> typing.Sequence[~NotifyWatchResult]
757 '''
758 # map input types to rpc msg
759 _params = dict()
760 msg = dict(type='Agent',
761 request='WatchCredentials',
762 version=2,
763 params=_params)
764 _params['entities'] = entities
765 reply = await self.rpc(msg)
766 return reply
767
768
769
770 @ReturnMapping(NotifyWatchResult)
771 async def WatchForModelConfigChanges(self):
772 '''
773
774 Returns -> typing.Union[str, _ForwardRef('Error')]
775 '''
776 # map input types to rpc msg
777 _params = dict()
778 msg = dict(type='Agent',
779 request='WatchForModelConfigChanges',
780 version=2,
781 params=_params)
782
783 reply = await self.rpc(msg)
784 return reply
785
786
787
788 class AllModelWatcherFacade(Type):
789 name = 'AllModelWatcher'
790 version = 2
791 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
792 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
793 'type': 'array'}},
794 'required': ['deltas'],
795 'type': 'object'},
796 'Delta': {'additionalProperties': False,
797 'properties': {'entity': {'additionalProperties': True,
798 'type': 'object'},
799 'removed': {'type': 'boolean'}},
800 'required': ['removed', 'entity'],
801 'type': 'object'}},
802 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
803 'type': 'object'},
804 'Stop': {'type': 'object'}},
805 'type': 'object'}
806
807
808 @ReturnMapping(AllWatcherNextResults)
809 async def Next(self):
810 '''
811
812 Returns -> typing.Sequence[~Delta]
813 '''
814 # map input types to rpc msg
815 _params = dict()
816 msg = dict(type='AllModelWatcher',
817 request='Next',
818 version=2,
819 params=_params)
820
821 reply = await self.rpc(msg)
822 return reply
823
824
825
826 @ReturnMapping(None)
827 async def Stop(self):
828 '''
829
830 Returns -> None
831 '''
832 # map input types to rpc msg
833 _params = dict()
834 msg = dict(type='AllModelWatcher',
835 request='Stop',
836 version=2,
837 params=_params)
838
839 reply = await self.rpc(msg)
840 return reply
841
842
843
844 class AnnotationsFacade(Type):
845 name = 'Annotations'
846 version = 2
847 schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
848 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
849 'type': 'object'},
850 'entity': {'type': 'string'},
851 'error': {'$ref': '#/definitions/ErrorResult'}},
852 'required': ['entity', 'annotations'],
853 'type': 'object'},
854 'AnnotationsGetResults': {'additionalProperties': False,
855 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
856 'type': 'array'}},
857 'required': ['results'],
858 'type': 'object'},
859 'AnnotationsSet': {'additionalProperties': False,
860 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
861 'type': 'array'}},
862 'required': ['annotations'],
863 'type': 'object'},
864 'Entities': {'additionalProperties': False,
865 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
866 'type': 'array'}},
867 'required': ['entities'],
868 'type': 'object'},
869 'Entity': {'additionalProperties': False,
870 'properties': {'tag': {'type': 'string'}},
871 'required': ['tag'],
872 'type': 'object'},
873 'EntityAnnotations': {'additionalProperties': False,
874 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
875 'type': 'object'},
876 'entity': {'type': 'string'}},
877 'required': ['entity', 'annotations'],
878 'type': 'object'},
879 'Error': {'additionalProperties': False,
880 'properties': {'code': {'type': 'string'},
881 'info': {'$ref': '#/definitions/ErrorInfo'},
882 'message': {'type': 'string'}},
883 'required': ['message', 'code'],
884 'type': 'object'},
885 'ErrorInfo': {'additionalProperties': False,
886 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
887 'macaroon-path': {'type': 'string'}},
888 'type': 'object'},
889 'ErrorResult': {'additionalProperties': False,
890 'properties': {'error': {'$ref': '#/definitions/Error'}},
891 'type': 'object'},
892 'ErrorResults': {'additionalProperties': False,
893 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
894 'type': 'array'}},
895 'required': ['results'],
896 'type': 'object'},
897 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
898 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
899 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
900 'type': 'object'},
901 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
902 'Result': {'$ref': '#/definitions/ErrorResults'}},
903 'type': 'object'}},
904 'type': 'object'}
905
906
907 @ReturnMapping(AnnotationsGetResults)
908 async def Get(self, entities):
909 '''
910 entities : typing.Sequence[~Entity]
911 Returns -> typing.Sequence[~AnnotationsGetResult]
912 '''
913 # map input types to rpc msg
914 _params = dict()
915 msg = dict(type='Annotations',
916 request='Get',
917 version=2,
918 params=_params)
919 _params['entities'] = entities
920 reply = await self.rpc(msg)
921 return reply
922
923
924
925 @ReturnMapping(ErrorResults)
926 async def Set(self, annotations):
927 '''
928 annotations : typing.Sequence[~EntityAnnotations]
929 Returns -> typing.Sequence[~ErrorResult]
930 '''
931 # map input types to rpc msg
932 _params = dict()
933 msg = dict(type='Annotations',
934 request='Set',
935 version=2,
936 params=_params)
937 _params['annotations'] = annotations
938 reply = await self.rpc(msg)
939 return reply
940
941
942
943 class ApplicationFacade(Type):
944 name = 'Application'
945 version = 2
946 schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
947 'properties': {'application': {'type': 'string'},
948 'num-units': {'type': 'integer'},
949 'placement': {'items': {'$ref': '#/definitions/Placement'},
950 'type': 'array'}},
951 'required': ['application',
952 'num-units',
953 'placement'],
954 'type': 'object'},
955 'AddApplicationUnitsResults': {'additionalProperties': False,
956 'properties': {'units': {'items': {'type': 'string'},
957 'type': 'array'}},
958 'required': ['units'],
959 'type': 'object'},
960 'AddRelation': {'additionalProperties': False,
961 'properties': {'endpoints': {'items': {'type': 'string'},
962 'type': 'array'}},
963 'required': ['endpoints'],
964 'type': 'object'},
965 'AddRelationResults': {'additionalProperties': False,
966 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
967 'type': 'object'}},
968 'required': ['endpoints'],
969 'type': 'object'},
970 'ApplicationCharmRelations': {'additionalProperties': False,
971 'properties': {'application': {'type': 'string'}},
972 'required': ['application'],
973 'type': 'object'},
974 'ApplicationCharmRelationsResults': {'additionalProperties': False,
975 'properties': {'charm-relations': {'items': {'type': 'string'},
976 'type': 'array'}},
977 'required': ['charm-relations'],
978 'type': 'object'},
979 'ApplicationDeploy': {'additionalProperties': False,
980 'properties': {'application': {'type': 'string'},
981 'channel': {'type': 'string'},
982 'charm-url': {'type': 'string'},
983 'config': {'patternProperties': {'.*': {'type': 'string'}},
984 'type': 'object'},
985 'config-yaml': {'type': 'string'},
986 'constraints': {'$ref': '#/definitions/Value'},
987 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
988 'type': 'object'},
989 'num-units': {'type': 'integer'},
990 'placement': {'items': {'$ref': '#/definitions/Placement'},
991 'type': 'array'},
992 'resources': {'patternProperties': {'.*': {'type': 'string'}},
993 'type': 'object'},
994 'series': {'type': 'string'},
995 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
996 'type': 'object'}},
997 'required': ['application',
998 'series',
999 'charm-url',
1000 'channel',
1001 'num-units',
1002 'config-yaml',
1003 'constraints'],
1004 'type': 'object'},
1005 'ApplicationDestroy': {'additionalProperties': False,
1006 'properties': {'application': {'type': 'string'}},
1007 'required': ['application'],
1008 'type': 'object'},
1009 'ApplicationExpose': {'additionalProperties': False,
1010 'properties': {'application': {'type': 'string'}},
1011 'required': ['application'],
1012 'type': 'object'},
1013 'ApplicationGet': {'additionalProperties': False,
1014 'properties': {'application': {'type': 'string'}},
1015 'required': ['application'],
1016 'type': 'object'},
1017 'ApplicationGetResults': {'additionalProperties': False,
1018 'properties': {'application': {'type': 'string'},
1019 'charm': {'type': 'string'},
1020 'config': {'patternProperties': {'.*': {'additionalProperties': True,
1021 'type': 'object'}},
1022 'type': 'object'},
1023 'constraints': {'$ref': '#/definitions/Value'},
1024 'series': {'type': 'string'}},
1025 'required': ['application',
1026 'charm',
1027 'config',
1028 'constraints',
1029 'series'],
1030 'type': 'object'},
1031 'ApplicationMetricCredential': {'additionalProperties': False,
1032 'properties': {'application': {'type': 'string'},
1033 'metrics-credentials': {'items': {'type': 'integer'},
1034 'type': 'array'}},
1035 'required': ['application',
1036 'metrics-credentials'],
1037 'type': 'object'},
1038 'ApplicationMetricCredentials': {'additionalProperties': False,
1039 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
1040 'type': 'array'}},
1041 'required': ['creds'],
1042 'type': 'object'},
1043 'ApplicationSet': {'additionalProperties': False,
1044 'properties': {'application': {'type': 'string'},
1045 'options': {'patternProperties': {'.*': {'type': 'string'}},
1046 'type': 'object'}},
1047 'required': ['application', 'options'],
1048 'type': 'object'},
1049 'ApplicationSetCharm': {'additionalProperties': False,
1050 'properties': {'application': {'type': 'string'},
1051 'channel': {'type': 'string'},
1052 'charm-url': {'type': 'string'},
1053 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
1054 'type': 'object'},
1055 'config-settings-yaml': {'type': 'string'},
1056 'force-series': {'type': 'boolean'},
1057 'force-units': {'type': 'boolean'},
1058 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
1059 'type': 'object'},
1060 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
1061 'type': 'object'}},
1062 'required': ['application',
1063 'charm-url',
1064 'channel',
1065 'force-units',
1066 'force-series'],
1067 'type': 'object'},
1068 'ApplicationUnexpose': {'additionalProperties': False,
1069 'properties': {'application': {'type': 'string'}},
1070 'required': ['application'],
1071 'type': 'object'},
1072 'ApplicationUnset': {'additionalProperties': False,
1073 'properties': {'application': {'type': 'string'},
1074 'options': {'items': {'type': 'string'},
1075 'type': 'array'}},
1076 'required': ['application', 'options'],
1077 'type': 'object'},
1078 'ApplicationUpdate': {'additionalProperties': False,
1079 'properties': {'application': {'type': 'string'},
1080 'charm-url': {'type': 'string'},
1081 'constraints': {'$ref': '#/definitions/Value'},
1082 'force-charm-url': {'type': 'boolean'},
1083 'force-series': {'type': 'boolean'},
1084 'min-units': {'type': 'integer'},
1085 'settings': {'patternProperties': {'.*': {'type': 'string'}},
1086 'type': 'object'},
1087 'settings-yaml': {'type': 'string'}},
1088 'required': ['application',
1089 'charm-url',
1090 'force-charm-url',
1091 'force-series',
1092 'settings-yaml'],
1093 'type': 'object'},
1094 'ApplicationsDeploy': {'additionalProperties': False,
1095 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
1096 'type': 'array'}},
1097 'required': ['applications'],
1098 'type': 'object'},
1099 'CharmRelation': {'additionalProperties': False,
1100 'properties': {'interface': {'type': 'string'},
1101 'limit': {'type': 'integer'},
1102 'name': {'type': 'string'},
1103 'optional': {'type': 'boolean'},
1104 'role': {'type': 'string'},
1105 'scope': {'type': 'string'}},
1106 'required': ['name',
1107 'role',
1108 'interface',
1109 'optional',
1110 'limit',
1111 'scope'],
1112 'type': 'object'},
1113 'Constraints': {'additionalProperties': False,
1114 'properties': {'Count': {'type': 'integer'},
1115 'Pool': {'type': 'string'},
1116 'Size': {'type': 'integer'}},
1117 'required': ['Pool', 'Size', 'Count'],
1118 'type': 'object'},
1119 'DestroyApplicationUnits': {'additionalProperties': False,
1120 'properties': {'unit-names': {'items': {'type': 'string'},
1121 'type': 'array'}},
1122 'required': ['unit-names'],
1123 'type': 'object'},
1124 'DestroyRelation': {'additionalProperties': False,
1125 'properties': {'endpoints': {'items': {'type': 'string'},
1126 'type': 'array'}},
1127 'required': ['endpoints'],
1128 'type': 'object'},
1129 'Error': {'additionalProperties': False,
1130 'properties': {'code': {'type': 'string'},
1131 'info': {'$ref': '#/definitions/ErrorInfo'},
1132 'message': {'type': 'string'}},
1133 'required': ['message', 'code'],
1134 'type': 'object'},
1135 'ErrorInfo': {'additionalProperties': False,
1136 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1137 'macaroon-path': {'type': 'string'}},
1138 'type': 'object'},
1139 'ErrorResult': {'additionalProperties': False,
1140 'properties': {'error': {'$ref': '#/definitions/Error'}},
1141 'type': 'object'},
1142 'ErrorResults': {'additionalProperties': False,
1143 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1144 'type': 'array'}},
1145 'required': ['results'],
1146 'type': 'object'},
1147 'GetApplicationConstraints': {'additionalProperties': False,
1148 'properties': {'application': {'type': 'string'}},
1149 'required': ['application'],
1150 'type': 'object'},
1151 'GetConstraintsResults': {'additionalProperties': False,
1152 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
1153 'required': ['constraints'],
1154 'type': 'object'},
1155 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1156 'Placement': {'additionalProperties': False,
1157 'properties': {'directive': {'type': 'string'},
1158 'scope': {'type': 'string'}},
1159 'required': ['scope', 'directive'],
1160 'type': 'object'},
1161 'SetConstraints': {'additionalProperties': False,
1162 'properties': {'application': {'type': 'string'},
1163 'constraints': {'$ref': '#/definitions/Value'}},
1164 'required': ['application', 'constraints'],
1165 'type': 'object'},
1166 'StorageConstraints': {'additionalProperties': False,
1167 'properties': {'count': {'type': 'integer'},
1168 'pool': {'type': 'string'},
1169 'size': {'type': 'integer'}},
1170 'type': 'object'},
1171 'StringResult': {'additionalProperties': False,
1172 'properties': {'error': {'$ref': '#/definitions/Error'},
1173 'result': {'type': 'string'}},
1174 'required': ['result'],
1175 'type': 'object'},
1176 'Value': {'additionalProperties': False,
1177 'properties': {'arch': {'type': 'string'},
1178 'container': {'type': 'string'},
1179 'cores': {'type': 'integer'},
1180 'cpu-power': {'type': 'integer'},
1181 'instance-type': {'type': 'string'},
1182 'mem': {'type': 'integer'},
1183 'root-disk': {'type': 'integer'},
1184 'spaces': {'items': {'type': 'string'},
1185 'type': 'array'},
1186 'tags': {'items': {'type': 'string'},
1187 'type': 'array'},
1188 'virt-type': {'type': 'string'}},
1189 'type': 'object'}},
1190 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
1191 'Result': {'$ref': '#/definitions/AddRelationResults'}},
1192 'type': 'object'},
1193 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
1194 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
1195 'type': 'object'},
1196 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
1197 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
1198 'type': 'object'},
1199 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
1200 'Result': {'$ref': '#/definitions/ErrorResults'}},
1201 'type': 'object'},
1202 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
1203 'type': 'object'},
1204 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
1205 'type': 'object'},
1206 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
1207 'type': 'object'},
1208 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
1209 'type': 'object'},
1210 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
1211 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
1212 'type': 'object'},
1213 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
1214 'Result': {'$ref': '#/definitions/StringResult'}},
1215 'type': 'object'},
1216 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
1217 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
1218 'type': 'object'},
1219 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
1220 'type': 'object'},
1221 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
1222 'type': 'object'},
1223 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
1224 'type': 'object'},
1225 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
1226 'Result': {'$ref': '#/definitions/ErrorResults'}},
1227 'type': 'object'},
1228 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
1229 'type': 'object'},
1230 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
1231 'type': 'object'},
1232 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
1233 'type': 'object'}},
1234 'type': 'object'}
1235
1236
1237 @ReturnMapping(AddRelationResults)
1238 async def AddRelation(self, endpoints):
1239 '''
1240 endpoints : typing.Sequence[str]
1241 Returns -> typing.Mapping[str, ~CharmRelation]
1242 '''
1243 # map input types to rpc msg
1244 _params = dict()
1245 msg = dict(type='Application',
1246 request='AddRelation',
1247 version=2,
1248 params=_params)
1249 _params['endpoints'] = endpoints
1250 reply = await self.rpc(msg)
1251 return reply
1252
1253
1254
1255 @ReturnMapping(AddApplicationUnitsResults)
1256 async def AddUnits(self, application, num_units, placement):
1257 '''
1258 application : str
1259 num_units : int
1260 placement : typing.Sequence[~Placement]
1261 Returns -> typing.Sequence[str]
1262 '''
1263 # map input types to rpc msg
1264 _params = dict()
1265 msg = dict(type='Application',
1266 request='AddUnits',
1267 version=2,
1268 params=_params)
1269 _params['application'] = application
1270 _params['num-units'] = num_units
1271 _params['placement'] = placement
1272 reply = await self.rpc(msg)
1273 return reply
1274
1275
1276
1277 @ReturnMapping(ApplicationCharmRelationsResults)
1278 async def CharmRelations(self, application):
1279 '''
1280 application : str
1281 Returns -> typing.Sequence[str]
1282 '''
1283 # map input types to rpc msg
1284 _params = dict()
1285 msg = dict(type='Application',
1286 request='CharmRelations',
1287 version=2,
1288 params=_params)
1289 _params['application'] = application
1290 reply = await self.rpc(msg)
1291 return reply
1292
1293
1294
1295 @ReturnMapping(ErrorResults)
1296 async def Deploy(self, applications):
1297 '''
1298 applications : typing.Sequence[~ApplicationDeploy]
1299 Returns -> typing.Sequence[~ErrorResult]
1300 '''
1301 # map input types to rpc msg
1302 _params = dict()
1303 msg = dict(type='Application',
1304 request='Deploy',
1305 version=2,
1306 params=_params)
1307 _params['applications'] = applications
1308 reply = await self.rpc(msg)
1309 return reply
1310
1311
1312
1313 @ReturnMapping(None)
1314 async def Destroy(self, application):
1315 '''
1316 application : str
1317 Returns -> None
1318 '''
1319 # map input types to rpc msg
1320 _params = dict()
1321 msg = dict(type='Application',
1322 request='Destroy',
1323 version=2,
1324 params=_params)
1325 _params['application'] = application
1326 reply = await self.rpc(msg)
1327 return reply
1328
1329
1330
1331 @ReturnMapping(None)
1332 async def DestroyRelation(self, endpoints):
1333 '''
1334 endpoints : typing.Sequence[str]
1335 Returns -> None
1336 '''
1337 # map input types to rpc msg
1338 _params = dict()
1339 msg = dict(type='Application',
1340 request='DestroyRelation',
1341 version=2,
1342 params=_params)
1343 _params['endpoints'] = endpoints
1344 reply = await self.rpc(msg)
1345 return reply
1346
1347
1348
1349 @ReturnMapping(None)
1350 async def DestroyUnits(self, unit_names):
1351 '''
1352 unit_names : typing.Sequence[str]
1353 Returns -> None
1354 '''
1355 # map input types to rpc msg
1356 _params = dict()
1357 msg = dict(type='Application',
1358 request='DestroyUnits',
1359 version=2,
1360 params=_params)
1361 _params['unit-names'] = unit_names
1362 reply = await self.rpc(msg)
1363 return reply
1364
1365
1366
1367 @ReturnMapping(None)
1368 async def Expose(self, application):
1369 '''
1370 application : str
1371 Returns -> None
1372 '''
1373 # map input types to rpc msg
1374 _params = dict()
1375 msg = dict(type='Application',
1376 request='Expose',
1377 version=2,
1378 params=_params)
1379 _params['application'] = application
1380 reply = await self.rpc(msg)
1381 return reply
1382
1383
1384
1385 @ReturnMapping(ApplicationGetResults)
1386 async def Get(self, application):
1387 '''
1388 application : str
1389 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
1390 '''
1391 # map input types to rpc msg
1392 _params = dict()
1393 msg = dict(type='Application',
1394 request='Get',
1395 version=2,
1396 params=_params)
1397 _params['application'] = application
1398 reply = await self.rpc(msg)
1399 return reply
1400
1401
1402
1403 @ReturnMapping(StringResult)
1404 async def GetCharmURL(self, application):
1405 '''
1406 application : str
1407 Returns -> typing.Union[_ForwardRef('Error'), str]
1408 '''
1409 # map input types to rpc msg
1410 _params = dict()
1411 msg = dict(type='Application',
1412 request='GetCharmURL',
1413 version=2,
1414 params=_params)
1415 _params['application'] = application
1416 reply = await self.rpc(msg)
1417 return reply
1418
1419
1420
1421 @ReturnMapping(GetConstraintsResults)
1422 async def GetConstraints(self, application):
1423 '''
1424 application : str
1425 Returns -> Value
1426 '''
1427 # map input types to rpc msg
1428 _params = dict()
1429 msg = dict(type='Application',
1430 request='GetConstraints',
1431 version=2,
1432 params=_params)
1433 _params['application'] = application
1434 reply = await self.rpc(msg)
1435 return reply
1436
1437
1438
1439 @ReturnMapping(None)
1440 async def Set(self, application, options):
1441 '''
1442 application : str
1443 options : typing.Mapping[str, str]
1444 Returns -> None
1445 '''
1446 # map input types to rpc msg
1447 _params = dict()
1448 msg = dict(type='Application',
1449 request='Set',
1450 version=2,
1451 params=_params)
1452 _params['application'] = application
1453 _params['options'] = options
1454 reply = await self.rpc(msg)
1455 return reply
1456
1457
1458
1459 @ReturnMapping(None)
1460 async def SetCharm(self, application, channel, charm_url, config_settings, config_settings_yaml, force_series, force_units, resource_ids, storage_constraints):
1461 '''
1462 application : str
1463 channel : str
1464 charm_url : str
1465 config_settings : typing.Mapping[str, str]
1466 config_settings_yaml : str
1467 force_series : bool
1468 force_units : bool
1469 resource_ids : typing.Mapping[str, str]
1470 storage_constraints : typing.Mapping[str, ~StorageConstraints]
1471 Returns -> None
1472 '''
1473 # map input types to rpc msg
1474 _params = dict()
1475 msg = dict(type='Application',
1476 request='SetCharm',
1477 version=2,
1478 params=_params)
1479 _params['application'] = application
1480 _params['channel'] = channel
1481 _params['charm-url'] = charm_url
1482 _params['config-settings'] = config_settings
1483 _params['config-settings-yaml'] = config_settings_yaml
1484 _params['force-series'] = force_series
1485 _params['force-units'] = force_units
1486 _params['resource-ids'] = resource_ids
1487 _params['storage-constraints'] = storage_constraints
1488 reply = await self.rpc(msg)
1489 return reply
1490
1491
1492
1493 @ReturnMapping(None)
1494 async def SetConstraints(self, application, constraints):
1495 '''
1496 application : str
1497 constraints : Value
1498 Returns -> None
1499 '''
1500 # map input types to rpc msg
1501 _params = dict()
1502 msg = dict(type='Application',
1503 request='SetConstraints',
1504 version=2,
1505 params=_params)
1506 _params['application'] = application
1507 _params['constraints'] = constraints
1508 reply = await self.rpc(msg)
1509 return reply
1510
1511
1512
1513 @ReturnMapping(ErrorResults)
1514 async def SetMetricCredentials(self, creds):
1515 '''
1516 creds : typing.Sequence[~ApplicationMetricCredential]
1517 Returns -> typing.Sequence[~ErrorResult]
1518 '''
1519 # map input types to rpc msg
1520 _params = dict()
1521 msg = dict(type='Application',
1522 request='SetMetricCredentials',
1523 version=2,
1524 params=_params)
1525 _params['creds'] = creds
1526 reply = await self.rpc(msg)
1527 return reply
1528
1529
1530
1531 @ReturnMapping(None)
1532 async def Unexpose(self, application):
1533 '''
1534 application : str
1535 Returns -> None
1536 '''
1537 # map input types to rpc msg
1538 _params = dict()
1539 msg = dict(type='Application',
1540 request='Unexpose',
1541 version=2,
1542 params=_params)
1543 _params['application'] = application
1544 reply = await self.rpc(msg)
1545 return reply
1546
1547
1548
1549 @ReturnMapping(None)
1550 async def Unset(self, application, options):
1551 '''
1552 application : str
1553 options : typing.Sequence[str]
1554 Returns -> None
1555 '''
1556 # map input types to rpc msg
1557 _params = dict()
1558 msg = dict(type='Application',
1559 request='Unset',
1560 version=2,
1561 params=_params)
1562 _params['application'] = application
1563 _params['options'] = options
1564 reply = await self.rpc(msg)
1565 return reply
1566
1567
1568
1569 @ReturnMapping(None)
1570 async def Update(self, application, charm_url, constraints, force_charm_url, force_series, min_units, settings, settings_yaml):
1571 '''
1572 application : str
1573 charm_url : str
1574 constraints : Value
1575 force_charm_url : bool
1576 force_series : bool
1577 min_units : int
1578 settings : typing.Mapping[str, str]
1579 settings_yaml : str
1580 Returns -> None
1581 '''
1582 # map input types to rpc msg
1583 _params = dict()
1584 msg = dict(type='Application',
1585 request='Update',
1586 version=2,
1587 params=_params)
1588 _params['application'] = application
1589 _params['charm-url'] = charm_url
1590 _params['constraints'] = constraints
1591 _params['force-charm-url'] = force_charm_url
1592 _params['force-series'] = force_series
1593 _params['min-units'] = min_units
1594 _params['settings'] = settings
1595 _params['settings-yaml'] = settings_yaml
1596 reply = await self.rpc(msg)
1597 return reply
1598
1599
1600
1601 class ApplicationOffersFacade(Type):
1602 name = 'ApplicationOffers'
1603 version = 2
1604 schema = {'definitions': {'AddApplicationOffer': {'additionalProperties': False,
1605 'properties': {'application-description': {'type': 'string'},
1606 'application-name': {'type': 'string'},
1607 'endpoints': {'patternProperties': {'.*': {'type': 'string'}},
1608 'type': 'object'},
1609 'model-tag': {'type': 'string'},
1610 'offer-name': {'type': 'string'}},
1611 'required': ['model-tag',
1612 'offer-name',
1613 'application-name',
1614 'application-description',
1615 'endpoints'],
1616 'type': 'object'},
1617 'AddApplicationOffers': {'additionalProperties': False,
1618 'properties': {'Offers': {'items': {'$ref': '#/definitions/AddApplicationOffer'},
1619 'type': 'array'}},
1620 'required': ['Offers'],
1621 'type': 'object'},
1622 'ApplicationOfferAdminDetails': {'additionalProperties': False,
1623 'properties': {'ApplicationOfferDetails': {'$ref': '#/definitions/ApplicationOfferDetails'},
1624 'application-name': {'type': 'string'},
1625 'charm-url': {'type': 'string'},
1626 'connections': {'items': {'$ref': '#/definitions/OfferConnection'},
1627 'type': 'array'}},
1628 'required': ['ApplicationOfferDetails',
1629 'application-name',
1630 'charm-url'],
1631 'type': 'object'},
1632 'ApplicationOfferDetails': {'additionalProperties': False,
1633 'properties': {'application-description': {'type': 'string'},
1634 'bindings': {'patternProperties': {'.*': {'type': 'string'}},
1635 'type': 'object'},
1636 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
1637 'type': 'array'},
1638 'offer-name': {'type': 'string'},
1639 'offer-url': {'type': 'string'},
1640 'offer-uuid': {'type': 'string'},
1641 'source-model-tag': {'type': 'string'},
1642 'spaces': {'items': {'$ref': '#/definitions/RemoteSpace'},
1643 'type': 'array'},
1644 'users': {'items': {'$ref': '#/definitions/OfferUserDetails'},
1645 'type': 'array'}},
1646 'required': ['source-model-tag',
1647 'offer-uuid',
1648 'offer-url',
1649 'offer-name',
1650 'application-description'],
1651 'type': 'object'},
1652 'ApplicationOfferResult': {'additionalProperties': False,
1653 'properties': {'error': {'$ref': '#/definitions/Error'},
1654 'result': {'$ref': '#/definitions/ApplicationOfferAdminDetails'}},
1655 'type': 'object'},
1656 'ApplicationOffersResults': {'additionalProperties': False,
1657 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationOfferResult'},
1658 'type': 'array'}},
1659 'type': 'object'},
1660 'ConsumeOfferDetails': {'additionalProperties': False,
1661 'properties': {'external-controller': {'$ref': '#/definitions/ExternalControllerInfo'},
1662 'macaroon': {'$ref': '#/definitions/Macaroon'},
1663 'offer': {'$ref': '#/definitions/ApplicationOfferDetails'}},
1664 'type': 'object'},
1665 'ConsumeOfferDetailsResult': {'additionalProperties': False,
1666 'properties': {'ConsumeOfferDetails': {'$ref': '#/definitions/ConsumeOfferDetails'},
1667 'error': {'$ref': '#/definitions/Error'}},
1668 'required': ['ConsumeOfferDetails'],
1669 'type': 'object'},
1670 'ConsumeOfferDetailsResults': {'additionalProperties': False,
1671 'properties': {'results': {'items': {'$ref': '#/definitions/ConsumeOfferDetailsResult'},
1672 'type': 'array'}},
1673 'type': 'object'},
1674 'DestroyApplicationOffers': {'additionalProperties': False,
1675 'properties': {'force': {'type': 'boolean'},
1676 'offer-urls': {'items': {'type': 'string'},
1677 'type': 'array'}},
1678 'required': ['offer-urls'],
1679 'type': 'object'},
1680 'EndpointFilterAttributes': {'additionalProperties': False,
1681 'properties': {'interface': {'type': 'string'},
1682 'name': {'type': 'string'},
1683 'role': {'type': 'string'}},
1684 'required': ['role',
1685 'interface',
1686 'name'],
1687 'type': 'object'},
1688 'EntityStatus': {'additionalProperties': False,
1689 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1690 'type': 'object'}},
1691 'type': 'object'},
1692 'info': {'type': 'string'},
1693 'since': {'format': 'date-time',
1694 'type': 'string'},
1695 'status': {'type': 'string'}},
1696 'required': ['status', 'info', 'since'],
1697 'type': 'object'},
1698 'Error': {'additionalProperties': False,
1699 'properties': {'code': {'type': 'string'},
1700 'info': {'$ref': '#/definitions/ErrorInfo'},
1701 'message': {'type': 'string'}},
1702 'required': ['message', 'code'],
1703 'type': 'object'},
1704 'ErrorInfo': {'additionalProperties': False,
1705 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1706 'macaroon-path': {'type': 'string'}},
1707 'type': 'object'},
1708 'ErrorResult': {'additionalProperties': False,
1709 'properties': {'error': {'$ref': '#/definitions/Error'}},
1710 'type': 'object'},
1711 'ErrorResults': {'additionalProperties': False,
1712 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1713 'type': 'array'}},
1714 'required': ['results'],
1715 'type': 'object'},
1716 'ExternalControllerInfo': {'additionalProperties': False,
1717 'properties': {'addrs': {'items': {'type': 'string'},
1718 'type': 'array'},
1719 'ca-cert': {'type': 'string'},
1720 'controller-alias': {'type': 'string'},
1721 'controller-tag': {'type': 'string'}},
1722 'required': ['controller-tag',
1723 'controller-alias',
1724 'addrs',
1725 'ca-cert'],
1726 'type': 'object'},
1727 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1728 'ModifyOfferAccess': {'additionalProperties': False,
1729 'properties': {'access': {'type': 'string'},
1730 'action': {'type': 'string'},
1731 'offer-url': {'type': 'string'},
1732 'user-tag': {'type': 'string'}},
1733 'required': ['user-tag',
1734 'action',
1735 'access',
1736 'offer-url'],
1737 'type': 'object'},
1738 'ModifyOfferAccessRequest': {'additionalProperties': False,
1739 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyOfferAccess'},
1740 'type': 'array'}},
1741 'required': ['changes'],
1742 'type': 'object'},
1743 'OfferConnection': {'additionalProperties': False,
1744 'properties': {'endpoint': {'type': 'string'},
1745 'ingress-subnets': {'items': {'type': 'string'},
1746 'type': 'array'},
1747 'relation-id': {'type': 'integer'},
1748 'source-model-tag': {'type': 'string'},
1749 'status': {'$ref': '#/definitions/EntityStatus'},
1750 'username': {'type': 'string'}},
1751 'required': ['source-model-tag',
1752 'relation-id',
1753 'username',
1754 'endpoint',
1755 'status',
1756 'ingress-subnets'],
1757 'type': 'object'},
1758 'OfferFilter': {'additionalProperties': False,
1759 'properties': {'allowed-users': {'items': {'type': 'string'},
1760 'type': 'array'},
1761 'application-description': {'type': 'string'},
1762 'application-name': {'type': 'string'},
1763 'application-user': {'type': 'string'},
1764 'connected-users': {'items': {'type': 'string'},
1765 'type': 'array'},
1766 'endpoints': {'items': {'$ref': '#/definitions/EndpointFilterAttributes'},
1767 'type': 'array'},
1768 'model-name': {'type': 'string'},
1769 'offer-name': {'type': 'string'},
1770 'owner-name': {'type': 'string'}},
1771 'required': ['owner-name',
1772 'model-name',
1773 'offer-name',
1774 'application-name',
1775 'application-description',
1776 'application-user',
1777 'endpoints',
1778 'connected-users',
1779 'allowed-users'],
1780 'type': 'object'},
1781 'OfferFilters': {'additionalProperties': False,
1782 'properties': {'Filters': {'items': {'$ref': '#/definitions/OfferFilter'},
1783 'type': 'array'}},
1784 'required': ['Filters'],
1785 'type': 'object'},
1786 'OfferURLs': {'additionalProperties': False,
1787 'properties': {'offer-urls': {'items': {'type': 'string'},
1788 'type': 'array'}},
1789 'type': 'object'},
1790 'OfferUserDetails': {'additionalProperties': False,
1791 'properties': {'access': {'type': 'string'},
1792 'display-name': {'type': 'string'},
1793 'user': {'type': 'string'}},
1794 'required': ['user',
1795 'display-name',
1796 'access'],
1797 'type': 'object'},
1798 'QueryApplicationOffersResults': {'additionalProperties': False,
1799 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationOfferAdminDetails'},
1800 'type': 'array'}},
1801 'required': ['results'],
1802 'type': 'object'},
1803 'RemoteApplicationInfo': {'additionalProperties': False,
1804 'properties': {'description': {'type': 'string'},
1805 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
1806 'type': 'array'},
1807 'icon-url-path': {'type': 'string'},
1808 'model-tag': {'type': 'string'},
1809 'name': {'type': 'string'},
1810 'offer-url': {'type': 'string'},
1811 'source-model-label': {'type': 'string'}},
1812 'required': ['model-tag',
1813 'name',
1814 'description',
1815 'offer-url',
1816 'endpoints',
1817 'icon-url-path'],
1818 'type': 'object'},
1819 'RemoteApplicationInfoResult': {'additionalProperties': False,
1820 'properties': {'error': {'$ref': '#/definitions/Error'},
1821 'result': {'$ref': '#/definitions/RemoteApplicationInfo'}},
1822 'type': 'object'},
1823 'RemoteApplicationInfoResults': {'additionalProperties': False,
1824 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteApplicationInfoResult'},
1825 'type': 'array'}},
1826 'required': ['results'],
1827 'type': 'object'},
1828 'RemoteEndpoint': {'additionalProperties': False,
1829 'properties': {'interface': {'type': 'string'},
1830 'limit': {'type': 'integer'},
1831 'name': {'type': 'string'},
1832 'role': {'type': 'string'}},
1833 'required': ['name',
1834 'role',
1835 'interface',
1836 'limit'],
1837 'type': 'object'},
1838 'RemoteSpace': {'additionalProperties': False,
1839 'properties': {'cloud-type': {'type': 'string'},
1840 'name': {'type': 'string'},
1841 'provider-attributes': {'patternProperties': {'.*': {'additionalProperties': True,
1842 'type': 'object'}},
1843 'type': 'object'},
1844 'provider-id': {'type': 'string'},
1845 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
1846 'type': 'array'}},
1847 'required': ['cloud-type',
1848 'name',
1849 'provider-id',
1850 'provider-attributes',
1851 'subnets'],
1852 'type': 'object'},
1853 'Subnet': {'additionalProperties': False,
1854 'properties': {'cidr': {'type': 'string'},
1855 'life': {'type': 'string'},
1856 'provider-id': {'type': 'string'},
1857 'provider-network-id': {'type': 'string'},
1858 'provider-space-id': {'type': 'string'},
1859 'space-tag': {'type': 'string'},
1860 'status': {'type': 'string'},
1861 'vlan-tag': {'type': 'integer'},
1862 'zones': {'items': {'type': 'string'},
1863 'type': 'array'}},
1864 'required': ['cidr',
1865 'vlan-tag',
1866 'life',
1867 'space-tag',
1868 'zones'],
1869 'type': 'object'}},
1870 'properties': {'ApplicationOffers': {'properties': {'Params': {'$ref': '#/definitions/OfferURLs'},
1871 'Result': {'$ref': '#/definitions/ApplicationOffersResults'}},
1872 'type': 'object'},
1873 'DestroyOffers': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationOffers'},
1874 'Result': {'$ref': '#/definitions/ErrorResults'}},
1875 'type': 'object'},
1876 'FindApplicationOffers': {'properties': {'Params': {'$ref': '#/definitions/OfferFilters'},
1877 'Result': {'$ref': '#/definitions/QueryApplicationOffersResults'}},
1878 'type': 'object'},
1879 'GetConsumeDetails': {'properties': {'Params': {'$ref': '#/definitions/OfferURLs'},
1880 'Result': {'$ref': '#/definitions/ConsumeOfferDetailsResults'}},
1881 'type': 'object'},
1882 'ListApplicationOffers': {'properties': {'Params': {'$ref': '#/definitions/OfferFilters'},
1883 'Result': {'$ref': '#/definitions/QueryApplicationOffersResults'}},
1884 'type': 'object'},
1885 'ModifyOfferAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyOfferAccessRequest'},
1886 'Result': {'$ref': '#/definitions/ErrorResults'}},
1887 'type': 'object'},
1888 'Offer': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationOffers'},
1889 'Result': {'$ref': '#/definitions/ErrorResults'}},
1890 'type': 'object'},
1891 'RemoteApplicationInfo': {'properties': {'Params': {'$ref': '#/definitions/OfferURLs'},
1892 'Result': {'$ref': '#/definitions/RemoteApplicationInfoResults'}},
1893 'type': 'object'}},
1894 'type': 'object'}
1895
1896
1897 @ReturnMapping(ApplicationOffersResults)
1898 async def ApplicationOffers(self, offer_urls):
1899 '''
1900 offer_urls : typing.Sequence[str]
1901 Returns -> typing.Sequence[~ApplicationOfferResult]
1902 '''
1903 # map input types to rpc msg
1904 _params = dict()
1905 msg = dict(type='ApplicationOffers',
1906 request='ApplicationOffers',
1907 version=2,
1908 params=_params)
1909 _params['offer-urls'] = offer_urls
1910 reply = await self.rpc(msg)
1911 return reply
1912
1913
1914
1915 @ReturnMapping(ErrorResults)
1916 async def DestroyOffers(self, force, offer_urls):
1917 '''
1918 force : bool
1919 offer_urls : typing.Sequence[str]
1920 Returns -> typing.Sequence[~ErrorResult]
1921 '''
1922 # map input types to rpc msg
1923 _params = dict()
1924 msg = dict(type='ApplicationOffers',
1925 request='DestroyOffers',
1926 version=2,
1927 params=_params)
1928 _params['force'] = force
1929 _params['offer-urls'] = offer_urls
1930 reply = await self.rpc(msg)
1931 return reply
1932
1933
1934
1935 @ReturnMapping(QueryApplicationOffersResults)
1936 async def FindApplicationOffers(self, filters):
1937 '''
1938 filters : typing.Sequence[~OfferFilter]
1939 Returns -> typing.Sequence[~ApplicationOfferAdminDetails]
1940 '''
1941 # map input types to rpc msg
1942 _params = dict()
1943 msg = dict(type='ApplicationOffers',
1944 request='FindApplicationOffers',
1945 version=2,
1946 params=_params)
1947 _params['Filters'] = filters
1948 reply = await self.rpc(msg)
1949 return reply
1950
1951
1952
1953 @ReturnMapping(ConsumeOfferDetailsResults)
1954 async def GetConsumeDetails(self, offer_urls):
1955 '''
1956 offer_urls : typing.Sequence[str]
1957 Returns -> typing.Sequence[~ConsumeOfferDetailsResult]
1958 '''
1959 # map input types to rpc msg
1960 _params = dict()
1961 msg = dict(type='ApplicationOffers',
1962 request='GetConsumeDetails',
1963 version=2,
1964 params=_params)
1965 _params['offer-urls'] = offer_urls
1966 reply = await self.rpc(msg)
1967 return reply
1968
1969
1970
1971 @ReturnMapping(QueryApplicationOffersResults)
1972 async def ListApplicationOffers(self, filters):
1973 '''
1974 filters : typing.Sequence[~OfferFilter]
1975 Returns -> typing.Sequence[~ApplicationOfferAdminDetails]
1976 '''
1977 # map input types to rpc msg
1978 _params = dict()
1979 msg = dict(type='ApplicationOffers',
1980 request='ListApplicationOffers',
1981 version=2,
1982 params=_params)
1983 _params['Filters'] = filters
1984 reply = await self.rpc(msg)
1985 return reply
1986
1987
1988
1989 @ReturnMapping(ErrorResults)
1990 async def ModifyOfferAccess(self, changes):
1991 '''
1992 changes : typing.Sequence[~ModifyOfferAccess]
1993 Returns -> typing.Sequence[~ErrorResult]
1994 '''
1995 # map input types to rpc msg
1996 _params = dict()
1997 msg = dict(type='ApplicationOffers',
1998 request='ModifyOfferAccess',
1999 version=2,
2000 params=_params)
2001 _params['changes'] = changes
2002 reply = await self.rpc(msg)
2003 return reply
2004
2005
2006
2007 @ReturnMapping(ErrorResults)
2008 async def Offer(self, offers):
2009 '''
2010 offers : typing.Sequence[~AddApplicationOffer]
2011 Returns -> typing.Sequence[~ErrorResult]
2012 '''
2013 # map input types to rpc msg
2014 _params = dict()
2015 msg = dict(type='ApplicationOffers',
2016 request='Offer',
2017 version=2,
2018 params=_params)
2019 _params['Offers'] = offers
2020 reply = await self.rpc(msg)
2021 return reply
2022
2023
2024
2025 @ReturnMapping(RemoteApplicationInfoResults)
2026 async def RemoteApplicationInfo(self, offer_urls):
2027 '''
2028 offer_urls : typing.Sequence[str]
2029 Returns -> typing.Sequence[~RemoteApplicationInfoResult]
2030 '''
2031 # map input types to rpc msg
2032 _params = dict()
2033 msg = dict(type='ApplicationOffers',
2034 request='RemoteApplicationInfo',
2035 version=2,
2036 params=_params)
2037 _params['offer-urls'] = offer_urls
2038 reply = await self.rpc(msg)
2039 return reply
2040
2041
2042
2043 class BackupsFacade(Type):
2044 name = 'Backups'
2045 version = 2
2046 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
2047 'properties': {'keep-copy': {'type': 'boolean'},
2048 'no-download': {'type': 'boolean'},
2049 'notes': {'type': 'string'}},
2050 'required': ['notes',
2051 'keep-copy',
2052 'no-download'],
2053 'type': 'object'},
2054 'BackupsInfoArgs': {'additionalProperties': False,
2055 'properties': {'id': {'type': 'string'}},
2056 'required': ['id'],
2057 'type': 'object'},
2058 'BackupsListArgs': {'additionalProperties': False,
2059 'type': 'object'},
2060 'BackupsListResult': {'additionalProperties': False,
2061 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
2062 'type': 'array'}},
2063 'required': ['list'],
2064 'type': 'object'},
2065 'BackupsMetadataResult': {'additionalProperties': False,
2066 'properties': {'ca-cert': {'type': 'string'},
2067 'ca-private-key': {'type': 'string'},
2068 'checksum': {'type': 'string'},
2069 'checksum-format': {'type': 'string'},
2070 'filename': {'type': 'string'},
2071 'finished': {'format': 'date-time',
2072 'type': 'string'},
2073 'hostname': {'type': 'string'},
2074 'id': {'type': 'string'},
2075 'machine': {'type': 'string'},
2076 'model': {'type': 'string'},
2077 'notes': {'type': 'string'},
2078 'series': {'type': 'string'},
2079 'size': {'type': 'integer'},
2080 'started': {'format': 'date-time',
2081 'type': 'string'},
2082 'stored': {'format': 'date-time',
2083 'type': 'string'},
2084 'version': {'$ref': '#/definitions/Number'}},
2085 'required': ['id',
2086 'checksum',
2087 'checksum-format',
2088 'size',
2089 'stored',
2090 'started',
2091 'finished',
2092 'notes',
2093 'model',
2094 'machine',
2095 'hostname',
2096 'version',
2097 'series',
2098 'ca-cert',
2099 'ca-private-key',
2100 'filename'],
2101 'type': 'object'},
2102 'BackupsRemoveArgs': {'additionalProperties': False,
2103 'properties': {'ids': {'items': {'type': 'string'},
2104 'type': 'array'}},
2105 'required': ['ids'],
2106 'type': 'object'},
2107 'Error': {'additionalProperties': False,
2108 'properties': {'code': {'type': 'string'},
2109 'info': {'$ref': '#/definitions/ErrorInfo'},
2110 'message': {'type': 'string'}},
2111 'required': ['message', 'code'],
2112 'type': 'object'},
2113 'ErrorInfo': {'additionalProperties': False,
2114 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2115 'macaroon-path': {'type': 'string'}},
2116 'type': 'object'},
2117 'ErrorResult': {'additionalProperties': False,
2118 'properties': {'error': {'$ref': '#/definitions/Error'}},
2119 'type': 'object'},
2120 'ErrorResults': {'additionalProperties': False,
2121 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2122 'type': 'array'}},
2123 'required': ['results'],
2124 'type': 'object'},
2125 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2126 'Number': {'additionalProperties': False,
2127 'properties': {'Build': {'type': 'integer'},
2128 'Major': {'type': 'integer'},
2129 'Minor': {'type': 'integer'},
2130 'Patch': {'type': 'integer'},
2131 'Tag': {'type': 'string'}},
2132 'required': ['Major',
2133 'Minor',
2134 'Tag',
2135 'Patch',
2136 'Build'],
2137 'type': 'object'},
2138 'RestoreArgs': {'additionalProperties': False,
2139 'properties': {'backup-id': {'type': 'string'}},
2140 'required': ['backup-id'],
2141 'type': 'object'}},
2142 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
2143 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
2144 'type': 'object'},
2145 'FinishRestore': {'type': 'object'},
2146 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
2147 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
2148 'type': 'object'},
2149 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
2150 'Result': {'$ref': '#/definitions/BackupsListResult'}},
2151 'type': 'object'},
2152 'PrepareRestore': {'type': 'object'},
2153 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'},
2154 'Result': {'$ref': '#/definitions/ErrorResults'}},
2155 'type': 'object'},
2156 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
2157 'type': 'object'}},
2158 'type': 'object'}
2159
2160
2161 @ReturnMapping(BackupsMetadataResult)
2162 async def Create(self, notes):
2163 '''
2164 notes : str
2165 Returns -> typing.Union[str, int, _ForwardRef('Number')]
2166 '''
2167 # map input types to rpc msg
2168 _params = dict()
2169 msg = dict(type='Backups',
2170 request='Create',
2171 version=2,
2172 params=_params)
2173 _params['notes'] = notes
2174 reply = await self.rpc(msg)
2175 return reply
2176
2177
2178
2179 @ReturnMapping(None)
2180 async def FinishRestore(self):
2181 '''
2182
2183 Returns -> None
2184 '''
2185 # map input types to rpc msg
2186 _params = dict()
2187 msg = dict(type='Backups',
2188 request='FinishRestore',
2189 version=2,
2190 params=_params)
2191
2192 reply = await self.rpc(msg)
2193 return reply
2194
2195
2196
2197 @ReturnMapping(BackupsMetadataResult)
2198 async def Info(self, id_):
2199 '''
2200 id_ : str
2201 Returns -> typing.Union[str, int, _ForwardRef('Number')]
2202 '''
2203 # map input types to rpc msg
2204 _params = dict()
2205 msg = dict(type='Backups',
2206 request='Info',
2207 version=2,
2208 params=_params)
2209 _params['id'] = id_
2210 reply = await self.rpc(msg)
2211 return reply
2212
2213
2214
2215 @ReturnMapping(BackupsListResult)
2216 async def List(self):
2217 '''
2218
2219 Returns -> typing.Sequence[~BackupsMetadataResult]
2220 '''
2221 # map input types to rpc msg
2222 _params = dict()
2223 msg = dict(type='Backups',
2224 request='List',
2225 version=2,
2226 params=_params)
2227
2228 reply = await self.rpc(msg)
2229 return reply
2230
2231
2232
2233 @ReturnMapping(None)
2234 async def PrepareRestore(self):
2235 '''
2236
2237 Returns -> None
2238 '''
2239 # map input types to rpc msg
2240 _params = dict()
2241 msg = dict(type='Backups',
2242 request='PrepareRestore',
2243 version=2,
2244 params=_params)
2245
2246 reply = await self.rpc(msg)
2247 return reply
2248
2249
2250
2251 @ReturnMapping(ErrorResults)
2252 async def Remove(self, id_):
2253 '''
2254 id_ : str
2255 Returns -> typing.Sequence[~ErrorResult]
2256 '''
2257 # map input types to rpc msg
2258 _params = dict()
2259 msg = dict(type='Backups',
2260 request='Remove',
2261 version=2,
2262 params=_params)
2263 _params['id'] = id_
2264 reply = await self.rpc(msg)
2265 return reply
2266
2267
2268
2269 @ReturnMapping(None)
2270 async def Restore(self, backup_id):
2271 '''
2272 backup_id : str
2273 Returns -> None
2274 '''
2275 # map input types to rpc msg
2276 _params = dict()
2277 msg = dict(type='Backups',
2278 request='Restore',
2279 version=2,
2280 params=_params)
2281 _params['backup-id'] = backup_id
2282 reply = await self.rpc(msg)
2283 return reply
2284
2285
2286
2287 class BlockFacade(Type):
2288 name = 'Block'
2289 version = 2
2290 schema = {'definitions': {'Block': {'additionalProperties': False,
2291 'properties': {'id': {'type': 'string'},
2292 'message': {'type': 'string'},
2293 'tag': {'type': 'string'},
2294 'type': {'type': 'string'}},
2295 'required': ['id', 'tag', 'type'],
2296 'type': 'object'},
2297 'BlockResult': {'additionalProperties': False,
2298 'properties': {'error': {'$ref': '#/definitions/Error'},
2299 'result': {'$ref': '#/definitions/Block'}},
2300 'required': ['result'],
2301 'type': 'object'},
2302 'BlockResults': {'additionalProperties': False,
2303 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
2304 'type': 'array'}},
2305 'type': 'object'},
2306 'BlockSwitchParams': {'additionalProperties': False,
2307 'properties': {'message': {'type': 'string'},
2308 'type': {'type': 'string'}},
2309 'required': ['type'],
2310 'type': 'object'},
2311 'Error': {'additionalProperties': False,
2312 'properties': {'code': {'type': 'string'},
2313 'info': {'$ref': '#/definitions/ErrorInfo'},
2314 'message': {'type': 'string'}},
2315 'required': ['message', 'code'],
2316 'type': 'object'},
2317 'ErrorInfo': {'additionalProperties': False,
2318 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2319 'macaroon-path': {'type': 'string'}},
2320 'type': 'object'},
2321 'ErrorResult': {'additionalProperties': False,
2322 'properties': {'error': {'$ref': '#/definitions/Error'}},
2323 'type': 'object'},
2324 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2325 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
2326 'type': 'object'},
2327 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
2328 'Result': {'$ref': '#/definitions/ErrorResult'}},
2329 'type': 'object'},
2330 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
2331 'Result': {'$ref': '#/definitions/ErrorResult'}},
2332 'type': 'object'}},
2333 'type': 'object'}
2334
2335
2336 @ReturnMapping(BlockResults)
2337 async def List(self):
2338 '''
2339
2340 Returns -> typing.Sequence[~BlockResult]
2341 '''
2342 # map input types to rpc msg
2343 _params = dict()
2344 msg = dict(type='Block',
2345 request='List',
2346 version=2,
2347 params=_params)
2348
2349 reply = await self.rpc(msg)
2350 return reply
2351
2352
2353
2354 @ReturnMapping(ErrorResult)
2355 async def SwitchBlockOff(self, message, type_):
2356 '''
2357 message : str
2358 type_ : str
2359 Returns -> Error
2360 '''
2361 # map input types to rpc msg
2362 _params = dict()
2363 msg = dict(type='Block',
2364 request='SwitchBlockOff',
2365 version=2,
2366 params=_params)
2367 _params['message'] = message
2368 _params['type'] = type_
2369 reply = await self.rpc(msg)
2370 return reply
2371
2372
2373
2374 @ReturnMapping(ErrorResult)
2375 async def SwitchBlockOn(self, message, type_):
2376 '''
2377 message : str
2378 type_ : str
2379 Returns -> Error
2380 '''
2381 # map input types to rpc msg
2382 _params = dict()
2383 msg = dict(type='Block',
2384 request='SwitchBlockOn',
2385 version=2,
2386 params=_params)
2387 _params['message'] = message
2388 _params['type'] = type_
2389 reply = await self.rpc(msg)
2390 return reply
2391
2392
2393
2394 class BundleFacade(Type):
2395 name = 'Bundle'
2396 version = 2
2397 schema = {'definitions': {'BundleChange': {'additionalProperties': False,
2398 'properties': {'args': {'items': {'additionalProperties': True,
2399 'type': 'object'},
2400 'type': 'array'},
2401 'id': {'type': 'string'},
2402 'method': {'type': 'string'},
2403 'requires': {'items': {'type': 'string'},
2404 'type': 'array'}},
2405 'required': ['id',
2406 'method',
2407 'args',
2408 'requires'],
2409 'type': 'object'},
2410 'BundleChangesParams': {'additionalProperties': False,
2411 'properties': {'bundleURL': {'type': 'string'},
2412 'yaml': {'type': 'string'}},
2413 'required': ['yaml', 'bundleURL'],
2414 'type': 'object'},
2415 'BundleChangesResults': {'additionalProperties': False,
2416 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
2417 'type': 'array'},
2418 'errors': {'items': {'type': 'string'},
2419 'type': 'array'}},
2420 'type': 'object'},
2421 'Error': {'additionalProperties': False,
2422 'properties': {'code': {'type': 'string'},
2423 'info': {'$ref': '#/definitions/ErrorInfo'},
2424 'message': {'type': 'string'}},
2425 'required': ['message', 'code'],
2426 'type': 'object'},
2427 'ErrorInfo': {'additionalProperties': False,
2428 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2429 'macaroon-path': {'type': 'string'}},
2430 'type': 'object'},
2431 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2432 'StringResult': {'additionalProperties': False,
2433 'properties': {'error': {'$ref': '#/definitions/Error'},
2434 'result': {'type': 'string'}},
2435 'required': ['result'],
2436 'type': 'object'}},
2437 'properties': {'ExportBundle': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
2438 'type': 'object'},
2439 'GetChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
2440 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
2441 'type': 'object'}},
2442 'type': 'object'}
2443
2444
2445 @ReturnMapping(StringResult)
2446 async def ExportBundle(self):
2447 '''
2448
2449 Returns -> typing.Union[_ForwardRef('Error'), str]
2450 '''
2451 # map input types to rpc msg
2452 _params = dict()
2453 msg = dict(type='Bundle',
2454 request='ExportBundle',
2455 version=2,
2456 params=_params)
2457
2458 reply = await self.rpc(msg)
2459 return reply
2460
2461
2462
2463 @ReturnMapping(BundleChangesResults)
2464 async def GetChanges(self, yaml):
2465 '''
2466 yaml : str
2467 Returns -> typing.Union[typing.Sequence[~BundleChange], typing.Sequence[str]]
2468 '''
2469 # map input types to rpc msg
2470 _params = dict()
2471 msg = dict(type='Bundle',
2472 request='GetChanges',
2473 version=2,
2474 params=_params)
2475 _params['yaml'] = yaml
2476 reply = await self.rpc(msg)
2477 return reply
2478
2479
2480
2481 class CharmRevisionUpdaterFacade(Type):
2482 name = 'CharmRevisionUpdater'
2483 version = 2
2484 schema = {'definitions': {'Error': {'additionalProperties': False,
2485 'properties': {'code': {'type': 'string'},
2486 'info': {'$ref': '#/definitions/ErrorInfo'},
2487 'message': {'type': 'string'}},
2488 'required': ['message', 'code'],
2489 'type': 'object'},
2490 'ErrorInfo': {'additionalProperties': False,
2491 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2492 'macaroon-path': {'type': 'string'}},
2493 'type': 'object'},
2494 'ErrorResult': {'additionalProperties': False,
2495 'properties': {'error': {'$ref': '#/definitions/Error'}},
2496 'type': 'object'},
2497 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2498 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
2499 'type': 'object'}},
2500 'type': 'object'}
2501
2502
2503 @ReturnMapping(ErrorResult)
2504 async def UpdateLatestRevisions(self):
2505 '''
2506
2507 Returns -> Error
2508 '''
2509 # map input types to rpc msg
2510 _params = dict()
2511 msg = dict(type='CharmRevisionUpdater',
2512 request='UpdateLatestRevisions',
2513 version=2,
2514 params=_params)
2515
2516 reply = await self.rpc(msg)
2517 return reply
2518
2519
2520
2521 class CharmsFacade(Type):
2522 name = 'Charms'
2523 version = 2
2524 schema = {'definitions': {'CharmActionSpec': {'additionalProperties': False,
2525 'properties': {'description': {'type': 'string'},
2526 'params': {'patternProperties': {'.*': {'additionalProperties': True,
2527 'type': 'object'}},
2528 'type': 'object'}},
2529 'required': ['description', 'params'],
2530 'type': 'object'},
2531 'CharmActions': {'additionalProperties': False,
2532 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}},
2533 'type': 'object'}},
2534 'type': 'object'},
2535 'CharmDevice': {'additionalProperties': False,
2536 'properties': {'CountMax': {'type': 'integer'},
2537 'CountMin': {'type': 'integer'},
2538 'Description': {'type': 'string'},
2539 'Name': {'type': 'string'},
2540 'Type': {'type': 'string'}},
2541 'required': ['Name',
2542 'Description',
2543 'Type',
2544 'CountMin',
2545 'CountMax'],
2546 'type': 'object'},
2547 'CharmInfo': {'additionalProperties': False,
2548 'properties': {'actions': {'$ref': '#/definitions/CharmActions'},
2549 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}},
2550 'type': 'object'},
2551 'lxd-profile': {'$ref': '#/definitions/CharmLXDProfile'},
2552 'meta': {'$ref': '#/definitions/CharmMeta'},
2553 'metrics': {'$ref': '#/definitions/CharmMetrics'},
2554 'revision': {'type': 'integer'},
2555 'url': {'type': 'string'}},
2556 'required': ['revision', 'url', 'config'],
2557 'type': 'object'},
2558 'CharmLXDProfile': {'additionalProperties': False,
2559 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
2560 'type': 'object'},
2561 'description': {'type': 'string'},
2562 'devices': {'patternProperties': {'.*': {'patternProperties': {'.*': {'type': 'string'}},
2563 'type': 'object'}},
2564 'type': 'object'}},
2565 'required': ['config',
2566 'description',
2567 'devices'],
2568 'type': 'object'},
2569 'CharmMeta': {'additionalProperties': False,
2570 'properties': {'categories': {'items': {'type': 'string'},
2571 'type': 'array'},
2572 'description': {'type': 'string'},
2573 'devices': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmDevice'}},
2574 'type': 'object'},
2575 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}},
2576 'type': 'object'},
2577 'min-juju-version': {'type': 'string'},
2578 'name': {'type': 'string'},
2579 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}},
2580 'type': 'object'},
2581 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
2582 'type': 'object'},
2583 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
2584 'type': 'object'},
2585 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
2586 'type': 'object'},
2587 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}},
2588 'type': 'object'},
2589 'series': {'items': {'type': 'string'},
2590 'type': 'array'},
2591 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}},
2592 'type': 'object'},
2593 'subordinate': {'type': 'boolean'},
2594 'summary': {'type': 'string'},
2595 'tags': {'items': {'type': 'string'},
2596 'type': 'array'},
2597 'terms': {'items': {'type': 'string'},
2598 'type': 'array'}},
2599 'required': ['name',
2600 'summary',
2601 'description',
2602 'subordinate'],
2603 'type': 'object'},
2604 'CharmMetric': {'additionalProperties': False,
2605 'properties': {'description': {'type': 'string'},
2606 'type': {'type': 'string'}},
2607 'required': ['type', 'description'],
2608 'type': 'object'},
2609 'CharmMetrics': {'additionalProperties': False,
2610 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}},
2611 'type': 'object'},
2612 'plan': {'$ref': '#/definitions/CharmPlan'}},
2613 'required': ['metrics', 'plan'],
2614 'type': 'object'},
2615 'CharmOption': {'additionalProperties': False,
2616 'properties': {'default': {'additionalProperties': True,
2617 'type': 'object'},
2618 'description': {'type': 'string'},
2619 'type': {'type': 'string'}},
2620 'required': ['type'],
2621 'type': 'object'},
2622 'CharmPayloadClass': {'additionalProperties': False,
2623 'properties': {'name': {'type': 'string'},
2624 'type': {'type': 'string'}},
2625 'required': ['name', 'type'],
2626 'type': 'object'},
2627 'CharmPlan': {'additionalProperties': False,
2628 'properties': {'required': {'type': 'boolean'}},
2629 'required': ['required'],
2630 'type': 'object'},
2631 'CharmRelation': {'additionalProperties': False,
2632 'properties': {'interface': {'type': 'string'},
2633 'limit': {'type': 'integer'},
2634 'name': {'type': 'string'},
2635 'optional': {'type': 'boolean'},
2636 'role': {'type': 'string'},
2637 'scope': {'type': 'string'}},
2638 'required': ['name',
2639 'role',
2640 'interface',
2641 'optional',
2642 'limit',
2643 'scope'],
2644 'type': 'object'},
2645 'CharmResourceMeta': {'additionalProperties': False,
2646 'properties': {'description': {'type': 'string'},
2647 'name': {'type': 'string'},
2648 'path': {'type': 'string'},
2649 'type': {'type': 'string'}},
2650 'required': ['name',
2651 'type',
2652 'path',
2653 'description'],
2654 'type': 'object'},
2655 'CharmStorage': {'additionalProperties': False,
2656 'properties': {'count-max': {'type': 'integer'},
2657 'count-min': {'type': 'integer'},
2658 'description': {'type': 'string'},
2659 'location': {'type': 'string'},
2660 'minimum-size': {'type': 'integer'},
2661 'name': {'type': 'string'},
2662 'properties': {'items': {'type': 'string'},
2663 'type': 'array'},
2664 'read-only': {'type': 'boolean'},
2665 'shared': {'type': 'boolean'},
2666 'type': {'type': 'string'}},
2667 'required': ['name',
2668 'description',
2669 'type',
2670 'shared',
2671 'read-only',
2672 'count-min',
2673 'count-max',
2674 'minimum-size'],
2675 'type': 'object'},
2676 'CharmURL': {'additionalProperties': False,
2677 'properties': {'url': {'type': 'string'}},
2678 'required': ['url'],
2679 'type': 'object'},
2680 'CharmsList': {'additionalProperties': False,
2681 'properties': {'names': {'items': {'type': 'string'},
2682 'type': 'array'}},
2683 'required': ['names'],
2684 'type': 'object'},
2685 'CharmsListResult': {'additionalProperties': False,
2686 'properties': {'charm-urls': {'items': {'type': 'string'},
2687 'type': 'array'}},
2688 'required': ['charm-urls'],
2689 'type': 'object'},
2690 'IsMeteredResult': {'additionalProperties': False,
2691 'properties': {'metered': {'type': 'boolean'}},
2692 'required': ['metered'],
2693 'type': 'object'}},
2694 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
2695 'Result': {'$ref': '#/definitions/CharmInfo'}},
2696 'type': 'object'},
2697 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
2698 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
2699 'type': 'object'},
2700 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
2701 'Result': {'$ref': '#/definitions/CharmsListResult'}},
2702 'type': 'object'}},
2703 'type': 'object'}
2704
2705
2706 @ReturnMapping(CharmInfo)
2707 async def CharmInfo(self, url):
2708 '''
2709 url : str
2710 Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping[str, ~CharmOption], _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str]
2711 '''
2712 # map input types to rpc msg
2713 _params = dict()
2714 msg = dict(type='Charms',
2715 request='CharmInfo',
2716 version=2,
2717 params=_params)
2718 _params['url'] = url
2719 reply = await self.rpc(msg)
2720 return reply
2721
2722
2723
2724 @ReturnMapping(IsMeteredResult)
2725 async def IsMetered(self, url):
2726 '''
2727 url : str
2728 Returns -> bool
2729 '''
2730 # map input types to rpc msg
2731 _params = dict()
2732 msg = dict(type='Charms',
2733 request='IsMetered',
2734 version=2,
2735 params=_params)
2736 _params['url'] = url
2737 reply = await self.rpc(msg)
2738 return reply
2739
2740
2741
2742 @ReturnMapping(CharmsListResult)
2743 async def List(self, names):
2744 '''
2745 names : typing.Sequence[str]
2746 Returns -> typing.Sequence[str]
2747 '''
2748 # map input types to rpc msg
2749 _params = dict()
2750 msg = dict(type='Charms',
2751 request='List',
2752 version=2,
2753 params=_params)
2754 _params['names'] = names
2755 reply = await self.rpc(msg)
2756 return reply
2757
2758
2759
2760 class CleanerFacade(Type):
2761 name = 'Cleaner'
2762 version = 2
2763 schema = {'definitions': {'Error': {'additionalProperties': False,
2764 'properties': {'code': {'type': 'string'},
2765 'info': {'$ref': '#/definitions/ErrorInfo'},
2766 'message': {'type': 'string'}},
2767 'required': ['message', 'code'],
2768 'type': 'object'},
2769 'ErrorInfo': {'additionalProperties': False,
2770 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2771 'macaroon-path': {'type': 'string'}},
2772 'type': 'object'},
2773 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2774 'NotifyWatchResult': {'additionalProperties': False,
2775 'properties': {'NotifyWatcherId': {'type': 'string'},
2776 'error': {'$ref': '#/definitions/Error'}},
2777 'required': ['NotifyWatcherId'],
2778 'type': 'object'}},
2779 'properties': {'Cleanup': {'type': 'object'},
2780 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2781 'type': 'object'}},
2782 'type': 'object'}
2783
2784
2785 @ReturnMapping(None)
2786 async def Cleanup(self):
2787 '''
2788
2789 Returns -> None
2790 '''
2791 # map input types to rpc msg
2792 _params = dict()
2793 msg = dict(type='Cleaner',
2794 request='Cleanup',
2795 version=2,
2796 params=_params)
2797
2798 reply = await self.rpc(msg)
2799 return reply
2800
2801
2802
2803 @ReturnMapping(NotifyWatchResult)
2804 async def WatchCleanups(self):
2805 '''
2806
2807 Returns -> typing.Union[str, _ForwardRef('Error')]
2808 '''
2809 # map input types to rpc msg
2810 _params = dict()
2811 msg = dict(type='Cleaner',
2812 request='WatchCleanups',
2813 version=2,
2814 params=_params)
2815
2816 reply = await self.rpc(msg)
2817 return reply
2818
2819
2820
2821 class ClientFacade(Type):
2822 name = 'Client'
2823 version = 2
2824 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
2825 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2826 'type': 'array'},
2827 'type': 'array'}},
2828 'required': ['servers'],
2829 'type': 'object'},
2830 'AddCharm': {'additionalProperties': False,
2831 'properties': {'channel': {'type': 'string'},
2832 'force': {'type': 'boolean'},
2833 'url': {'type': 'string'}},
2834 'required': ['url', 'channel', 'force'],
2835 'type': 'object'},
2836 'AddCharmWithAuthorization': {'additionalProperties': False,
2837 'properties': {'channel': {'type': 'string'},
2838 'force': {'type': 'boolean'},
2839 'macaroon': {'$ref': '#/definitions/Macaroon'},
2840 'url': {'type': 'string'}},
2841 'required': ['url',
2842 'channel',
2843 'macaroon',
2844 'force'],
2845 'type': 'object'},
2846 'AddMachineParams': {'additionalProperties': False,
2847 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
2848 'type': 'array'},
2849 'constraints': {'$ref': '#/definitions/Value'},
2850 'container-type': {'type': 'string'},
2851 'disks': {'items': {'$ref': '#/definitions/Constraints'},
2852 'type': 'array'},
2853 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2854 'instance-id': {'type': 'string'},
2855 'jobs': {'items': {'type': 'string'},
2856 'type': 'array'},
2857 'nonce': {'type': 'string'},
2858 'parent-id': {'type': 'string'},
2859 'placement': {'$ref': '#/definitions/Placement'},
2860 'series': {'type': 'string'}},
2861 'required': ['series',
2862 'constraints',
2863 'jobs',
2864 'parent-id',
2865 'container-type',
2866 'instance-id',
2867 'nonce',
2868 'hardware-characteristics',
2869 'addresses'],
2870 'type': 'object'},
2871 'AddMachines': {'additionalProperties': False,
2872 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
2873 'type': 'array'}},
2874 'required': ['params'],
2875 'type': 'object'},
2876 'AddMachinesResult': {'additionalProperties': False,
2877 'properties': {'error': {'$ref': '#/definitions/Error'},
2878 'machine': {'type': 'string'}},
2879 'required': ['machine'],
2880 'type': 'object'},
2881 'AddMachinesResults': {'additionalProperties': False,
2882 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
2883 'type': 'array'}},
2884 'required': ['machines'],
2885 'type': 'object'},
2886 'Address': {'additionalProperties': False,
2887 'properties': {'scope': {'type': 'string'},
2888 'space-name': {'type': 'string'},
2889 'type': {'type': 'string'},
2890 'value': {'type': 'string'}},
2891 'required': ['value', 'type', 'scope'],
2892 'type': 'object'},
2893 'AgentVersionResult': {'additionalProperties': False,
2894 'properties': {'version': {'$ref': '#/definitions/Number'}},
2895 'required': ['version'],
2896 'type': 'object'},
2897 'AllWatcherId': {'additionalProperties': False,
2898 'properties': {'watcher-id': {'type': 'string'}},
2899 'required': ['watcher-id'],
2900 'type': 'object'},
2901 'ApplicationOfferStatus': {'additionalProperties': False,
2902 'properties': {'active-connected-count': {'type': 'integer'},
2903 'application-name': {'type': 'string'},
2904 'charm': {'type': 'string'},
2905 'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteEndpoint'}},
2906 'type': 'object'},
2907 'err': {'additionalProperties': True,
2908 'type': 'object'},
2909 'offer-name': {'type': 'string'},
2910 'total-connected-count': {'type': 'integer'}},
2911 'required': ['offer-name',
2912 'application-name',
2913 'charm',
2914 'endpoints',
2915 'active-connected-count',
2916 'total-connected-count'],
2917 'type': 'object'},
2918 'ApplicationStatus': {'additionalProperties': False,
2919 'properties': {'can-upgrade-to': {'type': 'string'},
2920 'charm': {'type': 'string'},
2921 'charm-verion': {'type': 'string'},
2922 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
2923 'type': 'object'},
2924 'err': {'additionalProperties': True,
2925 'type': 'object'},
2926 'exposed': {'type': 'boolean'},
2927 'int': {'type': 'integer'},
2928 'life': {'type': 'string'},
2929 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
2930 'type': 'object'},
2931 'provider-id': {'type': 'string'},
2932 'public-address': {'type': 'string'},
2933 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
2934 'type': 'array'}},
2935 'type': 'object'},
2936 'series': {'type': 'string'},
2937 'status': {'$ref': '#/definitions/DetailedStatus'},
2938 'string': {'type': 'string'},
2939 'subordinate-to': {'items': {'type': 'string'},
2940 'type': 'array'},
2941 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
2942 'type': 'object'},
2943 'workload-version': {'type': 'string'}},
2944 'required': ['charm',
2945 'series',
2946 'exposed',
2947 'life',
2948 'relations',
2949 'can-upgrade-to',
2950 'subordinate-to',
2951 'units',
2952 'meter-statuses',
2953 'status',
2954 'workload-version',
2955 'charm-verion',
2956 'endpoint-bindings',
2957 'public-address'],
2958 'type': 'object'},
2959 'Binary': {'additionalProperties': False,
2960 'properties': {'Arch': {'type': 'string'},
2961 'Number': {'$ref': '#/definitions/Number'},
2962 'Series': {'type': 'string'}},
2963 'required': ['Number', 'Series', 'Arch'],
2964 'type': 'object'},
2965 'BundleChange': {'additionalProperties': False,
2966 'properties': {'args': {'items': {'additionalProperties': True,
2967 'type': 'object'},
2968 'type': 'array'},
2969 'id': {'type': 'string'},
2970 'method': {'type': 'string'},
2971 'requires': {'items': {'type': 'string'},
2972 'type': 'array'}},
2973 'required': ['id',
2974 'method',
2975 'args',
2976 'requires'],
2977 'type': 'object'},
2978 'BundleChangesParams': {'additionalProperties': False,
2979 'properties': {'bundleURL': {'type': 'string'},
2980 'yaml': {'type': 'string'}},
2981 'required': ['yaml', 'bundleURL'],
2982 'type': 'object'},
2983 'BundleChangesResults': {'additionalProperties': False,
2984 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
2985 'type': 'array'},
2986 'errors': {'items': {'type': 'string'},
2987 'type': 'array'}},
2988 'type': 'object'},
2989 'BytesResult': {'additionalProperties': False,
2990 'properties': {'result': {'items': {'type': 'integer'},
2991 'type': 'array'}},
2992 'required': ['result'],
2993 'type': 'object'},
2994 'ConfigValue': {'additionalProperties': False,
2995 'properties': {'source': {'type': 'string'},
2996 'value': {'additionalProperties': True,
2997 'type': 'object'}},
2998 'required': ['value', 'source'],
2999 'type': 'object'},
3000 'Constraints': {'additionalProperties': False,
3001 'properties': {'Count': {'type': 'integer'},
3002 'Pool': {'type': 'string'},
3003 'Size': {'type': 'integer'}},
3004 'required': ['Pool', 'Size', 'Count'],
3005 'type': 'object'},
3006 'DestroyMachines': {'additionalProperties': False,
3007 'properties': {'force': {'type': 'boolean'},
3008 'machine-names': {'items': {'type': 'string'},
3009 'type': 'array'}},
3010 'required': ['machine-names', 'force'],
3011 'type': 'object'},
3012 'DetailedStatus': {'additionalProperties': False,
3013 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3014 'type': 'object'}},
3015 'type': 'object'},
3016 'err': {'additionalProperties': True,
3017 'type': 'object'},
3018 'info': {'type': 'string'},
3019 'kind': {'type': 'string'},
3020 'life': {'type': 'string'},
3021 'since': {'format': 'date-time',
3022 'type': 'string'},
3023 'status': {'type': 'string'},
3024 'version': {'type': 'string'}},
3025 'required': ['status',
3026 'info',
3027 'data',
3028 'since',
3029 'kind',
3030 'version',
3031 'life'],
3032 'type': 'object'},
3033 'EndpointStatus': {'additionalProperties': False,
3034 'properties': {'application': {'type': 'string'},
3035 'name': {'type': 'string'},
3036 'role': {'type': 'string'},
3037 'subordinate': {'type': 'boolean'}},
3038 'required': ['application',
3039 'name',
3040 'role',
3041 'subordinate'],
3042 'type': 'object'},
3043 'Entities': {'additionalProperties': False,
3044 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3045 'type': 'array'}},
3046 'required': ['entities'],
3047 'type': 'object'},
3048 'Entity': {'additionalProperties': False,
3049 'properties': {'tag': {'type': 'string'}},
3050 'required': ['tag'],