Feature/api version support (#109)
[osm/N2VC.git] / juju / client / _client3.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 ApplicationFacade(Type):
9 name = 'Application'
10 version = 3
11 schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
12 'properties': {'application': {'type': 'string'},
13 'num-units': {'type': 'integer'},
14 'placement': {'items': {'$ref': '#/definitions/Placement'},
15 'type': 'array'}},
16 'required': ['application',
17 'num-units',
18 'placement'],
19 'type': 'object'},
20 'AddApplicationUnitsResults': {'additionalProperties': False,
21 'properties': {'units': {'items': {'type': 'string'},
22 'type': 'array'}},
23 'required': ['units'],
24 'type': 'object'},
25 'AddRelation': {'additionalProperties': False,
26 'properties': {'endpoints': {'items': {'type': 'string'},
27 'type': 'array'}},
28 'required': ['endpoints'],
29 'type': 'object'},
30 'AddRelationResults': {'additionalProperties': False,
31 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
32 'type': 'object'}},
33 'required': ['endpoints'],
34 'type': 'object'},
35 'ApplicationCharmRelations': {'additionalProperties': False,
36 'properties': {'application': {'type': 'string'}},
37 'required': ['application'],
38 'type': 'object'},
39 'ApplicationCharmRelationsResults': {'additionalProperties': False,
40 'properties': {'charm-relations': {'items': {'type': 'string'},
41 'type': 'array'}},
42 'required': ['charm-relations'],
43 'type': 'object'},
44 'ApplicationDeploy': {'additionalProperties': False,
45 'properties': {'application': {'type': 'string'},
46 'channel': {'type': 'string'},
47 'charm-url': {'type': 'string'},
48 'config': {'patternProperties': {'.*': {'type': 'string'}},
49 'type': 'object'},
50 'config-yaml': {'type': 'string'},
51 'constraints': {'$ref': '#/definitions/Value'},
52 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
53 'type': 'object'},
54 'num-units': {'type': 'integer'},
55 'placement': {'items': {'$ref': '#/definitions/Placement'},
56 'type': 'array'},
57 'resources': {'patternProperties': {'.*': {'type': 'string'}},
58 'type': 'object'},
59 'series': {'type': 'string'},
60 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
61 'type': 'object'}},
62 'required': ['application',
63 'series',
64 'charm-url',
65 'channel',
66 'num-units',
67 'config-yaml',
68 'constraints'],
69 'type': 'object'},
70 'ApplicationDestroy': {'additionalProperties': False,
71 'properties': {'application': {'type': 'string'}},
72 'required': ['application'],
73 'type': 'object'},
74 'ApplicationExpose': {'additionalProperties': False,
75 'properties': {'application': {'type': 'string'}},
76 'required': ['application'],
77 'type': 'object'},
78 'ApplicationGet': {'additionalProperties': False,
79 'properties': {'application': {'type': 'string'}},
80 'required': ['application'],
81 'type': 'object'},
82 'ApplicationGetResults': {'additionalProperties': False,
83 'properties': {'application': {'type': 'string'},
84 'charm': {'type': 'string'},
85 'config': {'patternProperties': {'.*': {'additionalProperties': True,
86 'type': 'object'}},
87 'type': 'object'},
88 'constraints': {'$ref': '#/definitions/Value'},
89 'series': {'type': 'string'}},
90 'required': ['application',
91 'charm',
92 'config',
93 'constraints',
94 'series'],
95 'type': 'object'},
96 'ApplicationMetricCredential': {'additionalProperties': False,
97 'properties': {'application': {'type': 'string'},
98 'metrics-credentials': {'items': {'type': 'integer'},
99 'type': 'array'}},
100 'required': ['application',
101 'metrics-credentials'],
102 'type': 'object'},
103 'ApplicationMetricCredentials': {'additionalProperties': False,
104 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
105 'type': 'array'}},
106 'required': ['creds'],
107 'type': 'object'},
108 'ApplicationSet': {'additionalProperties': False,
109 'properties': {'application': {'type': 'string'},
110 'options': {'patternProperties': {'.*': {'type': 'string'}},
111 'type': 'object'}},
112 'required': ['application', 'options'],
113 'type': 'object'},
114 'ApplicationSetCharm': {'additionalProperties': False,
115 'properties': {'application': {'type': 'string'},
116 'channel': {'type': 'string'},
117 'charm-url': {'type': 'string'},
118 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
119 'type': 'object'},
120 'config-settings-yaml': {'type': 'string'},
121 'force-series': {'type': 'boolean'},
122 'force-units': {'type': 'boolean'},
123 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
124 'type': 'object'},
125 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
126 'type': 'object'}},
127 'required': ['application',
128 'charm-url',
129 'channel',
130 'force-units',
131 'force-series'],
132 'type': 'object'},
133 'ApplicationUnexpose': {'additionalProperties': False,
134 'properties': {'application': {'type': 'string'}},
135 'required': ['application'],
136 'type': 'object'},
137 'ApplicationUnset': {'additionalProperties': False,
138 'properties': {'application': {'type': 'string'},
139 'options': {'items': {'type': 'string'},
140 'type': 'array'}},
141 'required': ['application', 'options'],
142 'type': 'object'},
143 'ApplicationUpdate': {'additionalProperties': False,
144 'properties': {'application': {'type': 'string'},
145 'charm-url': {'type': 'string'},
146 'constraints': {'$ref': '#/definitions/Value'},
147 'force-charm-url': {'type': 'boolean'},
148 'force-series': {'type': 'boolean'},
149 'min-units': {'type': 'integer'},
150 'settings': {'patternProperties': {'.*': {'type': 'string'}},
151 'type': 'object'},
152 'settings-yaml': {'type': 'string'}},
153 'required': ['application',
154 'charm-url',
155 'force-charm-url',
156 'force-series',
157 'settings-yaml'],
158 'type': 'object'},
159 'ApplicationsDeploy': {'additionalProperties': False,
160 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
161 'type': 'array'}},
162 'required': ['applications'],
163 'type': 'object'},
164 'CharmRelation': {'additionalProperties': False,
165 'properties': {'interface': {'type': 'string'},
166 'limit': {'type': 'integer'},
167 'name': {'type': 'string'},
168 'optional': {'type': 'boolean'},
169 'role': {'type': 'string'},
170 'scope': {'type': 'string'}},
171 'required': ['name',
172 'role',
173 'interface',
174 'optional',
175 'limit',
176 'scope'],
177 'type': 'object'},
178 'Constraints': {'additionalProperties': False,
179 'properties': {'Count': {'type': 'integer'},
180 'Pool': {'type': 'string'},
181 'Size': {'type': 'integer'}},
182 'required': ['Pool', 'Size', 'Count'],
183 'type': 'object'},
184 'DestroyApplicationUnits': {'additionalProperties': False,
185 'properties': {'unit-names': {'items': {'type': 'string'},
186 'type': 'array'}},
187 'required': ['unit-names'],
188 'type': 'object'},
189 'DestroyRelation': {'additionalProperties': False,
190 'properties': {'endpoints': {'items': {'type': 'string'},
191 'type': 'array'}},
192 'required': ['endpoints'],
193 'type': 'object'},
194 'Error': {'additionalProperties': False,
195 'properties': {'code': {'type': 'string'},
196 'info': {'$ref': '#/definitions/ErrorInfo'},
197 'message': {'type': 'string'}},
198 'required': ['message', 'code'],
199 'type': 'object'},
200 'ErrorInfo': {'additionalProperties': False,
201 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
202 'macaroon-path': {'type': 'string'}},
203 'type': 'object'},
204 'ErrorResult': {'additionalProperties': False,
205 'properties': {'error': {'$ref': '#/definitions/Error'}},
206 'type': 'object'},
207 'ErrorResults': {'additionalProperties': False,
208 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
209 'type': 'array'}},
210 'required': ['results'],
211 'type': 'object'},
212 'GetApplicationConstraints': {'additionalProperties': False,
213 'properties': {'application': {'type': 'string'}},
214 'required': ['application'],
215 'type': 'object'},
216 'GetConstraintsResults': {'additionalProperties': False,
217 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
218 'required': ['constraints'],
219 'type': 'object'},
220 'Macaroon': {'additionalProperties': False, 'type': 'object'},
221 'Placement': {'additionalProperties': False,
222 'properties': {'directive': {'type': 'string'},
223 'scope': {'type': 'string'}},
224 'required': ['scope', 'directive'],
225 'type': 'object'},
226 'SetConstraints': {'additionalProperties': False,
227 'properties': {'application': {'type': 'string'},
228 'constraints': {'$ref': '#/definitions/Value'}},
229 'required': ['application', 'constraints'],
230 'type': 'object'},
231 'StorageConstraints': {'additionalProperties': False,
232 'properties': {'count': {'type': 'integer'},
233 'pool': {'type': 'string'},
234 'size': {'type': 'integer'}},
235 'type': 'object'},
236 'StringResult': {'additionalProperties': False,
237 'properties': {'error': {'$ref': '#/definitions/Error'},
238 'result': {'type': 'string'}},
239 'required': ['result'],
240 'type': 'object'},
241 'Value': {'additionalProperties': False,
242 'properties': {'arch': {'type': 'string'},
243 'container': {'type': 'string'},
244 'cores': {'type': 'integer'},
245 'cpu-power': {'type': 'integer'},
246 'instance-type': {'type': 'string'},
247 'mem': {'type': 'integer'},
248 'root-disk': {'type': 'integer'},
249 'spaces': {'items': {'type': 'string'},
250 'type': 'array'},
251 'tags': {'items': {'type': 'string'},
252 'type': 'array'},
253 'virt-type': {'type': 'string'}},
254 'type': 'object'}},
255 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
256 'Result': {'$ref': '#/definitions/AddRelationResults'}},
257 'type': 'object'},
258 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
259 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
260 'type': 'object'},
261 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
262 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
263 'type': 'object'},
264 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
265 'Result': {'$ref': '#/definitions/ErrorResults'}},
266 'type': 'object'},
267 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
268 'type': 'object'},
269 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
270 'type': 'object'},
271 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
272 'type': 'object'},
273 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
274 'type': 'object'},
275 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
276 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
277 'type': 'object'},
278 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
279 'Result': {'$ref': '#/definitions/StringResult'}},
280 'type': 'object'},
281 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
282 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
283 'type': 'object'},
284 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
285 'type': 'object'},
286 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
287 'type': 'object'},
288 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
289 'type': 'object'},
290 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
291 'Result': {'$ref': '#/definitions/ErrorResults'}},
292 'type': 'object'},
293 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
294 'type': 'object'},
295 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
296 'type': 'object'},
297 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
298 'type': 'object'}},
299 'type': 'object'}
300
301
302 @ReturnMapping(AddRelationResults)
303 async def AddRelation(self, endpoints):
304 '''
305 endpoints : typing.Sequence<+T_co>[str]
306 Returns -> typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
307 '''
308 # map input types to rpc msg
309 _params = dict()
310 msg = dict(type='Application', request='AddRelation', version=3, params=_params)
311 _params['endpoints'] = endpoints
312 reply = await self.rpc(msg)
313 return reply
314
315
316
317 @ReturnMapping(AddApplicationUnitsResults)
318 async def AddUnits(self, application, num_units, placement):
319 '''
320 application : str
321 num_units : int
322 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
323 Returns -> typing.Sequence<+T_co>[str]
324 '''
325 # map input types to rpc msg
326 _params = dict()
327 msg = dict(type='Application', request='AddUnits', version=3, params=_params)
328 _params['application'] = application
329 _params['num-units'] = num_units
330 _params['placement'] = placement
331 reply = await self.rpc(msg)
332 return reply
333
334
335
336 @ReturnMapping(ApplicationCharmRelationsResults)
337 async def CharmRelations(self, application):
338 '''
339 application : str
340 Returns -> typing.Sequence<+T_co>[str]
341 '''
342 # map input types to rpc msg
343 _params = dict()
344 msg = dict(type='Application', request='CharmRelations', version=3, params=_params)
345 _params['application'] = application
346 reply = await self.rpc(msg)
347 return reply
348
349
350
351 @ReturnMapping(ErrorResults)
352 async def Deploy(self, applications):
353 '''
354 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
355 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
356 '''
357 # map input types to rpc msg
358 _params = dict()
359 msg = dict(type='Application', request='Deploy', version=3, params=_params)
360 _params['applications'] = applications
361 reply = await self.rpc(msg)
362 return reply
363
364
365
366 @ReturnMapping(None)
367 async def Destroy(self, application):
368 '''
369 application : str
370 Returns -> None
371 '''
372 # map input types to rpc msg
373 _params = dict()
374 msg = dict(type='Application', request='Destroy', version=3, params=_params)
375 _params['application'] = application
376 reply = await self.rpc(msg)
377 return reply
378
379
380
381 @ReturnMapping(None)
382 async def DestroyRelation(self, endpoints):
383 '''
384 endpoints : typing.Sequence<+T_co>[str]
385 Returns -> None
386 '''
387 # map input types to rpc msg
388 _params = dict()
389 msg = dict(type='Application', request='DestroyRelation', version=3, params=_params)
390 _params['endpoints'] = endpoints
391 reply = await self.rpc(msg)
392 return reply
393
394
395
396 @ReturnMapping(None)
397 async def DestroyUnits(self, unit_names):
398 '''
399 unit_names : typing.Sequence<+T_co>[str]
400 Returns -> None
401 '''
402 # map input types to rpc msg
403 _params = dict()
404 msg = dict(type='Application', request='DestroyUnits', version=3, params=_params)
405 _params['unit-names'] = unit_names
406 reply = await self.rpc(msg)
407 return reply
408
409
410
411 @ReturnMapping(None)
412 async def Expose(self, application):
413 '''
414 application : str
415 Returns -> None
416 '''
417 # map input types to rpc msg
418 _params = dict()
419 msg = dict(type='Application', request='Expose', version=3, params=_params)
420 _params['application'] = application
421 reply = await self.rpc(msg)
422 return reply
423
424
425
426 @ReturnMapping(ApplicationGetResults)
427 async def Get(self, application):
428 '''
429 application : str
430 Returns -> typing.Union[str, typing.Mapping<~KT, +VT_co>[str, typing.Any], _ForwardRef('Value')]
431 '''
432 # map input types to rpc msg
433 _params = dict()
434 msg = dict(type='Application', request='Get', version=3, params=_params)
435 _params['application'] = application
436 reply = await self.rpc(msg)
437 return reply
438
439
440
441 @ReturnMapping(StringResult)
442 async def GetCharmURL(self, application):
443 '''
444 application : str
445 Returns -> typing.Union[_ForwardRef('Error'), str]
446 '''
447 # map input types to rpc msg
448 _params = dict()
449 msg = dict(type='Application', request='GetCharmURL', version=3, params=_params)
450 _params['application'] = application
451 reply = await self.rpc(msg)
452 return reply
453
454
455
456 @ReturnMapping(GetConstraintsResults)
457 async def GetConstraints(self, application):
458 '''
459 application : str
460 Returns -> Value
461 '''
462 # map input types to rpc msg
463 _params = dict()
464 msg = dict(type='Application', request='GetConstraints', version=3, params=_params)
465 _params['application'] = application
466 reply = await self.rpc(msg)
467 return reply
468
469
470
471 @ReturnMapping(None)
472 async def Set(self, application, options):
473 '''
474 application : str
475 options : typing.Mapping<~KT, +VT_co>[str, str]
476 Returns -> None
477 '''
478 # map input types to rpc msg
479 _params = dict()
480 msg = dict(type='Application', request='Set', version=3, params=_params)
481 _params['application'] = application
482 _params['options'] = options
483 reply = await self.rpc(msg)
484 return reply
485
486
487
488 @ReturnMapping(None)
489 async def SetCharm(self, application, channel, charm_url, config_settings, config_settings_yaml, force_series, force_units, resource_ids, storage_constraints):
490 '''
491 application : str
492 channel : str
493 charm_url : str
494 config_settings : typing.Mapping<~KT, +VT_co>[str, str]
495 config_settings_yaml : str
496 force_series : bool
497 force_units : bool
498 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
499 storage_constraints : typing.Mapping<~KT, +VT_co>[str, ~StorageConstraints]<~StorageConstraints>
500 Returns -> None
501 '''
502 # map input types to rpc msg
503 _params = dict()
504 msg = dict(type='Application', request='SetCharm', version=3, params=_params)
505 _params['application'] = application
506 _params['channel'] = channel
507 _params['charm-url'] = charm_url
508 _params['config-settings'] = config_settings
509 _params['config-settings-yaml'] = config_settings_yaml
510 _params['force-series'] = force_series
511 _params['force-units'] = force_units
512 _params['resource-ids'] = resource_ids
513 _params['storage-constraints'] = storage_constraints
514 reply = await self.rpc(msg)
515 return reply
516
517
518
519 @ReturnMapping(None)
520 async def SetConstraints(self, application, constraints):
521 '''
522 application : str
523 constraints : Value
524 Returns -> None
525 '''
526 # map input types to rpc msg
527 _params = dict()
528 msg = dict(type='Application', request='SetConstraints', version=3, params=_params)
529 _params['application'] = application
530 _params['constraints'] = constraints
531 reply = await self.rpc(msg)
532 return reply
533
534
535
536 @ReturnMapping(ErrorResults)
537 async def SetMetricCredentials(self, creds):
538 '''
539 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
540 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
541 '''
542 # map input types to rpc msg
543 _params = dict()
544 msg = dict(type='Application', request='SetMetricCredentials', version=3, params=_params)
545 _params['creds'] = creds
546 reply = await self.rpc(msg)
547 return reply
548
549
550
551 @ReturnMapping(None)
552 async def Unexpose(self, application):
553 '''
554 application : str
555 Returns -> None
556 '''
557 # map input types to rpc msg
558 _params = dict()
559 msg = dict(type='Application', request='Unexpose', version=3, params=_params)
560 _params['application'] = application
561 reply = await self.rpc(msg)
562 return reply
563
564
565
566 @ReturnMapping(None)
567 async def Unset(self, application, options):
568 '''
569 application : str
570 options : typing.Sequence<+T_co>[str]
571 Returns -> None
572 '''
573 # map input types to rpc msg
574 _params = dict()
575 msg = dict(type='Application', request='Unset', version=3, params=_params)
576 _params['application'] = application
577 _params['options'] = options
578 reply = await self.rpc(msg)
579 return reply
580
581
582
583 @ReturnMapping(None)
584 async def Update(self, application, charm_url, constraints, force_charm_url, force_series, min_units, settings, settings_yaml):
585 '''
586 application : str
587 charm_url : str
588 constraints : Value
589 force_charm_url : bool
590 force_series : bool
591 min_units : int
592 settings : typing.Mapping<~KT, +VT_co>[str, str]
593 settings_yaml : str
594 Returns -> None
595 '''
596 # map input types to rpc msg
597 _params = dict()
598 msg = dict(type='Application', request='Update', version=3, params=_params)
599 _params['application'] = application
600 _params['charm-url'] = charm_url
601 _params['constraints'] = constraints
602 _params['force-charm-url'] = force_charm_url
603 _params['force-series'] = force_series
604 _params['min-units'] = min_units
605 _params['settings'] = settings
606 _params['settings-yaml'] = settings_yaml
607 reply = await self.rpc(msg)
608 return reply
609
610
611
612 class ControllerFacade(Type):
613 name = 'Controller'
614 version = 3
615 schema = {'definitions': {'AllWatcherId': {'additionalProperties': False,
616 'properties': {'watcher-id': {'type': 'string'}},
617 'required': ['watcher-id'],
618 'type': 'object'},
619 'CloudCredential': {'additionalProperties': False,
620 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
621 'type': 'object'},
622 'auth-type': {'type': 'string'},
623 'redacted': {'items': {'type': 'string'},
624 'type': 'array'}},
625 'required': ['auth-type'],
626 'type': 'object'},
627 'CloudSpec': {'additionalProperties': False,
628 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
629 'endpoint': {'type': 'string'},
630 'identity-endpoint': {'type': 'string'},
631 'name': {'type': 'string'},
632 'region': {'type': 'string'},
633 'storage-endpoint': {'type': 'string'},
634 'type': {'type': 'string'}},
635 'required': ['type', 'name'],
636 'type': 'object'},
637 'CloudSpecResult': {'additionalProperties': False,
638 'properties': {'error': {'$ref': '#/definitions/Error'},
639 'result': {'$ref': '#/definitions/CloudSpec'}},
640 'type': 'object'},
641 'CloudSpecResults': {'additionalProperties': False,
642 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
643 'type': 'array'}},
644 'type': 'object'},
645 'ConfigValue': {'additionalProperties': False,
646 'properties': {'source': {'type': 'string'},
647 'value': {'additionalProperties': True,
648 'type': 'object'}},
649 'required': ['value', 'source'],
650 'type': 'object'},
651 'ControllerConfigResult': {'additionalProperties': False,
652 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
653 'type': 'object'}},
654 'type': 'object'}},
655 'required': ['config'],
656 'type': 'object'},
657 'DestroyControllerArgs': {'additionalProperties': False,
658 'properties': {'destroy-models': {'type': 'boolean'}},
659 'required': ['destroy-models'],
660 'type': 'object'},
661 'Entities': {'additionalProperties': False,
662 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
663 'type': 'array'}},
664 'required': ['entities'],
665 'type': 'object'},
666 'Entity': {'additionalProperties': False,
667 'properties': {'tag': {'type': 'string'}},
668 'required': ['tag'],
669 'type': 'object'},
670 'Error': {'additionalProperties': False,
671 'properties': {'code': {'type': 'string'},
672 'info': {'$ref': '#/definitions/ErrorInfo'},
673 'message': {'type': 'string'}},
674 'required': ['message', 'code'],
675 'type': 'object'},
676 'ErrorInfo': {'additionalProperties': False,
677 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
678 'macaroon-path': {'type': 'string'}},
679 'type': 'object'},
680 'ErrorResult': {'additionalProperties': False,
681 'properties': {'error': {'$ref': '#/definitions/Error'}},
682 'type': 'object'},
683 'ErrorResults': {'additionalProperties': False,
684 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
685 'type': 'array'}},
686 'required': ['results'],
687 'type': 'object'},
688 'HostedModelConfig': {'additionalProperties': False,
689 'properties': {'cloud-spec': {'$ref': '#/definitions/CloudSpec'},
690 'config': {'patternProperties': {'.*': {'additionalProperties': True,
691 'type': 'object'}},
692 'type': 'object'},
693 'error': {'$ref': '#/definitions/Error'},
694 'name': {'type': 'string'},
695 'owner': {'type': 'string'}},
696 'required': ['name', 'owner'],
697 'type': 'object'},
698 'HostedModelConfigsResults': {'additionalProperties': False,
699 'properties': {'models': {'items': {'$ref': '#/definitions/HostedModelConfig'},
700 'type': 'array'}},
701 'required': ['models'],
702 'type': 'object'},
703 'InitiateMigrationArgs': {'additionalProperties': False,
704 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
705 'type': 'array'}},
706 'required': ['specs'],
707 'type': 'object'},
708 'InitiateMigrationResult': {'additionalProperties': False,
709 'properties': {'error': {'$ref': '#/definitions/Error'},
710 'migration-id': {'type': 'string'},
711 'model-tag': {'type': 'string'}},
712 'required': ['model-tag',
713 'migration-id'],
714 'type': 'object'},
715 'InitiateMigrationResults': {'additionalProperties': False,
716 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
717 'type': 'array'}},
718 'required': ['results'],
719 'type': 'object'},
720 'Macaroon': {'additionalProperties': False, 'type': 'object'},
721 'MachineHardware': {'additionalProperties': False,
722 'properties': {'arch': {'type': 'string'},
723 'availability-zone': {'type': 'string'},
724 'cores': {'type': 'integer'},
725 'cpu-power': {'type': 'integer'},
726 'mem': {'type': 'integer'},
727 'root-disk': {'type': 'integer'},
728 'tags': {'items': {'type': 'string'},
729 'type': 'array'}},
730 'type': 'object'},
731 'MigrationSpec': {'additionalProperties': False,
732 'properties': {'external-control': {'type': 'boolean'},
733 'model-tag': {'type': 'string'},
734 'skip-initial-prechecks': {'type': 'boolean'},
735 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
736 'required': ['model-tag',
737 'target-info',
738 'external-control',
739 'skip-initial-prechecks'],
740 'type': 'object'},
741 'MigrationTargetInfo': {'additionalProperties': False,
742 'properties': {'addrs': {'items': {'type': 'string'},
743 'type': 'array'},
744 'auth-tag': {'type': 'string'},
745 'ca-cert': {'type': 'string'},
746 'controller-tag': {'type': 'string'},
747 'macaroons': {'type': 'string'},
748 'password': {'type': 'string'}},
749 'required': ['controller-tag',
750 'addrs',
751 'ca-cert',
752 'auth-tag'],
753 'type': 'object'},
754 'Model': {'additionalProperties': False,
755 'properties': {'name': {'type': 'string'},
756 'owner-tag': {'type': 'string'},
757 'uuid': {'type': 'string'}},
758 'required': ['name', 'uuid', 'owner-tag'],
759 'type': 'object'},
760 'ModelBlockInfo': {'additionalProperties': False,
761 'properties': {'blocks': {'items': {'type': 'string'},
762 'type': 'array'},
763 'model-uuid': {'type': 'string'},
764 'name': {'type': 'string'},
765 'owner-tag': {'type': 'string'}},
766 'required': ['name',
767 'model-uuid',
768 'owner-tag',
769 'blocks'],
770 'type': 'object'},
771 'ModelBlockInfoList': {'additionalProperties': False,
772 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
773 'type': 'array'}},
774 'type': 'object'},
775 'ModelConfigResults': {'additionalProperties': False,
776 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
777 'type': 'object'}},
778 'required': ['config'],
779 'type': 'object'},
780 'ModelMachineInfo': {'additionalProperties': False,
781 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
782 'has-vote': {'type': 'boolean'},
783 'id': {'type': 'string'},
784 'instance-id': {'type': 'string'},
785 'status': {'type': 'string'},
786 'wants-vote': {'type': 'boolean'}},
787 'required': ['id'],
788 'type': 'object'},
789 'ModelStatus': {'additionalProperties': False,
790 'properties': {'application-count': {'type': 'integer'},
791 'hosted-machine-count': {'type': 'integer'},
792 'life': {'type': 'string'},
793 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
794 'type': 'array'},
795 'model-tag': {'type': 'string'},
796 'owner-tag': {'type': 'string'}},
797 'required': ['model-tag',
798 'life',
799 'hosted-machine-count',
800 'application-count',
801 'owner-tag'],
802 'type': 'object'},
803 'ModelStatusResults': {'additionalProperties': False,
804 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
805 'type': 'array'}},
806 'required': ['models'],
807 'type': 'object'},
808 'ModelTag': {'additionalProperties': False, 'type': 'object'},
809 'ModifyControllerAccess': {'additionalProperties': False,
810 'properties': {'access': {'type': 'string'},
811 'action': {'type': 'string'},
812 'user-tag': {'type': 'string'}},
813 'required': ['user-tag',
814 'action',
815 'access'],
816 'type': 'object'},
817 'ModifyControllerAccessRequest': {'additionalProperties': False,
818 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
819 'type': 'array'}},
820 'required': ['changes'],
821 'type': 'object'},
822 'RemoveBlocksArgs': {'additionalProperties': False,
823 'properties': {'all': {'type': 'boolean'}},
824 'required': ['all'],
825 'type': 'object'},
826 'UserAccess': {'additionalProperties': False,
827 'properties': {'access': {'type': 'string'},
828 'user-tag': {'type': 'string'}},
829 'required': ['user-tag', 'access'],
830 'type': 'object'},
831 'UserAccessResult': {'additionalProperties': False,
832 'properties': {'error': {'$ref': '#/definitions/Error'},
833 'result': {'$ref': '#/definitions/UserAccess'}},
834 'type': 'object'},
835 'UserAccessResults': {'additionalProperties': False,
836 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
837 'type': 'array'}},
838 'type': 'object'},
839 'UserModel': {'additionalProperties': False,
840 'properties': {'last-connection': {'format': 'date-time',
841 'type': 'string'},
842 'model': {'$ref': '#/definitions/Model'}},
843 'required': ['model', 'last-connection'],
844 'type': 'object'},
845 'UserModelList': {'additionalProperties': False,
846 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
847 'type': 'array'}},
848 'required': ['user-models'],
849 'type': 'object'}},
850 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
851 'type': 'object'},
852 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
853 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
854 'type': 'object'},
855 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
856 'type': 'object'},
857 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
858 'type': 'object'},
859 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
860 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
861 'type': 'object'},
862 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
863 'Result': {'$ref': '#/definitions/UserAccessResults'}},
864 'type': 'object'},
865 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}},
866 'type': 'object'},
867 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
868 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
869 'type': 'object'},
870 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
871 'type': 'object'},
872 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
873 'type': 'object'},
874 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
875 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
876 'type': 'object'},
877 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
878 'Result': {'$ref': '#/definitions/ErrorResults'}},
879 'type': 'object'},
880 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
881 'type': 'object'},
882 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
883 'type': 'object'}},
884 'type': 'object'}
885
886
887 @ReturnMapping(UserModelList)
888 async def AllModels(self):
889 '''
890
891 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
892 '''
893 # map input types to rpc msg
894 _params = dict()
895 msg = dict(type='Controller', request='AllModels', version=3, params=_params)
896
897 reply = await self.rpc(msg)
898 return reply
899
900
901
902 @ReturnMapping(CloudSpecResults)
903 async def CloudSpec(self, entities):
904 '''
905 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
906 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
907 '''
908 # map input types to rpc msg
909 _params = dict()
910 msg = dict(type='Controller', request='CloudSpec', version=3, params=_params)
911 _params['entities'] = entities
912 reply = await self.rpc(msg)
913 return reply
914
915
916
917 @ReturnMapping(ControllerConfigResult)
918 async def ControllerConfig(self):
919 '''
920
921 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
922 '''
923 # map input types to rpc msg
924 _params = dict()
925 msg = dict(type='Controller', request='ControllerConfig', version=3, params=_params)
926
927 reply = await self.rpc(msg)
928 return reply
929
930
931
932 @ReturnMapping(None)
933 async def DestroyController(self, destroy_models):
934 '''
935 destroy_models : bool
936 Returns -> None
937 '''
938 # map input types to rpc msg
939 _params = dict()
940 msg = dict(type='Controller', request='DestroyController', version=3, params=_params)
941 _params['destroy-models'] = destroy_models
942 reply = await self.rpc(msg)
943 return reply
944
945
946
947 @ReturnMapping(CloudSpecResult)
948 async def GetCloudSpec(self):
949 '''
950
951 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
952 '''
953 # map input types to rpc msg
954 _params = dict()
955 msg = dict(type='Controller', request='GetCloudSpec', version=3, params=_params)
956
957 reply = await self.rpc(msg)
958 return reply
959
960
961
962 @ReturnMapping(UserAccessResults)
963 async def GetControllerAccess(self, entities):
964 '''
965 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
966 Returns -> typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
967 '''
968 # map input types to rpc msg
969 _params = dict()
970 msg = dict(type='Controller', request='GetControllerAccess', version=3, params=_params)
971 _params['entities'] = entities
972 reply = await self.rpc(msg)
973 return reply
974
975
976
977 @ReturnMapping(HostedModelConfigsResults)
978 async def HostedModelConfigs(self):
979 '''
980
981 Returns -> typing.Sequence<+T_co>[~HostedModelConfig]<~HostedModelConfig>
982 '''
983 # map input types to rpc msg
984 _params = dict()
985 msg = dict(type='Controller', request='HostedModelConfigs', version=3, params=_params)
986
987 reply = await self.rpc(msg)
988 return reply
989
990
991
992 @ReturnMapping(InitiateMigrationResults)
993 async def InitiateMigration(self, specs):
994 '''
995 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
996 Returns -> typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
997 '''
998 # map input types to rpc msg
999 _params = dict()
1000 msg = dict(type='Controller', request='InitiateMigration', version=3, params=_params)
1001 _params['specs'] = specs
1002 reply = await self.rpc(msg)
1003 return reply
1004
1005
1006
1007 @ReturnMapping(ModelBlockInfoList)
1008 async def ListBlockedModels(self):
1009 '''
1010
1011 Returns -> typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
1012 '''
1013 # map input types to rpc msg
1014 _params = dict()
1015 msg = dict(type='Controller', request='ListBlockedModels', version=3, params=_params)
1016
1017 reply = await self.rpc(msg)
1018 return reply
1019
1020
1021
1022 @ReturnMapping(ModelConfigResults)
1023 async def ModelConfig(self):
1024 '''
1025
1026 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1027 '''
1028 # map input types to rpc msg
1029 _params = dict()
1030 msg = dict(type='Controller', request='ModelConfig', version=3, params=_params)
1031
1032 reply = await self.rpc(msg)
1033 return reply
1034
1035
1036
1037 @ReturnMapping(ModelStatusResults)
1038 async def ModelStatus(self, entities):
1039 '''
1040 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1041 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
1042 '''
1043 # map input types to rpc msg
1044 _params = dict()
1045 msg = dict(type='Controller', request='ModelStatus', version=3, params=_params)
1046 _params['entities'] = entities
1047 reply = await self.rpc(msg)
1048 return reply
1049
1050
1051
1052 @ReturnMapping(ErrorResults)
1053 async def ModifyControllerAccess(self, changes):
1054 '''
1055 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
1056 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1057 '''
1058 # map input types to rpc msg
1059 _params = dict()
1060 msg = dict(type='Controller', request='ModifyControllerAccess', version=3, params=_params)
1061 _params['changes'] = changes
1062 reply = await self.rpc(msg)
1063 return reply
1064
1065
1066
1067 @ReturnMapping(None)
1068 async def RemoveBlocks(self, all_):
1069 '''
1070 all_ : bool
1071 Returns -> None
1072 '''
1073 # map input types to rpc msg
1074 _params = dict()
1075 msg = dict(type='Controller', request='RemoveBlocks', version=3, params=_params)
1076 _params['all'] = all_
1077 reply = await self.rpc(msg)
1078 return reply
1079
1080
1081
1082 @ReturnMapping(AllWatcherId)
1083 async def WatchAllModels(self):
1084 '''
1085
1086 Returns -> str
1087 '''
1088 # map input types to rpc msg
1089 _params = dict()
1090 msg = dict(type='Controller', request='WatchAllModels', version=3, params=_params)
1091
1092 reply = await self.rpc(msg)
1093 return reply
1094
1095
1096
1097 class FirewallerFacade(Type):
1098 name = 'Firewaller'
1099 version = 3
1100 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
1101 'properties': {'error': {'$ref': '#/definitions/Error'},
1102 'result': {'type': 'boolean'}},
1103 'required': ['result'],
1104 'type': 'object'},
1105 'BoolResults': {'additionalProperties': False,
1106 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
1107 'type': 'array'}},
1108 'required': ['results'],
1109 'type': 'object'},
1110 'CloudCredential': {'additionalProperties': False,
1111 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1112 'type': 'object'},
1113 'auth-type': {'type': 'string'},
1114 'redacted': {'items': {'type': 'string'},
1115 'type': 'array'}},
1116 'required': ['auth-type'],
1117 'type': 'object'},
1118 'CloudSpec': {'additionalProperties': False,
1119 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
1120 'endpoint': {'type': 'string'},
1121 'identity-endpoint': {'type': 'string'},
1122 'name': {'type': 'string'},
1123 'region': {'type': 'string'},
1124 'storage-endpoint': {'type': 'string'},
1125 'type': {'type': 'string'}},
1126 'required': ['type', 'name'],
1127 'type': 'object'},
1128 'CloudSpecResult': {'additionalProperties': False,
1129 'properties': {'error': {'$ref': '#/definitions/Error'},
1130 'result': {'$ref': '#/definitions/CloudSpec'}},
1131 'type': 'object'},
1132 'CloudSpecResults': {'additionalProperties': False,
1133 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
1134 'type': 'array'}},
1135 'type': 'object'},
1136 'Entities': {'additionalProperties': False,
1137 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1138 'type': 'array'}},
1139 'required': ['entities'],
1140 'type': 'object'},
1141 'Entity': {'additionalProperties': False,
1142 'properties': {'tag': {'type': 'string'}},
1143 'required': ['tag'],
1144 'type': 'object'},
1145 'Error': {'additionalProperties': False,
1146 'properties': {'code': {'type': 'string'},
1147 'info': {'$ref': '#/definitions/ErrorInfo'},
1148 'message': {'type': 'string'}},
1149 'required': ['message', 'code'],
1150 'type': 'object'},
1151 'ErrorInfo': {'additionalProperties': False,
1152 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1153 'macaroon-path': {'type': 'string'}},
1154 'type': 'object'},
1155 'LifeResult': {'additionalProperties': False,
1156 'properties': {'error': {'$ref': '#/definitions/Error'},
1157 'life': {'type': 'string'}},
1158 'required': ['life'],
1159 'type': 'object'},
1160 'LifeResults': {'additionalProperties': False,
1161 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1162 'type': 'array'}},
1163 'required': ['results'],
1164 'type': 'object'},
1165 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1166 'MachinePortRange': {'additionalProperties': False,
1167 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
1168 'relation-tag': {'type': 'string'},
1169 'unit-tag': {'type': 'string'}},
1170 'required': ['unit-tag',
1171 'relation-tag',
1172 'port-range'],
1173 'type': 'object'},
1174 'MachinePorts': {'additionalProperties': False,
1175 'properties': {'machine-tag': {'type': 'string'},
1176 'subnet-tag': {'type': 'string'}},
1177 'required': ['machine-tag', 'subnet-tag'],
1178 'type': 'object'},
1179 'MachinePortsParams': {'additionalProperties': False,
1180 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
1181 'type': 'array'}},
1182 'required': ['params'],
1183 'type': 'object'},
1184 'MachinePortsResult': {'additionalProperties': False,
1185 'properties': {'error': {'$ref': '#/definitions/Error'},
1186 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
1187 'type': 'array'}},
1188 'required': ['ports'],
1189 'type': 'object'},
1190 'MachinePortsResults': {'additionalProperties': False,
1191 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
1192 'type': 'array'}},
1193 'required': ['results'],
1194 'type': 'object'},
1195 'ModelConfigResult': {'additionalProperties': False,
1196 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1197 'type': 'object'}},
1198 'type': 'object'}},
1199 'required': ['config'],
1200 'type': 'object'},
1201 'ModelTag': {'additionalProperties': False, 'type': 'object'},
1202 'NotifyWatchResult': {'additionalProperties': False,
1203 'properties': {'NotifyWatcherId': {'type': 'string'},
1204 'error': {'$ref': '#/definitions/Error'}},
1205 'required': ['NotifyWatcherId'],
1206 'type': 'object'},
1207 'NotifyWatchResults': {'additionalProperties': False,
1208 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1209 'type': 'array'}},
1210 'required': ['results'],
1211 'type': 'object'},
1212 'PortRange': {'additionalProperties': False,
1213 'properties': {'from-port': {'type': 'integer'},
1214 'protocol': {'type': 'string'},
1215 'to-port': {'type': 'integer'}},
1216 'required': ['from-port', 'to-port', 'protocol'],
1217 'type': 'object'},
1218 'StringResult': {'additionalProperties': False,
1219 'properties': {'error': {'$ref': '#/definitions/Error'},
1220 'result': {'type': 'string'}},
1221 'required': ['result'],
1222 'type': 'object'},
1223 'StringResults': {'additionalProperties': False,
1224 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
1225 'type': 'array'}},
1226 'required': ['results'],
1227 'type': 'object'},
1228 'StringsResult': {'additionalProperties': False,
1229 'properties': {'error': {'$ref': '#/definitions/Error'},
1230 'result': {'items': {'type': 'string'},
1231 'type': 'array'}},
1232 'type': 'object'},
1233 'StringsResults': {'additionalProperties': False,
1234 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1235 'type': 'array'}},
1236 'required': ['results'],
1237 'type': 'object'},
1238 'StringsWatchResult': {'additionalProperties': False,
1239 'properties': {'changes': {'items': {'type': 'string'},
1240 'type': 'array'},
1241 'error': {'$ref': '#/definitions/Error'},
1242 'watcher-id': {'type': 'string'}},
1243 'required': ['watcher-id'],
1244 'type': 'object'},
1245 'StringsWatchResults': {'additionalProperties': False,
1246 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
1247 'type': 'array'}},
1248 'required': ['results'],
1249 'type': 'object'}},
1250 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1251 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
1252 'type': 'object'},
1253 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1254 'Result': {'$ref': '#/definitions/StringResults'}},
1255 'type': 'object'},
1256 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
1257 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
1258 'type': 'object'},
1259 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1260 'Result': {'$ref': '#/definitions/BoolResults'}},
1261 'type': 'object'},
1262 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1263 'Result': {'$ref': '#/definitions/StringsResults'}},
1264 'type': 'object'},
1265 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
1266 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
1267 'type': 'object'},
1268 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1269 'Result': {'$ref': '#/definitions/StringResults'}},
1270 'type': 'object'},
1271 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1272 'Result': {'$ref': '#/definitions/LifeResults'}},
1273 'type': 'object'},
1274 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1275 'type': 'object'},
1276 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1277 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1278 'type': 'object'},
1279 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1280 'type': 'object'},
1281 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1282 'type': 'object'},
1283 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1284 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1285 'type': 'object'},
1286 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1287 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1288 'type': 'object'}},
1289 'type': 'object'}
1290
1291
1292 @ReturnMapping(CloudSpecResults)
1293 async def CloudSpec(self, entities):
1294 '''
1295 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1296 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
1297 '''
1298 # map input types to rpc msg
1299 _params = dict()
1300 msg = dict(type='Firewaller', request='CloudSpec', version=3, params=_params)
1301 _params['entities'] = entities
1302 reply = await self.rpc(msg)
1303 return reply
1304
1305
1306
1307 @ReturnMapping(StringResults)
1308 async def GetAssignedMachine(self, entities):
1309 '''
1310 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1311 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1312 '''
1313 # map input types to rpc msg
1314 _params = dict()
1315 msg = dict(type='Firewaller', request='GetAssignedMachine', version=3, params=_params)
1316 _params['entities'] = entities
1317 reply = await self.rpc(msg)
1318 return reply
1319
1320
1321
1322 @ReturnMapping(CloudSpecResult)
1323 async def GetCloudSpec(self):
1324 '''
1325
1326 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
1327 '''
1328 # map input types to rpc msg
1329 _params = dict()
1330 msg = dict(type='Firewaller', request='GetCloudSpec', version=3, params=_params)
1331
1332 reply = await self.rpc(msg)
1333 return reply
1334
1335
1336
1337 @ReturnMapping(BoolResults)
1338 async def GetExposed(self, entities):
1339 '''
1340 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1341 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
1342 '''
1343 # map input types to rpc msg
1344 _params = dict()
1345 msg = dict(type='Firewaller', request='GetExposed', version=3, params=_params)
1346 _params['entities'] = entities
1347 reply = await self.rpc(msg)
1348 return reply
1349
1350
1351
1352 @ReturnMapping(StringsResults)
1353 async def GetMachineActiveSubnets(self, entities):
1354 '''
1355 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1356 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
1357 '''
1358 # map input types to rpc msg
1359 _params = dict()
1360 msg = dict(type='Firewaller', request='GetMachineActiveSubnets', version=3, params=_params)
1361 _params['entities'] = entities
1362 reply = await self.rpc(msg)
1363 return reply
1364
1365
1366
1367 @ReturnMapping(MachinePortsResults)
1368 async def GetMachinePorts(self, params):
1369 '''
1370 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
1371 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
1372 '''
1373 # map input types to rpc msg
1374 _params = dict()
1375 msg = dict(type='Firewaller', request='GetMachinePorts', version=3, params=_params)
1376 _params['params'] = params
1377 reply = await self.rpc(msg)
1378 return reply
1379
1380
1381
1382 @ReturnMapping(StringResults)
1383 async def InstanceId(self, entities):
1384 '''
1385 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1386 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1387 '''
1388 # map input types to rpc msg
1389 _params = dict()
1390 msg = dict(type='Firewaller', request='InstanceId', version=3, params=_params)
1391 _params['entities'] = entities
1392 reply = await self.rpc(msg)
1393 return reply
1394
1395
1396
1397 @ReturnMapping(LifeResults)
1398 async def Life(self, entities):
1399 '''
1400 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1401 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
1402 '''
1403 # map input types to rpc msg
1404 _params = dict()
1405 msg = dict(type='Firewaller', request='Life', version=3, params=_params)
1406 _params['entities'] = entities
1407 reply = await self.rpc(msg)
1408 return reply
1409
1410
1411
1412 @ReturnMapping(ModelConfigResult)
1413 async def ModelConfig(self):
1414 '''
1415
1416 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
1417 '''
1418 # map input types to rpc msg
1419 _params = dict()
1420 msg = dict(type='Firewaller', request='ModelConfig', version=3, params=_params)
1421
1422 reply = await self.rpc(msg)
1423 return reply
1424
1425
1426
1427 @ReturnMapping(NotifyWatchResults)
1428 async def Watch(self, entities):
1429 '''
1430 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1431 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
1432 '''
1433 # map input types to rpc msg
1434 _params = dict()
1435 msg = dict(type='Firewaller', request='Watch', version=3, params=_params)
1436 _params['entities'] = entities
1437 reply = await self.rpc(msg)
1438 return reply
1439
1440
1441
1442 @ReturnMapping(NotifyWatchResult)
1443 async def WatchForModelConfigChanges(self):
1444 '''
1445
1446 Returns -> typing.Union[str, _ForwardRef('Error')]
1447 '''
1448 # map input types to rpc msg
1449 _params = dict()
1450 msg = dict(type='Firewaller', request='WatchForModelConfigChanges', version=3, params=_params)
1451
1452 reply = await self.rpc(msg)
1453 return reply
1454
1455
1456
1457 @ReturnMapping(StringsWatchResult)
1458 async def WatchModelMachines(self):
1459 '''
1460
1461 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
1462 '''
1463 # map input types to rpc msg
1464 _params = dict()
1465 msg = dict(type='Firewaller', request='WatchModelMachines', version=3, params=_params)
1466
1467 reply = await self.rpc(msg)
1468 return reply
1469
1470
1471
1472 @ReturnMapping(StringsWatchResults)
1473 async def WatchOpenedPorts(self, entities):
1474 '''
1475 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1476 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
1477 '''
1478 # map input types to rpc msg
1479 _params = dict()
1480 msg = dict(type='Firewaller', request='WatchOpenedPorts', version=3, params=_params)
1481 _params['entities'] = entities
1482 reply = await self.rpc(msg)
1483 return reply
1484
1485
1486
1487 @ReturnMapping(StringsWatchResults)
1488 async def WatchUnits(self, entities):
1489 '''
1490 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1491 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
1492 '''
1493 # map input types to rpc msg
1494 _params = dict()
1495 msg = dict(type='Firewaller', request='WatchUnits', version=3, params=_params)
1496 _params['entities'] = entities
1497 reply = await self.rpc(msg)
1498 return reply
1499
1500
1501
1502 class InstancePollerFacade(Type):
1503 name = 'InstancePoller'
1504 version = 3
1505 schema = {'definitions': {'Address': {'additionalProperties': False,
1506 'properties': {'scope': {'type': 'string'},
1507 'space-name': {'type': 'string'},
1508 'type': {'type': 'string'},
1509 'value': {'type': 'string'}},
1510 'required': ['value', 'type', 'scope'],
1511 'type': 'object'},
1512 'BoolResult': {'additionalProperties': False,
1513 'properties': {'error': {'$ref': '#/definitions/Error'},
1514 'result': {'type': 'boolean'}},
1515 'required': ['result'],
1516 'type': 'object'},
1517 'BoolResults': {'additionalProperties': False,
1518 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
1519 'type': 'array'}},
1520 'required': ['results'],
1521 'type': 'object'},
1522 'Entities': {'additionalProperties': False,
1523 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1524 'type': 'array'}},
1525 'required': ['entities'],
1526 'type': 'object'},
1527 'Entity': {'additionalProperties': False,
1528 'properties': {'tag': {'type': 'string'}},
1529 'required': ['tag'],
1530 'type': 'object'},
1531 'EntityStatusArgs': {'additionalProperties': False,
1532 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1533 'type': 'object'}},
1534 'type': 'object'},
1535 'info': {'type': 'string'},
1536 'status': {'type': 'string'},
1537 'tag': {'type': 'string'}},
1538 'required': ['tag',
1539 'status',
1540 'info',
1541 'data'],
1542 'type': 'object'},
1543 'Error': {'additionalProperties': False,
1544 'properties': {'code': {'type': 'string'},
1545 'info': {'$ref': '#/definitions/ErrorInfo'},
1546 'message': {'type': 'string'}},
1547 'required': ['message', 'code'],
1548 'type': 'object'},
1549 'ErrorInfo': {'additionalProperties': False,
1550 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1551 'macaroon-path': {'type': 'string'}},
1552 'type': 'object'},
1553 'ErrorResult': {'additionalProperties': False,
1554 'properties': {'error': {'$ref': '#/definitions/Error'}},
1555 'type': 'object'},
1556 'ErrorResults': {'additionalProperties': False,
1557 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1558 'type': 'array'}},
1559 'required': ['results'],
1560 'type': 'object'},
1561 'LifeResult': {'additionalProperties': False,
1562 'properties': {'error': {'$ref': '#/definitions/Error'},
1563 'life': {'type': 'string'}},
1564 'required': ['life'],
1565 'type': 'object'},
1566 'LifeResults': {'additionalProperties': False,
1567 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1568 'type': 'array'}},
1569 'required': ['results'],
1570 'type': 'object'},
1571 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1572 'MachineAddresses': {'additionalProperties': False,
1573 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1574 'type': 'array'},
1575 'tag': {'type': 'string'}},
1576 'required': ['tag', 'addresses'],
1577 'type': 'object'},
1578 'MachineAddressesResult': {'additionalProperties': False,
1579 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1580 'type': 'array'},
1581 'error': {'$ref': '#/definitions/Error'}},
1582 'required': ['addresses'],
1583 'type': 'object'},
1584 'MachineAddressesResults': {'additionalProperties': False,
1585 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
1586 'type': 'array'}},
1587 'required': ['results'],
1588 'type': 'object'},
1589 'ModelConfigResult': {'additionalProperties': False,
1590 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1591 'type': 'object'}},
1592 'type': 'object'}},
1593 'required': ['config'],
1594 'type': 'object'},
1595 'NotifyWatchResult': {'additionalProperties': False,
1596 'properties': {'NotifyWatcherId': {'type': 'string'},
1597 'error': {'$ref': '#/definitions/Error'}},
1598 'required': ['NotifyWatcherId'],
1599 'type': 'object'},
1600 'SetMachinesAddresses': {'additionalProperties': False,
1601 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
1602 'type': 'array'}},
1603 'required': ['machine-addresses'],
1604 'type': 'object'},
1605 'SetStatus': {'additionalProperties': False,
1606 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1607 'type': 'array'}},
1608 'required': ['entities'],
1609 'type': 'object'},
1610 'StatusResult': {'additionalProperties': False,
1611 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1612 'type': 'object'}},
1613 'type': 'object'},
1614 'error': {'$ref': '#/definitions/Error'},
1615 'id': {'type': 'string'},
1616 'info': {'type': 'string'},
1617 'life': {'type': 'string'},
1618 'since': {'format': 'date-time',
1619 'type': 'string'},
1620 'status': {'type': 'string'}},
1621 'required': ['id',
1622 'life',
1623 'status',
1624 'info',
1625 'data',
1626 'since'],
1627 'type': 'object'},
1628 'StatusResults': {'additionalProperties': False,
1629 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
1630 'type': 'array'}},
1631 'required': ['results'],
1632 'type': 'object'},
1633 'StringResult': {'additionalProperties': False,
1634 'properties': {'error': {'$ref': '#/definitions/Error'},
1635 'result': {'type': 'string'}},
1636 'required': ['result'],
1637 'type': 'object'},
1638 'StringResults': {'additionalProperties': False,
1639 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
1640 'type': 'array'}},
1641 'required': ['results'],
1642 'type': 'object'},
1643 'StringsWatchResult': {'additionalProperties': False,
1644 'properties': {'changes': {'items': {'type': 'string'},
1645 'type': 'array'},
1646 'error': {'$ref': '#/definitions/Error'},
1647 'watcher-id': {'type': 'string'}},
1648 'required': ['watcher-id'],
1649 'type': 'object'}},
1650 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1651 'Result': {'$ref': '#/definitions/BoolResults'}},
1652 'type': 'object'},
1653 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1654 'Result': {'$ref': '#/definitions/StringResults'}},
1655 'type': 'object'},
1656 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1657 'Result': {'$ref': '#/definitions/StatusResults'}},
1658 'type': 'object'},
1659 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1660 'Result': {'$ref': '#/definitions/LifeResults'}},
1661 'type': 'object'},
1662 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1663 'type': 'object'},
1664 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1665 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
1666 'type': 'object'},
1667 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1668 'Result': {'$ref': '#/definitions/ErrorResults'}},
1669 'type': 'object'},
1670 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
1671 'Result': {'$ref': '#/definitions/ErrorResults'}},
1672 'type': 'object'},
1673 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1674 'Result': {'$ref': '#/definitions/StatusResults'}},
1675 'type': 'object'},
1676 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1677 'type': 'object'},
1678 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1679 'type': 'object'}},
1680 'type': 'object'}
1681
1682
1683 @ReturnMapping(BoolResults)
1684 async def AreManuallyProvisioned(self, entities):
1685 '''
1686 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1687 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
1688 '''
1689 # map input types to rpc msg
1690 _params = dict()
1691 msg = dict(type='InstancePoller', request='AreManuallyProvisioned', version=3, params=_params)
1692 _params['entities'] = entities
1693 reply = await self.rpc(msg)
1694 return reply
1695
1696
1697
1698 @ReturnMapping(StringResults)
1699 async def InstanceId(self, entities):
1700 '''
1701 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1702 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1703 '''
1704 # map input types to rpc msg
1705 _params = dict()
1706 msg = dict(type='InstancePoller', request='InstanceId', version=3, params=_params)
1707 _params['entities'] = entities
1708 reply = await self.rpc(msg)
1709 return reply
1710
1711
1712
1713 @ReturnMapping(StatusResults)
1714 async def InstanceStatus(self, entities):
1715 '''
1716 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1717 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
1718 '''
1719 # map input types to rpc msg
1720 _params = dict()
1721 msg = dict(type='InstancePoller', request='InstanceStatus', version=3, params=_params)
1722 _params['entities'] = entities
1723 reply = await self.rpc(msg)
1724 return reply
1725
1726
1727
1728 @ReturnMapping(LifeResults)
1729 async def Life(self, entities):
1730 '''
1731 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1732 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
1733 '''
1734 # map input types to rpc msg
1735 _params = dict()
1736 msg = dict(type='InstancePoller', request='Life', version=3, params=_params)
1737 _params['entities'] = entities
1738 reply = await self.rpc(msg)
1739 return reply
1740
1741
1742
1743 @ReturnMapping(ModelConfigResult)
1744 async def ModelConfig(self):
1745 '''
1746
1747 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
1748 '''
1749 # map input types to rpc msg
1750 _params = dict()
1751 msg = dict(type='InstancePoller', request='ModelConfig', version=3, params=_params)
1752
1753 reply = await self.rpc(msg)
1754 return reply
1755
1756
1757
1758 @ReturnMapping(MachineAddressesResults)
1759 async def ProviderAddresses(self, entities):
1760 '''
1761 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1762 Returns -> typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
1763 '''
1764 # map input types to rpc msg
1765 _params = dict()
1766 msg = dict(type='InstancePoller', request='ProviderAddresses', version=3, params=_params)
1767 _params['entities'] = entities
1768 reply = await self.rpc(msg)
1769 return reply
1770
1771
1772
1773 @ReturnMapping(ErrorResults)
1774 async def SetInstanceStatus(self, entities):
1775 '''
1776 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
1777 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1778 '''
1779 # map input types to rpc msg
1780 _params = dict()
1781 msg = dict(type='InstancePoller', request='SetInstanceStatus', version=3, params=_params)
1782 _params['entities'] = entities
1783 reply = await self.rpc(msg)
1784 return reply
1785
1786
1787
1788 @ReturnMapping(ErrorResults)
1789 async def SetProviderAddresses(self, machine_addresses):
1790 '''
1791 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
1792 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1793 '''
1794 # map input types to rpc msg
1795 _params = dict()
1796 msg = dict(type='InstancePoller', request='SetProviderAddresses', version=3, params=_params)
1797 _params['machine-addresses'] = machine_addresses
1798 reply = await self.rpc(msg)
1799 return reply
1800
1801
1802
1803 @ReturnMapping(StatusResults)
1804 async def Status(self, entities):
1805 '''
1806 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1807 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
1808 '''
1809 # map input types to rpc msg
1810 _params = dict()
1811 msg = dict(type='InstancePoller', request='Status', version=3, params=_params)
1812 _params['entities'] = entities
1813 reply = await self.rpc(msg)
1814 return reply
1815
1816
1817
1818 @ReturnMapping(NotifyWatchResult)
1819 async def WatchForModelConfigChanges(self):
1820 '''
1821
1822 Returns -> typing.Union[str, _ForwardRef('Error')]
1823 '''
1824 # map input types to rpc msg
1825 _params = dict()
1826 msg = dict(type='InstancePoller', request='WatchForModelConfigChanges', version=3, params=_params)
1827
1828 reply = await self.rpc(msg)
1829 return reply
1830
1831
1832
1833 @ReturnMapping(StringsWatchResult)
1834 async def WatchModelMachines(self):
1835 '''
1836
1837 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
1838 '''
1839 # map input types to rpc msg
1840 _params = dict()
1841 msg = dict(type='InstancePoller', request='WatchModelMachines', version=3, params=_params)
1842
1843 reply = await self.rpc(msg)
1844 return reply
1845
1846
1847
1848 class MachineManagerFacade(Type):
1849 name = 'MachineManager'
1850 version = 3
1851 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
1852 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1853 'type': 'array'},
1854 'constraints': {'$ref': '#/definitions/Value'},
1855 'container-type': {'type': 'string'},
1856 'disks': {'items': {'$ref': '#/definitions/Constraints'},
1857 'type': 'array'},
1858 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
1859 'instance-id': {'type': 'string'},
1860 'jobs': {'items': {'type': 'string'},
1861 'type': 'array'},
1862 'nonce': {'type': 'string'},
1863 'parent-id': {'type': 'string'},
1864 'placement': {'$ref': '#/definitions/Placement'},
1865 'series': {'type': 'string'}},
1866 'required': ['series',
1867 'constraints',
1868 'jobs',
1869 'parent-id',
1870 'container-type',
1871 'instance-id',
1872 'nonce',
1873 'hardware-characteristics',
1874 'addresses'],
1875 'type': 'object'},
1876 'AddMachines': {'additionalProperties': False,
1877 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
1878 'type': 'array'}},
1879 'required': ['params'],
1880 'type': 'object'},
1881 'AddMachinesResult': {'additionalProperties': False,
1882 'properties': {'error': {'$ref': '#/definitions/Error'},
1883 'machine': {'type': 'string'}},
1884 'required': ['machine'],
1885 'type': 'object'},
1886 'AddMachinesResults': {'additionalProperties': False,
1887 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
1888 'type': 'array'}},
1889 'required': ['machines'],
1890 'type': 'object'},
1891 'Address': {'additionalProperties': False,
1892 'properties': {'scope': {'type': 'string'},
1893 'space-name': {'type': 'string'},
1894 'type': {'type': 'string'},
1895 'value': {'type': 'string'}},
1896 'required': ['value', 'type', 'scope'],
1897 'type': 'object'},
1898 'Constraints': {'additionalProperties': False,
1899 'properties': {'Count': {'type': 'integer'},
1900 'Pool': {'type': 'string'},
1901 'Size': {'type': 'integer'}},
1902 'required': ['Pool', 'Size', 'Count'],
1903 'type': 'object'},
1904 'DestroyMachineInfo': {'additionalProperties': False,
1905 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
1906 'type': 'array'},
1907 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
1908 'type': 'array'},
1909 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
1910 'type': 'array'}},
1911 'type': 'object'},
1912 'DestroyMachineResult': {'additionalProperties': False,
1913 'properties': {'error': {'$ref': '#/definitions/Error'},
1914 'info': {'$ref': '#/definitions/DestroyMachineInfo'}},
1915 'type': 'object'},
1916 'DestroyMachineResults': {'additionalProperties': False,
1917 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyMachineResult'},
1918 'type': 'array'}},
1919 'type': 'object'},
1920 'Entities': {'additionalProperties': False,
1921 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1922 'type': 'array'}},
1923 'required': ['entities'],
1924 'type': 'object'},
1925 'Entity': {'additionalProperties': False,
1926 'properties': {'tag': {'type': 'string'}},
1927 'required': ['tag'],
1928 'type': 'object'},
1929 'Error': {'additionalProperties': False,
1930 'properties': {'code': {'type': 'string'},
1931 'info': {'$ref': '#/definitions/ErrorInfo'},
1932 'message': {'type': 'string'}},
1933 'required': ['message', 'code'],
1934 'type': 'object'},
1935 'ErrorInfo': {'additionalProperties': False,
1936 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1937 'macaroon-path': {'type': 'string'}},
1938 'type': 'object'},
1939 'HardwareCharacteristics': {'additionalProperties': False,
1940 'properties': {'arch': {'type': 'string'},
1941 'availability-zone': {'type': 'string'},
1942 'cpu-cores': {'type': 'integer'},
1943 'cpu-power': {'type': 'integer'},
1944 'mem': {'type': 'integer'},
1945 'root-disk': {'type': 'integer'},
1946 'tags': {'items': {'type': 'string'},
1947 'type': 'array'}},
1948 'type': 'object'},
1949 'InstanceType': {'additionalProperties': False,
1950 'properties': {'arches': {'items': {'type': 'string'},
1951 'type': 'array'},
1952 'cost': {'type': 'integer'},
1953 'cpu-cores': {'type': 'integer'},
1954 'deprecated': {'type': 'boolean'},
1955 'memory': {'type': 'integer'},
1956 'name': {'type': 'string'},
1957 'root-disk': {'type': 'integer'},
1958 'virt-type': {'type': 'string'}},
1959 'required': ['arches', 'cpu-cores', 'memory'],
1960 'type': 'object'},
1961 'InstanceTypesResult': {'additionalProperties': False,
1962 'properties': {'cost-currency': {'type': 'string'},
1963 'cost-divisor': {'type': 'integer'},
1964 'cost-unit': {'type': 'string'},
1965 'error': {'$ref': '#/definitions/Error'},
1966 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
1967 'type': 'array'}},
1968 'type': 'object'},
1969 'InstanceTypesResults': {'additionalProperties': False,
1970 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
1971 'type': 'array'}},
1972 'required': ['results'],
1973 'type': 'object'},
1974 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1975 'ModelInstanceTypesConstraint': {'additionalProperties': False,
1976 'properties': {'value': {'$ref': '#/definitions/Value'}},
1977 'type': 'object'},
1978 'ModelInstanceTypesConstraints': {'additionalProperties': False,
1979 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
1980 'type': 'array'}},
1981 'required': ['constraints'],
1982 'type': 'object'},
1983 'Placement': {'additionalProperties': False,
1984 'properties': {'directive': {'type': 'string'},
1985 'scope': {'type': 'string'}},
1986 'required': ['scope', 'directive'],
1987 'type': 'object'},
1988 'Value': {'additionalProperties': False,
1989 'properties': {'arch': {'type': 'string'},
1990 'container': {'type': 'string'},
1991 'cores': {'type': 'integer'},
1992 'cpu-power': {'type': 'integer'},
1993 'instance-type': {'type': 'string'},
1994 'mem': {'type': 'integer'},
1995 'root-disk': {'type': 'integer'},
1996 'spaces': {'items': {'type': 'string'},
1997 'type': 'array'},
1998 'tags': {'items': {'type': 'string'},
1999 'type': 'array'},
2000 'virt-type': {'type': 'string'}},
2001 'type': 'object'}},
2002 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
2003 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
2004 'type': 'object'},
2005 'DestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2006 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2007 'type': 'object'},
2008 'ForceDestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2009 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2010 'type': 'object'},
2011 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
2012 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
2013 'type': 'object'}},
2014 'type': 'object'}
2015
2016
2017 @ReturnMapping(AddMachinesResults)
2018 async def AddMachines(self, params):
2019 '''
2020 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
2021 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
2022 '''
2023 # map input types to rpc msg
2024 _params = dict()
2025 msg = dict(type='MachineManager', request='AddMachines', version=3, params=_params)
2026 _params['params'] = params
2027 reply = await self.rpc(msg)
2028 return reply
2029
2030
2031
2032 @ReturnMapping(DestroyMachineResults)
2033 async def DestroyMachine(self, entities):
2034 '''
2035 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2036 Returns -> typing.Sequence<+T_co>[~DestroyMachineResult]<~DestroyMachineResult>
2037 '''
2038 # map input types to rpc msg
2039 _params = dict()
2040 msg = dict(type='MachineManager', request='DestroyMachine', version=3, params=_params)
2041 _params['entities'] = entities
2042 reply = await self.rpc(msg)
2043 return reply
2044
2045
2046
2047 @ReturnMapping(DestroyMachineResults)
2048 async def ForceDestroyMachine(self, entities):
2049 '''
2050 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2051 Returns -> typing.Sequence<+T_co>[~DestroyMachineResult]<~DestroyMachineResult>
2052 '''
2053 # map input types to rpc msg
2054 _params = dict()
2055 msg = dict(type='MachineManager', request='ForceDestroyMachine', version=3, params=_params)
2056 _params['entities'] = entities
2057 reply = await self.rpc(msg)
2058 return reply
2059
2060
2061
2062 @ReturnMapping(InstanceTypesResults)
2063 async def InstanceTypes(self, constraints):
2064 '''
2065 constraints : typing.Sequence<+T_co>[~ModelInstanceTypesConstraint]<~ModelInstanceTypesConstraint>
2066 Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
2067 '''
2068 # map input types to rpc msg
2069 _params = dict()
2070 msg = dict(type='MachineManager', request='InstanceTypes', version=3, params=_params)
2071 _params['constraints'] = constraints
2072 reply = await self.rpc(msg)
2073 return reply
2074
2075
2076
2077 class ProvisionerFacade(Type):
2078 name = 'Provisioner'
2079 version = 3
2080 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
2081 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
2082 'type': 'array'},
2083 'type': 'array'}},
2084 'required': ['servers'],
2085 'type': 'object'},
2086 'Address': {'additionalProperties': False,
2087 'properties': {'scope': {'type': 'string'},
2088 'space-name': {'type': 'string'},
2089 'type': {'type': 'string'},
2090 'value': {'type': 'string'}},
2091 'required': ['value', 'type', 'scope'],
2092 'type': 'object'},
2093 'Binary': {'additionalProperties': False,
2094 'properties': {'Arch': {'type': 'string'},
2095 'Number': {'$ref': '#/definitions/Number'},
2096 'Series': {'type': 'string'}},
2097 'required': ['Number', 'Series', 'Arch'],
2098 'type': 'object'},
2099 'BytesResult': {'additionalProperties': False,
2100 'properties': {'result': {'items': {'type': 'integer'},
2101 'type': 'array'}},
2102 'required': ['result'],
2103 'type': 'object'},
2104 'CloudImageMetadata': {'additionalProperties': False,
2105 'properties': {'arch': {'type': 'string'},
2106 'image-id': {'type': 'string'},
2107 'priority': {'type': 'integer'},
2108 'region': {'type': 'string'},
2109 'root-storage-size': {'type': 'integer'},
2110 'root-storage-type': {'type': 'string'},
2111 'series': {'type': 'string'},
2112 'source': {'type': 'string'},
2113 'stream': {'type': 'string'},
2114 'version': {'type': 'string'},
2115 'virt-type': {'type': 'string'}},
2116 'required': ['image-id',
2117 'region',
2118 'version',
2119 'series',
2120 'arch',
2121 'source',
2122 'priority'],
2123 'type': 'object'},
2124 'ConstraintsResult': {'additionalProperties': False,
2125 'properties': {'constraints': {'$ref': '#/definitions/Value'},
2126 'error': {'$ref': '#/definitions/Error'}},
2127 'required': ['constraints'],
2128 'type': 'object'},
2129 'ConstraintsResults': {'additionalProperties': False,
2130 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
2131 'type': 'array'}},
2132 'required': ['results'],
2133 'type': 'object'},
2134 'ContainerConfig': {'additionalProperties': False,
2135 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
2136 'apt-mirror': {'type': 'string'},
2137 'apt-proxy': {'$ref': '#/definitions/Settings'},
2138 'authorized-keys': {'type': 'string'},
2139 'provider-type': {'type': 'string'},
2140 'proxy': {'$ref': '#/definitions/Settings'},
2141 'ssl-hostname-verification': {'type': 'boolean'}},
2142 'required': ['provider-type',
2143 'authorized-keys',
2144 'ssl-hostname-verification',
2145 'proxy',
2146 'apt-proxy',
2147 'apt-mirror',
2148 'UpdateBehavior'],
2149 'type': 'object'},
2150 'ContainerManagerConfig': {'additionalProperties': False,
2151 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
2152 'type': 'object'}},
2153 'required': ['config'],
2154 'type': 'object'},
2155 'ContainerManagerConfigParams': {'additionalProperties': False,
2156 'properties': {'type': {'type': 'string'}},
2157 'required': ['type'],
2158 'type': 'object'},
2159 'ControllerConfigResult': {'additionalProperties': False,
2160 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2161 'type': 'object'}},
2162 'type': 'object'}},
2163 'required': ['config'],
2164 'type': 'object'},
2165 'DeviceBridgeInfo': {'additionalProperties': False,
2166 'properties': {'bridge-name': {'type': 'string'},
2167 'host-device-name': {'type': 'string'}},
2168 'required': ['host-device-name',
2169 'bridge-name'],
2170 'type': 'object'},
2171 'DistributionGroupResult': {'additionalProperties': False,
2172 'properties': {'error': {'$ref': '#/definitions/Error'},
2173 'result': {'items': {'type': 'string'},
2174 'type': 'array'}},
2175 'required': ['result'],
2176 'type': 'object'},
2177 'DistributionGroupResults': {'additionalProperties': False,
2178 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
2179 'type': 'array'}},
2180 'required': ['results'],
2181 'type': 'object'},
2182 'Entities': {'additionalProperties': False,
2183 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2184 'type': 'array'}},
2185 'required': ['entities'],
2186 'type': 'object'},
2187 'Entity': {'additionalProperties': False,
2188 'properties': {'tag': {'type': 'string'}},
2189 'required': ['tag'],
2190 'type': 'object'},
2191 'EntityPassword': {'additionalProperties': False,
2192 'properties': {'password': {'type': 'string'},
2193 'tag': {'type': 'string'}},
2194 'required': ['tag', 'password'],
2195 'type': 'object'},
2196 'EntityPasswords': {'additionalProperties': False,
2197 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
2198 'type': 'array'}},
2199 'required': ['changes'],
2200 'type': 'object'},
2201 'EntityStatusArgs': {'additionalProperties': False,
2202 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2203 'type': 'object'}},
2204 'type': 'object'},
2205 'info': {'type': 'string'},
2206 'status': {'type': 'string'},
2207 'tag': {'type': 'string'}},
2208 'required': ['tag',
2209 'status',
2210 'info',
2211 'data'],
2212 'type': 'object'},
2213 'Error': {'additionalProperties': False,
2214 'properties': {'code': {'type': 'string'},
2215 'info': {'$ref': '#/definitions/ErrorInfo'},
2216 'message': {'type': 'string'}},
2217 'required': ['message', 'code'],
2218 'type': 'object'},
2219 'ErrorInfo': {'additionalProperties': False,
2220 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2221 'macaroon-path': {'type': 'string'}},
2222 'type': 'object'},
2223 'ErrorResult': {'additionalProperties': False,
2224 'properties': {'error': {'$ref': '#/definitions/Error'}},
2225 'type': 'object'},
2226 'ErrorResults': {'additionalProperties': False,
2227 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2228 'type': 'array'}},
2229 'required': ['results'],
2230 'type': 'object'},
2231 'FindToolsParams': {'additionalProperties': False,
2232 'properties': {'arch': {'type': 'string'},
2233 'major': {'type': 'integer'},
2234 'minor': {'type': 'integer'},
2235 'number': {'$ref': '#/definitions/Number'},
2236 'series': {'type': 'string'}},
2237 'required': ['number',
2238 'major',
2239 'minor',
2240 'arch',
2241 'series'],
2242 'type': 'object'},
2243 'FindToolsResult': {'additionalProperties': False,
2244 'properties': {'error': {'$ref': '#/definitions/Error'},
2245 'list': {'items': {'$ref': '#/definitions/Tools'},
2246 'type': 'array'}},
2247 'required': ['list'],
2248 'type': 'object'},
2249 'HardwareCharacteristics': {'additionalProperties': False,
2250 'properties': {'arch': {'type': 'string'},
2251 'availability-zone': {'type': 'string'},
2252 'cpu-cores': {'type': 'integer'},
2253 'cpu-power': {'type': 'integer'},
2254 'mem': {'type': 'integer'},
2255 'root-disk': {'type': 'integer'},
2256 'tags': {'items': {'type': 'string'},
2257 'type': 'array'}},
2258 'type': 'object'},
2259 'HostNetworkChange': {'additionalProperties': False,
2260 'properties': {'error': {'$ref': '#/definitions/Error'},
2261 'new-bridges': {'items': {'$ref': '#/definitions/DeviceBridgeInfo'},
2262 'type': 'array'},
2263 'reconfigure-delay': {'type': 'integer'}},
2264 'required': ['new-bridges',
2265 'reconfigure-delay'],
2266 'type': 'object'},
2267 'HostNetworkChangeResults': {'additionalProperties': False,
2268 'properties': {'results': {'items': {'$ref': '#/definitions/HostNetworkChange'},
2269 'type': 'array'}},
2270 'required': ['results'],
2271 'type': 'object'},
2272 'HostPort': {'additionalProperties': False,
2273 'properties': {'Address': {'$ref': '#/definitions/Address'},
2274 'port': {'type': 'integer'}},
2275 'required': ['Address', 'port'],
2276 'type': 'object'},
2277 'InstanceInfo': {'additionalProperties': False,
2278 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
2279 'instance-id': {'type': 'string'},
2280 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
2281 'type': 'array'},
2282 'nonce': {'type': 'string'},
2283 'tag': {'type': 'string'},
2284 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
2285 'type': 'object'},
2286 'volumes': {'items': {'$ref': '#/definitions/Volume'},
2287 'type': 'array'}},
2288 'required': ['tag',
2289 'instance-id',
2290 'nonce',
2291 'characteristics',
2292 'volumes',
2293 'volume-attachments',
2294 'network-config'],
2295 'type': 'object'},
2296 'InstancesInfo': {'additionalProperties': False,
2297 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
2298 'type': 'array'}},
2299 'required': ['machines'],
2300 'type': 'object'},
2301 'LifeResult': {'additionalProperties': False,
2302 'properties': {'error': {'$ref': '#/definitions/Error'},
2303 'life': {'type': 'string'}},
2304 'required': ['life'],
2305 'type': 'object'},
2306 'LifeResults': {'additionalProperties': False,
2307 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
2308 'type': 'array'}},
2309 'required': ['results'],
2310 'type': 'object'},
2311 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2312 'MachineContainers': {'additionalProperties': False,
2313 'properties': {'container-types': {'items': {'type': 'string'},
2314 'type': 'array'},
2315 'machine-tag': {'type': 'string'}},
2316 'required': ['machine-tag',
2317 'container-types'],
2318 'type': 'object'},
2319 'MachineContainersParams': {'additionalProperties': False,
2320 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
2321 'type': 'array'}},
2322 'required': ['params'],
2323 'type': 'object'},
2324 'MachineNetworkConfigResult': {'additionalProperties': False,
2325 'properties': {'error': {'$ref': '#/definitions/Error'},
2326 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
2327 'type': 'array'}},
2328 'required': ['info'],
2329 'type': 'object'},
2330 'MachineNetworkConfigResults': {'additionalProperties': False,
2331 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
2332 'type': 'array'}},
2333 'required': ['results'],
2334 'type': 'object'},
2335 'ModelConfigResult': {'additionalProperties': False,
2336 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
2337 'type': 'object'}},
2338 'type': 'object'}},
2339 'required': ['config'],
2340 'type': 'object'},
2341 'NetworkConfig': {'additionalProperties': False,
2342 'properties': {'address': {'type': 'string'},
2343 'cidr': {'type': 'string'},
2344 'config-type': {'type': 'string'},
2345 'device-index': {'type': 'integer'},
2346 'disabled': {'type': 'boolean'},
2347 'dns-search-domains': {'items': {'type': 'string'},
2348 'type': 'array'},
2349 'dns-servers': {'items': {'type': 'string'},
2350 'type': 'array'},
2351 'gateway-address': {'type': 'string'},
2352 'interface-name': {'type': 'string'},
2353 'interface-type': {'type': 'string'},
2354 'mac-address': {'type': 'string'},
2355 'mtu': {'type': 'integer'},
2356 'no-auto-start': {'type': 'boolean'},
2357 'parent-interface-name': {'type': 'string'},
2358 'provider-address-id': {'type': 'string'},
2359 'provider-id': {'type': 'string'},
2360 'provider-space-id': {'type': 'string'},
2361 'provider-subnet-id': {'type': 'string'},
2362 'provider-vlan-id': {'type': 'string'},
2363 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
2364 'type': 'array'},
2365 'vlan-tag': {'type': 'integer'}},
2366 'required': ['device-index',
2367 'mac-address',
2368 'cidr',
2369 'mtu',
2370 'provider-id',
2371 'provider-subnet-id',
2372 'provider-space-id',
2373 'provider-address-id',
2374 'provider-vlan-id',
2375 'vlan-tag',
2376 'interface-name',
2377 'parent-interface-name',
2378 'interface-type',
2379 'disabled'],
2380 'type': 'object'},
2381 'NetworkRoute': {'additionalProperties': False,
2382 'properties': {'destination-cidr': {'type': 'string'},
2383 'gateway-ip': {'type': 'string'},
2384 'metric': {'type': 'integer'}},
2385 'required': ['destination-cidr',
2386 'gateway-ip',
2387 'metric'],
2388 'type': 'object'},
2389 'NotifyWatchResult': {'additionalProperties': False,
2390 'properties': {'NotifyWatcherId': {'type': 'string'},
2391 'error': {'$ref': '#/definitions/Error'}},
2392 'required': ['NotifyWatcherId'],
2393 'type': 'object'},
2394 'Number': {'additionalProperties': False,
2395 'properties': {'Build': {'type': 'integer'},
2396 'Major': {'type': 'integer'},
2397 'Minor': {'type': 'integer'},
2398 'Patch': {'type': 'integer'},
2399 'Tag': {'type': 'string'}},
2400 'required': ['Major',
2401 'Minor',
2402 'Tag',
2403 'Patch',
2404 'Build'],
2405 'type': 'object'},
2406 'ProvisioningInfo': {'additionalProperties': False,
2407 'properties': {'constraints': {'$ref': '#/definitions/Value'},
2408 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
2409 'type': 'object'}},
2410 'type': 'object'},
2411 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
2412 'type': 'object'},
2413 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
2414 'type': 'array'},
2415 'jobs': {'items': {'type': 'string'},
2416 'type': 'array'},
2417 'placement': {'type': 'string'},
2418 'series': {'type': 'string'},
2419 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
2420 'type': 'array'}},
2421 'type': 'object'},
2422 'tags': {'patternProperties': {'.*': {'type': 'string'}},
2423 'type': 'object'},
2424 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
2425 'type': 'array'}},
2426 'required': ['constraints',
2427 'series',
2428 'placement',
2429 'jobs'],
2430 'type': 'object'},
2431 'ProvisioningInfoResult': {'additionalProperties': False,
2432 'properties': {'error': {'$ref': '#/definitions/Error'},
2433 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
2434 'required': ['result'],
2435 'type': 'object'},
2436 'ProvisioningInfoResults': {'additionalProperties': False,
2437 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
2438 'type': 'array'}},
2439 'required': ['results'],
2440 'type': 'object'},
2441 'SetMachineNetworkConfig': {'additionalProperties': False,
2442 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
2443 'type': 'array'},
2444 'tag': {'type': 'string'}},
2445 'required': ['tag', 'config'],
2446 'type': 'object'},
2447 'SetStatus': {'additionalProperties': False,
2448 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
2449 'type': 'array'}},
2450 'required': ['entities'],
2451 'type': 'object'},
2452 'Settings': {'additionalProperties': False,
2453 'properties': {'Ftp': {'type': 'string'},
2454 'Http': {'type': 'string'},
2455 'Https': {'type': 'string'},
2456 'NoProxy': {'type': 'string'}},
2457 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
2458 'type': 'object'},
2459 'StatusResult': {'additionalProperties': False,
2460 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2461 'type': 'object'}},
2462 'type': 'object'},
2463 'error': {'$ref': '#/definitions/Error'},
2464 'id': {'type': 'string'},
2465 'info': {'type': 'string'},
2466 'life': {'type': 'string'},
2467 'since': {'format': 'date-time',
2468 'type': 'string'},
2469 'status': {'type': 'string'}},
2470 'required': ['id',
2471 'life',
2472 'status',
2473 'info',
2474 'data',
2475 'since'],
2476 'type': 'object'},
2477 'StatusResults': {'additionalProperties': False,
2478 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
2479 'type': 'array'}},
2480 'required': ['results'],
2481 'type': 'object'},
2482 'StringResult': {'additionalProperties': False,
2483 'properties': {'error': {'$ref': '#/definitions/Error'},
2484 'result': {'type': 'string'}},
2485 'required': ['result'],
2486 'type': 'object'},
2487 'StringResults': {'additionalProperties': False,
2488 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2489 'type': 'array'}},
2490 'required': ['results'],
2491 'type': 'object'},
2492 'StringsResult': {'additionalProperties': False,
2493 'properties': {'error': {'$ref': '#/definitions/Error'},
2494 'result': {'items': {'type': 'string'},
2495 'type': 'array'}},
2496 'type': 'object'},
2497 'StringsWatchResult': {'additionalProperties': False,
2498 'properties': {'changes': {'items': {'type': 'string'},
2499 'type': 'array'},
2500 'error': {'$ref': '#/definitions/Error'},
2501 'watcher-id': {'type': 'string'}},
2502 'required': ['watcher-id'],
2503 'type': 'object'},
2504 'StringsWatchResults': {'additionalProperties': False,
2505 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
2506 'type': 'array'}},
2507 'required': ['results'],
2508 'type': 'object'},
2509 'Tools': {'additionalProperties': False,
2510 'properties': {'sha256': {'type': 'string'},
2511 'size': {'type': 'integer'},
2512 'url': {'type': 'string'},
2513 'version': {'$ref': '#/definitions/Binary'}},
2514 'required': ['version', 'url', 'size'],
2515 'type': 'object'},
2516 'ToolsResult': {'additionalProperties': False,
2517 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
2518 'error': {'$ref': '#/definitions/Error'},
2519 'tools': {'items': {'$ref': '#/definitions/Tools'},
2520 'type': 'array'}},
2521 'required': ['tools',
2522 'disable-ssl-hostname-verification'],
2523 'type': 'object'},
2524 'ToolsResults': {'additionalProperties': False,
2525 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
2526 'type': 'array'}},
2527 'required': ['results'],
2528 'type': 'object'},
2529 'UpdateBehavior': {'additionalProperties': False,
2530 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
2531 'enable-os-upgrade': {'type': 'boolean'}},
2532 'required': ['enable-os-refresh-update',
2533 'enable-os-upgrade'],
2534 'type': 'object'},
2535 'Value': {'additionalProperties': False,
2536 'properties': {'arch': {'type': 'string'},
2537 'container': {'type': 'string'},
2538 'cores': {'type': 'integer'},
2539 'cpu-power': {'type': 'integer'},
2540 'instance-type': {'type': 'string'},
2541 'mem': {'type': 'integer'},
2542 'root-disk': {'type': 'integer'},
2543 'spaces': {'items': {'type': 'string'},
2544 'type': 'array'},
2545 'tags': {'items': {'type': 'string'},
2546 'type': 'array'},
2547 'virt-type': {'type': 'string'}},
2548 'type': 'object'},
2549 'Volume': {'additionalProperties': False,
2550 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
2551 'volume-tag': {'type': 'string'}},
2552 'required': ['volume-tag', 'info'],
2553 'type': 'object'},
2554 'VolumeAttachmentInfo': {'additionalProperties': False,
2555 'properties': {'bus-address': {'type': 'string'},
2556 'device-link': {'type': 'string'},
2557 'device-name': {'type': 'string'},
2558 'read-only': {'type': 'boolean'}},
2559 'type': 'object'},
2560 'VolumeAttachmentParams': {'additionalProperties': False,
2561 'properties': {'instance-id': {'type': 'string'},
2562 'machine-tag': {'type': 'string'},
2563 'provider': {'type': 'string'},
2564 'read-only': {'type': 'boolean'},
2565 'volume-id': {'type': 'string'},
2566 'volume-tag': {'type': 'string'}},
2567 'required': ['volume-tag',
2568 'machine-tag',
2569 'provider'],
2570 'type': 'object'},
2571 'VolumeInfo': {'additionalProperties': False,
2572 'properties': {'hardware-id': {'type': 'string'},
2573 'persistent': {'type': 'boolean'},
2574 'pool': {'type': 'string'},
2575 'size': {'type': 'integer'},
2576 'volume-id': {'type': 'string'}},
2577 'required': ['volume-id', 'size', 'persistent'],
2578 'type': 'object'},
2579 'VolumeParams': {'additionalProperties': False,
2580 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
2581 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
2582 'type': 'object'}},
2583 'type': 'object'},
2584 'provider': {'type': 'string'},
2585 'size': {'type': 'integer'},
2586 'tags': {'patternProperties': {'.*': {'type': 'string'}},
2587 'type': 'object'},
2588 'volume-tag': {'type': 'string'}},
2589 'required': ['volume-tag',
2590 'size',
2591 'provider'],
2592 'type': 'object'},
2593 'WatchContainer': {'additionalProperties': False,
2594 'properties': {'container-type': {'type': 'string'},
2595 'machine-tag': {'type': 'string'}},
2596 'required': ['machine-tag',
2597 'container-type'],
2598 'type': 'object'},
2599 'WatchContainers': {'additionalProperties': False,
2600 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
2601 'type': 'array'}},
2602 'required': ['params'],
2603 'type': 'object'}},
2604 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2605 'type': 'object'},
2606 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
2607 'type': 'object'},
2608 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
2609 'type': 'object'},
2610 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2611 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
2612 'type': 'object'},
2613 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
2614 'type': 'object'},
2615 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
2616 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
2617 'type': 'object'},
2618 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
2619 'type': 'object'},
2620 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2621 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
2622 'type': 'object'},
2623 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2624 'Result': {'$ref': '#/definitions/ErrorResults'}},
2625 'type': 'object'},
2626 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
2627 'Result': {'$ref': '#/definitions/FindToolsResult'}},
2628 'type': 'object'},
2629 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2630 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
2631 'type': 'object'},
2632 'HostChangesForContainers': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2633 'Result': {'$ref': '#/definitions/HostNetworkChangeResults'}},
2634 'type': 'object'},
2635 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2636 'Result': {'$ref': '#/definitions/StringResults'}},
2637 'type': 'object'},
2638 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2639 'Result': {'$ref': '#/definitions/StatusResults'}},
2640 'type': 'object'},
2641 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2642 'Result': {'$ref': '#/definitions/LifeResults'}},
2643 'type': 'object'},
2644 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
2645 'type': 'object'},
2646 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2647 'Result': {'$ref': '#/definitions/ErrorResults'}},
2648 'type': 'object'},
2649 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
2650 'type': 'object'},
2651 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
2652 'type': 'object'},
2653 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2654 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
2655 'type': 'object'},
2656 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2657 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
2658 'type': 'object'},
2659 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2660 'Result': {'$ref': '#/definitions/ErrorResults'}},
2661 'type': 'object'},
2662 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2663 'Result': {'$ref': '#/definitions/ErrorResults'}},
2664 'type': 'object'},
2665 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2666 'Result': {'$ref': '#/definitions/StringResults'}},
2667 'type': 'object'},
2668 'SetHostMachineNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
2669 'type': 'object'},
2670 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
2671 'Result': {'$ref': '#/definitions/ErrorResults'}},
2672 'type': 'object'},
2673 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2674 'Result': {'$ref': '#/definitions/ErrorResults'}},
2675 'type': 'object'},
2676 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
2677 'type': 'object'},
2678 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
2679 'Result': {'$ref': '#/definitions/ErrorResults'}},
2680 'type': 'object'},
2681 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2682 'Result': {'$ref': '#/definitions/ErrorResults'}},
2683 'type': 'object'},
2684 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2685 'Result': {'$ref': '#/definitions/ErrorResults'}},
2686 'type': 'object'},
2687 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
2688 'Result': {'$ref': '#/definitions/ErrorResults'}},
2689 'type': 'object'},
2690 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
2691 'type': 'object'},
2692 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2693 'Result': {'$ref': '#/definitions/StatusResults'}},
2694 'type': 'object'},
2695 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2696 'Result': {'$ref': '#/definitions/ToolsResults'}},
2697 'type': 'object'},
2698 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
2699 'Result': {'$ref': '#/definitions/ErrorResults'}},
2700 'type': 'object'},
2701 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2702 'type': 'object'},
2703 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
2704 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2705 'type': 'object'},
2706 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
2707 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
2708 'type': 'object'},
2709 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2710 'type': 'object'},
2711 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
2712 'type': 'object'},
2713 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
2714 'type': 'object'}},
2715 'type': 'object'}
2716
2717
2718 @ReturnMapping(StringsResult)
2719 async def APIAddresses(self):
2720 '''
2721
2722 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
2723 '''
2724 # map input types to rpc msg
2725 _params = dict()
2726 msg = dict(type='Provisioner', request='APIAddresses', version=3, params=_params)
2727
2728 reply = await self.rpc(msg)
2729 return reply
2730
2731
2732
2733 @ReturnMapping(APIHostPortsResult)
2734 async def APIHostPorts(self):
2735 '''
2736
2737 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
2738 '''
2739 # map input types to rpc msg
2740 _params = dict()
2741 msg = dict(type='Provisioner', request='APIHostPorts', version=3, params=_params)
2742
2743 reply = await self.rpc(msg)
2744 return reply
2745
2746
2747
2748 @ReturnMapping(BytesResult)
2749 async def CACert(self):
2750 '''
2751
2752 Returns -> typing.Sequence<+T_co>[int]
2753 '''
2754 # map input types to rpc msg
2755 _params = dict()
2756 msg = dict(type='Provisioner', request='CACert', version=3, params=_params)
2757
2758 reply = await self.rpc(msg)
2759 return reply
2760
2761
2762
2763 @ReturnMapping(ConstraintsResults)
2764 async def Constraints(self, entities):
2765 '''
2766 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2767 Returns -> typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
2768 '''
2769 # map input types to rpc msg
2770 _params = dict()
2771 msg = dict(type='Provisioner', request='Constraints', version=3, params=_params)
2772 _params['entities'] = entities
2773 reply = await self.rpc(msg)
2774 return reply
2775
2776
2777
2778 @ReturnMapping(ContainerConfig)
2779 async def ContainerConfig(self):
2780 '''
2781
2782 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool]
2783 '''
2784 # map input types to rpc msg
2785 _params = dict()
2786 msg = dict(type='Provisioner', request='ContainerConfig', version=3, params=_params)
2787
2788 reply = await self.rpc(msg)
2789 return reply
2790
2791
2792
2793 @ReturnMapping(ContainerManagerConfig)
2794 async def ContainerManagerConfig(self, type_):
2795 '''
2796 type_ : str
2797 Returns -> typing.Mapping<~KT, +VT_co>[str, str]
2798 '''
2799 # map input types to rpc msg
2800 _params = dict()
2801 msg = dict(type='Provisioner', request='ContainerManagerConfig', version=3, params=_params)
2802 _params['type'] = type_
2803 reply = await self.rpc(msg)
2804 return reply
2805
2806
2807
2808 @ReturnMapping(ControllerConfigResult)
2809 async def ControllerConfig(self):
2810 '''
2811
2812 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
2813 '''
2814 # map input types to rpc msg
2815 _params = dict()
2816 msg = dict(type='Provisioner', request='ControllerConfig', version=3, params=_params)
2817
2818 reply = await self.rpc(msg)
2819 return reply
2820
2821
2822
2823 @ReturnMapping(DistributionGroupResults)
2824 async def DistributionGroup(self, entities):
2825 '''
2826 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2827 Returns -> typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
2828 '''
2829 # map input types to rpc msg
2830 _params = dict()
2831 msg = dict(type='Provisioner', request='DistributionGroup', version=3, params=_params)
2832 _params['entities'] = entities
2833 reply = await self.rpc(msg)
2834 return reply
2835
2836
2837
2838 @ReturnMapping(ErrorResults)
2839 async def EnsureDead(self, entities):
2840 '''
2841 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2842 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2843 '''
2844 # map input types to rpc msg
2845 _params = dict()
2846 msg = dict(type='Provisioner', request='EnsureDead', version=3, params=_params)
2847 _params['entities'] = entities
2848 reply = await self.rpc(msg)
2849 return reply
2850
2851
2852
2853 @ReturnMapping(FindToolsResult)
2854 async def FindTools(self, arch, major, minor, number, series):
2855 '''
2856 arch : str
2857 major : int
2858 minor : int
2859 number : Number
2860 series : str
2861 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
2862 '''
2863 # map input types to rpc msg
2864 _params = dict()
2865 msg = dict(type='Provisioner', request='FindTools', version=3, params=_params)
2866 _params['arch'] = arch
2867 _params['major'] = major
2868 _params['minor'] = minor
2869 _params['number'] = number
2870 _params['series'] = series
2871 reply = await self.rpc(msg)
2872 return reply
2873
2874
2875
2876 @ReturnMapping(MachineNetworkConfigResults)
2877 async def GetContainerInterfaceInfo(self, entities):
2878 '''
2879 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2880 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
2881 '''
2882 # map input types to rpc msg
2883 _params = dict()
2884 msg = dict(type='Provisioner', request='GetContainerInterfaceInfo', version=3, params=_params)
2885 _params['entities'] = entities
2886 reply = await self.rpc(msg)
2887 return reply
2888
2889
2890
2891 @ReturnMapping(HostNetworkChangeResults)
2892 async def HostChangesForContainers(self, entities):
2893 '''
2894 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2895 Returns -> typing.Sequence<+T_co>[~HostNetworkChange]<~HostNetworkChange>
2896 '''
2897 # map input types to rpc msg
2898 _params = dict()
2899 msg = dict(type='Provisioner', request='HostChangesForContainers', version=3, params=_params)
2900 _params['entities'] = entities
2901 reply = await self.rpc(msg)
2902 return reply
2903
2904
2905
2906 @ReturnMapping(StringResults)
2907 async def InstanceId(self, entities):
2908 '''
2909 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2910 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
2911 '''
2912 # map input types to rpc msg
2913 _params = dict()
2914 msg = dict(type='Provisioner', request='InstanceId', version=3, params=_params)
2915 _params['entities'] = entities
2916 reply = await self.rpc(msg)
2917 return reply
2918
2919
2920
2921 @ReturnMapping(StatusResults)
2922 async def InstanceStatus(self, entities):
2923 '''
2924 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2925 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
2926 '''
2927 # map input types to rpc msg
2928 _params = dict()
2929 msg = dict(type='Provisioner', request='InstanceStatus', version=3, params=_params)
2930 _params['entities'] = entities
2931 reply = await self.rpc(msg)
2932 return reply
2933
2934
2935
2936 @ReturnMapping(LifeResults)
2937 async def Life(self, entities):
2938 '''
2939 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2940 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2941 '''
2942 # map input types to rpc msg
2943 _params = dict()
2944 msg = dict(type='Provisioner', request='Life', version=3, params=_params)
2945 _params['entities'] = entities
2946 reply = await self.rpc(msg)
2947 return reply
2948
2949
2950
2951 @ReturnMapping(StatusResults)
2952 async def MachinesWithTransientErrors(self):
2953 '''
2954
2955 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
2956 '''
2957 # map input types to rpc msg
2958 _params = dict()
2959 msg = dict(type='Provisioner', request='MachinesWithTransientErrors', version=3, params=_params)
2960
2961 reply = await self.rpc(msg)
2962 return reply
2963
2964
2965
2966 @ReturnMapping(ErrorResults)
2967 async def MarkMachinesForRemoval(self, entities):
2968 '''
2969 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2970 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
2971 '''
2972 # map input types to rpc msg
2973 _params = dict()
2974 msg = dict(type='Provisioner', request='MarkMachinesForRemoval', version=3, params=_params)
2975 _params['entities'] = entities
2976 reply = await self.rpc(msg)
2977 return reply
2978
2979
2980
2981 @ReturnMapping(ModelConfigResult)
2982 async def ModelConfig(self):
2983 '''
2984
2985 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
2986 '''
2987 # map input types to rpc msg
2988 _params = dict()
2989 msg = dict(type='Provisioner', request='ModelConfig', version=3, params=_params)
2990
2991 reply = await self.rpc(msg)
2992 return reply
2993
2994
2995
2996 @ReturnMapping(StringResult)
2997 async def ModelUUID(self):
2998 '''
2999
3000 Returns -> typing.Union[_ForwardRef('Error'), str]
3001 '''
3002 # map input types to rpc msg
3003 _params = dict()
3004 msg = dict(type='Provisioner', request='ModelUUID', version=3, params=_params)
3005
3006 reply = await self.rpc(msg)
3007 return reply
3008
3009
3010
3011 @ReturnMapping(MachineNetworkConfigResults)
3012 async def PrepareContainerInterfaceInfo(self, entities):
3013 '''
3014 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3015 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
3016 '''
3017 # map input types to rpc msg
3018 _params = dict()
3019 msg = dict(type='Provisioner', request='PrepareContainerInterfaceInfo', version=3, params=_params)
3020 _params['entities'] = entities
3021 reply = await self.rpc(msg)
3022 return reply
3023
3024
3025
3026 @ReturnMapping(ProvisioningInfoResults)
3027 async def ProvisioningInfo(self, entities):
3028 '''
3029 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3030 Returns -> typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
3031 '''
3032 # map input types to rpc msg
3033 _params = dict()
3034 msg = dict(type='Provisioner', request='ProvisioningInfo', version=3, params=_params)
3035 _params['entities'] = entities
3036 reply = await self.rpc(msg)
3037 return reply
3038
3039
3040
3041 @ReturnMapping(ErrorResults)
3042 async def ReleaseContainerAddresses(self, entities):
3043 '''
3044 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3045 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3046 '''
3047 # map input types to rpc msg
3048 _params = dict()
3049 msg = dict(type='Provisioner', request='ReleaseContainerAddresses', version=3, params=_params)
3050 _params['entities'] = entities
3051 reply = await self.rpc(msg)
3052 return reply
3053
3054
3055
3056 @ReturnMapping(ErrorResults)
3057 async def Remove(self, entities):
3058 '''
3059 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3060 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3061 '''
3062 # map input types to rpc msg
3063 _params = dict()
3064 msg = dict(type='Provisioner', request='Remove', version=3, params=_params)
3065 _params['entities'] = entities
3066 reply = await self.rpc(msg)
3067 return reply
3068
3069
3070
3071 @ReturnMapping(StringResults)
3072 async def Series(self, entities):
3073 '''
3074 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3075 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
3076 '''
3077 # map input types to rpc msg
3078 _params = dict()
3079 msg = dict(type='Provisioner', request='Series', version=3, params=_params)
3080 _params['entities'] = entities
3081 reply = await self.rpc(msg)
3082 return reply
3083
3084
3085
3086 @ReturnMapping(None)
3087 async def SetHostMachineNetworkConfig(self, config, tag):
3088 '''
3089 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3090 tag : str
3091 Returns -> None
3092 '''
3093 # map input types to rpc msg
3094 _params = dict()
3095 msg = dict(type='Provisioner', request='SetHostMachineNetworkConfig', version=3, params=_params)
3096 _params['config'] = config
3097 _params['tag'] = tag
3098 reply = await self.rpc(msg)
3099 return reply
3100
3101
3102
3103 @ReturnMapping(ErrorResults)
3104 async def SetInstanceInfo(self, machines):
3105 '''
3106 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
3107 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3108 '''
3109 # map input types to rpc msg
3110 _params = dict()
3111 msg = dict(type='Provisioner', request='SetInstanceInfo', version=3, params=_params)
3112 _params['machines'] = machines
3113 reply = await self.rpc(msg)
3114 return reply
3115
3116
3117
3118 @ReturnMapping(ErrorResults)
3119 async def SetInstanceStatus(self, entities):
3120 '''
3121 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3122 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3123 '''
3124 # map input types to rpc msg
3125 _params = dict()
3126 msg = dict(type='Provisioner', request='SetInstanceStatus', version=3, params=_params)
3127 _params['entities'] = entities
3128 reply = await self.rpc(msg)
3129 return reply
3130
3131
3132
3133 @ReturnMapping(None)
3134 async def SetObservedNetworkConfig(self, config, tag):
3135 '''
3136 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3137 tag : str
3138 Returns -> None
3139 '''
3140 # map input types to rpc msg
3141 _params = dict()
3142 msg = dict(type='Provisioner', request='SetObservedNetworkConfig', version=3, params=_params)
3143 _params['config'] = config
3144 _params['tag'] = tag
3145 reply = await self.rpc(msg)
3146 return reply
3147
3148
3149
3150 @ReturnMapping(ErrorResults)
3151 async def SetPasswords(self, changes):
3152 '''
3153 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
3154 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3155 '''
3156 # map input types to rpc msg
3157 _params = dict()
3158 msg = dict(type='Provisioner', request='SetPasswords', version=3, params=_params)
3159 _params['changes'] = changes
3160 reply = await self.rpc(msg)
3161 return reply
3162
3163
3164
3165 @ReturnMapping(ErrorResults)
3166 async def SetProviderNetworkConfig(self, entities):
3167 '''
3168 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3169 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3170 '''
3171 # map input types to rpc msg
3172 _params = dict()
3173 msg = dict(type='Provisioner', request='SetProviderNetworkConfig', version=3, params=_params)
3174 _params['entities'] = entities
3175 reply = await self.rpc(msg)
3176 return reply
3177
3178
3179
3180 @ReturnMapping(ErrorResults)
3181 async def SetStatus(self, entities):
3182 '''
3183 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3184 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3185 '''
3186 # map input types to rpc msg
3187 _params = dict()
3188 msg = dict(type='Provisioner', request='SetStatus', version=3, params=_params)
3189 _params['entities'] = entities
3190 reply = await self.rpc(msg)
3191 return reply
3192
3193
3194
3195 @ReturnMapping(ErrorResults)
3196 async def SetSupportedContainers(self, params):
3197 '''
3198 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
3199 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3200 '''
3201 # map input types to rpc msg
3202 _params = dict()
3203 msg = dict(type='Provisioner', request='SetSupportedContainers', version=3, params=_params)
3204 _params['params'] = params
3205 reply = await self.rpc(msg)
3206 return reply
3207
3208
3209
3210 @ReturnMapping(StringsResult)
3211 async def StateAddresses(self):
3212 '''
3213
3214 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
3215 '''
3216 # map input types to rpc msg
3217 _params = dict()
3218 msg = dict(type='Provisioner', request='StateAddresses', version=3, params=_params)
3219
3220 reply = await self.rpc(msg)
3221 return reply
3222
3223
3224
3225 @ReturnMapping(StatusResults)
3226 async def Status(self, entities):
3227 '''
3228 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3229 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
3230 '''
3231 # map input types to rpc msg
3232 _params = dict()
3233 msg = dict(type='Provisioner', request='Status', version=3, params=_params)
3234 _params['entities'] = entities
3235 reply = await self.rpc(msg)
3236 return reply
3237
3238
3239
3240 @ReturnMapping(ToolsResults)
3241 async def Tools(self, entities):
3242 '''
3243 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3244 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
3245 '''
3246 # map input types to rpc msg
3247 _params = dict()
3248 msg = dict(type='Provisioner', request='Tools', version=3, params=_params)
3249 _params['entities'] = entities
3250 reply = await self.rpc(msg)
3251 return reply
3252
3253
3254
3255 @ReturnMapping(ErrorResults)
3256 async def UpdateStatus(self, entities):
3257 '''
3258 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3259 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3260 '''
3261 # map input types to rpc msg
3262 _params = dict()
3263 msg = dict(type='Provisioner', request='UpdateStatus', version=3, params=_params)
3264 _params['entities'] = entities
3265 reply = await self.rpc(msg)
3266 return reply
3267
3268
3269
3270 @ReturnMapping(NotifyWatchResult)
3271 async def WatchAPIHostPorts(self):
3272 '''
3273
3274 Returns -> typing.Union[str, _ForwardRef('Error')]
3275 '''
3276 # map input types to rpc msg
3277 _params = dict()
3278 msg = dict(type='Provisioner', request='WatchAPIHostPorts', version=3, params=_params)
3279
3280 reply = await self.rpc(msg)
3281 return reply
3282
3283
3284
3285 @ReturnMapping(StringsWatchResults)
3286 async def WatchAllContainers(self, params):
3287 '''
3288 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
3289 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
3290 '''
3291 # map input types to rpc msg
3292 _params = dict()
3293 msg = dict(type='Provisioner', request='WatchAllContainers', version=3, params=_params)
3294 _params['params'] = params
3295 reply = await self.rpc(msg)
3296 return reply
3297
3298
3299
3300 @ReturnMapping(StringsWatchResults)
3301 async def WatchContainers(self, params):
3302 '''
3303 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
3304 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
3305 '''
3306 # map input types to rpc msg
3307 _params = dict()
3308 msg = dict(type='Provisioner', request='WatchContainers', version=3, params=_params)
3309 _params['params'] = params
3310 reply = await self.rpc(msg)
3311 return reply
3312
3313
3314
3315 @ReturnMapping(NotifyWatchResult)
3316 async def WatchForModelConfigChanges(self):
3317 '''
3318
3319 Returns -> typing.Union[str, _ForwardRef('Error')]
3320 '''
3321 # map input types to rpc msg
3322 _params = dict()
3323 msg = dict(type='Provisioner', request='WatchForModelConfigChanges', version=3, params=_params)
3324
3325 reply = await self.rpc(msg)
3326 return reply
3327
3328
3329
3330 @ReturnMapping(NotifyWatchResult)
3331 async def WatchMachineErrorRetry(self):
3332 '''
3333
3334 Returns -> typing.Union[str, _ForwardRef('Error')]
3335 '''
3336 # map input types to rpc msg
3337 _params = dict()
3338 msg = dict(type='Provisioner', request='WatchMachineErrorRetry', version=3, params=_params)
3339
3340 reply = await self.rpc(msg)
3341 return reply
3342
3343
3344
3345 @ReturnMapping(StringsWatchResult)
3346 async def WatchModelMachines(self):
3347 '''
3348
3349 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
3350 '''
3351 # map input types to rpc msg
3352 _params = dict()
3353 msg = dict(type='Provisioner', request='WatchModelMachines', version=3, params=_params)
3354
3355 reply = await self.rpc(msg)
3356 return reply
3357
3358
3359
3360 class StorageFacade(Type):
3361 name = 'Storage'
3362 version = 3
3363 schema = {'definitions': {'Entities': {'additionalProperties': False,
3364 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3365 'type': 'array'}},
3366 'required': ['entities'],
3367 'type': 'object'},
3368 'Entity': {'additionalProperties': False,
3369 'properties': {'tag': {'type': 'string'}},
3370 'required': ['tag'],
3371 'type': 'object'},
3372 'EntityStatus': {'additionalProperties': False,
3373 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3374 'type': 'object'}},
3375 'type': 'object'},
3376 'info': {'type': 'string'},
3377 'since': {'format': 'date-time',
3378 'type': 'string'},
3379 'status': {'type': 'string'}},
3380 'required': ['status', 'info', 'since'],
3381 'type': 'object'},
3382 'Error': {'additionalProperties': False,
3383 'properties': {'code': {'type': 'string'},
3384 'info': {'$ref': '#/definitions/ErrorInfo'},
3385 'message': {'type': 'string'}},
3386 'required': ['message', 'code'],
3387 'type': 'object'},
3388 'ErrorInfo': {'additionalProperties': False,
3389 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3390 'macaroon-path': {'type': 'string'}},
3391 'type': 'object'},
3392 'ErrorResult': {'additionalProperties': False,
3393 'properties': {'error': {'$ref': '#/definitions/Error'}},
3394 'type': 'object'},
3395 'ErrorResults': {'additionalProperties': False,
3396 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3397 'type': 'array'}},
3398 'required': ['results'],
3399 'type': 'object'},
3400 'FilesystemAttachmentDetails': {'additionalProperties': False,
3401 'properties': {'FilesystemAttachmentInfo': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
3402 'life': {'type': 'string'}},
3403 'required': ['FilesystemAttachmentInfo'],
3404 'type': 'object'},
3405 'FilesystemAttachmentInfo': {'additionalProperties': False,
3406 'properties': {'mount-point': {'type': 'string'},
3407 'read-only': {'type': 'boolean'}},
3408 'type': 'object'},
3409 'FilesystemDetails': {'additionalProperties': False,
3410 'properties': {'filesystem-tag': {'type': 'string'},
3411 'info': {'$ref': '#/definitions/FilesystemInfo'},
3412 'life': {'type': 'string'},
3413 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentDetails'}},
3414 'type': 'object'},
3415 'status': {'$ref': '#/definitions/EntityStatus'},
3416 'storage': {'$ref': '#/definitions/StorageDetails'},
3417 'volume-tag': {'type': 'string'}},
3418 'required': ['filesystem-tag',
3419 'info',
3420 'status'],
3421 'type': 'object'},
3422 'FilesystemDetailsListResult': {'additionalProperties': False,
3423 'properties': {'error': {'$ref': '#/definitions/Error'},
3424 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
3425 'type': 'array'}},
3426 'type': 'object'},
3427 'FilesystemDetailsListResults': {'additionalProperties': False,
3428 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
3429 'type': 'array'}},
3430 'type': 'object'},
3431 'FilesystemFilter': {'additionalProperties': False,
3432 'properties': {'machines': {'items': {'type': 'string'},
3433 'type': 'array'}},
3434 'type': 'object'},
3435 'FilesystemFilters': {'additionalProperties': False,
3436 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
3437 'type': 'array'}},
3438 'type': 'object'},
3439 'FilesystemInfo': {'additionalProperties': False,
3440 'properties': {'filesystem-id': {'type': 'string'},
3441 'pool': {'type': 'string'},
3442 'size': {'type': 'integer'}},
3443 'required': ['filesystem-id',
3444 'pool',
3445 'size'],
3446 'type': 'object'},
3447 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3448 'StorageAddParams': {'additionalProperties': False,
3449 'properties': {'name': {'type': 'string'},
3450 'storage': {'$ref': '#/definitions/StorageConstraints'},
3451 'unit': {'type': 'string'}},
3452 'required': ['unit', 'name', 'storage'],
3453 'type': 'object'},
3454 'StorageAttachmentDetails': {'additionalProperties': False,
3455 'properties': {'life': {'type': 'string'},
3456 'location': {'type': 'string'},
3457 'machine-tag': {'type': 'string'},
3458 'storage-tag': {'type': 'string'},
3459 'unit-tag': {'type': 'string'}},
3460 'required': ['storage-tag',
3461 'unit-tag',
3462 'machine-tag'],
3463 'type': 'object'},
3464 'StorageAttachmentId': {'additionalProperties': False,
3465 'properties': {'storage-tag': {'type': 'string'},
3466 'unit-tag': {'type': 'string'}},
3467 'required': ['storage-tag',
3468 'unit-tag'],
3469 'type': 'object'},
3470 'StorageAttachmentIds': {'additionalProperties': False,
3471 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
3472 'type': 'array'}},
3473 'required': ['ids'],
3474 'type': 'object'},
3475 'StorageConstraints': {'additionalProperties': False,
3476 'properties': {'count': {'type': 'integer'},
3477 'pool': {'type': 'string'},
3478 'size': {'type': 'integer'}},
3479 'type': 'object'},
3480 'StorageDetails': {'additionalProperties': False,
3481 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
3482 'type': 'object'},
3483 'kind': {'type': 'integer'},
3484 'life': {'type': 'string'},
3485 'owner-tag': {'type': 'string'},
3486 'persistent': {'type': 'boolean'},
3487 'status': {'$ref': '#/definitions/EntityStatus'},
3488 'storage-tag': {'type': 'string'}},
3489 'required': ['storage-tag',
3490 'owner-tag',
3491 'kind',
3492 'status',
3493 'persistent'],
3494 'type': 'object'},
3495 'StorageDetailsListResult': {'additionalProperties': False,
3496 'properties': {'error': {'$ref': '#/definitions/Error'},
3497 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
3498 'type': 'array'}},
3499 'type': 'object'},
3500 'StorageDetailsListResults': {'additionalProperties': False,
3501 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
3502 'type': 'array'}},
3503 'type': 'object'},
3504 'StorageDetailsResult': {'additionalProperties': False,
3505 'properties': {'error': {'$ref': '#/definitions/Error'},
3506 'result': {'$ref': '#/definitions/StorageDetails'}},
3507 'type': 'object'},
3508 'StorageDetailsResults': {'additionalProperties': False,
3509 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
3510 'type': 'array'}},
3511 'type': 'object'},
3512 'StorageFilter': {'additionalProperties': False,
3513 'type': 'object'},
3514 'StorageFilters': {'additionalProperties': False,
3515 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
3516 'type': 'array'}},
3517 'type': 'object'},
3518 'StoragePool': {'additionalProperties': False,
3519 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
3520 'type': 'object'}},
3521 'type': 'object'},
3522 'name': {'type': 'string'},
3523 'provider': {'type': 'string'}},
3524 'required': ['name', 'provider', 'attrs'],
3525 'type': 'object'},
3526 'StoragePoolFilter': {'additionalProperties': False,
3527 'properties': {'names': {'items': {'type': 'string'},
3528 'type': 'array'},
3529 'providers': {'items': {'type': 'string'},
3530 'type': 'array'}},
3531 'type': 'object'},
3532 'StoragePoolFilters': {'additionalProperties': False,
3533 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
3534 'type': 'array'}},
3535 'type': 'object'},
3536 'StoragePoolsResult': {'additionalProperties': False,
3537 'properties': {'error': {'$ref': '#/definitions/Error'},
3538 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
3539 'type': 'array'}},
3540 'type': 'object'},
3541 'StoragePoolsResults': {'additionalProperties': False,
3542 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
3543 'type': 'array'}},
3544 'type': 'object'},
3545 'StoragesAddParams': {'additionalProperties': False,
3546 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
3547 'type': 'array'}},
3548 'required': ['storages'],
3549 'type': 'object'},
3550 'VolumeAttachmentDetails': {'additionalProperties': False,
3551 'properties': {'VolumeAttachmentInfo': {'$ref': '#/definitions/VolumeAttachmentInfo'},
3552 'life': {'type': 'string'}},
3553 'required': ['VolumeAttachmentInfo'],
3554 'type': 'object'},
3555 'VolumeAttachmentInfo': {'additionalProperties': False,
3556 'properties': {'bus-address': {'type': 'string'},
3557 'device-link': {'type': 'string'},
3558 'device-name': {'type': 'string'},
3559 'read-only': {'type': 'boolean'}},
3560 'type': 'object'},
3561 'VolumeDetails': {'additionalProperties': False,
3562 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
3563 'life': {'type': 'string'},
3564 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentDetails'}},
3565 'type': 'object'},
3566 'status': {'$ref': '#/definitions/EntityStatus'},
3567 'storage': {'$ref': '#/definitions/StorageDetails'},
3568 'volume-tag': {'type': 'string'}},
3569 'required': ['volume-tag', 'info', 'status'],
3570 'type': 'object'},
3571 'VolumeDetailsListResult': {'additionalProperties': False,
3572 'properties': {'error': {'$ref': '#/definitions/Error'},
3573 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
3574 'type': 'array'}},
3575 'type': 'object'},
3576 'VolumeDetailsListResults': {'additionalProperties': False,
3577 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
3578 'type': 'array'}},
3579 'type': 'object'},
3580 'VolumeFilter': {'additionalProperties': False,
3581 'properties': {'machines': {'items': {'type': 'string'},
3582 'type': 'array'}},
3583 'type': 'object'},
3584 'VolumeFilters': {'additionalProperties': False,
3585 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
3586 'type': 'array'}},
3587 'type': 'object'},
3588 'VolumeInfo': {'additionalProperties': False,
3589 'properties': {'hardware-id': {'type': 'string'},
3590 'persistent': {'type': 'boolean'},
3591 'pool': {'type': 'string'},
3592 'size': {'type': 'integer'},
3593 'volume-id': {'type': 'string'}},
3594 'required': ['volume-id', 'size', 'persistent'],
3595 'type': 'object'}},
3596 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
3597 'Result': {'$ref': '#/definitions/ErrorResults'}},
3598 'type': 'object'},
3599 'Attach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3600 'Result': {'$ref': '#/definitions/ErrorResults'}},
3601 'type': 'object'},
3602 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
3603 'type': 'object'},
3604 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3605 'Result': {'$ref': '#/definitions/ErrorResults'}},
3606 'type': 'object'},
3607 'Detach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
3608 'Result': {'$ref': '#/definitions/ErrorResults'}},
3609 'type': 'object'},
3610 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
3611 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
3612 'type': 'object'},
3613 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
3614 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
3615 'type': 'object'},
3616 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
3617 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
3618 'type': 'object'},
3619 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
3620 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
3621 'type': 'object'},
3622 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3623 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
3624 'type': 'object'}},
3625 'type': 'object'}
3626
3627
3628 @ReturnMapping(ErrorResults)
3629 async def AddToUnit(self, storages):
3630 '''
3631 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
3632 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3633 '''
3634 # map input types to rpc msg
3635 _params = dict()
3636 msg = dict(type='Storage', request='AddToUnit', version=3, params=_params)
3637 _params['storages'] = storages
3638 reply = await self.rpc(msg)
3639 return reply
3640
3641
3642
3643 @ReturnMapping(ErrorResults)
3644 async def Attach(self, ids):
3645 '''
3646 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
3647 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3648 '''
3649 # map input types to rpc msg
3650 _params = dict()
3651 msg = dict(type='Storage', request='Attach', version=3, params=_params)
3652 _params['ids'] = ids
3653 reply = await self.rpc(msg)
3654 return reply
3655
3656
3657
3658 @ReturnMapping(None)
3659 async def CreatePool(self, attrs, name, provider):
3660 '''
3661 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3662 name : str
3663 provider : str
3664 Returns -> None
3665 '''
3666 # map input types to rpc msg
3667 _params = dict()
3668 msg = dict(type='Storage', request='CreatePool', version=3, params=_params)
3669 _params['attrs'] = attrs
3670 _params['name'] = name
3671 _params['provider'] = provider
3672 reply = await self.rpc(msg)
3673 return reply
3674
3675
3676
3677 @ReturnMapping(ErrorResults)
3678 async def Destroy(self, entities):
3679 '''
3680 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3681 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3682 '''
3683 # map input types to rpc msg
3684 _params = dict()
3685 msg = dict(type='Storage', request='Destroy', version=3, params=_params)
3686 _params['entities'] = entities
3687 reply = await self.rpc(msg)
3688 return reply
3689
3690
3691
3692 @ReturnMapping(ErrorResults)
3693 async def Detach(self, ids):
3694 '''
3695 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
3696 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3697 '''
3698 # map input types to rpc msg
3699 _params = dict()
3700 msg = dict(type='Storage', request='Detach', version=3, params=_params)
3701 _params['ids'] = ids
3702 reply = await self.rpc(msg)
3703 return reply
3704
3705
3706
3707 @ReturnMapping(FilesystemDetailsListResults)
3708 async def ListFilesystems(self, filters):
3709 '''
3710 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
3711 Returns -> typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
3712 '''
3713 # map input types to rpc msg
3714 _params = dict()
3715 msg = dict(type='Storage', request='ListFilesystems', version=3, params=_params)
3716 _params['filters'] = filters
3717 reply = await self.rpc(msg)
3718 return reply
3719
3720
3721
3722 @ReturnMapping(StoragePoolsResults)
3723 async def ListPools(self, filters):
3724 '''
3725 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
3726 Returns -> typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
3727 '''
3728 # map input types to rpc msg
3729 _params = dict()
3730 msg = dict(type='Storage', request='ListPools', version=3, params=_params)
3731 _params['filters'] = filters
3732 reply = await self.rpc(msg)
3733 return reply
3734
3735
3736
3737 @ReturnMapping(StorageDetailsListResults)
3738 async def ListStorageDetails(self, filters):
3739 '''
3740 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
3741 Returns -> typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
3742 '''
3743 # map input types to rpc msg
3744 _params = dict()
3745 msg = dict(type='Storage', request='ListStorageDetails', version=3, params=_params)
3746 _params['filters'] = filters
3747 reply = await self.rpc(msg)
3748 return reply
3749
3750
3751
3752 @ReturnMapping(VolumeDetailsListResults)
3753 async def ListVolumes(self, filters):
3754 '''
3755 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
3756 Returns -> typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
3757 '''
3758 # map input types to rpc msg
3759 _params = dict()
3760 msg = dict(type='Storage', request='ListVolumes', version=3, params=_params)
3761 _params['filters'] = filters
3762 reply = await self.rpc(msg)
3763 return reply
3764
3765
3766
3767 @ReturnMapping(StorageDetailsResults)
3768 async def StorageDetails(self, entities):
3769 '''
3770 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3771 Returns -> typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
3772 '''
3773 # map input types to rpc msg
3774 _params = dict()
3775 msg = dict(type='Storage', request='StorageDetails', version=3, params=_params)
3776 _params['entities'] = entities
3777 reply = await self.rpc(msg)
3778 return reply
3779
3780
3781
3782 class StorageProvisionerFacade(Type):
3783 name = 'StorageProvisioner'
3784 version = 3
3785 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
3786 'properties': {'BusAddress': {'type': 'string'},
3787 'DeviceLinks': {'items': {'type': 'string'},
3788 'type': 'array'},
3789 'DeviceName': {'type': 'string'},
3790 'FilesystemType': {'type': 'string'},
3791 'HardwareId': {'type': 'string'},
3792 'InUse': {'type': 'boolean'},
3793 'Label': {'type': 'string'},
3794 'MountPoint': {'type': 'string'},
3795 'Size': {'type': 'integer'},
3796 'UUID': {'type': 'string'}},
3797 'required': ['DeviceName',
3798 'DeviceLinks',
3799 'Label',
3800 'UUID',
3801 'HardwareId',
3802 'BusAddress',
3803 'Size',
3804 'FilesystemType',
3805 'InUse',
3806 'MountPoint'],
3807 'type': 'object'},
3808 'BlockDeviceResult': {'additionalProperties': False,
3809 'properties': {'error': {'$ref': '#/definitions/Error'},
3810 'result': {'$ref': '#/definitions/BlockDevice'}},
3811 'required': ['result'],
3812 'type': 'object'},
3813 'BlockDeviceResults': {'additionalProperties': False,
3814 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
3815 'type': 'array'}},
3816 'type': 'object'},
3817 'Entities': {'additionalProperties': False,
3818 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
3819 'type': 'array'}},
3820 'required': ['entities'],
3821 'type': 'object'},
3822 'Entity': {'additionalProperties': False,
3823 'properties': {'tag': {'type': 'string'}},
3824 'required': ['tag'],
3825 'type': 'object'},
3826 'EntityStatusArgs': {'additionalProperties': False,
3827 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
3828 'type': 'object'}},
3829 'type': 'object'},
3830 'info': {'type': 'string'},
3831 'status': {'type': 'string'},
3832 'tag': {'type': 'string'}},
3833 'required': ['tag',
3834 'status',
3835 'info',
3836 'data'],
3837 'type': 'object'},
3838 'Error': {'additionalProperties': False,
3839 'properties': {'code': {'type': 'string'},
3840 'info': {'$ref': '#/definitions/ErrorInfo'},
3841 'message': {'type': 'string'}},
3842 'required': ['message', 'code'],
3843 'type': 'object'},
3844 'ErrorInfo': {'additionalProperties': False,
3845 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
3846 'macaroon-path': {'type': 'string'}},
3847 'type': 'object'},
3848 'ErrorResult': {'additionalProperties': False,
3849 'properties': {'error': {'$ref': '#/definitions/Error'}},
3850 'type': 'object'},
3851 'ErrorResults': {'additionalProperties': False,
3852 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
3853 'type': 'array'}},
3854 'required': ['results'],
3855 'type': 'object'},
3856 'Filesystem': {'additionalProperties': False,
3857 'properties': {'filesystem-tag': {'type': 'string'},
3858 'info': {'$ref': '#/definitions/FilesystemInfo'},
3859 'volume-tag': {'type': 'string'}},
3860 'required': ['filesystem-tag', 'info'],
3861 'type': 'object'},
3862 'FilesystemAttachment': {'additionalProperties': False,
3863 'properties': {'filesystem-tag': {'type': 'string'},
3864 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
3865 'machine-tag': {'type': 'string'}},
3866 'required': ['filesystem-tag',
3867 'machine-tag',
3868 'info'],
3869 'type': 'object'},
3870 'FilesystemAttachmentInfo': {'additionalProperties': False,
3871 'properties': {'mount-point': {'type': 'string'},
3872 'read-only': {'type': 'boolean'}},
3873 'type': 'object'},
3874 'FilesystemAttachmentParams': {'additionalProperties': False,
3875 'properties': {'filesystem-id': {'type': 'string'},
3876 'filesystem-tag': {'type': 'string'},
3877 'instance-id': {'type': 'string'},
3878 'machine-tag': {'type': 'string'},
3879 'mount-point': {'type': 'string'},
3880 'provider': {'type': 'string'},
3881 'read-only': {'type': 'boolean'}},
3882 'required': ['filesystem-tag',
3883 'machine-tag',
3884 'provider'],
3885 'type': 'object'},
3886 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
3887 'properties': {'error': {'$ref': '#/definitions/Error'},
3888 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
3889 'required': ['result'],
3890 'type': 'object'},
3891 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
3892 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
3893 'type': 'array'}},
3894 'type': 'object'},
3895 'FilesystemAttachmentResult': {'additionalProperties': False,
3896 'properties': {'error': {'$ref': '#/definitions/Error'},
3897 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
3898 'required': ['result'],
3899 'type': 'object'},
3900 'FilesystemAttachmentResults': {'additionalProperties': False,
3901 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
3902 'type': 'array'}},
3903 'type': 'object'},
3904 'FilesystemAttachments': {'additionalProperties': False,
3905 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
3906 'type': 'array'}},
3907 'required': ['filesystem-attachments'],
3908 'type': 'object'},
3909 'FilesystemInfo': {'additionalProperties': False,
3910 'properties': {'filesystem-id': {'type': 'string'},
3911 'pool': {'type': 'string'},
3912 'size': {'type': 'integer'}},
3913 'required': ['filesystem-id',
3914 'pool',
3915 'size'],
3916 'type': 'object'},
3917 'FilesystemParams': {'additionalProperties': False,
3918 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
3919 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
3920 'type': 'object'}},
3921 'type': 'object'},
3922 'filesystem-tag': {'type': 'string'},
3923 'provider': {'type': 'string'},
3924 'size': {'type': 'integer'},
3925 'tags': {'patternProperties': {'.*': {'type': 'string'}},
3926 'type': 'object'},
3927 'volume-tag': {'type': 'string'}},
3928 'required': ['filesystem-tag',
3929 'size',
3930 'provider'],
3931 'type': 'object'},
3932 'FilesystemParamsResult': {'additionalProperties': False,
3933 'properties': {'error': {'$ref': '#/definitions/Error'},
3934 'result': {'$ref': '#/definitions/FilesystemParams'}},
3935 'required': ['result'],
3936 'type': 'object'},
3937 'FilesystemParamsResults': {'additionalProperties': False,
3938 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
3939 'type': 'array'}},
3940 'type': 'object'},
3941 'FilesystemResult': {'additionalProperties': False,
3942 'properties': {'error': {'$ref': '#/definitions/Error'},
3943 'result': {'$ref': '#/definitions/Filesystem'}},
3944 'required': ['result'],
3945 'type': 'object'},
3946 'FilesystemResults': {'additionalProperties': False,
3947 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
3948 'type': 'array'}},
3949 'type': 'object'},
3950 'Filesystems': {'additionalProperties': False,
3951 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
3952 'type': 'array'}},
3953 'required': ['filesystems'],
3954 'type': 'object'},
3955 'LifeResult': {'additionalProperties': False,
3956 'properties': {'error': {'$ref': '#/definitions/Error'},
3957 'life': {'type': 'string'}},
3958 'required': ['life'],
3959 'type': 'object'},
3960 'LifeResults': {'additionalProperties': False,
3961 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
3962 'type': 'array'}},
3963 'required': ['results'],
3964 'type': 'object'},
3965 'Macaroon': {'additionalProperties': False, 'type': 'object'},
3966 'MachineStorageId': {'additionalProperties': False,
3967 'properties': {'attachment-tag': {'type': 'string'},
3968 'machine-tag': {'type': 'string'}},
3969 'required': ['machine-tag',
3970 'attachment-tag'],
3971 'type': 'object'},
3972 'MachineStorageIds': {'additionalProperties': False,
3973 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
3974 'type': 'array'}},
3975 'required': ['ids'],
3976 'type': 'object'},
3977 'MachineStorageIdsWatchResult': {'additionalProperties': False,
3978 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
3979 'type': 'array'},
3980 'error': {'$ref': '#/definitions/Error'},
3981 'watcher-id': {'type': 'string'}},
3982 'required': ['watcher-id',
3983 'changes'],
3984 'type': 'object'},
3985 'MachineStorageIdsWatchResults': {'additionalProperties': False,
3986 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
3987 'type': 'array'}},
3988 'required': ['results'],
3989 'type': 'object'},
3990 'NotifyWatchResult': {'additionalProperties': False,
3991 'properties': {'NotifyWatcherId': {'type': 'string'},
3992 'error': {'$ref': '#/definitions/Error'}},
3993 'required': ['NotifyWatcherId'],
3994 'type': 'object'},
3995 'NotifyWatchResults': {'additionalProperties': False,
3996 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
3997 'type': 'array'}},
3998 'required': ['results'],
3999 'type': 'object'},
4000 'SetStatus': {'additionalProperties': False,
4001 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
4002 'type': 'array'}},
4003 'required': ['entities'],
4004 'type': 'object'},
4005 'StringResult': {'additionalProperties': False,
4006 'properties': {'error': {'$ref': '#/definitions/Error'},
4007 'result': {'type': 'string'}},
4008 'required': ['result'],
4009 'type': 'object'},
4010 'StringResults': {'additionalProperties': False,
4011 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
4012 'type': 'array'}},
4013 'required': ['results'],
4014 'type': 'object'},
4015 'StringsWatchResult': {'additionalProperties': False,
4016 'properties': {'changes': {'items': {'type': 'string'},
4017 'type': 'array'},
4018 'error': {'$ref': '#/definitions/Error'},
4019 'watcher-id': {'type': 'string'}},
4020 'required': ['watcher-id'],
4021 'type': 'object'},
4022 'StringsWatchResults': {'additionalProperties': False,
4023 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
4024 'type': 'array'}},
4025 'required': ['results'],
4026 'type': 'object'},
4027 'Volume': {'additionalProperties': False,
4028 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
4029 'volume-tag': {'type': 'string'}},
4030 'required': ['volume-tag', 'info'],
4031 'type': 'object'},
4032 'VolumeAttachment': {'additionalProperties': False,
4033 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
4034 'machine-tag': {'type': 'string'},
4035 'volume-tag': {'type': 'string'}},
4036 'required': ['volume-tag',
4037 'machine-tag',
4038 'info'],
4039 'type': 'object'},
4040 'VolumeAttachmentInfo': {'additionalProperties': False,
4041 'properties': {'bus-address': {'type': 'string'},
4042 'device-link': {'type': 'string'},
4043 'device-name': {'type': 'string'},
4044 'read-only': {'type': 'boolean'}},
4045 'type': 'object'},
4046 'VolumeAttachmentParams': {'additionalProperties': False,
4047 'properties': {'instance-id': {'type': 'string'},
4048 'machine-tag': {'type': 'string'},
4049 'provider': {'type': 'string'},
4050 'read-only': {'type': 'boolean'},
4051 'volume-id': {'type': 'string'},
4052 'volume-tag': {'type': 'string'}},
4053 'required': ['volume-tag',
4054 'machine-tag',
4055 'provider'],
4056 'type': 'object'},
4057 'VolumeAttachmentParamsResult': {'additionalProperties': False,
4058 'properties': {'error': {'$ref': '#/definitions/Error'},
4059 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
4060 'required': ['result'],
4061 'type': 'object'},
4062 'VolumeAttachmentParamsResults': {'additionalProperties': False,
4063 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
4064 'type': 'array'}},
4065 'type': 'object'},
4066 'VolumeAttachmentResult': {'additionalProperties': False,
4067 'properties': {'error': {'$ref': '#/definitions/Error'},
4068 'result': {'$ref': '#/definitions/VolumeAttachment'}},
4069 'required': ['result'],
4070 'type': 'object'},
4071 'VolumeAttachmentResults': {'additionalProperties': False,
4072 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
4073 'type': 'array'}},
4074 'type': 'object'},
4075 'VolumeAttachments': {'additionalProperties': False,
4076 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
4077 'type': 'array'}},
4078 'required': ['volume-attachments'],
4079 'type': 'object'},
4080 'VolumeInfo': {'additionalProperties': False,
4081 'properties': {'hardware-id': {'type': 'string'},
4082 'persistent': {'type': 'boolean'},
4083 'pool': {'type': 'string'},
4084 'size': {'type': 'integer'},
4085 'volume-id': {'type': 'string'}},
4086 'required': ['volume-id', 'size', 'persistent'],
4087 'type': 'object'},
4088 'VolumeParams': {'additionalProperties': False,
4089 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
4090 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
4091 'type': 'object'}},
4092 'type': 'object'},
4093 'provider': {'type': 'string'},
4094 'size': {'type': 'integer'},
4095 'tags': {'patternProperties': {'.*': {'type': 'string'}},
4096 'type': 'object'},
4097 'volume-tag': {'type': 'string'}},
4098 'required': ['volume-tag',
4099 'size',
4100 'provider'],
4101 'type': 'object'},
4102 'VolumeParamsResult': {'additionalProperties': False,
4103 'properties': {'error': {'$ref': '#/definitions/Error'},
4104 'result': {'$ref': '#/definitions/VolumeParams'}},
4105 'required': ['result'],
4106 'type': 'object'},
4107 'VolumeParamsResults': {'additionalProperties': False,
4108 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
4109 'type': 'array'}},
4110 'type': 'object'},
4111 'VolumeResult': {'additionalProperties': False,
4112 'properties': {'error': {'$ref': '#/definitions/Error'},
4113 'result': {'$ref': '#/definitions/Volume'}},
4114 'required': ['result'],
4115 'type': 'object'},
4116 'VolumeResults': {'additionalProperties': False,
4117 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
4118 'type': 'array'}},
4119 'type': 'object'},
4120 'Volumes': {'additionalProperties': False,
4121 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
4122 'type': 'array'}},
4123 'required': ['volumes'],
4124 'type': 'object'}},
4125 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4126 'Result': {'$ref': '#/definitions/LifeResults'}},
4127 'type': 'object'},
4128 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4129 'Result': {'$ref': '#/definitions/ErrorResults'}},
4130 'type': 'object'},
4131 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4132 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
4133 'type': 'object'},
4134 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4135 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
4136 'type': 'object'},
4137 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4138 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
4139 'type': 'object'},
4140 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4141 'Result': {'$ref': '#/definitions/FilesystemResults'}},
4142 'type': 'object'},
4143 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4144 'Result': {'$ref': '#/definitions/StringResults'}},
4145 'type': 'object'},
4146 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4147 'Result': {'$ref': '#/definitions/LifeResults'}},
4148 'type': 'object'},
4149 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4150 'Result': {'$ref': '#/definitions/ErrorResults'}},
4151 'type': 'object'},
4152 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4153 'Result': {'$ref': '#/definitions/ErrorResults'}},
4154 'type': 'object'},
4155 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
4156 'Result': {'$ref': '#/definitions/ErrorResults'}},
4157 'type': 'object'},
4158 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
4159 'Result': {'$ref': '#/definitions/ErrorResults'}},
4160 'type': 'object'},
4161 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4162 'Result': {'$ref': '#/definitions/ErrorResults'}},
4163 'type': 'object'},
4164 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
4165 'Result': {'$ref': '#/definitions/ErrorResults'}},
4166 'type': 'object'},
4167 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
4168 'Result': {'$ref': '#/definitions/ErrorResults'}},
4169 'type': 'object'},
4170 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
4171 'Result': {'$ref': '#/definitions/ErrorResults'}},
4172 'type': 'object'},
4173 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4174 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
4175 'type': 'object'},
4176 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4177 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
4178 'type': 'object'},
4179 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
4180 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
4181 'type': 'object'},
4182 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4183 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
4184 'type': 'object'},
4185 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4186 'Result': {'$ref': '#/definitions/VolumeResults'}},
4187 'type': 'object'},
4188 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4189 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4190 'type': 'object'},
4191 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4192 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
4193 'type': 'object'},
4194 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4195 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4196 'type': 'object'},
4197 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4198 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
4199 'type': 'object'},
4200 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4201 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
4202 'type': 'object'},
4203 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
4204 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
4205 'type': 'object'}},
4206 'type': 'object'}
4207
4208
4209 @ReturnMapping(LifeResults)
4210 async def AttachmentLife(self, ids):
4211 '''
4212 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4213 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
4214 '''
4215 # map input types to rpc msg
4216 _params = dict()
4217 msg = dict(type='StorageProvisioner', request='AttachmentLife', version=3, params=_params)
4218 _params['ids'] = ids
4219 reply = await self.rpc(msg)
4220 return reply
4221
4222
4223
4224 @ReturnMapping(ErrorResults)
4225 async def EnsureDead(self, entities):
4226 '''
4227 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4228 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4229 '''
4230 # map input types to rpc msg
4231 _params = dict()
4232 msg = dict(type='StorageProvisioner', request='EnsureDead', version=3, params=_params)
4233 _params['entities'] = entities
4234 reply = await self.rpc(msg)
4235 return reply
4236
4237
4238
4239 @ReturnMapping(FilesystemAttachmentParamsResults)
4240 async def FilesystemAttachmentParams(self, ids):
4241 '''
4242 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4243 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
4244 '''
4245 # map input types to rpc msg
4246 _params = dict()
4247 msg = dict(type='StorageProvisioner', request='FilesystemAttachmentParams', version=3, params=_params)
4248 _params['ids'] = ids
4249 reply = await self.rpc(msg)
4250 return reply
4251
4252
4253
4254 @ReturnMapping(FilesystemAttachmentResults)
4255 async def FilesystemAttachments(self, ids):
4256 '''
4257 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4258 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
4259 '''
4260 # map input types to rpc msg
4261 _params = dict()
4262 msg = dict(type='StorageProvisioner', request='FilesystemAttachments', version=3, params=_params)
4263 _params['ids'] = ids
4264 reply = await self.rpc(msg)
4265 return reply
4266
4267
4268
4269 @ReturnMapping(FilesystemParamsResults)
4270 async def FilesystemParams(self, entities):
4271 '''
4272 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4273 Returns -> typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
4274 '''
4275 # map input types to rpc msg
4276 _params = dict()
4277 msg = dict(type='StorageProvisioner', request='FilesystemParams', version=3, params=_params)
4278 _params['entities'] = entities
4279 reply = await self.rpc(msg)
4280 return reply
4281
4282
4283
4284 @ReturnMapping(FilesystemResults)
4285 async def Filesystems(self, entities):
4286 '''
4287 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4288 Returns -> typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
4289 '''
4290 # map input types to rpc msg
4291 _params = dict()
4292 msg = dict(type='StorageProvisioner', request='Filesystems', version=3, params=_params)
4293 _params['entities'] = entities
4294 reply = await self.rpc(msg)
4295 return reply
4296
4297
4298
4299 @ReturnMapping(StringResults)
4300 async def InstanceId(self, entities):
4301 '''
4302 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4303 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
4304 '''
4305 # map input types to rpc msg
4306 _params = dict()
4307 msg = dict(type='StorageProvisioner', request='InstanceId', version=3, params=_params)
4308 _params['entities'] = entities
4309 reply = await self.rpc(msg)
4310 return reply
4311
4312
4313
4314 @ReturnMapping(LifeResults)
4315 async def Life(self, entities):
4316 '''
4317 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4318 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
4319 '''
4320 # map input types to rpc msg
4321 _params = dict()
4322 msg = dict(type='StorageProvisioner', request='Life', version=3, params=_params)
4323 _params['entities'] = entities
4324 reply = await self.rpc(msg)
4325 return reply
4326
4327
4328
4329 @ReturnMapping(ErrorResults)
4330 async def Remove(self, entities):
4331 '''
4332 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4333 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4334 '''
4335 # map input types to rpc msg
4336 _params = dict()
4337 msg = dict(type='StorageProvisioner', request='Remove', version=3, params=_params)
4338 _params['entities'] = entities
4339 reply = await self.rpc(msg)
4340 return reply
4341
4342
4343
4344 @ReturnMapping(ErrorResults)
4345 async def RemoveAttachment(self, ids):
4346 '''
4347 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4348 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4349 '''
4350 # map input types to rpc msg
4351 _params = dict()
4352 msg = dict(type='StorageProvisioner', request='RemoveAttachment', version=3, params=_params)
4353 _params['ids'] = ids
4354 reply = await self.rpc(msg)
4355 return reply
4356
4357
4358
4359 @ReturnMapping(ErrorResults)
4360 async def SetFilesystemAttachmentInfo(self, filesystem_attachments):
4361 '''
4362 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
4363 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4364 '''
4365 # map input types to rpc msg
4366 _params = dict()
4367 msg = dict(type='StorageProvisioner', request='SetFilesystemAttachmentInfo', version=3, params=_params)
4368 _params['filesystem-attachments'] = filesystem_attachments
4369 reply = await self.rpc(msg)
4370 return reply
4371
4372
4373
4374 @ReturnMapping(ErrorResults)
4375 async def SetFilesystemInfo(self, filesystems):
4376 '''
4377 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
4378 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4379 '''
4380 # map input types to rpc msg
4381 _params = dict()
4382 msg = dict(type='StorageProvisioner', request='SetFilesystemInfo', version=3, params=_params)
4383 _params['filesystems'] = filesystems
4384 reply = await self.rpc(msg)
4385 return reply
4386
4387
4388
4389 @ReturnMapping(ErrorResults)
4390 async def SetStatus(self, entities):
4391 '''
4392 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
4393 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4394 '''
4395 # map input types to rpc msg
4396 _params = dict()
4397 msg = dict(type='StorageProvisioner', request='SetStatus', version=3, params=_params)
4398 _params['entities'] = entities
4399 reply = await self.rpc(msg)
4400 return reply
4401
4402
4403
4404 @ReturnMapping(ErrorResults)
4405 async def SetVolumeAttachmentInfo(self, volume_attachments):
4406 '''
4407 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
4408 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4409 '''
4410 # map input types to rpc msg
4411 _params = dict()
4412 msg = dict(type='StorageProvisioner', request='SetVolumeAttachmentInfo', version=3, params=_params)
4413 _params['volume-attachments'] = volume_attachments
4414 reply = await self.rpc(msg)
4415 return reply
4416
4417
4418
4419 @ReturnMapping(ErrorResults)
4420 async def SetVolumeInfo(self, volumes):
4421 '''
4422 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
4423 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4424 '''
4425 # map input types to rpc msg
4426 _params = dict()
4427 msg = dict(type='StorageProvisioner', request='SetVolumeInfo', version=3, params=_params)
4428 _params['volumes'] = volumes
4429 reply = await self.rpc(msg)
4430 return reply
4431
4432
4433
4434 @ReturnMapping(ErrorResults)
4435 async def UpdateStatus(self, entities):
4436 '''
4437 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
4438 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
4439 '''
4440 # map input types to rpc msg
4441 _params = dict()
4442 msg = dict(type='StorageProvisioner', request='UpdateStatus', version=3, params=_params)
4443 _params['entities'] = entities
4444 reply = await self.rpc(msg)
4445 return reply
4446
4447
4448
4449 @ReturnMapping(VolumeAttachmentParamsResults)
4450 async def VolumeAttachmentParams(self, ids):
4451 '''
4452 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4453 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
4454 '''
4455 # map input types to rpc msg
4456 _params = dict()
4457 msg = dict(type='StorageProvisioner', request='VolumeAttachmentParams', version=3, params=_params)
4458 _params['ids'] = ids
4459 reply = await self.rpc(msg)
4460 return reply
4461
4462
4463
4464 @ReturnMapping(VolumeAttachmentResults)
4465 async def VolumeAttachments(self, ids):
4466 '''
4467 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4468 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
4469 '''
4470 # map input types to rpc msg
4471 _params = dict()
4472 msg = dict(type='StorageProvisioner', request='VolumeAttachments', version=3, params=_params)
4473 _params['ids'] = ids
4474 reply = await self.rpc(msg)
4475 return reply
4476
4477
4478
4479 @ReturnMapping(BlockDeviceResults)
4480 async def VolumeBlockDevices(self, ids):
4481 '''
4482 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
4483 Returns -> typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
4484 '''
4485 # map input types to rpc msg
4486 _params = dict()
4487 msg = dict(type='StorageProvisioner', request='VolumeBlockDevices', version=3, params=_params)
4488 _params['ids'] = ids
4489 reply = await self.rpc(msg)
4490 return reply
4491
4492
4493
4494 @ReturnMapping(VolumeParamsResults)
4495 async def VolumeParams(self, entities):
4496 '''
4497 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4498 Returns -> typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
4499 '''
4500 # map input types to rpc msg
4501 _params = dict()
4502 msg = dict(type='StorageProvisioner', request='VolumeParams', version=3, params=_params)
4503 _params['entities'] = entities
4504 reply = await self.rpc(msg)
4505 return reply
4506
4507
4508
4509 @ReturnMapping(VolumeResults)
4510 async def Volumes(self, entities):
4511 '''
4512 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4513 Returns -> typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
4514 '''
4515 # map input types to rpc msg
4516 _params = dict()
4517 msg = dict(type='StorageProvisioner', request='Volumes', version=3, params=_params)
4518 _params['entities'] = entities
4519 reply = await self.rpc(msg)
4520 return reply
4521
4522
4523
4524 @ReturnMapping(NotifyWatchResults)
4525 async def WatchBlockDevices(self, entities):
4526 '''
4527 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4528 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
4529 '''
4530 # map input types to rpc msg
4531 _params = dict()
4532 msg = dict(type='StorageProvisioner', request='WatchBlockDevices', version=3, params=_params)
4533 _params['entities'] = entities
4534 reply = await self.rpc(msg)
4535 return reply
4536
4537
4538
4539 @ReturnMapping(MachineStorageIdsWatchResults)
4540 async def WatchFilesystemAttachments(self, entities):
4541 '''
4542 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4543 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
4544 '''
4545 # map input types to rpc msg
4546 _params = dict()
4547 msg = dict(type='StorageProvisioner', request='WatchFilesystemAttachments', version=3, params=_params)
4548 _params['entities'] = entities
4549 reply = await self.rpc(msg)
4550 return reply
4551
4552
4553
4554 @ReturnMapping(StringsWatchResults)
4555 async def WatchFilesystems(self, entities):
4556 '''
4557 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4558 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
4559 '''
4560 # map input types to rpc msg
4561 _params = dict()
4562 msg = dict(type='StorageProvisioner', request='WatchFilesystems', version=3, params=_params)
4563 _params['entities'] = entities
4564 reply = await self.rpc(msg)
4565 return reply
4566
4567
4568
4569 @ReturnMapping(NotifyWatchResults)
4570 async def WatchMachines(self, entities):
4571 '''
4572 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4573 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
4574 '''
4575 # map input types to rpc msg
4576 _params = dict()
4577 msg = dict(type='StorageProvisioner', request='WatchMachines', version=3, params=_params)
4578 _params['entities'] = entities
4579 reply = await self.rpc(msg)
4580 return reply
4581
4582
4583
4584 @ReturnMapping(MachineStorageIdsWatchResults)
4585 async def WatchVolumeAttachments(self, entities):
4586 '''
4587 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4588 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
4589 '''
4590 # map input types to rpc msg
4591 _params = dict()
4592 msg = dict(type='StorageProvisioner', request='WatchVolumeAttachments', version=3, params=_params)
4593 _params['entities'] = entities
4594 reply = await self.rpc(msg)
4595 return reply
4596
4597
4598
4599 @ReturnMapping(StringsWatchResults)
4600 async def WatchVolumes(self, entities):
4601 '''
4602 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
4603 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
4604 '''
4605 # map input types to rpc msg
4606 _params = dict()
4607 msg = dict(type='StorageProvisioner', request='WatchVolumes', version=3, params=_params)
4608 _params['entities'] = entities
4609 reply = await self.rpc(msg)
4610 return reply
4611
4612