New N2VC interface + updated libjuju
[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<+T_co>[~Entity]<~Entity>
169 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
170 '''
171 # map input types to rpc msg
172 _params = dict()
173 msg = dict(type='Action', request='Actions', version=2, params=_params)
174 _params['entities'] = entities
175 reply = await self.rpc(msg)
176 return reply
177
178
179
180 @ReturnMapping(ApplicationsCharmActionsResults)
181 async def ApplicationsCharmsActions(self, entities):
182 '''
183 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
184 Returns -> typing.Sequence<+T_co>[~ApplicationCharmActionsResult]<~ApplicationCharmActionsResult>
185 '''
186 # map input types to rpc msg
187 _params = dict()
188 msg = dict(type='Action', request='ApplicationsCharmsActions', version=2, params=_params)
189 _params['entities'] = entities
190 reply = await self.rpc(msg)
191 return reply
192
193
194
195 @ReturnMapping(ActionResults)
196 async def Cancel(self, entities):
197 '''
198 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
199 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
200 '''
201 # map input types to rpc msg
202 _params = dict()
203 msg = dict(type='Action', request='Cancel', version=2, params=_params)
204 _params['entities'] = entities
205 reply = await self.rpc(msg)
206 return reply
207
208
209
210 @ReturnMapping(ActionResults)
211 async def Enqueue(self, actions):
212 '''
213 actions : typing.Sequence<+T_co>[~Action]<~Action>
214 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
215 '''
216 # map input types to rpc msg
217 _params = dict()
218 msg = dict(type='Action', request='Enqueue', version=2, params=_params)
219 _params['actions'] = actions
220 reply = await self.rpc(msg)
221 return reply
222
223
224
225 @ReturnMapping(FindTagsResults)
226 async def FindActionTagsByPrefix(self, prefixes):
227 '''
228 prefixes : typing.Sequence<+T_co>[str]
229 Returns -> typing.Sequence<+T_co>[~Entity]<~Entity>
230 '''
231 # map input types to rpc msg
232 _params = dict()
233 msg = dict(type='Action', request='FindActionTagsByPrefix', version=2, params=_params)
234 _params['prefixes'] = prefixes
235 reply = await self.rpc(msg)
236 return reply
237
238
239
240 @ReturnMapping(ActionsByNames)
241 async def FindActionsByNames(self, names):
242 '''
243 names : typing.Sequence<+T_co>[str]
244 Returns -> typing.Sequence<+T_co>[~ActionsByName]<~ActionsByName>
245 '''
246 # map input types to rpc msg
247 _params = dict()
248 msg = dict(type='Action', request='FindActionsByNames', version=2, params=_params)
249 _params['names'] = names
250 reply = await self.rpc(msg)
251 return reply
252
253
254
255 @ReturnMapping(ActionsByReceivers)
256 async def ListAll(self, entities):
257 '''
258 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
259 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
260 '''
261 # map input types to rpc msg
262 _params = dict()
263 msg = dict(type='Action', request='ListAll', version=2, params=_params)
264 _params['entities'] = entities
265 reply = await self.rpc(msg)
266 return reply
267
268
269
270 @ReturnMapping(ActionsByReceivers)
271 async def ListCompleted(self, entities):
272 '''
273 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
274 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
275 '''
276 # map input types to rpc msg
277 _params = dict()
278 msg = dict(type='Action', request='ListCompleted', version=2, params=_params)
279 _params['entities'] = entities
280 reply = await self.rpc(msg)
281 return reply
282
283
284
285 @ReturnMapping(ActionsByReceivers)
286 async def ListPending(self, entities):
287 '''
288 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
289 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
290 '''
291 # map input types to rpc msg
292 _params = dict()
293 msg = dict(type='Action', request='ListPending', version=2, params=_params)
294 _params['entities'] = entities
295 reply = await self.rpc(msg)
296 return reply
297
298
299
300 @ReturnMapping(ActionsByReceivers)
301 async def ListRunning(self, entities):
302 '''
303 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
304 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
305 '''
306 # map input types to rpc msg
307 _params = dict()
308 msg = dict(type='Action', request='ListRunning', version=2, params=_params)
309 _params['entities'] = entities
310 reply = await self.rpc(msg)
311 return reply
312
313
314
315 @ReturnMapping(ActionResults)
316 async def Run(self, applications, commands, machines, timeout, units):
317 '''
318 applications : typing.Sequence<+T_co>[str]
319 commands : str
320 machines : typing.Sequence<+T_co>[str]
321 timeout : int
322 units : typing.Sequence<+T_co>[str]
323 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
324 '''
325 # map input types to rpc msg
326 _params = dict()
327 msg = dict(type='Action', request='Run', version=2, params=_params)
328 _params['applications'] = applications
329 _params['commands'] = commands
330 _params['machines'] = machines
331 _params['timeout'] = timeout
332 _params['units'] = units
333 reply = await self.rpc(msg)
334 return reply
335
336
337
338 @ReturnMapping(ActionResults)
339 async def RunOnAllMachines(self, applications, commands, machines, timeout, units):
340 '''
341 applications : typing.Sequence<+T_co>[str]
342 commands : str
343 machines : typing.Sequence<+T_co>[str]
344 timeout : int
345 units : typing.Sequence<+T_co>[str]
346 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
347 '''
348 # map input types to rpc msg
349 _params = dict()
350 msg = dict(type='Action', request='RunOnAllMachines', version=2, params=_params)
351 _params['applications'] = applications
352 _params['commands'] = commands
353 _params['machines'] = machines
354 _params['timeout'] = timeout
355 _params['units'] = units
356 reply = await self.rpc(msg)
357 return reply
358
359
360
361 class AgentFacade(Type):
362 name = 'Agent'
363 version = 2
364 schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
365 'properties': {'container-type': {'type': 'string'},
366 'error': {'$ref': '#/definitions/Error'},
367 'jobs': {'items': {'type': 'string'},
368 'type': 'array'},
369 'life': {'type': 'string'}},
370 'required': ['life',
371 'jobs',
372 'container-type'],
373 'type': 'object'},
374 'AgentGetEntitiesResults': {'additionalProperties': False,
375 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
376 'type': 'array'}},
377 'required': ['entities'],
378 'type': 'object'},
379 'CloudCredential': {'additionalProperties': False,
380 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
381 'type': 'object'},
382 'auth-type': {'type': 'string'},
383 'redacted': {'items': {'type': 'string'},
384 'type': 'array'}},
385 'required': ['auth-type'],
386 'type': 'object'},
387 'CloudSpec': {'additionalProperties': False,
388 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
389 'endpoint': {'type': 'string'},
390 'identity-endpoint': {'type': 'string'},
391 'name': {'type': 'string'},
392 'region': {'type': 'string'},
393 'storage-endpoint': {'type': 'string'},
394 'type': {'type': 'string'}},
395 'required': ['type', 'name'],
396 'type': 'object'},
397 'CloudSpecResult': {'additionalProperties': False,
398 'properties': {'error': {'$ref': '#/definitions/Error'},
399 'result': {'$ref': '#/definitions/CloudSpec'}},
400 'type': 'object'},
401 'CloudSpecResults': {'additionalProperties': False,
402 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
403 'type': 'array'}},
404 'type': 'object'},
405 'ControllerConfigResult': {'additionalProperties': False,
406 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
407 'type': 'object'}},
408 'type': 'object'}},
409 'required': ['config'],
410 'type': 'object'},
411 'Entities': {'additionalProperties': False,
412 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
413 'type': 'array'}},
414 'required': ['entities'],
415 'type': 'object'},
416 'Entity': {'additionalProperties': False,
417 'properties': {'tag': {'type': 'string'}},
418 'required': ['tag'],
419 'type': 'object'},
420 'EntityPassword': {'additionalProperties': False,
421 'properties': {'password': {'type': 'string'},
422 'tag': {'type': 'string'}},
423 'required': ['tag', 'password'],
424 'type': 'object'},
425 'EntityPasswords': {'additionalProperties': False,
426 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
427 'type': 'array'}},
428 'required': ['changes'],
429 'type': 'object'},
430 'Error': {'additionalProperties': False,
431 'properties': {'code': {'type': 'string'},
432 'info': {'$ref': '#/definitions/ErrorInfo'},
433 'message': {'type': 'string'}},
434 'required': ['message', 'code'],
435 'type': 'object'},
436 'ErrorInfo': {'additionalProperties': False,
437 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
438 'macaroon-path': {'type': 'string'}},
439 'type': 'object'},
440 'ErrorResult': {'additionalProperties': False,
441 'properties': {'error': {'$ref': '#/definitions/Error'}},
442 'type': 'object'},
443 'ErrorResults': {'additionalProperties': False,
444 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
445 'type': 'array'}},
446 'required': ['results'],
447 'type': 'object'},
448 'IsMasterResult': {'additionalProperties': False,
449 'properties': {'master': {'type': 'boolean'}},
450 'required': ['master'],
451 'type': 'object'},
452 'Macaroon': {'additionalProperties': False, 'type': 'object'},
453 'ModelConfigResult': {'additionalProperties': False,
454 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
455 'type': 'object'}},
456 'type': 'object'}},
457 'required': ['config'],
458 'type': 'object'},
459 'ModelTag': {'additionalProperties': False, 'type': 'object'},
460 'NotifyWatchResult': {'additionalProperties': False,
461 'properties': {'NotifyWatcherId': {'type': 'string'},
462 'error': {'$ref': '#/definitions/Error'}},
463 'required': ['NotifyWatcherId'],
464 'type': 'object'},
465 'NotifyWatchResults': {'additionalProperties': False,
466 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
467 'type': 'array'}},
468 'required': ['results'],
469 'type': 'object'},
470 'StateServingInfo': {'additionalProperties': False,
471 'properties': {'api-port': {'type': 'integer'},
472 'ca-private-key': {'type': 'string'},
473 'cert': {'type': 'string'},
474 'private-key': {'type': 'string'},
475 'shared-secret': {'type': 'string'},
476 'state-port': {'type': 'integer'},
477 'system-identity': {'type': 'string'}},
478 'required': ['api-port',
479 'state-port',
480 'cert',
481 'private-key',
482 'ca-private-key',
483 'shared-secret',
484 'system-identity'],
485 'type': 'object'}},
486 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
487 'Result': {'$ref': '#/definitions/ErrorResults'}},
488 'type': 'object'},
489 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
490 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
491 'type': 'object'},
492 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
493 'type': 'object'},
494 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
495 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
496 'type': 'object'},
497 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
498 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
499 'type': 'object'},
500 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
501 'type': 'object'},
502 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
503 'type': 'object'},
504 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
505 'Result': {'$ref': '#/definitions/ErrorResults'}},
506 'type': 'object'},
507 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
508 'type': 'object'},
509 'WatchCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
510 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
511 'type': 'object'},
512 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
513 'type': 'object'}},
514 'type': 'object'}
515
516
517 @ReturnMapping(ErrorResults)
518 async def ClearReboot(self, entities):
519 '''
520 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
521 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
522 '''
523 # map input types to rpc msg
524 _params = dict()
525 msg = dict(type='Agent', request='ClearReboot', version=2, params=_params)
526 _params['entities'] = entities
527 reply = await self.rpc(msg)
528 return reply
529
530
531
532 @ReturnMapping(CloudSpecResults)
533 async def CloudSpec(self, entities):
534 '''
535 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
536 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
537 '''
538 # map input types to rpc msg
539 _params = dict()
540 msg = dict(type='Agent', request='CloudSpec', version=2, params=_params)
541 _params['entities'] = entities
542 reply = await self.rpc(msg)
543 return reply
544
545
546
547 @ReturnMapping(ControllerConfigResult)
548 async def ControllerConfig(self):
549 '''
550
551 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
552 '''
553 # map input types to rpc msg
554 _params = dict()
555 msg = dict(type='Agent', request='ControllerConfig', version=2, params=_params)
556
557 reply = await self.rpc(msg)
558 return reply
559
560
561
562 @ReturnMapping(CloudSpecResult)
563 async def GetCloudSpec(self):
564 '''
565
566 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
567 '''
568 # map input types to rpc msg
569 _params = dict()
570 msg = dict(type='Agent', request='GetCloudSpec', version=2, params=_params)
571
572 reply = await self.rpc(msg)
573 return reply
574
575
576
577 @ReturnMapping(AgentGetEntitiesResults)
578 async def GetEntities(self, entities):
579 '''
580 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
581 Returns -> typing.Sequence<+T_co>[~AgentGetEntitiesResult]<~AgentGetEntitiesResult>
582 '''
583 # map input types to rpc msg
584 _params = dict()
585 msg = dict(type='Agent', request='GetEntities', version=2, params=_params)
586 _params['entities'] = entities
587 reply = await self.rpc(msg)
588 return reply
589
590
591
592 @ReturnMapping(IsMasterResult)
593 async def IsMaster(self):
594 '''
595
596 Returns -> bool
597 '''
598 # map input types to rpc msg
599 _params = dict()
600 msg = dict(type='Agent', request='IsMaster', version=2, params=_params)
601
602 reply = await self.rpc(msg)
603 return reply
604
605
606
607 @ReturnMapping(ModelConfigResult)
608 async def ModelConfig(self):
609 '''
610
611 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
612 '''
613 # map input types to rpc msg
614 _params = dict()
615 msg = dict(type='Agent', request='ModelConfig', version=2, params=_params)
616
617 reply = await self.rpc(msg)
618 return reply
619
620
621
622 @ReturnMapping(ErrorResults)
623 async def SetPasswords(self, changes):
624 '''
625 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
626 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
627 '''
628 # map input types to rpc msg
629 _params = dict()
630 msg = dict(type='Agent', request='SetPasswords', version=2, params=_params)
631 _params['changes'] = changes
632 reply = await self.rpc(msg)
633 return reply
634
635
636
637 @ReturnMapping(StateServingInfo)
638 async def StateServingInfo(self):
639 '''
640
641 Returns -> typing.Union[int, str]
642 '''
643 # map input types to rpc msg
644 _params = dict()
645 msg = dict(type='Agent', request='StateServingInfo', version=2, params=_params)
646
647 reply = await self.rpc(msg)
648 return reply
649
650
651
652 @ReturnMapping(NotifyWatchResults)
653 async def WatchCredentials(self, entities):
654 '''
655 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
656 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
657 '''
658 # map input types to rpc msg
659 _params = dict()
660 msg = dict(type='Agent', request='WatchCredentials', version=2, params=_params)
661 _params['entities'] = entities
662 reply = await self.rpc(msg)
663 return reply
664
665
666
667 @ReturnMapping(NotifyWatchResult)
668 async def WatchForModelConfigChanges(self):
669 '''
670
671 Returns -> typing.Union[str, _ForwardRef('Error')]
672 '''
673 # map input types to rpc msg
674 _params = dict()
675 msg = dict(type='Agent', request='WatchForModelConfigChanges', version=2, params=_params)
676
677 reply = await self.rpc(msg)
678 return reply
679
680
681
682 class AllModelWatcherFacade(Type):
683 name = 'AllModelWatcher'
684 version = 2
685 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
686 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
687 'type': 'array'}},
688 'required': ['deltas'],
689 'type': 'object'},
690 'Delta': {'additionalProperties': False,
691 'properties': {'entity': {'additionalProperties': True,
692 'type': 'object'},
693 'removed': {'type': 'boolean'}},
694 'required': ['removed', 'entity'],
695 'type': 'object'}},
696 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
697 'type': 'object'},
698 'Stop': {'type': 'object'}},
699 'type': 'object'}
700
701
702 @ReturnMapping(AllWatcherNextResults)
703 async def Next(self):
704 '''
705
706 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
707 '''
708 # map input types to rpc msg
709 _params = dict()
710 msg = dict(type='AllModelWatcher', request='Next', version=2, params=_params)
711
712 reply = await self.rpc(msg)
713 return reply
714
715
716
717 @ReturnMapping(None)
718 async def Stop(self):
719 '''
720
721 Returns -> None
722 '''
723 # map input types to rpc msg
724 _params = dict()
725 msg = dict(type='AllModelWatcher', request='Stop', version=2, params=_params)
726
727 reply = await self.rpc(msg)
728 return reply
729
730
731
732 class AnnotationsFacade(Type):
733 name = 'Annotations'
734 version = 2
735 schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
736 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
737 'type': 'object'},
738 'entity': {'type': 'string'},
739 'error': {'$ref': '#/definitions/ErrorResult'}},
740 'required': ['entity', 'annotations'],
741 'type': 'object'},
742 'AnnotationsGetResults': {'additionalProperties': False,
743 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
744 'type': 'array'}},
745 'required': ['results'],
746 'type': 'object'},
747 'AnnotationsSet': {'additionalProperties': False,
748 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
749 'type': 'array'}},
750 'required': ['annotations'],
751 'type': 'object'},
752 'Entities': {'additionalProperties': False,
753 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
754 'type': 'array'}},
755 'required': ['entities'],
756 'type': 'object'},
757 'Entity': {'additionalProperties': False,
758 'properties': {'tag': {'type': 'string'}},
759 'required': ['tag'],
760 'type': 'object'},
761 'EntityAnnotations': {'additionalProperties': False,
762 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
763 'type': 'object'},
764 'entity': {'type': 'string'}},
765 'required': ['entity', 'annotations'],
766 'type': 'object'},
767 'Error': {'additionalProperties': False,
768 'properties': {'code': {'type': 'string'},
769 'info': {'$ref': '#/definitions/ErrorInfo'},
770 'message': {'type': 'string'}},
771 'required': ['message', 'code'],
772 'type': 'object'},
773 'ErrorInfo': {'additionalProperties': False,
774 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
775 'macaroon-path': {'type': 'string'}},
776 'type': 'object'},
777 'ErrorResult': {'additionalProperties': False,
778 'properties': {'error': {'$ref': '#/definitions/Error'}},
779 'type': 'object'},
780 'ErrorResults': {'additionalProperties': False,
781 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
782 'type': 'array'}},
783 'required': ['results'],
784 'type': 'object'},
785 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
786 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
787 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
788 'type': 'object'},
789 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
790 'Result': {'$ref': '#/definitions/ErrorResults'}},
791 'type': 'object'}},
792 'type': 'object'}
793
794
795 @ReturnMapping(AnnotationsGetResults)
796 async def Get(self, entities):
797 '''
798 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
799 Returns -> typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult>
800 '''
801 # map input types to rpc msg
802 _params = dict()
803 msg = dict(type='Annotations', request='Get', version=2, params=_params)
804 _params['entities'] = entities
805 reply = await self.rpc(msg)
806 return reply
807
808
809
810 @ReturnMapping(ErrorResults)
811 async def Set(self, annotations):
812 '''
813 annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations>
814 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
815 '''
816 # map input types to rpc msg
817 _params = dict()
818 msg = dict(type='Annotations', request='Set', version=2, params=_params)
819 _params['annotations'] = annotations
820 reply = await self.rpc(msg)
821 return reply
822
823
824
825 class ApplicationFacade(Type):
826 name = 'Application'
827 version = 2
828 schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
829 'properties': {'application': {'type': 'string'},
830 'num-units': {'type': 'integer'},
831 'placement': {'items': {'$ref': '#/definitions/Placement'},
832 'type': 'array'}},
833 'required': ['application',
834 'num-units',
835 'placement'],
836 'type': 'object'},
837 'AddApplicationUnitsResults': {'additionalProperties': False,
838 'properties': {'units': {'items': {'type': 'string'},
839 'type': 'array'}},
840 'required': ['units'],
841 'type': 'object'},
842 'AddRelation': {'additionalProperties': False,
843 'properties': {'endpoints': {'items': {'type': 'string'},
844 'type': 'array'}},
845 'required': ['endpoints'],
846 'type': 'object'},
847 'AddRelationResults': {'additionalProperties': False,
848 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
849 'type': 'object'}},
850 'required': ['endpoints'],
851 'type': 'object'},
852 'ApplicationCharmRelations': {'additionalProperties': False,
853 'properties': {'application': {'type': 'string'}},
854 'required': ['application'],
855 'type': 'object'},
856 'ApplicationCharmRelationsResults': {'additionalProperties': False,
857 'properties': {'charm-relations': {'items': {'type': 'string'},
858 'type': 'array'}},
859 'required': ['charm-relations'],
860 'type': 'object'},
861 'ApplicationDeploy': {'additionalProperties': False,
862 'properties': {'application': {'type': 'string'},
863 'channel': {'type': 'string'},
864 'charm-url': {'type': 'string'},
865 'config': {'patternProperties': {'.*': {'type': 'string'}},
866 'type': 'object'},
867 'config-yaml': {'type': 'string'},
868 'constraints': {'$ref': '#/definitions/Value'},
869 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
870 'type': 'object'},
871 'num-units': {'type': 'integer'},
872 'placement': {'items': {'$ref': '#/definitions/Placement'},
873 'type': 'array'},
874 'resources': {'patternProperties': {'.*': {'type': 'string'}},
875 'type': 'object'},
876 'series': {'type': 'string'},
877 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
878 'type': 'object'}},
879 'required': ['application',
880 'series',
881 'charm-url',
882 'channel',
883 'num-units',
884 'config-yaml',
885 'constraints'],
886 'type': 'object'},
887 'ApplicationDestroy': {'additionalProperties': False,
888 'properties': {'application': {'type': 'string'}},
889 'required': ['application'],
890 'type': 'object'},
891 'ApplicationExpose': {'additionalProperties': False,
892 'properties': {'application': {'type': 'string'}},
893 'required': ['application'],
894 'type': 'object'},
895 'ApplicationGet': {'additionalProperties': False,
896 'properties': {'application': {'type': 'string'}},
897 'required': ['application'],
898 'type': 'object'},
899 'ApplicationGetResults': {'additionalProperties': False,
900 'properties': {'application': {'type': 'string'},
901 'charm': {'type': 'string'},
902 'config': {'patternProperties': {'.*': {'additionalProperties': True,
903 'type': 'object'}},
904 'type': 'object'},
905 'constraints': {'$ref': '#/definitions/Value'},
906 'series': {'type': 'string'}},
907 'required': ['application',
908 'charm',
909 'config',
910 'constraints',
911 'series'],
912 'type': 'object'},
913 'ApplicationMetricCredential': {'additionalProperties': False,
914 'properties': {'application': {'type': 'string'},
915 'metrics-credentials': {'items': {'type': 'integer'},
916 'type': 'array'}},
917 'required': ['application',
918 'metrics-credentials'],
919 'type': 'object'},
920 'ApplicationMetricCredentials': {'additionalProperties': False,
921 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
922 'type': 'array'}},
923 'required': ['creds'],
924 'type': 'object'},
925 'ApplicationSet': {'additionalProperties': False,
926 'properties': {'application': {'type': 'string'},
927 'options': {'patternProperties': {'.*': {'type': 'string'}},
928 'type': 'object'}},
929 'required': ['application', 'options'],
930 'type': 'object'},
931 'ApplicationSetCharm': {'additionalProperties': False,
932 'properties': {'application': {'type': 'string'},
933 'channel': {'type': 'string'},
934 'charm-url': {'type': 'string'},
935 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
936 'type': 'object'},
937 'config-settings-yaml': {'type': 'string'},
938 'force-series': {'type': 'boolean'},
939 'force-units': {'type': 'boolean'},
940 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
941 'type': 'object'},
942 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
943 'type': 'object'}},
944 'required': ['application',
945 'charm-url',
946 'channel',
947 'force-units',
948 'force-series'],
949 'type': 'object'},
950 'ApplicationUnexpose': {'additionalProperties': False,
951 'properties': {'application': {'type': 'string'}},
952 'required': ['application'],
953 'type': 'object'},
954 'ApplicationUnset': {'additionalProperties': False,
955 'properties': {'application': {'type': 'string'},
956 'options': {'items': {'type': 'string'},
957 'type': 'array'}},
958 'required': ['application', 'options'],
959 'type': 'object'},
960 'ApplicationUpdate': {'additionalProperties': False,
961 'properties': {'application': {'type': 'string'},
962 'charm-url': {'type': 'string'},
963 'constraints': {'$ref': '#/definitions/Value'},
964 'force-charm-url': {'type': 'boolean'},
965 'force-series': {'type': 'boolean'},
966 'min-units': {'type': 'integer'},
967 'settings': {'patternProperties': {'.*': {'type': 'string'}},
968 'type': 'object'},
969 'settings-yaml': {'type': 'string'}},
970 'required': ['application',
971 'charm-url',
972 'force-charm-url',
973 'force-series',
974 'settings-yaml'],
975 'type': 'object'},
976 'ApplicationsDeploy': {'additionalProperties': False,
977 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
978 'type': 'array'}},
979 'required': ['applications'],
980 'type': 'object'},
981 'CharmRelation': {'additionalProperties': False,
982 'properties': {'interface': {'type': 'string'},
983 'limit': {'type': 'integer'},
984 'name': {'type': 'string'},
985 'optional': {'type': 'boolean'},
986 'role': {'type': 'string'},
987 'scope': {'type': 'string'}},
988 'required': ['name',
989 'role',
990 'interface',
991 'optional',
992 'limit',
993 'scope'],
994 'type': 'object'},
995 'Constraints': {'additionalProperties': False,
996 'properties': {'Count': {'type': 'integer'},
997 'Pool': {'type': 'string'},
998 'Size': {'type': 'integer'}},
999 'required': ['Pool', 'Size', 'Count'],
1000 'type': 'object'},
1001 'DestroyApplicationUnits': {'additionalProperties': False,
1002 'properties': {'unit-names': {'items': {'type': 'string'},
1003 'type': 'array'}},
1004 'required': ['unit-names'],
1005 'type': 'object'},
1006 'DestroyRelation': {'additionalProperties': False,
1007 'properties': {'endpoints': {'items': {'type': 'string'},
1008 'type': 'array'}},
1009 'required': ['endpoints'],
1010 'type': 'object'},
1011 'Error': {'additionalProperties': False,
1012 'properties': {'code': {'type': 'string'},
1013 'info': {'$ref': '#/definitions/ErrorInfo'},
1014 'message': {'type': 'string'}},
1015 'required': ['message', 'code'],
1016 'type': 'object'},
1017 'ErrorInfo': {'additionalProperties': False,
1018 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1019 'macaroon-path': {'type': 'string'}},
1020 'type': 'object'},
1021 'ErrorResult': {'additionalProperties': False,
1022 'properties': {'error': {'$ref': '#/definitions/Error'}},
1023 'type': 'object'},
1024 'ErrorResults': {'additionalProperties': False,
1025 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1026 'type': 'array'}},
1027 'required': ['results'],
1028 'type': 'object'},
1029 'GetApplicationConstraints': {'additionalProperties': False,
1030 'properties': {'application': {'type': 'string'}},
1031 'required': ['application'],
1032 'type': 'object'},
1033 'GetConstraintsResults': {'additionalProperties': False,
1034 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
1035 'required': ['constraints'],
1036 'type': 'object'},
1037 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1038 'Placement': {'additionalProperties': False,
1039 'properties': {'directive': {'type': 'string'},
1040 'scope': {'type': 'string'}},
1041 'required': ['scope', 'directive'],
1042 'type': 'object'},
1043 'SetConstraints': {'additionalProperties': False,
1044 'properties': {'application': {'type': 'string'},
1045 'constraints': {'$ref': '#/definitions/Value'}},
1046 'required': ['application', 'constraints'],
1047 'type': 'object'},
1048 'StorageConstraints': {'additionalProperties': False,
1049 'properties': {'count': {'type': 'integer'},
1050 'pool': {'type': 'string'},
1051 'size': {'type': 'integer'}},
1052 'type': 'object'},
1053 'StringResult': {'additionalProperties': False,
1054 'properties': {'error': {'$ref': '#/definitions/Error'},
1055 'result': {'type': 'string'}},
1056 'required': ['result'],
1057 'type': 'object'},
1058 'Value': {'additionalProperties': False,
1059 'properties': {'arch': {'type': 'string'},
1060 'container': {'type': 'string'},
1061 'cores': {'type': 'integer'},
1062 'cpu-power': {'type': 'integer'},
1063 'instance-type': {'type': 'string'},
1064 'mem': {'type': 'integer'},
1065 'root-disk': {'type': 'integer'},
1066 'spaces': {'items': {'type': 'string'},
1067 'type': 'array'},
1068 'tags': {'items': {'type': 'string'},
1069 'type': 'array'},
1070 'virt-type': {'type': 'string'}},
1071 'type': 'object'}},
1072 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
1073 'Result': {'$ref': '#/definitions/AddRelationResults'}},
1074 'type': 'object'},
1075 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
1076 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
1077 'type': 'object'},
1078 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
1079 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
1080 'type': 'object'},
1081 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
1082 'Result': {'$ref': '#/definitions/ErrorResults'}},
1083 'type': 'object'},
1084 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
1085 'type': 'object'},
1086 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
1087 'type': 'object'},
1088 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
1089 'type': 'object'},
1090 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
1091 'type': 'object'},
1092 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
1093 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
1094 'type': 'object'},
1095 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
1096 'Result': {'$ref': '#/definitions/StringResult'}},
1097 'type': 'object'},
1098 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
1099 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
1100 'type': 'object'},
1101 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
1102 'type': 'object'},
1103 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
1104 'type': 'object'},
1105 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
1106 'type': 'object'},
1107 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
1108 'Result': {'$ref': '#/definitions/ErrorResults'}},
1109 'type': 'object'},
1110 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
1111 'type': 'object'},
1112 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
1113 'type': 'object'},
1114 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
1115 'type': 'object'}},
1116 'type': 'object'}
1117
1118
1119 @ReturnMapping(AddRelationResults)
1120 async def AddRelation(self, endpoints):
1121 '''
1122 endpoints : typing.Sequence<+T_co>[str]
1123 Returns -> typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1124 '''
1125 # map input types to rpc msg
1126 _params = dict()
1127 msg = dict(type='Application', request='AddRelation', version=2, params=_params)
1128 _params['endpoints'] = endpoints
1129 reply = await self.rpc(msg)
1130 return reply
1131
1132
1133
1134 @ReturnMapping(AddApplicationUnitsResults)
1135 async def AddUnits(self, application, num_units, placement):
1136 '''
1137 application : str
1138 num_units : int
1139 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
1140 Returns -> typing.Sequence<+T_co>[str]
1141 '''
1142 # map input types to rpc msg
1143 _params = dict()
1144 msg = dict(type='Application', request='AddUnits', version=2, params=_params)
1145 _params['application'] = application
1146 _params['num-units'] = num_units
1147 _params['placement'] = placement
1148 reply = await self.rpc(msg)
1149 return reply
1150
1151
1152
1153 @ReturnMapping(ApplicationCharmRelationsResults)
1154 async def CharmRelations(self, application):
1155 '''
1156 application : str
1157 Returns -> typing.Sequence<+T_co>[str]
1158 '''
1159 # map input types to rpc msg
1160 _params = dict()
1161 msg = dict(type='Application', request='CharmRelations', version=2, params=_params)
1162 _params['application'] = application
1163 reply = await self.rpc(msg)
1164 return reply
1165
1166
1167
1168 @ReturnMapping(ErrorResults)
1169 async def Deploy(self, applications):
1170 '''
1171 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
1172 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1173 '''
1174 # map input types to rpc msg
1175 _params = dict()
1176 msg = dict(type='Application', request='Deploy', version=2, params=_params)
1177 _params['applications'] = applications
1178 reply = await self.rpc(msg)
1179 return reply
1180
1181
1182
1183 @ReturnMapping(None)
1184 async def Destroy(self, application):
1185 '''
1186 application : str
1187 Returns -> None
1188 '''
1189 # map input types to rpc msg
1190 _params = dict()
1191 msg = dict(type='Application', request='Destroy', version=2, params=_params)
1192 _params['application'] = application
1193 reply = await self.rpc(msg)
1194 return reply
1195
1196
1197
1198 @ReturnMapping(None)
1199 async def DestroyRelation(self, endpoints):
1200 '''
1201 endpoints : typing.Sequence<+T_co>[str]
1202 Returns -> None
1203 '''
1204 # map input types to rpc msg
1205 _params = dict()
1206 msg = dict(type='Application', request='DestroyRelation', version=2, params=_params)
1207 _params['endpoints'] = endpoints
1208 reply = await self.rpc(msg)
1209 return reply
1210
1211
1212
1213 @ReturnMapping(None)
1214 async def DestroyUnits(self, unit_names):
1215 '''
1216 unit_names : typing.Sequence<+T_co>[str]
1217 Returns -> None
1218 '''
1219 # map input types to rpc msg
1220 _params = dict()
1221 msg = dict(type='Application', request='DestroyUnits', version=2, params=_params)
1222 _params['unit-names'] = unit_names
1223 reply = await self.rpc(msg)
1224 return reply
1225
1226
1227
1228 @ReturnMapping(None)
1229 async def Expose(self, application):
1230 '''
1231 application : str
1232 Returns -> None
1233 '''
1234 # map input types to rpc msg
1235 _params = dict()
1236 msg = dict(type='Application', request='Expose', version=2, params=_params)
1237 _params['application'] = application
1238 reply = await self.rpc(msg)
1239 return reply
1240
1241
1242
1243 @ReturnMapping(ApplicationGetResults)
1244 async def Get(self, application):
1245 '''
1246 application : str
1247 Returns -> typing.Union[str, typing.Mapping<~KT, +VT_co>[str, typing.Any], _ForwardRef('Value')]
1248 '''
1249 # map input types to rpc msg
1250 _params = dict()
1251 msg = dict(type='Application', request='Get', version=2, params=_params)
1252 _params['application'] = application
1253 reply = await self.rpc(msg)
1254 return reply
1255
1256
1257
1258 @ReturnMapping(StringResult)
1259 async def GetCharmURL(self, application):
1260 '''
1261 application : str
1262 Returns -> typing.Union[_ForwardRef('Error'), str]
1263 '''
1264 # map input types to rpc msg
1265 _params = dict()
1266 msg = dict(type='Application', request='GetCharmURL', version=2, params=_params)
1267 _params['application'] = application
1268 reply = await self.rpc(msg)
1269 return reply
1270
1271
1272
1273 @ReturnMapping(GetConstraintsResults)
1274 async def GetConstraints(self, application):
1275 '''
1276 application : str
1277 Returns -> Value
1278 '''
1279 # map input types to rpc msg
1280 _params = dict()
1281 msg = dict(type='Application', request='GetConstraints', version=2, params=_params)
1282 _params['application'] = application
1283 reply = await self.rpc(msg)
1284 return reply
1285
1286
1287
1288 @ReturnMapping(None)
1289 async def Set(self, application, options):
1290 '''
1291 application : str
1292 options : typing.Mapping<~KT, +VT_co>[str, str]
1293 Returns -> None
1294 '''
1295 # map input types to rpc msg
1296 _params = dict()
1297 msg = dict(type='Application', request='Set', version=2, params=_params)
1298 _params['application'] = application
1299 _params['options'] = options
1300 reply = await self.rpc(msg)
1301 return reply
1302
1303
1304
1305 @ReturnMapping(None)
1306 async def SetCharm(self, application, channel, charm_url, config_settings, config_settings_yaml, force_series, force_units, resource_ids, storage_constraints):
1307 '''
1308 application : str
1309 channel : str
1310 charm_url : str
1311 config_settings : typing.Mapping<~KT, +VT_co>[str, str]
1312 config_settings_yaml : str
1313 force_series : bool
1314 force_units : bool
1315 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
1316 storage_constraints : typing.Mapping<~KT, +VT_co>[str, ~StorageConstraints]<~StorageConstraints>
1317 Returns -> None
1318 '''
1319 # map input types to rpc msg
1320 _params = dict()
1321 msg = dict(type='Application', request='SetCharm', version=2, params=_params)
1322 _params['application'] = application
1323 _params['channel'] = channel
1324 _params['charm-url'] = charm_url
1325 _params['config-settings'] = config_settings
1326 _params['config-settings-yaml'] = config_settings_yaml
1327 _params['force-series'] = force_series
1328 _params['force-units'] = force_units
1329 _params['resource-ids'] = resource_ids
1330 _params['storage-constraints'] = storage_constraints
1331 reply = await self.rpc(msg)
1332 return reply
1333
1334
1335
1336 @ReturnMapping(None)
1337 async def SetConstraints(self, application, constraints):
1338 '''
1339 application : str
1340 constraints : Value
1341 Returns -> None
1342 '''
1343 # map input types to rpc msg
1344 _params = dict()
1345 msg = dict(type='Application', request='SetConstraints', version=2, params=_params)
1346 _params['application'] = application
1347 _params['constraints'] = constraints
1348 reply = await self.rpc(msg)
1349 return reply
1350
1351
1352
1353 @ReturnMapping(ErrorResults)
1354 async def SetMetricCredentials(self, creds):
1355 '''
1356 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
1357 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1358 '''
1359 # map input types to rpc msg
1360 _params = dict()
1361 msg = dict(type='Application', request='SetMetricCredentials', version=2, params=_params)
1362 _params['creds'] = creds
1363 reply = await self.rpc(msg)
1364 return reply
1365
1366
1367
1368 @ReturnMapping(None)
1369 async def Unexpose(self, application):
1370 '''
1371 application : str
1372 Returns -> None
1373 '''
1374 # map input types to rpc msg
1375 _params = dict()
1376 msg = dict(type='Application', request='Unexpose', version=2, params=_params)
1377 _params['application'] = application
1378 reply = await self.rpc(msg)
1379 return reply
1380
1381
1382
1383 @ReturnMapping(None)
1384 async def Unset(self, application, options):
1385 '''
1386 application : str
1387 options : typing.Sequence<+T_co>[str]
1388 Returns -> None
1389 '''
1390 # map input types to rpc msg
1391 _params = dict()
1392 msg = dict(type='Application', request='Unset', version=2, params=_params)
1393 _params['application'] = application
1394 _params['options'] = options
1395 reply = await self.rpc(msg)
1396 return reply
1397
1398
1399
1400 @ReturnMapping(None)
1401 async def Update(self, application, charm_url, constraints, force_charm_url, force_series, min_units, settings, settings_yaml):
1402 '''
1403 application : str
1404 charm_url : str
1405 constraints : Value
1406 force_charm_url : bool
1407 force_series : bool
1408 min_units : int
1409 settings : typing.Mapping<~KT, +VT_co>[str, str]
1410 settings_yaml : str
1411 Returns -> None
1412 '''
1413 # map input types to rpc msg
1414 _params = dict()
1415 msg = dict(type='Application', request='Update', version=2, params=_params)
1416 _params['application'] = application
1417 _params['charm-url'] = charm_url
1418 _params['constraints'] = constraints
1419 _params['force-charm-url'] = force_charm_url
1420 _params['force-series'] = force_series
1421 _params['min-units'] = min_units
1422 _params['settings'] = settings
1423 _params['settings-yaml'] = settings_yaml
1424 reply = await self.rpc(msg)
1425 return reply
1426
1427
1428
1429 class BlockFacade(Type):
1430 name = 'Block'
1431 version = 2
1432 schema = {'definitions': {'Block': {'additionalProperties': False,
1433 'properties': {'id': {'type': 'string'},
1434 'message': {'type': 'string'},
1435 'tag': {'type': 'string'},
1436 'type': {'type': 'string'}},
1437 'required': ['id', 'tag', 'type'],
1438 'type': 'object'},
1439 'BlockResult': {'additionalProperties': False,
1440 'properties': {'error': {'$ref': '#/definitions/Error'},
1441 'result': {'$ref': '#/definitions/Block'}},
1442 'required': ['result'],
1443 'type': 'object'},
1444 'BlockResults': {'additionalProperties': False,
1445 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
1446 'type': 'array'}},
1447 'type': 'object'},
1448 'BlockSwitchParams': {'additionalProperties': False,
1449 'properties': {'message': {'type': 'string'},
1450 'type': {'type': 'string'}},
1451 'required': ['type'],
1452 'type': 'object'},
1453 'Error': {'additionalProperties': False,
1454 'properties': {'code': {'type': 'string'},
1455 'info': {'$ref': '#/definitions/ErrorInfo'},
1456 'message': {'type': 'string'}},
1457 'required': ['message', 'code'],
1458 'type': 'object'},
1459 'ErrorInfo': {'additionalProperties': False,
1460 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1461 'macaroon-path': {'type': 'string'}},
1462 'type': 'object'},
1463 'ErrorResult': {'additionalProperties': False,
1464 'properties': {'error': {'$ref': '#/definitions/Error'}},
1465 'type': 'object'},
1466 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
1467 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
1468 'type': 'object'},
1469 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
1470 'Result': {'$ref': '#/definitions/ErrorResult'}},
1471 'type': 'object'},
1472 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
1473 'Result': {'$ref': '#/definitions/ErrorResult'}},
1474 'type': 'object'}},
1475 'type': 'object'}
1476
1477
1478 @ReturnMapping(BlockResults)
1479 async def List(self):
1480 '''
1481
1482 Returns -> typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
1483 '''
1484 # map input types to rpc msg
1485 _params = dict()
1486 msg = dict(type='Block', request='List', version=2, params=_params)
1487
1488 reply = await self.rpc(msg)
1489 return reply
1490
1491
1492
1493 @ReturnMapping(ErrorResult)
1494 async def SwitchBlockOff(self, message, type_):
1495 '''
1496 message : str
1497 type_ : str
1498 Returns -> Error
1499 '''
1500 # map input types to rpc msg
1501 _params = dict()
1502 msg = dict(type='Block', request='SwitchBlockOff', version=2, params=_params)
1503 _params['message'] = message
1504 _params['type'] = type_
1505 reply = await self.rpc(msg)
1506 return reply
1507
1508
1509
1510 @ReturnMapping(ErrorResult)
1511 async def SwitchBlockOn(self, message, type_):
1512 '''
1513 message : str
1514 type_ : str
1515 Returns -> Error
1516 '''
1517 # map input types to rpc msg
1518 _params = dict()
1519 msg = dict(type='Block', request='SwitchBlockOn', version=2, params=_params)
1520 _params['message'] = message
1521 _params['type'] = type_
1522 reply = await self.rpc(msg)
1523 return reply
1524
1525
1526
1527 class CharmRevisionUpdaterFacade(Type):
1528 name = 'CharmRevisionUpdater'
1529 version = 2
1530 schema = {'definitions': {'Error': {'additionalProperties': False,
1531 'properties': {'code': {'type': 'string'},
1532 'info': {'$ref': '#/definitions/ErrorInfo'},
1533 'message': {'type': 'string'}},
1534 'required': ['message', 'code'],
1535 'type': 'object'},
1536 'ErrorInfo': {'additionalProperties': False,
1537 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1538 'macaroon-path': {'type': 'string'}},
1539 'type': 'object'},
1540 'ErrorResult': {'additionalProperties': False,
1541 'properties': {'error': {'$ref': '#/definitions/Error'}},
1542 'type': 'object'},
1543 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
1544 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
1545 'type': 'object'}},
1546 'type': 'object'}
1547
1548
1549 @ReturnMapping(ErrorResult)
1550 async def UpdateLatestRevisions(self):
1551 '''
1552
1553 Returns -> Error
1554 '''
1555 # map input types to rpc msg
1556 _params = dict()
1557 msg = dict(type='CharmRevisionUpdater', request='UpdateLatestRevisions', version=2, params=_params)
1558
1559 reply = await self.rpc(msg)
1560 return reply
1561
1562
1563
1564 class CharmsFacade(Type):
1565 name = 'Charms'
1566 version = 2
1567 schema = {'definitions': {'CharmActionSpec': {'additionalProperties': False,
1568 'properties': {'description': {'type': 'string'},
1569 'params': {'patternProperties': {'.*': {'additionalProperties': True,
1570 'type': 'object'}},
1571 'type': 'object'}},
1572 'required': ['description', 'params'],
1573 'type': 'object'},
1574 'CharmActions': {'additionalProperties': False,
1575 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}},
1576 'type': 'object'}},
1577 'type': 'object'},
1578 'CharmInfo': {'additionalProperties': False,
1579 'properties': {'actions': {'$ref': '#/definitions/CharmActions'},
1580 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}},
1581 'type': 'object'},
1582 'meta': {'$ref': '#/definitions/CharmMeta'},
1583 'metrics': {'$ref': '#/definitions/CharmMetrics'},
1584 'revision': {'type': 'integer'},
1585 'url': {'type': 'string'}},
1586 'required': ['revision', 'url', 'config'],
1587 'type': 'object'},
1588 'CharmMeta': {'additionalProperties': False,
1589 'properties': {'categories': {'items': {'type': 'string'},
1590 'type': 'array'},
1591 'description': {'type': 'string'},
1592 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}},
1593 'type': 'object'},
1594 'min-juju-version': {'type': 'string'},
1595 'name': {'type': 'string'},
1596 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}},
1597 'type': 'object'},
1598 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
1599 'type': 'object'},
1600 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
1601 'type': 'object'},
1602 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
1603 'type': 'object'},
1604 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}},
1605 'type': 'object'},
1606 'series': {'items': {'type': 'string'},
1607 'type': 'array'},
1608 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}},
1609 'type': 'object'},
1610 'subordinate': {'type': 'boolean'},
1611 'summary': {'type': 'string'},
1612 'tags': {'items': {'type': 'string'},
1613 'type': 'array'},
1614 'terms': {'items': {'type': 'string'},
1615 'type': 'array'}},
1616 'required': ['name',
1617 'summary',
1618 'description',
1619 'subordinate'],
1620 'type': 'object'},
1621 'CharmMetric': {'additionalProperties': False,
1622 'properties': {'description': {'type': 'string'},
1623 'type': {'type': 'string'}},
1624 'required': ['type', 'description'],
1625 'type': 'object'},
1626 'CharmMetrics': {'additionalProperties': False,
1627 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}},
1628 'type': 'object'},
1629 'plan': {'$ref': '#/definitions/CharmPlan'}},
1630 'required': ['metrics', 'plan'],
1631 'type': 'object'},
1632 'CharmOption': {'additionalProperties': False,
1633 'properties': {'default': {'additionalProperties': True,
1634 'type': 'object'},
1635 'description': {'type': 'string'},
1636 'type': {'type': 'string'}},
1637 'required': ['type'],
1638 'type': 'object'},
1639 'CharmPayloadClass': {'additionalProperties': False,
1640 'properties': {'name': {'type': 'string'},
1641 'type': {'type': 'string'}},
1642 'required': ['name', 'type'],
1643 'type': 'object'},
1644 'CharmPlan': {'additionalProperties': False,
1645 'properties': {'required': {'type': 'boolean'}},
1646 'required': ['required'],
1647 'type': 'object'},
1648 'CharmRelation': {'additionalProperties': False,
1649 'properties': {'interface': {'type': 'string'},
1650 'limit': {'type': 'integer'},
1651 'name': {'type': 'string'},
1652 'optional': {'type': 'boolean'},
1653 'role': {'type': 'string'},
1654 'scope': {'type': 'string'}},
1655 'required': ['name',
1656 'role',
1657 'interface',
1658 'optional',
1659 'limit',
1660 'scope'],
1661 'type': 'object'},
1662 'CharmResourceMeta': {'additionalProperties': False,
1663 'properties': {'description': {'type': 'string'},
1664 'name': {'type': 'string'},
1665 'path': {'type': 'string'},
1666 'type': {'type': 'string'}},
1667 'required': ['name',
1668 'type',
1669 'path',
1670 'description'],
1671 'type': 'object'},
1672 'CharmStorage': {'additionalProperties': False,
1673 'properties': {'count-max': {'type': 'integer'},
1674 'count-min': {'type': 'integer'},
1675 'description': {'type': 'string'},
1676 'location': {'type': 'string'},
1677 'minimum-size': {'type': 'integer'},
1678 'name': {'type': 'string'},
1679 'properties': {'items': {'type': 'string'},
1680 'type': 'array'},
1681 'read-only': {'type': 'boolean'},
1682 'shared': {'type': 'boolean'},
1683 'type': {'type': 'string'}},
1684 'required': ['name',
1685 'description',
1686 'type',
1687 'shared',
1688 'read-only',
1689 'count-min',
1690 'count-max',
1691 'minimum-size'],
1692 'type': 'object'},
1693 'CharmURL': {'additionalProperties': False,
1694 'properties': {'url': {'type': 'string'}},
1695 'required': ['url'],
1696 'type': 'object'},
1697 'CharmsList': {'additionalProperties': False,
1698 'properties': {'names': {'items': {'type': 'string'},
1699 'type': 'array'}},
1700 'required': ['names'],
1701 'type': 'object'},
1702 'CharmsListResult': {'additionalProperties': False,
1703 'properties': {'charm-urls': {'items': {'type': 'string'},
1704 'type': 'array'}},
1705 'required': ['charm-urls'],
1706 'type': 'object'},
1707 'IsMeteredResult': {'additionalProperties': False,
1708 'properties': {'metered': {'type': 'boolean'}},
1709 'required': ['metered'],
1710 'type': 'object'}},
1711 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
1712 'Result': {'$ref': '#/definitions/CharmInfo'}},
1713 'type': 'object'},
1714 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
1715 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
1716 'type': 'object'},
1717 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
1718 'Result': {'$ref': '#/definitions/CharmsListResult'}},
1719 'type': 'object'}},
1720 'type': 'object'}
1721
1722
1723 @ReturnMapping(CharmInfo)
1724 async def CharmInfo(self, url):
1725 '''
1726 url : str
1727 Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>, _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str]
1728 '''
1729 # map input types to rpc msg
1730 _params = dict()
1731 msg = dict(type='Charms', request='CharmInfo', version=2, params=_params)
1732 _params['url'] = url
1733 reply = await self.rpc(msg)
1734 return reply
1735
1736
1737
1738 @ReturnMapping(IsMeteredResult)
1739 async def IsMetered(self, url):
1740 '''
1741 url : str
1742 Returns -> bool
1743 '''
1744 # map input types to rpc msg
1745 _params = dict()
1746 msg = dict(type='Charms', request='IsMetered', version=2, params=_params)
1747 _params['url'] = url
1748 reply = await self.rpc(msg)
1749 return reply
1750
1751
1752
1753 @ReturnMapping(CharmsListResult)
1754 async def List(self, names):
1755 '''
1756 names : typing.Sequence<+T_co>[str]
1757 Returns -> typing.Sequence<+T_co>[str]
1758 '''
1759 # map input types to rpc msg
1760 _params = dict()
1761 msg = dict(type='Charms', request='List', version=2, params=_params)
1762 _params['names'] = names
1763 reply = await self.rpc(msg)
1764 return reply
1765
1766
1767
1768 class CleanerFacade(Type):
1769 name = 'Cleaner'
1770 version = 2
1771 schema = {'definitions': {'Error': {'additionalProperties': False,
1772 'properties': {'code': {'type': 'string'},
1773 'info': {'$ref': '#/definitions/ErrorInfo'},
1774 'message': {'type': 'string'}},
1775 'required': ['message', 'code'],
1776 'type': 'object'},
1777 'ErrorInfo': {'additionalProperties': False,
1778 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1779 'macaroon-path': {'type': 'string'}},
1780 'type': 'object'},
1781 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1782 'NotifyWatchResult': {'additionalProperties': False,
1783 'properties': {'NotifyWatcherId': {'type': 'string'},
1784 'error': {'$ref': '#/definitions/Error'}},
1785 'required': ['NotifyWatcherId'],
1786 'type': 'object'}},
1787 'properties': {'Cleanup': {'type': 'object'},
1788 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1789 'type': 'object'}},
1790 'type': 'object'}
1791
1792
1793 @ReturnMapping(None)
1794 async def Cleanup(self):
1795 '''
1796
1797 Returns -> None
1798 '''
1799 # map input types to rpc msg
1800 _params = dict()
1801 msg = dict(type='Cleaner', request='Cleanup', version=2, params=_params)
1802
1803 reply = await self.rpc(msg)
1804 return reply
1805
1806
1807
1808 @ReturnMapping(NotifyWatchResult)
1809 async def WatchCleanups(self):
1810 '''
1811
1812 Returns -> typing.Union[str, _ForwardRef('Error')]
1813 '''
1814 # map input types to rpc msg
1815 _params = dict()
1816 msg = dict(type='Cleaner', request='WatchCleanups', version=2, params=_params)
1817
1818 reply = await self.rpc(msg)
1819 return reply
1820
1821
1822
1823 class DiscoverSpacesFacade(Type):
1824 name = 'DiscoverSpaces'
1825 version = 2
1826 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
1827 'properties': {'provider-network-id': {'type': 'string'},
1828 'space-tag': {'type': 'string'},
1829 'subnet-provider-id': {'type': 'string'},
1830 'subnet-tag': {'type': 'string'},
1831 'vlan-tag': {'type': 'integer'},
1832 'zones': {'items': {'type': 'string'},
1833 'type': 'array'}},
1834 'required': ['space-tag'],
1835 'type': 'object'},
1836 'AddSubnetsParams': {'additionalProperties': False,
1837 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
1838 'type': 'array'}},
1839 'required': ['subnets'],
1840 'type': 'object'},
1841 'CreateSpaceParams': {'additionalProperties': False,
1842 'properties': {'provider-id': {'type': 'string'},
1843 'public': {'type': 'boolean'},
1844 'space-tag': {'type': 'string'},
1845 'subnet-tags': {'items': {'type': 'string'},
1846 'type': 'array'}},
1847 'required': ['subnet-tags',
1848 'space-tag',
1849 'public'],
1850 'type': 'object'},
1851 'CreateSpacesParams': {'additionalProperties': False,
1852 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
1853 'type': 'array'}},
1854 'required': ['spaces'],
1855 'type': 'object'},
1856 'DiscoverSpacesResults': {'additionalProperties': False,
1857 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'},
1858 'type': 'array'}},
1859 'required': ['results'],
1860 'type': 'object'},
1861 'Error': {'additionalProperties': False,
1862 'properties': {'code': {'type': 'string'},
1863 'info': {'$ref': '#/definitions/ErrorInfo'},
1864 'message': {'type': 'string'}},
1865 'required': ['message', 'code'],
1866 'type': 'object'},
1867 'ErrorInfo': {'additionalProperties': False,
1868 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1869 'macaroon-path': {'type': 'string'}},
1870 'type': 'object'},
1871 'ErrorResult': {'additionalProperties': False,
1872 'properties': {'error': {'$ref': '#/definitions/Error'}},
1873 'type': 'object'},
1874 'ErrorResults': {'additionalProperties': False,
1875 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1876 'type': 'array'}},
1877 'required': ['results'],
1878 'type': 'object'},
1879 'ListSubnetsResults': {'additionalProperties': False,
1880 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
1881 'type': 'array'}},
1882 'required': ['results'],
1883 'type': 'object'},
1884 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1885 'ModelConfigResult': {'additionalProperties': False,
1886 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1887 'type': 'object'}},
1888 'type': 'object'}},
1889 'required': ['config'],
1890 'type': 'object'},
1891 'ProviderSpace': {'additionalProperties': False,
1892 'properties': {'error': {'$ref': '#/definitions/Error'},
1893 'name': {'type': 'string'},
1894 'provider-id': {'type': 'string'},
1895 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
1896 'type': 'array'}},
1897 'required': ['name',
1898 'provider-id',
1899 'subnets'],
1900 'type': 'object'},
1901 'Subnet': {'additionalProperties': False,
1902 'properties': {'cidr': {'type': 'string'},
1903 'life': {'type': 'string'},
1904 'provider-id': {'type': 'string'},
1905 'provider-network-id': {'type': 'string'},
1906 'provider-space-id': {'type': 'string'},
1907 'space-tag': {'type': 'string'},
1908 'status': {'type': 'string'},
1909 'vlan-tag': {'type': 'integer'},
1910 'zones': {'items': {'type': 'string'},
1911 'type': 'array'}},
1912 'required': ['cidr',
1913 'vlan-tag',
1914 'life',
1915 'space-tag',
1916 'zones'],
1917 'type': 'object'},
1918 'SubnetsFilters': {'additionalProperties': False,
1919 'properties': {'space-tag': {'type': 'string'},
1920 'zone': {'type': 'string'}},
1921 'type': 'object'}},
1922 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
1923 'Result': {'$ref': '#/definitions/ErrorResults'}},
1924 'type': 'object'},
1925 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
1926 'Result': {'$ref': '#/definitions/ErrorResults'}},
1927 'type': 'object'},
1928 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
1929 'type': 'object'},
1930 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
1931 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
1932 'type': 'object'},
1933 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1934 'type': 'object'}},
1935 'type': 'object'}
1936
1937
1938 @ReturnMapping(ErrorResults)
1939 async def AddSubnets(self, subnets):
1940 '''
1941 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
1942 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1943 '''
1944 # map input types to rpc msg
1945 _params = dict()
1946 msg = dict(type='DiscoverSpaces', request='AddSubnets', version=2, params=_params)
1947 _params['subnets'] = subnets
1948 reply = await self.rpc(msg)
1949 return reply
1950
1951
1952
1953 @ReturnMapping(ErrorResults)
1954 async def CreateSpaces(self, spaces):
1955 '''
1956 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
1957 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1958 '''
1959 # map input types to rpc msg
1960 _params = dict()
1961 msg = dict(type='DiscoverSpaces', request='CreateSpaces', version=2, params=_params)
1962 _params['spaces'] = spaces
1963 reply = await self.rpc(msg)
1964 return reply
1965
1966
1967
1968 @ReturnMapping(DiscoverSpacesResults)
1969 async def ListSpaces(self):
1970 '''
1971
1972 Returns -> typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
1973 '''
1974 # map input types to rpc msg
1975 _params = dict()
1976 msg = dict(type='DiscoverSpaces', request='ListSpaces', version=2, params=_params)
1977
1978 reply = await self.rpc(msg)
1979 return reply
1980
1981
1982
1983 @ReturnMapping(ListSubnetsResults)
1984 async def ListSubnets(self, space_tag, zone):
1985 '''
1986 space_tag : str
1987 zone : str
1988 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
1989 '''
1990 # map input types to rpc msg
1991 _params = dict()
1992 msg = dict(type='DiscoverSpaces', request='ListSubnets', version=2, params=_params)
1993 _params['space-tag'] = space_tag
1994 _params['zone'] = zone
1995 reply = await self.rpc(msg)
1996 return reply
1997
1998
1999
2000 @ReturnMapping(ModelConfigResult)
2001 async def ModelConfig(self):
2002 '''
2003
2004 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
2005 '''
2006 # map input types to rpc msg
2007 _params = dict()
2008 msg = dict(type='DiscoverSpaces', request='ModelConfig', version=2, params=_params)
2009
2010 reply = await self.rpc(msg)
2011 return reply
2012
2013
2014
2015 class DiskManagerFacade(Type):
2016 name = 'DiskManager'
2017 version = 2
2018 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
2019 'properties': {'BusAddress': {'type': 'string'},
2020 'DeviceLinks': {'items': {'type': 'string'},
2021 'type': 'array'},
2022 'DeviceName': {'type': 'string'},
2023 'FilesystemType': {'type': 'string'},
2024 'HardwareId': {'type': 'string'},
2025 'InUse': {'type': 'boolean'},
2026 'Label': {'type': 'string'},
2027 'MountPoint': {'type': 'string'},
2028 'Size': {'type': 'integer'},
2029 'UUID': {'type': 'string'},
2030 'WWN': {'type': 'string'}},
2031 'required': ['DeviceName',
2032 'DeviceLinks',
2033 'Label',
2034 'UUID',
2035 'HardwareId',
2036 'WWN',
2037 'BusAddress',
2038 'Size',
2039 'FilesystemType',
2040 'InUse',
2041 'MountPoint'],
2042 'type': 'object'},
2043 'Error': {'additionalProperties': False,
2044 'properties': {'code': {'type': 'string'},
2045 'info': {'$ref': '#/definitions/ErrorInfo'},
2046 'message': {'type': 'string'}},
2047 'required': ['message', 'code'],
2048 'type': 'object'},
2049 'ErrorInfo': {'additionalProperties': False,
2050 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2051 'macaroon-path': {'type': 'string'}},
2052 'type': 'object'},
2053 'ErrorResult': {'additionalProperties': False,
2054 'properties': {'error': {'$ref': '#/definitions/Error'}},
2055 'type': 'object'},
2056 'ErrorResults': {'additionalProperties': False,
2057 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2058 'type': 'array'}},
2059 'required': ['results'],
2060 'type': 'object'},
2061 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2062 'MachineBlockDevices': {'additionalProperties': False,
2063 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
2064 'type': 'array'},
2065 'machine': {'type': 'string'}},
2066 'required': ['machine'],
2067 'type': 'object'},
2068 'SetMachineBlockDevices': {'additionalProperties': False,
2069 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
2070 'type': 'array'}},
2071 'required': ['machine-block-devices'],
2072 'type': 'object'}},
2073 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
2074 'Result': {'$ref': '#/definitions/ErrorResults'}},
2075 'type': 'object'}},
2076 'type': 'object'}
2077
2078
2079 @ReturnMapping(ErrorResults)
2080 async def SetMachineBlockDevices(self, machine_block_devices):
2081 '''
2082 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
2083 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2084 '''
2085 # map input types to rpc msg
2086 _params = dict()
2087 msg = dict(type='DiskManager', request='SetMachineBlockDevices', version=2, params=_params)
2088 _params['machine-block-devices'] = machine_block_devices
2089 reply = await self.rpc(msg)
2090 return reply
2091
2092
2093
2094 class EntityWatcherFacade(Type):
2095 name = 'EntityWatcher'
2096 version = 2
2097 schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
2098 'properties': {'changes': {'items': {'type': 'string'},
2099 'type': 'array'},
2100 'error': {'$ref': '#/definitions/Error'},
2101 'watcher-id': {'type': 'string'}},
2102 'required': ['watcher-id'],
2103 'type': 'object'},
2104 'Error': {'additionalProperties': False,
2105 'properties': {'code': {'type': 'string'},
2106 'info': {'$ref': '#/definitions/ErrorInfo'},
2107 'message': {'type': 'string'}},
2108 'required': ['message', 'code'],
2109 'type': 'object'},
2110 'ErrorInfo': {'additionalProperties': False,
2111 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2112 'macaroon-path': {'type': 'string'}},
2113 'type': 'object'},
2114 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2115 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
2116 'type': 'object'},
2117 'Stop': {'type': 'object'}},
2118 'type': 'object'}
2119
2120
2121 @ReturnMapping(EntitiesWatchResult)
2122 async def Next(self):
2123 '''
2124
2125 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
2126 '''
2127 # map input types to rpc msg
2128 _params = dict()
2129 msg = dict(type='EntityWatcher', request='Next', version=2, params=_params)
2130
2131 reply = await self.rpc(msg)
2132 return reply
2133
2134
2135
2136 @ReturnMapping(None)
2137 async def Stop(self):
2138 '''
2139
2140 Returns -> None
2141 '''
2142 # map input types to rpc msg
2143 _params = dict()
2144 msg = dict(type='EntityWatcher', request='Stop', version=2, params=_params)
2145
2146 reply = await self.rpc(msg)
2147 return reply
2148
2149
2150
2151 class FilesystemAttachmentsWatcherFacade(Type):
2152 name = 'FilesystemAttachmentsWatcher'
2153 version = 2
2154 schema = {'definitions': {'Error': {'additionalProperties': False,
2155 'properties': {'code': {'type': 'string'},
2156 'info': {'$ref': '#/definitions/ErrorInfo'},
2157 'message': {'type': 'string'}},
2158 'required': ['message', 'code'],
2159 'type': 'object'},
2160 'ErrorInfo': {'additionalProperties': False,
2161 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2162 'macaroon-path': {'type': 'string'}},
2163 'type': 'object'},
2164 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2165 'MachineStorageId': {'additionalProperties': False,
2166 'properties': {'attachment-tag': {'type': 'string'},
2167 'machine-tag': {'type': 'string'}},
2168 'required': ['machine-tag',
2169 'attachment-tag'],
2170 'type': 'object'},
2171 'MachineStorageIdsWatchResult': {'additionalProperties': False,
2172 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
2173 'type': 'array'},
2174 'error': {'$ref': '#/definitions/Error'},
2175 'watcher-id': {'type': 'string'}},
2176 'required': ['watcher-id',
2177 'changes'],
2178 'type': 'object'}},
2179 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
2180 'type': 'object'},
2181 'Stop': {'type': 'object'}},
2182 'type': 'object'}
2183
2184
2185 @ReturnMapping(MachineStorageIdsWatchResult)
2186 async def Next(self):
2187 '''
2188
2189 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
2190 '''
2191 # map input types to rpc msg
2192 _params = dict()
2193 msg = dict(type='FilesystemAttachmentsWatcher', request='Next', version=2, params=_params)
2194
2195 reply = await self.rpc(msg)
2196 return reply
2197
2198
2199
2200 @ReturnMapping(None)
2201 async def Stop(self):
2202 '''
2203
2204 Returns -> None
2205 '''
2206 # map input types to rpc msg
2207 _params = dict()
2208 msg = dict(type='FilesystemAttachmentsWatcher', request='Stop', version=2, params=_params)
2209
2210 reply = await self.rpc(msg)
2211 return reply
2212
2213
2214
2215 class HighAvailabilityFacade(Type):
2216 name = 'HighAvailability'
2217 version = 2
2218 schema = {'definitions': {'Address': {'additionalProperties': False,
2219 'properties': {'Scope': {'type': 'string'},
2220 'SpaceName': {'type': 'string'},
2221 'SpaceProviderId': {'type': 'string'},
2222 'Type': {'type': 'string'},
2223 'Value': {'type': 'string'}},
2224 'required': ['Value',
2225 'Type',
2226 'Scope',
2227 'SpaceName',
2228 'SpaceProviderId'],
2229 'type': 'object'},
2230 'ControllersChangeResult': {'additionalProperties': False,
2231 'properties': {'error': {'$ref': '#/definitions/Error'},
2232 'result': {'$ref': '#/definitions/ControllersChanges'}},
2233 'required': ['result'],
2234 'type': 'object'},
2235 'ControllersChangeResults': {'additionalProperties': False,
2236 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
2237 'type': 'array'}},
2238 'required': ['results'],
2239 'type': 'object'},
2240 'ControllersChanges': {'additionalProperties': False,
2241 'properties': {'added': {'items': {'type': 'string'},
2242 'type': 'array'},
2243 'converted': {'items': {'type': 'string'},
2244 'type': 'array'},
2245 'demoted': {'items': {'type': 'string'},
2246 'type': 'array'},
2247 'maintained': {'items': {'type': 'string'},
2248 'type': 'array'},
2249 'promoted': {'items': {'type': 'string'},
2250 'type': 'array'},
2251 'removed': {'items': {'type': 'string'},
2252 'type': 'array'}},
2253 'type': 'object'},
2254 'ControllersSpec': {'additionalProperties': False,
2255 'properties': {'constraints': {'$ref': '#/definitions/Value'},
2256 'num-controllers': {'type': 'integer'},
2257 'placement': {'items': {'type': 'string'},
2258 'type': 'array'},
2259 'series': {'type': 'string'}},
2260 'required': ['num-controllers'],
2261 'type': 'object'},
2262 'ControllersSpecs': {'additionalProperties': False,
2263 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
2264 'type': 'array'}},
2265 'required': ['specs'],
2266 'type': 'object'},
2267 'Error': {'additionalProperties': False,
2268 'properties': {'code': {'type': 'string'},
2269 'info': {'$ref': '#/definitions/ErrorInfo'},
2270 'message': {'type': 'string'}},
2271 'required': ['message', 'code'],
2272 'type': 'object'},
2273 'ErrorInfo': {'additionalProperties': False,
2274 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2275 'macaroon-path': {'type': 'string'}},
2276 'type': 'object'},
2277 'HAMember': {'additionalProperties': False,
2278 'properties': {'public-address': {'$ref': '#/definitions/Address'},
2279 'series': {'type': 'string'},
2280 'tag': {'type': 'string'}},
2281 'required': ['tag', 'public-address', 'series'],
2282 'type': 'object'},
2283 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2284 'Member': {'additionalProperties': False,
2285 'properties': {'Address': {'type': 'string'},
2286 'Arbiter': {'type': 'boolean'},
2287 'BuildIndexes': {'type': 'boolean'},
2288 'Hidden': {'type': 'boolean'},
2289 'Id': {'type': 'integer'},
2290 'Priority': {'type': 'number'},
2291 'SlaveDelay': {'type': 'integer'},
2292 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
2293 'type': 'object'},
2294 'Votes': {'type': 'integer'}},
2295 'required': ['Id',
2296 'Address',
2297 'Arbiter',
2298 'BuildIndexes',
2299 'Hidden',
2300 'Priority',
2301 'Tags',
2302 'SlaveDelay',
2303 'Votes'],
2304 'type': 'object'},
2305 'MongoUpgradeResults': {'additionalProperties': False,
2306 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
2307 'type': 'array'},
2308 'master': {'$ref': '#/definitions/HAMember'},
2309 'rs-members': {'items': {'$ref': '#/definitions/Member'},
2310 'type': 'array'}},
2311 'required': ['rs-members',
2312 'master',
2313 'ha-members'],
2314 'type': 'object'},
2315 'MongoVersion': {'additionalProperties': False,
2316 'properties': {'engine': {'type': 'string'},
2317 'major': {'type': 'integer'},
2318 'minor': {'type': 'integer'},
2319 'patch': {'type': 'string'}},
2320 'required': ['major',
2321 'minor',
2322 'patch',
2323 'engine'],
2324 'type': 'object'},
2325 'ResumeReplicationParams': {'additionalProperties': False,
2326 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
2327 'type': 'array'}},
2328 'required': ['members'],
2329 'type': 'object'},
2330 'UpgradeMongoParams': {'additionalProperties': False,
2331 'properties': {'target': {'$ref': '#/definitions/MongoVersion'}},
2332 'required': ['target'],
2333 'type': 'object'},
2334 'Value': {'additionalProperties': False,
2335 'properties': {'arch': {'type': 'string'},
2336 'container': {'type': 'string'},
2337 'cores': {'type': 'integer'},
2338 'cpu-power': {'type': 'integer'},
2339 'instance-type': {'type': 'string'},
2340 'mem': {'type': 'integer'},
2341 'root-disk': {'type': 'integer'},
2342 'spaces': {'items': {'type': 'string'},
2343 'type': 'array'},
2344 'tags': {'items': {'type': 'string'},
2345 'type': 'array'},
2346 'virt-type': {'type': 'string'}},
2347 'type': 'object'}},
2348 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
2349 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
2350 'type': 'object'},
2351 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
2352 'type': 'object'},
2353 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
2354 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
2355 'type': 'object'}},
2356 'type': 'object'}
2357
2358
2359 @ReturnMapping(ControllersChangeResults)
2360 async def EnableHA(self, specs):
2361 '''
2362 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
2363 Returns -> typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
2364 '''
2365 # map input types to rpc msg
2366 _params = dict()
2367 msg = dict(type='HighAvailability', request='EnableHA', version=2, params=_params)
2368 _params['specs'] = specs
2369 reply = await self.rpc(msg)
2370 return reply
2371
2372
2373
2374 @ReturnMapping(None)
2375 async def ResumeHAReplicationAfterUpgrade(self, members):
2376 '''
2377 members : typing.Sequence<+T_co>[~Member]<~Member>
2378 Returns -> None
2379 '''
2380 # map input types to rpc msg
2381 _params = dict()
2382 msg = dict(type='HighAvailability', request='ResumeHAReplicationAfterUpgrade', version=2, params=_params)
2383 _params['members'] = members
2384 reply = await self.rpc(msg)
2385 return reply
2386
2387
2388
2389 @ReturnMapping(MongoUpgradeResults)
2390 async def StopHAReplicationForUpgrade(self, target):
2391 '''
2392 target : MongoVersion
2393 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence<+T_co>[~Member]<~Member>]
2394 '''
2395 # map input types to rpc msg
2396 _params = dict()
2397 msg = dict(type='HighAvailability', request='StopHAReplicationForUpgrade', version=2, params=_params)
2398 _params['target'] = target
2399 reply = await self.rpc(msg)
2400 return reply
2401
2402
2403
2404 class ImageManagerFacade(Type):
2405 name = 'ImageManager'
2406 version = 2
2407 schema = {'definitions': {'Error': {'additionalProperties': False,
2408 'properties': {'code': {'type': 'string'},
2409 'info': {'$ref': '#/definitions/ErrorInfo'},
2410 'message': {'type': 'string'}},
2411 'required': ['message', 'code'],
2412 'type': 'object'},
2413 'ErrorInfo': {'additionalProperties': False,
2414 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2415 'macaroon-path': {'type': 'string'}},
2416 'type': 'object'},
2417 'ErrorResult': {'additionalProperties': False,
2418 'properties': {'error': {'$ref': '#/definitions/Error'}},
2419 'type': 'object'},
2420 'ErrorResults': {'additionalProperties': False,
2421 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2422 'type': 'array'}},
2423 'required': ['results'],
2424 'type': 'object'},
2425 'ImageFilterParams': {'additionalProperties': False,
2426 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
2427 'type': 'array'}},
2428 'required': ['images'],
2429 'type': 'object'},
2430 'ImageMetadata': {'additionalProperties': False,
2431 'properties': {'arch': {'type': 'string'},
2432 'created': {'format': 'date-time',
2433 'type': 'string'},
2434 'kind': {'type': 'string'},
2435 'series': {'type': 'string'},
2436 'url': {'type': 'string'}},
2437 'required': ['kind',
2438 'arch',
2439 'series',
2440 'url',
2441 'created'],
2442 'type': 'object'},
2443 'ImageSpec': {'additionalProperties': False,
2444 'properties': {'arch': {'type': 'string'},
2445 'kind': {'type': 'string'},
2446 'series': {'type': 'string'}},
2447 'required': ['kind', 'arch', 'series'],
2448 'type': 'object'},
2449 'ListImageResult': {'additionalProperties': False,
2450 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
2451 'type': 'array'}},
2452 'required': ['result'],
2453 'type': 'object'},
2454 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2455 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
2456 'Result': {'$ref': '#/definitions/ErrorResults'}},
2457 'type': 'object'},
2458 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
2459 'Result': {'$ref': '#/definitions/ListImageResult'}},
2460 'type': 'object'}},
2461 'type': 'object'}
2462
2463
2464 @ReturnMapping(ErrorResults)
2465 async def DeleteImages(self, images):
2466 '''
2467 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
2468 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2469 '''
2470 # map input types to rpc msg
2471 _params = dict()
2472 msg = dict(type='ImageManager', request='DeleteImages', version=2, params=_params)
2473 _params['images'] = images
2474 reply = await self.rpc(msg)
2475 return reply
2476
2477
2478
2479 @ReturnMapping(ListImageResult)
2480 async def ListImages(self, images):
2481 '''
2482 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
2483 Returns -> typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
2484 '''
2485 # map input types to rpc msg
2486 _params = dict()
2487 msg = dict(type='ImageManager', request='ListImages', version=2, params=_params)
2488 _params['images'] = images
2489 reply = await self.rpc(msg)
2490 return reply
2491
2492
2493
2494 class ImageMetadataFacade(Type):
2495 name = 'ImageMetadata'
2496 version = 2
2497 schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
2498 'properties': {'arch': {'type': 'string'},
2499 'image-id': {'type': 'string'},
2500 'priority': {'type': 'integer'},
2501 'region': {'type': 'string'},
2502 'root-storage-size': {'type': 'integer'},
2503 'root-storage-type': {'type': 'string'},
2504 'series': {'type': 'string'},
2505 'source': {'type': 'string'},
2506 'stream': {'type': 'string'},
2507 'version': {'type': 'string'},
2508 'virt-type': {'type': 'string'}},
2509 'required': ['image-id',
2510 'region',
2511 'version',
2512 'series',
2513 'arch',
2514 'source',
2515 'priority'],
2516 'type': 'object'},
2517 'CloudImageMetadataList': {'additionalProperties': False,
2518 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
2519 'type': 'array'}},
2520 'type': 'object'},
2521 'Error': {'additionalProperties': False,
2522 'properties': {'code': {'type': 'string'},
2523 'info': {'$ref': '#/definitions/ErrorInfo'},
2524 'message': {'type': 'string'}},
2525 'required': ['message', 'code'],
2526 'type': 'object'},
2527 'ErrorInfo': {'additionalProperties': False,
2528 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2529 'macaroon-path': {'type': 'string'}},
2530 'type': 'object'},
2531 'ErrorResult': {'additionalProperties': False,
2532 'properties': {'error': {'$ref': '#/definitions/Error'}},
2533 'type': 'object'},
2534 'ErrorResults': {'additionalProperties': False,
2535 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2536 'type': 'array'}},
2537 'required': ['results'],
2538 'type': 'object'},
2539 'ImageMetadataFilter': {'additionalProperties': False,
2540 'properties': {'arches': {'items': {'type': 'string'},
2541 'type': 'array'},
2542 'region': {'type': 'string'},
2543 'root-storage-type': {'type': 'string'},
2544 'series': {'items': {'type': 'string'},
2545 'type': 'array'},
2546 'stream': {'type': 'string'},
2547 'virt-type': {'type': 'string'}},
2548 'type': 'object'},
2549 'ListCloudImageMetadataResult': {'additionalProperties': False,
2550 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
2551 'type': 'array'}},
2552 'required': ['result'],
2553 'type': 'object'},
2554 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2555 'MetadataImageIds': {'additionalProperties': False,
2556 'properties': {'image-ids': {'items': {'type': 'string'},
2557 'type': 'array'}},
2558 'required': ['image-ids'],
2559 'type': 'object'},
2560 'MetadataSaveParams': {'additionalProperties': False,
2561 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
2562 'type': 'array'}},
2563 'type': 'object'}},
2564 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
2565 'Result': {'$ref': '#/definitions/ErrorResults'}},
2566 'type': 'object'},
2567 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
2568 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
2569 'type': 'object'},
2570 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
2571 'Result': {'$ref': '#/definitions/ErrorResults'}},
2572 'type': 'object'},
2573 'UpdateFromPublishedImages': {'type': 'object'}},
2574 'type': 'object'}
2575
2576
2577 @ReturnMapping(ErrorResults)
2578 async def Delete(self, image_ids):
2579 '''
2580 image_ids : typing.Sequence<+T_co>[str]
2581 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2582 '''
2583 # map input types to rpc msg
2584 _params = dict()
2585 msg = dict(type='ImageMetadata', request='Delete', version=2, params=_params)
2586 _params['image-ids'] = image_ids
2587 reply = await self.rpc(msg)
2588 return reply
2589
2590
2591
2592 @ReturnMapping(ListCloudImageMetadataResult)
2593 async def List(self, arches, region, root_storage_type, series, stream, virt_type):
2594 '''
2595 arches : typing.Sequence<+T_co>[str]
2596 region : str
2597 root_storage_type : str
2598 series : typing.Sequence<+T_co>[str]
2599 stream : str
2600 virt_type : str
2601 Returns -> typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
2602 '''
2603 # map input types to rpc msg
2604 _params = dict()
2605 msg = dict(type='ImageMetadata', request='List', version=2, params=_params)
2606 _params['arches'] = arches
2607 _params['region'] = region
2608 _params['root-storage-type'] = root_storage_type
2609 _params['series'] = series
2610 _params['stream'] = stream
2611 _params['virt-type'] = virt_type
2612 reply = await self.rpc(msg)
2613 return reply
2614
2615
2616
2617 @ReturnMapping(ErrorResults)
2618 async def Save(self, metadata):
2619 '''
2620 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
2621 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2622 '''
2623 # map input types to rpc msg
2624 _params = dict()
2625 msg = dict(type='ImageMetadata', request='Save', version=2, params=_params)
2626 _params['metadata'] = metadata
2627 reply = await self.rpc(msg)
2628 return reply
2629
2630
2631
2632 @ReturnMapping(None)
2633 async def UpdateFromPublishedImages(self):
2634 '''
2635
2636 Returns -> None
2637 '''
2638 # map input types to rpc msg
2639 _params = dict()
2640 msg = dict(type='ImageMetadata', request='UpdateFromPublishedImages', version=2, params=_params)
2641
2642 reply = await self.rpc(msg)
2643 return reply
2644
2645
2646
2647 class LeadershipServiceFacade(Type):
2648 name = 'LeadershipService'
2649 version = 2
2650 schema = {'definitions': {'ApplicationTag': {'additionalProperties': False,
2651 'properties': {'Name': {'type': 'string'}},
2652 'required': ['Name'],
2653 'type': 'object'},
2654 'ClaimLeadershipBulkParams': {'additionalProperties': False,
2655 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
2656 'type': 'array'}},
2657 'required': ['params'],
2658 'type': 'object'},
2659 'ClaimLeadershipBulkResults': {'additionalProperties': False,
2660 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2661 'type': 'array'}},
2662 'required': ['results'],
2663 'type': 'object'},
2664 'ClaimLeadershipParams': {'additionalProperties': False,
2665 'properties': {'application-tag': {'type': 'string'},
2666 'duration': {'type': 'number'},
2667 'unit-tag': {'type': 'string'}},
2668 'required': ['application-tag',
2669 'unit-tag',
2670 'duration'],
2671 'type': 'object'},
2672 'Error': {'additionalProperties': False,
2673 'properties': {'code': {'type': 'string'},
2674 'info': {'$ref': '#/definitions/ErrorInfo'},
2675 'message': {'type': 'string'}},
2676 'required': ['message', 'code'],
2677 'type': 'object'},
2678 'ErrorInfo': {'additionalProperties': False,
2679 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2680 'macaroon-path': {'type': 'string'}},
2681 'type': 'object'},
2682 'ErrorResult': {'additionalProperties': False,
2683 'properties': {'error': {'$ref': '#/definitions/Error'}},
2684 'type': 'object'},
2685 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2686 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
2687 'Result': {'$ref': '#/definitions/ErrorResult'}},
2688 'type': 'object'},
2689 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
2690 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
2691 'type': 'object'}},
2692 'type': 'object'}
2693
2694
2695 @ReturnMapping(ErrorResult)
2696 async def BlockUntilLeadershipReleased(self, name):
2697 '''
2698 name : str
2699 Returns -> Error
2700 '''
2701 # map input types to rpc msg
2702 _params = dict()
2703 msg = dict(type='LeadershipService', request='BlockUntilLeadershipReleased', version=2, params=_params)
2704 _params['Name'] = name
2705 reply = await self.rpc(msg)
2706 return reply
2707
2708
2709
2710 @ReturnMapping(ClaimLeadershipBulkResults)
2711 async def ClaimLeadership(self, params):
2712 '''
2713 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
2714 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2715 '''
2716 # map input types to rpc msg
2717 _params = dict()
2718 msg = dict(type='LeadershipService', request='ClaimLeadership', version=2, params=_params)
2719 _params['params'] = params
2720 reply = await self.rpc(msg)
2721 return reply
2722
2723
2724
2725 class MachineManagerFacade(Type):
2726 name = 'MachineManager'
2727 version = 2
2728 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
2729 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
2730 'type': 'array'},
2731 'constraints': {'$ref': '#/definitions/Value'},
2732 'container-type': {'type': 'string'},
2733 'disks': {'items': {'$ref': '#/definitions/Constraints'},
2734 'type': 'array'},
2735 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2736 'instance-id': {'type': 'string'},
2737 'jobs': {'items': {'type': 'string'},
2738 'type': 'array'},
2739 'nonce': {'type': 'string'},
2740 'parent-id': {'type': 'string'},
2741 'placement': {'$ref': '#/definitions/Placement'},
2742 'series': {'type': 'string'}},
2743 'required': ['series',
2744 'constraints',
2745 'jobs',
2746 'parent-id',
2747 'container-type',
2748 'instance-id',
2749 'nonce',
2750 'hardware-characteristics',
2751 'addresses'],
2752 'type': 'object'},
2753 'AddMachines': {'additionalProperties': False,
2754 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
2755 'type': 'array'}},
2756 'required': ['params'],
2757 'type': 'object'},
2758 'AddMachinesResult': {'additionalProperties': False,
2759 'properties': {'error': {'$ref': '#/definitions/Error'},
2760 'machine': {'type': 'string'}},
2761 'required': ['machine'],
2762 'type': 'object'},
2763 'AddMachinesResults': {'additionalProperties': False,
2764 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
2765 'type': 'array'}},
2766 'required': ['machines'],
2767 'type': 'object'},
2768 'Address': {'additionalProperties': False,
2769 'properties': {'scope': {'type': 'string'},
2770 'space-name': {'type': 'string'},
2771 'type': {'type': 'string'},
2772 'value': {'type': 'string'}},
2773 'required': ['value', 'type', 'scope'],
2774 'type': 'object'},
2775 'Constraints': {'additionalProperties': False,
2776 'properties': {'Count': {'type': 'integer'},
2777 'Pool': {'type': 'string'},
2778 'Size': {'type': 'integer'}},
2779 'required': ['Pool', 'Size', 'Count'],
2780 'type': 'object'},
2781 'Error': {'additionalProperties': False,
2782 'properties': {'code': {'type': 'string'},
2783 'info': {'$ref': '#/definitions/ErrorInfo'},
2784 'message': {'type': 'string'}},
2785 'required': ['message', 'code'],
2786 'type': 'object'},
2787 'ErrorInfo': {'additionalProperties': False,
2788 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2789 'macaroon-path': {'type': 'string'}},
2790 'type': 'object'},
2791 'HardwareCharacteristics': {'additionalProperties': False,
2792 'properties': {'arch': {'type': 'string'},
2793 'availability-zone': {'type': 'string'},
2794 'cpu-cores': {'type': 'integer'},
2795 'cpu-power': {'type': 'integer'},
2796 'mem': {'type': 'integer'},
2797 'root-disk': {'type': 'integer'},
2798 'tags': {'items': {'type': 'string'},
2799 'type': 'array'}},
2800 'type': 'object'},
2801 'InstanceType': {'additionalProperties': False,
2802 'properties': {'arches': {'items': {'type': 'string'},
2803 'type': 'array'},
2804 'cost': {'type': 'integer'},
2805 'cpu-cores': {'type': 'integer'},
2806 'deprecated': {'type': 'boolean'},
2807 'memory': {'type': 'integer'},
2808 'name': {'type': 'string'},
2809 'root-disk': {'type': 'integer'},
2810 'virt-type': {'type': 'string'}},
2811 'required': ['arches', 'cpu-cores', 'memory'],
2812 'type': 'object'},
2813 'InstanceTypesResult': {'additionalProperties': False,
2814 'properties': {'cost-currency': {'type': 'string'},
2815 'cost-divisor': {'type': 'integer'},
2816 'cost-unit': {'type': 'string'},
2817 'error': {'$ref': '#/definitions/Error'},
2818 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
2819 'type': 'array'}},
2820 'type': 'object'},
2821 'InstanceTypesResults': {'additionalProperties': False,
2822 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
2823 'type': 'array'}},
2824 'required': ['results'],
2825 'type': 'object'},
2826 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2827 'ModelInstanceTypesConstraint': {'additionalProperties': False,
2828 'properties': {'value': {'$ref': '#/definitions/Value'}},
2829 'type': 'object'},
2830 'ModelInstanceTypesConstraints': {'additionalProperties': False,
2831 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
2832 'type': 'array'}},
2833