Feature/api version support (#109)
[osm/N2VC.git] / juju / client / _client2.py
1 # DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py.
2 # Changes will be overwritten/lost when the file is regenerated.
3
4 from juju.client.facade import Type, ReturnMapping
5 from juju.client._definitions import *
6
7
8 class ActionFacade(Type):
9 name = 'Action'
10 version = 2
11 schema = {'definitions': {'Action': {'additionalProperties': False,
12 'properties': {'name': {'type': 'string'},
13 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
14 'type': 'object'}},
15 'type': 'object'},
16 'receiver': {'type': 'string'},
17 'tag': {'type': 'string'}},
18 'required': ['tag', 'receiver', 'name'],
19 'type': 'object'},
20 'ActionResult': {'additionalProperties': False,
21 'properties': {'action': {'$ref': '#/definitions/Action'},
22 'completed': {'format': 'date-time',
23 'type': 'string'},
24 'enqueued': {'format': 'date-time',
25 'type': 'string'},
26 'error': {'$ref': '#/definitions/Error'},
27 'message': {'type': 'string'},
28 'output': {'patternProperties': {'.*': {'additionalProperties': True,
29 'type': 'object'}},
30 'type': 'object'},
31 'started': {'format': 'date-time',
32 'type': 'string'},
33 'status': {'type': 'string'}},
34 'type': 'object'},
35 'ActionResults': {'additionalProperties': False,
36 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
37 'type': 'array'}},
38 'type': 'object'},
39 'ActionSpec': {'additionalProperties': False,
40 'properties': {'description': {'type': 'string'},
41 'params': {'patternProperties': {'.*': {'additionalProperties': True,
42 'type': 'object'}},
43 'type': 'object'}},
44 'required': ['description', 'params'],
45 'type': 'object'},
46 'Actions': {'additionalProperties': False,
47 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
48 'type': 'array'}},
49 'type': 'object'},
50 'ActionsByName': {'additionalProperties': False,
51 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
52 'type': 'array'},
53 'error': {'$ref': '#/definitions/Error'},
54 'name': {'type': 'string'}},
55 'type': 'object'},
56 'ActionsByNames': {'additionalProperties': False,
57 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
58 'type': 'array'}},
59 'type': 'object'},
60 'ActionsByReceiver': {'additionalProperties': False,
61 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
62 'type': 'array'},
63 'error': {'$ref': '#/definitions/Error'},
64 'receiver': {'type': 'string'}},
65 'type': 'object'},
66 'ActionsByReceivers': {'additionalProperties': False,
67 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
68 'type': 'array'}},
69 'type': 'object'},
70 'ApplicationCharmActionsResult': {'additionalProperties': False,
71 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
72 'type': 'object'},
73 'application-tag': {'type': 'string'},
74 'error': {'$ref': '#/definitions/Error'}},
75 'type': 'object'},
76 'ApplicationsCharmActionsResults': {'additionalProperties': False,
77 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
78 'type': 'array'}},
79 'type': 'object'},
80 'Entities': {'additionalProperties': False,
81 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
82 'type': 'array'}},
83 'required': ['entities'],
84 'type': 'object'},
85 'Entity': {'additionalProperties': False,
86 'properties': {'tag': {'type': 'string'}},
87 'required': ['tag'],
88 'type': 'object'},
89 'Error': {'additionalProperties': False,
90 'properties': {'code': {'type': 'string'},
91 'info': {'$ref': '#/definitions/ErrorInfo'},
92 'message': {'type': 'string'}},
93 'required': ['message', 'code'],
94 'type': 'object'},
95 'ErrorInfo': {'additionalProperties': False,
96 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
97 'macaroon-path': {'type': 'string'}},
98 'type': 'object'},
99 'FindActionsByNames': {'additionalProperties': False,
100 'properties': {'names': {'items': {'type': 'string'},
101 'type': 'array'}},
102 'type': 'object'},
103 'FindTags': {'additionalProperties': False,
104 'properties': {'prefixes': {'items': {'type': 'string'},
105 'type': 'array'}},
106 'required': ['prefixes'],
107 'type': 'object'},
108 'FindTagsResults': {'additionalProperties': False,
109 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
110 'type': 'array'}},
111 'type': 'object'}},
112 'required': ['matches'],
113 'type': 'object'},
114 'Macaroon': {'additionalProperties': False, 'type': 'object'},
115 'RunParams': {'additionalProperties': False,
116 'properties': {'applications': {'items': {'type': 'string'},
117 'type': 'array'},
118 'commands': {'type': 'string'},
119 'machines': {'items': {'type': 'string'},
120 'type': 'array'},
121 'timeout': {'type': 'integer'},
122 'units': {'items': {'type': 'string'},
123 'type': 'array'}},
124 'required': ['commands', 'timeout'],
125 'type': 'object'}},
126 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
127 'Result': {'$ref': '#/definitions/ActionResults'}},
128 'type': 'object'},
129 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
130 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
131 'type': 'object'},
132 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
133 'Result': {'$ref': '#/definitions/ActionResults'}},
134 'type': 'object'},
135 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
136 'Result': {'$ref': '#/definitions/ActionResults'}},
137 'type': 'object'},
138 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
139 'Result': {'$ref': '#/definitions/FindTagsResults'}},
140 'type': 'object'},
141 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
142 'Result': {'$ref': '#/definitions/ActionsByNames'}},
143 'type': 'object'},
144 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
145 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
146 'type': 'object'},
147 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
148 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
149 'type': 'object'},
150 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
151 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
152 'type': 'object'},
153 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
154 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
155 'type': 'object'},
156 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
157 'Result': {'$ref': '#/definitions/ActionResults'}},
158 'type': 'object'},
159 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
160 'Result': {'$ref': '#/definitions/ActionResults'}},
161 'type': 'object'}},
162 'type': 'object'}
163
164
165 @ReturnMapping(ActionResults)
166 async def Actions(self, entities):
167 '''
168 entities : typing.Sequence<+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 'space-tag': {'type': 'string'},
1907 'status': {'type': 'string'},
1908 'vlan-tag': {'type': 'integer'},
1909 'zones': {'items': {'type': 'string'},
1910 'type': 'array'}},
1911 'required': ['cidr',
1912 'vlan-tag',
1913 'life',
1914 'space-tag',
1915 'zones'],
1916 'type': 'object'},
1917 'SubnetsFilters': {'additionalProperties': False,
1918 'properties': {'space-tag': {'type': 'string'},
1919 'zone': {'type': 'string'}},
1920 'type': 'object'}},
1921 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
1922 'Result': {'$ref': '#/definitions/ErrorResults'}},
1923 'type': 'object'},
1924 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
1925 'Result': {'$ref': '#/definitions/ErrorResults'}},
1926 'type': 'object'},
1927 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
1928 'type': 'object'},
1929 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
1930 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
1931 'type': 'object'},
1932 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1933 'type': 'object'}},
1934 'type': 'object'}
1935
1936
1937 @ReturnMapping(ErrorResults)
1938 async def AddSubnets(self, subnets):
1939 '''
1940 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
1941 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1942 '''
1943 # map input types to rpc msg
1944 _params = dict()
1945 msg = dict(type='DiscoverSpaces', request='AddSubnets', version=2, params=_params)
1946 _params['subnets'] = subnets
1947 reply = await self.rpc(msg)
1948 return reply
1949
1950
1951
1952 @ReturnMapping(ErrorResults)
1953 async def CreateSpaces(self, spaces):
1954 '''
1955 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
1956 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1957 '''
1958 # map input types to rpc msg
1959 _params = dict()
1960 msg = dict(type='DiscoverSpaces', request='CreateSpaces', version=2, params=_params)
1961 _params['spaces'] = spaces
1962 reply = await self.rpc(msg)
1963 return reply
1964
1965
1966
1967 @ReturnMapping(DiscoverSpacesResults)
1968 async def ListSpaces(self):
1969 '''
1970
1971 Returns -> typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
1972 '''
1973 # map input types to rpc msg
1974 _params = dict()
1975 msg = dict(type='DiscoverSpaces', request='ListSpaces', version=2, params=_params)
1976
1977 reply = await self.rpc(msg)
1978 return reply
1979
1980
1981
1982 @ReturnMapping(ListSubnetsResults)
1983 async def ListSubnets(self, space_tag, zone):
1984 '''
1985 space_tag : str
1986 zone : str
1987 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
1988 '''
1989 # map input types to rpc msg
1990 _params = dict()
1991 msg = dict(type='DiscoverSpaces', request='ListSubnets', version=2, params=_params)
1992 _params['space-tag'] = space_tag
1993 _params['zone'] = zone
1994 reply = await self.rpc(msg)
1995 return reply
1996
1997
1998
1999 @ReturnMapping(ModelConfigResult)
2000 async def ModelConfig(self):
2001 '''
2002
2003 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
2004 '''
2005 # map input types to rpc msg
2006 _params = dict()
2007 msg = dict(type='DiscoverSpaces', request='ModelConfig', version=2, params=_params)
2008
2009 reply = await self.rpc(msg)
2010 return reply
2011
2012
2013
2014 class DiskManagerFacade(Type):
2015 name = 'DiskManager'
2016 version = 2
2017 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
2018 'properties': {'BusAddress': {'type': 'string'},
2019 'DeviceLinks': {'items': {'type': 'string'},
2020 'type': 'array'},
2021 'DeviceName': {'type': 'string'},
2022 'FilesystemType': {'type': 'string'},
2023 'HardwareId': {'type': 'string'},
2024 'InUse': {'type': 'boolean'},
2025 'Label': {'type': 'string'},
2026 'MountPoint': {'type': 'string'},
2027 'Size': {'type': 'integer'},
2028 'UUID': {'type': 'string'}},
2029 'required': ['DeviceName',
2030 'DeviceLinks',
2031 'Label',
2032 'UUID',
2033 'HardwareId',
2034 'BusAddress',
2035 'Size',
2036 'FilesystemType',
2037 'InUse',
2038 'MountPoint'],
2039 'type': 'object'},
2040 'Error': {'additionalProperties': False,
2041 'properties': {'code': {'type': 'string'},
2042 'info': {'$ref': '#/definitions/ErrorInfo'},
2043 'message': {'type': 'string'}},
2044 'required': ['message', 'code'],
2045 'type': 'object'},
2046 'ErrorInfo': {'additionalProperties': False,
2047 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2048 'macaroon-path': {'type': 'string'}},
2049 'type': 'object'},
2050 'ErrorResult': {'additionalProperties': False,
2051 'properties': {'error': {'$ref': '#/definitions/Error'}},
2052 'type': 'object'},
2053 'ErrorResults': {'additionalProperties': False,
2054 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2055 'type': 'array'}},
2056 'required': ['results'],
2057 'type': 'object'},
2058 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2059 'MachineBlockDevices': {'additionalProperties': False,
2060 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
2061 'type': 'array'},
2062 'machine': {'type': 'string'}},
2063 'required': ['machine'],
2064 'type': 'object'},
2065 'SetMachineBlockDevices': {'additionalProperties': False,
2066 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
2067 'type': 'array'}},
2068 'required': ['machine-block-devices'],
2069 'type': 'object'}},
2070 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
2071 'Result': {'$ref': '#/definitions/ErrorResults'}},
2072 'type': 'object'}},
2073 'type': 'object'}
2074
2075
2076 @ReturnMapping(ErrorResults)
2077 async def SetMachineBlockDevices(self, machine_block_devices):
2078 '''
2079 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
2080 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2081 '''
2082 # map input types to rpc msg
2083 _params = dict()
2084 msg = dict(type='DiskManager', request='SetMachineBlockDevices', version=2, params=_params)
2085 _params['machine-block-devices'] = machine_block_devices
2086 reply = await self.rpc(msg)
2087 return reply
2088
2089
2090
2091 class EntityWatcherFacade(Type):
2092 name = 'EntityWatcher'
2093 version = 2
2094 schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
2095 'properties': {'changes': {'items': {'type': 'string'},
2096 'type': 'array'},
2097 'error': {'$ref': '#/definitions/Error'},
2098 'watcher-id': {'type': 'string'}},
2099 'required': ['watcher-id'],
2100 'type': 'object'},
2101 'Error': {'additionalProperties': False,
2102 'properties': {'code': {'type': 'string'},
2103 'info': {'$ref': '#/definitions/ErrorInfo'},
2104 'message': {'type': 'string'}},
2105 'required': ['message', 'code'],
2106 'type': 'object'},
2107 'ErrorInfo': {'additionalProperties': False,
2108 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2109 'macaroon-path': {'type': 'string'}},
2110 'type': 'object'},
2111 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2112 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
2113 'type': 'object'},
2114 'Stop': {'type': 'object'}},
2115 'type': 'object'}
2116
2117
2118 @ReturnMapping(EntitiesWatchResult)
2119 async def Next(self):
2120 '''
2121
2122 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
2123 '''
2124 # map input types to rpc msg
2125 _params = dict()
2126 msg = dict(type='EntityWatcher', request='Next', version=2, params=_params)
2127
2128 reply = await self.rpc(msg)
2129 return reply
2130
2131
2132
2133 @ReturnMapping(None)
2134 async def Stop(self):
2135 '''
2136
2137 Returns -> None
2138 '''
2139 # map input types to rpc msg
2140 _params = dict()
2141 msg = dict(type='EntityWatcher', request='Stop', version=2, params=_params)
2142
2143 reply = await self.rpc(msg)
2144 return reply
2145
2146
2147
2148 class FilesystemAttachmentsWatcherFacade(Type):
2149 name = 'FilesystemAttachmentsWatcher'
2150 version = 2
2151 schema = {'definitions': {'Error': {'additionalProperties': False,
2152 'properties': {'code': {'type': 'string'},
2153 'info': {'$ref': '#/definitions/ErrorInfo'},
2154 'message': {'type': 'string'}},
2155 'required': ['message', 'code'],
2156 'type': 'object'},
2157 'ErrorInfo': {'additionalProperties': False,
2158 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2159 'macaroon-path': {'type': 'string'}},
2160 'type': 'object'},
2161 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2162 'MachineStorageId': {'additionalProperties': False,
2163 'properties': {'attachment-tag': {'type': 'string'},
2164 'machine-tag': {'type': 'string'}},
2165 'required': ['machine-tag',
2166 'attachment-tag'],
2167 'type': 'object'},
2168 'MachineStorageIdsWatchResult': {'additionalProperties': False,
2169 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
2170 'type': 'array'},
2171 'error': {'$ref': '#/definitions/Error'},
2172 'watcher-id': {'type': 'string'}},
2173 'required': ['watcher-id',
2174 'changes'],
2175 'type': 'object'}},
2176 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
2177 'type': 'object'},
2178 'Stop': {'type': 'object'}},
2179 'type': 'object'}
2180
2181
2182 @ReturnMapping(MachineStorageIdsWatchResult)
2183 async def Next(self):
2184 '''
2185
2186 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
2187 '''
2188 # map input types to rpc msg
2189 _params = dict()
2190 msg = dict(type='FilesystemAttachmentsWatcher', request='Next', version=2, params=_params)
2191
2192 reply = await self.rpc(msg)
2193 return reply
2194
2195
2196
2197 @ReturnMapping(None)
2198 async def Stop(self):
2199 '''
2200
2201 Returns -> None
2202 '''
2203 # map input types to rpc msg
2204 _params = dict()
2205 msg = dict(type='FilesystemAttachmentsWatcher', request='Stop', version=2, params=_params)
2206
2207 reply = await self.rpc(msg)
2208 return reply
2209
2210
2211
2212 class HighAvailabilityFacade(Type):
2213 name = 'HighAvailability'
2214 version = 2
2215 schema = {'definitions': {'Address': {'additionalProperties': False,
2216 'properties': {'Scope': {'type': 'string'},
2217 'SpaceName': {'type': 'string'},
2218 'SpaceProviderId': {'type': 'string'},
2219 'Type': {'type': 'string'},
2220 'Value': {'type': 'string'}},
2221 'required': ['Value',
2222 'Type',
2223 'Scope',
2224 'SpaceName',
2225 'SpaceProviderId'],
2226 'type': 'object'},
2227 'ControllersChangeResult': {'additionalProperties': False,
2228 'properties': {'error': {'$ref': '#/definitions/Error'},
2229 'result': {'$ref': '#/definitions/ControllersChanges'}},
2230 'required': ['result'],
2231 'type': 'object'},
2232 'ControllersChangeResults': {'additionalProperties': False,
2233 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
2234 'type': 'array'}},
2235 'required': ['results'],
2236 'type': 'object'},
2237 'ControllersChanges': {'additionalProperties': False,
2238 'properties': {'added': {'items': {'type': 'string'},
2239 'type': 'array'},
2240 'converted': {'items': {'type': 'string'},
2241 'type': 'array'},
2242 'demoted': {'items': {'type': 'string'},
2243 'type': 'array'},
2244 'maintained': {'items': {'type': 'string'},
2245 'type': 'array'},
2246 'promoted': {'items': {'type': 'string'},
2247 'type': 'array'},
2248 'removed': {'items': {'type': 'string'},
2249 'type': 'array'}},
2250 'type': 'object'},
2251 'ControllersSpec': {'additionalProperties': False,
2252 'properties': {'constraints': {'$ref': '#/definitions/Value'},
2253 'num-controllers': {'type': 'integer'},
2254 'placement': {'items': {'type': 'string'},
2255 'type': 'array'},
2256 'series': {'type': 'string'}},
2257 'required': ['num-controllers'],
2258 'type': 'object'},
2259 'ControllersSpecs': {'additionalProperties': False,
2260 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
2261 'type': 'array'}},
2262 'required': ['specs'],
2263 'type': 'object'},
2264 'Error': {'additionalProperties': False,
2265 'properties': {'code': {'type': 'string'},
2266 'info': {'$ref': '#/definitions/ErrorInfo'},
2267 'message': {'type': 'string'}},
2268 'required': ['message', 'code'],
2269 'type': 'object'},
2270 'ErrorInfo': {'additionalProperties': False,
2271 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2272 'macaroon-path': {'type': 'string'}},
2273 'type': 'object'},
2274 'HAMember': {'additionalProperties': False,
2275 'properties': {'public-address': {'$ref': '#/definitions/Address'},
2276 'series': {'type': 'string'},
2277 'tag': {'type': 'string'}},
2278 'required': ['tag', 'public-address', 'series'],
2279 'type': 'object'},
2280 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2281 'Member': {'additionalProperties': False,
2282 'properties': {'Address': {'type': 'string'},
2283 'Arbiter': {'type': 'boolean'},
2284 'BuildIndexes': {'type': 'boolean'},
2285 'Hidden': {'type': 'boolean'},
2286 'Id': {'type': 'integer'},
2287 'Priority': {'type': 'number'},
2288 'SlaveDelay': {'type': 'integer'},
2289 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
2290 'type': 'object'},
2291 'Votes': {'type': 'integer'}},
2292 'required': ['Id',
2293 'Address',
2294 'Arbiter',
2295 'BuildIndexes',
2296 'Hidden',
2297 'Priority',
2298 'Tags',
2299 'SlaveDelay',
2300 'Votes'],
2301 'type': 'object'},
2302 'MongoUpgradeResults': {'additionalProperties': False,
2303 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
2304 'type': 'array'},
2305 'master': {'$ref': '#/definitions/HAMember'},
2306 'rs-members': {'items': {'$ref': '#/definitions/Member'},
2307 'type': 'array'}},
2308 'required': ['rs-members',
2309 'master',
2310 'ha-members'],
2311 'type': 'object'},
2312 'MongoVersion': {'additionalProperties': False,
2313 'properties': {'engine': {'type': 'string'},
2314 'major': {'type': 'integer'},
2315 'minor': {'type': 'integer'},
2316 'patch': {'type': 'string'}},
2317 'required': ['major',
2318 'minor',
2319 'patch',
2320 'engine'],
2321 'type': 'object'},
2322 'ResumeReplicationParams': {'additionalProperties': False,
2323 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
2324 'type': 'array'}},
2325 'required': ['members'],
2326 'type': 'object'},
2327 'UpgradeMongoParams': {'additionalProperties': False,
2328 'properties': {'target': {'$ref': '#/definitions/MongoVersion'}},
2329 'required': ['target'],
2330 'type': 'object'},
2331 'Value': {'additionalProperties': False,
2332 'properties': {'arch': {'type': 'string'},
2333 'container': {'type': 'string'},
2334 'cores': {'type': 'integer'},
2335 'cpu-power': {'type': 'integer'},
2336 'instance-type': {'type': 'string'},
2337 'mem': {'type': 'integer'},
2338 'root-disk': {'type': 'integer'},
2339 'spaces': {'items': {'type': 'string'},
2340 'type': 'array'},
2341 'tags': {'items': {'type': 'string'},
2342 'type': 'array'},
2343 'virt-type': {'type': 'string'}},
2344 'type': 'object'}},
2345 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
2346 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
2347 'type': 'object'},
2348 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
2349 'type': 'object'},
2350 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
2351 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
2352 'type': 'object'}},
2353 'type': 'object'}
2354
2355
2356 @ReturnMapping(ControllersChangeResults)
2357 async def EnableHA(self, specs):
2358 '''
2359 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
2360 Returns -> typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
2361 '''
2362 # map input types to rpc msg
2363 _params = dict()
2364 msg = dict(type='HighAvailability', request='EnableHA', version=2, params=_params)
2365 _params['specs'] = specs
2366 reply = await self.rpc(msg)
2367 return reply
2368
2369
2370
2371 @ReturnMapping(None)
2372 async def ResumeHAReplicationAfterUpgrade(self, members):
2373 '''
2374 members : typing.Sequence<+T_co>[~Member]<~Member>
2375 Returns -> None
2376 '''
2377 # map input types to rpc msg
2378 _params = dict()
2379 msg = dict(type='HighAvailability', request='ResumeHAReplicationAfterUpgrade', version=2, params=_params)
2380 _params['members'] = members
2381 reply = await self.rpc(msg)
2382 return reply
2383
2384
2385
2386 @ReturnMapping(MongoUpgradeResults)
2387 async def StopHAReplicationForUpgrade(self, target):
2388 '''
2389 target : MongoVersion
2390 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence<+T_co>[~Member]<~Member>]
2391 '''
2392 # map input types to rpc msg
2393 _params = dict()
2394 msg = dict(type='HighAvailability', request='StopHAReplicationForUpgrade', version=2, params=_params)
2395 _params['target'] = target
2396 reply = await self.rpc(msg)
2397 return reply
2398
2399
2400
2401 class ImageManagerFacade(Type):
2402 name = 'ImageManager'
2403 version = 2
2404 schema = {'definitions': {'Error': {'additionalProperties': False,
2405 'properties': {'code': {'type': 'string'},
2406 'info': {'$ref': '#/definitions/ErrorInfo'},
2407 'message': {'type': 'string'}},
2408 'required': ['message', 'code'],
2409 'type': 'object'},
2410 'ErrorInfo': {'additionalProperties': False,
2411 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2412 'macaroon-path': {'type': 'string'}},
2413 'type': 'object'},
2414 'ErrorResult': {'additionalProperties': False,
2415 'properties': {'error': {'$ref': '#/definitions/Error'}},
2416 'type': 'object'},
2417 'ErrorResults': {'additionalProperties': False,
2418 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2419 'type': 'array'}},
2420 'required': ['results'],
2421 'type': 'object'},
2422 'ImageFilterParams': {'additionalProperties': False,
2423 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
2424 'type': 'array'}},
2425 'required': ['images'],
2426 'type': 'object'},
2427 'ImageMetadata': {'additionalProperties': False,
2428 'properties': {'arch': {'type': 'string'},
2429 'created': {'format': 'date-time',
2430 'type': 'string'},
2431 'kind': {'type': 'string'},
2432 'series': {'type': 'string'},
2433 'url': {'type': 'string'}},
2434 'required': ['kind',
2435 'arch',
2436 'series',
2437 'url',
2438 'created'],
2439 'type': 'object'},
2440 'ImageSpec': {'additionalProperties': False,
2441 'properties': {'arch': {'type': 'string'},
2442 'kind': {'type': 'string'},
2443 'series': {'type': 'string'}},
2444 'required': ['kind', 'arch', 'series'],
2445 'type': 'object'},
2446 'ListImageResult': {'additionalProperties': False,
2447 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
2448 'type': 'array'}},
2449 'required': ['result'],
2450 'type': 'object'},
2451 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2452 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
2453 'Result': {'$ref': '#/definitions/ErrorResults'}},
2454 'type': 'object'},
2455 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
2456 'Result': {'$ref': '#/definitions/ListImageResult'}},
2457 'type': 'object'}},
2458 'type': 'object'}
2459
2460
2461 @ReturnMapping(ErrorResults)
2462 async def DeleteImages(self, images):
2463 '''
2464 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
2465 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2466 '''
2467 # map input types to rpc msg
2468 _params = dict()
2469 msg = dict(type='ImageManager', request='DeleteImages', version=2, params=_params)
2470 _params['images'] = images
2471 reply = await self.rpc(msg)
2472 return reply
2473
2474
2475
2476 @ReturnMapping(ListImageResult)
2477 async def ListImages(self, images):
2478 '''
2479 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
2480 Returns -> typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
2481 '''
2482 # map input types to rpc msg
2483 _params = dict()
2484 msg = dict(type='ImageManager', request='ListImages', version=2, params=_params)
2485 _params['images'] = images
2486 reply = await self.rpc(msg)
2487 return reply
2488
2489
2490
2491 class ImageMetadataFacade(Type):
2492 name = 'ImageMetadata'
2493 version = 2
2494 schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
2495 'properties': {'arch': {'type': 'string'},
2496 'image-id': {'type': 'string'},
2497 'priority': {'type': 'integer'},
2498 'region': {'type': 'string'},
2499 'root-storage-size': {'type': 'integer'},
2500 'root-storage-type': {'type': 'string'},
2501 'series': {'type': 'string'},
2502 'source': {'type': 'string'},
2503 'stream': {'type': 'string'},
2504 'version': {'type': 'string'},
2505 'virt-type': {'type': 'string'}},
2506 'required': ['image-id',
2507 'region',
2508 'version',
2509 'series',
2510 'arch',
2511 'source',
2512 'priority'],
2513 'type': 'object'},
2514 'CloudImageMetadataList': {'additionalProperties': False,
2515 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
2516 'type': 'array'}},
2517 'type': 'object'},
2518 'Error': {'additionalProperties': False,
2519 'properties': {'code': {'type': 'string'},
2520 'info': {'$ref': '#/definitions/ErrorInfo'},
2521 'message': {'type': 'string'}},
2522 'required': ['message', 'code'],
2523 'type': 'object'},
2524 'ErrorInfo': {'additionalProperties': False,
2525 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2526 'macaroon-path': {'type': 'string'}},
2527 'type': 'object'},
2528 'ErrorResult': {'additionalProperties': False,
2529 'properties': {'error': {'$ref': '#/definitions/Error'}},
2530 'type': 'object'},
2531 'ErrorResults': {'additionalProperties': False,
2532 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2533 'type': 'array'}},
2534 'required': ['results'],
2535 'type': 'object'},
2536 'ImageMetadataFilter': {'additionalProperties': False,
2537 'properties': {'arches': {'items': {'type': 'string'},
2538 'type': 'array'},
2539 'region': {'type': 'string'},
2540 'root-storage-type': {'type': 'string'},
2541 'series': {'items': {'type': 'string'},
2542 'type': 'array'},
2543 'stream': {'type': 'string'},
2544 'virt-type': {'type': 'string'}},
2545 'type': 'object'},
2546 'ListCloudImageMetadataResult': {'additionalProperties': False,
2547 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
2548 'type': 'array'}},
2549 'required': ['result'],
2550 'type': 'object'},
2551 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2552 'MetadataImageIds': {'additionalProperties': False,
2553 'properties': {'image-ids': {'items': {'type': 'string'},
2554 'type': 'array'}},
2555 'required': ['image-ids'],
2556 'type': 'object'},
2557 'MetadataSaveParams': {'additionalProperties': False,
2558 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
2559 'type': 'array'}},
2560 'type': 'object'}},
2561 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
2562 'Result': {'$ref': '#/definitions/ErrorResults'}},
2563 'type': 'object'},
2564 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
2565 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
2566 'type': 'object'},
2567 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
2568 'Result': {'$ref': '#/definitions/ErrorResults'}},
2569 'type': 'object'},
2570 'UpdateFromPublishedImages': {'type': 'object'}},
2571 'type': 'object'}
2572
2573
2574 @ReturnMapping(ErrorResults)
2575 async def Delete(self, image_ids):
2576 '''
2577 image_ids : typing.Sequence<+T_co>[str]
2578 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2579 '''
2580 # map input types to rpc msg
2581 _params = dict()
2582 msg = dict(type='ImageMetadata', request='Delete', version=2, params=_params)
2583 _params['image-ids'] = image_ids
2584 reply = await self.rpc(msg)
2585 return reply
2586
2587
2588
2589 @ReturnMapping(ListCloudImageMetadataResult)
2590 async def List(self, arches, region, root_storage_type, series, stream, virt_type):
2591 '''
2592 arches : typing.Sequence<+T_co>[str]
2593 region : str
2594 root_storage_type : str
2595 series : typing.Sequence<+T_co>[str]
2596 stream : str
2597 virt_type : str
2598 Returns -> typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
2599 '''
2600 # map input types to rpc msg
2601 _params = dict()
2602 msg = dict(type='ImageMetadata', request='List', version=2, params=_params)
2603 _params['arches'] = arches
2604 _params['region'] = region
2605 _params['root-storage-type'] = root_storage_type
2606 _params['series'] = series
2607 _params['stream'] = stream
2608 _params['virt-type'] = virt_type
2609 reply = await self.rpc(msg)
2610 return reply
2611
2612
2613
2614 @ReturnMapping(ErrorResults)
2615 async def Save(self, metadata):
2616 '''
2617 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
2618 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2619 '''
2620 # map input types to rpc msg
2621 _params = dict()
2622 msg = dict(type='ImageMetadata', request='Save', version=2, params=_params)
2623 _params['metadata'] = metadata
2624 reply = await self.rpc(msg)
2625 return reply
2626
2627
2628
2629 @ReturnMapping(None)
2630 async def UpdateFromPublishedImages(self):
2631 '''
2632
2633 Returns -> None
2634 '''
2635 # map input types to rpc msg
2636 _params = dict()
2637 msg = dict(type='ImageMetadata', request='UpdateFromPublishedImages', version=2, params=_params)
2638
2639 reply = await self.rpc(msg)
2640 return reply
2641
2642
2643
2644 class LeadershipServiceFacade(Type):
2645 name = 'LeadershipService'
2646 version = 2
2647 schema = {'definitions': {'ApplicationTag': {'additionalProperties': False,
2648 'properties': {'Name': {'type': 'string'}},
2649 'required': ['Name'],
2650 'type': 'object'},
2651 'ClaimLeadershipBulkParams': {'additionalProperties': False,
2652 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
2653 'type': 'array'}},
2654 'required': ['params'],
2655 'type': 'object'},
2656 'ClaimLeadershipBulkResults': {'additionalProperties': False,
2657 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2658 'type': 'array'}},
2659 'required': ['results'],
2660 'type': 'object'},
2661 'ClaimLeadershipParams': {'additionalProperties': False,
2662 'properties': {'application-tag': {'type': 'string'},
2663 'duration': {'type': 'number'},
2664 'unit-tag': {'type': 'string'}},
2665 'required': ['application-tag',
2666 'unit-tag',
2667 'duration'],
2668 'type': 'object'},
2669 'Error': {'additionalProperties': False,
2670 'properties': {'code': {'type': 'string'},
2671 'info': {'$ref': '#/definitions/ErrorInfo'},
2672 'message': {'type': 'string'}},
2673 'required': ['message', 'code'],
2674 'type': 'object'},
2675 'ErrorInfo': {'additionalProperties': False,
2676 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2677 'macaroon-path': {'type': 'string'}},
2678 'type': 'object'},
2679 'ErrorResult': {'additionalProperties': False,
2680 'properties': {'error': {'$ref': '#/definitions/Error'}},
2681 'type': 'object'},
2682 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
2683 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
2684 'Result': {'$ref': '#/definitions/ErrorResult'}},
2685 'type': 'object'},
2686 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
2687 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
2688 'type': 'object'}},
2689 'type': 'object'}
2690
2691
2692 @ReturnMapping(ErrorResult)
2693 async def BlockUntilLeadershipReleased(self, name):
2694 '''
2695 name : str
2696 Returns -> Error
2697 '''
2698 # map input types to rpc msg
2699 _params = dict()
2700 msg = dict(type='LeadershipService', request='BlockUntilLeadershipReleased', version=2, params=_params)
2701 _params['Name'] = name
2702 reply = await self.rpc(msg)
2703 return reply
2704
2705
2706
2707 @ReturnMapping(ClaimLeadershipBulkResults)
2708 async def ClaimLeadership(self, params):
2709 '''
2710 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
2711 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2712 '''
2713 # map input types to rpc msg
2714 _params = dict()
2715 msg = dict(type='LeadershipService', request='ClaimLeadership', version=2, params=_params)
2716 _params['params'] = params
2717 reply = await self.rpc(msg)
2718 return reply
2719
2720
2721
2722 class MachineManagerFacade(Type):
2723 name = 'MachineManager'
2724 version = 2
2725 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
2726 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
2727 'type': 'array'},
2728 'constraints': {'$ref': '#/definitions/Value'},
2729 'container-type': {'type': 'string'},
2730 'disks': {'items': {'$ref': '#/definitions/Constraints'},
2731 'type': 'array'},
2732 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2733 'instance-id': {'type': 'string'},
2734 'jobs': {'items': {'type': 'string'},
2735 'type': 'array'},
2736 'nonce': {'type': 'string'},
2737 'parent-id': {'type': 'string'},
2738 'placement': {'$ref': '#/definitions/Placement'},
2739 'series': {'type': 'string'}},
2740 'required': ['series',
2741 'constraints',
2742 'jobs',
2743 'parent-id',
2744 'container-type',
2745 'instance-id',
2746 'nonce',
2747 'hardware-characteristics',
2748 'addresses'],
2749 'type': 'object'},
2750 'AddMachines': {'additionalProperties': False,
2751 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
2752 'type': 'array'}},
2753 'required': ['params'],
2754 'type': 'object'},
2755 'AddMachinesResult': {'additionalProperties': False,
2756 'properties': {'error': {'$ref': '#/definitions/Error'},
2757 'machine': {'type': 'string'}},
2758 'required': ['machine'],
2759 'type': 'object'},
2760 'AddMachinesResults': {'additionalProperties': False,
2761 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
2762 'type': 'array'}},
2763 'required': ['machines'],
2764 'type': 'object'},
2765 'Address': {'additionalProperties': False,
2766 'properties': {'scope': {'type': 'string'},
2767 'space-name': {'type': 'string'},
2768 'type': {'type': 'string'},
2769 'value': {'type': 'string'}},
2770 'required': ['value', 'type', 'scope'],
2771 'type': 'object'},
2772 'Constraints': {'additionalProperties': False,
2773 'properties': {'Count': {'type': 'integer'},
2774 'Pool': {'type': 'string'},
2775 'Size': {'type': 'integer'}},
2776 'required': ['Pool', 'Size', 'Count'],
2777 'type': 'object'},
2778 'Error': {'additionalProperties': False,
2779 'properties': {'code': {'type': 'string'},
2780 'info': {'$ref': '#/definitions/ErrorInfo'},
2781 'message': {'type': 'string'}},
2782 'required': ['message', 'code'],
2783 'type': 'object'},
2784 'ErrorInfo': {'additionalProperties': False,
2785 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2786 'macaroon-path': {'type': 'string'}},
2787 'type': 'object'},
2788 'HardwareCharacteristics': {'additionalProperties': False,
2789 'properties': {'arch': {'type': 'string'},
2790 'availability-zone': {'type': 'string'},
2791 'cpu-cores': {'type': 'integer'},
2792 'cpu-power': {'type': 'integer'},
2793 'mem': {'type': 'integer'},
2794 'root-disk': {'type': 'integer'},
2795 'tags': {'items': {'type': 'string'},
2796 'type': 'array'}},
2797 'type': 'object'},
2798 'InstanceType': {'additionalProperties': False,
2799 'properties': {'arches': {'items': {'type': 'string'},
2800 'type': 'array'},
2801 'cost': {'type': 'integer'},
2802 'cpu-cores': {'type': 'integer'},
2803 'deprecated': {'type': 'boolean'},
2804 'memory': {'type': 'integer'},
2805 'name': {'type': 'string'},
2806 'root-disk': {'type': 'integer'},
2807 'virt-type': {'type': 'string'}},
2808 'required': ['arches', 'cpu-cores', 'memory'],
2809 'type': 'object'},
2810 'InstanceTypesResult': {'additionalProperties': False,
2811 'properties': {'cost-currency': {'type': 'string'},
2812 'cost-divisor': {'type': 'integer'},
2813 'cost-unit': {'type': 'string'},
2814 'error': {'$ref': '#/definitions/Error'},
2815 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
2816 'type': 'array'}},
2817 'type': 'object'},
2818 'InstanceTypesResults': {'additionalProperties': False,
2819 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
2820 'type': 'array'}},
2821 'required': ['results'],
2822 'type': 'object'},
2823 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2824 'ModelInstanceTypesConstraint': {'additionalProperties': False,
2825 'properties': {'value': {'$ref': '#/definitions/Value'}},
2826 'type': 'object'},
2827 'ModelInstanceTypesConstraints': {'additionalProperties': False,
2828 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
2829 'type': 'array'}},
2830 'required': ['constraints'],
2831 'type': 'object'},
2832 'Placement': {'additionalProperties': False,
2833 'properties': {'directive': {'type': 'string'},
2834 'scope': {'type': 'string'}},
2835 'required': ['scope', 'directive'],
2836 'type': 'object'},
2837 'Value': {'additionalProperties': False,
2838 'properties': {'arch': {'type': 'string'},
2839 'container': {'type': 'string'},
2840 'cores': {'type': 'integer'},
2841 'cpu-power': {'type': 'integer'},
2842 'instance-type': {'type': 'string'},
2843 'mem': {'type': 'integer'},
2844 'root-disk': {'type': 'integer'},
2845 'spaces': {'items': {'type': 'string'},
2846 'type': 'array'},
2847 'tags': {'items': {'type': 'string'},
2848 'type': 'array'},
2849 'virt-type': {'type': 'string'}},
2850 'type': 'object'}},
2851 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2852 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2853 'type': 'object'},
2854 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
2855 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
2856 'type': 'object'}},
2857 'type': 'object'}
2858
2859
2860 @ReturnMapping(AddMachinesResults)
2861 async def AddMachines(self, params):
2862 '''
2863 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
2864 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
2865 '''
2866 # map input types to rpc msg
2867 _params = dict()
2868 msg = dict(type='MachineManager', request='AddMachines', version=2, params=_params)
2869 _params['params'] = params
2870 reply = await self.rpc(msg)
2871 return reply
2872
2873
2874
2875 @ReturnMapping(InstanceTypesResults)
2876 async def InstanceTypes(self, constraints):
2877 '''
2878 constraints : typing.Sequence<+T_co>[~ModelInstanceTypesConstraint]<~ModelInstanceTypesConstraint>
2879 Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
2880 '''
2881 # map input types to rpc msg
2882 _params = dict()
2883 msg = dict(type='MachineManager', request='InstanceTypes', version=2, params=_params)
2884 _params['constraints'] = constraints
2885 reply = await self.rpc(msg)
2886 return reply
2887
2888
2889
2890 class MetricsAdderFacade(Type):
2891 name = 'MetricsAdder'
2892 version = 2
2893 schema = {'definitions': {'Error': {'additionalProperties': False,
2894 'properties': {'code': {'type': 'string'},
2895 'info': {'$ref': '#/definitions/ErrorInfo'},
2896 'message': {'type': 'string'}},
2897 'required': ['message', 'code'],
2898 'type': 'object'},
2899 'ErrorInfo': {'additionalProperties': False,
2900 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2901 'macaroon-path': {'type': 'string'}},
2902 'type': 'object'},
2903 'ErrorResult': {'additionalProperties': False,
2904 'properties': {'error': {'$ref': '#/definitions/Error'}},
2905 'type': 'object'},
2906 'ErrorResults': {'additionalProperties': False,
2907 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2908 'type': 'array'}},
2909 'required': ['results'],
2910 'type': 'object'},
2911 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2912 'Metric': {'additionalProperties': False,
2913 'properties': {'key': {'type': 'string'},
2914 'time': {'format': 'date-time',
2915 'type': 'string'},
2916 'value': {'type': 'string'}},
2917 'required': ['key', 'value', 'time'],
2918 'type': 'object'},
2919 'MetricBatch': {'additionalProperties': False,
2920 'properties': {'charm-url': {'type': 'string'},
2921 'created': {'format': 'date-time',
2922 'type': 'string'},
2923 'metrics': {'items': {'$ref': '#/definitions/Metric'},
2924 'type': 'array'},
2925 'uuid': {'type': 'string'}},
2926 'required': ['uuid',
2927 'charm-url',
2928 'created',
2929 'metrics'],
2930 'type': 'object'},
2931 'MetricBatchParam': {'additionalProperties': False,
2932 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
2933 'tag': {'type': 'string'}},
2934 'required': ['tag', 'batch'],
2935 'type': 'object'},
2936 'MetricBatchParams': {'additionalProperties': False,
2937 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
2938 'type': 'array'}},
2939 'required': ['batches'],
2940 'type': 'object'}},
2941 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
2942 'Result': {'$ref': '#/definitions/ErrorResults'}},
2943 'type': 'object'}},
2944 'type': 'object'}
2945
2946
2947 @ReturnMapping(ErrorResults)
2948 async def AddMetricBatches(self, batches):
2949 '''
2950 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
2951 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2952 '''
2953 # map input types to rpc msg
2954 _params = dict()
2955 msg = dict(type='MetricsAdder', request='AddMetricBatches', version=2, params=_params)
2956 _params['batches'] = batches
2957 reply = await self.rpc(msg)
2958 return reply
2959
2960
2961
2962 class MetricsDebugFacade(Type):
2963 name = 'MetricsDebug'
2964 version = 2
2965 schema = {'definitions': {'Entities': {'additionalProperties': False,
2966 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2967 'type': 'array'}},
2968 'required': ['entities'],
2969 'type': 'object'},
2970 'Entity': {'additionalProperties': False,
2971 'properties': {'tag': {'type': 'string'}},
2972 'required': ['tag'],
2973 'type': 'object'},
2974 'EntityMetrics': {'additionalProperties': False,
2975 'properties': {'error': {'$ref': '#/definitions/Error'},
2976 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
2977 'type': 'array'}},
2978 'type': 'object'},
2979 'Error': {'additionalProperties': False,
2980 'properties': {'code': {'type': 'string'},
2981 'info': {'$ref': '#/definitions/ErrorInfo'},
2982 'message': {'type': 'string'}},
2983 'required': ['message', 'code'],
2984 'type': 'object'},
2985 'ErrorInfo': {'additionalProperties': False,
2986 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2987 'macaroon-path': {'type': 'string'}},
2988 'type': 'object'},
2989 'ErrorResult': {'additionalProperties': False,
2990 'properties': {'error': {'$ref': '#/definitions/Error'}},
2991 'type': 'object'},
2992 'ErrorResults': {'additionalProperties': False,
2993 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2994 'type': 'array'}},
2995 'required': ['results'],
2996 'type': 'object'},
2997 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2998 'MeterStatusParam': {'additionalProperties': False,
2999 'properties': {'code': {'type': 'string'},
3000 'info': {'type': 'string'},
3001 'tag': {'type': 'string'}},
3002 'required': ['tag', 'code', 'info'],
3003 'type': 'object'},
3004 'MeterStatusParams': {'additionalProperties': False,
3005 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
3006 'type': 'array'}},
3007 'required': ['statues'],
3008 'type': 'object'},
3009 'MetricResult': {'additionalProperties': False,
3010 'properties': {'key': {'type': 'string'},
3011 'time': {'format': 'date-time',
3012 'type': 'string'},
3013 'unit': {'type': 'string'},
3014 'value': {'type': 'string'}},
3015 'required': ['time', 'key', 'value', 'unit'],
3016 'type': 'object'},
3017 'MetricResults': {'additionalProperties': False,
3018 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
3019 'type': 'array'}},
3020 'required': ['results'],
3021 'type': 'object'}},
3022 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3023 'Result': {'$ref': '#/definitions/MetricResults'}},
3024 'type': 'object'},
3025 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
3026 'Result': {'$ref': '#/definitions/ErrorResults'}},
3027 'type': 'object'}},
3028 'type': 'object'}
3029
3030
3031 @ReturnMapping(MetricResults)
3032 async def GetMetrics(self, entities):
3033 '''
3034 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3035 Returns -> typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
3036 '''
3037 # map input types to rpc msg
3038 _params = dict()
3039 msg = dict(type='MetricsDebug', request='GetMetrics', version=2, params=_params)
3040 _params['entities'] = entities
3041 reply = await self.rpc(msg)
3042 return reply
3043
3044
3045
3046 @ReturnMapping(ErrorResults)
3047 async def SetMeterStatus(self, statues):
3048 '''
3049 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
3050 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3051 '''
3052 # map input types to rpc msg
3053 _params = dict()
3054 msg = dict(type='MetricsDebug', request='SetMeterStatus', version=2, params=_params)
3055 _params['statues'] = statues
3056 reply = await self.rpc(msg)
3057 return reply
3058
3059
3060
3061 class ModelManagerFacade(Type):
3062 name = 'ModelManager'
3063 version = 2
3064 schema = {'definitions': {'Entities': {'additionalProperties': False,
3065 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3066 'type': 'array'}},
3067 'required': ['entities'],
3068 'type': 'object'},
3069 'Entity': {'additionalProperties': False,
3070 'properties': {'tag': {'type': 'string'}},
3071 'required': ['tag'],
3072 'type': 'object'},
3073 'EntityStatus': {'additionalProperties': False,
3074 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3075 'type': 'object'}},
3076 'type': 'object'},
3077 'info': {'type': 'string'},
3078 'since': {'format': 'date-time',
3079 'type': 'string'},
3080 'status': {'type': 'string'}},
3081 'required': ['status', 'info', 'since'],
3082 'type': 'object'},
3083 'Error': {'additionalProperties': False,
3084 'properties': {'code': {'type': 'string'},
3085 'info': {'$ref': '#/definitions/ErrorInfo'},
3086 'message': {'type': 'string'}},
3087 'required': ['message', 'code'],
3088 'type': 'object'},
3089 'ErrorInfo': {'additionalProperties': False,
3090 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3091 'macaroon-path': {'type': 'string'}},
3092 'type': 'object'},
3093 'ErrorResult': {'additionalProperties': False,
3094 'properties': {'error': {'$ref': '#/definitions/Error'}},
3095 'type': 'object'},
3096 'ErrorResults': {'additionalProperties': False,
3097 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3098 'type': 'array'}},
3099 'required': ['results'],
3100 'type': 'object'},
3101 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3102 'MachineHardware': {'additionalProperties': False,
3103 'properties': {'arch': {'type': 'string'},
3104 'availability-zone': {'type': 'string'},
3105 'cores': {'type': 'integer'},
3106 'cpu-power': {'type': 'integer'},
3107 'mem': {'type': 'integer'},
3108 'root-disk': {'type': 'integer'},
3109 'tags': {'items': {'type': 'string'},
3110 'type': 'array'}},
3111 'type': 'object'},
3112 'MapResult': {'additionalProperties': False,
3113 'properties': {'error': {'$ref': '#/definitions/Error'},
3114 'result': {'patternProperties': {'.*': {'additionalProperties': True,
3115 'type': 'object'}},
3116 'type': 'object'}},
3117 'required': ['result'],
3118 'type': 'object'},
3119 'MapResults': {'additionalProperties': False,
3120 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
3121 'type': 'array'}},
3122 'required': ['results'],
3123 'type': 'object'},
3124 'Model': {'additionalProperties': False,
3125 'properties': {'name': {'type': 'string'},
3126 'owner-tag': {'type': 'string'},
3127 'uuid': {'type': 'string'}},
3128 'required': ['name', 'uuid', 'owner-tag'],
3129 'type': 'object'},
3130 'ModelCreateArgs': {'additionalProperties': False,
3131 'properties': {'cloud-tag': {'type': 'string'},
3132 'config': {'patternProperties': {'.*': {'additionalProperties': True,
3133 'type': 'object'}},
3134 'type': 'object'},
3135 'credential': {'type': 'string'},
3136 'name': {'type': 'string'},
3137 'owner-tag': {'type': 'string'},
3138 'region': {'type': 'string'}},
3139 'required': ['name', 'owner-tag'],
3140 'type': 'object'},
3141 'ModelDefaultValues': {'additionalProperties': False,
3142 'properties': {'cloud-region': {'type': 'string'},
3143 'cloud-tag': {'type': 'string'},
3144 'config': {'patternProperties': {'.*': {'additionalProperties': True,
3145 'type': 'object'}},
3146 'type': 'object'}},
3147 'required': ['config'],
3148 'type': 'object'},
3149 'ModelDefaults': {'additionalProperties': False,
3150 'properties': {'controller': {'additionalProperties': True,
3151 'type': 'object'},
3152 'default': {'additionalProperties': True,
3153 'type': 'object'},
3154 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
3155 'type': 'array'}},
3156 'type': 'object'},
3157 'ModelDefaultsResult': {'additionalProperties': False,
3158 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
3159 'type': 'object'}},
3160 'required': ['config'],
3161 'type': 'object'},
3162 'ModelInfo': {'additionalProperties': False,
3163 'properties': {'cloud-credential-tag': {'type': 'string'},
3164 'cloud-region': {'type': 'string'},
3165 'cloud-tag': {'type': 'string'},
3166 'controller-uuid': {'type': 'string'},
3167 'default-series': {'type': 'string'},
3168 'life': {'type': 'string'},
3169 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
3170 'type': 'array'},
3171 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
3172 'name': {'type': 'string'},
3173 'owner-tag': {'type': 'string'},
3174 'provider-type': {'type': 'string'},
3175 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
3176 'status': {'$ref': '#/definitions/EntityStatus'},
3177 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
3178 'type': 'array'},
3179 'uuid': {'type': 'string'}},
3180 'required': ['name',
3181 'uuid',
3182 'controller-uuid',
3183 'provider-type',
3184 'default-series',
3185 'cloud-tag',
3186 'owner-tag',
3187 'life',
3188 'status',
3189 'users',
3190 'machines',
3191 'sla'],
3192 'type': 'object'},
3193 'ModelInfoResult': {'additionalProperties': False,
3194 'properties': {'error': {'$ref': '#/definitions/Error'},
3195 'result': {'$ref': '#/definitions/ModelInfo'}},
3196 'type': 'object'},
3197 'ModelInfoResults': {'additionalProperties': False,
3198 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
3199 'type': 'array'}},
3200 'required': ['results'],
3201 'type': 'object'},
3202 'ModelMachineInfo': {'additionalProperties': False,
3203 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
3204 'has-vote': {'type': 'boolean'},
3205 'id': {'type': 'string'},
3206 'instance-id': {'type': 'string'},
3207 'status': {'type': 'string'},
3208 'wants-vote': {'type': 'boolean'}},
3209 'required': ['id'],
3210 'type': 'object'},
3211 'ModelMigrationStatus': {'additionalProperties': False,
3212 'properties': {'end': {'format': 'date-time',
3213 'type': 'string'},
3214 'start': {'format': 'date-time',
3215 'type': 'string'},
3216 'status': {'type': 'string'}},
3217 'required': ['status', 'start'],
3218 'type': 'object'},
3219 'ModelSLAInfo': {'additionalProperties': False,
3220 'properties': {'level': {'type': 'string'},
3221 'owner': {'type': 'string'}},
3222 'required': ['level', 'owner'],
3223 'type': 'object'},
3224 'ModelStatus': {'additionalProperties': False,
3225 'properties': {'application-count': {'type': 'integer'},
3226 'hosted-machine-count': {'type': 'integer'},
3227 'life': {'type': 'string'},
3228 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
3229 'type': 'array'},
3230 'model-tag': {'type': 'string'},
3231 'owner-tag': {'type': 'string'}},
3232 'required': ['model-tag',
3233 'life',
3234 'hosted-machine-count',
3235 'application-count',
3236 'owner-tag'],
3237 'type': 'object'},
3238 'ModelStatusResults': {'additionalProperties': False,
3239 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
3240 'type': 'array'}},
3241 'required': ['models'],
3242 'type': 'object'},
3243 'ModelUnsetKeys': {'additionalProperties': False,
3244 'properties': {'cloud-region': {'type': 'string'},
3245 'cloud-tag': {'type': 'string'},
3246 'keys': {'items': {'type': 'string'},
3247 'type': 'array'}},
3248 'required': ['keys'],
3249 'type': 'object'},
3250 'ModelUserInfo': {'additionalProperties': False,
3251 'properties': {'access': {'type': 'string'},
3252 'display-name': {'type': 'string'},
3253 'last-connection': {'format': 'date-time',
3254 'type': 'string'},
3255 'user': {'type': 'string'}},
3256 'required': ['user',
3257 'display-name',
3258 'last-connection',
3259 'access'],
3260 'type': 'object'},
3261 'ModifyModelAccess': {'additionalProperties': False,
3262 'properties': {'access': {'type': 'string'},
3263 'action': {'type': 'string'},
3264 'model-tag': {'type': 'string'},
3265 'user-tag': {'type': 'string'}},
3266 'required': ['user-tag',
3267 'action',
3268 'access',
3269 'model-tag'],
3270 'type': 'object'},
3271 'ModifyModelAccessRequest': {'additionalProperties': False,
3272 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
3273 'type': 'array'}},
3274 'required': ['changes'],
3275 'type': 'object'},
3276 'RegionDefaults': {'additionalProperties': False,
3277 'properties': {'region-name': {'type': 'string'},
3278 'value': {'additionalProperties': True,
3279 'type': 'object'}},
3280 'required': ['region-name', 'value'],
3281 'type': 'object'},
3282 'SetModelDefaults': {'additionalProperties': False,
3283 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
3284 'type': 'array'}},
3285 'required': ['config'],
3286 'type': 'object'},
3287 'UnsetModelDefaults': {'additionalProperties': False,
3288 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
3289 'type': 'array'}},
3290 'required': ['keys'],
3291 'type': 'object'},
3292 'UserModel': {'additionalProperties': False,
3293 'properties': {'last-connection': {'format': 'date-time',
3294 'type': 'string'},
3295 'model': {'$ref': '#/definitions/Model'}},
3296 'required': ['model', 'last-connection'],
3297 'type': 'object'},
3298 'UserModelList': {'additionalProperties': False,
3299 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
3300 'type': 'array'}},
3301 'required': ['user-models'],
3302 'type': 'object'}},
3303 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
3304 'Result': {'$ref': '#/definitions/ModelInfo'}},
3305 'type': 'object'},
3306 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3307 'Result': {'$ref': '#/definitions/ErrorResults'}},
3308 'type': 'object'},
3309 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3310 'Result': {'$ref': '#/definitions/MapResults'}},
3311 'type': 'object'},
3312 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3313 'Result': {'$ref': '#/definitions/MapResults'}},
3314 'type': 'object'},
3315 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
3316 'Result': {'$ref': '#/definitions/UserModelList'}},
3317 'type': 'object'},
3318 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
3319 'type': 'object'},
3320 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3321 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
3322 'type': 'object'},
3323 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3324 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
3325 'type': 'object'},
3326 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
3327 'Result': {'$ref': '#/definitions/ErrorResults'}},
3328 'type': 'object'},
3329 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
3330 'Result': {'$ref': '#/definitions/ErrorResults'}},
3331 'type': 'object'},
3332 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
3333 'Result': {'$ref': '#/definitions/ErrorResults'}},
3334 'type': 'object'}},
3335 'type': 'object'}
3336
3337
3338 @ReturnMapping(ModelInfo)
3339 async def CreateModel(self, cloud_tag, config, credential, name, owner_tag, region):
3340 '''
3341 cloud_tag : str
3342 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3343 credential : str
3344 name : str
3345 owner_tag : str
3346 region : str
3347 Returns -> typing.Union[_ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
3348 '''
3349 # map input types to rpc msg
3350 _params = dict()
3351 msg = dict(type='ModelManager', request='CreateModel', version=2, params=_params)
3352 _params['cloud-tag'] = cloud_tag
3353 _params['config'] = config
3354 _params['credential'] = credential
3355 _params['name'] = name
3356 _params['owner-tag'] = owner_tag
3357 _params['region'] = region
3358 reply = await self.rpc(msg)
3359 return reply
3360
3361
3362
3363 @ReturnMapping(ErrorResults)
3364 async def DestroyModels(self, entities):
3365 '''
3366 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3367 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3368 '''
3369 # map input types to rpc msg
3370 _params = dict()
3371 msg = dict(type='ModelManager', request='DestroyModels', version=2, params=_params)
3372 _params['entities'] = entities
3373 reply = await self.rpc(msg)
3374 return reply
3375
3376
3377
3378 @ReturnMapping(MapResults)
3379 async def DumpModels(self, entities):
3380 '''
3381 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3382 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
3383 '''
3384 # map input types to rpc msg
3385 _params = dict()
3386 msg = dict(type='ModelManager', request='DumpModels', version=2, params=_params)
3387 _params['entities'] = entities
3388 reply = await self.rpc(msg)
3389 return reply
3390
3391
3392
3393 @ReturnMapping(MapResults)
3394 async def DumpModelsDB(self, entities):
3395 '''
3396 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3397 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
3398 '''
3399 # map input types to rpc msg
3400 _params = dict()
3401 msg = dict(type='ModelManager', request='DumpModelsDB', version=2, params=_params)
3402 _params['entities'] = entities
3403 reply = await self.rpc(msg)
3404 return reply
3405
3406
3407
3408 @ReturnMapping(UserModelList)
3409 async def ListModels(self, tag):
3410 '''
3411 tag : str
3412 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
3413 '''
3414 # map input types to rpc msg
3415 _params = dict()
3416 msg = dict(type='ModelManager', request='ListModels', version=2, params=_params)
3417 _params['tag'] = tag
3418 reply = await self.rpc(msg)
3419 return reply
3420
3421
3422
3423 @ReturnMapping(ModelDefaultsResult)
3424 async def ModelDefaults(self):
3425 '''
3426
3427 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
3428 '''
3429 # map input types to rpc msg
3430 _params = dict()
3431 msg = dict(type='ModelManager', request='ModelDefaults', version=2, params=_params)
3432
3433 reply = await self.rpc(msg)
3434 return reply
3435
3436
3437
3438 @ReturnMapping(ModelInfoResults)
3439 async def ModelInfo(self, entities):
3440 '''
3441 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3442 Returns -> typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
3443 '''
3444 # map input types to rpc msg
3445 _params = dict()
3446 msg = dict(type='ModelManager', request='ModelInfo', version=2, params=_params)
3447 _params['entities'] = entities
3448 reply = await self.rpc(msg)
3449 return reply
3450
3451
3452
3453 @ReturnMapping(ModelStatusResults)
3454 async def ModelStatus(self, entities):
3455 '''
3456 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3457 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
3458 '''
3459 # map input types to rpc msg
3460 _params = dict()
3461 msg = dict(type='ModelManager', request='ModelStatus', version=2, params=_params)
3462 _params['entities'] = entities
3463 reply = await self.rpc(msg)
3464 return reply
3465
3466
3467
3468 @ReturnMapping(ErrorResults)
3469 async def ModifyModelAccess(self, changes):
3470 '''
3471 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
3472 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3473 '''
3474 # map input types to rpc msg
3475 _params = dict()
3476 msg = dict(type='ModelManager', request='ModifyModelAccess', version=2, params=_params)
3477 _params['changes'] = changes
3478 reply = await self.rpc(msg)
3479 return reply
3480
3481
3482
3483 @ReturnMapping(ErrorResults)
3484 async def SetModelDefaults(self, config):
3485 '''
3486 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
3487 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3488 '''
3489 # map input types to rpc msg
3490 _params = dict()
3491 msg = dict(type='ModelManager', request='SetModelDefaults', version=2, params=_params)
3492 _params['config'] = config
3493 reply = await self.rpc(msg)
3494 return reply
3495
3496
3497
3498 @ReturnMapping(ErrorResults)
3499 async def UnsetModelDefaults(self, keys):
3500 '''
3501 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
3502 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3503 '''
3504 # map input types to rpc msg
3505 _params = dict()
3506 msg = dict(type='ModelManager', request='UnsetModelDefaults', version=2, params=_params)
3507 _params['keys'] = keys
3508 reply = await self.rpc(msg)
3509 return reply
3510
3511
3512
3513 class RebootFacade(Type):
3514 name = 'Reboot'
3515 version = 2
3516 schema = {'definitions': {'Entities': {'additionalProperties': False,
3517 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3518 'type': 'array'}},
3519 'required': ['entities'],
3520 'type': 'object'},
3521 'Entity': {'additionalProperties': False,
3522 'properties': {'tag': {'type': 'string'}},
3523 'required': ['tag'],
3524 'type': 'object'},
3525 'Error': {'additionalProperties': False,
3526 'properties': {'code': {'type': 'string'},
3527 'info': {'$ref': '#/definitions/ErrorInfo'},
3528 'message': {'type': 'string'}},
3529 'required': ['message', 'code'],
3530 'type': 'object'},
3531 'ErrorInfo': {'additionalProperties': False,
3532 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3533 'macaroon-path': {'type': 'string'}},
3534 'type': 'object'},
3535 'ErrorResult': {'additionalProperties': False,
3536 'properties': {'error': {'$ref': '#/definitions/Error'}},
3537 'type': 'object'},
3538 'ErrorResults': {'additionalProperties': False,
3539 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3540 'type': 'array'}},
3541 'required': ['results'],
3542 'type': 'object'},
3543 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3544 'NotifyWatchResult': {'additionalProperties': False,
3545 'properties': {'NotifyWatcherId': {'type': 'string'},
3546 'error': {'$ref': '#/definitions/Error'}},
3547 'required': ['NotifyWatcherId'],
3548 'type': 'object'},
3549 'RebootActionResult': {'additionalProperties': False,
3550 'properties': {'error': {'$ref': '#/definitions/Error'},
3551 'result': {'type': 'string'}},
3552 'type': 'object'},
3553 'RebootActionResults': {'additionalProperties': False,
3554 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
3555 'type': 'array'}},
3556 'type': 'object'}},
3557 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3558 'Result': {'$ref': '#/definitions/ErrorResults'}},
3559 'type': 'object'},
3560 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3561 'Result': {'$ref': '#/definitions/RebootActionResults'}},
3562 'type': 'object'},
3563 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3564 'Result': {'$ref': '#/definitions/ErrorResults'}},
3565 'type': 'object'},
3566 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3567 'type': 'object'}},
3568 'type': 'object'}
3569
3570
3571 @ReturnMapping(ErrorResults)
3572 async def ClearReboot(self, entities):
3573 '''
3574 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3575 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3576 '''
3577 # map input types to rpc msg
3578 _params = dict()
3579 msg = dict(type='Reboot', request='ClearReboot', version=2, params=_params)
3580 _params['entities'] = entities
3581 reply = await self.rpc(msg)
3582 return reply
3583
3584
3585
3586 @ReturnMapping(RebootActionResults)
3587 async def GetRebootAction(self, entities):
3588 '''
3589 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3590 Returns -> typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
3591 '''
3592 # map input types to rpc msg
3593 _params = dict()
3594 msg = dict(type='Reboot', request='GetRebootAction', version=2, params=_params)
3595 _params['entities'] = entities
3596 reply = await self.rpc(msg)
3597 return reply
3598
3599
3600
3601 @ReturnMapping(ErrorResults)
3602 async def RequestReboot(self, entities):
3603 '''
3604 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3605 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3606 '''
3607 # map input types to rpc msg
3608 _params = dict()
3609 msg = dict(type='Reboot', request='RequestReboot', version=2, params=_params)
3610 _params['entities'] = entities
3611 reply = await self.rpc(msg)
3612 return reply
3613
3614
3615
3616 @ReturnMapping(NotifyWatchResult)
3617 async def WatchForRebootEvent(self):
3618 '''
3619
3620 Returns -> typing.Union[str, _ForwardRef('Error')]
3621 '''
3622 # map input types to rpc msg
3623 _params = dict()
3624 msg = dict(type='Reboot', request='WatchForRebootEvent', version=2, params=_params)
3625
3626 reply = await self.rpc(msg)
3627 return reply
3628
3629
3630
3631 class ResumerFacade(Type):
3632 name = 'Resumer'
3633 version = 2
3634 schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
3635
3636
3637 @ReturnMapping(None)
3638 async def ResumeTransactions(self):
3639 '''
3640
3641 Returns -> None
3642 '''
3643 # map input types to rpc msg
3644 _params = dict()
3645 msg = dict(type='Resumer', request='ResumeTransactions', version=2, params=_params)
3646
3647 reply = await self.rpc(msg)
3648 return reply
3649
3650
3651
3652 class SSHClientFacade(Type):
3653 name = 'SSHClient'
3654 version = 2
3655 schema = {'definitions': {'Entities': {'additionalProperties': False,
3656 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3657 'type': 'array'}},
3658 'required': ['entities'],
3659 'type': 'object'},
3660 'Entity': {'additionalProperties': False,
3661 'properties': {'tag': {'type': 'string'}},
3662 'required': ['tag'],
3663 'type': 'object'},
3664 'Error': {'additionalProperties': False,
3665 'properties': {'code': {'type': 'string'},
3666 'info': {'$ref': '#/definitions/ErrorInfo'},
3667 'message': {'type': 'string'}},
3668 'required': ['message', 'code'],
3669 'type': 'object'},
3670 'ErrorInfo': {'additionalProperties': False,
3671 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3672 'macaroon-path': {'type': 'string'}},
3673 'type': 'object'},
3674 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3675 'SSHAddressResult': {'additionalProperties': False,
3676 'properties': {'address': {'type': 'string'},
3677 'error': {'$ref': '#/definitions/Error'}},
3678 'type': 'object'},
3679 'SSHAddressResults': {'additionalProperties': False,
3680 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
3681 'type': 'array'}},
3682 'required': ['results'],
3683 'type': 'object'},
3684 'SSHAddressesResult': {'additionalProperties': False,
3685 'properties': {'addresses': {'items': {'type': 'string'},
3686 'type': 'array'},
3687 'error': {'$ref': '#/definitions/Error'}},
3688 'required': ['addresses'],
3689 'type': 'object'},
3690 'SSHAddressesResults': {'additionalProperties': False,
3691 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressesResult'},
3692 'type': 'array'}},
3693 'required': ['results'],
3694 'type': 'object'},
3695 'SSHProxyResult': {'additionalProperties': False,
3696 'properties': {'use-proxy': {'type': 'boolean'}},
3697 'required': ['use-proxy'],
3698 'type': 'object'},
3699 'SSHPublicKeysResult': {'additionalProperties': False,
3700 'properties': {'error': {'$ref': '#/definitions/Error'},
3701 'public-keys': {'items': {'type': 'string'},
3702 'type': 'array'}},
3703 'type': 'object'},
3704 'SSHPublicKeysResults': {'additionalProperties': False,
3705 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
3706 'type': 'array'}},
3707 'required': ['results'],
3708 'type': 'object'}},
3709 'properties': {'AllAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3710 'Result': {'$ref': '#/definitions/SSHAddressesResults'}},
3711 'type': 'object'},
3712 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3713 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
3714 'type': 'object'},
3715 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
3716 'type': 'object'},
3717 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3718 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
3719 'type': 'object'},
3720 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3721 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
3722 'type': 'object'}},
3723 'type': 'object'}
3724
3725
3726 @ReturnMapping(SSHAddressesResults)
3727 async def AllAddresses(self, entities):
3728 '''
3729 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3730 Returns -> typing.Sequence<+T_co>[~SSHAddressesResult]<~SSHAddressesResult>
3731 '''
3732 # map input types to rpc msg
3733 _params = dict()
3734 msg = dict(type='SSHClient', request='AllAddresses', version=2, params=_params)
3735 _params['entities'] = entities
3736 reply = await self.rpc(msg)
3737 return reply
3738
3739
3740
3741 @ReturnMapping(SSHAddressResults)
3742 async def PrivateAddress(self, entities):
3743 '''
3744 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3745 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
3746 '''
3747 # map input types to rpc msg
3748 _params = dict()
3749 msg = dict(type='SSHClient', request='PrivateAddress', version=2, params=_params)
3750 _params['entities'] = entities
3751 reply = await self.rpc(msg)
3752 return reply
3753
3754
3755
3756 @ReturnMapping(SSHProxyResult)
3757 async def Proxy(self):
3758 '''
3759
3760 Returns -> bool
3761 '''
3762 # map input types to rpc msg
3763 _params = dict()
3764 msg = dict(type='SSHClient', request='Proxy', version=2, params=_params)
3765
3766 reply = await self.rpc(msg)
3767 return reply
3768
3769
3770
3771 @ReturnMapping(SSHAddressResults)
3772 async def PublicAddress(self, entities):
3773 '''
3774 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3775 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
3776 '''
3777 # map input types to rpc msg
3778 _params = dict()
3779 msg = dict(type='SSHClient', request='PublicAddress', version=2, params=_params)
3780 _params['entities'] = entities
3781 reply = await self.rpc(msg)
3782 return reply
3783
3784
3785
3786 @ReturnMapping(SSHPublicKeysResults)
3787 async def PublicKeys(self, entities):
3788 '''
3789 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3790 Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
3791 '''
3792 # map input types to rpc msg
3793 _params = dict()
3794 msg = dict(type='SSHClient', request='PublicKeys', version=2, params=_params)
3795 _params['entities'] = entities
3796 reply = await self.rpc(msg)
3797 return reply
3798
3799
3800
3801 class SpacesFacade(Type):
3802 name = 'Spaces'
3803 version = 2
3804 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
3805 'properties': {'provider-id': {'type': 'string'},
3806 'public': {'type': 'boolean'},
3807 'space-tag': {'type': 'string'},
3808 'subnet-tags': {'items': {'type': 'string'},
3809 'type': 'array'}},
3810 'required': ['subnet-tags',
3811 'space-tag',
3812 'public'],
3813 'type': 'object'},
3814 'CreateSpacesParams': {'additionalProperties': False,
3815 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
3816 'type': 'array'}},
3817 'required': ['spaces'],
3818 'type': 'object'},
3819 'Error': {'additionalProperties': False,
3820 'properties': {'code': {'type': 'string'},
3821 'info': {'$ref': '#/definitions/ErrorInfo'},
3822 'message': {'type': 'string'}},
3823 'required': ['message', 'code'],
3824 'type': 'object'},
3825 'ErrorInfo': {'additionalProperties': False,
3826 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3827 'macaroon-path': {'type': 'string'}},
3828 'type': 'object'},
3829 'ErrorResult': {'additionalProperties': False,
3830 'properties': {'error': {'$ref': '#/definitions/Error'}},
3831 'type': 'object'},
3832 'ErrorResults': {'additionalProperties': False,
3833 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3834 'type': 'array'}},
3835 'required': ['results'],
3836 'type': 'object'},
3837 'ListSpacesResults': {'additionalProperties': False,
3838 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
3839 'type': 'array'}},
3840 'required': ['results'],
3841 'type': 'object'},
3842 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3843 'Space': {'additionalProperties': False,
3844 'properties': {'error': {'$ref': '#/definitions/Error'},
3845 'name': {'type': 'string'},
3846 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
3847 'type': 'array'}},
3848 'required': ['name', 'subnets'],
3849 'type': 'object'},
3850 'Subnet': {'additionalProperties': False,
3851 'properties': {'cidr': {'type': 'string'},
3852 'life': {'type': 'string'},
3853 'provider-id': {'type': 'string'},
3854 'provider-network-id': {'type': 'string'},
3855 'space-tag': {'type': 'string'},
3856 'status': {'type': 'string'},
3857 'vlan-tag': {'type': 'integer'},
3858 'zones': {'items': {'type': 'string'},
3859 'type': 'array'}},
3860 'required': ['cidr',
3861 'vlan-tag',
3862 'life',
3863 'space-tag',
3864 'zones'],
3865 'type': 'object'}},
3866 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
3867 'Result': {'$ref': '#/definitions/ErrorResults'}},
3868 'type': 'object'},
3869 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
3870 'type': 'object'}},
3871 'type': 'object'}
3872
3873
3874 @ReturnMapping(ErrorResults)
3875 async def CreateSpaces(self, spaces):
3876 '''
3877 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
3878 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3879 '''
3880 # map input types to rpc msg
3881 _params = dict()
3882 msg = dict(type='Spaces', request='CreateSpaces', version=2, params=_params)
3883 _params['spaces'] = spaces
3884 reply = await self.rpc(msg)
3885 return reply
3886
3887
3888
3889 @ReturnMapping(ListSpacesResults)
3890 async def ListSpaces(self):
3891 '''
3892
3893 Returns -> typing.Sequence<+T_co>[~Space]<~Space>
3894 '''
3895 # map input types to rpc msg
3896 _params = dict()
3897 msg = dict(type='Spaces', request='ListSpaces', version=2, params=_params)
3898
3899 reply = await self.rpc(msg)
3900 return reply
3901
3902
3903
3904 class StatusHistoryFacade(Type):
3905 name = 'StatusHistory'
3906 version = 2
3907 schema = {'definitions': {'Error': {'additionalProperties': False,
3908 'properties': {'code': {'type': 'string'},
3909 'info': {'$ref': '#/definitions/ErrorInfo'},
3910 'message': {'type': 'string'}},
3911 'required': ['message', 'code'],
3912 'type': 'object'},
3913 'ErrorInfo': {'additionalProperties': False,
3914 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3915 'macaroon-path': {'type': 'string'}},
3916 'type': 'object'},
3917 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3918 'ModelConfigResult': {'additionalProperties': False,
3919 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
3920 'type': 'object'}},
3921 'type': 'object'}},
3922 'required': ['config'],
3923 'type': 'object'},
3924 'NotifyWatchResult': {'additionalProperties': False,
3925 'properties': {'NotifyWatcherId': {'type': 'string'},
3926 'error': {'$ref': '#/definitions/Error'}},
3927 'required': ['NotifyWatcherId'],
3928 'type': 'object'},
3929 'StatusHistoryPruneArgs': {'additionalProperties': False,
3930 'properties': {'max-history-mb': {'type': 'integer'},
3931 'max-history-time': {'type': 'integer'}},
3932 'required': ['max-history-time',
3933 'max-history-mb'],
3934 'type': 'object'}},
3935 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
3936 'type': 'object'},
3937 'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
3938 'type': 'object'},
3939 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3940 'type': 'object'}},
3941 'type': 'object'}
3942
3943
3944 @ReturnMapping(ModelConfigResult)
3945 async def ModelConfig(self):
3946 '''
3947
3948 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
3949 '''
3950 # map input types to rpc msg
3951 _params = dict()
3952 msg = dict(type='StatusHistory', request='ModelConfig', version=2, params=_params)
3953
3954 reply = await self.rpc(msg)
3955 return reply
3956
3957
3958
3959 @ReturnMapping(None)
3960 async def Prune(self, max_history_mb, max_history_time):
3961 '''
3962 max_history_mb : int
3963 max_history_time : int
3964 Returns -> None
3965 '''
3966 # map input types to rpc msg
3967 _params = dict()
3968 msg = dict(type='StatusHistory', request='Prune', version=2, params=_params)
3969 _params['max-history-mb'] = max_history_mb
3970 _params['max-history-time'] = max_history_time
3971 reply = await self.rpc(msg)
3972 return reply
3973
3974
3975
3976 @ReturnMapping(NotifyWatchResult)
3977 async def WatchForModelConfigChanges(self):
3978 '''
3979
3980 Returns -> typing.Union[str, _ForwardRef('Error')]
3981 '''
3982 # map input types to rpc msg
3983 _params = dict()
3984 msg = dict(type='StatusHistory', request='WatchForModelConfigChanges', version=2, params=_params)
3985
3986 reply = await self.rpc(msg)
3987 return reply
3988
3989
3990
3991 class SubnetsFacade(Type):
3992 name = 'Subnets'
3993 version = 2
3994 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
3995 'properties': {'provider-network-id': {'type': 'string'},
3996 'space-tag': {'type': 'string'},
3997 'subnet-provider-id': {'type': 'string'},
3998 'subnet-tag': {'type': 'string'},
3999 'vlan-tag': {'type': 'integer'},
4000 'zones': {'items': {'type': 'string'},
4001 'type': 'array'}},
4002 'required': ['space-tag'],
4003 'type': 'object'},
4004 'AddSubnetsParams': {'additionalProperties': False,
4005 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
4006 'type': 'array'}},
4007 'required': ['subnets'],
4008 'type': 'object'},
4009 'Error': {'additionalProperties': False,
4010 'properties': {'code': {'type': 'string'},
4011 'info': {'$ref': '#/definitions/ErrorInfo'},
4012 'message': {'type': 'string'}},
4013 'required': ['message', 'code'],
4014 'type': 'object'},
4015 'ErrorInfo': {'additionalProperties': False,
4016 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4017 'macaroon-path': {'type': 'string'}},
4018 'type': 'object'},
4019 'ErrorResult': {'additionalProperties': False,
4020 'properties': {'error': {'$ref': '#/definitions/Error'}},
4021 'type': 'object'},
4022 'ErrorResults': {'additionalProperties': False,
4023 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
4024 'type': 'array'}},
4025 'required': ['results'],
4026 'type': 'object'},
4027 'ListSubnetsResults': {'additionalProperties': False,
4028 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
4029 'type': 'array'}},
4030 'required': ['results'],
4031 'type': 'object'},
4032 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4033 'SpaceResult': {'additionalProperties': False,
4034 'properties': {'error': {'$ref': '#/definitions/Error'},
4035 'tag': {'type': 'string'}},
4036 'required': ['tag'],
4037 'type': 'object'},
4038 'SpaceResults': {'additionalProperties': False,
4039 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'},
4040 'type': 'array'}},
4041 'required': ['results'],
4042 'type': 'object'},
4043 'Subnet': {'additionalProperties': False,
4044 'properties': {'cidr': {'type': 'string'},
4045 'life': {'type': 'string'},
4046 'provider-id': {'type': 'string'},
4047 'provider-network-id': {'type': 'string'},
4048 'space-tag': {'type': 'string'},
4049 'status': {'type': 'string'},
4050 'vlan-tag': {'type': 'integer'},
4051 'zones': {'items': {'type': 'string'},
4052 'type': 'array'}},
4053 'required': ['cidr',
4054 'vlan-tag',
4055 'life',
4056 'space-tag',
4057 'zones'],
4058 'type': 'object'},
4059 'SubnetsFilters': {'additionalProperties': False,
4060 'properties': {'space-tag': {'type': 'string'},
4061 'zone': {'type': 'string'}},
4062 'type': 'object'},
4063 'ZoneResult': {'additionalProperties': False,
4064 'properties': {'available': {'type': 'boolean'},
4065 'error': {'$ref': '#/definitions/Error'},
4066 'name': {'type': 'string'}},
4067 'required': ['name', 'available'],
4068 'type': 'object'},
4069 'ZoneResults': {'additionalProperties': False,
4070 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'},
4071 'type': 'array'}},
4072 'required': ['results'],
4073 'type': 'object'}},
4074 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
4075 'Result': {'$ref': '#/definitions/ErrorResults'}},
4076 'type': 'object'},
4077 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
4078 'type': 'object'},
4079 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
4080 'type': 'object'},
4081 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
4082 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
4083 'type': 'object'}},
4084 'type': 'object'}
4085
4086
4087 @ReturnMapping(ErrorResults)
4088 async def AddSubnets(self, subnets):
4089 '''
4090 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
4091 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4092 '''
4093 # map input types to rpc msg
4094 _params = dict()
4095 msg = dict(type='Subnets', request='AddSubnets', version=2, params=_params)
4096 _params['subnets'] = subnets
4097 reply = await self.rpc(msg)
4098 return reply
4099
4100
4101
4102 @ReturnMapping(SpaceResults)
4103 async def AllSpaces(self):
4104 '''
4105
4106 Returns -> typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
4107 '''
4108 # map input types to rpc msg
4109 _params = dict()
4110 msg = dict(type='Subnets', request='AllSpaces', version=2, params=_params)
4111
4112 reply = await self.rpc(msg)
4113 return reply
4114
4115
4116
4117 @ReturnMapping(ZoneResults)
4118 async def AllZones(self):
4119 '''
4120
4121 Returns -> typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
4122 '''
4123 # map input types to rpc msg
4124 _params = dict()
4125 msg = dict(type='Subnets', request='AllZones', version=2, params=_params)
4126
4127 reply = await self.rpc(msg)
4128 return reply
4129
4130
4131
4132 @ReturnMapping(ListSubnetsResults)
4133 async def ListSubnets(self, space_tag, zone):
4134 '''
4135 space_tag : str
4136 zone : str
4137 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
4138 '''
4139 # map input types to rpc msg
4140 _params = dict()
4141 msg = dict(type='Subnets', request='ListSubnets', version=2, params=_params)
4142 _params['space-tag'] = space_tag
4143 _params['zone'] = zone
4144 reply = await self.rpc(msg)
4145 return reply
4146
4147
4148
4149 class VolumeAttachmentsWatcherFacade(Type):
4150 name = 'VolumeAttachmentsWatcher'
4151 version = 2
4152 schema = {'definitions': {'Error': {'additionalProperties': False,
4153 'properties': {'code': {'type': 'string'},
4154 'info': {'$ref': '#/definitions/ErrorInfo'},
4155 'message': {'type': 'string'}},
4156 'required': ['message', 'code'],
4157 'type': 'object'},
4158 'ErrorInfo': {'additionalProperties': False,
4159 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
4160 'macaroon-path': {'type': 'string'}},
4161 'type': 'object'},
4162 'Macaroon': {'additionalProperties': False, 'type': 'object'},
4163 'MachineStorageId': {'additionalProperties': False,
4164 'properties': {'attachment-tag': {'type': 'string'},
4165 'machine-tag': {'type': 'string'}},
4166 'required': ['machine-tag',
4167 'attachment-tag'],
4168 'type': 'object'},
4169 'MachineStorageIdsWatchResult': {'additionalProperties': False,
4170 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
4171 'type': 'array'},
4172 'error': {'$ref': '#/definitions/Error'},
4173 'watcher-id': {'type': 'string'}},
4174 'required': ['watcher-id',
4175 'changes'],
4176 'type': 'object'}},
4177 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
4178 'type': 'object'},
4179 'Stop': {'type': 'object'}},
4180 'type': 'object'}
4181
4182
4183 @ReturnMapping(MachineStorageIdsWatchResult)
4184 async def Next(self):
4185 '''
4186
4187 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
4188 '''
4189 # map input types to rpc msg
4190 _params = dict()
4191 msg = dict(type='VolumeAttachmentsWatcher', request='Next', version=2, params=_params)
4192
4193 reply = await self.rpc(msg)
4194 return reply
4195
4196
4197
4198 @ReturnMapping(None)
4199 async def Stop(self):
4200 '''
4201
4202 Returns -> None
4203 '''
4204 # map input types to rpc msg
4205 _params = dict()
4206 msg = dict(type='VolumeAttachmentsWatcher', request='Stop', version=2, params=_params)
4207
4208 reply = await self.rpc(msg)
4209 return reply
4210
4211