Added description to package
[osm/N2VC.git] / modules / libjuju / 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._definitions import *
5 from juju.client.facade import ReturnMapping, Type
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'],
3051 'type': 'object'},
3052 'EntityStatus': {'additionalProperties': False,
3053 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3054 'type': 'object'}},
3055 'type': 'object'},
3056 'info': {'type': 'string'},
3057 'since': {'format': 'date-time',
3058 'type': 'string'},
3059 'status': {'type': 'string'}},
3060 'required': ['status', 'info', 'since'],
3061 'type': 'object'},
3062 'Error': {'additionalProperties': False,
3063 'properties': {'code': {'type': 'string'},
3064 'info': {'$ref': '#/definitions/ErrorInfo'},
3065 'message': {'type': 'string'}},
3066 'required': ['message', 'code'],
3067 'type': 'object'},
3068 'ErrorInfo': {'additionalProperties': False,
3069 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3070 'macaroon-path': {'type': 'string'}},
3071 'type': 'object'},
3072 'ErrorResult': {'additionalProperties': False,
3073 'properties': {'error': {'$ref': '#/definitions/Error'}},
3074 'type': 'object'},
3075 'ErrorResults': {'additionalProperties': False,
3076 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3077 'type': 'array'}},
3078 'required': ['results'],
3079 'type': 'object'},
3080 'FindToolsParams': {'additionalProperties': False,
3081 'properties': {'agentstream': {'type': 'string'},
3082 'arch': {'type': 'string'},
3083 'major': {'type': 'integer'},
3084 'minor': {'type': 'integer'},
3085 'number': {'$ref': '#/definitions/Number'},
3086 'series': {'type': 'string'}},
3087 'required': ['number',
3088 'major',
3089 'minor',
3090 'arch',
3091 'series',
3092 'agentstream'],
3093 'type': 'object'},
3094 'FindToolsResult': {'additionalProperties': False,
3095 'properties': {'error': {'$ref': '#/definitions/Error'},
3096 'list': {'items': {'$ref': '#/definitions/Tools'},
3097 'type': 'array'}},
3098 'required': ['list'],
3099 'type': 'object'},
3100 'FullStatus': {'additionalProperties': False,
3101 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
3102 'type': 'object'},
3103 'controller-timestamp': {'format': 'date-time',
3104 'type': 'string'},
3105 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
3106 'type': 'object'},
3107 'model': {'$ref': '#/definitions/ModelStatusInfo'},
3108 'offers': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationOfferStatus'}},
3109 'type': 'object'},
3110 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
3111 'type': 'array'},
3112 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}},
3113 'type': 'object'}},
3114 'required': ['model',
3115 'machines',
3116 'applications',
3117 'remote-applications',
3118 'offers',
3119 'relations',
3120 'controller-timestamp'],
3121 'type': 'object'},
3122 'GetConstraintsResults': {'additionalProperties': False,
3123 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
3124 'required': ['constraints'],
3125 'type': 'object'},
3126 'HardwareCharacteristics': {'additionalProperties': False,
3127 'properties': {'arch': {'type': 'string'},
3128 'availability-zone': {'type': 'string'},
3129 'cpu-cores': {'type': 'integer'},
3130 'cpu-power': {'type': 'integer'},
3131 'mem': {'type': 'integer'},
3132 'root-disk': {'type': 'integer'},
3133 'tags': {'items': {'type': 'string'},
3134 'type': 'array'}},
3135 'type': 'object'},
3136 'History': {'additionalProperties': False,
3137 'properties': {'error': {'$ref': '#/definitions/Error'},
3138 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
3139 'type': 'array'}},
3140 'required': ['statuses'],
3141 'type': 'object'},
3142 'HostPort': {'additionalProperties': False,
3143 'properties': {'Address': {'$ref': '#/definitions/Address'},
3144 'port': {'type': 'integer'}},
3145 'required': ['Address', 'port'],
3146 'type': 'object'},
3147 'LXDProfile': {'additionalProperties': False,
3148 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
3149 'type': 'object'},
3150 'description': {'type': 'string'},
3151 'devices': {'patternProperties': {'.*': {'patternProperties': {'.*': {'type': 'string'}},
3152 'type': 'object'}},
3153 'type': 'object'}},
3154 'required': ['config',
3155 'description',
3156 'devices'],
3157 'type': 'object'},
3158 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3159 'MachineHardware': {'additionalProperties': False,
3160 'properties': {'arch': {'type': 'string'},
3161 'availability-zone': {'type': 'string'},
3162 'cores': {'type': 'integer'},
3163 'cpu-power': {'type': 'integer'},
3164 'mem': {'type': 'integer'},
3165 'root-disk': {'type': 'integer'},
3166 'tags': {'items': {'type': 'string'},
3167 'type': 'array'}},
3168 'type': 'object'},
3169 'MachineStatus': {'additionalProperties': False,
3170 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
3171 'constraints': {'type': 'string'},
3172 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
3173 'type': 'object'},
3174 'dns-name': {'type': 'string'},
3175 'hardware': {'type': 'string'},
3176 'has-vote': {'type': 'boolean'},
3177 'id': {'type': 'string'},
3178 'instance-id': {'type': 'string'},
3179 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
3180 'ip-addresses': {'items': {'type': 'string'},
3181 'type': 'array'},
3182 'jobs': {'items': {'type': 'string'},
3183 'type': 'array'},
3184 'lxd-profiles': {'patternProperties': {'.*': {'$ref': '#/definitions/LXDProfile'}},
3185 'type': 'object'},
3186 'network-interfaces': {'patternProperties': {'.*': {'$ref': '#/definitions/NetworkInterface'}},
3187 'type': 'object'},
3188 'series': {'type': 'string'},
3189 'wants-vote': {'type': 'boolean'}},
3190 'required': ['agent-status',
3191 'instance-status',
3192 'dns-name',
3193 'instance-id',
3194 'series',
3195 'id',
3196 'containers',
3197 'constraints',
3198 'hardware',
3199 'jobs',
3200 'has-vote',
3201 'wants-vote'],
3202 'type': 'object'},
3203 'MeterStatus': {'additionalProperties': False,
3204 'properties': {'color': {'type': 'string'},
3205 'message': {'type': 'string'}},
3206 'required': ['color', 'message'],
3207 'type': 'object'},
3208 'ModelConfigResults': {'additionalProperties': False,
3209 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
3210 'type': 'object'}},
3211 'required': ['config'],
3212 'type': 'object'},
3213 'ModelInfo': {'additionalProperties': False,
3214 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
3215 'cloud-credential-tag': {'type': 'string'},
3216 'cloud-region': {'type': 'string'},
3217 'cloud-tag': {'type': 'string'},
3218 'controller-uuid': {'type': 'string'},
3219 'default-series': {'type': 'string'},
3220 'life': {'type': 'string'},
3221 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
3222 'type': 'array'},
3223 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
3224 'name': {'type': 'string'},
3225 'owner-tag': {'type': 'string'},
3226 'provider-type': {'type': 'string'},
3227 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
3228 'status': {'$ref': '#/definitions/EntityStatus'},
3229 'type': {'type': 'string'},
3230 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
3231 'type': 'array'},
3232 'uuid': {'type': 'string'}},
3233 'required': ['name',
3234 'type',
3235 'uuid',
3236 'controller-uuid',
3237 'cloud-tag',
3238 'owner-tag',
3239 'life',
3240 'users',
3241 'machines',
3242 'sla',
3243 'agent-version'],
3244 'type': 'object'},
3245 'ModelMachineInfo': {'additionalProperties': False,
3246 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
3247 'has-vote': {'type': 'boolean'},
3248 'id': {'type': 'string'},
3249 'instance-id': {'type': 'string'},
3250 'message': {'type': 'string'},
3251 'status': {'type': 'string'},
3252 'wants-vote': {'type': 'boolean'}},
3253 'required': ['id'],
3254 'type': 'object'},
3255 'ModelMigrationStatus': {'additionalProperties': False,
3256 'properties': {'end': {'format': 'date-time',
3257 'type': 'string'},
3258 'start': {'format': 'date-time',
3259 'type': 'string'},
3260 'status': {'type': 'string'}},
3261 'required': ['status', 'start'],
3262 'type': 'object'},
3263 'ModelSLA': {'additionalProperties': False,
3264 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
3265 'creds': {'items': {'type': 'integer'},
3266 'type': 'array'}},
3267 'required': ['ModelSLAInfo', 'creds'],
3268 'type': 'object'},
3269 'ModelSLAInfo': {'additionalProperties': False,
3270 'properties': {'level': {'type': 'string'},
3271 'owner': {'type': 'string'}},
3272 'required': ['level', 'owner'],
3273 'type': 'object'},
3274 'ModelSet': {'additionalProperties': False,
3275 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
3276 'type': 'object'}},
3277 'type': 'object'}},
3278 'required': ['config'],
3279 'type': 'object'},
3280 'ModelStatusInfo': {'additionalProperties': False,
3281 'properties': {'available-version': {'type': 'string'},
3282 'cloud-tag': {'type': 'string'},
3283 'meter-status': {'$ref': '#/definitions/MeterStatus'},
3284 'model-status': {'$ref': '#/definitions/DetailedStatus'},
3285 'name': {'type': 'string'},
3286 'region': {'type': 'string'},
3287 'sla': {'type': 'string'},
3288 'type': {'type': 'string'},
3289 'version': {'type': 'string'}},
3290 'required': ['name',
3291 'type',
3292 'cloud-tag',
3293 'version',
3294 'available-version',
3295 'model-status',
3296 'meter-status',
3297 'sla'],
3298 'type': 'object'},
3299 'ModelUnset': {'additionalProperties': False,
3300 'properties': {'keys': {'items': {'type': 'string'},
3301 'type': 'array'}},
3302 'required': ['keys'],
3303 'type': 'object'},
3304 'ModelUserInfo': {'additionalProperties': False,
3305 'properties': {'access': {'type': 'string'},
3306 'display-name': {'type': 'string'},
3307 'last-connection': {'format': 'date-time',
3308 'type': 'string'},
3309 'user': {'type': 'string'}},
3310 'required': ['user',
3311 'display-name',
3312 'last-connection',
3313 'access'],
3314 'type': 'object'},
3315 'ModelUserInfoResult': {'additionalProperties': False,
3316 'properties': {'error': {'$ref': '#/definitions/Error'},
3317 'result': {'$ref': '#/definitions/ModelUserInfo'}},
3318 'type': 'object'},
3319 'ModelUserInfoResults': {'additionalProperties': False,
3320 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
3321 'type': 'array'}},
3322 'required': ['results'],
3323 'type': 'object'},
3324 'NetworkInterface': {'additionalProperties': False,
3325 'properties': {'dns-nameservers': {'items': {'type': 'string'},
3326 'type': 'array'},
3327 'gateway': {'type': 'string'},
3328 'ip-addresses': {'items': {'type': 'string'},
3329 'type': 'array'},
3330 'is-up': {'type': 'boolean'},
3331 'mac-address': {'type': 'string'},
3332 'space': {'type': 'string'}},
3333 'required': ['ip-addresses',
3334 'mac-address',
3335 'is-up'],
3336 'type': 'object'},
3337 'Number': {'additionalProperties': False,
3338 'properties': {'Build': {'type': 'integer'},
3339 'Major': {'type': 'integer'},
3340 'Minor': {'type': 'integer'},
3341 'Patch': {'type': 'integer'},
3342 'Tag': {'type': 'string'}},
3343 'required': ['Major',
3344 'Minor',
3345 'Tag',
3346 'Patch',
3347 'Build'],
3348 'type': 'object'},
3349 'Placement': {'additionalProperties': False,
3350 'properties': {'directive': {'type': 'string'},
3351 'scope': {'type': 'string'}},
3352 'required': ['scope', 'directive'],
3353 'type': 'object'},
3354 'PrivateAddress': {'additionalProperties': False,
3355 'properties': {'target': {'type': 'string'}},
3356 'required': ['target'],
3357 'type': 'object'},
3358 'PrivateAddressResults': {'additionalProperties': False,
3359 'properties': {'private-address': {'type': 'string'}},
3360 'required': ['private-address'],
3361 'type': 'object'},
3362 'ProvisioningScriptParams': {'additionalProperties': False,
3363 'properties': {'data-dir': {'type': 'string'},
3364 'disable-package-commands': {'type': 'boolean'},
3365 'machine-id': {'type': 'string'},
3366 'nonce': {'type': 'string'}},
3367 'required': ['machine-id',
3368 'nonce',
3369 'data-dir',
3370 'disable-package-commands'],
3371 'type': 'object'},
3372 'ProvisioningScriptResult': {'additionalProperties': False,
3373 'properties': {'script': {'type': 'string'}},
3374 'required': ['script'],
3375 'type': 'object'},
3376 'PublicAddress': {'additionalProperties': False,
3377 'properties': {'target': {'type': 'string'}},
3378 'required': ['target'],
3379 'type': 'object'},
3380 'PublicAddressResults': {'additionalProperties': False,
3381 'properties': {'public-address': {'type': 'string'}},
3382 'required': ['public-address'],
3383 'type': 'object'},
3384 'RelationStatus': {'additionalProperties': False,
3385 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
3386 'type': 'array'},
3387 'id': {'type': 'integer'},
3388 'interface': {'type': 'string'},
3389 'key': {'type': 'string'},
3390 'scope': {'type': 'string'},
3391 'status': {'$ref': '#/definitions/DetailedStatus'}},
3392 'required': ['id',
3393 'key',
3394 'interface',
3395 'scope',
3396 'endpoints',
3397 'status'],
3398 'type': 'object'},
3399 'RemoteApplicationStatus': {'additionalProperties': False,
3400 'properties': {'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
3401 'type': 'array'},
3402 'err': {'additionalProperties': True,
3403 'type': 'object'},
3404 'life': {'type': 'string'},
3405 'offer-name': {'type': 'string'},
3406 'offer-url': {'type': 'string'},
3407 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
3408 'type': 'array'}},
3409 'type': 'object'},
3410 'status': {'$ref': '#/definitions/DetailedStatus'}},
3411 'required': ['offer-url',
3412 'offer-name',
3413 'endpoints',
3414 'life',
3415 'relations',
3416 'status'],
3417 'type': 'object'},
3418 'RemoteEndpoint': {'additionalProperties': False,
3419 'properties': {'interface': {'type': 'string'},
3420 'limit': {'type': 'integer'},
3421 'name': {'type': 'string'},
3422 'role': {'type': 'string'}},
3423 'required': ['name',
3424 'role',
3425 'interface',
3426 'limit'],
3427 'type': 'object'},
3428 'ResolveCharmResult': {'additionalProperties': False,
3429 'properties': {'error': {'type': 'string'},
3430 'url': {'type': 'string'}},
3431 'type': 'object'},
3432 'ResolveCharmResults': {'additionalProperties': False,
3433 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
3434 'type': 'array'}},
3435 'required': ['urls'],
3436 'type': 'object'},
3437 'ResolveCharms': {'additionalProperties': False,
3438 'properties': {'references': {'items': {'type': 'string'},
3439 'type': 'array'}},
3440 'required': ['references'],
3441 'type': 'object'},
3442 'Resolved': {'additionalProperties': False,
3443 'properties': {'retry': {'type': 'boolean'},
3444 'unit-name': {'type': 'string'}},
3445 'required': ['unit-name', 'retry'],
3446 'type': 'object'},
3447 'SetConstraints': {'additionalProperties': False,
3448 'properties': {'application': {'type': 'string'},
3449 'constraints': {'$ref': '#/definitions/Value'}},
3450 'required': ['application', 'constraints'],
3451 'type': 'object'},
3452 'SetModelAgentVersion': {'additionalProperties': False,
3453 'properties': {'force': {'type': 'boolean'},
3454 'version': {'$ref': '#/definitions/Number'}},
3455 'required': ['version'],
3456 'type': 'object'},
3457 'StatusHistoryFilter': {'additionalProperties': False,
3458 'properties': {'date': {'format': 'date-time',
3459 'type': 'string'},
3460 'delta': {'type': 'integer'},
3461 'exclude': {'items': {'type': 'string'},
3462 'type': 'array'},
3463 'size': {'type': 'integer'}},
3464 'required': ['size',
3465 'date',
3466 'delta',
3467 'exclude'],
3468 'type': 'object'},
3469 'StatusHistoryRequest': {'additionalProperties': False,
3470 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
3471 'historyKind': {'type': 'string'},
3472 'size': {'type': 'integer'},
3473 'tag': {'type': 'string'}},
3474 'required': ['historyKind',
3475 'size',
3476 'filter',
3477 'tag'],
3478 'type': 'object'},
3479 'StatusHistoryRequests': {'additionalProperties': False,
3480 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
3481 'type': 'array'}},
3482 'required': ['requests'],
3483 'type': 'object'},
3484 'StatusHistoryResult': {'additionalProperties': False,
3485 'properties': {'error': {'$ref': '#/definitions/Error'},
3486 'history': {'$ref': '#/definitions/History'}},
3487 'required': ['history'],
3488 'type': 'object'},
3489 'StatusHistoryResults': {'additionalProperties': False,
3490 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
3491 'type': 'array'}},
3492 'required': ['results'],
3493 'type': 'object'},
3494 'StatusParams': {'additionalProperties': False,
3495 'properties': {'patterns': {'items': {'type': 'string'},
3496 'type': 'array'}},
3497 'required': ['patterns'],
3498 'type': 'object'},
3499 'StringResult': {'additionalProperties': False,
3500 'properties': {'error': {'$ref': '#/definitions/Error'},
3501 'result': {'type': 'string'}},
3502 'required': ['result'],
3503 'type': 'object'},
3504 'Tools': {'additionalProperties': False,
3505 'properties': {'sha256': {'type': 'string'},
3506 'size': {'type': 'integer'},
3507 'url': {'type': 'string'},
3508 'version': {'$ref': '#/definitions/Binary'}},
3509 'required': ['version', 'url', 'size'],
3510 'type': 'object'},
3511 'UnitStatus': {'additionalProperties': False,
3512 'properties': {'address': {'type': 'string'},
3513 'agent-status': {'$ref': '#/definitions/DetailedStatus'},
3514 'charm': {'type': 'string'},
3515 'leader': {'type': 'boolean'},
3516 'machine': {'type': 'string'},
3517 'opened-ports': {'items': {'type': 'string'},
3518 'type': 'array'},
3519 'provider-id': {'type': 'string'},
3520 'public-address': {'type': 'string'},
3521 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
3522 'type': 'object'},
3523 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
3524 'workload-version': {'type': 'string'}},
3525 'required': ['agent-status',
3526 'workload-status',
3527 'workload-version',
3528 'machine',
3529 'opened-ports',
3530 'public-address',
3531 'charm',
3532 'subordinates'],
3533 'type': 'object'},
3534 'Value': {'additionalProperties': False,
3535 'properties': {'arch': {'type': 'string'},
3536 'container': {'type': 'string'},
3537 'cores': {'type': 'integer'},
3538 'cpu-power': {'type': 'integer'},
3539 'instance-type': {'type': 'string'},
3540 'mem': {'type': 'integer'},
3541 'root-disk': {'type': 'integer'},
3542 'spaces': {'items': {'type': 'string'},
3543 'type': 'array'},
3544 'tags': {'items': {'type': 'string'},
3545 'type': 'array'},
3546 'virt-type': {'type': 'string'},
3547 'zones': {'items': {'type': 'string'},
3548 'type': 'array'}},
3549 'type': 'object'}},
3550 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
3551 'type': 'object'},
3552 'AbortCurrentUpgrade': {'type': 'object'},
3553 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
3554 'type': 'object'},
3555 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
3556 'type': 'object'},
3557 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
3558 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
3559 'type': 'object'},
3560 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
3561 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
3562 'type': 'object'},
3563 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
3564 'type': 'object'},
3565 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
3566 'type': 'object'},
3567 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
3568 'type': 'object'},
3569 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
3570 'Result': {'$ref': '#/definitions/FindToolsResult'}},
3571 'type': 'object'},
3572 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
3573 'Result': {'$ref': '#/definitions/FullStatus'}},
3574 'type': 'object'},
3575 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
3576 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
3577 'type': 'object'},
3578 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
3579 'type': 'object'},
3580 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
3581 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
3582 'type': 'object'},
3583 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
3584 'type': 'object'},
3585 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
3586 'type': 'object'},
3587 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
3588 'type': 'object'},
3589 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
3590 'type': 'object'},
3591 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
3592 'type': 'object'},
3593 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
3594 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
3595 'type': 'object'},
3596 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
3597 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
3598 'type': 'object'},
3599 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
3600 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
3601 'type': 'object'},
3602 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
3603 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
3604 'type': 'object'},
3605 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
3606 'type': 'object'},
3607 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3608 'Result': {'$ref': '#/definitions/ErrorResults'}},
3609 'type': 'object'},
3610 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
3611 'type': 'object'},
3612 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
3613 'type': 'object'},
3614 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
3615 'type': 'object'},
3616 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
3617 'type': 'object'},
3618 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
3619 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
3620 'type': 'object'},
3621 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
3622 'type': 'object'}},
3623 'type': 'object'}
3624
3625
3626 @ReturnMapping(APIHostPortsResult)
3627 async def APIHostPorts(self):
3628 '''
3629
3630 Returns -> typing.Sequence[~HostPort]
3631 '''
3632 # map input types to rpc msg
3633 _params = dict()
3634 msg = dict(type='Client',
3635 request='APIHostPorts',
3636 version=2,
3637 params=_params)
3638
3639 reply = await self.rpc(msg)
3640 return reply
3641
3642
3643
3644 @ReturnMapping(None)
3645 async def AbortCurrentUpgrade(self):
3646 '''
3647
3648 Returns -> None
3649 '''
3650 # map input types to rpc msg
3651 _params = dict()
3652 msg = dict(type='Client',
3653 request='AbortCurrentUpgrade',
3654 version=2,
3655 params=_params)
3656
3657 reply = await self.rpc(msg)
3658 return reply
3659
3660
3661
3662 @ReturnMapping(None)
3663 async def AddCharm(self, channel, url):
3664 '''
3665 channel : str
3666 url : str
3667 Returns -> None
3668 '''
3669 # map input types to rpc msg
3670 _params = dict()
3671 msg = dict(type='Client',
3672 request='AddCharm',
3673 version=2,
3674 params=_params)
3675 _params['channel'] = channel
3676 _params['url'] = url
3677 reply = await self.rpc(msg)
3678 return reply
3679
3680
3681
3682 @ReturnMapping(None)
3683 async def AddCharmWithAuthorization(self, channel, macaroon, url):
3684 '''
3685 channel : str
3686 macaroon : Macaroon
3687 url : str
3688 Returns -> None
3689 '''
3690 # map input types to rpc msg
3691 _params = dict()
3692 msg = dict(type='Client',
3693 request='AddCharmWithAuthorization',
3694 version=2,
3695 params=_params)
3696 _params['channel'] = channel
3697 _params['macaroon'] = macaroon
3698 _params['url'] = url
3699 reply = await self.rpc(msg)
3700 return reply
3701
3702
3703
3704 @ReturnMapping(AddMachinesResults)
3705 async def AddMachines(self, params):
3706 '''
3707 params : typing.Sequence[~AddMachineParams]
3708 Returns -> typing.Sequence[~AddMachinesResult]
3709 '''
3710 # map input types to rpc msg
3711 _params = dict()
3712 msg = dict(type='Client',
3713 request='AddMachines',
3714 version=2,
3715 params=_params)
3716 _params['params'] = params
3717 reply = await self.rpc(msg)
3718 return reply
3719
3720
3721
3722 @ReturnMapping(AddMachinesResults)
3723 async def AddMachinesV2(self, params):
3724 '''
3725 params : typing.Sequence[~AddMachineParams]
3726 Returns -> typing.Sequence[~AddMachinesResult]
3727 '''
3728 # map input types to rpc msg
3729 _params = dict()
3730 msg = dict(type='Client',
3731 request='AddMachinesV2',
3732 version=2,
3733 params=_params)
3734 _params['params'] = params
3735 reply = await self.rpc(msg)
3736 return reply
3737
3738
3739
3740 @ReturnMapping(AgentVersionResult)
3741 async def AgentVersion(self):
3742 '''
3743
3744 Returns -> Number
3745 '''
3746 # map input types to rpc msg
3747 _params = dict()
3748 msg = dict(type='Client',
3749 request='AgentVersion',
3750 version=2,
3751 params=_params)
3752
3753 reply = await self.rpc(msg)
3754 return reply
3755
3756
3757
3758 @ReturnMapping(BytesResult)
3759 async def CACert(self):
3760 '''
3761
3762 Returns -> typing.Sequence[int]
3763 '''
3764 # map input types to rpc msg
3765 _params = dict()
3766 msg = dict(type='Client',
3767 request='CACert',
3768 version=2,
3769 params=_params)
3770
3771 reply = await self.rpc(msg)
3772 return reply
3773
3774
3775
3776 @ReturnMapping(None)
3777 async def DestroyMachines(self, force, machine_names):
3778 '''
3779 force : bool
3780 machine_names : typing.Sequence[str]
3781 Returns -> None
3782 '''
3783 # map input types to rpc msg
3784 _params = dict()
3785 msg = dict(type='Client',
3786 request='DestroyMachines',
3787 version=2,
3788 params=_params)
3789 _params['force'] = force
3790 _params['machine-names'] = machine_names
3791 reply = await self.rpc(msg)
3792 return reply
3793
3794
3795
3796 @ReturnMapping(FindToolsResult)
3797 async def FindTools(self, arch, major, minor, number, series):
3798 '''
3799 arch : str
3800 major : int
3801 minor : int
3802 number : Number
3803 series : str
3804 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
3805 '''
3806 # map input types to rpc msg
3807 _params = dict()
3808 msg = dict(type='Client',
3809 request='FindTools',
3810 version=2,
3811 params=_params)
3812 _params['arch'] = arch
3813 _params['major'] = major
3814 _params['minor'] = minor
3815 _params['number'] = number
3816 _params['series'] = series
3817 reply = await self.rpc(msg)
3818 return reply
3819
3820
3821
3822 @ReturnMapping(FullStatus)
3823 async def FullStatus(self, patterns):
3824 '''
3825 patterns : typing.Sequence[str]
3826 Returns -> typing.Union[typing.Mapping[str, ~ApplicationStatus], str, typing.Mapping[str, ~MachineStatus], _ForwardRef('ModelStatusInfo'), typing.Mapping[str, ~ApplicationOfferStatus], typing.Sequence[~RelationStatus], typing.Mapping[str, ~RemoteApplicationStatus]]
3827 '''
3828 # map input types to rpc msg
3829 _params = dict()
3830 msg = dict(type='Client',
3831 request='FullStatus',
3832 version=2,
3833 params=_params)
3834 _params['patterns'] = patterns
3835 reply = await self.rpc(msg)
3836 return reply
3837
3838
3839
3840 @ReturnMapping(BundleChangesResults)
3841 async def GetBundleChanges(self, yaml):
3842 '''
3843 yaml : str
3844 Returns -> typing.Union[typing.Sequence[~BundleChange], typing.Sequence[str]]
3845 '''
3846 # map input types to rpc msg
3847 _params = dict()
3848 msg = dict(type='Client',
3849 request='GetBundleChanges',
3850 version=2,
3851 params=_params)
3852 _params['yaml'] = yaml
3853 reply = await self.rpc(msg)
3854 return reply
3855
3856
3857
3858 @ReturnMapping(GetConstraintsResults)
3859 async def GetModelConstraints(self):
3860 '''
3861
3862 Returns -> Value
3863 '''
3864 # map input types to rpc msg
3865 _params = dict()
3866 msg = dict(type='Client',
3867 request='GetModelConstraints',
3868 version=2,
3869 params=_params)
3870
3871 reply = await self.rpc(msg)
3872 return reply
3873
3874
3875
3876 @ReturnMapping(AddMachinesResults)
3877 async def InjectMachines(self, params):
3878 '''
3879 params : typing.Sequence[~AddMachineParams]
3880 Returns -> typing.Sequence[~AddMachinesResult]
3881 '''
3882 # map input types to rpc msg
3883 _params = dict()
3884 msg = dict(type='Client',
3885 request='InjectMachines',
3886 version=2,
3887 params=_params)
3888 _params['params'] = params
3889 reply = await self.rpc(msg)
3890 return reply
3891
3892
3893
3894 @ReturnMapping(ModelConfigResults)
3895 async def ModelGet(self):
3896 '''
3897
3898 Returns -> typing.Mapping[str, ~ConfigValue]
3899 '''
3900 # map input types to rpc msg
3901 _params = dict()
3902 msg = dict(type='Client',
3903 request='ModelGet',
3904 version=2,
3905 params=_params)
3906
3907 reply = await self.rpc(msg)
3908 return reply
3909
3910
3911
3912 @ReturnMapping(ModelInfo)
3913 async def ModelInfo(self):
3914 '''
3915
3916 Returns -> typing.Union[_ForwardRef('Number'), str, typing.Sequence[~ModelMachineInfo], _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
3917 '''
3918 # map input types to rpc msg
3919 _params = dict()
3920 msg = dict(type='Client',
3921 request='ModelInfo',
3922 version=2,
3923 params=_params)
3924
3925 reply = await self.rpc(msg)
3926 return reply
3927
3928
3929
3930 @ReturnMapping(None)
3931 async def ModelSet(self, config):
3932 '''
3933 config : typing.Mapping[str, typing.Any]
3934 Returns -> None
3935 '''
3936 # map input types to rpc msg
3937 _params = dict()
3938 msg = dict(type='Client',
3939 request='ModelSet',
3940 version=2,
3941 params=_params)
3942 _params['config'] = config
3943 reply = await self.rpc(msg)
3944 return reply
3945
3946
3947
3948 @ReturnMapping(None)
3949 async def ModelUnset(self, keys):
3950 '''
3951 keys : typing.Sequence[str]
3952 Returns -> None
3953 '''
3954 # map input types to rpc msg
3955 _params = dict()
3956 msg = dict(type='Client',
3957 request='ModelUnset',
3958 version=2,
3959 params=_params)
3960 _params['keys'] = keys
3961 reply = await self.rpc(msg)
3962 return reply
3963
3964
3965
3966 @ReturnMapping(ModelUserInfoResults)
3967 async def ModelUserInfo(self):
3968 '''
3969
3970 Returns -> typing.Sequence[~ModelUserInfoResult]
3971 '''
3972 # map input types to rpc msg
3973 _params = dict()
3974 msg = dict(type='Client',
3975 request='ModelUserInfo',
3976 version=2,
3977 params=_params)
3978
3979 reply = await self.rpc(msg)
3980 return reply
3981
3982
3983
3984 @ReturnMapping(PrivateAddressResults)
3985 async def PrivateAddress(self, target):
3986 '''
3987 target : str
3988 Returns -> str
3989 '''
3990 # map input types to rpc msg
3991 _params = dict()
3992 msg = dict(type='Client',
3993 request='PrivateAddress',
3994 version=2,
3995 params=_params)
3996 _params['target'] = target
3997 reply = await self.rpc(msg)
3998 return reply
3999
4000
4001
4002 @ReturnMapping(ProvisioningScriptResult)
4003 async def ProvisioningScript(self, data_dir, disable_package_commands, machine_id, nonce):
4004 '''
4005 data_dir : str
4006 disable_package_commands : bool
4007 machine_id : str
4008 nonce : str
4009 Returns -> str
4010 '''
4011 # map input types to rpc msg
4012 _params = dict()
4013 msg = dict(type='Client',
4014 request='ProvisioningScript',
4015 version=2,
4016 params=_params)
4017 _params['data-dir'] = data_dir
4018 _params['disable-package-commands'] = disable_package_commands
4019 _params['machine-id'] = machine_id
4020 _params['nonce'] = nonce
4021 reply = await self.rpc(msg)
4022 return reply
4023
4024
4025
4026 @ReturnMapping(PublicAddressResults)
4027 async def PublicAddress(self, target):
4028 '''
4029 target : str
4030 Returns -> str
4031 '''
4032 # map input types to rpc msg
4033 _params = dict()
4034 msg = dict(type='Client',
4035 request='PublicAddress',
4036 version=2,
4037 params=_params)
4038 _params['target'] = target
4039 reply = await self.rpc(msg)
4040 return reply
4041
4042
4043
4044 @ReturnMapping(ResolveCharmResults)
4045 async def ResolveCharms(self, references):
4046 '''
4047 references : typing.Sequence[str]
4048 Returns -> typing.Sequence[~ResolveCharmResult]
4049 '''
4050 # map input types to rpc msg
4051 _params = dict()
4052 msg = dict(type='Client',
4053 request='ResolveCharms',
4054 version=2,
4055 params=_params)
4056 _params['references'] = references
4057 reply = await self.rpc(msg)
4058 return reply
4059
4060
4061
4062 @ReturnMapping(None)
4063 async def Resolved(self, retry, unit_name):
4064 '''
4065 retry : bool
4066 unit_name : str
4067 Returns -> None
4068 '''
4069 # map input types to rpc msg
4070 _params = dict()
4071 msg = dict(type='Client',
4072 request='Resolved',
4073 version=2,
4074 params=_params)
4075 _params['retry'] = retry
4076 _params['unit-name'] = unit_name
4077 reply = await self.rpc(msg)
4078 return reply
4079
4080
4081
4082 @ReturnMapping(ErrorResults)
4083 async def RetryProvisioning(self, entities):
4084 '''
4085 entities : typing.Sequence[~Entity]
4086 Returns -> typing.Sequence[~ErrorResult]
4087 '''
4088 # map input types to rpc msg
4089 _params = dict()
4090 msg = dict(type='Client',
4091 request='RetryProvisioning',
4092 version=2,
4093 params=_params)
4094 _params['entities'] = entities
4095 reply = await self.rpc(msg)
4096 return reply
4097
4098
4099
4100 @ReturnMapping(StringResult)
4101 async def SLALevel(self):
4102 '''
4103
4104 Returns -> typing.Union[_ForwardRef('Error'), str]
4105 '''
4106 # map input types to rpc msg
4107 _params = dict()
4108 msg = dict(type='Client',
4109 request='SLALevel',
4110 version=2,
4111 params=_params)
4112
4113 reply = await self.rpc(msg)
4114 return reply
4115
4116
4117
4118 @ReturnMapping(None)
4119 async def SetModelAgentVersion(self, version):
4120 '''
4121 version : Number
4122 Returns -> None
4123 '''
4124 # map input types to rpc msg
4125 _params = dict()
4126 msg = dict(type='Client',
4127 request='SetModelAgentVersion',
4128 version=2,
4129 params=_params)
4130 _params['version'] = version
4131 reply = await self.rpc(msg)
4132 return reply
4133
4134
4135
4136 @ReturnMapping(None)
4137 async def SetModelConstraints(self, application, constraints):
4138 '''
4139 application : str
4140 constraints : Value
4141 Returns -> None
4142 '''
4143 # map input types to rpc msg
4144 _params = dict()
4145 msg = dict(type='Client',
4146 request='SetModelConstraints',
4147 version=2,
4148 params=_params)
4149 _params['application'] = application
4150 _params['constraints'] = constraints
4151 reply = await self.rpc(msg)
4152 return reply
4153
4154
4155
4156 @ReturnMapping(None)
4157 async def SetSLALevel(self, creds, level):
4158 '''
4159 creds : typing.Sequence[int]
4160 level : str
4161 Returns -> None
4162 '''
4163 # map input types to rpc msg
4164 _params = dict()
4165 msg = dict(type='Client',
4166 request='SetSLALevel',
4167 version=2,
4168 params=_params)
4169 _params['creds'] = creds
4170 _params['level'] = level
4171 reply = await self.rpc(msg)
4172 return reply
4173
4174
4175
4176 @ReturnMapping(StatusHistoryResults)
4177 async def StatusHistory(self, requests):
4178 '''
4179 requests : typing.Sequence[~StatusHistoryRequest]
4180 Returns -> typing.Sequence[~StatusHistoryResult]
4181 '''
4182 # map input types to rpc msg
4183 _params = dict()
4184 msg = dict(type='Client',
4185 request='StatusHistory',
4186 version=2,
4187 params=_params)
4188 _params['requests'] = requests
4189 reply = await self.rpc(msg)
4190 return reply
4191
4192
4193
4194 @ReturnMapping(AllWatcherId)
4195 async def WatchAll(self):
4196 '''
4197
4198 Returns -> str
4199 '''
4200 # map input types to rpc msg
4201 _params = dict()
4202 msg = dict(type='Client',
4203 request='WatchAll',
4204 version=2,
4205 params=_params)
4206
4207 reply = await self.rpc(msg)
4208 return reply
4209
4210
4211
4212 class CredentialValidatorFacade(Type):
4213 name = 'CredentialValidator'
4214 version = 2
4215 schema = {'definitions': {'Entity': {'additionalProperties': False,
4216 'properties': {'tag': {'type': 'string'}},
4217 'required': ['tag'],
4218 'type': 'object'},
4219 'Error': {'additionalProperties': False,
4220 'properties': {'code': {'type': 'string'},
4221 'info': {'$ref': '#/definitions/ErrorInfo'},
4222 'message': {'type': 'string'}},
4223 'required': ['message', 'code'],
4224 'type': 'object'},
4225 'ErrorInfo': {'additionalProperties': False,
4226 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4227 'macaroon-path': {'type': 'string'}},
4228 'type': 'object'},
4229 'ErrorResult': {'additionalProperties': False,
4230 'properties': {'error': {'$ref': '#/definitions/Error'}},
4231 'type': 'object'},
4232 'InvalidateCredentialArg': {'additionalProperties': False,
4233 'properties': {'reason': {'type': 'string'}},
4234 'type': 'object'},
4235 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4236 'ModelCredential': {'additionalProperties': False,
4237 'properties': {'credential-tag': {'type': 'string'},
4238 'exists': {'type': 'boolean'},
4239 'model-tag': {'type': 'string'},
4240 'valid': {'type': 'boolean'}},
4241 'required': ['model-tag',
4242 'credential-tag'],
4243 'type': 'object'},
4244 'NotifyWatchResult': {'additionalProperties': False,
4245 'properties': {'NotifyWatcherId': {'type': 'string'},
4246 'error': {'$ref': '#/definitions/Error'}},
4247 'required': ['NotifyWatcherId'],
4248 'type': 'object'}},
4249 'properties': {'InvalidateModelCredential': {'properties': {'Params': {'$ref': '#/definitions/InvalidateCredentialArg'},
4250 'Result': {'$ref': '#/definitions/ErrorResult'}},
4251 'type': 'object'},
4252 'ModelCredential': {'properties': {'Result': {'$ref': '#/definitions/ModelCredential'}},
4253 'type': 'object'},
4254 'WatchCredential': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
4255 'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4256 'type': 'object'},
4257 'WatchModelCredential': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4258 'type': 'object'}},
4259 'type': 'object'}
4260
4261
4262 @ReturnMapping(ErrorResult)
4263 async def InvalidateModelCredential(self, reason):
4264 '''
4265 reason : str
4266 Returns -> Error
4267 '''
4268 # map input types to rpc msg
4269 _params = dict()
4270 msg = dict(type='CredentialValidator',
4271 request='InvalidateModelCredential',
4272 version=2,
4273 params=_params)
4274 _params['reason'] = reason
4275 reply = await self.rpc(msg)
4276 return reply
4277
4278
4279
4280 @ReturnMapping(ModelCredential)
4281 async def ModelCredential(self):
4282 '''
4283
4284 Returns -> typing.Union[str, bool]
4285 '''
4286 # map input types to rpc msg
4287 _params = dict()
4288 msg = dict(type='CredentialValidator',
4289 request='ModelCredential',
4290 version=2,
4291 params=_params)
4292
4293 reply = await self.rpc(msg)
4294 return reply
4295
4296
4297
4298 @ReturnMapping(NotifyWatchResult)
4299 async def WatchCredential(self, tag):
4300 '''
4301 tag : str
4302 Returns -> typing.Union[str, _ForwardRef('Error')]
4303 '''
4304 # map input types to rpc msg
4305 _params = dict()
4306 msg = dict(type='CredentialValidator',
4307 request='WatchCredential',
4308 version=2,
4309 params=_params)
4310 _params['tag'] = tag
4311 reply = await self.rpc(msg)
4312 return reply
4313
4314
4315
4316 @ReturnMapping(NotifyWatchResult)
4317 async def WatchModelCredential(self):
4318 '''
4319
4320 Returns -> typing.Union[str, _ForwardRef('Error')]
4321 '''
4322 # map input types to rpc msg
4323 _params = dict()
4324 msg = dict(type='CredentialValidator',
4325 request='WatchModelCredential',
4326 version=2,
4327 params=_params)
4328
4329 reply = await self.rpc(msg)
4330 return reply
4331
4332
4333
4334 class DiscoverSpacesFacade(Type):
4335 name = 'DiscoverSpaces'
4336 version = 2
4337 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
4338 'properties': {'provider-network-id': {'type': 'string'},
4339 'space-tag': {'type': 'string'},
4340 'subnet-provider-id': {'type': 'string'},
4341 'subnet-tag': {'type': 'string'},
4342 'vlan-tag': {'type': 'integer'},
4343 'zones': {'items': {'type': 'string'},
4344 'type': 'array'}},
4345 'required': ['space-tag'],
4346 'type': 'object'},
4347 'AddSubnetsParams': {'additionalProperties': False,
4348 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
4349 'type': 'array'}},
4350 'required': ['subnets'],
4351 'type': 'object'},
4352 'CreateSpaceParams': {'additionalProperties': False,
4353 'properties': {'provider-id': {'type': 'string'},
4354 'public': {'type': 'boolean'},
4355 'space-tag': {'type': 'string'},
4356 'subnet-tags': {'items': {'type': 'string'},
4357 'type': 'array'}},
4358 'required': ['subnet-tags',
4359 'space-tag',
4360 'public'],
4361 'type': 'object'},
4362 'CreateSpacesParams': {'additionalProperties': False,
4363 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
4364 'type': 'array'}},
4365 'required': ['spaces'],
4366 'type': 'object'},
4367 'DiscoverSpacesResults': {'additionalProperties': False,
4368 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'},
4369 'type': 'array'}},
4370 'required': ['results'],
4371 'type': 'object'},
4372 'Error': {'additionalProperties': False,
4373 'properties': {'code': {'type': 'string'},
4374 'info': {'$ref': '#/definitions/ErrorInfo'},
4375 'message': {'type': 'string'}},
4376 'required': ['message', 'code'],
4377 'type': 'object'},
4378 'ErrorInfo': {'additionalProperties': False,
4379 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4380 'macaroon-path': {'type': 'string'}},
4381 'type': 'object'},
4382 'ErrorResult': {'additionalProperties': False,
4383 'properties': {'error': {'$ref': '#/definitions/Error'}},
4384 'type': 'object'},
4385 'ErrorResults': {'additionalProperties': False,
4386 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4387 'type': 'array'}},
4388 'required': ['results'],
4389 'type': 'object'},
4390 'ListSubnetsResults': {'additionalProperties': False,
4391 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
4392 'type': 'array'}},
4393 'required': ['results'],
4394 'type': 'object'},
4395 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4396 'ModelConfigResult': {'additionalProperties': False,
4397 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
4398 'type': 'object'}},
4399 'type': 'object'}},
4400 'required': ['config'],
4401 'type': 'object'},
4402 'ProviderSpace': {'additionalProperties': False,
4403 'properties': {'error': {'$ref': '#/definitions/Error'},
4404 'name': {'type': 'string'},
4405 'provider-id': {'type': 'string'},
4406 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
4407 'type': 'array'}},
4408 'required': ['name',
4409 'provider-id',
4410 'subnets'],
4411 'type': 'object'},
4412 'Subnet': {'additionalProperties': False,
4413 'properties': {'cidr': {'type': 'string'},
4414 'life': {'type': 'string'},
4415 'provider-id': {'type': 'string'},
4416 'provider-network-id': {'type': 'string'},
4417 'provider-space-id': {'type': 'string'},
4418 'space-tag': {'type': 'string'},
4419 'status': {'type': 'string'},
4420 'vlan-tag': {'type': 'integer'},
4421 'zones': {'items': {'type': 'string'},
4422 'type': 'array'}},
4423 'required': ['cidr',
4424 'vlan-tag',
4425 'life',
4426 'space-tag',
4427 'zones'],
4428 'type': 'object'},
4429 'SubnetsFilters': {'additionalProperties': False,
4430 'properties': {'space-tag': {'type': 'string'},
4431 'zone': {'type': 'string'}},
4432 'type': 'object'}},
4433 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
4434 'Result': {'$ref': '#/definitions/ErrorResults'}},
4435 'type': 'object'},
4436 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
4437 'Result': {'$ref': '#/definitions/ErrorResults'}},
4438 'type': 'object'},
4439 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
4440 'type': 'object'},
4441 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
4442 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
4443 'type': 'object'},
4444 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
4445 'type': 'object'}},
4446 'type': 'object'}
4447
4448
4449 @ReturnMapping(ErrorResults)
4450 async def AddSubnets(self, subnets):
4451 '''
4452 subnets : typing.Sequence[~AddSubnetParams]
4453 Returns -> typing.Sequence[~ErrorResult]
4454 '''
4455 # map input types to rpc msg
4456 _params = dict()
4457 msg = dict(type='DiscoverSpaces',
4458 request='AddSubnets',
4459 version=2,
4460 params=_params)
4461 _params['subnets'] = subnets
4462 reply = await self.rpc(msg)
4463 return reply
4464
4465
4466
4467 @ReturnMapping(ErrorResults)
4468 async def CreateSpaces(self, spaces):
4469 '''
4470 spaces : typing.Sequence[~CreateSpaceParams]
4471 Returns -> typing.Sequence[~ErrorResult]
4472 '''
4473 # map input types to rpc msg
4474 _params = dict()
4475 msg = dict(type='DiscoverSpaces',
4476 request='CreateSpaces',
4477 version=2,
4478 params=_params)
4479 _params['spaces'] = spaces
4480 reply = await self.rpc(msg)
4481 return reply
4482
4483
4484
4485 @ReturnMapping(DiscoverSpacesResults)
4486 async def ListSpaces(self):
4487 '''
4488
4489 Returns -> typing.Sequence[~ProviderSpace]
4490 '''
4491 # map input types to rpc msg
4492 _params = dict()
4493 msg = dict(type='DiscoverSpaces',
4494 request='ListSpaces',
4495 version=2,
4496 params=_params)
4497
4498 reply = await self.rpc(msg)
4499 return reply
4500
4501
4502
4503 @ReturnMapping(ListSubnetsResults)
4504 async def ListSubnets(self, space_tag, zone):
4505 '''
4506 space_tag : str
4507 zone : str
4508 Returns -> typing.Sequence[~Subnet]
4509 '''
4510 # map input types to rpc msg
4511 _params = dict()
4512 msg = dict(type='DiscoverSpaces',
4513 request='ListSubnets',
4514 version=2,
4515 params=_params)
4516 _params['space-tag'] = space_tag
4517 _params['zone'] = zone
4518 reply = await self.rpc(msg)
4519 return reply
4520
4521
4522
4523 @ReturnMapping(ModelConfigResult)
4524 async def ModelConfig(self):
4525 '''
4526
4527 Returns -> typing.Mapping[str, typing.Any]
4528 '''
4529 # map input types to rpc msg
4530 _params = dict()
4531 msg = dict(type='DiscoverSpaces',
4532 request='ModelConfig',
4533 version=2,
4534 params=_params)
4535
4536 reply = await self.rpc(msg)
4537 return reply
4538
4539
4540
4541 class DiskManagerFacade(Type):
4542 name = 'DiskManager'
4543 version = 2
4544 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
4545 'properties': {'BusAddress': {'type': 'string'},
4546 'DeviceLinks': {'items': {'type': 'string'},
4547 'type': 'array'},
4548 'DeviceName': {'type': 'string'},
4549 'FilesystemType': {'type': 'string'},
4550 'HardwareId': {'type': 'string'},
4551 'InUse': {'type': 'boolean'},
4552 'Label': {'type': 'string'},
4553 'MountPoint': {'type': 'string'},
4554 'Size': {'type': 'integer'},
4555 'UUID': {'type': 'string'},
4556 'WWN': {'type': 'string'}},
4557 'required': ['DeviceName',
4558 'DeviceLinks',
4559 'Label',
4560 'UUID',
4561 'HardwareId',
4562 'WWN',
4563 'BusAddress',
4564 'Size',
4565 'FilesystemType',
4566 'InUse',
4567 'MountPoint'],
4568 'type': 'object'},
4569 'Error': {'additionalProperties': False,
4570 'properties': {'code': {'type': 'string'},
4571 'info': {'$ref': '#/definitions/ErrorInfo'},
4572 'message': {'type': 'string'}},
4573 'required': ['message', 'code'],
4574 'type': 'object'},
4575 'ErrorInfo': {'additionalProperties': False,
4576 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4577 'macaroon-path': {'type': 'string'}},
4578 'type': 'object'},
4579 'ErrorResult': {'additionalProperties': False,
4580 'properties': {'error': {'$ref': '#/definitions/Error'}},
4581 'type': 'object'},
4582 'ErrorResults': {'additionalProperties': False,
4583 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4584 'type': 'array'}},
4585 'required': ['results'],
4586 'type': 'object'},
4587 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4588 'MachineBlockDevices': {'additionalProperties': False,
4589 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
4590 'type': 'array'},
4591 'machine': {'type': 'string'}},
4592 'required': ['machine'],
4593 'type': 'object'},
4594 'SetMachineBlockDevices': {'additionalProperties': False,
4595 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
4596 'type': 'array'}},
4597 'required': ['machine-block-devices'],
4598 'type': 'object'}},
4599 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
4600 'Result': {'$ref': '#/definitions/ErrorResults'}},
4601 'type': 'object'}},
4602 'type': 'object'}
4603
4604
4605 @ReturnMapping(ErrorResults)
4606 async def SetMachineBlockDevices(self, machine_block_devices):
4607 '''
4608 machine_block_devices : typing.Sequence[~MachineBlockDevices]
4609 Returns -> typing.Sequence[~ErrorResult]
4610 '''
4611 # map input types to rpc msg
4612 _params = dict()
4613 msg = dict(type='DiskManager',
4614 request='SetMachineBlockDevices',
4615 version=2,
4616 params=_params)
4617 _params['machine-block-devices'] = machine_block_devices
4618 reply = await self.rpc(msg)
4619 return reply
4620
4621
4622
4623 class EntityWatcherFacade(Type):
4624 name = 'EntityWatcher'
4625 version = 2
4626 schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
4627 'properties': {'changes': {'items': {'type': 'string'},
4628 'type': 'array'},
4629 'error': {'$ref': '#/definitions/Error'},
4630 'watcher-id': {'type': 'string'}},
4631 'required': ['watcher-id'],
4632 'type': 'object'},
4633 'Error': {'additionalProperties': False,
4634 'properties': {'code': {'type': 'string'},
4635 'info': {'$ref': '#/definitions/ErrorInfo'},
4636 'message': {'type': 'string'}},
4637 'required': ['message', 'code'],
4638 'type': 'object'},
4639 'ErrorInfo': {'additionalProperties': False,
4640 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4641 'macaroon-path': {'type': 'string'}},
4642 'type': 'object'},
4643 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
4644 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
4645 'type': 'object'},
4646 'Stop': {'type': 'object'}},
4647 'type': 'object'}
4648
4649
4650 @ReturnMapping(EntitiesWatchResult)
4651 async def Next(self):
4652 '''
4653
4654 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str]
4655 '''
4656 # map input types to rpc msg
4657 _params = dict()
4658 msg = dict(type='EntityWatcher',
4659 request='Next',
4660 version=2,
4661 params=_params)
4662
4663 reply = await self.rpc(msg)
4664 return reply
4665
4666
4667
4668 @ReturnMapping(None)
4669 async def Stop(self):
4670 '''
4671
4672 Returns -> None
4673 '''
4674 # map input types to rpc msg
4675 _params = dict()
4676 msg = dict(type='EntityWatcher',
4677 request='Stop',
4678 version=2,
4679 params=_params)
4680
4681 reply = await self.rpc(msg)
4682 return reply
4683
4684
4685
4686 class FilesystemAttachmentsWatcherFacade(Type):
4687 name = 'FilesystemAttachmentsWatcher'
4688 version = 2
4689 schema = {'definitions': {'Error': {'additionalProperties': False,
4690 'properties': {'code': {'type': 'string'},
4691 'info': {'$ref': '#/definitions/ErrorInfo'},
4692 'message': {'type': 'string'}},
4693 'required': ['message', 'code'],
4694 'type': 'object'},
4695 'ErrorInfo': {'additionalProperties': False,
4696 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4697 'macaroon-path': {'type': 'string'}},
4698 'type': 'object'},
4699 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4700 'MachineStorageId': {'additionalProperties': False,
4701 'properties': {'attachment-tag': {'type': 'string'},
4702 'machine-tag': {'type': 'string'}},
4703 'required': ['machine-tag',
4704 'attachment-tag'],
4705 'type': 'object'},
4706 'MachineStorageIdsWatchResult': {'additionalProperties': False,
4707 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
4708 'type': 'array'},
4709 'error': {'$ref': '#/definitions/Error'},
4710 'watcher-id': {'type': 'string'}},
4711 'required': ['watcher-id',
4712 'changes'],
4713 'type': 'object'}},
4714 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
4715 'type': 'object'},
4716 'Stop': {'type': 'object'}},
4717 'type': 'object'}
4718
4719
4720 @ReturnMapping(MachineStorageIdsWatchResult)
4721 async def Next(self):
4722 '''
4723
4724 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error'), str]
4725 '''
4726 # map input types to rpc msg
4727 _params = dict()
4728 msg = dict(type='FilesystemAttachmentsWatcher',
4729 request='Next',
4730 version=2,
4731 params=_params)
4732
4733 reply = await self.rpc(msg)
4734 return reply
4735
4736
4737
4738 @ReturnMapping(None)
4739 async def Stop(self):
4740 '''
4741
4742 Returns -> None
4743 '''
4744 # map input types to rpc msg
4745 _params = dict()
4746 msg = dict(type='FilesystemAttachmentsWatcher',
4747 request='Stop',
4748 version=2,
4749 params=_params)
4750
4751 reply = await self.rpc(msg)
4752 return reply
4753
4754
4755
4756 class HighAvailabilityFacade(Type):
4757 name = 'HighAvailability'
4758 version = 2
4759 schema = {'definitions': {'Address': {'additionalProperties': False,
4760 'properties': {'Scope': {'type': 'string'},
4761 'SpaceName': {'type': 'string'},
4762 'SpaceProviderId': {'type': 'string'},
4763 'Type': {'type': 'string'},
4764 'Value': {'type': 'string'}},
4765 'required': ['Value',
4766 'Type',
4767 'Scope',
4768 'SpaceName',
4769 'SpaceProviderId'],
4770 'type': 'object'},
4771 'ControllersChangeResult': {'additionalProperties': False,
4772 'properties': {'error': {'$ref': '#/definitions/Error'},
4773 'result': {'$ref': '#/definitions/ControllersChanges'}},
4774 'required': ['result'],
4775 'type': 'object'},
4776 'ControllersChangeResults': {'additionalProperties': False,
4777 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
4778 'type': 'array'}},
4779 'required': ['results'],
4780 'type': 'object'},
4781 'ControllersChanges': {'additionalProperties': False,
4782 'properties': {'added': {'items': {'type': 'string'},
4783 'type': 'array'},
4784 'converted': {'items': {'type': 'string'},
4785 'type': 'array'},
4786 'demoted': {'items': {'type': 'string'},
4787 'type': 'array'},
4788 'maintained': {'items': {'type': 'string'},
4789 'type': 'array'},
4790 'promoted': {'items': {'type': 'string'},
4791 'type': 'array'},
4792 'removed': {'items': {'type': 'string'},
4793 'type': 'array'}},
4794 'type': 'object'},
4795 'ControllersSpec': {'additionalProperties': False,
4796 'properties': {'constraints': {'$ref': '#/definitions/Value'},
4797 'num-controllers': {'type': 'integer'},
4798 'placement': {'items': {'type': 'string'},
4799 'type': 'array'},
4800 'series': {'type': 'string'}},
4801 'required': ['num-controllers'],
4802 'type': 'object'},
4803 'ControllersSpecs': {'additionalProperties': False,
4804 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
4805 'type': 'array'}},
4806 'required': ['specs'],
4807 'type': 'object'},
4808 'Error': {'additionalProperties': False,
4809 'properties': {'code': {'type': 'string'},
4810 'info': {'$ref': '#/definitions/ErrorInfo'},
4811 'message': {'type': 'string'}},
4812 'required': ['message', 'code'],
4813 'type': 'object'},
4814 'ErrorInfo': {'additionalProperties': False,
4815 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4816 'macaroon-path': {'type': 'string'}},
4817 'type': 'object'},
4818 'HAMember': {'additionalProperties': False,
4819 'properties': {'public-address': {'$ref': '#/definitions/Address'},
4820 'series': {'type': 'string'},
4821 'tag': {'type': 'string'}},
4822 'required': ['tag', 'public-address', 'series'],
4823 'type': 'object'},
4824 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4825 'Member': {'additionalProperties': False,
4826 'properties': {'Address': {'type': 'string'},
4827 'Id': {'type': 'integer'},
4828 'Priority': {'type': 'number'},
4829 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
4830 'type': 'object'},
4831 'Votes': {'type': 'integer'}},
4832 'required': ['Id',
4833 'Address',
4834 'Priority',
4835 'Tags',
4836 'Votes'],
4837 'type': 'object'},
4838 'MongoUpgradeResults': {'additionalProperties': False,
4839 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
4840 'type': 'array'},
4841 'master': {'$ref': '#/definitions/HAMember'},
4842 'rs-members': {'items': {'$ref': '#/definitions/Member'},
4843 'type': 'array'}},
4844 'required': ['rs-members',
4845 'master',
4846 'ha-members'],
4847 'type': 'object'},
4848 'MongoVersion': {'additionalProperties': False,
4849 'properties': {'engine': {'type': 'string'},
4850 'major': {'type': 'integer'},
4851 'minor': {'type': 'integer'},
4852 'patch': {'type': 'string'}},
4853 'required': ['major',
4854 'minor',
4855 'patch',
4856 'engine'],
4857 'type': 'object'},
4858 'ResumeReplicationParams': {'additionalProperties': False,
4859 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
4860 'type': 'array'}},
4861 'required': ['members'],
4862 'type': 'object'},
4863 'UpgradeMongoParams': {'additionalProperties': False,
4864 'properties': {'target': {'$ref': '#/definitions/MongoVersion'}},
4865 'required': ['target'],
4866 'type': 'object'},
4867 'Value': {'additionalProperties': False,
4868 'properties': {'arch': {'type': 'string'},
4869 'container': {'type': 'string'},
4870 'cores': {'type': 'integer'},
4871 'cpu-power': {'type': 'integer'},
4872 'instance-type': {'type': 'string'},
4873 'mem': {'type': 'integer'},
4874 'root-disk': {'type': 'integer'},
4875 'spaces': {'items': {'type': 'string'},
4876 'type': 'array'},
4877 'tags': {'items': {'type': 'string'},
4878 'type': 'array'},
4879 'virt-type': {'type': 'string'},
4880 'zones': {'items': {'type': 'string'},
4881 'type': 'array'}},
4882 'type': 'object'}},
4883 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
4884 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
4885 'type': 'object'},
4886 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
4887 'type': 'object'},
4888 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
4889 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
4890 'type': 'object'}},
4891 'type': 'object'}
4892
4893
4894 @ReturnMapping(ControllersChangeResults)
4895 async def EnableHA(self, specs):
4896 '''
4897 specs : typing.Sequence[~ControllersSpec]
4898 Returns -> typing.Sequence[~ControllersChangeResult]
4899 '''
4900 # map input types to rpc msg
4901 _params = dict()
4902 msg = dict(type='HighAvailability',
4903 request='EnableHA',
4904 version=2,
4905 params=_params)
4906 _params['specs'] = specs
4907 reply = await self.rpc(msg)
4908 return reply
4909
4910
4911
4912 @ReturnMapping(None)
4913 async def ResumeHAReplicationAfterUpgrade(self, members):
4914 '''
4915 members : typing.Sequence[~Member]
4916 Returns -> None
4917 '''
4918 # map input types to rpc msg
4919 _params = dict()
4920 msg = dict(type='HighAvailability',
4921 request='ResumeHAReplicationAfterUpgrade',
4922 version=2,
4923 params=_params)
4924 _params['members'] = members
4925 reply = await self.rpc(msg)
4926 return reply
4927
4928
4929
4930 @ReturnMapping(MongoUpgradeResults)
4931 async def StopHAReplicationForUpgrade(self, target):
4932 '''
4933 target : MongoVersion
4934 Returns -> typing.Union[typing.Sequence[~HAMember], _ForwardRef('HAMember'), typing.Sequence[~Member]]
4935 '''
4936 # map input types to rpc msg
4937 _params = dict()
4938 msg = dict(type='HighAvailability',
4939 request='StopHAReplicationForUpgrade',
4940 version=2,
4941 params=_params)
4942 _params['target'] = target
4943 reply = await self.rpc(msg)
4944 return reply
4945
4946
4947
4948 class ImageManagerFacade(Type):
4949 name = 'ImageManager'
4950 version = 2
4951 schema = {'definitions': {'Error': {'additionalProperties': False,
4952 'properties': {'code': {'type': 'string'},
4953 'info': {'$ref': '#/definitions/ErrorInfo'},
4954 'message': {'type': 'string'}},
4955 'required': ['message', 'code'],
4956 'type': 'object'},
4957 'ErrorInfo': {'additionalProperties': False,
4958 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4959 'macaroon-path': {'type': 'string'}},
4960 'type': 'object'},
4961 'ErrorResult': {'additionalProperties': False,
4962 'properties': {'error': {'$ref': '#/definitions/Error'}},
4963 'type': 'object'},
4964 'ErrorResults': {'additionalProperties': False,
4965 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4966 'type': 'array'}},
4967 'required': ['results'],
4968 'type': 'object'},
4969 'ImageFilterParams': {'additionalProperties': False,
4970 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
4971 'type': 'array'}},
4972 'required': ['images'],
4973 'type': 'object'},
4974 'ImageMetadata': {'additionalProperties': False,
4975 'properties': {'arch': {'type': 'string'},
4976 'created': {'format': 'date-time',
4977 'type': 'string'},
4978 'kind': {'type': 'string'},
4979 'series': {'type': 'string'},
4980 'url': {'type': 'string'}},
4981 'required': ['kind',
4982 'arch',
4983 'series',
4984 'url',
4985 'created'],
4986 'type': 'object'},
4987 'ImageSpec': {'additionalProperties': False,
4988 'properties': {'arch': {'type': 'string'},
4989 'kind': {'type': 'string'},
4990 'series': {'type': 'string'}},
4991 'required': ['kind', 'arch', 'series'],
4992 'type': 'object'},
4993 'ListImageResult': {'additionalProperties': False,
4994 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
4995 'type': 'array'}},
4996 'required': ['result'],
4997 'type': 'object'},
4998 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
4999 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
5000 'Result': {'$ref': '#/definitions/ErrorResults'}},
5001 'type': 'object'},
5002 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
5003 'Result': {'$ref': '#/definitions/ListImageResult'}},
5004 'type': 'object'}},
5005 'type': 'object'}
5006
5007
5008 @ReturnMapping(ErrorResults)
5009 async def DeleteImages(self, images):
5010 '''
5011 images : typing.Sequence[~ImageSpec]
5012 Returns -> typing.Sequence[~ErrorResult]
5013 '''
5014 # map input types to rpc msg
5015 _params = dict()
5016 msg = dict(type='ImageManager',
5017 request='DeleteImages',
5018 version=2,
5019 params=_params)
5020 _params['images'] = images
5021 reply = await self.rpc(msg)
5022 return reply
5023
5024
5025
5026 @ReturnMapping(ListImageResult)
5027 async def ListImages(self, images):
5028 '''
5029 images : typing.Sequence[~ImageSpec]
5030 Returns -> typing.Sequence[~ImageMetadata]
5031 '''
5032 # map input types to rpc msg
5033 _params = dict()
5034 msg = dict(type='ImageManager',
5035 request='ListImages',
5036 version=2,
5037 params=_params)
5038 _params['images'] = images
5039 reply = await self.rpc(msg)
5040 return reply
5041
5042
5043
5044 class ImageMetadataFacade(Type):
5045 name = 'ImageMetadata'
5046 version = 2
5047 schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
5048 'properties': {'arch': {'type': 'string'},
5049 'image-id': {'type': 'string'},
5050 'priority': {'type': 'integer'},
5051 'region': {'type': 'string'},
5052 'root-storage-size': {'type': 'integer'},
5053 'root-storage-type': {'type': 'string'},
5054 'series': {'type': 'string'},
5055 'source': {'type': 'string'},
5056 'stream': {'type': 'string'},
5057 'version': {'type': 'string'},
5058 'virt-type': {'type': 'string'}},
5059 'required': ['image-id',
5060 'region',
5061 'version',
5062 'series',
5063 'arch',
5064 'source',
5065 'priority'],
5066 'type': 'object'},
5067 'CloudImageMetadataList': {'additionalProperties': False,
5068 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
5069 'type': 'array'}},
5070 'type': 'object'},
5071 'Error': {'additionalProperties': False,
5072 'properties': {'code': {'type': 'string'},
5073 'info': {'$ref': '#/definitions/ErrorInfo'},
5074 'message': {'type': 'string'}},
5075 'required': ['message', 'code'],
5076 'type': 'object'},
5077 'ErrorInfo': {'additionalProperties': False,
5078 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5079 'macaroon-path': {'type': 'string'}},
5080 'type': 'object'},
5081 'ErrorResult': {'additionalProperties': False,
5082 'properties': {'error': {'$ref': '#/definitions/Error'}},
5083 'type': 'object'},
5084 'ErrorResults': {'additionalProperties': False,
5085 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5086 'type': 'array'}},
5087 'required': ['results'],
5088 'type': 'object'},
5089 'ImageMetadataFilter': {'additionalProperties': False,
5090 'properties': {'arches': {'items': {'type': 'string'},
5091 'type': 'array'},
5092 'region': {'type': 'string'},
5093 'root-storage-type': {'type': 'string'},
5094 'series': {'items': {'type': 'string'},
5095 'type': 'array'},
5096 'stream': {'type': 'string'},
5097 'virt-type': {'type': 'string'}},
5098 'type': 'object'},
5099 'ListCloudImageMetadataResult': {'additionalProperties': False,
5100 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
5101 'type': 'array'}},
5102 'required': ['result'],
5103 'type': 'object'},
5104 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5105 'MetadataImageIds': {'additionalProperties': False,
5106 'properties': {'image-ids': {'items': {'type': 'string'},
5107 'type': 'array'}},
5108 'required': ['image-ids'],
5109 'type': 'object'},
5110 'MetadataSaveParams': {'additionalProperties': False,
5111 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
5112 'type': 'array'}},
5113 'type': 'object'}},
5114 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
5115 'Result': {'$ref': '#/definitions/ErrorResults'}},
5116 'type': 'object'},
5117 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
5118 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
5119 'type': 'object'},
5120 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
5121 'Result': {'$ref': '#/definitions/ErrorResults'}},
5122 'type': 'object'},
5123 'UpdateFromPublishedImages': {'type': 'object'}},
5124 'type': 'object'}
5125
5126
5127 @ReturnMapping(ErrorResults)
5128 async def Delete(self, image_ids):
5129 '''
5130 image_ids : typing.Sequence[str]
5131 Returns -> typing.Sequence[~ErrorResult]
5132 '''
5133 # map input types to rpc msg
5134 _params = dict()
5135 msg = dict(type='ImageMetadata',
5136 request='Delete',
5137 version=2,
5138 params=_params)
5139 _params['image-ids'] = image_ids
5140 reply = await self.rpc(msg)
5141 return reply
5142
5143
5144
5145 @ReturnMapping(ListCloudImageMetadataResult)
5146 async def List(self, arches, region, root_storage_type, series, stream, virt_type):
5147 '''
5148 arches : typing.Sequence[str]
5149 region : str
5150 root_storage_type : str
5151 series : typing.Sequence[str]
5152 stream : str
5153 virt_type : str
5154 Returns -> typing.Sequence[~CloudImageMetadata]
5155 '''
5156 # map input types to rpc msg
5157 _params = dict()
5158 msg = dict(type='ImageMetadata',
5159 request='List',
5160 version=2,
5161 params=_params)
5162 _params['arches'] = arches
5163 _params['region'] = region
5164 _params['root-storage-type'] = root_storage_type
5165 _params['series'] = series
5166 _params['stream'] = stream
5167 _params['virt-type'] = virt_type
5168 reply = await self.rpc(msg)
5169 return reply
5170
5171
5172
5173 @ReturnMapping(ErrorResults)
5174 async def Save(self, metadata):
5175 '''
5176 metadata : typing.Sequence[~CloudImageMetadataList]
5177 Returns -> typing.Sequence[~ErrorResult]
5178 '''
5179 # map input types to rpc msg
5180 _params = dict()
5181 msg = dict(type='ImageMetadata',
5182 request='Save',
5183 version=2,
5184 params=_params)
5185 _params['metadata'] = metadata
5186 reply = await self.rpc(msg)
5187 return reply
5188
5189
5190
5191 @ReturnMapping(None)
5192 async def UpdateFromPublishedImages(self):
5193 '''
5194
5195 Returns -> None
5196 '''
5197 # map input types to rpc msg
5198 _params = dict()
5199 msg = dict(type='ImageMetadata',
5200 request='UpdateFromPublishedImages',
5201 version=2,
5202 params=_params)
5203
5204 reply = await self.rpc(msg)
5205 return reply
5206
5207
5208
5209 class LeadershipServiceFacade(Type):
5210 name = 'LeadershipService'
5211 version = 2
5212 schema = {'definitions': {'ApplicationTag': {'additionalProperties': False,
5213 'properties': {'Name': {'type': 'string'}},
5214 'required': ['Name'],
5215 'type': 'object'},
5216 'ClaimLeadershipBulkParams': {'additionalProperties': False,
5217 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
5218 'type': 'array'}},
5219 'required': ['params'],
5220 'type': 'object'},
5221 'ClaimLeadershipBulkResults': {'additionalProperties': False,
5222 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5223 'type': 'array'}},
5224 'required': ['results'],
5225 'type': 'object'},
5226 'ClaimLeadershipParams': {'additionalProperties': False,
5227 'properties': {'application-tag': {'type': 'string'},
5228 'duration': {'type': 'number'},
5229 'unit-tag': {'type': 'string'}},
5230 'required': ['application-tag',
5231 'unit-tag',
5232 'duration'],
5233 'type': 'object'},
5234 'Error': {'additionalProperties': False,
5235 'properties': {'code': {'type': 'string'},
5236 'info': {'$ref': '#/definitions/ErrorInfo'},
5237 'message': {'type': 'string'}},
5238 'required': ['message', 'code'],
5239 'type': 'object'},
5240 'ErrorInfo': {'additionalProperties': False,
5241 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5242 'macaroon-path': {'type': 'string'}},
5243 'type': 'object'},
5244 'ErrorResult': {'additionalProperties': False,
5245 'properties': {'error': {'$ref': '#/definitions/Error'}},
5246 'type': 'object'},
5247 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
5248 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
5249 'Result': {'$ref': '#/definitions/ErrorResult'}},
5250 'type': 'object'},
5251 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
5252 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
5253 'type': 'object'}},
5254 'type': 'object'}
5255
5256
5257 @ReturnMapping(ErrorResult)
5258 async def BlockUntilLeadershipReleased(self, name):
5259 '''
5260 name : str
5261 Returns -> Error
5262 '''
5263 # map input types to rpc msg
5264 _params = dict()
5265 msg = dict(type='LeadershipService',
5266 request='BlockUntilLeadershipReleased',
5267 version=2,
5268 params=_params)
5269 _params['Name'] = name
5270 reply = await self.rpc(msg)
5271 return reply
5272
5273
5274
5275 @ReturnMapping(ClaimLeadershipBulkResults)
5276 async def ClaimLeadership(self, params):
5277 '''
5278 params : typing.Sequence[~ClaimLeadershipParams]
5279 Returns -> typing.Sequence[~ErrorResult]
5280 '''
5281 # map input types to rpc msg
5282 _params = dict()
5283 msg = dict(type='LeadershipService',
5284 request='ClaimLeadership',
5285 version=2,
5286 params=_params)
5287 _params['params'] = params
5288 reply = await self.rpc(msg)
5289 return reply
5290
5291
5292
5293 class MachineManagerFacade(Type):
5294 name = 'MachineManager'
5295 version = 2
5296 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
5297 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
5298 'type': 'array'},
5299 'constraints': {'$ref': '#/definitions/Value'},
5300 'container-type': {'type': 'string'},
5301 'disks': {'items': {'$ref': '#/definitions/Constraints'},
5302 'type': 'array'},
5303 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
5304 'instance-id': {'type': 'string'},
5305 'jobs': {'items': {'type': 'string'},
5306 'type': 'array'},
5307 'nonce': {'type': 'string'},
5308 'parent-id': {'type': 'string'},
5309 'placement': {'$ref': '#/definitions/Placement'},
5310 'series': {'type': 'string'}},
5311 'required': ['series',
5312 'constraints',
5313 'jobs',
5314 'parent-id',
5315 'container-type',
5316 'instance-id',
5317 'nonce',
5318 'hardware-characteristics',
5319 'addresses'],
5320 'type': 'object'},
5321 'AddMachines': {'additionalProperties': False,
5322 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
5323 'type': 'array'}},
5324 'required': ['params'],
5325 'type': 'object'},
5326 'AddMachinesResult': {'additionalProperties': False,
5327 'properties': {'error': {'$ref': '#/definitions/Error'},
5328 'machine': {'type': 'string'}},
5329 'required': ['machine'],
5330 'type': 'object'},
5331 'AddMachinesResults': {'additionalProperties': False,
5332 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
5333 'type': 'array'}},
5334 'required': ['machines'],
5335 'type': 'object'},
5336 'Address': {'additionalProperties': False,
5337 'properties': {'scope': {'type': 'string'},
5338 'space-name': {'type': 'string'},
5339 'type': {'type': 'string'},
5340 'value': {'type': 'string'}},
5341 'required': ['value', 'type', 'scope'],
5342 'type': 'object'},
5343 'Constraints': {'additionalProperties': False,
5344 'properties': {'Count': {'type': 'integer'},
5345 'Pool': {'type': 'string'},
5346 'Size': {'type': 'integer'}},
5347 'required': ['Pool', 'Size', 'Count'],
5348 'type': 'object'},
5349 'Error': {'additionalProperties': False,
5350 'properties': {'code': {'type': 'string'},
5351 'info': {'$ref': '#/definitions/ErrorInfo'},
5352 'message': {'type': 'string'}},
5353 'required': ['message', 'code'],
5354 'type': 'object'},
5355 'ErrorInfo': {'additionalProperties': False,
5356 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5357 'macaroon-path': {'type': 'string'}},
5358 'type': 'object'},
5359 'HardwareCharacteristics': {'additionalProperties': False,
5360 'properties': {'arch': {'type': 'string'},
5361 'availability-zone': {'type': 'string'},
5362 'cpu-cores': {'type': 'integer'},
5363 'cpu-power': {'type': 'integer'},
5364 'mem': {'type': 'integer'},
5365 'root-disk': {'type': 'integer'},
5366 'tags': {'items': {'type': 'string'},
5367 'type': 'array'}},
5368 'type': 'object'},
5369 'InstanceType': {'additionalProperties': False,
5370 'properties': {'arches': {'items': {'type': 'string'},
5371 'type': 'array'},
5372 'cost': {'type': 'integer'},
5373 'cpu-cores': {'type': 'integer'},
5374 'deprecated': {'type': 'boolean'},
5375 'memory': {'type': 'integer'},
5376 'name': {'type': 'string'},
5377 'root-disk': {'type': 'integer'},
5378 'virt-type': {'type': 'string'}},
5379 'required': ['arches', 'cpu-cores', 'memory'],
5380 'type': 'object'},
5381 'InstanceTypesResult': {'additionalProperties': False,
5382 'properties': {'cost-currency': {'type': 'string'},
5383 'cost-divisor': {'type': 'integer'},
5384 'cost-unit': {'type': 'string'},
5385 'error': {'$ref': '#/definitions/Error'},
5386 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
5387 'type': 'array'}},
5388 'type': 'object'},
5389 'InstanceTypesResults': {'additionalProperties': False,
5390 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
5391 'type': 'array'}},
5392 'required': ['results'],
5393 'type': 'object'},
5394 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5395 'ModelInstanceTypesConstraint': {'additionalProperties': False,
5396 'properties': {'value': {'$ref': '#/definitions/Value'}},
5397 'type': 'object'},
5398 'ModelInstanceTypesConstraints': {'additionalProperties': False,
5399 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
5400 'type': 'array'}},
5401 'required': ['constraints'],
5402 'type': 'object'},
5403 'Placement': {'additionalProperties': False,
5404 'properties': {'directive': {'type': 'string'},
5405 'scope': {'type': 'string'}},
5406 'required': ['scope', 'directive'],
5407 'type': 'object'},
5408 'Value': {'additionalProperties': False,
5409 'properties': {'arch': {'type': 'string'},
5410 'container': {'type': 'string'},
5411 'cores': {'type': 'integer'},
5412 'cpu-power': {'type': 'integer'},
5413 'instance-type': {'type': 'string'},
5414 'mem': {'type': 'integer'},
5415 'root-disk': {'type': 'integer'},
5416 'spaces': {'items': {'type': 'string'},
5417 'type': 'array'},
5418 'tags': {'items': {'type': 'string'},
5419 'type': 'array'},
5420 'virt-type': {'type': 'string'}},
5421 'type': 'object'}},
5422 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
5423 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
5424 'type': 'object'},
5425 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
5426 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
5427 'type': 'object'}},
5428 'type': 'object'}
5429
5430
5431 @ReturnMapping(AddMachinesResults)
5432 async def AddMachines(self, params):
5433 '''
5434 params : typing.Sequence[~AddMachineParams]
5435 Returns -> typing.Sequence[~AddMachinesResult]
5436 '''
5437 # map input types to rpc msg
5438 _params = dict()
5439 msg = dict(type='MachineManager',
5440 request='AddMachines',
5441 version=2,
5442 params=_params)
5443 _params['params'] = params
5444 reply = await self.rpc(msg)
5445 return reply
5446
5447
5448
5449 @ReturnMapping(InstanceTypesResults)
5450 async def InstanceTypes(self, constraints):
5451 '''
5452 constraints : typing.Sequence[~ModelInstanceTypesConstraint]
5453 Returns -> typing.Sequence[~InstanceTypesResult]
5454 '''
5455 # map input types to rpc msg
5456 _params = dict()
5457 msg = dict(type='MachineManager',
5458 request='InstanceTypes',
5459 version=2,
5460 params=_params)
5461 _params['constraints'] = constraints
5462 reply = await self.rpc(msg)
5463 return reply
5464
5465
5466
5467 class MetricsAdderFacade(Type):
5468 name = 'MetricsAdder'
5469 version = 2
5470 schema = {'definitions': {'Error': {'additionalProperties': False,
5471 'properties': {'code': {'type': 'string'},
5472 'info': {'$ref': '#/definitions/ErrorInfo'},
5473 'message': {'type': 'string'}},
5474 'required': ['message', 'code'],
5475 'type': 'object'},
5476 'ErrorInfo': {'additionalProperties': False,
5477 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5478 'macaroon-path': {'type': 'string'}},
5479 'type': 'object'},
5480 'ErrorResult': {'additionalProperties': False,
5481 'properties': {'error': {'$ref': '#/definitions/Error'}},
5482 'type': 'object'},
5483 'ErrorResults': {'additionalProperties': False,
5484 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5485 'type': 'array'}},
5486 'required': ['results'],
5487 'type': 'object'},
5488 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5489 'Metric': {'additionalProperties': False,
5490 'properties': {'key': {'type': 'string'},
5491 'labels': {'patternProperties': {'.*': {'type': 'string'}},
5492 'type': 'object'},
5493 'time': {'format': 'date-time',
5494 'type': 'string'},
5495 'value': {'type': 'string'}},
5496 'required': ['key', 'value', 'time'],
5497 'type': 'object'},
5498 'MetricBatch': {'additionalProperties': False,
5499 'properties': {'charm-url': {'type': 'string'},
5500 'created': {'format': 'date-time',
5501 'type': 'string'},
5502 'metrics': {'items': {'$ref': '#/definitions/Metric'},
5503 'type': 'array'},
5504 'uuid': {'type': 'string'}},
5505 'required': ['uuid',
5506 'charm-url',
5507 'created',
5508 'metrics'],
5509 'type': 'object'},
5510 'MetricBatchParam': {'additionalProperties': False,
5511 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
5512 'tag': {'type': 'string'}},
5513 'required': ['tag', 'batch'],
5514 'type': 'object'},
5515 'MetricBatchParams': {'additionalProperties': False,
5516 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
5517 'type': 'array'}},
5518 'required': ['batches'],
5519 'type': 'object'}},
5520 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
5521 'Result': {'$ref': '#/definitions/ErrorResults'}},
5522 'type': 'object'}},
5523 'type': 'object'}
5524
5525
5526 @ReturnMapping(ErrorResults)
5527 async def AddMetricBatches(self, batches):
5528 '''
5529 batches : typing.Sequence[~MetricBatchParam]
5530 Returns -> typing.Sequence[~ErrorResult]
5531 '''
5532 # map input types to rpc msg
5533 _params = dict()
5534 msg = dict(type='MetricsAdder',
5535 request='AddMetricBatches',
5536 version=2,
5537 params=_params)
5538 _params['batches'] = batches
5539 reply = await self.rpc(msg)
5540 return reply
5541
5542
5543
5544 class MetricsDebugFacade(Type):
5545 name = 'MetricsDebug'
5546 version = 2
5547 schema = {'definitions': {'Entities': {'additionalProperties': False,
5548 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5549 'type': 'array'}},
5550 'required': ['entities'],
5551 'type': 'object'},
5552 'Entity': {'additionalProperties': False,
5553 'properties': {'tag': {'type': 'string'}},
5554 'required': ['tag'],
5555 'type': 'object'},
5556 'EntityMetrics': {'additionalProperties': False,
5557 'properties': {'error': {'$ref': '#/definitions/Error'},
5558 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
5559 'type': 'array'}},
5560 'type': 'object'},
5561 'Error': {'additionalProperties': False,
5562 'properties': {'code': {'type': 'string'},
5563 'info': {'$ref': '#/definitions/ErrorInfo'},
5564 'message': {'type': 'string'}},
5565 'required': ['message', 'code'],
5566 'type': 'object'},
5567 'ErrorInfo': {'additionalProperties': False,
5568 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5569 'macaroon-path': {'type': 'string'}},
5570 'type': 'object'},
5571 'ErrorResult': {'additionalProperties': False,
5572 'properties': {'error': {'$ref': '#/definitions/Error'}},
5573 'type': 'object'},
5574 'ErrorResults': {'additionalProperties': False,
5575 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5576 'type': 'array'}},
5577 'required': ['results'],
5578 'type': 'object'},
5579 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5580 'MeterStatusParam': {'additionalProperties': False,
5581 'properties': {'code': {'type': 'string'},
5582 'info': {'type': 'string'},
5583 'tag': {'type': 'string'}},
5584 'required': ['tag', 'code'],
5585 'type': 'object'},
5586 'MeterStatusParams': {'additionalProperties': False,
5587 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
5588 'type': 'array'}},
5589 'required': ['statues'],
5590 'type': 'object'},
5591 'MetricResult': {'additionalProperties': False,
5592 'properties': {'key': {'type': 'string'},
5593 'labels': {'patternProperties': {'.*': {'type': 'string'}},
5594 'type': 'object'},
5595 'time': {'format': 'date-time',
5596 'type': 'string'},
5597 'unit': {'type': 'string'},
5598 'value': {'type': 'string'}},
5599 'required': ['time',
5600 'key',
5601 'value',
5602 'unit',
5603 'labels'],
5604 'type': 'object'},
5605 'MetricResults': {'additionalProperties': False,
5606 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
5607 'type': 'array'}},
5608 'required': ['results'],
5609 'type': 'object'}},
5610 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5611 'Result': {'$ref': '#/definitions/MetricResults'}},
5612 'type': 'object'},
5613 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
5614 'Result': {'$ref': '#/definitions/ErrorResults'}},
5615 'type': 'object'}},
5616 'type': 'object'}
5617
5618
5619 @ReturnMapping(MetricResults)
5620 async def GetMetrics(self, entities):
5621 '''
5622 entities : typing.Sequence[~Entity]
5623 Returns -> typing.Sequence[~EntityMetrics]
5624 '''
5625 # map input types to rpc msg
5626 _params = dict()
5627 msg = dict(type='MetricsDebug',
5628 request='GetMetrics',
5629 version=2,
5630 params=_params)
5631 _params['entities'] = entities
5632 reply = await self.rpc(msg)
5633 return reply
5634
5635
5636
5637 @ReturnMapping(ErrorResults)
5638 async def SetMeterStatus(self, statues):
5639 '''
5640 statues : typing.Sequence[~MeterStatusParam]
5641 Returns -> typing.Sequence[~ErrorResult]
5642 '''
5643 # map input types to rpc msg
5644 _params = dict()
5645 msg = dict(type='MetricsDebug',
5646 request='SetMeterStatus',
5647 version=2,
5648 params=_params)
5649 _params['statues'] = statues
5650 reply = await self.rpc(msg)
5651 return reply
5652
5653
5654
5655 class ModelConfigFacade(Type):
5656 name = 'ModelConfig'
5657 version = 2
5658 schema = {'definitions': {'ConfigValue': {'additionalProperties': False,
5659 'properties': {'source': {'type': 'string'},
5660 'value': {'additionalProperties': True,
5661 'type': 'object'}},
5662 'required': ['value', 'source'],
5663 'type': 'object'},
5664 'Error': {'additionalProperties': False,
5665 'properties': {'code': {'type': 'string'},
5666 'info': {'$ref': '#/definitions/ErrorInfo'},
5667 'message': {'type': 'string'}},
5668 'required': ['message', 'code'],
5669 'type': 'object'},
5670 'ErrorInfo': {'additionalProperties': False,
5671 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5672 'macaroon-path': {'type': 'string'}},
5673 'type': 'object'},
5674 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5675 'ModelConfigResults': {'additionalProperties': False,
5676 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
5677 'type': 'object'}},
5678 'required': ['config'],
5679 'type': 'object'},
5680 'ModelSLA': {'additionalProperties': False,
5681 'properties': {'ModelSLAInfo': {'$ref': '#/definitions/ModelSLAInfo'},
5682 'creds': {'items': {'type': 'integer'},
5683 'type': 'array'}},
5684 'required': ['ModelSLAInfo', 'creds'],
5685 'type': 'object'},
5686 'ModelSLAInfo': {'additionalProperties': False,
5687 'properties': {'level': {'type': 'string'},
5688 'owner': {'type': 'string'}},
5689 'required': ['level', 'owner'],
5690 'type': 'object'},
5691 'ModelSequencesResult': {'additionalProperties': False,
5692 'properties': {'sequences': {'patternProperties': {'.*': {'type': 'integer'}},
5693 'type': 'object'}},
5694 'required': ['sequences'],
5695 'type': 'object'},
5696 'ModelSet': {'additionalProperties': False,
5697 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
5698 'type': 'object'}},
5699 'type': 'object'}},
5700 'required': ['config'],
5701 'type': 'object'},
5702 'ModelUnset': {'additionalProperties': False,
5703 'properties': {'keys': {'items': {'type': 'string'},
5704 'type': 'array'}},
5705 'required': ['keys'],
5706 'type': 'object'},
5707 'StringResult': {'additionalProperties': False,
5708 'properties': {'error': {'$ref': '#/definitions/Error'},
5709 'result': {'type': 'string'}},
5710 'required': ['result'],
5711 'type': 'object'}},
5712 'properties': {'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
5713 'type': 'object'},
5714 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
5715 'type': 'object'},
5716 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
5717 'type': 'object'},
5718 'SLALevel': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
5719 'type': 'object'},
5720 'Sequences': {'properties': {'Result': {'$ref': '#/definitions/ModelSequencesResult'}},
5721 'type': 'object'},
5722 'SetSLALevel': {'properties': {'Params': {'$ref': '#/definitions/ModelSLA'}},
5723 'type': 'object'}},
5724 'type': 'object'}
5725
5726
5727 @ReturnMapping(ModelConfigResults)
5728 async def ModelGet(self):
5729 '''
5730
5731 Returns -> typing.Mapping[str, ~ConfigValue]
5732 '''
5733 # map input types to rpc msg
5734 _params = dict()
5735 msg = dict(type='ModelConfig',
5736 request='ModelGet',
5737 version=2,
5738 params=_params)
5739
5740 reply = await self.rpc(msg)
5741 return reply
5742
5743
5744
5745 @ReturnMapping(None)
5746 async def ModelSet(self, config):
5747 '''
5748 config : typing.Mapping[str, typing.Any]
5749 Returns -> None
5750 '''
5751 # map input types to rpc msg
5752 _params = dict()
5753 msg = dict(type='ModelConfig',
5754 request='ModelSet',
5755 version=2,
5756 params=_params)
5757 _params['config'] = config
5758 reply = await self.rpc(msg)
5759 return reply
5760
5761
5762
5763 @ReturnMapping(None)
5764 async def ModelUnset(self, keys):
5765 '''
5766 keys : typing.Sequence[str]
5767 Returns -> None
5768 '''
5769 # map input types to rpc msg
5770 _params = dict()
5771 msg = dict(type='ModelConfig',
5772 request='ModelUnset',
5773 version=2,
5774 params=_params)
5775 _params['keys'] = keys
5776 reply = await self.rpc(msg)
5777 return reply
5778
5779
5780
5781 @ReturnMapping(StringResult)
5782 async def SLALevel(self):
5783 '''
5784
5785 Returns -> typing.Union[_ForwardRef('Error'), str]
5786 '''
5787 # map input types to rpc msg
5788 _params = dict()
5789 msg = dict(type='ModelConfig',
5790 request='SLALevel',
5791 version=2,
5792 params=_params)
5793
5794 reply = await self.rpc(msg)
5795 return reply
5796
5797
5798
5799 @ReturnMapping(ModelSequencesResult)
5800 async def Sequences(self):
5801 '''
5802
5803 Returns -> typing.Mapping[str, int]
5804 '''
5805 # map input types to rpc msg
5806 _params = dict()
5807 msg = dict(type='ModelConfig',
5808 request='Sequences',
5809 version=2,
5810 params=_params)
5811
5812 reply = await self.rpc(msg)
5813 return reply
5814
5815
5816
5817 @ReturnMapping(None)
5818 async def SetSLALevel(self, creds, level):
5819 '''
5820 creds : typing.Sequence[int]
5821 level : str
5822 Returns -> None
5823 '''
5824 # map input types to rpc msg
5825 _params = dict()
5826 msg = dict(type='ModelConfig',
5827 request='SetSLALevel',
5828 version=2,
5829 params=_params)
5830 _params['creds'] = creds
5831 _params['level'] = level
5832 reply = await self.rpc(msg)
5833 return reply
5834
5835
5836
5837 class ModelManagerFacade(Type):
5838 name = 'ModelManager'
5839 version = 2
5840 schema = {'definitions': {'Entities': {'additionalProperties': False,
5841 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5842 'type': 'array'}},
5843 'required': ['entities'],
5844 'type': 'object'},
5845 'Entity': {'additionalProperties': False,
5846 'properties': {'tag': {'type': 'string'}},
5847 'required': ['tag'],
5848 'type': 'object'},
5849 'EntityStatus': {'additionalProperties': False,
5850 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
5851 'type': 'object'}},
5852 'type': 'object'},
5853 'info': {'type': 'string'},
5854 'since': {'format': 'date-time',
5855 'type': 'string'},
5856 'status': {'type': 'string'}},
5857 'required': ['status', 'info', 'since'],
5858 'type': 'object'},
5859 'Error': {'additionalProperties': False,
5860 'properties': {'code': {'type': 'string'},
5861 'info': {'$ref': '#/definitions/ErrorInfo'},
5862 'message': {'type': 'string'}},
5863 'required': ['message', 'code'],
5864 'type': 'object'},
5865 'ErrorInfo': {'additionalProperties': False,
5866 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5867 'macaroon-path': {'type': 'string'}},
5868 'type': 'object'},
5869 'ErrorResult': {'additionalProperties': False,
5870 'properties': {'error': {'$ref': '#/definitions/Error'}},
5871 'type': 'object'},
5872 'ErrorResults': {'additionalProperties': False,
5873 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
5874 'type': 'array'}},
5875 'required': ['results'],
5876 'type': 'object'},
5877 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5878 'MachineHardware': {'additionalProperties': False,
5879 'properties': {'arch': {'type': 'string'},
5880 'availability-zone': {'type': 'string'},
5881 'cores': {'type': 'integer'},
5882 'cpu-power': {'type': 'integer'},
5883 'mem': {'type': 'integer'},
5884 'root-disk': {'type': 'integer'},
5885 'tags': {'items': {'type': 'string'},
5886 'type': 'array'}},
5887 'type': 'object'},
5888 'MapResult': {'additionalProperties': False,
5889 'properties': {'error': {'$ref': '#/definitions/Error'},
5890 'result': {'patternProperties': {'.*': {'additionalProperties': True,
5891 'type': 'object'}},
5892 'type': 'object'}},
5893 'required': ['result'],
5894 'type': 'object'},
5895 'MapResults': {'additionalProperties': False,
5896 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
5897 'type': 'array'}},
5898 'required': ['results'],
5899 'type': 'object'},
5900 'Model': {'additionalProperties': False,
5901 'properties': {'name': {'type': 'string'},
5902 'owner-tag': {'type': 'string'},
5903 'uuid': {'type': 'string'}},
5904 'required': ['name', 'uuid', 'owner-tag'],
5905 'type': 'object'},
5906 'ModelCreateArgs': {'additionalProperties': False,
5907 'properties': {'cloud-tag': {'type': 'string'},
5908 'config': {'patternProperties': {'.*': {'additionalProperties': True,
5909 'type': 'object'}},
5910 'type': 'object'},
5911 'credential': {'type': 'string'},
5912 'name': {'type': 'string'},
5913 'owner-tag': {'type': 'string'},
5914 'region': {'type': 'string'}},
5915 'required': ['name', 'owner-tag'],
5916 'type': 'object'},
5917 'ModelDefaultValues': {'additionalProperties': False,
5918 'properties': {'cloud-region': {'type': 'string'},
5919 'cloud-tag': {'type': 'string'},
5920 'config': {'patternProperties': {'.*': {'additionalProperties': True,
5921 'type': 'object'}},
5922 'type': 'object'}},
5923 'required': ['config'],
5924 'type': 'object'},
5925 'ModelDefaults': {'additionalProperties': False,
5926 'properties': {'controller': {'additionalProperties': True,
5927 'type': 'object'},
5928 'default': {'additionalProperties': True,
5929 'type': 'object'},
5930 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
5931 'type': 'array'}},
5932 'type': 'object'},
5933 'ModelDefaultsResult': {'additionalProperties': False,
5934 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
5935 'type': 'object'}},
5936 'required': ['config'],
5937 'type': 'object'},
5938 'ModelInfo': {'additionalProperties': False,
5939 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
5940 'cloud-credential-tag': {'type': 'string'},
5941 'cloud-region': {'type': 'string'},
5942 'cloud-tag': {'type': 'string'},
5943 'controller-uuid': {'type': 'string'},
5944 'default-series': {'type': 'string'},
5945 'life': {'type': 'string'},
5946 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
5947 'type': 'array'},
5948 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
5949 'name': {'type': 'string'},
5950 'owner-tag': {'type': 'string'},
5951 'provider-type': {'type': 'string'},
5952 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
5953 'status': {'$ref': '#/definitions/EntityStatus'},
5954 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
5955 'type': 'array'},
5956 'uuid': {'type': 'string'}},
5957 'required': ['name',
5958 'uuid',
5959 'controller-uuid',
5960 'cloud-tag',
5961 'owner-tag',
5962 'life',
5963 'users',
5964 'machines',
5965 'sla',
5966 'agent-version'],
5967 'type': 'object'},
5968 'ModelInfoResult': {'additionalProperties': False,
5969 'properties': {'error': {'$ref': '#/definitions/Error'},
5970 'result': {'$ref': '#/definitions/ModelInfo'}},
5971 'type': 'object'},
5972 'ModelInfoResults': {'additionalProperties': False,
5973 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
5974 'type': 'array'}},
5975 'required': ['results'],
5976 'type': 'object'},
5977 'ModelMachineInfo': {'additionalProperties': False,
5978 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
5979 'has-vote': {'type': 'boolean'},
5980 'id': {'type': 'string'},
5981 'instance-id': {'type': 'string'},
5982 'status': {'type': 'string'},
5983 'wants-vote': {'type': 'boolean'}},
5984 'required': ['id'],
5985 'type': 'object'},
5986 'ModelMigrationStatus': {'additionalProperties': False,
5987 'properties': {'end': {'format': 'date-time',
5988 'type': 'string'},
5989 'start': {'format': 'date-time',
5990 'type': 'string'},
5991 'status': {'type': 'string'}},
5992 'required': ['status', 'start'],
5993 'type': 'object'},
5994 'ModelSLAInfo': {'additionalProperties': False,
5995 'properties': {'level': {'type': 'string'},
5996 'owner': {'type': 'string'}},
5997 'required': ['level', 'owner'],
5998 'type': 'object'},
5999 'ModelStatus': {'additionalProperties': False,
6000 'properties': {'application-count': {'type': 'integer'},
6001 'hosted-machine-count': {'type': 'integer'},
6002 'life': {'type': 'string'},
6003 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
6004 'type': 'array'},
6005 'model-tag': {'type': 'string'},
6006 'owner-tag': {'type': 'string'}},
6007 'required': ['model-tag',
6008 'life',
6009 'hosted-machine-count',
6010 'application-count',
6011 'owner-tag'],
6012 'type': 'object'},
6013 'ModelStatusResults': {'additionalProperties': False,
6014 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
6015 'type': 'array'}},
6016 'required': ['models'],
6017 'type': 'object'},
6018 'ModelUnsetKeys': {'additionalProperties': False,
6019 'properties': {'cloud-region': {'type': 'string'},
6020 'cloud-tag': {'type': 'string'},
6021 'keys': {'items': {'type': 'string'},
6022 'type': 'array'}},
6023 'required': ['keys'],
6024 'type': 'object'},
6025 'ModelUserInfo': {'additionalProperties': False,
6026 'properties': {'access': {'type': 'string'},
6027 'display-name': {'type': 'string'},
6028 'last-connection': {'format': 'date-time',
6029 'type': 'string'},
6030 'user': {'type': 'string'}},
6031 'required': ['user',
6032 'display-name',
6033 'last-connection',
6034 'access'],
6035 'type': 'object'},
6036 'ModifyModelAccess': {'additionalProperties': False,
6037 'properties': {'access': {'type': 'string'},
6038 'action': {'type': 'string'},
6039 'model-tag': {'type': 'string'},
6040 'user-tag': {'type': 'string'}},
6041 'required': ['user-tag',
6042 'action',
6043 'access',
6044 'model-tag'],
6045 'type': 'object'},
6046 'ModifyModelAccessRequest': {'additionalProperties': False,
6047 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
6048 'type': 'array'}},
6049 'required': ['changes'],
6050 'type': 'object'},
6051 'Number': {'additionalProperties': False,
6052 'properties': {'Build': {'type': 'integer'},
6053 'Major': {'type': 'integer'},
6054 'Minor': {'type': 'integer'},
6055 'Patch': {'type': 'integer'},
6056 'Tag': {'type': 'string'}},
6057 'required': ['Major',
6058 'Minor',
6059 'Tag',
6060 'Patch',
6061 'Build'],
6062 'type': 'object'},
6063 'RegionDefaults': {'additionalProperties': False,
6064 'properties': {'region-name': {'type': 'string'},
6065 'value': {'additionalProperties': True,
6066 'type': 'object'}},
6067 'required': ['region-name', 'value'],
6068 'type': 'object'},
6069 'SetModelDefaults': {'additionalProperties': False,
6070 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
6071 'type': 'array'}},
6072 'required': ['config'],
6073 'type': 'object'},
6074 'UnsetModelDefaults': {'additionalProperties': False,
6075 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
6076 'type': 'array'}},
6077 'required': ['keys'],
6078 'type': 'object'},
6079 'UserModel': {'additionalProperties': False,
6080 'properties': {'last-connection': {'format': 'date-time',
6081 'type': 'string'},
6082 'model': {'$ref': '#/definitions/Model'}},
6083 'required': ['model', 'last-connection'],
6084 'type': 'object'},
6085 'UserModelList': {'additionalProperties': False,
6086 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
6087 'type': 'array'}},
6088 'required': ['user-models'],
6089 'type': 'object'}},
6090 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
6091 'Result': {'$ref': '#/definitions/ModelInfo'}},
6092 'type': 'object'},
6093 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6094 'Result': {'$ref': '#/definitions/ErrorResults'}},
6095 'type': 'object'},
6096 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6097 'Result': {'$ref': '#/definitions/MapResults'}},
6098 'type': 'object'},
6099 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6100 'Result': {'$ref': '#/definitions/MapResults'}},
6101 'type': 'object'},
6102 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
6103 'Result': {'$ref': '#/definitions/UserModelList'}},
6104 'type': 'object'},
6105 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
6106 'type': 'object'},
6107 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6108 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
6109 'type': 'object'},
6110 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6111 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
6112 'type': 'object'},
6113 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
6114 'Result': {'$ref': '#/definitions/ErrorResults'}},
6115 'type': 'object'},
6116 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
6117 'Result': {'$ref': '#/definitions/ErrorResults'}},
6118 'type': 'object'},
6119 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
6120 'Result': {'$ref': '#/definitions/ErrorResults'}},
6121 'type': 'object'}},
6122 'type': 'object'}
6123
6124
6125 @ReturnMapping(ModelInfo)
6126 async def CreateModel(self, cloud_tag, config, credential, name, owner_tag, region):
6127 '''
6128 cloud_tag : str
6129 config : typing.Mapping[str, typing.Any]
6130 credential : str
6131 name : str
6132 owner_tag : str
6133 region : str
6134 Returns -> typing.Union[_ForwardRef('Number'), str, typing.Sequence[~ModelMachineInfo], _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
6135 '''
6136 # map input types to rpc msg
6137 _params = dict()
6138 msg = dict(type='ModelManager',
6139 request='CreateModel',
6140 version=2,
6141 params=_params)
6142 _params['cloud-tag'] = cloud_tag
6143 _params['config'] = config
6144 _params['credential'] = credential
6145 _params['name'] = name
6146 _params['owner-tag'] = owner_tag
6147 _params['region'] = region
6148 reply = await self.rpc(msg)
6149 return reply
6150
6151
6152
6153 @ReturnMapping(ErrorResults)
6154 async def DestroyModels(self, entities):
6155 '''
6156 entities : typing.Sequence[~Entity]
6157 Returns -> typing.Sequence[~ErrorResult]
6158 '''
6159 # map input types to rpc msg
6160 _params = dict()
6161 msg = dict(type='ModelManager',
6162 request='DestroyModels',
6163 version=2,
6164 params=_params)
6165 _params['entities'] = entities
6166 reply = await self.rpc(msg)
6167 return reply
6168
6169
6170
6171 @ReturnMapping(MapResults)
6172 async def DumpModels(self, entities):
6173 '''
6174 entities : typing.Sequence[~Entity]
6175 Returns -> typing.Sequence[~MapResult]
6176 '''
6177 # map input types to rpc msg
6178 _params = dict()
6179 msg = dict(type='ModelManager',
6180 request='DumpModels',
6181 version=2,
6182 params=_params)
6183 _params['entities'] = entities
6184 reply = await self.rpc(msg)
6185 return reply
6186
6187
6188
6189 @ReturnMapping(MapResults)
6190 async def DumpModelsDB(self, entities):
6191 '''
6192 entities : typing.Sequence[~Entity]
6193 Returns -> typing.Sequence[~MapResult]
6194 '''
6195 # map input types to rpc msg
6196 _params = dict()
6197 msg = dict(type='ModelManager',
6198 request='DumpModelsDB',
6199 version=2,
6200 params=_params)
6201 _params['entities'] = entities
6202 reply = await self.rpc(msg)
6203 return reply
6204
6205
6206
6207 @ReturnMapping(UserModelList)
6208 async def ListModels(self, tag):
6209 '''
6210 tag : str
6211 Returns -> typing.Sequence[~UserModel]
6212 '''
6213 # map input types to rpc msg
6214 _params = dict()
6215 msg = dict(type='ModelManager',
6216 request='ListModels',
6217 version=2,
6218 params=_params)
6219 _params['tag'] = tag
6220 reply = await self.rpc(msg)
6221 return reply
6222
6223
6224
6225 @ReturnMapping(ModelDefaultsResult)
6226 async def ModelDefaults(self):
6227 '''
6228
6229 Returns -> typing.Mapping[str, ~ModelDefaults]
6230 '''
6231 # map input types to rpc msg
6232 _params = dict()
6233 msg = dict(type='ModelManager',
6234 request='ModelDefaults',
6235 version=2,
6236 params=_params)
6237
6238 reply = await self.rpc(msg)
6239 return reply
6240
6241
6242
6243 @ReturnMapping(ModelInfoResults)
6244 async def ModelInfo(self, entities):
6245 '''
6246 entities : typing.Sequence[~Entity]
6247 Returns -> typing.Sequence[~ModelInfoResult]
6248 '''
6249 # map input types to rpc msg
6250 _params = dict()
6251 msg = dict(type='ModelManager',
6252 request='ModelInfo',
6253 version=2,
6254 params=_params)
6255 _params['entities'] = entities
6256 reply = await self.rpc(msg)
6257 return reply
6258
6259
6260
6261 @ReturnMapping(ModelStatusResults)
6262 async def ModelStatus(self, entities):
6263 '''
6264 entities : typing.Sequence[~Entity]
6265 Returns -> typing.Sequence[~ModelStatus]
6266 '''
6267 # map input types to rpc msg
6268 _params = dict()
6269 msg = dict(type='ModelManager',
6270 request='ModelStatus',
6271 version=2,
6272 params=_params)
6273 _params['entities'] = entities
6274 reply = await self.rpc(msg)
6275 return reply
6276
6277
6278
6279 @ReturnMapping(ErrorResults)
6280 async def ModifyModelAccess(self, changes):
6281 '''
6282 changes : typing.Sequence[~ModifyModelAccess]
6283 Returns -> typing.Sequence[~ErrorResult]
6284 '''
6285 # map input types to rpc msg
6286 _params = dict()
6287 msg = dict(type='ModelManager',
6288 request='ModifyModelAccess',
6289 version=2,
6290 params=_params)
6291 _params['changes'] = changes
6292 reply = await self.rpc(msg)
6293 return reply
6294
6295
6296
6297 @ReturnMapping(ErrorResults)
6298 async def SetModelDefaults(self, config):
6299 '''
6300 config : typing.Sequence[~ModelDefaultValues]
6301 Returns -> typing.Sequence[~ErrorResult]
6302 '''
6303 # map input types to rpc msg
6304 _params = dict()
6305 msg = dict(type='ModelManager',
6306 request='SetModelDefaults',
6307 version=2,
6308 params=_params)
6309 _params['config'] = config
6310 reply = await self.rpc(msg)
6311 return reply
6312
6313
6314
6315 @ReturnMapping(ErrorResults)
6316 async def UnsetModelDefaults(self, keys):
6317 '''
6318 keys : typing.Sequence[~ModelUnsetKeys]
6319 Returns -> typing.Sequence[~ErrorResult]
6320 '''
6321 # map input types to rpc msg
6322 _params = dict()
6323 msg = dict(type='ModelManager',
6324 request='UnsetModelDefaults',
6325 version=2,
6326 params=_params)
6327 _params['keys'] = keys
6328 reply = await self.rpc(msg)
6329 return reply
6330
6331
6332
6333 class ProxyUpdaterFacade(Type):
6334 name = 'ProxyUpdater'
6335 version = 2
6336 schema = {'definitions': {'Entities': {'additionalProperties': False,
6337 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6338 'type': 'array'}},
6339 'required': ['entities'],
6340 'type': 'object'},
6341 'Entity': {'additionalProperties': False,
6342 'properties': {'tag': {'type': 'string'}},
6343 'required': ['tag'],
6344 'type': 'object'},
6345 'Error': {'additionalProperties': False,
6346 'properties': {'code': {'type': 'string'},
6347 'info': {'$ref': '#/definitions/ErrorInfo'},
6348 'message': {'type': 'string'}},
6349 'required': ['message', 'code'],
6350 'type': 'object'},
6351 'ErrorInfo': {'additionalProperties': False,
6352 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6353 'macaroon-path': {'type': 'string'}},
6354 'type': 'object'},
6355 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6356 'NotifyWatchResult': {'additionalProperties': False,
6357 'properties': {'NotifyWatcherId': {'type': 'string'},
6358 'error': {'$ref': '#/definitions/Error'}},
6359 'required': ['NotifyWatcherId'],
6360 'type': 'object'},
6361 'NotifyWatchResults': {'additionalProperties': False,
6362 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6363 'type': 'array'}},
6364 'required': ['results'],
6365 'type': 'object'},
6366 'ProxyConfig': {'additionalProperties': False,
6367 'properties': {'ftp': {'type': 'string'},
6368 'http': {'type': 'string'},
6369 'https': {'type': 'string'},
6370 'no-proxy': {'type': 'string'}},
6371 'required': ['http',
6372 'https',
6373 'ftp',
6374 'no-proxy'],
6375 'type': 'object'},
6376 'ProxyConfigResult': {'additionalProperties': False,
6377 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
6378 'error': {'$ref': '#/definitions/Error'},
6379 'juju-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
6380 'legacy-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
6381 'snap-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
6382 'snap-store-assertions': {'type': 'string'},
6383 'snap-store-id': {'type': 'string'}},
6384 'required': ['legacy-proxy-settings',
6385 'juju-proxy-settings'],
6386 'type': 'object'},
6387 'ProxyConfigResults': {'additionalProperties': False,
6388 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
6389 'type': 'array'}},
6390 'required': ['results'],
6391 'type': 'object'}},
6392 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6393 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
6394 'type': 'object'},
6395 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6396 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6397 'type': 'object'}},
6398 'type': 'object'}
6399
6400
6401 @ReturnMapping(ProxyConfigResults)
6402 async def ProxyConfig(self, entities):
6403 '''
6404 entities : typing.Sequence[~Entity]
6405 Returns -> typing.Sequence[~ProxyConfigResult]
6406 '''
6407 # map input types to rpc msg
6408 _params = dict()
6409 msg = dict(type='ProxyUpdater',
6410 request='ProxyConfig',
6411 version=2,
6412 params=_params)
6413 _params['entities'] = entities
6414 reply = await self.rpc(msg)
6415 return reply
6416
6417
6418
6419 @ReturnMapping(NotifyWatchResults)
6420 async def WatchForProxyConfigAndAPIHostPortChanges(self, entities):
6421 '''
6422 entities : typing.Sequence[~Entity]
6423 Returns -> typing.Sequence[~NotifyWatchResult]
6424 '''
6425 # map input types to rpc msg
6426 _params = dict()
6427 msg = dict(type='ProxyUpdater',
6428 request='WatchForProxyConfigAndAPIHostPortChanges',
6429 version=2,
6430 params=_params)
6431 _params['entities'] = entities
6432 reply = await self.rpc(msg)
6433 return reply
6434
6435
6436
6437 class RebootFacade(Type):
6438 name = 'Reboot'
6439 version = 2
6440 schema = {'definitions': {'Entities': {'additionalProperties': False,
6441 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6442 'type': 'array'}},
6443 'required': ['entities'],
6444 'type': 'object'},
6445 'Entity': {'additionalProperties': False,
6446 'properties': {'tag': {'type': 'string'}},
6447 'required': ['tag'],
6448 'type': 'object'},
6449 'Error': {'additionalProperties': False,
6450 'properties': {'code': {'type': 'string'},
6451 'info': {'$ref': '#/definitions/ErrorInfo'},
6452 'message': {'type': 'string'}},
6453 'required': ['message', 'code'],
6454 'type': 'object'},
6455 'ErrorInfo': {'additionalProperties': False,
6456 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6457 'macaroon-path': {'type': 'string'}},
6458 'type': 'object'},
6459 'ErrorResult': {'additionalProperties': False,
6460 'properties': {'error': {'$ref': '#/definitions/Error'}},
6461 'type': 'object'},
6462 'ErrorResults': {'additionalProperties': False,
6463 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6464 'type': 'array'}},
6465 'required': ['results'],
6466 'type': 'object'},
6467 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6468 'NotifyWatchResult': {'additionalProperties': False,
6469 'properties': {'NotifyWatcherId': {'type': 'string'},
6470 'error': {'$ref': '#/definitions/Error'}},
6471 'required': ['NotifyWatcherId'],
6472 'type': 'object'},
6473 'RebootActionResult': {'additionalProperties': False,
6474 'properties': {'error': {'$ref': '#/definitions/Error'},
6475 'result': {'type': 'string'}},
6476 'type': 'object'},
6477 'RebootActionResults': {'additionalProperties': False,
6478 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
6479 'type': 'array'}},
6480 'type': 'object'}},
6481 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6482 'Result': {'$ref': '#/definitions/ErrorResults'}},
6483 'type': 'object'},
6484 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6485 'Result': {'$ref': '#/definitions/RebootActionResults'}},
6486 'type': 'object'},
6487 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6488 'Result': {'$ref': '#/definitions/ErrorResults'}},
6489 'type': 'object'},
6490 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6491 'type': 'object'}},
6492 'type': 'object'}
6493
6494
6495 @ReturnMapping(ErrorResults)
6496 async def ClearReboot(self, entities):
6497 '''
6498 entities : typing.Sequence[~Entity]
6499 Returns -> typing.Sequence[~ErrorResult]
6500 '''
6501 # map input types to rpc msg
6502 _params = dict()
6503 msg = dict(type='Reboot',
6504 request='ClearReboot',
6505 version=2,
6506 params=_params)
6507 _params['entities'] = entities
6508 reply = await self.rpc(msg)
6509 return reply
6510
6511
6512
6513 @ReturnMapping(RebootActionResults)
6514 async def GetRebootAction(self, entities):
6515 '''
6516 entities : typing.Sequence[~Entity]
6517 Returns -> typing.Sequence[~RebootActionResult]
6518 '''
6519 # map input types to rpc msg
6520 _params = dict()
6521 msg = dict(type='Reboot',
6522 request='GetRebootAction',
6523 version=2,
6524 params=_params)
6525 _params['entities'] = entities
6526 reply = await self.rpc(msg)
6527 return reply
6528
6529
6530
6531 @ReturnMapping(ErrorResults)
6532 async def RequestReboot(self, entities):
6533 '''
6534 entities : typing.Sequence[~Entity]
6535 Returns -> typing.Sequence[~ErrorResult]
6536 '''
6537 # map input types to rpc msg
6538 _params = dict()
6539 msg = dict(type='Reboot',
6540 request='RequestReboot',
6541 version=2,
6542 params=_params)
6543 _params['entities'] = entities
6544 reply = await self.rpc(msg)
6545 return reply
6546
6547
6548
6549 @ReturnMapping(NotifyWatchResult)
6550 async def WatchForRebootEvent(self):
6551 '''
6552
6553 Returns -> typing.Union[str, _ForwardRef('Error')]
6554 '''
6555 # map input types to rpc msg
6556 _params = dict()
6557 msg = dict(type='Reboot',
6558 request='WatchForRebootEvent',
6559 version=2,
6560 params=_params)
6561
6562 reply = await self.rpc(msg)
6563 return reply
6564
6565
6566
6567 class ResumerFacade(Type):
6568 name = 'Resumer'
6569 version = 2
6570 schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
6571
6572
6573 @ReturnMapping(None)
6574 async def ResumeTransactions(self):
6575 '''
6576
6577 Returns -> None
6578 '''
6579 # map input types to rpc msg
6580 _params = dict()
6581 msg = dict(type='Resumer',
6582 request='ResumeTransactions',
6583 version=2,
6584 params=_params)
6585
6586 reply = await self.rpc(msg)
6587 return reply
6588
6589
6590
6591 class SSHClientFacade(Type):
6592 name = 'SSHClient'
6593 version = 2
6594 schema = {'definitions': {'Entities': {'additionalProperties': False,
6595 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6596 'type': 'array'}},
6597 'required': ['entities'],
6598 'type': 'object'},
6599 'Entity': {'additionalProperties': False,
6600 'properties': {'tag': {'type': 'string'}},
6601 'required': ['tag'],
6602 'type': 'object'},
6603 'Error': {'additionalProperties': False,
6604 'properties': {'code': {'type': 'string'},
6605 'info': {'$ref': '#/definitions/ErrorInfo'},
6606 'message': {'type': 'string'}},
6607 'required': ['message', 'code'],
6608 'type': 'object'},
6609 'ErrorInfo': {'additionalProperties': False,
6610 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6611 'macaroon-path': {'type': 'string'}},
6612 'type': 'object'},
6613 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6614 'SSHAddressResult': {'additionalProperties': False,
6615 'properties': {'address': {'type': 'string'},
6616 'error': {'$ref': '#/definitions/Error'}},
6617 'type': 'object'},
6618 'SSHAddressResults': {'additionalProperties': False,
6619 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
6620 'type': 'array'}},
6621 'required': ['results'],
6622 'type': 'object'},
6623 'SSHAddressesResult': {'additionalProperties': False,
6624 'properties': {'addresses': {'items': {'type': 'string'},
6625 'type': 'array'},
6626 'error': {'$ref': '#/definitions/Error'}},
6627 'required': ['addresses'],
6628 'type': 'object'},
6629 'SSHAddressesResults': {'additionalProperties': False,
6630 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressesResult'},
6631 'type': 'array'}},
6632 'required': ['results'],
6633 'type': 'object'},
6634 'SSHProxyResult': {'additionalProperties': False,
6635 'properties': {'use-proxy': {'type': 'boolean'}},
6636 'required': ['use-proxy'],
6637 'type': 'object'},
6638 'SSHPublicKeysResult': {'additionalProperties': False,
6639 'properties': {'error': {'$ref': '#/definitions/Error'},
6640 'public-keys': {'items': {'type': 'string'},
6641 'type': 'array'}},
6642 'type': 'object'},
6643 'SSHPublicKeysResults': {'additionalProperties': False,
6644 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
6645 'type': 'array'}},
6646 'required': ['results'],
6647 'type': 'object'}},
6648 'properties': {'AllAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6649 'Result': {'$ref': '#/definitions/SSHAddressesResults'}},
6650 'type': 'object'},
6651 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6652 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
6653 'type': 'object'},
6654 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
6655 'type': 'object'},
6656 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6657 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
6658 'type': 'object'},
6659 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6660 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
6661 'type': 'object'}},
6662 'type': 'object'}
6663
6664
6665 @ReturnMapping(SSHAddressesResults)
6666 async def AllAddresses(self, entities):
6667 '''
6668 entities : typing.Sequence[~Entity]
6669 Returns -> typing.Sequence[~SSHAddressesResult]
6670 '''
6671 # map input types to rpc msg
6672 _params = dict()
6673 msg = dict(type='SSHClient',
6674 request='AllAddresses',
6675 version=2,
6676 params=_params)
6677 _params['entities'] = entities
6678 reply = await self.rpc(msg)
6679 return reply
6680
6681
6682
6683 @ReturnMapping(SSHAddressResults)
6684 async def PrivateAddress(self, entities):
6685 '''
6686 entities : typing.Sequence[~Entity]
6687 Returns -> typing.Sequence[~SSHAddressResult]
6688 '''
6689 # map input types to rpc msg
6690 _params = dict()
6691 msg = dict(type='SSHClient',
6692 request='PrivateAddress',
6693 version=2,
6694 params=_params)
6695 _params['entities'] = entities
6696 reply = await self.rpc(msg)
6697 return reply
6698
6699
6700
6701 @ReturnMapping(SSHProxyResult)
6702 async def Proxy(self):
6703 '''
6704
6705 Returns -> bool
6706 '''
6707 # map input types to rpc msg
6708 _params = dict()
6709 msg = dict(type='SSHClient',
6710 request='Proxy',
6711 version=2,
6712 params=_params)
6713
6714 reply = await self.rpc(msg)
6715 return reply
6716
6717
6718
6719 @ReturnMapping(SSHAddressResults)
6720 async def PublicAddress(self, entities):
6721 '''
6722 entities : typing.Sequence[~Entity]
6723 Returns -> typing.Sequence[~SSHAddressResult]
6724 '''
6725 # map input types to rpc msg
6726 _params = dict()
6727 msg = dict(type='SSHClient',
6728 request='PublicAddress',
6729 version=2,
6730 params=_params)
6731 _params['entities'] = entities
6732 reply = await self.rpc(msg)
6733 return reply
6734
6735
6736
6737 @ReturnMapping(SSHPublicKeysResults)
6738 async def PublicKeys(self, entities):
6739 '''
6740 entities : typing.Sequence[~Entity]
6741 Returns -> typing.Sequence[~SSHPublicKeysResult]
6742 '''
6743 # map input types to rpc msg
6744 _params = dict()
6745 msg = dict(type='SSHClient',
6746 request='PublicKeys',
6747 version=2,
6748 params=_params)
6749 _params['entities'] = entities
6750 reply = await self.rpc(msg)
6751 return reply
6752
6753
6754
6755 class SingularFacade(Type):
6756 name = 'Singular'
6757 version = 2
6758 schema = {'definitions': {'Entities': {'additionalProperties': False,
6759 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6760 'type': 'array'}},
6761 'required': ['entities'],
6762 'type': 'object'},
6763 'Entity': {'additionalProperties': False,
6764 'properties': {'tag': {'type': 'string'}},
6765 'required': ['tag'],
6766 'type': 'object'},
6767 'Error': {'additionalProperties': False,
6768 'properties': {'code': {'type': 'string'},
6769 'info': {'$ref': '#/definitions/ErrorInfo'},
6770 'message': {'type': 'string'}},
6771 'required': ['message', 'code'],
6772 'type': 'object'},
6773 'ErrorInfo': {'additionalProperties': False,
6774 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6775 'macaroon-path': {'type': 'string'}},
6776 'type': 'object'},
6777 'ErrorResult': {'additionalProperties': False,
6778 'properties': {'error': {'$ref': '#/definitions/Error'}},
6779 'type': 'object'},
6780 'ErrorResults': {'additionalProperties': False,
6781 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6782 'type': 'array'}},
6783 'required': ['results'],
6784 'type': 'object'},
6785 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6786 'SingularClaim': {'additionalProperties': False,
6787 'properties': {'claimant-tag': {'type': 'string'},
6788 'duration': {'type': 'integer'},
6789 'entity-tag': {'type': 'string'}},
6790 'required': ['entity-tag',
6791 'claimant-tag',
6792 'duration'],
6793 'type': 'object'},
6794 'SingularClaims': {'additionalProperties': False,
6795 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
6796 'type': 'array'}},
6797 'required': ['claims'],
6798 'type': 'object'}},
6799 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
6800 'Result': {'$ref': '#/definitions/ErrorResults'}},
6801 'type': 'object'},
6802 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6803 'Result': {'$ref': '#/definitions/ErrorResults'}},
6804 'type': 'object'}},
6805 'type': 'object'}
6806
6807
6808 @ReturnMapping(ErrorResults)
6809 async def Claim(self, claims):
6810 '''
6811 claims : typing.Sequence[~SingularClaim]
6812 Returns -> typing.Sequence[~ErrorResult]
6813 '''
6814 # map input types to rpc msg
6815 _params = dict()
6816 msg = dict(type='Singular',
6817 request='Claim',
6818 version=2,
6819 params=_params)
6820 _params['claims'] = claims
6821 reply = await self.rpc(msg)
6822 return reply
6823
6824
6825
6826 @ReturnMapping(ErrorResults)
6827 async def Wait(self, entities):
6828 '''
6829 entities : typing.Sequence[~Entity]
6830 Returns -> typing.Sequence[~ErrorResult]
6831 '''
6832 # map input types to rpc msg
6833 _params = dict()
6834 msg = dict(type='Singular',
6835 request='Wait',
6836 version=2,
6837 params=_params)
6838 _params['entities'] = entities
6839 reply = await self.rpc(msg)
6840 return reply
6841
6842
6843
6844 class SpacesFacade(Type):
6845 name = 'Spaces'
6846 version = 2
6847 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
6848 'properties': {'provider-id': {'type': 'string'},
6849 'public': {'type': 'boolean'},
6850 'space-tag': {'type': 'string'},
6851 'subnet-tags': {'items': {'type': 'string'},
6852 'type': 'array'}},
6853 'required': ['subnet-tags',
6854 'space-tag',
6855 'public'],
6856 'type': 'object'},
6857 'CreateSpacesParams': {'additionalProperties': False,
6858 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
6859 'type': 'array'}},
6860 'required': ['spaces'],
6861 'type': 'object'},
6862 'Error': {'additionalProperties': False,
6863 'properties': {'code': {'type': 'string'},
6864 'info': {'$ref': '#/definitions/ErrorInfo'},
6865 'message': {'type': 'string'}},
6866 'required': ['message', 'code'],
6867 'type': 'object'},
6868 'ErrorInfo': {'additionalProperties': False,
6869 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6870 'macaroon-path': {'type': 'string'}},
6871 'type': 'object'},
6872 'ErrorResult': {'additionalProperties': False,
6873 'properties': {'error': {'$ref': '#/definitions/Error'}},
6874 'type': 'object'},
6875 'ErrorResults': {'additionalProperties': False,
6876 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6877 'type': 'array'}},
6878 'required': ['results'],
6879 'type': 'object'},
6880 'ListSpacesResults': {'additionalProperties': False,
6881 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
6882 'type': 'array'}},
6883 'required': ['results'],
6884 'type': 'object'},
6885 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6886 'Space': {'additionalProperties': False,
6887 'properties': {'error': {'$ref': '#/definitions/Error'},
6888 'name': {'type': 'string'},
6889 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
6890 'type': 'array'}},
6891 'required': ['name', 'subnets'],
6892 'type': 'object'},
6893 'Subnet': {'additionalProperties': False,
6894 'properties': {'cidr': {'type': 'string'},
6895 'life': {'type': 'string'},
6896 'provider-id': {'type': 'string'},
6897 'provider-network-id': {'type': 'string'},
6898 'provider-space-id': {'type': 'string'},
6899 'space-tag': {'type': 'string'},
6900 'status': {'type': 'string'},
6901 'vlan-tag': {'type': 'integer'},
6902 'zones': {'items': {'type': 'string'},
6903 'type': 'array'}},
6904 'required': ['cidr',
6905 'vlan-tag',
6906 'life',
6907 'space-tag',
6908 'zones'],
6909 'type': 'object'}},
6910 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
6911 'Result': {'$ref': '#/definitions/ErrorResults'}},
6912 'type': 'object'},
6913 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
6914 'type': 'object'}},
6915 'type': 'object'}
6916
6917
6918 @ReturnMapping(ErrorResults)
6919 async def CreateSpaces(self, spaces):
6920 '''
6921 spaces : typing.Sequence[~CreateSpaceParams]
6922 Returns -> typing.Sequence[~ErrorResult]
6923 '''
6924 # map input types to rpc msg
6925 _params = dict()
6926 msg = dict(type='Spaces',
6927 request='CreateSpaces',
6928 version=2,
6929 params=_params)
6930 _params['spaces'] = spaces
6931 reply = await self.rpc(msg)
6932 return reply
6933
6934
6935
6936 @ReturnMapping(ListSpacesResults)
6937 async def ListSpaces(self):
6938 '''
6939
6940 Returns -> typing.Sequence[~Space]
6941 '''
6942 # map input types to rpc msg
6943 _params = dict()
6944 msg = dict(type='Spaces',
6945 request='ListSpaces',
6946 version=2,
6947 params=_params)
6948
6949 reply = await self.rpc(msg)
6950 return reply
6951
6952
6953
6954 class StatusHistoryFacade(Type):
6955 name = 'StatusHistory'
6956 version = 2
6957 schema = {'definitions': {'Error': {'additionalProperties': False,
6958 'properties': {'code': {'type': 'string'},
6959 'info': {'$ref': '#/definitions/ErrorInfo'},
6960 'message': {'type': 'string'}},
6961 'required': ['message', 'code'],
6962 'type': 'object'},
6963 'ErrorInfo': {'additionalProperties': False,
6964 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6965 'macaroon-path': {'type': 'string'}},
6966 'type': 'object'},
6967 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6968 'ModelConfigResult': {'additionalProperties': False,
6969 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6970 'type': 'object'}},
6971 'type': 'object'}},
6972 'required': ['config'],
6973 'type': 'object'},
6974 'NotifyWatchResult': {'additionalProperties': False,
6975 'properties': {'NotifyWatcherId': {'type': 'string'},
6976 'error': {'$ref': '#/definitions/Error'}},
6977 'required': ['NotifyWatcherId'],
6978 'type': 'object'},
6979 'StatusHistoryPruneArgs': {'additionalProperties': False,
6980 'properties': {'max-history-mb': {'type': 'integer'},
6981 'max-history-time': {'type': 'integer'}},
6982 'required': ['max-history-time',
6983 'max-history-mb'],
6984 'type': 'object'}},
6985 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6986 'type': 'object'},
6987 'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
6988 'type': 'object'},
6989 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6990 'type': 'object'}},
6991 'type': 'object'}
6992
6993
6994 @ReturnMapping(ModelConfigResult)
6995 async def ModelConfig(self):
6996 '''
6997
6998 Returns -> typing.Mapping[str, typing.Any]
6999 '''
7000 # map input types to rpc msg
7001 _params = dict()
7002 msg = dict(type='StatusHistory',
7003 request='ModelConfig',
7004 version=2,
7005 params=_params)
7006
7007 reply = await self.rpc(msg)
7008 return reply
7009
7010
7011
7012 @ReturnMapping(None)
7013 async def Prune(self, max_history_mb, max_history_time):
7014 '''
7015 max_history_mb : int
7016 max_history_time : int
7017 Returns -> None
7018 '''
7019 # map input types to rpc msg
7020 _params = dict()
7021 msg = dict(type='StatusHistory',
7022 request='Prune',
7023 version=2,
7024 params=_params)
7025 _params['max-history-mb'] = max_history_mb
7026 _params['max-history-time'] = max_history_time
7027 reply = await self.rpc(msg)
7028 return reply
7029
7030
7031
7032 @ReturnMapping(NotifyWatchResult)
7033 async def WatchForModelConfigChanges(self):
7034 '''
7035
7036 Returns -> typing.Union[str, _ForwardRef('Error')]
7037 '''
7038 # map input types to rpc msg
7039 _params = dict()
7040 msg = dict(type='StatusHistory',
7041 request='WatchForModelConfigChanges',
7042 version=2,
7043 params=_params)
7044
7045 reply = await self.rpc(msg)
7046 return reply
7047
7048
7049
7050 class SubnetsFacade(Type):
7051 name = 'Subnets'
7052 version = 2
7053 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
7054 'properties': {'provider-network-id': {'type': 'string'},
7055 'space-tag': {'type': 'string'},
7056 'subnet-provider-id': {'type': 'string'},
7057 'subnet-tag': {'type': 'string'},
7058 'vlan-tag': {'type': 'integer'},
7059 'zones': {'items': {'type': 'string'},
7060 'type': 'array'}},
7061 'required': ['space-tag'],
7062 'type': 'object'},
7063 'AddSubnetsParams': {'additionalProperties': False,
7064 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
7065 'type': 'array'}},
7066 'required': ['subnets'],
7067 'type': 'object'},
7068 'Error': {'additionalProperties': False,
7069 'properties': {'code': {'type': 'string'},
7070 'info': {'$ref': '#/definitions/ErrorInfo'},
7071 'message': {'type': 'string'}},
7072 'required': ['message', 'code'],
7073 'type': 'object'},
7074 'ErrorInfo': {'additionalProperties': False,
7075 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7076 'macaroon-path': {'type': 'string'}},
7077 'type': 'object'},
7078 'ErrorResult': {'additionalProperties': False,
7079 'properties': {'error': {'$ref': '#/definitions/Error'}},
7080 'type': 'object'},
7081 'ErrorResults': {'additionalProperties': False,
7082 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7083 'type': 'array'}},
7084 'required': ['results'],
7085 'type': 'object'},
7086 'ListSubnetsResults': {'additionalProperties': False,
7087 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
7088 'type': 'array'}},
7089 'required': ['results'],
7090 'type': 'object'},
7091 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7092 'SpaceResult': {'additionalProperties': False,
7093 'properties': {'error': {'$ref': '#/definitions/Error'},
7094 'tag': {'type': 'string'}},
7095 'required': ['tag'],
7096 'type': 'object'},
7097 'SpaceResults': {'additionalProperties': False,
7098 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'},
7099 'type': 'array'}},
7100 'required': ['results'],
7101 'type': 'object'},
7102 'Subnet': {'additionalProperties': False,
7103 'properties': {'cidr': {'type': 'string'},
7104 'life': {'type': 'string'},
7105 'provider-id': {'type': 'string'},
7106 'provider-network-id': {'type': 'string'},
7107 'provider-space-id': {'type': 'string'},
7108 'space-tag': {'type': 'string'},
7109 'status': {'type': 'string'},
7110 'vlan-tag': {'type': 'integer'},
7111 'zones': {'items': {'type': 'string'},
7112 'type': 'array'}},
7113 'required': ['cidr',
7114 'vlan-tag',
7115 'life',
7116 'space-tag',
7117 'zones'],
7118 'type': 'object'},
7119 'SubnetsFilters': {'additionalProperties': False,
7120 'properties': {'space-tag': {'type': 'string'},
7121 'zone': {'type': 'string'}},
7122 'type': 'object'},
7123 'ZoneResult': {'additionalProperties': False,
7124 'properties': {'available': {'type': 'boolean'},
7125 'error': {'$ref': '#/definitions/Error'},
7126 'name': {'type': 'string'}},
7127 'required': ['name', 'available'],
7128 'type': 'object'},
7129 'ZoneResults': {'additionalProperties': False,
7130 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'},
7131 'type': 'array'}},
7132 'required': ['results'],
7133 'type': 'object'}},
7134 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
7135 'Result': {'$ref': '#/definitions/ErrorResults'}},
7136 'type': 'object'},
7137 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
7138 'type': 'object'},
7139 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
7140 'type': 'object'},
7141 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
7142 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
7143 'type': 'object'}},
7144 'type': 'object'}
7145
7146
7147 @ReturnMapping(ErrorResults)
7148 async def AddSubnets(self, subnets):
7149 '''
7150 subnets : typing.Sequence[~AddSubnetParams]
7151 Returns -> typing.Sequence[~ErrorResult]
7152 '''
7153 # map input types to rpc msg
7154 _params = dict()
7155 msg = dict(type='Subnets',
7156 request='AddSubnets',
7157 version=2,
7158 params=_params)
7159 _params['subnets'] = subnets
7160 reply = await self.rpc(msg)
7161 return reply
7162
7163
7164
7165 @ReturnMapping(SpaceResults)
7166 async def AllSpaces(self):
7167 '''
7168
7169 Returns -> typing.Sequence[~SpaceResult]
7170 '''
7171 # map input types to rpc msg
7172 _params = dict()
7173 msg = dict(type='Subnets',
7174 request='AllSpaces',
7175 version=2,
7176 params=_params)
7177
7178 reply = await self.rpc(msg)
7179 return reply
7180
7181
7182
7183 @ReturnMapping(ZoneResults)
7184 async def AllZones(self):
7185 '''
7186
7187 Returns -> typing.Sequence[~ZoneResult]
7188 '''
7189 # map input types to rpc msg
7190 _params = dict()
7191 msg = dict(type='Subnets',
7192 request='AllZones',
7193 version=2,
7194 params=_params)
7195
7196 reply = await self.rpc(msg)
7197 return reply
7198
7199
7200
7201 @ReturnMapping(ListSubnetsResults)
7202 async def ListSubnets(self, space_tag, zone):
7203 '''
7204 space_tag : str
7205 zone : str
7206 Returns -> typing.Sequence[~Subnet]
7207 '''
7208 # map input types to rpc msg
7209 _params = dict()
7210 msg = dict(type='Subnets',
7211 request='ListSubnets',
7212 version=2,
7213 params=_params)
7214 _params['space-tag'] = space_tag
7215 _params['zone'] = zone
7216 reply = await self.rpc(msg)
7217 return reply
7218
7219
7220
7221 class UserManagerFacade(Type):
7222 name = 'UserManager'
7223 version = 2
7224 schema = {'definitions': {'AddUser': {'additionalProperties': False,
7225 'properties': {'display-name': {'type': 'string'},
7226 'password': {'type': 'string'},
7227 'username': {'type': 'string'}},
7228 'required': ['username', 'display-name'],
7229 'type': 'object'},
7230 'AddUserResult': {'additionalProperties': False,
7231 'properties': {'error': {'$ref': '#/definitions/Error'},
7232 'secret-key': {'items': {'type': 'integer'},
7233 'type': 'array'},
7234 'tag': {'type': 'string'}},
7235 'type': 'object'},
7236 'AddUserResults': {'additionalProperties': False,
7237 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
7238 'type': 'array'}},
7239 'required': ['results'],
7240 'type': 'object'},
7241 'AddUsers': {'additionalProperties': False,
7242 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
7243 'type': 'array'}},
7244 'required': ['users'],
7245 'type': 'object'},
7246 'Entities': {'additionalProperties': False,
7247 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7248 'type': 'array'}},
7249 'required': ['entities'],
7250 'type': 'object'},
7251 'Entity': {'additionalProperties': False,
7252 'properties': {'tag': {'type': 'string'}},
7253 'required': ['tag'],
7254 'type': 'object'},
7255 'EntityPassword': {'additionalProperties': False,
7256 'properties': {'password': {'type': 'string'},
7257 'tag': {'type': 'string'}},
7258 'required': ['tag', 'password'],
7259 'type': 'object'},
7260 'EntityPasswords': {'additionalProperties': False,
7261 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
7262 'type': 'array'}},
7263 'required': ['changes'],
7264 'type': 'object'},
7265 'Error': {'additionalProperties': False,
7266 'properties': {'code': {'type': 'string'},
7267 'info': {'$ref': '#/definitions/ErrorInfo'},
7268 'message': {'type': 'string'}},
7269 'required': ['message', 'code'],
7270 'type': 'object'},
7271 'ErrorInfo': {'additionalProperties': False,
7272 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7273 'macaroon-path': {'type': 'string'}},
7274 'type': 'object'},
7275 'ErrorResult': {'additionalProperties': False,
7276 'properties': {'error': {'$ref': '#/definitions/Error'}},
7277 'type': 'object'},
7278 'ErrorResults': {'additionalProperties': False,
7279 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7280 'type': 'array'}},
7281 'required': ['results'],
7282 'type': 'object'},
7283 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7284 'UserInfo': {'additionalProperties': False,
7285 'properties': {'access': {'type': 'string'},
7286 'created-by': {'type': 'string'},
7287 'date-created': {'format': 'date-time',
7288 'type': 'string'},
7289 'disabled': {'type': 'boolean'},
7290 'display-name': {'type': 'string'},
7291 'last-connection': {'format': 'date-time',
7292 'type': 'string'},
7293 'username': {'type': 'string'}},
7294 'required': ['username',
7295 'display-name',
7296 'access',
7297 'created-by',
7298 'date-created',
7299 'disabled'],
7300 'type': 'object'},
7301 'UserInfoRequest': {'additionalProperties': False,
7302 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7303 'type': 'array'},
7304 'include-disabled': {'type': 'boolean'}},
7305 'required': ['entities',
7306 'include-disabled'],
7307 'type': 'object'},
7308 'UserInfoResult': {'additionalProperties': False,
7309 'properties': {'error': {'$ref': '#/definitions/Error'},
7310 'result': {'$ref': '#/definitions/UserInfo'}},
7311 'type': 'object'},
7312 'UserInfoResults': {'additionalProperties': False,
7313 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
7314 'type': 'array'}},
7315 'required': ['results'],
7316 'type': 'object'}},
7317 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
7318 'Result': {'$ref': '#/definitions/AddUserResults'}},
7319 'type': 'object'},
7320 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7321 'Result': {'$ref': '#/definitions/ErrorResults'}},
7322 'type': 'object'},
7323 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7324 'Result': {'$ref': '#/definitions/ErrorResults'}},
7325 'type': 'object'},
7326 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7327 'Result': {'$ref': '#/definitions/ErrorResults'}},
7328 'type': 'object'},
7329 'ResetPassword': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7330 'Result': {'$ref': '#/definitions/AddUserResults'}},
7331 'type': 'object'},
7332 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
7333 'Result': {'$ref': '#/definitions/ErrorResults'}},
7334 'type': 'object'},
7335 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
7336 'Result': {'$ref': '#/definitions/UserInfoResults'}},
7337 'type': 'object'}},
7338 'type': 'object'}
7339
7340
7341 @ReturnMapping(AddUserResults)
7342 async def AddUser(self, users):
7343 '''
7344 users : typing.Sequence[~AddUser]
7345 Returns -> typing.Sequence[~AddUserResult]
7346 '''
7347 # map input types to rpc msg
7348 _params = dict()
7349 msg = dict(type='UserManager',
7350 request='AddUser',
7351 version=2,
7352 params=_params)
7353 _params['users'] = users
7354 reply = await self.rpc(msg)
7355 return reply
7356
7357
7358
7359 @ReturnMapping(ErrorResults)
7360 async def DisableUser(self, entities):
7361 '''
7362 entities : typing.Sequence[~Entity]
7363 Returns -> typing.Sequence[~ErrorResult]
7364 '''
7365 # map input types to rpc msg
7366 _params = dict()
7367 msg = dict(type='UserManager',
7368 request='DisableUser',
7369 version=2,
7370 params=_params)
7371 _params['entities'] = entities
7372 reply = await self.rpc(msg)
7373 return reply
7374
7375
7376
7377 @ReturnMapping(ErrorResults)
7378 async def EnableUser(self, entities):
7379 '''
7380 entities : typing.Sequence[~Entity]
7381 Returns -> typing.Sequence[~ErrorResult]
7382 '''
7383 # map input types to rpc msg
7384 _params = dict()
7385 msg = dict(type='UserManager',
7386 request='EnableUser',
7387 version=2,
7388 params=_params)
7389 _params['entities'] = entities
7390 reply = await self.rpc(msg)
7391 return reply
7392
7393
7394
7395 @ReturnMapping(ErrorResults)
7396 async def RemoveUser(self, entities):
7397 '''
7398 entities : typing.Sequence[~Entity]
7399 Returns -> typing.Sequence[~ErrorResult]
7400 '''
7401 # map input types to rpc msg
7402 _params = dict()
7403 msg = dict(type='UserManager',
7404 request='RemoveUser',
7405 version=2,
7406 params=_params)
7407 _params['entities'] = entities
7408 reply = await self.rpc(msg)
7409 return reply
7410
7411
7412
7413 @ReturnMapping(AddUserResults)
7414 async def ResetPassword(self, entities):
7415 '''
7416 entities : typing.Sequence[~Entity]
7417 Returns -> typing.Sequence[~AddUserResult]
7418 '''
7419 # map input types to rpc msg
7420 _params = dict()
7421 msg = dict(type='UserManager',
7422 request='ResetPassword',
7423 version=2,
7424 params=_params)
7425 _params['entities'] = entities
7426 reply = await self.rpc(msg)
7427 return reply
7428
7429
7430
7431 @ReturnMapping(ErrorResults)
7432 async def SetPassword(self, changes):
7433 '''
7434 changes : typing.Sequence[~EntityPassword]
7435 Returns -> typing.Sequence[~ErrorResult]
7436 '''
7437 # map input types to rpc msg
7438 _params = dict()
7439 msg = dict(type='UserManager',
7440 request='SetPassword',
7441 version=2,
7442 params=_params)
7443 _params['changes'] = changes
7444 reply = await self.rpc(msg)
7445 return reply
7446
7447
7448
7449 @ReturnMapping(UserInfoResults)
7450 async def UserInfo(self, entities, include_disabled):
7451 '''
7452 entities : typing.Sequence[~Entity]
7453 include_disabled : bool
7454 Returns -> typing.Sequence[~UserInfoResult]
7455 '''
7456 # map input types to rpc msg
7457 _params = dict()
7458 msg = dict(type='UserManager',
7459 request='UserInfo',
7460 version=2,
7461 params=_params)
7462 _params['entities'] = entities
7463 _params['include-disabled'] = include_disabled
7464 reply = await self.rpc(msg)
7465 return reply
7466
7467
7468
7469 class VolumeAttachmentsWatcherFacade(Type):
7470 name = 'VolumeAttachmentsWatcher'
7471 version = 2
7472 schema = {'definitions': {'Error': {'additionalProperties': False,
7473 'properties': {'code': {'type': 'string'},
7474 'info': {'$ref': '#/definitions/ErrorInfo'},
7475 'message': {'type': 'string'}},
7476 'required': ['message', 'code'],
7477 'type': 'object'},
7478 'ErrorInfo': {'additionalProperties': False,
7479 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7480 'macaroon-path': {'type': 'string'}},
7481 'type': 'object'},
7482 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7483 'MachineStorageId': {'additionalProperties': False,
7484 'properties': {'attachment-tag': {'type': 'string'},
7485 'machine-tag': {'type': 'string'}},
7486 'required': ['machine-tag',
7487 'attachment-tag'],
7488 'type': 'object'},
7489 'MachineStorageIdsWatchResult': {'additionalProperties': False,
7490 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
7491 'type': 'array'},
7492 'error': {'$ref': '#/definitions/Error'},
7493 'watcher-id': {'type': 'string'}},
7494 'required': ['watcher-id',
7495 'changes'],
7496 'type': 'object'}},
7497 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
7498 'type': 'object'},
7499 'Stop': {'type': 'object'}},
7500 'type': 'object'}
7501
7502
7503 @ReturnMapping(MachineStorageIdsWatchResult)
7504 async def Next(self):
7505 '''
7506
7507 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error'), str]
7508 '''
7509 # map input types to rpc msg
7510 _params = dict()
7511 msg = dict(type='VolumeAttachmentsWatcher',
7512 request='Next',
7513 version=2,
7514 params=_params)
7515
7516 reply = await self.rpc(msg)
7517 return reply
7518
7519
7520
7521 @ReturnMapping(None)
7522 async def Stop(self):
7523 '''
7524
7525 Returns -> None
7526 '''
7527 # map input types to rpc msg
7528 _params = dict()
7529 msg = dict(type='VolumeAttachmentsWatcher',
7530 request='Stop',
7531 version=2,
7532 params=_params)
7533
7534 reply = await self.rpc(msg)
7535 return reply