Get everything working on juju-2.0beta11
[osm/N2VC.git] / juju / client / _client.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
6
7 class Action(Type):
8 _toSchema = {'name': 'name', 'receiver': 'receiver', 'parameters': 'parameters', 'tag': 'tag'}
9 _toPy = {'name': 'name', 'receiver': 'receiver', 'parameters': 'parameters', 'tag': 'tag'}
10 def __init__(self, name=None, parameters=None, receiver=None, tag=None):
11 '''
12 name : str
13 parameters : typing.Mapping[str, typing.Any]
14 receiver : str
15 tag : str
16 '''
17 self.name = name
18 self.parameters = parameters
19 self.receiver = receiver
20 self.tag = tag
21
22
23 class ActionResult(Type):
24 _toSchema = {'started': 'started', 'error': 'error', 'action': 'action', 'enqueued': 'enqueued', 'status': 'status', 'completed': 'completed', 'message': 'message', 'output': 'output'}
25 _toPy = {'started': 'started', 'error': 'error', 'action': 'action', 'enqueued': 'enqueued', 'status': 'status', 'completed': 'completed', 'message': 'message', 'output': 'output'}
26 def __init__(self, action=None, completed=None, enqueued=None, error=None, message=None, output=None, started=None, status=None):
27 '''
28 action : Action
29 completed : str
30 enqueued : str
31 error : Error
32 message : str
33 output : typing.Mapping[str, typing.Any]
34 started : str
35 status : str
36 '''
37 self.action = Action.from_json(action) if action else None
38 self.completed = completed
39 self.enqueued = enqueued
40 self.error = Error.from_json(error) if error else None
41 self.message = message
42 self.output = output
43 self.started = started
44 self.status = status
45
46
47 class ActionResults(Type):
48 _toSchema = {'results': 'results'}
49 _toPy = {'results': 'results'}
50 def __init__(self, results=None):
51 '''
52 results : typing.Sequence[~ActionResult]
53 '''
54 self.results = [ActionResult.from_json(o) for o in results or []]
55
56
57 class ActionSpec(Type):
58 _toSchema = {'params': 'params', 'description': 'description'}
59 _toPy = {'params': 'params', 'description': 'description'}
60 def __init__(self, description=None, params=None):
61 '''
62 description : str
63 params : typing.Mapping[str, typing.Any]
64 '''
65 self.description = description
66 self.params = params
67
68
69 class Actions(Type):
70 _toSchema = {'actions': 'actions'}
71 _toPy = {'actions': 'actions'}
72 def __init__(self, actions=None):
73 '''
74 actions : typing.Sequence[~Action]
75 '''
76 self.actions = [Action.from_json(o) for o in actions or []]
77
78
79 class ActionsByName(Type):
80 _toSchema = {'name': 'name', 'error': 'error', 'actions': 'actions'}
81 _toPy = {'name': 'name', 'error': 'error', 'actions': 'actions'}
82 def __init__(self, actions=None, error=None, name=None):
83 '''
84 actions : typing.Sequence[~ActionResult]
85 error : Error
86 name : str
87 '''
88 self.actions = [ActionResult.from_json(o) for o in actions or []]
89 self.error = Error.from_json(error) if error else None
90 self.name = name
91
92
93 class ActionsByNames(Type):
94 _toSchema = {'actions': 'actions'}
95 _toPy = {'actions': 'actions'}
96 def __init__(self, actions=None):
97 '''
98 actions : typing.Sequence[~ActionsByName]
99 '''
100 self.actions = [ActionsByName.from_json(o) for o in actions or []]
101
102
103 class ActionsByReceiver(Type):
104 _toSchema = {'error': 'error', 'receiver': 'receiver', 'actions': 'actions'}
105 _toPy = {'error': 'error', 'receiver': 'receiver', 'actions': 'actions'}
106 def __init__(self, actions=None, error=None, receiver=None):
107 '''
108 actions : typing.Sequence[~ActionResult]
109 error : Error
110 receiver : str
111 '''
112 self.actions = [ActionResult.from_json(o) for o in actions or []]
113 self.error = Error.from_json(error) if error else None
114 self.receiver = receiver
115
116
117 class ActionsByReceivers(Type):
118 _toSchema = {'actions': 'actions'}
119 _toPy = {'actions': 'actions'}
120 def __init__(self, actions=None):
121 '''
122 actions : typing.Sequence[~ActionsByReceiver]
123 '''
124 self.actions = [ActionsByReceiver.from_json(o) for o in actions or []]
125
126
127 class ApplicationCharmActionsResult(Type):
128 _toSchema = {'error': 'error', 'actions': 'actions', 'application_tag': 'application-tag'}
129 _toPy = {'error': 'error', 'actions': 'actions', 'application-tag': 'application_tag'}
130 def __init__(self, actions=None, application_tag=None, error=None):
131 '''
132 actions : typing.Mapping[str, ~ActionSpec]
133 application_tag : str
134 error : Error
135 '''
136 self.actions = {k: ActionSpec.from_json(v) for k, v in (actions or dict()).items()}
137 self.application_tag = application_tag
138 self.error = Error.from_json(error) if error else None
139
140
141 class ApplicationsCharmActionsResults(Type):
142 _toSchema = {'results': 'results'}
143 _toPy = {'results': 'results'}
144 def __init__(self, results=None):
145 '''
146 results : typing.Sequence[~ApplicationCharmActionsResult]
147 '''
148 self.results = [ApplicationCharmActionsResult.from_json(o) for o in results or []]
149
150
151 class Entities(Type):
152 _toSchema = {'entities': 'entities'}
153 _toPy = {'entities': 'entities'}
154 def __init__(self, entities=None):
155 '''
156 entities : typing.Sequence[~Entity]
157 '''
158 self.entities = [Entity.from_json(o) for o in entities or []]
159
160
161 class Entity(Type):
162 _toSchema = {'tag': 'tag'}
163 _toPy = {'tag': 'tag'}
164 def __init__(self, tag=None):
165 '''
166 tag : str
167 '''
168 self.tag = tag
169
170
171 class Error(Type):
172 _toSchema = {'code': 'code', 'info': 'info', 'message': 'message'}
173 _toPy = {'code': 'code', 'info': 'info', 'message': 'message'}
174 def __init__(self, code=None, info=None, message=None):
175 '''
176 code : str
177 info : ErrorInfo
178 message : str
179 '''
180 self.code = code
181 self.info = ErrorInfo.from_json(info) if info else None
182 self.message = message
183
184
185 class ErrorInfo(Type):
186 _toSchema = {'macaroon_path': 'macaroon-path', 'macaroon': 'macaroon'}
187 _toPy = {'macaroon-path': 'macaroon_path', 'macaroon': 'macaroon'}
188 def __init__(self, macaroon=None, macaroon_path=None):
189 '''
190 macaroon : Macaroon
191 macaroon_path : str
192 '''
193 self.macaroon = Macaroon.from_json(macaroon) if macaroon else None
194 self.macaroon_path = macaroon_path
195
196
197 class FindActionsByNames(Type):
198 _toSchema = {'names': 'names'}
199 _toPy = {'names': 'names'}
200 def __init__(self, names=None):
201 '''
202 names : typing.Sequence[str]
203 '''
204 self.names = names
205
206
207 class FindTags(Type):
208 _toSchema = {'prefixes': 'prefixes'}
209 _toPy = {'prefixes': 'prefixes'}
210 def __init__(self, prefixes=None):
211 '''
212 prefixes : typing.Sequence[str]
213 '''
214 self.prefixes = prefixes
215
216
217 class FindTagsResults(Type):
218 _toSchema = {'matches': 'matches'}
219 _toPy = {'matches': 'matches'}
220 def __init__(self, matches=None):
221 '''
222 matches : typing.Sequence[~Entity]
223 '''
224 self.matches = [Entity.from_json(o) for o in matches or []]
225
226
227 class Macaroon(Type):
228 _toSchema = {}
229 _toPy = {}
230 def __init__(self):
231 '''
232
233 '''
234 pass
235
236
237 class RunParams(Type):
238 _toSchema = {'machines': 'machines', 'units': 'units', 'commands': 'commands', 'timeout': 'timeout', 'applications': 'applications'}
239 _toPy = {'machines': 'machines', 'units': 'units', 'commands': 'commands', 'timeout': 'timeout', 'applications': 'applications'}
240 def __init__(self, applications=None, commands=None, machines=None, timeout=None, units=None):
241 '''
242 applications : typing.Sequence[str]
243 commands : str
244 machines : typing.Sequence[str]
245 timeout : int
246 units : typing.Sequence[str]
247 '''
248 self.applications = applications
249 self.commands = commands
250 self.machines = machines
251 self.timeout = timeout
252 self.units = units
253
254
255 class AgentGetEntitiesResult(Type):
256 _toSchema = {'jobs': 'jobs', 'error': 'error', 'life': 'life', 'container_type': 'container-type'}
257 _toPy = {'jobs': 'jobs', 'error': 'error', 'life': 'life', 'container-type': 'container_type'}
258 def __init__(self, container_type=None, error=None, jobs=None, life=None):
259 '''
260 container_type : str
261 error : Error
262 jobs : typing.Sequence[str]
263 life : str
264 '''
265 self.container_type = container_type
266 self.error = Error.from_json(error) if error else None
267 self.jobs = jobs
268 self.life = life
269
270
271 class AgentGetEntitiesResults(Type):
272 _toSchema = {'entities': 'entities'}
273 _toPy = {'entities': 'entities'}
274 def __init__(self, entities=None):
275 '''
276 entities : typing.Sequence[~AgentGetEntitiesResult]
277 '''
278 self.entities = [AgentGetEntitiesResult.from_json(o) for o in entities or []]
279
280
281 class ControllerConfigResult(Type):
282 _toSchema = {'config': 'config'}
283 _toPy = {'config': 'config'}
284 def __init__(self, config=None):
285 '''
286 config : typing.Mapping[str, typing.Any]
287 '''
288 self.config = config
289
290
291 class EntityPassword(Type):
292 _toSchema = {'password': 'password', 'tag': 'tag'}
293 _toPy = {'password': 'password', 'tag': 'tag'}
294 def __init__(self, password=None, tag=None):
295 '''
296 password : str
297 tag : str
298 '''
299 self.password = password
300 self.tag = tag
301
302
303 class EntityPasswords(Type):
304 _toSchema = {'changes': 'changes'}
305 _toPy = {'changes': 'changes'}
306 def __init__(self, changes=None):
307 '''
308 changes : typing.Sequence[~EntityPassword]
309 '''
310 self.changes = [EntityPassword.from_json(o) for o in changes or []]
311
312
313 class ErrorResult(Type):
314 _toSchema = {'code': 'code', 'info': 'info', 'message': 'message'}
315 _toPy = {'code': 'code', 'info': 'info', 'message': 'message'}
316 def __init__(self, code=None, info=None, message=None):
317 '''
318 code : str
319 info : ErrorInfo
320 message : str
321 '''
322 self.code = code
323 self.info = ErrorInfo.from_json(info) if info else None
324 self.message = message
325
326
327 class ErrorResults(Type):
328 _toSchema = {'results': 'results'}
329 _toPy = {'results': 'results'}
330 def __init__(self, results=None):
331 '''
332 results : typing.Sequence[~ErrorResult]
333 '''
334 self.results = [ErrorResult.from_json(o) for o in results or []]
335
336
337 class IsMasterResult(Type):
338 _toSchema = {'master': 'master'}
339 _toPy = {'master': 'master'}
340 def __init__(self, master=None):
341 '''
342 master : bool
343 '''
344 self.master = master
345
346
347 class ModelConfigResult(Type):
348 _toSchema = {'config': 'config'}
349 _toPy = {'config': 'config'}
350 def __init__(self, config=None):
351 '''
352 config : typing.Mapping[str, typing.Any]
353 '''
354 self.config = config
355
356
357 class NotifyWatchResult(Type):
358 _toSchema = {'error': 'error', 'notifywatcherid': 'NotifyWatcherId'}
359 _toPy = {'error': 'error', 'NotifyWatcherId': 'notifywatcherid'}
360 def __init__(self, notifywatcherid=None, error=None):
361 '''
362 notifywatcherid : str
363 error : Error
364 '''
365 self.notifywatcherid = notifywatcherid
366 self.error = Error.from_json(error) if error else None
367
368
369 class StateServingInfo(Type):
370 _toSchema = {'private_key': 'private-key', 'cert': 'cert', 'shared_secret': 'shared-secret', 'api_port': 'api-port', 'state_port': 'state-port', 'system_identity': 'system-identity', 'ca_private_key': 'ca-private-key'}
371 _toPy = {'api-port': 'api_port', 'cert': 'cert', 'shared-secret': 'shared_secret', 'ca-private-key': 'ca_private_key', 'state-port': 'state_port', 'system-identity': 'system_identity', 'private-key': 'private_key'}
372 def __init__(self, api_port=None, ca_private_key=None, cert=None, private_key=None, shared_secret=None, state_port=None, system_identity=None):
373 '''
374 api_port : int
375 ca_private_key : str
376 cert : str
377 private_key : str
378 shared_secret : str
379 state_port : int
380 system_identity : str
381 '''
382 self.api_port = api_port
383 self.ca_private_key = ca_private_key
384 self.cert = cert
385 self.private_key = private_key
386 self.shared_secret = shared_secret
387 self.state_port = state_port
388 self.system_identity = system_identity
389
390
391 class AllWatcherNextResults(Type):
392 _toSchema = {'deltas': 'deltas'}
393 _toPy = {'deltas': 'deltas'}
394 def __init__(self, deltas=None):
395 '''
396 deltas : typing.Sequence[~Delta]
397 '''
398 self.deltas = [Delta.from_json(o) for o in deltas or []]
399
400
401 class Delta(Type):
402 _toSchema = {'removed': 'removed', 'entity': 'entity'}
403 _toPy = {'removed': 'removed', 'entity': 'entity'}
404 def __init__(self, entity=None, removed=None):
405 '''
406 entity : typing.Mapping[str, typing.Any]
407 removed : bool
408 '''
409 self.entity = entity
410 self.removed = removed
411
412
413 class AnnotationsGetResult(Type):
414 _toSchema = {'error': 'error', 'annotations': 'annotations', 'entity': 'entity'}
415 _toPy = {'error': 'error', 'annotations': 'annotations', 'entity': 'entity'}
416 def __init__(self, annotations=None, entity=None, error=None):
417 '''
418 annotations : typing.Mapping[str, str]
419 entity : str
420 error : ErrorResult
421 '''
422 self.annotations = annotations
423 self.entity = entity
424 self.error = ErrorResult.from_json(error) if error else None
425
426
427 class AnnotationsGetResults(Type):
428 _toSchema = {'results': 'results'}
429 _toPy = {'results': 'results'}
430 def __init__(self, results=None):
431 '''
432 results : typing.Sequence[~AnnotationsGetResult]
433 '''
434 self.results = [AnnotationsGetResult.from_json(o) for o in results or []]
435
436
437 class AnnotationsSet(Type):
438 _toSchema = {'annotations': 'annotations'}
439 _toPy = {'annotations': 'annotations'}
440 def __init__(self, annotations=None):
441 '''
442 annotations : typing.Sequence[~EntityAnnotations]
443 '''
444 self.annotations = [EntityAnnotations.from_json(o) for o in annotations or []]
445
446
447 class EntityAnnotations(Type):
448 _toSchema = {'annotations': 'annotations', 'entity': 'entity'}
449 _toPy = {'annotations': 'annotations', 'entity': 'entity'}
450 def __init__(self, annotations=None, entity=None):
451 '''
452 annotations : typing.Mapping[str, str]
453 entity : str
454 '''
455 self.annotations = annotations
456 self.entity = entity
457
458
459 class AddApplicationUnits(Type):
460 _toSchema = {'num_units': 'num-units', 'placement': 'placement', 'application': 'application'}
461 _toPy = {'num-units': 'num_units', 'placement': 'placement', 'application': 'application'}
462 def __init__(self, application=None, num_units=None, placement=None):
463 '''
464 application : str
465 num_units : int
466 placement : typing.Sequence[~Placement]
467 '''
468 self.application = application
469 self.num_units = num_units
470 self.placement = [Placement.from_json(o) for o in placement or []]
471
472
473 class AddApplicationUnitsResults(Type):
474 _toSchema = {'units': 'units'}
475 _toPy = {'units': 'units'}
476 def __init__(self, units=None):
477 '''
478 units : typing.Sequence[str]
479 '''
480 self.units = units
481
482
483 class AddRelation(Type):
484 _toSchema = {'endpoints': 'endpoints'}
485 _toPy = {'endpoints': 'endpoints'}
486 def __init__(self, endpoints=None):
487 '''
488 endpoints : typing.Sequence[str]
489 '''
490 self.endpoints = endpoints
491
492
493 class AddRelationResults(Type):
494 _toSchema = {'endpoints': 'endpoints'}
495 _toPy = {'endpoints': 'endpoints'}
496 def __init__(self, endpoints=None):
497 '''
498 endpoints : typing.Mapping[str, ~CharmRelation]
499 '''
500 self.endpoints = {k: CharmRelation.from_json(v) for k, v in (endpoints or dict()).items()}
501
502
503 class ApplicationCharmRelations(Type):
504 _toSchema = {'application': 'application'}
505 _toPy = {'application': 'application'}
506 def __init__(self, application=None):
507 '''
508 application : str
509 '''
510 self.application = application
511
512
513 class ApplicationCharmRelationsResults(Type):
514 _toSchema = {'charm_relations': 'charm-relations'}
515 _toPy = {'charm-relations': 'charm_relations'}
516 def __init__(self, charm_relations=None):
517 '''
518 charm_relations : typing.Sequence[str]
519 '''
520 self.charm_relations = charm_relations
521
522
523 class ApplicationDeploy(Type):
524 _toSchema = {'placement': 'placement', 'charm_url': 'charm-url', 'series': 'series', 'config_yaml': 'config-yaml', 'storage': 'storage', 'channel': 'channel', 'application': 'application', 'config': 'config', 'constraints': 'constraints', 'num_units': 'num-units', 'resources': 'resources', 'endpoint_bindings': 'endpoint-bindings'}
525 _toPy = {'placement': 'placement', 'endpoint-bindings': 'endpoint_bindings', 'num-units': 'num_units', 'series': 'series', 'storage': 'storage', 'channel': 'channel', 'application': 'application', 'charm-url': 'charm_url', 'constraints': 'constraints', 'config-yaml': 'config_yaml', 'resources': 'resources', 'config': 'config'}
526 def __init__(self, application=None, channel=None, charm_url=None, config=None, config_yaml=None, constraints=None, endpoint_bindings=None, num_units=None, placement=None, resources=None, series=None, storage=None):
527 '''
528 application : str
529 channel : str
530 charm_url : str
531 config : typing.Mapping[str, str]
532 config_yaml : str
533 constraints : Value
534 endpoint_bindings : typing.Mapping[str, str]
535 num_units : int
536 placement : typing.Sequence[~Placement]
537 resources : typing.Mapping[str, str]
538 series : str
539 storage : typing.Mapping[str, ~Constraints]
540 '''
541 self.application = application
542 self.channel = channel
543 self.charm_url = charm_url
544 self.config = config
545 self.config_yaml = config_yaml
546 self.constraints = Value.from_json(constraints) if constraints else None
547 self.endpoint_bindings = endpoint_bindings
548 self.num_units = num_units
549 self.placement = [Placement.from_json(o) for o in placement or []]
550 self.resources = resources
551 self.series = series
552 self.storage = {k: Constraints.from_json(v) for k, v in (storage or dict()).items()}
553
554
555 class ApplicationDestroy(Type):
556 _toSchema = {'application': 'application'}
557 _toPy = {'application': 'application'}
558 def __init__(self, application=None):
559 '''
560 application : str
561 '''
562 self.application = application
563
564
565 class ApplicationExpose(Type):
566 _toSchema = {'application': 'application'}
567 _toPy = {'application': 'application'}
568 def __init__(self, application=None):
569 '''
570 application : str
571 '''
572 self.application = application
573
574
575 class ApplicationGet(Type):
576 _toSchema = {'application': 'application'}
577 _toPy = {'application': 'application'}
578 def __init__(self, application=None):
579 '''
580 application : str
581 '''
582 self.application = application
583
584
585 class ApplicationGetResults(Type):
586 _toSchema = {'application': 'application', 'config': 'config', 'constraints': 'constraints', 'charm': 'charm'}
587 _toPy = {'application': 'application', 'config': 'config', 'constraints': 'constraints', 'charm': 'charm'}
588 def __init__(self, application=None, charm=None, config=None, constraints=None):
589 '''
590 application : str
591 charm : str
592 config : typing.Mapping[str, typing.Any]
593 constraints : Value
594 '''
595 self.application = application
596 self.charm = charm
597 self.config = config
598 self.constraints = Value.from_json(constraints) if constraints else None
599
600
601 class ApplicationMetricCredential(Type):
602 _toSchema = {'metrics_credentials': 'metrics-credentials', 'application': 'application'}
603 _toPy = {'application': 'application', 'metrics-credentials': 'metrics_credentials'}
604 def __init__(self, application=None, metrics_credentials=None):
605 '''
606 application : str
607 metrics_credentials : typing.Sequence[int]
608 '''
609 self.application = application
610 self.metrics_credentials = metrics_credentials
611
612
613 class ApplicationMetricCredentials(Type):
614 _toSchema = {'creds': 'creds'}
615 _toPy = {'creds': 'creds'}
616 def __init__(self, creds=None):
617 '''
618 creds : typing.Sequence[~ApplicationMetricCredential]
619 '''
620 self.creds = [ApplicationMetricCredential.from_json(o) for o in creds or []]
621
622
623 class ApplicationSet(Type):
624 _toSchema = {'options': 'options', 'application': 'application'}
625 _toPy = {'options': 'options', 'application': 'application'}
626 def __init__(self, application=None, options=None):
627 '''
628 application : str
629 options : typing.Mapping[str, str]
630 '''
631 self.application = application
632 self.options = options
633
634
635 class ApplicationSetCharm(Type):
636 _toSchema = {'channel': 'channel', 'force_series': 'force-series', 'application': 'application', 'charm_url': 'charm-url', 'resource_ids': 'resource-ids', 'force_units': 'force-units'}
637 _toPy = {'channel': 'channel', 'force-units': 'force_units', 'application': 'application', 'charm-url': 'charm_url', 'resource-ids': 'resource_ids', 'force-series': 'force_series'}
638 def __init__(self, application=None, channel=None, charm_url=None, force_series=None, force_units=None, resource_ids=None):
639 '''
640 application : str
641 channel : str
642 charm_url : str
643 force_series : bool
644 force_units : bool
645 resource_ids : typing.Mapping[str, str]
646 '''
647 self.application = application
648 self.channel = channel
649 self.charm_url = charm_url
650 self.force_series = force_series
651 self.force_units = force_units
652 self.resource_ids = resource_ids
653
654
655 class ApplicationUnexpose(Type):
656 _toSchema = {'application': 'application'}
657 _toPy = {'application': 'application'}
658 def __init__(self, application=None):
659 '''
660 application : str
661 '''
662 self.application = application
663
664
665 class ApplicationUnset(Type):
666 _toSchema = {'options': 'options', 'application': 'application'}
667 _toPy = {'options': 'options', 'application': 'application'}
668 def __init__(self, application=None, options=None):
669 '''
670 application : str
671 options : typing.Sequence[str]
672 '''
673 self.application = application
674 self.options = options
675
676
677 class ApplicationUpdate(Type):
678 _toSchema = {'force_series': 'force-series', 'application': 'application', 'charm_url': 'charm-url', 'constraints': 'constraints', 'min_units': 'min-units', 'settings': 'settings', 'settings_yaml': 'settings-yaml', 'force_charm_url': 'force-charm-url'}
679 _toPy = {'min-units': 'min_units', 'force-charm-url': 'force_charm_url', 'charm-url': 'charm_url', 'constraints': 'constraints', 'settings-yaml': 'settings_yaml', 'application': 'application', 'settings': 'settings', 'force-series': 'force_series'}
680 def __init__(self, application=None, charm_url=None, constraints=None, force_charm_url=None, force_series=None, min_units=None, settings=None, settings_yaml=None):
681 '''
682 application : str
683 charm_url : str
684 constraints : Value
685 force_charm_url : bool
686 force_series : bool
687 min_units : int
688 settings : typing.Mapping[str, str]
689 settings_yaml : str
690 '''
691 self.application = application
692 self.charm_url = charm_url
693 self.constraints = Value.from_json(constraints) if constraints else None
694 self.force_charm_url = force_charm_url
695 self.force_series = force_series
696 self.min_units = min_units
697 self.settings = settings
698 self.settings_yaml = settings_yaml
699
700
701 class ApplicationsDeploy(Type):
702 _toSchema = {'applications': 'applications'}
703 _toPy = {'applications': 'applications'}
704 def __init__(self, applications=None):
705 '''
706 applications : typing.Sequence[~ApplicationDeploy]
707 '''
708 self.applications = [ApplicationDeploy.from_json(o) for o in applications or []]
709
710
711 class CharmRelation(Type):
712 _toSchema = {'name': 'name', 'limit': 'limit', 'scope': 'scope', 'interface': 'interface', 'optional': 'optional', 'role': 'role'}
713 _toPy = {'name': 'name', 'limit': 'limit', 'scope': 'scope', 'interface': 'interface', 'optional': 'optional', 'role': 'role'}
714 def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None):
715 '''
716 interface : str
717 limit : int
718 name : str
719 optional : bool
720 role : str
721 scope : str
722 '''
723 self.interface = interface
724 self.limit = limit
725 self.name = name
726 self.optional = optional
727 self.role = role
728 self.scope = scope
729
730
731 class Constraints(Type):
732 _toSchema = {'size': 'Size', 'count': 'Count', 'pool': 'Pool'}
733 _toPy = {'Pool': 'pool', 'Size': 'size', 'Count': 'count'}
734 def __init__(self, count=None, pool=None, size=None):
735 '''
736 count : int
737 pool : str
738 size : int
739 '''
740 self.count = count
741 self.pool = pool
742 self.size = size
743
744
745 class DestroyApplicationUnits(Type):
746 _toSchema = {'unit_names': 'unit-names'}
747 _toPy = {'unit-names': 'unit_names'}
748 def __init__(self, unit_names=None):
749 '''
750 unit_names : typing.Sequence[str]
751 '''
752 self.unit_names = unit_names
753
754
755 class DestroyRelation(Type):
756 _toSchema = {'endpoints': 'endpoints'}
757 _toPy = {'endpoints': 'endpoints'}
758 def __init__(self, endpoints=None):
759 '''
760 endpoints : typing.Sequence[str]
761 '''
762 self.endpoints = endpoints
763
764
765 class GetApplicationConstraints(Type):
766 _toSchema = {'application': 'application'}
767 _toPy = {'application': 'application'}
768 def __init__(self, application=None):
769 '''
770 application : str
771 '''
772 self.application = application
773
774
775 class GetConstraintsResults(Type):
776 _toSchema = {'tags': 'tags', 'cpu_cores': 'cpu-cores', 'arch': 'arch', 'container': 'container', 'root_disk': 'root-disk', 'mem': 'mem', 'cpu_power': 'cpu-power', 'instance_type': 'instance-type', 'spaces': 'spaces', 'virt_type': 'virt-type'}
777 _toPy = {'instance-type': 'instance_type', 'cpu-cores': 'cpu_cores', 'tags': 'tags', 'arch': 'arch', 'container': 'container', 'mem': 'mem', 'root-disk': 'root_disk', 'spaces': 'spaces', 'cpu-power': 'cpu_power', 'virt-type': 'virt_type'}
778 def __init__(self, arch=None, container=None, cpu_cores=None, cpu_power=None, instance_type=None, mem=None, root_disk=None, spaces=None, tags=None, virt_type=None):
779 '''
780 arch : str
781 container : str
782 cpu_cores : int
783 cpu_power : int
784 instance_type : str
785 mem : int
786 root_disk : int
787 spaces : typing.Sequence[str]
788 tags : typing.Sequence[str]
789 virt_type : str
790 '''
791 self.arch = arch
792 self.container = container
793 self.cpu_cores = cpu_cores
794 self.cpu_power = cpu_power
795 self.instance_type = instance_type
796 self.mem = mem
797 self.root_disk = root_disk
798 self.spaces = spaces
799 self.tags = tags
800 self.virt_type = virt_type
801
802
803 class Placement(Type):
804 _toSchema = {'scope': 'scope', 'directive': 'directive'}
805 _toPy = {'scope': 'scope', 'directive': 'directive'}
806 def __init__(self, directive=None, scope=None):
807 '''
808 directive : str
809 scope : str
810 '''
811 self.directive = directive
812 self.scope = scope
813
814
815 class SetConstraints(Type):
816 _toSchema = {'application': 'application', 'constraints': 'constraints'}
817 _toPy = {'application': 'application', 'constraints': 'constraints'}
818 def __init__(self, application=None, constraints=None):
819 '''
820 application : str
821 constraints : Value
822 '''
823 self.application = application
824 self.constraints = Value.from_json(constraints) if constraints else None
825
826
827 class StringResult(Type):
828 _toSchema = {'error': 'error', 'result': 'result'}
829 _toPy = {'error': 'error', 'result': 'result'}
830 def __init__(self, error=None, result=None):
831 '''
832 error : Error
833 result : str
834 '''
835 self.error = Error.from_json(error) if error else None
836 self.result = result
837
838
839 class Value(Type):
840 _toSchema = {'tags': 'tags', 'cpu_cores': 'cpu-cores', 'arch': 'arch', 'container': 'container', 'root_disk': 'root-disk', 'mem': 'mem', 'cpu_power': 'cpu-power', 'instance_type': 'instance-type', 'spaces': 'spaces', 'virt_type': 'virt-type'}
841 _toPy = {'instance-type': 'instance_type', 'cpu-cores': 'cpu_cores', 'tags': 'tags', 'arch': 'arch', 'container': 'container', 'mem': 'mem', 'root-disk': 'root_disk', 'spaces': 'spaces', 'cpu-power': 'cpu_power', 'virt-type': 'virt_type'}
842 def __init__(self, arch=None, container=None, cpu_cores=None, cpu_power=None, instance_type=None, mem=None, root_disk=None, spaces=None, tags=None, virt_type=None):
843 '''
844 arch : str
845 container : str
846 cpu_cores : int
847 cpu_power : int
848 instance_type : str
849 mem : int
850 root_disk : int
851 spaces : typing.Sequence[str]
852 tags : typing.Sequence[str]
853 virt_type : str
854 '''
855 self.arch = arch
856 self.container = container
857 self.cpu_cores = cpu_cores
858 self.cpu_power = cpu_power
859 self.instance_type = instance_type
860 self.mem = mem
861 self.root_disk = root_disk
862 self.spaces = spaces
863 self.tags = tags
864 self.virt_type = virt_type
865
866
867 class StringsWatchResult(Type):
868 _toSchema = {'error': 'error', 'changes': 'changes', 'watcher_id': 'watcher-id'}
869 _toPy = {'error': 'error', 'changes': 'changes', 'watcher-id': 'watcher_id'}
870 def __init__(self, changes=None, error=None, watcher_id=None):
871 '''
872 changes : typing.Sequence[str]
873 error : Error
874 watcher_id : str
875 '''
876 self.changes = changes
877 self.error = Error.from_json(error) if error else None
878 self.watcher_id = watcher_id
879
880
881 class BackupsCreateArgs(Type):
882 _toSchema = {'notes': 'notes'}
883 _toPy = {'notes': 'notes'}
884 def __init__(self, notes=None):
885 '''
886 notes : str
887 '''
888 self.notes = notes
889
890
891 class BackupsInfoArgs(Type):
892 _toSchema = {'id_': 'id'}
893 _toPy = {'id': 'id_'}
894 def __init__(self, id_=None):
895 '''
896 id_ : str
897 '''
898 self.id_ = id_
899
900
901 class BackupsListArgs(Type):
902 _toSchema = {}
903 _toPy = {}
904 def __init__(self):
905 '''
906
907 '''
908 pass
909
910
911 class BackupsListResult(Type):
912 _toSchema = {'list_': 'list'}
913 _toPy = {'list': 'list_'}
914 def __init__(self, list_=None):
915 '''
916 list_ : typing.Sequence[~BackupsMetadataResult]
917 '''
918 self.list_ = [BackupsMetadataResult.from_json(o) for o in list_ or []]
919
920
921 class BackupsMetadataResult(Type):
922 _toSchema = {'version': 'version', 'id_': 'id', 'checksum': 'checksum', 'checksum_format': 'checksum-format', 'machine': 'machine', 'notes': 'notes', 'series': 'series', 'stored': 'stored', 'finished': 'finished', 'started': 'started', 'model': 'model', 'hostname': 'hostname', 'size': 'size', 'ca_cert': 'ca-cert', 'ca_private_key': 'ca-private-key'}
923 _toPy = {'ca-private-key': 'ca_private_key', 'checksum': 'checksum', 'machine': 'machine', 'id': 'id_', 'notes': 'notes', 'series': 'series', 'checksum-format': 'checksum_format', 'ca-cert': 'ca_cert', 'finished': 'finished', 'started': 'started', 'stored': 'stored', 'model': 'model', 'hostname': 'hostname', 'size': 'size', 'version': 'version'}
924 def __init__(self, ca_cert=None, ca_private_key=None, checksum=None, checksum_format=None, finished=None, hostname=None, id_=None, machine=None, model=None, notes=None, series=None, size=None, started=None, stored=None, version=None):
925 '''
926 ca_cert : str
927 ca_private_key : str
928 checksum : str
929 checksum_format : str
930 finished : str
931 hostname : str
932 id_ : str
933 machine : str
934 model : str
935 notes : str
936 series : str
937 size : int
938 started : str
939 stored : str
940 version : Number
941 '''
942 self.ca_cert = ca_cert
943 self.ca_private_key = ca_private_key
944 self.checksum = checksum
945 self.checksum_format = checksum_format
946 self.finished = finished
947 self.hostname = hostname
948 self.id_ = id_
949 self.machine = machine
950 self.model = model
951 self.notes = notes
952 self.series = series
953 self.size = size
954 self.started = started
955 self.stored = stored
956 self.version = Number.from_json(version) if version else None
957
958
959 class BackupsRemoveArgs(Type):
960 _toSchema = {'id_': 'id'}
961 _toPy = {'id': 'id_'}
962 def __init__(self, id_=None):
963 '''
964 id_ : str
965 '''
966 self.id_ = id_
967
968
969 class Number(Type):
970 _toSchema = {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'}
971 _toPy = {'Patch': 'patch', 'Major': 'major', 'Tag': 'tag', 'Minor': 'minor', 'Build': 'build'}
972 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
973 '''
974 build : int
975 major : int
976 minor : int
977 patch : int
978 tag : str
979 '''
980 self.build = build
981 self.major = major
982 self.minor = minor
983 self.patch = patch
984 self.tag = tag
985
986
987 class RestoreArgs(Type):
988 _toSchema = {'backup_id': 'backup-id'}
989 _toPy = {'backup-id': 'backup_id'}
990 def __init__(self, backup_id=None):
991 '''
992 backup_id : str
993 '''
994 self.backup_id = backup_id
995
996
997 class Block(Type):
998 _toSchema = {'id_': 'id', 'tag': 'tag', 'message': 'message', 'type_': 'type'}
999 _toPy = {'type': 'type_', 'id': 'id_', 'tag': 'tag', 'message': 'message'}
1000 def __init__(self, id_=None, message=None, tag=None, type_=None):
1001 '''
1002 id_ : str
1003 message : str
1004 tag : str
1005 type_ : str
1006 '''
1007 self.id_ = id_
1008 self.message = message
1009 self.tag = tag
1010 self.type_ = type_
1011
1012
1013 class BlockResult(Type):
1014 _toSchema = {'error': 'error', 'result': 'result'}
1015 _toPy = {'error': 'error', 'result': 'result'}
1016 def __init__(self, error=None, result=None):
1017 '''
1018 error : Error
1019 result : Block
1020 '''
1021 self.error = Error.from_json(error) if error else None
1022 self.result = Block.from_json(result) if result else None
1023
1024
1025 class BlockResults(Type):
1026 _toSchema = {'results': 'results'}
1027 _toPy = {'results': 'results'}
1028 def __init__(self, results=None):
1029 '''
1030 results : typing.Sequence[~BlockResult]
1031 '''
1032 self.results = [BlockResult.from_json(o) for o in results or []]
1033
1034
1035 class BlockSwitchParams(Type):
1036 _toSchema = {'type_': 'type', 'message': 'message'}
1037 _toPy = {'type': 'type_', 'message': 'message'}
1038 def __init__(self, message=None, type_=None):
1039 '''
1040 message : str
1041 type_ : str
1042 '''
1043 self.message = message
1044 self.type_ = type_
1045
1046
1047 class CharmActionSpec(Type):
1048 _toSchema = {'params': 'params', 'description': 'description'}
1049 _toPy = {'params': 'params', 'description': 'description'}
1050 def __init__(self, description=None, params=None):
1051 '''
1052 description : str
1053 params : typing.Mapping[str, typing.Any]
1054 '''
1055 self.description = description
1056 self.params = params
1057
1058
1059 class CharmActions(Type):
1060 _toSchema = {'specs': 'specs'}
1061 _toPy = {'specs': 'specs'}
1062 def __init__(self, specs=None):
1063 '''
1064 specs : typing.Mapping[str, ~CharmActionSpec]
1065 '''
1066 self.specs = {k: CharmActionSpec.from_json(v) for k, v in (specs or dict()).items()}
1067
1068
1069 class CharmInfo(Type):
1070 _toSchema = {'metrics': 'metrics', 'actions': 'actions', 'config': 'config', 'url': 'url', 'revision': 'revision', 'meta': 'meta'}
1071 _toPy = {'metrics': 'metrics', 'actions': 'actions', 'config': 'config', 'url': 'url', 'revision': 'revision', 'meta': 'meta'}
1072 def __init__(self, actions=None, config=None, meta=None, metrics=None, revision=None, url=None):
1073 '''
1074 actions : CharmActions
1075 config : typing.Mapping[str, ~CharmOption]
1076 meta : CharmMeta
1077 metrics : CharmMetrics
1078 revision : int
1079 url : str
1080 '''
1081 self.actions = CharmActions.from_json(actions) if actions else None
1082 self.config = {k: CharmOption.from_json(v) for k, v in (config or dict()).items()}
1083 self.meta = CharmMeta.from_json(meta) if meta else None
1084 self.metrics = CharmMetrics.from_json(metrics) if metrics else None
1085 self.revision = revision
1086 self.url = url
1087
1088
1089 class CharmMeta(Type):
1090 _toSchema = {'name': 'name', 'tags': 'tags', 'subordinate': 'subordinate', 'series': 'series', 'provides': 'provides', 'peers': 'peers', 'storage': 'storage', 'terms': 'terms', 'categories': 'categories', 'description': 'description', 'min_juju_version': 'min-juju-version', 'summary': 'summary', 'resources': 'resources', 'extra_bindings': 'extra-bindings', 'requires': 'requires', 'payload_classes': 'payload-classes'}
1091 _toPy = {'name': 'name', 'payload-classes': 'payload_classes', 'tags': 'tags', 'min-juju-version': 'min_juju_version', 'subordinate': 'subordinate', 'series': 'series', 'provides': 'provides', 'peers': 'peers', 'storage': 'storage', 'terms': 'terms', 'extra-bindings': 'extra_bindings', 'categories': 'categories', 'description': 'description', 'summary': 'summary', 'resources': 'resources', 'requires': 'requires'}
1092 def __init__(self, categories=None, description=None, extra_bindings=None, min_juju_version=None, name=None, payload_classes=None, peers=None, provides=None, requires=None, resources=None, series=None, storage=None, subordinate=None, summary=None, tags=None, terms=None):
1093 '''
1094 categories : typing.Sequence[str]
1095 description : str
1096 extra_bindings : typing.Mapping[str, str]
1097 min_juju_version : str
1098 name : str
1099 payload_classes : typing.Mapping[str, ~CharmPayloadClass]
1100 peers : typing.Mapping[str, ~CharmRelation]
1101 provides : typing.Mapping[str, ~CharmRelation]
1102 requires : typing.Mapping[str, ~CharmRelation]
1103 resources : typing.Mapping[str, ~CharmResourceMeta]
1104 series : typing.Sequence[str]
1105 storage : typing.Mapping[str, ~CharmStorage]
1106 subordinate : bool
1107 summary : str
1108 tags : typing.Sequence[str]
1109 terms : typing.Sequence[str]
1110 '''
1111 self.categories = categories
1112 self.description = description
1113 self.extra_bindings = extra_bindings
1114 self.min_juju_version = min_juju_version
1115 self.name = name
1116 self.payload_classes = {k: CharmPayloadClass.from_json(v) for k, v in (payload_classes or dict()).items()}
1117 self.peers = {k: CharmRelation.from_json(v) for k, v in (peers or dict()).items()}
1118 self.provides = {k: CharmRelation.from_json(v) for k, v in (provides or dict()).items()}
1119 self.requires = {k: CharmRelation.from_json(v) for k, v in (requires or dict()).items()}
1120 self.resources = {k: CharmResourceMeta.from_json(v) for k, v in (resources or dict()).items()}
1121 self.series = series
1122 self.storage = {k: CharmStorage.from_json(v) for k, v in (storage or dict()).items()}
1123 self.subordinate = subordinate
1124 self.summary = summary
1125 self.tags = tags
1126 self.terms = terms
1127
1128
1129 class CharmMetric(Type):
1130 _toSchema = {'description': 'description', 'type_': 'type'}
1131 _toPy = {'type': 'type_', 'description': 'description'}
1132 def __init__(self, description=None, type_=None):
1133 '''
1134 description : str
1135 type_ : str
1136 '''
1137 self.description = description
1138 self.type_ = type_
1139
1140
1141 class CharmMetrics(Type):
1142 _toSchema = {'metrics': 'metrics'}
1143 _toPy = {'metrics': 'metrics'}
1144 def __init__(self, metrics=None):
1145 '''
1146 metrics : typing.Mapping[str, ~CharmMetric]
1147 '''
1148 self.metrics = {k: CharmMetric.from_json(v) for k, v in (metrics or dict()).items()}
1149
1150
1151 class CharmOption(Type):
1152 _toSchema = {'default': 'default', 'description': 'description', 'type_': 'type'}
1153 _toPy = {'type': 'type_', 'default': 'default', 'description': 'description'}
1154 def __init__(self, default=None, description=None, type_=None):
1155 '''
1156 default : typing.Mapping[str, typing.Any]
1157 description : str
1158 type_ : str
1159 '''
1160 self.default = default
1161 self.description = description
1162 self.type_ = type_
1163
1164
1165 class CharmPayloadClass(Type):
1166 _toSchema = {'name': 'name', 'type_': 'type'}
1167 _toPy = {'name': 'name', 'type': 'type_'}
1168 def __init__(self, name=None, type_=None):
1169 '''
1170 name : str
1171 type_ : str
1172 '''
1173 self.name = name
1174 self.type_ = type_
1175
1176
1177 class CharmResourceMeta(Type):
1178 _toSchema = {'name': 'name', 'path': 'path', 'description': 'description', 'type_': 'type'}
1179 _toPy = {'name': 'name', 'type': 'type_', 'path': 'path', 'description': 'description'}
1180 def __init__(self, description=None, name=None, path=None, type_=None):
1181 '''
1182 description : str
1183 name : str
1184 path : str
1185 type_ : str
1186 '''
1187 self.description = description
1188 self.name = name
1189 self.path = path
1190 self.type_ = type_
1191
1192
1193 class CharmStorage(Type):
1194 _toSchema = {'name': 'name', 'location': 'location', 'count_max': 'count-max', 'description': 'description', 'read_only': 'read-only', 'properties': 'properties', 'shared': 'shared', 'count_min': 'count-min', 'minimum_size': 'minimum-size', 'type_': 'type'}
1195 _toPy = {'name': 'name', 'location': 'location', 'count-min': 'count_min', 'description': 'description', 'properties': 'properties', 'type': 'type_', 'read-only': 'read_only', 'count-max': 'count_max', 'shared': 'shared', 'minimum-size': 'minimum_size'}
1196 def __init__(self, count_max=None, count_min=None, description=None, location=None, minimum_size=None, name=None, properties=None, read_only=None, shared=None, type_=None):
1197 '''
1198 count_max : int
1199 count_min : int
1200 description : str
1201 location : str
1202 minimum_size : int
1203 name : str
1204 properties : typing.Sequence[str]
1205 read_only : bool
1206 shared : bool
1207 type_ : str
1208 '''
1209 self.count_max = count_max
1210 self.count_min = count_min
1211 self.description = description
1212 self.location = location
1213 self.minimum_size = minimum_size
1214 self.name = name
1215 self.properties = properties
1216 self.read_only = read_only
1217 self.shared = shared
1218 self.type_ = type_
1219
1220
1221 class CharmURL(Type):
1222 _toSchema = {'url': 'url'}
1223 _toPy = {'url': 'url'}
1224 def __init__(self, url=None):
1225 '''
1226 url : str
1227 '''
1228 self.url = url
1229
1230
1231 class CharmsList(Type):
1232 _toSchema = {'names': 'names'}
1233 _toPy = {'names': 'names'}
1234 def __init__(self, names=None):
1235 '''
1236 names : typing.Sequence[str]
1237 '''
1238 self.names = names
1239
1240
1241 class CharmsListResult(Type):
1242 _toSchema = {'charm_urls': 'charm-urls'}
1243 _toPy = {'charm-urls': 'charm_urls'}
1244 def __init__(self, charm_urls=None):
1245 '''
1246 charm_urls : typing.Sequence[str]
1247 '''
1248 self.charm_urls = charm_urls
1249
1250
1251 class IsMeteredResult(Type):
1252 _toSchema = {'metered': 'metered'}
1253 _toPy = {'metered': 'metered'}
1254 def __init__(self, metered=None):
1255 '''
1256 metered : bool
1257 '''
1258 self.metered = metered
1259
1260
1261 class APIHostPortsResult(Type):
1262 _toSchema = {'servers': 'servers'}
1263 _toPy = {'servers': 'servers'}
1264 def __init__(self, servers=None):
1265 '''
1266 servers : typing.Sequence[~HostPort]
1267 '''
1268 self.servers = [HostPort.from_json(o) for o in servers or []]
1269
1270
1271 class AddCharm(Type):
1272 _toSchema = {'channel': 'channel', 'url': 'url'}
1273 _toPy = {'channel': 'channel', 'url': 'url'}
1274 def __init__(self, channel=None, url=None):
1275 '''
1276 channel : str
1277 url : str
1278 '''
1279 self.channel = channel
1280 self.url = url
1281
1282
1283 class AddCharmWithAuthorization(Type):
1284 _toSchema = {'channel': 'channel', 'url': 'url', 'macaroon': 'macaroon'}
1285 _toPy = {'channel': 'channel', 'url': 'url', 'macaroon': 'macaroon'}
1286 def __init__(self, channel=None, macaroon=None, url=None):
1287 '''
1288 channel : str
1289 macaroon : Macaroon
1290 url : str
1291 '''
1292 self.channel = channel
1293 self.macaroon = Macaroon.from_json(macaroon) if macaroon else None
1294 self.url = url
1295
1296
1297 class AddMachineParams(Type):
1298 _toSchema = {'jobs': 'jobs', 'placement': 'placement', 'disks': 'disks', 'instance_id': 'instance-id', 'constraints': 'constraints', 'hardware_characteristics': 'hardware-characteristics', 'parent_id': 'parent-id', 'nonce': 'nonce', 'container_type': 'container-type', 'addresses': 'addresses', 'series': 'series'}
1299 _toPy = {'jobs': 'jobs', 'constraints': 'constraints', 'disks': 'disks', 'hardware-characteristics': 'hardware_characteristics', 'container-type': 'container_type', 'placement': 'placement', 'parent-id': 'parent_id', 'instance-id': 'instance_id', 'nonce': 'nonce', 'addresses': 'addresses', 'series': 'series'}
1300 def __init__(self, addresses=None, constraints=None, container_type=None, disks=None, hardware_characteristics=None, instance_id=None, jobs=None, nonce=None, parent_id=None, placement=None, series=None):
1301 '''
1302 addresses : typing.Sequence[~Address]
1303 constraints : Value
1304 container_type : str
1305 disks : typing.Sequence[~Constraints]
1306 hardware_characteristics : HardwareCharacteristics
1307 instance_id : str
1308 jobs : typing.Sequence[str]
1309 nonce : str
1310 parent_id : str
1311 placement : Placement
1312 series : str
1313 '''
1314 self.addresses = [Address.from_json(o) for o in addresses or []]
1315 self.constraints = Value.from_json(constraints) if constraints else None
1316 self.container_type = container_type
1317 self.disks = [Constraints.from_json(o) for o in disks or []]
1318 self.hardware_characteristics = HardwareCharacteristics.from_json(hardware_characteristics) if hardware_characteristics else None
1319 self.instance_id = instance_id
1320 self.jobs = jobs
1321 self.nonce = nonce
1322 self.parent_id = parent_id
1323 self.placement = Placement.from_json(placement) if placement else None
1324 self.series = series
1325
1326
1327 class AddMachines(Type):
1328 _toSchema = {'params': 'params'}
1329 _toPy = {'params': 'params'}
1330 def __init__(self, params=None):
1331 '''
1332 params : typing.Sequence[~AddMachineParams]
1333 '''
1334 self.params = [AddMachineParams.from_json(o) for o in params or []]
1335
1336
1337 class AddMachinesResult(Type):
1338 _toSchema = {'error': 'error', 'machine': 'machine'}
1339 _toPy = {'error': 'error', 'machine': 'machine'}
1340 def __init__(self, error=None, machine=None):
1341 '''
1342 error : Error
1343 machine : str
1344 '''
1345 self.error = Error.from_json(error) if error else None
1346 self.machine = machine
1347
1348
1349 class AddMachinesResults(Type):
1350 _toSchema = {'machines': 'machines'}
1351 _toPy = {'machines': 'machines'}
1352 def __init__(self, machines=None):
1353 '''
1354 machines : typing.Sequence[~AddMachinesResult]
1355 '''
1356 self.machines = [AddMachinesResult.from_json(o) for o in machines or []]
1357
1358
1359 class Address(Type):
1360 _toSchema = {'scope': 'scope', 'type_': 'type', 'value': 'value', 'space_name': 'space-name'}
1361 _toPy = {'type': 'type_', 'scope': 'scope', 'value': 'value', 'space-name': 'space_name'}
1362 def __init__(self, scope=None, space_name=None, type_=None, value=None):
1363 '''
1364 scope : str
1365 space_name : str
1366 type_ : str
1367 value : str
1368 '''
1369 self.scope = scope
1370 self.space_name = space_name
1371 self.type_ = type_
1372 self.value = value
1373
1374
1375 class AgentVersionResult(Type):
1376 _toSchema = {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'}
1377 _toPy = {'Patch': 'patch', 'Major': 'major', 'Tag': 'tag', 'Minor': 'minor', 'Build': 'build'}
1378 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
1379 '''
1380 build : int
1381 major : int
1382 minor : int
1383 patch : int
1384 tag : str
1385 '''
1386 self.build = build
1387 self.major = major
1388 self.minor = minor
1389 self.patch = patch
1390 self.tag = tag
1391
1392
1393 class AllWatcherId(Type):
1394 _toSchema = {'watcher_id': 'watcher-id'}
1395 _toPy = {'watcher-id': 'watcher_id'}
1396 def __init__(self, watcher_id=None):
1397 '''
1398 watcher_id : str
1399 '''
1400 self.watcher_id = watcher_id
1401
1402
1403 class ApplicationStatus(Type):
1404 _toSchema = {'status': 'status', 'subordinate_to': 'subordinate-to', 'err': 'err', 'series': 'series', 'life': 'life', 'can_upgrade_to': 'can-upgrade-to', 'meter_statuses': 'meter-statuses', 'units': 'units', 'workload_version': 'workload-version', 'exposed': 'exposed', 'relations': 'relations', 'charm': 'charm'}
1405 _toPy = {'status': 'status', 'can-upgrade-to': 'can_upgrade_to', 'err': 'err', 'series': 'series', 'life': 'life', 'exposed': 'exposed', 'subordinate-to': 'subordinate_to', 'units': 'units', 'workload-version': 'workload_version', 'meter-statuses': 'meter_statuses', 'relations': 'relations', 'charm': 'charm'}
1406 def __init__(self, can_upgrade_to=None, charm=None, err=None, exposed=None, life=None, meter_statuses=None, relations=None, series=None, status=None, subordinate_to=None, units=None, workload_version=None):
1407 '''
1408 can_upgrade_to : str
1409 charm : str
1410 err : typing.Mapping[str, typing.Any]
1411 exposed : bool
1412 life : str
1413 meter_statuses : typing.Mapping[str, ~MeterStatus]
1414 relations : typing.Sequence[str]
1415 series : str
1416 status : DetailedStatus
1417 subordinate_to : typing.Sequence[str]
1418 units : typing.Mapping[str, ~UnitStatus]
1419 workload_version : str
1420 '''
1421 self.can_upgrade_to = can_upgrade_to
1422 self.charm = charm
1423 self.err = err
1424 self.exposed = exposed
1425 self.life = life
1426 self.meter_statuses = {k: MeterStatus.from_json(v) for k, v in (meter_statuses or dict()).items()}
1427 self.relations = relations
1428 self.series = series
1429 self.status = DetailedStatus.from_json(status) if status else None
1430 self.subordinate_to = subordinate_to
1431 self.units = {k: UnitStatus.from_json(v) for k, v in (units or dict()).items()}
1432 self.workload_version = workload_version
1433
1434
1435 class Binary(Type):
1436 _toSchema = {'series': 'Series', 'arch': 'Arch', 'number': 'Number'}
1437 _toPy = {'Number': 'number', 'Arch': 'arch', 'Series': 'series'}
1438 def __init__(self, arch=None, number=None, series=None):
1439 '''
1440 arch : str
1441 number : Number
1442 series : str
1443 '''
1444 self.arch = arch
1445 self.number = Number.from_json(number) if number else None
1446 self.series = series
1447
1448
1449 class BundleChangesChange(Type):
1450 _toSchema = {'args': 'args', 'id_': 'id', 'requires': 'requires', 'method': 'method'}
1451 _toPy = {'args': 'args', 'requires': 'requires', 'id': 'id_', 'method': 'method'}
1452 def __init__(self, args=None, id_=None, method=None, requires=None):
1453 '''
1454 args : typing.Sequence[typing.Any]
1455 id_ : str
1456 method : str
1457 requires : typing.Sequence[str]
1458 '''
1459 self.args = args
1460 self.id_ = id_
1461 self.method = method
1462 self.requires = requires
1463
1464
1465 class ConfigValue(Type):
1466 _toSchema = {'source': 'source', 'value': 'value'}
1467 _toPy = {'source': 'source', 'value': 'value'}
1468 def __init__(self, source=None, value=None):
1469 '''
1470 source : str
1471 value : typing.Mapping[str, typing.Any]
1472 '''
1473 self.source = source
1474 self.value = value
1475
1476
1477 class DestroyMachines(Type):
1478 _toSchema = {'force': 'force', 'machine_names': 'machine-names'}
1479 _toPy = {'force': 'force', 'machine-names': 'machine_names'}
1480 def __init__(self, force=None, machine_names=None):
1481 '''
1482 force : bool
1483 machine_names : typing.Sequence[str]
1484 '''
1485 self.force = force
1486 self.machine_names = machine_names
1487
1488
1489 class DetailedStatus(Type):
1490 _toSchema = {'status': 'status', 'info': 'info', 'err': 'err', 'kind': 'kind', 'since': 'since', 'life': 'life', 'data': 'data', 'version': 'version'}
1491 _toPy = {'status': 'status', 'info': 'info', 'err': 'err', 'kind': 'kind', 'since': 'since', 'life': 'life', 'data': 'data', 'version': 'version'}
1492 def __init__(self, data=None, err=None, info=None, kind=None, life=None, since=None, status=None, version=None):
1493 '''
1494 data : typing.Mapping[str, typing.Any]
1495 err : typing.Mapping[str, typing.Any]
1496 info : str
1497 kind : str
1498 life : str
1499 since : str
1500 status : str
1501 version : str
1502 '''
1503 self.data = data
1504 self.err = err
1505 self.info = info
1506 self.kind = kind
1507 self.life = life
1508 self.since = since
1509 self.status = status
1510 self.version = version
1511
1512
1513 class EndpointStatus(Type):
1514 _toSchema = {'name': 'name', 'role': 'role', 'subordinate': 'subordinate', 'application': 'application'}
1515 _toPy = {'name': 'name', 'role': 'role', 'subordinate': 'subordinate', 'application': 'application'}
1516 def __init__(self, application=None, name=None, role=None, subordinate=None):
1517 '''
1518 application : str
1519 name : str
1520 role : str
1521 subordinate : bool
1522 '''
1523 self.application = application
1524 self.name = name
1525 self.role = role
1526 self.subordinate = subordinate
1527
1528
1529 class EntityStatus(Type):
1530 _toSchema = {'status': 'status', 'info': 'info', 'data': 'data', 'since': 'since'}
1531 _toPy = {'status': 'status', 'info': 'info', 'data': 'data', 'since': 'since'}
1532 def __init__(self, data=None, info=None, since=None, status=None):
1533 '''
1534 data : typing.Mapping[str, typing.Any]
1535 info : str
1536 since : str
1537 status : str
1538 '''
1539 self.data = data
1540 self.info = info
1541 self.since = since
1542 self.status = status
1543
1544
1545 class FindToolsParams(Type):
1546 _toSchema = {'number': 'number', 'arch': 'arch', 'major': 'major', 'series': 'series', 'minor': 'minor'}
1547 _toPy = {'number': 'number', 'arch': 'arch', 'major': 'major', 'series': 'series', 'minor': 'minor'}
1548 def __init__(self, arch=None, major=None, minor=None, number=None, series=None):
1549 '''
1550 arch : str
1551 major : int
1552 minor : int
1553 number : Number
1554 series : str
1555 '''
1556 self.arch = arch
1557 self.major = major
1558 self.minor = minor
1559 self.number = Number.from_json(number) if number else None
1560 self.series = series
1561
1562
1563 class FindToolsResult(Type):
1564 _toSchema = {'error': 'error', 'list_': 'list'}
1565 _toPy = {'error': 'error', 'list': 'list_'}
1566 def __init__(self, error=None, list_=None):
1567 '''
1568 error : Error
1569 list_ : typing.Sequence[~Tools]
1570 '''
1571 self.error = Error.from_json(error) if error else None
1572 self.list_ = [Tools.from_json(o) for o in list_ or []]
1573
1574
1575 class FullStatus(Type):
1576 _toSchema = {'machines': 'machines', 'model': 'model', 'relations': 'relations', 'applications': 'applications'}
1577 _toPy = {'machines': 'machines', 'model': 'model', 'relations': 'relations', 'applications': 'applications'}
1578 def __init__(self, applications=None, machines=None, model=None, relations=None):
1579 '''
1580 applications : typing.Mapping[str, ~ApplicationStatus]
1581 machines : typing.Mapping[str, ~MachineStatus]
1582 model : ModelStatusInfo
1583 relations : typing.Sequence[~RelationStatus]
1584 '''
1585 self.applications = {k: ApplicationStatus.from_json(v) for k, v in (applications or dict()).items()}
1586 self.machines = {k: MachineStatus.from_json(v) for k, v in (machines or dict()).items()}
1587 self.model = ModelStatusInfo.from_json(model) if model else None
1588 self.relations = [RelationStatus.from_json(o) for o in relations or []]
1589
1590
1591 class GetBundleChangesParams(Type):
1592 _toSchema = {'yaml': 'yaml'}
1593 _toPy = {'yaml': 'yaml'}
1594 def __init__(self, yaml=None):
1595 '''
1596 yaml : str
1597 '''
1598 self.yaml = yaml
1599
1600
1601 class GetBundleChangesResults(Type):
1602 _toSchema = {'changes': 'changes', 'errors': 'errors'}
1603 _toPy = {'changes': 'changes', 'errors': 'errors'}
1604 def __init__(self, changes=None, errors=None):
1605 '''
1606 changes : typing.Sequence[~BundleChangesChange]
1607 errors : typing.Sequence[str]
1608 '''
1609 self.changes = [BundleChangesChange.from_json(o) for o in changes or []]
1610 self.errors = errors
1611
1612
1613 class HardwareCharacteristics(Type):
1614 _toSchema = {'tags': 'tags', 'cpu_cores': 'cpu-cores', 'arch': 'arch', 'root_disk': 'root-disk', 'mem': 'mem', 'cpu_power': 'cpu-power', 'availability_zone': 'availability-zone'}
1615 _toPy = {'cpu-cores': 'cpu_cores', 'tags': 'tags', 'arch': 'arch', 'mem': 'mem', 'root-disk': 'root_disk', 'availability-zone': 'availability_zone', 'cpu-power': 'cpu_power'}
1616 def __init__(self, arch=None, availability_zone=None, cpu_cores=None, cpu_power=None, mem=None, root_disk=None, tags=None):
1617 '''
1618 arch : str
1619 availability_zone : str
1620 cpu_cores : int
1621 cpu_power : int
1622 mem : int
1623 root_disk : int
1624 tags : typing.Sequence[str]
1625 '''
1626 self.arch = arch
1627 self.availability_zone = availability_zone
1628 self.cpu_cores = cpu_cores
1629 self.cpu_power = cpu_power
1630 self.mem = mem
1631 self.root_disk = root_disk
1632 self.tags = tags
1633
1634
1635 class History(Type):
1636 _toSchema = {'error': 'error', 'statuses': 'statuses'}
1637 _toPy = {'error': 'error', 'statuses': 'statuses'}
1638 def __init__(self, error=None, statuses=None):
1639 '''
1640 error : Error
1641 statuses : typing.Sequence[~DetailedStatus]
1642 '''
1643 self.error = Error.from_json(error) if error else None
1644 self.statuses = [DetailedStatus.from_json(o) for o in statuses or []]
1645
1646
1647 class HostPort(Type):
1648 _toSchema = {'address': 'Address', 'port': 'port'}
1649 _toPy = {'Address': 'address', 'port': 'port'}
1650 def __init__(self, address=None, port=None):
1651 '''
1652 address : Address
1653 port : int
1654 '''
1655 self.address = Address.from_json(address) if address else None
1656 self.port = port
1657
1658
1659 class MachineStatus(Type):
1660 _toSchema = {'jobs': 'jobs', 'id_': 'id', 'instance_status': 'instance-status', 'instance_id': 'instance-id', 'series': 'series', 'has_vote': 'has-vote', 'hardware': 'hardware', 'agent_status': 'agent-status', 'dns_name': 'dns-name', 'containers': 'containers', 'wants_vote': 'wants-vote'}
1661 _toPy = {'has-vote': 'has_vote', 'jobs': 'jobs', 'wants-vote': 'wants_vote', 'instance-status': 'instance_status', 'id': 'id_', 'hardware': 'hardware', 'agent-status': 'agent_status', 'instance-id': 'instance_id', 'dns-name': 'dns_name', 'containers': 'containers', 'series': 'series'}
1662 def __init__(self, agent_status=None, containers=None, dns_name=None, hardware=None, has_vote=None, id_=None, instance_id=None, instance_status=None, jobs=None, series=None, wants_vote=None):
1663 '''
1664 agent_status : DetailedStatus
1665 containers : typing.Mapping[str, ~MachineStatus]
1666 dns_name : str
1667 hardware : str
1668 has_vote : bool
1669 id_ : str
1670 instance_id : str
1671 instance_status : DetailedStatus
1672 jobs : typing.Sequence[str]
1673 series : str
1674 wants_vote : bool
1675 '''
1676 self.agent_status = DetailedStatus.from_json(agent_status) if agent_status else None
1677 self.containers = {k: MachineStatus.from_json(v) for k, v in (containers or dict()).items()}
1678 self.dns_name = dns_name
1679 self.hardware = hardware
1680 self.has_vote = has_vote
1681 self.id_ = id_
1682 self.instance_id = instance_id
1683 self.instance_status = DetailedStatus.from_json(instance_status) if instance_status else None
1684 self.jobs = jobs
1685 self.series = series
1686 self.wants_vote = wants_vote
1687
1688
1689 class MeterStatus(Type):
1690 _toSchema = {'message': 'message', 'color': 'color'}
1691 _toPy = {'message': 'message', 'color': 'color'}
1692 def __init__(self, color=None, message=None):
1693 '''
1694 color : str
1695 message : str
1696 '''
1697 self.color = color
1698 self.message = message
1699
1700
1701 class ModelConfigResults(Type):
1702 _toSchema = {'config': 'config'}
1703 _toPy = {'config': 'config'}
1704 def __init__(self, config=None):
1705 '''
1706 config : typing.Mapping[str, ~ConfigValue]
1707 '''
1708 self.config = {k: ConfigValue.from_json(v) for k, v in (config or dict()).items()}
1709
1710
1711 class ModelInfo(Type):
1712 _toSchema = {'name': 'name', 'status': 'status', 'provider_type': 'provider-type', 'uuid': 'uuid', 'cloud': 'cloud', 'controller_uuid': 'controller-uuid', 'life': 'life', 'cloud_region': 'cloud-region', 'users': 'users', 'cloud_credential': 'cloud-credential', 'owner_tag': 'owner-tag', 'default_series': 'default-series'}
1713 _toPy = {'name': 'name', 'status': 'status', 'users': 'users', 'cloud': 'cloud', 'provider-type': 'provider_type', 'uuid': 'uuid', 'controller-uuid': 'controller_uuid', 'owner-tag': 'owner_tag', 'cloud-credential': 'cloud_credential', 'default-series': 'default_series', 'life': 'life', 'cloud-region': 'cloud_region'}
1714 def __init__(self, cloud=None, cloud_credential=None, cloud_region=None, controller_uuid=None, default_series=None, life=None, name=None, owner_tag=None, provider_type=None, status=None, users=None, uuid=None):
1715 '''
1716 cloud : str
1717 cloud_credential : str
1718 cloud_region : str
1719 controller_uuid : str
1720 default_series : str
1721 life : str
1722 name : str
1723 owner_tag : str
1724 provider_type : str
1725 status : EntityStatus
1726 users : typing.Sequence[~ModelUserInfo]
1727 uuid : str
1728 '''
1729 self.cloud = cloud
1730 self.cloud_credential = cloud_credential
1731 self.cloud_region = cloud_region
1732 self.controller_uuid = controller_uuid
1733 self.default_series = default_series
1734 self.life = life
1735 self.name = name
1736 self.owner_tag = owner_tag
1737 self.provider_type = provider_type
1738 self.status = EntityStatus.from_json(status) if status else None
1739 self.users = [ModelUserInfo.from_json(o) for o in users or []]
1740 self.uuid = uuid
1741
1742
1743 class ModelSet(Type):
1744 _toSchema = {'config': 'config'}
1745 _toPy = {'config': 'config'}
1746 def __init__(self, config=None):
1747 '''
1748 config : typing.Mapping[str, typing.Any]
1749 '''
1750 self.config = config
1751
1752
1753 class ModelStatusInfo(Type):
1754 _toSchema = {'name': 'name', 'version': 'version', 'region': 'region', 'cloud': 'cloud', 'available_version': 'available-version'}
1755 _toPy = {'name': 'name', 'available-version': 'available_version', 'region': 'region', 'cloud': 'cloud', 'version': 'version'}
1756 def __init__(self, available_version=None, cloud=None, name=None, region=None, version=None):
1757 '''
1758 available_version : str
1759 cloud : str
1760 name : str
1761 region : str
1762 version : str
1763 '''
1764 self.available_version = available_version
1765 self.cloud = cloud
1766 self.name = name
1767 self.region = region
1768 self.version = version
1769
1770
1771 class ModelUnset(Type):
1772 _toSchema = {'keys': 'keys'}
1773 _toPy = {'keys': 'keys'}
1774 def __init__(self, keys=None):
1775 '''
1776 keys : typing.Sequence[str]
1777 '''
1778 self.keys = keys
1779
1780
1781 class ModelUserInfo(Type):
1782 _toSchema = {'access': 'access', 'display_name': 'display-name', 'last_connection': 'last-connection', 'user': 'user'}
1783 _toPy = {'access': 'access', 'user': 'user', 'display-name': 'display_name', 'last-connection': 'last_connection'}
1784 def __init__(self, access=None, display_name=None, last_connection=None, user=None):
1785 '''
1786 access : str
1787 display_name : str
1788 last_connection : str
1789 user : str
1790 '''
1791 self.access = access
1792 self.display_name = display_name
1793 self.last_connection = last_connection
1794 self.user = user
1795
1796
1797 class ModelUserInfoResult(Type):
1798 _toSchema = {'error': 'error', 'result': 'result'}
1799 _toPy = {'error': 'error', 'result': 'result'}
1800 def __init__(self, error=None, result=None):
1801 '''
1802 error : Error
1803 result : ModelUserInfo
1804 '''
1805 self.error = Error.from_json(error) if error else None
1806 self.result = ModelUserInfo.from_json(result) if result else None
1807
1808
1809 class ModelUserInfoResults(Type):
1810 _toSchema = {'results': 'results'}
1811 _toPy = {'results': 'results'}
1812 def __init__(self, results=None):
1813 '''
1814 results : typing.Sequence[~ModelUserInfoResult]
1815 '''
1816 self.results = [ModelUserInfoResult.from_json(o) for o in results or []]
1817
1818
1819 class PrivateAddress(Type):
1820 _toSchema = {'target': 'target'}
1821 _toPy = {'target': 'target'}
1822 def __init__(self, target=None):
1823 '''
1824 target : str
1825 '''
1826 self.target = target
1827
1828
1829 class PrivateAddressResults(Type):
1830 _toSchema = {'private_address': 'private-address'}
1831 _toPy = {'private-address': 'private_address'}
1832 def __init__(self, private_address=None):
1833 '''
1834 private_address : str
1835 '''
1836 self.private_address = private_address
1837
1838
1839 class ProvisioningScriptParams(Type):
1840 _toSchema = {'nonce': 'nonce', 'disable_package_commands': 'disable-package-commands', 'machine_id': 'machine-id', 'data_dir': 'data-dir'}
1841 _toPy = {'machine-id': 'machine_id', 'nonce': 'nonce', 'disable-package-commands': 'disable_package_commands', 'data-dir': 'data_dir'}
1842 def __init__(self, data_dir=None, disable_package_commands=None, machine_id=None, nonce=None):
1843 '''
1844 data_dir : str
1845 disable_package_commands : bool
1846 machine_id : str
1847 nonce : str
1848 '''
1849 self.data_dir = data_dir
1850 self.disable_package_commands = disable_package_commands
1851 self.machine_id = machine_id
1852 self.nonce = nonce
1853
1854
1855 class ProvisioningScriptResult(Type):
1856 _toSchema = {'script': 'script'}
1857 _toPy = {'script': 'script'}
1858 def __init__(self, script=None):
1859 '''
1860 script : str
1861 '''
1862 self.script = script
1863
1864
1865 class PublicAddress(Type):
1866 _toSchema = {'target': 'target'}
1867 _toPy = {'target': 'target'}
1868 def __init__(self, target=None):
1869 '''
1870 target : str
1871 '''
1872 self.target = target
1873
1874
1875 class PublicAddressResults(Type):
1876 _toSchema = {'public_address': 'public-address'}
1877 _toPy = {'public-address': 'public_address'}
1878 def __init__(self, public_address=None):
1879 '''
1880 public_address : str
1881 '''
1882 self.public_address = public_address
1883
1884
1885 class RelationStatus(Type):
1886 _toSchema = {'id_': 'id', 'key': 'key', 'endpoints': 'endpoints', 'interface': 'interface', 'scope': 'scope'}
1887 _toPy = {'id': 'id_', 'key': 'key', 'endpoints': 'endpoints', 'interface': 'interface', 'scope': 'scope'}
1888 def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None):
1889 '''
1890 endpoints : typing.Sequence[~EndpointStatus]
1891 id_ : int
1892 interface : str
1893 key : str
1894 scope : str
1895 '''
1896 self.endpoints = [EndpointStatus.from_json(o) for o in endpoints or []]
1897 self.id_ = id_
1898 self.interface = interface
1899 self.key = key
1900 self.scope = scope
1901
1902
1903 class ResolveCharmResult(Type):
1904 _toSchema = {'error': 'error', 'url': 'url'}
1905 _toPy = {'error': 'error', 'url': 'url'}
1906 def __init__(self, error=None, url=None):
1907 '''
1908 error : str
1909 url : str
1910 '''
1911 self.error = error
1912 self.url = url
1913
1914
1915 class ResolveCharmResults(Type):
1916 _toSchema = {'urls': 'urls'}
1917 _toPy = {'urls': 'urls'}
1918 def __init__(self, urls=None):
1919 '''
1920 urls : typing.Sequence[~ResolveCharmResult]
1921 '''
1922 self.urls = [ResolveCharmResult.from_json(o) for o in urls or []]
1923
1924
1925 class ResolveCharms(Type):
1926 _toSchema = {'references': 'references'}
1927 _toPy = {'references': 'references'}
1928 def __init__(self, references=None):
1929 '''
1930 references : typing.Sequence[str]
1931 '''
1932 self.references = references
1933
1934
1935 class Resolved(Type):
1936 _toSchema = {'unit_name': 'unit-name', 'retry': 'retry'}
1937 _toPy = {'unit-name': 'unit_name', 'retry': 'retry'}
1938 def __init__(self, retry=None, unit_name=None):
1939 '''
1940 retry : bool
1941 unit_name : str
1942 '''
1943 self.retry = retry
1944 self.unit_name = unit_name
1945
1946
1947 class SetModelAgentVersion(Type):
1948 _toSchema = {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'}
1949 _toPy = {'Patch': 'patch', 'Major': 'major', 'Tag': 'tag', 'Minor': 'minor', 'Build': 'build'}
1950 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
1951 '''
1952 build : int
1953 major : int
1954 minor : int
1955 patch : int
1956 tag : str
1957 '''
1958 self.build = build
1959 self.major = major
1960 self.minor = minor
1961 self.patch = patch
1962 self.tag = tag
1963
1964
1965 class StatusHistoryFilter(Type):
1966 _toSchema = {'size': 'size', 'delta': 'delta', 'date': 'date'}
1967 _toPy = {'size': 'size', 'delta': 'delta', 'date': 'date'}
1968 def __init__(self, date=None, delta=None, size=None):
1969 '''
1970 date : str
1971 delta : int
1972 size : int
1973 '''
1974 self.date = date
1975 self.delta = delta
1976 self.size = size
1977
1978
1979 class StatusHistoryRequest(Type):
1980 _toSchema = {'size': 'size', 'historykind': 'historyKind', 'tag': 'tag', 'filter_': 'filter'}
1981 _toPy = {'historyKind': 'historykind', 'tag': 'tag', 'size': 'size', 'filter': 'filter_'}
1982 def __init__(self, filter_=None, historykind=None, size=None, tag=None):
1983 '''
1984 filter_ : StatusHistoryFilter
1985 historykind : str
1986 size : int
1987 tag : str
1988 '''
1989 self.filter_ = StatusHistoryFilter.from_json(filter_) if filter_ else None
1990 self.historykind = historykind
1991 self.size = size
1992 self.tag = tag
1993
1994
1995 class StatusHistoryRequests(Type):
1996 _toSchema = {'requests': 'requests'}
1997 _toPy = {'requests': 'requests'}
1998 def __init__(self, requests=None):
1999 '''
2000 requests : typing.Sequence[~StatusHistoryRequest]
2001 '''
2002 self.requests = [StatusHistoryRequest.from_json(o) for o in requests or []]
2003
2004
2005 class StatusHistoryResult(Type):
2006 _toSchema = {'error': 'error', 'history': 'history'}
2007 _toPy = {'error': 'error', 'history': 'history'}
2008 def __init__(self, error=None, history=None):
2009 '''
2010 error : Error
2011 history : History
2012 '''
2013 self.error = Error.from_json(error) if error else None
2014 self.history = History.from_json(history) if history else None
2015
2016
2017 class StatusHistoryResults(Type):
2018 _toSchema = {'results': 'results'}
2019 _toPy = {'results': 'results'}
2020 def __init__(self, results=None):
2021 '''
2022 results : typing.Sequence[~StatusHistoryResult]
2023 '''
2024 self.results = [StatusHistoryResult.from_json(o) for o in results or []]
2025
2026
2027 class StatusParams(Type):
2028 _toSchema = {'patterns': 'patterns'}
2029 _toPy = {'patterns': 'patterns'}
2030 def __init__(self, patterns=None):
2031 '''
2032 patterns : typing.Sequence[str]
2033 '''
2034 self.patterns = patterns
2035
2036
2037 class Tools(Type):
2038 _toSchema = {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'}
2039 _toPy = {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'}
2040 def __init__(self, sha256=None, size=None, url=None, version=None):
2041 '''
2042 sha256 : str
2043 size : int
2044 url : str
2045 version : Binary
2046 '''
2047 self.sha256 = sha256
2048 self.size = size
2049 self.url = url
2050 self.version = Binary.from_json(version) if version else None
2051
2052
2053 class UnitStatus(Type):
2054 _toSchema = {'workload_status': 'workload-status', 'workload_version': 'workload-version', 'machine': 'machine', 'opened_ports': 'opened-ports', 'public_address': 'public-address', 'agent_status': 'agent-status', 'subordinates': 'subordinates', 'charm': 'charm'}
2055 _toPy = {'opened-ports': 'opened_ports', 'machine': 'machine', 'subordinates': 'subordinates', 'agent-status': 'agent_status', 'workload-version': 'workload_version', 'workload-status': 'workload_status', 'public-address': 'public_address', 'charm': 'charm'}
2056 def __init__(self, agent_status=None, charm=None, machine=None, opened_ports=None, public_address=None, subordinates=None, workload_status=None, workload_version=None):
2057 '''
2058 agent_status : DetailedStatus
2059 charm : str
2060 machine : str
2061 opened_ports : typing.Sequence[str]
2062 public_address : str
2063 subordinates : typing.Mapping[str, ~UnitStatus]
2064 workload_status : DetailedStatus
2065 workload_version : str
2066 '''
2067 self.agent_status = DetailedStatus.from_json(agent_status) if agent_status else None
2068 self.charm = charm
2069 self.machine = machine
2070 self.opened_ports = opened_ports
2071 self.public_address = public_address
2072 self.subordinates = {k: UnitStatus.from_json(v) for k, v in (subordinates or dict()).items()}
2073 self.workload_status = DetailedStatus.from_json(workload_status) if workload_status else None
2074 self.workload_version = workload_version
2075
2076
2077 class Cloud(Type):
2078 _toSchema = {'auth_types': 'auth-types', 'regions': 'regions', 'type_': 'type', 'endpoint': 'endpoint'}
2079 _toPy = {'type': 'type_', 'regions': 'regions', 'auth-types': 'auth_types', 'endpoint': 'endpoint'}
2080 def __init__(self, auth_types=None, endpoint=None, regions=None, type_=None):
2081 '''
2082 auth_types : typing.Sequence[str]
2083 endpoint : str
2084 regions : typing.Sequence[~CloudRegion]
2085 type_ : str
2086 '''
2087 self.auth_types = auth_types
2088 self.endpoint = endpoint
2089 self.regions = [CloudRegion.from_json(o) for o in regions or []]
2090 self.type_ = type_
2091
2092
2093 class CloudCredential(Type):
2094 _toSchema = {'auth_type': 'auth-type', 'attrs': 'attrs'}
2095 _toPy = {'auth-type': 'auth_type', 'attrs': 'attrs'}
2096 def __init__(self, attrs=None, auth_type=None):
2097 '''
2098 attrs : typing.Mapping[str, str]
2099 auth_type : str
2100 '''
2101 self.attrs = attrs
2102 self.auth_type = auth_type
2103
2104
2105 class CloudCredentialsResult(Type):
2106 _toSchema = {'credentials': 'credentials', 'error': 'error'}
2107 _toPy = {'credentials': 'credentials', 'error': 'error'}
2108 def __init__(self, credentials=None, error=None):
2109 '''
2110 credentials : typing.Mapping[str, ~CloudCredential]
2111 error : Error
2112 '''
2113 self.credentials = {k: CloudCredential.from_json(v) for k, v in (credentials or dict()).items()}
2114 self.error = Error.from_json(error) if error else None
2115
2116
2117 class CloudCredentialsResults(Type):
2118 _toSchema = {'results': 'results'}
2119 _toPy = {'results': 'results'}
2120 def __init__(self, results=None):
2121 '''
2122 results : typing.Sequence[~CloudCredentialsResult]
2123 '''
2124 self.results = [CloudCredentialsResult.from_json(o) for o in results or []]
2125
2126
2127 class CloudDefaults(Type):
2128 _toSchema = {'region': 'region', 'credential': 'credential', 'cloud_tag': 'cloud-tag'}
2129 _toPy = {'region': 'region', 'credential': 'credential', 'cloud-tag': 'cloud_tag'}
2130 def __init__(self, cloud_tag=None, credential=None, region=None):
2131 '''
2132 cloud_tag : str
2133 credential : str
2134 region : str
2135 '''
2136 self.cloud_tag = cloud_tag
2137 self.credential = credential
2138 self.region = region
2139
2140
2141 class CloudDefaultsResult(Type):
2142 _toSchema = {'error': 'error', 'result': 'result'}
2143 _toPy = {'error': 'error', 'result': 'result'}
2144 def __init__(self, error=None, result=None):
2145 '''
2146 error : Error
2147 result : CloudDefaults
2148 '''
2149 self.error = Error.from_json(error) if error else None
2150 self.result = CloudDefaults.from_json(result) if result else None
2151
2152
2153 class CloudDefaultsResults(Type):
2154 _toSchema = {'results': 'results'}
2155 _toPy = {'results': 'results'}
2156 def __init__(self, results=None):
2157 '''
2158 results : typing.Sequence[~CloudDefaultsResult]
2159 '''
2160 self.results = [CloudDefaultsResult.from_json(o) for o in results or []]
2161
2162
2163 class CloudRegion(Type):
2164 _toSchema = {'name': 'name', 'endpoint': 'endpoint'}
2165 _toPy = {'name': 'name', 'endpoint': 'endpoint'}
2166 def __init__(self, endpoint=None, name=None):
2167 '''
2168 endpoint : str
2169 name : str
2170 '''
2171 self.endpoint = endpoint
2172 self.name = name
2173
2174
2175 class CloudResult(Type):
2176 _toSchema = {'error': 'error', 'cloud': 'cloud'}
2177 _toPy = {'error': 'error', 'cloud': 'cloud'}
2178 def __init__(self, cloud=None, error=None):
2179 '''
2180 cloud : Cloud
2181 error : Error
2182 '''
2183 self.cloud = Cloud.from_json(cloud) if cloud else None
2184 self.error = Error.from_json(error) if error else None
2185
2186
2187 class CloudResults(Type):
2188 _toSchema = {'results': 'results'}
2189 _toPy = {'results': 'results'}
2190 def __init__(self, results=None):
2191 '''
2192 results : typing.Sequence[~CloudResult]
2193 '''
2194 self.results = [CloudResult.from_json(o) for o in results or []]
2195
2196
2197 class UserCloud(Type):
2198 _toSchema = {'user_tag': 'user-tag', 'cloud_tag': 'cloud-tag'}
2199 _toPy = {'user-tag': 'user_tag', 'cloud-tag': 'cloud_tag'}
2200 def __init__(self, cloud_tag=None, user_tag=None):
2201 '''
2202 cloud_tag : str
2203 user_tag : str
2204 '''
2205 self.cloud_tag = cloud_tag
2206 self.user_tag = user_tag
2207
2208
2209 class UserCloudCredentials(Type):
2210 _toSchema = {'credentials': 'credentials', 'user_tag': 'user-tag', 'cloud_tag': 'cloud-tag'}
2211 _toPy = {'credentials': 'credentials', 'user-tag': 'user_tag', 'cloud-tag': 'cloud_tag'}
2212 def __init__(self, cloud_tag=None, credentials=None, user_tag=None):
2213 '''
2214 cloud_tag : str
2215 credentials : typing.Mapping[str, ~CloudCredential]
2216 user_tag : str
2217 '''
2218 self.cloud_tag = cloud_tag
2219 self.credentials = {k: CloudCredential.from_json(v) for k, v in (credentials or dict()).items()}
2220 self.user_tag = user_tag
2221
2222
2223 class UserClouds(Type):
2224 _toSchema = {'user_clouds': 'user-clouds'}
2225 _toPy = {'user-clouds': 'user_clouds'}
2226 def __init__(self, user_clouds=None):
2227 '''
2228 user_clouds : typing.Sequence[~UserCloud]
2229 '''
2230 self.user_clouds = [UserCloud.from_json(o) for o in user_clouds or []]
2231
2232
2233 class UsersCloudCredentials(Type):
2234 _toSchema = {'users': 'users'}
2235 _toPy = {'users': 'users'}
2236 def __init__(self, users=None):
2237 '''
2238 users : typing.Sequence[~UserCloudCredentials]
2239 '''
2240 self.users = [UserCloudCredentials.from_json(o) for o in users or []]
2241
2242
2243 class DestroyControllerArgs(Type):
2244 _toSchema = {'destroy_models': 'destroy-models'}
2245 _toPy = {'destroy-models': 'destroy_models'}
2246 def __init__(self, destroy_models=None):
2247 '''
2248 destroy_models : bool
2249 '''
2250 self.destroy_models = destroy_models
2251
2252
2253 class InitiateModelMigrationArgs(Type):
2254 _toSchema = {'specs': 'specs'}
2255 _toPy = {'specs': 'specs'}
2256 def __init__(self, specs=None):
2257 '''
2258 specs : typing.Sequence[~ModelMigrationSpec]
2259 '''
2260 self.specs = [ModelMigrationSpec.from_json(o) for o in specs or []]
2261
2262
2263 class InitiateModelMigrationResult(Type):
2264 _toSchema = {'error': 'error', 'model_tag': 'model-tag', 'id_': 'id'}
2265 _toPy = {'error': 'error', 'id': 'id_', 'model-tag': 'model_tag'}
2266 def __init__(self, error=None, id_=None, model_tag=None):
2267 '''
2268 error : Error
2269 id_ : str
2270 model_tag : str
2271 '''
2272 self.error = Error.from_json(error) if error else None
2273 self.id_ = id_
2274 self.model_tag = model_tag
2275
2276
2277 class InitiateModelMigrationResults(Type):
2278 _toSchema = {'results': 'results'}
2279 _toPy = {'results': 'results'}
2280 def __init__(self, results=None):
2281 '''
2282 results : typing.Sequence[~InitiateModelMigrationResult]
2283 '''
2284 self.results = [InitiateModelMigrationResult.from_json(o) for o in results or []]
2285
2286
2287 class Model(Type):
2288 _toSchema = {'name': 'name', 'uuid': 'uuid', 'owner_tag': 'owner-tag'}
2289 _toPy = {'name': 'name', 'uuid': 'uuid', 'owner-tag': 'owner_tag'}
2290 def __init__(self, name=None, owner_tag=None, uuid=None):
2291 '''
2292 name : str
2293 owner_tag : str
2294 uuid : str
2295 '''
2296 self.name = name
2297 self.owner_tag = owner_tag
2298 self.uuid = uuid
2299
2300
2301 class ModelBlockInfo(Type):
2302 _toSchema = {'name': 'name', 'model_uuid': 'model-uuid', 'owner_tag': 'owner-tag', 'blocks': 'blocks'}
2303 _toPy = {'name': 'name', 'owner-tag': 'owner_tag', 'blocks': 'blocks', 'model-uuid': 'model_uuid'}
2304 def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None):
2305 '''
2306 blocks : typing.Sequence[str]
2307 model_uuid : str
2308 name : str
2309 owner_tag : str
2310 '''
2311 self.blocks = blocks
2312 self.model_uuid = model_uuid
2313 self.name = name
2314 self.owner_tag = owner_tag
2315
2316
2317 class ModelBlockInfoList(Type):
2318 _toSchema = {'models': 'models'}
2319 _toPy = {'models': 'models'}
2320 def __init__(self, models=None):
2321 '''
2322 models : typing.Sequence[~ModelBlockInfo]
2323 '''
2324 self.models = [ModelBlockInfo.from_json(o) for o in models or []]
2325
2326
2327 class ModelMigrationSpec(Type):
2328 _toSchema = {'target_info': 'target-info', 'model_tag': 'model-tag'}
2329 _toPy = {'model-tag': 'model_tag', 'target-info': 'target_info'}
2330 def __init__(self, model_tag=None, target_info=None):
2331 '''
2332 model_tag : str
2333 target_info : ModelMigrationTargetInfo
2334 '''
2335 self.model_tag = model_tag
2336 self.target_info = ModelMigrationTargetInfo.from_json(target_info) if target_info else None
2337
2338
2339 class ModelMigrationTargetInfo(Type):
2340 _toSchema = {'controller_tag': 'controller-tag', 'auth_tag': 'auth-tag', 'password': 'password', 'ca_cert': 'ca-cert', 'addrs': 'addrs'}
2341 _toPy = {'password': 'password', 'auth-tag': 'auth_tag', 'ca-cert': 'ca_cert', 'addrs': 'addrs', 'controller-tag': 'controller_tag'}
2342 def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_tag=None, password=None):
2343 '''
2344 addrs : typing.Sequence[str]
2345 auth_tag : str
2346 ca_cert : str
2347 controller_tag : str
2348 password : str
2349 '''
2350 self.addrs = addrs
2351 self.auth_tag = auth_tag
2352 self.ca_cert = ca_cert
2353 self.controller_tag = controller_tag
2354 self.password = password
2355
2356
2357 class ModelStatus(Type):
2358 _toSchema = {'hosted_machine_count': 'hosted-machine-count', 'life': 'life', 'application_count': 'application-count', 'model_tag': 'model-tag', 'owner_tag': 'owner-tag'}
2359 _toPy = {'model-tag': 'model_tag', 'life': 'life', 'hosted-machine-count': 'hosted_machine_count', 'owner-tag': 'owner_tag', 'application-count': 'application_count'}
2360 def __init__(self, application_count=None, hosted_machine_count=None, life=None, model_tag=None, owner_tag=None):
2361 '''
2362 application_count : int
2363 hosted_machine_count : int
2364 life : str
2365 model_tag : str
2366 owner_tag : str
2367 '''
2368 self.application_count = application_count
2369 self.hosted_machine_count = hosted_machine_count
2370 self.life = life
2371 self.model_tag = model_tag
2372 self.owner_tag = owner_tag
2373
2374
2375 class ModelStatusResults(Type):
2376 _toSchema = {'models': 'models'}
2377 _toPy = {'models': 'models'}
2378 def __init__(self, models=None):
2379 '''
2380 models : typing.Sequence[~ModelStatus]
2381 '''
2382 self.models = [ModelStatus.from_json(o) for o in models or []]
2383
2384
2385 class RemoveBlocksArgs(Type):
2386 _toSchema = {'all_': 'all'}
2387 _toPy = {'all': 'all_'}
2388 def __init__(self, all_=None):
2389 '''
2390 all_ : bool
2391 '''
2392 self.all_ = all_
2393
2394
2395 class UserModel(Type):
2396 _toSchema = {'last_connection': 'last-connection', 'model': 'model'}
2397 _toPy = {'model': 'model', 'last-connection': 'last_connection'}
2398 def __init__(self, last_connection=None, model=None):
2399 '''
2400 last_connection : str
2401 model : Model
2402 '''
2403 self.last_connection = last_connection
2404 self.model = Model.from_json(model) if model else None
2405
2406
2407 class UserModelList(Type):
2408 _toSchema = {'user_models': 'user-models'}
2409 _toPy = {'user-models': 'user_models'}
2410 def __init__(self, user_models=None):
2411 '''
2412 user_models : typing.Sequence[~UserModel]
2413 '''
2414 self.user_models = [UserModel.from_json(o) for o in user_models or []]
2415
2416
2417 class BytesResult(Type):
2418 _toSchema = {'result': 'result'}
2419 _toPy = {'result': 'result'}
2420 def __init__(self, result=None):
2421 '''
2422 result : typing.Sequence[int]
2423 '''
2424 self.result = result
2425
2426
2427 class DeployerConnectionValues(Type):
2428 _toSchema = {'api_addresses': 'api-addresses', 'state_addresses': 'state-addresses'}
2429 _toPy = {'state-addresses': 'state_addresses', 'api-addresses': 'api_addresses'}
2430 def __init__(self, api_addresses=None, state_addresses=None):
2431 '''
2432 api_addresses : typing.Sequence[str]
2433 state_addresses : typing.Sequence[str]
2434 '''
2435 self.api_addresses = api_addresses
2436 self.state_addresses = state_addresses
2437
2438
2439 class LifeResult(Type):
2440 _toSchema = {'error': 'error', 'life': 'life'}
2441 _toPy = {'error': 'error', 'life': 'life'}
2442 def __init__(self, error=None, life=None):
2443 '''
2444 error : Error
2445 life : str
2446 '''
2447 self.error = Error.from_json(error) if error else None
2448 self.life = life
2449
2450
2451 class LifeResults(Type):
2452 _toSchema = {'results': 'results'}
2453 _toPy = {'results': 'results'}
2454 def __init__(self, results=None):
2455 '''
2456 results : typing.Sequence[~LifeResult]
2457 '''
2458 self.results = [LifeResult.from_json(o) for o in results or []]
2459
2460
2461 class StringsResult(Type):
2462 _toSchema = {'error': 'error', 'result': 'result'}
2463 _toPy = {'error': 'error', 'result': 'result'}
2464 def __init__(self, error=None, result=None):
2465 '''
2466 error : Error
2467 result : typing.Sequence[str]
2468 '''
2469 self.error = Error.from_json(error) if error else None
2470 self.result = result
2471
2472
2473 class StringsWatchResults(Type):
2474 _toSchema = {'results': 'results'}
2475 _toPy = {'results': 'results'}
2476 def __init__(self, results=None):
2477 '''
2478 results : typing.Sequence[~StringsWatchResult]
2479 '''
2480 self.results = [StringsWatchResult.from_json(o) for o in results or []]
2481
2482
2483 class AddSubnetParams(Type):
2484 _toSchema = {'space_tag': 'space-tag', 'subnet_provider_id': 'subnet-provider-id', 'subnet_tag': 'subnet-tag', 'zones': 'zones'}
2485 _toPy = {'space-tag': 'space_tag', 'subnet-tag': 'subnet_tag', 'subnet-provider-id': 'subnet_provider_id', 'zones': 'zones'}
2486 def __init__(self, space_tag=None, subnet_provider_id=None, subnet_tag=None, zones=None):
2487 '''
2488 space_tag : str
2489 subnet_provider_id : str
2490 subnet_tag : str
2491 zones : typing.Sequence[str]
2492 '''
2493 self.space_tag = space_tag
2494 self.subnet_provider_id = subnet_provider_id
2495 self.subnet_tag = subnet_tag
2496 self.zones = zones
2497
2498
2499 class AddSubnetsParams(Type):
2500 _toSchema = {'subnets': 'subnets'}
2501 _toPy = {'subnets': 'subnets'}
2502 def __init__(self, subnets=None):
2503 '''
2504 subnets : typing.Sequence[~AddSubnetParams]
2505 '''
2506 self.subnets = [AddSubnetParams.from_json(o) for o in subnets or []]
2507
2508
2509 class CreateSpaceParams(Type):
2510 _toSchema = {'space_tag': 'space-tag', 'public': 'public', 'provider_id': 'provider-id', 'subnet_tags': 'subnet-tags'}
2511 _toPy = {'space-tag': 'space_tag', 'provider-id': 'provider_id', 'subnet-tags': 'subnet_tags', 'public': 'public'}
2512 def __init__(self, provider_id=None, public=None, space_tag=None, subnet_tags=None):
2513 '''
2514 provider_id : str
2515 public : bool
2516 space_tag : str
2517 subnet_tags : typing.Sequence[str]
2518 '''
2519 self.provider_id = provider_id
2520 self.public = public
2521 self.space_tag = space_tag
2522 self.subnet_tags = subnet_tags
2523
2524
2525 class CreateSpacesParams(Type):
2526 _toSchema = {'spaces': 'spaces'}
2527 _toPy = {'spaces': 'spaces'}
2528 def __init__(self, spaces=None):
2529 '''
2530 spaces : typing.Sequence[~CreateSpaceParams]
2531 '''
2532 self.spaces = [CreateSpaceParams.from_json(o) for o in spaces or []]
2533
2534
2535 class DiscoverSpacesResults(Type):
2536 _toSchema = {'results': 'results'}
2537 _toPy = {'results': 'results'}
2538 def __init__(self, results=None):
2539 '''
2540 results : typing.Sequence[~ProviderSpace]
2541 '''
2542 self.results = [ProviderSpace.from_json(o) for o in results or []]
2543
2544
2545 class ListSubnetsResults(Type):
2546 _toSchema = {'results': 'results'}
2547 _toPy = {'results': 'results'}
2548 def __init__(self, results=None):
2549 '''
2550 results : typing.Sequence[~Subnet]
2551 '''
2552 self.results = [Subnet.from_json(o) for o in results or []]
2553
2554
2555 class ProviderSpace(Type):
2556 _toSchema = {'name': 'name', 'error': 'error', 'subnets': 'subnets', 'provider_id': 'provider-id'}
2557 _toPy = {'name': 'name', 'error': 'error', 'subnets': 'subnets', 'provider-id': 'provider_id'}
2558 def __init__(self, error=None, name=None, provider_id=None, subnets=None):
2559 '''
2560 error : Error
2561 name : str
2562 provider_id : str
2563 subnets : typing.Sequence[~Subnet]
2564 '''
2565 self.error = Error.from_json(error) if error else None
2566 self.name = name
2567 self.provider_id = provider_id
2568 self.subnets = [Subnet.from_json(o) for o in subnets or []]
2569
2570
2571 class Subnet(Type):
2572 _toSchema = {'status': 'status', 'vlan_tag': 'vlan-tag', 'cidr': 'cidr', 'provider_id': 'provider-id', 'life': 'life', 'space_tag': 'space-tag', 'zones': 'zones'}
2573 _toPy = {'space-tag': 'space_tag', 'status': 'status', 'cidr': 'cidr', 'vlan-tag': 'vlan_tag', 'provider-id': 'provider_id', 'life': 'life', 'zones': 'zones'}
2574 def __init__(self, cidr=None, life=None, provider_id=None, space_tag=None, status=None, vlan_tag=None, zones=None):
2575 '''
2576 cidr : str
2577 life : str
2578 provider_id : str
2579 space_tag : str
2580 status : str
2581 vlan_tag : int
2582 zones : typing.Sequence[str]
2583 '''
2584 self.cidr = cidr
2585 self.life = life
2586 self.provider_id = provider_id
2587 self.space_tag = space_tag
2588 self.status = status
2589 self.vlan_tag = vlan_tag
2590 self.zones = zones
2591
2592
2593 class SubnetsFilters(Type):
2594 _toSchema = {'space_tag': 'space-tag', 'zone': 'zone'}
2595 _toPy = {'space-tag': 'space_tag', 'zone': 'zone'}
2596 def __init__(self, space_tag=None, zone=None):
2597 '''
2598 space_tag : str
2599 zone : str
2600 '''
2601 self.space_tag = space_tag
2602 self.zone = zone
2603
2604
2605 class BlockDevice(Type):
2606 _toSchema = {'devicelinks': 'DeviceLinks', 'filesystemtype': 'FilesystemType', 'inuse': 'InUse', 'devicename': 'DeviceName', 'hardwareid': 'HardwareId', 'label': 'Label', 'uuid': 'UUID', 'size': 'Size', 'mountpoint': 'MountPoint', 'busaddress': 'BusAddress'}
2607 _toPy = {'UUID': 'uuid', 'BusAddress': 'busaddress', 'HardwareId': 'hardwareid', 'DeviceName': 'devicename', 'DeviceLinks': 'devicelinks', 'InUse': 'inuse', 'MountPoint': 'mountpoint', 'Label': 'label', 'FilesystemType': 'filesystemtype', 'Size': 'size'}
2608 def __init__(self, busaddress=None, devicelinks=None, devicename=None, filesystemtype=None, hardwareid=None, inuse=None, label=None, mountpoint=None, size=None, uuid=None):
2609 '''
2610 busaddress : str
2611 devicelinks : typing.Sequence[str]
2612 devicename : str
2613 filesystemtype : str
2614 hardwareid : str
2615 inuse : bool
2616 label : str
2617 mountpoint : str
2618 size : int
2619 uuid : str
2620 '''
2621 self.busaddress = busaddress
2622 self.devicelinks = devicelinks
2623 self.devicename = devicename
2624 self.filesystemtype = filesystemtype
2625 self.hardwareid = hardwareid
2626 self.inuse = inuse
2627 self.label = label
2628 self.mountpoint = mountpoint
2629 self.size = size
2630 self.uuid = uuid
2631
2632
2633 class MachineBlockDevices(Type):
2634 _toSchema = {'block_devices': 'block-devices', 'machine': 'machine'}
2635 _toPy = {'machine': 'machine', 'block-devices': 'block_devices'}
2636 def __init__(self, block_devices=None, machine=None):
2637 '''
2638 block_devices : typing.Sequence[~BlockDevice]
2639 machine : str
2640 '''
2641 self.block_devices = [BlockDevice.from_json(o) for o in block_devices or []]
2642 self.machine = machine
2643
2644
2645 class SetMachineBlockDevices(Type):
2646 _toSchema = {'machine_block_devices': 'machine-block-devices'}
2647 _toPy = {'machine-block-devices': 'machine_block_devices'}
2648 def __init__(self, machine_block_devices=None):
2649 '''
2650 machine_block_devices : typing.Sequence[~MachineBlockDevices]
2651 '''
2652 self.machine_block_devices = [MachineBlockDevices.from_json(o) for o in machine_block_devices or []]
2653
2654
2655 class EntitiesWatchResult(Type):
2656 _toSchema = {'error': 'error', 'changes': 'changes', 'watcher_id': 'watcher-id'}
2657 _toPy = {'error': 'error', 'changes': 'changes', 'watcher-id': 'watcher_id'}
2658 def __init__(self, changes=None, error=None, watcher_id=None):
2659 '''
2660 changes : typing.Sequence[str]
2661 error : Error
2662 watcher_id : str
2663 '''
2664 self.changes = changes
2665 self.error = Error.from_json(error) if error else None
2666 self.watcher_id = watcher_id
2667
2668
2669 class MachineStorageId(Type):
2670 _toSchema = {'attachment_tag': 'attachment-tag', 'machine_tag': 'machine-tag'}
2671 _toPy = {'machine-tag': 'machine_tag', 'attachment-tag': 'attachment_tag'}
2672 def __init__(self, attachment_tag=None, machine_tag=None):
2673 '''
2674 attachment_tag : str
2675 machine_tag : str
2676 '''
2677 self.attachment_tag = attachment_tag
2678 self.machine_tag = machine_tag
2679
2680
2681 class MachineStorageIdsWatchResult(Type):
2682 _toSchema = {'error': 'error', 'changes': 'changes', 'watcher_id': 'watcher-id'}
2683 _toPy = {'error': 'error', 'changes': 'changes', 'watcher-id': 'watcher_id'}
2684 def __init__(self, changes=None, error=None, watcher_id=None):
2685 '''
2686 changes : typing.Sequence[~MachineStorageId]
2687 error : Error
2688 watcher_id : str
2689 '''
2690 self.changes = [MachineStorageId.from_json(o) for o in changes or []]
2691 self.error = Error.from_json(error) if error else None
2692 self.watcher_id = watcher_id
2693
2694
2695 class BoolResult(Type):
2696 _toSchema = {'error': 'error', 'result': 'result'}
2697 _toPy = {'error': 'error', 'result': 'result'}
2698 def __init__(self, error=None, result=None):
2699 '''
2700 error : Error
2701 result : bool
2702 '''
2703 self.error = Error.from_json(error) if error else None
2704 self.result = result
2705
2706
2707 class BoolResults(Type):
2708 _toSchema = {'results': 'results'}
2709 _toPy = {'results': 'results'}
2710 def __init__(self, results=None):
2711 '''
2712 results : typing.Sequence[~BoolResult]
2713 '''
2714 self.results = [BoolResult.from_json(o) for o in results or []]
2715
2716
2717 class MachinePortRange(Type):
2718 _toSchema = {'unit_tag': 'unit-tag', 'relation_tag': 'relation-tag', 'port_range': 'port-range'}
2719 _toPy = {'unit-tag': 'unit_tag', 'port-range': 'port_range', 'relation-tag': 'relation_tag'}
2720 def __init__(self, port_range=None, relation_tag=None, unit_tag=None):
2721 '''
2722 port_range : PortRange
2723 relation_tag : str
2724 unit_tag : str
2725 '''
2726 self.port_range = PortRange.from_json(port_range) if port_range else None
2727 self.relation_tag = relation_tag
2728 self.unit_tag = unit_tag
2729
2730
2731 class MachinePorts(Type):
2732 _toSchema = {'machine_tag': 'machine-tag', 'subnet_tag': 'subnet-tag'}
2733 _toPy = {'machine-tag': 'machine_tag', 'subnet-tag': 'subnet_tag'}
2734 def __init__(self, machine_tag=None, subnet_tag=None):
2735 '''
2736 machine_tag : str
2737 subnet_tag : str
2738 '''
2739 self.machine_tag = machine_tag
2740 self.subnet_tag = subnet_tag
2741
2742
2743 class MachinePortsParams(Type):
2744 _toSchema = {'params': 'params'}
2745 _toPy = {'params': 'params'}
2746 def __init__(self, params=None):
2747 '''
2748 params : typing.Sequence[~MachinePorts]
2749 '''
2750 self.params = [MachinePorts.from_json(o) for o in params or []]
2751
2752
2753 class MachinePortsResult(Type):
2754 _toSchema = {'error': 'error', 'ports': 'ports'}
2755 _toPy = {'error': 'error', 'ports': 'ports'}
2756 def __init__(self, error=None, ports=None):
2757 '''
2758 error : Error
2759 ports : typing.Sequence[~MachinePortRange]
2760 '''
2761 self.error = Error.from_json(error) if error else None
2762 self.ports = [MachinePortRange.from_json(o) for o in ports or []]
2763
2764
2765 class MachinePortsResults(Type):
2766 _toSchema = {'results': 'results'}
2767 _toPy = {'results': 'results'}
2768 def __init__(self, results=None):
2769 '''
2770 results : typing.Sequence[~MachinePortsResult]
2771 '''
2772 self.results = [MachinePortsResult.from_json(o) for o in results or []]
2773
2774
2775 class NotifyWatchResults(Type):
2776 _toSchema = {'results': 'results'}
2777 _toPy = {'results': 'results'}
2778 def __init__(self, results=None):
2779 '''
2780 results : typing.Sequence[~NotifyWatchResult]
2781 '''
2782 self.results = [NotifyWatchResult.from_json(o) for o in results or []]
2783
2784
2785 class PortRange(Type):
2786 _toSchema = {'from_port': 'from-port', 'to_port': 'to-port', 'protocol': 'protocol'}
2787 _toPy = {'to-port': 'to_port', 'protocol': 'protocol', 'from-port': 'from_port'}
2788 def __init__(self, from_port=None, protocol=None, to_port=None):
2789 '''
2790 from_port : int
2791 protocol : str
2792 to_port : int
2793 '''
2794 self.from_port = from_port
2795 self.protocol = protocol
2796 self.to_port = to_port
2797
2798
2799 class StringResults(Type):
2800 _toSchema = {'results': 'results'}
2801 _toPy = {'results': 'results'}
2802 def __init__(self, results=None):
2803 '''
2804 results : typing.Sequence[~StringResult]
2805 '''
2806 self.results = [StringResult.from_json(o) for o in results or []]
2807
2808
2809 class StringsResults(Type):
2810 _toSchema = {'results': 'results'}
2811 _toPy = {'results': 'results'}
2812 def __init__(self, results=None):
2813 '''
2814 results : typing.Sequence[~StringsResult]
2815 '''
2816 self.results = [StringsResult.from_json(o) for o in results or []]
2817
2818
2819 class ControllersChangeResult(Type):
2820 _toSchema = {'error': 'error', 'result': 'result'}
2821 _toPy = {'error': 'error', 'result': 'result'}
2822 def __init__(self, error=None, result=None):
2823 '''
2824 error : Error
2825 result : ControllersChanges
2826 '''
2827 self.error = Error.from_json(error) if error else None
2828 self.result = ControllersChanges.from_json(result) if result else None
2829
2830
2831 class ControllersChangeResults(Type):
2832 _toSchema = {'results': 'results'}
2833 _toPy = {'results': 'results'}
2834 def __init__(self, results=None):
2835 '''
2836 results : typing.Sequence[~ControllersChangeResult]
2837 '''
2838 self.results = [ControllersChangeResult.from_json(o) for o in results or []]
2839
2840
2841 class ControllersChanges(Type):
2842 _toSchema = {'removed': 'removed', 'maintained': 'maintained', 'promoted': 'promoted', 'added': 'added', 'converted': 'converted', 'demoted': 'demoted'}
2843 _toPy = {'removed': 'removed', 'maintained': 'maintained', 'promoted': 'promoted', 'added': 'added', 'converted': 'converted', 'demoted': 'demoted'}
2844 def __init__(self, added=None, converted=None, demoted=None, maintained=None, promoted=None, removed=None):
2845 '''
2846 added : typing.Sequence[str]
2847 converted : typing.Sequence[str]
2848 demoted : typing.Sequence[str]
2849 maintained : typing.Sequence[str]
2850 promoted : typing.Sequence[str]
2851 removed : typing.Sequence[str]
2852 '''
2853 self.added = added
2854 self.converted = converted
2855 self.demoted = demoted
2856 self.maintained = maintained
2857 self.promoted = promoted
2858 self.removed = removed
2859
2860
2861 class ControllersSpec(Type):
2862 _toSchema = {'placement': 'placement', 'num_controllers': 'num-controllers', 'model_tag': 'model-tag', 'constraints': 'constraints', 'series': 'series'}
2863 _toPy = {'model-tag': 'model_tag', 'num-controllers': 'num_controllers', 'series': 'series', 'constraints': 'constraints', 'placement': 'placement'}
2864 def __init__(self, constraints=None, model_tag=None, num_controllers=None, placement=None, series=None):
2865 '''
2866 constraints : Value
2867 model_tag : str
2868 num_controllers : int
2869 placement : typing.Sequence[str]
2870 series : str
2871 '''
2872 self.constraints = Value.from_json(constraints) if constraints else None
2873 self.model_tag = model_tag
2874 self.num_controllers = num_controllers
2875 self.placement = placement
2876 self.series = series
2877
2878
2879 class ControllersSpecs(Type):
2880 _toSchema = {'specs': 'specs'}
2881 _toPy = {'specs': 'specs'}
2882 def __init__(self, specs=None):
2883 '''
2884 specs : typing.Sequence[~ControllersSpec]
2885 '''
2886 self.specs = [ControllersSpec.from_json(o) for o in specs or []]
2887
2888
2889 class HAMember(Type):
2890 _toSchema = {'series': 'series', 'tag': 'tag', 'public_address': 'public-address'}
2891 _toPy = {'series': 'series', 'tag': 'tag', 'public-address': 'public_address'}
2892 def __init__(self, public_address=None, series=None, tag=None):
2893 '''
2894 public_address : Address
2895 series : str
2896 tag : str
2897 '''
2898 self.public_address = Address.from_json(public_address) if public_address else None
2899 self.series = series
2900 self.tag = tag
2901
2902
2903 class Member(Type):
2904 _toSchema = {'address': 'Address', 'hidden': 'Hidden', 'tags': 'Tags', 'arbiter': 'Arbiter', 'buildindexes': 'BuildIndexes', 'id_': 'Id', 'priority': 'Priority', 'votes': 'Votes', 'slavedelay': 'SlaveDelay'}
2905 _toPy = {'SlaveDelay': 'slavedelay', 'Hidden': 'hidden', 'Address': 'address', 'Priority': 'priority', 'Votes': 'votes', 'Tags': 'tags', 'Arbiter': 'arbiter', 'BuildIndexes': 'buildindexes', 'Id': 'id_'}
2906 def __init__(self, address=None, arbiter=None, buildindexes=None, hidden=None, id_=None, priority=None, slavedelay=None, tags=None, votes=None):
2907 '''
2908 address : str
2909 arbiter : bool
2910 buildindexes : bool
2911 hidden : bool
2912 id_ : int
2913 priority : float
2914 slavedelay : int
2915 tags : typing.Mapping[str, str]
2916 votes : int
2917 '''
2918 self.address = address
2919 self.arbiter = arbiter
2920 self.buildindexes = buildindexes
2921 self.hidden = hidden
2922 self.id_ = id_
2923 self.priority = priority
2924 self.slavedelay = slavedelay
2925 self.tags = tags
2926 self.votes = votes
2927
2928
2929 class MongoUpgradeResults(Type):
2930 _toSchema = {'rs_members': 'rs-members', 'master': 'master', 'ha_members': 'ha-members'}
2931 _toPy = {'rs-members': 'rs_members', 'master': 'master', 'ha-members': 'ha_members'}
2932 def __init__(self, ha_members=None, master=None, rs_members=None):
2933 '''
2934 ha_members : typing.Sequence[~HAMember]
2935 master : HAMember
2936 rs_members : typing.Sequence[~Member]
2937 '''
2938 self.ha_members = [HAMember.from_json(o) for o in ha_members or []]
2939 self.master = HAMember.from_json(master) if master else None
2940 self.rs_members = [Member.from_json(o) for o in rs_members or []]
2941
2942
2943 class ResumeReplicationParams(Type):
2944 _toSchema = {'members': 'members'}
2945 _toPy = {'members': 'members'}
2946 def __init__(self, members=None):
2947 '''
2948 members : typing.Sequence[~Member]
2949 '''
2950 self.members = [Member.from_json(o) for o in members or []]
2951
2952
2953 class UpgradeMongoParams(Type):
2954 _toSchema = {'patch': 'Patch', 'storageengine': 'StorageEngine', 'major': 'Major', 'minor': 'Minor'}
2955 _toPy = {'Patch': 'patch', 'StorageEngine': 'storageengine', 'Major': 'major', 'Minor': 'minor'}
2956 def __init__(self, major=None, minor=None, patch=None, storageengine=None):
2957 '''
2958 major : int
2959 minor : int
2960 patch : str
2961 storageengine : str
2962 '''
2963 self.major = major
2964 self.minor = minor
2965 self.patch = patch
2966 self.storageengine = storageengine
2967
2968
2969 class Version(Type):
2970 _toSchema = {'patch': 'Patch', 'storageengine': 'StorageEngine', 'major': 'Major', 'minor': 'Minor'}
2971 _toPy = {'Patch': 'patch', 'StorageEngine': 'storageengine', 'Major': 'major', 'Minor': 'minor'}
2972 def __init__(self, major=None, minor=None, patch=None, storageengine=None):
2973 '''
2974 major : int
2975 minor : int
2976 patch : str
2977 storageengine : str
2978 '''
2979 self.major = major
2980 self.minor = minor
2981 self.patch = patch
2982 self.storageengine = storageengine
2983
2984
2985 class SSHHostKeySet(Type):
2986 _toSchema = {'entity_keys': 'entity-keys'}
2987 _toPy = {'entity-keys': 'entity_keys'}
2988 def __init__(self, entity_keys=None):
2989 '''
2990 entity_keys : typing.Sequence[~SSHHostKeys]
2991 '''
2992 self.entity_keys = [SSHHostKeys.from_json(o) for o in entity_keys or []]
2993
2994
2995 class SSHHostKeys(Type):
2996 _toSchema = {'public_keys': 'public-keys', 'tag': 'tag'}
2997 _toPy = {'tag': 'tag', 'public-keys': 'public_keys'}
2998 def __init__(self, public_keys=None, tag=None):
2999 '''
3000 public_keys : typing.Sequence[str]
3001 tag : str
3002 '''
3003 self.public_keys = public_keys
3004 self.tag = tag
3005
3006
3007 class ImageFilterParams(Type):
3008 _toSchema = {'images': 'images'}
3009 _toPy = {'images': 'images'}
3010 def __init__(self, images=None):
3011 '''
3012 images : typing.Sequence[~ImageSpec]
3013 '''
3014 self.images = [ImageSpec.from_json(o) for o in images or []]
3015
3016
3017 class ImageMetadata(Type):
3018 _toSchema = {'created': 'created', 'kind': 'kind', 'url': 'url', 'arch': 'arch', 'series': 'series'}
3019 _toPy = {'created': 'created', 'kind': 'kind', 'url': 'url', 'arch': 'arch', 'series': 'series'}
3020 def __init__(self, arch=None, created=None, kind=None, series=None, url=None):
3021 '''
3022 arch : str
3023 created : str
3024 kind : str
3025 series : str
3026 url : str
3027 '''
3028 self.arch = arch
3029 self.created = created
3030 self.kind = kind
3031 self.series = series
3032 self.url = url
3033
3034
3035 class ImageSpec(Type):
3036 _toSchema = {'series': 'series', 'kind': 'kind', 'arch': 'arch'}
3037 _toPy = {'series': 'series', 'kind': 'kind', 'arch': 'arch'}
3038 def __init__(self, arch=None, kind=None, series=None):
3039 '''
3040 arch : str
3041 kind : str
3042 series : str
3043 '''
3044 self.arch = arch
3045 self.kind = kind
3046 self.series = series
3047
3048
3049 class ListImageResult(Type):
3050 _toSchema = {'result': 'result'}
3051 _toPy = {'result': 'result'}
3052 def __init__(self, result=None):
3053 '''
3054 result : typing.Sequence[~ImageMetadata]
3055 '''
3056 self.result = [ImageMetadata.from_json(o) for o in result or []]
3057
3058
3059 class CloudImageMetadata(Type):
3060 _toSchema = {'root_storage_type': 'root-storage-type', 'root_storage_size': 'root-storage-size', 'arch': 'arch', 'version': 'version', 'series': 'series', 'image_id': 'image-id', 'priority': 'priority', 'source': 'source', 'region': 'region', 'virt_type': 'virt-type', 'stream': 'stream'}
3061 _toPy = {'version': 'version', 'stream': 'stream', 'source': 'source', 'arch': 'arch', 'virt-type': 'virt_type', 'priority': 'priority', 'image-id': 'image_id', 'root-storage-size': 'root_storage_size', 'region': 'region', 'series': 'series', 'root-storage-type': 'root_storage_type'}
3062 def __init__(self, arch=None, image_id=None, priority=None, region=None, root_storage_size=None, root_storage_type=None, series=None, source=None, stream=None, version=None, virt_type=None):
3063 '''
3064 arch : str
3065 image_id : str
3066 priority : int
3067 region : str
3068 root_storage_size : int
3069 root_storage_type : str
3070 series : str
3071 source : str
3072 stream : str
3073 version : str
3074 virt_type : str
3075 '''
3076 self.arch = arch
3077 self.image_id = image_id
3078 self.priority = priority
3079 self.region = region
3080 self.root_storage_size = root_storage_size
3081 self.root_storage_type = root_storage_type
3082 self.series = series
3083 self.source = source
3084 self.stream = stream
3085 self.version = version
3086 self.virt_type = virt_type
3087
3088
3089 class CloudImageMetadataList(Type):
3090 _toSchema = {'metadata': 'metadata'}
3091 _toPy = {'metadata': 'metadata'}
3092 def __init__(self, metadata=None):
3093 '''
3094 metadata : typing.Sequence[~CloudImageMetadata]
3095 '''
3096 self.metadata = [CloudImageMetadata.from_json(o) for o in metadata or []]
3097
3098
3099 class ImageMetadataFilter(Type):
3100 _toSchema = {'root_storage_type': 'root-storage-type', 'arches': 'arches', 'region': 'region', 'stream': 'stream', 'series': 'series', 'virt_type': 'virt-type'}
3101 _toPy = {'arches': 'arches', 'region': 'region', 'virt-type': 'virt_type', 'stream': 'stream', 'series': 'series', 'root-storage-type': 'root_storage_type'}
3102 def __init__(self, arches=None, region=None, root_storage_type=None, series=None, stream=None, virt_type=None):
3103 '''
3104 arches : typing.Sequence[str]
3105 region : str
3106 root_storage_type : str
3107 series : typing.Sequence[str]
3108 stream : str
3109 virt_type : str
3110 '''
3111 self.arches = arches
3112 self.region = region
3113 self.root_storage_type = root_storage_type
3114 self.series = series
3115 self.stream = stream
3116 self.virt_type = virt_type
3117
3118
3119 class ListCloudImageMetadataResult(Type):
3120 _toSchema = {'result': 'result'}
3121 _toPy = {'result': 'result'}
3122 def __init__(self, result=None):
3123 '''
3124 result : typing.Sequence[~CloudImageMetadata]
3125 '''
3126 self.result = [CloudImageMetadata.from_json(o) for o in result or []]
3127
3128
3129 class MetadataImageIds(Type):
3130 _toSchema = {'image_ids': 'image-ids'}
3131 _toPy = {'image-ids': 'image_ids'}
3132 def __init__(self, image_ids=None):
3133 '''
3134 image_ids : typing.Sequence[str]
3135 '''
3136 self.image_ids = image_ids
3137
3138
3139 class MetadataSaveParams(Type):
3140 _toSchema = {'metadata': 'metadata'}
3141 _toPy = {'metadata': 'metadata'}
3142 def __init__(self, metadata=None):
3143 '''
3144 metadata : typing.Sequence[~CloudImageMetadataList]
3145 '''
3146 self.metadata = [CloudImageMetadataList.from_json(o) for o in metadata or []]
3147
3148
3149 class EntityStatusArgs(Type):
3150 _toSchema = {'status': 'status', 'info': 'info', 'tag': 'tag', 'data': 'data'}
3151 _toPy = {'status': 'status', 'info': 'info', 'tag': 'tag', 'data': 'data'}
3152 def __init__(self, data=None, info=None, status=None, tag=None):
3153 '''
3154 data : typing.Mapping[str, typing.Any]
3155 info : str
3156 status : str
3157 tag : str
3158 '''
3159 self.data = data
3160 self.info = info
3161 self.status = status
3162 self.tag = tag
3163
3164
3165 class MachineAddresses(Type):
3166 _toSchema = {'tag': 'tag', 'addresses': 'addresses'}
3167 _toPy = {'tag': 'tag', 'addresses': 'addresses'}
3168 def __init__(self, addresses=None, tag=None):
3169 '''
3170 addresses : typing.Sequence[~Address]
3171 tag : str
3172 '''
3173 self.addresses = [Address.from_json(o) for o in addresses or []]
3174 self.tag = tag
3175
3176
3177 class MachineAddressesResult(Type):
3178 _toSchema = {'error': 'error', 'addresses': 'addresses'}
3179 _toPy = {'error': 'error', 'addresses': 'addresses'}
3180 def __init__(self, addresses=None, error=None):
3181 '''
3182 addresses : typing.Sequence[~Address]
3183 error : Error
3184 '''
3185 self.addresses = [Address.from_json(o) for o in addresses or []]
3186 self.error = Error.from_json(error) if error else None
3187
3188
3189 class MachineAddressesResults(Type):
3190 _toSchema = {'results': 'results'}
3191 _toPy = {'results': 'results'}
3192 def __init__(self, results=None):
3193 '''
3194 results : typing.Sequence[~MachineAddressesResult]
3195 '''
3196 self.results = [MachineAddressesResult.from_json(o) for o in results or []]
3197
3198
3199 class SetMachinesAddresses(Type):
3200 _toSchema = {'machine_addresses': 'machine-addresses'}
3201 _toPy = {'machine-addresses': 'machine_addresses'}
3202 def __init__(self, machine_addresses=None):
3203 '''
3204 machine_addresses : typing.Sequence[~MachineAddresses]
3205 '''
3206 self.machine_addresses = [MachineAddresses.from_json(o) for o in machine_addresses or []]
3207
3208
3209 class SetStatus(Type):
3210 _toSchema = {'entities': 'entities'}
3211 _toPy = {'entities': 'entities'}
3212 def __init__(self, entities=None):
3213 '''
3214 entities : typing.Sequence[~EntityStatusArgs]
3215 '''
3216 self.entities = [EntityStatusArgs.from_json(o) for o in entities or []]
3217
3218
3219 class StatusResult(Type):
3220 _toSchema = {'status': 'status', 'error': 'error', 'info': 'info', 'id_': 'id', 'life': 'life', 'since': 'since', 'data': 'data'}
3221 _toPy = {'status': 'status', 'error': 'error', 'info': 'info', 'since': 'since', 'life': 'life', 'id': 'id_', 'data': 'data'}
3222 def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None):
3223 '''
3224 data : typing.Mapping[str, typing.Any]
3225 error : Error
3226 id_ : str
3227 info : str
3228 life : str
3229 since : str
3230 status : str
3231 '''
3232 self.data = data
3233 self.error = Error.from_json(error) if error else None
3234 self.id_ = id_
3235 self.info = info
3236 self.life = life
3237 self.since = since
3238 self.status = status
3239
3240
3241 class StatusResults(Type):
3242 _toSchema = {'results': 'results'}
3243 _toPy = {'results': 'results'}
3244 def __init__(self, results=None):
3245 '''
3246 results : typing.Sequence[~StatusResult]
3247 '''
3248 self.results = [StatusResult.from_json(o) for o in results or []]
3249
3250
3251 class ListSSHKeys(Type):
3252 _toSchema = {'entities': 'entities', 'mode': 'mode'}
3253 _toPy = {'entities': 'entities', 'mode': 'mode'}
3254 def __init__(self, entities=None, mode=None):
3255 '''
3256 entities : Entities
3257 mode : bool
3258 '''
3259 self.entities = Entities.from_json(entities) if entities else None
3260 self.mode = mode
3261
3262
3263 class ModifyUserSSHKeys(Type):
3264 _toSchema = {'ssh_keys': 'ssh-keys', 'user': 'user'}
3265 _toPy = {'user': 'user', 'ssh-keys': 'ssh_keys'}
3266 def __init__(self, ssh_keys=None, user=None):
3267 '''
3268 ssh_keys : typing.Sequence[str]
3269 user : str
3270 '''
3271 self.ssh_keys = ssh_keys
3272 self.user = user
3273
3274
3275 class ApplicationTag(Type):
3276 _toSchema = {'name': 'Name'}
3277 _toPy = {'Name': 'name'}
3278 def __init__(self, name=None):
3279 '''
3280 name : str
3281 '''
3282 self.name = name
3283
3284
3285 class ClaimLeadershipBulkParams(Type):
3286 _toSchema = {'params': 'params'}
3287 _toPy = {'params': 'params'}
3288 def __init__(self, params=None):
3289 '''
3290 params : typing.Sequence[~ClaimLeadershipParams]
3291 '''
3292 self.params = [ClaimLeadershipParams.from_json(o) for o in params or []]
3293
3294
3295 class ClaimLeadershipBulkResults(Type):
3296 _toSchema = {'results': 'results'}
3297 _toPy = {'results': 'results'}
3298 def __init__(self, results=None):
3299 '''
3300 results : typing.Sequence[~ErrorResult]
3301 '''
3302 self.results = [ErrorResult.from_json(o) for o in results or []]
3303
3304
3305 class ClaimLeadershipParams(Type):
3306 _toSchema = {'unit_tag': 'unit-tag', 'duration': 'duration', 'application_tag': 'application-tag'}
3307 _toPy = {'unit-tag': 'unit_tag', 'duration': 'duration', 'application-tag': 'application_tag'}
3308 def __init__(self, application_tag=None, duration=None, unit_tag=None):
3309 '''
3310 application_tag : str
3311 duration : float
3312 unit_tag : str
3313 '''
3314 self.application_tag = application_tag
3315 self.duration = duration
3316 self.unit_tag = unit_tag
3317
3318
3319 class LogForwardingGetLastSentParams(Type):
3320 _toSchema = {'ids': 'ids'}
3321 _toPy = {'ids': 'ids'}
3322 def __init__(self, ids=None):
3323 '''
3324 ids : typing.Sequence[~LogForwardingID]
3325 '''
3326 self.ids = [LogForwardingID.from_json(o) for o in ids or []]
3327
3328
3329 class LogForwardingGetLastSentResult(Type):
3330 _toSchema = {'record_id': 'record-id', 'err': 'err'}
3331 _toPy = {'record-id': 'record_id', 'err': 'err'}
3332 def __init__(self, err=None, record_id=None):
3333 '''
3334 err : Error
3335 record_id : int
3336 '''
3337 self.err = Error.from_json(err) if err else None
3338 self.record_id = record_id
3339
3340
3341 class LogForwardingGetLastSentResults(Type):
3342 _toSchema = {'results': 'results'}
3343 _toPy = {'results': 'results'}
3344 def __init__(self, results=None):
3345 '''
3346 results : typing.Sequence[~LogForwardingGetLastSentResult]
3347 '''
3348 self.results = [LogForwardingGetLastSentResult.from_json(o) for o in results or []]
3349
3350
3351 class LogForwardingID(Type):
3352 _toSchema = {'sink': 'sink', 'model': 'model'}
3353 _toPy = {'sink': 'sink', 'model': 'model'}
3354 def __init__(self, model=None, sink=None):
3355 '''
3356 model : str
3357 sink : str
3358 '''
3359 self.model = model
3360 self.sink = sink
3361
3362
3363 class LogForwardingSetLastSentParam(Type):
3364 _toSchema = {'record_id': 'record-id', 'logforwardingid': 'LogForwardingID'}
3365 _toPy = {'record-id': 'record_id', 'LogForwardingID': 'logforwardingid'}
3366 def __init__(self, logforwardingid=None, record_id=None):
3367 '''
3368 logforwardingid : LogForwardingID
3369 record_id : int
3370 '''
3371 self.logforwardingid = LogForwardingID.from_json(logforwardingid) if logforwardingid else None
3372 self.record_id = record_id
3373
3374
3375 class LogForwardingSetLastSentParams(Type):
3376 _toSchema = {'params': 'params'}
3377 _toPy = {'params': 'params'}
3378 def __init__(self, params=None):
3379 '''
3380 params : typing.Sequence[~LogForwardingSetLastSentParam]
3381 '''
3382 self.params = [LogForwardingSetLastSentParam.from_json(o) for o in params or []]
3383
3384
3385 class ActionExecutionResult(Type):
3386 _toSchema = {'status': 'status', 'action_tag': 'action-tag', 'results': 'results', 'message': 'message'}
3387 _toPy = {'status': 'status', 'results': 'results', 'message': 'message', 'action-tag': 'action_tag'}
3388 def __init__(self, action_tag=None, message=None, results=None, status=None):
3389 '''
3390 action_tag : str
3391 message : str
3392 results : typing.Mapping[str, typing.Any]
3393 status : str
3394 '''
3395 self.action_tag = action_tag
3396 self.message = message
3397 self.results = results
3398 self.status = status
3399
3400
3401 class ActionExecutionResults(Type):
3402 _toSchema = {'results': 'results'}
3403 _toPy = {'results': 'results'}
3404 def __init__(self, results=None):
3405 '''
3406 results : typing.Sequence[~ActionExecutionResult]
3407 '''
3408 self.results = [ActionExecutionResult.from_json(o) for o in results or []]
3409
3410
3411 class JobsResult(Type):
3412 _toSchema = {'jobs': 'jobs', 'error': 'error'}
3413 _toPy = {'jobs': 'jobs', 'error': 'error'}
3414 def __init__(self, error=None, jobs=None):
3415 '''
3416 error : Error
3417 jobs : typing.Sequence[str]
3418 '''
3419 self.error = Error.from_json(error) if error else None
3420 self.jobs = jobs
3421
3422
3423 class JobsResults(Type):
3424 _toSchema = {'results': 'results'}
3425 _toPy = {'results': 'results'}
3426 def __init__(self, results=None):
3427 '''
3428 results : typing.Sequence[~JobsResult]
3429 '''
3430 self.results = [JobsResult.from_json(o) for o in results or []]
3431
3432
3433 class NetworkConfig(Type):
3434 _toSchema = {'vlan_tag': 'vlan-tag', 'address': 'address', 'provider_space_id': 'provider-space-id', 'no_auto_start': 'no-auto-start', 'config_type': 'config-type', 'interface_name': 'interface-name', 'parent_interface_name': 'parent-interface-name', 'provider_vlan_id': 'provider-vlan-id', 'provider_address_id': 'provider-address-id', 'device_index': 'device-index', 'mac_address': 'mac-address', 'provider_id': 'provider-id', 'cidr': 'cidr', 'mtu': 'mtu', 'dns_search_domains': 'dns-search-domains', 'interface_type': 'interface-type', 'provider_subnet_id': 'provider-subnet-id', 'gateway_address': 'gateway-address', 'disabled': 'disabled', 'dns_servers': 'dns-servers'}
3435 _toPy = {'address': 'address', 'device-index': 'device_index', 'provider-vlan-id': 'provider_vlan_id', 'provider-space-id': 'provider_space_id', 'vlan-tag': 'vlan_tag', 'mac-address': 'mac_address', 'provider-id': 'provider_id', 'provider-subnet-id': 'provider_subnet_id', 'provider-address-id': 'provider_address_id', 'no-auto-start': 'no_auto_start', 'interface-name': 'interface_name', 'mtu': 'mtu', 'dns-search-domains': 'dns_search_domains', 'interface-type': 'interface_type', 'cidr': 'cidr', 'dns-servers': 'dns_servers', 'config-type': 'config_type', 'gateway-address': 'gateway_address', 'parent-interface-name': 'parent_interface_name', 'disabled': 'disabled'}
3436 def __init__(self, address=None, cidr=None, config_type=None, device_index=None, disabled=None, dns_search_domains=None, dns_servers=None, gateway_address=None, interface_name=None, interface_type=None, mac_address=None, mtu=None, no_auto_start=None, parent_interface_name=None, provider_address_id=None, provider_id=None, provider_space_id=None, provider_subnet_id=None, provider_vlan_id=None, vlan_tag=None):
3437 '''
3438 address : str
3439 cidr : str
3440 config_type : str
3441 device_index : int
3442 disabled : bool
3443 dns_search_domains : typing.Sequence[str]
3444 dns_servers : typing.Sequence[str]
3445 gateway_address : str
3446 interface_name : str
3447 interface_type : str
3448 mac_address : str
3449 mtu : int
3450 no_auto_start : bool
3451 parent_interface_name : str
3452 provider_address_id : str
3453 provider_id : str
3454 provider_space_id : str
3455 provider_subnet_id : str
3456 provider_vlan_id : str
3457 vlan_tag : int
3458 '''
3459 self.address = address
3460 self.cidr = cidr
3461 self.config_type = config_type
3462 self.device_index = device_index
3463 self.disabled = disabled
3464 self.dns_search_domains = dns_search_domains
3465 self.dns_servers = dns_servers
3466 self.gateway_address = gateway_address
3467 self.interface_name = interface_name
3468 self.interface_type = interface_type
3469 self.mac_address = mac_address
3470 self.mtu = mtu
3471 self.no_auto_start = no_auto_start
3472 self.parent_interface_name = parent_interface_name
3473 self.provider_address_id = provider_address_id
3474 self.provider_id = provider_id
3475 self.provider_space_id = provider_space_id
3476 self.provider_subnet_id = provider_subnet_id
3477 self.provider_vlan_id = provider_vlan_id
3478 self.vlan_tag = vlan_tag
3479
3480
3481 class SetMachineNetworkConfig(Type):
3482 _toSchema = {'config': 'config', 'tag': 'tag'}
3483 _toPy = {'config': 'config', 'tag': 'tag'}
3484 def __init__(self, config=None, tag=None):
3485 '''
3486 config : typing.Sequence[~NetworkConfig]
3487 tag : str
3488 '''
3489 self.config = [NetworkConfig.from_json(o) for o in config or []]
3490 self.tag = tag
3491
3492
3493 class MeterStatusResult(Type):
3494 _toSchema = {'code': 'code', 'error': 'error', 'info': 'info'}
3495 _toPy = {'code': 'code', 'error': 'error', 'info': 'info'}
3496 def __init__(self, code=None, error=None, info=None):
3497 '''
3498 code : str
3499 error : Error
3500 info : str
3501 '''
3502 self.code = code
3503 self.error = Error.from_json(error) if error else None
3504 self.info = info
3505
3506
3507 class MeterStatusResults(Type):
3508 _toSchema = {'results': 'results'}
3509 _toPy = {'results': 'results'}
3510 def __init__(self, results=None):
3511 '''
3512 results : typing.Sequence[~MeterStatusResult]
3513 '''
3514 self.results = [MeterStatusResult.from_json(o) for o in results or []]
3515
3516
3517 class Metric(Type):
3518 _toSchema = {'key': 'key', 'time': 'time', 'value': 'value'}
3519 _toPy = {'key': 'key', 'time': 'time', 'value': 'value'}
3520 def __init__(self, key=None, time=None, value=None):
3521 '''
3522 key : str
3523 time : str
3524 value : str
3525 '''
3526 self.key = key
3527 self.time = time
3528 self.value = value
3529
3530
3531 class MetricBatch(Type):
3532 _toSchema = {'created': 'created', 'uuid': 'uuid', 'charm_url': 'charm-url', 'metrics': 'metrics'}
3533 _toPy = {'created': 'created', 'uuid': 'uuid', 'charm-url': 'charm_url', 'metrics': 'metrics'}
3534 def __init__(self, charm_url=None, created=None, metrics=None, uuid=None):
3535 '''
3536 charm_url : str
3537 created : str
3538 metrics : typing.Sequence[~Metric]
3539 uuid : str
3540 '''
3541 self.charm_url = charm_url
3542 self.created = created
3543 self.metrics = [Metric.from_json(o) for o in metrics or []]
3544 self.uuid = uuid
3545
3546
3547 class MetricBatchParam(Type):
3548 _toSchema = {'batch': 'batch', 'tag': 'tag'}
3549 _toPy = {'batch': 'batch', 'tag': 'tag'}
3550 def __init__(self, batch=None, tag=None):
3551 '''
3552 batch : MetricBatch
3553 tag : str
3554 '''
3555 self.batch = MetricBatch.from_json(batch) if batch else None
3556 self.tag = tag
3557
3558
3559 class MetricBatchParams(Type):
3560 _toSchema = {'batches': 'batches'}
3561 _toPy = {'batches': 'batches'}
3562 def __init__(self, batches=None):
3563 '''
3564 batches : typing.Sequence[~MetricBatchParam]
3565 '''
3566 self.batches = [MetricBatchParam.from_json(o) for o in batches or []]
3567
3568
3569 class EntityMetrics(Type):
3570 _toSchema = {'error': 'error', 'metrics': 'metrics'}
3571 _toPy = {'error': 'error', 'metrics': 'metrics'}
3572 def __init__(self, error=None, metrics=None):
3573 '''
3574 error : Error
3575 metrics : typing.Sequence[~MetricResult]
3576 '''
3577 self.error = Error.from_json(error) if error else None
3578 self.metrics = [MetricResult.from_json(o) for o in metrics or []]
3579
3580
3581 class MeterStatusParam(Type):
3582 _toSchema = {'code': 'code', 'info': 'info', 'tag': 'tag'}
3583 _toPy = {'code': 'code', 'info': 'info', 'tag': 'tag'}
3584 def __init__(self, code=None, info=None, tag=None):
3585 '''
3586 code : str
3587 info : str
3588 tag : str
3589 '''
3590 self.code = code
3591 self.info = info
3592 self.tag = tag
3593
3594
3595 class MeterStatusParams(Type):
3596 _toSchema = {'statues': 'statues'}
3597 _toPy = {'statues': 'statues'}
3598 def __init__(self, statues=None):
3599 '''
3600 statues : typing.Sequence[~MeterStatusParam]
3601 '''
3602 self.statues = [MeterStatusParam.from_json(o) for o in statues or []]
3603
3604
3605 class MetricResult(Type):
3606 _toSchema = {'key': 'key', 'time': 'time', 'value': 'value'}
3607 _toPy = {'key': 'key', 'time': 'time', 'value': 'value'}
3608 def __init__(self, key=None, time=None, value=None):
3609 '''
3610 key : str
3611 time : str
3612 value : str
3613 '''
3614 self.key = key
3615 self.time = time
3616 self.value = value
3617
3618
3619 class MetricResults(Type):
3620 _toSchema = {'results': 'results'}
3621 _toPy = {'results': 'results'}
3622 def __init__(self, results=None):
3623 '''
3624 results : typing.Sequence[~EntityMetrics]
3625 '''
3626 self.results = [EntityMetrics.from_json(o) for o in results or []]
3627
3628
3629 class PhaseResult(Type):
3630 _toSchema = {'error': 'error', 'phase': 'phase'}
3631 _toPy = {'error': 'error', 'phase': 'phase'}
3632 def __init__(self, error=None, phase=None):
3633 '''
3634 error : Error
3635 phase : str
3636 '''
3637 self.error = Error.from_json(error) if error else None
3638 self.phase = phase
3639
3640
3641 class PhaseResults(Type):
3642 _toSchema = {'results': 'results'}
3643 _toPy = {'results': 'results'}
3644 def __init__(self, results=None):
3645 '''
3646 results : typing.Sequence[~PhaseResult]
3647 '''
3648 self.results = [PhaseResult.from_json(o) for o in results or []]
3649
3650
3651 class FullMigrationStatus(Type):
3652 _toSchema = {'phase': 'phase', 'spec': 'spec', 'attempt': 'attempt'}
3653 _toPy = {'phase': 'phase', 'spec': 'spec', 'attempt': 'attempt'}
3654 def __init__(self, attempt=None, phase=None, spec=None):
3655 '''
3656 attempt : int
3657 phase : str
3658 spec : ModelMigrationSpec
3659 '''
3660 self.attempt = attempt
3661 self.phase = phase
3662 self.spec = ModelMigrationSpec.from_json(spec) if spec else None
3663
3664
3665 class SerializedModel(Type):
3666 _toSchema = {'bytes_': 'bytes'}
3667 _toPy = {'bytes': 'bytes_'}
3668 def __init__(self, bytes_=None):
3669 '''
3670 bytes_ : typing.Sequence[int]
3671 '''
3672 self.bytes_ = bytes_
3673
3674
3675 class SetMigrationPhaseArgs(Type):
3676 _toSchema = {'phase': 'phase'}
3677 _toPy = {'phase': 'phase'}
3678 def __init__(self, phase=None):
3679 '''
3680 phase : str
3681 '''
3682 self.phase = phase
3683
3684
3685 class MigrationStatus(Type):
3686 _toSchema = {'target_ca_cert': 'target-ca-cert', 'source_ca_cert': 'source-ca-cert', 'phase': 'phase', 'source_api_addrs': 'source-api-addrs', 'target_api_addrs': 'target-api-addrs', 'attempt': 'attempt'}
3687 _toPy = {'phase': 'phase', 'source-ca-cert': 'source_ca_cert', 'source-api-addrs': 'source_api_addrs', 'target-api-addrs': 'target_api_addrs', 'target-ca-cert': 'target_ca_cert', 'attempt': 'attempt'}
3688 def __init__(self, attempt=None, phase=None, source_api_addrs=None, source_ca_cert=None, target_api_addrs=None, target_ca_cert=None):
3689 '''
3690 attempt : int
3691 phase : str
3692 source_api_addrs : typing.Sequence[str]
3693 source_ca_cert : str
3694 target_api_addrs : typing.Sequence[str]
3695 target_ca_cert : str
3696 '''
3697 self.attempt = attempt
3698 self.phase = phase
3699 self.source_api_addrs = source_api_addrs
3700 self.source_ca_cert = source_ca_cert
3701 self.target_api_addrs = target_api_addrs
3702 self.target_ca_cert = target_ca_cert
3703
3704
3705 class ModelArgs(Type):
3706 _toSchema = {'model_tag': 'model-tag'}
3707 _toPy = {'model-tag': 'model_tag'}
3708 def __init__(self, model_tag=None):
3709 '''
3710 model_tag : str
3711 '''
3712 self.model_tag = model_tag
3713
3714
3715 class ModelCreateArgs(Type):
3716 _toSchema = {'name': 'name', 'region': 'region', 'owner_tag': 'owner-tag', 'credential': 'credential', 'config': 'config'}
3717 _toPy = {'name': 'name', 'region': 'region', 'owner-tag': 'owner_tag', 'credential': 'credential', 'config': 'config'}
3718 def __init__(self, config=None, credential=None, name=None, owner_tag=None, region=None):
3719 '''
3720 config : typing.Mapping[str, typing.Any]
3721 credential : str
3722 name : str
3723 owner_tag : str
3724 region : str
3725 '''
3726 self.config = config
3727 self.credential = credential
3728 self.name = name
3729 self.owner_tag = owner_tag
3730 self.region = region
3731
3732
3733 class ModelInfoResult(Type):
3734 _toSchema = {'error': 'error', 'result': 'result'}
3735 _toPy = {'error': 'error', 'result': 'result'}
3736 def __init__(self, error=None, result=None):
3737 '''
3738 error : Error
3739 result : ModelInfo
3740 '''
3741 self.error = Error.from_json(error) if error else None
3742 self.result = ModelInfo.from_json(result) if result else None
3743
3744
3745 class ModelInfoResults(Type):
3746 _toSchema = {'results': 'results'}
3747 _toPy = {'results': 'results'}
3748 def __init__(self, results=None):
3749 '''
3750 results : typing.Sequence[~ModelInfoResult]
3751 '''
3752 self.results = [ModelInfoResult.from_json(o) for o in results or []]
3753
3754
3755 class ModifyModelAccess(Type):
3756 _toSchema = {'access': 'access', 'user_tag': 'user-tag', 'model_tag': 'model-tag', 'action': 'action'}
3757 _toPy = {'access': 'access', 'model-tag': 'model_tag', 'action': 'action', 'user-tag': 'user_tag'}
3758 def __init__(self, access=None, action=None, model_tag=None, user_tag=None):
3759 '''
3760 access : str
3761 action : str
3762 model_tag : str
3763 user_tag : str
3764 '''
3765 self.access = access
3766 self.action = action
3767 self.model_tag = model_tag
3768 self.user_tag = user_tag
3769
3770
3771 class ModifyModelAccessRequest(Type):
3772 _toSchema = {'changes': 'changes'}
3773 _toPy = {'changes': 'changes'}
3774 def __init__(self, changes=None):
3775 '''
3776 changes : typing.Sequence[~ModifyModelAccess]
3777 '''
3778 self.changes = [ModifyModelAccess.from_json(o) for o in changes or []]
3779
3780
3781 class ConstraintsResult(Type):
3782 _toSchema = {'error': 'error', 'constraints': 'constraints'}
3783 _toPy = {'error': 'error', 'constraints': 'constraints'}
3784 def __init__(self, constraints=None, error=None):
3785 '''
3786 constraints : Value
3787 error : Error
3788 '''
3789 self.constraints = Value.from_json(constraints) if constraints else None
3790 self.error = Error.from_json(error) if error else None
3791
3792
3793 class ConstraintsResults(Type):
3794 _toSchema = {'results': 'results'}
3795 _toPy = {'results': 'results'}
3796 def __init__(self, results=None):
3797 '''
3798 results : typing.Sequence[~ConstraintsResult]
3799 '''
3800 self.results = [ConstraintsResult.from_json(o) for o in results or []]
3801
3802
3803 class ContainerConfig(Type):
3804 _toSchema = {'apt_proxy': 'apt-proxy', 'updatebehavior': 'UpdateBehavior', 'proxy': 'proxy', 'provider_type': 'provider-type', 'apt_mirror': 'apt-mirror', 'ssl_hostname_verification': 'ssl-hostname-verification', 'authorized_keys': 'authorized-keys'}
3805 _toPy = {'proxy': 'proxy', 'UpdateBehavior': 'updatebehavior', 'provider-type': 'provider_type', 'authorized-keys': 'authorized_keys', 'ssl-hostname-verification': 'ssl_hostname_verification', 'apt-proxy': 'apt_proxy', 'apt-mirror': 'apt_mirror'}
3806 def __init__(self, updatebehavior=None, apt_mirror=None, apt_proxy=None, authorized_keys=None, provider_type=None, proxy=None, ssl_hostname_verification=None):
3807 '''
3808 updatebehavior : UpdateBehavior
3809 apt_mirror : str
3810 apt_proxy : Settings
3811 authorized_keys : str
3812 provider_type : str
3813 proxy : Settings
3814 ssl_hostname_verification : bool
3815 '''
3816 self.updatebehavior = UpdateBehavior.from_json(updatebehavior) if updatebehavior else None
3817 self.apt_mirror = apt_mirror
3818 self.apt_proxy = Settings.from_json(apt_proxy) if apt_proxy else None
3819 self.authorized_keys = authorized_keys
3820 self.provider_type = provider_type
3821 self.proxy = Settings.from_json(proxy) if proxy else None
3822 self.ssl_hostname_verification = ssl_hostname_verification
3823
3824
3825 class ContainerManagerConfig(Type):
3826 _toSchema = {'config': 'config'}
3827 _toPy = {'config': 'config'}
3828 def __init__(self, config=None):
3829 '''
3830 config : typing.Mapping[str, str]
3831 '''
3832 self.config = config
3833
3834
3835 class ContainerManagerConfigParams(Type):
3836 _toSchema = {'type_': 'type'}
3837 _toPy = {'type': 'type_'}
3838 def __init__(self, type_=None):
3839 '''
3840 type_ : str
3841 '''
3842 self.type_ = type_
3843
3844
3845 class DistributionGroupResult(Type):
3846 _toSchema = {'error': 'error', 'result': 'result'}
3847 _toPy = {'error': 'error', 'result': 'result'}
3848 def __init__(self, error=None, result=None):
3849 '''
3850 error : Error
3851 result : typing.Sequence[str]
3852 '''
3853 self.error = Error.from_json(error) if error else None
3854 self.result = result
3855
3856
3857 class DistributionGroupResults(Type):
3858 _toSchema = {'results': 'results'}
3859 _toPy = {'results': 'results'}
3860 def __init__(self, results=None):
3861 '''
3862 results : typing.Sequence[~DistributionGroupResult]
3863 '''
3864 self.results = [DistributionGroupResult.from_json(o) for o in results or []]
3865
3866
3867 class InstanceInfo(Type):
3868 _toSchema = {'network_config': 'network-config', 'volume_attachments': 'volume-attachments', 'nonce': 'nonce', 'tag': 'tag', 'characteristics': 'characteristics', 'volumes': 'volumes', 'instance_id': 'instance-id'}
3869 _toPy = {'nonce': 'nonce', 'tag': 'tag', 'network-config': 'network_config', 'characteristics': 'characteristics', 'instance-id': 'instance_id', 'volume-attachments': 'volume_attachments', 'volumes': 'volumes'}
3870 def __init__(self, characteristics=None, instance_id=None, network_config=None, nonce=None, tag=None, volume_attachments=None, volumes=None):
3871 '''
3872 characteristics : HardwareCharacteristics
3873 instance_id : str
3874 network_config : typing.Sequence[~NetworkConfig]
3875 nonce : str
3876 tag : str
3877 volume_attachments : typing.Mapping[str, ~VolumeAttachmentInfo]
3878 volumes : typing.Sequence[~Volume]
3879 '''
3880 self.characteristics = HardwareCharacteristics.from_json(characteristics) if characteristics else None
3881 self.instance_id = instance_id
3882 self.network_config = [NetworkConfig.from_json(o) for o in network_config or []]
3883 self.nonce = nonce
3884 self.tag = tag
3885 self.volume_attachments = {k: VolumeAttachmentInfo.from_json(v) for k, v in (volume_attachments or dict()).items()}
3886 self.volumes = [Volume.from_json(o) for o in volumes or []]
3887
3888
3889 class InstancesInfo(Type):
3890 _toSchema = {'machines': 'machines'}
3891 _toPy = {'machines': 'machines'}
3892 def __init__(self, machines=None):
3893 '''
3894 machines : typing.Sequence[~InstanceInfo]
3895 '''
3896 self.machines = [InstanceInfo.from_json(o) for o in machines or []]
3897
3898
3899 class MachineContainers(Type):
3900 _toSchema = {'machine_tag': 'machine-tag', 'container_types': 'container-types'}
3901 _toPy = {'machine-tag': 'machine_tag', 'container-types': 'container_types'}
3902 def __init__(self, container_types=None, machine_tag=None):
3903 '''
3904 container_types : typing.Sequence[str]
3905 machine_tag : str
3906 '''
3907 self.container_types = container_types
3908 self.machine_tag = machine_tag
3909
3910
3911 class MachineContainersParams(Type):
3912 _toSchema = {'params': 'params'}
3913 _toPy = {'params': 'params'}
3914 def __init__(self, params=None):
3915 '''
3916 params : typing.Sequence[~MachineContainers]
3917 '''
3918 self.params = [MachineContainers.from_json(o) for o in params or []]
3919
3920
3921 class MachineNetworkConfigResult(Type):
3922 _toSchema = {'error': 'error', 'info': 'info'}
3923 _toPy = {'error': 'error', 'info': 'info'}
3924 def __init__(self, error=None, info=None):
3925 '''
3926 error : Error
3927 info : typing.Sequence[~NetworkConfig]
3928 '''
3929 self.error = Error.from_json(error) if error else None
3930 self.info = [NetworkConfig.from_json(o) for o in info or []]
3931
3932
3933 class MachineNetworkConfigResults(Type):
3934 _toSchema = {'results': 'results'}
3935 _toPy = {'results': 'results'}
3936 def __init__(self, results=None):
3937 '''
3938 results : typing.Sequence[~MachineNetworkConfigResult]
3939 '''
3940 self.results = [MachineNetworkConfigResult.from_json(o) for o in results or []]
3941
3942
3943 class ProvisioningInfo(Type):
3944 _toSchema = {'image_metadata': 'image-metadata', 'jobs': 'jobs', 'tags': 'tags', 'constraints': 'constraints', 'placement': 'placement', 'volumes': 'volumes', 'series': 'series', 'subnets_to_zones': 'subnets-to-zones', 'controller_config': 'controller-config', 'endpoint_bindings': 'endpoint-bindings'}
3945 _toPy = {'jobs': 'jobs', 'placement': 'placement', 'tags': 'tags', 'subnets-to-zones': 'subnets_to_zones', 'constraints': 'constraints', 'endpoint-bindings': 'endpoint_bindings', 'image-metadata': 'image_metadata', 'controller-config': 'controller_config', 'series': 'series', 'volumes': 'volumes'}
3946 def __init__(self, constraints=None, controller_config=None, endpoint_bindings=None, image_metadata=None, jobs=None, placement=None, series=None, subnets_to_zones=None, tags=None, volumes=None):
3947 '''
3948 constraints : Value
3949 controller_config : typing.Mapping[str, typing.Any]
3950 endpoint_bindings : typing.Mapping[str, str]
3951 image_metadata : typing.Sequence[~CloudImageMetadata]
3952 jobs : typing.Sequence[str]
3953 placement : str
3954 series : str
3955 subnets_to_zones : typing.Sequence[str]
3956 tags : typing.Mapping[str, str]
3957 volumes : typing.Sequence[~VolumeParams]
3958 '''
3959 self.constraints = Value.from_json(constraints) if constraints else None
3960 self.controller_config = controller_config
3961 self.endpoint_bindings = endpoint_bindings
3962 self.image_metadata = [CloudImageMetadata.from_json(o) for o in image_metadata or []]
3963 self.jobs = jobs
3964 self.placement = placement
3965 self.series = series
3966 self.subnets_to_zones = subnets_to_zones
3967 self.tags = tags
3968 self.volumes = [VolumeParams.from_json(o) for o in volumes or []]
3969
3970
3971 class ProvisioningInfoResult(Type):
3972 _toSchema = {'error': 'error', 'result': 'result'}
3973 _toPy = {'error': 'error', 'result': 'result'}
3974 def __init__(self, error=None, result=None):
3975 '''
3976 error : Error
3977 result : ProvisioningInfo
3978 '''
3979 self.error = Error.from_json(error) if error else None
3980 self.result = ProvisioningInfo.from_json(result) if result else None
3981
3982
3983 class ProvisioningInfoResults(Type):
3984 _toSchema = {'results': 'results'}
3985 _toPy = {'results': 'results'}
3986 def __init__(self, results=None):
3987 '''
3988 results : typing.Sequence[~ProvisioningInfoResult]
3989 '''
3990 self.results = [ProvisioningInfoResult.from_json(o) for o in results or []]
3991
3992
3993 class Settings(Type):
3994 _toSchema = {'ftp': 'Ftp', 'https': 'Https', 'http': 'Http', 'noproxy': 'NoProxy'}
3995 _toPy = {'Ftp': 'ftp', 'Http': 'http', 'Https': 'https', 'NoProxy': 'noproxy'}
3996 def __init__(self, ftp=None, http=None, https=None, noproxy=None):
3997 '''
3998 ftp : str
3999 http : str
4000 https : str
4001 noproxy : str
4002 '''
4003 self.ftp = ftp
4004 self.http = http
4005 self.https = https
4006 self.noproxy = noproxy
4007
4008
4009 class ToolsResult(Type):
4010 _toSchema = {'tools': 'tools', 'disable_ssl_hostname_verification': 'disable-ssl-hostname-verification', 'error': 'error'}
4011 _toPy = {'disable-ssl-hostname-verification': 'disable_ssl_hostname_verification', 'error': 'error', 'tools': 'tools'}
4012 def __init__(self, disable_ssl_hostname_verification=None, error=None, tools=None):
4013 '''
4014 disable_ssl_hostname_verification : bool
4015 error : Error
4016 tools : typing.Sequence[~Tools]
4017 '''
4018 self.disable_ssl_hostname_verification = disable_ssl_hostname_verification
4019 self.error = Error.from_json(error) if error else None
4020 self.tools = [Tools.from_json(o) for o in tools or []]
4021
4022
4023 class ToolsResults(Type):
4024 _toSchema = {'results': 'results'}
4025 _toPy = {'results': 'results'}
4026 def __init__(self, results=None):
4027 '''
4028 results : typing.Sequence[~ToolsResult]
4029 '''
4030 self.results = [ToolsResult.from_json(o) for o in results or []]
4031
4032
4033 class UpdateBehavior(Type):
4034 _toSchema = {'enable_os_upgrade': 'enable-os-upgrade', 'enable_os_refresh_update': 'enable-os-refresh-update'}
4035 _toPy = {'enable-os-upgrade': 'enable_os_upgrade', 'enable-os-refresh-update': 'enable_os_refresh_update'}
4036 def __init__(self, enable_os_refresh_update=None, enable_os_upgrade=None):
4037 '''
4038 enable_os_refresh_update : bool
4039 enable_os_upgrade : bool
4040 '''
4041 self.enable_os_refresh_update = enable_os_refresh_update
4042 self.enable_os_upgrade = enable_os_upgrade
4043
4044
4045 class Volume(Type):
4046 _toSchema = {'info': 'info', 'volume_tag': 'volume-tag'}
4047 _toPy = {'volume-tag': 'volume_tag', 'info': 'info'}
4048 def __init__(self, info=None, volume_tag=None):
4049 '''
4050 info : VolumeInfo
4051 volume_tag : str
4052 '''
4053 self.info = VolumeInfo.from_json(info) if info else None
4054 self.volume_tag = volume_tag
4055
4056
4057 class VolumeAttachmentInfo(Type):
4058 _toSchema = {'bus_address': 'bus-address', 'device_link': 'device-link', 'read_only': 'read-only', 'device_name': 'device-name'}
4059 _toPy = {'device-link': 'device_link', 'bus-address': 'bus_address', 'device-name': 'device_name', 'read-only': 'read_only'}
4060 def __init__(self, bus_address=None, device_link=None, device_name=None, read_only=None):
4061 '''
4062 bus_address : str
4063 device_link : str
4064 device_name : str
4065 read_only : bool
4066 '''
4067 self.bus_address = bus_address
4068 self.device_link = device_link
4069 self.device_name = device_name
4070 self.read_only = read_only
4071
4072
4073 class VolumeAttachmentParams(Type):
4074 _toSchema = {'volume_id': 'volume-id', 'machine_tag': 'machine-tag', 'instance_id': 'instance-id', 'provider': 'provider', 'volume_tag': 'volume-tag', 'read_only': 'read-only'}
4075 _toPy = {'machine-tag': 'machine_tag', 'volume-tag': 'volume_tag', 'volume-id': 'volume_id', 'provider': 'provider', 'read-only': 'read_only', 'instance-id': 'instance_id'}
4076 def __init__(self, instance_id=None, machine_tag=None, provider=None, read_only=None, volume_id=None, volume_tag=None):
4077 '''
4078 instance_id : str
4079 machine_tag : str
4080 provider : str
4081 read_only : bool
4082 volume_id : str
4083 volume_tag : str
4084 '''
4085 self.instance_id = instance_id
4086 self.machine_tag = machine_tag
4087 self.provider = provider
4088 self.read_only = read_only
4089 self.volume_id = volume_id
4090 self.volume_tag = volume_tag
4091
4092
4093 class VolumeInfo(Type):
4094 _toSchema = {'volume_id': 'volume-id', 'persistent': 'persistent', 'size': 'size', 'hardware_id': 'hardware-id'}
4095 _toPy = {'hardware-id': 'hardware_id', 'persistent': 'persistent', 'size': 'size', 'volume-id': 'volume_id'}
4096 def __init__(self, hardware_id=None, persistent=None, size=None, volume_id=None):
4097 '''
4098 hardware_id : str
4099 persistent : bool
4100 size : int
4101 volume_id : str
4102 '''
4103 self.hardware_id = hardware_id
4104 self.persistent = persistent
4105 self.size = size
4106 self.volume_id = volume_id
4107
4108
4109 class VolumeParams(Type):
4110 _toSchema = {'tags': 'tags', 'provider': 'provider', 'size': 'size', 'attachment': 'attachment', 'attributes': 'attributes', 'volume_tag': 'volume-tag'}
4111 _toPy = {'volume-tag': 'volume_tag', 'tags': 'tags', 'provider': 'provider', 'size': 'size', 'attachment': 'attachment', 'attributes': 'attributes'}
4112 def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volume_tag=None):
4113 '''
4114 attachment : VolumeAttachmentParams
4115 attributes : typing.Mapping[str, typing.Any]
4116 provider : str
4117 size : int
4118 tags : typing.Mapping[str, str]
4119 volume_tag : str
4120 '''
4121 self.attachment = VolumeAttachmentParams.from_json(attachment) if attachment else None
4122 self.attributes = attributes
4123 self.provider = provider
4124 self.size = size
4125 self.tags = tags
4126 self.volume_tag = volume_tag
4127
4128
4129 class WatchContainer(Type):
4130 _toSchema = {'machine_tag': 'machine-tag', 'container_type': 'container-type'}
4131 _toPy = {'machine-tag': 'machine_tag', 'container-type': 'container_type'}
4132 def __init__(self, container_type=None, machine_tag=None):
4133 '''
4134 container_type : str
4135 machine_tag : str
4136 '''
4137 self.container_type = container_type
4138 self.machine_tag = machine_tag
4139
4140
4141 class WatchContainers(Type):
4142 _toSchema = {'params': 'params'}
4143 _toPy = {'params': 'params'}
4144 def __init__(self, params=None):
4145 '''
4146 params : typing.Sequence[~WatchContainer]
4147 '''
4148 self.params = [WatchContainer.from_json(o) for o in params or []]
4149
4150
4151 class ProxyConfig(Type):
4152 _toSchema = {'ftp': 'ftp', 'no_proxy': 'no-proxy', 'https': 'https', 'http': 'http'}
4153 _toPy = {'ftp': 'ftp', 'no-proxy': 'no_proxy', 'https': 'https', 'http': 'http'}
4154 def __init__(self, ftp=None, http=None, https=None, no_proxy=None):
4155 '''
4156 ftp : str
4157 http : str
4158 https : str
4159 no_proxy : str
4160 '''
4161 self.ftp = ftp
4162 self.http = http
4163 self.https = https
4164 self.no_proxy = no_proxy
4165
4166
4167 class ProxyConfigResult(Type):
4168 _toSchema = {'error': 'error', 'proxy_settings': 'proxy-settings', 'apt_proxy_settings': 'apt-proxy-settings'}
4169 _toPy = {'proxy-settings': 'proxy_settings', 'error': 'error', 'apt-proxy-settings': 'apt_proxy_settings'}
4170 def __init__(self, apt_proxy_settings=None, error=None, proxy_settings=None):
4171 '''
4172 apt_proxy_settings : ProxyConfig
4173 error : Error
4174 proxy_settings : ProxyConfig
4175 '''
4176 self.apt_proxy_settings = ProxyConfig.from_json(apt_proxy_settings) if apt_proxy_settings else None
4177 self.error = Error.from_json(error) if error else None
4178 self.proxy_settings = ProxyConfig.from_json(proxy_settings) if proxy_settings else None
4179
4180
4181 class ProxyConfigResults(Type):
4182 _toSchema = {'results': 'results'}
4183 _toPy = {'results': 'results'}
4184 def __init__(self, results=None):
4185 '''
4186 results : typing.Sequence[~ProxyConfigResult]
4187 '''
4188 self.results = [ProxyConfigResult.from_json(o) for o in results or []]
4189
4190
4191 class RebootActionResult(Type):
4192 _toSchema = {'error': 'error', 'result': 'result'}
4193 _toPy = {'error': 'error', 'result': 'result'}
4194 def __init__(self, error=None, result=None):
4195 '''
4196 error : Error
4197 result : str
4198 '''
4199 self.error = Error.from_json(error) if error else None
4200 self.result = result
4201
4202
4203 class RebootActionResults(Type):
4204 _toSchema = {'results': 'results'}
4205 _toPy = {'results': 'results'}
4206 def __init__(self, results=None):
4207 '''
4208 results : typing.Sequence[~RebootActionResult]
4209 '''
4210 self.results = [RebootActionResult.from_json(o) for o in results or []]
4211
4212
4213 class RelationUnitsChange(Type):
4214 _toSchema = {'changed': 'changed', 'departed': 'departed'}
4215 _toPy = {'changed': 'changed', 'departed': 'departed'}
4216 def __init__(self, changed=None, departed=None):
4217 '''
4218 changed : typing.Mapping[str, ~UnitSettings]
4219 departed : typing.Sequence[str]
4220 '''
4221 self.changed = {k: UnitSettings.from_json(v) for k, v in (changed or dict()).items()}
4222 self.departed = departed
4223
4224
4225 class RelationUnitsWatchResult(Type):
4226 _toSchema = {'error': 'error', 'changes': 'changes', 'watcher_id': 'watcher-id'}
4227 _toPy = {'error': 'error', 'changes': 'changes', 'watcher-id': 'watcher_id'}
4228 def __init__(self, changes=None, error=None, watcher_id=None):
4229 '''
4230 changes : RelationUnitsChange
4231 error : Error
4232 watcher_id : str
4233 '''
4234 self.changes = RelationUnitsChange.from_json(changes) if changes else None
4235 self.error = Error.from_json(error) if error else None
4236 self.watcher_id = watcher_id
4237
4238
4239 class UnitSettings(Type):
4240 _toSchema = {'version': 'version'}
4241 _toPy = {'version': 'version'}
4242 def __init__(self, version=None):
4243 '''
4244 version : int
4245 '''
4246 self.version = version
4247
4248
4249 class RetryStrategy(Type):
4250 _toSchema = {'min_retry_time': 'min-retry-time', 'should_retry': 'should-retry', 'retry_time_factor': 'retry-time-factor', 'max_retry_time': 'max-retry-time', 'jitter_retry_time': 'jitter-retry-time'}
4251 _toPy = {'retry-time-factor': 'retry_time_factor', 'min-retry-time': 'min_retry_time', 'jitter-retry-time': 'jitter_retry_time', 'should-retry': 'should_retry', 'max-retry-time': 'max_retry_time'}
4252 def __init__(self, jitter_retry_time=None, max_retry_time=None, min_retry_time=None, retry_time_factor=None, should_retry=None):
4253 '''
4254 jitter_retry_time : bool
4255 max_retry_time : int
4256 min_retry_time : int
4257 retry_time_factor : int
4258 should_retry : bool
4259 '''
4260 self.jitter_retry_time = jitter_retry_time
4261 self.max_retry_time = max_retry_time
4262 self.min_retry_time = min_retry_time
4263 self.retry_time_factor = retry_time_factor
4264 self.should_retry = should_retry
4265
4266
4267 class RetryStrategyResult(Type):
4268 _toSchema = {'error': 'error', 'result': 'result'}
4269 _toPy = {'error': 'error', 'result': 'result'}
4270 def __init__(self, error=None, result=None):
4271 '''
4272 error : Error
4273 result : RetryStrategy
4274 '''
4275 self.error = Error.from_json(error) if error else None
4276 self.result = RetryStrategy.from_json(result) if result else None
4277
4278
4279 class RetryStrategyResults(Type):
4280 _toSchema = {'results': 'results'}
4281 _toPy = {'results': 'results'}
4282 def __init__(self, results=None):
4283 '''
4284 results : typing.Sequence[~RetryStrategyResult]
4285 '''
4286 self.results = [RetryStrategyResult.from_json(o) for o in results or []]
4287
4288
4289 class SSHAddressResult(Type):
4290 _toSchema = {'address': 'address', 'error': 'error'}
4291 _toPy = {'address': 'address', 'error': 'error'}
4292 def __init__(self, address=None, error=None):
4293 '''
4294 address : str
4295 error : Error
4296 '''
4297 self.address = address
4298 self.error = Error.from_json(error) if error else None
4299
4300
4301 class SSHAddressResults(Type):
4302 _toSchema = {'results': 'results'}
4303 _toPy = {'results': 'results'}
4304 def __init__(self, results=None):
4305 '''
4306 results : typing.Sequence[~SSHAddressResult]
4307 '''
4308 self.results = [SSHAddressResult.from_json(o) for o in results or []]
4309
4310
4311 class SSHProxyResult(Type):
4312 _toSchema = {'use_proxy': 'use-proxy'}
4313 _toPy = {'use-proxy': 'use_proxy'}
4314 def __init__(self, use_proxy=None):
4315 '''
4316 use_proxy : bool
4317 '''
4318 self.use_proxy = use_proxy
4319
4320
4321 class SSHPublicKeysResult(Type):
4322 _toSchema = {'error': 'error', 'public_keys': 'public-keys'}
4323 _toPy = {'error': 'error', 'public-keys': 'public_keys'}
4324 def __init__(self, error=None, public_keys=None):
4325 '''
4326 error : Error
4327 public_keys : typing.Sequence[str]
4328 '''
4329 self.error = Error.from_json(error) if error else None
4330 self.public_keys = public_keys
4331
4332
4333 class SSHPublicKeysResults(Type):
4334 _toSchema = {'results': 'results'}
4335 _toPy = {'results': 'results'}
4336 def __init__(self, results=None):
4337 '''
4338 results : typing.Sequence[~SSHPublicKeysResult]
4339 '''
4340 self.results = [SSHPublicKeysResult.from_json(o) for o in results or []]
4341
4342
4343 class SingularClaim(Type):
4344 _toSchema = {'model_tag': 'model-tag', 'duration': 'duration', 'controller_tag': 'controller-tag'}
4345 _toPy = {'model-tag': 'model_tag', 'duration': 'duration', 'controller-tag': 'controller_tag'}
4346 def __init__(self, controller_tag=None, duration=None, model_tag=None):
4347 '''
4348 controller_tag : str
4349 duration : int
4350 model_tag : str
4351 '''
4352 self.controller_tag = controller_tag
4353 self.duration = duration
4354 self.model_tag = model_tag
4355
4356
4357 class SingularClaims(Type):
4358 _toSchema = {'claims': 'claims'}
4359 _toPy = {'claims': 'claims'}
4360 def __init__(self, claims=None):
4361 '''
4362 claims : typing.Sequence[~SingularClaim]
4363 '''
4364 self.claims = [SingularClaim.from_json(o) for o in claims or []]
4365
4366
4367 class ListSpacesResults(Type):
4368 _toSchema = {'results': 'results'}
4369 _toPy = {'results': 'results'}
4370 def __init__(self, results=None):
4371 '''
4372 results : typing.Sequence[~Space]
4373 '''
4374 self.results = [Space.from_json(o) for o in results or []]
4375
4376
4377 class Space(Type):
4378 _toSchema = {'name': 'name', 'error': 'error', 'subnets': 'subnets'}
4379 _toPy = {'name': 'name', 'error': 'error', 'subnets': 'subnets'}
4380 def __init__(self, error=None, name=None, subnets=None):
4381 '''
4382 error : Error
4383 name : str
4384 subnets : typing.Sequence[~Subnet]
4385 '''
4386 self.error = Error.from_json(error) if error else None
4387 self.name = name
4388 self.subnets = [Subnet.from_json(o) for o in subnets or []]
4389
4390
4391 class StatusHistoryPruneArgs(Type):
4392 _toSchema = {'max_history_mb': 'max-history-mb', 'max_history_time': 'max-history-time'}
4393 _toPy = {'max-history-mb': 'max_history_mb', 'max-history-time': 'max_history_time'}
4394 def __init__(self, max_history_mb=None, max_history_time=None):
4395 '''
4396 max_history_mb : int
4397 max_history_time : int
4398 '''
4399 self.max_history_mb = max_history_mb
4400 self.max_history_time = max_history_time
4401
4402
4403 class FilesystemAttachmentInfo(Type):
4404 _toSchema = {'mount_point': 'mount-point', 'read_only': 'read-only'}
4405 _toPy = {'read-only': 'read_only', 'mount-point': 'mount_point'}
4406 def __init__(self, mount_point=None, read_only=None):
4407 '''
4408 mount_point : str
4409 read_only : bool
4410 '''
4411 self.mount_point = mount_point
4412 self.read_only = read_only
4413
4414
4415 class FilesystemDetails(Type):
4416 _toSchema = {'status': 'status', 'filesystem_tag': 'filesystem-tag', 'info': 'info', 'storage': 'storage', 'machine_attachments': 'machine-attachments', 'volume_tag': 'volume-tag'}
4417 _toPy = {'status': 'status', 'volume-tag': 'volume_tag', 'info': 'info', 'filesystem-tag': 'filesystem_tag', 'machine-attachments': 'machine_attachments', 'storage': 'storage'}
4418 def __init__(self, filesystem_tag=None, info=None, machine_attachments=None, status=None, storage=None, volume_tag=None):
4419 '''
4420 filesystem_tag : str
4421 info : FilesystemInfo
4422 machine_attachments : typing.Mapping[str, ~FilesystemAttachmentInfo]
4423 status : EntityStatus
4424 storage : StorageDetails
4425 volume_tag : str
4426 '''
4427 self.filesystem_tag = filesystem_tag
4428 self.info = FilesystemInfo.from_json(info) if info else None
4429 self.machine_attachments = {k: FilesystemAttachmentInfo.from_json(v) for k, v in (machine_attachments or dict()).items()}
4430 self.status = EntityStatus.from_json(status) if status else None
4431 self.storage = StorageDetails.from_json(storage) if storage else None
4432 self.volume_tag = volume_tag
4433
4434
4435 class FilesystemDetailsListResult(Type):
4436 _toSchema = {'error': 'error', 'result': 'result'}
4437 _toPy = {'error': 'error', 'result': 'result'}
4438 def __init__(self, error=None, result=None):
4439 '''
4440 error : Error
4441 result : typing.Sequence[~FilesystemDetails]
4442 '''
4443 self.error = Error.from_json(error) if error else None
4444 self.result = [FilesystemDetails.from_json(o) for o in result or []]
4445
4446
4447 class FilesystemDetailsListResults(Type):
4448 _toSchema = {'results': 'results'}
4449 _toPy = {'results': 'results'}
4450 def __init__(self, results=None):
4451 '''
4452 results : typing.Sequence[~FilesystemDetailsListResult]
4453 '''
4454 self.results = [FilesystemDetailsListResult.from_json(o) for o in results or []]
4455
4456
4457 class FilesystemFilter(Type):
4458 _toSchema = {'machines': 'machines'}
4459 _toPy = {'machines': 'machines'}
4460 def __init__(self, machines=None):
4461 '''
4462 machines : typing.Sequence[str]
4463 '''
4464 self.machines = machines
4465
4466
4467 class FilesystemFilters(Type):
4468 _toSchema = {'filters': 'filters'}
4469 _toPy = {'filters': 'filters'}
4470 def __init__(self, filters=None):
4471 '''
4472 filters : typing.Sequence[~FilesystemFilter]
4473 '''
4474 self.filters = [FilesystemFilter.from_json(o) for o in filters or []]
4475
4476
4477 class FilesystemInfo(Type):
4478 _toSchema = {'filesystem_id': 'filesystem-id', 'size': 'size'}
4479 _toPy = {'filesystem-id': 'filesystem_id', 'size': 'size'}
4480 def __init__(self, filesystem_id=None, size=None):
4481 '''
4482 filesystem_id : str
4483 size : int
4484 '''
4485 self.filesystem_id = filesystem_id
4486 self.size = size
4487
4488
4489 class StorageAddParams(Type):
4490 _toSchema = {'name': 'name', 'unit': 'unit', 'storage': 'storage'}
4491 _toPy = {'name': 'name', 'unit': 'unit', 'storage': 'storage'}
4492 def __init__(self, name=None, storage=None, unit=None):
4493 '''
4494 name : str
4495 storage : StorageConstraints
4496 unit : str
4497 '''
4498 self.name = name
4499 self.storage = StorageConstraints.from_json(storage) if storage else None
4500 self.unit = unit
4501
4502
4503 class StorageAttachmentDetails(Type):
4504 _toSchema = {'storage_tag': 'storage-tag', 'location': 'location', 'unit_tag': 'unit-tag', 'machine_tag': 'machine-tag'}
4505 _toPy = {'machine-tag': 'machine_tag', 'location': 'location', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'}
4506 def __init__(self, location=None, machine_tag=None, storage_tag=None, unit_tag=None):
4507 '''
4508 location : str
4509 machine_tag : str
4510 storage_tag : str
4511 unit_tag : str
4512 '''
4513 self.location = location
4514 self.machine_tag = machine_tag
4515 self.storage_tag = storage_tag
4516 self.unit_tag = unit_tag
4517
4518
4519 class StorageConstraints(Type):
4520 _toSchema = {'size': 'size', 'count': 'count', 'pool': 'pool'}
4521 _toPy = {'size': 'size', 'count': 'count', 'pool': 'pool'}
4522 def __init__(self, count=None, pool=None, size=None):
4523 '''
4524 count : int
4525 pool : str
4526 size : int
4527 '''
4528 self.count = count
4529 self.pool = pool
4530 self.size = size
4531
4532
4533 class StorageDetails(Type):
4534 _toSchema = {'status': 'status', 'persistent': 'persistent', 'storage_tag': 'storage-tag', 'kind': 'kind', 'owner_tag': 'owner-tag', 'attachments': 'attachments'}
4535 _toPy = {'status': 'status', 'persistent': 'persistent', 'storage-tag': 'storage_tag', 'kind': 'kind', 'owner-tag': 'owner_tag', 'attachments': 'attachments'}
4536 def __init__(self, attachments=None, kind=None, owner_tag=None, persistent=None, status=None, storage_tag=None):
4537 '''
4538 attachments : typing.Mapping[str, ~StorageAttachmentDetails]
4539 kind : int
4540 owner_tag : str
4541 persistent : bool
4542 status : EntityStatus
4543 storage_tag : str
4544 '''
4545 self.attachments = {k: StorageAttachmentDetails.from_json(v) for k, v in (attachments or dict()).items()}
4546 self.kind = kind
4547 self.owner_tag = owner_tag
4548 self.persistent = persistent
4549 self.status = EntityStatus.from_json(status) if status else None
4550 self.storage_tag = storage_tag
4551
4552
4553 class StorageDetailsListResult(Type):
4554 _toSchema = {'error': 'error', 'result': 'result'}
4555 _toPy = {'error': 'error', 'result': 'result'}
4556 def __init__(self, error=None, result=None):
4557 '''
4558 error : Error
4559 result : typing.Sequence[~StorageDetails]
4560 '''
4561 self.error = Error.from_json(error) if error else None
4562 self.result = [StorageDetails.from_json(o) for o in result or []]
4563
4564
4565 class StorageDetailsListResults(Type):
4566 _toSchema = {'results': 'results'}
4567 _toPy = {'results': 'results'}
4568 def __init__(self, results=None):
4569 '''
4570 results : typing.Sequence[~StorageDetailsListResult]
4571 '''
4572 self.results = [StorageDetailsListResult.from_json(o) for o in results or []]
4573
4574
4575 class StorageDetailsResult(Type):
4576 _toSchema = {'error': 'error', 'result': 'result'}
4577 _toPy = {'error': 'error', 'result': 'result'}
4578 def __init__(self, error=None, result=None):
4579 '''
4580 error : Error
4581 result : StorageDetails
4582 '''
4583 self.error = Error.from_json(error) if error else None
4584 self.result = StorageDetails.from_json(result) if result else None
4585
4586
4587 class StorageDetailsResults(Type):
4588 _toSchema = {'results': 'results'}
4589 _toPy = {'results': 'results'}
4590 def __init__(self, results=None):
4591 '''
4592 results : typing.Sequence[~StorageDetailsResult]
4593 '''
4594 self.results = [StorageDetailsResult.from_json(o) for o in results or []]
4595
4596
4597 class StorageFilter(Type):
4598 _toSchema = {}
4599 _toPy = {}
4600 def __init__(self):
4601 '''
4602
4603 '''
4604 pass
4605
4606
4607 class StorageFilters(Type):
4608 _toSchema = {'filters': 'filters'}
4609 _toPy = {'filters': 'filters'}
4610 def __init__(self, filters=None):
4611 '''
4612 filters : typing.Sequence[~StorageFilter]
4613 '''
4614 self.filters = [StorageFilter.from_json(o) for o in filters or []]
4615
4616
4617 class StoragePool(Type):
4618 _toSchema = {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'}
4619 _toPy = {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'}
4620 def __init__(self, attrs=None, name=None, provider=None):
4621 '''
4622 attrs : typing.Mapping[str, typing.Any]
4623 name : str
4624 provider : str
4625 '''
4626 self.attrs = attrs
4627 self.name = name
4628 self.provider = provider
4629
4630
4631 class StoragePoolFilter(Type):
4632 _toSchema = {'names': 'names', 'providers': 'providers'}
4633 _toPy = {'names': 'names', 'providers': 'providers'}
4634 def __init__(self, names=None, providers=None):
4635 '''
4636 names : typing.Sequence[str]
4637 providers : typing.Sequence[str]
4638 '''
4639 self.names = names
4640 self.providers = providers
4641
4642
4643 class StoragePoolFilters(Type):
4644 _toSchema = {'filters': 'filters'}
4645 _toPy = {'filters': 'filters'}
4646 def __init__(self, filters=None):
4647 '''
4648 filters : typing.Sequence[~StoragePoolFilter]
4649 '''
4650 self.filters = [StoragePoolFilter.from_json(o) for o in filters or []]
4651
4652
4653 class StoragePoolsResult(Type):
4654 _toSchema = {'error': 'error', 'storage_pools': 'storage-pools'}
4655 _toPy = {'error': 'error', 'storage-pools': 'storage_pools'}
4656 def __init__(self, error=None, storage_pools=None):
4657 '''
4658 error : Error
4659 storage_pools : typing.Sequence[~StoragePool]
4660 '''
4661 self.error = Error.from_json(error) if error else None
4662 self.storage_pools = [StoragePool.from_json(o) for o in storage_pools or []]
4663
4664
4665 class StoragePoolsResults(Type):
4666 _toSchema = {'results': 'results'}
4667 _toPy = {'results': 'results'}
4668 def __init__(self, results=None):
4669 '''
4670 results : typing.Sequence[~StoragePoolsResult]
4671 '''
4672 self.results = [StoragePoolsResult.from_json(o) for o in results or []]
4673
4674
4675 class StoragesAddParams(Type):
4676 _toSchema = {'storages': 'storages'}
4677 _toPy = {'storages': 'storages'}
4678 def __init__(self, storages=None):
4679 '''
4680 storages : typing.Sequence[~StorageAddParams]
4681 '''
4682 self.storages = [StorageAddParams.from_json(o) for o in storages or []]
4683
4684
4685 class VolumeDetails(Type):
4686 _toSchema = {'status': 'status', 'storage': 'storage', 'info': 'info', 'machine_attachments': 'machine-attachments', 'volume_tag': 'volume-tag'}
4687 _toPy = {'status': 'status', 'volume-tag': 'volume_tag', 'info': 'info', 'storage': 'storage', 'machine-attachments': 'machine_attachments'}
4688 def __init__(self, info=None, machine_attachments=None, status=None, storage=None, volume_tag=None):
4689 '''
4690 info : VolumeInfo
4691 machine_attachments : typing.Mapping[str, ~VolumeAttachmentInfo]
4692 status : EntityStatus
4693 storage : StorageDetails
4694 volume_tag : str
4695 '''
4696 self.info = VolumeInfo.from_json(info) if info else None
4697 self.machine_attachments = {k: VolumeAttachmentInfo.from_json(v) for k, v in (machine_attachments or dict()).items()}
4698 self.status = EntityStatus.from_json(status) if status else None
4699 self.storage = StorageDetails.from_json(storage) if storage else None
4700 self.volume_tag = volume_tag
4701
4702
4703 class VolumeDetailsListResult(Type):
4704 _toSchema = {'error': 'error', 'result': 'result'}
4705 _toPy = {'error': 'error', 'result': 'result'}
4706 def __init__(self, error=None, result=None):
4707 '''
4708 error : Error
4709 result : typing.Sequence[~VolumeDetails]
4710 '''
4711 self.error = Error.from_json(error) if error else None
4712 self.result = [VolumeDetails.from_json(o) for o in result or []]
4713
4714
4715 class VolumeDetailsListResults(Type):
4716 _toSchema = {'results': 'results'}
4717 _toPy = {'results': 'results'}
4718 def __init__(self, results=None):
4719 '''
4720 results : typing.Sequence[~VolumeDetailsListResult]
4721 '''
4722 self.results = [VolumeDetailsListResult.from_json(o) for o in results or []]
4723
4724
4725 class VolumeFilter(Type):
4726 _toSchema = {'machines': 'machines'}
4727 _toPy = {'machines': 'machines'}
4728 def __init__(self, machines=None):
4729 '''
4730 machines : typing.Sequence[str]
4731 '''
4732 self.machines = machines
4733
4734
4735 class VolumeFilters(Type):
4736 _toSchema = {'filters': 'filters'}
4737 _toPy = {'filters': 'filters'}
4738 def __init__(self, filters=None):
4739 '''
4740 filters : typing.Sequence[~VolumeFilter]
4741 '''
4742 self.filters = [VolumeFilter.from_json(o) for o in filters or []]
4743
4744
4745 class BlockDeviceResult(Type):
4746 _toSchema = {'error': 'error', 'result': 'result'}
4747 _toPy = {'error': 'error', 'result': 'result'}
4748 def __init__(self, error=None, result=None):
4749 '''
4750 error : Error
4751 result : BlockDevice
4752 '''
4753 self.error = Error.from_json(error) if error else None
4754 self.result = BlockDevice.from_json(result) if result else None
4755
4756
4757 class BlockDeviceResults(Type):
4758 _toSchema = {'results': 'results'}
4759 _toPy = {'results': 'results'}
4760 def __init__(self, results=None):
4761 '''
4762 results : typing.Sequence[~BlockDeviceResult]
4763 '''
4764 self.results = [BlockDeviceResult.from_json(o) for o in results or []]
4765
4766
4767 class Filesystem(Type):
4768 _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'volume_tag': 'volume-tag'}
4769 _toPy = {'volume-tag': 'volume_tag', 'info': 'info', 'filesystem-tag': 'filesystem_tag'}
4770 def __init__(self, filesystem_tag=None, info=None, volume_tag=None):
4771 '''
4772 filesystem_tag : str
4773 info : FilesystemInfo
4774 volume_tag : str
4775 '''
4776 self.filesystem_tag = filesystem_tag
4777 self.info = FilesystemInfo.from_json(info) if info else None
4778 self.volume_tag = volume_tag
4779
4780
4781 class FilesystemAttachment(Type):
4782 _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'machine_tag': 'machine-tag'}
4783 _toPy = {'machine-tag': 'machine_tag', 'info': 'info', 'filesystem-tag': 'filesystem_tag'}
4784 def __init__(self, filesystem_tag=None, info=None, machine_tag=None):
4785 '''
4786 filesystem_tag : str
4787 info : FilesystemAttachmentInfo
4788 machine_tag : str
4789 '''
4790 self.filesystem_tag = filesystem_tag
4791 self.info = FilesystemAttachmentInfo.from_json(info) if info else None
4792 self.machine_tag = machine_tag
4793
4794
4795 class FilesystemAttachmentParams(Type):
4796 _toSchema = {'mount_point': 'mount-point', 'filesystem_tag': 'filesystem-tag', 'machine_tag': 'machine-tag', 'instance_id': 'instance-id', 'provider': 'provider', 'filesystem_id': 'filesystem-id', 'read_only': 'read-only'}
4797 _toPy = {'machine-tag': 'machine_tag', 'filesystem-id': 'filesystem_id', 'provider': 'provider', 'filesystem-tag': 'filesystem_tag', 'mount-point': 'mount_point', 'instance-id': 'instance_id', 'read-only': 'read_only'}
4798 def __init__(self, filesystem_id=None, filesystem_tag=None, instance_id=None, machine_tag=None, mount_point=None, provider=None, read_only=None):
4799 '''
4800 filesystem_id : str
4801 filesystem_tag : str
4802 instance_id : str
4803 machine_tag : str
4804 mount_point : str
4805 provider : str
4806 read_only : bool
4807 '''
4808 self.filesystem_id = filesystem_id
4809 self.filesystem_tag = filesystem_tag
4810 self.instance_id = instance_id
4811 self.machine_tag = machine_tag
4812 self.mount_point = mount_point
4813 self.provider = provider
4814 self.read_only = read_only
4815
4816
4817 class FilesystemAttachmentParamsResult(Type):
4818 _toSchema = {'error': 'error', 'result': 'result'}
4819 _toPy = {'error': 'error', 'result': 'result'}
4820 def __init__(self, error=None, result=None):
4821 '''
4822 error : Error
4823 result : FilesystemAttachmentParams
4824 '''
4825 self.error = Error.from_json(error) if error else None
4826 self.result = FilesystemAttachmentParams.from_json(result) if result else None
4827
4828
4829 class FilesystemAttachmentParamsResults(Type):
4830 _toSchema = {'results': 'results'}
4831 _toPy = {'results': 'results'}
4832 def __init__(self, results=None):
4833 '''
4834 results : typing.Sequence[~FilesystemAttachmentParamsResult]
4835 '''
4836 self.results = [FilesystemAttachmentParamsResult.from_json(o) for o in results or []]
4837
4838
4839 class FilesystemAttachmentResult(Type):
4840 _toSchema = {'error': 'error', 'result': 'result'}
4841 _toPy = {'error': 'error', 'result': 'result'}
4842 def __init__(self, error=None, result=None):
4843 '''
4844 error : Error
4845 result : FilesystemAttachment
4846 '''
4847 self.error = Error.from_json(error) if error else None
4848 self.result = FilesystemAttachment.from_json(result) if result else None
4849
4850
4851 class FilesystemAttachmentResults(Type):
4852 _toSchema = {'results': 'results'}
4853 _toPy = {'results': 'results'}
4854 def __init__(self, results=None):
4855 '''
4856 results : typing.Sequence[~FilesystemAttachmentResult]
4857 '''
4858 self.results = [FilesystemAttachmentResult.from_json(o) for o in results or []]
4859
4860
4861 class FilesystemAttachments(Type):
4862 _toSchema = {'filesystem_attachments': 'filesystem-attachments'}
4863 _toPy = {'filesystem-attachments': 'filesystem_attachments'}
4864 def __init__(self, filesystem_attachments=None):
4865 '''
4866 filesystem_attachments : typing.Sequence[~FilesystemAttachment]
4867 '''
4868 self.filesystem_attachments = [FilesystemAttachment.from_json(o) for o in filesystem_attachments or []]
4869
4870
4871 class FilesystemParams(Type):
4872 _toSchema = {'filesystem_tag': 'filesystem-tag', 'tags': 'tags', 'provider': 'provider', 'size': 'size', 'attachment': 'attachment', 'attributes': 'attributes', 'volume_tag': 'volume-tag'}
4873 _toPy = {'volume-tag': 'volume_tag', 'tags': 'tags', 'filesystem-tag': 'filesystem_tag', 'provider': 'provider', 'size': 'size', 'attachment': 'attachment', 'attributes': 'attributes'}
4874 def __init__(self, attachment=None, attributes=None, filesystem_tag=None, provider=None, size=None, tags=None, volume_tag=None):
4875 '''
4876 attachment : FilesystemAttachmentParams
4877 attributes : typing.Mapping[str, typing.Any]
4878 filesystem_tag : str
4879 provider : str
4880 size : int
4881 tags : typing.Mapping[str, str]
4882 volume_tag : str
4883 '''
4884 self.attachment = FilesystemAttachmentParams.from_json(attachment) if attachment else None
4885 self.attributes = attributes
4886 self.filesystem_tag = filesystem_tag
4887 self.provider = provider
4888 self.size = size
4889 self.tags = tags
4890 self.volume_tag = volume_tag
4891
4892
4893 class FilesystemParamsResult(Type):
4894 _toSchema = {'error': 'error', 'result': 'result'}
4895 _toPy = {'error': 'error', 'result': 'result'}
4896 def __init__(self, error=None, result=None):
4897 '''
4898 error : Error
4899 result : FilesystemParams
4900 '''
4901 self.error = Error.from_json(error) if error else None
4902 self.result = FilesystemParams.from_json(result) if result else None
4903
4904
4905 class FilesystemParamsResults(Type):
4906 _toSchema = {'results': 'results'}
4907 _toPy = {'results': 'results'}
4908 def __init__(self, results=None):
4909 '''
4910 results : typing.Sequence[~FilesystemParamsResult]
4911 '''
4912 self.results = [FilesystemParamsResult.from_json(o) for o in results or []]
4913
4914
4915 class FilesystemResult(Type):
4916 _toSchema = {'error': 'error', 'result': 'result'}
4917 _toPy = {'error': 'error', 'result': 'result'}
4918 def __init__(self, error=None, result=None):
4919 '''
4920 error : Error
4921 result : Filesystem
4922 '''
4923 self.error = Error.from_json(error) if error else None
4924 self.result = Filesystem.from_json(result) if result else None
4925
4926
4927 class FilesystemResults(Type):
4928 _toSchema = {'results': 'results'}
4929 _toPy = {'results': 'results'}
4930 def __init__(self, results=None):
4931 '''
4932 results : typing.Sequence[~FilesystemResult]
4933 '''
4934 self.results = [FilesystemResult.from_json(o) for o in results or []]
4935
4936
4937 class Filesystems(Type):
4938 _toSchema = {'filesystems': 'filesystems'}
4939 _toPy = {'filesystems': 'filesystems'}
4940 def __init__(self, filesystems=None):
4941 '''
4942 filesystems : typing.Sequence[~Filesystem]
4943 '''
4944 self.filesystems = [Filesystem.from_json(o) for o in filesystems or []]
4945
4946
4947 class MachineStorageIds(Type):
4948 _toSchema = {'ids': 'ids'}
4949 _toPy = {'ids': 'ids'}
4950 def __init__(self, ids=None):
4951 '''
4952 ids : typing.Sequence[~MachineStorageId]
4953 '''
4954 self.ids = [MachineStorageId.from_json(o) for o in ids or []]
4955
4956
4957 class MachineStorageIdsWatchResults(Type):
4958 _toSchema = {'results': 'results'}
4959 _toPy = {'results': 'results'}
4960 def __init__(self, results=None):
4961 '''
4962 results : typing.Sequence[~MachineStorageIdsWatchResult]
4963 '''
4964 self.results = [MachineStorageIdsWatchResult.from_json(o) for o in results or []]
4965
4966
4967 class VolumeAttachment(Type):
4968 _toSchema = {'info': 'info', 'machine_tag': 'machine-tag', 'volume_tag': 'volume-tag'}
4969 _toPy = {'machine-tag': 'machine_tag', 'volume-tag': 'volume_tag', 'info': 'info'}
4970 def __init__(self, info=None, machine_tag=None, volume_tag=None):
4971 '''
4972 info : VolumeAttachmentInfo
4973 machine_tag : str
4974 volume_tag : str
4975 '''
4976 self.info = VolumeAttachmentInfo.from_json(info) if info else None
4977 self.machine_tag = machine_tag
4978 self.volume_tag = volume_tag
4979
4980
4981 class VolumeAttachmentParamsResult(Type):
4982 _toSchema = {'error': 'error', 'result': 'result'}
4983 _toPy = {'error': 'error', 'result': 'result'}
4984 def __init__(self, error=None, result=None):
4985 '''
4986 error : Error
4987 result : VolumeAttachmentParams
4988 '''
4989 self.error = Error.from_json(error) if error else None
4990 self.result = VolumeAttachmentParams.from_json(result) if result else None
4991
4992
4993 class VolumeAttachmentParamsResults(Type):
4994 _toSchema = {'results': 'results'}
4995 _toPy = {'results': 'results'}
4996 def __init__(self, results=None):
4997 '''
4998 results : typing.Sequence[~VolumeAttachmentParamsResult]
4999 '''
5000 self.results = [VolumeAttachmentParamsResult.from_json(o) for o in results or []]
5001
5002
5003 class VolumeAttachmentResult(Type):
5004 _toSchema = {'error': 'error', 'result': 'result'}
5005 _toPy = {'error': 'error', 'result': 'result'}
5006 def __init__(self, error=None, result=None):
5007 '''
5008 error : Error
5009 result : VolumeAttachment
5010 '''
5011 self.error = Error.from_json(error) if error else None
5012 self.result = VolumeAttachment.from_json(result) if result else None
5013
5014
5015 class VolumeAttachmentResults(Type):
5016 _toSchema = {'results': 'results'}
5017 _toPy = {'results': 'results'}
5018 def __init__(self, results=None):
5019 '''
5020 results : typing.Sequence[~VolumeAttachmentResult]
5021 '''
5022 self.results = [VolumeAttachmentResult.from_json(o) for o in results or []]
5023
5024
5025 class VolumeAttachments(Type):
5026 _toSchema = {'volume_attachments': 'volume-attachments'}
5027 _toPy = {'volume-attachments': 'volume_attachments'}
5028 def __init__(self, volume_attachments=None):
5029 '''
5030 volume_attachments : typing.Sequence[~VolumeAttachment]
5031 '''
5032 self.volume_attachments = [VolumeAttachment.from_json(o) for o in volume_attachments or []]
5033
5034
5035 class VolumeParamsResult(Type):
5036 _toSchema = {'error': 'error', 'result': 'result'}
5037 _toPy = {'error': 'error', 'result': 'result'}
5038 def __init__(self, error=None, result=None):
5039 '''
5040 error : Error
5041 result : VolumeParams
5042 '''
5043 self.error = Error.from_json(error) if error else None
5044 self.result = VolumeParams.from_json(result) if result else None
5045
5046
5047 class VolumeParamsResults(Type):
5048 _toSchema = {'results': 'results'}
5049 _toPy = {'results': 'results'}
5050 def __init__(self, results=None):
5051 '''
5052 results : typing.Sequence[~VolumeParamsResult]
5053 '''
5054 self.results = [VolumeParamsResult.from_json(o) for o in results or []]
5055
5056
5057 class VolumeResult(Type):
5058 _toSchema = {'error': 'error', 'result': 'result'}
5059 _toPy = {'error': 'error', 'result': 'result'}
5060 def __init__(self, error=None, result=None):
5061 '''
5062 error : Error
5063 result : Volume
5064 '''
5065 self.error = Error.from_json(error) if error else None
5066 self.result = Volume.from_json(result) if result else None
5067
5068
5069 class VolumeResults(Type):
5070 _toSchema = {'results': 'results'}
5071 _toPy = {'results': 'results'}
5072 def __init__(self, results=None):
5073 '''
5074 results : typing.Sequence[~VolumeResult]
5075 '''
5076 self.results = [VolumeResult.from_json(o) for o in results or []]
5077
5078
5079 class Volumes(Type):
5080 _toSchema = {'volumes': 'volumes'}
5081 _toPy = {'volumes': 'volumes'}
5082 def __init__(self, volumes=None):
5083 '''
5084 volumes : typing.Sequence[~Volume]
5085 '''
5086 self.volumes = [Volume.from_json(o) for o in volumes or []]
5087
5088
5089 class SpaceResult(Type):
5090 _toSchema = {'error': 'error', 'tag': 'tag'}
5091 _toPy = {'error': 'error', 'tag': 'tag'}
5092 def __init__(self, error=None, tag=None):
5093 '''
5094 error : Error
5095 tag : str
5096 '''
5097 self.error = Error.from_json(error) if error else None
5098 self.tag = tag
5099
5100
5101 class SpaceResults(Type):
5102 _toSchema = {'results': 'results'}
5103 _toPy = {'results': 'results'}
5104 def __init__(self, results=None):
5105 '''
5106 results : typing.Sequence[~SpaceResult]
5107 '''
5108 self.results = [SpaceResult.from_json(o) for o in results or []]
5109
5110
5111 class ZoneResult(Type):
5112 _toSchema = {'name': 'name', 'available': 'available', 'error': 'error'}
5113 _toPy = {'name': 'name', 'available': 'available', 'error': 'error'}
5114 def __init__(self, available=None, error=None, name=None):
5115 '''
5116 available : bool
5117 error : Error
5118 name : str
5119 '''
5120 self.available = available
5121 self.error = Error.from_json(error) if error else None
5122 self.name = name
5123
5124
5125 class ZoneResults(Type):
5126 _toSchema = {'results': 'results'}
5127 _toPy = {'results': 'results'}
5128 def __init__(self, results=None):
5129 '''
5130 results : typing.Sequence[~ZoneResult]
5131 '''
5132 self.results = [ZoneResult.from_json(o) for o in results or []]
5133
5134
5135 class UndertakerModelInfo(Type):
5136 _toSchema = {'name': 'name', 'uuid': 'uuid', 'is_system': 'is-system', 'global_name': 'global-name', 'life': 'life'}
5137 _toPy = {'name': 'name', 'is-system': 'is_system', 'life': 'life', 'global-name': 'global_name', 'uuid': 'uuid'}
5138 def __init__(self, global_name=None, is_system=None, life=None, name=None, uuid=None):
5139 '''
5140 global_name : str
5141 is_system : bool
5142 life : str
5143 name : str
5144 uuid : str
5145 '''
5146 self.global_name = global_name
5147 self.is_system = is_system
5148 self.life = life
5149 self.name = name
5150 self.uuid = uuid
5151
5152
5153 class UndertakerModelInfoResult(Type):
5154 _toSchema = {'error': 'error', 'result': 'result'}
5155 _toPy = {'error': 'error', 'result': 'result'}
5156 def __init__(self, error=None, result=None):
5157 '''
5158 error : Error
5159 result : UndertakerModelInfo
5160 '''
5161 self.error = Error.from_json(error) if error else None
5162 self.result = UndertakerModelInfo.from_json(result) if result else None
5163
5164
5165 class ApplicationStatusResult(Type):
5166 _toSchema = {'error': 'error', 'units': 'units', 'application': 'application'}
5167 _toPy = {'error': 'error', 'units': 'units', 'application': 'application'}
5168 def __init__(self, application=None, error=None, units=None):
5169 '''
5170 application : StatusResult
5171 error : Error
5172 units : typing.Mapping[str, ~StatusResult]
5173 '''
5174 self.application = StatusResult.from_json(application) if application else None
5175 self.error = Error.from_json(error) if error else None
5176 self.units = {k: StatusResult.from_json(v) for k, v in (units or dict()).items()}
5177
5178
5179 class ApplicationStatusResults(Type):
5180 _toSchema = {'results': 'results'}
5181 _toPy = {'results': 'results'}
5182 def __init__(self, results=None):
5183 '''
5184 results : typing.Sequence[~ApplicationStatusResult]
5185 '''
5186 self.results = [ApplicationStatusResult.from_json(o) for o in results or []]
5187
5188
5189 class CharmURLs(Type):
5190 _toSchema = {'urls': 'urls'}
5191 _toPy = {'urls': 'urls'}
5192 def __init__(self, urls=None):
5193 '''
5194 urls : typing.Sequence[~CharmURL]
5195 '''
5196 self.urls = [CharmURL.from_json(o) for o in urls or []]
5197
5198
5199 class ConfigSettingsResult(Type):
5200 _toSchema = {'error': 'error', 'settings': 'settings'}
5201 _toPy = {'error': 'error', 'settings': 'settings'}
5202 def __init__(self, error=None, settings=None):
5203 '''
5204 error : Error
5205 settings : typing.Mapping[str, typing.Any]
5206 '''
5207 self.error = Error.from_json(error) if error else None
5208 self.settings = settings
5209
5210
5211 class ConfigSettingsResults(Type):
5212 _toSchema = {'results': 'results'}
5213 _toPy = {'results': 'results'}
5214 def __init__(self, results=None):
5215 '''
5216 results : typing.Sequence[~ConfigSettingsResult]
5217 '''
5218 self.results = [ConfigSettingsResult.from_json(o) for o in results or []]
5219
5220
5221 class Endpoint(Type):
5222 _toSchema = {'relation': 'relation', 'application_name': 'application-name'}
5223 _toPy = {'relation': 'relation', 'application-name': 'application_name'}
5224 def __init__(self, application_name=None, relation=None):
5225 '''
5226 application_name : str
5227 relation : CharmRelation
5228 '''
5229 self.application_name = application_name
5230 self.relation = CharmRelation.from_json(relation) if relation else None
5231
5232
5233 class EntitiesCharmURL(Type):
5234 _toSchema = {'entities': 'entities'}
5235 _toPy = {'entities': 'entities'}
5236 def __init__(self, entities=None):
5237 '''
5238 entities : typing.Sequence[~EntityCharmURL]
5239 '''
5240 self.entities = [EntityCharmURL.from_json(o) for o in entities or []]
5241
5242
5243 class EntitiesPortRanges(Type):
5244 _toSchema = {'entities': 'entities'}
5245 _toPy = {'entities': 'entities'}
5246 def __init__(self, entities=None):
5247 '''
5248 entities : typing.Sequence[~EntityPortRange]
5249 '''
5250 self.entities = [EntityPortRange.from_json(o) for o in entities or []]
5251
5252
5253 class EntityCharmURL(Type):
5254 _toSchema = {'tag': 'tag', 'charm_url': 'charm-url'}
5255 _toPy = {'charm-url': 'charm_url', 'tag': 'tag'}
5256 def __init__(self, charm_url=None, tag=None):
5257 '''
5258 charm_url : str
5259 tag : str
5260 '''
5261 self.charm_url = charm_url
5262 self.tag = tag
5263
5264
5265 class EntityPortRange(Type):
5266 _toSchema = {'from_port': 'from-port', 'to_port': 'to-port', 'tag': 'tag', 'protocol': 'protocol'}
5267 _toPy = {'to-port': 'to_port', 'protocol': 'protocol', 'tag': 'tag', 'from-port': 'from_port'}
5268 def __init__(self, from_port=None, protocol=None, tag=None, to_port=None):
5269 '''
5270 from_port : int
5271 protocol : str
5272 tag : str
5273 to_port : int
5274 '''
5275 self.from_port = from_port
5276 self.protocol = protocol
5277 self.tag = tag
5278 self.to_port = to_port
5279
5280
5281 class EntityWorkloadVersion(Type):
5282 _toSchema = {'tag': 'tag', 'workload_version': 'workload-version'}
5283 _toPy = {'tag': 'tag', 'workload-version': 'workload_version'}
5284 def __init__(self, tag=None, workload_version=None):
5285 '''
5286 tag : str
5287 workload_version : str
5288 '''
5289 self.tag = tag
5290 self.workload_version = workload_version
5291
5292
5293 class EntityWorkloadVersions(Type):
5294 _toSchema = {'entities': 'entities'}
5295 _toPy = {'entities': 'entities'}
5296 def __init__(self, entities=None):
5297 '''
5298 entities : typing.Sequence[~EntityWorkloadVersion]
5299 '''
5300 self.entities = [EntityWorkloadVersion.from_json(o) for o in entities or []]
5301
5302
5303 class GetLeadershipSettingsBulkResults(Type):
5304 _toSchema = {'results': 'results'}
5305 _toPy = {'results': 'results'}
5306 def __init__(self, results=None):
5307 '''
5308 results : typing.Sequence[~GetLeadershipSettingsResult]
5309 '''
5310 self.results = [GetLeadershipSettingsResult.from_json(o) for o in results or []]
5311
5312
5313 class GetLeadershipSettingsResult(Type):
5314 _toSchema = {'error': 'error', 'settings': 'settings'}
5315 _toPy = {'error': 'error', 'settings': 'settings'}
5316 def __init__(self, error=None, settings=None):
5317 '''
5318 error : Error
5319 settings : typing.Mapping[str, str]
5320 '''
5321 self.error = Error.from_json(error) if error else None
5322 self.settings = settings
5323
5324
5325 class IntResult(Type):
5326 _toSchema = {'error': 'error', 'result': 'result'}
5327 _toPy = {'error': 'error', 'result': 'result'}
5328 def __init__(self, error=None, result=None):
5329 '''
5330 error : Error
5331 result : int
5332 '''
5333 self.error = Error.from_json(error) if error else None
5334 self.result = result
5335
5336
5337 class IntResults(Type):
5338 _toSchema = {'results': 'results'}
5339 _toPy = {'results': 'results'}
5340 def __init__(self, results=None):
5341 '''
5342 results : typing.Sequence[~IntResult]
5343 '''
5344 self.results = [IntResult.from_json(o) for o in results or []]
5345
5346
5347 class MergeLeadershipSettingsBulkParams(Type):
5348 _toSchema = {'params': 'params'}
5349 _toPy = {'params': 'params'}
5350 def __init__(self, params=None):
5351 '''
5352 params : typing.Sequence[~MergeLeadershipSettingsParam]
5353 '''
5354 self.params = [MergeLeadershipSettingsParam.from_json(o) for o in params or []]
5355
5356
5357 class MergeLeadershipSettingsParam(Type):
5358 _toSchema = {'application_tag': 'application-tag', 'settings': 'settings'}
5359 _toPy = {'settings': 'settings', 'application-tag': 'application_tag'}
5360 def __init__(self, application_tag=None, settings=None):
5361 '''
5362 application_tag : str
5363 settings : typing.Mapping[str, str]
5364 '''
5365 self.application_tag = application_tag
5366 self.settings = settings
5367
5368
5369 class ModelResult(Type):
5370 _toSchema = {'name': 'name', 'error': 'error', 'uuid': 'uuid'}
5371 _toPy = {'name': 'name', 'error': 'error', 'uuid': 'uuid'}
5372 def __init__(self, error=None, name=None, uuid=None):
5373 '''
5374 error : Error
5375 name : str
5376 uuid : str
5377 '''
5378 self.error = Error.from_json(error) if error else None
5379 self.name = name
5380 self.uuid = uuid
5381
5382
5383 class RelationIds(Type):
5384 _toSchema = {'relation_ids': 'relation-ids'}
5385 _toPy = {'relation-ids': 'relation_ids'}
5386 def __init__(self, relation_ids=None):
5387 '''
5388 relation_ids : typing.Sequence[int]
5389 '''
5390 self.relation_ids = relation_ids
5391
5392
5393 class RelationResult(Type):
5394 _toSchema = {'error': 'error', 'life': 'life', 'key': 'key', 'endpoint': 'endpoint', 'id_': 'id'}
5395 _toPy = {'error': 'error', 'life': 'life', 'key': 'key', 'id': 'id_', 'endpoint': 'endpoint'}
5396 def __init__(self, endpoint=None, error=None, id_=None, key=None, life=None):
5397 '''
5398 endpoint : Endpoint
5399 error : Error
5400 id_ : int
5401 key : str
5402 life : str
5403 '''
5404 self.endpoint = Endpoint.from_json(endpoint) if endpoint else None
5405 self.error = Error.from_json(error) if error else None
5406 self.id_ = id_
5407 self.key = key
5408 self.life = life
5409
5410
5411 class RelationResults(Type):
5412 _toSchema = {'results': 'results'}
5413 _toPy = {'results': 'results'}
5414 def __init__(self, results=None):
5415 '''
5416 results : typing.Sequence[~RelationResult]
5417 '''
5418 self.results = [RelationResult.from_json(o) for o in results or []]
5419
5420
5421 class RelationUnit(Type):
5422 _toSchema = {'relation': 'relation', 'unit': 'unit'}
5423 _toPy = {'relation': 'relation', 'unit': 'unit'}
5424 def __init__(self, relation=None, unit=None):
5425 '''
5426 relation : str
5427 unit : str
5428 '''
5429 self.relation = relation
5430 self.unit = unit
5431
5432
5433 class RelationUnitPair(Type):
5434 _toSchema = {'remote_unit': 'remote-unit', 'local_unit': 'local-unit', 'relation': 'relation'}
5435 _toPy = {'relation': 'relation', 'local-unit': 'local_unit', 'remote-unit': 'remote_unit'}
5436 def __init__(self, local_unit=None, relation=None, remote_unit=None):
5437 '''
5438 local_unit : str
5439 relation : str
5440 remote_unit : str
5441 '''
5442 self.local_unit = local_unit
5443 self.relation = relation
5444 self.remote_unit = remote_unit
5445
5446
5447 class RelationUnitPairs(Type):
5448 _toSchema = {'relation_unit_pairs': 'relation-unit-pairs'}
5449 _toPy = {'relation-unit-pairs': 'relation_unit_pairs'}
5450 def __init__(self, relation_unit_pairs=None):
5451 '''
5452 relation_unit_pairs : typing.Sequence[~RelationUnitPair]
5453 '''
5454 self.relation_unit_pairs = [RelationUnitPair.from_json(o) for o in relation_unit_pairs or []]
5455
5456
5457 class RelationUnitSettings(Type):
5458 _toSchema = {'relation': 'relation', 'unit': 'unit', 'settings': 'settings'}
5459 _toPy = {'relation': 'relation', 'unit': 'unit', 'settings': 'settings'}
5460 def __init__(self, relation=None, settings=None, unit=None):
5461 '''
5462 relation : str
5463 settings : typing.Mapping[str, str]
5464 unit : str
5465 '''
5466 self.relation = relation
5467 self.settings = settings
5468 self.unit = unit
5469
5470
5471 class RelationUnits(Type):
5472 _toSchema = {'relation_units': 'relation-units'}
5473 _toPy = {'relation-units': 'relation_units'}
5474 def __init__(self, relation_units=None):
5475 '''
5476 relation_units : typing.Sequence[~RelationUnit]
5477 '''
5478 self.relation_units = [RelationUnit.from_json(o) for o in relation_units or []]
5479
5480
5481 class RelationUnitsSettings(Type):
5482 _toSchema = {'relation_units': 'relation-units'}
5483 _toPy = {'relation-units': 'relation_units'}
5484 def __init__(self, relation_units=None):
5485 '''
5486 relation_units : typing.Sequence[~RelationUnitSettings]
5487 '''
5488 self.relation_units = [RelationUnitSettings.from_json(o) for o in relation_units or []]
5489
5490
5491 class RelationUnitsWatchResults(Type):
5492 _toSchema = {'results': 'results'}
5493 _toPy = {'results': 'results'}
5494 def __init__(self, results=None):
5495 '''
5496 results : typing.Sequence[~RelationUnitsWatchResult]
5497 '''
5498 self.results = [RelationUnitsWatchResult.from_json(o) for o in results or []]
5499
5500
5501 class ResolvedModeResult(Type):
5502 _toSchema = {'error': 'error', 'mode': 'mode'}
5503 _toPy = {'error': 'error', 'mode': 'mode'}
5504 def __init__(self, error=None, mode=None):
5505 '''
5506 error : Error
5507 mode : str
5508 '''
5509 self.error = Error.from_json(error) if error else None
5510 self.mode = mode
5511
5512
5513 class ResolvedModeResults(Type):
5514 _toSchema = {'results': 'results'}
5515 _toPy = {'results': 'results'}
5516 def __init__(self, results=None):
5517 '''
5518 results : typing.Sequence[~ResolvedModeResult]
5519 '''
5520 self.results = [ResolvedModeResult.from_json(o) for o in results or []]
5521
5522
5523 class SettingsResult(Type):
5524 _toSchema = {'error': 'error', 'settings': 'settings'}
5525 _toPy = {'error': 'error', 'settings': 'settings'}
5526 def __init__(self, error=None, settings=None):
5527 '''
5528 error : Error
5529 settings : typing.Mapping[str, str]
5530 '''
5531 self.error = Error.from_json(error) if error else None
5532 self.settings = settings
5533
5534
5535 class SettingsResults(Type):
5536 _toSchema = {'results': 'results'}
5537 _toPy = {'results': 'results'}
5538 def __init__(self, results=None):
5539 '''
5540 results : typing.Sequence[~SettingsResult]
5541 '''
5542 self.results = [SettingsResult.from_json(o) for o in results or []]
5543
5544
5545 class StorageAttachment(Type):
5546 _toSchema = {'unit_tag': 'unit-tag', 'location': 'location', 'storage_tag': 'storage-tag', 'kind': 'kind', 'owner_tag': 'owner-tag', 'life': 'life'}
5547 _toPy = {'location': 'location', 'owner-tag': 'owner_tag', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag', 'kind': 'kind', 'life': 'life'}
5548 def __init__(self, kind=None, life=None, location=None, owner_tag=None, storage_tag=None, unit_tag=None):
5549 '''
5550 kind : int
5551 life : str
5552 location : str
5553 owner_tag : str
5554 storage_tag : str
5555 unit_tag : str
5556 '''
5557 self.kind = kind
5558 self.life = life
5559 self.location = location
5560 self.owner_tag = owner_tag
5561 self.storage_tag = storage_tag
5562 self.unit_tag = unit_tag
5563
5564
5565 class StorageAttachmentId(Type):
5566 _toSchema = {'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
5567 _toPy = {'unit-tag': 'unit_tag', 'storage-tag': 'storage_tag'}
5568 def __init__(self, storage_tag=None, unit_tag=None):
5569 '''
5570 storage_tag : str
5571 unit_tag : str
5572 '''
5573 self.storage_tag = storage_tag
5574 self.unit_tag = unit_tag
5575
5576
5577 class StorageAttachmentIds(Type):
5578 _toSchema = {'ids': 'ids'}
5579 _toPy = {'ids': 'ids'}
5580 def __init__(self, ids=None):
5581 '''
5582 ids : typing.Sequence[~StorageAttachmentId]
5583 '''
5584 self.ids = [StorageAttachmentId.from_json(o) for o in ids or []]
5585
5586
5587 class StorageAttachmentIdsResult(Type):
5588 _toSchema = {'error': 'error', 'result': 'result'}
5589 _toPy = {'error': 'error', 'result': 'result'}
5590 def __init__(self, error=None, result=None):
5591 '''
5592 error : Error
5593 result : StorageAttachmentIds
5594 '''
5595 self.error = Error.from_json(error) if error else None
5596 self.result = StorageAttachmentIds.from_json(result) if result else None
5597
5598
5599 class StorageAttachmentIdsResults(Type):
5600 _toSchema = {'results': 'results'}
5601 _toPy = {'results': 'results'}
5602 def __init__(self, results=None):
5603 '''
5604 results : typing.Sequence[~StorageAttachmentIdsResult]
5605 '''
5606 self.results = [StorageAttachmentIdsResult.from_json(o) for o in results or []]
5607
5608
5609 class StorageAttachmentResult(Type):
5610 _toSchema = {'error': 'error', 'result': 'result'}
5611 _toPy = {'error': 'error', 'result': 'result'}
5612 def __init__(self, error=None, result=None):
5613 '''
5614 error : Error
5615 result : StorageAttachment
5616 '''
5617 self.error = Error.from_json(error) if error else None
5618 self.result = StorageAttachment.from_json(result) if result else None
5619
5620
5621 class StorageAttachmentResults(Type):
5622 _toSchema = {'results': 'results'}
5623 _toPy = {'results': 'results'}
5624 def __init__(self, results=None):
5625 '''
5626 results : typing.Sequence[~StorageAttachmentResult]
5627 '''
5628 self.results = [StorageAttachmentResult.from_json(o) for o in results or []]
5629
5630
5631 class StringBoolResult(Type):
5632 _toSchema = {'ok': 'ok', 'error': 'error', 'result': 'result'}
5633 _toPy = {'ok': 'ok', 'error': 'error', 'result': 'result'}
5634 def __init__(self, error=None, ok=None, result=None):
5635 '''
5636 error : Error
5637 ok : bool
5638 result : str
5639 '''
5640 self.error = Error.from_json(error) if error else None
5641 self.ok = ok
5642 self.result = result
5643
5644
5645 class StringBoolResults(Type):
5646 _toSchema = {'results': 'results'}
5647 _toPy = {'results': 'results'}
5648 def __init__(self, results=None):
5649 '''
5650 results : typing.Sequence[~StringBoolResult]
5651 '''
5652 self.results = [StringBoolResult.from_json(o) for o in results or []]
5653
5654
5655 class UnitNetworkConfig(Type):
5656 _toSchema = {'unit_tag': 'unit-tag', 'binding_name': 'binding-name'}
5657 _toPy = {'unit-tag': 'unit_tag', 'binding-name': 'binding_name'}
5658 def __init__(self, binding_name=None, unit_tag=None):
5659 '''
5660 binding_name : str
5661 unit_tag : str
5662 '''
5663 self.binding_name = binding_name
5664 self.unit_tag = unit_tag
5665
5666
5667 class UnitNetworkConfigResult(Type):
5668 _toSchema = {'error': 'error', 'info': 'info'}
5669 _toPy = {'error': 'error', 'info': 'info'}
5670 def __init__(self, error=None, info=None):
5671 '''
5672 error : Error
5673 info : typing.Sequence[~NetworkConfig]
5674 '''
5675 self.error = Error.from_json(error) if error else None
5676 self.info = [NetworkConfig.from_json(o) for o in info or []]
5677
5678
5679 class UnitNetworkConfigResults(Type):
5680 _toSchema = {'results': 'results'}
5681 _toPy = {'results': 'results'}
5682 def __init__(self, results=None):
5683 '''
5684 results : typing.Sequence[~UnitNetworkConfigResult]
5685 '''
5686 self.results = [UnitNetworkConfigResult.from_json(o) for o in results or []]
5687
5688
5689 class UnitsNetworkConfig(Type):
5690 _toSchema = {'args': 'args'}
5691 _toPy = {'args': 'args'}
5692 def __init__(self, args=None):
5693 '''
5694 args : typing.Sequence[~UnitNetworkConfig]
5695 '''
5696 self.args = [UnitNetworkConfig.from_json(o) for o in args or []]
5697
5698
5699 class EntitiesVersion(Type):
5700 _toSchema = {'agent_tools': 'agent-tools'}
5701 _toPy = {'agent-tools': 'agent_tools'}
5702 def __init__(self, agent_tools=None):
5703 '''
5704 agent_tools : typing.Sequence[~EntityVersion]
5705 '''
5706 self.agent_tools = [EntityVersion.from_json(o) for o in agent_tools or []]
5707
5708
5709 class EntityVersion(Type):
5710 _toSchema = {'tools': 'tools', 'tag': 'tag'}
5711 _toPy = {'tools': 'tools', 'tag': 'tag'}
5712 def __init__(self, tag=None, tools=None):
5713 '''
5714 tag : str
5715 tools : Version
5716 '''
5717 self.tag = tag
5718 self.tools = Version.from_json(tools) if tools else None
5719
5720
5721 class VersionResult(Type):
5722 _toSchema = {'error': 'error', 'version': 'version'}
5723 _toPy = {'error': 'error', 'version': 'version'}
5724 def __init__(self, error=None, version=None):
5725 '''
5726 error : Error
5727 version : Number
5728 '''
5729 self.error = Error.from_json(error) if error else None
5730 self.version = Number.from_json(version) if version else None
5731
5732
5733 class VersionResults(Type):
5734 _toSchema = {'results': 'results'}
5735 _toPy = {'results': 'results'}
5736 def __init__(self, results=None):
5737 '''
5738 results : typing.Sequence[~VersionResult]
5739 '''
5740 self.results = [VersionResult.from_json(o) for o in results or []]
5741
5742
5743 class AddUser(Type):
5744 _toSchema = {'display_name': 'display-name', 'shared_model_tags': 'shared-model-tags', 'password': 'password', 'model_access_permission': 'model-access-permission', 'username': 'username'}
5745 _toPy = {'username': 'username', 'display-name': 'display_name', 'password': 'password', 'model-access-permission': 'model_access_permission', 'shared-model-tags': 'shared_model_tags'}
5746 def __init__(self, display_name=None, model_access_permission=None, password=None, shared_model_tags=None, username=None):
5747 '''
5748 display_name : str
5749 model_access_permission : str
5750 password : str
5751 shared_model_tags : typing.Sequence[str]
5752 username : str
5753 '''
5754 self.display_name = display_name
5755 self.model_access_permission = model_access_permission
5756 self.password = password
5757 self.shared_model_tags = shared_model_tags
5758 self.username = username
5759
5760
5761 class AddUserResult(Type):
5762 _toSchema = {'error': 'error', 'secret_key': 'secret-key', 'tag': 'tag'}
5763 _toPy = {'error': 'error', 'tag': 'tag', 'secret-key': 'secret_key'}
5764 def __init__(self, error=None, secret_key=None, tag=None):
5765 '''
5766 error : Error
5767 secret_key : typing.Sequence[int]
5768 tag : str
5769 '''
5770 self.error = Error.from_json(error) if error else None
5771 self.secret_key = secret_key
5772 self.tag = tag
5773
5774
5775 class AddUserResults(Type):
5776 _toSchema = {'results': 'results'}
5777 _toPy = {'results': 'results'}
5778 def __init__(self, results=None):
5779 '''
5780 results : typing.Sequence[~AddUserResult]
5781 '''
5782 self.results = [AddUserResult.from_json(o) for o in results or []]
5783
5784
5785 class AddUsers(Type):
5786 _toSchema = {'users': 'users'}
5787 _toPy = {'users': 'users'}
5788 def __init__(self, users=None):
5789 '''
5790 users : typing.Sequence[~AddUser]
5791 '''
5792 self.users = [AddUser.from_json(o) for o in users or []]
5793
5794
5795 class MacaroonResult(Type):
5796 _toSchema = {'error': 'error', 'result': 'result'}
5797 _toPy = {'error': 'error', 'result': 'result'}
5798 def __init__(self, error=None, result=None):
5799 '''
5800 error : Error
5801 result : Macaroon
5802 '''
5803 self.error = Error.from_json(error) if error else None
5804 self.result = Macaroon.from_json(result) if result else None
5805
5806
5807 class MacaroonResults(Type):
5808 _toSchema = {'results': 'results'}
5809 _toPy = {'results': 'results'}
5810 def __init__(self, results=None):
5811 '''
5812 results : typing.Sequence[~MacaroonResult]
5813 '''
5814 self.results = [MacaroonResult.from_json(o) for o in results or []]
5815
5816
5817 class UserInfo(Type):
5818 _toSchema = {'display_name': 'display-name', 'username': 'username', 'date_created': 'date-created', 'created_by': 'created-by', 'last_connection': 'last-connection', 'disabled': 'disabled'}
5819 _toPy = {'username': 'username', 'display-name': 'display_name', 'created-by': 'created_by', 'last-connection': 'last_connection', 'disabled': 'disabled', 'date-created': 'date_created'}
5820 def __init__(self, created_by=None, date_created=None, disabled=None, display_name=None, last_connection=None, username=None):
5821 '''
5822 created_by : str
5823 date_created : str
5824 disabled : bool
5825 display_name : str
5826 last_connection : str
5827 username : str
5828 '''
5829 self.created_by = created_by
5830 self.date_created = date_created
5831 self.disabled = disabled
5832 self.display_name = display_name
5833 self.last_connection = last_connection
5834 self.username = username
5835
5836
5837 class UserInfoRequest(Type):
5838 _toSchema = {'entities': 'entities', 'include_disabled': 'include-disabled'}
5839 _toPy = {'entities': 'entities', 'include-disabled': 'include_disabled'}
5840 def __init__(self, entities=None, include_disabled=None):
5841 '''
5842 entities : typing.Sequence[~Entity]
5843 include_disabled : bool
5844 '''
5845 self.entities = [Entity.from_json(o) for o in entities or []]
5846 self.include_disabled = include_disabled
5847
5848
5849 class UserInfoResult(Type):
5850 _toSchema = {'error': 'error', 'result': 'result'}
5851 _toPy = {'error': 'error', 'result': 'result'}
5852 def __init__(self, error=None, result=None):
5853 '''
5854 error : Error
5855 result : UserInfo
5856 '''
5857 self.error = Error.from_json(error) if error else None
5858 self.result = UserInfo.from_json(result) if result else None
5859
5860
5861 class UserInfoResults(Type):
5862 _toSchema = {'results': 'results'}
5863 _toPy = {'results': 'results'}
5864 def __init__(self, results=None):
5865 '''
5866 results : typing.Sequence[~UserInfoResult]
5867 '''
5868 self.results = [UserInfoResult.from_json(o) for o in results or []]
5869
5870
5871 class ActionFacade(Type):
5872 name = 'Action'
5873 version = 2
5874 schema = {'definitions': {'Action': {'additionalProperties': False,
5875 'properties': {'name': {'type': 'string'},
5876 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
5877 'type': 'object'}},
5878 'type': 'object'},
5879 'receiver': {'type': 'string'},
5880 'tag': {'type': 'string'}},
5881 'required': ['tag', 'receiver', 'name'],
5882 'type': 'object'},
5883 'ActionResult': {'additionalProperties': False,
5884 'properties': {'action': {'$ref': '#/definitions/Action'},
5885 'completed': {'format': 'date-time',
5886 'type': 'string'},
5887 'enqueued': {'format': 'date-time',
5888 'type': 'string'},
5889 'error': {'$ref': '#/definitions/Error'},
5890 'message': {'type': 'string'},
5891 'output': {'patternProperties': {'.*': {'additionalProperties': True,
5892 'type': 'object'}},
5893 'type': 'object'},
5894 'started': {'format': 'date-time',
5895 'type': 'string'},
5896 'status': {'type': 'string'}},
5897 'type': 'object'},
5898 'ActionResults': {'additionalProperties': False,
5899 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
5900 'type': 'array'}},
5901 'type': 'object'},
5902 'ActionSpec': {'additionalProperties': False,
5903 'properties': {'description': {'type': 'string'},
5904 'params': {'patternProperties': {'.*': {'additionalProperties': True,
5905 'type': 'object'}},
5906 'type': 'object'}},
5907 'required': ['description', 'params'],
5908 'type': 'object'},
5909 'Actions': {'additionalProperties': False,
5910 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
5911 'type': 'array'}},
5912 'type': 'object'},
5913 'ActionsByName': {'additionalProperties': False,
5914 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5915 'type': 'array'},
5916 'error': {'$ref': '#/definitions/Error'},
5917 'name': {'type': 'string'}},
5918 'type': 'object'},
5919 'ActionsByNames': {'additionalProperties': False,
5920 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
5921 'type': 'array'}},
5922 'type': 'object'},
5923 'ActionsByReceiver': {'additionalProperties': False,
5924 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5925 'type': 'array'},
5926 'error': {'$ref': '#/definitions/Error'},
5927 'receiver': {'type': 'string'}},
5928 'type': 'object'},
5929 'ActionsByReceivers': {'additionalProperties': False,
5930 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
5931 'type': 'array'}},
5932 'type': 'object'},
5933 'ApplicationCharmActionsResult': {'additionalProperties': False,
5934 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
5935 'type': 'object'},
5936 'application-tag': {'type': 'string'},
5937 'error': {'$ref': '#/definitions/Error'}},
5938 'type': 'object'},
5939 'ApplicationsCharmActionsResults': {'additionalProperties': False,
5940 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
5941 'type': 'array'}},
5942 'type': 'object'},
5943 'Entities': {'additionalProperties': False,
5944 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5945 'type': 'array'}},
5946 'required': ['entities'],
5947 'type': 'object'},
5948 'Entity': {'additionalProperties': False,
5949 'properties': {'tag': {'type': 'string'}},
5950 'required': ['tag'],
5951 'type': 'object'},
5952 'Error': {'additionalProperties': False,
5953 'properties': {'code': {'type': 'string'},
5954 'info': {'$ref': '#/definitions/ErrorInfo'},
5955 'message': {'type': 'string'}},
5956 'required': ['message', 'code'],
5957 'type': 'object'},
5958 'ErrorInfo': {'additionalProperties': False,
5959 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5960 'macaroon-path': {'type': 'string'}},
5961 'type': 'object'},
5962 'FindActionsByNames': {'additionalProperties': False,
5963 'properties': {'names': {'items': {'type': 'string'},
5964 'type': 'array'}},
5965 'type': 'object'},
5966 'FindTags': {'additionalProperties': False,
5967 'properties': {'prefixes': {'items': {'type': 'string'},
5968 'type': 'array'}},
5969 'required': ['prefixes'],
5970 'type': 'object'},
5971 'FindTagsResults': {'additionalProperties': False,
5972 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
5973 'type': 'array'}},
5974 'type': 'object'}},
5975 'required': ['matches'],
5976 'type': 'object'},
5977 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5978 'RunParams': {'additionalProperties': False,
5979 'properties': {'applications': {'items': {'type': 'string'},
5980 'type': 'array'},
5981 'commands': {'type': 'string'},
5982 'machines': {'items': {'type': 'string'},
5983 'type': 'array'},
5984 'timeout': {'type': 'integer'},
5985 'units': {'items': {'type': 'string'},
5986 'type': 'array'}},
5987 'required': ['commands', 'timeout'],
5988 'type': 'object'}},
5989 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5990 'Result': {'$ref': '#/definitions/ActionResults'}},
5991 'type': 'object'},
5992 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5993 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
5994 'type': 'object'},
5995 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5996 'Result': {'$ref': '#/definitions/ActionResults'}},
5997 'type': 'object'},
5998 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
5999 'Result': {'$ref': '#/definitions/ActionResults'}},
6000 'type': 'object'},
6001 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
6002 'Result': {'$ref': '#/definitions/FindTagsResults'}},
6003 'type': 'object'},
6004 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
6005 'Result': {'$ref': '#/definitions/ActionsByNames'}},
6006 'type': 'object'},
6007 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6008 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6009 'type': 'object'},
6010 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6011 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6012 'type': 'object'},
6013 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6014 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6015 'type': 'object'},
6016 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6017 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6018 'type': 'object'},
6019 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6020 'Result': {'$ref': '#/definitions/ActionResults'}},
6021 'type': 'object'},
6022 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6023 'Result': {'$ref': '#/definitions/ActionResults'}},
6024 'type': 'object'}},
6025 'type': 'object'}
6026
6027
6028 @ReturnMapping(ActionResults)
6029 async def Actions(self, entities):
6030 '''
6031 entities : typing.Sequence[~Entity]
6032 Returns -> typing.Sequence[~ActionResult]
6033 '''
6034 # map input types to rpc msg
6035 params = dict()
6036 msg = dict(Type='Action', Request='Actions', Version=2, Params=params)
6037 params['entities'] = entities
6038 reply = await self.rpc(msg)
6039 return reply
6040
6041
6042
6043 @ReturnMapping(ApplicationsCharmActionsResults)
6044 async def ApplicationsCharmsActions(self, entities):
6045 '''
6046 entities : typing.Sequence[~Entity]
6047 Returns -> typing.Sequence[~ApplicationCharmActionsResult]
6048 '''
6049 # map input types to rpc msg
6050 params = dict()
6051 msg = dict(Type='Action', Request='ApplicationsCharmsActions', Version=2, Params=params)
6052 params['entities'] = entities
6053 reply = await self.rpc(msg)
6054 return reply
6055
6056
6057
6058 @ReturnMapping(ActionResults)
6059 async def Cancel(self, entities):
6060 '''
6061 entities : typing.Sequence[~Entity]
6062 Returns -> typing.Sequence[~ActionResult]
6063 '''
6064 # map input types to rpc msg
6065 params = dict()
6066 msg = dict(Type='Action', Request='Cancel', Version=2, Params=params)
6067 params['entities'] = entities
6068 reply = await self.rpc(msg)
6069 return reply
6070
6071
6072
6073 @ReturnMapping(ActionResults)
6074 async def Enqueue(self, actions):
6075 '''
6076 actions : typing.Sequence[~Action]
6077 Returns -> typing.Sequence[~ActionResult]
6078 '''
6079 # map input types to rpc msg
6080 params = dict()
6081 msg = dict(Type='Action', Request='Enqueue', Version=2, Params=params)
6082 params['actions'] = actions
6083 reply = await self.rpc(msg)
6084 return reply
6085
6086
6087
6088 @ReturnMapping(FindTagsResults)
6089 async def FindActionTagsByPrefix(self, prefixes):
6090 '''
6091 prefixes : typing.Sequence[str]
6092 Returns -> typing.Sequence[~Entity]
6093 '''
6094 # map input types to rpc msg
6095 params = dict()
6096 msg = dict(Type='Action', Request='FindActionTagsByPrefix', Version=2, Params=params)
6097 params['prefixes'] = prefixes
6098 reply = await self.rpc(msg)
6099 return reply
6100
6101
6102
6103 @ReturnMapping(ActionsByNames)
6104 async def FindActionsByNames(self, names):
6105 '''
6106 names : typing.Sequence[str]
6107 Returns -> typing.Sequence[~ActionsByName]
6108 '''
6109 # map input types to rpc msg
6110 params = dict()
6111 msg = dict(Type='Action', Request='FindActionsByNames', Version=2, Params=params)
6112 params['names'] = names
6113 reply = await self.rpc(msg)
6114 return reply
6115
6116
6117
6118 @ReturnMapping(ActionsByReceivers)
6119 async def ListAll(self, entities):
6120 '''
6121 entities : typing.Sequence[~Entity]
6122 Returns -> typing.Sequence[~ActionsByReceiver]
6123 '''
6124 # map input types to rpc msg
6125 params = dict()
6126 msg = dict(Type='Action', Request='ListAll', Version=2, Params=params)
6127 params['entities'] = entities
6128 reply = await self.rpc(msg)
6129 return reply
6130
6131
6132
6133 @ReturnMapping(ActionsByReceivers)
6134 async def ListCompleted(self, entities):
6135 '''
6136 entities : typing.Sequence[~Entity]
6137 Returns -> typing.Sequence[~ActionsByReceiver]
6138 '''
6139 # map input types to rpc msg
6140 params = dict()
6141 msg = dict(Type='Action', Request='ListCompleted', Version=2, Params=params)
6142 params['entities'] = entities
6143 reply = await self.rpc(msg)
6144 return reply
6145
6146
6147
6148 @ReturnMapping(ActionsByReceivers)
6149 async def ListPending(self, entities):
6150 '''
6151 entities : typing.Sequence[~Entity]
6152 Returns -> typing.Sequence[~ActionsByReceiver]
6153 '''
6154 # map input types to rpc msg
6155 params = dict()
6156 msg = dict(Type='Action', Request='ListPending', Version=2, Params=params)
6157 params['entities'] = entities
6158 reply = await self.rpc(msg)
6159 return reply
6160
6161
6162
6163 @ReturnMapping(ActionsByReceivers)
6164 async def ListRunning(self, entities):
6165 '''
6166 entities : typing.Sequence[~Entity]
6167 Returns -> typing.Sequence[~ActionsByReceiver]
6168 '''
6169 # map input types to rpc msg
6170 params = dict()
6171 msg = dict(Type='Action', Request='ListRunning', Version=2, Params=params)
6172 params['entities'] = entities
6173 reply = await self.rpc(msg)
6174 return reply
6175
6176
6177
6178 @ReturnMapping(ActionResults)
6179 async def Run(self, applications, commands, machines, timeout, units):
6180 '''
6181 applications : typing.Sequence[str]
6182 commands : str
6183 machines : typing.Sequence[str]
6184 timeout : int
6185 units : typing.Sequence[str]
6186 Returns -> typing.Sequence[~ActionResult]
6187 '''
6188 # map input types to rpc msg
6189 params = dict()
6190 msg = dict(Type='Action', Request='Run', Version=2, Params=params)
6191 params['applications'] = applications
6192 params['commands'] = commands
6193 params['machines'] = machines
6194 params['timeout'] = timeout
6195 params['units'] = units
6196 reply = await self.rpc(msg)
6197 return reply
6198
6199
6200
6201 @ReturnMapping(ActionResults)
6202 async def RunOnAllMachines(self, applications, commands, machines, timeout, units):
6203 '''
6204 applications : typing.Sequence[str]
6205 commands : str
6206 machines : typing.Sequence[str]
6207 timeout : int
6208 units : typing.Sequence[str]
6209 Returns -> typing.Sequence[~ActionResult]
6210 '''
6211 # map input types to rpc msg
6212 params = dict()
6213 msg = dict(Type='Action', Request='RunOnAllMachines', Version=2, Params=params)
6214 params['applications'] = applications
6215 params['commands'] = commands
6216 params['machines'] = machines
6217 params['timeout'] = timeout
6218 params['units'] = units
6219 reply = await self.rpc(msg)
6220 return reply
6221
6222
6223 class AgentFacade(Type):
6224 name = 'Agent'
6225 version = 2
6226 schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
6227 'properties': {'container-type': {'type': 'string'},
6228 'error': {'$ref': '#/definitions/Error'},
6229 'jobs': {'items': {'type': 'string'},
6230 'type': 'array'},
6231 'life': {'type': 'string'}},
6232 'required': ['life',
6233 'jobs',
6234 'container-type'],
6235 'type': 'object'},
6236 'AgentGetEntitiesResults': {'additionalProperties': False,
6237 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
6238 'type': 'array'}},
6239 'required': ['entities'],
6240 'type': 'object'},
6241 'ControllerConfigResult': {'additionalProperties': False,
6242 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6243 'type': 'object'}},
6244 'type': 'object'}},
6245 'required': ['config'],
6246 'type': 'object'},
6247 'Entities': {'additionalProperties': False,
6248 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6249 'type': 'array'}},
6250 'required': ['entities'],
6251 'type': 'object'},
6252 'Entity': {'additionalProperties': False,
6253 'properties': {'tag': {'type': 'string'}},
6254 'required': ['tag'],
6255 'type': 'object'},
6256 'EntityPassword': {'additionalProperties': False,
6257 'properties': {'password': {'type': 'string'},
6258 'tag': {'type': 'string'}},
6259 'required': ['tag', 'password'],
6260 'type': 'object'},
6261 'EntityPasswords': {'additionalProperties': False,
6262 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
6263 'type': 'array'}},
6264 'required': ['changes'],
6265 'type': 'object'},
6266 'Error': {'additionalProperties': False,
6267 'properties': {'code': {'type': 'string'},
6268 'info': {'$ref': '#/definitions/ErrorInfo'},
6269 'message': {'type': 'string'}},
6270 'required': ['message', 'code'],
6271 'type': 'object'},
6272 'ErrorInfo': {'additionalProperties': False,
6273 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6274 'macaroon-path': {'type': 'string'}},
6275 'type': 'object'},
6276 'ErrorResult': {'additionalProperties': False,
6277 'properties': {'error': {'$ref': '#/definitions/Error'}},
6278 'type': 'object'},
6279 'ErrorResults': {'additionalProperties': False,
6280 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6281 'type': 'array'}},
6282 'required': ['results'],
6283 'type': 'object'},
6284 'IsMasterResult': {'additionalProperties': False,
6285 'properties': {'master': {'type': 'boolean'}},
6286 'required': ['master'],
6287 'type': 'object'},
6288 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6289 'ModelConfigResult': {'additionalProperties': False,
6290 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6291 'type': 'object'}},
6292 'type': 'object'}},
6293 'required': ['config'],
6294 'type': 'object'},
6295 'NotifyWatchResult': {'additionalProperties': False,
6296 'properties': {'NotifyWatcherId': {'type': 'string'},
6297 'error': {'$ref': '#/definitions/Error'}},
6298 'required': ['NotifyWatcherId'],
6299 'type': 'object'},
6300 'StateServingInfo': {'additionalProperties': False,
6301 'properties': {'api-port': {'type': 'integer'},
6302 'ca-private-key': {'type': 'string'},
6303 'cert': {'type': 'string'},
6304 'private-key': {'type': 'string'},
6305 'shared-secret': {'type': 'string'},
6306 'state-port': {'type': 'integer'},
6307 'system-identity': {'type': 'string'}},
6308 'required': ['api-port',
6309 'state-port',
6310 'cert',
6311 'private-key',
6312 'ca-private-key',
6313 'shared-secret',
6314 'system-identity'],
6315 'type': 'object'}},
6316 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6317 'Result': {'$ref': '#/definitions/ErrorResults'}},
6318 'type': 'object'},
6319 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
6320 'type': 'object'},
6321 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6322 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
6323 'type': 'object'},
6324 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
6325 'type': 'object'},
6326 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6327 'type': 'object'},
6328 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6329 'Result': {'$ref': '#/definitions/ErrorResults'}},
6330 'type': 'object'},
6331 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
6332 'type': 'object'},
6333 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6334 'type': 'object'}},
6335 'type': 'object'}
6336
6337
6338 @ReturnMapping(ErrorResults)
6339 async def ClearReboot(self, entities):
6340 '''
6341 entities : typing.Sequence[~Entity]
6342 Returns -> typing.Sequence[~ErrorResult]
6343 '''
6344 # map input types to rpc msg
6345 params = dict()
6346 msg = dict(Type='Agent', Request='ClearReboot', Version=2, Params=params)
6347 params['entities'] = entities
6348 reply = await self.rpc(msg)
6349 return reply
6350
6351
6352
6353 @ReturnMapping(ControllerConfigResult)
6354 async def ControllerConfig(self):
6355 '''
6356
6357 Returns -> typing.Mapping[str, typing.Any]
6358 '''
6359 # map input types to rpc msg
6360 params = dict()
6361 msg = dict(Type='Agent', Request='ControllerConfig', Version=2, Params=params)
6362
6363 reply = await self.rpc(msg)
6364 return reply
6365
6366
6367
6368 @ReturnMapping(AgentGetEntitiesResults)
6369 async def GetEntities(self, entities):
6370 '''
6371 entities : typing.Sequence[~Entity]
6372 Returns -> typing.Sequence[~AgentGetEntitiesResult]
6373 '''
6374 # map input types to rpc msg
6375 params = dict()
6376 msg = dict(Type='Agent', Request='GetEntities', Version=2, Params=params)
6377 params['entities'] = entities
6378 reply = await self.rpc(msg)
6379 return reply
6380
6381
6382
6383 @ReturnMapping(IsMasterResult)
6384 async def IsMaster(self):
6385 '''
6386
6387 Returns -> bool
6388 '''
6389 # map input types to rpc msg
6390 params = dict()
6391 msg = dict(Type='Agent', Request='IsMaster', Version=2, Params=params)
6392
6393 reply = await self.rpc(msg)
6394 return reply
6395
6396
6397
6398 @ReturnMapping(ModelConfigResult)
6399 async def ModelConfig(self):
6400 '''
6401
6402 Returns -> typing.Mapping[str, typing.Any]
6403 '''
6404 # map input types to rpc msg
6405 params = dict()
6406 msg = dict(Type='Agent', Request='ModelConfig', Version=2, Params=params)
6407
6408 reply = await self.rpc(msg)
6409 return reply
6410
6411
6412
6413 @ReturnMapping(ErrorResults)
6414 async def SetPasswords(self, changes):
6415 '''
6416 changes : typing.Sequence[~EntityPassword]
6417 Returns -> typing.Sequence[~ErrorResult]
6418 '''
6419 # map input types to rpc msg
6420 params = dict()
6421 msg = dict(Type='Agent', Request='SetPasswords', Version=2, Params=params)
6422 params['changes'] = changes
6423 reply = await self.rpc(msg)
6424 return reply
6425
6426
6427
6428 @ReturnMapping(StateServingInfo)
6429 async def StateServingInfo(self):
6430 '''
6431
6432 Returns -> typing.Union[int, str]
6433 '''
6434 # map input types to rpc msg
6435 params = dict()
6436 msg = dict(Type='Agent', Request='StateServingInfo', Version=2, Params=params)
6437
6438 reply = await self.rpc(msg)
6439 return reply
6440
6441
6442
6443 @ReturnMapping(NotifyWatchResult)
6444 async def WatchForModelConfigChanges(self):
6445 '''
6446
6447 Returns -> typing.Union[str, _ForwardRef('Error')]
6448 '''
6449 # map input types to rpc msg
6450 params = dict()
6451 msg = dict(Type='Agent', Request='WatchForModelConfigChanges', Version=2, Params=params)
6452
6453 reply = await self.rpc(msg)
6454 return reply
6455
6456
6457 class AgentToolsFacade(Type):
6458 name = 'AgentTools'
6459 version = 1
6460 schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
6461
6462
6463 @ReturnMapping(None)
6464 async def UpdateToolsAvailable(self):
6465 '''
6466
6467 Returns -> None
6468 '''
6469 # map input types to rpc msg
6470 params = dict()
6471 msg = dict(Type='AgentTools', Request='UpdateToolsAvailable', Version=1, Params=params)
6472
6473 reply = await self.rpc(msg)
6474 return reply
6475
6476
6477 class AllModelWatcherFacade(Type):
6478 name = 'AllModelWatcher'
6479 version = 2
6480 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6481 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
6482 'type': 'array'}},
6483 'required': ['deltas'],
6484 'type': 'object'},
6485 'Delta': {'additionalProperties': False,
6486 'properties': {'entity': {'additionalProperties': True,
6487 'type': 'object'},
6488 'removed': {'type': 'boolean'}},
6489 'required': ['removed', 'entity'],
6490 'type': 'object'}},
6491 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6492 'type': 'object'},
6493 'Stop': {'type': 'object'}},
6494 'type': 'object'}
6495
6496
6497 @ReturnMapping(AllWatcherNextResults)
6498 async def Next(self):
6499 '''
6500
6501 Returns -> typing.Sequence[~Delta]
6502 '''
6503 # map input types to rpc msg
6504 params = dict()
6505 msg = dict(Type='AllModelWatcher', Request='Next', Version=2, Params=params)
6506
6507 reply = await self.rpc(msg)
6508 return reply
6509
6510
6511
6512 @ReturnMapping(None)
6513 async def Stop(self):
6514 '''
6515
6516 Returns -> None
6517 '''
6518 # map input types to rpc msg
6519 params = dict()
6520 msg = dict(Type='AllModelWatcher', Request='Stop', Version=2, Params=params)
6521
6522 reply = await self.rpc(msg)
6523 return reply
6524
6525
6526 class AllWatcherFacade(Type):
6527 name = 'AllWatcher'
6528 version = 1
6529 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6530 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
6531 'type': 'array'}},
6532 'required': ['deltas'],
6533 'type': 'object'},
6534 'Delta': {'additionalProperties': False,
6535 'properties': {'entity': {'additionalProperties': True,
6536 'type': 'object'},
6537 'removed': {'type': 'boolean'}},
6538 'required': ['removed', 'entity'],
6539 'type': 'object'}},
6540 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6541 'type': 'object'},
6542 'Stop': {'type': 'object'}},
6543 'type': 'object'}
6544
6545
6546 @ReturnMapping(AllWatcherNextResults)
6547 async def Next(self):
6548 '''
6549
6550 Returns -> typing.Sequence[~Delta]
6551 '''
6552 # map input types to rpc msg
6553 params = dict()
6554 msg = dict(Type='AllWatcher', Request='Next', Version=1, Params=params)
6555
6556 reply = await self.rpc(msg)
6557 return reply
6558
6559
6560
6561 @ReturnMapping(None)
6562 async def Stop(self):
6563 '''
6564
6565 Returns -> None
6566 '''
6567 # map input types to rpc msg
6568 params = dict()
6569 msg = dict(Type='AllWatcher', Request='Stop', Version=1, Params=params)
6570
6571 reply = await self.rpc(msg)
6572 return reply
6573
6574
6575 class AnnotationsFacade(Type):
6576 name = 'Annotations'
6577 version = 2
6578 schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
6579 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
6580 'type': 'object'},
6581 'entity': {'type': 'string'},
6582 'error': {'$ref': '#/definitions/ErrorResult'}},
6583 'required': ['entity', 'annotations'],
6584 'type': 'object'},
6585 'AnnotationsGetResults': {'additionalProperties': False,
6586 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
6587 'type': 'array'}},
6588 'required': ['results'],
6589 'type': 'object'},
6590 'AnnotationsSet': {'additionalProperties': False,
6591 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
6592 'type': 'array'}},
6593 'required': ['annotations'],
6594 'type': 'object'},
6595 'Entities': {'additionalProperties': False,
6596 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6597 'type': 'array'}},
6598 'required': ['entities'],
6599 'type': 'object'},
6600 'Entity': {'additionalProperties': False,
6601 'properties': {'tag': {'type': 'string'}},
6602 'required': ['tag'],
6603 'type': 'object'},
6604 'EntityAnnotations': {'additionalProperties': False,
6605 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
6606 'type': 'object'},
6607 'entity': {'type': 'string'}},
6608 'required': ['entity', 'annotations'],
6609 'type': 'object'},
6610 'Error': {'additionalProperties': False,
6611 'properties': {'code': {'type': 'string'},
6612 'info': {'$ref': '#/definitions/ErrorInfo'},
6613 'message': {'type': 'string'}},
6614 'required': ['message', 'code'],
6615 'type': 'object'},
6616 'ErrorInfo': {'additionalProperties': False,
6617 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6618 'macaroon-path': {'type': 'string'}},
6619 'type': 'object'},
6620 'ErrorResult': {'additionalProperties': False,
6621 'properties': {'error': {'$ref': '#/definitions/Error'}},
6622 'type': 'object'},
6623 'ErrorResults': {'additionalProperties': False,
6624 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6625 'type': 'array'}},
6626 'required': ['results'],
6627 'type': 'object'},
6628 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
6629 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6630 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
6631 'type': 'object'},
6632 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
6633 'Result': {'$ref': '#/definitions/ErrorResults'}},
6634 'type': 'object'}},
6635 'type': 'object'}
6636
6637
6638 @ReturnMapping(AnnotationsGetResults)
6639 async def Get(self, entities):
6640 '''
6641 entities : typing.Sequence[~Entity]
6642 Returns -> typing.Sequence[~AnnotationsGetResult]
6643 '''
6644 # map input types to rpc msg
6645 params = dict()
6646 msg = dict(Type='Annotations', Request='Get', Version=2, Params=params)
6647 params['entities'] = entities
6648 reply = await self.rpc(msg)
6649 return reply
6650
6651
6652
6653 @ReturnMapping(ErrorResults)
6654 async def Set(self, annotations):
6655 '''
6656 annotations : typing.Sequence[~EntityAnnotations]
6657 Returns -> typing.Sequence[~ErrorResult]
6658 '''
6659 # map input types to rpc msg
6660 params = dict()
6661 msg = dict(Type='Annotations', Request='Set', Version=2, Params=params)
6662 params['annotations'] = annotations
6663 reply = await self.rpc(msg)
6664 return reply
6665
6666
6667 class ApplicationFacade(Type):
6668 name = 'Application'
6669 version = 1
6670 schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
6671 'properties': {'application': {'type': 'string'},
6672 'num-units': {'type': 'integer'},
6673 'placement': {'items': {'$ref': '#/definitions/Placement'},
6674 'type': 'array'}},
6675 'required': ['application',
6676 'num-units',
6677 'placement'],
6678 'type': 'object'},
6679 'AddApplicationUnitsResults': {'additionalProperties': False,
6680 'properties': {'units': {'items': {'type': 'string'},
6681 'type': 'array'}},
6682 'required': ['units'],
6683 'type': 'object'},
6684 'AddRelation': {'additionalProperties': False,
6685 'properties': {'endpoints': {'items': {'type': 'string'},
6686 'type': 'array'}},
6687 'required': ['endpoints'],
6688 'type': 'object'},
6689 'AddRelationResults': {'additionalProperties': False,
6690 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
6691 'type': 'object'}},
6692 'required': ['endpoints'],
6693 'type': 'object'},
6694 'ApplicationCharmRelations': {'additionalProperties': False,
6695 'properties': {'application': {'type': 'string'}},
6696 'required': ['application'],
6697 'type': 'object'},
6698 'ApplicationCharmRelationsResults': {'additionalProperties': False,
6699 'properties': {'charm-relations': {'items': {'type': 'string'},
6700 'type': 'array'}},
6701 'required': ['charm-relations'],
6702 'type': 'object'},
6703 'ApplicationDeploy': {'additionalProperties': False,
6704 'properties': {'application': {'type': 'string'},
6705 'channel': {'type': 'string'},
6706 'charm-url': {'type': 'string'},
6707 'config': {'patternProperties': {'.*': {'type': 'string'}},
6708 'type': 'object'},
6709 'config-yaml': {'type': 'string'},
6710 'constraints': {'$ref': '#/definitions/Value'},
6711 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
6712 'type': 'object'},
6713 'num-units': {'type': 'integer'},
6714 'placement': {'items': {'$ref': '#/definitions/Placement'},
6715 'type': 'array'},
6716 'resources': {'patternProperties': {'.*': {'type': 'string'}},
6717 'type': 'object'},
6718 'series': {'type': 'string'},
6719 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
6720 'type': 'object'}},
6721 'required': ['application',
6722 'series',
6723 'charm-url',
6724 'channel',
6725 'num-units',
6726 'config-yaml',
6727 'constraints'],
6728 'type': 'object'},
6729 'ApplicationDestroy': {'additionalProperties': False,
6730 'properties': {'application': {'type': 'string'}},
6731 'required': ['application'],
6732 'type': 'object'},
6733 'ApplicationExpose': {'additionalProperties': False,
6734 'properties': {'application': {'type': 'string'}},
6735 'required': ['application'],
6736 'type': 'object'},
6737 'ApplicationGet': {'additionalProperties': False,
6738 'properties': {'application': {'type': 'string'}},
6739 'required': ['application'],
6740 'type': 'object'},
6741 'ApplicationGetResults': {'additionalProperties': False,
6742 'properties': {'application': {'type': 'string'},
6743 'charm': {'type': 'string'},
6744 'config': {'patternProperties': {'.*': {'additionalProperties': True,
6745 'type': 'object'}},
6746 'type': 'object'},
6747 'constraints': {'$ref': '#/definitions/Value'}},
6748 'required': ['application',
6749 'charm',
6750 'config',
6751 'constraints'],
6752 'type': 'object'},
6753 'ApplicationMetricCredential': {'additionalProperties': False,
6754 'properties': {'application': {'type': 'string'},
6755 'metrics-credentials': {'items': {'type': 'integer'},
6756 'type': 'array'}},
6757 'required': ['application',
6758 'metrics-credentials'],
6759 'type': 'object'},
6760 'ApplicationMetricCredentials': {'additionalProperties': False,
6761 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
6762 'type': 'array'}},
6763 'required': ['creds'],
6764 'type': 'object'},
6765 'ApplicationSet': {'additionalProperties': False,
6766 'properties': {'application': {'type': 'string'},
6767 'options': {'patternProperties': {'.*': {'type': 'string'}},
6768 'type': 'object'}},
6769 'required': ['application', 'options'],
6770 'type': 'object'},
6771 'ApplicationSetCharm': {'additionalProperties': False,
6772 'properties': {'application': {'type': 'string'},
6773 'channel': {'type': 'string'},
6774 'charm-url': {'type': 'string'},
6775 'force-series': {'type': 'boolean'},
6776 'force-units': {'type': 'boolean'},
6777 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
6778 'type': 'object'}},
6779 'required': ['application',
6780 'charm-url',
6781 'channel',
6782 'force-units',
6783 'force-series'],
6784 'type': 'object'},
6785 'ApplicationUnexpose': {'additionalProperties': False,
6786 'properties': {'application': {'type': 'string'}},
6787 'required': ['application'],
6788 'type': 'object'},
6789 'ApplicationUnset': {'additionalProperties': False,
6790 'properties': {'application': {'type': 'string'},
6791 'options': {'items': {'type': 'string'},
6792 'type': 'array'}},
6793 'required': ['application', 'options'],
6794 'type': 'object'},
6795 'ApplicationUpdate': {'additionalProperties': False,
6796 'properties': {'application': {'type': 'string'},
6797 'charm-url': {'type': 'string'},
6798 'constraints': {'$ref': '#/definitions/Value'},
6799 'force-charm-url': {'type': 'boolean'},
6800 'force-series': {'type': 'boolean'},
6801 'min-units': {'type': 'integer'},
6802 'settings': {'patternProperties': {'.*': {'type': 'string'}},
6803 'type': 'object'},
6804 'settings-yaml': {'type': 'string'}},
6805 'required': ['application',
6806 'charm-url',
6807 'force-charm-url',
6808 'force-series',
6809 'settings-yaml'],
6810 'type': 'object'},
6811 'ApplicationsDeploy': {'additionalProperties': False,
6812 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
6813 'type': 'array'}},
6814 'required': ['applications'],
6815 'type': 'object'},
6816 'CharmRelation': {'additionalProperties': False,
6817 'properties': {'interface': {'type': 'string'},
6818 'limit': {'type': 'integer'},
6819 'name': {'type': 'string'},
6820 'optional': {'type': 'boolean'},
6821 'role': {'type': 'string'},
6822 'scope': {'type': 'string'}},
6823 'required': ['name',
6824 'role',
6825 'interface',
6826 'optional',
6827 'limit',
6828 'scope'],
6829 'type': 'object'},
6830 'Constraints': {'additionalProperties': False,
6831 'properties': {'Count': {'type': 'integer'},
6832 'Pool': {'type': 'string'},
6833 'Size': {'type': 'integer'}},
6834 'required': ['Pool', 'Size', 'Count'],
6835 'type': 'object'},
6836 'DestroyApplicationUnits': {'additionalProperties': False,
6837 'properties': {'unit-names': {'items': {'type': 'string'},
6838 'type': 'array'}},
6839 'required': ['unit-names'],
6840 'type': 'object'},
6841 'DestroyRelation': {'additionalProperties': False,
6842 'properties': {'endpoints': {'items': {'type': 'string'},
6843 'type': 'array'}},
6844 'required': ['endpoints'],
6845 'type': 'object'},
6846 'Error': {'additionalProperties': False,
6847 'properties': {'code': {'type': 'string'},
6848 'info': {'$ref': '#/definitions/ErrorInfo'},
6849 'message': {'type': 'string'}},
6850 'required': ['message', 'code'],
6851 'type': 'object'},
6852 'ErrorInfo': {'additionalProperties': False,
6853 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6854 'macaroon-path': {'type': 'string'}},
6855 'type': 'object'},
6856 'ErrorResult': {'additionalProperties': False,
6857 'properties': {'error': {'$ref': '#/definitions/Error'}},
6858 'type': 'object'},
6859 'ErrorResults': {'additionalProperties': False,
6860 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6861 'type': 'array'}},
6862 'required': ['results'],
6863 'type': 'object'},
6864 'GetApplicationConstraints': {'additionalProperties': False,
6865 'properties': {'application': {'type': 'string'}},
6866 'required': ['application'],
6867 'type': 'object'},
6868 'GetConstraintsResults': {'additionalProperties': False,
6869 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
6870 'required': ['constraints'],
6871 'type': 'object'},
6872 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6873 'Placement': {'additionalProperties': False,
6874 'properties': {'directive': {'type': 'string'},
6875 'scope': {'type': 'string'}},
6876 'required': ['scope', 'directive'],
6877 'type': 'object'},
6878 'SetConstraints': {'additionalProperties': False,
6879 'properties': {'application': {'type': 'string'},
6880 'constraints': {'$ref': '#/definitions/Value'}},
6881 'required': ['application', 'constraints'],
6882 'type': 'object'},
6883 'StringResult': {'additionalProperties': False,
6884 'properties': {'error': {'$ref': '#/definitions/Error'},
6885 'result': {'type': 'string'}},
6886 'required': ['result'],
6887 'type': 'object'},
6888 'Value': {'additionalProperties': False,
6889 'properties': {'arch': {'type': 'string'},
6890 'container': {'type': 'string'},
6891 'cpu-cores': {'type': 'integer'},
6892 'cpu-power': {'type': 'integer'},
6893 'instance-type': {'type': 'string'},
6894 'mem': {'type': 'integer'},
6895 'root-disk': {'type': 'integer'},
6896 'spaces': {'items': {'type': 'string'},
6897 'type': 'array'},
6898 'tags': {'items': {'type': 'string'},
6899 'type': 'array'},
6900 'virt-type': {'type': 'string'}},
6901 'type': 'object'}},
6902 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
6903 'Result': {'$ref': '#/definitions/AddRelationResults'}},
6904 'type': 'object'},
6905 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
6906 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
6907 'type': 'object'},
6908 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
6909 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
6910 'type': 'object'},
6911 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
6912 'Result': {'$ref': '#/definitions/ErrorResults'}},
6913 'type': 'object'},
6914 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
6915 'type': 'object'},
6916 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
6917 'type': 'object'},
6918 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
6919 'type': 'object'},
6920 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
6921 'type': 'object'},
6922 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
6923 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
6924 'type': 'object'},
6925 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
6926 'Result': {'$ref': '#/definitions/StringResult'}},
6927 'type': 'object'},
6928 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
6929 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
6930 'type': 'object'},
6931 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
6932 'type': 'object'},
6933 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
6934 'type': 'object'},
6935 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
6936 'type': 'object'},
6937 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
6938 'Result': {'$ref': '#/definitions/ErrorResults'}},
6939 'type': 'object'},
6940 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
6941 'type': 'object'},
6942 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
6943 'type': 'object'},
6944 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
6945 'type': 'object'}},
6946 'type': 'object'}
6947
6948
6949 @ReturnMapping(AddRelationResults)
6950 async def AddRelation(self, endpoints):
6951 '''
6952 endpoints : typing.Sequence[str]
6953 Returns -> typing.Mapping[str, ~CharmRelation]
6954 '''
6955 # map input types to rpc msg
6956 params = dict()
6957 msg = dict(Type='Application', Request='AddRelation', Version=1, Params=params)
6958 params['endpoints'] = endpoints
6959 reply = await self.rpc(msg)
6960 return reply
6961
6962
6963
6964 @ReturnMapping(AddApplicationUnitsResults)
6965 async def AddUnits(self, application, num_units, placement):
6966 '''
6967 application : str
6968 num_units : int
6969 placement : typing.Sequence[~Placement]
6970 Returns -> typing.Sequence[str]
6971 '''
6972 # map input types to rpc msg
6973 params = dict()
6974 msg = dict(Type='Application', Request='AddUnits', Version=1, Params=params)
6975 params['application'] = application
6976 params['num-units'] = num_units
6977 params['placement'] = placement
6978 reply = await self.rpc(msg)
6979 return reply
6980
6981
6982
6983 @ReturnMapping(ApplicationCharmRelationsResults)
6984 async def CharmRelations(self, application):
6985 '''
6986 application : str
6987 Returns -> typing.Sequence[str]
6988 '''
6989 # map input types to rpc msg
6990 params = dict()
6991 msg = dict(Type='Application', Request='CharmRelations', Version=1, Params=params)
6992 params['application'] = application
6993 reply = await self.rpc(msg)
6994 return reply
6995
6996
6997
6998 @ReturnMapping(ErrorResults)
6999 async def Deploy(self, applications):
7000 '''
7001 applications : typing.Sequence[~ApplicationDeploy]
7002 Returns -> typing.Sequence[~ErrorResult]
7003 '''
7004 # map input types to rpc msg
7005 params = dict()
7006 msg = dict(Type='Application', Request='Deploy', Version=1, Params=params)
7007 params['applications'] = applications
7008 reply = await self.rpc(msg)
7009 return reply
7010
7011
7012
7013 @ReturnMapping(None)
7014 async def Destroy(self, application):
7015 '''
7016 application : str
7017 Returns -> None
7018 '''
7019 # map input types to rpc msg
7020 params = dict()
7021 msg = dict(Type='Application', Request='Destroy', Version=1, Params=params)
7022 params['application'] = application
7023 reply = await self.rpc(msg)
7024 return reply
7025
7026
7027
7028 @ReturnMapping(None)
7029 async def DestroyRelation(self, endpoints):
7030 '''
7031 endpoints : typing.Sequence[str]
7032 Returns -> None
7033 '''
7034 # map input types to rpc msg
7035 params = dict()
7036 msg = dict(Type='Application', Request='DestroyRelation', Version=1, Params=params)
7037 params['endpoints'] = endpoints
7038 reply = await self.rpc(msg)
7039 return reply
7040
7041
7042
7043 @ReturnMapping(None)
7044 async def DestroyUnits(self, unit_names):
7045 '''
7046 unit_names : typing.Sequence[str]
7047 Returns -> None
7048 '''
7049 # map input types to rpc msg
7050 params = dict()
7051 msg = dict(Type='Application', Request='DestroyUnits', Version=1, Params=params)
7052 params['unit-names'] = unit_names
7053 reply = await self.rpc(msg)
7054 return reply
7055
7056
7057
7058 @ReturnMapping(None)
7059 async def Expose(self, application):
7060 '''
7061 application : str
7062 Returns -> None
7063 '''
7064 # map input types to rpc msg
7065 params = dict()
7066 msg = dict(Type='Application', Request='Expose', Version=1, Params=params)
7067 params['application'] = application
7068 reply = await self.rpc(msg)
7069 return reply
7070
7071
7072
7073 @ReturnMapping(ApplicationGetResults)
7074 async def Get(self, application):
7075 '''
7076 application : str
7077 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
7078 '''
7079 # map input types to rpc msg
7080 params = dict()
7081 msg = dict(Type='Application', Request='Get', Version=1, Params=params)
7082 params['application'] = application
7083 reply = await self.rpc(msg)
7084 return reply
7085
7086
7087
7088 @ReturnMapping(StringResult)
7089 async def GetCharmURL(self, application):
7090 '''
7091 application : str
7092 Returns -> typing.Union[_ForwardRef('Error'), str]
7093 '''
7094 # map input types to rpc msg
7095 params = dict()
7096 msg = dict(Type='Application', Request='GetCharmURL', Version=1, Params=params)
7097 params['application'] = application
7098 reply = await self.rpc(msg)
7099 return reply
7100
7101
7102
7103 @ReturnMapping(GetConstraintsResults)
7104 async def GetConstraints(self, application):
7105 '''
7106 application : str
7107 Returns -> Value
7108 '''
7109 # map input types to rpc msg
7110 params = dict()
7111 msg = dict(Type='Application', Request='GetConstraints', Version=1, Params=params)
7112 params['application'] = application
7113 reply = await self.rpc(msg)
7114 return reply
7115
7116
7117
7118 @ReturnMapping(None)
7119 async def Set(self, application, options):
7120 '''
7121 application : str
7122 options : typing.Mapping[str, str]
7123 Returns -> None
7124 '''
7125 # map input types to rpc msg
7126 params = dict()
7127 msg = dict(Type='Application', Request='Set', Version=1, Params=params)
7128 params['application'] = application
7129 params['options'] = options
7130 reply = await self.rpc(msg)
7131 return reply
7132
7133
7134
7135 @ReturnMapping(None)
7136 async def SetCharm(self, application, channel, charm_url, force_series, force_units, resource_ids):
7137 '''
7138 application : str
7139 channel : str
7140 charm_url : str
7141 force_series : bool
7142 force_units : bool
7143 resource_ids : typing.Mapping[str, str]
7144 Returns -> None
7145 '''
7146 # map input types to rpc msg
7147 params = dict()
7148 msg = dict(Type='Application', Request='SetCharm', Version=1, Params=params)
7149 params['application'] = application
7150 params['channel'] = channel
7151 params['charm-url'] = charm_url
7152 params['force-series'] = force_series
7153 params['force-units'] = force_units
7154 params['resource-ids'] = resource_ids
7155 reply = await self.rpc(msg)
7156 return reply
7157
7158
7159
7160 @ReturnMapping(None)
7161 async def SetConstraints(self, application, constraints):
7162 '''
7163 application : str
7164 constraints : Value
7165 Returns -> None
7166 '''
7167 # map input types to rpc msg
7168 params = dict()
7169 msg = dict(Type='Application', Request='SetConstraints', Version=1, Params=params)
7170 params['application'] = application
7171 params['constraints'] = constraints
7172 reply = await self.rpc(msg)
7173 return reply
7174
7175
7176
7177 @ReturnMapping(ErrorResults)
7178 async def SetMetricCredentials(self, creds):
7179 '''
7180 creds : typing.Sequence[~ApplicationMetricCredential]
7181 Returns -> typing.Sequence[~ErrorResult]
7182 '''
7183 # map input types to rpc msg
7184 params = dict()
7185 msg = dict(Type='Application', Request='SetMetricCredentials', Version=1, Params=params)
7186 params['creds'] = creds
7187 reply = await self.rpc(msg)
7188 return reply
7189
7190
7191
7192 @ReturnMapping(None)
7193 async def Unexpose(self, application):
7194 '''
7195 application : str
7196 Returns -> None
7197 '''
7198 # map input types to rpc msg
7199 params = dict()
7200 msg = dict(Type='Application', Request='Unexpose', Version=1, Params=params)
7201 params['application'] = application
7202 reply = await self.rpc(msg)
7203 return reply
7204
7205
7206
7207 @ReturnMapping(None)
7208 async def Unset(self, application, options):
7209 '''
7210 application : str
7211 options : typing.Sequence[str]
7212 Returns -> None
7213 '''
7214 # map input types to rpc msg
7215 params = dict()
7216 msg = dict(Type='Application', Request='Unset', Version=1, Params=params)
7217 params['application'] = application
7218 params['options'] = options
7219 reply = await self.rpc(msg)
7220 return reply
7221
7222
7223
7224 @ReturnMapping(None)
7225 async def Update(self, application, charm_url, constraints, force_charm_url, force_series, min_units, settings, settings_yaml):
7226 '''
7227 application : str
7228 charm_url : str
7229 constraints : Value
7230 force_charm_url : bool
7231 force_series : bool
7232 min_units : int
7233 settings : typing.Mapping[str, str]
7234 settings_yaml : str
7235 Returns -> None
7236 '''
7237 # map input types to rpc msg
7238 params = dict()
7239 msg = dict(Type='Application', Request='Update', Version=1, Params=params)
7240 params['application'] = application
7241 params['charm-url'] = charm_url
7242 params['constraints'] = constraints
7243 params['force-charm-url'] = force_charm_url
7244 params['force-series'] = force_series
7245 params['min-units'] = min_units
7246 params['settings'] = settings
7247 params['settings-yaml'] = settings_yaml
7248 reply = await self.rpc(msg)
7249 return reply
7250
7251
7252 class ApplicationScalerFacade(Type):
7253 name = 'ApplicationScaler'
7254 version = 1
7255 schema = {'definitions': {'Entities': {'additionalProperties': False,
7256 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7257 'type': 'array'}},
7258 'required': ['entities'],
7259 'type': 'object'},
7260 'Entity': {'additionalProperties': False,
7261 'properties': {'tag': {'type': 'string'}},
7262 'required': ['tag'],
7263 'type': 'object'},
7264 'Error': {'additionalProperties': False,
7265 'properties': {'code': {'type': 'string'},
7266 'info': {'$ref': '#/definitions/ErrorInfo'},
7267 'message': {'type': 'string'}},
7268 'required': ['message', 'code'],
7269 'type': 'object'},
7270 'ErrorInfo': {'additionalProperties': False,
7271 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7272 'macaroon-path': {'type': 'string'}},
7273 'type': 'object'},
7274 'ErrorResult': {'additionalProperties': False,
7275 'properties': {'error': {'$ref': '#/definitions/Error'}},
7276 'type': 'object'},
7277 'ErrorResults': {'additionalProperties': False,
7278 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7279 'type': 'array'}},
7280 'required': ['results'],
7281 'type': 'object'},
7282 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7283 'StringsWatchResult': {'additionalProperties': False,
7284 'properties': {'changes': {'items': {'type': 'string'},
7285 'type': 'array'},
7286 'error': {'$ref': '#/definitions/Error'},
7287 'watcher-id': {'type': 'string'}},
7288 'required': ['watcher-id'],
7289 'type': 'object'}},
7290 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7291 'Result': {'$ref': '#/definitions/ErrorResults'}},
7292 'type': 'object'},
7293 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
7294 'type': 'object'}},
7295 'type': 'object'}
7296
7297
7298 @ReturnMapping(ErrorResults)
7299 async def Rescale(self, entities):
7300 '''
7301 entities : typing.Sequence[~Entity]
7302 Returns -> typing.Sequence[~ErrorResult]
7303 '''
7304 # map input types to rpc msg
7305 params = dict()
7306 msg = dict(Type='ApplicationScaler', Request='Rescale', Version=1, Params=params)
7307 params['entities'] = entities
7308 reply = await self.rpc(msg)
7309 return reply
7310
7311
7312
7313 @ReturnMapping(StringsWatchResult)
7314 async def Watch(self):
7315 '''
7316
7317 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
7318 '''
7319 # map input types to rpc msg
7320 params = dict()
7321 msg = dict(Type='ApplicationScaler', Request='Watch', Version=1, Params=params)
7322
7323 reply = await self.rpc(msg)
7324 return reply
7325
7326
7327 class BackupsFacade(Type):
7328 name = 'Backups'
7329 version = 1
7330 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
7331 'properties': {'notes': {'type': 'string'}},
7332 'required': ['notes'],
7333 'type': 'object'},
7334 'BackupsInfoArgs': {'additionalProperties': False,
7335 'properties': {'id': {'type': 'string'}},
7336 'required': ['id'],
7337 'type': 'object'},
7338 'BackupsListArgs': {'additionalProperties': False,
7339 'type': 'object'},
7340 'BackupsListResult': {'additionalProperties': False,
7341 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
7342 'type': 'array'}},
7343 'required': ['list'],
7344 'type': 'object'},
7345 'BackupsMetadataResult': {'additionalProperties': False,
7346 'properties': {'ca-cert': {'type': 'string'},
7347 'ca-private-key': {'type': 'string'},
7348 'checksum': {'type': 'string'},
7349 'checksum-format': {'type': 'string'},
7350 'finished': {'format': 'date-time',
7351 'type': 'string'},
7352 'hostname': {'type': 'string'},
7353 'id': {'type': 'string'},
7354 'machine': {'type': 'string'},
7355 'model': {'type': 'string'},
7356 'notes': {'type': 'string'},
7357 'series': {'type': 'string'},
7358 'size': {'type': 'integer'},
7359 'started': {'format': 'date-time',
7360 'type': 'string'},
7361 'stored': {'format': 'date-time',
7362 'type': 'string'},
7363 'version': {'$ref': '#/definitions/Number'}},
7364 'required': ['id',
7365 'checksum',
7366 'checksum-format',
7367 'size',
7368 'stored',
7369 'started',
7370 'finished',
7371 'notes',
7372 'model',
7373 'machine',
7374 'hostname',
7375 'version',
7376 'series',
7377 'ca-cert',
7378 'ca-private-key'],
7379 'type': 'object'},
7380 'BackupsRemoveArgs': {'additionalProperties': False,
7381 'properties': {'id': {'type': 'string'}},
7382 'required': ['id'],
7383 'type': 'object'},
7384 'Number': {'additionalProperties': False,
7385 'properties': {'Build': {'type': 'integer'},
7386 'Major': {'type': 'integer'},
7387 'Minor': {'type': 'integer'},
7388 'Patch': {'type': 'integer'},
7389 'Tag': {'type': 'string'}},
7390 'required': ['Major',
7391 'Minor',
7392 'Tag',
7393 'Patch',
7394 'Build'],
7395 'type': 'object'},
7396 'RestoreArgs': {'additionalProperties': False,
7397 'properties': {'backup-id': {'type': 'string'}},
7398 'required': ['backup-id'],
7399 'type': 'object'}},
7400 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
7401 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7402 'type': 'object'},
7403 'FinishRestore': {'type': 'object'},
7404 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
7405 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7406 'type': 'object'},
7407 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
7408 'Result': {'$ref': '#/definitions/BackupsListResult'}},
7409 'type': 'object'},
7410 'PrepareRestore': {'type': 'object'},
7411 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
7412 'type': 'object'},
7413 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
7414 'type': 'object'}},
7415 'type': 'object'}
7416
7417
7418 @ReturnMapping(BackupsMetadataResult)
7419 async def Create(self, notes):
7420 '''
7421 notes : str
7422 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7423 '''
7424 # map input types to rpc msg
7425 params = dict()
7426 msg = dict(Type='Backups', Request='Create', Version=1, Params=params)
7427 params['notes'] = notes
7428 reply = await self.rpc(msg)
7429 return reply
7430
7431
7432
7433 @ReturnMapping(None)
7434 async def FinishRestore(self):
7435 '''
7436
7437 Returns -> None
7438 '''
7439 # map input types to rpc msg
7440 params = dict()
7441 msg = dict(Type='Backups', Request='FinishRestore', Version=1, Params=params)
7442
7443 reply = await self.rpc(msg)
7444 return reply
7445
7446
7447
7448 @ReturnMapping(BackupsMetadataResult)
7449 async def Info(self, id_):
7450 '''
7451 id_ : str
7452 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7453 '''
7454 # map input types to rpc msg
7455 params = dict()
7456 msg = dict(Type='Backups', Request='Info', Version=1, Params=params)
7457 params['id'] = id_
7458 reply = await self.rpc(msg)
7459 return reply
7460
7461
7462
7463 @ReturnMapping(BackupsListResult)
7464 async def List(self):
7465 '''
7466
7467 Returns -> typing.Sequence[~BackupsMetadataResult]
7468 '''
7469 # map input types to rpc msg
7470 params = dict()
7471 msg = dict(Type='Backups', Request='List', Version=1, Params=params)
7472
7473 reply = await self.rpc(msg)
7474 return reply
7475
7476
7477
7478 @ReturnMapping(None)
7479 async def PrepareRestore(self):
7480 '''
7481
7482 Returns -> None
7483 '''
7484 # map input types to rpc msg
7485 params = dict()
7486 msg = dict(Type='Backups', Request='PrepareRestore', Version=1, Params=params)
7487
7488 reply = await self.rpc(msg)
7489 return reply
7490
7491
7492
7493 @ReturnMapping(None)
7494 async def Remove(self, id_):
7495 '''
7496 id_ : str
7497 Returns -> None
7498 '''
7499 # map input types to rpc msg
7500 params = dict()
7501 msg = dict(Type='Backups', Request='Remove', Version=1, Params=params)
7502 params['id'] = id_
7503 reply = await self.rpc(msg)
7504 return reply
7505
7506
7507
7508 @ReturnMapping(None)
7509 async def Restore(self, backup_id):
7510 '''
7511 backup_id : str
7512 Returns -> None
7513 '''
7514 # map input types to rpc msg
7515 params = dict()
7516 msg = dict(Type='Backups', Request='Restore', Version=1, Params=params)
7517 params['backup-id'] = backup_id
7518 reply = await self.rpc(msg)
7519 return reply
7520
7521
7522 class BlockFacade(Type):
7523 name = 'Block'
7524 version = 2
7525 schema = {'definitions': {'Block': {'additionalProperties': False,
7526 'properties': {'id': {'type': 'string'},
7527 'message': {'type': 'string'},
7528 'tag': {'type': 'string'},
7529 'type': {'type': 'string'}},
7530 'required': ['id', 'tag', 'type'],
7531 'type': 'object'},
7532 'BlockResult': {'additionalProperties': False,
7533 'properties': {'error': {'$ref': '#/definitions/Error'},
7534 'result': {'$ref': '#/definitions/Block'}},
7535 'required': ['result'],
7536 'type': 'object'},
7537 'BlockResults': {'additionalProperties': False,
7538 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
7539 'type': 'array'}},
7540 'type': 'object'},
7541 'BlockSwitchParams': {'additionalProperties': False,
7542 'properties': {'message': {'type': 'string'},
7543 'type': {'type': 'string'}},
7544 'required': ['type'],
7545 'type': 'object'},
7546 'Error': {'additionalProperties': False,
7547 'properties': {'code': {'type': 'string'},
7548 'info': {'$ref': '#/definitions/ErrorInfo'},
7549 'message': {'type': 'string'}},
7550 'required': ['message', 'code'],
7551 'type': 'object'},
7552 'ErrorInfo': {'additionalProperties': False,
7553 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7554 'macaroon-path': {'type': 'string'}},
7555 'type': 'object'},
7556 'ErrorResult': {'additionalProperties': False,
7557 'properties': {'error': {'$ref': '#/definitions/Error'}},
7558 'type': 'object'},
7559 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
7560 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
7561 'type': 'object'},
7562 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7563 'Result': {'$ref': '#/definitions/ErrorResult'}},
7564 'type': 'object'},
7565 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7566 'Result': {'$ref': '#/definitions/ErrorResult'}},
7567 'type': 'object'}},
7568 'type': 'object'}
7569
7570
7571 @ReturnMapping(BlockResults)
7572 async def List(self):
7573 '''
7574
7575 Returns -> typing.Sequence[~BlockResult]
7576 '''
7577 # map input types to rpc msg
7578 params = dict()
7579 msg = dict(Type='Block', Request='List', Version=2, Params=params)
7580
7581 reply = await self.rpc(msg)
7582 return reply
7583
7584
7585
7586 @ReturnMapping(ErrorResult)
7587 async def SwitchBlockOff(self, message, type_):
7588 '''
7589 message : str
7590 type_ : str
7591 Returns -> Error
7592 '''
7593 # map input types to rpc msg
7594 params = dict()
7595 msg = dict(Type='Block', Request='SwitchBlockOff', Version=2, Params=params)
7596 params['message'] = message
7597 params['type'] = type_
7598 reply = await self.rpc(msg)
7599 return reply
7600
7601
7602
7603 @ReturnMapping(ErrorResult)
7604 async def SwitchBlockOn(self, message, type_):
7605 '''
7606 message : str
7607 type_ : str
7608 Returns -> Error
7609 '''
7610 # map input types to rpc msg
7611 params = dict()
7612 msg = dict(Type='Block', Request='SwitchBlockOn', Version=2, Params=params)
7613 params['message'] = message
7614 params['type'] = type_
7615 reply = await self.rpc(msg)
7616 return reply
7617
7618
7619 class CharmRevisionUpdaterFacade(Type):
7620 name = 'CharmRevisionUpdater'
7621 version = 2
7622 schema = {'definitions': {'Error': {'additionalProperties': False,
7623 'properties': {'code': {'type': 'string'},
7624 'info': {'$ref': '#/definitions/ErrorInfo'},
7625 'message': {'type': 'string'}},
7626 'required': ['message', 'code'],
7627 'type': 'object'},
7628 'ErrorInfo': {'additionalProperties': False,
7629 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7630 'macaroon-path': {'type': 'string'}},
7631 'type': 'object'},
7632 'ErrorResult': {'additionalProperties': False,
7633 'properties': {'error': {'$ref': '#/definitions/Error'}},
7634 'type': 'object'},
7635 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
7636 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
7637 'type': 'object'}},
7638 'type': 'object'}
7639
7640
7641 @ReturnMapping(ErrorResult)
7642 async def UpdateLatestRevisions(self):
7643 '''
7644
7645 Returns -> Error
7646 '''
7647 # map input types to rpc msg
7648 params = dict()
7649 msg = dict(Type='CharmRevisionUpdater', Request='UpdateLatestRevisions', Version=2, Params=params)
7650
7651 reply = await self.rpc(msg)
7652 return reply
7653
7654
7655 class CharmsFacade(Type):
7656 name = 'Charms'
7657 version = 2
7658 schema = {'definitions': {'CharmActionSpec': {'additionalProperties': False,
7659 'properties': {'description': {'type': 'string'},
7660 'params': {'patternProperties': {'.*': {'additionalProperties': True,
7661 'type': 'object'}},
7662 'type': 'object'}},
7663 'required': ['description', 'params'],
7664 'type': 'object'},
7665 'CharmActions': {'additionalProperties': False,
7666 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}},
7667 'type': 'object'}},
7668 'type': 'object'},
7669 'CharmInfo': {'additionalProperties': False,
7670 'properties': {'actions': {'$ref': '#/definitions/CharmActions'},
7671 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}},
7672 'type': 'object'},
7673 'meta': {'$ref': '#/definitions/CharmMeta'},
7674 'metrics': {'$ref': '#/definitions/CharmMetrics'},
7675 'revision': {'type': 'integer'},
7676 'url': {'type': 'string'}},
7677 'required': ['revision', 'url', 'config'],
7678 'type': 'object'},
7679 'CharmMeta': {'additionalProperties': False,
7680 'properties': {'categories': {'items': {'type': 'string'},
7681 'type': 'array'},
7682 'description': {'type': 'string'},
7683 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}},
7684 'type': 'object'},
7685 'min-juju-version': {'type': 'string'},
7686 'name': {'type': 'string'},
7687 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}},
7688 'type': 'object'},
7689 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
7690 'type': 'object'},
7691 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
7692 'type': 'object'},
7693 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
7694 'type': 'object'},
7695 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}},
7696 'type': 'object'},
7697 'series': {'items': {'type': 'string'},
7698 'type': 'array'},
7699 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}},
7700 'type': 'object'},
7701 'subordinate': {'type': 'boolean'},
7702 'summary': {'type': 'string'},
7703 'tags': {'items': {'type': 'string'},
7704 'type': 'array'},
7705 'terms': {'items': {'type': 'string'},
7706 'type': 'array'}},
7707 'required': ['name',
7708 'summary',
7709 'description',
7710 'subordinate'],
7711 'type': 'object'},
7712 'CharmMetric': {'additionalProperties': False,
7713 'properties': {'description': {'type': 'string'},
7714 'type': {'type': 'string'}},
7715 'required': ['type', 'description'],
7716 'type': 'object'},
7717 'CharmMetrics': {'additionalProperties': False,
7718 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}},
7719 'type': 'object'}},
7720 'required': ['metrics'],
7721 'type': 'object'},
7722 'CharmOption': {'additionalProperties': False,
7723 'properties': {'default': {'additionalProperties': True,
7724 'type': 'object'},
7725 'description': {'type': 'string'},
7726 'type': {'type': 'string'}},
7727 'required': ['type'],
7728 'type': 'object'},
7729 'CharmPayloadClass': {'additionalProperties': False,
7730 'properties': {'name': {'type': 'string'},
7731 'type': {'type': 'string'}},
7732 'required': ['name', 'type'],
7733 'type': 'object'},
7734 'CharmRelation': {'additionalProperties': False,
7735 'properties': {'interface': {'type': 'string'},
7736 'limit': {'type': 'integer'},
7737 'name': {'type': 'string'},
7738 'optional': {'type': 'boolean'},
7739 'role': {'type': 'string'},
7740 'scope': {'type': 'string'}},
7741 'required': ['name',
7742 'role',
7743 'interface',
7744 'optional',
7745 'limit',
7746 'scope'],
7747 'type': 'object'},
7748 'CharmResourceMeta': {'additionalProperties': False,
7749 'properties': {'description': {'type': 'string'},
7750 'name': {'type': 'string'},
7751 'path': {'type': 'string'},
7752 'type': {'type': 'string'}},
7753 'required': ['name',
7754 'type',
7755 'path',
7756 'description'],
7757 'type': 'object'},
7758 'CharmStorage': {'additionalProperties': False,
7759 'properties': {'count-max': {'type': 'integer'},
7760 'count-min': {'type': 'integer'},
7761 'description': {'type': 'string'},
7762 'location': {'type': 'string'},
7763 'minimum-size': {'type': 'integer'},
7764 'name': {'type': 'string'},
7765 'properties': {'items': {'type': 'string'},
7766 'type': 'array'},
7767 'read-only': {'type': 'boolean'},
7768 'shared': {'type': 'boolean'},
7769 'type': {'type': 'string'}},
7770 'required': ['name',
7771 'description',
7772 'type',
7773 'shared',
7774 'read-only',
7775 'count-min',
7776 'count-max',
7777 'minimum-size'],
7778 'type': 'object'},
7779 'CharmURL': {'additionalProperties': False,
7780 'properties': {'url': {'type': 'string'}},
7781 'required': ['url'],
7782 'type': 'object'},
7783 'CharmsList': {'additionalProperties': False,
7784 'properties': {'names': {'items': {'type': 'string'},
7785 'type': 'array'}},
7786 'required': ['names'],
7787 'type': 'object'},
7788 'CharmsListResult': {'additionalProperties': False,
7789 'properties': {'charm-urls': {'items': {'type': 'string'},
7790 'type': 'array'}},
7791 'required': ['charm-urls'],
7792 'type': 'object'},
7793 'IsMeteredResult': {'additionalProperties': False,
7794 'properties': {'metered': {'type': 'boolean'}},
7795 'required': ['metered'],
7796 'type': 'object'}},
7797 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
7798 'Result': {'$ref': '#/definitions/CharmInfo'}},
7799 'type': 'object'},
7800 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
7801 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
7802 'type': 'object'},
7803 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
7804 'Result': {'$ref': '#/definitions/CharmsListResult'}},
7805 'type': 'object'}},
7806 'type': 'object'}
7807
7808
7809 @ReturnMapping(CharmInfo)
7810 async def CharmInfo(self, url):
7811 '''
7812 url : str
7813 Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping[str, ~CharmOption], _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str]
7814 '''
7815 # map input types to rpc msg
7816 params = dict()
7817 msg = dict(Type='Charms', Request='CharmInfo', Version=2, Params=params)
7818 params['url'] = url
7819 reply = await self.rpc(msg)
7820 return reply
7821
7822
7823
7824 @ReturnMapping(IsMeteredResult)
7825 async def IsMetered(self, url):
7826 '''
7827 url : str
7828 Returns -> bool
7829 '''
7830 # map input types to rpc msg
7831 params = dict()
7832 msg = dict(Type='Charms', Request='IsMetered', Version=2, Params=params)
7833 params['url'] = url
7834 reply = await self.rpc(msg)
7835 return reply
7836
7837
7838
7839 @ReturnMapping(CharmsListResult)
7840 async def List(self, names):
7841 '''
7842 names : typing.Sequence[str]
7843 Returns -> typing.Sequence[str]
7844 '''
7845 # map input types to rpc msg
7846 params = dict()
7847 msg = dict(Type='Charms', Request='List', Version=2, Params=params)
7848 params['names'] = names
7849 reply = await self.rpc(msg)
7850 return reply
7851
7852
7853 class CleanerFacade(Type):
7854 name = 'Cleaner'
7855 version = 2
7856 schema = {'definitions': {'Error': {'additionalProperties': False,
7857 'properties': {'code': {'type': 'string'},
7858 'info': {'$ref': '#/definitions/ErrorInfo'},
7859 'message': {'type': 'string'}},
7860 'required': ['message', 'code'],
7861 'type': 'object'},
7862 'ErrorInfo': {'additionalProperties': False,
7863 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7864 'macaroon-path': {'type': 'string'}},
7865 'type': 'object'},
7866 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7867 'NotifyWatchResult': {'additionalProperties': False,
7868 'properties': {'NotifyWatcherId': {'type': 'string'},
7869 'error': {'$ref': '#/definitions/Error'}},
7870 'required': ['NotifyWatcherId'],
7871 'type': 'object'}},
7872 'properties': {'Cleanup': {'type': 'object'},
7873 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
7874 'type': 'object'}},
7875 'type': 'object'}
7876
7877
7878 @ReturnMapping(None)
7879 async def Cleanup(self):
7880 '''
7881
7882 Returns -> None
7883 '''
7884 # map input types to rpc msg
7885 params = dict()
7886 msg = dict(Type='Cleaner', Request='Cleanup', Version=2, Params=params)
7887
7888 reply = await self.rpc(msg)
7889 return reply
7890
7891
7892
7893 @ReturnMapping(NotifyWatchResult)
7894 async def WatchCleanups(self):
7895 '''
7896
7897 Returns -> typing.Union[str, _ForwardRef('Error')]
7898 '''
7899 # map input types to rpc msg
7900 params = dict()
7901 msg = dict(Type='Cleaner', Request='WatchCleanups', Version=2, Params=params)
7902
7903 reply = await self.rpc(msg)
7904 return reply
7905
7906
7907 class ClientFacade(Type):
7908 name = 'Client'
7909 version = 1
7910 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
7911 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
7912 'type': 'array'},
7913 'type': 'array'}},
7914 'required': ['servers'],
7915 'type': 'object'},
7916 'AddCharm': {'additionalProperties': False,
7917 'properties': {'channel': {'type': 'string'},
7918 'url': {'type': 'string'}},
7919 'required': ['url', 'channel'],
7920 'type': 'object'},
7921 'AddCharmWithAuthorization': {'additionalProperties': False,
7922 'properties': {'channel': {'type': 'string'},
7923 'macaroon': {'$ref': '#/definitions/Macaroon'},
7924 'url': {'type': 'string'}},
7925 'required': ['url',
7926 'channel',
7927 'macaroon'],
7928 'type': 'object'},
7929 'AddMachineParams': {'additionalProperties': False,
7930 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
7931 'type': 'array'},
7932 'constraints': {'$ref': '#/definitions/Value'},
7933 'container-type': {'type': 'string'},
7934 'disks': {'items': {'$ref': '#/definitions/Constraints'},
7935 'type': 'array'},
7936 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
7937 'instance-id': {'type': 'string'},
7938 'jobs': {'items': {'type': 'string'},
7939 'type': 'array'},
7940 'nonce': {'type': 'string'},
7941 'parent-id': {'type': 'string'},
7942 'placement': {'$ref': '#/definitions/Placement'},
7943 'series': {'type': 'string'}},
7944 'required': ['series',
7945 'constraints',
7946 'jobs',
7947 'parent-id',
7948 'container-type',
7949 'instance-id',
7950 'nonce',
7951 'hardware-characteristics',
7952 'addresses'],
7953 'type': 'object'},
7954 'AddMachines': {'additionalProperties': False,
7955 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
7956 'type': 'array'}},
7957 'required': ['params'],
7958 'type': 'object'},
7959 'AddMachinesResult': {'additionalProperties': False,
7960 'properties': {'error': {'$ref': '#/definitions/Error'},
7961 'machine': {'type': 'string'}},
7962 'required': ['machine'],
7963 'type': 'object'},
7964 'AddMachinesResults': {'additionalProperties': False,
7965 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
7966 'type': 'array'}},
7967 'required': ['machines'],
7968 'type': 'object'},
7969 'Address': {'additionalProperties': False,
7970 'properties': {'scope': {'type': 'string'},
7971 'space-name': {'type': 'string'},
7972 'type': {'type': 'string'},
7973 'value': {'type': 'string'}},
7974 'required': ['value', 'type', 'scope'],
7975 'type': 'object'},
7976 'AgentVersionResult': {'additionalProperties': False,
7977 'properties': {'version': {'$ref': '#/definitions/Number'}},
7978 'required': ['version'],
7979 'type': 'object'},
7980 'AllWatcherId': {'additionalProperties': False,
7981 'properties': {'watcher-id': {'type': 'string'}},
7982 'required': ['watcher-id'],
7983 'type': 'object'},
7984 'ApplicationStatus': {'additionalProperties': False,
7985 'properties': {'can-upgrade-to': {'type': 'string'},
7986 'charm': {'type': 'string'},
7987 'err': {'additionalProperties': True,
7988 'type': 'object'},
7989 'exposed': {'type': 'boolean'},
7990 'life': {'type': 'string'},
7991 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
7992 'type': 'object'},
7993 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
7994 'type': 'array'}},
7995 'type': 'object'},
7996 'series': {'type': 'string'},
7997 'status': {'$ref': '#/definitions/DetailedStatus'},
7998 'subordinate-to': {'items': {'type': 'string'},
7999 'type': 'array'},
8000 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8001 'type': 'object'},
8002 'workload-version': {'type': 'string'}},
8003 'required': ['charm',
8004 'series',
8005 'exposed',
8006 'life',
8007 'relations',
8008 'can-upgrade-to',
8009 'subordinate-to',
8010 'units',
8011 'meter-statuses',
8012 'status',
8013 'workload-version'],
8014 'type': 'object'},
8015 'Binary': {'additionalProperties': False,
8016 'properties': {'Arch': {'type': 'string'},
8017 'Number': {'$ref': '#/definitions/Number'},
8018 'Series': {'type': 'string'}},
8019 'required': ['Number', 'Series', 'Arch'],
8020 'type': 'object'},
8021 'BundleChangesChange': {'additionalProperties': False,
8022 'properties': {'args': {'items': {'additionalProperties': True,
8023 'type': 'object'},
8024 'type': 'array'},
8025 'id': {'type': 'string'},
8026 'method': {'type': 'string'},
8027 'requires': {'items': {'type': 'string'},
8028 'type': 'array'}},
8029 'required': ['id',
8030 'method',
8031 'args',
8032 'requires'],
8033 'type': 'object'},
8034 'ConfigValue': {'additionalProperties': False,
8035 'properties': {'source': {'type': 'string'},
8036 'value': {'additionalProperties': True,
8037 'type': 'object'}},
8038 'required': ['value', 'source'],
8039 'type': 'object'},
8040 'Constraints': {'additionalProperties': False,
8041 'properties': {'Count': {'type': 'integer'},
8042 'Pool': {'type': 'string'},
8043 'Size': {'type': 'integer'}},
8044 'required': ['Pool', 'Size', 'Count'],
8045 'type': 'object'},
8046 'DestroyMachines': {'additionalProperties': False,
8047 'properties': {'force': {'type': 'boolean'},
8048 'machine-names': {'items': {'type': 'string'},
8049 'type': 'array'}},
8050 'required': ['machine-names', 'force'],
8051 'type': 'object'},
8052 'DetailedStatus': {'additionalProperties': False,
8053 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8054 'type': 'object'}},
8055 'type': 'object'},
8056 'err': {'additionalProperties': True,
8057 'type': 'object'},
8058 'info': {'type': 'string'},
8059 'kind': {'type': 'string'},
8060 'life': {'type': 'string'},
8061 'since': {'format': 'date-time',
8062 'type': 'string'},
8063 'status': {'type': 'string'},
8064 'version': {'type': 'string'}},
8065 'required': ['status',
8066 'info',
8067 'data',
8068 'since',
8069 'kind',
8070 'version',
8071 'life'],
8072 'type': 'object'},
8073 'EndpointStatus': {'additionalProperties': False,
8074 'properties': {'application': {'type': 'string'},
8075 'name': {'type': 'string'},
8076 'role': {'type': 'string'},
8077 'subordinate': {'type': 'boolean'}},
8078 'required': ['application',
8079 'name',
8080 'role',
8081 'subordinate'],
8082 'type': 'object'},
8083 'Entities': {'additionalProperties': False,
8084 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
8085 'type': 'array'}},
8086 'required': ['entities'],
8087 'type': 'object'},
8088 'Entity': {'additionalProperties': False,
8089 'properties': {'tag': {'type': 'string'}},
8090 'required': ['tag'],
8091 'type': 'object'},
8092 'EntityStatus': {'additionalProperties': False,
8093 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8094 'type': 'object'}},
8095 'type': 'object'},
8096 'info': {'type': 'string'},
8097 'since': {'format': 'date-time',
8098 'type': 'string'},
8099 'status': {'type': 'string'}},
8100 'required': ['status', 'info', 'since'],
8101 'type': 'object'},
8102 'Error': {'additionalProperties': False,
8103 'properties': {'code': {'type': 'string'},
8104 'info': {'$ref': '#/definitions/ErrorInfo'},
8105 'message': {'type': 'string'}},
8106 'required': ['message', 'code'],
8107 'type': 'object'},
8108 'ErrorInfo': {'additionalProperties': False,
8109 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8110 'macaroon-path': {'type': 'string'}},
8111 'type': 'object'},
8112 'ErrorResult': {'additionalProperties': False,
8113 'properties': {'error': {'$ref': '#/definitions/Error'}},
8114 'type': 'object'},
8115 'ErrorResults': {'additionalProperties': False,
8116 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
8117 'type': 'array'}},
8118 'required': ['results'],
8119 'type': 'object'},
8120 'FindToolsParams': {'additionalProperties': False,
8121 'properties': {'arch': {'type': 'string'},
8122 'major': {'type': 'integer'},
8123 'minor': {'type': 'integer'},
8124 'number': {'$ref': '#/definitions/Number'},
8125 'series': {'type': 'string'}},
8126 'required': ['number',
8127 'major',
8128 'minor',
8129 'arch',
8130 'series'],
8131 'type': 'object'},
8132 'FindToolsResult': {'additionalProperties': False,
8133 'properties': {'error': {'$ref': '#/definitions/Error'},
8134 'list': {'items': {'$ref': '#/definitions/Tools'},
8135 'type': 'array'}},
8136 'required': ['list'],
8137 'type': 'object'},
8138 'FullStatus': {'additionalProperties': False,
8139 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
8140 'type': 'object'},
8141 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8142 'type': 'object'},
8143 'model': {'$ref': '#/definitions/ModelStatusInfo'},
8144 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
8145 'type': 'array'}},
8146 'required': ['model',
8147 'machines',
8148 'applications',
8149 'relations'],
8150 'type': 'object'},
8151 'GetBundleChangesParams': {'additionalProperties': False,
8152 'properties': {'yaml': {'type': 'string'}},
8153 'required': ['yaml'],
8154 'type': 'object'},
8155 'GetBundleChangesResults': {'additionalProperties': False,
8156 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'},
8157 'type': 'array'},
8158 'errors': {'items': {'type': 'string'},
8159 'type': 'array'}},
8160 'type': 'object'},
8161 'GetConstraintsResults': {'additionalProperties': False,
8162 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
8163 'required': ['constraints'],
8164 'type': 'object'},
8165 'HardwareCharacteristics': {'additionalProperties': False,
8166 'properties': {'arch': {'type': 'string'},
8167 'availability-zone': {'type': 'string'},
8168 'cpu-cores': {'type': 'integer'},
8169 'cpu-power': {'type': 'integer'},
8170 'mem': {'type': 'integer'},
8171 'root-disk': {'type': 'integer'},
8172 'tags': {'items': {'type': 'string'},
8173 'type': 'array'}},
8174 'type': 'object'},
8175 'History': {'additionalProperties': False,
8176 'properties': {'error': {'$ref': '#/definitions/Error'},
8177 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
8178 'type': 'array'}},
8179 'required': ['statuses'],
8180 'type': 'object'},
8181 'HostPort': {'additionalProperties': False,
8182 'properties': {'Address': {'$ref': '#/definitions/Address'},
8183 'port': {'type': 'integer'}},
8184 'required': ['Address', 'port'],
8185 'type': 'object'},
8186 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8187 'MachineStatus': {'additionalProperties': False,
8188 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
8189 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8190 'type': 'object'},
8191 'dns-name': {'type': 'string'},
8192 'hardware': {'type': 'string'},
8193 'has-vote': {'type': 'boolean'},
8194 'id': {'type': 'string'},
8195 'instance-id': {'type': 'string'},
8196 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
8197 'jobs': {'items': {'type': 'string'},
8198 'type': 'array'},
8199 'series': {'type': 'string'},
8200 'wants-vote': {'type': 'boolean'}},
8201 'required': ['agent-status',
8202 'instance-status',
8203 'dns-name',
8204 'instance-id',
8205 'series',
8206 'id',
8207 'containers',
8208 'hardware',
8209 'jobs',
8210 'has-vote',
8211 'wants-vote'],
8212 'type': 'object'},
8213 'MeterStatus': {'additionalProperties': False,
8214 'properties': {'color': {'type': 'string'},
8215 'message': {'type': 'string'}},
8216 'required': ['color', 'message'],
8217 'type': 'object'},
8218 'ModelConfigResults': {'additionalProperties': False,
8219 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
8220 'type': 'object'}},
8221 'required': ['config'],
8222 'type': 'object'},
8223 'ModelInfo': {'additionalProperties': False,
8224 'properties': {'cloud': {'type': 'string'},
8225 'cloud-credential': {'type': 'string'},
8226 'cloud-region': {'type': 'string'},
8227 'controller-uuid': {'type': 'string'},
8228 'default-series': {'type': 'string'},
8229 'life': {'type': 'string'},
8230 'name': {'type': 'string'},
8231 'owner-tag': {'type': 'string'},
8232 'provider-type': {'type': 'string'},
8233 'status': {'$ref': '#/definitions/EntityStatus'},
8234 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
8235 'type': 'array'},
8236 'uuid': {'type': 'string'}},
8237 'required': ['name',
8238 'uuid',
8239 'controller-uuid',
8240 'provider-type',
8241 'default-series',
8242 'cloud',
8243 'owner-tag',
8244 'life',
8245 'status',
8246 'users'],
8247 'type': 'object'},
8248 'ModelSet': {'additionalProperties': False,
8249 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
8250 'type': 'object'}},
8251 'type': 'object'}},
8252 'required': ['config'],
8253 'type': 'object'},
8254 'ModelStatusInfo': {'additionalProperties': False,
8255 'properties': {'available-version': {'type': 'string'},
8256 'cloud': {'type': 'string'},
8257 'name': {'type': 'string'},
8258 'region': {'type': 'string'},
8259 'version': {'type': 'string'}},
8260 'required': ['name',
8261 'cloud',
8262 'version',
8263 'available-version'],
8264 'type': 'object'},
8265 'ModelUnset': {'additionalProperties': False,
8266 'properties': {'keys': {'items': {'type': 'string'},
8267 'type': 'array'}},
8268 'required': ['keys'],
8269 'type': 'object'},
8270 'ModelUserInfo': {'additionalProperties': False,
8271 'properties': {'access': {'type': 'string'},
8272 'display-name': {'type': 'string'},
8273 'last-connection': {'format': 'date-time',
8274 'type': 'string'},
8275 'user': {'type': 'string'}},
8276 'required': ['user',
8277 'display-name',
8278 'last-connection',
8279 'access'],
8280 'type': 'object'},
8281 'ModelUserInfoResult': {'additionalProperties': False,
8282 'properties': {'error': {'$ref': '#/definitions/Error'},
8283 'result': {'$ref': '#/definitions/ModelUserInfo'}},
8284 'type': 'object'},
8285 'ModelUserInfoResults': {'additionalProperties': False,
8286 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
8287 'type': 'array'}},
8288 'required': ['results'],
8289 'type': 'object'},
8290 'Number': {'additionalProperties': False,
8291 'properties': {'Build': {'type': 'integer'},
8292 'Major': {'type': 'integer'},
8293 'Minor': {'type': 'integer'},
8294 'Patch': {'type': 'integer'},
8295 'Tag': {'type': 'string'}},
8296 'required': ['Major',
8297 'Minor',
8298 'Tag',
8299 'Patch',
8300 'Build'],
8301 'type': 'object'},
8302 'Placement': {'additionalProperties': False,
8303 'properties': {'directive': {'type': 'string'},
8304 'scope': {'type': 'string'}},
8305 'required': ['scope', 'directive'],
8306 'type': 'object'},
8307 'PrivateAddress': {'additionalProperties': False,
8308 'properties': {'target': {'type': 'string'}},
8309 'required': ['target'],
8310 'type': 'object'},
8311 'PrivateAddressResults': {'additionalProperties': False,
8312 'properties': {'private-address': {'type': 'string'}},
8313 'required': ['private-address'],
8314 'type': 'object'},
8315 'ProvisioningScriptParams': {'additionalProperties': False,
8316 'properties': {'data-dir': {'type': 'string'},
8317 'disable-package-commands': {'type': 'boolean'},
8318 'machine-id': {'type': 'string'},
8319 'nonce': {'type': 'string'}},
8320 'required': ['machine-id',
8321 'nonce',
8322 'data-dir',
8323 'disable-package-commands'],
8324 'type': 'object'},
8325 'ProvisioningScriptResult': {'additionalProperties': False,
8326 'properties': {'script': {'type': 'string'}},
8327 'required': ['script'],
8328 'type': 'object'},
8329 'PublicAddress': {'additionalProperties': False,
8330 'properties': {'target': {'type': 'string'}},
8331 'required': ['target'],
8332 'type': 'object'},
8333 'PublicAddressResults': {'additionalProperties': False,
8334 'properties': {'public-address': {'type': 'string'}},
8335 'required': ['public-address'],
8336 'type': 'object'},
8337 'RelationStatus': {'additionalProperties': False,
8338 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
8339 'type': 'array'},
8340 'id': {'type': 'integer'},
8341 'interface': {'type': 'string'},
8342 'key': {'type': 'string'},
8343 'scope': {'type': 'string'}},
8344 'required': ['id',
8345 'key',
8346 'interface',
8347 'scope',
8348 'endpoints'],
8349 'type': 'object'},
8350 'ResolveCharmResult': {'additionalProperties': False,
8351 'properties': {'error': {'type': 'string'},
8352 'url': {'type': 'string'}},
8353 'type': 'object'},
8354 'ResolveCharmResults': {'additionalProperties': False,
8355 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
8356 'type': 'array'}},
8357 'required': ['urls'],
8358 'type': 'object'},
8359 'ResolveCharms': {'additionalProperties': False,
8360 'properties': {'references': {'items': {'type': 'string'},
8361 'type': 'array'}},
8362 'required': ['references'],
8363 'type': 'object'},
8364 'Resolved': {'additionalProperties': False,
8365 'properties': {'retry': {'type': 'boolean'},
8366 'unit-name': {'type': 'string'}},
8367 'required': ['unit-name', 'retry'],
8368 'type': 'object'},
8369 'SetConstraints': {'additionalProperties': False,
8370 'properties': {'application': {'type': 'string'},
8371 'constraints': {'$ref': '#/definitions/Value'}},
8372 'required': ['application', 'constraints'],
8373 'type': 'object'},
8374 'SetModelAgentVersion': {'additionalProperties': False,
8375 'properties': {'version': {'$ref': '#/definitions/Number'}},
8376 'required': ['version'],
8377 'type': 'object'},
8378 'StatusHistoryFilter': {'additionalProperties': False,
8379 'properties': {'date': {'format': 'date-time',
8380 'type': 'string'},
8381 'delta': {'type': 'integer'},
8382 'size': {'type': 'integer'}},
8383 'required': ['size', 'date', 'delta'],
8384 'type': 'object'},
8385 'StatusHistoryRequest': {'additionalProperties': False,
8386 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
8387 'historyKind': {'type': 'string'},
8388 'size': {'type': 'integer'},
8389 'tag': {'type': 'string'}},
8390 'required': ['historyKind',
8391 'size',
8392 'filter',
8393 'tag'],
8394 'type': 'object'},
8395 'StatusHistoryRequests': {'additionalProperties': False,
8396 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
8397 'type': 'array'}},
8398 'required': ['requests'],
8399 'type': 'object'},
8400 'StatusHistoryResult': {'additionalProperties': False,
8401 'properties': {'error': {'$ref': '#/definitions/Error'},
8402 'history': {'$ref': '#/definitions/History'}},
8403 'required': ['history'],
8404 'type': 'object'},
8405 'StatusHistoryResults': {'additionalProperties': False,
8406 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
8407 'type': 'array'}},
8408 'required': ['results'],
8409 'type': 'object'},
8410 'StatusParams': {'additionalProperties': False,
8411 'properties': {'patterns': {'items': {'type': 'string'},
8412 'type': 'array'}},
8413 'required': ['patterns'],
8414 'type': 'object'},
8415 'Tools': {'additionalProperties': False,
8416 'properties': {'sha256': {'type': 'string'},
8417 'size': {'type': 'integer'},
8418 'url': {'type': 'string'},
8419 'version': {'$ref': '#/definitions/Binary'}},
8420 'required': ['version', 'url', 'size'],
8421 'type': 'object'},
8422 'UnitStatus': {'additionalProperties': False,
8423 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
8424 'charm': {'type': 'string'},
8425 'machine': {'type': 'string'},
8426 'opened-ports': {'items': {'type': 'string'},
8427 'type': 'array'},
8428 'public-address': {'type': 'string'},
8429 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8430 'type': 'object'},
8431 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
8432 'workload-version': {'type': 'string'}},
8433 'required': ['agent-status',
8434 'workload-status',
8435 'workload-version',
8436 'machine',
8437 'opened-ports',
8438 'public-address',
8439 'charm',
8440 'subordinates'],
8441 'type': 'object'},
8442 'Value': {'additionalProperties': False,
8443 'properties': {'arch': {'type': 'string'},
8444 'container': {'type': 'string'},
8445 'cpu-cores': {'type': 'integer'},
8446 'cpu-power': {'type': 'integer'},
8447 'instance-type': {'type': 'string'},
8448 'mem': {'type': 'integer'},
8449 'root-disk': {'type': 'integer'},
8450 'spaces': {'items': {'type': 'string'},
8451 'type': 'array'},
8452 'tags': {'items': {'type': 'string'},
8453 'type': 'array'},
8454 'virt-type': {'type': 'string'}},
8455 'type': 'object'}},
8456 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
8457 'type': 'object'},
8458 'AbortCurrentUpgrade': {'type': 'object'},
8459 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
8460 'type': 'object'},
8461 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
8462 'type': 'object'},
8463 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8464 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8465 'type': 'object'},
8466 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8467 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8468 'type': 'object'},
8469 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
8470 'type': 'object'},
8471 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
8472 'type': 'object'},
8473 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
8474 'Result': {'$ref': '#/definitions/FindToolsResult'}},
8475 'type': 'object'},
8476 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
8477 'Result': {'$ref': '#/definitions/FullStatus'}},
8478 'type': 'object'},
8479 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'},
8480 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}},
8481 'type': 'object'},
8482 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
8483 'type': 'object'},
8484 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8485 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8486 'type': 'object'},
8487 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
8488 'type': 'object'},
8489 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
8490 'type': 'object'},
8491 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
8492 'type': 'object'},
8493 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
8494 'type': 'object'},
8495 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
8496 'type': 'object'},
8497 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
8498 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
8499 'type': 'object'},
8500 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
8501 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
8502 'type': 'object'},
8503 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
8504 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
8505 'type': 'object'},
8506 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
8507 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
8508 'type': 'object'},
8509 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
8510 'type': 'object'},
8511 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8512 'Result': {'$ref': '#/definitions/ErrorResults'}},
8513 'type': 'object'},
8514 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
8515 'type': 'object'},
8516 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
8517 'type': 'object'},
8518 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
8519 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
8520 'type': 'object'},
8521 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
8522 'type': 'object'}},
8523 'type': 'object'}
8524
8525
8526 @ReturnMapping(APIHostPortsResult)
8527 async def APIHostPorts(self):
8528 '''
8529
8530 Returns -> typing.Sequence[~HostPort]
8531 '''
8532 # map input types to rpc msg
8533 params = dict()
8534 msg = dict(Type='Client', Request='APIHostPorts', Version=1, Params=params)
8535
8536 reply = await self.rpc(msg)
8537 return reply
8538
8539
8540
8541 @ReturnMapping(None)
8542 async def AbortCurrentUpgrade(self):
8543 '''
8544
8545 Returns -> None
8546 '''
8547 # map input types to rpc msg
8548 params = dict()
8549 msg = dict(Type='Client', Request='AbortCurrentUpgrade', Version=1, Params=params)
8550
8551 reply = await self.rpc(msg)
8552 return reply
8553
8554
8555
8556 @ReturnMapping(None)
8557 async def AddCharm(self, channel, url):
8558 '''
8559 channel : str
8560 url : str
8561 Returns -> None
8562 '''
8563 # map input types to rpc msg
8564 params = dict()
8565 msg = dict(Type='Client', Request='AddCharm', Version=1, Params=params)
8566 params['channel'] = channel
8567 params['url'] = url
8568 reply = await self.rpc(msg)
8569 return reply
8570
8571
8572
8573 @ReturnMapping(None)
8574 async def AddCharmWithAuthorization(self, channel, macaroon, url):
8575 '''
8576 channel : str
8577 macaroon : Macaroon
8578 url : str
8579 Returns -> None
8580 '''
8581 # map input types to rpc msg
8582 params = dict()
8583 msg = dict(Type='Client', Request='AddCharmWithAuthorization', Version=1, Params=params)
8584 params['channel'] = channel
8585 params['macaroon'] = macaroon
8586 params['url'] = url
8587 reply = await self.rpc(msg)
8588 return reply
8589
8590
8591
8592 @ReturnMapping(AddMachinesResults)
8593 async def AddMachines(self, params):
8594 '''
8595 params : typing.Sequence[~AddMachineParams]
8596 Returns -> typing.Sequence[~AddMachinesResult]
8597 '''
8598 # map input types to rpc msg
8599 params = dict()
8600 msg = dict(Type='Client', Request='AddMachines', Version=1, Params=params)
8601 params['params'] = params
8602 reply = await self.rpc(msg)
8603 return reply
8604
8605
8606
8607 @ReturnMapping(AddMachinesResults)
8608 async def AddMachinesV2(self, params):
8609 '''
8610 params : typing.Sequence[~AddMachineParams]
8611 Returns -> typing.Sequence[~AddMachinesResult]
8612 '''
8613 # map input types to rpc msg
8614 params = dict()
8615 msg = dict(Type='Client', Request='AddMachinesV2', Version=1, Params=params)
8616 params['params'] = params
8617 reply = await self.rpc(msg)
8618 return reply
8619
8620
8621
8622 @ReturnMapping(AgentVersionResult)
8623 async def AgentVersion(self):
8624 '''
8625
8626 Returns -> Number
8627 '''
8628 # map input types to rpc msg
8629 params = dict()
8630 msg = dict(Type='Client', Request='AgentVersion', Version=1, Params=params)
8631
8632 reply = await self.rpc(msg)
8633 return reply
8634
8635
8636
8637 @ReturnMapping(None)
8638 async def DestroyMachines(self, force, machine_names):
8639 '''
8640 force : bool
8641 machine_names : typing.Sequence[str]
8642 Returns -> None
8643 '''
8644 # map input types to rpc msg
8645 params = dict()
8646 msg = dict(Type='Client', Request='DestroyMachines', Version=1, Params=params)
8647 params['force'] = force
8648 params['machine-names'] = machine_names
8649 reply = await self.rpc(msg)
8650 return reply
8651
8652
8653
8654 @ReturnMapping(FindToolsResult)
8655 async def FindTools(self, arch, major, minor, number, series):
8656 '''
8657 arch : str
8658 major : int
8659 minor : int
8660 number : Number
8661 series : str
8662 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
8663 '''
8664 # map input types to rpc msg
8665 params = dict()
8666 msg = dict(Type='Client', Request='FindTools', Version=1, Params=params)
8667 params['arch'] = arch
8668 params['major'] = major
8669 params['minor'] = minor
8670 params['number'] = number
8671 params['series'] = series
8672 reply = await self.rpc(msg)
8673 return reply
8674
8675
8676
8677 @ReturnMapping(FullStatus)
8678 async def FullStatus(self, patterns):
8679 '''
8680 patterns : typing.Sequence[str]
8681 Returns -> typing.Union[typing.Mapping[str, ~MachineStatus], _ForwardRef('ModelStatusInfo'), typing.Sequence[~RelationStatus]]
8682 '''
8683 # map input types to rpc msg
8684 params = dict()
8685 msg = dict(Type='Client', Request='FullStatus', Version=1, Params=params)
8686 params['patterns'] = patterns
8687 reply = await self.rpc(msg)
8688 return reply
8689
8690
8691
8692 @ReturnMapping(GetBundleChangesResults)
8693 async def GetBundleChanges(self, yaml):
8694 '''
8695 yaml : str
8696 Returns -> typing.Sequence[~BundleChangesChange]
8697 '''
8698 # map input types to rpc msg
8699 params = dict()
8700 msg = dict(Type='Client', Request='GetBundleChanges', Version=1, Params=params)
8701 params['yaml'] = yaml
8702 reply = await self.rpc(msg)
8703 return reply
8704
8705
8706
8707 @ReturnMapping(GetConstraintsResults)
8708 async def GetModelConstraints(self):
8709 '''
8710
8711 Returns -> Value
8712 '''
8713 # map input types to rpc msg
8714 params = dict()
8715 msg = dict(Type='Client', Request='GetModelConstraints', Version=1, Params=params)
8716
8717 reply = await self.rpc(msg)
8718 return reply
8719
8720
8721
8722 @ReturnMapping(AddMachinesResults)
8723 async def InjectMachines(self, params):
8724 '''
8725 params : typing.Sequence[~AddMachineParams]
8726 Returns -> typing.Sequence[~AddMachinesResult]
8727 '''
8728 # map input types to rpc msg
8729 params = dict()
8730 msg = dict(Type='Client', Request='InjectMachines', Version=1, Params=params)
8731 params['params'] = params
8732 reply = await self.rpc(msg)
8733 return reply
8734
8735
8736
8737 @ReturnMapping(ModelConfigResults)
8738 async def ModelGet(self):
8739 '''
8740
8741 Returns -> typing.Mapping[str, ~ConfigValue]
8742 '''
8743 # map input types to rpc msg
8744 params = dict()
8745 msg = dict(Type='Client', Request='ModelGet', Version=1, Params=params)
8746
8747 reply = await self.rpc(msg)
8748 return reply
8749
8750
8751
8752 @ReturnMapping(ModelInfo)
8753 async def ModelInfo(self):
8754 '''
8755
8756 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
8757 '''
8758 # map input types to rpc msg
8759 params = dict()
8760 msg = dict(Type='Client', Request='ModelInfo', Version=1, Params=params)
8761
8762 reply = await self.rpc(msg)
8763 return reply
8764
8765
8766
8767 @ReturnMapping(None)
8768 async def ModelSet(self, config):
8769 '''
8770 config : typing.Mapping[str, typing.Any]
8771 Returns -> None
8772 '''
8773 # map input types to rpc msg
8774 params = dict()
8775 msg = dict(Type='Client', Request='ModelSet', Version=1, Params=params)
8776 params['config'] = config
8777 reply = await self.rpc(msg)
8778 return reply
8779
8780
8781
8782 @ReturnMapping(None)
8783 async def ModelUnset(self, keys):
8784 '''
8785 keys : typing.Sequence[str]
8786 Returns -> None
8787 '''
8788 # map input types to rpc msg
8789 params = dict()
8790 msg = dict(Type='Client', Request='ModelUnset', Version=1, Params=params)
8791 params['keys'] = keys
8792 reply = await self.rpc(msg)
8793 return reply
8794
8795
8796
8797 @ReturnMapping(ModelUserInfoResults)
8798 async def ModelUserInfo(self):
8799 '''
8800
8801 Returns -> typing.Sequence[~ModelUserInfoResult]
8802 '''
8803 # map input types to rpc msg
8804 params = dict()
8805 msg = dict(Type='Client', Request='ModelUserInfo', Version=1, Params=params)
8806
8807 reply = await self.rpc(msg)
8808 return reply
8809
8810
8811
8812 @ReturnMapping(PrivateAddressResults)
8813 async def PrivateAddress(self, target):
8814 '''
8815 target : str
8816 Returns -> str
8817 '''
8818 # map input types to rpc msg
8819 params = dict()
8820 msg = dict(Type='Client', Request='PrivateAddress', Version=1, Params=params)
8821 params['target'] = target
8822 reply = await self.rpc(msg)
8823 return reply
8824
8825
8826
8827 @ReturnMapping(ProvisioningScriptResult)
8828 async def ProvisioningScript(self, data_dir, disable_package_commands, machine_id, nonce):
8829 '''
8830 data_dir : str
8831 disable_package_commands : bool
8832 machine_id : str
8833 nonce : str
8834 Returns -> str
8835 '''
8836 # map input types to rpc msg
8837 params = dict()
8838 msg = dict(Type='Client', Request='ProvisioningScript', Version=1, Params=params)
8839 params['data-dir'] = data_dir
8840 params['disable-package-commands'] = disable_package_commands
8841 params['machine-id'] = machine_id
8842 params['nonce'] = nonce
8843 reply = await self.rpc(msg)
8844 return reply
8845
8846
8847
8848 @ReturnMapping(PublicAddressResults)
8849 async def PublicAddress(self, target):
8850 '''
8851 target : str
8852 Returns -> str
8853 '''
8854 # map input types to rpc msg
8855 params = dict()
8856 msg = dict(Type='Client', Request='PublicAddress', Version=1, Params=params)
8857 params['target'] = target
8858 reply = await self.rpc(msg)
8859 return reply
8860
8861
8862
8863 @ReturnMapping(ResolveCharmResults)
8864 async def ResolveCharms(self, references):
8865 '''
8866 references : typing.Sequence[str]
8867 Returns -> typing.Sequence[~ResolveCharmResult]
8868 '''
8869 # map input types to rpc msg
8870 params = dict()
8871 msg = dict(Type='Client', Request='ResolveCharms', Version=1, Params=params)
8872 params['references'] = references
8873 reply = await self.rpc(msg)
8874 return reply
8875
8876
8877
8878 @ReturnMapping(None)
8879 async def Resolved(self, retry, unit_name):
8880 '''
8881 retry : bool
8882 unit_name : str
8883 Returns -> None
8884 '''
8885 # map input types to rpc msg
8886 params = dict()
8887 msg = dict(Type='Client', Request='Resolved', Version=1, Params=params)
8888 params['retry'] = retry
8889 params['unit-name'] = unit_name
8890 reply = await self.rpc(msg)
8891 return reply
8892
8893
8894
8895 @ReturnMapping(ErrorResults)
8896 async def RetryProvisioning(self, entities):
8897 '''
8898 entities : typing.Sequence[~Entity]
8899 Returns -> typing.Sequence[~ErrorResult]
8900 '''
8901 # map input types to rpc msg
8902 params = dict()
8903 msg = dict(Type='Client', Request='RetryProvisioning', Version=1, Params=params)
8904 params['entities'] = entities
8905 reply = await self.rpc(msg)
8906 return reply
8907
8908
8909
8910 @ReturnMapping(None)
8911 async def SetModelAgentVersion(self, build, major, minor, patch, tag):
8912 '''
8913 build : int
8914 major : int
8915 minor : int
8916 patch : int
8917 tag : str
8918 Returns -> None
8919 '''
8920 # map input types to rpc msg
8921 params = dict()
8922 msg = dict(Type='Client', Request='SetModelAgentVersion', Version=1, Params=params)
8923 params['Build'] = build
8924 params['Major'] = major
8925 params['Minor'] = minor
8926 params['Patch'] = patch
8927 params['Tag'] = tag
8928 reply = await self.rpc(msg)
8929 return reply
8930
8931
8932
8933 @ReturnMapping(None)
8934 async def SetModelConstraints(self, application, constraints):
8935 '''
8936 application : str
8937 constraints : Value
8938 Returns -> None
8939 '''
8940 # map input types to rpc msg
8941 params = dict()
8942 msg = dict(Type='Client', Request='SetModelConstraints', Version=1, Params=params)
8943 params['application'] = application
8944 params['constraints'] = constraints
8945 reply = await self.rpc(msg)
8946 return reply
8947
8948
8949
8950 @ReturnMapping(StatusHistoryResults)
8951 async def StatusHistory(self, requests):
8952 '''
8953 requests : typing.Sequence[~StatusHistoryRequest]
8954 Returns -> typing.Sequence[~StatusHistoryResult]
8955 '''
8956 # map input types to rpc msg
8957 params = dict()
8958 msg = dict(Type='Client', Request='StatusHistory', Version=1, Params=params)
8959 params['requests'] = requests
8960 reply = await self.rpc(msg)
8961 return reply
8962
8963
8964
8965 @ReturnMapping(AllWatcherId)
8966 async def WatchAll(self):
8967 '''
8968
8969 Returns -> str
8970 '''
8971 # map input types to rpc msg
8972 params = dict()
8973 msg = dict(Type='Client', Request='WatchAll', Version=1, Params=params)
8974
8975 reply = await self.rpc(msg)
8976 return reply
8977
8978
8979 class CloudFacade(Type):
8980 name = 'Cloud'
8981 version = 1
8982 schema = {'definitions': {'Cloud': {'additionalProperties': False,
8983 'properties': {'auth-types': {'items': {'type': 'string'},
8984 'type': 'array'},
8985 'endpoint': {'type': 'string'},
8986 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
8987 'type': 'array'},
8988 'type': {'type': 'string'}},
8989 'required': ['type'],
8990 'type': 'object'},
8991 'CloudCredential': {'additionalProperties': False,
8992 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
8993 'type': 'object'},
8994 'auth-type': {'type': 'string'}},
8995 'required': ['auth-type'],
8996 'type': 'object'},
8997 'CloudCredentialsResult': {'additionalProperties': False,
8998 'properties': {'credentials': {'patternProperties': {'.*': {'$ref': '#/definitions/CloudCredential'}},
8999 'type': 'object'},
9000 'error': {'$ref': '#/definitions/Error'}},
9001 'type': 'object'},
9002 'CloudCredentialsResults': {'additionalProperties': False,
9003 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialsResult'},
9004 'type': 'array'}},
9005 'type': 'object'},
9006 'CloudDefaults': {'additionalProperties': False,
9007 'properties': {'cloud-tag': {'type': 'string'},
9008 'credential': {'type': 'string'},
9009 'region': {'type': 'string'}},
9010 'required': ['cloud-tag'],
9011 'type': 'object'},
9012 'CloudDefaultsResult': {'additionalProperties': False,
9013 'properties': {'error': {'$ref': '#/definitions/Error'},
9014 'result': {'$ref': '#/definitions/CloudDefaults'}},
9015 'required': ['error'],
9016 'type': 'object'},
9017 'CloudDefaultsResults': {'additionalProperties': False,
9018 'properties': {'results': {'items': {'$ref': '#/definitions/CloudDefaultsResult'},
9019 'type': 'array'}},
9020 'type': 'object'},
9021 'CloudRegion': {'additionalProperties': False,
9022 'properties': {'endpoint': {'type': 'string'},
9023 'name': {'type': 'string'}},
9024 'required': ['name'],
9025 'type': 'object'},
9026 'CloudResult': {'additionalProperties': False,
9027 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
9028 'error': {'$ref': '#/definitions/Error'}},
9029 'type': 'object'},
9030 'CloudResults': {'additionalProperties': False,
9031 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
9032 'type': 'array'}},
9033 'type': 'object'},
9034 'Entities': {'additionalProperties': False,
9035 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9036 'type': 'array'}},
9037 'required': ['entities'],
9038 'type': 'object'},
9039 'Entity': {'additionalProperties': False,
9040 'properties': {'tag': {'type': 'string'}},
9041 'required': ['tag'],
9042 'type': 'object'},
9043 'Error': {'additionalProperties': False,
9044 'properties': {'code': {'type': 'string'},
9045 'info': {'$ref': '#/definitions/ErrorInfo'},
9046 'message': {'type': 'string'}},
9047 'required': ['message', 'code'],
9048 'type': 'object'},
9049 'ErrorInfo': {'additionalProperties': False,
9050 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9051 'macaroon-path': {'type': 'string'}},
9052 'type': 'object'},
9053 'ErrorResult': {'additionalProperties': False,
9054 'properties': {'error': {'$ref': '#/definitions/Error'}},
9055 'type': 'object'},
9056 'ErrorResults': {'additionalProperties': False,
9057 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9058 'type': 'array'}},
9059 'required': ['results'],
9060 'type': 'object'},
9061 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9062 'UserCloud': {'additionalProperties': False,
9063 'properties': {'cloud-tag': {'type': 'string'},
9064 'user-tag': {'type': 'string'}},
9065 'required': ['user-tag', 'cloud-tag'],
9066 'type': 'object'},
9067 'UserCloudCredentials': {'additionalProperties': False,
9068 'properties': {'cloud-tag': {'type': 'string'},
9069 'credentials': {'patternProperties': {'.*': {'$ref': '#/definitions/CloudCredential'}},
9070 'type': 'object'},
9071 'user-tag': {'type': 'string'}},
9072 'required': ['user-tag',
9073 'cloud-tag',
9074 'credentials'],
9075 'type': 'object'},
9076 'UserClouds': {'additionalProperties': False,
9077 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
9078 'type': 'array'}},
9079 'type': 'object'},
9080 'UsersCloudCredentials': {'additionalProperties': False,
9081 'properties': {'users': {'items': {'$ref': '#/definitions/UserCloudCredentials'},
9082 'type': 'array'}},
9083 'required': ['users'],
9084 'type': 'object'}},
9085 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9086 'Result': {'$ref': '#/definitions/CloudResults'}},
9087 'type': 'object'},
9088 'CloudDefaults': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9089 'Result': {'$ref': '#/definitions/CloudDefaultsResults'}},
9090 'type': 'object'},
9091 'Credentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
9092 'Result': {'$ref': '#/definitions/CloudCredentialsResults'}},
9093 'type': 'object'},
9094 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UsersCloudCredentials'},
9095 'Result': {'$ref': '#/definitions/ErrorResults'}},
9096 'type': 'object'}},
9097 'type': 'object'}
9098
9099
9100 @ReturnMapping(CloudResults)
9101 async def Cloud(self, entities):
9102 '''
9103 entities : typing.Sequence[~Entity]
9104 Returns -> typing.Sequence[~CloudResult]
9105 '''
9106 # map input types to rpc msg
9107 params = dict()
9108 msg = dict(Type='Cloud', Request='Cloud', Version=1, Params=params)
9109 params['entities'] = entities
9110 reply = await self.rpc(msg)
9111 return reply
9112
9113
9114
9115 @ReturnMapping(CloudDefaultsResults)
9116 async def CloudDefaults(self, entities):
9117 '''
9118 entities : typing.Sequence[~Entity]
9119 Returns -> typing.Sequence[~CloudDefaultsResult]
9120 '''
9121 # map input types to rpc msg
9122 params = dict()
9123 msg = dict(Type='Cloud', Request='CloudDefaults', Version=1, Params=params)
9124 params['entities'] = entities
9125 reply = await self.rpc(msg)
9126 return reply
9127
9128
9129
9130 @ReturnMapping(CloudCredentialsResults)
9131 async def Credentials(self, user_clouds):
9132 '''
9133 user_clouds : typing.Sequence[~UserCloud]
9134 Returns -> typing.Sequence[~CloudCredentialsResult]
9135 '''
9136 # map input types to rpc msg
9137 params = dict()
9138 msg = dict(Type='Cloud', Request='Credentials', Version=1, Params=params)
9139 params['user-clouds'] = user_clouds
9140 reply = await self.rpc(msg)
9141 return reply
9142
9143
9144
9145 @ReturnMapping(ErrorResults)
9146 async def UpdateCredentials(self, users):
9147 '''
9148 users : typing.Sequence[~UserCloudCredentials]
9149 Returns -> typing.Sequence[~ErrorResult]
9150 '''
9151 # map input types to rpc msg
9152 params = dict()
9153 msg = dict(Type='Cloud', Request='UpdateCredentials', Version=1, Params=params)
9154 params['users'] = users
9155 reply = await self.rpc(msg)
9156 return reply
9157
9158
9159 class ControllerFacade(Type):
9160 name = 'Controller'
9161 version = 3
9162 schema = {'definitions': {'AllWatcherId': {'additionalProperties': False,
9163 'properties': {'watcher-id': {'type': 'string'}},
9164 'required': ['watcher-id'],
9165 'type': 'object'},
9166 'ConfigValue': {'additionalProperties': False,
9167 'properties': {'source': {'type': 'string'},
9168 'value': {'additionalProperties': True,
9169 'type': 'object'}},
9170 'required': ['value', 'source'],
9171 'type': 'object'},
9172 'ControllerConfigResult': {'additionalProperties': False,
9173 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
9174 'type': 'object'}},
9175 'type': 'object'}},
9176 'required': ['config'],
9177 'type': 'object'},
9178 'DestroyControllerArgs': {'additionalProperties': False,
9179 'properties': {'destroy-models': {'type': 'boolean'}},
9180 'required': ['destroy-models'],
9181 'type': 'object'},
9182 'Entities': {'additionalProperties': False,
9183 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9184 'type': 'array'}},
9185 'required': ['entities'],
9186 'type': 'object'},
9187 'Entity': {'additionalProperties': False,
9188 'properties': {'tag': {'type': 'string'}},
9189 'required': ['tag'],
9190 'type': 'object'},
9191 'Error': {'additionalProperties': False,
9192 'properties': {'code': {'type': 'string'},
9193 'info': {'$ref': '#/definitions/ErrorInfo'},
9194 'message': {'type': 'string'}},
9195 'required': ['message', 'code'],
9196 'type': 'object'},
9197 'ErrorInfo': {'additionalProperties': False,
9198 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9199 'macaroon-path': {'type': 'string'}},
9200 'type': 'object'},
9201 'InitiateModelMigrationArgs': {'additionalProperties': False,
9202 'properties': {'specs': {'items': {'$ref': '#/definitions/ModelMigrationSpec'},
9203 'type': 'array'}},
9204 'required': ['specs'],
9205 'type': 'object'},
9206 'InitiateModelMigrationResult': {'additionalProperties': False,
9207 'properties': {'error': {'$ref': '#/definitions/Error'},
9208 'id': {'type': 'string'},
9209 'model-tag': {'type': 'string'}},
9210 'required': ['model-tag',
9211 'id'],
9212 'type': 'object'},
9213 'InitiateModelMigrationResults': {'additionalProperties': False,
9214 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateModelMigrationResult'},
9215 'type': 'array'}},
9216 'required': ['results'],
9217 'type': 'object'},
9218 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9219 'Model': {'additionalProperties': False,
9220 'properties': {'name': {'type': 'string'},
9221 'owner-tag': {'type': 'string'},
9222 'uuid': {'type': 'string'}},
9223 'required': ['name', 'uuid', 'owner-tag'],
9224 'type': 'object'},
9225 'ModelBlockInfo': {'additionalProperties': False,
9226 'properties': {'blocks': {'items': {'type': 'string'},
9227 'type': 'array'},
9228 'model-uuid': {'type': 'string'},
9229 'name': {'type': 'string'},
9230 'owner-tag': {'type': 'string'}},
9231 'required': ['name',
9232 'model-uuid',
9233 'owner-tag',
9234 'blocks'],
9235 'type': 'object'},
9236 'ModelBlockInfoList': {'additionalProperties': False,
9237 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
9238 'type': 'array'}},
9239 'type': 'object'},
9240 'ModelConfigResults': {'additionalProperties': False,
9241 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
9242 'type': 'object'}},
9243 'required': ['config'],
9244 'type': 'object'},
9245 'ModelMigrationSpec': {'additionalProperties': False,
9246 'properties': {'model-tag': {'type': 'string'},
9247 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
9248 'required': ['model-tag',
9249 'target-info'],
9250 'type': 'object'},
9251 'ModelMigrationTargetInfo': {'additionalProperties': False,
9252 'properties': {'addrs': {'items': {'type': 'string'},
9253 'type': 'array'},
9254 'auth-tag': {'type': 'string'},
9255 'ca-cert': {'type': 'string'},
9256 'controller-tag': {'type': 'string'},
9257 'password': {'type': 'string'}},
9258 'required': ['controller-tag',
9259 'addrs',
9260 'ca-cert',
9261 'auth-tag',
9262 'password'],
9263 'type': 'object'},
9264 'ModelStatus': {'additionalProperties': False,
9265 'properties': {'application-count': {'type': 'integer'},
9266 'hosted-machine-count': {'type': 'integer'},
9267 'life': {'type': 'string'},
9268 'model-tag': {'type': 'string'},
9269 'owner-tag': {'type': 'string'}},
9270 'required': ['model-tag',
9271 'life',
9272 'hosted-machine-count',
9273 'application-count',
9274 'owner-tag'],
9275 'type': 'object'},
9276 'ModelStatusResults': {'additionalProperties': False,
9277 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
9278 'type': 'array'}},
9279 'required': ['models'],
9280 'type': 'object'},
9281 'RemoveBlocksArgs': {'additionalProperties': False,
9282 'properties': {'all': {'type': 'boolean'}},
9283 'required': ['all'],
9284 'type': 'object'},
9285 'UserModel': {'additionalProperties': False,
9286 'properties': {'last-connection': {'format': 'date-time',
9287 'type': 'string'},
9288 'model': {'$ref': '#/definitions/Model'}},
9289 'required': ['model', 'last-connection'],
9290 'type': 'object'},
9291 'UserModelList': {'additionalProperties': False,
9292 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
9293 'type': 'array'}},
9294 'required': ['user-models'],
9295 'type': 'object'}},
9296 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
9297 'type': 'object'},
9298 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
9299 'type': 'object'},
9300 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
9301 'type': 'object'},
9302 'InitiateModelMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateModelMigrationArgs'},
9303 'Result': {'$ref': '#/definitions/InitiateModelMigrationResults'}},
9304 'type': 'object'},
9305 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
9306 'type': 'object'},
9307 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
9308 'type': 'object'},
9309 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9310 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
9311 'type': 'object'},
9312 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
9313 'type': 'object'},
9314 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
9315 'type': 'object'}},
9316 'type': 'object'}
9317
9318
9319 @ReturnMapping(UserModelList)
9320 async def AllModels(self):
9321 '''
9322
9323 Returns -> typing.Sequence[~UserModel]
9324 '''
9325 # map input types to rpc msg
9326 params = dict()
9327 msg = dict(Type='Controller', Request='AllModels', Version=3, Params=params)
9328
9329 reply = await self.rpc(msg)
9330 return reply
9331
9332
9333
9334 @ReturnMapping(ControllerConfigResult)
9335 async def ControllerConfig(self):
9336 '''
9337
9338 Returns -> typing.Mapping[str, typing.Any]
9339 '''
9340 # map input types to rpc msg
9341 params = dict()
9342 msg = dict(Type='Controller', Request='ControllerConfig', Version=3, Params=params)
9343
9344 reply = await self.rpc(msg)
9345 return reply
9346
9347
9348
9349 @ReturnMapping(None)
9350 async def DestroyController(self, destroy_models):
9351 '''
9352 destroy_models : bool
9353 Returns -> None
9354 '''
9355 # map input types to rpc msg
9356 params = dict()
9357 msg = dict(Type='Controller', Request='DestroyController', Version=3, Params=params)
9358 params['destroy-models'] = destroy_models
9359 reply = await self.rpc(msg)
9360 return reply
9361
9362
9363
9364 @ReturnMapping(InitiateModelMigrationResults)
9365 async def InitiateModelMigration(self, specs):
9366 '''
9367 specs : typing.Sequence[~ModelMigrationSpec]
9368 Returns -> typing.Sequence[~InitiateModelMigrationResult]
9369 '''
9370 # map input types to rpc msg
9371 params = dict()
9372 msg = dict(Type='Controller', Request='InitiateModelMigration', Version=3, Params=params)
9373 params['specs'] = specs
9374 reply = await self.rpc(msg)
9375 return reply
9376
9377
9378
9379 @ReturnMapping(ModelBlockInfoList)
9380 async def ListBlockedModels(self):
9381 '''
9382
9383 Returns -> typing.Sequence[~ModelBlockInfo]
9384 '''
9385 # map input types to rpc msg
9386 params = dict()
9387 msg = dict(Type='Controller', Request='ListBlockedModels', Version=3, Params=params)
9388
9389 reply = await self.rpc(msg)
9390 return reply
9391
9392
9393
9394 @ReturnMapping(ModelConfigResults)
9395 async def ModelConfig(self):
9396 '''
9397
9398 Returns -> typing.Mapping[str, ~ConfigValue]
9399 '''
9400 # map input types to rpc msg
9401 params = dict()
9402 msg = dict(Type='Controller', Request='ModelConfig', Version=3, Params=params)
9403
9404 reply = await self.rpc(msg)
9405 return reply
9406
9407
9408
9409 @ReturnMapping(ModelStatusResults)
9410 async def ModelStatus(self, entities):
9411 '''
9412 entities : typing.Sequence[~Entity]
9413 Returns -> typing.Sequence[~ModelStatus]
9414 '''
9415 # map input types to rpc msg
9416 params = dict()
9417 msg = dict(Type='Controller', Request='ModelStatus', Version=3, Params=params)
9418 params['entities'] = entities
9419 reply = await self.rpc(msg)
9420 return reply
9421
9422
9423
9424 @ReturnMapping(None)
9425 async def RemoveBlocks(self, all_):
9426 '''
9427 all_ : bool
9428 Returns -> None
9429 '''
9430 # map input types to rpc msg
9431 params = dict()
9432 msg = dict(Type='Controller', Request='RemoveBlocks', Version=3, Params=params)
9433 params['all'] = all_
9434 reply = await self.rpc(msg)
9435 return reply
9436
9437
9438
9439 @ReturnMapping(AllWatcherId)
9440 async def WatchAllModels(self):
9441 '''
9442
9443 Returns -> str
9444 '''
9445 # map input types to rpc msg
9446 params = dict()
9447 msg = dict(Type='Controller', Request='WatchAllModels', Version=3, Params=params)
9448
9449 reply = await self.rpc(msg)
9450 return reply
9451
9452
9453 class DeployerFacade(Type):
9454 name = 'Deployer'
9455 version = 1
9456 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
9457 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
9458 'type': 'array'},
9459 'type': 'array'}},
9460 'required': ['servers'],
9461 'type': 'object'},
9462 'Address': {'additionalProperties': False,
9463 'properties': {'scope': {'type': 'string'},
9464 'space-name': {'type': 'string'},
9465 'type': {'type': 'string'},
9466 'value': {'type': 'string'}},
9467 'required': ['value', 'type', 'scope'],
9468 'type': 'object'},
9469 'BytesResult': {'additionalProperties': False,
9470 'properties': {'result': {'items': {'type': 'integer'},
9471 'type': 'array'}},
9472 'required': ['result'],
9473 'type': 'object'},
9474 'DeployerConnectionValues': {'additionalProperties': False,
9475 'properties': {'api-addresses': {'items': {'type': 'string'},
9476 'type': 'array'},
9477 'state-addresses': {'items': {'type': 'string'},
9478 'type': 'array'}},
9479 'required': ['state-addresses',
9480 'api-addresses'],
9481 'type': 'object'},
9482 'Entities': {'additionalProperties': False,
9483 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9484 'type': 'array'}},
9485 'required': ['entities'],
9486 'type': 'object'},
9487 'Entity': {'additionalProperties': False,
9488 'properties': {'tag': {'type': 'string'}},
9489 'required': ['tag'],
9490 'type': 'object'},
9491 'EntityPassword': {'additionalProperties': False,
9492 'properties': {'password': {'type': 'string'},
9493 'tag': {'type': 'string'}},
9494 'required': ['tag', 'password'],
9495 'type': 'object'},
9496 'EntityPasswords': {'additionalProperties': False,
9497 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
9498 'type': 'array'}},
9499 'required': ['changes'],
9500 'type': 'object'},
9501 'Error': {'additionalProperties': False,
9502 'properties': {'code': {'type': 'string'},
9503 'info': {'$ref': '#/definitions/ErrorInfo'},
9504 'message': {'type': 'string'}},
9505 'required': ['message', 'code'],
9506 'type': 'object'},
9507 'ErrorInfo': {'additionalProperties': False,
9508 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9509 'macaroon-path': {'type': 'string'}},
9510 'type': 'object'},
9511 'ErrorResult': {'additionalProperties': False,
9512 'properties': {'error': {'$ref': '#/definitions/Error'}},
9513 'type': 'object'},
9514 'ErrorResults': {'additionalProperties': False,
9515 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9516 'type': 'array'}},
9517 'required': ['results'],
9518 'type': 'object'},
9519 'HostPort': {'additionalProperties': False,
9520 'properties': {'Address': {'$ref': '#/definitions/Address'},
9521 'port': {'type': 'integer'}},
9522 'required': ['Address', 'port'],
9523 'type': 'object'},
9524 'LifeResult': {'additionalProperties': False,
9525 'properties': {'error': {'$ref': '#/definitions/Error'},
9526 'life': {'type': 'string'}},
9527 'required': ['life'],
9528 'type': 'object'},
9529 'LifeResults': {'additionalProperties': False,
9530 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
9531 'type': 'array'}},
9532 'required': ['results'],
9533 'type': 'object'},
9534 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9535 'NotifyWatchResult': {'additionalProperties': False,
9536 'properties': {'NotifyWatcherId': {'type': 'string'},
9537 'error': {'$ref': '#/definitions/Error'}},
9538 'required': ['NotifyWatcherId'],
9539 'type': 'object'},
9540 'StringResult': {'additionalProperties': False,
9541 'properties': {'error': {'$ref': '#/definitions/Error'},
9542 'result': {'type': 'string'}},
9543 'required': ['result'],
9544 'type': 'object'},
9545 'StringsResult': {'additionalProperties': False,
9546 'properties': {'error': {'$ref': '#/definitions/Error'},
9547 'result': {'items': {'type': 'string'},
9548 'type': 'array'}},
9549 'type': 'object'},
9550 'StringsWatchResult': {'additionalProperties': False,
9551 'properties': {'changes': {'items': {'type': 'string'},
9552 'type': 'array'},
9553 'error': {'$ref': '#/definitions/Error'},
9554 'watcher-id': {'type': 'string'}},
9555 'required': ['watcher-id'],
9556 'type': 'object'},
9557 'StringsWatchResults': {'additionalProperties': False,
9558 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
9559 'type': 'array'}},
9560 'required': ['results'],
9561 'type': 'object'}},
9562 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
9563 'type': 'object'},
9564 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
9565 'type': 'object'},
9566 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
9567 'type': 'object'},
9568 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
9569 'type': 'object'},
9570 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9571 'Result': {'$ref': '#/definitions/LifeResults'}},
9572 'type': 'object'},
9573 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
9574 'type': 'object'},
9575 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9576 'Result': {'$ref': '#/definitions/ErrorResults'}},
9577 'type': 'object'},
9578 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
9579 'Result': {'$ref': '#/definitions/ErrorResults'}},
9580 'type': 'object'},
9581 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
9582 'type': 'object'},
9583 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
9584 'type': 'object'},
9585 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9586 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
9587 'type': 'object'}},
9588 'type': 'object'}
9589
9590
9591 @ReturnMapping(StringsResult)
9592 async def APIAddresses(self):
9593 '''
9594
9595 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
9596 '''
9597 # map input types to rpc msg
9598 params = dict()
9599 msg = dict(Type='Deployer', Request='APIAddresses', Version=1, Params=params)
9600
9601 reply = await self.rpc(msg)
9602 return reply
9603
9604
9605
9606 @ReturnMapping(APIHostPortsResult)
9607 async def APIHostPorts(self):
9608 '''
9609
9610 Returns -> typing.Sequence[~HostPort]
9611 '''
9612 # map input types to rpc msg
9613 params = dict()
9614 msg = dict(Type='Deployer', Request='APIHostPorts', Version=1, Params=params)
9615
9616 reply = await self.rpc(msg)
9617 return reply
9618
9619
9620
9621 @ReturnMapping(BytesResult)
9622 async def CACert(self):
9623 '''
9624
9625 Returns -> typing.Sequence[int]
9626 '''
9627 # map input types to rpc msg
9628 params = dict()
9629 msg = dict(Type='Deployer', Request='CACert', Version=1, Params=params)
9630
9631 reply = await self.rpc(msg)
9632 return reply
9633
9634
9635
9636 @ReturnMapping(DeployerConnectionValues)
9637 async def ConnectionInfo(self):
9638 '''
9639
9640 Returns -> typing.Sequence[str]
9641 '''
9642 # map input types to rpc msg
9643 params = dict()
9644 msg = dict(Type='Deployer', Request='ConnectionInfo', Version=1, Params=params)
9645
9646 reply = await self.rpc(msg)
9647 return reply
9648
9649
9650
9651 @ReturnMapping(LifeResults)
9652 async def Life(self, entities):
9653 '''
9654 entities : typing.Sequence[~Entity]
9655 Returns -> typing.Sequence[~LifeResult]
9656 '''
9657 # map input types to rpc msg
9658 params = dict()
9659 msg = dict(Type='Deployer', Request='Life', Version=1, Params=params)
9660 params['entities'] = entities
9661 reply = await self.rpc(msg)
9662 return reply
9663
9664
9665
9666 @ReturnMapping(StringResult)
9667 async def ModelUUID(self):
9668 '''
9669
9670 Returns -> typing.Union[_ForwardRef('Error'), str]
9671 '''
9672 # map input types to rpc msg
9673 params = dict()
9674 msg = dict(Type='Deployer', Request='ModelUUID', Version=1, Params=params)
9675
9676 reply = await self.rpc(msg)
9677 return reply
9678
9679
9680
9681 @ReturnMapping(ErrorResults)
9682 async def Remove(self, entities):
9683 '''
9684 entities : typing.Sequence[~Entity]
9685 Returns -> typing.Sequence[~ErrorResult]
9686 '''
9687 # map input types to rpc msg
9688 params = dict()
9689 msg = dict(Type='Deployer', Request='Remove', Version=1, Params=params)
9690 params['entities'] = entities
9691 reply = await self.rpc(msg)
9692 return reply
9693
9694
9695
9696 @ReturnMapping(ErrorResults)
9697 async def SetPasswords(self, changes):
9698 '''
9699 changes : typing.Sequence[~EntityPassword]
9700 Returns -> typing.Sequence[~ErrorResult]
9701 '''
9702 # map input types to rpc msg
9703 params = dict()
9704 msg = dict(Type='Deployer', Request='SetPasswords', Version=1, Params=params)
9705 params['changes'] = changes
9706 reply = await self.rpc(msg)
9707 return reply
9708
9709
9710
9711 @ReturnMapping(StringsResult)
9712 async def StateAddresses(self):
9713 '''
9714
9715 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
9716 '''
9717 # map input types to rpc msg
9718 params = dict()
9719 msg = dict(Type='Deployer', Request='StateAddresses', Version=1, Params=params)
9720
9721 reply = await self.rpc(msg)
9722 return reply
9723
9724
9725
9726 @ReturnMapping(NotifyWatchResult)
9727 async def WatchAPIHostPorts(self):
9728 '''
9729
9730 Returns -> typing.Union[str, _ForwardRef('Error')]
9731 '''
9732 # map input types to rpc msg
9733 params = dict()
9734 msg = dict(Type='Deployer', Request='WatchAPIHostPorts', Version=1, Params=params)
9735
9736 reply = await self.rpc(msg)
9737 return reply
9738
9739
9740
9741 @ReturnMapping(StringsWatchResults)
9742 async def WatchUnits(self, entities):
9743 '''
9744 entities : typing.Sequence[~Entity]
9745 Returns -> typing.Sequence[~StringsWatchResult]
9746 '''
9747 # map input types to rpc msg
9748 params = dict()
9749 msg = dict(Type='Deployer', Request='WatchUnits', Version=1, Params=params)
9750 params['entities'] = entities
9751 reply = await self.rpc(msg)
9752 return reply
9753
9754
9755 class DiscoverSpacesFacade(Type):
9756 name = 'DiscoverSpaces'
9757 version = 2
9758 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
9759 'properties': {'space-tag': {'type': 'string'},
9760 'subnet-provider-id': {'type': 'string'},
9761 'subnet-tag': {'type': 'string'},
9762 'zones': {'items': {'type': 'string'},
9763 'type': 'array'}},
9764 'required': ['space-tag'],
9765 'type': 'object'},
9766 'AddSubnetsParams': {'additionalProperties': False,
9767 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
9768 'type': 'array'}},
9769 'required': ['subnets'],
9770 'type': 'object'},
9771 'CreateSpaceParams': {'additionalProperties': False,
9772 'properties': {'provider-id': {'type': 'string'},
9773 'public': {'type': 'boolean'},
9774 'space-tag': {'type': 'string'},
9775 'subnet-tags': {'items': {'type': 'string'},
9776 'type': 'array'}},
9777 'required': ['subnet-tags',
9778 'space-tag',
9779 'public'],
9780 'type': 'object'},
9781 'CreateSpacesParams': {'additionalProperties': False,
9782 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
9783 'type': 'array'}},
9784 'required': ['spaces'],
9785 'type': 'object'},
9786 'DiscoverSpacesResults': {'additionalProperties': False,
9787 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'},
9788 'type': 'array'}},
9789 'required': ['results'],
9790 'type': 'object'},
9791 'Error': {'additionalProperties': False,
9792 'properties': {'code': {'type': 'string'},
9793 'info': {'$ref': '#/definitions/ErrorInfo'},
9794 'message': {'type': 'string'}},
9795 'required': ['message', 'code'],
9796 'type': 'object'},
9797 'ErrorInfo': {'additionalProperties': False,
9798 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9799 'macaroon-path': {'type': 'string'}},
9800 'type': 'object'},
9801 'ErrorResult': {'additionalProperties': False,
9802 'properties': {'error': {'$ref': '#/definitions/Error'}},
9803 'type': 'object'},
9804 'ErrorResults': {'additionalProperties': False,
9805 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9806 'type': 'array'}},
9807 'required': ['results'],
9808 'type': 'object'},
9809 'ListSubnetsResults': {'additionalProperties': False,
9810 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
9811 'type': 'array'}},
9812 'required': ['results'],
9813 'type': 'object'},
9814 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9815 'ModelConfigResult': {'additionalProperties': False,
9816 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
9817 'type': 'object'}},
9818 'type': 'object'}},
9819 'required': ['config'],
9820 'type': 'object'},
9821 'ProviderSpace': {'additionalProperties': False,
9822 'properties': {'error': {'$ref': '#/definitions/Error'},
9823 'name': {'type': 'string'},
9824 'provider-id': {'type': 'string'},
9825 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
9826 'type': 'array'}},
9827 'required': ['name',
9828 'provider-id',
9829 'subnets'],
9830 'type': 'object'},
9831 'Subnet': {'additionalProperties': False,
9832 'properties': {'cidr': {'type': 'string'},
9833 'life': {'type': 'string'},
9834 'provider-id': {'type': 'string'},
9835 'space-tag': {'type': 'string'},
9836 'status': {'type': 'string'},
9837 'vlan-tag': {'type': 'integer'},
9838 'zones': {'items': {'type': 'string'},
9839 'type': 'array'}},
9840 'required': ['cidr',
9841 'vlan-tag',
9842 'life',
9843 'space-tag',
9844 'zones'],
9845 'type': 'object'},
9846 'SubnetsFilters': {'additionalProperties': False,
9847 'properties': {'space-tag': {'type': 'string'},
9848 'zone': {'type': 'string'}},
9849 'type': 'object'}},
9850 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
9851 'Result': {'$ref': '#/definitions/ErrorResults'}},
9852 'type': 'object'},
9853 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
9854 'Result': {'$ref': '#/definitions/ErrorResults'}},
9855 'type': 'object'},
9856 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
9857 'type': 'object'},
9858 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
9859 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
9860 'type': 'object'},
9861 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
9862 'type': 'object'}},
9863 'type': 'object'}
9864
9865
9866 @ReturnMapping(ErrorResults)
9867 async def AddSubnets(self, subnets):
9868 '''
9869 subnets : typing.Sequence[~AddSubnetParams]
9870 Returns -> typing.Sequence[~ErrorResult]
9871 '''
9872 # map input types to rpc msg
9873 params = dict()
9874 msg = dict(Type='DiscoverSpaces', Request='AddSubnets', Version=2, Params=params)
9875 params['subnets'] = subnets
9876 reply = await self.rpc(msg)
9877 return reply
9878
9879
9880
9881 @ReturnMapping(ErrorResults)
9882 async def CreateSpaces(self, spaces):
9883 '''
9884 spaces : typing.Sequence[~CreateSpaceParams]
9885 Returns -> typing.Sequence[~ErrorResult]
9886 '''
9887 # map input types to rpc msg
9888 params = dict()
9889 msg = dict(Type='DiscoverSpaces', Request='CreateSpaces', Version=2, Params=params)
9890 params['spaces'] = spaces
9891 reply = await self.rpc(msg)
9892 return reply
9893
9894
9895
9896 @ReturnMapping(DiscoverSpacesResults)
9897 async def ListSpaces(self):
9898 '''
9899
9900 Returns -> typing.Sequence[~ProviderSpace]
9901 '''
9902 # map input types to rpc msg
9903 params = dict()
9904 msg = dict(Type='DiscoverSpaces', Request='ListSpaces', Version=2, Params=params)
9905
9906 reply = await self.rpc(msg)
9907 return reply
9908
9909
9910
9911 @ReturnMapping(ListSubnetsResults)
9912 async def ListSubnets(self, space_tag, zone):
9913 '''
9914 space_tag : str
9915 zone : str
9916 Returns -> typing.Sequence[~Subnet]
9917 '''
9918 # map input types to rpc msg
9919 params = dict()
9920 msg = dict(Type='DiscoverSpaces', Request='ListSubnets', Version=2, Params=params)
9921 params['space-tag'] = space_tag
9922 params['zone'] = zone
9923 reply = await self.rpc(msg)
9924 return reply
9925
9926
9927
9928 @ReturnMapping(ModelConfigResult)
9929 async def ModelConfig(self):
9930 '''
9931
9932 Returns -> typing.Mapping[str, typing.Any]
9933 '''
9934 # map input types to rpc msg
9935 params = dict()
9936 msg = dict(Type='DiscoverSpaces', Request='ModelConfig', Version=2, Params=params)
9937
9938 reply = await self.rpc(msg)
9939 return reply
9940
9941
9942 class DiskManagerFacade(Type):
9943 name = 'DiskManager'
9944 version = 2
9945 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
9946 'properties': {'BusAddress': {'type': 'string'},
9947 'DeviceLinks': {'items': {'type': 'string'},
9948 'type': 'array'},
9949 'DeviceName': {'type': 'string'},
9950 'FilesystemType': {'type': 'string'},
9951 'HardwareId': {'type': 'string'},
9952 'InUse': {'type': 'boolean'},
9953 'Label': {'type': 'string'},
9954 'MountPoint': {'type': 'string'},
9955 'Size': {'type': 'integer'},
9956 'UUID': {'type': 'string'}},
9957 'required': ['DeviceName',
9958 'DeviceLinks',
9959 'Label',
9960 'UUID',
9961 'HardwareId',
9962 'BusAddress',
9963 'Size',
9964 'FilesystemType',
9965 'InUse',
9966 'MountPoint'],
9967 'type': 'object'},
9968 'Error': {'additionalProperties': False,
9969 'properties': {'code': {'type': 'string'},
9970 'info': {'$ref': '#/definitions/ErrorInfo'},
9971 'message': {'type': 'string'}},
9972 'required': ['message', 'code'],
9973 'type': 'object'},
9974 'ErrorInfo': {'additionalProperties': False,
9975 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9976 'macaroon-path': {'type': 'string'}},
9977 'type': 'object'},
9978 'ErrorResult': {'additionalProperties': False,
9979 'properties': {'error': {'$ref': '#/definitions/Error'}},
9980 'type': 'object'},
9981 'ErrorResults': {'additionalProperties': False,
9982 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9983 'type': 'array'}},
9984 'required': ['results'],
9985 'type': 'object'},
9986 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9987 'MachineBlockDevices': {'additionalProperties': False,
9988 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
9989 'type': 'array'},
9990 'machine': {'type': 'string'}},
9991 'required': ['machine'],
9992 'type': 'object'},
9993 'SetMachineBlockDevices': {'additionalProperties': False,
9994 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
9995 'type': 'array'}},
9996 'required': ['machine-block-devices'],
9997 'type': 'object'}},
9998 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
9999 'Result': {'$ref': '#/definitions/ErrorResults'}},
10000 'type': 'object'}},
10001 'type': 'object'}
10002
10003
10004 @ReturnMapping(ErrorResults)
10005 async def SetMachineBlockDevices(self, machine_block_devices):
10006 '''
10007 machine_block_devices : typing.Sequence[~MachineBlockDevices]
10008 Returns -> typing.Sequence[~ErrorResult]
10009 '''
10010 # map input types to rpc msg
10011 params = dict()
10012 msg = dict(Type='DiskManager', Request='SetMachineBlockDevices', Version=2, Params=params)
10013 params['machine-block-devices'] = machine_block_devices
10014 reply = await self.rpc(msg)
10015 return reply
10016
10017
10018 class EntityWatcherFacade(Type):
10019 name = 'EntityWatcher'
10020 version = 2
10021 schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
10022 'properties': {'changes': {'items': {'type': 'string'},
10023 'type': 'array'},
10024 'error': {'$ref': '#/definitions/Error'},
10025 'watcher-id': {'type': 'string'}},
10026 'required': ['watcher-id'],
10027 'type': 'object'},
10028 'Error': {'additionalProperties': False,
10029 'properties': {'code': {'type': 'string'},
10030 'info': {'$ref': '#/definitions/ErrorInfo'},
10031 'message': {'type': 'string'}},
10032 'required': ['message', 'code'],
10033 'type': 'object'},
10034 'ErrorInfo': {'additionalProperties': False,
10035 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10036 'macaroon-path': {'type': 'string'}},
10037 'type': 'object'},
10038 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
10039 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
10040 'type': 'object'},
10041 'Stop': {'type': 'object'}},
10042 'type': 'object'}
10043
10044
10045 @ReturnMapping(EntitiesWatchResult)
10046 async def Next(self):
10047 '''
10048
10049 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
10050 '''
10051 # map input types to rpc msg
10052 params = dict()
10053 msg = dict(Type='EntityWatcher', Request='Next', Version=2, Params=params)
10054
10055 reply = await self.rpc(msg)
10056 return reply
10057
10058
10059
10060 @ReturnMapping(None)
10061 async def Stop(self):
10062 '''
10063
10064 Returns -> None
10065 '''
10066 # map input types to rpc msg
10067 params = dict()
10068 msg = dict(Type='EntityWatcher', Request='Stop', Version=2, Params=params)
10069
10070 reply = await self.rpc(msg)
10071 return reply
10072
10073
10074 class FilesystemAttachmentsWatcherFacade(Type):
10075 name = 'FilesystemAttachmentsWatcher'
10076 version = 2
10077 schema = {'definitions': {'Error': {'additionalProperties': False,
10078 'properties': {'code': {'type': 'string'},
10079 'info': {'$ref': '#/definitions/ErrorInfo'},
10080 'message': {'type': 'string'}},
10081 'required': ['message', 'code'],
10082 'type': 'object'},
10083 'ErrorInfo': {'additionalProperties': False,
10084 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10085 'macaroon-path': {'type': 'string'}},
10086 'type': 'object'},
10087 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10088 'MachineStorageId': {'additionalProperties': False,
10089 'properties': {'attachment-tag': {'type': 'string'},
10090 'machine-tag': {'type': 'string'}},
10091 'required': ['machine-tag',
10092 'attachment-tag'],
10093 'type': 'object'},
10094 'MachineStorageIdsWatchResult': {'additionalProperties': False,
10095 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
10096 'type': 'array'},
10097 'error': {'$ref': '#/definitions/Error'},
10098 'watcher-id': {'type': 'string'}},
10099 'required': ['watcher-id',
10100 'changes'],
10101 'type': 'object'}},
10102 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
10103 'type': 'object'},
10104 'Stop': {'type': 'object'}},
10105 'type': 'object'}
10106
10107
10108 @ReturnMapping(MachineStorageIdsWatchResult)
10109 async def Next(self):
10110 '''
10111
10112 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
10113 '''
10114 # map input types to rpc msg
10115 params = dict()
10116 msg = dict(Type='FilesystemAttachmentsWatcher', Request='Next', Version=2, Params=params)
10117
10118 reply = await self.rpc(msg)
10119 return reply
10120
10121
10122
10123 @ReturnMapping(None)
10124 async def Stop(self):
10125 '''
10126
10127 Returns -> None
10128 '''
10129 # map input types to rpc msg
10130 params = dict()
10131 msg = dict(Type='FilesystemAttachmentsWatcher', Request='Stop', Version=2, Params=params)
10132
10133 reply = await self.rpc(msg)
10134 return reply
10135
10136
10137 class FirewallerFacade(Type):
10138 name = 'Firewaller'
10139 version = 3
10140 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
10141 'properties': {'error': {'$ref': '#/definitions/Error'},
10142 'result': {'type': 'boolean'}},
10143 'required': ['result'],
10144 'type': 'object'},
10145 'BoolResults': {'additionalProperties': False,
10146 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
10147 'type': 'array'}},
10148 'required': ['results'],
10149 'type': 'object'},
10150 'Entities': {'additionalProperties': False,
10151 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10152 'type': 'array'}},
10153 'required': ['entities'],
10154 'type': 'object'},
10155 'Entity': {'additionalProperties': False,
10156 'properties': {'tag': {'type': 'string'}},
10157 'required': ['tag'],
10158 'type': 'object'},
10159 'Error': {'additionalProperties': False,
10160 'properties': {'code': {'type': 'string'},
10161 'info': {'$ref': '#/definitions/ErrorInfo'},
10162 'message': {'type': 'string'}},
10163 'required': ['message', 'code'],
10164 'type': 'object'},
10165 'ErrorInfo': {'additionalProperties': False,
10166 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10167 'macaroon-path': {'type': 'string'}},
10168 'type': 'object'},
10169 'LifeResult': {'additionalProperties': False,
10170 'properties': {'error': {'$ref': '#/definitions/Error'},
10171 'life': {'type': 'string'}},
10172 'required': ['life'],
10173 'type': 'object'},
10174 'LifeResults': {'additionalProperties': False,
10175 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
10176 'type': 'array'}},
10177 'required': ['results'],
10178 'type': 'object'},
10179 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10180 'MachinePortRange': {'additionalProperties': False,
10181 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
10182 'relation-tag': {'type': 'string'},
10183 'unit-tag': {'type': 'string'}},
10184 'required': ['unit-tag',
10185 'relation-tag',
10186 'port-range'],
10187 'type': 'object'},
10188 'MachinePorts': {'additionalProperties': False,
10189 'properties': {'machine-tag': {'type': 'string'},
10190 'subnet-tag': {'type': 'string'}},
10191 'required': ['machine-tag', 'subnet-tag'],
10192 'type': 'object'},
10193 'MachinePortsParams': {'additionalProperties': False,
10194 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
10195 'type': 'array'}},
10196 'required': ['params'],
10197 'type': 'object'},
10198 'MachinePortsResult': {'additionalProperties': False,
10199 'properties': {'error': {'$ref': '#/definitions/Error'},
10200 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
10201 'type': 'array'}},
10202 'required': ['ports'],
10203 'type': 'object'},
10204 'MachinePortsResults': {'additionalProperties': False,
10205 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
10206 'type': 'array'}},
10207 'required': ['results'],
10208 'type': 'object'},
10209 'ModelConfigResult': {'additionalProperties': False,
10210 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
10211 'type': 'object'}},
10212 'type': 'object'}},
10213 'required': ['config'],
10214 'type': 'object'},
10215 'NotifyWatchResult': {'additionalProperties': False,
10216 'properties': {'NotifyWatcherId': {'type': 'string'},
10217 'error': {'$ref': '#/definitions/Error'}},
10218 'required': ['NotifyWatcherId'],
10219 'type': 'object'},
10220 'NotifyWatchResults': {'additionalProperties': False,
10221 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10222 'type': 'array'}},
10223 'required': ['results'],
10224 'type': 'object'},
10225 'PortRange': {'additionalProperties': False,
10226 'properties': {'from-port': {'type': 'integer'},
10227 'protocol': {'type': 'string'},
10228 'to-port': {'type': 'integer'}},
10229 'required': ['from-port', 'to-port', 'protocol'],
10230 'type': 'object'},
10231 'StringResult': {'additionalProperties': False,
10232 'properties': {'error': {'$ref': '#/definitions/Error'},
10233 'result': {'type': 'string'}},
10234 'required': ['result'],
10235 'type': 'object'},
10236 'StringResults': {'additionalProperties': False,
10237 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
10238 'type': 'array'}},
10239 'required': ['results'],
10240 'type': 'object'},
10241 'StringsResult': {'additionalProperties': False,
10242 'properties': {'error': {'$ref': '#/definitions/Error'},
10243 'result': {'items': {'type': 'string'},
10244 'type': 'array'}},
10245 'type': 'object'},
10246 'StringsResults': {'additionalProperties': False,
10247 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
10248 'type': 'array'}},
10249 'required': ['results'],
10250 'type': 'object'},
10251 'StringsWatchResult': {'additionalProperties': False,
10252 'properties': {'changes': {'items': {'type': 'string'},
10253 'type': 'array'},
10254 'error': {'$ref': '#/definitions/Error'},
10255 'watcher-id': {'type': 'string'}},
10256 'required': ['watcher-id'],
10257 'type': 'object'},
10258 'StringsWatchResults': {'additionalProperties': False,
10259 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
10260 'type': 'array'}},
10261 'required': ['results'],
10262 'type': 'object'}},
10263 'properties': {'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10264 'Result': {'$ref': '#/definitions/StringResults'}},
10265 'type': 'object'},
10266 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10267 'Result': {'$ref': '#/definitions/BoolResults'}},
10268 'type': 'object'},
10269 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10270 'Result': {'$ref': '#/definitions/StringsResults'}},
10271 'type': 'object'},
10272 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
10273 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
10274 'type': 'object'},
10275 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10276 'Result': {'$ref': '#/definitions/StringResults'}},
10277 'type': 'object'},
10278 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10279 'Result': {'$ref': '#/definitions/LifeResults'}},
10280 'type': 'object'},
10281 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10282 'type': 'object'},
10283 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10284 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10285 'type': 'object'},
10286 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10287 'type': 'object'},
10288 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
10289 'type': 'object'},
10290 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10291 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10292 'type': 'object'},
10293 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10294 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10295 'type': 'object'}},
10296 'type': 'object'}
10297
10298
10299 @ReturnMapping(StringResults)
10300 async def GetAssignedMachine(self, entities):
10301 '''
10302 entities : typing.Sequence[~Entity]
10303 Returns -> typing.Sequence[~StringResult]
10304 '''
10305 # map input types to rpc msg
10306 params = dict()
10307 msg = dict(Type='Firewaller', Request='GetAssignedMachine', Version=3, Params=params)
10308 params['entities'] = entities
10309 reply = await self.rpc(msg)
10310 return reply
10311
10312
10313
10314 @ReturnMapping(BoolResults)
10315 async def GetExposed(self, entities):
10316 '''
10317 entities : typing.Sequence[~Entity]
10318 Returns -> typing.Sequence[~BoolResult]
10319 '''
10320 # map input types to rpc msg
10321 params = dict()
10322 msg = dict(Type='Firewaller', Request='GetExposed', Version=3, Params=params)
10323 params['entities'] = entities
10324 reply = await self.rpc(msg)
10325 return reply
10326
10327
10328
10329 @ReturnMapping(StringsResults)
10330 async def GetMachineActiveSubnets(self, entities):
10331 '''
10332 entities : typing.Sequence[~Entity]
10333 Returns -> typing.Sequence[~StringsResult]
10334 '''
10335 # map input types to rpc msg
10336 params = dict()
10337 msg = dict(Type='Firewaller', Request='GetMachineActiveSubnets', Version=3, Params=params)
10338 params['entities'] = entities
10339 reply = await self.rpc(msg)
10340 return reply
10341
10342
10343
10344 @ReturnMapping(MachinePortsResults)
10345 async def GetMachinePorts(self, params):
10346 '''
10347 params : typing.Sequence[~MachinePorts]
10348 Returns -> typing.Sequence[~MachinePortsResult]
10349 '''
10350 # map input types to rpc msg
10351 params = dict()
10352 msg = dict(Type='Firewaller', Request='GetMachinePorts', Version=3, Params=params)
10353 params['params'] = params
10354 reply = await self.rpc(msg)
10355 return reply
10356
10357
10358
10359 @ReturnMapping(StringResults)
10360 async def InstanceId(self, entities):
10361 '''
10362 entities : typing.Sequence[~Entity]
10363 Returns -> typing.Sequence[~StringResult]
10364 '''
10365 # map input types to rpc msg
10366 params = dict()
10367 msg = dict(Type='Firewaller', Request='InstanceId', Version=3, Params=params)
10368 params['entities'] = entities
10369 reply = await self.rpc(msg)
10370 return reply
10371
10372
10373
10374 @ReturnMapping(LifeResults)
10375 async def Life(self, entities):
10376 '''
10377 entities : typing.Sequence[~Entity]
10378 Returns -> typing.Sequence[~LifeResult]
10379 '''
10380 # map input types to rpc msg
10381 params = dict()
10382 msg = dict(Type='Firewaller', Request='Life', Version=3, Params=params)
10383 params['entities'] = entities
10384 reply = await self.rpc(msg)
10385 return reply
10386
10387
10388
10389 @ReturnMapping(ModelConfigResult)
10390 async def ModelConfig(self):
10391 '''
10392
10393 Returns -> typing.Mapping[str, typing.Any]
10394 '''
10395 # map input types to rpc msg
10396 params = dict()
10397 msg = dict(Type='Firewaller', Request='ModelConfig', Version=3, Params=params)
10398
10399 reply = await self.rpc(msg)
10400 return reply
10401
10402
10403
10404 @ReturnMapping(NotifyWatchResults)
10405 async def Watch(self, entities):
10406 '''
10407 entities : typing.Sequence[~Entity]
10408 Returns -> typing.Sequence[~NotifyWatchResult]
10409 '''
10410 # map input types to rpc msg
10411 params = dict()
10412 msg = dict(Type='Firewaller', Request='Watch', Version=3, Params=params)
10413 params['entities'] = entities
10414 reply = await self.rpc(msg)
10415 return reply
10416
10417
10418
10419 @ReturnMapping(NotifyWatchResult)
10420 async def WatchForModelConfigChanges(self):
10421 '''
10422
10423 Returns -> typing.Union[str, _ForwardRef('Error')]
10424 '''
10425 # map input types to rpc msg
10426 params = dict()
10427 msg = dict(Type='Firewaller', Request='WatchForModelConfigChanges', Version=3, Params=params)
10428
10429 reply = await self.rpc(msg)
10430 return reply
10431
10432
10433
10434 @ReturnMapping(StringsWatchResult)
10435 async def WatchModelMachines(self):
10436 '''
10437
10438 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
10439 '''
10440 # map input types to rpc msg
10441 params = dict()
10442 msg = dict(Type='Firewaller', Request='WatchModelMachines', Version=3, Params=params)
10443
10444 reply = await self.rpc(msg)
10445 return reply
10446
10447
10448
10449 @ReturnMapping(StringsWatchResults)
10450 async def WatchOpenedPorts(self, entities):
10451 '''
10452 entities : typing.Sequence[~Entity]
10453 Returns -> typing.Sequence[~StringsWatchResult]
10454 '''
10455 # map input types to rpc msg
10456 params = dict()
10457 msg = dict(Type='Firewaller', Request='WatchOpenedPorts', Version=3, Params=params)
10458 params['entities'] = entities
10459 reply = await self.rpc(msg)
10460 return reply
10461
10462
10463
10464 @ReturnMapping(StringsWatchResults)
10465 async def WatchUnits(self, entities):
10466 '''
10467 entities : typing.Sequence[~Entity]
10468 Returns -> typing.Sequence[~StringsWatchResult]
10469 '''
10470 # map input types to rpc msg
10471 params = dict()
10472 msg = dict(Type='Firewaller', Request='WatchUnits', Version=3, Params=params)
10473 params['entities'] = entities
10474 reply = await self.rpc(msg)
10475 return reply
10476
10477
10478 class HighAvailabilityFacade(Type):
10479 name = 'HighAvailability'
10480 version = 2
10481 schema = {'definitions': {'Address': {'additionalProperties': False,
10482 'properties': {'Scope': {'type': 'string'},
10483 'SpaceName': {'type': 'string'},
10484 'SpaceProviderId': {'type': 'string'},
10485 'Type': {'type': 'string'},
10486 'Value': {'type': 'string'}},
10487 'required': ['Value',
10488 'Type',
10489 'Scope',
10490 'SpaceName',
10491 'SpaceProviderId'],
10492 'type': 'object'},
10493 'ControllersChangeResult': {'additionalProperties': False,
10494 'properties': {'error': {'$ref': '#/definitions/Error'},
10495 'result': {'$ref': '#/definitions/ControllersChanges'}},
10496 'required': ['result'],
10497 'type': 'object'},
10498 'ControllersChangeResults': {'additionalProperties': False,
10499 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
10500 'type': 'array'}},
10501 'required': ['results'],
10502 'type': 'object'},
10503 'ControllersChanges': {'additionalProperties': False,
10504 'properties': {'added': {'items': {'type': 'string'},
10505 'type': 'array'},
10506 'converted': {'items': {'type': 'string'},
10507 'type': 'array'},
10508 'demoted': {'items': {'type': 'string'},
10509 'type': 'array'},
10510 'maintained': {'items': {'type': 'string'},
10511 'type': 'array'},
10512 'promoted': {'items': {'type': 'string'},
10513 'type': 'array'},
10514 'removed': {'items': {'type': 'string'},
10515 'type': 'array'}},
10516 'type': 'object'},
10517 'ControllersSpec': {'additionalProperties': False,
10518 'properties': {'constraints': {'$ref': '#/definitions/Value'},
10519 'model-tag': {'type': 'string'},
10520 'num-controllers': {'type': 'integer'},
10521 'placement': {'items': {'type': 'string'},
10522 'type': 'array'},
10523 'series': {'type': 'string'}},
10524 'required': ['model-tag',
10525 'num-controllers'],
10526 'type': 'object'},
10527 'ControllersSpecs': {'additionalProperties': False,
10528 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
10529 'type': 'array'}},
10530 'required': ['specs'],
10531 'type': 'object'},
10532 'Error': {'additionalProperties': False,
10533 'properties': {'code': {'type': 'string'},
10534 'info': {'$ref': '#/definitions/ErrorInfo'},
10535 'message': {'type': 'string'}},
10536 'required': ['message', 'code'],
10537 'type': 'object'},
10538 'ErrorInfo': {'additionalProperties': False,
10539 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10540 'macaroon-path': {'type': 'string'}},
10541 'type': 'object'},
10542 'HAMember': {'additionalProperties': False,
10543 'properties': {'public-address': {'$ref': '#/definitions/Address'},
10544 'series': {'type': 'string'},
10545 'tag': {'type': 'string'}},
10546 'required': ['tag', 'public-address', 'series'],
10547 'type': 'object'},
10548 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10549 'Member': {'additionalProperties': False,
10550 'properties': {'Address': {'type': 'string'},
10551 'Arbiter': {'type': 'boolean'},
10552 'BuildIndexes': {'type': 'boolean'},
10553 'Hidden': {'type': 'boolean'},
10554 'Id': {'type': 'integer'},
10555 'Priority': {'type': 'number'},
10556 'SlaveDelay': {'type': 'integer'},
10557 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
10558 'type': 'object'},
10559 'Votes': {'type': 'integer'}},
10560 'required': ['Id',
10561 'Address',
10562 'Arbiter',
10563 'BuildIndexes',
10564 'Hidden',
10565 'Priority',
10566 'Tags',
10567 'SlaveDelay',
10568 'Votes'],
10569 'type': 'object'},
10570 'MongoUpgradeResults': {'additionalProperties': False,
10571 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
10572 'type': 'array'},
10573 'master': {'$ref': '#/definitions/HAMember'},
10574 'rs-members': {'items': {'$ref': '#/definitions/Member'},
10575 'type': 'array'}},
10576 'required': ['rs-members',
10577 'master',
10578 'ha-members'],
10579 'type': 'object'},
10580 'ResumeReplicationParams': {'additionalProperties': False,
10581 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
10582 'type': 'array'}},
10583 'required': ['members'],
10584 'type': 'object'},
10585 'UpgradeMongoParams': {'additionalProperties': False,
10586 'properties': {'target': {'$ref': '#/definitions/Version'}},
10587 'required': ['target'],
10588 'type': 'object'},
10589 'Value': {'additionalProperties': False,
10590 'properties': {'arch': {'type': 'string'},
10591 'container': {'type': 'string'},
10592 'cpu-cores': {'type': 'integer'},
10593 'cpu-power': {'type': 'integer'},
10594 'instance-type': {'type': 'string'},
10595 'mem': {'type': 'integer'},
10596 'root-disk': {'type': 'integer'},
10597 'spaces': {'items': {'type': 'string'},
10598 'type': 'array'},
10599 'tags': {'items': {'type': 'string'},
10600 'type': 'array'},
10601 'virt-type': {'type': 'string'}},
10602 'type': 'object'},
10603 'Version': {'additionalProperties': False,
10604 'properties': {'Major': {'type': 'integer'},
10605 'Minor': {'type': 'integer'},
10606 'Patch': {'type': 'string'},
10607 'StorageEngine': {'type': 'string'}},
10608 'required': ['Major',
10609 'Minor',
10610 'Patch',
10611 'StorageEngine'],
10612 'type': 'object'}},
10613 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
10614 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
10615 'type': 'object'},
10616 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
10617 'type': 'object'},
10618 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
10619 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
10620 'type': 'object'}},
10621 'type': 'object'}
10622
10623
10624 @ReturnMapping(ControllersChangeResults)
10625 async def EnableHA(self, specs):
10626 '''
10627 specs : typing.Sequence[~ControllersSpec]
10628 Returns -> typing.Sequence[~ControllersChangeResult]
10629 '''
10630 # map input types to rpc msg
10631 params = dict()
10632 msg = dict(Type='HighAvailability', Request='EnableHA', Version=2, Params=params)
10633 params['specs'] = specs
10634 reply = await self.rpc(msg)
10635 return reply
10636
10637
10638
10639 @ReturnMapping(None)
10640 async def ResumeHAReplicationAfterUpgrade(self, members):
10641 '''
10642 members : typing.Sequence[~Member]
10643 Returns -> None
10644 '''
10645 # map input types to rpc msg
10646 params = dict()
10647 msg = dict(Type='HighAvailability', Request='ResumeHAReplicationAfterUpgrade', Version=2, Params=params)
10648 params['members'] = members
10649 reply = await self.rpc(msg)
10650 return reply
10651
10652
10653
10654 @ReturnMapping(MongoUpgradeResults)
10655 async def StopHAReplicationForUpgrade(self, major, minor, patch, storageengine):
10656 '''
10657 major : int
10658 minor : int
10659 patch : str
10660 storageengine : str
10661 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence[~Member]]
10662 '''
10663 # map input types to rpc msg
10664 params = dict()
10665 msg = dict(Type='HighAvailability', Request='StopHAReplicationForUpgrade', Version=2, Params=params)
10666 params['Major'] = major
10667 params['Minor'] = minor
10668 params['Patch'] = patch
10669 params['StorageEngine'] = storageengine
10670 reply = await self.rpc(msg)
10671 return reply
10672
10673
10674 class HostKeyReporterFacade(Type):
10675 name = 'HostKeyReporter'
10676 version = 1
10677 schema = {'definitions': {'Error': {'additionalProperties': False,
10678 'properties': {'code': {'type': 'string'},
10679 'info': {'$ref': '#/definitions/ErrorInfo'},
10680 'message': {'type': 'string'}},
10681 'required': ['message', 'code'],
10682 'type': 'object'},
10683 'ErrorInfo': {'additionalProperties': False,
10684 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10685 'macaroon-path': {'type': 'string'}},
10686 'type': 'object'},
10687 'ErrorResult': {'additionalProperties': False,
10688 'properties': {'error': {'$ref': '#/definitions/Error'}},
10689 'type': 'object'},
10690 'ErrorResults': {'additionalProperties': False,
10691 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10692 'type': 'array'}},
10693 'required': ['results'],
10694 'type': 'object'},
10695 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10696 'SSHHostKeySet': {'additionalProperties': False,
10697 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
10698 'type': 'array'}},
10699 'required': ['entity-keys'],
10700 'type': 'object'},
10701 'SSHHostKeys': {'additionalProperties': False,
10702 'properties': {'public-keys': {'items': {'type': 'string'},
10703 'type': 'array'},
10704 'tag': {'type': 'string'}},
10705 'required': ['tag', 'public-keys'],
10706 'type': 'object'}},
10707 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
10708 'Result': {'$ref': '#/definitions/ErrorResults'}},
10709 'type': 'object'}},
10710 'type': 'object'}
10711
10712
10713 @ReturnMapping(ErrorResults)
10714 async def ReportKeys(self, entity_keys):
10715 '''
10716 entity_keys : typing.Sequence[~SSHHostKeys]
10717 Returns -> typing.Sequence[~ErrorResult]
10718 '''
10719 # map input types to rpc msg
10720 params = dict()
10721 msg = dict(Type='HostKeyReporter', Request='ReportKeys', Version=1, Params=params)
10722 params['entity-keys'] = entity_keys
10723 reply = await self.rpc(msg)
10724 return reply
10725
10726
10727 class ImageManagerFacade(Type):
10728 name = 'ImageManager'
10729 version = 2
10730 schema = {'definitions': {'Error': {'additionalProperties': False,
10731 'properties': {'code': {'type': 'string'},
10732 'info': {'$ref': '#/definitions/ErrorInfo'},
10733 'message': {'type': 'string'}},
10734 'required': ['message', 'code'],
10735 'type': 'object'},
10736 'ErrorInfo': {'additionalProperties': False,
10737 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10738 'macaroon-path': {'type': 'string'}},
10739 'type': 'object'},
10740 'ErrorResult': {'additionalProperties': False,
10741 'properties': {'error': {'$ref': '#/definitions/Error'}},
10742 'type': 'object'},
10743 'ErrorResults': {'additionalProperties': False,
10744 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10745 'type': 'array'}},
10746 'required': ['results'],
10747 'type': 'object'},
10748 'ImageFilterParams': {'additionalProperties': False,
10749 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
10750 'type': 'array'}},
10751 'required': ['images'],
10752 'type': 'object'},
10753 'ImageMetadata': {'additionalProperties': False,
10754 'properties': {'arch': {'type': 'string'},
10755 'created': {'format': 'date-time',
10756 'type': 'string'},
10757 'kind': {'type': 'string'},
10758 'series': {'type': 'string'},
10759 'url': {'type': 'string'}},
10760 'required': ['kind',
10761 'arch',
10762 'series',
10763 'url',
10764 'created'],
10765 'type': 'object'},
10766 'ImageSpec': {'additionalProperties': False,
10767 'properties': {'arch': {'type': 'string'},
10768 'kind': {'type': 'string'},
10769 'series': {'type': 'string'}},
10770 'required': ['kind', 'arch', 'series'],
10771 'type': 'object'},
10772 'ListImageResult': {'additionalProperties': False,
10773 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
10774 'type': 'array'}},
10775 'required': ['result'],
10776 'type': 'object'},
10777 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
10778 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
10779 'Result': {'$ref': '#/definitions/ErrorResults'}},
10780 'type': 'object'},
10781 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
10782 'Result': {'$ref': '#/definitions/ListImageResult'}},
10783 'type': 'object'}},
10784 'type': 'object'}
10785
10786
10787 @ReturnMapping(ErrorResults)
10788 async def DeleteImages(self, images):
10789 '''
10790 images : typing.Sequence[~ImageSpec]
10791 Returns -> typing.Sequence[~ErrorResult]
10792 '''
10793 # map input types to rpc msg
10794 params = dict()
10795 msg = dict(Type='ImageManager', Request='DeleteImages', Version=2, Params=params)
10796 params['images'] = images
10797 reply = await self.rpc(msg)
10798 return reply
10799
10800
10801
10802 @ReturnMapping(ListImageResult)
10803 async def ListImages(self, images):
10804 '''
10805 images : typing.Sequence[~ImageSpec]
10806 Returns -> typing.Sequence[~ImageMetadata]
10807 '''
10808 # map input types to rpc msg
10809 params = dict()
10810 msg = dict(Type='ImageManager', Request='ListImages', Version=2, Params=params)
10811 params['images'] = images
10812 reply = await self.rpc(msg)
10813 return reply
10814
10815
10816 class ImageMetadataFacade(Type):
10817 name = 'ImageMetadata'
10818 version = 2
10819 schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
10820 'properties': {'arch': {'type': 'string'},
10821 'image-id': {'type': 'string'},
10822 'priority': {'type': 'integer'},
10823 'region': {'type': 'string'},
10824 'root-storage-size': {'type': 'integer'},
10825 'root-storage-type': {'type': 'string'},
10826 'series': {'type': 'string'},
10827 'source': {'type': 'string'},
10828 'stream': {'type': 'string'},
10829 'version': {'type': 'string'},
10830 'virt-type': {'type': 'string'}},
10831 'required': ['image-id',
10832 'region',
10833 'version',
10834 'series',
10835 'arch',
10836 'source',
10837 'priority'],
10838 'type': 'object'},
10839 'CloudImageMetadataList': {'additionalProperties': False,
10840 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
10841 'type': 'array'}},
10842 'type': 'object'},
10843 'Error': {'additionalProperties': False,
10844 'properties': {'code': {'type': 'string'},
10845 'info': {'$ref': '#/definitions/ErrorInfo'},
10846 'message': {'type': 'string'}},
10847 'required': ['message', 'code'],
10848 'type': 'object'},
10849 'ErrorInfo': {'additionalProperties': False,
10850 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10851 'macaroon-path': {'type': 'string'}},
10852 'type': 'object'},
10853 'ErrorResult': {'additionalProperties': False,
10854 'properties': {'error': {'$ref': '#/definitions/Error'}},
10855 'type': 'object'},
10856 'ErrorResults': {'additionalProperties': False,
10857 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10858 'type': 'array'}},
10859 'required': ['results'],
10860 'type': 'object'},
10861 'ImageMetadataFilter': {'additionalProperties': False,
10862 'properties': {'arches': {'items': {'type': 'string'},
10863 'type': 'array'},
10864 'region': {'type': 'string'},
10865 'root-storage-type': {'type': 'string'},
10866 'series': {'items': {'type': 'string'},
10867 'type': 'array'},
10868 'stream': {'type': 'string'},
10869 'virt-type': {'type': 'string'}},
10870 'type': 'object'},
10871 'ListCloudImageMetadataResult': {'additionalProperties': False,
10872 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
10873 'type': 'array'}},
10874 'required': ['result'],
10875 'type': 'object'},
10876 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10877 'MetadataImageIds': {'additionalProperties': False,
10878 'properties': {'image-ids': {'items': {'type': 'string'},
10879 'type': 'array'}},
10880 'required': ['image-ids'],
10881 'type': 'object'},
10882 'MetadataSaveParams': {'additionalProperties': False,
10883 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
10884 'type': 'array'}},
10885 'type': 'object'}},
10886 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
10887 'Result': {'$ref': '#/definitions/ErrorResults'}},
10888 'type': 'object'},
10889 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
10890 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
10891 'type': 'object'},
10892 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
10893 'Result': {'$ref': '#/definitions/ErrorResults'}},
10894 'type': 'object'},
10895 'UpdateFromPublishedImages': {'type': 'object'}},
10896 'type': 'object'}
10897
10898
10899 @ReturnMapping(ErrorResults)
10900 async def Delete(self, image_ids):
10901 '''
10902 image_ids : typing.Sequence[str]
10903 Returns -> typing.Sequence[~ErrorResult]
10904 '''
10905 # map input types to rpc msg
10906 params = dict()
10907 msg = dict(Type='ImageMetadata', Request='Delete', Version=2, Params=params)
10908 params['image-ids'] = image_ids
10909 reply = await self.rpc(msg)
10910 return reply
10911
10912
10913
10914 @ReturnMapping(ListCloudImageMetadataResult)
10915 async def List(self, arches, region, root_storage_type, series, stream, virt_type):
10916 '''
10917 arches : typing.Sequence[str]
10918 region : str
10919 root_storage_type : str
10920 series : typing.Sequence[str]
10921 stream : str
10922 virt_type : str
10923 Returns -> typing.Sequence[~CloudImageMetadata]
10924 '''
10925 # map input types to rpc msg
10926 params = dict()
10927 msg = dict(Type='ImageMetadata', Request='List', Version=2, Params=params)
10928 params['arches'] = arches
10929 params['region'] = region
10930 params['root-storage-type'] = root_storage_type
10931 params['series'] = series
10932 params['stream'] = stream
10933 params['virt-type'] = virt_type
10934 reply = await self.rpc(msg)
10935 return reply
10936
10937
10938
10939 @ReturnMapping(ErrorResults)
10940 async def Save(self, metadata):
10941 '''
10942 metadata : typing.Sequence[~CloudImageMetadataList]
10943 Returns -> typing.Sequence[~ErrorResult]
10944 '''
10945 # map input types to rpc msg
10946 params = dict()
10947 msg = dict(Type='ImageMetadata', Request='Save', Version=2, Params=params)
10948 params['metadata'] = metadata
10949 reply = await self.rpc(msg)
10950 return reply
10951
10952
10953
10954 @ReturnMapping(None)
10955 async def UpdateFromPublishedImages(self):
10956 '''
10957
10958 Returns -> None
10959 '''
10960 # map input types to rpc msg
10961 params = dict()
10962 msg = dict(Type='ImageMetadata', Request='UpdateFromPublishedImages', Version=2, Params=params)
10963
10964 reply = await self.rpc(msg)
10965 return reply
10966
10967
10968 class InstancePollerFacade(Type):
10969 name = 'InstancePoller'
10970 version = 3
10971 schema = {'definitions': {'Address': {'additionalProperties': False,
10972 'properties': {'scope': {'type': 'string'},
10973 'space-name': {'type': 'string'},
10974 'type': {'type': 'string'},
10975 'value': {'type': 'string'}},
10976 'required': ['value', 'type', 'scope'],
10977 'type': 'object'},
10978 'BoolResult': {'additionalProperties': False,
10979 'properties': {'error': {'$ref': '#/definitions/Error'},
10980 'result': {'type': 'boolean'}},
10981 'required': ['result'],
10982 'type': 'object'},
10983 'BoolResults': {'additionalProperties': False,
10984 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
10985 'type': 'array'}},
10986 'required': ['results'],
10987 'type': 'object'},
10988 'Entities': {'additionalProperties': False,
10989 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10990 'type': 'array'}},
10991 'required': ['entities'],
10992 'type': 'object'},
10993 'Entity': {'additionalProperties': False,
10994 'properties': {'tag': {'type': 'string'}},
10995 'required': ['tag'],
10996 'type': 'object'},
10997 'EntityStatusArgs': {'additionalProperties': False,
10998 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
10999 'type': 'object'}},
11000 'type': 'object'},
11001 'info': {'type': 'string'},
11002 'status': {'type': 'string'},
11003 'tag': {'type': 'string'}},
11004 'required': ['tag',
11005 'status',
11006 'info',
11007 'data'],
11008 'type': 'object'},
11009 'Error': {'additionalProperties': False,
11010 'properties': {'code': {'type': 'string'},
11011 'info': {'$ref': '#/definitions/ErrorInfo'},
11012 'message': {'type': 'string'}},
11013 'required': ['message', 'code'],
11014 'type': 'object'},
11015 'ErrorInfo': {'additionalProperties': False,
11016 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11017 'macaroon-path': {'type': 'string'}},
11018 'type': 'object'},
11019 'ErrorResult': {'additionalProperties': False,
11020 'properties': {'error': {'$ref': '#/definitions/Error'}},
11021 'type': 'object'},
11022 'ErrorResults': {'additionalProperties': False,
11023 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11024 'type': 'array'}},
11025 'required': ['results'],
11026 'type': 'object'},
11027 'LifeResult': {'additionalProperties': False,
11028 'properties': {'error': {'$ref': '#/definitions/Error'},
11029 'life': {'type': 'string'}},
11030 'required': ['life'],
11031 'type': 'object'},
11032 'LifeResults': {'additionalProperties': False,
11033 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
11034 'type': 'array'}},
11035 'required': ['results'],
11036 'type': 'object'},
11037 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11038 'MachineAddresses': {'additionalProperties': False,
11039 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
11040 'type': 'array'},
11041 'tag': {'type': 'string'}},
11042 'required': ['tag', 'addresses'],
11043 'type': 'object'},
11044 'MachineAddressesResult': {'additionalProperties': False,
11045 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
11046 'type': 'array'},
11047 'error': {'$ref': '#/definitions/Error'}},
11048 'required': ['addresses'],
11049 'type': 'object'},
11050 'MachineAddressesResults': {'additionalProperties': False,
11051 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
11052 'type': 'array'}},
11053 'required': ['results'],
11054 'type': 'object'},
11055 'ModelConfigResult': {'additionalProperties': False,
11056 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
11057 'type': 'object'}},
11058 'type': 'object'}},
11059 'required': ['config'],
11060 'type': 'object'},
11061 'NotifyWatchResult': {'additionalProperties': False,
11062 'properties': {'NotifyWatcherId': {'type': 'string'},
11063 'error': {'$ref': '#/definitions/Error'}},
11064 'required': ['NotifyWatcherId'],
11065 'type': 'object'},
11066 'SetMachinesAddresses': {'additionalProperties': False,
11067 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
11068 'type': 'array'}},
11069 'required': ['machine-addresses'],
11070 'type': 'object'},
11071 'SetStatus': {'additionalProperties': False,
11072 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
11073 'type': 'array'}},
11074 'required': ['entities'],
11075 'type': 'object'},
11076 'StatusResult': {'additionalProperties': False,
11077 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
11078 'type': 'object'}},
11079 'type': 'object'},
11080 'error': {'$ref': '#/definitions/Error'},
11081 'id': {'type': 'string'},
11082 'info': {'type': 'string'},
11083 'life': {'type': 'string'},
11084 'since': {'format': 'date-time',
11085 'type': 'string'},
11086 'status': {'type': 'string'}},
11087 'required': ['id',
11088 'life',
11089 'status',
11090 'info',
11091 'data',
11092 'since'],
11093 'type': 'object'},
11094 'StatusResults': {'additionalProperties': False,
11095 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
11096 'type': 'array'}},
11097 'required': ['results'],
11098 'type': 'object'},
11099 'StringResult': {'additionalProperties': False,
11100 'properties': {'error': {'$ref': '#/definitions/Error'},
11101 'result': {'type': 'string'}},
11102 'required': ['result'],
11103 'type': 'object'},
11104 'StringResults': {'additionalProperties': False,
11105 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
11106 'type': 'array'}},
11107 'required': ['results'],
11108 'type': 'object'},
11109 'StringsWatchResult': {'additionalProperties': False,
11110 'properties': {'changes': {'items': {'type': 'string'},
11111 'type': 'array'},
11112 'error': {'$ref': '#/definitions/Error'},
11113 'watcher-id': {'type': 'string'}},
11114 'required': ['watcher-id'],
11115 'type': 'object'}},
11116 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11117 'Result': {'$ref': '#/definitions/BoolResults'}},
11118 'type': 'object'},
11119 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11120 'Result': {'$ref': '#/definitions/StringResults'}},
11121 'type': 'object'},
11122 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11123 'Result': {'$ref': '#/definitions/StatusResults'}},
11124 'type': 'object'},
11125 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11126 'Result': {'$ref': '#/definitions/LifeResults'}},
11127 'type': 'object'},
11128 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11129 'type': 'object'},
11130 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11131 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
11132 'type': 'object'},
11133 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11134 'Result': {'$ref': '#/definitions/ErrorResults'}},
11135 'type': 'object'},
11136 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
11137 'Result': {'$ref': '#/definitions/ErrorResults'}},
11138 'type': 'object'},
11139 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11140 'Result': {'$ref': '#/definitions/StatusResults'}},
11141 'type': 'object'},
11142 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11143 'type': 'object'},
11144 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11145 'type': 'object'}},
11146 'type': 'object'}
11147
11148
11149 @ReturnMapping(BoolResults)
11150 async def AreManuallyProvisioned(self, entities):
11151 '''
11152 entities : typing.Sequence[~Entity]
11153 Returns -> typing.Sequence[~BoolResult]
11154 '''
11155 # map input types to rpc msg
11156 params = dict()
11157 msg = dict(Type='InstancePoller', Request='AreManuallyProvisioned', Version=3, Params=params)
11158 params['entities'] = entities
11159 reply = await self.rpc(msg)
11160 return reply
11161
11162
11163
11164 @ReturnMapping(StringResults)
11165 async def InstanceId(self, entities):
11166 '''
11167 entities : typing.Sequence[~Entity]
11168 Returns -> typing.Sequence[~StringResult]
11169 '''
11170 # map input types to rpc msg
11171 params = dict()
11172 msg = dict(Type='InstancePoller', Request='InstanceId', Version=3, Params=params)
11173 params['entities'] = entities
11174 reply = await self.rpc(msg)
11175 return reply
11176
11177
11178
11179 @ReturnMapping(StatusResults)
11180 async def InstanceStatus(self, entities):
11181 '''
11182 entities : typing.Sequence[~Entity]
11183 Returns -> typing.Sequence[~StatusResult]
11184 '''
11185 # map input types to rpc msg
11186 params = dict()
11187 msg = dict(Type='InstancePoller', Request='InstanceStatus', Version=3, Params=params)
11188 params['entities'] = entities
11189 reply = await self.rpc(msg)
11190 return reply
11191
11192
11193
11194 @ReturnMapping(LifeResults)
11195 async def Life(self, entities):
11196 '''
11197 entities : typing.Sequence[~Entity]
11198 Returns -> typing.Sequence[~LifeResult]
11199 '''
11200 # map input types to rpc msg
11201 params = dict()
11202 msg = dict(Type='InstancePoller', Request='Life', Version=3, Params=params)
11203 params['entities'] = entities
11204 reply = await self.rpc(msg)
11205 return reply
11206
11207
11208
11209 @ReturnMapping(ModelConfigResult)
11210 async def ModelConfig(self):
11211 '''
11212
11213 Returns -> typing.Mapping[str, typing.Any]
11214 '''
11215 # map input types to rpc msg
11216 params = dict()
11217 msg = dict(Type='InstancePoller', Request='ModelConfig', Version=3, Params=params)
11218
11219 reply = await self.rpc(msg)
11220 return reply
11221
11222
11223
11224 @ReturnMapping(MachineAddressesResults)
11225 async def ProviderAddresses(self, entities):
11226 '''
11227 entities : typing.Sequence[~Entity]
11228 Returns -> typing.Sequence[~MachineAddressesResult]
11229 '''
11230 # map input types to rpc msg
11231 params = dict()
11232 msg = dict(Type='InstancePoller', Request='ProviderAddresses', Version=3, Params=params)
11233 params['entities'] = entities
11234 reply = await self.rpc(msg)
11235 return reply
11236
11237
11238
11239 @ReturnMapping(ErrorResults)
11240 async def SetInstanceStatus(self, entities):
11241 '''
11242 entities : typing.Sequence[~EntityStatusArgs]
11243 Returns -> typing.Sequence[~ErrorResult]
11244 '''
11245 # map input types to rpc msg
11246 params = dict()
11247 msg = dict(Type='InstancePoller', Request='SetInstanceStatus', Version=3, Params=params)
11248 params['entities'] = entities
11249 reply = await self.rpc(msg)
11250 return reply
11251
11252
11253
11254 @ReturnMapping(ErrorResults)
11255 async def SetProviderAddresses(self, machine_addresses):
11256 '''
11257 machine_addresses : typing.Sequence[~MachineAddresses]
11258 Returns -> typing.Sequence[~ErrorResult]
11259 '''
11260 # map input types to rpc msg
11261 params = dict()
11262 msg = dict(Type='InstancePoller', Request='SetProviderAddresses', Version=3, Params=params)
11263 params['machine-addresses'] = machine_addresses
11264 reply = await self.rpc(msg)
11265 return reply
11266
11267
11268
11269 @ReturnMapping(StatusResults)
11270 async def Status(self, entities):
11271 '''
11272 entities : typing.Sequence[~Entity]
11273 Returns -> typing.Sequence[~StatusResult]
11274 '''
11275 # map input types to rpc msg
11276 params = dict()
11277 msg = dict(Type='InstancePoller', Request='Status', Version=3, Params=params)
11278 params['entities'] = entities
11279 reply = await self.rpc(msg)
11280 return reply
11281
11282
11283
11284 @ReturnMapping(NotifyWatchResult)
11285 async def WatchForModelConfigChanges(self):
11286 '''
11287
11288 Returns -> typing.Union[str, _ForwardRef('Error')]
11289 '''
11290 # map input types to rpc msg
11291 params = dict()
11292 msg = dict(Type='InstancePoller', Request='WatchForModelConfigChanges', Version=3, Params=params)
11293
11294 reply = await self.rpc(msg)
11295 return reply
11296
11297
11298
11299 @ReturnMapping(StringsWatchResult)
11300 async def WatchModelMachines(self):
11301 '''
11302
11303 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
11304 '''
11305 # map input types to rpc msg
11306 params = dict()
11307 msg = dict(Type='InstancePoller', Request='WatchModelMachines', Version=3, Params=params)
11308
11309 reply = await self.rpc(msg)
11310 return reply
11311
11312
11313 class KeyManagerFacade(Type):
11314 name = 'KeyManager'
11315 version = 1
11316 schema = {'definitions': {'Entities': {'additionalProperties': False,
11317 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11318 'type': 'array'}},
11319 'required': ['entities'],
11320 'type': 'object'},
11321 'Entity': {'additionalProperties': False,
11322 'properties': {'tag': {'type': 'string'}},
11323 'required': ['tag'],
11324 'type': 'object'},
11325 'Error': {'additionalProperties': False,
11326 'properties': {'code': {'type': 'string'},
11327 'info': {'$ref': '#/definitions/ErrorInfo'},
11328 'message': {'type': 'string'}},
11329 'required': ['message', 'code'],
11330 'type': 'object'},
11331 'ErrorInfo': {'additionalProperties': False,
11332 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11333 'macaroon-path': {'type': 'string'}},
11334 'type': 'object'},
11335 'ErrorResult': {'additionalProperties': False,
11336 'properties': {'error': {'$ref': '#/definitions/Error'}},
11337 'type': 'object'},
11338 'ErrorResults': {'additionalProperties': False,
11339 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11340 'type': 'array'}},
11341 'required': ['results'],
11342 'type': 'object'},
11343 'ListSSHKeys': {'additionalProperties': False,
11344 'properties': {'entities': {'$ref': '#/definitions/Entities'},
11345 'mode': {'type': 'boolean'}},
11346 'required': ['entities', 'mode'],
11347 'type': 'object'},
11348 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11349 'ModifyUserSSHKeys': {'additionalProperties': False,
11350 'properties': {'ssh-keys': {'items': {'type': 'string'},
11351 'type': 'array'},
11352 'user': {'type': 'string'}},
11353 'required': ['user', 'ssh-keys'],
11354 'type': 'object'},
11355 'StringsResult': {'additionalProperties': False,
11356 'properties': {'error': {'$ref': '#/definitions/Error'},
11357 'result': {'items': {'type': 'string'},
11358 'type': 'array'}},
11359 'type': 'object'},
11360 'StringsResults': {'additionalProperties': False,
11361 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
11362 'type': 'array'}},
11363 'required': ['results'],
11364 'type': 'object'}},
11365 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
11366 'Result': {'$ref': '#/definitions/ErrorResults'}},
11367 'type': 'object'},
11368 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
11369 'Result': {'$ref': '#/definitions/ErrorResults'}},
11370 'type': 'object'},
11371 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
11372 'Result': {'$ref': '#/definitions/ErrorResults'}},
11373 'type': 'object'},
11374 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
11375 'Result': {'$ref': '#/definitions/StringsResults'}},
11376 'type': 'object'}},
11377 'type': 'object'}
11378
11379
11380 @ReturnMapping(ErrorResults)
11381 async def AddKeys(self, ssh_keys, user):
11382 '''
11383 ssh_keys : typing.Sequence[str]
11384 user : str
11385 Returns -> typing.Sequence[~ErrorResult]
11386 '''
11387 # map input types to rpc msg
11388 params = dict()
11389 msg = dict(Type='KeyManager', Request='AddKeys', Version=1, Params=params)
11390 params['ssh-keys'] = ssh_keys
11391 params['user'] = user
11392 reply = await self.rpc(msg)
11393 return reply
11394
11395
11396
11397 @ReturnMapping(ErrorResults)
11398 async def DeleteKeys(self, ssh_keys, user):
11399 '''
11400 ssh_keys : typing.Sequence[str]
11401 user : str
11402 Returns -> typing.Sequence[~ErrorResult]
11403 '''
11404 # map input types to rpc msg
11405 params = dict()
11406 msg = dict(Type='KeyManager', Request='DeleteKeys', Version=1, Params=params)
11407 params['ssh-keys'] = ssh_keys
11408 params['user'] = user
11409 reply = await self.rpc(msg)
11410 return reply
11411
11412
11413
11414 @ReturnMapping(ErrorResults)
11415 async def ImportKeys(self, ssh_keys, user):
11416 '''
11417 ssh_keys : typing.Sequence[str]
11418 user : str
11419 Returns -> typing.Sequence[~ErrorResult]
11420 '''
11421 # map input types to rpc msg
11422 params = dict()
11423 msg = dict(Type='KeyManager', Request='ImportKeys', Version=1, Params=params)
11424 params['ssh-keys'] = ssh_keys
11425 params['user'] = user
11426 reply = await self.rpc(msg)
11427 return reply
11428
11429
11430
11431 @ReturnMapping(StringsResults)
11432 async def ListKeys(self, entities, mode):
11433 '''
11434 entities : Entities
11435 mode : bool
11436 Returns -> typing.Sequence[~StringsResult]
11437 '''
11438 # map input types to rpc msg
11439 params = dict()
11440 msg = dict(Type='KeyManager', Request='ListKeys', Version=1, Params=params)
11441 params['entities'] = entities
11442 params['mode'] = mode
11443 reply = await self.rpc(msg)
11444 return reply
11445
11446
11447 class KeyUpdaterFacade(Type):
11448 name = 'KeyUpdater'
11449 version = 1
11450 schema = {'definitions': {'Entities': {'additionalProperties': False,
11451 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11452 'type': 'array'}},
11453 'required': ['entities'],
11454 'type': 'object'},
11455 'Entity': {'additionalProperties': False,
11456 'properties': {'tag': {'type': 'string'}},
11457 'required': ['tag'],
11458 'type': 'object'},
11459 'Error': {'additionalProperties': False,
11460 'properties': {'code': {'type': 'string'},
11461 'info': {'$ref': '#/definitions/ErrorInfo'},
11462 'message': {'type': 'string'}},
11463 'required': ['message', 'code'],
11464 'type': 'object'},
11465 'ErrorInfo': {'additionalProperties': False,
11466 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11467 'macaroon-path': {'type': 'string'}},
11468 'type': 'object'},
11469 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11470 'NotifyWatchResult': {'additionalProperties': False,
11471 'properties': {'NotifyWatcherId': {'type': 'string'},
11472 'error': {'$ref': '#/definitions/Error'}},
11473 'required': ['NotifyWatcherId'],
11474 'type': 'object'},
11475 'NotifyWatchResults': {'additionalProperties': False,
11476 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11477 'type': 'array'}},
11478 'required': ['results'],
11479 'type': 'object'},
11480 'StringsResult': {'additionalProperties': False,
11481 'properties': {'error': {'$ref': '#/definitions/Error'},
11482 'result': {'items': {'type': 'string'},
11483 'type': 'array'}},
11484 'type': 'object'},
11485 'StringsResults': {'additionalProperties': False,
11486 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
11487 'type': 'array'}},
11488 'required': ['results'],
11489 'type': 'object'}},
11490 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11491 'Result': {'$ref': '#/definitions/StringsResults'}},
11492 'type': 'object'},
11493 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11494 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11495 'type': 'object'}},
11496 'type': 'object'}
11497
11498
11499 @ReturnMapping(StringsResults)
11500 async def AuthorisedKeys(self, entities):
11501 '''
11502 entities : typing.Sequence[~Entity]
11503 Returns -> typing.Sequence[~StringsResult]
11504 '''
11505 # map input types to rpc msg
11506 params = dict()
11507 msg = dict(Type='KeyUpdater', Request='AuthorisedKeys', Version=1, Params=params)
11508 params['entities'] = entities
11509 reply = await self.rpc(msg)
11510 return reply
11511
11512
11513
11514 @ReturnMapping(NotifyWatchResults)
11515 async def WatchAuthorisedKeys(self, entities):
11516 '''
11517 entities : typing.Sequence[~Entity]
11518 Returns -> typing.Sequence[~NotifyWatchResult]
11519 '''
11520 # map input types to rpc msg
11521 params = dict()
11522 msg = dict(Type='KeyUpdater', Request='WatchAuthorisedKeys', Version=1, Params=params)
11523 params['entities'] = entities
11524 reply = await self.rpc(msg)
11525 return reply
11526
11527
11528 class LeadershipServiceFacade(Type):
11529 name = 'LeadershipService'
11530 version = 2
11531 schema = {'definitions': {'ApplicationTag': {'additionalProperties': False,
11532 'properties': {'Name': {'type': 'string'}},
11533 'required': ['Name'],
11534 'type': 'object'},
11535 'ClaimLeadershipBulkParams': {'additionalProperties': False,
11536 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
11537 'type': 'array'}},
11538 'required': ['params'],
11539 'type': 'object'},
11540 'ClaimLeadershipBulkResults': {'additionalProperties': False,
11541 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11542 'type': 'array'}},
11543 'required': ['results'],
11544 'type': 'object'},
11545 'ClaimLeadershipParams': {'additionalProperties': False,
11546 'properties': {'application-tag': {'type': 'string'},
11547 'duration': {'type': 'number'},
11548 'unit-tag': {'type': 'string'}},
11549 'required': ['application-tag',
11550 'unit-tag',
11551 'duration'],
11552 'type': 'object'},
11553 'Error': {'additionalProperties': False,
11554 'properties': {'code': {'type': 'string'},
11555 'info': {'$ref': '#/definitions/ErrorInfo'},
11556 'message': {'type': 'string'}},
11557 'required': ['message', 'code'],
11558 'type': 'object'},
11559 'ErrorInfo': {'additionalProperties': False,
11560 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11561 'macaroon-path': {'type': 'string'}},
11562 'type': 'object'},
11563 'ErrorResult': {'additionalProperties': False,
11564 'properties': {'error': {'$ref': '#/definitions/Error'}},
11565 'type': 'object'},
11566 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
11567 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
11568 'Result': {'$ref': '#/definitions/ErrorResult'}},
11569 'type': 'object'},
11570 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
11571 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
11572 'type': 'object'}},
11573 'type': 'object'}
11574
11575
11576 @ReturnMapping(ErrorResult)
11577 async def BlockUntilLeadershipReleased(self, name):
11578 '''
11579 name : str
11580 Returns -> Error
11581 '''
11582 # map input types to rpc msg
11583 params = dict()
11584 msg = dict(Type='LeadershipService', Request='BlockUntilLeadershipReleased', Version=2, Params=params)
11585 params['Name'] = name
11586 reply = await self.rpc(msg)
11587 return reply
11588
11589
11590
11591 @ReturnMapping(ClaimLeadershipBulkResults)
11592 async def ClaimLeadership(self, params):
11593 '''
11594 params : typing.Sequence[~ClaimLeadershipParams]
11595 Returns -> typing.Sequence[~ErrorResult]
11596 '''
11597 # map input types to rpc msg
11598 params = dict()
11599 msg = dict(Type='LeadershipService', Request='ClaimLeadership', Version=2, Params=params)
11600 params['params'] = params
11601 reply = await self.rpc(msg)
11602 return reply
11603
11604
11605 class LifeFlagFacade(Type):
11606 name = 'LifeFlag'
11607 version = 1
11608 schema = {'definitions': {'Entities': {'additionalProperties': False,
11609 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11610 'type': 'array'}},
11611 'required': ['entities'],
11612 'type': 'object'},
11613 'Entity': {'additionalProperties': False,
11614 'properties': {'tag': {'type': 'string'}},
11615 'required': ['tag'],
11616 'type': 'object'},
11617 'Error': {'additionalProperties': False,
11618 'properties': {'code': {'type': 'string'},
11619 'info': {'$ref': '#/definitions/ErrorInfo'},
11620 'message': {'type': 'string'}},
11621 'required': ['message', 'code'],
11622 'type': 'object'},
11623 'ErrorInfo': {'additionalProperties': False,
11624 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11625 'macaroon-path': {'type': 'string'}},
11626 'type': 'object'},
11627 'LifeResult': {'additionalProperties': False,
11628 'properties': {'error': {'$ref': '#/definitions/Error'},
11629 'life': {'type': 'string'}},
11630 'required': ['life'],
11631 'type': 'object'},
11632 'LifeResults': {'additionalProperties': False,
11633 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
11634 'type': 'array'}},
11635 'required': ['results'],
11636 'type': 'object'},
11637 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11638 'NotifyWatchResult': {'additionalProperties': False,
11639 'properties': {'NotifyWatcherId': {'type': 'string'},
11640 'error': {'$ref': '#/definitions/Error'}},
11641 'required': ['NotifyWatcherId'],
11642 'type': 'object'},
11643 'NotifyWatchResults': {'additionalProperties': False,
11644 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11645 'type': 'array'}},
11646 'required': ['results'],
11647 'type': 'object'}},
11648 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11649 'Result': {'$ref': '#/definitions/LifeResults'}},
11650 'type': 'object'},
11651 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11652 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11653 'type': 'object'}},
11654 'type': 'object'}
11655
11656
11657 @ReturnMapping(LifeResults)
11658 async def Life(self, entities):
11659 '''
11660 entities : typing.Sequence[~Entity]
11661 Returns -> typing.Sequence[~LifeResult]
11662 '''
11663 # map input types to rpc msg
11664 params = dict()
11665 msg = dict(Type='LifeFlag', Request='Life', Version=1, Params=params)
11666 params['entities'] = entities
11667 reply = await self.rpc(msg)
11668 return reply
11669
11670
11671
11672 @ReturnMapping(NotifyWatchResults)
11673 async def Watch(self, entities):
11674 '''
11675 entities : typing.Sequence[~Entity]
11676 Returns -> typing.Sequence[~NotifyWatchResult]
11677 '''
11678 # map input types to rpc msg
11679 params = dict()
11680 msg = dict(Type='LifeFlag', Request='Watch', Version=1, Params=params)
11681 params['entities'] = entities
11682 reply = await self.rpc(msg)
11683 return reply
11684
11685
11686 class LogForwardingFacade(Type):
11687 name = 'LogForwarding'
11688 version = 1
11689 schema = {'definitions': {'Error': {'additionalProperties': False,
11690 'properties': {'code': {'type': 'string'},
11691 'info': {'$ref': '#/definitions/ErrorInfo'},
11692 'message': {'type': 'string'}},
11693 'required': ['message', 'code'],
11694 'type': 'object'},
11695 'ErrorInfo': {'additionalProperties': False,
11696 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11697 'macaroon-path': {'type': 'string'}},
11698 'type': 'object'},
11699 'ErrorResult': {'additionalProperties': False,
11700 'properties': {'error': {'$ref': '#/definitions/Error'}},
11701 'type': 'object'},
11702 'ErrorResults': {'additionalProperties': False,
11703 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11704 'type': 'array'}},
11705 'required': ['results'],
11706 'type': 'object'},
11707 'LogForwardingGetLastSentParams': {'additionalProperties': False,
11708 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
11709 'type': 'array'}},
11710 'required': ['ids'],
11711 'type': 'object'},
11712 'LogForwardingGetLastSentResult': {'additionalProperties': False,
11713 'properties': {'err': {'$ref': '#/definitions/Error'},
11714 'record-id': {'type': 'integer'}},
11715 'required': ['record-id',
11716 'err'],
11717 'type': 'object'},
11718 'LogForwardingGetLastSentResults': {'additionalProperties': False,
11719 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
11720 'type': 'array'}},
11721 'required': ['results'],
11722 'type': 'object'},
11723 'LogForwardingID': {'additionalProperties': False,
11724 'properties': {'model': {'type': 'string'},
11725 'sink': {'type': 'string'}},
11726 'required': ['model', 'sink'],
11727 'type': 'object'},
11728 'LogForwardingSetLastSentParam': {'additionalProperties': False,
11729 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
11730 'record-id': {'type': 'integer'}},
11731 'required': ['LogForwardingID',
11732 'record-id'],
11733 'type': 'object'},
11734 'LogForwardingSetLastSentParams': {'additionalProperties': False,
11735 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
11736 'type': 'array'}},
11737 'required': ['params'],
11738 'type': 'object'},
11739 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
11740 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
11741 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
11742 'type': 'object'},
11743 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
11744 'Result': {'$ref': '#/definitions/ErrorResults'}},
11745 'type': 'object'}},
11746 'type': 'object'}
11747
11748
11749 @ReturnMapping(LogForwardingGetLastSentResults)
11750 async def GetLastSent(self, ids):
11751 '''
11752 ids : typing.Sequence[~LogForwardingID]
11753 Returns -> typing.Sequence[~LogForwardingGetLastSentResult]
11754 '''
11755 # map input types to rpc msg
11756 params = dict()
11757 msg = dict(Type='LogForwarding', Request='GetLastSent', Version=1, Params=params)
11758 params['ids'] = ids
11759 reply = await self.rpc(msg)
11760 return reply
11761
11762
11763
11764 @ReturnMapping(ErrorResults)
11765 async def SetLastSent(self, params):
11766 '''
11767 params : typing.Sequence[~LogForwardingSetLastSentParam]
11768 Returns -> typing.Sequence[~ErrorResult]
11769 '''
11770 # map input types to rpc msg
11771 params = dict()
11772 msg = dict(Type='LogForwarding', Request='SetLastSent', Version=1, Params=params)
11773 params['params'] = params
11774 reply = await self.rpc(msg)
11775 return reply
11776
11777
11778 class LoggerFacade(Type):
11779 name = 'Logger'
11780 version = 1
11781 schema = {'definitions': {'Entities': {'additionalProperties': False,
11782 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11783 'type': 'array'}},
11784 'required': ['entities'],
11785 'type': 'object'},
11786 'Entity': {'additionalProperties': False,
11787 'properties': {'tag': {'type': 'string'}},
11788 'required': ['tag'],
11789 'type': 'object'},
11790 'Error': {'additionalProperties': False,
11791 'properties': {'code': {'type': 'string'},
11792 'info': {'$ref': '#/definitions/ErrorInfo'},
11793 'message': {'type': 'string'}},
11794 'required': ['message', 'code'],
11795 'type': 'object'},
11796 'ErrorInfo': {'additionalProperties': False,
11797 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11798 'macaroon-path': {'type': 'string'}},
11799 'type': 'object'},
11800 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11801 'NotifyWatchResult': {'additionalProperties': False,
11802 'properties': {'NotifyWatcherId': {'type': 'string'},
11803 'error': {'$ref': '#/definitions/Error'}},
11804 'required': ['NotifyWatcherId'],
11805 'type': 'object'},
11806 'NotifyWatchResults': {'additionalProperties': False,
11807 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11808 'type': 'array'}},
11809 'required': ['results'],
11810 'type': 'object'},
11811 'StringResult': {'additionalProperties': False,
11812 'properties': {'error': {'$ref': '#/definitions/Error'},
11813 'result': {'type': 'string'}},
11814 'required': ['result'],
11815 'type': 'object'},
11816 'StringResults': {'additionalProperties': False,
11817 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
11818 'type': 'array'}},
11819 'required': ['results'],
11820 'type': 'object'}},
11821 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11822 'Result': {'$ref': '#/definitions/StringResults'}},
11823 'type': 'object'},
11824 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11825 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11826 'type': 'object'}},
11827 'type': 'object'}
11828
11829
11830 @ReturnMapping(StringResults)
11831 async def LoggingConfig(self, entities):
11832 '''
11833 entities : typing.Sequence[~Entity]
11834 Returns -> typing.Sequence[~StringResult]
11835 '''
11836 # map input types to rpc msg
11837 params = dict()
11838 msg = dict(Type='Logger', Request='LoggingConfig', Version=1, Params=params)
11839 params['entities'] = entities
11840 reply = await self.rpc(msg)
11841 return reply
11842
11843
11844
11845 @ReturnMapping(NotifyWatchResults)
11846 async def WatchLoggingConfig(self, entities):
11847 '''
11848 entities : typing.Sequence[~Entity]
11849 Returns -> typing.Sequence[~NotifyWatchResult]
11850 '''
11851 # map input types to rpc msg
11852 params = dict()
11853 msg = dict(Type='Logger', Request='WatchLoggingConfig', Version=1, Params=params)
11854 params['entities'] = entities
11855 reply = await self.rpc(msg)
11856 return reply
11857
11858
11859 class MachineActionsFacade(Type):
11860 name = 'MachineActions'
11861 version = 1
11862 schema = {'definitions': {'Action': {'additionalProperties': False,
11863 'properties': {'name': {'type': 'string'},
11864 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
11865 'type': 'object'}},
11866 'type': 'object'},
11867 'receiver': {'type': 'string'},
11868 'tag': {'type': 'string'}},
11869 'required': ['tag', 'receiver', 'name'],
11870 'type': 'object'},
11871 'ActionExecutionResult': {'additionalProperties': False,
11872 'properties': {'action-tag': {'type': 'string'},
11873 'message': {'type': 'string'},
11874 'results': {'patternProperties': {'.*': {'additionalProperties': True,
11875 'type': 'object'}},
11876 'type': 'object'},
11877 'status': {'type': 'string'}},
11878 'required': ['action-tag', 'status'],
11879 'type': 'object'},
11880 'ActionExecutionResults': {'additionalProperties': False,
11881 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
11882 'type': 'array'}},
11883 'type': 'object'},
11884 'ActionResult': {'additionalProperties': False,
11885 'properties': {'action': {'$ref': '#/definitions/Action'},
11886 'completed': {'format': 'date-time',
11887 'type': 'string'},
11888 'enqueued': {'format': 'date-time',
11889 'type': 'string'},
11890 'error': {'$ref': '#/definitions/Error'},
11891 'message': {'type': 'string'},
11892 'output': {'patternProperties': {'.*': {'additionalProperties': True,
11893 'type': 'object'}},
11894 'type': 'object'},
11895 'started': {'format': 'date-time',
11896 'type': 'string'},
11897 'status': {'type': 'string'}},
11898 'type': 'object'},
11899 'ActionResults': {'additionalProperties': False,
11900 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
11901 'type': 'array'}},
11902 'type': 'object'},
11903 'ActionsByReceiver': {'additionalProperties': False,
11904 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
11905 'type': 'array'},
11906 'error': {'$ref': '#/definitions/Error'},
11907 'receiver': {'type': 'string'}},
11908 'type': 'object'},
11909 'ActionsByReceivers': {'additionalProperties': False,
11910 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
11911 'type': 'array'}},
11912 'type': 'object'},
11913 'Entities': {'additionalProperties': False,
11914 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11915 'type': 'array'}},
11916 'required': ['entities'],
11917 'type': 'object'},
11918 'Entity': {'additionalProperties': False,
11919 'properties': {'tag': {'type': 'string'}},
11920 'required': ['tag'],
11921 'type': 'object'},
11922 'Error': {'additionalProperties': False,
11923 'properties': {'code': {'type': 'string'},
11924 'info': {'$ref': '#/definitions/ErrorInfo'},
11925 'message': {'type': 'string'}},
11926 'required': ['message', 'code'],
11927 'type': 'object'},
11928 'ErrorInfo': {'additionalProperties': False,
11929 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11930 'macaroon-path': {'type': 'string'}},
11931 'type': 'object'},
11932 'ErrorResult': {'additionalProperties': False,
11933 'properties': {'error': {'$ref': '#/definitions/Error'}},
11934 'type': 'object'},
11935 'ErrorResults': {'additionalProperties': False,
11936 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11937 'type': 'array'}},
11938 'required': ['results'],
11939 'type': 'object'},
11940 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11941 'StringsWatchResult': {'additionalProperties': False,
11942 'properties': {'changes': {'items': {'type': 'string'},
11943 'type': 'array'},
11944 'error': {'$ref': '#/definitions/Error'},
11945 'watcher-id': {'type': 'string'}},
11946 'required': ['watcher-id'],
11947 'type': 'object'},
11948 'StringsWatchResults': {'additionalProperties': False,
11949 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
11950 'type': 'array'}},
11951 'required': ['results'],
11952 'type': 'object'}},
11953 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11954 'Result': {'$ref': '#/definitions/ActionResults'}},
11955 'type': 'object'},
11956 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11957 'Result': {'$ref': '#/definitions/ErrorResults'}},
11958 'type': 'object'},
11959 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
11960 'Result': {'$ref': '#/definitions/ErrorResults'}},
11961 'type': 'object'},
11962 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11963 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
11964 'type': 'object'},
11965 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11966 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11967 'type': 'object'}},
11968 'type': 'object'}
11969
11970
11971 @ReturnMapping(ActionResults)
11972 async def Actions(self, entities):
11973 '''
11974 entities : typing.Sequence[~Entity]
11975 Returns -> typing.Sequence[~ActionResult]
11976 '''
11977 # map input types to rpc msg
11978 params = dict()
11979 msg = dict(Type='MachineActions', Request='Actions', Version=1, Params=params)
11980 params['entities'] = entities
11981 reply = await self.rpc(msg)
11982 return reply
11983
11984
11985
11986 @ReturnMapping(ErrorResults)
11987 async def BeginActions(self, entities):
11988 '''
11989 entities : typing.Sequence[~Entity]
11990 Returns -> typing.Sequence[~ErrorResult]
11991 '''
11992 # map input types to rpc msg
11993 params = dict()
11994 msg = dict(Type='MachineActions', Request='BeginActions', Version=1, Params=params)
11995 params['entities'] = entities
11996 reply = await self.rpc(msg)
11997 return reply
11998
11999
12000
12001 @ReturnMapping(ErrorResults)
12002 async def FinishActions(self, results):
12003 '''
12004 results : typing.Sequence[~ActionExecutionResult]
12005 Returns -> typing.Sequence[~ErrorResult]
12006 '''
12007 # map input types to rpc msg
12008 params = dict()
12009 msg = dict(Type='MachineActions', Request='FinishActions', Version=1, Params=params)
12010 params['results'] = results
12011 reply = await self.rpc(msg)
12012 return reply
12013
12014
12015
12016 @ReturnMapping(ActionsByReceivers)
12017 async def RunningActions(self, entities):
12018 '''
12019 entities : typing.Sequence[~Entity]
12020 Returns -> typing.Sequence[~ActionsByReceiver]
12021 '''
12022 # map input types to rpc msg
12023 params = dict()
12024 msg = dict(Type='MachineActions', Request='RunningActions', Version=1, Params=params)
12025 params['entities'] = entities
12026 reply = await self.rpc(msg)
12027 return reply
12028
12029
12030
12031 @ReturnMapping(StringsWatchResults)
12032 async def WatchActionNotifications(self, entities):
12033 '''
12034 entities : typing.Sequence[~Entity]
12035 Returns -> typing.Sequence[~StringsWatchResult]
12036 '''
12037 # map input types to rpc msg
12038 params = dict()
12039 msg = dict(Type='MachineActions', Request='WatchActionNotifications', Version=1, Params=params)
12040 params['entities'] = entities
12041 reply = await self.rpc(msg)
12042 return reply
12043
12044
12045 class MachineManagerFacade(Type):
12046 name = 'MachineManager'
12047 version = 2
12048 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
12049 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12050 'type': 'array'},
12051 'constraints': {'$ref': '#/definitions/Value'},
12052 'container-type': {'type': 'string'},
12053 'disks': {'items': {'$ref': '#/definitions/Constraints'},
12054 'type': 'array'},
12055 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
12056 'instance-id': {'type': 'string'},
12057 'jobs': {'items': {'type': 'string'},
12058 'type': 'array'},
12059 'nonce': {'type': 'string'},
12060 'parent-id': {'type': 'string'},
12061 'placement': {'$ref': '#/definitions/Placement'},
12062 'series': {'type': 'string'}},
12063 'required': ['series',
12064 'constraints',
12065 'jobs',
12066 'parent-id',
12067 'container-type',
12068 'instance-id',
12069 'nonce',
12070 'hardware-characteristics',
12071 'addresses'],
12072 'type': 'object'},
12073 'AddMachines': {'additionalProperties': False,
12074 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
12075 'type': 'array'}},
12076 'required': ['params'],
12077 'type': 'object'},
12078 'AddMachinesResult': {'additionalProperties': False,
12079 'properties': {'error': {'$ref': '#/definitions/Error'},
12080 'machine': {'type': 'string'}},
12081 'required': ['machine'],
12082 'type': 'object'},
12083 'AddMachinesResults': {'additionalProperties': False,
12084 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
12085 'type': 'array'}},
12086 'required': ['machines'],
12087 'type': 'object'},
12088 'Address': {'additionalProperties': False,
12089 'properties': {'scope': {'type': 'string'},
12090 'space-name': {'type': 'string'},
12091 'type': {'type': 'string'},
12092 'value': {'type': 'string'}},
12093 'required': ['value', 'type', 'scope'],
12094 'type': 'object'},
12095 'Constraints': {'additionalProperties': False,
12096 'properties': {'Count': {'type': 'integer'},
12097 'Pool': {'type': 'string'},
12098 'Size': {'type': 'integer'}},
12099 'required': ['Pool', 'Size', 'Count'],
12100 'type': 'object'},
12101 'Error': {'additionalProperties': False,
12102 'properties': {'code': {'type': 'string'},
12103 'info': {'$ref': '#/definitions/ErrorInfo'},
12104 'message': {'type': 'string'}},
12105 'required': ['message', 'code'],
12106 'type': 'object'},
12107 'ErrorInfo': {'additionalProperties': False,
12108 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12109 'macaroon-path': {'type': 'string'}},
12110 'type': 'object'},
12111 'HardwareCharacteristics': {'additionalProperties': False,
12112 'properties': {'arch': {'type': 'string'},
12113 'availability-zone': {'type': 'string'},
12114 'cpu-cores': {'type': 'integer'},
12115 'cpu-power': {'type': 'integer'},
12116 'mem': {'type': 'integer'},
12117 'root-disk': {'type': 'integer'},
12118 'tags': {'items': {'type': 'string'},
12119 'type': 'array'}},
12120 'type': 'object'},
12121 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12122 'Placement': {'additionalProperties': False,
12123 'properties': {'directive': {'type': 'string'},
12124 'scope': {'type': 'string'}},
12125 'required': ['scope', 'directive'],
12126 'type': 'object'},
12127 'Value': {'additionalProperties': False,
12128 'properties': {'arch': {'type': 'string'},
12129 'container': {'type': 'string'},
12130 'cpu-cores': {'type': 'integer'},
12131 'cpu-power': {'type': 'integer'},
12132 'instance-type': {'type': 'string'},
12133 'mem': {'type': 'integer'},
12134 'root-disk': {'type': 'integer'},
12135 'spaces': {'items': {'type': 'string'},
12136 'type': 'array'},
12137 'tags': {'items': {'type': 'string'},
12138 'type': 'array'},
12139 'virt-type': {'type': 'string'}},
12140 'type': 'object'}},
12141 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
12142 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
12143 'type': 'object'}},
12144 'type': 'object'}
12145
12146
12147 @ReturnMapping(AddMachinesResults)
12148 async def AddMachines(self, params):
12149 '''
12150 params : typing.Sequence[~AddMachineParams]
12151 Returns -> typing.Sequence[~AddMachinesResult]
12152 '''
12153 # map input types to rpc msg
12154 params = dict()
12155 msg = dict(Type='MachineManager', Request='AddMachines', Version=2, Params=params)
12156 params['params'] = params
12157 reply = await self.rpc(msg)
12158 return reply
12159
12160
12161 class MachinerFacade(Type):
12162 name = 'Machiner'
12163 version = 1
12164 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
12165 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
12166 'type': 'array'},
12167 'type': 'array'}},
12168 'required': ['servers'],
12169 'type': 'object'},
12170 'Address': {'additionalProperties': False,
12171 'properties': {'scope': {'type': 'string'},
12172 'space-name': {'type': 'string'},
12173 'type': {'type': 'string'},
12174 'value': {'type': 'string'}},
12175 'required': ['value', 'type', 'scope'],
12176 'type': 'object'},
12177 'BytesResult': {'additionalProperties': False,
12178 'properties': {'result': {'items': {'type': 'integer'},
12179 'type': 'array'}},
12180 'required': ['result'],
12181 'type': 'object'},
12182 'Entities': {'additionalProperties': False,
12183 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12184 'type': 'array'}},
12185 'required': ['entities'],
12186 'type': 'object'},
12187 'Entity': {'additionalProperties': False,
12188 'properties': {'tag': {'type': 'string'}},
12189 'required': ['tag'],
12190 'type': 'object'},
12191 'EntityStatusArgs': {'additionalProperties': False,
12192 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
12193 'type': 'object'}},
12194 'type': 'object'},
12195 'info': {'type': 'string'},
12196 'status': {'type': 'string'},
12197 'tag': {'type': 'string'}},
12198 'required': ['tag',
12199 'status',
12200 'info',
12201 'data'],
12202 'type': 'object'},
12203 'Error': {'additionalProperties': False,
12204 'properties': {'code': {'type': 'string'},
12205 'info': {'$ref': '#/definitions/ErrorInfo'},
12206 'message': {'type': 'string'}},
12207 'required': ['message', 'code'],
12208 'type': 'object'},
12209 'ErrorInfo': {'additionalProperties': False,
12210 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12211 'macaroon-path': {'type': 'string'}},
12212 'type': 'object'},
12213 'ErrorResult': {'additionalProperties': False,
12214 'properties': {'error': {'$ref': '#/definitions/Error'}},
12215 'type': 'object'},
12216 'ErrorResults': {'additionalProperties': False,
12217 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12218 'type': 'array'}},
12219 'required': ['results'],
12220 'type': 'object'},
12221 'HostPort': {'additionalProperties': False,
12222 'properties': {'Address': {'$ref': '#/definitions/Address'},
12223 'port': {'type': 'integer'}},
12224 'required': ['Address', 'port'],
12225 'type': 'object'},
12226 'JobsResult': {'additionalProperties': False,
12227 'properties': {'error': {'$ref': '#/definitions/Error'},
12228 'jobs': {'items': {'type': 'string'},
12229 'type': 'array'}},
12230 'required': ['jobs'],
12231 'type': 'object'},
12232 'JobsResults': {'additionalProperties': False,
12233 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
12234 'type': 'array'}},
12235 'required': ['results'],
12236 'type': 'object'},
12237 'LifeResult': {'additionalProperties': False,
12238 'properties': {'error': {'$ref': '#/definitions/Error'},
12239 'life': {'type': 'string'}},
12240 'required': ['life'],
12241 'type': 'object'},
12242 'LifeResults': {'additionalProperties': False,
12243 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
12244 'type': 'array'}},
12245 'required': ['results'],
12246 'type': 'object'},
12247 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12248 'MachineAddresses': {'additionalProperties': False,
12249 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12250 'type': 'array'},
12251 'tag': {'type': 'string'}},
12252 'required': ['tag', 'addresses'],
12253 'type': 'object'},
12254 'NetworkConfig': {'additionalProperties': False,
12255 'properties': {'address': {'type': 'string'},
12256 'cidr': {'type': 'string'},
12257 'config-type': {'type': 'string'},
12258 'device-index': {'type': 'integer'},
12259 'disabled': {'type': 'boolean'},
12260 'dns-search-domains': {'items': {'type': 'string'},
12261 'type': 'array'},
12262 'dns-servers': {'items': {'type': 'string'},
12263 'type': 'array'},
12264 'gateway-address': {'type': 'string'},
12265 'interface-name': {'type': 'string'},
12266 'interface-type': {'type': 'string'},
12267 'mac-address': {'type': 'string'},
12268 'mtu': {'type': 'integer'},
12269 'no-auto-start': {'type': 'boolean'},
12270 'parent-interface-name': {'type': 'string'},
12271 'provider-address-id': {'type': 'string'},
12272 'provider-id': {'type': 'string'},
12273 'provider-space-id': {'type': 'string'},
12274 'provider-subnet-id': {'type': 'string'},
12275 'provider-vlan-id': {'type': 'string'},
12276 'vlan-tag': {'type': 'integer'}},
12277 'required': ['device-index',
12278 'mac-address',
12279 'cidr',
12280 'mtu',
12281 'provider-id',
12282 'provider-subnet-id',
12283 'provider-space-id',
12284 'provider-address-id',
12285 'provider-vlan-id',
12286 'vlan-tag',
12287 'interface-name',
12288 'parent-interface-name',
12289 'interface-type',
12290 'disabled'],
12291 'type': 'object'},
12292 'NotifyWatchResult': {'additionalProperties': False,
12293 'properties': {'NotifyWatcherId': {'type': 'string'},
12294 'error': {'$ref': '#/definitions/Error'}},
12295 'required': ['NotifyWatcherId'],
12296 'type': 'object'},
12297 'NotifyWatchResults': {'additionalProperties': False,
12298 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12299 'type': 'array'}},
12300 'required': ['results'],
12301 'type': 'object'},
12302 'SetMachineNetworkConfig': {'additionalProperties': False,
12303 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
12304 'type': 'array'},
12305 'tag': {'type': 'string'}},
12306 'required': ['tag', 'config'],
12307 'type': 'object'},
12308 'SetMachinesAddresses': {'additionalProperties': False,
12309 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
12310 'type': 'array'}},
12311 'required': ['machine-addresses'],
12312 'type': 'object'},
12313 'SetStatus': {'additionalProperties': False,
12314 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
12315 'type': 'array'}},
12316 'required': ['entities'],
12317 'type': 'object'},
12318 'StringResult': {'additionalProperties': False,
12319 'properties': {'error': {'$ref': '#/definitions/Error'},
12320 'result': {'type': 'string'}},
12321 'required': ['result'],
12322 'type': 'object'},
12323 'StringsResult': {'additionalProperties': False,
12324 'properties': {'error': {'$ref': '#/definitions/Error'},
12325 'result': {'items': {'type': 'string'},
12326 'type': 'array'}},
12327 'type': 'object'}},
12328 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
12329 'type': 'object'},
12330 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
12331 'type': 'object'},
12332 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
12333 'type': 'object'},
12334 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12335 'Result': {'$ref': '#/definitions/ErrorResults'}},
12336 'type': 'object'},
12337 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12338 'Result': {'$ref': '#/definitions/JobsResults'}},
12339 'type': 'object'},
12340 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12341 'Result': {'$ref': '#/definitions/LifeResults'}},
12342 'type': 'object'},
12343 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
12344 'type': 'object'},
12345 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
12346 'Result': {'$ref': '#/definitions/ErrorResults'}},
12347 'type': 'object'},
12348 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
12349 'type': 'object'},
12350 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12351 'Result': {'$ref': '#/definitions/ErrorResults'}},
12352 'type': 'object'},
12353 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
12354 'Result': {'$ref': '#/definitions/ErrorResults'}},
12355 'type': 'object'},
12356 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
12357 'Result': {'$ref': '#/definitions/ErrorResults'}},
12358 'type': 'object'},
12359 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12360 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12361 'type': 'object'},
12362 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12363 'type': 'object'}},
12364 'type': 'object'}
12365
12366
12367 @ReturnMapping(StringsResult)
12368 async def APIAddresses(self):
12369 '''
12370
12371 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
12372 '''
12373 # map input types to rpc msg
12374 params = dict()
12375 msg = dict(Type='Machiner', Request='APIAddresses', Version=1, Params=params)
12376
12377 reply = await self.rpc(msg)
12378 return reply
12379
12380
12381
12382 @ReturnMapping(APIHostPortsResult)
12383 async def APIHostPorts(self):
12384 '''
12385
12386 Returns -> typing.Sequence[~HostPort]
12387 '''
12388 # map input types to rpc msg
12389 params = dict()
12390 msg = dict(Type='Machiner', Request='APIHostPorts', Version=1, Params=params)
12391
12392 reply = await self.rpc(msg)
12393 return reply
12394
12395
12396
12397 @ReturnMapping(BytesResult)
12398 async def CACert(self):
12399 '''
12400
12401 Returns -> typing.Sequence[int]
12402 '''
12403 # map input types to rpc msg
12404 params = dict()
12405 msg = dict(Type='Machiner', Request='CACert', Version=1, Params=params)
12406
12407 reply = await self.rpc(msg)
12408 return reply
12409
12410
12411
12412 @ReturnMapping(ErrorResults)
12413 async def EnsureDead(self, entities):
12414 '''
12415 entities : typing.Sequence[~Entity]
12416 Returns -> typing.Sequence[~ErrorResult]
12417 '''
12418 # map input types to rpc msg
12419 params = dict()
12420 msg = dict(Type='Machiner', Request='EnsureDead', Version=1, Params=params)
12421 params['entities'] = entities
12422 reply = await self.rpc(msg)
12423 return reply
12424
12425
12426
12427 @ReturnMapping(JobsResults)
12428 async def Jobs(self, entities):
12429 '''
12430 entities : typing.Sequence[~Entity]
12431 Returns -> typing.Sequence[~JobsResult]
12432 '''
12433 # map input types to rpc msg
12434 params = dict()
12435 msg = dict(Type='Machiner', Request='Jobs', Version=1, Params=params)
12436 params['entities'] = entities
12437 reply = await self.rpc(msg)
12438 return reply
12439
12440
12441
12442 @ReturnMapping(LifeResults)
12443 async def Life(self, entities):
12444 '''
12445 entities : typing.Sequence[~Entity]
12446 Returns -> typing.Sequence[~LifeResult]
12447 '''
12448 # map input types to rpc msg
12449 params = dict()
12450 msg = dict(Type='Machiner', Request='Life', Version=1, Params=params)
12451 params['entities'] = entities
12452 reply = await self.rpc(msg)
12453 return reply
12454
12455
12456
12457 @ReturnMapping(StringResult)
12458 async def ModelUUID(self):
12459 '''
12460
12461 Returns -> typing.Union[_ForwardRef('Error'), str]
12462 '''
12463 # map input types to rpc msg
12464 params = dict()
12465 msg = dict(Type='Machiner', Request='ModelUUID', Version=1, Params=params)
12466
12467 reply = await self.rpc(msg)
12468 return reply
12469
12470
12471
12472 @ReturnMapping(ErrorResults)
12473 async def SetMachineAddresses(self, machine_addresses):
12474 '''
12475 machine_addresses : typing.Sequence[~MachineAddresses]
12476 Returns -> typing.Sequence[~ErrorResult]
12477 '''
12478 # map input types to rpc msg
12479 params = dict()
12480 msg = dict(Type='Machiner', Request='SetMachineAddresses', Version=1, Params=params)
12481 params['machine-addresses'] = machine_addresses
12482 reply = await self.rpc(msg)
12483 return reply
12484
12485
12486
12487 @ReturnMapping(None)
12488 async def SetObservedNetworkConfig(self, config, tag):
12489 '''
12490 config : typing.Sequence[~NetworkConfig]
12491 tag : str
12492 Returns -> None
12493 '''
12494 # map input types to rpc msg
12495 params = dict()
12496 msg = dict(Type='Machiner', Request='SetObservedNetworkConfig', Version=1, Params=params)
12497 params['config'] = config
12498 params['tag'] = tag
12499 reply = await self.rpc(msg)
12500 return reply
12501
12502
12503
12504 @ReturnMapping(ErrorResults)
12505 async def SetProviderNetworkConfig(self, entities):
12506 '''
12507 entities : typing.Sequence[~Entity]
12508 Returns -> typing.Sequence[~ErrorResult]
12509 '''
12510 # map input types to rpc msg
12511 params = dict()
12512 msg = dict(Type='Machiner', Request='SetProviderNetworkConfig', Version=1, Params=params)
12513 params['entities'] = entities
12514 reply = await self.rpc(msg)
12515 return reply
12516
12517
12518
12519 @ReturnMapping(ErrorResults)
12520 async def SetStatus(self, entities):
12521 '''
12522 entities : typing.Sequence[~EntityStatusArgs]
12523 Returns -> typing.Sequence[~ErrorResult]
12524 '''
12525 # map input types to rpc msg
12526 params = dict()
12527 msg = dict(Type='Machiner', Request='SetStatus', Version=1, Params=params)
12528 params['entities'] = entities
12529 reply = await self.rpc(msg)
12530 return reply
12531
12532
12533
12534 @ReturnMapping(ErrorResults)
12535 async def UpdateStatus(self, entities):
12536 '''
12537 entities : typing.Sequence[~EntityStatusArgs]
12538 Returns -> typing.Sequence[~ErrorResult]
12539 '''
12540 # map input types to rpc msg
12541 params = dict()
12542 msg = dict(Type='Machiner', Request='UpdateStatus', Version=1, Params=params)
12543 params['entities'] = entities
12544 reply = await self.rpc(msg)
12545 return reply
12546
12547
12548
12549 @ReturnMapping(NotifyWatchResults)
12550 async def Watch(self, entities):
12551 '''
12552 entities : typing.Sequence[~Entity]
12553 Returns -> typing.Sequence[~NotifyWatchResult]
12554 '''
12555 # map input types to rpc msg
12556 params = dict()
12557 msg = dict(Type='Machiner', Request='Watch', Version=1, Params=params)
12558 params['entities'] = entities
12559 reply = await self.rpc(msg)
12560 return reply
12561
12562
12563
12564 @ReturnMapping(NotifyWatchResult)
12565 async def WatchAPIHostPorts(self):
12566 '''
12567
12568 Returns -> typing.Union[str, _ForwardRef('Error')]
12569 '''
12570 # map input types to rpc msg
12571 params = dict()
12572 msg = dict(Type='Machiner', Request='WatchAPIHostPorts', Version=1, Params=params)
12573
12574 reply = await self.rpc(msg)
12575 return reply
12576
12577
12578 class MeterStatusFacade(Type):
12579 name = 'MeterStatus'
12580 version = 1
12581 schema = {'definitions': {'Entities': {'additionalProperties': False,
12582 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12583 'type': 'array'}},
12584 'required': ['entities'],
12585 'type': 'object'},
12586 'Entity': {'additionalProperties': False,
12587 'properties': {'tag': {'type': 'string'}},
12588 'required': ['tag'],
12589 'type': 'object'},
12590 'Error': {'additionalProperties': False,
12591 'properties': {'code': {'type': 'string'},
12592 'info': {'$ref': '#/definitions/ErrorInfo'},
12593 'message': {'type': 'string'}},
12594 'required': ['message', 'code'],
12595 'type': 'object'},
12596 'ErrorInfo': {'additionalProperties': False,
12597 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12598 'macaroon-path': {'type': 'string'}},
12599 'type': 'object'},
12600 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12601 'MeterStatusResult': {'additionalProperties': False,
12602 'properties': {'code': {'type': 'string'},
12603 'error': {'$ref': '#/definitions/Error'},
12604 'info': {'type': 'string'}},
12605 'required': ['code', 'info'],
12606 'type': 'object'},
12607 'MeterStatusResults': {'additionalProperties': False,
12608 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
12609 'type': 'array'}},
12610 'required': ['results'],
12611 'type': 'object'},
12612 'NotifyWatchResult': {'additionalProperties': False,
12613 'properties': {'NotifyWatcherId': {'type': 'string'},
12614 'error': {'$ref': '#/definitions/Error'}},
12615 'required': ['NotifyWatcherId'],
12616 'type': 'object'},
12617 'NotifyWatchResults': {'additionalProperties': False,
12618 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12619 'type': 'array'}},
12620 'required': ['results'],
12621 'type': 'object'}},
12622 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12623 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
12624 'type': 'object'},
12625 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12626 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12627 'type': 'object'}},
12628 'type': 'object'}
12629
12630
12631 @ReturnMapping(MeterStatusResults)
12632 async def GetMeterStatus(self, entities):
12633 '''
12634 entities : typing.Sequence[~Entity]
12635 Returns -> typing.Sequence[~MeterStatusResult]
12636 '''
12637 # map input types to rpc msg
12638 params = dict()
12639 msg = dict(Type='MeterStatus', Request='GetMeterStatus', Version=1, Params=params)
12640 params['entities'] = entities
12641 reply = await self.rpc(msg)
12642 return reply
12643
12644
12645
12646 @ReturnMapping(NotifyWatchResults)
12647 async def WatchMeterStatus(self, entities):
12648 '''
12649 entities : typing.Sequence[~Entity]
12650 Returns -> typing.Sequence[~NotifyWatchResult]
12651 '''
12652 # map input types to rpc msg
12653 params = dict()
12654 msg = dict(Type='MeterStatus', Request='WatchMeterStatus', Version=1, Params=params)
12655 params['entities'] = entities
12656 reply = await self.rpc(msg)
12657 return reply
12658
12659
12660 class MetricsAdderFacade(Type):
12661 name = 'MetricsAdder'
12662 version = 2
12663 schema = {'definitions': {'Error': {'additionalProperties': False,
12664 'properties': {'code': {'type': 'string'},
12665 'info': {'$ref': '#/definitions/ErrorInfo'},
12666 'message': {'type': 'string'}},
12667 'required': ['message', 'code'],
12668 'type': 'object'},
12669 'ErrorInfo': {'additionalProperties': False,
12670 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12671 'macaroon-path': {'type': 'string'}},
12672 'type': 'object'},
12673 'ErrorResult': {'additionalProperties': False,
12674 'properties': {'error': {'$ref': '#/definitions/Error'}},
12675 'type': 'object'},
12676 'ErrorResults': {'additionalProperties': False,
12677 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12678 'type': 'array'}},
12679 'required': ['results'],
12680 'type': 'object'},
12681 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12682 'Metric': {'additionalProperties': False,
12683 'properties': {'key': {'type': 'string'},
12684 'time': {'format': 'date-time',
12685 'type': 'string'},
12686 'value': {'type': 'string'}},
12687 'required': ['key', 'value', 'time'],
12688 'type': 'object'},
12689 'MetricBatch': {'additionalProperties': False,
12690 'properties': {'charm-url': {'type': 'string'},
12691 'created': {'format': 'date-time',
12692 'type': 'string'},
12693 'metrics': {'items': {'$ref': '#/definitions/Metric'},
12694 'type': 'array'},
12695 'uuid': {'type': 'string'}},
12696 'required': ['uuid',
12697 'charm-url',
12698 'created',
12699 'metrics'],
12700 'type': 'object'},
12701 'MetricBatchParam': {'additionalProperties': False,
12702 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
12703 'tag': {'type': 'string'}},
12704 'required': ['tag', 'batch'],
12705 'type': 'object'},
12706 'MetricBatchParams': {'additionalProperties': False,
12707 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
12708 'type': 'array'}},
12709 'required': ['batches'],
12710 'type': 'object'}},
12711 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
12712 'Result': {'$ref': '#/definitions/ErrorResults'}},
12713 'type': 'object'}},
12714 'type': 'object'}
12715
12716
12717 @ReturnMapping(ErrorResults)
12718 async def AddMetricBatches(self, batches):
12719 '''
12720 batches : typing.Sequence[~MetricBatchParam]
12721 Returns -> typing.Sequence[~ErrorResult]
12722 '''
12723 # map input types to rpc msg
12724 params = dict()
12725 msg = dict(Type='MetricsAdder', Request='AddMetricBatches', Version=2, Params=params)
12726 params['batches'] = batches
12727 reply = await self.rpc(msg)
12728 return reply
12729
12730
12731 class MetricsDebugFacade(Type):
12732 name = 'MetricsDebug'
12733 version = 2
12734 schema = {'definitions': {'Entities': {'additionalProperties': False,
12735 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12736 'type': 'array'}},
12737 'required': ['entities'],
12738 'type': 'object'},
12739 'Entity': {'additionalProperties': False,
12740 'properties': {'tag': {'type': 'string'}},
12741 'required': ['tag'],
12742 'type': 'object'},
12743 'EntityMetrics': {'additionalProperties': False,
12744 'properties': {'error': {'$ref': '#/definitions/Error'},
12745 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
12746 'type': 'array'}},
12747 'type': 'object'},
12748 'Error': {'additionalProperties': False,
12749 'properties': {'code': {'type': 'string'},
12750 'info': {'$ref': '#/definitions/ErrorInfo'},
12751 'message': {'type': 'string'}},
12752 'required': ['message', 'code'],
12753 'type': 'object'},
12754 'ErrorInfo': {'additionalProperties': False,
12755 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12756 'macaroon-path': {'type': 'string'}},
12757 'type': 'object'},
12758 'ErrorResult': {'additionalProperties': False,
12759 'properties': {'error': {'$ref': '#/definitions/Error'}},
12760 'type': 'object'},
12761 'ErrorResults': {'additionalProperties': False,
12762 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12763 'type': 'array'}},
12764 'required': ['results'],
12765 'type': 'object'},
12766 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12767 'MeterStatusParam': {'additionalProperties': False,
12768 'properties': {'code': {'type': 'string'},
12769 'info': {'type': 'string'},
12770 'tag': {'type': 'string'}},
12771 'required': ['tag', 'code', 'info'],
12772 'type': 'object'},
12773 'MeterStatusParams': {'additionalProperties': False,
12774 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
12775 'type': 'array'}},
12776 'required': ['statues'],
12777 'type': 'object'},
12778 'MetricResult': {'additionalProperties': False,
12779 'properties': {'key': {'type': 'string'},
12780 'time': {'format': 'date-time',
12781 'type': 'string'},
12782 'value': {'type': 'string'}},
12783 'required': ['time', 'key', 'value'],
12784 'type': 'object'},
12785 'MetricResults': {'additionalProperties': False,
12786 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
12787 'type': 'array'}},
12788 'required': ['results'],
12789 'type': 'object'}},
12790 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12791 'Result': {'$ref': '#/definitions/MetricResults'}},
12792 'type': 'object'},
12793 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
12794 'Result': {'$ref': '#/definitions/ErrorResults'}},
12795 'type': 'object'}},
12796 'type': 'object'}
12797
12798
12799 @ReturnMapping(MetricResults)
12800 async def GetMetrics(self, entities):
12801 '''
12802 entities : typing.Sequence[~Entity]
12803 Returns -> typing.Sequence[~EntityMetrics]
12804 '''
12805 # map input types to rpc msg
12806 params = dict()
12807 msg = dict(Type='MetricsDebug', Request='GetMetrics', Version=2, Params=params)
12808 params['entities'] = entities
12809 reply = await self.rpc(msg)
12810 return reply
12811
12812
12813
12814 @ReturnMapping(ErrorResults)
12815 async def SetMeterStatus(self, statues):
12816 '''
12817 statues : typing.Sequence[~MeterStatusParam]
12818 Returns -> typing.Sequence[~ErrorResult]
12819 '''
12820 # map input types to rpc msg
12821 params = dict()
12822 msg = dict(Type='MetricsDebug', Request='SetMeterStatus', Version=2, Params=params)
12823 params['statues'] = statues
12824 reply = await self.rpc(msg)
12825 return reply
12826
12827
12828 class MetricsManagerFacade(Type):
12829 name = 'MetricsManager'
12830 version = 1
12831 schema = {'definitions': {'Entities': {'additionalProperties': False,
12832 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12833 'type': 'array'}},
12834 'required': ['entities'],
12835 'type': 'object'},
12836 'Entity': {'additionalProperties': False,
12837 'properties': {'tag': {'type': 'string'}},
12838 'required': ['tag'],
12839 'type': 'object'},
12840 'Error': {'additionalProperties': False,
12841 'properties': {'code': {'type': 'string'},
12842 'info': {'$ref': '#/definitions/ErrorInfo'},
12843 'message': {'type': 'string'}},
12844 'required': ['message', 'code'],
12845 'type': 'object'},
12846 'ErrorInfo': {'additionalProperties': False,
12847 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12848 'macaroon-path': {'type': 'string'}},
12849 'type': 'object'},
12850 'ErrorResult': {'additionalProperties': False,
12851 'properties': {'error': {'$ref': '#/definitions/Error'}},
12852 'type': 'object'},
12853 'ErrorResults': {'additionalProperties': False,
12854 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12855 'type': 'array'}},
12856 'required': ['results'],
12857 'type': 'object'},
12858 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
12859 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12860 'Result': {'$ref': '#/definitions/ErrorResults'}},
12861 'type': 'object'},
12862 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12863 'Result': {'$ref': '#/definitions/ErrorResults'}},
12864 'type': 'object'}},
12865 'type': 'object'}
12866
12867
12868 @ReturnMapping(ErrorResults)
12869 async def CleanupOldMetrics(self, entities):
12870 '''
12871 entities : typing.Sequence[~Entity]
12872 Returns -> typing.Sequence[~ErrorResult]
12873 '''
12874 # map input types to rpc msg
12875 params = dict()
12876 msg = dict(Type='MetricsManager', Request='CleanupOldMetrics', Version=1, Params=params)
12877 params['entities'] = entities
12878 reply = await self.rpc(msg)
12879 return reply
12880
12881
12882
12883 @ReturnMapping(ErrorResults)
12884 async def SendMetrics(self, entities):
12885 '''
12886 entities : typing.Sequence[~Entity]
12887 Returns -> typing.Sequence[~ErrorResult]
12888 '''
12889 # map input types to rpc msg
12890 params = dict()
12891 msg = dict(Type='MetricsManager', Request='SendMetrics', Version=1, Params=params)
12892 params['entities'] = entities
12893 reply = await self.rpc(msg)
12894 return reply
12895
12896
12897 class MigrationFlagFacade(Type):
12898 name = 'MigrationFlag'
12899 version = 1
12900 schema = {'definitions': {'Entities': {'additionalProperties': False,
12901 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12902 'type': 'array'}},
12903 'required': ['entities'],
12904 'type': 'object'},
12905 'Entity': {'additionalProperties': False,
12906 'properties': {'tag': {'type': 'string'}},
12907 'required': ['tag'],
12908 'type': 'object'},
12909 'Error': {'additionalProperties': False,
12910 'properties': {'code': {'type': 'string'},
12911 'info': {'$ref': '#/definitions/ErrorInfo'},
12912 'message': {'type': 'string'}},
12913 'required': ['message', 'code'],
12914 'type': 'object'},
12915 'ErrorInfo': {'additionalProperties': False,
12916 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12917 'macaroon-path': {'type': 'string'}},
12918 'type': 'object'},
12919 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12920 'NotifyWatchResult': {'additionalProperties': False,
12921 'properties': {'NotifyWatcherId': {'type': 'string'},
12922 'error': {'$ref': '#/definitions/Error'}},
12923 'required': ['NotifyWatcherId'],
12924 'type': 'object'},
12925 'NotifyWatchResults': {'additionalProperties': False,
12926 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12927 'type': 'array'}},
12928 'required': ['results'],
12929 'type': 'object'},
12930 'PhaseResult': {'additionalProperties': False,
12931 'properties': {'error': {'$ref': '#/definitions/Error'},
12932 'phase': {'type': 'string'}},
12933 'required': ['phase'],
12934 'type': 'object'},
12935 'PhaseResults': {'additionalProperties': False,
12936 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
12937 'type': 'array'}},
12938 'required': ['results'],
12939 'type': 'object'}},
12940 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12941 'Result': {'$ref': '#/definitions/PhaseResults'}},
12942 'type': 'object'},
12943 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12944 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12945 'type': 'object'}},
12946 'type': 'object'}
12947
12948
12949 @ReturnMapping(PhaseResults)
12950 async def Phase(self, entities):
12951 '''
12952 entities : typing.Sequence[~Entity]
12953 Returns -> typing.Sequence[~PhaseResult]
12954 '''
12955 # map input types to rpc msg
12956 params = dict()
12957 msg = dict(Type='MigrationFlag', Request='Phase', Version=1, Params=params)
12958 params['entities'] = entities
12959 reply = await self.rpc(msg)
12960 return reply
12961
12962
12963
12964 @ReturnMapping(NotifyWatchResults)
12965 async def Watch(self, entities):
12966 '''
12967 entities : typing.Sequence[~Entity]
12968 Returns -> typing.Sequence[~NotifyWatchResult]
12969 '''
12970 # map input types to rpc msg
12971 params = dict()
12972 msg = dict(Type='MigrationFlag', Request='Watch', Version=1, Params=params)
12973 params['entities'] = entities
12974 reply = await self.rpc(msg)
12975 return reply
12976
12977
12978 class MigrationMasterFacade(Type):
12979 name = 'MigrationMaster'
12980 version = 1
12981 schema = {'definitions': {'Error': {'additionalProperties': False,
12982 'properties': {'code': {'type': 'string'},
12983 'info': {'$ref': '#/definitions/ErrorInfo'},
12984 'message': {'type': 'string'}},
12985 'required': ['message', 'code'],
12986 'type': 'object'},
12987 'ErrorInfo': {'additionalProperties': False,
12988 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12989 'macaroon-path': {'type': 'string'}},
12990 'type': 'object'},
12991 'FullMigrationStatus': {'additionalProperties': False,
12992 'properties': {'attempt': {'type': 'integer'},
12993 'phase': {'type': 'string'},
12994 'spec': {'$ref': '#/definitions/ModelMigrationSpec'}},
12995 'required': ['spec',
12996 'attempt',
12997 'phase'],
12998 'type': 'object'},
12999 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13000 'ModelMigrationSpec': {'additionalProperties': False,
13001 'properties': {'model-tag': {'type': 'string'},
13002 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
13003 'required': ['model-tag',
13004 'target-info'],
13005 'type': 'object'},
13006 'ModelMigrationTargetInfo': {'additionalProperties': False,
13007 'properties': {'addrs': {'items': {'type': 'string'},
13008 'type': 'array'},
13009 'auth-tag': {'type': 'string'},
13010 'ca-cert': {'type': 'string'},
13011 'controller-tag': {'type': 'string'},
13012 'password': {'type': 'string'}},
13013 'required': ['controller-tag',
13014 'addrs',
13015 'ca-cert',
13016 'auth-tag',
13017 'password'],
13018 'type': 'object'},
13019 'NotifyWatchResult': {'additionalProperties': False,
13020 'properties': {'NotifyWatcherId': {'type': 'string'},
13021 'error': {'$ref': '#/definitions/Error'}},
13022 'required': ['NotifyWatcherId'],
13023 'type': 'object'},
13024 'SerializedModel': {'additionalProperties': False,
13025 'properties': {'bytes': {'items': {'type': 'integer'},
13026 'type': 'array'}},
13027 'required': ['bytes'],
13028 'type': 'object'},
13029 'SetMigrationPhaseArgs': {'additionalProperties': False,
13030 'properties': {'phase': {'type': 'string'}},
13031 'required': ['phase'],
13032 'type': 'object'}},
13033 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
13034 'type': 'object'},
13035 'GetMigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/FullMigrationStatus'}},
13036 'type': 'object'},
13037 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
13038 'type': 'object'},
13039 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13040 'type': 'object'}},
13041 'type': 'object'}
13042
13043
13044 @ReturnMapping(SerializedModel)
13045 async def Export(self):
13046 '''
13047
13048 Returns -> typing.Sequence[int]
13049 '''
13050 # map input types to rpc msg
13051 params = dict()
13052 msg = dict(Type='MigrationMaster', Request='Export', Version=1, Params=params)
13053
13054 reply = await self.rpc(msg)
13055 return reply
13056
13057
13058
13059 @ReturnMapping(FullMigrationStatus)
13060 async def GetMigrationStatus(self):
13061 '''
13062
13063 Returns -> typing.Union[int, str, _ForwardRef('ModelMigrationSpec')]
13064 '''
13065 # map input types to rpc msg
13066 params = dict()
13067 msg = dict(Type='MigrationMaster', Request='GetMigrationStatus', Version=1, Params=params)
13068
13069 reply = await self.rpc(msg)
13070 return reply
13071
13072
13073
13074 @ReturnMapping(None)
13075 async def SetPhase(self, phase):
13076 '''
13077 phase : str
13078 Returns -> None
13079 '''
13080 # map input types to rpc msg
13081 params = dict()
13082 msg = dict(Type='MigrationMaster', Request='SetPhase', Version=1, Params=params)
13083 params['phase'] = phase
13084 reply = await self.rpc(msg)
13085 return reply
13086
13087
13088
13089 @ReturnMapping(NotifyWatchResult)
13090 async def Watch(self):
13091 '''
13092
13093 Returns -> typing.Union[str, _ForwardRef('Error')]
13094 '''
13095 # map input types to rpc msg
13096 params = dict()
13097 msg = dict(Type='MigrationMaster', Request='Watch', Version=1, Params=params)
13098
13099 reply = await self.rpc(msg)
13100 return reply
13101
13102
13103 class MigrationMinionFacade(Type):
13104 name = 'MigrationMinion'
13105 version = 1
13106 schema = {'definitions': {'Error': {'additionalProperties': False,
13107 'properties': {'code': {'type': 'string'},
13108 'info': {'$ref': '#/definitions/ErrorInfo'},
13109 'message': {'type': 'string'}},
13110 'required': ['message', 'code'],
13111 'type': 'object'},
13112 'ErrorInfo': {'additionalProperties': False,
13113 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13114 'macaroon-path': {'type': 'string'}},
13115 'type': 'object'},
13116 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13117 'NotifyWatchResult': {'additionalProperties': False,
13118 'properties': {'NotifyWatcherId': {'type': 'string'},
13119 'error': {'$ref': '#/definitions/Error'}},
13120 'required': ['NotifyWatcherId'],
13121 'type': 'object'}},
13122 'properties': {'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13123 'type': 'object'}},
13124 'type': 'object'}
13125
13126
13127 @ReturnMapping(NotifyWatchResult)
13128 async def Watch(self):
13129 '''
13130
13131 Returns -> typing.Union[str, _ForwardRef('Error')]
13132 '''
13133 # map input types to rpc msg
13134 params = dict()
13135 msg = dict(Type='MigrationMinion', Request='Watch', Version=1, Params=params)
13136
13137 reply = await self.rpc(msg)
13138 return reply
13139
13140
13141 class MigrationStatusWatcherFacade(Type):
13142 name = 'MigrationStatusWatcher'
13143 version = 1
13144 schema = {'definitions': {'MigrationStatus': {'additionalProperties': False,
13145 'properties': {'attempt': {'type': 'integer'},
13146 'phase': {'type': 'string'},
13147 'source-api-addrs': {'items': {'type': 'string'},
13148 'type': 'array'},
13149 'source-ca-cert': {'type': 'string'},
13150 'target-api-addrs': {'items': {'type': 'string'},
13151 'type': 'array'},
13152 'target-ca-cert': {'type': 'string'}},
13153 'required': ['attempt',
13154 'phase',
13155 'source-api-addrs',
13156 'source-ca-cert',
13157 'target-api-addrs',
13158 'target-ca-cert'],
13159 'type': 'object'}},
13160 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
13161 'type': 'object'},
13162 'Stop': {'type': 'object'}},
13163 'type': 'object'}
13164
13165
13166 @ReturnMapping(MigrationStatus)
13167 async def Next(self):
13168 '''
13169
13170 Returns -> typing.Union[int, typing.Sequence[str]]
13171 '''
13172 # map input types to rpc msg
13173 params = dict()
13174 msg = dict(Type='MigrationStatusWatcher', Request='Next', Version=1, Params=params)
13175
13176 reply = await self.rpc(msg)
13177 return reply
13178
13179
13180
13181 @ReturnMapping(None)
13182 async def Stop(self):
13183 '''
13184
13185 Returns -> None
13186 '''
13187 # map input types to rpc msg
13188 params = dict()
13189 msg = dict(Type='MigrationStatusWatcher', Request='Stop', Version=1, Params=params)
13190
13191 reply = await self.rpc(msg)
13192 return reply
13193
13194
13195 class MigrationTargetFacade(Type):
13196 name = 'MigrationTarget'
13197 version = 1
13198 schema = {'definitions': {'ModelArgs': {'additionalProperties': False,
13199 'properties': {'model-tag': {'type': 'string'}},
13200 'required': ['model-tag'],
13201 'type': 'object'},
13202 'SerializedModel': {'additionalProperties': False,
13203 'properties': {'bytes': {'items': {'type': 'integer'},
13204 'type': 'array'}},
13205 'required': ['bytes'],
13206 'type': 'object'}},
13207 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
13208 'type': 'object'},
13209 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
13210 'type': 'object'},
13211 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
13212 'type': 'object'}},
13213 'type': 'object'}
13214
13215
13216 @ReturnMapping(None)
13217 async def Abort(self, model_tag):
13218 '''
13219 model_tag : str
13220 Returns -> None
13221 '''
13222 # map input types to rpc msg
13223 params = dict()
13224 msg = dict(Type='MigrationTarget', Request='Abort', Version=1, Params=params)
13225 params['model-tag'] = model_tag
13226 reply = await self.rpc(msg)
13227 return reply
13228
13229
13230
13231 @ReturnMapping(None)
13232 async def Activate(self, model_tag):
13233 '''
13234 model_tag : str
13235 Returns -> None
13236 '''
13237 # map input types to rpc msg
13238 params = dict()
13239 msg = dict(Type='MigrationTarget', Request='Activate', Version=1, Params=params)
13240 params['model-tag'] = model_tag
13241 reply = await self.rpc(msg)
13242 return reply
13243
13244
13245
13246 @ReturnMapping(None)
13247 async def Import(self, bytes_):
13248 '''
13249 bytes_ : typing.Sequence[int]
13250 Returns -> None
13251 '''
13252 # map input types to rpc msg
13253 params = dict()
13254 msg = dict(Type='MigrationTarget', Request='Import', Version=1, Params=params)
13255 params['bytes'] = bytes_
13256 reply = await self.rpc(msg)
13257 return reply
13258
13259
13260 class ModelManagerFacade(Type):
13261 name = 'ModelManager'
13262 version = 2
13263 schema = {'definitions': {'Entities': {'additionalProperties': False,
13264 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13265 'type': 'array'}},
13266 'required': ['entities'],
13267 'type': 'object'},
13268 'Entity': {'additionalProperties': False,
13269 'properties': {'tag': {'type': 'string'}},
13270 'required': ['tag'],
13271 'type': 'object'},
13272 'EntityStatus': {'additionalProperties': False,
13273 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
13274 'type': 'object'}},
13275 'type': 'object'},
13276 'info': {'type': 'string'},
13277 'since': {'format': 'date-time',
13278 'type': 'string'},
13279 'status': {'type': 'string'}},
13280 'required': ['status', 'info', 'since'],
13281 'type': 'object'},
13282 'Error': {'additionalProperties': False,
13283 'properties': {'code': {'type': 'string'},
13284 'info': {'$ref': '#/definitions/ErrorInfo'},
13285 'message': {'type': 'string'}},
13286 'required': ['message', 'code'],
13287 'type': 'object'},
13288 'ErrorInfo': {'additionalProperties': False,
13289 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13290 'macaroon-path': {'type': 'string'}},
13291 'type': 'object'},
13292 'ErrorResult': {'additionalProperties': False,
13293 'properties': {'error': {'$ref': '#/definitions/Error'}},
13294 'type': 'object'},
13295 'ErrorResults': {'additionalProperties': False,
13296 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13297 'type': 'array'}},
13298 'required': ['results'],
13299 'type': 'object'},
13300 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13301 'Model': {'additionalProperties': False,
13302 'properties': {'name': {'type': 'string'},
13303 'owner-tag': {'type': 'string'},
13304 'uuid': {'type': 'string'}},
13305 'required': ['name', 'uuid', 'owner-tag'],
13306 'type': 'object'},
13307 'ModelCreateArgs': {'additionalProperties': False,
13308 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
13309 'type': 'object'}},
13310 'type': 'object'},
13311 'credential': {'type': 'string'},
13312 'name': {'type': 'string'},
13313 'owner-tag': {'type': 'string'},
13314 'region': {'type': 'string'}},
13315 'required': ['name', 'owner-tag'],
13316 'type': 'object'},
13317 'ModelInfo': {'additionalProperties': False,
13318 'properties': {'cloud': {'type': 'string'},
13319 'cloud-credential': {'type': 'string'},
13320 'cloud-region': {'type': 'string'},
13321 'controller-uuid': {'type': 'string'},
13322 'default-series': {'type': 'string'},
13323 'life': {'type': 'string'},
13324 'name': {'type': 'string'},
13325 'owner-tag': {'type': 'string'},
13326 'provider-type': {'type': 'string'},
13327 'status': {'$ref': '#/definitions/EntityStatus'},
13328 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
13329 'type': 'array'},
13330 'uuid': {'type': 'string'}},
13331 'required': ['name',
13332 'uuid',
13333 'controller-uuid',
13334 'provider-type',
13335 'default-series',
13336 'cloud',
13337 'owner-tag',
13338 'life',
13339 'status',
13340 'users'],
13341 'type': 'object'},
13342 'ModelInfoResult': {'additionalProperties': False,
13343 'properties': {'error': {'$ref': '#/definitions/Error'},
13344 'result': {'$ref': '#/definitions/ModelInfo'}},
13345 'type': 'object'},
13346 'ModelInfoResults': {'additionalProperties': False,
13347 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
13348 'type': 'array'}},
13349 'required': ['results'],
13350 'type': 'object'},
13351 'ModelUserInfo': {'additionalProperties': False,
13352 'properties': {'access': {'type': 'string'},
13353 'display-name': {'type': 'string'},
13354 'last-connection': {'format': 'date-time',
13355 'type': 'string'},
13356 'user': {'type': 'string'}},
13357 'required': ['user',
13358 'display-name',
13359 'last-connection',
13360 'access'],
13361 'type': 'object'},
13362 'ModifyModelAccess': {'additionalProperties': False,
13363 'properties': {'access': {'type': 'string'},
13364 'action': {'type': 'string'},
13365 'model-tag': {'type': 'string'},
13366 'user-tag': {'type': 'string'}},
13367 'required': ['user-tag',
13368 'action',
13369 'access',
13370 'model-tag'],
13371 'type': 'object'},
13372 'ModifyModelAccessRequest': {'additionalProperties': False,
13373 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
13374 'type': 'array'}},
13375 'required': ['changes'],
13376 'type': 'object'},
13377 'UserModel': {'additionalProperties': False,
13378 'properties': {'last-connection': {'format': 'date-time',
13379 'type': 'string'},
13380 'model': {'$ref': '#/definitions/Model'}},
13381 'required': ['model', 'last-connection'],
13382 'type': 'object'},
13383 'UserModelList': {'additionalProperties': False,
13384 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
13385 'type': 'array'}},
13386 'required': ['user-models'],
13387 'type': 'object'}},
13388 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
13389 'Result': {'$ref': '#/definitions/ModelInfo'}},
13390 'type': 'object'},
13391 'DestroyModel': {'type': 'object'},
13392 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
13393 'Result': {'$ref': '#/definitions/UserModelList'}},
13394 'type': 'object'},
13395 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13396 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
13397 'type': 'object'},
13398 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
13399 'Result': {'$ref': '#/definitions/ErrorResults'}},
13400 'type': 'object'}},
13401 'type': 'object'}
13402
13403
13404 @ReturnMapping(ModelInfo)
13405 async def CreateModel(self, config, credential, name, owner_tag, region):
13406 '''
13407 config : typing.Mapping[str, typing.Any]
13408 credential : str
13409 name : str
13410 owner_tag : str
13411 region : str
13412 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
13413 '''
13414 # map input types to rpc msg
13415 params = dict()
13416 msg = dict(Type='ModelManager', Request='CreateModel', Version=2, Params=params)
13417 params['config'] = config
13418 params['credential'] = credential
13419 params['name'] = name
13420 params['owner-tag'] = owner_tag
13421 params['region'] = region
13422 reply = await self.rpc(msg)
13423 return reply
13424
13425
13426
13427 @ReturnMapping(None)
13428 async def DestroyModel(self):
13429 '''
13430
13431 Returns -> None
13432 '''
13433 # map input types to rpc msg
13434 params = dict()
13435 msg = dict(Type='ModelManager', Request='DestroyModel', Version=2, Params=params)
13436
13437 reply = await self.rpc(msg)
13438 return reply
13439
13440
13441
13442 @ReturnMapping(UserModelList)
13443 async def ListModels(self, tag):
13444 '''
13445 tag : str
13446 Returns -> typing.Sequence[~UserModel]
13447 '''
13448 # map input types to rpc msg
13449 params = dict()
13450 msg = dict(Type='ModelManager', Request='ListModels', Version=2, Params=params)
13451 params['tag'] = tag
13452 reply = await self.rpc(msg)
13453 return reply
13454
13455
13456
13457 @ReturnMapping(ModelInfoResults)
13458 async def ModelInfo(self, entities):
13459 '''
13460 entities : typing.Sequence[~Entity]
13461 Returns -> typing.Sequence[~ModelInfoResult]
13462 '''
13463 # map input types to rpc msg
13464 params = dict()
13465 msg = dict(Type='ModelManager', Request='ModelInfo', Version=2, Params=params)
13466 params['entities'] = entities
13467 reply = await self.rpc(msg)
13468 return reply
13469
13470
13471
13472 @ReturnMapping(ErrorResults)
13473 async def ModifyModelAccess(self, changes):
13474 '''
13475 changes : typing.Sequence[~ModifyModelAccess]
13476 Returns -> typing.Sequence[~ErrorResult]
13477 '''
13478 # map input types to rpc msg
13479 params = dict()
13480 msg = dict(Type='ModelManager', Request='ModifyModelAccess', Version=2, Params=params)
13481 params['changes'] = changes
13482 reply = await self.rpc(msg)
13483 return reply
13484
13485
13486 class NotifyWatcherFacade(Type):
13487 name = 'NotifyWatcher'
13488 version = 1
13489 schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
13490 'type': 'object'}
13491
13492
13493 @ReturnMapping(None)
13494 async def Next(self):
13495 '''
13496
13497 Returns -> None
13498 '''
13499 # map input types to rpc msg
13500 params = dict()
13501 msg = dict(Type='NotifyWatcher', Request='Next', Version=1, Params=params)
13502
13503 reply = await self.rpc(msg)
13504 return reply
13505
13506
13507
13508 @ReturnMapping(None)
13509 async def Stop(self):
13510 '''
13511
13512 Returns -> None
13513 '''
13514 # map input types to rpc msg
13515 params = dict()
13516 msg = dict(Type='NotifyWatcher', Request='Stop', Version=1, Params=params)
13517
13518 reply = await self.rpc(msg)
13519 return reply
13520
13521
13522 class PingerFacade(Type):
13523 name = 'Pinger'
13524 version = 1
13525 schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
13526 'type': 'object'}
13527
13528
13529 @ReturnMapping(None)
13530 async def Ping(self):
13531 '''
13532
13533 Returns -> None
13534 '''
13535 # map input types to rpc msg
13536 params = dict()
13537 msg = dict(Type='Pinger', Request='Ping', Version=1, Params=params)
13538
13539 reply = await self.rpc(msg)
13540 return reply
13541
13542
13543
13544 @ReturnMapping(None)
13545 async def Stop(self):
13546 '''
13547
13548 Returns -> None
13549 '''
13550 # map input types to rpc msg
13551 params = dict()
13552 msg = dict(Type='Pinger', Request='Stop', Version=1, Params=params)
13553
13554 reply = await self.rpc(msg)
13555 return reply
13556
13557
13558 class ProvisionerFacade(Type):
13559 name = 'Provisioner'
13560 version = 3
13561 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
13562 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
13563 'type': 'array'},
13564 'type': 'array'}},
13565 'required': ['servers'],
13566 'type': 'object'},
13567 'Address': {'additionalProperties': False,
13568 'properties': {'scope': {'type': 'string'},
13569 'space-name': {'type': 'string'},
13570 'type': {'type': 'string'},
13571 'value': {'type': 'string'}},
13572 'required': ['value', 'type', 'scope'],
13573 'type': 'object'},
13574 'Binary': {'additionalProperties': False,
13575 'properties': {'Arch': {'type': 'string'},
13576 'Number': {'$ref': '#/definitions/Number'},
13577 'Series': {'type': 'string'}},
13578 'required': ['Number', 'Series', 'Arch'],
13579 'type': 'object'},
13580 'BytesResult': {'additionalProperties': False,
13581 'properties': {'result': {'items': {'type': 'integer'},
13582 'type': 'array'}},
13583 'required': ['result'],
13584 'type': 'object'},
13585 'CloudImageMetadata': {'additionalProperties': False,
13586 'properties': {'arch': {'type': 'string'},
13587 'image-id': {'type': 'string'},
13588 'priority': {'type': 'integer'},
13589 'region': {'type': 'string'},
13590 'root-storage-size': {'type': 'integer'},
13591 'root-storage-type': {'type': 'string'},
13592 'series': {'type': 'string'},
13593 'source': {'type': 'string'},
13594 'stream': {'type': 'string'},
13595 'version': {'type': 'string'},
13596 'virt-type': {'type': 'string'}},
13597 'required': ['image-id',
13598 'region',
13599 'version',
13600 'series',
13601 'arch',
13602 'source',
13603 'priority'],
13604 'type': 'object'},
13605 'ConstraintsResult': {'additionalProperties': False,
13606 'properties': {'constraints': {'$ref': '#/definitions/Value'},
13607 'error': {'$ref': '#/definitions/Error'}},
13608 'required': ['constraints'],
13609 'type': 'object'},
13610 'ConstraintsResults': {'additionalProperties': False,
13611 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
13612 'type': 'array'}},
13613 'required': ['results'],
13614 'type': 'object'},
13615 'ContainerConfig': {'additionalProperties': False,
13616 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
13617 'apt-mirror': {'type': 'string'},
13618 'apt-proxy': {'$ref': '#/definitions/Settings'},
13619 'authorized-keys': {'type': 'string'},
13620 'provider-type': {'type': 'string'},
13621 'proxy': {'$ref': '#/definitions/Settings'},
13622 'ssl-hostname-verification': {'type': 'boolean'}},
13623 'required': ['provider-type',
13624 'authorized-keys',
13625 'ssl-hostname-verification',
13626 'proxy',
13627 'apt-proxy',
13628 'apt-mirror',
13629 'UpdateBehavior'],
13630 'type': 'object'},
13631 'ContainerManagerConfig': {'additionalProperties': False,
13632 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
13633 'type': 'object'}},
13634 'required': ['config'],
13635 'type': 'object'},
13636 'ContainerManagerConfigParams': {'additionalProperties': False,
13637 'properties': {'type': {'type': 'string'}},
13638 'required': ['type'],
13639 'type': 'object'},
13640 'ControllerConfigResult': {'additionalProperties': False,
13641 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
13642 'type': 'object'}},
13643 'type': 'object'}},
13644 'required': ['config'],
13645 'type': 'object'},
13646 'DistributionGroupResult': {'additionalProperties': False,
13647 'properties': {'error': {'$ref': '#/definitions/Error'},
13648 'result': {'items': {'type': 'string'},
13649 'type': 'array'}},
13650 'required': ['result'],
13651 'type': 'object'},
13652 'DistributionGroupResults': {'additionalProperties': False,
13653 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
13654 'type': 'array'}},
13655 'required': ['results'],
13656 'type': 'object'},
13657 'Entities': {'additionalProperties': False,
13658 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13659 'type': 'array'}},
13660 'required': ['entities'],
13661 'type': 'object'},
13662 'Entity': {'additionalProperties': False,
13663 'properties': {'tag': {'type': 'string'}},
13664 'required': ['tag'],
13665 'type': 'object'},
13666 'EntityPassword': {'additionalProperties': False,
13667 'properties': {'password': {'type': 'string'},
13668 'tag': {'type': 'string'}},
13669 'required': ['tag', 'password'],
13670 'type': 'object'},
13671 'EntityPasswords': {'additionalProperties': False,
13672 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
13673 'type': 'array'}},
13674 'required': ['changes'],
13675 'type': 'object'},
13676 'EntityStatusArgs': {'additionalProperties': False,
13677 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
13678 'type': 'object'}},
13679 'type': 'object'},
13680 'info': {'type': 'string'},
13681 'status': {'type': 'string'},
13682 'tag': {'type': 'string'}},
13683 'required': ['tag',
13684 'status',
13685 'info',
13686 'data'],
13687 'type': 'object'},
13688 'Error': {'additionalProperties': False,
13689 'properties': {'code': {'type': 'string'},
13690 'info': {'$ref': '#/definitions/ErrorInfo'},
13691 'message': {'type': 'string'}},
13692 'required': ['message', 'code'],
13693 'type': 'object'},
13694 'ErrorInfo': {'additionalProperties': False,
13695 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13696 'macaroon-path': {'type': 'string'}},
13697 'type': 'object'},
13698 'ErrorResult': {'additionalProperties': False,
13699 'properties': {'error': {'$ref': '#/definitions/Error'}},
13700 'type': 'object'},
13701 'ErrorResults': {'additionalProperties': False,
13702 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13703 'type': 'array'}},
13704 'required': ['results'],
13705 'type': 'object'},
13706 'FindToolsParams': {'additionalProperties': False,
13707 'properties': {'arch': {'type': 'string'},
13708 'major': {'type': 'integer'},
13709 'minor': {'type': 'integer'},
13710 'number': {'$ref': '#/definitions/Number'},
13711 'series': {'type': 'string'}},
13712 'required': ['number',
13713 'major',
13714 'minor',
13715 'arch',
13716 'series'],
13717 'type': 'object'},
13718 'FindToolsResult': {'additionalProperties': False,
13719 'properties': {'error': {'$ref': '#/definitions/Error'},
13720 'list': {'items': {'$ref': '#/definitions/Tools'},
13721 'type': 'array'}},
13722 'required': ['list'],
13723 'type': 'object'},
13724 'HardwareCharacteristics': {'additionalProperties': False,
13725 'properties': {'arch': {'type': 'string'},
13726 'availability-zone': {'type': 'string'},
13727 'cpu-cores': {'type': 'integer'},
13728 'cpu-power': {'type': 'integer'},
13729 'mem': {'type': 'integer'},
13730 'root-disk': {'type': 'integer'},
13731 'tags': {'items': {'type': 'string'},
13732 'type': 'array'}},
13733 'type': 'object'},
13734 'HostPort': {'additionalProperties': False,
13735 'properties': {'Address': {'$ref': '#/definitions/Address'},
13736 'port': {'type': 'integer'}},
13737 'required': ['Address', 'port'],
13738 'type': 'object'},
13739 'InstanceInfo': {'additionalProperties': False,
13740 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
13741 'instance-id': {'type': 'string'},
13742 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
13743 'type': 'array'},
13744 'nonce': {'type': 'string'},
13745 'tag': {'type': 'string'},
13746 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
13747 'type': 'object'},
13748 'volumes': {'items': {'$ref': '#/definitions/Volume'},
13749 'type': 'array'}},
13750 'required': ['tag',
13751 'instance-id',
13752 'nonce',
13753 'characteristics',
13754 'volumes',
13755 'volume-attachments',
13756 'network-config'],
13757 'type': 'object'},
13758 'InstancesInfo': {'additionalProperties': False,
13759 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
13760 'type': 'array'}},
13761 'required': ['machines'],
13762 'type': 'object'},
13763 'LifeResult': {'additionalProperties': False,
13764 'properties': {'error': {'$ref': '#/definitions/Error'},
13765 'life': {'type': 'string'}},
13766 'required': ['life'],
13767 'type': 'object'},
13768 'LifeResults': {'additionalProperties': False,
13769 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
13770 'type': 'array'}},
13771 'required': ['results'],
13772 'type': 'object'},
13773 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13774 'MachineContainers': {'additionalProperties': False,
13775 'properties': {'container-types': {'items': {'type': 'string'},
13776 'type': 'array'},
13777 'machine-tag': {'type': 'string'}},
13778 'required': ['machine-tag',
13779 'container-types'],
13780 'type': 'object'},
13781 'MachineContainersParams': {'additionalProperties': False,
13782 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
13783 'type': 'array'}},
13784 'required': ['params'],
13785 'type': 'object'},
13786 'MachineNetworkConfigResult': {'additionalProperties': False,
13787 'properties': {'error': {'$ref': '#/definitions/Error'},
13788 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
13789 'type': 'array'}},
13790 'required': ['info'],
13791 'type': 'object'},
13792 'MachineNetworkConfigResults': {'additionalProperties': False,
13793 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
13794 'type': 'array'}},
13795 'required': ['results'],
13796 'type': 'object'},
13797 'ModelConfigResult': {'additionalProperties': False,
13798 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
13799 'type': 'object'}},
13800 'type': 'object'}},
13801 'required': ['config'],
13802 'type': 'object'},
13803 'NetworkConfig': {'additionalProperties': False,
13804 'properties': {'address': {'type': 'string'},
13805 'cidr': {'type': 'string'},
13806 'config-type': {'type': 'string'},
13807 'device-index': {'type': 'integer'},
13808 'disabled': {'type': 'boolean'},
13809 'dns-search-domains': {'items': {'type': 'string'},
13810 'type': 'array'},
13811 'dns-servers': {'items': {'type': 'string'},
13812 'type': 'array'},
13813 'gateway-address': {'type': 'string'},
13814 'interface-name': {'type': 'string'},
13815 'interface-type': {'type': 'string'},
13816 'mac-address': {'type': 'string'},
13817 'mtu': {'type': 'integer'},
13818 'no-auto-start': {'type': 'boolean'},
13819 'parent-interface-name': {'type': 'string'},
13820 'provider-address-id': {'type': 'string'},
13821 'provider-id': {'type': 'string'},
13822 'provider-space-id': {'type': 'string'},
13823 'provider-subnet-id': {'type': 'string'},
13824 'provider-vlan-id': {'type': 'string'},
13825 'vlan-tag': {'type': 'integer'}},
13826 'required': ['device-index',
13827 'mac-address',
13828 'cidr',
13829 'mtu',
13830 'provider-id',
13831 'provider-subnet-id',
13832 'provider-space-id',
13833 'provider-address-id',
13834 'provider-vlan-id',
13835 'vlan-tag',
13836 'interface-name',
13837 'parent-interface-name',
13838 'interface-type',
13839 'disabled'],
13840 'type': 'object'},
13841 'NotifyWatchResult': {'additionalProperties': False,
13842 'properties': {'NotifyWatcherId': {'type': 'string'},
13843 'error': {'$ref': '#/definitions/Error'}},
13844 'required': ['NotifyWatcherId'],
13845 'type': 'object'},
13846 'Number': {'additionalProperties': False,
13847 'properties': {'Build': {'type': 'integer'},
13848 'Major': {'type': 'integer'},
13849 'Minor': {'type': 'integer'},
13850 'Patch': {'type': 'integer'},
13851 'Tag': {'type': 'string'}},
13852 'required': ['Major',
13853 'Minor',
13854 'Tag',
13855 'Patch',
13856 'Build'],
13857 'type': 'object'},
13858 'ProvisioningInfo': {'additionalProperties': False,
13859 'properties': {'constraints': {'$ref': '#/definitions/Value'},
13860 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
13861 'type': 'object'}},
13862 'type': 'object'},
13863 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
13864 'type': 'object'},
13865 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
13866 'type': 'array'},
13867 'jobs': {'items': {'type': 'string'},
13868 'type': 'array'},
13869 'placement': {'type': 'string'},
13870 'series': {'type': 'string'},
13871 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
13872 'type': 'array'}},
13873 'type': 'object'},
13874 'tags': {'patternProperties': {'.*': {'type': 'string'}},
13875 'type': 'object'},
13876 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
13877 'type': 'array'}},
13878 'required': ['constraints',
13879 'series',
13880 'placement',
13881 'jobs'],
13882 'type': 'object'},
13883 'ProvisioningInfoResult': {'additionalProperties': False,
13884 'properties': {'error': {'$ref': '#/definitions/Error'},
13885 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
13886 'required': ['result'],
13887 'type': 'object'},
13888 'ProvisioningInfoResults': {'additionalProperties': False,
13889 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
13890 'type': 'array'}},
13891 'required': ['results'],
13892 'type': 'object'},
13893 'SetStatus': {'additionalProperties': False,
13894 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
13895 'type': 'array'}},
13896 'required': ['entities'],
13897 'type': 'object'},
13898 'Settings': {'additionalProperties': False,
13899 'properties': {'Ftp': {'type': 'string'},
13900 'Http': {'type': 'string'},
13901 'Https': {'type': 'string'},
13902 'NoProxy': {'type': 'string'}},
13903 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
13904 'type': 'object'},
13905 'StatusResult': {'additionalProperties': False,
13906 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
13907 'type': 'object'}},
13908 'type': 'object'},
13909 'error': {'$ref': '#/definitions/Error'},
13910 'id': {'type': 'string'},
13911 'info': {'type': 'string'},
13912 'life': {'type': 'string'},
13913 'since': {'format': 'date-time',
13914 'type': 'string'},
13915 'status': {'type': 'string'}},
13916 'required': ['id',
13917 'life',
13918 'status',
13919 'info',
13920 'data',
13921 'since'],
13922 'type': 'object'},
13923 'StatusResults': {'additionalProperties': False,
13924 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
13925 'type': 'array'}},
13926 'required': ['results'],
13927 'type': 'object'},
13928 'StringResult': {'additionalProperties': False,
13929 'properties': {'error': {'$ref': '#/definitions/Error'},
13930 'result': {'type': 'string'}},
13931 'required': ['result'],
13932 'type': 'object'},
13933 'StringResults': {'additionalProperties': False,
13934 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
13935 'type': 'array'}},
13936 'required': ['results'],
13937 'type': 'object'},
13938 'StringsResult': {'additionalProperties': False,
13939 'properties': {'error': {'$ref': '#/definitions/Error'},
13940 'result': {'items': {'type': 'string'},
13941 'type': 'array'}},
13942 'type': 'object'},
13943 'StringsWatchResult': {'additionalProperties': False,
13944 'properties': {'changes': {'items': {'type': 'string'},
13945 'type': 'array'},
13946 'error': {'$ref': '#/definitions/Error'},
13947 'watcher-id': {'type': 'string'}},
13948 'required': ['watcher-id'],
13949 'type': 'object'},
13950 'StringsWatchResults': {'additionalProperties': False,
13951 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
13952 'type': 'array'}},
13953 'required': ['results'],
13954 'type': 'object'},
13955 'Tools': {'additionalProperties': False,
13956 'properties': {'sha256': {'type': 'string'},
13957 'size': {'type': 'integer'},
13958 'url': {'type': 'string'},
13959 'version': {'$ref': '#/definitions/Binary'}},
13960 'required': ['version', 'url', 'size'],
13961 'type': 'object'},
13962 'ToolsResult': {'additionalProperties': False,
13963 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
13964 'error': {'$ref': '#/definitions/Error'},
13965 'tools': {'items': {'$ref': '#/definitions/Tools'},
13966 'type': 'array'}},
13967 'required': ['tools',
13968 'disable-ssl-hostname-verification'],
13969 'type': 'object'},
13970 'ToolsResults': {'additionalProperties': False,
13971 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
13972 'type': 'array'}},
13973 'required': ['results'],
13974 'type': 'object'},
13975 'UpdateBehavior': {'additionalProperties': False,
13976 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
13977 'enable-os-upgrade': {'type': 'boolean'}},
13978 'required': ['enable-os-refresh-update',
13979 'enable-os-upgrade'],
13980 'type': 'object'},
13981 'Value': {'additionalProperties': False,
13982 'properties': {'arch': {'type': 'string'},
13983 'container': {'type': 'string'},
13984 'cpu-cores': {'type': 'integer'},
13985 'cpu-power': {'type': 'integer'},
13986 'instance-type': {'type': 'string'},
13987 'mem': {'type': 'integer'},
13988 'root-disk': {'type': 'integer'},
13989 'spaces': {'items': {'type': 'string'},
13990 'type': 'array'},
13991 'tags': {'items': {'type': 'string'},
13992 'type': 'array'},
13993 'virt-type': {'type': 'string'}},
13994 'type': 'object'},
13995 'Volume': {'additionalProperties': False,
13996 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
13997 'volume-tag': {'type': 'string'}},
13998 'required': ['volume-tag', 'info'],
13999 'type': 'object'},
14000 'VolumeAttachmentInfo': {'additionalProperties': False,
14001 'properties': {'bus-address': {'type': 'string'},
14002 'device-link': {'type': 'string'},
14003 'device-name': {'type': 'string'},
14004 'read-only': {'type': 'boolean'}},
14005 'type': 'object'},
14006 'VolumeAttachmentParams': {'additionalProperties': False,
14007 'properties': {'instance-id': {'type': 'string'},
14008 'machine-tag': {'type': 'string'},
14009 'provider': {'type': 'string'},
14010 'read-only': {'type': 'boolean'},
14011 'volume-id': {'type': 'string'},
14012 'volume-tag': {'type': 'string'}},
14013 'required': ['volume-tag',
14014 'machine-tag',
14015 'provider'],
14016 'type': 'object'},
14017 'VolumeInfo': {'additionalProperties': False,
14018 'properties': {'hardware-id': {'type': 'string'},
14019 'persistent': {'type': 'boolean'},
14020 'size': {'type': 'integer'},
14021 'volume-id': {'type': 'string'}},
14022 'required': ['volume-id', 'size', 'persistent'],
14023 'type': 'object'},
14024 'VolumeParams': {'additionalProperties': False,
14025 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
14026 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
14027 'type': 'object'}},
14028 'type': 'object'},
14029 'provider': {'type': 'string'},
14030 'size': {'type': 'integer'},
14031 'tags': {'patternProperties': {'.*': {'type': 'string'}},
14032 'type': 'object'},
14033 'volume-tag': {'type': 'string'}},
14034 'required': ['volume-tag',
14035 'size',
14036 'provider'],
14037 'type': 'object'},
14038 'WatchContainer': {'additionalProperties': False,
14039 'properties': {'container-type': {'type': 'string'},
14040 'machine-tag': {'type': 'string'}},
14041 'required': ['machine-tag',
14042 'container-type'],
14043 'type': 'object'},
14044 'WatchContainers': {'additionalProperties': False,
14045 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
14046 'type': 'array'}},
14047 'required': ['params'],
14048 'type': 'object'}},
14049 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
14050 'type': 'object'},
14051 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
14052 'type': 'object'},
14053 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
14054 'type': 'object'},
14055 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14056 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
14057 'type': 'object'},
14058 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
14059 'type': 'object'},
14060 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
14061 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
14062 'type': 'object'},
14063 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
14064 'type': 'object'},
14065 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14066 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
14067 'type': 'object'},
14068 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14069 'Result': {'$ref': '#/definitions/ErrorResults'}},
14070 'type': 'object'},
14071 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
14072 'Result': {'$ref': '#/definitions/FindToolsResult'}},
14073 'type': 'object'},
14074 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14075 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
14076 'type': 'object'},
14077 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14078 'Result': {'$ref': '#/definitions/StringResults'}},
14079 'type': 'object'},
14080 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14081 'Result': {'$ref': '#/definitions/StatusResults'}},
14082 'type': 'object'},
14083 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14084 'Result': {'$ref': '#/definitions/LifeResults'}},
14085 'type': 'object'},
14086 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
14087 'type': 'object'},
14088 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
14089 'type': 'object'},
14090 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
14091 'type': 'object'},
14092 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14093 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
14094 'type': 'object'},
14095 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14096 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
14097 'type': 'object'},
14098 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14099 'Result': {'$ref': '#/definitions/ErrorResults'}},
14100 'type': 'object'},
14101 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14102 'Result': {'$ref': '#/definitions/ErrorResults'}},
14103 'type': 'object'},
14104 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14105 'Result': {'$ref': '#/definitions/StringResults'}},
14106 'type': 'object'},
14107 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
14108 'Result': {'$ref': '#/definitions/ErrorResults'}},
14109 'type': 'object'},
14110 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14111 'Result': {'$ref': '#/definitions/ErrorResults'}},
14112 'type': 'object'},
14113 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
14114 'Result': {'$ref': '#/definitions/ErrorResults'}},
14115 'type': 'object'},
14116 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14117 'Result': {'$ref': '#/definitions/ErrorResults'}},
14118 'type': 'object'},
14119 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
14120 'Result': {'$ref': '#/definitions/ErrorResults'}},
14121 'type': 'object'},
14122 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
14123 'type': 'object'},
14124 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14125 'Result': {'$ref': '#/definitions/StatusResults'}},
14126 'type': 'object'},
14127 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14128 'Result': {'$ref': '#/definitions/ToolsResults'}},
14129 'type': 'object'},
14130 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14131 'Result': {'$ref': '#/definitions/ErrorResults'}},
14132 'type': 'object'},
14133 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14134 'type': 'object'},
14135 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
14136 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14137 'type': 'object'},
14138 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
14139 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14140 'type': 'object'},
14141 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14142 'type': 'object'},
14143 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14144 'type': 'object'},
14145 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
14146 'type': 'object'}},
14147 'type': 'object'}
14148
14149
14150 @ReturnMapping(StringsResult)
14151 async def APIAddresses(self):
14152 '''
14153
14154 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
14155 '''
14156 # map input types to rpc msg
14157 params = dict()
14158 msg = dict(Type='Provisioner', Request='APIAddresses', Version=3, Params=params)
14159
14160 reply = await self.rpc(msg)
14161 return reply
14162
14163
14164
14165 @ReturnMapping(APIHostPortsResult)
14166 async def APIHostPorts(self):
14167 '''
14168
14169 Returns -> typing.Sequence[~HostPort]
14170 '''
14171 # map input types to rpc msg
14172 params = dict()
14173 msg = dict(Type='Provisioner', Request='APIHostPorts', Version=3, Params=params)
14174
14175 reply = await self.rpc(msg)
14176 return reply
14177
14178
14179
14180 @ReturnMapping(BytesResult)
14181 async def CACert(self):
14182 '''
14183
14184 Returns -> typing.Sequence[int]
14185 '''
14186 # map input types to rpc msg
14187 params = dict()
14188 msg = dict(Type='Provisioner', Request='CACert', Version=3, Params=params)
14189
14190 reply = await self.rpc(msg)
14191 return reply
14192
14193
14194
14195 @ReturnMapping(ConstraintsResults)
14196 async def Constraints(self, entities):
14197 '''
14198 entities : typing.Sequence[~Entity]
14199 Returns -> typing.Sequence[~ConstraintsResult]
14200 '''
14201 # map input types to rpc msg
14202 params = dict()
14203 msg = dict(Type='Provisioner', Request='Constraints', Version=3, Params=params)
14204 params['entities'] = entities
14205 reply = await self.rpc(msg)
14206 return reply
14207
14208
14209
14210 @ReturnMapping(ContainerConfig)
14211 async def ContainerConfig(self):
14212 '''
14213
14214 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool]
14215 '''
14216 # map input types to rpc msg
14217 params = dict()
14218 msg = dict(Type='Provisioner', Request='ContainerConfig', Version=3, Params=params)
14219
14220 reply = await self.rpc(msg)
14221 return reply
14222
14223
14224
14225 @ReturnMapping(ContainerManagerConfig)
14226 async def ContainerManagerConfig(self, type_):
14227 '''
14228 type_ : str
14229 Returns -> typing.Mapping[str, str]
14230 '''
14231 # map input types to rpc msg
14232 params = dict()
14233 msg = dict(Type='Provisioner', Request='ContainerManagerConfig', Version=3, Params=params)
14234 params['type'] = type_
14235 reply = await self.rpc(msg)
14236 return reply
14237
14238
14239
14240 @ReturnMapping(ControllerConfigResult)
14241 async def ControllerConfig(self):
14242 '''
14243
14244 Returns -> typing.Mapping[str, typing.Any]
14245 '''
14246 # map input types to rpc msg
14247 params = dict()
14248 msg = dict(Type='Provisioner', Request='ControllerConfig', Version=3, Params=params)
14249
14250 reply = await self.rpc(msg)
14251 return reply
14252
14253
14254
14255 @ReturnMapping(DistributionGroupResults)
14256 async def DistributionGroup(self, entities):
14257 '''
14258 entities : typing.Sequence[~Entity]
14259 Returns -> typing.Sequence[~DistributionGroupResult]
14260 '''
14261 # map input types to rpc msg
14262 params = dict()
14263 msg = dict(Type='Provisioner', Request='DistributionGroup', Version=3, Params=params)
14264 params['entities'] = entities
14265 reply = await self.rpc(msg)
14266 return reply
14267
14268
14269
14270 @ReturnMapping(ErrorResults)
14271 async def EnsureDead(self, entities):
14272 '''
14273 entities : typing.Sequence[~Entity]
14274 Returns -> typing.Sequence[~ErrorResult]
14275 '''
14276 # map input types to rpc msg
14277 params = dict()
14278 msg = dict(Type='Provisioner', Request='EnsureDead', Version=3, Params=params)
14279 params['entities'] = entities
14280 reply = await self.rpc(msg)
14281 return reply
14282
14283
14284
14285 @ReturnMapping(FindToolsResult)
14286 async def FindTools(self, arch, major, minor, number, series):
14287 '''
14288 arch : str
14289 major : int
14290 minor : int
14291 number : Number
14292 series : str
14293 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
14294 '''
14295 # map input types to rpc msg
14296 params = dict()
14297 msg = dict(Type='Provisioner', Request='FindTools', Version=3, Params=params)
14298 params['arch'] = arch
14299 params['major'] = major
14300 params['minor'] = minor
14301 params['number'] = number
14302 params['series'] = series
14303 reply = await self.rpc(msg)
14304 return reply
14305
14306
14307
14308 @ReturnMapping(MachineNetworkConfigResults)
14309 async def GetContainerInterfaceInfo(self, entities):
14310 '''
14311 entities : typing.Sequence[~Entity]
14312 Returns -> typing.Sequence[~MachineNetworkConfigResult]
14313 '''
14314 # map input types to rpc msg
14315 params = dict()
14316 msg = dict(Type='Provisioner', Request='GetContainerInterfaceInfo', Version=3, Params=params)
14317 params['entities'] = entities
14318 reply = await self.rpc(msg)
14319 return reply
14320
14321
14322
14323 @ReturnMapping(StringResults)
14324 async def InstanceId(self, entities):
14325 '''
14326 entities : typing.Sequence[~Entity]
14327 Returns -> typing.Sequence[~StringResult]
14328 '''
14329 # map input types to rpc msg
14330 params = dict()
14331 msg = dict(Type='Provisioner', Request='InstanceId', Version=3, Params=params)
14332 params['entities'] = entities
14333 reply = await self.rpc(msg)
14334 return reply
14335
14336
14337
14338 @ReturnMapping(StatusResults)
14339 async def InstanceStatus(self, entities):
14340 '''
14341 entities : typing.Sequence[~Entity]
14342 Returns -> typing.Sequence[~StatusResult]
14343 '''
14344 # map input types to rpc msg
14345 params = dict()
14346 msg = dict(Type='Provisioner', Request='InstanceStatus', Version=3, Params=params)
14347 params['entities'] = entities
14348 reply = await self.rpc(msg)
14349 return reply
14350
14351
14352
14353 @ReturnMapping(LifeResults)
14354 async def Life(self, entities):
14355 '''
14356 entities : typing.Sequence[~Entity]
14357 Returns -> typing.Sequence[~LifeResult]
14358 '''
14359 # map input types to rpc msg
14360 params = dict()
14361 msg = dict(Type='Provisioner', Request='Life', Version=3, Params=params)
14362 params['entities'] = entities
14363 reply = await self.rpc(msg)
14364 return reply
14365
14366
14367
14368 @ReturnMapping(StatusResults)
14369 async def MachinesWithTransientErrors(self):
14370 '''
14371
14372 Returns -> typing.Sequence[~StatusResult]
14373 '''
14374 # map input types to rpc msg
14375 params = dict()
14376 msg = dict(Type='Provisioner', Request='MachinesWithTransientErrors', Version=3, Params=params)
14377
14378 reply = await self.rpc(msg)
14379 return reply
14380
14381
14382
14383 @ReturnMapping(ModelConfigResult)
14384 async def ModelConfig(self):
14385 '''
14386
14387 Returns -> typing.Mapping[str, typing.Any]
14388 '''
14389 # map input types to rpc msg
14390 params = dict()
14391 msg = dict(Type='Provisioner', Request='ModelConfig', Version=3, Params=params)
14392
14393 reply = await self.rpc(msg)
14394 return reply
14395
14396
14397
14398 @ReturnMapping(StringResult)
14399 async def ModelUUID(self):
14400 '''
14401
14402 Returns -> typing.Union[_ForwardRef('Error'), str]
14403 '''
14404 # map input types to rpc msg
14405 params = dict()
14406 msg = dict(Type='Provisioner', Request='ModelUUID', Version=3, Params=params)
14407
14408 reply = await self.rpc(msg)
14409 return reply
14410
14411
14412
14413 @ReturnMapping(MachineNetworkConfigResults)
14414 async def PrepareContainerInterfaceInfo(self, entities):
14415 '''
14416 entities : typing.Sequence[~Entity]
14417 Returns -> typing.Sequence[~MachineNetworkConfigResult]
14418 '''
14419 # map input types to rpc msg
14420 params = dict()
14421 msg = dict(Type='Provisioner', Request='PrepareContainerInterfaceInfo', Version=3, Params=params)
14422 params['entities'] = entities
14423 reply = await self.rpc(msg)
14424 return reply
14425
14426
14427
14428 @ReturnMapping(ProvisioningInfoResults)
14429 async def ProvisioningInfo(self, entities):
14430 '''
14431 entities : typing.Sequence[~Entity]
14432 Returns -> typing.Sequence[~ProvisioningInfoResult]
14433 '''
14434 # map input types to rpc msg
14435 params = dict()
14436 msg = dict(Type='Provisioner', Request='ProvisioningInfo', Version=3, Params=params)
14437 params['entities'] = entities
14438 reply = await self.rpc(msg)
14439 return reply
14440
14441
14442
14443 @ReturnMapping(ErrorResults)
14444 async def ReleaseContainerAddresses(self, entities):
14445 '''
14446 entities : typing.Sequence[~Entity]
14447 Returns -> typing.Sequence[~ErrorResult]
14448 '''
14449 # map input types to rpc msg
14450 params = dict()
14451 msg = dict(Type='Provisioner', Request='ReleaseContainerAddresses', Version=3, Params=params)
14452 params['entities'] = entities
14453 reply = await self.rpc(msg)
14454 return reply
14455
14456
14457
14458 @ReturnMapping(ErrorResults)
14459 async def Remove(self, entities):
14460 '''
14461 entities : typing.Sequence[~Entity]
14462 Returns -> typing.Sequence[~ErrorResult]
14463 '''
14464 # map input types to rpc msg
14465 params = dict()
14466 msg = dict(Type='Provisioner', Request='Remove', Version=3, Params=params)
14467 params['entities'] = entities
14468 reply = await self.rpc(msg)
14469 return reply
14470
14471
14472
14473 @ReturnMapping(StringResults)
14474 async def Series(self, entities):
14475 '''
14476 entities : typing.Sequence[~Entity]
14477 Returns -> typing.Sequence[~StringResult]
14478 '''
14479 # map input types to rpc msg
14480 params = dict()
14481 msg = dict(Type='Provisioner', Request='Series', Version=3, Params=params)
14482 params['entities'] = entities
14483 reply = await self.rpc(msg)
14484 return reply
14485
14486
14487
14488 @ReturnMapping(ErrorResults)
14489 async def SetInstanceInfo(self, machines):
14490 '''
14491 machines : typing.Sequence[~InstanceInfo]
14492 Returns -> typing.Sequence[~ErrorResult]
14493 '''
14494 # map input types to rpc msg
14495 params = dict()
14496 msg = dict(Type='Provisioner', Request='SetInstanceInfo', Version=3, Params=params)
14497 params['machines'] = machines
14498 reply = await self.rpc(msg)
14499 return reply
14500
14501
14502
14503 @ReturnMapping(ErrorResults)
14504 async def SetInstanceStatus(self, entities):
14505 '''
14506 entities : typing.Sequence[~EntityStatusArgs]
14507 Returns -> typing.Sequence[~ErrorResult]
14508 '''
14509 # map input types to rpc msg
14510 params = dict()
14511 msg = dict(Type='Provisioner', Request='SetInstanceStatus', Version=3, Params=params)
14512 params['entities'] = entities
14513 reply = await self.rpc(msg)
14514 return reply
14515
14516
14517
14518 @ReturnMapping(ErrorResults)
14519 async def SetPasswords(self, changes):
14520 '''
14521 changes : typing.Sequence[~EntityPassword]
14522 Returns -> typing.Sequence[~ErrorResult]
14523 '''
14524 # map input types to rpc msg
14525 params = dict()
14526 msg = dict(Type='Provisioner', Request='SetPasswords', Version=3, Params=params)
14527 params['changes'] = changes
14528 reply = await self.rpc(msg)
14529 return reply
14530
14531
14532
14533 @ReturnMapping(ErrorResults)
14534 async def SetStatus(self, entities):
14535 '''
14536 entities : typing.Sequence[~EntityStatusArgs]
14537 Returns -> typing.Sequence[~ErrorResult]
14538 '''
14539 # map input types to rpc msg
14540 params = dict()
14541 msg = dict(Type='Provisioner', Request='SetStatus', Version=3, Params=params)
14542 params['entities'] = entities
14543 reply = await self.rpc(msg)
14544 return reply
14545
14546
14547
14548 @ReturnMapping(ErrorResults)
14549 async def SetSupportedContainers(self, params):
14550 '''
14551 params : typing.Sequence[~MachineContainers]
14552 Returns -> typing.Sequence[~ErrorResult]
14553 '''
14554 # map input types to rpc msg
14555 params = dict()
14556 msg = dict(Type='Provisioner', Request='SetSupportedContainers', Version=3, Params=params)
14557 params['params'] = params
14558 reply = await self.rpc(msg)
14559 return reply
14560
14561
14562
14563 @ReturnMapping(StringsResult)
14564 async def StateAddresses(self):
14565 '''
14566
14567 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
14568 '''
14569 # map input types to rpc msg
14570 params = dict()
14571 msg = dict(Type='Provisioner', Request='StateAddresses', Version=3, Params=params)
14572
14573 reply = await self.rpc(msg)
14574 return reply
14575
14576
14577
14578 @ReturnMapping(StatusResults)
14579 async def Status(self, entities):
14580 '''
14581 entities : typing.Sequence[~Entity]
14582 Returns -> typing.Sequence[~StatusResult]
14583 '''
14584 # map input types to rpc msg
14585 params = dict()
14586 msg = dict(Type='Provisioner', Request='Status', Version=3, Params=params)
14587 params['entities'] = entities
14588 reply = await self.rpc(msg)
14589 return reply
14590
14591
14592
14593 @ReturnMapping(ToolsResults)
14594 async def Tools(self, entities):
14595 '''
14596 entities : typing.Sequence[~Entity]
14597 Returns -> typing.Sequence[~ToolsResult]
14598 '''
14599 # map input types to rpc msg
14600 params = dict()
14601 msg = dict(Type='Provisioner', Request='Tools', Version=3, Params=params)
14602 params['entities'] = entities
14603 reply = await self.rpc(msg)
14604 return reply
14605
14606
14607
14608 @ReturnMapping(ErrorResults)
14609 async def UpdateStatus(self, entities):
14610 '''
14611 entities : typing.Sequence[~EntityStatusArgs]
14612 Returns -> typing.Sequence[~ErrorResult]
14613 '''
14614 # map input types to rpc msg
14615 params = dict()
14616 msg = dict(Type='Provisioner', Request='UpdateStatus', Version=3, Params=params)
14617 params['entities'] = entities
14618 reply = await self.rpc(msg)
14619 return reply
14620
14621
14622
14623 @ReturnMapping(NotifyWatchResult)
14624 async def WatchAPIHostPorts(self):
14625 '''
14626
14627 Returns -> typing.Union[str, _ForwardRef('Error')]
14628 '''
14629 # map input types to rpc msg
14630 params = dict()
14631 msg = dict(Type='Provisioner', Request='WatchAPIHostPorts', Version=3, Params=params)
14632
14633 reply = await self.rpc(msg)
14634 return reply
14635
14636
14637
14638 @ReturnMapping(StringsWatchResults)
14639 async def WatchAllContainers(self, params):
14640 '''
14641 params : typing.Sequence[~WatchContainer]
14642 Returns -> typing.Sequence[~StringsWatchResult]
14643 '''
14644 # map input types to rpc msg
14645 params = dict()
14646 msg = dict(Type='Provisioner', Request='WatchAllContainers', Version=3, Params=params)
14647 params['params'] = params
14648 reply = await self.rpc(msg)
14649 return reply
14650
14651
14652
14653 @ReturnMapping(StringsWatchResults)
14654 async def WatchContainers(self, params):
14655 '''
14656 params : typing.Sequence[~WatchContainer]
14657 Returns -> typing.Sequence[~StringsWatchResult]
14658 '''
14659 # map input types to rpc msg
14660 params = dict()
14661 msg = dict(Type='Provisioner', Request='WatchContainers', Version=3, Params=params)
14662 params['params'] = params
14663 reply = await self.rpc(msg)
14664 return reply
14665
14666
14667
14668 @ReturnMapping(NotifyWatchResult)
14669 async def WatchForModelConfigChanges(self):
14670 '''
14671
14672 Returns -> typing.Union[str, _ForwardRef('Error')]
14673 '''
14674 # map input types to rpc msg
14675 params = dict()
14676 msg = dict(Type='Provisioner', Request='WatchForModelConfigChanges', Version=3, Params=params)
14677
14678 reply = await self.rpc(msg)
14679 return reply
14680
14681
14682
14683 @ReturnMapping(NotifyWatchResult)
14684 async def WatchMachineErrorRetry(self):
14685 '''
14686
14687 Returns -> typing.Union[str, _ForwardRef('Error')]
14688 '''
14689 # map input types to rpc msg
14690 params = dict()
14691 msg = dict(Type='Provisioner', Request='WatchMachineErrorRetry', Version=3, Params=params)
14692
14693 reply = await self.rpc(msg)
14694 return reply
14695
14696
14697
14698 @ReturnMapping(StringsWatchResult)
14699 async def WatchModelMachines(self):
14700 '''
14701
14702 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
14703 '''
14704 # map input types to rpc msg
14705 params = dict()
14706 msg = dict(Type='Provisioner', Request='WatchModelMachines', Version=3, Params=params)
14707
14708 reply = await self.rpc(msg)
14709 return reply
14710
14711
14712 class ProxyUpdaterFacade(Type):
14713 name = 'ProxyUpdater'
14714 version = 1
14715 schema = {'definitions': {'Entities': {'additionalProperties': False,
14716 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14717 'type': 'array'}},
14718 'required': ['entities'],
14719 'type': 'object'},
14720 'Entity': {'additionalProperties': False,
14721 'properties': {'tag': {'type': 'string'}},
14722 'required': ['tag'],
14723 'type': 'object'},
14724 'Error': {'additionalProperties': False,
14725 'properties': {'code': {'type': 'string'},
14726 'info': {'$ref': '#/definitions/ErrorInfo'},
14727 'message': {'type': 'string'}},
14728 'required': ['message', 'code'],
14729 'type': 'object'},
14730 'ErrorInfo': {'additionalProperties': False,
14731 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14732 'macaroon-path': {'type': 'string'}},
14733 'type': 'object'},
14734 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14735 'NotifyWatchResult': {'additionalProperties': False,
14736 'properties': {'NotifyWatcherId': {'type': 'string'},
14737 'error': {'$ref': '#/definitions/Error'}},
14738 'required': ['NotifyWatcherId'],
14739 'type': 'object'},
14740 'NotifyWatchResults': {'additionalProperties': False,
14741 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14742 'type': 'array'}},
14743 'required': ['results'],
14744 'type': 'object'},
14745 'ProxyConfig': {'additionalProperties': False,
14746 'properties': {'ftp': {'type': 'string'},
14747 'http': {'type': 'string'},
14748 'https': {'type': 'string'},
14749 'no-proxy': {'type': 'string'}},
14750 'required': ['http',
14751 'https',
14752 'ftp',
14753 'no-proxy'],
14754 'type': 'object'},
14755 'ProxyConfigResult': {'additionalProperties': False,
14756 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
14757 'error': {'$ref': '#/definitions/Error'},
14758 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}},
14759 'required': ['proxy-settings',
14760 'apt-proxy-settings'],
14761 'type': 'object'},
14762 'ProxyConfigResults': {'additionalProperties': False,
14763 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
14764 'type': 'array'}},
14765 'required': ['results'],
14766 'type': 'object'}},
14767 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14768 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
14769 'type': 'object'},
14770 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14771 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14772 'type': 'object'}},
14773 'type': 'object'}
14774
14775
14776 @ReturnMapping(ProxyConfigResults)
14777 async def ProxyConfig(self, entities):
14778 '''
14779 entities : typing.Sequence[~Entity]
14780 Returns -> typing.Sequence[~ProxyConfigResult]
14781 '''
14782 # map input types to rpc msg
14783 params = dict()
14784 msg = dict(Type='ProxyUpdater', Request='ProxyConfig', Version=1, Params=params)
14785 params['entities'] = entities
14786 reply = await self.rpc(msg)
14787 return reply
14788
14789
14790
14791 @ReturnMapping(NotifyWatchResults)
14792 async def WatchForProxyConfigAndAPIHostPortChanges(self, entities):
14793 '''
14794 entities : typing.Sequence[~Entity]
14795 Returns -> typing.Sequence[~NotifyWatchResult]
14796 '''
14797 # map input types to rpc msg
14798 params = dict()
14799 msg = dict(Type='ProxyUpdater', Request='WatchForProxyConfigAndAPIHostPortChanges', Version=1, Params=params)
14800 params['entities'] = entities
14801 reply = await self.rpc(msg)
14802 return reply
14803
14804
14805 class RebootFacade(Type):
14806 name = 'Reboot'
14807 version = 2
14808 schema = {'definitions': {'Entities': {'additionalProperties': False,
14809 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14810 'type': 'array'}},
14811 'required': ['entities'],
14812 'type': 'object'},
14813 'Entity': {'additionalProperties': False,
14814 'properties': {'tag': {'type': 'string'}},
14815 'required': ['tag'],
14816 'type': 'object'},
14817 'Error': {'additionalProperties': False,
14818 'properties': {'code': {'type': 'string'},
14819 'info': {'$ref': '#/definitions/ErrorInfo'},
14820 'message': {'type': 'string'}},
14821 'required': ['message', 'code'],
14822 'type': 'object'},
14823 'ErrorInfo': {'additionalProperties': False,
14824 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14825 'macaroon-path': {'type': 'string'}},
14826 'type': 'object'},
14827 'ErrorResult': {'additionalProperties': False,
14828 'properties': {'error': {'$ref': '#/definitions/Error'}},
14829 'type': 'object'},
14830 'ErrorResults': {'additionalProperties': False,
14831 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14832 'type': 'array'}},
14833 'required': ['results'],
14834 'type': 'object'},
14835 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14836 'NotifyWatchResult': {'additionalProperties': False,
14837 'properties': {'NotifyWatcherId': {'type': 'string'},
14838 'error': {'$ref': '#/definitions/Error'}},
14839 'required': ['NotifyWatcherId'],
14840 'type': 'object'},
14841 'RebootActionResult': {'additionalProperties': False,
14842 'properties': {'error': {'$ref': '#/definitions/Error'},
14843 'result': {'type': 'string'}},
14844 'type': 'object'},
14845 'RebootActionResults': {'additionalProperties': False,
14846 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
14847 'type': 'array'}},
14848 'type': 'object'}},
14849 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14850 'Result': {'$ref': '#/definitions/ErrorResults'}},
14851 'type': 'object'},
14852 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14853 'Result': {'$ref': '#/definitions/RebootActionResults'}},
14854 'type': 'object'},
14855 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14856 'Result': {'$ref': '#/definitions/ErrorResults'}},
14857 'type': 'object'},
14858 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14859 'type': 'object'}},
14860 'type': 'object'}
14861
14862
14863 @ReturnMapping(ErrorResults)
14864 async def ClearReboot(self, entities):
14865 '''
14866 entities : typing.Sequence[~Entity]
14867 Returns -> typing.Sequence[~ErrorResult]
14868 '''
14869 # map input types to rpc msg
14870 params = dict()
14871 msg = dict(Type='Reboot', Request='ClearReboot', Version=2, Params=params)
14872 params['entities'] = entities
14873 reply = await self.rpc(msg)
14874 return reply
14875
14876
14877
14878 @ReturnMapping(RebootActionResults)
14879 async def GetRebootAction(self, entities):
14880 '''
14881 entities : typing.Sequence[~Entity]
14882 Returns -> typing.Sequence[~RebootActionResult]
14883 '''
14884 # map input types to rpc msg
14885 params = dict()
14886 msg = dict(Type='Reboot', Request='GetRebootAction', Version=2, Params=params)
14887 params['entities'] = entities
14888 reply = await self.rpc(msg)
14889 return reply
14890
14891
14892
14893 @ReturnMapping(ErrorResults)
14894 async def RequestReboot(self, entities):
14895 '''
14896 entities : typing.Sequence[~Entity]
14897 Returns -> typing.Sequence[~ErrorResult]
14898 '''
14899 # map input types to rpc msg
14900 params = dict()
14901 msg = dict(Type='Reboot', Request='RequestReboot', Version=2, Params=params)
14902 params['entities'] = entities
14903 reply = await self.rpc(msg)
14904 return reply
14905
14906
14907
14908 @ReturnMapping(NotifyWatchResult)
14909 async def WatchForRebootEvent(self):
14910 '''
14911
14912 Returns -> typing.Union[str, _ForwardRef('Error')]
14913 '''
14914 # map input types to rpc msg
14915 params = dict()
14916 msg = dict(Type='Reboot', Request='WatchForRebootEvent', Version=2, Params=params)
14917
14918 reply = await self.rpc(msg)
14919 return reply
14920
14921
14922 class RelationUnitsWatcherFacade(Type):
14923 name = 'RelationUnitsWatcher'
14924 version = 1
14925 schema = {'definitions': {'Error': {'additionalProperties': False,
14926 'properties': {'code': {'type': 'string'},
14927 'info': {'$ref': '#/definitions/ErrorInfo'},
14928 'message': {'type': 'string'}},
14929 'required': ['message', 'code'],
14930 'type': 'object'},
14931 'ErrorInfo': {'additionalProperties': False,
14932 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14933 'macaroon-path': {'type': 'string'}},
14934 'type': 'object'},
14935 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14936 'RelationUnitsChange': {'additionalProperties': False,
14937 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
14938 'type': 'object'},
14939 'departed': {'items': {'type': 'string'},
14940 'type': 'array'}},
14941 'required': ['changed'],
14942 'type': 'object'},
14943 'RelationUnitsWatchResult': {'additionalProperties': False,
14944 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
14945 'error': {'$ref': '#/definitions/Error'},
14946 'watcher-id': {'type': 'string'}},
14947 'required': ['watcher-id',
14948 'changes'],
14949 'type': 'object'},
14950 'UnitSettings': {'additionalProperties': False,
14951 'properties': {'version': {'type': 'integer'}},
14952 'required': ['version'],
14953 'type': 'object'}},
14954 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
14955 'type': 'object'},
14956 'Stop': {'type': 'object'}},
14957 'type': 'object'}
14958
14959
14960 @ReturnMapping(RelationUnitsWatchResult)
14961 async def Next(self):
14962 '''
14963
14964 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
14965 '''
14966 # map input types to rpc msg
14967 params = dict()
14968 msg = dict(Type='RelationUnitsWatcher', Request='Next', Version=1, Params=params)
14969
14970 reply = await self.rpc(msg)
14971 return reply
14972
14973
14974
14975 @ReturnMapping(None)
14976 async def Stop(self):
14977 '''
14978
14979 Returns -> None
14980 '''
14981 # map input types to rpc msg
14982 params = dict()
14983 msg = dict(Type='RelationUnitsWatcher', Request='Stop', Version=1, Params=params)
14984
14985 reply = await self.rpc(msg)
14986 return reply
14987
14988
14989 class ResumerFacade(Type):
14990 name = 'Resumer'
14991 version = 2
14992 schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
14993
14994
14995 @ReturnMapping(None)
14996 async def ResumeTransactions(self):
14997 '''
14998
14999 Returns -> None
15000 '''
15001 # map input types to rpc msg
15002 params = dict()
15003 msg = dict(Type='Resumer', Request='ResumeTransactions', Version=2, Params=params)
15004
15005 reply = await self.rpc(msg)
15006 return reply
15007
15008
15009 class RetryStrategyFacade(Type):
15010 name = 'RetryStrategy'
15011 version = 1
15012 schema = {'definitions': {'Entities': {'additionalProperties': False,
15013 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15014 'type': 'array'}},
15015 'required': ['entities'],
15016 'type': 'object'},
15017 'Entity': {'additionalProperties': False,
15018 'properties': {'tag': {'type': 'string'}},
15019 'required': ['tag'],
15020 'type': 'object'},
15021 'Error': {'additionalProperties': False,
15022 'properties': {'code': {'type': 'string'},
15023 'info': {'$ref': '#/definitions/ErrorInfo'},
15024 'message': {'type': 'string'}},
15025 'required': ['message', 'code'],
15026 'type': 'object'},
15027 'ErrorInfo': {'additionalProperties': False,
15028 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15029 'macaroon-path': {'type': 'string'}},
15030 'type': 'object'},
15031 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15032 'NotifyWatchResult': {'additionalProperties': False,
15033 'properties': {'NotifyWatcherId': {'type': 'string'},
15034 'error': {'$ref': '#/definitions/Error'}},
15035 'required': ['NotifyWatcherId'],
15036 'type': 'object'},
15037 'NotifyWatchResults': {'additionalProperties': False,
15038 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15039 'type': 'array'}},
15040 'required': ['results'],
15041 'type': 'object'},
15042 'RetryStrategy': {'additionalProperties': False,
15043 'properties': {'jitter-retry-time': {'type': 'boolean'},
15044 'max-retry-time': {'type': 'integer'},
15045 'min-retry-time': {'type': 'integer'},
15046 'retry-time-factor': {'type': 'integer'},
15047 'should-retry': {'type': 'boolean'}},
15048 'required': ['should-retry',
15049 'min-retry-time',
15050 'max-retry-time',
15051 'jitter-retry-time',
15052 'retry-time-factor'],
15053 'type': 'object'},
15054 'RetryStrategyResult': {'additionalProperties': False,
15055 'properties': {'error': {'$ref': '#/definitions/Error'},
15056 'result': {'$ref': '#/definitions/RetryStrategy'}},
15057 'type': 'object'},
15058 'RetryStrategyResults': {'additionalProperties': False,
15059 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
15060 'type': 'array'}},
15061 'required': ['results'],
15062 'type': 'object'}},
15063 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15064 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
15065 'type': 'object'},
15066 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15067 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
15068 'type': 'object'}},
15069 'type': 'object'}
15070
15071
15072 @ReturnMapping(RetryStrategyResults)
15073 async def RetryStrategy(self, entities):
15074 '''
15075 entities : typing.Sequence[~Entity]
15076 Returns -> typing.Sequence[~RetryStrategyResult]
15077 '''
15078 # map input types to rpc msg
15079 params = dict()
15080 msg = dict(Type='RetryStrategy', Request='RetryStrategy', Version=1, Params=params)
15081 params['entities'] = entities
15082 reply = await self.rpc(msg)
15083 return reply
15084
15085
15086
15087 @ReturnMapping(NotifyWatchResults)
15088 async def WatchRetryStrategy(self, entities):
15089 '''
15090 entities : typing.Sequence[~Entity]
15091 Returns -> typing.Sequence[~NotifyWatchResult]
15092 '''
15093 # map input types to rpc msg
15094 params = dict()
15095 msg = dict(Type='RetryStrategy', Request='WatchRetryStrategy', Version=1, Params=params)
15096 params['entities'] = entities
15097 reply = await self.rpc(msg)
15098 return reply
15099
15100
15101 class SSHClientFacade(Type):
15102 name = 'SSHClient'
15103 version = 1
15104 schema = {'definitions': {'Entities': {'additionalProperties': False,
15105 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15106 'type': 'array'}},
15107 'required': ['entities'],
15108 'type': 'object'},
15109 'Entity': {'additionalProperties': False,
15110 'properties': {'tag': {'type': 'string'}},
15111 'required': ['tag'],
15112 'type': 'object'},
15113 'Error': {'additionalProperties': False,
15114 'properties': {'code': {'type': 'string'},
15115 'info': {'$ref': '#/definitions/ErrorInfo'},
15116 'message': {'type': 'string'}},
15117 'required': ['message', 'code'],
15118 'type': 'object'},
15119 'ErrorInfo': {'additionalProperties': False,
15120 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15121 'macaroon-path': {'type': 'string'}},
15122 'type': 'object'},
15123 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15124 'SSHAddressResult': {'additionalProperties': False,
15125 'properties': {'address': {'type': 'string'},
15126 'error': {'$ref': '#/definitions/Error'}},
15127 'type': 'object'},
15128 'SSHAddressResults': {'additionalProperties': False,
15129 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
15130 'type': 'array'}},
15131 'required': ['results'],
15132 'type': 'object'},
15133 'SSHProxyResult': {'additionalProperties': False,
15134 'properties': {'use-proxy': {'type': 'boolean'}},
15135 'required': ['use-proxy'],
15136 'type': 'object'},
15137 'SSHPublicKeysResult': {'additionalProperties': False,
15138 'properties': {'error': {'$ref': '#/definitions/Error'},
15139 'public-keys': {'items': {'type': 'string'},
15140 'type': 'array'}},
15141 'type': 'object'},
15142 'SSHPublicKeysResults': {'additionalProperties': False,
15143 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
15144 'type': 'array'}},
15145 'required': ['results'],
15146 'type': 'object'}},
15147 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15148 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
15149 'type': 'object'},
15150 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
15151 'type': 'object'},
15152 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15153 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
15154 'type': 'object'},
15155 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15156 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
15157 'type': 'object'}},
15158 'type': 'object'}
15159
15160
15161 @ReturnMapping(SSHAddressResults)
15162 async def PrivateAddress(self, entities):
15163 '''
15164 entities : typing.Sequence[~Entity]
15165 Returns -> typing.Sequence[~SSHAddressResult]
15166 '''
15167 # map input types to rpc msg
15168 params = dict()
15169 msg = dict(Type='SSHClient', Request='PrivateAddress', Version=1, Params=params)
15170 params['entities'] = entities
15171 reply = await self.rpc(msg)
15172 return reply
15173
15174
15175
15176 @ReturnMapping(SSHProxyResult)
15177 async def Proxy(self):
15178 '''
15179
15180 Returns -> bool
15181 '''
15182 # map input types to rpc msg
15183 params = dict()
15184 msg = dict(Type='SSHClient', Request='Proxy', Version=1, Params=params)
15185
15186 reply = await self.rpc(msg)
15187 return reply
15188
15189
15190
15191 @ReturnMapping(SSHAddressResults)
15192 async def PublicAddress(self, entities):
15193 '''
15194 entities : typing.Sequence[~Entity]
15195 Returns -> typing.Sequence[~SSHAddressResult]
15196 '''
15197 # map input types to rpc msg
15198 params = dict()
15199 msg = dict(Type='SSHClient', Request='PublicAddress', Version=1, Params=params)
15200 params['entities'] = entities
15201 reply = await self.rpc(msg)
15202 return reply
15203
15204
15205
15206 @ReturnMapping(SSHPublicKeysResults)
15207 async def PublicKeys(self, entities):
15208 '''
15209 entities : typing.Sequence[~Entity]
15210 Returns -> typing.Sequence[~SSHPublicKeysResult]
15211 '''
15212 # map input types to rpc msg
15213 params = dict()
15214 msg = dict(Type='SSHClient', Request='PublicKeys', Version=1, Params=params)
15215 params['entities'] = entities
15216 reply = await self.rpc(msg)
15217 return reply
15218
15219
15220 class SingularFacade(Type):
15221 name = 'Singular'
15222 version = 1
15223 schema = {'definitions': {'Entities': {'additionalProperties': False,
15224 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15225 'type': 'array'}},
15226 'required': ['entities'],
15227 'type': 'object'},
15228 'Entity': {'additionalProperties': False,
15229 'properties': {'tag': {'type': 'string'}},
15230 'required': ['tag'],
15231 'type': 'object'},
15232 'Error': {'additionalProperties': False,
15233 'properties': {'code': {'type': 'string'},
15234 'info': {'$ref': '#/definitions/ErrorInfo'},
15235 'message': {'type': 'string'}},
15236 'required': ['message', 'code'],
15237 'type': 'object'},
15238 'ErrorInfo': {'additionalProperties': False,
15239 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15240 'macaroon-path': {'type': 'string'}},
15241 'type': 'object'},
15242 'ErrorResult': {'additionalProperties': False,
15243 'properties': {'error': {'$ref': '#/definitions/Error'}},
15244 'type': 'object'},
15245 'ErrorResults': {'additionalProperties': False,
15246 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15247 'type': 'array'}},
15248 'required': ['results'],
15249 'type': 'object'},
15250 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15251 'SingularClaim': {'additionalProperties': False,
15252 'properties': {'controller-tag': {'type': 'string'},
15253 'duration': {'type': 'integer'},
15254 'model-tag': {'type': 'string'}},
15255 'required': ['model-tag',
15256 'controller-tag',
15257 'duration'],
15258 'type': 'object'},
15259 'SingularClaims': {'additionalProperties': False,
15260 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
15261 'type': 'array'}},
15262 'required': ['claims'],
15263 'type': 'object'}},
15264 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
15265 'Result': {'$ref': '#/definitions/ErrorResults'}},
15266 'type': 'object'},
15267 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15268 'Result': {'$ref': '#/definitions/ErrorResults'}},
15269 'type': 'object'}},
15270 'type': 'object'}
15271
15272
15273 @ReturnMapping(ErrorResults)
15274 async def Claim(self, claims):
15275 '''
15276 claims : typing.Sequence[~SingularClaim]
15277 Returns -> typing.Sequence[~ErrorResult]
15278 '''
15279 # map input types to rpc msg
15280 params = dict()
15281 msg = dict(Type='Singular', Request='Claim', Version=1, Params=params)
15282 params['claims'] = claims
15283 reply = await self.rpc(msg)
15284 return reply
15285
15286
15287
15288 @ReturnMapping(ErrorResults)
15289 async def Wait(self, entities):
15290 '''
15291 entities : typing.Sequence[~Entity]
15292 Returns -> typing.Sequence[~ErrorResult]
15293 '''
15294 # map input types to rpc msg
15295 params = dict()
15296 msg = dict(Type='Singular', Request='Wait', Version=1, Params=params)
15297 params['entities'] = entities
15298 reply = await self.rpc(msg)
15299 return reply
15300
15301
15302 class SpacesFacade(Type):
15303 name = 'Spaces'
15304 version = 2
15305 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
15306 'properties': {'provider-id': {'type': 'string'},
15307 'public': {'type': 'boolean'},
15308 'space-tag': {'type': 'string'},
15309 'subnet-tags': {'items': {'type': 'string'},
15310 'type': 'array'}},
15311 'required': ['subnet-tags',
15312 'space-tag',
15313 'public'],
15314 'type': 'object'},
15315 'CreateSpacesParams': {'additionalProperties': False,
15316 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
15317 'type': 'array'}},
15318 'required': ['spaces'],
15319 'type': 'object'},
15320 'Error': {'additionalProperties': False,
15321 'properties': {'code': {'type': 'string'},
15322 'info': {'$ref': '#/definitions/ErrorInfo'},
15323 'message': {'type': 'string'}},
15324 'required': ['message', 'code'],
15325 'type': 'object'},
15326 'ErrorInfo': {'additionalProperties': False,
15327 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15328 'macaroon-path': {'type': 'string'}},
15329 'type': 'object'},
15330 'ErrorResult': {'additionalProperties': False,
15331 'properties': {'error': {'$ref': '#/definitions/Error'}},
15332 'type': 'object'},
15333 'ErrorResults': {'additionalProperties': False,
15334 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15335 'type': 'array'}},
15336 'required': ['results'],
15337 'type': 'object'},
15338 'ListSpacesResults': {'additionalProperties': False,
15339 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
15340 'type': 'array'}},
15341 'required': ['results'],
15342 'type': 'object'},
15343 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15344 'Space': {'additionalProperties': False,
15345 'properties': {'error': {'$ref': '#/definitions/Error'},
15346 'name': {'type': 'string'},
15347 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
15348 'type': 'array'}},
15349 'required': ['name', 'subnets'],
15350 'type': 'object'},
15351 'Subnet': {'additionalProperties': False,
15352 'properties': {'cidr': {'type': 'string'},
15353 'life': {'type': 'string'},
15354 'provider-id': {'type': 'string'},
15355 'space-tag': {'type': 'string'},
15356 'status': {'type': 'string'},
15357 'vlan-tag': {'type': 'integer'},
15358 'zones': {'items': {'type': 'string'},
15359 'type': 'array'}},
15360 'required': ['cidr',
15361 'vlan-tag',
15362 'life',
15363 'space-tag',
15364 'zones'],
15365 'type': 'object'}},
15366 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
15367 'Result': {'$ref': '#/definitions/ErrorResults'}},
15368 'type': 'object'},
15369 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
15370 'type': 'object'}},
15371 'type': 'object'}
15372
15373
15374 @ReturnMapping(ErrorResults)
15375 async def CreateSpaces(self, spaces):
15376 '''
15377 spaces : typing.Sequence[~CreateSpaceParams]
15378 Returns -> typing.Sequence[~ErrorResult]
15379 '''
15380 # map input types to rpc msg
15381 params = dict()
15382 msg = dict(Type='Spaces', Request='CreateSpaces', Version=2, Params=params)
15383 params['spaces'] = spaces
15384 reply = await self.rpc(msg)
15385 return reply
15386
15387
15388
15389 @ReturnMapping(ListSpacesResults)
15390 async def ListSpaces(self):
15391 '''
15392
15393 Returns -> typing.Sequence[~Space]
15394 '''
15395 # map input types to rpc msg
15396 params = dict()
15397 msg = dict(Type='Spaces', Request='ListSpaces', Version=2, Params=params)
15398
15399 reply = await self.rpc(msg)
15400 return reply
15401
15402
15403 class StatusHistoryFacade(Type):
15404 name = 'StatusHistory'
15405 version = 2
15406 schema = {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
15407 'properties': {'max-history-mb': {'type': 'integer'},
15408 'max-history-time': {'type': 'integer'}},
15409 'required': ['max-history-time',
15410 'max-history-mb'],
15411 'type': 'object'}},
15412 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
15413 'type': 'object'}},
15414 'type': 'object'}
15415
15416
15417 @ReturnMapping(None)
15418 async def Prune(self, max_history_mb, max_history_time):
15419 '''
15420 max_history_mb : int
15421 max_history_time : int
15422 Returns -> None
15423 '''
15424 # map input types to rpc msg
15425 params = dict()
15426 msg = dict(Type='StatusHistory', Request='Prune', Version=2, Params=params)
15427 params['max-history-mb'] = max_history_mb
15428 params['max-history-time'] = max_history_time
15429 reply = await self.rpc(msg)
15430 return reply
15431
15432
15433 class StorageFacade(Type):
15434 name = 'Storage'
15435 version = 2
15436 schema = {'definitions': {'Entities': {'additionalProperties': False,
15437 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15438 'type': 'array'}},
15439 'required': ['entities'],
15440 'type': 'object'},
15441 'Entity': {'additionalProperties': False,
15442 'properties': {'tag': {'type': 'string'}},
15443 'required': ['tag'],
15444 'type': 'object'},
15445 'EntityStatus': {'additionalProperties': False,
15446 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15447 'type': 'object'}},
15448 'type': 'object'},
15449 'info': {'type': 'string'},
15450 'since': {'format': 'date-time',
15451 'type': 'string'},
15452 'status': {'type': 'string'}},
15453 'required': ['status', 'info', 'since'],
15454 'type': 'object'},
15455 'Error': {'additionalProperties': False,
15456 'properties': {'code': {'type': 'string'},
15457 'info': {'$ref': '#/definitions/ErrorInfo'},
15458 'message': {'type': 'string'}},
15459 'required': ['message', 'code'],
15460 'type': 'object'},
15461 'ErrorInfo': {'additionalProperties': False,
15462 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15463 'macaroon-path': {'type': 'string'}},
15464 'type': 'object'},
15465 'ErrorResult': {'additionalProperties': False,
15466 'properties': {'error': {'$ref': '#/definitions/Error'}},
15467 'type': 'object'},
15468 'ErrorResults': {'additionalProperties': False,
15469 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15470 'type': 'array'}},
15471 'required': ['results'],
15472 'type': 'object'},
15473 'FilesystemAttachmentInfo': {'additionalProperties': False,
15474 'properties': {'mount-point': {'type': 'string'},
15475 'read-only': {'type': 'boolean'}},
15476 'type': 'object'},
15477 'FilesystemDetails': {'additionalProperties': False,
15478 'properties': {'filesystem-tag': {'type': 'string'},
15479 'info': {'$ref': '#/definitions/FilesystemInfo'},
15480 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
15481 'type': 'object'},
15482 'status': {'$ref': '#/definitions/EntityStatus'},
15483 'storage': {'$ref': '#/definitions/StorageDetails'},
15484 'volume-tag': {'type': 'string'}},
15485 'required': ['filesystem-tag',
15486 'info',
15487 'status'],
15488 'type': 'object'},
15489 'FilesystemDetailsListResult': {'additionalProperties': False,
15490 'properties': {'error': {'$ref': '#/definitions/Error'},
15491 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
15492 'type': 'array'}},
15493 'type': 'object'},
15494 'FilesystemDetailsListResults': {'additionalProperties': False,
15495 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
15496 'type': 'array'}},
15497 'type': 'object'},
15498 'FilesystemFilter': {'additionalProperties': False,
15499 'properties': {'machines': {'items': {'type': 'string'},
15500 'type': 'array'}},
15501 'type': 'object'},
15502 'FilesystemFilters': {'additionalProperties': False,
15503 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
15504 'type': 'array'}},
15505 'type': 'object'},
15506 'FilesystemInfo': {'additionalProperties': False,
15507 'properties': {'filesystem-id': {'type': 'string'},
15508 'size': {'type': 'integer'}},
15509 'required': ['filesystem-id', 'size'],
15510 'type': 'object'},
15511 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15512 'StorageAddParams': {'additionalProperties': False,
15513 'properties': {'name': {'type': 'string'},
15514 'storage': {'$ref': '#/definitions/StorageConstraints'},
15515 'unit': {'type': 'string'}},
15516 'required': ['unit', 'name', 'storage'],
15517 'type': 'object'},
15518 'StorageAttachmentDetails': {'additionalProperties': False,
15519 'properties': {'location': {'type': 'string'},
15520 'machine-tag': {'type': 'string'},
15521 'storage-tag': {'type': 'string'},
15522 'unit-tag': {'type': 'string'}},
15523 'required': ['storage-tag',
15524 'unit-tag',
15525 'machine-tag'],
15526 'type': 'object'},
15527 'StorageConstraints': {'additionalProperties': False,
15528 'properties': {'count': {'type': 'integer'},
15529 'pool': {'type': 'string'},
15530 'size': {'type': 'integer'}},
15531 'type': 'object'},
15532 'StorageDetails': {'additionalProperties': False,
15533 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
15534 'type': 'object'},
15535 'kind': {'type': 'integer'},
15536 'owner-tag': {'type': 'string'},
15537 'persistent': {'type': 'boolean'},
15538 'status': {'$ref': '#/definitions/EntityStatus'},
15539 'storage-tag': {'type': 'string'}},
15540 'required': ['storage-tag',
15541 'owner-tag',
15542 'kind',
15543 'status',
15544 'persistent'],
15545 'type': 'object'},
15546 'StorageDetailsListResult': {'additionalProperties': False,
15547 'properties': {'error': {'$ref': '#/definitions/Error'},
15548 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
15549 'type': 'array'}},
15550 'type': 'object'},
15551 'StorageDetailsListResults': {'additionalProperties': False,
15552 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
15553 'type': 'array'}},
15554 'type': 'object'},
15555 'StorageDetailsResult': {'additionalProperties': False,
15556 'properties': {'error': {'$ref': '#/definitions/Error'},
15557 'result': {'$ref': '#/definitions/StorageDetails'}},
15558 'type': 'object'},
15559 'StorageDetailsResults': {'additionalProperties': False,
15560 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
15561 'type': 'array'}},
15562 'type': 'object'},
15563 'StorageFilter': {'additionalProperties': False,
15564 'type': 'object'},
15565 'StorageFilters': {'additionalProperties': False,
15566 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
15567 'type': 'array'}},
15568 'type': 'object'},
15569 'StoragePool': {'additionalProperties': False,
15570 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
15571 'type': 'object'}},
15572 'type': 'object'},
15573 'name': {'type': 'string'},
15574 'provider': {'type': 'string'}},
15575 'required': ['name', 'provider', 'attrs'],
15576 'type': 'object'},
15577 'StoragePoolFilter': {'additionalProperties': False,
15578 'properties': {'names': {'items': {'type': 'string'},
15579 'type': 'array'},
15580 'providers': {'items': {'type': 'string'},
15581 'type': 'array'}},
15582 'type': 'object'},
15583 'StoragePoolFilters': {'additionalProperties': False,
15584 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
15585 'type': 'array'}},
15586 'type': 'object'},
15587 'StoragePoolsResult': {'additionalProperties': False,
15588 'properties': {'error': {'$ref': '#/definitions/Error'},
15589 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
15590 'type': 'array'}},
15591 'type': 'object'},
15592 'StoragePoolsResults': {'additionalProperties': False,
15593 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
15594 'type': 'array'}},
15595 'type': 'object'},
15596 'StoragesAddParams': {'additionalProperties': False,
15597 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
15598 'type': 'array'}},
15599 'required': ['storages'],
15600 'type': 'object'},
15601 'VolumeAttachmentInfo': {'additionalProperties': False,
15602 'properties': {'bus-address': {'type': 'string'},
15603 'device-link': {'type': 'string'},
15604 'device-name': {'type': 'string'},
15605 'read-only': {'type': 'boolean'}},
15606 'type': 'object'},
15607 'VolumeDetails': {'additionalProperties': False,
15608 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
15609 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
15610 'type': 'object'},
15611 'status': {'$ref': '#/definitions/EntityStatus'},
15612 'storage': {'$ref': '#/definitions/StorageDetails'},
15613 'volume-tag': {'type': 'string'}},
15614 'required': ['volume-tag', 'info', 'status'],
15615 'type': 'object'},
15616 'VolumeDetailsListResult': {'additionalProperties': False,
15617 'properties': {'error': {'$ref': '#/definitions/Error'},
15618 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
15619 'type': 'array'}},
15620 'type': 'object'},
15621 'VolumeDetailsListResults': {'additionalProperties': False,
15622 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
15623 'type': 'array'}},
15624 'type': 'object'},
15625 'VolumeFilter': {'additionalProperties': False,
15626 'properties': {'machines': {'items': {'type': 'string'},
15627 'type': 'array'}},
15628 'type': 'object'},
15629 'VolumeFilters': {'additionalProperties': False,
15630 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
15631 'type': 'array'}},
15632 'type': 'object'},
15633 'VolumeInfo': {'additionalProperties': False,
15634 'properties': {'hardware-id': {'type': 'string'},
15635 'persistent': {'type': 'boolean'},
15636 'size': {'type': 'integer'},
15637 'volume-id': {'type': 'string'}},
15638 'required': ['volume-id', 'size', 'persistent'],
15639 'type': 'object'}},
15640 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
15641 'Result': {'$ref': '#/definitions/ErrorResults'}},
15642 'type': 'object'},
15643 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
15644 'type': 'object'},
15645 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
15646 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
15647 'type': 'object'},
15648 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
15649 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
15650 'type': 'object'},
15651 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
15652 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
15653 'type': 'object'},
15654 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
15655 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
15656 'type': 'object'},
15657 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15658 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
15659 'type': 'object'}},
15660 'type': 'object'}
15661
15662
15663 @ReturnMapping(ErrorResults)
15664 async def AddToUnit(self, storages):
15665 '''
15666 storages : typing.Sequence[~StorageAddParams]
15667 Returns -> typing.Sequence[~ErrorResult]
15668 '''
15669 # map input types to rpc msg
15670 params = dict()
15671 msg = dict(Type='Storage', Request='AddToUnit', Version=2, Params=params)
15672 params['storages'] = storages
15673 reply = await self.rpc(msg)
15674 return reply
15675
15676
15677
15678 @ReturnMapping(None)
15679 async def CreatePool(self, attrs, name, provider):
15680 '''
15681 attrs : typing.Mapping[str, typing.Any]
15682 name : str
15683 provider : str
15684 Returns -> None
15685 '''
15686 # map input types to rpc msg
15687 params = dict()
15688 msg = dict(Type='Storage', Request='CreatePool', Version=2, Params=params)
15689 params['attrs'] = attrs
15690 params['name'] = name
15691 params['provider'] = provider
15692 reply = await self.rpc(msg)
15693 return reply
15694
15695
15696
15697 @ReturnMapping(FilesystemDetailsListResults)
15698 async def ListFilesystems(self, filters):
15699 '''
15700 filters : typing.Sequence[~FilesystemFilter]
15701 Returns -> typing.Sequence[~FilesystemDetailsListResult]
15702 '''
15703 # map input types to rpc msg
15704 params = dict()
15705 msg = dict(Type='Storage', Request='ListFilesystems', Version=2, Params=params)
15706 params['filters'] = filters
15707 reply = await self.rpc(msg)
15708 return reply
15709
15710
15711
15712 @ReturnMapping(StoragePoolsResults)
15713 async def ListPools(self, filters):
15714 '''
15715 filters : typing.Sequence[~StoragePoolFilter]
15716 Returns -> typing.Sequence[~StoragePoolsResult]
15717 '''
15718 # map input types to rpc msg
15719 params = dict()
15720 msg = dict(Type='Storage', Request='ListPools', Version=2, Params=params)
15721 params['filters'] = filters
15722 reply = await self.rpc(msg)
15723 return reply
15724
15725
15726
15727 @ReturnMapping(StorageDetailsListResults)
15728 async def ListStorageDetails(self, filters):
15729 '''
15730 filters : typing.Sequence[~StorageFilter]
15731 Returns -> typing.Sequence[~StorageDetailsListResult]
15732 '''
15733 # map input types to rpc msg
15734 params = dict()
15735 msg = dict(Type='Storage', Request='ListStorageDetails', Version=2, Params=params)
15736 params['filters'] = filters
15737 reply = await self.rpc(msg)
15738 return reply
15739
15740
15741
15742 @ReturnMapping(VolumeDetailsListResults)
15743 async def ListVolumes(self, filters):
15744 '''
15745 filters : typing.Sequence[~VolumeFilter]
15746 Returns -> typing.Sequence[~VolumeDetailsListResult]
15747 '''
15748 # map input types to rpc msg
15749 params = dict()
15750 msg = dict(Type='Storage', Request='ListVolumes', Version=2, Params=params)
15751 params['filters'] = filters
15752 reply = await self.rpc(msg)
15753 return reply
15754
15755
15756
15757 @ReturnMapping(StorageDetailsResults)
15758 async def StorageDetails(self, entities):
15759 '''
15760 entities : typing.Sequence[~Entity]
15761 Returns -> typing.Sequence[~StorageDetailsResult]
15762 '''
15763 # map input types to rpc msg
15764 params = dict()
15765 msg = dict(Type='Storage', Request='StorageDetails', Version=2, Params=params)
15766 params['entities'] = entities
15767 reply = await self.rpc(msg)
15768 return reply
15769
15770
15771 class StorageProvisionerFacade(Type):
15772 name = 'StorageProvisioner'
15773 version = 2
15774 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
15775 'properties': {'BusAddress': {'type': 'string'},
15776 'DeviceLinks': {'items': {'type': 'string'},
15777 'type': 'array'},
15778 'DeviceName': {'type': 'string'},
15779 'FilesystemType': {'type': 'string'},
15780 'HardwareId': {'type': 'string'},
15781 'InUse': {'type': 'boolean'},
15782 'Label': {'type': 'string'},
15783 'MountPoint': {'type': 'string'},
15784 'Size': {'type': 'integer'},
15785 'UUID': {'type': 'string'}},
15786 'required': ['DeviceName',
15787 'DeviceLinks',
15788 'Label',
15789 'UUID',
15790 'HardwareId',
15791 'BusAddress',
15792 'Size',
15793 'FilesystemType',
15794 'InUse',
15795 'MountPoint'],
15796 'type': 'object'},
15797 'BlockDeviceResult': {'additionalProperties': False,
15798 'properties': {'error': {'$ref': '#/definitions/Error'},
15799 'result': {'$ref': '#/definitions/BlockDevice'}},
15800 'required': ['result'],
15801 'type': 'object'},
15802 'BlockDeviceResults': {'additionalProperties': False,
15803 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
15804 'type': 'array'}},
15805 'type': 'object'},
15806 'Entities': {'additionalProperties': False,
15807 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15808 'type': 'array'}},
15809 'required': ['entities'],
15810 'type': 'object'},
15811 'Entity': {'additionalProperties': False,
15812 'properties': {'tag': {'type': 'string'}},
15813 'required': ['tag'],
15814 'type': 'object'},
15815 'EntityStatusArgs': {'additionalProperties': False,
15816 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15817 'type': 'object'}},
15818 'type': 'object'},
15819 'info': {'type': 'string'},
15820 'status': {'type': 'string'},
15821 'tag': {'type': 'string'}},
15822 'required': ['tag',
15823 'status',
15824 'info',
15825 'data'],
15826 'type': 'object'},
15827 'Error': {'additionalProperties': False,
15828 'properties': {'code': {'type': 'string'},
15829 'info': {'$ref': '#/definitions/ErrorInfo'},
15830 'message': {'type': 'string'}},
15831 'required': ['message', 'code'],
15832 'type': 'object'},
15833 'ErrorInfo': {'additionalProperties': False,
15834 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15835 'macaroon-path': {'type': 'string'}},
15836 'type': 'object'},
15837 'ErrorResult': {'additionalProperties': False,
15838 'properties': {'error': {'$ref': '#/definitions/Error'}},
15839 'type': 'object'},
15840 'ErrorResults': {'additionalProperties': False,
15841 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15842 'type': 'array'}},
15843 'required': ['results'],
15844 'type': 'object'},
15845 'Filesystem': {'additionalProperties': False,
15846 'properties': {'filesystem-tag': {'type': 'string'},
15847 'info': {'$ref': '#/definitions/FilesystemInfo'},
15848 'volume-tag': {'type': 'string'}},
15849 'required': ['filesystem-tag', 'info'],
15850 'type': 'object'},
15851 'FilesystemAttachment': {'additionalProperties': False,
15852 'properties': {'filesystem-tag': {'type': 'string'},
15853 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
15854 'machine-tag': {'type': 'string'}},
15855 'required': ['filesystem-tag',
15856 'machine-tag',
15857 'info'],
15858 'type': 'object'},
15859 'FilesystemAttachmentInfo': {'additionalProperties': False,
15860 'properties': {'mount-point': {'type': 'string'},
15861 'read-only': {'type': 'boolean'}},
15862 'type': 'object'},
15863 'FilesystemAttachmentParams': {'additionalProperties': False,
15864 'properties': {'filesystem-id': {'type': 'string'},
15865 'filesystem-tag': {'type': 'string'},
15866 'instance-id': {'type': 'string'},
15867 'machine-tag': {'type': 'string'},
15868 'mount-point': {'type': 'string'},
15869 'provider': {'type': 'string'},
15870 'read-only': {'type': 'boolean'}},
15871 'required': ['filesystem-tag',
15872 'machine-tag',
15873 'provider'],
15874 'type': 'object'},
15875 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
15876 'properties': {'error': {'$ref': '#/definitions/Error'},
15877 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
15878 'required': ['result'],
15879 'type': 'object'},
15880 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
15881 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
15882 'type': 'array'}},
15883 'type': 'object'},
15884 'FilesystemAttachmentResult': {'additionalProperties': False,
15885 'properties': {'error': {'$ref': '#/definitions/Error'},
15886 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
15887 'required': ['result'],
15888 'type': 'object'},
15889 'FilesystemAttachmentResults': {'additionalProperties': False,
15890 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
15891 'type': 'array'}},
15892 'type': 'object'},
15893 'FilesystemAttachments': {'additionalProperties': False,
15894 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
15895 'type': 'array'}},
15896 'required': ['filesystem-attachments'],
15897 'type': 'object'},
15898 'FilesystemInfo': {'additionalProperties': False,
15899 'properties': {'filesystem-id': {'type': 'string'},
15900 'size': {'type': 'integer'}},
15901 'required': ['filesystem-id', 'size'],
15902 'type': 'object'},
15903 'FilesystemParams': {'additionalProperties': False,
15904 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
15905 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
15906 'type': 'object'}},
15907 'type': 'object'},
15908 'filesystem-tag': {'type': 'string'},
15909 'provider': {'type': 'string'},
15910 'size': {'type': 'integer'},
15911 'tags': {'patternProperties': {'.*': {'type': 'string'}},
15912 'type': 'object'},
15913 'volume-tag': {'type': 'string'}},
15914 'required': ['filesystem-tag',
15915 'size',
15916 'provider'],
15917 'type': 'object'},
15918 'FilesystemParamsResult': {'additionalProperties': False,
15919 'properties': {'error': {'$ref': '#/definitions/Error'},
15920 'result': {'$ref': '#/definitions/FilesystemParams'}},
15921 'required': ['result'],
15922 'type': 'object'},
15923 'FilesystemParamsResults': {'additionalProperties': False,
15924 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
15925 'type': 'array'}},
15926 'type': 'object'},
15927 'FilesystemResult': {'additionalProperties': False,
15928 'properties': {'error': {'$ref': '#/definitions/Error'},
15929 'result': {'$ref': '#/definitions/Filesystem'}},
15930 'required': ['result'],
15931 'type': 'object'},
15932 'FilesystemResults': {'additionalProperties': False,
15933 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
15934 'type': 'array'}},
15935 'type': 'object'},
15936 'Filesystems': {'additionalProperties': False,
15937 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
15938 'type': 'array'}},
15939 'required': ['filesystems'],
15940 'type': 'object'},
15941 'LifeResult': {'additionalProperties': False,
15942 'properties': {'error': {'$ref': '#/definitions/Error'},
15943 'life': {'type': 'string'}},
15944 'required': ['life'],
15945 'type': 'object'},
15946 'LifeResults': {'additionalProperties': False,
15947 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
15948 'type': 'array'}},
15949 'required': ['results'],
15950 'type': 'object'},
15951 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15952 'MachineStorageId': {'additionalProperties': False,
15953 'properties': {'attachment-tag': {'type': 'string'},
15954 'machine-tag': {'type': 'string'}},
15955 'required': ['machine-tag',
15956 'attachment-tag'],
15957 'type': 'object'},
15958 'MachineStorageIds': {'additionalProperties': False,
15959 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
15960 'type': 'array'}},
15961 'required': ['ids'],
15962 'type': 'object'},
15963 'MachineStorageIdsWatchResult': {'additionalProperties': False,
15964 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
15965 'type': 'array'},
15966 'error': {'$ref': '#/definitions/Error'},
15967 'watcher-id': {'type': 'string'}},
15968 'required': ['watcher-id',
15969 'changes'],
15970 'type': 'object'},
15971 'MachineStorageIdsWatchResults': {'additionalProperties': False,
15972 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
15973 'type': 'array'}},
15974 'required': ['results'],
15975 'type': 'object'},
15976 'ModelConfigResult': {'additionalProperties': False,
15977 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
15978 'type': 'object'}},
15979 'type': 'object'}},
15980 'required': ['config'],
15981 'type': 'object'},
15982 'NotifyWatchResult': {'additionalProperties': False,
15983 'properties': {'NotifyWatcherId': {'type': 'string'},
15984 'error': {'$ref': '#/definitions/Error'}},
15985 'required': ['NotifyWatcherId'],
15986 'type': 'object'},
15987 'NotifyWatchResults': {'additionalProperties': False,
15988 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15989 'type': 'array'}},
15990 'required': ['results'],
15991 'type': 'object'},
15992 'SetStatus': {'additionalProperties': False,
15993 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15994 'type': 'array'}},
15995 'required': ['entities'],
15996 'type': 'object'},
15997 'StringResult': {'additionalProperties': False,
15998 'properties': {'error': {'$ref': '#/definitions/Error'},
15999 'result': {'type': 'string'}},
16000 'required': ['result'],
16001 'type': 'object'},
16002 'StringResults': {'additionalProperties': False,
16003 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
16004 'type': 'array'}},
16005 'required': ['results'],
16006 'type': 'object'},
16007 'StringsWatchResult': {'additionalProperties': False,
16008 'properties': {'changes': {'items': {'type': 'string'},
16009 'type': 'array'},
16010 'error': {'$ref': '#/definitions/Error'},
16011 'watcher-id': {'type': 'string'}},
16012 'required': ['watcher-id'],
16013 'type': 'object'},
16014 'StringsWatchResults': {'additionalProperties': False,
16015 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
16016 'type': 'array'}},
16017 'required': ['results'],
16018 'type': 'object'},
16019 'Volume': {'additionalProperties': False,
16020 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16021 'volume-tag': {'type': 'string'}},
16022 'required': ['volume-tag', 'info'],
16023 'type': 'object'},
16024 'VolumeAttachment': {'additionalProperties': False,
16025 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
16026 'machine-tag': {'type': 'string'},
16027 'volume-tag': {'type': 'string'}},
16028 'required': ['volume-tag',
16029 'machine-tag',
16030 'info'],
16031 'type': 'object'},
16032 'VolumeAttachmentInfo': {'additionalProperties': False,
16033 'properties': {'bus-address': {'type': 'string'},
16034 'device-link': {'type': 'string'},
16035 'device-name': {'type': 'string'},
16036 'read-only': {'type': 'boolean'}},
16037 'type': 'object'},
16038 'VolumeAttachmentParams': {'additionalProperties': False,
16039 'properties': {'instance-id': {'type': 'string'},
16040 'machine-tag': {'type': 'string'},
16041 'provider': {'type': 'string'},
16042 'read-only': {'type': 'boolean'},
16043 'volume-id': {'type': 'string'},
16044 'volume-tag': {'type': 'string'}},
16045 'required': ['volume-tag',
16046 'machine-tag',
16047 'provider'],
16048 'type': 'object'},
16049 'VolumeAttachmentParamsResult': {'additionalProperties': False,
16050 'properties': {'error': {'$ref': '#/definitions/Error'},
16051 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
16052 'required': ['result'],
16053 'type': 'object'},
16054 'VolumeAttachmentParamsResults': {'additionalProperties': False,
16055 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
16056 'type': 'array'}},
16057 'type': 'object'},
16058 'VolumeAttachmentResult': {'additionalProperties': False,
16059 'properties': {'error': {'$ref': '#/definitions/Error'},
16060 'result': {'$ref': '#/definitions/VolumeAttachment'}},
16061 'required': ['result'],
16062 'type': 'object'},
16063 'VolumeAttachmentResults': {'additionalProperties': False,
16064 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
16065 'type': 'array'}},
16066 'type': 'object'},
16067 'VolumeAttachments': {'additionalProperties': False,
16068 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
16069 'type': 'array'}},
16070 'required': ['volume-attachments'],
16071 'type': 'object'},
16072 'VolumeInfo': {'additionalProperties': False,
16073 'properties': {'hardware-id': {'type': 'string'},
16074 'persistent': {'type': 'boolean'},
16075 'size': {'type': 'integer'},
16076 'volume-id': {'type': 'string'}},
16077 'required': ['volume-id', 'size', 'persistent'],
16078 'type': 'object'},
16079 'VolumeParams': {'additionalProperties': False,
16080 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
16081 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
16082 'type': 'object'}},
16083 'type': 'object'},
16084 'provider': {'type': 'string'},
16085 'size': {'type': 'integer'},
16086 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16087 'type': 'object'},
16088 'volume-tag': {'type': 'string'}},
16089 'required': ['volume-tag',
16090 'size',
16091 'provider'],
16092 'type': 'object'},
16093 'VolumeParamsResult': {'additionalProperties': False,
16094 'properties': {'error': {'$ref': '#/definitions/Error'},
16095 'result': {'$ref': '#/definitions/VolumeParams'}},
16096 'required': ['result'],
16097 'type': 'object'},
16098 'VolumeParamsResults': {'additionalProperties': False,
16099 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
16100 'type': 'array'}},
16101 'type': 'object'},
16102 'VolumeResult': {'additionalProperties': False,
16103 'properties': {'error': {'$ref': '#/definitions/Error'},
16104 'result': {'$ref': '#/definitions/Volume'}},
16105 'required': ['result'],
16106 'type': 'object'},
16107 'VolumeResults': {'additionalProperties': False,
16108 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
16109 'type': 'array'}},
16110 'type': 'object'},
16111 'Volumes': {'additionalProperties': False,
16112 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
16113 'type': 'array'}},
16114 'required': ['volumes'],
16115 'type': 'object'}},
16116 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16117 'Result': {'$ref': '#/definitions/LifeResults'}},
16118 'type': 'object'},
16119 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16120 'Result': {'$ref': '#/definitions/ErrorResults'}},
16121 'type': 'object'},
16122 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16123 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
16124 'type': 'object'},
16125 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16126 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
16127 'type': 'object'},
16128 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16129 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
16130 'type': 'object'},
16131 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16132 'Result': {'$ref': '#/definitions/FilesystemResults'}},
16133 'type': 'object'},
16134 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16135 'Result': {'$ref': '#/definitions/StringResults'}},
16136 'type': 'object'},
16137 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16138 'Result': {'$ref': '#/definitions/LifeResults'}},
16139 'type': 'object'},
16140 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
16141 'type': 'object'},
16142 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16143 'Result': {'$ref': '#/definitions/ErrorResults'}},
16144 'type': 'object'},
16145 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16146 'Result': {'$ref': '#/definitions/ErrorResults'}},
16147 'type': 'object'},
16148 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
16149 'Result': {'$ref': '#/definitions/ErrorResults'}},
16150 'type': 'object'},
16151 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
16152 'Result': {'$ref': '#/definitions/ErrorResults'}},
16153 'type': 'object'},
16154 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16155 'Result': {'$ref': '#/definitions/ErrorResults'}},
16156 'type': 'object'},
16157 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
16158 'Result': {'$ref': '#/definitions/ErrorResults'}},
16159 'type': 'object'},
16160 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
16161 'Result': {'$ref': '#/definitions/ErrorResults'}},
16162 'type': 'object'},
16163 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16164 'Result': {'$ref': '#/definitions/ErrorResults'}},
16165 'type': 'object'},
16166 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16167 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
16168 'type': 'object'},
16169 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16170 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
16171 'type': 'object'},
16172 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16173 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
16174 'type': 'object'},
16175 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16176 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
16177 'type': 'object'},
16178 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16179 'Result': {'$ref': '#/definitions/VolumeResults'}},
16180 'type': 'object'},
16181 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16182 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16183 'type': 'object'},
16184 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16185 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16186 'type': 'object'},
16187 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16188 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16189 'type': 'object'},
16190 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16191 'type': 'object'},
16192 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16193 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16194 'type': 'object'},
16195 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16196 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16197 'type': 'object'},
16198 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16199 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16200 'type': 'object'}},
16201 'type': 'object'}
16202
16203
16204 @ReturnMapping(LifeResults)
16205 async def AttachmentLife(self, ids):
16206 '''
16207 ids : typing.Sequence[~MachineStorageId]
16208 Returns -> typing.Sequence[~LifeResult]
16209 '''
16210 # map input types to rpc msg
16211 params = dict()
16212 msg = dict(Type='StorageProvisioner', Request='AttachmentLife', Version=2, Params=params)
16213 params['ids'] = ids
16214 reply = await self.rpc(msg)
16215 return reply
16216
16217
16218
16219 @ReturnMapping(ErrorResults)
16220 async def EnsureDead(self, entities):
16221 '''
16222 entities : typing.Sequence[~Entity]
16223 Returns -> typing.Sequence[~ErrorResult]
16224 '''
16225 # map input types to rpc msg
16226 params = dict()
16227 msg = dict(Type='StorageProvisioner', Request='EnsureDead', Version=2, Params=params)
16228 params['entities'] = entities
16229 reply = await self.rpc(msg)
16230 return reply
16231
16232
16233
16234 @ReturnMapping(FilesystemAttachmentParamsResults)
16235 async def FilesystemAttachmentParams(self, ids):
16236 '''
16237 ids : typing.Sequence[~MachineStorageId]
16238 Returns -> typing.Sequence[~FilesystemAttachmentParamsResult]
16239 '''
16240 # map input types to rpc msg
16241 params = dict()
16242 msg = dict(Type='StorageProvisioner', Request='FilesystemAttachmentParams', Version=2, Params=params)
16243 params['ids'] = ids
16244 reply = await self.rpc(msg)
16245 return reply
16246
16247
16248
16249 @ReturnMapping(FilesystemAttachmentResults)
16250 async def FilesystemAttachments(self, ids):
16251 '''
16252 ids : typing.Sequence[~MachineStorageId]
16253 Returns -> typing.Sequence[~FilesystemAttachmentResult]
16254 '''
16255 # map input types to rpc msg
16256 params = dict()
16257 msg = dict(Type='StorageProvisioner', Request='FilesystemAttachments', Version=2, Params=params)
16258 params['ids'] = ids
16259 reply = await self.rpc(msg)
16260 return reply
16261
16262
16263
16264 @ReturnMapping(FilesystemParamsResults)
16265 async def FilesystemParams(self, entities):
16266 '''
16267 entities : typing.Sequence[~Entity]
16268 Returns -> typing.Sequence[~FilesystemParamsResult]
16269 '''
16270 # map input types to rpc msg
16271 params = dict()
16272 msg = dict(Type='StorageProvisioner', Request='FilesystemParams', Version=2, Params=params)
16273 params['entities'] = entities
16274 reply = await self.rpc(msg)
16275 return reply
16276
16277
16278
16279 @ReturnMapping(FilesystemResults)
16280 async def Filesystems(self, entities):
16281 '''
16282 entities : typing.Sequence[~Entity]
16283 Returns -> typing.Sequence[~FilesystemResult]
16284 '''
16285 # map input types to rpc msg
16286 params = dict()
16287 msg = dict(Type='StorageProvisioner', Request='Filesystems', Version=2, Params=params)
16288 params['entities'] = entities
16289 reply = await self.rpc(msg)
16290 return reply
16291
16292
16293
16294 @ReturnMapping(StringResults)
16295 async def InstanceId(self, entities):
16296 '''
16297 entities : typing.Sequence[~Entity]
16298 Returns -> typing.Sequence[~StringResult]
16299 '''
16300 # map input types to rpc msg
16301 params = dict()
16302 msg = dict(Type='StorageProvisioner', Request='InstanceId', Version=2, Params=params)
16303 params['entities'] = entities
16304 reply = await self.rpc(msg)
16305 return reply
16306
16307
16308
16309 @ReturnMapping(LifeResults)
16310 async def Life(self, entities):
16311 '''
16312 entities : typing.Sequence[~Entity]
16313 Returns -> typing.Sequence[~LifeResult]
16314 '''
16315 # map input types to rpc msg
16316 params = dict()
16317 msg = dict(Type='StorageProvisioner', Request='Life', Version=2, Params=params)
16318 params['entities'] = entities
16319 reply = await self.rpc(msg)
16320 return reply
16321
16322
16323
16324 @ReturnMapping(ModelConfigResult)
16325 async def ModelConfig(self):
16326 '''
16327
16328 Returns -> typing.Mapping[str, typing.Any]
16329 '''
16330 # map input types to rpc msg
16331 params = dict()
16332 msg = dict(Type='StorageProvisioner', Request='ModelConfig', Version=2, Params=params)
16333
16334 reply = await self.rpc(msg)
16335 return reply
16336
16337
16338
16339 @ReturnMapping(ErrorResults)
16340 async def Remove(self, entities):
16341 '''
16342 entities : typing.Sequence[~Entity]
16343 Returns -> typing.Sequence[~ErrorResult]
16344 '''
16345 # map input types to rpc msg
16346 params = dict()
16347 msg = dict(Type='StorageProvisioner', Request='Remove', Version=2, Params=params)
16348 params['entities'] = entities
16349 reply = await self.rpc(msg)
16350 return reply
16351
16352
16353
16354 @ReturnMapping(ErrorResults)
16355 async def RemoveAttachment(self, ids):
16356 '''
16357 ids : typing.Sequence[~MachineStorageId]
16358 Returns -> typing.Sequence[~ErrorResult]
16359 '''
16360 # map input types to rpc msg
16361 params = dict()
16362 msg = dict(Type='StorageProvisioner', Request='RemoveAttachment', Version=2, Params=params)
16363 params['ids'] = ids
16364 reply = await self.rpc(msg)
16365 return reply
16366
16367
16368
16369 @ReturnMapping(ErrorResults)
16370 async def SetFilesystemAttachmentInfo(self, filesystem_attachments):
16371 '''
16372 filesystem_attachments : typing.Sequence[~FilesystemAttachment]
16373 Returns -> typing.Sequence[~ErrorResult]
16374 '''
16375 # map input types to rpc msg
16376 params = dict()
16377 msg = dict(Type='StorageProvisioner', Request='SetFilesystemAttachmentInfo', Version=2, Params=params)
16378 params['filesystem-attachments'] = filesystem_attachments
16379 reply = await self.rpc(msg)
16380 return reply
16381
16382
16383
16384 @ReturnMapping(ErrorResults)
16385 async def SetFilesystemInfo(self, filesystems):
16386 '''
16387 filesystems : typing.Sequence[~Filesystem]
16388 Returns -> typing.Sequence[~ErrorResult]
16389 '''
16390 # map input types to rpc msg
16391 params = dict()
16392 msg = dict(Type='StorageProvisioner', Request='SetFilesystemInfo', Version=2, Params=params)
16393 params['filesystems'] = filesystems
16394 reply = await self.rpc(msg)
16395 return reply
16396
16397
16398
16399 @ReturnMapping(ErrorResults)
16400 async def SetStatus(self, entities):
16401 '''
16402 entities : typing.Sequence[~EntityStatusArgs]
16403 Returns -> typing.Sequence[~ErrorResult]
16404 '''
16405 # map input types to rpc msg
16406 params = dict()
16407 msg = dict(Type='StorageProvisioner', Request='SetStatus', Version=2, Params=params)
16408 params['entities'] = entities
16409 reply = await self.rpc(msg)
16410 return reply
16411
16412
16413
16414 @ReturnMapping(ErrorResults)
16415 async def SetVolumeAttachmentInfo(self, volume_attachments):
16416 '''
16417 volume_attachments : typing.Sequence[~VolumeAttachment]
16418 Returns -> typing.Sequence[~ErrorResult]
16419 '''
16420 # map input types to rpc msg
16421 params = dict()
16422 msg = dict(Type='StorageProvisioner', Request='SetVolumeAttachmentInfo', Version=2, Params=params)
16423 params['volume-attachments'] = volume_attachments
16424 reply = await self.rpc(msg)
16425 return reply
16426
16427
16428
16429 @ReturnMapping(ErrorResults)
16430 async def SetVolumeInfo(self, volumes):
16431 '''
16432 volumes : typing.Sequence[~Volume]
16433 Returns -> typing.Sequence[~ErrorResult]
16434 '''
16435 # map input types to rpc msg
16436 params = dict()
16437 msg = dict(Type='StorageProvisioner', Request='SetVolumeInfo', Version=2, Params=params)
16438 params['volumes'] = volumes
16439 reply = await self.rpc(msg)
16440 return reply
16441
16442
16443
16444 @ReturnMapping(ErrorResults)
16445 async def UpdateStatus(self, entities):
16446 '''
16447 entities : typing.Sequence[~EntityStatusArgs]
16448 Returns -> typing.Sequence[~ErrorResult]
16449 '''
16450 # map input types to rpc msg
16451 params = dict()
16452 msg = dict(Type='StorageProvisioner', Request='UpdateStatus', Version=2, Params=params)
16453 params['entities'] = entities
16454 reply = await self.rpc(msg)
16455 return reply
16456
16457
16458
16459 @ReturnMapping(VolumeAttachmentParamsResults)
16460 async def VolumeAttachmentParams(self, ids):
16461 '''
16462 ids : typing.Sequence[~MachineStorageId]
16463 Returns -> typing.Sequence[~VolumeAttachmentParamsResult]
16464 '''
16465 # map input types to rpc msg
16466 params = dict()
16467 msg = dict(Type='StorageProvisioner', Request='VolumeAttachmentParams', Version=2, Params=params)
16468 params['ids'] = ids
16469 reply = await self.rpc(msg)
16470 return reply
16471
16472
16473
16474 @ReturnMapping(VolumeAttachmentResults)
16475 async def VolumeAttachments(self, ids):
16476 '''
16477 ids : typing.Sequence[~MachineStorageId]
16478 Returns -> typing.Sequence[~VolumeAttachmentResult]
16479 '''
16480 # map input types to rpc msg
16481 params = dict()
16482 msg = dict(Type='StorageProvisioner', Request='VolumeAttachments', Version=2, Params=params)
16483 params['ids'] = ids
16484 reply = await self.rpc(msg)
16485 return reply
16486
16487
16488
16489 @ReturnMapping(BlockDeviceResults)
16490 async def VolumeBlockDevices(self, ids):
16491 '''
16492 ids : typing.Sequence[~MachineStorageId]
16493 Returns -> typing.Sequence[~BlockDeviceResult]
16494 '''
16495 # map input types to rpc msg
16496 params = dict()
16497 msg = dict(Type='StorageProvisioner', Request='VolumeBlockDevices', Version=2, Params=params)
16498 params['ids'] = ids
16499 reply = await self.rpc(msg)
16500 return reply
16501
16502
16503
16504 @ReturnMapping(VolumeParamsResults)
16505 async def VolumeParams(self, entities):
16506 '''
16507 entities : typing.Sequence[~Entity]
16508 Returns -> typing.Sequence[~VolumeParamsResult]
16509 '''
16510 # map input types to rpc msg
16511 params = dict()
16512 msg = dict(Type='StorageProvisioner', Request='VolumeParams', Version=2, Params=params)
16513 params['entities'] = entities
16514 reply = await self.rpc(msg)
16515 return reply
16516
16517
16518
16519 @ReturnMapping(VolumeResults)
16520 async def Volumes(self, entities):
16521 '''
16522 entities : typing.Sequence[~Entity]
16523 Returns -> typing.Sequence[~VolumeResult]
16524 '''
16525 # map input types to rpc msg
16526 params = dict()
16527 msg = dict(Type='StorageProvisioner', Request='Volumes', Version=2, Params=params)
16528 params['entities'] = entities
16529 reply = await self.rpc(msg)
16530 return reply
16531
16532
16533
16534 @ReturnMapping(NotifyWatchResults)
16535 async def WatchBlockDevices(self, entities):
16536 '''
16537 entities : typing.Sequence[~Entity]
16538 Returns -> typing.Sequence[~NotifyWatchResult]
16539 '''
16540 # map input types to rpc msg
16541 params = dict()
16542 msg = dict(Type='StorageProvisioner', Request='WatchBlockDevices', Version=2, Params=params)
16543 params['entities'] = entities
16544 reply = await self.rpc(msg)
16545 return reply
16546
16547
16548
16549 @ReturnMapping(MachineStorageIdsWatchResults)
16550 async def WatchFilesystemAttachments(self, entities):
16551 '''
16552 entities : typing.Sequence[~Entity]
16553 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
16554 '''
16555 # map input types to rpc msg
16556 params = dict()
16557 msg = dict(Type='StorageProvisioner', Request='WatchFilesystemAttachments', Version=2, Params=params)
16558 params['entities'] = entities
16559 reply = await self.rpc(msg)
16560 return reply
16561
16562
16563
16564 @ReturnMapping(StringsWatchResults)
16565 async def WatchFilesystems(self, entities):
16566 '''
16567 entities : typing.Sequence[~Entity]
16568 Returns -> typing.Sequence[~StringsWatchResult]
16569 '''
16570 # map input types to rpc msg
16571 params = dict()
16572 msg = dict(Type='StorageProvisioner', Request='WatchFilesystems', Version=2, Params=params)
16573 params['entities'] = entities
16574 reply = await self.rpc(msg)
16575 return reply
16576
16577
16578
16579 @ReturnMapping(NotifyWatchResult)
16580 async def WatchForModelConfigChanges(self):
16581 '''
16582
16583 Returns -> typing.Union[str, _ForwardRef('Error')]
16584 '''
16585 # map input types to rpc msg
16586 params = dict()
16587 msg = dict(Type='StorageProvisioner', Request='WatchForModelConfigChanges', Version=2, Params=params)
16588
16589 reply = await self.rpc(msg)
16590 return reply
16591
16592
16593
16594 @ReturnMapping(NotifyWatchResults)
16595 async def WatchMachines(self, entities):
16596 '''
16597 entities : typing.Sequence[~Entity]
16598 Returns -> typing.Sequence[~NotifyWatchResult]
16599 '''
16600 # map input types to rpc msg
16601 params = dict()
16602 msg = dict(Type='StorageProvisioner', Request='WatchMachines', Version=2, Params=params)
16603 params['entities'] = entities
16604 reply = await self.rpc(msg)
16605 return reply
16606
16607
16608
16609 @ReturnMapping(MachineStorageIdsWatchResults)
16610 async def WatchVolumeAttachments(self, entities):
16611 '''
16612 entities : typing.Sequence[~Entity]
16613 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
16614 '''
16615 # map input types to rpc msg
16616 params = dict()
16617 msg = dict(Type='StorageProvisioner', Request='WatchVolumeAttachments', Version=2, Params=params)
16618 params['entities'] = entities
16619 reply = await self.rpc(msg)
16620 return reply
16621
16622
16623
16624 @ReturnMapping(StringsWatchResults)
16625 async def WatchVolumes(self, entities):
16626 '''
16627 entities : typing.Sequence[~Entity]
16628 Returns -> typing.Sequence[~StringsWatchResult]
16629 '''
16630 # map input types to rpc msg
16631 params = dict()
16632 msg = dict(Type='StorageProvisioner', Request='WatchVolumes', Version=2, Params=params)
16633 params['entities'] = entities
16634 reply = await self.rpc(msg)
16635 return reply
16636
16637
16638 class StringsWatcherFacade(Type):
16639 name = 'StringsWatcher'
16640 version = 1
16641 schema = {'definitions': {'Error': {'additionalProperties': False,
16642 'properties': {'code': {'type': 'string'},
16643 'info': {'$ref': '#/definitions/ErrorInfo'},
16644 'message': {'type': 'string'}},
16645 'required': ['message', 'code'],
16646 'type': 'object'},
16647 'ErrorInfo': {'additionalProperties': False,
16648 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16649 'macaroon-path': {'type': 'string'}},
16650 'type': 'object'},
16651 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16652 'StringsWatchResult': {'additionalProperties': False,
16653 'properties': {'changes': {'items': {'type': 'string'},
16654 'type': 'array'},
16655 'error': {'$ref': '#/definitions/Error'},
16656 'watcher-id': {'type': 'string'}},
16657 'required': ['watcher-id'],
16658 'type': 'object'}},
16659 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
16660 'type': 'object'},
16661 'Stop': {'type': 'object'}},
16662 'type': 'object'}
16663
16664
16665 @ReturnMapping(StringsWatchResult)
16666 async def Next(self):
16667 '''
16668
16669 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
16670 '''
16671 # map input types to rpc msg
16672 params = dict()
16673 msg = dict(Type='StringsWatcher', Request='Next', Version=1, Params=params)
16674
16675 reply = await self.rpc(msg)
16676 return reply
16677
16678
16679
16680 @ReturnMapping(None)
16681 async def Stop(self):
16682 '''
16683
16684 Returns -> None
16685 '''
16686 # map input types to rpc msg
16687 params = dict()
16688 msg = dict(Type='StringsWatcher', Request='Stop', Version=1, Params=params)
16689
16690 reply = await self.rpc(msg)
16691 return reply
16692
16693
16694 class SubnetsFacade(Type):
16695 name = 'Subnets'
16696 version = 2
16697 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
16698 'properties': {'space-tag': {'type': 'string'},
16699 'subnet-provider-id': {'type': 'string'},
16700 'subnet-tag': {'type': 'string'},
16701 'zones': {'items': {'type': 'string'},
16702 'type': 'array'}},
16703 'required': ['space-tag'],
16704 'type': 'object'},
16705 'AddSubnetsParams': {'additionalProperties': False,
16706 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
16707 'type': 'array'}},
16708 'required': ['subnets'],
16709 'type': 'object'},
16710 'Error': {'additionalProperties': False,
16711 'properties': {'code': {'type': 'string'},
16712 'info': {'$ref': '#/definitions/ErrorInfo'},
16713 'message': {'type': 'string'}},
16714 'required': ['message', 'code'],
16715 'type': 'object'},
16716 'ErrorInfo': {'additionalProperties': False,
16717 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16718 'macaroon-path': {'type': 'string'}},
16719 'type': 'object'},
16720 'ErrorResult': {'additionalProperties': False,
16721 'properties': {'error': {'$ref': '#/definitions/Error'}},
16722 'type': 'object'},
16723 'ErrorResults': {'additionalProperties': False,
16724 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16725 'type': 'array'}},
16726 'required': ['results'],
16727 'type': 'object'},
16728 'ListSubnetsResults': {'additionalProperties': False,
16729 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
16730 'type': 'array'}},
16731 'required': ['results'],
16732 'type': 'object'},
16733 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16734 'SpaceResult': {'additionalProperties': False,
16735 'properties': {'error': {'$ref': '#/definitions/Error'},
16736 'tag': {'type': 'string'}},
16737 'required': ['tag'],
16738 'type': 'object'},
16739 'SpaceResults': {'additionalProperties': False,
16740 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'},
16741 'type': 'array'}},
16742 'required': ['results'],
16743 'type': 'object'},
16744 'Subnet': {'additionalProperties': False,
16745 'properties': {'cidr': {'type': 'string'},
16746 'life': {'type': 'string'},
16747 'provider-id': {'type': 'string'},
16748 'space-tag': {'type': 'string'},
16749 'status': {'type': 'string'},
16750 'vlan-tag': {'type': 'integer'},
16751 'zones': {'items': {'type': 'string'},
16752 'type': 'array'}},
16753 'required': ['cidr',
16754 'vlan-tag',
16755 'life',
16756 'space-tag',
16757 'zones'],
16758 'type': 'object'},
16759 'SubnetsFilters': {'additionalProperties': False,
16760 'properties': {'space-tag': {'type': 'string'},
16761 'zone': {'type': 'string'}},
16762 'type': 'object'},
16763 'ZoneResult': {'additionalProperties': False,
16764 'properties': {'available': {'type': 'boolean'},
16765 'error': {'$ref': '#/definitions/Error'},
16766 'name': {'type': 'string'}},
16767 'required': ['name', 'available'],
16768 'type': 'object'},
16769 'ZoneResults': {'additionalProperties': False,
16770 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'},
16771 'type': 'array'}},
16772 'required': ['results'],
16773 'type': 'object'}},
16774 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
16775 'Result': {'$ref': '#/definitions/ErrorResults'}},
16776 'type': 'object'},
16777 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
16778 'type': 'object'},
16779 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
16780 'type': 'object'},
16781 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
16782 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
16783 'type': 'object'}},
16784 'type': 'object'}
16785
16786
16787 @ReturnMapping(ErrorResults)
16788 async def AddSubnets(self, subnets):
16789 '''
16790 subnets : typing.Sequence[~AddSubnetParams]
16791 Returns -> typing.Sequence[~ErrorResult]
16792 '''
16793 # map input types to rpc msg
16794 params = dict()
16795 msg = dict(Type='Subnets', Request='AddSubnets', Version=2, Params=params)
16796 params['subnets'] = subnets
16797 reply = await self.rpc(msg)
16798 return reply
16799
16800
16801
16802 @ReturnMapping(SpaceResults)
16803 async def AllSpaces(self):
16804 '''
16805
16806 Returns -> typing.Sequence[~SpaceResult]
16807 '''
16808 # map input types to rpc msg
16809 params = dict()
16810 msg = dict(Type='Subnets', Request='AllSpaces', Version=2, Params=params)
16811
16812 reply = await self.rpc(msg)
16813 return reply
16814
16815
16816
16817 @ReturnMapping(ZoneResults)
16818 async def AllZones(self):
16819 '''
16820
16821 Returns -> typing.Sequence[~ZoneResult]
16822 '''
16823 # map input types to rpc msg
16824 params = dict()
16825 msg = dict(Type='Subnets', Request='AllZones', Version=2, Params=params)
16826
16827 reply = await self.rpc(msg)
16828 return reply
16829
16830
16831
16832 @ReturnMapping(ListSubnetsResults)
16833 async def ListSubnets(self, space_tag, zone):
16834 '''
16835 space_tag : str
16836 zone : str
16837 Returns -> typing.Sequence[~Subnet]
16838 '''
16839 # map input types to rpc msg
16840 params = dict()
16841 msg = dict(Type='Subnets', Request='ListSubnets', Version=2, Params=params)
16842 params['space-tag'] = space_tag
16843 params['zone'] = zone
16844 reply = await self.rpc(msg)
16845 return reply
16846
16847
16848 class UndertakerFacade(Type):
16849 name = 'Undertaker'
16850 version = 1
16851 schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
16852 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
16853 'type': 'object'}},
16854 'type': 'object'},
16855 'info': {'type': 'string'},
16856 'status': {'type': 'string'},
16857 'tag': {'type': 'string'}},
16858 'required': ['tag',
16859 'status',
16860 'info',
16861 'data'],
16862 'type': 'object'},
16863 'Error': {'additionalProperties': False,
16864 'properties': {'code': {'type': 'string'},
16865 'info': {'$ref': '#/definitions/ErrorInfo'},
16866 'message': {'type': 'string'}},
16867 'required': ['message', 'code'],
16868 'type': 'object'},
16869 'ErrorInfo': {'additionalProperties': False,
16870 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16871 'macaroon-path': {'type': 'string'}},
16872 'type': 'object'},
16873 'ErrorResult': {'additionalProperties': False,
16874 'properties': {'error': {'$ref': '#/definitions/Error'}},
16875 'type': 'object'},
16876 'ErrorResults': {'additionalProperties': False,
16877 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16878 'type': 'array'}},
16879 'required': ['results'],
16880 'type': 'object'},
16881 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16882 'ModelConfigResult': {'additionalProperties': False,
16883 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
16884 'type': 'object'}},
16885 'type': 'object'}},
16886 'required': ['config'],
16887 'type': 'object'},
16888 'NotifyWatchResult': {'additionalProperties': False,
16889 'properties': {'NotifyWatcherId': {'type': 'string'},
16890 'error': {'$ref': '#/definitions/Error'}},
16891 'required': ['NotifyWatcherId'],
16892 'type': 'object'},
16893 'NotifyWatchResults': {'additionalProperties': False,
16894 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16895 'type': 'array'}},
16896 'required': ['results'],
16897 'type': 'object'},
16898 'SetStatus': {'additionalProperties': False,
16899 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
16900 'type': 'array'}},
16901 'required': ['entities'],
16902 'type': 'object'},
16903 'UndertakerModelInfo': {'additionalProperties': False,
16904 'properties': {'global-name': {'type': 'string'},
16905 'is-system': {'type': 'boolean'},
16906 'life': {'type': 'string'},
16907 'name': {'type': 'string'},
16908 'uuid': {'type': 'string'}},
16909 'required': ['uuid',
16910 'name',
16911 'global-name',
16912 'is-system',
16913 'life'],
16914 'type': 'object'},
16915 'UndertakerModelInfoResult': {'additionalProperties': False,
16916 'properties': {'error': {'$ref': '#/definitions/Error'},
16917 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
16918 'required': ['result'],
16919 'type': 'object'}},
16920 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
16921 'type': 'object'},
16922 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
16923 'type': 'object'},
16924 'ProcessDyingModel': {'type': 'object'},
16925 'RemoveModel': {'type': 'object'},
16926 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16927 'Result': {'$ref': '#/definitions/ErrorResults'}},
16928 'type': 'object'},
16929 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16930 'Result': {'$ref': '#/definitions/ErrorResults'}},
16931 'type': 'object'},
16932 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16933 'type': 'object'}},
16934 'type': 'object'}
16935
16936
16937 @ReturnMapping(ModelConfigResult)
16938 async def ModelConfig(self):
16939 '''
16940
16941 Returns -> typing.Mapping[str, typing.Any]
16942 '''
16943 # map input types to rpc msg
16944 params = dict()
16945 msg = dict(Type='Undertaker', Request='ModelConfig', Version=1, Params=params)
16946
16947 reply = await self.rpc(msg)
16948 return reply
16949
16950
16951
16952 @ReturnMapping(UndertakerModelInfoResult)
16953 async def ModelInfo(self):
16954 '''
16955
16956 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
16957 '''
16958 # map input types to rpc msg
16959 params = dict()
16960 msg = dict(Type='Undertaker', Request='ModelInfo', Version=1, Params=params)
16961
16962 reply = await self.rpc(msg)
16963 return reply
16964
16965
16966
16967 @ReturnMapping(None)
16968 async def ProcessDyingModel(self):
16969 '''
16970
16971 Returns -> None
16972 '''
16973 # map input types to rpc msg
16974 params = dict()
16975 msg = dict(Type='Undertaker', Request='ProcessDyingModel', Version=1, Params=params)
16976
16977 reply = await self.rpc(msg)
16978 return reply
16979
16980
16981
16982 @ReturnMapping(None)
16983 async def RemoveModel(self):
16984 '''
16985
16986 Returns -> None
16987 '''
16988 # map input types to rpc msg
16989 params = dict()
16990 msg = dict(Type='Undertaker', Request='RemoveModel', Version=1, Params=params)
16991
16992 reply = await self.rpc(msg)
16993 return reply
16994
16995
16996
16997 @ReturnMapping(ErrorResults)
16998 async def SetStatus(self, entities):
16999 '''
17000 entities : typing.Sequence[~EntityStatusArgs]
17001 Returns -> typing.Sequence[~ErrorResult]
17002 '''
17003 # map input types to rpc msg
17004 params = dict()
17005 msg = dict(Type='Undertaker', Request='SetStatus', Version=1, Params=params)
17006 params['entities'] = entities
17007 reply = await self.rpc(msg)
17008 return reply
17009
17010
17011
17012 @ReturnMapping(ErrorResults)
17013 async def UpdateStatus(self, entities):
17014 '''
17015 entities : typing.Sequence[~EntityStatusArgs]
17016 Returns -> typing.Sequence[~ErrorResult]
17017 '''
17018 # map input types to rpc msg
17019 params = dict()
17020 msg = dict(Type='Undertaker', Request='UpdateStatus', Version=1, Params=params)
17021 params['entities'] = entities
17022 reply = await self.rpc(msg)
17023 return reply
17024
17025
17026
17027 @ReturnMapping(NotifyWatchResults)
17028 async def WatchModelResources(self):
17029 '''
17030
17031 Returns -> typing.Sequence[~NotifyWatchResult]
17032 '''
17033 # map input types to rpc msg
17034 params = dict()
17035 msg = dict(Type='Undertaker', Request='WatchModelResources', Version=1, Params=params)
17036
17037 reply = await self.rpc(msg)
17038 return reply
17039
17040
17041 class UnitAssignerFacade(Type):
17042 name = 'UnitAssigner'
17043 version = 1
17044 schema = {'definitions': {'Entities': {'additionalProperties': False,
17045 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17046 'type': 'array'}},
17047 'required': ['entities'],
17048 'type': 'object'},
17049 'Entity': {'additionalProperties': False,
17050 'properties': {'tag': {'type': 'string'}},
17051 'required': ['tag'],
17052 'type': 'object'},
17053 'EntityStatusArgs': {'additionalProperties': False,
17054 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17055 'type': 'object'}},
17056 'type': 'object'},
17057 'info': {'type': 'string'},
17058 'status': {'type': 'string'},
17059 'tag': {'type': 'string'}},
17060 'required': ['tag',
17061 'status',
17062 'info',
17063 'data'],
17064 'type': 'object'},
17065 'Error': {'additionalProperties': False,
17066 'properties': {'code': {'type': 'string'},
17067 'info': {'$ref': '#/definitions/ErrorInfo'},
17068 'message': {'type': 'string'}},
17069 'required': ['message', 'code'],
17070 'type': 'object'},
17071 'ErrorInfo': {'additionalProperties': False,
17072 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17073 'macaroon-path': {'type': 'string'}},
17074 'type': 'object'},
17075 'ErrorResult': {'additionalProperties': False,
17076 'properties': {'error': {'$ref': '#/definitions/Error'}},
17077 'type': 'object'},
17078 'ErrorResults': {'additionalProperties': False,
17079 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17080 'type': 'array'}},
17081 'required': ['results'],
17082 'type': 'object'},
17083 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17084 'SetStatus': {'additionalProperties': False,
17085 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17086 'type': 'array'}},
17087 'required': ['entities'],
17088 'type': 'object'},
17089 'StringsWatchResult': {'additionalProperties': False,
17090 'properties': {'changes': {'items': {'type': 'string'},
17091 'type': 'array'},
17092 'error': {'$ref': '#/definitions/Error'},
17093 'watcher-id': {'type': 'string'}},
17094 'required': ['watcher-id'],
17095 'type': 'object'}},
17096 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17097 'Result': {'$ref': '#/definitions/ErrorResults'}},
17098 'type': 'object'},
17099 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17100 'Result': {'$ref': '#/definitions/ErrorResults'}},
17101 'type': 'object'},
17102 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
17103 'type': 'object'}},
17104 'type': 'object'}
17105
17106
17107 @ReturnMapping(ErrorResults)
17108 async def AssignUnits(self, entities):
17109 '''
17110 entities : typing.Sequence[~Entity]
17111 Returns -> typing.Sequence[~ErrorResult]
17112 '''
17113 # map input types to rpc msg
17114 params = dict()
17115 msg = dict(Type='UnitAssigner', Request='AssignUnits', Version=1, Params=params)
17116 params['entities'] = entities
17117 reply = await self.rpc(msg)
17118 return reply
17119
17120
17121
17122 @ReturnMapping(ErrorResults)
17123 async def SetAgentStatus(self, entities):
17124 '''
17125 entities : typing.Sequence[~EntityStatusArgs]
17126 Returns -> typing.Sequence[~ErrorResult]
17127 '''
17128 # map input types to rpc msg
17129 params = dict()
17130 msg = dict(Type='UnitAssigner', Request='SetAgentStatus', Version=1, Params=params)
17131 params['entities'] = entities
17132 reply = await self.rpc(msg)
17133 return reply
17134
17135
17136
17137 @ReturnMapping(StringsWatchResult)
17138 async def WatchUnitAssignments(self):
17139 '''
17140
17141 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
17142 '''
17143 # map input types to rpc msg
17144 params = dict()
17145 msg = dict(Type='UnitAssigner', Request='WatchUnitAssignments', Version=1, Params=params)
17146
17147 reply = await self.rpc(msg)
17148 return reply
17149
17150
17151 class UniterFacade(Type):
17152 name = 'Uniter'
17153 version = 4
17154 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
17155 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
17156 'type': 'array'},
17157 'type': 'array'}},
17158 'required': ['servers'],
17159 'type': 'object'},
17160 'Action': {'additionalProperties': False,
17161 'properties': {'name': {'type': 'string'},
17162 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
17163 'type': 'object'}},
17164 'type': 'object'},
17165 'receiver': {'type': 'string'},
17166 'tag': {'type': 'string'}},
17167 'required': ['tag', 'receiver', 'name'],
17168 'type': 'object'},
17169 'ActionExecutionResult': {'additionalProperties': False,
17170 'properties': {'action-tag': {'type': 'string'},
17171 'message': {'type': 'string'},
17172 'results': {'patternProperties': {'.*': {'additionalProperties': True,
17173 'type': 'object'}},
17174 'type': 'object'},
17175 'status': {'type': 'string'}},
17176 'required': ['action-tag', 'status'],
17177 'type': 'object'},
17178 'ActionExecutionResults': {'additionalProperties': False,
17179 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
17180 'type': 'array'}},
17181 'type': 'object'},
17182 'ActionResult': {'additionalProperties': False,
17183 'properties': {'action': {'$ref': '#/definitions/Action'},
17184 'completed': {'format': 'date-time',
17185 'type': 'string'},
17186 'enqueued': {'format': 'date-time',
17187 'type': 'string'},
17188 'error': {'$ref': '#/definitions/Error'},
17189 'message': {'type': 'string'},
17190 'output': {'patternProperties': {'.*': {'additionalProperties': True,
17191 'type': 'object'}},
17192 'type': 'object'},
17193 'started': {'format': 'date-time',
17194 'type': 'string'},
17195 'status': {'type': 'string'}},
17196 'type': 'object'},
17197 'ActionResults': {'additionalProperties': False,
17198 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
17199 'type': 'array'}},
17200 'type': 'object'},
17201 'Address': {'additionalProperties': False,
17202 'properties': {'scope': {'type': 'string'},
17203 'space-name': {'type': 'string'},
17204 'type': {'type': 'string'},
17205 'value': {'type': 'string'}},
17206 'required': ['value', 'type', 'scope'],
17207 'type': 'object'},
17208 'ApplicationStatusResult': {'additionalProperties': False,
17209 'properties': {'application': {'$ref': '#/definitions/StatusResult'},
17210 'error': {'$ref': '#/definitions/Error'},
17211 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
17212 'type': 'object'}},
17213 'required': ['application',
17214 'units'],
17215 'type': 'object'},
17216 'ApplicationStatusResults': {'additionalProperties': False,
17217 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
17218 'type': 'array'}},
17219 'required': ['results'],
17220 'type': 'object'},
17221 'BoolResult': {'additionalProperties': False,
17222 'properties': {'error': {'$ref': '#/definitions/Error'},
17223 'result': {'type': 'boolean'}},
17224 'required': ['result'],
17225 'type': 'object'},
17226 'BoolResults': {'additionalProperties': False,
17227 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
17228 'type': 'array'}},
17229 'required': ['results'],
17230 'type': 'object'},
17231 'BytesResult': {'additionalProperties': False,
17232 'properties': {'result': {'items': {'type': 'integer'},
17233 'type': 'array'}},
17234 'required': ['result'],
17235 'type': 'object'},
17236 'CharmRelation': {'additionalProperties': False,
17237 'properties': {'interface': {'type': 'string'},
17238 'limit': {'type': 'integer'},
17239 'name': {'type': 'string'},
17240 'optional': {'type': 'boolean'},
17241 'role': {'type': 'string'},
17242 'scope': {'type': 'string'}},
17243 'required': ['name',
17244 'role',
17245 'interface',
17246 'optional',
17247 'limit',
17248 'scope'],
17249 'type': 'object'},
17250 'CharmURL': {'additionalProperties': False,
17251 'properties': {'url': {'type': 'string'}},
17252 'required': ['url'],
17253 'type': 'object'},
17254 'CharmURLs': {'additionalProperties': False,
17255 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'},
17256 'type': 'array'}},
17257 'required': ['urls'],
17258 'type': 'object'},
17259 'ConfigSettingsResult': {'additionalProperties': False,
17260 'properties': {'error': {'$ref': '#/definitions/Error'},
17261 'settings': {'patternProperties': {'.*': {'additionalProperties': True,
17262 'type': 'object'}},
17263 'type': 'object'}},
17264 'required': ['settings'],
17265 'type': 'object'},
17266 'ConfigSettingsResults': {'additionalProperties': False,
17267 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
17268 'type': 'array'}},
17269 'required': ['results'],
17270 'type': 'object'},
17271 'Endpoint': {'additionalProperties': False,
17272 'properties': {'application-name': {'type': 'string'},
17273 'relation': {'$ref': '#/definitions/CharmRelation'}},
17274 'required': ['application-name', 'relation'],
17275 'type': 'object'},
17276 'Entities': {'additionalProperties': False,
17277 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17278 'type': 'array'}},
17279 'required': ['entities'],
17280 'type': 'object'},
17281 'EntitiesCharmURL': {'additionalProperties': False,
17282 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
17283 'type': 'array'}},
17284 'required': ['entities'],
17285 'type': 'object'},
17286 'EntitiesPortRanges': {'additionalProperties': False,
17287 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
17288 'type': 'array'}},
17289 'required': ['entities'],
17290 'type': 'object'},
17291 'Entity': {'additionalProperties': False,
17292 'properties': {'tag': {'type': 'string'}},
17293 'required': ['tag'],
17294 'type': 'object'},
17295 'EntityCharmURL': {'additionalProperties': False,
17296 'properties': {'charm-url': {'type': 'string'},
17297 'tag': {'type': 'string'}},
17298 'required': ['tag', 'charm-url'],
17299 'type': 'object'},
17300 'EntityPortRange': {'additionalProperties': False,
17301 'properties': {'from-port': {'type': 'integer'},
17302 'protocol': {'type': 'string'},
17303 'tag': {'type': 'string'},
17304 'to-port': {'type': 'integer'}},
17305 'required': ['tag',
17306 'protocol',
17307 'from-port',
17308 'to-port'],
17309 'type': 'object'},
17310 'EntityStatusArgs': {'additionalProperties': False,
17311 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17312 'type': 'object'}},
17313 'type': 'object'},
17314 'info': {'type': 'string'},
17315 'status': {'type': 'string'},
17316 'tag': {'type': 'string'}},
17317 'required': ['tag',
17318 'status',
17319 'info',
17320 'data'],
17321 'type': 'object'},
17322 'EntityWorkloadVersion': {'additionalProperties': False,
17323 'properties': {'tag': {'type': 'string'},
17324 'workload-version': {'type': 'string'}},
17325 'required': ['tag',
17326 'workload-version'],
17327 'type': 'object'},
17328 'EntityWorkloadVersions': {'additionalProperties': False,
17329 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'},
17330 'type': 'array'}},
17331 'required': ['entities'],
17332 'type': 'object'},
17333 'Error': {'additionalProperties': False,
17334 'properties': {'code': {'type': 'string'},
17335 'info': {'$ref': '#/definitions/ErrorInfo'},
17336 'message': {'type': 'string'}},
17337 'required': ['message', 'code'],
17338 'type': 'object'},
17339 'ErrorInfo': {'additionalProperties': False,
17340 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17341 'macaroon-path': {'type': 'string'}},
17342 'type': 'object'},
17343 'ErrorResult': {'additionalProperties': False,
17344 'properties': {'error': {'$ref': '#/definitions/Error'}},
17345 'type': 'object'},
17346 'ErrorResults': {'additionalProperties': False,
17347 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17348 'type': 'array'}},
17349 'required': ['results'],
17350 'type': 'object'},
17351 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
17352 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
17353 'type': 'array'}},
17354 'required': ['results'],
17355 'type': 'object'},
17356 'GetLeadershipSettingsResult': {'additionalProperties': False,
17357 'properties': {'error': {'$ref': '#/definitions/Error'},
17358 'settings': {'patternProperties': {'.*': {'type': 'string'}},
17359 'type': 'object'}},
17360 'required': ['settings'],
17361 'type': 'object'},
17362 'HostPort': {'additionalProperties': False,
17363 'properties': {'Address': {'$ref': '#/definitions/Address'},
17364 'port': {'type': 'integer'}},
17365 'required': ['Address', 'port'],
17366 'type': 'object'},
17367 'IntResult': {'additionalProperties': False,
17368 'properties': {'error': {'$ref': '#/definitions/Error'},
17369 'result': {'type': 'integer'}},
17370 'required': ['result'],
17371 'type': 'object'},
17372 'IntResults': {'additionalProperties': False,
17373 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
17374 'type': 'array'}},
17375 'required': ['results'],
17376 'type': 'object'},
17377 'LifeResult': {'additionalProperties': False,
17378 'properties': {'error': {'$ref': '#/definitions/Error'},
17379 'life': {'type': 'string'}},
17380 'required': ['life'],
17381 'type': 'object'},
17382 'LifeResults': {'additionalProperties': False,
17383 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
17384 'type': 'array'}},
17385 'required': ['results'],
17386 'type': 'object'},
17387 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17388 'MachinePortRange': {'additionalProperties': False,
17389 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
17390 'relation-tag': {'type': 'string'},
17391 'unit-tag': {'type': 'string'}},
17392 'required': ['unit-tag',
17393 'relation-tag',
17394 'port-range'],
17395 'type': 'object'},
17396 'MachinePortsResult': {'additionalProperties': False,
17397 'properties': {'error': {'$ref': '#/definitions/Error'},
17398 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
17399 'type': 'array'}},
17400 'required': ['ports'],
17401 'type': 'object'},
17402 'MachinePortsResults': {'additionalProperties': False,
17403 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
17404 'type': 'array'}},
17405 'required': ['results'],
17406 'type': 'object'},
17407 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
17408 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
17409 'type': 'array'}},
17410 'required': ['params'],
17411 'type': 'object'},
17412 'MergeLeadershipSettingsParam': {'additionalProperties': False,
17413 'properties': {'application-tag': {'type': 'string'},
17414 'settings': {'patternProperties': {'.*': {'type': 'string'}},
17415 'type': 'object'}},
17416 'required': ['application-tag',
17417 'settings'],
17418 'type': 'object'},
17419 'MeterStatusResult': {'additionalProperties': False,
17420 'properties': {'code': {'type': 'string'},
17421 'error': {'$ref': '#/definitions/Error'},
17422 'info': {'type': 'string'}},
17423 'required': ['code', 'info'],
17424 'type': 'object'},
17425 'MeterStatusResults': {'additionalProperties': False,
17426 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
17427 'type': 'array'}},
17428 'required': ['results'],
17429 'type': 'object'},
17430 'Metric': {'additionalProperties': False,
17431 'properties': {'key': {'type': 'string'},
17432 'time': {'format': 'date-time',
17433 'type': 'string'},
17434 'value': {'type': 'string'}},
17435 'required': ['key', 'value', 'time'],
17436 'type': 'object'},
17437 'MetricBatch': {'additionalProperties': False,
17438 'properties': {'charm-url': {'type': 'string'},
17439 'created': {'format': 'date-time',
17440 'type': 'string'},
17441 'metrics': {'items': {'$ref': '#/definitions/Metric'},
17442 'type': 'array'},
17443 'uuid': {'type': 'string'}},
17444 'required': ['uuid',
17445 'charm-url',
17446 'created',
17447 'metrics'],
17448 'type': 'object'},
17449 'MetricBatchParam': {'additionalProperties': False,
17450 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
17451 'tag': {'type': 'string'}},
17452 'required': ['tag', 'batch'],
17453 'type': 'object'},
17454 'MetricBatchParams': {'additionalProperties': False,
17455 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
17456 'type': 'array'}},
17457 'required': ['batches'],
17458 'type': 'object'},
17459 'ModelConfigResult': {'additionalProperties': False,
17460 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
17461 'type': 'object'}},
17462 'type': 'object'}},
17463 'required': ['config'],
17464 'type': 'object'},
17465 'ModelResult': {'additionalProperties': False,
17466 'properties': {'error': {'$ref': '#/definitions/Error'},
17467 'name': {'type': 'string'},
17468 'uuid': {'type': 'string'}},
17469 'required': ['name', 'uuid'],
17470 'type': 'object'},
17471 'NetworkConfig': {'additionalProperties': False,
17472 'properties': {'address': {'type': 'string'},
17473 'cidr': {'type': 'string'},
17474 'config-type': {'type': 'string'},
17475 'device-index': {'type': 'integer'},
17476 'disabled': {'type': 'boolean'},
17477 'dns-search-domains': {'items': {'type': 'string'},
17478 'type': 'array'},
17479 'dns-servers': {'items': {'type': 'string'},
17480 'type': 'array'},
17481 'gateway-address': {'type': 'string'},
17482 'interface-name': {'type': 'string'},
17483 'interface-type': {'type': 'string'},
17484 'mac-address': {'type': 'string'},
17485 'mtu': {'type': 'integer'},
17486 'no-auto-start': {'type': 'boolean'},
17487 'parent-interface-name': {'type': 'string'},
17488 'provider-address-id': {'type': 'string'},
17489 'provider-id': {'type': 'string'},
17490 'provider-space-id': {'type': 'string'},
17491 'provider-subnet-id': {'type': 'string'},
17492 'provider-vlan-id': {'type': 'string'},
17493 'vlan-tag': {'type': 'integer'}},
17494 'required': ['device-index',
17495 'mac-address',
17496 'cidr',
17497 'mtu',
17498 'provider-id',
17499 'provider-subnet-id',
17500 'provider-space-id',
17501 'provider-address-id',
17502 'provider-vlan-id',
17503 'vlan-tag',
17504 'interface-name',
17505 'parent-interface-name',
17506 'interface-type',
17507 'disabled'],
17508 'type': 'object'},
17509 'NotifyWatchResult': {'additionalProperties': False,
17510 'properties': {'NotifyWatcherId': {'type': 'string'},
17511 'error': {'$ref': '#/definitions/Error'}},
17512 'required': ['NotifyWatcherId'],
17513 'type': 'object'},
17514 'NotifyWatchResults': {'additionalProperties': False,
17515 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17516 'type': 'array'}},
17517 'required': ['results'],
17518 'type': 'object'},
17519 'PortRange': {'additionalProperties': False,
17520 'properties': {'from-port': {'type': 'integer'},
17521 'protocol': {'type': 'string'},
17522 'to-port': {'type': 'integer'}},
17523 'required': ['from-port', 'to-port', 'protocol'],
17524 'type': 'object'},
17525 'RelationIds': {'additionalProperties': False,
17526 'properties': {'relation-ids': {'items': {'type': 'integer'},
17527 'type': 'array'}},
17528 'required': ['relation-ids'],
17529 'type': 'object'},
17530 'RelationResult': {'additionalProperties': False,
17531 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'},
17532 'error': {'$ref': '#/definitions/Error'},
17533 'id': {'type': 'integer'},
17534 'key': {'type': 'string'},
17535 'life': {'type': 'string'}},
17536 'required': ['life',
17537 'id',
17538 'key',
17539 'endpoint'],
17540 'type': 'object'},
17541 'RelationResults': {'additionalProperties': False,
17542 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'},
17543 'type': 'array'}},
17544 'required': ['results'],
17545 'type': 'object'},
17546 'RelationUnit': {'additionalProperties': False,
17547 'properties': {'relation': {'type': 'string'},
17548 'unit': {'type': 'string'}},
17549 'required': ['relation', 'unit'],
17550 'type': 'object'},
17551 'RelationUnitPair': {'additionalProperties': False,
17552 'properties': {'local-unit': {'type': 'string'},
17553 'relation': {'type': 'string'},
17554 'remote-unit': {'type': 'string'}},
17555 'required': ['relation',
17556 'local-unit',
17557 'remote-unit'],
17558 'type': 'object'},
17559 'RelationUnitPairs': {'additionalProperties': False,
17560 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
17561 'type': 'array'}},
17562 'required': ['relation-unit-pairs'],
17563 'type': 'object'},
17564 'RelationUnitSettings': {'additionalProperties': False,
17565 'properties': {'relation': {'type': 'string'},
17566 'settings': {'patternProperties': {'.*': {'type': 'string'}},
17567 'type': 'object'},
17568 'unit': {'type': 'string'}},
17569 'required': ['relation',
17570 'unit',
17571 'settings'],
17572 'type': 'object'},
17573 'RelationUnits': {'additionalProperties': False,
17574 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
17575 'type': 'array'}},
17576 'required': ['relation-units'],
17577 'type': 'object'},
17578 'RelationUnitsChange': {'additionalProperties': False,
17579 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
17580 'type': 'object'},
17581 'departed': {'items': {'type': 'string'},
17582 'type': 'array'}},
17583 'required': ['changed'],
17584 'type': 'object'},
17585 'RelationUnitsSettings': {'additionalProperties': False,
17586 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
17587 'type': 'array'}},
17588 'required': ['relation-units'],
17589 'type': 'object'},
17590 'RelationUnitsWatchResult': {'additionalProperties': False,
17591 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
17592 'error': {'$ref': '#/definitions/Error'},
17593 'watcher-id': {'type': 'string'}},
17594 'required': ['watcher-id',
17595 'changes'],
17596 'type': 'object'},
17597 'RelationUnitsWatchResults': {'additionalProperties': False,
17598 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
17599 'type': 'array'}},
17600 'required': ['results'],
17601 'type': 'object'},
17602 'ResolvedModeResult': {'additionalProperties': False,
17603 'properties': {'error': {'$ref': '#/definitions/Error'},
17604 'mode': {'type': 'string'}},
17605 'required': ['mode'],
17606 'type': 'object'},
17607 'ResolvedModeResults': {'additionalProperties': False,
17608 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
17609 'type': 'array'}},
17610 'required': ['results'],
17611 'type': 'object'},
17612 'SetStatus': {'additionalProperties': False,
17613 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17614 'type': 'array'}},
17615 'required': ['entities'],
17616 'type': 'object'},
17617 'SettingsResult': {'additionalProperties': False,
17618 'properties': {'error': {'$ref': '#/definitions/Error'},
17619 'settings': {'patternProperties': {'.*': {'type': 'string'}},
17620 'type': 'object'}},
17621 'required': ['settings'],
17622 'type': 'object'},
17623 'SettingsResults': {'additionalProperties': False,
17624 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
17625 'type': 'array'}},
17626 'required': ['results'],
17627 'type': 'object'},
17628 'StatusResult': {'additionalProperties': False,
17629 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17630 'type': 'object'}},
17631 'type': 'object'},
17632 'error': {'$ref': '#/definitions/Error'},
17633 'id': {'type': 'string'},
17634 'info': {'type': 'string'},
17635 'life': {'type': 'string'},
17636 'since': {'format': 'date-time',
17637 'type': 'string'},
17638 'status': {'type': 'string'}},
17639 'required': ['id',
17640 'life',
17641 'status',
17642 'info',
17643 'data',
17644 'since'],
17645 'type': 'object'},
17646 'StatusResults': {'additionalProperties': False,
17647 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
17648 'type': 'array'}},
17649 'required': ['results'],
17650 'type': 'object'},
17651 'StorageAddParams': {'additionalProperties': False,
17652 'properties': {'name': {'type': 'string'},
17653 'storage': {'$ref': '#/definitions/StorageConstraints'},
17654 'unit': {'type': 'string'}},
17655 'required': ['unit', 'name', 'storage'],
17656 'type': 'object'},
17657 'StorageAttachment': {'additionalProperties': False,
17658 'properties': {'kind': {'type': 'integer'},
17659 'life': {'type': 'string'},
17660 'location': {'type': 'string'},
17661 'owner-tag': {'type': 'string'},
17662 'storage-tag': {'type': 'string'},
17663 'unit-tag': {'type': 'string'}},
17664 'required': ['storage-tag',
17665 'owner-tag',
17666 'unit-tag',
17667 'kind',
17668 'location',
17669 'life'],
17670 'type': 'object'},
17671 'StorageAttachmentId': {'additionalProperties': False,
17672 'properties': {'storage-tag': {'type': 'string'},
17673 'unit-tag': {'type': 'string'}},
17674 'required': ['storage-tag',
17675 'unit-tag'],
17676 'type': 'object'},
17677 'StorageAttachmentIds': {'additionalProperties': False,
17678 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
17679 'type': 'array'}},
17680 'required': ['ids'],
17681 'type': 'object'},
17682 'StorageAttachmentIdsResult': {'additionalProperties': False,
17683 'properties': {'error': {'$ref': '#/definitions/Error'},
17684 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
17685 'required': ['result'],
17686 'type': 'object'},
17687 'StorageAttachmentIdsResults': {'additionalProperties': False,
17688 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
17689 'type': 'array'}},
17690 'type': 'object'},
17691 'StorageAttachmentResult': {'additionalProperties': False,
17692 'properties': {'error': {'$ref': '#/definitions/Error'},
17693 'result': {'$ref': '#/definitions/StorageAttachment'}},
17694 'required': ['result'],
17695 'type': 'object'},
17696 'StorageAttachmentResults': {'additionalProperties': False,
17697 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
17698 'type': 'array'}},
17699 'type': 'object'},
17700 'StorageConstraints': {'additionalProperties': False,
17701 'properties': {'count': {'type': 'integer'},
17702 'pool': {'type': 'string'},
17703 'size': {'type': 'integer'}},
17704 'type': 'object'},
17705 'StoragesAddParams': {'additionalProperties': False,
17706 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
17707 'type': 'array'}},
17708 'required': ['storages'],
17709 'type': 'object'},
17710 'StringBoolResult': {'additionalProperties': False,
17711 'properties': {'error': {'$ref': '#/definitions/Error'},
17712 'ok': {'type': 'boolean'},
17713 'result': {'type': 'string'}},
17714 'required': ['result', 'ok'],
17715 'type': 'object'},
17716 'StringBoolResults': {'additionalProperties': False,
17717 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'},
17718 'type': 'array'}},
17719 'required': ['results'],
17720 'type': 'object'},
17721 'StringResult': {'additionalProperties': False,
17722 'properties': {'error': {'$ref': '#/definitions/Error'},
17723 'result': {'type': 'string'}},
17724 'required': ['result'],
17725 'type': 'object'},
17726 'StringResults': {'additionalProperties': False,
17727 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
17728 'type': 'array'}},
17729 'required': ['results'],
17730 'type': 'object'},
17731 'StringsResult': {'additionalProperties': False,
17732 'properties': {'error': {'$ref': '#/definitions/Error'},
17733 'result': {'items': {'type': 'string'},
17734 'type': 'array'}},
17735 'type': 'object'},
17736 'StringsResults': {'additionalProperties': False,
17737 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
17738 'type': 'array'}},
17739 'required': ['results'],
17740 'type': 'object'},
17741 'StringsWatchResult': {'additionalProperties': False,
17742 'properties': {'changes': {'items': {'type': 'string'},
17743 'type': 'array'},
17744 'error': {'$ref': '#/definitions/Error'},
17745 'watcher-id': {'type': 'string'}},
17746 'required': ['watcher-id'],
17747 'type': 'object'},
17748 'StringsWatchResults': {'additionalProperties': False,
17749 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
17750 'type': 'array'}},
17751 'required': ['results'],
17752 'type': 'object'},
17753 'UnitNetworkConfig': {'additionalProperties': False,
17754 'properties': {'binding-name': {'type': 'string'},
17755 'unit-tag': {'type': 'string'}},
17756 'required': ['unit-tag', 'binding-name'],
17757 'type': 'object'},
17758 'UnitNetworkConfigResult': {'additionalProperties': False,
17759 'properties': {'error': {'$ref': '#/definitions/Error'},
17760 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
17761 'type': 'array'}},
17762 'required': ['info'],
17763 'type': 'object'},
17764 'UnitNetworkConfigResults': {'additionalProperties': False,
17765 'properties': {'results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
17766 'type': 'array'}},
17767 'required': ['results'],
17768 'type': 'object'},
17769 'UnitSettings': {'additionalProperties': False,
17770 'properties': {'version': {'type': 'integer'}},
17771 'required': ['version'],
17772 'type': 'object'},
17773 'UnitsNetworkConfig': {'additionalProperties': False,
17774 'properties': {'args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
17775 'type': 'array'}},
17776 'required': ['args'],
17777 'type': 'object'}},
17778 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
17779 'type': 'object'},
17780 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
17781 'type': 'object'},
17782 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17783 'Result': {'$ref': '#/definitions/ActionResults'}},
17784 'type': 'object'},
17785 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
17786 'Result': {'$ref': '#/definitions/ErrorResults'}},
17787 'type': 'object'},
17788 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
17789 'Result': {'$ref': '#/definitions/ErrorResults'}},
17790 'type': 'object'},
17791 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17792 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
17793 'type': 'object'},
17794 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17795 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
17796 'type': 'object'},
17797 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17798 'Result': {'$ref': '#/definitions/StringResults'}},
17799 'type': 'object'},
17800 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17801 'Result': {'$ref': '#/definitions/StringResults'}},
17802 'type': 'object'},
17803 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17804 'Result': {'$ref': '#/definitions/ErrorResults'}},
17805 'type': 'object'},
17806 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
17807 'type': 'object'},
17808 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
17809 'Result': {'$ref': '#/definitions/StringResults'}},
17810 'type': 'object'},
17811 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17812 'Result': {'$ref': '#/definitions/IntResults'}},
17813 'type': 'object'},
17814 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17815 'Result': {'$ref': '#/definitions/StringBoolResults'}},
17816 'type': 'object'},
17817 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17818 'Result': {'$ref': '#/definitions/ErrorResults'}},
17819 'type': 'object'},
17820 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
17821 'Result': {'$ref': '#/definitions/ErrorResults'}},
17822 'type': 'object'},
17823 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17824 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
17825 'type': 'object'},
17826 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
17827 'type': 'object'},
17828 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17829 'Result': {'$ref': '#/definitions/ErrorResults'}},
17830 'type': 'object'},
17831 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17832 'Result': {'$ref': '#/definitions/ErrorResults'}},
17833 'type': 'object'},
17834 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17835 'Result': {'$ref': '#/definitions/ErrorResults'}},
17836 'type': 'object'},
17837 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17838 'Result': {'$ref': '#/definitions/ErrorResults'}},
17839 'type': 'object'},
17840 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
17841 'Result': {'$ref': '#/definitions/ErrorResults'}},
17842 'type': 'object'},
17843 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
17844 'Result': {'$ref': '#/definitions/ErrorResults'}},
17845 'type': 'object'},
17846 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17847 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
17848 'type': 'object'},
17849 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17850 'Result': {'$ref': '#/definitions/StringBoolResults'}},
17851 'type': 'object'},
17852 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17853 'Result': {'$ref': '#/definitions/BoolResults'}},
17854 'type': 'object'},
17855 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17856 'Result': {'$ref': '#/definitions/StringsResults'}},
17857 'type': 'object'},
17858 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
17859 'Result': {'$ref': '#/definitions/ErrorResults'}},
17860 'type': 'object'},
17861 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17862 'Result': {'$ref': '#/definitions/LifeResults'}},
17863 'type': 'object'},
17864 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
17865 'Result': {'$ref': '#/definitions/ErrorResults'}},
17866 'type': 'object'},
17867 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
17868 'type': 'object'},
17869 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
17870 'type': 'object'},
17871 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
17872 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
17873 'type': 'object'},
17874 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
17875 'Result': {'$ref': '#/definitions/ErrorResults'}},
17876 'type': 'object'},
17877 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17878 'Result': {'$ref': '#/definitions/StringResults'}},
17879 'type': 'object'},
17880 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
17881 'type': 'object'},
17882 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17883 'Result': {'$ref': '#/definitions/StringResults'}},
17884 'type': 'object'},
17885 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17886 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
17887 'type': 'object'},
17888 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
17889 'Result': {'$ref': '#/definitions/SettingsResults'}},
17890 'type': 'object'},
17891 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
17892 'Result': {'$ref': '#/definitions/SettingsResults'}},
17893 'type': 'object'},
17894 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
17895 'Result': {'$ref': '#/definitions/RelationResults'}},
17896 'type': 'object'},
17897 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
17898 'Result': {'$ref': '#/definitions/RelationResults'}},
17899 'type': 'object'},
17900 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
17901 'Result': {'$ref': '#/definitions/ErrorResults'}},
17902 'type': 'object'},
17903 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17904 'Result': {'$ref': '#/definitions/ErrorResults'}},
17905 'type': 'object'},
17906 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17907 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
17908 'type': 'object'},
17909 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17910 'Result': {'$ref': '#/definitions/ErrorResults'}},
17911 'type': 'object'},
17912 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17913 'Result': {'$ref': '#/definitions/ErrorResults'}},
17914 'type': 'object'},
17915 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
17916 'Result': {'$ref': '#/definitions/ErrorResults'}},
17917 'type': 'object'},
17918 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17919 'Result': {'$ref': '#/definitions/ErrorResults'}},
17920 'type': 'object'},
17921 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17922 'Result': {'$ref': '#/definitions/ErrorResults'}},
17923 'type': 'object'},
17924 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'},
17925 'Result': {'$ref': '#/definitions/ErrorResults'}},
17926 'type': 'object'},
17927 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
17928 'Result': {'$ref': '#/definitions/LifeResults'}},
17929 'type': 'object'},
17930 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
17931 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
17932 'type': 'object'},
17933 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17934 'Result': {'$ref': '#/definitions/StatusResults'}},
17935 'type': 'object'},
17936 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17937 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
17938 'type': 'object'},
17939 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
17940 'Result': {'$ref': '#/definitions/ErrorResults'}},
17941 'type': 'object'},
17942 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17943 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17944 'type': 'object'},
17945 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
17946 'type': 'object'},
17947 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17948 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
17949 'type': 'object'},
17950 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17951 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
17952 'type': 'object'},
17953 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17954 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17955 'type': 'object'},
17956 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
17957 'type': 'object'},
17958 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17959 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17960 'type': 'object'},
17961 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17962 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17963 'type': 'object'},
17964 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
17965 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
17966 'type': 'object'},
17967 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
17968 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17969 'type': 'object'},
17970 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17971 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17972 'type': 'object'},
17973 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17974 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
17975 'type': 'object'},
17976 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17977 'Result': {'$ref': '#/definitions/StringResults'}},
17978 'type': 'object'}},
17979 'type': 'object'}
17980
17981
17982 @ReturnMapping(StringsResult)
17983 async def APIAddresses(self):
17984 '''
17985
17986 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
17987 '''
17988 # map input types to rpc msg
17989 params = dict()
17990 msg = dict(Type='Uniter', Request='APIAddresses', Version=4, Params=params)
17991
17992 reply = await self.rpc(msg)
17993 return reply
17994
17995
17996
17997 @ReturnMapping(APIHostPortsResult)
17998 async def APIHostPorts(self):
17999 '''
18000
18001 Returns -> typing.Sequence[~HostPort]
18002 '''
18003 # map input types to rpc msg
18004 params = dict()
18005 msg = dict(Type='Uniter', Request='APIHostPorts', Version=4, Params=params)
18006
18007 reply = await self.rpc(msg)
18008 return reply
18009
18010
18011
18012 @ReturnMapping(ActionResults)
18013 async def Actions(self, entities):
18014 '''
18015 entities : typing.Sequence[~Entity]
18016 Returns -> typing.Sequence[~ActionResult]
18017 '''
18018 # map input types to rpc msg
18019 params = dict()
18020 msg = dict(Type='Uniter', Request='Actions', Version=4, Params=params)
18021 params['entities'] = entities
18022 reply = await self.rpc(msg)
18023 return reply
18024
18025
18026
18027 @ReturnMapping(ErrorResults)
18028 async def AddMetricBatches(self, batches):
18029 '''
18030 batches : typing.Sequence[~MetricBatchParam]
18031 Returns -> typing.Sequence[~ErrorResult]
18032 '''
18033 # map input types to rpc msg
18034 params = dict()
18035 msg = dict(Type='Uniter', Request='AddMetricBatches', Version=4, Params=params)
18036 params['batches'] = batches
18037 reply = await self.rpc(msg)
18038 return reply
18039
18040
18041
18042 @ReturnMapping(ErrorResults)
18043 async def AddUnitStorage(self, storages):
18044 '''
18045 storages : typing.Sequence[~StorageAddParams]
18046 Returns -> typing.Sequence[~ErrorResult]
18047 '''
18048 # map input types to rpc msg
18049 params = dict()
18050 msg = dict(Type='Uniter', Request='AddUnitStorage', Version=4, Params=params)
18051 params['storages'] = storages
18052 reply = await self.rpc(msg)
18053 return reply
18054
18055
18056
18057 @ReturnMapping(MachinePortsResults)
18058 async def AllMachinePorts(self, entities):
18059 '''
18060 entities : typing.Sequence[~Entity]
18061 Returns -> typing.Sequence[~MachinePortsResult]
18062 '''
18063 # map input types to rpc msg
18064 params = dict()
18065 msg = dict(Type='Uniter', Request='AllMachinePorts', Version=4, Params=params)
18066 params['entities'] = entities
18067 reply = await self.rpc(msg)
18068 return reply
18069
18070
18071
18072 @ReturnMapping(ApplicationStatusResults)
18073 async def ApplicationStatus(self, entities):
18074 '''
18075 entities : typing.Sequence[~Entity]
18076 Returns -> typing.Sequence[~ApplicationStatusResult]
18077 '''
18078 # map input types to rpc msg
18079 params = dict()
18080 msg = dict(Type='Uniter', Request='ApplicationStatus', Version=4, Params=params)
18081 params['entities'] = entities
18082 reply = await self.rpc(msg)
18083 return reply
18084
18085
18086
18087 @ReturnMapping(StringResults)
18088 async def AssignedMachine(self, entities):
18089 '''
18090 entities : typing.Sequence[~Entity]
18091 Returns -> typing.Sequence[~StringResult]
18092 '''
18093 # map input types to rpc msg
18094 params = dict()
18095 msg = dict(Type='Uniter', Request='AssignedMachine', Version=4, Params=params)
18096 params['entities'] = entities
18097 reply = await self.rpc(msg)
18098 return reply
18099
18100
18101
18102 @ReturnMapping(StringResults)
18103 async def AvailabilityZone(self, entities):
18104 '''
18105 entities : typing.Sequence[~Entity]
18106 Returns -> typing.Sequence[~StringResult]
18107 '''
18108 # map input types to rpc msg
18109 params = dict()
18110 msg = dict(Type='Uniter', Request='AvailabilityZone', Version=4, Params=params)
18111 params['entities'] = entities
18112 reply = await self.rpc(msg)
18113 return reply
18114
18115
18116
18117 @ReturnMapping(ErrorResults)
18118 async def BeginActions(self, entities):
18119 '''
18120 entities : typing.Sequence[~Entity]
18121 Returns -> typing.Sequence[~ErrorResult]
18122 '''
18123 # map input types to rpc msg
18124 params = dict()
18125 msg = dict(Type='Uniter', Request='BeginActions', Version=4, Params=params)
18126 params['entities'] = entities
18127 reply = await self.rpc(msg)
18128 return reply
18129
18130
18131
18132 @ReturnMapping(BytesResult)
18133 async def CACert(self):
18134 '''
18135
18136 Returns -> typing.Sequence[int]
18137 '''
18138 # map input types to rpc msg
18139 params = dict()
18140 msg = dict(Type='Uniter', Request='CACert', Version=4, Params=params)
18141
18142 reply = await self.rpc(msg)
18143 return reply
18144
18145
18146
18147 @ReturnMapping(StringResults)
18148 async def CharmArchiveSha256(self, urls):
18149 '''
18150 urls : typing.Sequence[~CharmURL]
18151 Returns -> typing.Sequence[~StringResult]
18152 '''
18153 # map input types to rpc msg
18154 params = dict()
18155 msg = dict(Type='Uniter', Request='CharmArchiveSha256', Version=4, Params=params)
18156 params['urls'] = urls
18157 reply = await self.rpc(msg)
18158 return reply
18159
18160
18161
18162 @ReturnMapping(IntResults)
18163 async def CharmModifiedVersion(self, entities):
18164 '''
18165 entities : typing.Sequence[~Entity]
18166 Returns -> typing.Sequence[~IntResult]
18167 '''
18168 # map input types to rpc msg
18169 params = dict()
18170 msg = dict(Type='Uniter', Request='CharmModifiedVersion', Version=4, Params=params)
18171 params['entities'] = entities
18172 reply = await self.rpc(msg)
18173 return reply
18174
18175
18176
18177 @ReturnMapping(StringBoolResults)
18178 async def CharmURL(self, entities):
18179 '''
18180 entities : typing.Sequence[~Entity]
18181 Returns -> typing.Sequence[~StringBoolResult]
18182 '''
18183 # map input types to rpc msg
18184 params = dict()
18185 msg = dict(Type='Uniter', Request='CharmURL', Version=4, Params=params)
18186 params['entities'] = entities
18187 reply = await self.rpc(msg)
18188 return reply
18189
18190
18191
18192 @ReturnMapping(ErrorResults)
18193 async def ClearResolved(self, entities):
18194 '''
18195 entities : typing.Sequence[~Entity]
18196 Returns -> typing.Sequence[~ErrorResult]
18197 '''
18198 # map input types to rpc msg
18199 params = dict()
18200 msg = dict(Type='Uniter', Request='ClearResolved', Version=4, Params=params)
18201 params['entities'] = entities
18202 reply = await self.rpc(msg)
18203 return reply
18204
18205
18206
18207 @ReturnMapping(ErrorResults)
18208 async def ClosePorts(self, entities):
18209 '''
18210 entities : typing.Sequence[~EntityPortRange]
18211 Returns -> typing.Sequence[~ErrorResult]
18212 '''
18213 # map input types to rpc msg
18214 params = dict()
18215 msg = dict(Type='Uniter', Request='ClosePorts', Version=4, Params=params)
18216 params['entities'] = entities
18217 reply = await self.rpc(msg)
18218 return reply
18219
18220
18221
18222 @ReturnMapping(ConfigSettingsResults)
18223 async def ConfigSettings(self, entities):
18224 '''
18225 entities : typing.Sequence[~Entity]
18226 Returns -> typing.Sequence[~ConfigSettingsResult]
18227 '''
18228 # map input types to rpc msg
18229 params = dict()
18230 msg = dict(Type='Uniter', Request='ConfigSettings', Version=4, Params=params)
18231 params['entities'] = entities
18232 reply = await self.rpc(msg)
18233 return reply
18234
18235
18236
18237 @ReturnMapping(ModelResult)
18238 async def CurrentModel(self):
18239 '''
18240
18241 Returns -> typing.Union[_ForwardRef('Error'), str]
18242 '''
18243 # map input types to rpc msg
18244 params = dict()
18245 msg = dict(Type='Uniter', Request='CurrentModel', Version=4, Params=params)
18246
18247 reply = await self.rpc(msg)
18248 return reply
18249
18250
18251
18252 @ReturnMapping(ErrorResults)
18253 async def Destroy(self, entities):
18254 '''
18255 entities : typing.Sequence[~Entity]
18256 Returns -> typing.Sequence[~ErrorResult]
18257 '''
18258 # map input types to rpc msg
18259 params = dict()
18260 msg = dict(Type='Uniter', Request='Destroy', Version=4, Params=params)
18261 params['entities'] = entities
18262 reply = await self.rpc(msg)
18263 return reply
18264
18265
18266
18267 @ReturnMapping(ErrorResults)
18268 async def DestroyAllSubordinates(self, entities):
18269 '''
18270 entities : typing.Sequence[~Entity]
18271 Returns -> typing.Sequence[~ErrorResult]
18272 '''
18273 # map input types to rpc msg
18274 params = dict()
18275 msg = dict(Type='Uniter', Request='DestroyAllSubordinates', Version=4, Params=params)
18276 params['entities'] = entities
18277 reply = await self.rpc(msg)
18278 return reply
18279
18280
18281
18282 @ReturnMapping(ErrorResults)
18283 async def DestroyUnitStorageAttachments(self, entities):
18284 '''
18285 entities : typing.Sequence[~Entity]
18286 Returns -> typing.Sequence[~ErrorResult]
18287 '''
18288 # map input types to rpc msg
18289 params = dict()
18290 msg = dict(Type='Uniter', Request='DestroyUnitStorageAttachments', Version=4, Params=params)
18291 params['entities'] = entities
18292 reply = await self.rpc(msg)
18293 return reply
18294
18295
18296
18297 @ReturnMapping(ErrorResults)
18298 async def EnsureDead(self, entities):
18299 '''
18300 entities : typing.Sequence[~Entity]
18301 Returns -> typing.Sequence[~ErrorResult]
18302 '''
18303 # map input types to rpc msg
18304 params = dict()
18305 msg = dict(Type='Uniter', Request='EnsureDead', Version=4, Params=params)
18306 params['entities'] = entities
18307 reply = await self.rpc(msg)
18308 return reply
18309
18310
18311
18312 @ReturnMapping(ErrorResults)
18313 async def EnterScope(self, relation_units):
18314 '''
18315 relation_units : typing.Sequence[~RelationUnit]
18316 Returns -> typing.Sequence[~ErrorResult]
18317 '''
18318 # map input types to rpc msg
18319 params = dict()
18320 msg = dict(Type='Uniter', Request='EnterScope', Version=4, Params=params)
18321 params['relation-units'] = relation_units
18322 reply = await self.rpc(msg)
18323 return reply
18324
18325
18326
18327 @ReturnMapping(ErrorResults)
18328 async def FinishActions(self, results):
18329 '''
18330 results : typing.Sequence[~ActionExecutionResult]
18331 Returns -> typing.Sequence[~ErrorResult]
18332 '''
18333 # map input types to rpc msg
18334 params = dict()
18335 msg = dict(Type='Uniter', Request='FinishActions', Version=4, Params=params)
18336 params['results'] = results
18337 reply = await self.rpc(msg)
18338 return reply
18339
18340
18341
18342 @ReturnMapping(MeterStatusResults)
18343 async def GetMeterStatus(self, entities):
18344 '''
18345 entities : typing.Sequence[~Entity]
18346 Returns -> typing.Sequence[~MeterStatusResult]
18347 '''
18348 # map input types to rpc msg
18349 params = dict()
18350 msg = dict(Type='Uniter', Request='GetMeterStatus', Version=4, Params=params)
18351 params['entities'] = entities
18352 reply = await self.rpc(msg)
18353 return reply
18354
18355
18356
18357 @ReturnMapping(StringBoolResults)
18358 async def GetPrincipal(self, entities):
18359 '''
18360 entities : typing.Sequence[~Entity]
18361 Returns -> typing.Sequence[~StringBoolResult]
18362 '''
18363 # map input types to rpc msg
18364 params = dict()
18365 msg = dict(Type='Uniter', Request='GetPrincipal', Version=4, Params=params)
18366 params['entities'] = entities
18367 reply = await self.rpc(msg)
18368 return reply
18369
18370
18371
18372 @ReturnMapping(BoolResults)
18373 async def HasSubordinates(self, entities):
18374 '''
18375 entities : typing.Sequence[~Entity]
18376 Returns -> typing.Sequence[~BoolResult]
18377 '''
18378 # map input types to rpc msg
18379 params = dict()
18380 msg = dict(Type='Uniter', Request='HasSubordinates', Version=4, Params=params)
18381 params['entities'] = entities
18382 reply = await self.rpc(msg)
18383 return reply
18384
18385
18386
18387 @ReturnMapping(StringsResults)
18388 async def JoinedRelations(self, entities):
18389 '''
18390 entities : typing.Sequence[~Entity]
18391 Returns -> typing.Sequence[~StringsResult]
18392 '''
18393 # map input types to rpc msg
18394 params = dict()
18395 msg = dict(Type='Uniter', Request='JoinedRelations', Version=4, Params=params)
18396 params['entities'] = entities
18397 reply = await self.rpc(msg)
18398 return reply
18399
18400
18401
18402 @ReturnMapping(ErrorResults)
18403 async def LeaveScope(self, relation_units):
18404 '''
18405 relation_units : typing.Sequence[~RelationUnit]
18406 Returns -> typing.Sequence[~ErrorResult]
18407 '''
18408 # map input types to rpc msg
18409 params = dict()
18410 msg = dict(Type='Uniter', Request='LeaveScope', Version=4, Params=params)
18411 params['relation-units'] = relation_units
18412 reply = await self.rpc(msg)
18413 return reply
18414
18415
18416
18417 @ReturnMapping(LifeResults)
18418 async def Life(self, entities):
18419 '''
18420 entities : typing.Sequence[~Entity]
18421 Returns -> typing.Sequence[~LifeResult]
18422 '''
18423 # map input types to rpc msg
18424 params = dict()
18425 msg = dict(Type='Uniter', Request='Life', Version=4, Params=params)
18426 params['entities'] = entities
18427 reply = await self.rpc(msg)
18428 return reply
18429
18430
18431
18432 @ReturnMapping(ErrorResults)
18433 async def Merge(self, params):
18434 '''
18435 params : typing.Sequence[~MergeLeadershipSettingsParam]
18436 Returns -> typing.Sequence[~ErrorResult]
18437 '''
18438 # map input types to rpc msg
18439 params = dict()
18440 msg = dict(Type='Uniter', Request='Merge', Version=4, Params=params)
18441 params['params'] = params
18442 reply = await self.rpc(msg)
18443 return reply
18444
18445
18446
18447 @ReturnMapping(ModelConfigResult)
18448 async def ModelConfig(self):
18449 '''
18450
18451 Returns -> typing.Mapping[str, typing.Any]
18452 '''
18453 # map input types to rpc msg
18454 params = dict()
18455 msg = dict(Type='Uniter', Request='ModelConfig', Version=4, Params=params)
18456
18457 reply = await self.rpc(msg)
18458 return reply
18459
18460
18461
18462 @ReturnMapping(StringResult)
18463 async def ModelUUID(self):
18464 '''
18465
18466 Returns -> typing.Union[_ForwardRef('Error'), str]
18467 '''
18468 # map input types to rpc msg
18469 params = dict()
18470 msg = dict(Type='Uniter', Request='ModelUUID', Version=4, Params=params)
18471
18472 reply = await self.rpc(msg)
18473 return reply
18474
18475
18476
18477 @ReturnMapping(UnitNetworkConfigResults)
18478 async def NetworkConfig(self, args):
18479 '''
18480 args : typing.Sequence[~UnitNetworkConfig]
18481 Returns -> typing.Sequence[~UnitNetworkConfigResult]
18482 '''
18483 # map input types to rpc msg
18484 params = dict()
18485 msg = dict(Type='Uniter', Request='NetworkConfig', Version=4, Params=params)
18486 params['args'] = args
18487 reply = await self.rpc(msg)
18488 return reply
18489
18490
18491
18492 @ReturnMapping(ErrorResults)
18493 async def OpenPorts(self, entities):
18494 '''
18495 entities : typing.Sequence[~EntityPortRange]
18496 Returns -> typing.Sequence[~ErrorResult]
18497 '''
18498 # map input types to rpc msg
18499 params = dict()
18500 msg = dict(Type='Uniter', Request='OpenPorts', Version=4, Params=params)
18501 params['entities'] = entities
18502 reply = await self.rpc(msg)
18503 return reply
18504
18505
18506
18507 @ReturnMapping(StringResults)
18508 async def PrivateAddress(self, entities):
18509 '''
18510 entities : typing.Sequence[~Entity]
18511 Returns -> typing.Sequence[~StringResult]
18512 '''
18513 # map input types to rpc msg
18514 params = dict()
18515 msg = dict(Type='Uniter', Request='PrivateAddress', Version=4, Params=params)
18516 params['entities'] = entities
18517 reply = await self.rpc(msg)
18518 return reply
18519
18520
18521
18522 @ReturnMapping(StringResult)
18523 async def ProviderType(self):
18524 '''
18525
18526 Returns -> typing.Union[_ForwardRef('Error'), str]
18527 '''
18528 # map input types to rpc msg
18529 params = dict()
18530 msg = dict(Type='Uniter', Request='ProviderType', Version=4, Params=params)
18531
18532 reply = await self.rpc(msg)
18533 return reply
18534
18535
18536
18537 @ReturnMapping(StringResults)
18538 async def PublicAddress(self, entities):
18539 '''
18540 entities : typing.Sequence[~Entity]
18541 Returns -> typing.Sequence[~StringResult]
18542 '''
18543 # map input types to rpc msg
18544 params = dict()
18545 msg = dict(Type='Uniter', Request='PublicAddress', Version=4, Params=params)
18546 params['entities'] = entities
18547 reply = await self.rpc(msg)
18548 return reply
18549
18550
18551
18552 @ReturnMapping(GetLeadershipSettingsBulkResults)
18553 async def Read(self, entities):
18554 '''
18555 entities : typing.Sequence[~Entity]
18556 Returns -> typing.Sequence[~GetLeadershipSettingsResult]
18557 '''
18558 # map input types to rpc msg
18559 params = dict()
18560 msg = dict(Type='Uniter', Request='Read', Version=4, Params=params)
18561 params['entities'] = entities
18562 reply = await self.rpc(msg)
18563 return reply
18564
18565
18566
18567 @ReturnMapping(SettingsResults)
18568 async def ReadRemoteSettings(self, relation_unit_pairs):
18569 '''
18570 relation_unit_pairs : typing.Sequence[~RelationUnitPair]
18571 Returns -> typing.Sequence[~SettingsResult]
18572 '''
18573 # map input types to rpc msg
18574 params = dict()
18575 msg = dict(Type='Uniter', Request='ReadRemoteSettings', Version=4, Params=params)
18576 params['relation-unit-pairs'] = relation_unit_pairs
18577 reply = await self.rpc(msg)
18578 return reply
18579
18580
18581
18582 @ReturnMapping(SettingsResults)
18583 async def ReadSettings(self, relation_units):
18584 '''
18585 relation_units : typing.Sequence[~RelationUnit]
18586 Returns -> typing.Sequence[~SettingsResult]
18587 '''
18588 # map input types to rpc msg
18589 params = dict()
18590 msg = dict(Type='Uniter', Request='ReadSettings', Version=4, Params=params)
18591 params['relation-units'] = relation_units
18592 reply = await self.rpc(msg)
18593 return reply
18594
18595
18596
18597 @ReturnMapping(RelationResults)
18598 async def Relation(self, relation_units):
18599 '''
18600 relation_units : typing.Sequence[~RelationUnit]
18601 Returns -> typing.Sequence[~RelationResult]
18602 '''
18603 # map input types to rpc msg
18604 params = dict()
18605 msg = dict(Type='Uniter', Request='Relation', Version=4, Params=params)
18606 params['relation-units'] = relation_units
18607 reply = await self.rpc(msg)
18608 return reply
18609
18610
18611
18612 @ReturnMapping(RelationResults)
18613 async def RelationById(self, relation_ids):
18614 '''
18615 relation_ids : typing.Sequence[int]
18616 Returns -> typing.Sequence[~RelationResult]
18617 '''
18618 # map input types to rpc msg
18619 params = dict()
18620 msg = dict(Type='Uniter', Request='RelationById', Version=4, Params=params)
18621 params['relation-ids'] = relation_ids
18622 reply = await self.rpc(msg)
18623 return reply
18624
18625
18626
18627 @ReturnMapping(ErrorResults)
18628 async def RemoveStorageAttachments(self, ids):
18629 '''
18630 ids : typing.Sequence[~StorageAttachmentId]
18631 Returns -> typing.Sequence[~ErrorResult]
18632 '''
18633 # map input types to rpc msg
18634 params = dict()
18635 msg = dict(Type='Uniter', Request='RemoveStorageAttachments', Version=4, Params=params)
18636 params['ids'] = ids
18637 reply = await self.rpc(msg)
18638 return reply
18639
18640
18641
18642 @ReturnMapping(ErrorResults)
18643 async def RequestReboot(self, entities):
18644 '''
18645 entities : typing.Sequence[~Entity]
18646 Returns -> typing.Sequence[~ErrorResult]
18647 '''
18648 # map input types to rpc msg
18649 params = dict()
18650 msg = dict(Type='Uniter', Request='RequestReboot', Version=4, Params=params)
18651 params['entities'] = entities
18652 reply = await self.rpc(msg)
18653 return reply
18654
18655
18656
18657 @ReturnMapping(ResolvedModeResults)
18658 async def Resolved(self, entities):
18659 '''
18660 entities : typing.Sequence[~Entity]
18661 Returns -> typing.Sequence[~ResolvedModeResult]
18662 '''
18663 # map input types to rpc msg
18664 params = dict()
18665 msg = dict(Type='Uniter', Request='Resolved', Version=4, Params=params)
18666 params['entities'] = entities
18667 reply = await self.rpc(msg)
18668 return reply
18669
18670
18671
18672 @ReturnMapping(ErrorResults)
18673 async def SetAgentStatus(self, entities):
18674 '''
18675 entities : typing.Sequence[~EntityStatusArgs]
18676 Returns -> typing.Sequence[~ErrorResult]
18677 '''
18678 # map input types to rpc msg
18679 params = dict()
18680 msg = dict(Type='Uniter', Request='SetAgentStatus', Version=4, Params=params)
18681 params['entities'] = entities
18682 reply = await self.rpc(msg)
18683 return reply
18684
18685
18686
18687 @ReturnMapping(ErrorResults)
18688 async def SetApplicationStatus(self, entities):
18689 '''
18690 entities : typing.Sequence[~EntityStatusArgs]
18691 Returns -> typing.Sequence[~ErrorResult]
18692 '''
18693 # map input types to rpc msg
18694 params = dict()
18695 msg = dict(Type='Uniter', Request='SetApplicationStatus', Version=4, Params=params)
18696 params['entities'] = entities
18697 reply = await self.rpc(msg)
18698 return reply
18699
18700
18701
18702 @ReturnMapping(ErrorResults)
18703 async def SetCharmURL(self, entities):
18704 '''
18705 entities : typing.Sequence[~EntityCharmURL]
18706 Returns -> typing.Sequence[~ErrorResult]
18707 '''
18708 # map input types to rpc msg
18709 params = dict()
18710 msg = dict(Type='Uniter', Request='SetCharmURL', Version=4, Params=params)
18711 params['entities'] = entities
18712 reply = await self.rpc(msg)
18713 return reply
18714
18715
18716
18717 @ReturnMapping(ErrorResults)
18718 async def SetStatus(self, entities):
18719 '''
18720 entities : typing.Sequence[~EntityStatusArgs]
18721 Returns -> typing.Sequence[~ErrorResult]
18722 '''
18723 # map input types to rpc msg
18724 params = dict()
18725 msg = dict(Type='Uniter', Request='SetStatus', Version=4, Params=params)
18726 params['entities'] = entities
18727 reply = await self.rpc(msg)
18728 return reply
18729
18730
18731
18732 @ReturnMapping(ErrorResults)
18733 async def SetUnitStatus(self, entities):
18734 '''
18735 entities : typing.Sequence[~EntityStatusArgs]
18736 Returns -> typing.Sequence[~ErrorResult]
18737 '''
18738 # map input types to rpc msg
18739 params = dict()
18740 msg = dict(Type='Uniter', Request='SetUnitStatus', Version=4, Params=params)
18741 params['entities'] = entities
18742 reply = await self.rpc(msg)
18743 return reply
18744
18745
18746
18747 @ReturnMapping(ErrorResults)
18748 async def SetWorkloadVersion(self, entities):
18749 '''
18750 entities : typing.Sequence[~EntityWorkloadVersion]
18751 Returns -> typing.Sequence[~ErrorResult]
18752 '''
18753 # map input types to rpc msg
18754 params = dict()
18755 msg = dict(Type='Uniter', Request='SetWorkloadVersion', Version=4, Params=params)
18756 params['entities'] = entities
18757 reply = await self.rpc(msg)
18758 return reply
18759
18760
18761
18762 @ReturnMapping(LifeResults)
18763 async def StorageAttachmentLife(self, ids):
18764 '''
18765 ids : typing.Sequence[~StorageAttachmentId]
18766 Returns -> typing.Sequence[~LifeResult]
18767 '''
18768 # map input types to rpc msg
18769 params = dict()
18770 msg = dict(Type='Uniter', Request='StorageAttachmentLife', Version=4, Params=params)
18771 params['ids'] = ids
18772 reply = await self.rpc(msg)
18773 return reply
18774
18775
18776
18777 @ReturnMapping(StorageAttachmentResults)
18778 async def StorageAttachments(self, ids):
18779 '''
18780 ids : typing.Sequence[~StorageAttachmentId]
18781 Returns -> typing.Sequence[~StorageAttachmentResult]
18782 '''
18783 # map input types to rpc msg
18784 params = dict()
18785 msg = dict(Type='Uniter', Request='StorageAttachments', Version=4, Params=params)
18786 params['ids'] = ids
18787 reply = await self.rpc(msg)
18788 return reply
18789
18790
18791
18792 @ReturnMapping(StatusResults)
18793 async def UnitStatus(self, entities):
18794 '''
18795 entities : typing.Sequence[~Entity]
18796 Returns -> typing.Sequence[~StatusResult]
18797 '''
18798 # map input types to rpc msg
18799 params = dict()
18800 msg = dict(Type='Uniter', Request='UnitStatus', Version=4, Params=params)
18801 params['entities'] = entities
18802 reply = await self.rpc(msg)
18803 return reply
18804
18805
18806
18807 @ReturnMapping(StorageAttachmentIdsResults)
18808 async def UnitStorageAttachments(self, entities):
18809 '''
18810 entities : typing.Sequence[~Entity]
18811 Returns -> typing.Sequence[~StorageAttachmentIdsResult]
18812 '''
18813 # map input types to rpc msg
18814 params = dict()
18815 msg = dict(Type='Uniter', Request='UnitStorageAttachments', Version=4, Params=params)
18816 params['entities'] = entities
18817 reply = await self.rpc(msg)
18818 return reply
18819
18820
18821
18822 @ReturnMapping(ErrorResults)
18823 async def UpdateSettings(self, relation_units):
18824 '''
18825 relation_units : typing.Sequence[~RelationUnitSettings]
18826 Returns -> typing.Sequence[~ErrorResult]
18827 '''
18828 # map input types to rpc msg
18829 params = dict()
18830 msg = dict(Type='Uniter', Request='UpdateSettings', Version=4, Params=params)
18831 params['relation-units'] = relation_units
18832 reply = await self.rpc(msg)
18833 return reply
18834
18835
18836
18837 @ReturnMapping(NotifyWatchResults)
18838 async def Watch(self, entities):
18839 '''
18840 entities : typing.Sequence[~Entity]
18841 Returns -> typing.Sequence[~NotifyWatchResult]
18842 '''
18843 # map input types to rpc msg
18844 params = dict()
18845 msg = dict(Type='Uniter', Request='Watch', Version=4, Params=params)
18846 params['entities'] = entities
18847 reply = await self.rpc(msg)
18848 return reply
18849
18850
18851
18852 @ReturnMapping(NotifyWatchResult)
18853 async def WatchAPIHostPorts(self):
18854 '''
18855
18856 Returns -> typing.Union[str, _ForwardRef('Error')]
18857 '''
18858 # map input types to rpc msg
18859 params = dict()
18860 msg = dict(Type='Uniter', Request='WatchAPIHostPorts', Version=4, Params=params)
18861
18862 reply = await self.rpc(msg)
18863 return reply
18864
18865
18866
18867 @ReturnMapping(StringsWatchResults)
18868 async def WatchActionNotifications(self, entities):
18869 '''
18870 entities : typing.Sequence[~Entity]
18871 Returns -> typing.Sequence[~StringsWatchResult]
18872 '''
18873 # map input types to rpc msg
18874 params = dict()
18875 msg = dict(Type='Uniter', Request='WatchActionNotifications', Version=4, Params=params)
18876 params['entities'] = entities
18877 reply = await self.rpc(msg)
18878 return reply
18879
18880
18881
18882 @ReturnMapping(StringsWatchResults)
18883 async def WatchApplicationRelations(self, entities):
18884 '''
18885 entities : typing.Sequence[~Entity]
18886 Returns -> typing.Sequence[~StringsWatchResult]
18887 '''
18888 # map input types to rpc msg
18889 params = dict()
18890 msg = dict(Type='Uniter', Request='WatchApplicationRelations', Version=4, Params=params)
18891 params['entities'] = entities
18892 reply = await self.rpc(msg)
18893 return reply
18894
18895
18896
18897 @ReturnMapping(NotifyWatchResults)
18898 async def WatchConfigSettings(self, entities):
18899 '''
18900 entities : typing.Sequence[~Entity]
18901 Returns -> typing.Sequence[~NotifyWatchResult]
18902 '''
18903 # map input types to rpc msg
18904 params = dict()
18905 msg = dict(Type='Uniter', Request='WatchConfigSettings', Version=4, Params=params)
18906 params['entities'] = entities
18907 reply = await self.rpc(msg)
18908 return reply
18909
18910
18911
18912 @ReturnMapping(NotifyWatchResult)
18913 async def WatchForModelConfigChanges(self):
18914 '''
18915
18916 Returns -> typing.Union[str, _ForwardRef('Error')]
18917 '''
18918 # map input types to rpc msg
18919 params = dict()
18920 msg = dict(Type='Uniter', Request='WatchForModelConfigChanges', Version=4, Params=params)
18921
18922 reply = await self.rpc(msg)
18923 return reply
18924
18925
18926
18927 @ReturnMapping(NotifyWatchResults)
18928 async def WatchLeadershipSettings(self, entities):
18929 '''
18930 entities : typing.Sequence[~Entity]
18931 Returns -> typing.Sequence[~NotifyWatchResult]
18932 '''
18933 # map input types to rpc msg
18934 params = dict()
18935 msg = dict(Type='Uniter', Request='WatchLeadershipSettings', Version=4, Params=params)
18936 params['entities'] = entities
18937 reply = await self.rpc(msg)
18938 return reply
18939
18940
18941
18942 @ReturnMapping(NotifyWatchResults)
18943 async def WatchMeterStatus(self, entities):
18944 '''
18945 entities : typing.Sequence[~Entity]
18946 Returns -> typing.Sequence[~NotifyWatchResult]
18947 '''
18948 # map input types to rpc msg
18949 params = dict()
18950 msg = dict(Type='Uniter', Request='WatchMeterStatus', Version=4, Params=params)
18951 params['entities'] = entities
18952 reply = await self.rpc(msg)
18953 return reply
18954
18955
18956
18957 @ReturnMapping(RelationUnitsWatchResults)
18958 async def WatchRelationUnits(self, relation_units):
18959 '''
18960 relation_units : typing.Sequence[~RelationUnit]
18961 Returns -> typing.Sequence[~RelationUnitsWatchResult]
18962 '''
18963 # map input types to rpc msg
18964 params = dict()
18965 msg = dict(Type='Uniter', Request='WatchRelationUnits', Version=4, Params=params)
18966 params['relation-units'] = relation_units
18967 reply = await self.rpc(msg)
18968 return reply
18969
18970
18971
18972 @ReturnMapping(NotifyWatchResults)
18973 async def WatchStorageAttachments(self, ids):
18974 '''
18975 ids : typing.Sequence[~StorageAttachmentId]
18976 Returns -> typing.Sequence[~NotifyWatchResult]
18977 '''
18978 # map input types to rpc msg
18979 params = dict()
18980 msg = dict(Type='Uniter', Request='WatchStorageAttachments', Version=4, Params=params)
18981 params['ids'] = ids
18982 reply = await self.rpc(msg)
18983 return reply
18984
18985
18986
18987 @ReturnMapping(NotifyWatchResults)
18988 async def WatchUnitAddresses(self, entities):
18989 '''
18990 entities : typing.Sequence[~Entity]
18991 Returns -> typing.Sequence[~NotifyWatchResult]
18992 '''
18993 # map input types to rpc msg
18994 params = dict()
18995 msg = dict(Type='Uniter', Request='WatchUnitAddresses', Version=4, Params=params)
18996 params['entities'] = entities
18997 reply = await self.rpc(msg)
18998 return reply
18999
19000
19001
19002 @ReturnMapping(StringsWatchResults)
19003 async def WatchUnitStorageAttachments(self, entities):
19004 '''
19005 entities : typing.Sequence[~Entity]
19006 Returns -> typing.Sequence[~StringsWatchResult]
19007 '''
19008 # map input types to rpc msg
19009 params = dict()
19010 msg = dict(Type='Uniter', Request='WatchUnitStorageAttachments', Version=4, Params=params)
19011 params['entities'] = entities
19012 reply = await self.rpc(msg)
19013 return reply
19014
19015
19016
19017 @ReturnMapping(StringResults)
19018 async def WorkloadVersion(self, entities):
19019 '''
19020 entities : typing.Sequence[~Entity]
19021 Returns -> typing.Sequence[~StringResult]
19022 '''
19023 # map input types to rpc msg
19024 params = dict()
19025 msg = dict(Type='Uniter', Request='WorkloadVersion', Version=4, Params=params)
19026 params['entities'] = entities
19027 reply = await self.rpc(msg)
19028 return reply
19029
19030
19031 class UpgraderFacade(Type):
19032 name = 'Upgrader'
19033 version = 1
19034 schema = {'definitions': {'Binary': {'additionalProperties': False,
19035 'properties': {'Arch': {'type': 'string'},
19036 'Number': {'$ref': '#/definitions/Number'},
19037 'Series': {'type': 'string'}},
19038 'required': ['Number', 'Series', 'Arch'],
19039 'type': 'object'},
19040 'Entities': {'additionalProperties': False,
19041 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
19042 'type': 'array'}},
19043 'required': ['entities'],
19044 'type': 'object'},
19045 'EntitiesVersion': {'additionalProperties': False,
19046 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
19047 'type': 'array'}},
19048 'required': ['agent-tools'],
19049 'type': 'object'},
19050 'Entity': {'additionalProperties': False,
19051 'properties': {'tag': {'type': 'string'}},
19052 'required': ['tag'],
19053 'type': 'object'},
19054 'EntityVersion': {'additionalProperties': False,
19055 'properties': {'tag': {'type': 'string'},
19056 'tools': {'$ref': '#/definitions/Version'}},
19057 'required': ['tag', 'tools'],
19058 'type': 'object'},
19059 'Error': {'additionalProperties': False,
19060 'properties': {'code': {'type': 'string'},
19061 'info': {'$ref': '#/definitions/ErrorInfo'},
19062 'message': {'type': 'string'}},
19063 'required': ['message', 'code'],
19064 'type': 'object'},
19065 'ErrorInfo': {'additionalProperties': False,
19066 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
19067 'macaroon-path': {'type': 'string'}},
19068 'type': 'object'},
19069 'ErrorResult': {'additionalProperties': False,
19070 'properties': {'error': {'$ref': '#/definitions/Error'}},
19071 'type': 'object'},
19072 'ErrorResults': {'additionalProperties': False,
19073 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
19074 'type': 'array'}},
19075 'required': ['results'],
19076 'type': 'object'},
19077 'Macaroon': {'additionalProperties': False, 'type': 'object'},
19078 'NotifyWatchResult': {'additionalProperties': False,
19079 'properties': {'NotifyWatcherId': {'type': 'string'},
19080 'error': {'$ref': '#/definitions/Error'}},
19081 'required': ['NotifyWatcherId'],
19082 'type': 'object'},
19083 'NotifyWatchResults': {'additionalProperties': False,
19084 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
19085 'type': 'array'}},
19086 'required': ['results'],
19087 'type': 'object'},
19088 'Number': {'additionalProperties': False,
19089 'properties': {'Build': {'type': 'integer'},
19090 'Major': {'type': 'integer'},
19091 'Minor': {'type': 'integer'},
19092 'Patch': {'type': 'integer'},
19093 'Tag': {'type': 'string'}},
19094 'required': ['Major',
19095 'Minor',
19096 'Tag',
19097 'Patch',
19098 'Build'],
19099 'type': 'object'},
19100 'Tools': {'additionalProperties': False,
19101 'properties': {'sha256': {'type': 'string'},
19102 'size': {'type': 'integer'},
19103 'url': {'type': 'string'},
19104 'version': {'$ref': '#/definitions/Binary'}},
19105 'required': ['version', 'url', 'size'],
19106 'type': 'object'},
19107 'ToolsResult': {'additionalProperties': False,
19108 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
19109 'error': {'$ref': '#/definitions/Error'},
19110 'tools': {'items': {'$ref': '#/definitions/Tools'},
19111 'type': 'array'}},
19112 'required': ['tools',
19113 'disable-ssl-hostname-verification'],
19114 'type': 'object'},
19115 'ToolsResults': {'additionalProperties': False,
19116 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
19117 'type': 'array'}},
19118 'required': ['results'],
19119 'type': 'object'},
19120 'Version': {'additionalProperties': False,
19121 'properties': {'version': {'$ref': '#/definitions/Binary'}},
19122 'required': ['version'],
19123 'type': 'object'},
19124 'VersionResult': {'additionalProperties': False,
19125 'properties': {'error': {'$ref': '#/definitions/Error'},
19126 'version': {'$ref': '#/definitions/Number'}},
19127 'type': 'object'},
19128 'VersionResults': {'additionalProperties': False,
19129 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
19130 'type': 'array'}},
19131 'required': ['results'],
19132 'type': 'object'}},
19133 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19134 'Result': {'$ref': '#/definitions/VersionResults'}},
19135 'type': 'object'},
19136 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
19137 'Result': {'$ref': '#/definitions/ErrorResults'}},
19138 'type': 'object'},
19139 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19140 'Result': {'$ref': '#/definitions/ToolsResults'}},
19141 'type': 'object'},
19142 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19143 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19144 'type': 'object'}},
19145 'type': 'object'}
19146
19147
19148 @ReturnMapping(VersionResults)
19149 async def DesiredVersion(self, entities):
19150 '''
19151 entities : typing.Sequence[~Entity]
19152 Returns -> typing.Sequence[~VersionResult]
19153 '''
19154 # map input types to rpc msg
19155 params = dict()
19156 msg = dict(Type='Upgrader', Request='DesiredVersion', Version=1, Params=params)
19157 params['entities'] = entities
19158 reply = await self.rpc(msg)
19159 return reply
19160
19161
19162
19163 @ReturnMapping(ErrorResults)
19164 async def SetTools(self, agent_tools):
19165 '''
19166 agent_tools : typing.Sequence[~EntityVersion]
19167 Returns -> typing.Sequence[~ErrorResult]
19168 '''
19169 # map input types to rpc msg
19170 params = dict()
19171 msg = dict(Type='Upgrader', Request='SetTools', Version=1, Params=params)
19172 params['agent-tools'] = agent_tools
19173 reply = await self.rpc(msg)
19174 return reply
19175
19176
19177
19178 @ReturnMapping(ToolsResults)
19179 async def Tools(self, entities):
19180 '''
19181 entities : typing.Sequence[~Entity]
19182 Returns -> typing.Sequence[~ToolsResult]
19183 '''
19184 # map input types to rpc msg
19185 params = dict()
19186 msg = dict(Type='Upgrader', Request='Tools', Version=1, Params=params)
19187 params['entities'] = entities
19188 reply = await self.rpc(msg)
19189 return reply
19190
19191
19192
19193 @ReturnMapping(NotifyWatchResults)
19194 async def WatchAPIVersion(self, entities):
19195 '''
19196 entities : typing.Sequence[~Entity]
19197 Returns -> typing.Sequence[~NotifyWatchResult]
19198 '''
19199 # map input types to rpc msg
19200 params = dict()
19201 msg = dict(Type='Upgrader', Request='WatchAPIVersion', Version=1, Params=params)
19202 params['entities'] = entities
19203 reply = await self.rpc(msg)
19204 return reply
19205
19206
19207 class UserManagerFacade(Type):
19208 name = 'UserManager'
19209 version = 1
19210 schema = {'definitions': {'AddUser': {'additionalProperties': False,
19211 'properties': {'display-name': {'type': 'string'},
19212 'model-access-permission': {'type': 'string'},
19213 'password': {'type': 'string'},
19214 'shared-model-tags': {'items': {'type': 'string'},
19215 'type': 'array'},
19216 'username': {'type': 'string'}},
19217 'required': ['username',
19218 'display-name',
19219 'shared-model-tags'],
19220 'type': 'object'},
19221 'AddUserResult': {'additionalProperties': False,
19222 'properties': {'error': {'$ref': '#/definitions/Error'},
19223 'secret-key': {'items': {'type': 'integer'},
19224 'type': 'array'},
19225 'tag': {'type': 'string'}},
19226 'type': 'object'},
19227 'AddUserResults': {'additionalProperties': False,
19228 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
19229 'type': 'array'}},
19230 'required': ['results'],
19231 'type': 'object'},
19232 'AddUsers': {'additionalProperties': False,
19233 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
19234 'type': 'array'}},
19235 'required': ['users'],
19236 'type': 'object'},
19237 'Entities': {'additionalProperties': False,
19238 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
19239 'type': 'array'}},
19240 'required': ['entities'],
19241 'type': 'object'},
19242 'Entity': {'additionalProperties': False,
19243 'properties': {'tag': {'type': 'string'}},
19244 'required': ['tag'],
19245 'type': 'object'},
19246 'EntityPassword': {'additionalProperties': False,
19247 'properties': {'password': {'type': 'string'},
19248 'tag': {'type': 'string'}},
19249 'required': ['tag', 'password'],
19250 'type': 'object'},
19251 'EntityPasswords': {'additionalProperties': False,
19252 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
19253 'type': 'array'}},
19254 'required': ['changes'],
19255 'type': 'object'},
19256 'Error': {'additionalProperties': False,
19257 'properties': {'code': {'type': 'string'},
19258 'info': {'$ref': '#/definitions/ErrorInfo'},
19259 'message': {'type': 'string'}},
19260 'required': ['message', 'code'],
19261 'type': 'object'},
19262 'ErrorInfo': {'additionalProperties': False,
19263 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
19264 'macaroon-path': {'type': 'string'}},
19265 'type': 'object'},
19266 'ErrorResult': {'additionalProperties': False,
19267 'properties': {'error': {'$ref': '#/definitions/Error'}},
19268 'type': 'object'},
19269 'ErrorResults': {'additionalProperties': False,
19270 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
19271 'type': 'array'}},
19272 'required': ['results'],
19273 'type': 'object'},
19274 'Macaroon': {'additionalProperties': False, 'type': 'object'},
19275 'MacaroonResult': {'additionalProperties': False,
19276 'properties': {'error': {'$ref': '#/definitions/Error'},
19277 'result': {'$ref': '#/definitions/Macaroon'}},
19278 'type': 'object'},
19279 'MacaroonResults': {'additionalProperties': False,
19280 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
19281 'type': 'array'}},
19282 'required': ['results'],
19283 'type': 'object'},
19284 'UserInfo': {'additionalProperties': False,
19285 'properties': {'created-by': {'type': 'string'},
19286 'date-created': {'format': 'date-time',
19287 'type': 'string'},
19288 'disabled': {'type': 'boolean'},
19289 'display-name': {'type': 'string'},
19290 'last-connection': {'format': 'date-time',
19291 'type': 'string'},
19292 'username': {'type': 'string'}},
19293 'required': ['username',
19294 'display-name',
19295 'created-by',
19296 'date-created',
19297 'disabled'],
19298 'type': 'object'},
19299 'UserInfoRequest': {'additionalProperties': False,
19300 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
19301 'type': 'array'},
19302 'include-disabled': {'type': 'boolean'}},
19303 'required': ['entities',
19304 'include-disabled'],
19305 'type': 'object'},
19306 'UserInfoResult': {'additionalProperties': False,
19307 'properties': {'error': {'$ref': '#/definitions/Error'},
19308 'result': {'$ref': '#/definitions/UserInfo'}},
19309 'type': 'object'},
19310 'UserInfoResults': {'additionalProperties': False,
19311 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
19312 'type': 'array'}},
19313 'required': ['results'],
19314 'type': 'object'}},
19315 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
19316 'Result': {'$ref': '#/definitions/AddUserResults'}},
19317 'type': 'object'},
19318 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19319 'Result': {'$ref': '#/definitions/MacaroonResults'}},
19320 'type': 'object'},
19321 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19322 'Result': {'$ref': '#/definitions/ErrorResults'}},
19323 'type': 'object'},
19324 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19325 'Result': {'$ref': '#/definitions/ErrorResults'}},
19326 'type': 'object'},
19327 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
19328 'Result': {'$ref': '#/definitions/ErrorResults'}},
19329 'type': 'object'},
19330 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
19331 'Result': {'$ref': '#/definitions/UserInfoResults'}},
19332 'type': 'object'}},
19333 'type': 'object'}
19334
19335
19336 @ReturnMapping(AddUserResults)
19337 async def AddUser(self, users):
19338 '''
19339 users : typing.Sequence[~AddUser]
19340 Returns -> typing.Sequence[~AddUserResult]
19341 '''
19342 # map input types to rpc msg
19343 params = dict()
19344 msg = dict(Type='UserManager', Request='AddUser', Version=1, Params=params)
19345 params['users'] = users
19346 reply = await self.rpc(msg)
19347 return reply
19348
19349
19350
19351 @ReturnMapping(MacaroonResults)
19352 async def CreateLocalLoginMacaroon(self, entities):
19353 '''
19354 entities : typing.Sequence[~Entity]
19355 Returns -> typing.Sequence[~MacaroonResult]
19356 '''
19357 # map input types to rpc msg
19358 params = dict()
19359 msg = dict(Type='UserManager', Request='CreateLocalLoginMacaroon', Version=1, Params=params)
19360 params['entities'] = entities
19361 reply = await self.rpc(msg)
19362 return reply
19363
19364
19365
19366 @ReturnMapping(ErrorResults)
19367 async def DisableUser(self, entities):
19368 '''
19369 entities : typing.Sequence[~Entity]
19370 Returns -> typing.Sequence[~ErrorResult]
19371 '''
19372 # map input types to rpc msg
19373 params = dict()
19374 msg = dict(Type='UserManager', Request='DisableUser', Version=1, Params=params)
19375 params['entities'] = entities
19376 reply = await self.rpc(msg)
19377 return reply
19378
19379
19380
19381 @ReturnMapping(ErrorResults)
19382 async def EnableUser(self, entities):
19383 '''
19384 entities : typing.Sequence[~Entity]
19385 Returns -> typing.Sequence[~ErrorResult]
19386 '''
19387 # map input types to rpc msg
19388 params = dict()
19389 msg = dict(Type='UserManager', Request='EnableUser', Version=1, Params=params)
19390 params['entities'] = entities
19391 reply = await self.rpc(msg)
19392 return reply
19393
19394
19395
19396 @ReturnMapping(ErrorResults)
19397 async def SetPassword(self, changes):
19398 '''
19399 changes : typing.Sequence[~EntityPassword]
19400 Returns -> typing.Sequence[~ErrorResult]
19401 '''
19402 # map input types to rpc msg
19403 params = dict()
19404 msg = dict(Type='UserManager', Request='SetPassword', Version=1, Params=params)
19405 params['changes'] = changes
19406 reply = await self.rpc(msg)
19407 return reply
19408
19409
19410
19411 @ReturnMapping(UserInfoResults)
19412 async def UserInfo(self, entities, include_disabled):
19413 '''
19414 entities : typing.Sequence[~Entity]
19415 include_disabled : bool
19416 Returns -> typing.Sequence[~UserInfoResult]
19417 '''
19418 # map input types to rpc msg
19419 params = dict()
19420 msg = dict(Type='UserManager', Request='UserInfo', Version=1, Params=params)
19421 params['entities'] = entities
19422 params['include-disabled'] = include_disabled
19423 reply = await self.rpc(msg)
19424 return reply
19425
19426
19427 class VolumeAttachmentsWatcherFacade(Type):
19428 name = 'VolumeAttachmentsWatcher'
19429 version = 2
19430 schema = {'definitions': {'Error': {'additionalProperties': False,
19431 'properties': {'code': {'type': 'string'},
19432 'info': {'$ref': '#/definitions/ErrorInfo'},
19433 'message': {'type': 'string'}},
19434 'required': ['message', 'code'],
19435 'type': 'object'},
19436 'ErrorInfo': {'additionalProperties': False,
19437 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
19438 'macaroon-path': {'type': 'string'}},
19439 'type': 'object'},
19440 'Macaroon': {'additionalProperties': False, 'type': 'object'},
19441 'MachineStorageId': {'additionalProperties': False,
19442 'properties': {'attachment-tag': {'type': 'string'},
19443 'machine-tag': {'type': 'string'}},
19444 'required': ['machine-tag',
19445 'attachment-tag'],
19446 'type': 'object'},
19447 'MachineStorageIdsWatchResult': {'additionalProperties': False,
19448 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
19449 'type': 'array'},
19450 'error': {'$ref': '#/definitions/Error'},
19451 'watcher-id': {'type': 'string'}},
19452 'required': ['watcher-id',
19453 'changes'],
19454 'type': 'object'}},
19455 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
19456 'type': 'object'},
19457 'Stop': {'type': 'object'}},
19458 'type': 'object'}
19459
19460
19461 @ReturnMapping(MachineStorageIdsWatchResult)
19462 async def Next(self):
19463 '''
19464
19465 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
19466 '''
19467 # map input types to rpc msg
19468 params = dict()
19469 msg = dict(Type='VolumeAttachmentsWatcher', Request='Next', Version=2, Params=params)
19470
19471 reply = await self.rpc(msg)
19472 return reply
19473
19474
19475
19476 @ReturnMapping(None)
19477 async def Stop(self):
19478 '''
19479
19480 Returns -> None
19481 '''
19482 # map input types to rpc msg
19483 params = dict()
19484 msg = dict(Type='VolumeAttachmentsWatcher', Request='Stop', Version=2, Params=params)
19485
19486 reply = await self.rpc(msg)
19487 return reply
19488
19489