Improved Primitive support and better testing
[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 'required': ['constraints'],
2834 'type': 'object'},
2835 'Placement': {'additionalProperties': False,
2836 'properties': {'directive': {'type': 'string'},
2837 'scope': {'type': 'string'}},
2838 'required': ['scope', 'directive'],
2839 'type': 'object'},
2840 'Value': {'additionalProperties': False,
2841 'properties': {'arch': {'type': 'string'},
2842 'container': {'type': 'string'},
2843 'cores': {'type': 'integer'},
2844 'cpu-power': {'type': 'integer'},
2845 'instance-type': {'type': 'string'},
2846 'mem': {'type': 'integer'},
2847 'root-disk': {'type': 'integer'},
2848 'spaces': {'items': {'type': 'string'},
2849 'type': 'array'},
2850 'tags': {'items': {'type': 'string'},
2851 'type': 'array'},
2852 'virt-type': {'type': 'string'}},
2853 'type': 'object'}},
2854 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2855 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2856 'type': 'object'},
2857 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
2858 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
2859 'type': 'object'}},
2860 'type': 'object'}
2861
2862
2863 @ReturnMapping(AddMachinesResults)
2864 async def AddMachines(self, params):
2865 '''
2866 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
2867 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
2868 '''
2869 # map input types to rpc msg
2870 _params = dict()
2871 msg = dict(type='MachineManager', request='AddMachines', version=2, params=_params)
2872 _params['params'] = params
2873 reply = await self.rpc(msg)
2874 return reply
2875
2876
2877
2878 @ReturnMapping(InstanceTypesResults)
2879 async def InstanceTypes(self, constraints):
2880 '''
2881 constraints : typing.Sequence<+T_co>[~ModelInstanceTypesConstraint]<~ModelInstanceTypesConstraint>
2882 Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
2883 '''
2884 # map input types to rpc msg
2885 _params = dict()
2886 msg = dict(type='MachineManager', request='InstanceTypes', version=2, params=_params)
2887 _params['constraints'] = constraints
2888 reply = await self.rpc(msg)
2889 return reply
2890
2891
2892
2893 class MetricsAdderFacade(Type):
2894 name = 'MetricsAdder'
2895 version = 2
2896 schema = {'definitions': {'Error': {'additionalProperties': False,
2897 'properties': {'code': {'type': 'string'},
2898 'info': {'$ref': '#/definitions/ErrorInfo'},
2899 'message': {'type': 'string'}},
2900 'required': ['message', 'code'],
2901 'type': 'object'},
2902 'ErrorInfo': {'additionalProperties': False,
2903 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2904 'macaroon-path': {'type': 'string'}},
2905 'type': 'object'},
2906 'ErrorResult': {'additionalProperties': False,
2907 'properties': {'error': {'$ref': '#/definitions/Error'}},
2908 'type': 'object'},
2909 'ErrorResults': {'additionalProperties': False,
2910 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2911 'type': 'array'}},
2912 'required': ['results'],
2913 'type': 'object'},
2914 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2915 'Metric': {'additionalProperties': False,
2916 'properties': {'key': {'type': 'string'},
2917 'time': {'format': 'date-time',
2918 'type': 'string'},
2919 'value': {'type': 'string'}},
2920 'required': ['key', 'value', 'time'],
2921 'type': 'object'},
2922 'MetricBatch': {'additionalProperties': False,
2923 'properties': {'charm-url': {'type': 'string'},
2924 'created': {'format': 'date-time',
2925 'type': 'string'},
2926 'metrics': {'items': {'$ref': '#/definitions/Metric'},
2927 'type': 'array'},
2928 'uuid': {'type': 'string'}},
2929 'required': ['uuid',
2930 'charm-url',
2931 'created',
2932 'metrics'],
2933 'type': 'object'},
2934 'MetricBatchParam': {'additionalProperties': False,
2935 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
2936 'tag': {'type': 'string'}},
2937 'required': ['tag', 'batch'],
2938 'type': 'object'},
2939 'MetricBatchParams': {'additionalProperties': False,
2940 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
2941 'type': 'array'}},
2942 'required': ['batches'],
2943 'type': 'object'}},
2944 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
2945 'Result': {'$ref': '#/definitions/ErrorResults'}},
2946 'type': 'object'}},
2947 'type': 'object'}
2948
2949
2950 @ReturnMapping(ErrorResults)
2951 async def AddMetricBatches(self, batches):
2952 '''
2953 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
2954 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2955 '''
2956 # map input types to rpc msg
2957 _params = dict()
2958 msg = dict(type='MetricsAdder', request='AddMetricBatches', version=2, params=_params)
2959 _params['batches'] = batches
2960 reply = await self.rpc(msg)
2961 return reply
2962
2963
2964
2965 class MetricsDebugFacade(Type):
2966 name = 'MetricsDebug'
2967 version = 2
2968 schema = {'definitions': {'Entities': {'additionalProperties': False,
2969 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2970 'type': 'array'}},
2971 'required': ['entities'],
2972 'type': 'object'},
2973 'Entity': {'additionalProperties': False,
2974 'properties': {'tag': {'type': 'string'}},
2975 'required': ['tag'],
2976 'type': 'object'},
2977 'EntityMetrics': {'additionalProperties': False,
2978 'properties': {'error': {'$ref': '#/definitions/Error'},
2979 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
2980 'type': 'array'}},
2981 'type': 'object'},
2982 'Error': {'additionalProperties': False,
2983 'properties': {'code': {'type': 'string'},
2984 'info': {'$ref': '#/definitions/ErrorInfo'},
2985 'message': {'type': 'string'}},
2986 'required': ['message', 'code'],
2987 'type': 'object'},
2988 'ErrorInfo': {'additionalProperties': False,
2989 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2990 'macaroon-path': {'type': 'string'}},
2991 'type': 'object'},
2992 'ErrorResult': {'additionalProperties': False,
2993 'properties': {'error': {'$ref': '#/definitions/Error'}},
2994 'type': 'object'},
2995 'ErrorResults': {'additionalProperties': False,
2996 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2997 'type': 'array'}},
2998 'required': ['results'],
2999 'type': 'object'},
3000 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3001 'MeterStatusParam': {'additionalProperties': False,
3002 'properties': {'code': {'type': 'string'},
3003 'info': {'type': 'string'},
3004 'tag': {'type': 'string'}},
3005 'required': ['tag', 'code', 'info'],
3006 'type': 'object'},
3007 'MeterStatusParams': {'additionalProperties': False,
3008 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
3009 'type': 'array'}},
3010 'required': ['statues'],
3011 'type': 'object'},
3012 'MetricResult': {'additionalProperties': False,
3013 'properties': {'key': {'type': 'string'},
3014 'time': {'format': 'date-time',
3015 'type': 'string'},
3016 'unit': {'type': 'string'},
3017 'value': {'type': 'string'}},
3018 'required': ['time', 'key', 'value', 'unit'],
3019 'type': 'object'},
3020 'MetricResults': {'additionalProperties': False,
3021 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
3022 'type': 'array'}},
3023 'required': ['results'],
3024 'type': 'object'}},
3025 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3026 'Result': {'$ref': '#/definitions/MetricResults'}},
3027 'type': 'object'},
3028 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
3029 'Result': {'$ref': '#/definitions/ErrorResults'}},
3030 'type': 'object'}},
3031 'type': 'object'}
3032
3033
3034 @ReturnMapping(MetricResults)
3035 async def GetMetrics(self, entities):
3036 '''
3037 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3038 Returns -> typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
3039 '''
3040 # map input types to rpc msg
3041 _params = dict()
3042 msg = dict(type='MetricsDebug', request='GetMetrics', version=2, params=_params)
3043 _params['entities'] = entities
3044 reply = await self.rpc(msg)
3045 return reply
3046
3047
3048
3049 @ReturnMapping(ErrorResults)
3050 async def SetMeterStatus(self, statues):
3051 '''
3052 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
3053 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3054 '''
3055 # map input types to rpc msg
3056 _params = dict()
3057 msg = dict(type='MetricsDebug', request='SetMeterStatus', version=2, params=_params)
3058 _params['statues'] = statues
3059 reply = await self.rpc(msg)
3060 return reply
3061
3062
3063
3064 class ModelManagerFacade(Type):
3065 name = 'ModelManager'
3066 version = 2
3067 schema = {'definitions': {'Entities': {'additionalProperties': False,
3068 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3069 'type': 'array'}},
3070 'required': ['entities'],
3071 'type': 'object'},
3072 'Entity': {'additionalProperties': False,
3073 'properties': {'tag': {'type': 'string'}},
3074 'required': ['tag'],
3075 'type': 'object'},
3076 'EntityStatus': {'additionalProperties': False,
3077 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3078 'type': 'object'}},
3079 'type': 'object'},
3080 'info': {'type': 'string'},
3081 'since': {'format': 'date-time',
3082 'type': 'string'},
3083 'status': {'type': 'string'}},
3084 'required': ['status', 'info', 'since'],
3085 'type': 'object'},
3086 'Error': {'additionalProperties': False,
3087 'properties': {'code': {'type': 'string'},
3088 'info': {'$ref': '#/definitions/ErrorInfo'},
3089 'message': {'type': 'string'}},
3090 'required': ['message', 'code'],
3091 'type': 'object'},
3092 'ErrorInfo': {'additionalProperties': False,
3093 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3094 'macaroon-path': {'type': 'string'}},
3095 'type': 'object'},
3096 'ErrorResult': {'additionalProperties': False,
3097 'properties': {'error': {'$ref': '#/definitions/Error'}},
3098 'type': 'object'},
3099 'ErrorResults': {'additionalProperties': False,
3100 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3101 'type': 'array'}},
3102 'required': ['results'],
3103 'type': 'object'},
3104 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3105 'MachineHardware': {'additionalProperties': False,
3106 'properties': {'arch': {'type': 'string'},
3107 'availability-zone': {'type': 'string'},
3108 'cores': {'type': 'integer'},
3109 'cpu-power': {'type': 'integer'},
3110 'mem': {'type': 'integer'},
3111 'root-disk': {'type': 'integer'},
3112 'tags': {'items': {'type': 'string'},
3113 'type': 'array'}},
3114 'type': 'object'},
3115 'MapResult': {'additionalProperties': False,
3116 'properties': {'error': {'$ref': '#/definitions/Error'},
3117 'result': {'patternProperties': {'.*': {'additionalProperties': True,
3118 'type': 'object'}},
3119 'type': 'object'}},
3120 'required': ['result'],
3121 'type': 'object'},
3122 'MapResults': {'additionalProperties': False,
3123 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
3124 'type': 'array'}},
3125 'required': ['results'],
3126 'type': 'object'},
3127 'Model': {'additionalProperties': False,
3128 'properties': {'name': {'type': 'string'},
3129 'owner-tag': {'type': 'string'},
3130 'uuid': {'type': 'string'}},
3131 'required': ['name', 'uuid', 'owner-tag'],
3132 'type': 'object'},
3133 'ModelCreateArgs': {'additionalProperties': False,
3134 'properties': {'cloud-tag': {'type': 'string'},
3135 'config': {'patternProperties': {'.*': {'additionalProperties': True,
3136 'type': 'object'}},
3137 'type': 'object'},
3138 'credential': {'type': 'string'},
3139 'name': {'type': 'string'},
3140 'owner-tag': {'type': 'string'},
3141 'region': {'type': 'string'}},
3142 'required': ['name', 'owner-tag'],
3143 'type': 'object'},
3144 'ModelDefaultValues': {'additionalProperties': False,
3145 'properties': {'cloud-region': {'type': 'string'},
3146 'cloud-tag': {'type': 'string'},
3147 'config': {'patternProperties': {'.*': {'additionalProperties': True,
3148 'type': 'object'}},
3149 'type': 'object'}},
3150 'required': ['config'],
3151 'type': 'object'},
3152 'ModelDefaults': {'additionalProperties': False,
3153 'properties': {'controller': {'additionalProperties': True,
3154 'type': 'object'},
3155 'default': {'additionalProperties': True,
3156 'type': 'object'},
3157 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
3158 'type': 'array'}},
3159 'type': 'object'},
3160 'ModelDefaultsResult': {'additionalProperties': False,
3161 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
3162 'type': 'object'}},
3163 'required': ['config'],
3164 'type': 'object'},
3165 'ModelInfo': {'additionalProperties': False,
3166 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
3167 'cloud-credential-tag': {'type': 'string'},
3168 'cloud-region': {'type': 'string'},
3169 'cloud-tag': {'type': 'string'},
3170 'controller-uuid': {'type': 'string'},
3171 'default-series': {'type': 'string'},
3172 'life': {'type': 'string'},
3173 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
3174 'type': 'array'},
3175 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
3176 'name': {'type': 'string'},
3177 'owner-tag': {'type': 'string'},
3178 'provider-type': {'type': 'string'},
3179 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
3180 'status': {'$ref': '#/definitions/EntityStatus'},
3181 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
3182 'type': 'array'},
3183 'uuid': {'type': 'string'}},
3184 'required': ['name',
3185 'uuid',
3186 'controller-uuid',
3187 'cloud-tag',
3188 'owner-tag',
3189 'life',
3190 'users',
3191 'machines',
3192 'sla',
3193 'agent-version'],
3194 'type': 'object'},
3195 'ModelInfoResult': {'additionalProperties': False,
3196 'properties': {'error': {'$ref': '#/definitions/Error'},
3197 'result': {'$ref': '#/definitions/ModelInfo'}},
3198 'type': 'object'},
3199 'ModelInfoResults': {'additionalProperties': False,
3200 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
3201 'type': 'array'}},
3202 'required': ['results'],
3203 'type': 'object'},
3204 'ModelMachineInfo': {'additionalProperties': False,
3205 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
3206 'has-vote': {'type': 'boolean'},
3207 'id': {'type': 'string'},
3208 'instance-id': {'type': 'string'},
3209 'status': {'type': 'string'},
3210 'wants-vote': {'type': 'boolean'}},
3211 'required': ['id'],
3212 'type': 'object'},
3213 'ModelMigrationStatus': {'additionalProperties': False,
3214 'properties': {'end': {'format': 'date-time',
3215 'type': 'string'},
3216 'start': {'format': 'date-time',
3217 'type': 'string'},
3218 'status': {'type': 'string'}},
3219 'required': ['status', 'start'],
3220 'type': 'object'},
3221 'ModelSLAInfo': {'additionalProperties': False,
3222 'properties': {'level': {'type': 'string'},
3223 'owner': {'type': 'string'}},
3224 'required': ['level', 'owner'],
3225 'type': 'object'},
3226 'ModelStatus': {'additionalProperties': False,
3227 'properties': {'application-count': {'type': 'integer'},
3228 'hosted-machine-count': {'type': 'integer'},
3229 'life': {'type': 'string'},
3230 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
3231 'type': 'array'},
3232 'model-tag': {'type': 'string'},
3233 'owner-tag': {'type': 'string'}},
3234 'required': ['model-tag',
3235 'life',
3236 'hosted-machine-count',
3237 'application-count',
3238 'owner-tag'],
3239 'type': 'object'},
3240 'ModelStatusResults': {'additionalProperties': False,
3241 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
3242 'type': 'array'}},
3243 'required': ['models'],
3244 'type': 'object'},
3245 'ModelUnsetKeys': {'additionalProperties': False,
3246 'properties': {'cloud-region': {'type': 'string'},
3247 'cloud-tag': {'type': 'string'},
3248 'keys': {'items': {'type': 'string'},
3249 'type': 'array'}},
3250 'required': ['keys'],
3251 'type': 'object'},
3252 'ModelUserInfo': {'additionalProperties': False,
3253 'properties': {'access': {'type': 'string'},
3254 'display-name': {'type': 'string'},
3255 'last-connection': {'format': 'date-time',
3256 'type': 'string'},
3257 'user': {'type': 'string'}},
3258 'required': ['user',
3259 'display-name',
3260 'last-connection',
3261 'access'],
3262 'type': 'object'},
3263 'ModifyModelAccess': {'additionalProperties': False,
3264 'properties': {'access': {'type': 'string'},
3265 'action': {'type': 'string'},
3266 'model-tag': {'type': 'string'},
3267 'user-tag': {'type': 'string'}},
3268 'required': ['user-tag',
3269 'action',
3270 'access',
3271 'model-tag'],
3272 'type': 'object'},
3273 'ModifyModelAccessRequest': {'additionalProperties': False,
3274 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
3275 'type': 'array'}},
3276 'required': ['changes'],
3277 'type': 'object'},
3278 'Number': {'additionalProperties': False,
3279 'properties': {'Build': {'type': 'integer'},
3280 'Major': {'type': 'integer'},
3281 'Minor': {'type': 'integer'},
3282 'Patch': {'type': 'integer'},
3283 'Tag': {'type': 'string'}},
3284 'required': ['Major',
3285 'Minor',
3286 'Tag',
3287 'Patch',
3288 'Build'],
3289 'type': 'object'},
3290 'RegionDefaults': {'additionalProperties': False,
3291 'properties': {'region-name': {'type': 'string'},
3292 'value': {'additionalProperties': True,
3293 'type': 'object'}},
3294 'required': ['region-name', 'value'],
3295 'type': 'object'},
3296 'SetModelDefaults': {'additionalProperties': False,
3297 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
3298 'type': 'array'}},
3299 'required': ['config'],
3300 'type': 'object'},
3301 'UnsetModelDefaults': {'additionalProperties': False,
3302 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
3303 'type': 'array'}},
3304 'required': ['keys'],
3305 'type': 'object'},
3306 'UserModel': {'additionalProperties': False,
3307 'properties': {'last-connection': {'format': 'date-time',
3308 'type': 'string'},
3309 'model': {'$ref': '#/definitions/Model'}},
3310 'required': ['model', 'last-connection'],
3311 'type': 'object'},
3312 'UserModelList': {'additionalProperties': False,
3313 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
3314 'type': 'array'}},
3315 'required': ['user-models'],
3316 'type': 'object'}},
3317 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
3318 'Result': {'$ref': '#/definitions/ModelInfo'}},
3319 'type': 'object'},
3320 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3321 'Result': {'$ref': '#/definitions/ErrorResults'}},
3322 'type': 'object'},
3323 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3324 'Result': {'$ref': '#/definitions/MapResults'}},
3325 'type': 'object'},
3326 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3327 'Result': {'$ref': '#/definitions/MapResults'}},
3328 'type': 'object'},
3329 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
3330 'Result': {'$ref': '#/definitions/UserModelList'}},
3331 'type': 'object'},
3332 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
3333 'type': 'object'},
3334 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3335 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
3336 'type': 'object'},
3337 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3338 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
3339 'type': 'object'},
3340 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
3341 'Result': {'$ref': '#/definitions/ErrorResults'}},
3342 'type': 'object'},
3343 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
3344 'Result': {'$ref': '#/definitions/ErrorResults'}},
3345 'type': 'object'},
3346 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
3347 'Result': {'$ref': '#/definitions/ErrorResults'}},
3348 'type': 'object'}},
3349 'type': 'object'}
3350
3351
3352 @ReturnMapping(ModelInfo)
3353 async def CreateModel(self, cloud_tag, config, credential, name, owner_tag, region):
3354 '''
3355 cloud_tag : str
3356 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3357 credential : str
3358 name : str
3359 owner_tag : str
3360 region : str
3361 Returns -> typing.Union[_ForwardRef('Number'), _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
3362 '''
3363 # map input types to rpc msg
3364 _params = dict()
3365 msg = dict(type='ModelManager', request='CreateModel', version=2, params=_params)
3366 _params['cloud-tag'] = cloud_tag
3367 _params['config'] = config
3368 _params['credential'] = credential
3369 _params['name'] = name
3370 _params['owner-tag'] = owner_tag
3371 _params['region'] = region
3372 reply = await self.rpc(msg)
3373 return reply
3374
3375
3376
3377 @ReturnMapping(ErrorResults)
3378 async def DestroyModels(self, entities):
3379 '''
3380 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3381 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3382 '''
3383 # map input types to rpc msg
3384 _params = dict()
3385 msg = dict(type='ModelManager', request='DestroyModels', version=2, params=_params)
3386 _params['entities'] = entities
3387 reply = await self.rpc(msg)
3388 return reply
3389
3390
3391
3392 @ReturnMapping(MapResults)
3393 async def DumpModels(self, entities):
3394 '''
3395 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3396 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
3397 '''
3398 # map input types to rpc msg
3399 _params = dict()
3400 msg = dict(type='ModelManager', request='DumpModels', version=2, params=_params)
3401 _params['entities'] = entities
3402 reply = await self.rpc(msg)
3403 return reply
3404
3405
3406
3407 @ReturnMapping(MapResults)
3408 async def DumpModelsDB(self, entities):
3409 '''
3410 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3411 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
3412 '''
3413 # map input types to rpc msg
3414 _params = dict()
3415 msg = dict(type='ModelManager', request='DumpModelsDB', version=2, params=_params)
3416 _params['entities'] = entities
3417 reply = await self.rpc(msg)
3418 return reply
3419
3420
3421
3422 @ReturnMapping(UserModelList)
3423 async def ListModels(self, tag):
3424 '''
3425 tag : str
3426 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
3427 '''
3428 # map input types to rpc msg
3429 _params = dict()
3430 msg = dict(type='ModelManager', request='ListModels', version=2, params=_params)
3431 _params['tag'] = tag
3432 reply = await self.rpc(msg)
3433 return reply
3434
3435
3436
3437 @ReturnMapping(ModelDefaultsResult)
3438 async def ModelDefaults(self):
3439 '''
3440
3441 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
3442 '''
3443 # map input types to rpc msg
3444 _params = dict()
3445 msg = dict(type='ModelManager', request='ModelDefaults', version=2, params=_params)
3446
3447 reply = await self.rpc(msg)
3448 return reply
3449
3450
3451
3452 @ReturnMapping(ModelInfoResults)
3453 async def ModelInfo(self, entities):
3454 '''
3455 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3456 Returns -> typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
3457 '''
3458 # map input types to rpc msg
3459 _params = dict()
3460 msg = dict(type='ModelManager', request='ModelInfo', version=2, params=_params)
3461 _params['entities'] = entities
3462 reply = await self.rpc(msg)
3463 return reply
3464
3465
3466
3467 @ReturnMapping(ModelStatusResults)
3468 async def ModelStatus(self, entities):
3469 '''
3470 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3471 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
3472 '''
3473 # map input types to rpc msg
3474 _params = dict()
3475 msg = dict(type='ModelManager', request='ModelStatus', version=2, params=_params)
3476 _params['entities'] = entities
3477 reply = await self.rpc(msg)
3478 return reply
3479
3480
3481
3482 @ReturnMapping(ErrorResults)
3483 async def ModifyModelAccess(self, changes):
3484 '''
3485 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
3486 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3487 '''
3488 # map input types to rpc msg
3489 _params = dict()
3490 msg = dict(type='ModelManager', request='ModifyModelAccess', version=2, params=_params)
3491 _params['changes'] = changes
3492 reply = await self.rpc(msg)
3493 return reply
3494
3495
3496
3497 @ReturnMapping(ErrorResults)
3498 async def SetModelDefaults(self, config):
3499 '''
3500 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
3501 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3502 '''
3503 # map input types to rpc msg
3504 _params = dict()
3505 msg = dict(type='ModelManager', request='SetModelDefaults', version=2, params=_params)
3506 _params['config'] = config
3507 reply = await self.rpc(msg)
3508 return reply
3509
3510
3511
3512 @ReturnMapping(ErrorResults)
3513 async def UnsetModelDefaults(self, keys):
3514 '''
3515 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
3516 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3517 '''
3518 # map input types to rpc msg
3519 _params = dict()
3520 msg = dict(type='ModelManager', request='UnsetModelDefaults', version=2, params=_params)
3521 _params['keys'] = keys
3522 reply = await self.rpc(msg)
3523 return reply
3524
3525
3526
3527 class RebootFacade(Type):
3528 name = 'Reboot'
3529 version = 2
3530 schema = {'definitions': {'Entities': {'additionalProperties': False,
3531 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3532 'type': 'array'}},
3533 'required': ['entities'],
3534 'type': 'object'},
3535 'Entity': {'additionalProperties': False,
3536 'properties': {'tag': {'type': 'string'}},
3537 'required': ['tag'],
3538 'type': 'object'},
3539 'Error': {'additionalProperties': False,
3540 'properties': {'code': {'type': 'string'},
3541 'info': {'$ref': '#/definitions/ErrorInfo'},
3542 'message': {'type': 'string'}},
3543 'required': ['message', 'code'],
3544 'type': 'object'},
3545 'ErrorInfo': {'additionalProperties': False,
3546 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3547 'macaroon-path': {'type': 'string'}},
3548 'type': 'object'},
3549 'ErrorResult': {'additionalProperties': False,
3550 'properties': {'error': {'$ref': '#/definitions/Error'}},
3551 'type': 'object'},
3552 'ErrorResults': {'additionalProperties': False,
3553 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3554 'type': 'array'}},
3555 'required': ['results'],
3556 'type': 'object'},
3557 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3558 'NotifyWatchResult': {'additionalProperties': False,
3559 'properties': {'NotifyWatcherId': {'type': 'string'},
3560 'error': {'$ref': '#/definitions/Error'}},
3561 'required': ['NotifyWatcherId'],
3562 'type': 'object'},
3563 'RebootActionResult': {'additionalProperties': False,
3564 'properties': {'error': {'$ref': '#/definitions/Error'},
3565 'result': {'type': 'string'}},
3566 'type': 'object'},
3567 'RebootActionResults': {'additionalProperties': False,
3568 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
3569 'type': 'array'}},
3570 'type': 'object'}},
3571 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3572 'Result': {'$ref': '#/definitions/ErrorResults'}},
3573 'type': 'object'},
3574 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3575 'Result': {'$ref': '#/definitions/RebootActionResults'}},
3576 'type': 'object'},
3577 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3578 'Result': {'$ref': '#/definitions/ErrorResults'}},
3579 'type': 'object'},
3580 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3581 'type': 'object'}},
3582 'type': 'object'}
3583
3584
3585 @ReturnMapping(ErrorResults)
3586 async def ClearReboot(self, entities):
3587 '''
3588 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3589 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3590 '''
3591 # map input types to rpc msg
3592 _params = dict()
3593 msg = dict(type='Reboot', request='ClearReboot', version=2, params=_params)
3594 _params['entities'] = entities
3595 reply = await self.rpc(msg)
3596 return reply
3597
3598
3599
3600 @ReturnMapping(RebootActionResults)
3601 async def GetRebootAction(self, entities):
3602 '''
3603 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3604 Returns -> typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
3605 '''
3606 # map input types to rpc msg
3607 _params = dict()
3608 msg = dict(type='Reboot', request='GetRebootAction', version=2, params=_params)
3609 _params['entities'] = entities
3610 reply = await self.rpc(msg)
3611 return reply
3612
3613
3614
3615 @ReturnMapping(ErrorResults)
3616 async def RequestReboot(self, entities):
3617 '''
3618 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3619 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3620 '''
3621 # map input types to rpc msg
3622 _params = dict()
3623 msg = dict(type='Reboot', request='RequestReboot', version=2, params=_params)
3624 _params['entities'] = entities
3625 reply = await self.rpc(msg)
3626 return reply
3627
3628
3629
3630 @ReturnMapping(NotifyWatchResult)
3631 async def WatchForRebootEvent(self):
3632 '''
3633
3634 Returns -> typing.Union[str, _ForwardRef('Error')]
3635 '''
3636 # map input types to rpc msg
3637 _params = dict()
3638 msg = dict(type='Reboot', request='WatchForRebootEvent', version=2, params=_params)
3639
3640 reply = await self.rpc(msg)
3641 return reply
3642
3643
3644
3645 class ResumerFacade(Type):
3646 name = 'Resumer'
3647 version = 2
3648 schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
3649
3650
3651 @ReturnMapping(None)
3652 async def ResumeTransactions(self):
3653 '''
3654
3655 Returns -> None
3656 '''
3657 # map input types to rpc msg
3658 _params = dict()
3659 msg = dict(type='Resumer', request='ResumeTransactions', version=2, params=_params)
3660
3661 reply = await self.rpc(msg)
3662 return reply
3663
3664
3665
3666 class SSHClientFacade(Type):
3667 name = 'SSHClient'
3668 version = 2
3669 schema = {'definitions': {'Entities': {'additionalProperties': False,
3670 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3671 'type': 'array'}},
3672 'required': ['entities'],
3673 'type': 'object'},
3674 'Entity': {'additionalProperties': False,
3675 'properties': {'tag': {'type': 'string'}},
3676 'required': ['tag'],
3677 'type': 'object'},
3678 'Error': {'additionalProperties': False,
3679 'properties': {'code': {'type': 'string'},
3680 'info': {'$ref': '#/definitions/ErrorInfo'},
3681 'message': {'type': 'string'}},
3682 'required': ['message', 'code'],
3683 'type': 'object'},
3684 'ErrorInfo': {'additionalProperties': False,
3685 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3686 'macaroon-path': {'type': 'string'}},
3687 'type': 'object'},
3688 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3689 'SSHAddressResult': {'additionalProperties': False,
3690 'properties': {'address': {'type': 'string'},
3691 'error': {'$ref': '#/definitions/Error'}},
3692 'type': 'object'},
3693 'SSHAddressResults': {'additionalProperties': False,
3694 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
3695 'type': 'array'}},
3696 'required': ['results'],
3697 'type': 'object'},
3698 'SSHAddressesResult': {'additionalProperties': False,
3699 'properties': {'addresses': {'items': {'type': 'string'},
3700 'type': 'array'},
3701 'error': {'$ref': '#/definitions/Error'}},
3702 'required': ['addresses'],
3703 'type': 'object'},
3704 'SSHAddressesResults': {'additionalProperties': False,
3705 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressesResult'},
3706 'type': 'array'}},
3707 'required': ['results'],
3708 'type': 'object'},
3709 'SSHProxyResult': {'additionalProperties': False,
3710 'properties': {'use-proxy': {'type': 'boolean'}},
3711 'required': ['use-proxy'],
3712 'type': 'object'},
3713 'SSHPublicKeysResult': {'additionalProperties': False,
3714 'properties': {'error': {'$ref': '#/definitions/Error'},
3715 'public-keys': {'items': {'type': 'string'},
3716 'type': 'array'}},
3717 'type': 'object'},
3718 'SSHPublicKeysResults': {'additionalProperties': False,
3719 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
3720 'type': 'array'}},
3721 'required': ['results'],
3722 'type': 'object'}},
3723 'properties': {'AllAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3724 'Result': {'$ref': '#/definitions/SSHAddressesResults'}},
3725 'type': 'object'},
3726 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3727 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
3728 'type': 'object'},
3729 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
3730 'type': 'object'},
3731 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3732 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
3733 'type': 'object'},
3734 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3735 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
3736 'type': 'object'}},
3737 'type': 'object'}
3738
3739
3740 @ReturnMapping(SSHAddressesResults)
3741 async def AllAddresses(self, entities):
3742 '''
3743 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3744 Returns -> typing.Sequence<+T_co>[~SSHAddressesResult]<~SSHAddressesResult>
3745 '''
3746 # map input types to rpc msg
3747 _params = dict()
3748 msg = dict(type='SSHClient', request='AllAddresses', version=2, params=_params)
3749 _params['entities'] = entities
3750 reply = await self.rpc(msg)
3751 return reply
3752
3753
3754
3755 @ReturnMapping(SSHAddressResults)
3756 async def PrivateAddress(self, entities):
3757 '''
3758 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3759 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
3760 '''
3761 # map input types to rpc msg
3762 _params = dict()
3763 msg = dict(type='SSHClient', request='PrivateAddress', version=2, params=_params)
3764 _params['entities'] = entities
3765 reply = await self.rpc(msg)
3766 return reply
3767
3768
3769
3770 @ReturnMapping(SSHProxyResult)
3771 async def Proxy(self):
3772 '''
3773
3774 Returns -> bool
3775 '''
3776 # map input types to rpc msg
3777 _params = dict()
3778 msg = dict(type='SSHClient', request='Proxy', version=2, params=_params)
3779
3780 reply = await self.rpc(msg)
3781 return reply
3782
3783
3784
3785 @ReturnMapping(SSHAddressResults)
3786 async def PublicAddress(self, entities):
3787 '''
3788 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3789 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
3790 '''
3791 # map input types to rpc msg
3792 _params = dict()
3793 msg = dict(type='SSHClient', request='PublicAddress', version=2, params=_params)
3794 _params['entities'] = entities
3795 reply = await self.rpc(msg)
3796 return reply
3797
3798
3799
3800 @ReturnMapping(SSHPublicKeysResults)
3801 async def PublicKeys(self, entities):
3802 '''
3803 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3804 Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
3805 '''
3806 # map input types to rpc msg
3807 _params = dict()
3808 msg = dict(type='SSHClient', request='PublicKeys', version=2, params=_params)
3809 _params['entities'] = entities
3810 reply = await self.rpc(msg)
3811 return reply
3812
3813
3814
3815 class SpacesFacade(Type):
3816 name = 'Spaces'
3817 version = 2
3818 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
3819 'properties': {'provider-id': {'type': 'string'},
3820 'public': {'type': 'boolean'},
3821 'space-tag': {'type': 'string'},
3822 'subnet-tags': {'items': {'type': 'string'},
3823 'type': 'array'}},
3824 'required': ['subnet-tags',
3825 'space-tag',
3826 'public'],
3827 'type': 'object'},
3828 'CreateSpacesParams': {'additionalProperties': False,
3829 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
3830 'type': 'array'}},
3831 'required': ['spaces'],
3832 'type': 'object'},
3833 'Error': {'additionalProperties': False,
3834 'properties': {'code': {'type': 'string'},
3835 'info': {'$ref': '#/definitions/ErrorInfo'},
3836 'message': {'type': 'string'}},
3837 'required': ['message', 'code'],
3838 'type': 'object'},
3839 'ErrorInfo': {'additionalProperties': False,
3840 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3841 'macaroon-path': {'type': 'string'}},
3842 'type': 'object'},
3843 'ErrorResult': {'additionalProperties': False,
3844 'properties': {'error': {'$ref': '#/definitions/Error'}},
3845 'type': 'object'},
3846 'ErrorResults': {'additionalProperties': False,
3847 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3848 'type': 'array'}},
3849 'required': ['results'],
3850 'type': 'object'},
3851 'ListSpacesResults': {'additionalProperties': False,
3852 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
3853 'type': 'array'}},
3854 'required': ['results'],
3855 'type': 'object'},
3856 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3857 'Space': {'additionalProperties': False,
3858 'properties': {'error': {'$ref': '#/definitions/Error'},
3859 'name': {'type': 'string'},
3860 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
3861 'type': 'array'}},
3862 'required': ['name', 'subnets'],
3863 'type': 'object'},
3864 'Subnet': {'additionalProperties': False,
3865 'properties': {'cidr': {'type': 'string'},
3866 'life': {'type': 'string'},
3867 'provider-id': {'type': 'string'},
3868 'provider-network-id': {'type': 'string'},
3869 'provider-space-id': {'type': 'string'},
3870 'space-tag': {'type': 'string'},
3871 'status': {'type': 'string'},
3872 'vlan-tag': {'type': 'integer'},
3873 'zones': {'items': {'type': 'string'},
3874 'type': 'array'}},
3875 'required': ['cidr',
3876 'vlan-tag',
3877 'life',
3878 'space-tag',
3879 'zones'],
3880 'type': 'object'}},
3881 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
3882 'Result': {'$ref': '#/definitions/ErrorResults'}},
3883 'type': 'object'},
3884 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
3885 'type': 'object'}},
3886 'type': 'object'}
3887
3888
3889 @ReturnMapping(ErrorResults)
3890 async def CreateSpaces(self, spaces):
3891 '''
3892 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
3893 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3894 '''
3895 # map input types to rpc msg
3896 _params = dict()
3897 msg = dict(type='Spaces', request='CreateSpaces', version=2, params=_params)
3898 _params['spaces'] = spaces
3899 reply = await self.rpc(msg)
3900 return reply
3901
3902
3903
3904 @ReturnMapping(ListSpacesResults)
3905 async def ListSpaces(self):
3906 '''
3907
3908 Returns -> typing.Sequence<+T_co>[~Space]<~Space>
3909 '''
3910 # map input types to rpc msg
3911 _params = dict()
3912 msg = dict(type='Spaces', request='ListSpaces', version=2, params=_params)
3913
3914 reply = await self.rpc(msg)
3915 return reply
3916
3917
3918
3919 class StatusHistoryFacade(Type):
3920 name = 'StatusHistory'
3921 version = 2
3922 schema = {'definitions': {'Error': {'additionalProperties': False,
3923 'properties': {'code': {'type': 'string'},
3924 'info': {'$ref': '#/definitions/ErrorInfo'},
3925 'message': {'type': 'string'}},
3926 'required': ['message', 'code'],
3927 'type': 'object'},
3928 'ErrorInfo': {'additionalProperties': False,
3929 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3930 'macaroon-path': {'type': 'string'}},
3931 'type': 'object'},
3932 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3933 'ModelConfigResult': {'additionalProperties': False,
3934 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
3935 'type': 'object'}},
3936 'type': 'object'}},
3937 'required': ['config'],
3938 'type': 'object'},
3939 'NotifyWatchResult': {'additionalProperties': False,
3940 'properties': {'NotifyWatcherId': {'type': 'string'},
3941 'error': {'$ref': '#/definitions/Error'}},
3942 'required': ['NotifyWatcherId'],
3943 'type': 'object'},
3944 'StatusHistoryPruneArgs': {'additionalProperties': False,
3945 'properties': {'max-history-mb': {'type': 'integer'},
3946 'max-history-time': {'type': 'integer'}},
3947 'required': ['max-history-time',
3948 'max-history-mb'],
3949 'type': 'object'}},
3950 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
3951 'type': 'object'},
3952 'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
3953 'type': 'object'},
3954 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3955 'type': 'object'}},
3956 'type': 'object'}
3957
3958
3959 @ReturnMapping(ModelConfigResult)
3960 async def ModelConfig(self):
3961 '''
3962
3963 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
3964 '''
3965 # map input types to rpc msg
3966 _params = dict()
3967 msg = dict(type='StatusHistory', request='ModelConfig', version=2, params=_params)
3968
3969 reply = await self.rpc(msg)
3970 return reply
3971
3972
3973
3974 @ReturnMapping(None)
3975 async def Prune(self, max_history_mb, max_history_time):
3976 '''
3977 max_history_mb : int
3978 max_history_time : int
3979 Returns -> None
3980 '''
3981 # map input types to rpc msg
3982 _params = dict()
3983 msg = dict(type='StatusHistory', request='Prune', version=2, params=_params)
3984 _params['max-history-mb'] = max_history_mb
3985 _params['max-history-time'] = max_history_time
3986 reply = await self.rpc(msg)
3987 return reply
3988
3989
3990
3991 @ReturnMapping(NotifyWatchResult)
3992 async def WatchForModelConfigChanges(self):
3993 '''
3994
3995 Returns -> typing.Union[str, _ForwardRef('Error')]
3996 '''
3997 # map input types to rpc msg
3998 _params = dict()
3999 msg = dict(type='StatusHistory', request='WatchForModelConfigChanges', version=2, params=_params)
4000
4001 reply = await self.rpc(msg)
4002 return reply
4003
4004
4005
4006 class SubnetsFacade(Type):
4007 name = 'Subnets'
4008 version = 2
4009 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
4010 'properties': {'provider-network-id': {'type': 'string'},
4011 'space-tag': {'type': 'string'},
4012 'subnet-provider-id': {'type': 'string'},
4013 'subnet-tag': {'type': 'string'},
4014 'vlan-tag': {'type': 'integer'},
4015 'zones': {'items': {'type': 'string'},
4016 'type': 'array'}},
4017 'required': ['space-tag'],
4018 'type': 'object'},
4019 'AddSubnetsParams': {'additionalProperties': False,
4020 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
4021 'type': 'array'}},
4022 'required': ['subnets'],
4023 'type': 'object'},
4024 'Error': {'additionalProperties': False,
4025 'properties': {'code': {'type': 'string'},
4026 'info': {'$ref': '#/definitions/ErrorInfo'},
4027 'message': {'type': 'string'}},
4028 'required': ['message', 'code'],
4029 'type': 'object'},
4030 'ErrorInfo': {'additionalProperties': False,
4031 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4032 'macaroon-path': {'type': 'string'}},
4033 'type': 'object'},
4034 'ErrorResult': {'additionalProperties': False,
4035 'properties': {'error': {'$ref': '#/definitions/Error'}},
4036 'type': 'object'},
4037 'ErrorResults': {'additionalProperties': False,
4038 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4039 'type': 'array'}},
4040 'required': ['results'],
4041 'type': 'object'},
4042 'ListSubnetsResults': {'additionalProperties': False,
4043 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
4044 'type': 'array'}},
4045 'required': ['results'],
4046 'type': 'object'},
4047 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4048 'SpaceResult': {'additionalProperties': False,
4049 'properties': {'error': {'$ref': '#/definitions/Error'},
4050 'tag': {'type': 'string'}},
4051 'required': ['tag'],
4052 'type': 'object'},
4053 'SpaceResults': {'additionalProperties': False,
4054 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'},
4055 'type': 'array'}},
4056 'required': ['results'],
4057 'type': 'object'},
4058 'Subnet': {'additionalProperties': False,
4059 'properties': {'cidr': {'type': 'string'},
4060 'life': {'type': 'string'},
4061 'provider-id': {'type': 'string'},
4062 'provider-network-id': {'type': 'string'},
4063 'provider-space-id': {'type': 'string'},
4064 'space-tag': {'type': 'string'},
4065 'status': {'type': 'string'},
4066 'vlan-tag': {'type': 'integer'},
4067 'zones': {'items': {'type': 'string'},
4068 'type': 'array'}},
4069 'required': ['cidr',
4070 'vlan-tag',
4071 'life',
4072 'space-tag',
4073 'zones'],
4074 'type': 'object'},
4075 'SubnetsFilters': {'additionalProperties': False,
4076 'properties': {'space-tag': {'type': 'string'},
4077 'zone': {'type': 'string'}},
4078 'type': 'object'},
4079 'ZoneResult': {'additionalProperties': False,
4080 'properties': {'available': {'type': 'boolean'},
4081 'error': {'$ref': '#/definitions/Error'},
4082 'name': {'type': 'string'}},
4083 'required': ['name', 'available'],
4084 'type': 'object'},
4085 'ZoneResults': {'additionalProperties': False,
4086 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'},
4087 'type': 'array'}},
4088 'required': ['results'],
4089 'type': 'object'}},
4090 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
4091 'Result': {'$ref': '#/definitions/ErrorResults'}},
4092 'type': 'object'},
4093 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
4094 'type': 'object'},
4095 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
4096 'type': 'object'},
4097 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
4098 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
4099 'type': 'object'}},
4100 'type': 'object'}
4101
4102
4103 @ReturnMapping(ErrorResults)
4104 async def AddSubnets(self, subnets):
4105 '''
4106 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
4107 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4108 '''
4109 # map input types to rpc msg
4110 _params = dict()
4111 msg = dict(type='Subnets', request='AddSubnets', version=2, params=_params)
4112 _params['subnets'] = subnets
4113 reply = await self.rpc(msg)
4114 return reply
4115
4116
4117
4118 @ReturnMapping(SpaceResults)
4119 async def AllSpaces(self):
4120 '''
4121
4122 Returns -> typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
4123 '''
4124 # map input types to rpc msg
4125 _params = dict()
4126 msg = dict(type='Subnets', request='AllSpaces', version=2, params=_params)
4127
4128 reply = await self.rpc(msg)
4129 return reply
4130
4131
4132
4133 @ReturnMapping(ZoneResults)
4134 async def AllZones(self):
4135 '''
4136
4137 Returns -> typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
4138 '''
4139 # map input types to rpc msg
4140 _params = dict()
4141 msg = dict(type='Subnets', request='AllZones', version=2, params=_params)
4142
4143 reply = await self.rpc(msg)
4144 return reply
4145
4146
4147
4148 @ReturnMapping(ListSubnetsResults)
4149 async def ListSubnets(self, space_tag, zone):
4150 '''
4151 space_tag : str
4152 zone : str
4153 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
4154 '''
4155 # map input types to rpc msg
4156 _params = dict()
4157 msg = dict(type='Subnets', request='ListSubnets', version=2, params=_params)
4158 _params['space-tag'] = space_tag
4159 _params['zone'] = zone
4160 reply = await self.rpc(msg)
4161 return reply
4162
4163
4164
4165 class VolumeAttachmentsWatcherFacade(Type):
4166 name = 'VolumeAttachmentsWatcher'
4167 version = 2
4168 schema = {'definitions': {'Error': {'additionalProperties': False,
4169 'properties': {'code': {'type': 'string'},
4170 'info': {'$ref': '#/definitions/ErrorInfo'},
4171 'message': {'type': 'string'}},
4172 'required': ['message', 'code'],
4173 'type': 'object'},
4174 'ErrorInfo': {'additionalProperties': False,
4175 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4176 'macaroon-path': {'type': 'string'}},
4177 'type': 'object'},
4178 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4179 'MachineStorageId': {'additionalProperties': False,
4180 'properties': {'attachment-tag': {'type': 'string'},
4181 'machine-tag': {'type': 'string'}},
4182 'required': ['machine-tag',
4183 'attachment-tag'],
4184 'type': 'object'},
4185 'MachineStorageIdsWatchResult': {'additionalProperties': False,
4186 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
4187 'type': 'array'},
4188 'error': {'$ref': '#/definitions/Error'},
4189 'watcher-id': {'type': 'string'}},
4190 'required': ['watcher-id',
4191 'changes'],
4192 'type': 'object'}},
4193 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
4194 'type': 'object'},
4195 'Stop': {'type': 'object'}},
4196 'type': 'object'}
4197
4198
4199 @ReturnMapping(MachineStorageIdsWatchResult)
4200 async def Next(self):
4201 '''
4202
4203 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
4204 '''
4205 # map input types to rpc msg
4206 _params = dict()
4207 msg = dict(type='VolumeAttachmentsWatcher', request='Next', version=2, params=_params)
4208
4209 reply = await self.rpc(msg)
4210 return reply
4211
4212
4213
4214 @ReturnMapping(None)
4215 async def Stop(self):
4216 '''
4217
4218 Returns -> None
4219 '''
4220 # map input types to rpc msg
4221 _params = dict()
4222 msg = dict(type='VolumeAttachmentsWatcher', request='Stop', version=2, params=_params)
4223
4224 reply = await self.rpc(msg)
4225 return reply