[bug 581] Fix parameter checking if no data-type
[osm/N2VC.git] / modules / libjuju / 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._definitions import *
5 from juju.client.facade import ReturnMapping, Type
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': {'model-tag': {'type': 'string'},
733 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
734 'required': ['model-tag', 'target-info'],
735 'type': 'object'},
736 'MigrationTargetInfo': {'additionalProperties': False,
737 'properties': {'addrs': {'items': {'type': 'string'},
738 'type': 'array'},
739 'auth-tag': {'type': 'string'},
740 'ca-cert': {'type': 'string'},
741 'controller-tag': {'type': 'string'},
742 'macaroons': {'type': 'string'},
743 'password': {'type': 'string'}},
744 'required': ['controller-tag',
745 'addrs',
746 'ca-cert',
747 'auth-tag'],
748 'type': 'object'},
749 'Model': {'additionalProperties': False,
750 'properties': {'name': {'type': 'string'},
751 'owner-tag': {'type': 'string'},
752 'uuid': {'type': 'string'}},
753 'required': ['name', 'uuid', 'owner-tag'],
754 'type': 'object'},
755 'ModelBlockInfo': {'additionalProperties': False,
756 'properties': {'blocks': {'items': {'type': 'string'},
757 'type': 'array'},
758 'model-uuid': {'type': 'string'},
759 'name': {'type': 'string'},
760 'owner-tag': {'type': 'string'}},
761 'required': ['name',
762 'model-uuid',
763 'owner-tag',
764 'blocks'],
765 'type': 'object'},
766 'ModelBlockInfoList': {'additionalProperties': False,
767 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
768 'type': 'array'}},
769 'type': 'object'},
770 'ModelConfigResults': {'additionalProperties': False,
771 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
772 'type': 'object'}},
773 'required': ['config'],
774 'type': 'object'},
775 'ModelMachineInfo': {'additionalProperties': False,
776 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
777 'has-vote': {'type': 'boolean'},
778 'id': {'type': 'string'},
779 'instance-id': {'type': 'string'},
780 'status': {'type': 'string'},
781 'wants-vote': {'type': 'boolean'}},
782 'required': ['id'],
783 'type': 'object'},
784 'ModelStatus': {'additionalProperties': False,
785 'properties': {'application-count': {'type': 'integer'},
786 'hosted-machine-count': {'type': 'integer'},
787 'life': {'type': 'string'},
788 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
789 'type': 'array'},
790 'model-tag': {'type': 'string'},
791 'owner-tag': {'type': 'string'}},
792 'required': ['model-tag',
793 'life',
794 'hosted-machine-count',
795 'application-count',
796 'owner-tag'],
797 'type': 'object'},
798 'ModelStatusResults': {'additionalProperties': False,
799 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
800 'type': 'array'}},
801 'required': ['models'],
802 'type': 'object'},
803 'ModelTag': {'additionalProperties': False, 'type': 'object'},
804 'ModifyControllerAccess': {'additionalProperties': False,
805 'properties': {'access': {'type': 'string'},
806 'action': {'type': 'string'},
807 'user-tag': {'type': 'string'}},
808 'required': ['user-tag',
809 'action',
810 'access'],
811 'type': 'object'},
812 'ModifyControllerAccessRequest': {'additionalProperties': False,
813 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
814 'type': 'array'}},
815 'required': ['changes'],
816 'type': 'object'},
817 'RemoveBlocksArgs': {'additionalProperties': False,
818 'properties': {'all': {'type': 'boolean'}},
819 'required': ['all'],
820 'type': 'object'},
821 'UserAccess': {'additionalProperties': False,
822 'properties': {'access': {'type': 'string'},
823 'user-tag': {'type': 'string'}},
824 'required': ['user-tag', 'access'],
825 'type': 'object'},
826 'UserAccessResult': {'additionalProperties': False,
827 'properties': {'error': {'$ref': '#/definitions/Error'},
828 'result': {'$ref': '#/definitions/UserAccess'}},
829 'type': 'object'},
830 'UserAccessResults': {'additionalProperties': False,
831 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
832 'type': 'array'}},
833 'type': 'object'},
834 'UserModel': {'additionalProperties': False,
835 'properties': {'last-connection': {'format': 'date-time',
836 'type': 'string'},
837 'model': {'$ref': '#/definitions/Model'}},
838 'required': ['model', 'last-connection'],
839 'type': 'object'},
840 'UserModelList': {'additionalProperties': False,
841 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
842 'type': 'array'}},
843 'required': ['user-models'],
844 'type': 'object'}},
845 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
846 'type': 'object'},
847 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
848 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
849 'type': 'object'},
850 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
851 'type': 'object'},
852 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
853 'type': 'object'},
854 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
855 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
856 'type': 'object'},
857 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
858 'Result': {'$ref': '#/definitions/UserAccessResults'}},
859 'type': 'object'},
860 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}},
861 'type': 'object'},
862 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
863 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
864 'type': 'object'},
865 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
866 'type': 'object'},
867 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
868 'type': 'object'},
869 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
870 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
871 'type': 'object'},
872 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
873 'Result': {'$ref': '#/definitions/ErrorResults'}},
874 'type': 'object'},
875 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
876 'type': 'object'},
877 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
878 'type': 'object'}},
879 'type': 'object'}
880
881
882 @ReturnMapping(UserModelList)
883 async def AllModels(self):
884 '''
885
886 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
887 '''
888 # map input types to rpc msg
889 _params = dict()
890 msg = dict(type='Controller', request='AllModels', version=3, params=_params)
891
892 reply = await self.rpc(msg)
893 return reply
894
895
896
897 @ReturnMapping(CloudSpecResults)
898 async def CloudSpec(self, entities):
899 '''
900 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
901 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
902 '''
903 # map input types to rpc msg
904 _params = dict()
905 msg = dict(type='Controller', request='CloudSpec', version=3, params=_params)
906 _params['entities'] = entities
907 reply = await self.rpc(msg)
908 return reply
909
910
911
912 @ReturnMapping(ControllerConfigResult)
913 async def ControllerConfig(self):
914 '''
915
916 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
917 '''
918 # map input types to rpc msg
919 _params = dict()
920 msg = dict(type='Controller', request='ControllerConfig', version=3, params=_params)
921
922 reply = await self.rpc(msg)
923 return reply
924
925
926
927 @ReturnMapping(None)
928 async def DestroyController(self, destroy_models):
929 '''
930 destroy_models : bool
931 Returns -> None
932 '''
933 # map input types to rpc msg
934 _params = dict()
935 msg = dict(type='Controller', request='DestroyController', version=3, params=_params)
936 _params['destroy-models'] = destroy_models
937 reply = await self.rpc(msg)
938 return reply
939
940
941
942 @ReturnMapping(CloudSpecResult)
943 async def GetCloudSpec(self):
944 '''
945
946 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
947 '''
948 # map input types to rpc msg
949 _params = dict()
950 msg = dict(type='Controller', request='GetCloudSpec', version=3, params=_params)
951
952 reply = await self.rpc(msg)
953 return reply
954
955
956
957 @ReturnMapping(UserAccessResults)
958 async def GetControllerAccess(self, entities):
959 '''
960 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
961 Returns -> typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
962 '''
963 # map input types to rpc msg
964 _params = dict()
965 msg = dict(type='Controller', request='GetControllerAccess', version=3, params=_params)
966 _params['entities'] = entities
967 reply = await self.rpc(msg)
968 return reply
969
970
971
972 @ReturnMapping(HostedModelConfigsResults)
973 async def HostedModelConfigs(self):
974 '''
975
976 Returns -> typing.Sequence<+T_co>[~HostedModelConfig]<~HostedModelConfig>
977 '''
978 # map input types to rpc msg
979 _params = dict()
980 msg = dict(type='Controller', request='HostedModelConfigs', version=3, params=_params)
981
982 reply = await self.rpc(msg)
983 return reply
984
985
986
987 @ReturnMapping(InitiateMigrationResults)
988 async def InitiateMigration(self, specs):
989 '''
990 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
991 Returns -> typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
992 '''
993 # map input types to rpc msg
994 _params = dict()
995 msg = dict(type='Controller', request='InitiateMigration', version=3, params=_params)
996 _params['specs'] = specs
997 reply = await self.rpc(msg)
998 return reply
999
1000
1001
1002 @ReturnMapping(ModelBlockInfoList)
1003 async def ListBlockedModels(self):
1004 '''
1005
1006 Returns -> typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
1007 '''
1008 # map input types to rpc msg
1009 _params = dict()
1010 msg = dict(type='Controller', request='ListBlockedModels', version=3, params=_params)
1011
1012 reply = await self.rpc(msg)
1013 return reply
1014
1015
1016
1017 @ReturnMapping(ModelConfigResults)
1018 async def ModelConfig(self):
1019 '''
1020
1021 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1022 '''
1023 # map input types to rpc msg
1024 _params = dict()
1025 msg = dict(type='Controller', request='ModelConfig', version=3, params=_params)
1026
1027 reply = await self.rpc(msg)
1028 return reply
1029
1030
1031
1032 @ReturnMapping(ModelStatusResults)
1033 async def ModelStatus(self, entities):
1034 '''
1035 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1036 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
1037 '''
1038 # map input types to rpc msg
1039 _params = dict()
1040 msg = dict(type='Controller', request='ModelStatus', version=3, params=_params)
1041 _params['entities'] = entities
1042 reply = await self.rpc(msg)
1043 return reply
1044
1045
1046
1047 @ReturnMapping(ErrorResults)
1048 async def ModifyControllerAccess(self, changes):
1049 '''
1050 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
1051 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1052 '''
1053 # map input types to rpc msg
1054 _params = dict()
1055 msg = dict(type='Controller', request='ModifyControllerAccess', version=3, params=_params)
1056 _params['changes'] = changes
1057 reply = await self.rpc(msg)
1058 return reply
1059
1060
1061
1062 @ReturnMapping(None)
1063 async def RemoveBlocks(self, all_):
1064 '''
1065 all_ : bool
1066 Returns -> None
1067 '''
1068 # map input types to rpc msg
1069 _params = dict()
1070 msg = dict(type='Controller', request='RemoveBlocks', version=3, params=_params)
1071 _params['all'] = all_
1072 reply = await self.rpc(msg)
1073 return reply
1074
1075
1076
1077 @ReturnMapping(AllWatcherId)
1078 async def WatchAllModels(self):
1079 '''
1080
1081 Returns -> str
1082 '''
1083 # map input types to rpc msg
1084 _params = dict()
1085 msg = dict(type='Controller', request='WatchAllModels', version=3, params=_params)
1086
1087 reply = await self.rpc(msg)
1088 return reply
1089
1090
1091
1092 class FirewallerFacade(Type):
1093 name = 'Firewaller'
1094 version = 3
1095 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
1096 'properties': {'error': {'$ref': '#/definitions/Error'},
1097 'result': {'type': 'boolean'}},
1098 'required': ['result'],
1099 'type': 'object'},
1100 'BoolResults': {'additionalProperties': False,
1101 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
1102 'type': 'array'}},
1103 'required': ['results'],
1104 'type': 'object'},
1105 'CloudCredential': {'additionalProperties': False,
1106 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
1107 'type': 'object'},
1108 'auth-type': {'type': 'string'},
1109 'redacted': {'items': {'type': 'string'},
1110 'type': 'array'}},
1111 'required': ['auth-type'],
1112 'type': 'object'},
1113 'CloudSpec': {'additionalProperties': False,
1114 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
1115 'endpoint': {'type': 'string'},
1116 'identity-endpoint': {'type': 'string'},
1117 'name': {'type': 'string'},
1118 'region': {'type': 'string'},
1119 'storage-endpoint': {'type': 'string'},
1120 'type': {'type': 'string'}},
1121 'required': ['type', 'name'],
1122 'type': 'object'},
1123 'CloudSpecResult': {'additionalProperties': False,
1124 'properties': {'error': {'$ref': '#/definitions/Error'},
1125 'result': {'$ref': '#/definitions/CloudSpec'}},
1126 'type': 'object'},
1127 'CloudSpecResults': {'additionalProperties': False,
1128 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
1129 'type': 'array'}},
1130 'type': 'object'},
1131 'Entities': {'additionalProperties': False,
1132 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1133 'type': 'array'}},
1134 'required': ['entities'],
1135 'type': 'object'},
1136 'Entity': {'additionalProperties': False,
1137 'properties': {'tag': {'type': 'string'}},
1138 'required': ['tag'],
1139 'type': 'object'},
1140 'Error': {'additionalProperties': False,
1141 'properties': {'code': {'type': 'string'},
1142 'info': {'$ref': '#/definitions/ErrorInfo'},
1143 'message': {'type': 'string'}},
1144 'required': ['message', 'code'],
1145 'type': 'object'},
1146 'ErrorInfo': {'additionalProperties': False,
1147 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1148 'macaroon-path': {'type': 'string'}},
1149 'type': 'object'},
1150 'LifeResult': {'additionalProperties': False,
1151 'properties': {'error': {'$ref': '#/definitions/Error'},
1152 'life': {'type': 'string'}},
1153 'required': ['life'],
1154 'type': 'object'},
1155 'LifeResults': {'additionalProperties': False,
1156 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1157 'type': 'array'}},
1158 'required': ['results'],
1159 'type': 'object'},
1160 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1161 'MachinePortRange': {'additionalProperties': False,
1162 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
1163 'relation-tag': {'type': 'string'},
1164 'unit-tag': {'type': 'string'}},
1165 'required': ['unit-tag',
1166 'relation-tag',
1167 'port-range'],
1168 'type': 'object'},
1169 'MachinePorts': {'additionalProperties': False,
1170 'properties': {'machine-tag': {'type': 'string'},
1171 'subnet-tag': {'type': 'string'}},
1172 'required': ['machine-tag', 'subnet-tag'],
1173 'type': 'object'},
1174 'MachinePortsParams': {'additionalProperties': False,
1175 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
1176 'type': 'array'}},
1177 'required': ['params'],
1178 'type': 'object'},
1179 'MachinePortsResult': {'additionalProperties': False,
1180 'properties': {'error': {'$ref': '#/definitions/Error'},
1181 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
1182 'type': 'array'}},
1183 'required': ['ports'],
1184 'type': 'object'},
1185 'MachinePortsResults': {'additionalProperties': False,
1186 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
1187 'type': 'array'}},
1188 'required': ['results'],
1189 'type': 'object'},
1190 'ModelConfigResult': {'additionalProperties': False,
1191 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1192 'type': 'object'}},
1193 'type': 'object'}},
1194 'required': ['config'],
1195 'type': 'object'},
1196 'ModelTag': {'additionalProperties': False, 'type': 'object'},
1197 'NotifyWatchResult': {'additionalProperties': False,
1198 'properties': {'NotifyWatcherId': {'type': 'string'},
1199 'error': {'$ref': '#/definitions/Error'}},
1200 'required': ['NotifyWatcherId'],
1201 'type': 'object'},
1202 'NotifyWatchResults': {'additionalProperties': False,
1203 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
1204 'type': 'array'}},
1205 'required': ['results'],
1206 'type': 'object'},
1207 'PortRange': {'additionalProperties': False,
1208 'properties': {'from-port': {'type': 'integer'},
1209 'protocol': {'type': 'string'},
1210 'to-port': {'type': 'integer'}},
1211 'required': ['from-port', 'to-port', 'protocol'],
1212 'type': 'object'},
1213 'StringResult': {'additionalProperties': False,
1214 'properties': {'error': {'$ref': '#/definitions/Error'},
1215 'result': {'type': 'string'}},
1216 'required': ['result'],
1217 'type': 'object'},
1218 'StringResults': {'additionalProperties': False,
1219 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
1220 'type': 'array'}},
1221 'required': ['results'],
1222 'type': 'object'},
1223 'StringsResult': {'additionalProperties': False,
1224 'properties': {'error': {'$ref': '#/definitions/Error'},
1225 'result': {'items': {'type': 'string'},
1226 'type': 'array'}},
1227 'type': 'object'},
1228 'StringsResults': {'additionalProperties': False,
1229 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
1230 'type': 'array'}},
1231 'required': ['results'],
1232 'type': 'object'},
1233 'StringsWatchResult': {'additionalProperties': False,
1234 'properties': {'changes': {'items': {'type': 'string'},
1235 'type': 'array'},
1236 'error': {'$ref': '#/definitions/Error'},
1237 'watcher-id': {'type': 'string'}},
1238 'required': ['watcher-id'],
1239 'type': 'object'},
1240 'StringsWatchResults': {'additionalProperties': False,
1241 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
1242 'type': 'array'}},
1243 'required': ['results'],
1244 'type': 'object'}},
1245 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1246 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
1247 'type': 'object'},
1248 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1249 'Result': {'$ref': '#/definitions/StringResults'}},
1250 'type': 'object'},
1251 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
1252 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
1253 'type': 'object'},
1254 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1255 'Result': {'$ref': '#/definitions/BoolResults'}},
1256 'type': 'object'},
1257 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1258 'Result': {'$ref': '#/definitions/StringsResults'}},
1259 'type': 'object'},
1260 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
1261 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
1262 'type': 'object'},
1263 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1264 'Result': {'$ref': '#/definitions/StringResults'}},
1265 'type': 'object'},
1266 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1267 'Result': {'$ref': '#/definitions/LifeResults'}},
1268 'type': 'object'},
1269 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1270 'type': 'object'},
1271 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1272 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
1273 'type': 'object'},
1274 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1275 'type': 'object'},
1276 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1277 'type': 'object'},
1278 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1279 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1280 'type': 'object'},
1281 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1282 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
1283 'type': 'object'}},
1284 'type': 'object'}
1285
1286
1287 @ReturnMapping(CloudSpecResults)
1288 async def CloudSpec(self, entities):
1289 '''
1290 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1291 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
1292 '''
1293 # map input types to rpc msg
1294 _params = dict()
1295 msg = dict(type='Firewaller', request='CloudSpec', version=3, params=_params)
1296 _params['entities'] = entities
1297 reply = await self.rpc(msg)
1298 return reply
1299
1300
1301
1302 @ReturnMapping(StringResults)
1303 async def GetAssignedMachine(self, entities):
1304 '''
1305 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1306 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1307 '''
1308 # map input types to rpc msg
1309 _params = dict()
1310 msg = dict(type='Firewaller', request='GetAssignedMachine', version=3, params=_params)
1311 _params['entities'] = entities
1312 reply = await self.rpc(msg)
1313 return reply
1314
1315
1316
1317 @ReturnMapping(CloudSpecResult)
1318 async def GetCloudSpec(self):
1319 '''
1320
1321 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
1322 '''
1323 # map input types to rpc msg
1324 _params = dict()
1325 msg = dict(type='Firewaller', request='GetCloudSpec', version=3, params=_params)
1326
1327 reply = await self.rpc(msg)
1328 return reply
1329
1330
1331
1332 @ReturnMapping(BoolResults)
1333 async def GetExposed(self, entities):
1334 '''
1335 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1336 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
1337 '''
1338 # map input types to rpc msg
1339 _params = dict()
1340 msg = dict(type='Firewaller', request='GetExposed', version=3, params=_params)
1341 _params['entities'] = entities
1342 reply = await self.rpc(msg)
1343 return reply
1344
1345
1346
1347 @ReturnMapping(StringsResults)
1348 async def GetMachineActiveSubnets(self, entities):
1349 '''
1350 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1351 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
1352 '''
1353 # map input types to rpc msg
1354 _params = dict()
1355 msg = dict(type='Firewaller', request='GetMachineActiveSubnets', version=3, params=_params)
1356 _params['entities'] = entities
1357 reply = await self.rpc(msg)
1358 return reply
1359
1360
1361
1362 @ReturnMapping(MachinePortsResults)
1363 async def GetMachinePorts(self, params):
1364 '''
1365 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
1366 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
1367 '''
1368 # map input types to rpc msg
1369 _params = dict()
1370 msg = dict(type='Firewaller', request='GetMachinePorts', version=3, params=_params)
1371 _params['params'] = params
1372 reply = await self.rpc(msg)
1373 return reply
1374
1375
1376
1377 @ReturnMapping(StringResults)
1378 async def InstanceId(self, entities):
1379 '''
1380 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1381 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1382 '''
1383 # map input types to rpc msg
1384 _params = dict()
1385 msg = dict(type='Firewaller', request='InstanceId', version=3, params=_params)
1386 _params['entities'] = entities
1387 reply = await self.rpc(msg)
1388 return reply
1389
1390
1391
1392 @ReturnMapping(LifeResults)
1393 async def Life(self, entities):
1394 '''
1395 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1396 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
1397 '''
1398 # map input types to rpc msg
1399 _params = dict()
1400 msg = dict(type='Firewaller', request='Life', version=3, params=_params)
1401 _params['entities'] = entities
1402 reply = await self.rpc(msg)
1403 return reply
1404
1405
1406
1407 @ReturnMapping(ModelConfigResult)
1408 async def ModelConfig(self):
1409 '''
1410
1411 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
1412 '''
1413 # map input types to rpc msg
1414 _params = dict()
1415 msg = dict(type='Firewaller', request='ModelConfig', version=3, params=_params)
1416
1417 reply = await self.rpc(msg)
1418 return reply
1419
1420
1421
1422 @ReturnMapping(NotifyWatchResults)
1423 async def Watch(self, entities):
1424 '''
1425 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1426 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
1427 '''
1428 # map input types to rpc msg
1429 _params = dict()
1430 msg = dict(type='Firewaller', request='Watch', version=3, params=_params)
1431 _params['entities'] = entities
1432 reply = await self.rpc(msg)
1433 return reply
1434
1435
1436
1437 @ReturnMapping(NotifyWatchResult)
1438 async def WatchForModelConfigChanges(self):
1439 '''
1440
1441 Returns -> typing.Union[str, _ForwardRef('Error')]
1442 '''
1443 # map input types to rpc msg
1444 _params = dict()
1445 msg = dict(type='Firewaller', request='WatchForModelConfigChanges', version=3, params=_params)
1446
1447 reply = await self.rpc(msg)
1448 return reply
1449
1450
1451
1452 @ReturnMapping(StringsWatchResult)
1453 async def WatchModelMachines(self):
1454 '''
1455
1456 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
1457 '''
1458 # map input types to rpc msg
1459 _params = dict()
1460 msg = dict(type='Firewaller', request='WatchModelMachines', version=3, params=_params)
1461
1462 reply = await self.rpc(msg)
1463 return reply
1464
1465
1466
1467 @ReturnMapping(StringsWatchResults)
1468 async def WatchOpenedPorts(self, entities):
1469 '''
1470 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1471 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
1472 '''
1473 # map input types to rpc msg
1474 _params = dict()
1475 msg = dict(type='Firewaller', request='WatchOpenedPorts', version=3, params=_params)
1476 _params['entities'] = entities
1477 reply = await self.rpc(msg)
1478 return reply
1479
1480
1481
1482 @ReturnMapping(StringsWatchResults)
1483 async def WatchUnits(self, entities):
1484 '''
1485 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1486 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
1487 '''
1488 # map input types to rpc msg
1489 _params = dict()
1490 msg = dict(type='Firewaller', request='WatchUnits', version=3, params=_params)
1491 _params['entities'] = entities
1492 reply = await self.rpc(msg)
1493 return reply
1494
1495
1496
1497 class InstancePollerFacade(Type):
1498 name = 'InstancePoller'
1499 version = 3
1500 schema = {'definitions': {'Address': {'additionalProperties': False,
1501 'properties': {'scope': {'type': 'string'},
1502 'space-name': {'type': 'string'},
1503 'type': {'type': 'string'},
1504 'value': {'type': 'string'}},
1505 'required': ['value', 'type', 'scope'],
1506 'type': 'object'},
1507 'BoolResult': {'additionalProperties': False,
1508 'properties': {'error': {'$ref': '#/definitions/Error'},
1509 'result': {'type': 'boolean'}},
1510 'required': ['result'],
1511 'type': 'object'},
1512 'BoolResults': {'additionalProperties': False,
1513 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
1514 'type': 'array'}},
1515 'required': ['results'],
1516 'type': 'object'},
1517 'Entities': {'additionalProperties': False,
1518 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1519 'type': 'array'}},
1520 'required': ['entities'],
1521 'type': 'object'},
1522 'Entity': {'additionalProperties': False,
1523 'properties': {'tag': {'type': 'string'}},
1524 'required': ['tag'],
1525 'type': 'object'},
1526 'EntityStatusArgs': {'additionalProperties': False,
1527 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1528 'type': 'object'}},
1529 'type': 'object'},
1530 'info': {'type': 'string'},
1531 'status': {'type': 'string'},
1532 'tag': {'type': 'string'}},
1533 'required': ['tag',
1534 'status',
1535 'info',
1536 'data'],
1537 'type': 'object'},
1538 'Error': {'additionalProperties': False,
1539 'properties': {'code': {'type': 'string'},
1540 'info': {'$ref': '#/definitions/ErrorInfo'},
1541 'message': {'type': 'string'}},
1542 'required': ['message', 'code'],
1543 'type': 'object'},
1544 'ErrorInfo': {'additionalProperties': False,
1545 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1546 'macaroon-path': {'type': 'string'}},
1547 'type': 'object'},
1548 'ErrorResult': {'additionalProperties': False,
1549 'properties': {'error': {'$ref': '#/definitions/Error'}},
1550 'type': 'object'},
1551 'ErrorResults': {'additionalProperties': False,
1552 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
1553 'type': 'array'}},
1554 'required': ['results'],
1555 'type': 'object'},
1556 'LifeResult': {'additionalProperties': False,
1557 'properties': {'error': {'$ref': '#/definitions/Error'},
1558 'life': {'type': 'string'}},
1559 'required': ['life'],
1560 'type': 'object'},
1561 'LifeResults': {'additionalProperties': False,
1562 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
1563 'type': 'array'}},
1564 'required': ['results'],
1565 'type': 'object'},
1566 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1567 'MachineAddresses': {'additionalProperties': False,
1568 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1569 'type': 'array'},
1570 'tag': {'type': 'string'}},
1571 'required': ['tag', 'addresses'],
1572 'type': 'object'},
1573 'MachineAddressesResult': {'additionalProperties': False,
1574 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1575 'type': 'array'},
1576 'error': {'$ref': '#/definitions/Error'}},
1577 'required': ['addresses'],
1578 'type': 'object'},
1579 'MachineAddressesResults': {'additionalProperties': False,
1580 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
1581 'type': 'array'}},
1582 'required': ['results'],
1583 'type': 'object'},
1584 'ModelConfigResult': {'additionalProperties': False,
1585 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
1586 'type': 'object'}},
1587 'type': 'object'}},
1588 'required': ['config'],
1589 'type': 'object'},
1590 'NotifyWatchResult': {'additionalProperties': False,
1591 'properties': {'NotifyWatcherId': {'type': 'string'},
1592 'error': {'$ref': '#/definitions/Error'}},
1593 'required': ['NotifyWatcherId'],
1594 'type': 'object'},
1595 'SetMachinesAddresses': {'additionalProperties': False,
1596 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
1597 'type': 'array'}},
1598 'required': ['machine-addresses'],
1599 'type': 'object'},
1600 'SetStatus': {'additionalProperties': False,
1601 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
1602 'type': 'array'}},
1603 'required': ['entities'],
1604 'type': 'object'},
1605 'StatusResult': {'additionalProperties': False,
1606 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
1607 'type': 'object'}},
1608 'type': 'object'},
1609 'error': {'$ref': '#/definitions/Error'},
1610 'id': {'type': 'string'},
1611 'info': {'type': 'string'},
1612 'life': {'type': 'string'},
1613 'since': {'format': 'date-time',
1614 'type': 'string'},
1615 'status': {'type': 'string'}},
1616 'required': ['id',
1617 'life',
1618 'status',
1619 'info',
1620 'data',
1621 'since'],
1622 'type': 'object'},
1623 'StatusResults': {'additionalProperties': False,
1624 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
1625 'type': 'array'}},
1626 'required': ['results'],
1627 'type': 'object'},
1628 'StringResult': {'additionalProperties': False,
1629 'properties': {'error': {'$ref': '#/definitions/Error'},
1630 'result': {'type': 'string'}},
1631 'required': ['result'],
1632 'type': 'object'},
1633 'StringResults': {'additionalProperties': False,
1634 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
1635 'type': 'array'}},
1636 'required': ['results'],
1637 'type': 'object'},
1638 'StringsWatchResult': {'additionalProperties': False,
1639 'properties': {'changes': {'items': {'type': 'string'},
1640 'type': 'array'},
1641 'error': {'$ref': '#/definitions/Error'},
1642 'watcher-id': {'type': 'string'}},
1643 'required': ['watcher-id'],
1644 'type': 'object'}},
1645 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1646 'Result': {'$ref': '#/definitions/BoolResults'}},
1647 'type': 'object'},
1648 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1649 'Result': {'$ref': '#/definitions/StringResults'}},
1650 'type': 'object'},
1651 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1652 'Result': {'$ref': '#/definitions/StatusResults'}},
1653 'type': 'object'},
1654 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1655 'Result': {'$ref': '#/definitions/LifeResults'}},
1656 'type': 'object'},
1657 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
1658 'type': 'object'},
1659 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1660 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
1661 'type': 'object'},
1662 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
1663 'Result': {'$ref': '#/definitions/ErrorResults'}},
1664 'type': 'object'},
1665 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
1666 'Result': {'$ref': '#/definitions/ErrorResults'}},
1667 'type': 'object'},
1668 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
1669 'Result': {'$ref': '#/definitions/StatusResults'}},
1670 'type': 'object'},
1671 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1672 'type': 'object'},
1673 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
1674 'type': 'object'}},
1675 'type': 'object'}
1676
1677
1678 @ReturnMapping(BoolResults)
1679 async def AreManuallyProvisioned(self, entities):
1680 '''
1681 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1682 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
1683 '''
1684 # map input types to rpc msg
1685 _params = dict()
1686 msg = dict(type='InstancePoller', request='AreManuallyProvisioned', version=3, params=_params)
1687 _params['entities'] = entities
1688 reply = await self.rpc(msg)
1689 return reply
1690
1691
1692
1693 @ReturnMapping(StringResults)
1694 async def InstanceId(self, entities):
1695 '''
1696 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1697 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
1698 '''
1699 # map input types to rpc msg
1700 _params = dict()
1701 msg = dict(type='InstancePoller', request='InstanceId', version=3, params=_params)
1702 _params['entities'] = entities
1703 reply = await self.rpc(msg)
1704 return reply
1705
1706
1707
1708 @ReturnMapping(StatusResults)
1709 async def InstanceStatus(self, entities):
1710 '''
1711 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1712 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
1713 '''
1714 # map input types to rpc msg
1715 _params = dict()
1716 msg = dict(type='InstancePoller', request='InstanceStatus', version=3, params=_params)
1717 _params['entities'] = entities
1718 reply = await self.rpc(msg)
1719 return reply
1720
1721
1722
1723 @ReturnMapping(LifeResults)
1724 async def Life(self, entities):
1725 '''
1726 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1727 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
1728 '''
1729 # map input types to rpc msg
1730 _params = dict()
1731 msg = dict(type='InstancePoller', request='Life', version=3, params=_params)
1732 _params['entities'] = entities
1733 reply = await self.rpc(msg)
1734 return reply
1735
1736
1737
1738 @ReturnMapping(ModelConfigResult)
1739 async def ModelConfig(self):
1740 '''
1741
1742 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
1743 '''
1744 # map input types to rpc msg
1745 _params = dict()
1746 msg = dict(type='InstancePoller', request='ModelConfig', version=3, params=_params)
1747
1748 reply = await self.rpc(msg)
1749 return reply
1750
1751
1752
1753 @ReturnMapping(MachineAddressesResults)
1754 async def ProviderAddresses(self, entities):
1755 '''
1756 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1757 Returns -> typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
1758 '''
1759 # map input types to rpc msg
1760 _params = dict()
1761 msg = dict(type='InstancePoller', request='ProviderAddresses', version=3, params=_params)
1762 _params['entities'] = entities
1763 reply = await self.rpc(msg)
1764 return reply
1765
1766
1767
1768 @ReturnMapping(ErrorResults)
1769 async def SetInstanceStatus(self, entities):
1770 '''
1771 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
1772 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1773 '''
1774 # map input types to rpc msg
1775 _params = dict()
1776 msg = dict(type='InstancePoller', request='SetInstanceStatus', version=3, params=_params)
1777 _params['entities'] = entities
1778 reply = await self.rpc(msg)
1779 return reply
1780
1781
1782
1783 @ReturnMapping(ErrorResults)
1784 async def SetProviderAddresses(self, machine_addresses):
1785 '''
1786 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
1787 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
1788 '''
1789 # map input types to rpc msg
1790 _params = dict()
1791 msg = dict(type='InstancePoller', request='SetProviderAddresses', version=3, params=_params)
1792 _params['machine-addresses'] = machine_addresses
1793 reply = await self.rpc(msg)
1794 return reply
1795
1796
1797
1798 @ReturnMapping(StatusResults)
1799 async def Status(self, entities):
1800 '''
1801 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
1802 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
1803 '''
1804 # map input types to rpc msg
1805 _params = dict()
1806 msg = dict(type='InstancePoller', request='Status', version=3, params=_params)
1807 _params['entities'] = entities
1808 reply = await self.rpc(msg)
1809 return reply
1810
1811
1812
1813 @ReturnMapping(NotifyWatchResult)
1814 async def WatchForModelConfigChanges(self):
1815 '''
1816
1817 Returns -> typing.Union[str, _ForwardRef('Error')]
1818 '''
1819 # map input types to rpc msg
1820 _params = dict()
1821 msg = dict(type='InstancePoller', request='WatchForModelConfigChanges', version=3, params=_params)
1822
1823 reply = await self.rpc(msg)
1824 return reply
1825
1826
1827
1828 @ReturnMapping(StringsWatchResult)
1829 async def WatchModelMachines(self):
1830 '''
1831
1832 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
1833 '''
1834 # map input types to rpc msg
1835 _params = dict()
1836 msg = dict(type='InstancePoller', request='WatchModelMachines', version=3, params=_params)
1837
1838 reply = await self.rpc(msg)
1839 return reply
1840
1841
1842
1843 class MachineManagerFacade(Type):
1844 name = 'MachineManager'
1845 version = 3
1846 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
1847 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
1848 'type': 'array'},
1849 'constraints': {'$ref': '#/definitions/Value'},
1850 'container-type': {'type': 'string'},
1851 'disks': {'items': {'$ref': '#/definitions/Constraints'},
1852 'type': 'array'},
1853 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
1854 'instance-id': {'type': 'string'},
1855 'jobs': {'items': {'type': 'string'},
1856 'type': 'array'},
1857 'nonce': {'type': 'string'},
1858 'parent-id': {'type': 'string'},
1859 'placement': {'$ref': '#/definitions/Placement'},
1860 'series': {'type': 'string'}},
1861 'required': ['series',
1862 'constraints',
1863 'jobs',
1864 'parent-id',
1865 'container-type',
1866 'instance-id',
1867 'nonce',
1868 'hardware-characteristics',
1869 'addresses'],
1870 'type': 'object'},
1871 'AddMachines': {'additionalProperties': False,
1872 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
1873 'type': 'array'}},
1874 'required': ['params'],
1875 'type': 'object'},
1876 'AddMachinesResult': {'additionalProperties': False,
1877 'properties': {'error': {'$ref': '#/definitions/Error'},
1878 'machine': {'type': 'string'}},
1879 'required': ['machine'],
1880 'type': 'object'},
1881 'AddMachinesResults': {'additionalProperties': False,
1882 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
1883 'type': 'array'}},
1884 'required': ['machines'],
1885 'type': 'object'},
1886 'Address': {'additionalProperties': False,
1887 'properties': {'scope': {'type': 'string'},
1888 'space-name': {'type': 'string'},
1889 'type': {'type': 'string'},
1890 'value': {'type': 'string'}},
1891 'required': ['value', 'type', 'scope'],
1892 'type': 'object'},
1893 'Constraints': {'additionalProperties': False,
1894 'properties': {'Count': {'type': 'integer'},
1895 'Pool': {'type': 'string'},
1896 'Size': {'type': 'integer'}},
1897 'required': ['Pool', 'Size', 'Count'],
1898 'type': 'object'},
1899 'DestroyMachineInfo': {'additionalProperties': False,
1900 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
1901 'type': 'array'},
1902 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
1903 'type': 'array'},
1904 'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
1905 'type': 'array'}},
1906 'type': 'object'},
1907 'DestroyMachineResult': {'additionalProperties': False,
1908 'properties': {'error': {'$ref': '#/definitions/Error'},
1909 'info': {'$ref': '#/definitions/DestroyMachineInfo'}},
1910 'type': 'object'},
1911 'DestroyMachineResults': {'additionalProperties': False,
1912 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyMachineResult'},
1913 'type': 'array'}},
1914 'type': 'object'},
1915 'Entities': {'additionalProperties': False,
1916 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
1917 'type': 'array'}},
1918 'required': ['entities'],
1919 'type': 'object'},
1920 'Entity': {'additionalProperties': False,
1921 'properties': {'tag': {'type': 'string'}},
1922 'required': ['tag'],
1923 'type': 'object'},
1924 'Error': {'additionalProperties': False,
1925 'properties': {'code': {'type': 'string'},
1926 'info': {'$ref': '#/definitions/ErrorInfo'},
1927 'message': {'type': 'string'}},
1928 'required': ['message', 'code'],
1929 'type': 'object'},
1930 'ErrorInfo': {'additionalProperties': False,
1931 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
1932 'macaroon-path': {'type': 'string'}},
1933 'type': 'object'},
1934 'HardwareCharacteristics': {'additionalProperties': False,
1935 'properties': {'arch': {'type': 'string'},
1936 'availability-zone': {'type': 'string'},
1937 'cpu-cores': {'type': 'integer'},
1938 'cpu-power': {'type': 'integer'},
1939 'mem': {'type': 'integer'},
1940 'root-disk': {'type': 'integer'},
1941 'tags': {'items': {'type': 'string'},
1942 'type': 'array'}},
1943 'type': 'object'},
1944 'InstanceType': {'additionalProperties': False,
1945 'properties': {'arches': {'items': {'type': 'string'},
1946 'type': 'array'},
1947 'cost': {'type': 'integer'},
1948 'cpu-cores': {'type': 'integer'},
1949 'deprecated': {'type': 'boolean'},
1950 'memory': {'type': 'integer'},
1951 'name': {'type': 'string'},
1952 'root-disk': {'type': 'integer'},
1953 'virt-type': {'type': 'string'}},
1954 'required': ['arches', 'cpu-cores', 'memory'],
1955 'type': 'object'},
1956 'InstanceTypesResult': {'additionalProperties': False,
1957 'properties': {'cost-currency': {'type': 'string'},
1958 'cost-divisor': {'type': 'integer'},
1959 'cost-unit': {'type': 'string'},
1960 'error': {'$ref': '#/definitions/Error'},
1961 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
1962 'type': 'array'}},
1963 'type': 'object'},
1964 'InstanceTypesResults': {'additionalProperties': False,
1965 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
1966 'type': 'array'}},
1967 'required': ['results'],
1968 'type': 'object'},
1969 'Macaroon': {'additionalProperties': False, 'type': 'object'},
1970 'ModelInstanceTypesConstraint': {'additionalProperties': False,
1971 'properties': {'value': {'$ref': '#/definitions/Value'}},
1972 'type': 'object'},
1973 'ModelInstanceTypesConstraints': {'additionalProperties': False,
1974 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
1975 'type': 'array'}},
1976 'required': ['constraints'],
1977 'type': 'object'},
1978 'Placement': {'additionalProperties': False,
1979 'properties': {'directive': {'type': 'string'},
1980 'scope': {'type': 'string'}},
1981 'required': ['scope', 'directive'],
1982 'type': 'object'},
1983 'Value': {'additionalProperties': False,
1984 'properties': {'arch': {'type': 'string'},
1985 'container': {'type': 'string'},
1986 'cores': {'type': 'integer'},
1987 'cpu-power': {'type': 'integer'},
1988 'instance-type': {'type': 'string'},
1989 'mem': {'type': 'integer'},
1990 'root-disk': {'type': 'integer'},
1991 'spaces': {'items': {'type': 'string'},
1992 'type': 'array'},
1993 'tags': {'items': {'type': 'string'},
1994 'type': 'array'},
1995 'virt-type': {'type': 'string'}},
1996 'type': 'object'}},
1997 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
1998 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
1999 'type': 'object'},
2000 'DestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2001 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2002 'type': 'object'},
2003 'ForceDestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2004 'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
2005 'type': 'object'},
2006 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
2007 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
2008 'type': 'object'}},
2009 'type': 'object'}
2010
2011
2012 @ReturnMapping(AddMachinesResults)
2013 async def AddMachines(self, params):
2014 '''
2015 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
2016 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
2017 '''
2018 # map input types to rpc msg
2019 _params = dict()
2020 msg = dict(type='MachineManager', request='AddMachines', version=3, params=_params)
2021 _params['params'] = params
2022 reply = await self.rpc(msg)
2023 return reply
2024
2025
2026
2027 @ReturnMapping(DestroyMachineResults)
2028 async def DestroyMachine(self, entities):
2029 '''
2030 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2031 Returns -> typing.Sequence<+T_co>[~DestroyMachineResult]<~DestroyMachineResult>
2032 '''
2033 # map input types to rpc msg
2034 _params = dict()
2035 msg = dict(type='MachineManager', request='DestroyMachine', version=3, params=_params)
2036 _params['entities'] = entities
2037 reply = await self.rpc(msg)
2038 return reply
2039
2040
2041
2042 @ReturnMapping(DestroyMachineResults)
2043 async def ForceDestroyMachine(self, entities):
2044 '''
2045 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
2046 Returns -> typing.Sequence<+T_co>[~DestroyMachineResult]<~DestroyMachineResult>
2047 '''
2048 # map input types to rpc msg
2049 _params = dict()
2050 msg = dict(type='MachineManager', request='ForceDestroyMachine', version=3, params=_params)
2051 _params['entities'] = entities
2052 reply = await self.rpc(msg)
2053 return reply
2054
2055
2056
2057 @ReturnMapping(InstanceTypesResults)
2058 async def InstanceTypes(self, constraints):
2059 '''
2060 constraints : typing.Sequence<+T_co>[~ModelInstanceTypesConstraint]<~ModelInstanceTypesConstraint>
2061 Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
2062 '''
2063 # map input types to rpc msg
2064 _params = dict()
2065 msg = dict(type='MachineManager', request='InstanceTypes', version=3, params=_params)
2066 _params['constraints'] = constraints
2067 reply = await self.rpc(msg)
2068 return reply
2069
2070
2071
2072 class ModelManagerFacade(Type):
2073 name = 'ModelManager'
2074 version = 3
2075 schema = {'definitions': {'DumpModelRequest': {'additionalProperties': False,
2076 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2077 'type': 'array'},
2078 'simplified': {'type': 'boolean'}},
2079 'required': ['entities', 'simplified'],
2080 'type': 'object'},
2081 'Entities': {'additionalProperties': False,
2082 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
2083 'type': 'array'}},
2084 'required': ['entities'],
2085 'type': 'object'},
2086 'Entity': {'additionalProperties': False,
2087 'properties': {'tag': {'type': 'string'}},
2088 'required': ['tag'],
2089 'type': 'object'},
2090 'EntityStatus': {'additionalProperties': False,
2091 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
2092 'type': 'object'}},
2093 'type': 'object'},
2094 'info': {'type': 'string'},
2095 'since': {'format': 'date-time',
2096 'type': 'string'},
2097 'status': {'type': 'string'}},
2098 'required': ['status', 'info', 'since'],
2099 'type': 'object'},
2100 'Error': {'additionalProperties': False,
2101 'properties': {'code': {'type': 'string'},
2102 'info': {'$ref': '#/definitions/ErrorInfo'},
2103 'message': {'type': 'string'}},
2104 'required': ['message', 'code'],
2105 'type': 'object'},
2106 'ErrorInfo': {'additionalProperties': False,
2107 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
2108 'macaroon-path': {'type': 'string'}},
2109 'type': 'object'},
2110 'ErrorResult': {'additionalProperties': False,
2111 'properties': {'error': {'$ref': '#/definitions/Error'}},
2112 'type': 'object'},
2113 'ErrorResults': {'additionalProperties': False,
2114 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
2115 'type': 'array'}},
2116 'required': ['results'],
2117 'type': 'object'},
2118 'Macaroon': {'additionalProperties': False, 'type': 'object'},
2119 'MachineHardware': {'additionalProperties': False,
2120 'properties': {'arch': {'type': 'string'},
2121 'availability-zone': {'type': 'string'},
2122 'cores': {'type': 'integer'},
2123 'cpu-power': {'type': 'integer'},
2124 'mem': {'type': 'integer'},
2125 'root-disk': {'type': 'integer'},
2126 'tags': {'items': {'type': 'string'},
2127 'type': 'array'}},
2128 'type': 'object'},
2129 'MapResult': {'additionalProperties': False,
2130 'properties': {'error': {'$ref': '#/definitions/Error'},
2131 'result': {'patternProperties': {'.*': {'additionalProperties': True,
2132 'type': 'object'}},
2133 'type': 'object'}},
2134 'required': ['result'],
2135 'type': 'object'},
2136 'MapResults': {'additionalProperties': False,
2137 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
2138 'type': 'array'}},
2139 'required': ['results'],
2140 'type': 'object'},
2141 'Model': {'additionalProperties': False,
2142 'properties': {'name': {'type': 'string'},
2143 'owner-tag': {'type': 'string'},
2144 'uuid': {'type': 'string'}},
2145 'required': ['name', 'uuid', 'owner-tag'],
2146 'type': 'object'},
2147 'ModelCreateArgs': {'additionalProperties': False,
2148 'properties': {'cloud-tag': {'type': 'string'},
2149 'config': {'patternProperties': {'.*': {'additionalProperties': True,
2150 'type': 'object'}},
2151 'type': 'object'},
2152 'credential': {'type': 'string'},
2153 'name': {'type': 'string'},
2154 'owner-tag': {'type': 'string'},
2155 'region': {'type': 'string'}},
2156 'required': ['name', 'owner-tag'],
2157 'type': 'object'},
2158 'ModelDefaultValues': {'additionalProperties': False,
2159 'properties': {'cloud-region': {'type': 'string'},
2160 'cloud-tag': {'type': 'string'},
2161 'config': {'patternProperties': {'.*': {'additionalProperties': True,
2162 'type': 'object'}},
2163 'type': 'object'}},
2164 'required': ['config'],
2165 'type': 'object'},
2166 'ModelDefaults': {'additionalProperties': False,
2167 'properties': {'controller': {'additionalProperties': True,
2168 'type': 'object'},
2169 'default': {'additionalProperties': True,
2170 'type': 'object'},
2171 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
2172 'type': 'array'}},
2173 'type': 'object'},
2174 'ModelDefaultsResult': {'additionalProperties': False,
2175 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
2176 'type': 'object'}},
2177 'required': ['config'],
2178 'type': 'object'},
2179 'ModelInfo': {'additionalProperties': False,
2180 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
2181 'cloud-credential-tag': {'type': 'string'},
2182 'cloud-region': {'type': 'string'},
2183 'cloud-tag': {'type': 'string'},
2184 'controller-uuid': {'type': 'string'},
2185 'default-series': {'type': 'string'},
2186 'life': {'type': 'string'},
2187 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
2188 'type': 'array'},
2189 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
2190 'name': {'type': 'string'},
2191 'owner-tag': {'type': 'string'},
2192 'provider-type': {'type': 'string'},
2193 'sla': {'$ref': '#/definitions/ModelSLAInfo'},
2194 'status': {'$ref': '#/definitions/EntityStatus'},
2195 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
2196 'type': 'array'},
2197 'uuid': {'type': 'string'}},
2198 'required': ['name',
2199 'uuid',
2200 'controller-uuid',
2201 'cloud-tag',
2202 'owner-tag',
2203 'life',
2204 'users',
2205 'machines',
2206 'sla',
2207 'agent-version'],
2208 'type': 'object'},
2209 'ModelInfoResult': {'additionalProperties': False,
2210 'properties': {'error': {'$ref': '#/definitions/Error'},
2211 'result': {'$ref': '#/definitions/ModelInfo'}},
2212 'type': 'object'},
2213 'ModelInfoResults': {'additionalProperties': False,
2214 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
2215 'type': 'array'}},
2216 'required': ['results'],
2217 'type': 'object'},
2218 'ModelMachineInfo': {'additionalProperties': False,
2219 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
2220 'has-vote': {'type': 'boolean'},
2221 'id': {'type': 'string'},
2222 'instance-id': {'type': 'string'},
2223 'status': {'type': 'string'},
2224 'wants-vote': {'type': 'boolean'}},
2225 'required': ['id'],
2226 'type': 'object'},
2227 'ModelMigrationStatus': {'additionalProperties': False,
2228 'properties': {'end': {'format': 'date-time',
2229 'type': 'string'},
2230 'start': {'format': 'date-time',
2231 'type': 'string'},
2232 'status': {'type': 'string'}},
2233 'required': ['status', 'start'],
2234 'type': 'object'},
2235 'ModelSLAInfo': {'additionalProperties': False,
2236 'properties': {'level': {'type': 'string'},
2237 'owner': {'type': 'string'}},
2238 'required': ['level', 'owner'],
2239 'type': 'object'},
2240 'ModelStatus': {'additionalProperties': False,
2241 'properties': {'application-count': {'type': 'integer'},
2242 'hosted-machine-count': {'type': 'integer'},
2243 'life': {'type': 'string'},
2244 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
2245 'type': 'array'},
2246 'model-tag': {'type': 'string'},
2247 'owner-tag': {'type': 'string'}},
2248 'required': ['model-tag',
2249 'life',
2250 'hosted-machine-count',
2251 'application-count',
2252 'owner-tag'],
2253 'type': 'object'},
2254 'ModelStatusResults': {'additionalProperties': False,
2255 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
2256 'type': 'array'}},
2257 'required': ['models'],
2258 'type': 'object'},
2259 'ModelUnsetKeys': {'additionalProperties': False,
2260 'properties': {'cloud-region': {'type': 'string'},
2261 'cloud-tag': {'type': 'string'},
2262 'keys': {'items': {'type': 'string'},
2263 'type': 'array'}},
2264 'required': ['keys'],
2265 'type': 'object'},
2266 'ModelUserInfo': {'additionalProperties': False,
2267 'properties': {'access': {'type': 'string'},
2268 'display-name': {'type': 'string'},
2269 'last-connection': {'format': 'date-time',
2270 'type': 'string'},
2271 'user': {'type': 'string'}},
2272 'required': ['user',
2273 'display-name',
2274 'last-connection',
2275 'access'],
2276 'type': 'object'},
2277 'ModifyModelAccess': {'additionalProperties': False,
2278 'properties': {'access': {'type': 'string'},
2279 'action': {'type': 'string'},
2280 'model-tag': {'type': 'string'},
2281 'user-tag': {'type': 'string'}},
2282 'required': ['user-tag',
2283 'action',
2284 'access',
2285 'model-tag'],
2286 'type': 'object'},
2287 'ModifyModelAccessRequest': {'additionalProperties': False,
2288 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
2289 'type': 'array'}},
2290 'required': ['changes'],
2291 'type': 'object'},
2292 'Number': {'additionalProperties': False,
2293 'properties': {'Build': {'type': 'integer'},
2294 'Major': {'type': 'integer'},
2295 'Minor': {'type': 'integer'},
2296 'Patch': {'type': 'integer'},
2297 'Tag': {'type': 'string'}},
2298 'required': ['Major',
2299 'Minor',
2300 'Tag',
2301 'Patch',
2302 'Build'],
2303 'type': 'object'},
2304 'RegionDefaults': {'additionalProperties': False,
2305 'properties': {'region-name': {'type': 'string'},
2306 'value': {'additionalProperties': True,
2307 'type': 'object'}},
2308 'required': ['region-name', 'value'],
2309 'type': 'object'},
2310 'SetModelDefaults': {'additionalProperties': False,
2311 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
2312 'type': 'array'}},
2313 'required': ['config'],
2314 'type': 'object'},
2315 'StringResult': {'additionalProperties': False,
2316 'properties': {'error': {'$ref': '#/definitions/Error'},
2317 'result': {'type': 'string'}},
2318 'required': ['result'],
2319 'type': 'object'},
2320 'StringResults': {'additionalProperties': False,
2321 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
2322 'type': 'array'}},
2323 'required': ['results'],
2324 'type': 'object'},
2325 'UnsetModelDefaults': {'additionalProperties': False,
2326 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
2327 'type': 'array'}},
2328 'required': ['keys'],
2329 'type': 'object'},
2330 'UserModel': {'additionalProperties': False,
2331 'properties': {'last-connection': {'format': 'date-time',
2332 'type': 'string'},
2333 'model': {'$ref': '#/definitions/Model'}},
2334 'required': ['model', 'last-connection'],
2335 'type': 'object'},
2336 'UserModelList': {'additionalProperties': False,
2337 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
2338 'type': 'array'}},
2339 'required': ['user-models'],
2340 'type': 'object'}},
2341 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
2342 'Result': {'$ref': '#/definitions/ModelInfo'}},
2343 'type': 'object'},
2344 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2345 'Result': {'$ref': '#/definitions/ErrorResults'}},
2346 'type': 'object'},
2347 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/DumpModelRequest'},
2348 'Result': {'$ref': '#/definitions/StringResults'}},
2349 'type': 'object'},
2350 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2351 'Result': {'$ref': '#/definitions/MapResults'}},
2352 'type': 'object'},
2353 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
2354 'Result': {'$ref': '#/definitions/UserModelList'}},
2355 'type': 'object'},
2356 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
2357 'type': 'object'},
2358 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2359 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
2360 'type': 'object'},
2361 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
2362 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
2363 'type': 'object'},
2364 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
2365 'Result': {'$ref': '#/definitions/ErrorResults'}},
2366 'type': 'object'},
2367 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
2368 'Result': {'$ref': '#/definitions/ErrorResults'}},
2369 'type': 'object'},
2370 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
2371 'Result': {'$ref': '#/definitions/ErrorResults'}},
2372 'type': 'object'}},
2373 'type': 'object'}
2374
2375
2376 @ReturnMapping(ModelInfo)
2377 async def CreateModel(self, cloud_tag, config, credential, name, owner_tag, region):
2378 '''
2379 cloud_tag : str
2380 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2381 credential : str
2382 name : str
2383 owner_tag : str
2384 region : str
2385 Returns -> typing.Union[_ForwardRef('Number'), _ForwardRef('ModelMigrationStatus'), _ForwardRef('ModelSLAInfo'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
2386 '''
2387 # map input types to rpc msg
2388 _params = dict()
2389 msg = dict(type='ModelManager', request='CreateModel', version=3, params=_params)
2390 _params['cloud-tag'] = cloud_tag
2391 _params['config'] = config
2392 _params['credential'] = credential
2393 _params['name'] = name
2394 _params['owner-tag'] = owner_tag
2395 _params['region'] = region