Deploy/destroy example
[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 = {'receiver': 'receiver', 'parameters': 'parameters', 'name': 'name', 'tag': 'tag'}
9 _toPy = {'receiver': 'receiver', 'parameters': 'parameters', 'name': 'name', 'tag': 'tag'}
10 def __init__(self, name=None, parameters=None, receiver=None, tag=None):
11 '''
12 name : str
13 parameters : typing.Mapping<~KT, +VT_co>[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 = {'enqueued': 'enqueued', 'completed': 'completed', 'output': 'output', 'started': 'started', 'action': 'action', 'status': 'status', 'error': 'error', 'message': 'message'}
25 _toPy = {'enqueued': 'enqueued', 'completed': 'completed', 'output': 'output', 'started': 'started', 'action': 'action', 'status': 'status', 'error': 'error', 'message': 'message'}
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<~KT, +VT_co>[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<+T_co>[~ActionResult]<~ActionResult>
53 '''
54 self.results = [ActionResult.from_json(o) for o in results or []]
55
56
57 class ActionSpec(Type):
58 _toSchema = {'description': 'description', 'params': 'params'}
59 _toPy = {'description': 'description', 'params': 'params'}
60 def __init__(self, description=None, params=None):
61 '''
62 description : str
63 params : typing.Mapping<~KT, +VT_co>[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<+T_co>[~Action]<~Action>
75 '''
76 self.actions = [Action.from_json(o) for o in actions or []]
77
78
79 class ActionsByName(Type):
80 _toSchema = {'actions': 'actions', 'error': 'error', 'name': 'name'}
81 _toPy = {'actions': 'actions', 'error': 'error', 'name': 'name'}
82 def __init__(self, actions=None, error=None, name=None):
83 '''
84 actions : typing.Sequence<+T_co>[~ActionResult]<~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<+T_co>[~ActionsByName]<~ActionsByName>
99 '''
100 self.actions = [ActionsByName.from_json(o) for o in actions or []]
101
102
103 class ActionsByReceiver(Type):
104 _toSchema = {'actions': 'actions', 'receiver': 'receiver', 'error': 'error'}
105 _toPy = {'actions': 'actions', 'receiver': 'receiver', 'error': 'error'}
106 def __init__(self, actions=None, error=None, receiver=None):
107 '''
108 actions : typing.Sequence<+T_co>[~ActionResult]<~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<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
123 '''
124 self.actions = [ActionsByReceiver.from_json(o) for o in actions or []]
125
126
127 class ApplicationCharmActionsResult(Type):
128 _toSchema = {'application_tag': 'application-tag', 'actions': 'actions', 'error': 'error'}
129 _toPy = {'actions': 'actions', 'error': 'error', 'application-tag': 'application_tag'}
130 def __init__(self, actions=None, application_tag=None, error=None):
131 '''
132 actions : typing.Mapping<~KT, +VT_co>[str, ~ActionSpec]<~ActionSpec>
133 application_tag : str
134 error : Error
135 '''
136 self.actions = actions
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<+T_co>[~ApplicationCharmActionsResult]<~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<+T_co>[~Entity]<~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<+T_co>[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<+T_co>[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<+T_co>[~Entity]<~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 = {'commands': 'commands', 'units': 'units', 'timeout': 'timeout', 'machines': 'machines', 'applications': 'applications'}
239 _toPy = {'commands': 'commands', 'units': 'units', 'timeout': 'timeout', 'machines': 'machines', 'applications': 'applications'}
240 def __init__(self, applications=None, commands=None, machines=None, timeout=None, units=None):
241 '''
242 applications : typing.Sequence<+T_co>[str]
243 commands : str
244 machines : typing.Sequence<+T_co>[str]
245 timeout : int
246 units : typing.Sequence<+T_co>[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', 'life': 'life', 'error': 'error', 'container_type': 'container-type'}
257 _toPy = {'jobs': 'jobs', 'container-type': 'container_type', 'error': 'error', 'life': 'life'}
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<+T_co>[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<+T_co>[~AgentGetEntitiesResult]<~AgentGetEntitiesResult>
277 '''
278 self.entities = [AgentGetEntitiesResult.from_json(o) for o in entities or []]
279
280
281 class CloudCredential(Type):
282 _toSchema = {'attrs': 'attrs', 'auth_type': 'auth-type', 'redacted': 'redacted'}
283 _toPy = {'attrs': 'attrs', 'redacted': 'redacted', 'auth-type': 'auth_type'}
284 def __init__(self, attrs=None, auth_type=None, redacted=None):
285 '''
286 attrs : typing.Mapping<~KT, +VT_co>[str, str]
287 auth_type : str
288 redacted : typing.Sequence<+T_co>[str]
289 '''
290 self.attrs = attrs
291 self.auth_type = auth_type
292 self.redacted = redacted
293
294
295 class CloudSpec(Type):
296 _toSchema = {'region': 'region', 'storage_endpoint': 'storage-endpoint', 'type_': 'type', 'endpoint': 'endpoint', 'name': 'name', 'credential': 'credential', 'identity_endpoint': 'identity-endpoint'}
297 _toPy = {'region': 'region', 'type': 'type_', 'storage-endpoint': 'storage_endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'credential': 'credential', 'endpoint': 'endpoint'}
298 def __init__(self, credential=None, endpoint=None, identity_endpoint=None, name=None, region=None, storage_endpoint=None, type_=None):
299 '''
300 credential : CloudCredential
301 endpoint : str
302 identity_endpoint : str
303 name : str
304 region : str
305 storage_endpoint : str
306 type_ : str
307 '''
308 self.credential = CloudCredential.from_json(credential) if credential else None
309 self.endpoint = endpoint
310 self.identity_endpoint = identity_endpoint
311 self.name = name
312 self.region = region
313 self.storage_endpoint = storage_endpoint
314 self.type_ = type_
315
316
317 class CloudSpecResult(Type):
318 _toSchema = {'result': 'result', 'error': 'error'}
319 _toPy = {'result': 'result', 'error': 'error'}
320 def __init__(self, error=None, result=None):
321 '''
322 error : Error
323 result : CloudSpec
324 '''
325 self.error = Error.from_json(error) if error else None
326 self.result = CloudSpec.from_json(result) if result else None
327
328
329 class CloudSpecResults(Type):
330 _toSchema = {'results': 'results'}
331 _toPy = {'results': 'results'}
332 def __init__(self, results=None):
333 '''
334 results : typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
335 '''
336 self.results = [CloudSpecResult.from_json(o) for o in results or []]
337
338
339 class ControllerConfigResult(Type):
340 _toSchema = {'config': 'config'}
341 _toPy = {'config': 'config'}
342 def __init__(self, config=None):
343 '''
344 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
345 '''
346 self.config = config
347
348
349 class EntityPassword(Type):
350 _toSchema = {'password': 'password', 'tag': 'tag'}
351 _toPy = {'password': 'password', 'tag': 'tag'}
352 def __init__(self, password=None, tag=None):
353 '''
354 password : str
355 tag : str
356 '''
357 self.password = password
358 self.tag = tag
359
360
361 class EntityPasswords(Type):
362 _toSchema = {'changes': 'changes'}
363 _toPy = {'changes': 'changes'}
364 def __init__(self, changes=None):
365 '''
366 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
367 '''
368 self.changes = [EntityPassword.from_json(o) for o in changes or []]
369
370
371 class ErrorResult(Type):
372 _toSchema = {'error': 'error'}
373 _toPy = {'error': 'error'}
374 def __init__(self, error=None):
375 '''
376 error : Error
377 '''
378 self.error = Error.from_json(error) if error else None
379
380
381 class ErrorResults(Type):
382 _toSchema = {'results': 'results'}
383 _toPy = {'results': 'results'}
384 def __init__(self, results=None):
385 '''
386 results : typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
387 '''
388 self.results = [ErrorResult.from_json(o) for o in results or []]
389
390
391 class IsMasterResult(Type):
392 _toSchema = {'master': 'master'}
393 _toPy = {'master': 'master'}
394 def __init__(self, master=None):
395 '''
396 master : bool
397 '''
398 self.master = master
399
400
401 class ModelConfigResult(Type):
402 _toSchema = {'config': 'config'}
403 _toPy = {'config': 'config'}
404 def __init__(self, config=None):
405 '''
406 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
407 '''
408 self.config = config
409
410
411 class NotifyWatchResult(Type):
412 _toSchema = {'notifywatcherid': 'NotifyWatcherId', 'error': 'error'}
413 _toPy = {'NotifyWatcherId': 'notifywatcherid', 'error': 'error'}
414 def __init__(self, notifywatcherid=None, error=None):
415 '''
416 notifywatcherid : str
417 error : Error
418 '''
419 self.notifywatcherid = notifywatcherid
420 self.error = Error.from_json(error) if error else None
421
422
423 class StateServingInfo(Type):
424 _toSchema = {'shared_secret': 'shared-secret', 'state_port': 'state-port', 'system_identity': 'system-identity', 'private_key': 'private-key', 'cert': 'cert', 'ca_private_key': 'ca-private-key', 'api_port': 'api-port'}
425 _toPy = {'state-port': 'state_port', 'ca-private-key': 'ca_private_key', 'api-port': 'api_port', 'shared-secret': 'shared_secret', 'system-identity': 'system_identity', 'private-key': 'private_key', 'cert': 'cert'}
426 def __init__(self, api_port=None, ca_private_key=None, cert=None, private_key=None, shared_secret=None, state_port=None, system_identity=None):
427 '''
428 api_port : int
429 ca_private_key : str
430 cert : str
431 private_key : str
432 shared_secret : str
433 state_port : int
434 system_identity : str
435 '''
436 self.api_port = api_port
437 self.ca_private_key = ca_private_key
438 self.cert = cert
439 self.private_key = private_key
440 self.shared_secret = shared_secret
441 self.state_port = state_port
442 self.system_identity = system_identity
443
444
445 class AllWatcherNextResults(Type):
446 _toSchema = {'deltas': 'deltas'}
447 _toPy = {'deltas': 'deltas'}
448 def __init__(self, deltas=None):
449 '''
450 deltas : typing.Sequence<+T_co>[~Delta]<~Delta>
451 '''
452 self.deltas = [Delta.from_json(o) for o in deltas or []]
453
454
455 class Delta(Type):
456 _toSchema = {'entity': 'entity', 'removed': 'removed'}
457 _toPy = {'entity': 'entity', 'removed': 'removed'}
458 def __init__(self, entity=None, removed=None):
459 '''
460 entity : typing.Mapping<~KT, +VT_co>[str, typing.Any]
461 removed : bool
462 '''
463 self.entity = entity
464 self.removed = removed
465
466
467 class AnnotationsGetResult(Type):
468 _toSchema = {'annotations': 'annotations', 'entity': 'entity', 'error': 'error'}
469 _toPy = {'annotations': 'annotations', 'entity': 'entity', 'error': 'error'}
470 def __init__(self, annotations=None, entity=None, error=None):
471 '''
472 annotations : typing.Mapping<~KT, +VT_co>[str, str]
473 entity : str
474 error : ErrorResult
475 '''
476 self.annotations = annotations
477 self.entity = entity
478 self.error = ErrorResult.from_json(error) if error else None
479
480
481 class AnnotationsGetResults(Type):
482 _toSchema = {'results': 'results'}
483 _toPy = {'results': 'results'}
484 def __init__(self, results=None):
485 '''
486 results : typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult>
487 '''
488 self.results = [AnnotationsGetResult.from_json(o) for o in results or []]
489
490
491 class AnnotationsSet(Type):
492 _toSchema = {'annotations': 'annotations'}
493 _toPy = {'annotations': 'annotations'}
494 def __init__(self, annotations=None):
495 '''
496 annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations>
497 '''
498 self.annotations = [EntityAnnotations.from_json(o) for o in annotations or []]
499
500
501 class EntityAnnotations(Type):
502 _toSchema = {'annotations': 'annotations', 'entity': 'entity'}
503 _toPy = {'annotations': 'annotations', 'entity': 'entity'}
504 def __init__(self, annotations=None, entity=None):
505 '''
506 annotations : typing.Mapping<~KT, +VT_co>[str, str]
507 entity : str
508 '''
509 self.annotations = annotations
510 self.entity = entity
511
512
513 class AddApplicationUnits(Type):
514 _toSchema = {'application': 'application', 'placement': 'placement', 'num_units': 'num-units'}
515 _toPy = {'application': 'application', 'num-units': 'num_units', 'placement': 'placement'}
516 def __init__(self, application=None, num_units=None, placement=None):
517 '''
518 application : str
519 num_units : int
520 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
521 '''
522 self.application = application
523 self.num_units = num_units
524 self.placement = [Placement.from_json(o) for o in placement or []]
525
526
527 class AddApplicationUnitsResults(Type):
528 _toSchema = {'units': 'units'}
529 _toPy = {'units': 'units'}
530 def __init__(self, units=None):
531 '''
532 units : typing.Sequence<+T_co>[str]
533 '''
534 self.units = units
535
536
537 class AddRelation(Type):
538 _toSchema = {'endpoints': 'endpoints'}
539 _toPy = {'endpoints': 'endpoints'}
540 def __init__(self, endpoints=None):
541 '''
542 endpoints : typing.Sequence<+T_co>[str]
543 '''
544 self.endpoints = endpoints
545
546
547 class AddRelationResults(Type):
548 _toSchema = {'endpoints': 'endpoints'}
549 _toPy = {'endpoints': 'endpoints'}
550 def __init__(self, endpoints=None):
551 '''
552 endpoints : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
553 '''
554 self.endpoints = endpoints
555
556
557 class ApplicationCharmRelations(Type):
558 _toSchema = {'application': 'application'}
559 _toPy = {'application': 'application'}
560 def __init__(self, application=None):
561 '''
562 application : str
563 '''
564 self.application = application
565
566
567 class ApplicationCharmRelationsResults(Type):
568 _toSchema = {'charm_relations': 'charm-relations'}
569 _toPy = {'charm-relations': 'charm_relations'}
570 def __init__(self, charm_relations=None):
571 '''
572 charm_relations : typing.Sequence<+T_co>[str]
573 '''
574 self.charm_relations = charm_relations
575
576
577 class ApplicationDeploy(Type):
578 _toSchema = {'storage': 'storage', 'config': 'config', 'endpoint_bindings': 'endpoint-bindings', 'num_units': 'num-units', 'placement': 'placement', 'series': 'series', 'charm_url': 'charm-url', 'config_yaml': 'config-yaml', 'constraints': 'constraints', 'application': 'application', 'resources': 'resources', 'channel': 'channel'}
579 _toPy = {'storage': 'storage', 'config': 'config', 'num-units': 'num_units', 'series': 'series', 'placement': 'placement', 'config-yaml': 'config_yaml', 'constraints': 'constraints', 'charm-url': 'charm_url', 'application': 'application', 'resources': 'resources', 'endpoint-bindings': 'endpoint_bindings', 'channel': 'channel'}
580 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):
581 '''
582 application : str
583 channel : str
584 charm_url : str
585 config : typing.Mapping<~KT, +VT_co>[str, str]
586 config_yaml : str
587 constraints : Value
588 endpoint_bindings : typing.Mapping<~KT, +VT_co>[str, str]
589 num_units : int
590 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
591 resources : typing.Mapping<~KT, +VT_co>[str, str]
592 series : str
593 storage : typing.Mapping<~KT, +VT_co>[str, ~Constraints]<~Constraints>
594 '''
595 self.application = application
596 self.channel = channel
597 self.charm_url = charm_url
598 self.config = config
599 self.config_yaml = config_yaml
600 self.constraints = Value.from_json(constraints) if constraints else None
601 self.endpoint_bindings = endpoint_bindings
602 self.num_units = num_units
603 self.placement = [Placement.from_json(o) for o in placement or []]
604 self.resources = resources
605 self.series = series
606 self.storage = storage
607
608
609 class ApplicationDestroy(Type):
610 _toSchema = {'application': 'application'}
611 _toPy = {'application': 'application'}
612 def __init__(self, application=None):
613 '''
614 application : str
615 '''
616 self.application = application
617
618
619 class ApplicationExpose(Type):
620 _toSchema = {'application': 'application'}
621 _toPy = {'application': 'application'}
622 def __init__(self, application=None):
623 '''
624 application : str
625 '''
626 self.application = application
627
628
629 class ApplicationGet(Type):
630 _toSchema = {'application': 'application'}
631 _toPy = {'application': 'application'}
632 def __init__(self, application=None):
633 '''
634 application : str
635 '''
636 self.application = application
637
638
639 class ApplicationGetResults(Type):
640 _toSchema = {'series': 'series', 'application': 'application', 'config': 'config', 'charm': 'charm', 'constraints': 'constraints'}
641 _toPy = {'series': 'series', 'application': 'application', 'config': 'config', 'charm': 'charm', 'constraints': 'constraints'}
642 def __init__(self, application=None, charm=None, config=None, constraints=None, series=None):
643 '''
644 application : str
645 charm : str
646 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
647 constraints : Value
648 series : str
649 '''
650 self.application = application
651 self.charm = charm
652 self.config = config
653 self.constraints = Value.from_json(constraints) if constraints else None
654 self.series = series
655
656
657 class ApplicationMetricCredential(Type):
658 _toSchema = {'metrics_credentials': 'metrics-credentials', 'application': 'application'}
659 _toPy = {'application': 'application', 'metrics-credentials': 'metrics_credentials'}
660 def __init__(self, application=None, metrics_credentials=None):
661 '''
662 application : str
663 metrics_credentials : typing.Sequence<+T_co>[int]
664 '''
665 self.application = application
666 self.metrics_credentials = metrics_credentials
667
668
669 class ApplicationMetricCredentials(Type):
670 _toSchema = {'creds': 'creds'}
671 _toPy = {'creds': 'creds'}
672 def __init__(self, creds=None):
673 '''
674 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
675 '''
676 self.creds = [ApplicationMetricCredential.from_json(o) for o in creds or []]
677
678
679 class ApplicationSet(Type):
680 _toSchema = {'application': 'application', 'options': 'options'}
681 _toPy = {'application': 'application', 'options': 'options'}
682 def __init__(self, application=None, options=None):
683 '''
684 application : str
685 options : typing.Mapping<~KT, +VT_co>[str, str]
686 '''
687 self.application = application
688 self.options = options
689
690
691 class ApplicationSetCharm(Type):
692 _toSchema = {'charm_url': 'charm-url', 'force_units': 'force-units', 'resource_ids': 'resource-ids', 'application': 'application', 'force_series': 'force-series', 'channel': 'channel'}
693 _toPy = {'force-series': 'force_series', 'resource-ids': 'resource_ids', 'force-units': 'force_units', 'charm-url': 'charm_url', 'application': 'application', 'channel': 'channel'}
694 def __init__(self, application=None, channel=None, charm_url=None, force_series=None, force_units=None, resource_ids=None):
695 '''
696 application : str
697 channel : str
698 charm_url : str
699 force_series : bool
700 force_units : bool
701 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
702 '''
703 self.application = application
704 self.channel = channel
705 self.charm_url = charm_url
706 self.force_series = force_series
707 self.force_units = force_units
708 self.resource_ids = resource_ids
709
710
711 class ApplicationUnexpose(Type):
712 _toSchema = {'application': 'application'}
713 _toPy = {'application': 'application'}
714 def __init__(self, application=None):
715 '''
716 application : str
717 '''
718 self.application = application
719
720
721 class ApplicationUnset(Type):
722 _toSchema = {'application': 'application', 'options': 'options'}
723 _toPy = {'application': 'application', 'options': 'options'}
724 def __init__(self, application=None, options=None):
725 '''
726 application : str
727 options : typing.Sequence<+T_co>[str]
728 '''
729 self.application = application
730 self.options = options
731
732
733 class ApplicationUpdate(Type):
734 _toSchema = {'charm_url': 'charm-url', 'force_charm_url': 'force-charm-url', 'settings_yaml': 'settings-yaml', 'constraints': 'constraints', 'min_units': 'min-units', 'application': 'application', 'force_series': 'force-series', 'settings': 'settings'}
735 _toPy = {'force-series': 'force_series', 'force-charm-url': 'force_charm_url', 'settings-yaml': 'settings_yaml', 'constraints': 'constraints', 'charm-url': 'charm_url', 'application': 'application', 'min-units': 'min_units', 'settings': 'settings'}
736 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):
737 '''
738 application : str
739 charm_url : str
740 constraints : Value
741 force_charm_url : bool
742 force_series : bool
743 min_units : int
744 settings : typing.Mapping<~KT, +VT_co>[str, str]
745 settings_yaml : str
746 '''
747 self.application = application
748 self.charm_url = charm_url
749 self.constraints = Value.from_json(constraints) if constraints else None
750 self.force_charm_url = force_charm_url
751 self.force_series = force_series
752 self.min_units = min_units
753 self.settings = settings
754 self.settings_yaml = settings_yaml
755
756
757 class ApplicationsDeploy(Type):
758 _toSchema = {'applications': 'applications'}
759 _toPy = {'applications': 'applications'}
760 def __init__(self, applications=None):
761 '''
762 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
763 '''
764 self.applications = [ApplicationDeploy.from_json(o) for o in applications or []]
765
766
767 class CharmRelation(Type):
768 _toSchema = {'role': 'role', 'limit': 'limit', 'scope': 'scope', 'interface': 'interface', 'optional': 'optional', 'name': 'name'}
769 _toPy = {'role': 'role', 'limit': 'limit', 'scope': 'scope', 'interface': 'interface', 'optional': 'optional', 'name': 'name'}
770 def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None):
771 '''
772 interface : str
773 limit : int
774 name : str
775 optional : bool
776 role : str
777 scope : str
778 '''
779 self.interface = interface
780 self.limit = limit
781 self.name = name
782 self.optional = optional
783 self.role = role
784 self.scope = scope
785
786
787 class Constraints(Type):
788 _toSchema = {'size': 'Size', 'pool': 'Pool', 'count': 'Count'}
789 _toPy = {'Count': 'count', 'Size': 'size', 'Pool': 'pool'}
790 def __init__(self, count=None, pool=None, size=None):
791 '''
792 count : int
793 pool : str
794 size : int
795 '''
796 self.count = count
797 self.pool = pool
798 self.size = size
799
800
801 class DestroyApplicationUnits(Type):
802 _toSchema = {'unit_names': 'unit-names'}
803 _toPy = {'unit-names': 'unit_names'}
804 def __init__(self, unit_names=None):
805 '''
806 unit_names : typing.Sequence<+T_co>[str]
807 '''
808 self.unit_names = unit_names
809
810
811 class DestroyRelation(Type):
812 _toSchema = {'endpoints': 'endpoints'}
813 _toPy = {'endpoints': 'endpoints'}
814 def __init__(self, endpoints=None):
815 '''
816 endpoints : typing.Sequence<+T_co>[str]
817 '''
818 self.endpoints = endpoints
819
820
821 class GetApplicationConstraints(Type):
822 _toSchema = {'application': 'application'}
823 _toPy = {'application': 'application'}
824 def __init__(self, application=None):
825 '''
826 application : str
827 '''
828 self.application = application
829
830
831 class GetConstraintsResults(Type):
832 _toSchema = {'constraints': 'constraints'}
833 _toPy = {'constraints': 'constraints'}
834 def __init__(self, constraints=None):
835 '''
836 constraints : Value
837 '''
838 self.constraints = Value.from_json(constraints) if constraints else None
839
840
841 class Placement(Type):
842 _toSchema = {'scope': 'scope', 'directive': 'directive'}
843 _toPy = {'scope': 'scope', 'directive': 'directive'}
844 def __init__(self, directive=None, scope=None):
845 '''
846 directive : str
847 scope : str
848 '''
849 self.directive = directive
850 self.scope = scope
851
852
853 class SetConstraints(Type):
854 _toSchema = {'application': 'application', 'constraints': 'constraints'}
855 _toPy = {'application': 'application', 'constraints': 'constraints'}
856 def __init__(self, application=None, constraints=None):
857 '''
858 application : str
859 constraints : Value
860 '''
861 self.application = application
862 self.constraints = Value.from_json(constraints) if constraints else None
863
864
865 class StringResult(Type):
866 _toSchema = {'result': 'result', 'error': 'error'}
867 _toPy = {'result': 'result', 'error': 'error'}
868 def __init__(self, error=None, result=None):
869 '''
870 error : Error
871 result : str
872 '''
873 self.error = Error.from_json(error) if error else None
874 self.result = result
875
876
877 class Value(Type):
878 _toSchema = {'root_disk': 'root-disk', 'instance_type': 'instance-type', 'container': 'container', 'cpu_power': 'cpu-power', 'tags': 'tags', 'cpu_cores': 'cpu-cores', 'spaces': 'spaces', 'virt_type': 'virt-type', 'arch': 'arch', 'mem': 'mem'}
879 _toPy = {'root-disk': 'root_disk', 'container': 'container', 'virt-type': 'virt_type', 'tags': 'tags', 'spaces': 'spaces', 'arch': 'arch', 'cpu-cores': 'cpu_cores', 'instance-type': 'instance_type', 'mem': 'mem', 'cpu-power': 'cpu_power'}
880 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):
881 '''
882 arch : str
883 container : str
884 cpu_cores : int
885 cpu_power : int
886 instance_type : str
887 mem : int
888 root_disk : int
889 spaces : typing.Sequence<+T_co>[str]
890 tags : typing.Sequence<+T_co>[str]
891 virt_type : str
892 '''
893 self.arch = arch
894 self.container = container
895 self.cpu_cores = cpu_cores
896 self.cpu_power = cpu_power
897 self.instance_type = instance_type
898 self.mem = mem
899 self.root_disk = root_disk
900 self.spaces = spaces
901 self.tags = tags
902 self.virt_type = virt_type
903
904
905 class StringsWatchResult(Type):
906 _toSchema = {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'}
907 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
908 def __init__(self, changes=None, error=None, watcher_id=None):
909 '''
910 changes : typing.Sequence<+T_co>[str]
911 error : Error
912 watcher_id : str
913 '''
914 self.changes = changes
915 self.error = Error.from_json(error) if error else None
916 self.watcher_id = watcher_id
917
918
919 class BackupsCreateArgs(Type):
920 _toSchema = {'notes': 'notes'}
921 _toPy = {'notes': 'notes'}
922 def __init__(self, notes=None):
923 '''
924 notes : str
925 '''
926 self.notes = notes
927
928
929 class BackupsInfoArgs(Type):
930 _toSchema = {'id_': 'id'}
931 _toPy = {'id': 'id_'}
932 def __init__(self, id_=None):
933 '''
934 id_ : str
935 '''
936 self.id_ = id_
937
938
939 class BackupsListArgs(Type):
940 _toSchema = {}
941 _toPy = {}
942 def __init__(self):
943 '''
944
945 '''
946 pass
947
948
949 class BackupsListResult(Type):
950 _toSchema = {'list_': 'list'}
951 _toPy = {'list': 'list_'}
952 def __init__(self, list_=None):
953 '''
954 list_ : typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
955 '''
956 self.list_ = [BackupsMetadataResult.from_json(o) for o in list_ or []]
957
958
959 class BackupsMetadataResult(Type):
960 _toSchema = {'model': 'model', 'finished': 'finished', 'ca_cert': 'ca-cert', 'ca_private_key': 'ca-private-key', 'machine': 'machine', 'series': 'series', 'checksum_format': 'checksum-format', 'version': 'version', 'started': 'started', 'stored': 'stored', 'checksum': 'checksum', 'size': 'size', 'notes': 'notes', 'hostname': 'hostname', 'id_': 'id'}
961 _toPy = {'model': 'model', 'checksum-format': 'checksum_format', 'finished': 'finished', 'ca-private-key': 'ca_private_key', 'started': 'started', 'machine': 'machine', 'series': 'series', 'version': 'version', 'ca-cert': 'ca_cert', 'stored': 'stored', 'checksum': 'checksum', 'size': 'size', 'notes': 'notes', 'hostname': 'hostname', 'id': 'id_'}
962 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):
963 '''
964 ca_cert : str
965 ca_private_key : str
966 checksum : str
967 checksum_format : str
968 finished : str
969 hostname : str
970 id_ : str
971 machine : str
972 model : str
973 notes : str
974 series : str
975 size : int
976 started : str
977 stored : str
978 version : Number
979 '''
980 self.ca_cert = ca_cert
981 self.ca_private_key = ca_private_key
982 self.checksum = checksum
983 self.checksum_format = checksum_format
984 self.finished = finished
985 self.hostname = hostname
986 self.id_ = id_
987 self.machine = machine
988 self.model = model
989 self.notes = notes
990 self.series = series
991 self.size = size
992 self.started = started
993 self.stored = stored
994 self.version = Number.from_json(version) if version else None
995
996
997 class BackupsRemoveArgs(Type):
998 _toSchema = {'id_': 'id'}
999 _toPy = {'id': 'id_'}
1000 def __init__(self, id_=None):
1001 '''
1002 id_ : str
1003 '''
1004 self.id_ = id_
1005
1006
1007 class Number(Type):
1008 _toSchema = {'patch': 'Patch', 'minor': 'Minor', 'build': 'Build', 'tag': 'Tag', 'major': 'Major'}
1009 _toPy = {'Tag': 'tag', 'Major': 'major', 'Build': 'build', 'Patch': 'patch', 'Minor': 'minor'}
1010 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
1011 '''
1012 build : int
1013 major : int
1014 minor : int
1015 patch : int
1016 tag : str
1017 '''
1018 self.build = build
1019 self.major = major
1020 self.minor = minor
1021 self.patch = patch
1022 self.tag = tag
1023
1024
1025 class RestoreArgs(Type):
1026 _toSchema = {'backup_id': 'backup-id'}
1027 _toPy = {'backup-id': 'backup_id'}
1028 def __init__(self, backup_id=None):
1029 '''
1030 backup_id : str
1031 '''
1032 self.backup_id = backup_id
1033
1034
1035 class Block(Type):
1036 _toSchema = {'tag': 'tag', 'type_': 'type', 'id_': 'id', 'message': 'message'}
1037 _toPy = {'tag': 'tag', 'message': 'message', 'type': 'type_', 'id': 'id_'}
1038 def __init__(self, id_=None, message=None, tag=None, type_=None):
1039 '''
1040 id_ : str
1041 message : str
1042 tag : str
1043 type_ : str
1044 '''
1045 self.id_ = id_
1046 self.message = message
1047 self.tag = tag
1048 self.type_ = type_
1049
1050
1051 class BlockResult(Type):
1052 _toSchema = {'result': 'result', 'error': 'error'}
1053 _toPy = {'result': 'result', 'error': 'error'}
1054 def __init__(self, error=None, result=None):
1055 '''
1056 error : Error
1057 result : Block
1058 '''
1059 self.error = Error.from_json(error) if error else None
1060 self.result = Block.from_json(result) if result else None
1061
1062
1063 class BlockResults(Type):
1064 _toSchema = {'results': 'results'}
1065 _toPy = {'results': 'results'}
1066 def __init__(self, results=None):
1067 '''
1068 results : typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
1069 '''
1070 self.results = [BlockResult.from_json(o) for o in results or []]
1071
1072
1073 class BlockSwitchParams(Type):
1074 _toSchema = {'type_': 'type', 'message': 'message'}
1075 _toPy = {'type': 'type_', 'message': 'message'}
1076 def __init__(self, message=None, type_=None):
1077 '''
1078 message : str
1079 type_ : str
1080 '''
1081 self.message = message
1082 self.type_ = type_
1083
1084
1085 class CharmActionSpec(Type):
1086 _toSchema = {'description': 'description', 'params': 'params'}
1087 _toPy = {'description': 'description', 'params': 'params'}
1088 def __init__(self, description=None, params=None):
1089 '''
1090 description : str
1091 params : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1092 '''
1093 self.description = description
1094 self.params = params
1095
1096
1097 class CharmActions(Type):
1098 _toSchema = {'specs': 'specs'}
1099 _toPy = {'specs': 'specs'}
1100 def __init__(self, specs=None):
1101 '''
1102 specs : typing.Mapping<~KT, +VT_co>[str, ~CharmActionSpec]<~CharmActionSpec>
1103 '''
1104 self.specs = specs
1105
1106
1107 class CharmInfo(Type):
1108 _toSchema = {'actions': 'actions', 'meta': 'meta', 'metrics': 'metrics', 'url': 'url', 'config': 'config', 'revision': 'revision'}
1109 _toPy = {'actions': 'actions', 'meta': 'meta', 'metrics': 'metrics', 'url': 'url', 'config': 'config', 'revision': 'revision'}
1110 def __init__(self, actions=None, config=None, meta=None, metrics=None, revision=None, url=None):
1111 '''
1112 actions : CharmActions
1113 config : typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>
1114 meta : CharmMeta
1115 metrics : CharmMetrics
1116 revision : int
1117 url : str
1118 '''
1119 self.actions = CharmActions.from_json(actions) if actions else None
1120 self.config = config
1121 self.meta = CharmMeta.from_json(meta) if meta else None
1122 self.metrics = CharmMetrics.from_json(metrics) if metrics else None
1123 self.revision = revision
1124 self.url = url
1125
1126
1127 class CharmMeta(Type):
1128 _toSchema = {'tags': 'tags', 'storage': 'storage', 'payload_classes': 'payload-classes', 'min_juju_version': 'min-juju-version', 'requires': 'requires', 'subordinate': 'subordinate', 'series': 'series', 'categories': 'categories', 'terms': 'terms', 'extra_bindings': 'extra-bindings', 'provides': 'provides', 'summary': 'summary', 'resources': 'resources', 'description': 'description', 'name': 'name', 'peers': 'peers'}
1129 _toPy = {'tags': 'tags', 'storage': 'storage', 'subordinate': 'subordinate', 'requires': 'requires', 'description': 'description', 'min-juju-version': 'min_juju_version', 'series': 'series', 'categories': 'categories', 'terms': 'terms', 'payload-classes': 'payload_classes', 'provides': 'provides', 'summary': 'summary', 'resources': 'resources', 'extra-bindings': 'extra_bindings', 'name': 'name', 'peers': 'peers'}
1130 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):
1131 '''
1132 categories : typing.Sequence<+T_co>[str]
1133 description : str
1134 extra_bindings : typing.Mapping<~KT, +VT_co>[str, str]
1135 min_juju_version : str
1136 name : str
1137 payload_classes : typing.Mapping<~KT, +VT_co>[str, ~CharmPayloadClass]<~CharmPayloadClass>
1138 peers : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1139 provides : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1140 requires : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1141 resources : typing.Mapping<~KT, +VT_co>[str, ~CharmResourceMeta]<~CharmResourceMeta>
1142 series : typing.Sequence<+T_co>[str]
1143 storage : typing.Mapping<~KT, +VT_co>[str, ~CharmStorage]<~CharmStorage>
1144 subordinate : bool
1145 summary : str
1146 tags : typing.Sequence<+T_co>[str]
1147 terms : typing.Sequence<+T_co>[str]
1148 '''
1149 self.categories = categories
1150 self.description = description
1151 self.extra_bindings = extra_bindings
1152 self.min_juju_version = min_juju_version
1153 self.name = name
1154 self.payload_classes = payload_classes
1155 self.peers = peers
1156 self.provides = provides
1157 self.requires = requires
1158 self.resources = resources
1159 self.series = series
1160 self.storage = storage
1161 self.subordinate = subordinate
1162 self.summary = summary
1163 self.tags = tags
1164 self.terms = terms
1165
1166
1167 class CharmMetric(Type):
1168 _toSchema = {'type_': 'type', 'description': 'description'}
1169 _toPy = {'description': 'description', 'type': 'type_'}
1170 def __init__(self, description=None, type_=None):
1171 '''
1172 description : str
1173 type_ : str
1174 '''
1175 self.description = description
1176 self.type_ = type_
1177
1178
1179 class CharmMetrics(Type):
1180 _toSchema = {'plan': 'plan', 'metrics': 'metrics'}
1181 _toPy = {'plan': 'plan', 'metrics': 'metrics'}
1182 def __init__(self, metrics=None, plan=None):
1183 '''
1184 metrics : typing.Mapping<~KT, +VT_co>[str, ~CharmMetric]<~CharmMetric>
1185 plan : CharmPlan
1186 '''
1187 self.metrics = metrics
1188 self.plan = CharmPlan.from_json(plan) if plan else None
1189
1190
1191 class CharmOption(Type):
1192 _toSchema = {'type_': 'type', 'default': 'default', 'description': 'description'}
1193 _toPy = {'default': 'default', 'description': 'description', 'type': 'type_'}
1194 def __init__(self, default=None, description=None, type_=None):
1195 '''
1196 default : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1197 description : str
1198 type_ : str
1199 '''
1200 self.default = default
1201 self.description = description
1202 self.type_ = type_
1203
1204
1205 class CharmPayloadClass(Type):
1206 _toSchema = {'type_': 'type', 'name': 'name'}
1207 _toPy = {'name': 'name', 'type': 'type_'}
1208 def __init__(self, name=None, type_=None):
1209 '''
1210 name : str
1211 type_ : str
1212 '''
1213 self.name = name
1214 self.type_ = type_
1215
1216
1217 class CharmPlan(Type):
1218 _toSchema = {'required': 'required'}
1219 _toPy = {'required': 'required'}
1220 def __init__(self, required=None):
1221 '''
1222 required : bool
1223 '''
1224 self.required = required
1225
1226
1227 class CharmResourceMeta(Type):
1228 _toSchema = {'path': 'path', 'type_': 'type', 'description': 'description', 'name': 'name'}
1229 _toPy = {'path': 'path', 'description': 'description', 'name': 'name', 'type': 'type_'}
1230 def __init__(self, description=None, name=None, path=None, type_=None):
1231 '''
1232 description : str
1233 name : str
1234 path : str
1235 type_ : str
1236 '''
1237 self.description = description
1238 self.name = name
1239 self.path = path
1240 self.type_ = type_
1241
1242
1243 class CharmStorage(Type):
1244 _toSchema = {'name': 'name', 'properties': 'properties', 'shared': 'shared', 'read_only': 'read-only', 'type_': 'type', 'minimum_size': 'minimum-size', 'count_max': 'count-max', 'description': 'description', 'count_min': 'count-min', 'location': 'location'}
1245 _toPy = {'properties': 'properties', 'shared': 'shared', 'read-only': 'read_only', 'minimum-size': 'minimum_size', 'count-max': 'count_max', 'count-min': 'count_min', 'description': 'description', 'location': 'location', 'type': 'type_', 'name': 'name'}
1246 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):
1247 '''
1248 count_max : int
1249 count_min : int
1250 description : str
1251 location : str
1252 minimum_size : int
1253 name : str
1254 properties : typing.Sequence<+T_co>[str]
1255 read_only : bool
1256 shared : bool
1257 type_ : str
1258 '''
1259 self.count_max = count_max
1260 self.count_min = count_min
1261 self.description = description
1262 self.location = location
1263 self.minimum_size = minimum_size
1264 self.name = name
1265 self.properties = properties
1266 self.read_only = read_only
1267 self.shared = shared
1268 self.type_ = type_
1269
1270
1271 class CharmURL(Type):
1272 _toSchema = {'url': 'url'}
1273 _toPy = {'url': 'url'}
1274 def __init__(self, url=None):
1275 '''
1276 url : str
1277 '''
1278 self.url = url
1279
1280
1281 class CharmsList(Type):
1282 _toSchema = {'names': 'names'}
1283 _toPy = {'names': 'names'}
1284 def __init__(self, names=None):
1285 '''
1286 names : typing.Sequence<+T_co>[str]
1287 '''
1288 self.names = names
1289
1290
1291 class CharmsListResult(Type):
1292 _toSchema = {'charm_urls': 'charm-urls'}
1293 _toPy = {'charm-urls': 'charm_urls'}
1294 def __init__(self, charm_urls=None):
1295 '''
1296 charm_urls : typing.Sequence<+T_co>[str]
1297 '''
1298 self.charm_urls = charm_urls
1299
1300
1301 class IsMeteredResult(Type):
1302 _toSchema = {'metered': 'metered'}
1303 _toPy = {'metered': 'metered'}
1304 def __init__(self, metered=None):
1305 '''
1306 metered : bool
1307 '''
1308 self.metered = metered
1309
1310
1311 class APIHostPortsResult(Type):
1312 _toSchema = {'servers': 'servers'}
1313 _toPy = {'servers': 'servers'}
1314 def __init__(self, servers=None):
1315 '''
1316 servers : typing.Sequence<+T_co>[~HostPort]<~HostPort>
1317 '''
1318 self.servers = [HostPort.from_json(o) for o in servers or []]
1319
1320
1321 class AddCharm(Type):
1322 _toSchema = {'url': 'url', 'channel': 'channel'}
1323 _toPy = {'url': 'url', 'channel': 'channel'}
1324 def __init__(self, channel=None, url=None):
1325 '''
1326 channel : str
1327 url : str
1328 '''
1329 self.channel = channel
1330 self.url = url
1331
1332
1333 class AddCharmWithAuthorization(Type):
1334 _toSchema = {'macaroon': 'macaroon', 'url': 'url', 'channel': 'channel'}
1335 _toPy = {'macaroon': 'macaroon', 'url': 'url', 'channel': 'channel'}
1336 def __init__(self, channel=None, macaroon=None, url=None):
1337 '''
1338 channel : str
1339 macaroon : Macaroon
1340 url : str
1341 '''
1342 self.channel = channel
1343 self.macaroon = Macaroon.from_json(macaroon) if macaroon else None
1344 self.url = url
1345
1346
1347 class AddMachineParams(Type):
1348 _toSchema = {'series': 'series', 'placement': 'placement', 'jobs': 'jobs', 'parent_id': 'parent-id', 'hardware_characteristics': 'hardware-characteristics', 'constraints': 'constraints', 'instance_id': 'instance-id', 'container_type': 'container-type', 'disks': 'disks', 'nonce': 'nonce', 'addresses': 'addresses'}
1349 _toPy = {'parent-id': 'parent_id', 'placement': 'placement', 'container-type': 'container_type', 'series': 'series', 'constraints': 'constraints', 'instance-id': 'instance_id', 'jobs': 'jobs', 'addresses': 'addresses', 'hardware-characteristics': 'hardware_characteristics', 'nonce': 'nonce', 'disks': 'disks'}
1350 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):
1351 '''
1352 addresses : typing.Sequence<+T_co>[~Address]<~Address>
1353 constraints : Value
1354 container_type : str
1355 disks : typing.Sequence<+T_co>[~Constraints]<~Constraints>
1356 hardware_characteristics : HardwareCharacteristics
1357 instance_id : str
1358 jobs : typing.Sequence<+T_co>[str]
1359 nonce : str
1360 parent_id : str
1361 placement : Placement
1362 series : str
1363 '''
1364 self.addresses = [Address.from_json(o) for o in addresses or []]
1365 self.constraints = Value.from_json(constraints) if constraints else None
1366 self.container_type = container_type
1367 self.disks = [Constraints.from_json(o) for o in disks or []]
1368 self.hardware_characteristics = HardwareCharacteristics.from_json(hardware_characteristics) if hardware_characteristics else None
1369 self.instance_id = instance_id
1370 self.jobs = jobs
1371 self.nonce = nonce
1372 self.parent_id = parent_id
1373 self.placement = Placement.from_json(placement) if placement else None
1374 self.series = series
1375
1376
1377 class AddMachines(Type):
1378 _toSchema = {'params': 'params'}
1379 _toPy = {'params': 'params'}
1380 def __init__(self, params=None):
1381 '''
1382 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1383 '''
1384 self.params = [AddMachineParams.from_json(o) for o in params or []]
1385
1386
1387 class AddMachinesResult(Type):
1388 _toSchema = {'machine': 'machine', 'error': 'error'}
1389 _toPy = {'machine': 'machine', 'error': 'error'}
1390 def __init__(self, error=None, machine=None):
1391 '''
1392 error : Error
1393 machine : str
1394 '''
1395 self.error = Error.from_json(error) if error else None
1396 self.machine = machine
1397
1398
1399 class AddMachinesResults(Type):
1400 _toSchema = {'machines': 'machines'}
1401 _toPy = {'machines': 'machines'}
1402 def __init__(self, machines=None):
1403 '''
1404 machines : typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1405 '''
1406 self.machines = [AddMachinesResult.from_json(o) for o in machines or []]
1407
1408
1409 class Address(Type):
1410 _toSchema = {'scope': 'scope', 'type_': 'type', 'value': 'value', 'space_name': 'space-name'}
1411 _toPy = {'scope': 'scope', 'space-name': 'space_name', 'value': 'value', 'type': 'type_'}
1412 def __init__(self, scope=None, space_name=None, type_=None, value=None):
1413 '''
1414 scope : str
1415 space_name : str
1416 type_ : str
1417 value : str
1418 '''
1419 self.scope = scope
1420 self.space_name = space_name
1421 self.type_ = type_
1422 self.value = value
1423
1424
1425 class AgentVersionResult(Type):
1426 _toSchema = {'version': 'version'}
1427 _toPy = {'version': 'version'}
1428 def __init__(self, version=None):
1429 '''
1430 version : Number
1431 '''
1432 self.version = Number.from_json(version) if version else None
1433
1434
1435 class AllWatcherId(Type):
1436 _toSchema = {'watcher_id': 'watcher-id'}
1437 _toPy = {'watcher-id': 'watcher_id'}
1438 def __init__(self, watcher_id=None):
1439 '''
1440 watcher_id : str
1441 '''
1442 self.watcher_id = watcher_id
1443
1444
1445 class ApplicationStatus(Type):
1446 _toSchema = {'status': 'status', 'charm': 'charm', 'relations': 'relations', 'subordinate_to': 'subordinate-to', 'err': 'err', 'series': 'series', 'exposed': 'exposed', 'workload_version': 'workload-version', 'can_upgrade_to': 'can-upgrade-to', 'meter_statuses': 'meter-statuses', 'life': 'life', 'units': 'units'}
1447 _toPy = {'status': 'status', 'charm': 'charm', 'can-upgrade-to': 'can_upgrade_to', 'relations': 'relations', 'workload-version': 'workload_version', 'err': 'err', 'series': 'series', 'exposed': 'exposed', 'meter-statuses': 'meter_statuses', 'life': 'life', 'subordinate-to': 'subordinate_to', 'units': 'units'}
1448 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):
1449 '''
1450 can_upgrade_to : str
1451 charm : str
1452 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1453 exposed : bool
1454 life : str
1455 meter_statuses : typing.Mapping<~KT, +VT_co>[str, ~MeterStatus]<~MeterStatus>
1456 relations : typing.Sequence<+T_co>[str]
1457 series : str
1458 status : DetailedStatus
1459 subordinate_to : typing.Sequence<+T_co>[str]
1460 units : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus>
1461 workload_version : str
1462 '''
1463 self.can_upgrade_to = can_upgrade_to
1464 self.charm = charm
1465 self.err = err
1466 self.exposed = exposed
1467 self.life = life
1468 self.meter_statuses = meter_statuses
1469 self.relations = relations
1470 self.series = series
1471 self.status = DetailedStatus.from_json(status) if status else None
1472 self.subordinate_to = subordinate_to
1473 self.units = units
1474 self.workload_version = workload_version
1475
1476
1477 class Binary(Type):
1478 _toSchema = {'series': 'Series', 'arch': 'Arch', 'number': 'Number'}
1479 _toPy = {'Series': 'series', 'Arch': 'arch', 'Number': 'number'}
1480 def __init__(self, arch=None, number=None, series=None):
1481 '''
1482 arch : str
1483 number : Number
1484 series : str
1485 '''
1486 self.arch = arch
1487 self.number = Number.from_json(number) if number else None
1488 self.series = series
1489
1490
1491 class BundleChangesChange(Type):
1492 _toSchema = {'requires': 'requires', 'args': 'args', 'method': 'method', 'id_': 'id'}
1493 _toPy = {'requires': 'requires', 'args': 'args', 'method': 'method', 'id': 'id_'}
1494 def __init__(self, args=None, id_=None, method=None, requires=None):
1495 '''
1496 args : typing.Sequence<+T_co>[typing.Any]
1497 id_ : str
1498 method : str
1499 requires : typing.Sequence<+T_co>[str]
1500 '''
1501 self.args = args
1502 self.id_ = id_
1503 self.method = method
1504 self.requires = requires
1505
1506
1507 class ConfigValue(Type):
1508 _toSchema = {'source': 'source', 'value': 'value'}
1509 _toPy = {'source': 'source', 'value': 'value'}
1510 def __init__(self, source=None, value=None):
1511 '''
1512 source : str
1513 value : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1514 '''
1515 self.source = source
1516 self.value = value
1517
1518
1519 class DestroyMachines(Type):
1520 _toSchema = {'machine_names': 'machine-names', 'force': 'force'}
1521 _toPy = {'machine-names': 'machine_names', 'force': 'force'}
1522 def __init__(self, force=None, machine_names=None):
1523 '''
1524 force : bool
1525 machine_names : typing.Sequence<+T_co>[str]
1526 '''
1527 self.force = force
1528 self.machine_names = machine_names
1529
1530
1531 class DetailedStatus(Type):
1532 _toSchema = {'kind': 'kind', 'since': 'since', 'version': 'version', 'status': 'status', 'data': 'data', 'err': 'err', 'info': 'info', 'life': 'life'}
1533 _toPy = {'kind': 'kind', 'since': 'since', 'version': 'version', 'status': 'status', 'data': 'data', 'err': 'err', 'info': 'info', 'life': 'life'}
1534 def __init__(self, data=None, err=None, info=None, kind=None, life=None, since=None, status=None, version=None):
1535 '''
1536 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1537 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1538 info : str
1539 kind : str
1540 life : str
1541 since : str
1542 status : str
1543 version : str
1544 '''
1545 self.data = data
1546 self.err = err
1547 self.info = info
1548 self.kind = kind
1549 self.life = life
1550 self.since = since
1551 self.status = status
1552 self.version = version
1553
1554
1555 class EndpointStatus(Type):
1556 _toSchema = {'role': 'role', 'application': 'application', 'name': 'name', 'subordinate': 'subordinate'}
1557 _toPy = {'role': 'role', 'application': 'application', 'name': 'name', 'subordinate': 'subordinate'}
1558 def __init__(self, application=None, name=None, role=None, subordinate=None):
1559 '''
1560 application : str
1561 name : str
1562 role : str
1563 subordinate : bool
1564 '''
1565 self.application = application
1566 self.name = name
1567 self.role = role
1568 self.subordinate = subordinate
1569
1570
1571 class EntityStatus(Type):
1572 _toSchema = {'since': 'since', 'info': 'info', 'data': 'data', 'status': 'status'}
1573 _toPy = {'since': 'since', 'info': 'info', 'data': 'data', 'status': 'status'}
1574 def __init__(self, data=None, info=None, since=None, status=None):
1575 '''
1576 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1577 info : str
1578 since : str
1579 status : str
1580 '''
1581 self.data = data
1582 self.info = info
1583 self.since = since
1584 self.status = status
1585
1586
1587 class FindToolsParams(Type):
1588 _toSchema = {'series': 'series', 'number': 'number', 'arch': 'arch', 'minor': 'minor', 'major': 'major'}
1589 _toPy = {'series': 'series', 'number': 'number', 'arch': 'arch', 'minor': 'minor', 'major': 'major'}
1590 def __init__(self, arch=None, major=None, minor=None, number=None, series=None):
1591 '''
1592 arch : str
1593 major : int
1594 minor : int
1595 number : Number
1596 series : str
1597 '''
1598 self.arch = arch
1599 self.major = major
1600 self.minor = minor
1601 self.number = Number.from_json(number) if number else None
1602 self.series = series
1603
1604
1605 class FindToolsResult(Type):
1606 _toSchema = {'error': 'error', 'list_': 'list'}
1607 _toPy = {'error': 'error', 'list': 'list_'}
1608 def __init__(self, error=None, list_=None):
1609 '''
1610 error : Error
1611 list_ : typing.Sequence<+T_co>[~Tools]<~Tools>
1612 '''
1613 self.error = Error.from_json(error) if error else None
1614 self.list_ = [Tools.from_json(o) for o in list_ or []]
1615
1616
1617 class FullStatus(Type):
1618 _toSchema = {'model': 'model', 'relations': 'relations', 'machines': 'machines', 'applications': 'applications'}
1619 _toPy = {'model': 'model', 'relations': 'relations', 'machines': 'machines', 'applications': 'applications'}
1620 def __init__(self, applications=None, machines=None, model=None, relations=None):
1621 '''
1622 applications : typing.Mapping<~KT, +VT_co>[str, ~ApplicationStatus]<~ApplicationStatus>
1623 machines : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>
1624 model : ModelStatusInfo
1625 relations : typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>
1626 '''
1627 self.applications = applications
1628 self.machines = machines
1629 self.model = ModelStatusInfo.from_json(model) if model else None
1630 self.relations = [RelationStatus.from_json(o) for o in relations or []]
1631
1632
1633 class GetBundleChangesParams(Type):
1634 _toSchema = {'yaml': 'yaml'}
1635 _toPy = {'yaml': 'yaml'}
1636 def __init__(self, yaml=None):
1637 '''
1638 yaml : str
1639 '''
1640 self.yaml = yaml
1641
1642
1643 class GetBundleChangesResults(Type):
1644 _toSchema = {'changes': 'changes', 'errors': 'errors'}
1645 _toPy = {'changes': 'changes', 'errors': 'errors'}
1646 def __init__(self, changes=None, errors=None):
1647 '''
1648 changes : typing.Sequence<+T_co>[~BundleChangesChange]<~BundleChangesChange>
1649 errors : typing.Sequence<+T_co>[str]
1650 '''
1651 self.changes = [BundleChangesChange.from_json(o) for o in changes or []]
1652 self.errors = errors
1653
1654
1655 class HardwareCharacteristics(Type):
1656 _toSchema = {'root_disk': 'root-disk', 'cpu_power': 'cpu-power', 'tags': 'tags', 'cpu_cores': 'cpu-cores', 'arch': 'arch', 'mem': 'mem', 'availability_zone': 'availability-zone'}
1657 _toPy = {'root-disk': 'root_disk', 'tags': 'tags', 'cpu-cores': 'cpu_cores', 'cpu-power': 'cpu_power', 'arch': 'arch', 'availability-zone': 'availability_zone', 'mem': 'mem'}
1658 def __init__(self, arch=None, availability_zone=None, cpu_cores=None, cpu_power=None, mem=None, root_disk=None, tags=None):
1659 '''
1660 arch : str
1661 availability_zone : str
1662 cpu_cores : int
1663 cpu_power : int
1664 mem : int
1665 root_disk : int
1666 tags : typing.Sequence<+T_co>[str]
1667 '''
1668 self.arch = arch
1669 self.availability_zone = availability_zone
1670 self.cpu_cores = cpu_cores
1671 self.cpu_power = cpu_power
1672 self.mem = mem
1673 self.root_disk = root_disk
1674 self.tags = tags
1675
1676
1677 class History(Type):
1678 _toSchema = {'error': 'error', 'statuses': 'statuses'}
1679 _toPy = {'error': 'error', 'statuses': 'statuses'}
1680 def __init__(self, error=None, statuses=None):
1681 '''
1682 error : Error
1683 statuses : typing.Sequence<+T_co>[~DetailedStatus]<~DetailedStatus>
1684 '''
1685 self.error = Error.from_json(error) if error else None
1686 self.statuses = [DetailedStatus.from_json(o) for o in statuses or []]
1687
1688
1689 class HostPort(Type):
1690 _toSchema = {'address': 'Address', 'port': 'port'}
1691 _toPy = {'Address': 'address', 'port': 'port'}
1692 def __init__(self, address=None, port=None):
1693 '''
1694 address : Address
1695 port : int
1696 '''
1697 self.address = Address.from_json(address) if address else None
1698 self.port = port
1699
1700
1701 class MachineHardware(Type):
1702 _toSchema = {'root_disk': 'root-disk', 'cpu_power': 'cpu-power', 'cores': 'cores', 'tags': 'tags', 'arch': 'arch', 'mem': 'mem', 'availability_zone': 'availability-zone'}
1703 _toPy = {'tags': 'tags', 'cores': 'cores', 'root-disk': 'root_disk', 'cpu-power': 'cpu_power', 'arch': 'arch', 'mem': 'mem', 'availability-zone': 'availability_zone'}
1704 def __init__(self, arch=None, availability_zone=None, cores=None, cpu_power=None, mem=None, root_disk=None, tags=None):
1705 '''
1706 arch : str
1707 availability_zone : str
1708 cores : int
1709 cpu_power : int
1710 mem : int
1711 root_disk : int
1712 tags : typing.Sequence<+T_co>[str]
1713 '''
1714 self.arch = arch
1715 self.availability_zone = availability_zone
1716 self.cores = cores
1717 self.cpu_power = cpu_power
1718 self.mem = mem
1719 self.root_disk = root_disk
1720 self.tags = tags
1721
1722
1723 class MachineStatus(Type):
1724 _toSchema = {'series': 'series', 'containers': 'containers', 'instance_status': 'instance-status', 'hardware': 'hardware', 'agent_status': 'agent-status', 'dns_name': 'dns-name', 'instance_id': 'instance-id', 'jobs': 'jobs', 'has_vote': 'has-vote', 'id_': 'id', 'wants_vote': 'wants-vote'}
1725 _toPy = {'series': 'series', 'containers': 'containers', 'has-vote': 'has_vote', 'hardware': 'hardware', 'dns-name': 'dns_name', 'instance-status': 'instance_status', 'instance-id': 'instance_id', 'jobs': 'jobs', 'agent-status': 'agent_status', 'wants-vote': 'wants_vote', 'id': 'id_'}
1726 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):
1727 '''
1728 agent_status : DetailedStatus
1729 containers : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>
1730 dns_name : str
1731 hardware : str
1732 has_vote : bool
1733 id_ : str
1734 instance_id : str
1735 instance_status : DetailedStatus
1736 jobs : typing.Sequence<+T_co>[str]
1737 series : str
1738 wants_vote : bool
1739 '''
1740 self.agent_status = DetailedStatus.from_json(agent_status) if agent_status else None
1741 self.containers = containers
1742 self.dns_name = dns_name
1743 self.hardware = hardware
1744 self.has_vote = has_vote
1745 self.id_ = id_
1746 self.instance_id = instance_id
1747 self.instance_status = DetailedStatus.from_json(instance_status) if instance_status else None
1748 self.jobs = jobs
1749 self.series = series
1750 self.wants_vote = wants_vote
1751
1752
1753 class MeterStatus(Type):
1754 _toSchema = {'color': 'color', 'message': 'message'}
1755 _toPy = {'color': 'color', 'message': 'message'}
1756 def __init__(self, color=None, message=None):
1757 '''
1758 color : str
1759 message : str
1760 '''
1761 self.color = color
1762 self.message = message
1763
1764
1765 class ModelConfigResults(Type):
1766 _toSchema = {'config': 'config'}
1767 _toPy = {'config': 'config'}
1768 def __init__(self, config=None):
1769 '''
1770 config : typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1771 '''
1772 self.config = config
1773
1774
1775 class ModelDefaultValues(Type):
1776 _toSchema = {'cloud_tag': 'cloud-tag', 'cloud_region': 'cloud-region', 'config': 'config'}
1777 _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'config': 'config'}
1778 def __init__(self, cloud_region=None, cloud_tag=None, config=None):
1779 '''
1780 cloud_region : str
1781 cloud_tag : str
1782 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1783 '''
1784 self.cloud_region = cloud_region
1785 self.cloud_tag = cloud_tag
1786 self.config = config
1787
1788
1789 class ModelDefaults(Type):
1790 _toSchema = {'regions': 'regions', 'controller': 'controller', 'default': 'default'}
1791 _toPy = {'regions': 'regions', 'controller': 'controller', 'default': 'default'}
1792 def __init__(self, controller=None, default=None, regions=None):
1793 '''
1794 controller : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1795 default : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1796 regions : typing.Sequence<+T_co>[~RegionDefaults]<~RegionDefaults>
1797 '''
1798 self.controller = controller
1799 self.default = default
1800 self.regions = [RegionDefaults.from_json(o) for o in regions or []]
1801
1802
1803 class ModelDefaultsResult(Type):
1804 _toSchema = {'config': 'config'}
1805 _toPy = {'config': 'config'}
1806 def __init__(self, config=None):
1807 '''
1808 config : typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
1809 '''
1810 self.config = config
1811
1812
1813 class ModelInfo(Type):
1814 _toSchema = {'status': 'status', 'machines': 'machines', 'users': 'users', 'uuid': 'uuid', 'life': 'life', 'cloud_region': 'cloud-region', 'owner_tag': 'owner-tag', 'cloud': 'cloud', 'controller_uuid': 'controller-uuid', 'provider_type': 'provider-type', 'default_series': 'default-series', 'name': 'name', 'cloud_credential_tag': 'cloud-credential-tag'}
1815 _toPy = {'machines': 'machines', 'users': 'users', 'owner-tag': 'owner_tag', 'uuid': 'uuid', 'life': 'life', 'default-series': 'default_series', 'cloud': 'cloud', 'controller-uuid': 'controller_uuid', 'cloud-credential-tag': 'cloud_credential_tag', 'cloud-region': 'cloud_region', 'provider-type': 'provider_type', 'name': 'name', 'status': 'status'}
1816 def __init__(self, cloud=None, cloud_credential_tag=None, cloud_region=None, controller_uuid=None, default_series=None, life=None, machines=None, name=None, owner_tag=None, provider_type=None, status=None, users=None, uuid=None):
1817 '''
1818 cloud : str
1819 cloud_credential_tag : str
1820 cloud_region : str
1821 controller_uuid : str
1822 default_series : str
1823 life : str
1824 machines : typing.Sequence<+T_co>[~ModelMachineInfo]<~ModelMachineInfo>
1825 name : str
1826 owner_tag : str
1827 provider_type : str
1828 status : EntityStatus
1829 users : typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>
1830 uuid : str
1831 '''
1832 self.cloud = cloud
1833 self.cloud_credential_tag = cloud_credential_tag
1834 self.cloud_region = cloud_region
1835 self.controller_uuid = controller_uuid
1836 self.default_series = default_series
1837 self.life = life
1838 self.machines = [ModelMachineInfo.from_json(o) for o in machines or []]
1839 self.name = name
1840 self.owner_tag = owner_tag
1841 self.provider_type = provider_type
1842 self.status = EntityStatus.from_json(status) if status else None
1843 self.users = [ModelUserInfo.from_json(o) for o in users or []]
1844 self.uuid = uuid
1845
1846
1847 class ModelMachineInfo(Type):
1848 _toSchema = {'hardware': 'hardware', 'id_': 'id'}
1849 _toPy = {'hardware': 'hardware', 'id': 'id_'}
1850 def __init__(self, hardware=None, id_=None):
1851 '''
1852 hardware : MachineHardware
1853 id_ : str
1854 '''
1855 self.hardware = MachineHardware.from_json(hardware) if hardware else None
1856 self.id_ = id_
1857
1858
1859 class ModelSet(Type):
1860 _toSchema = {'config': 'config'}
1861 _toPy = {'config': 'config'}
1862 def __init__(self, config=None):
1863 '''
1864 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1865 '''
1866 self.config = config
1867
1868
1869 class ModelStatusInfo(Type):
1870 _toSchema = {'region': 'region', 'available_version': 'available-version', 'migration': 'migration', 'cloud': 'cloud', 'version': 'version', 'name': 'name'}
1871 _toPy = {'region': 'region', 'version': 'version', 'migration': 'migration', 'cloud': 'cloud', 'available-version': 'available_version', 'name': 'name'}
1872 def __init__(self, available_version=None, cloud=None, migration=None, name=None, region=None, version=None):
1873 '''
1874 available_version : str
1875 cloud : str
1876 migration : str
1877 name : str
1878 region : str
1879 version : str
1880 '''
1881 self.available_version = available_version
1882 self.cloud = cloud
1883 self.migration = migration
1884 self.name = name
1885 self.region = region
1886 self.version = version
1887
1888
1889 class ModelUnset(Type):
1890 _toSchema = {'keys': 'keys'}
1891 _toPy = {'keys': 'keys'}
1892 def __init__(self, keys=None):
1893 '''
1894 keys : typing.Sequence<+T_co>[str]
1895 '''
1896 self.keys = keys
1897
1898
1899 class ModelUnsetKeys(Type):
1900 _toSchema = {'cloud_tag': 'cloud-tag', 'cloud_region': 'cloud-region', 'keys': 'keys'}
1901 _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'keys': 'keys'}
1902 def __init__(self, cloud_region=None, cloud_tag=None, keys=None):
1903 '''
1904 cloud_region : str
1905 cloud_tag : str
1906 keys : typing.Sequence<+T_co>[str]
1907 '''
1908 self.cloud_region = cloud_region
1909 self.cloud_tag = cloud_tag
1910 self.keys = keys
1911
1912
1913 class ModelUserInfo(Type):
1914 _toSchema = {'display_name': 'display-name', 'last_connection': 'last-connection', 'access': 'access', 'user': 'user'}
1915 _toPy = {'access': 'access', 'display-name': 'display_name', 'user': 'user', 'last-connection': 'last_connection'}
1916 def __init__(self, access=None, display_name=None, last_connection=None, user=None):
1917 '''
1918 access : str
1919 display_name : str
1920 last_connection : str
1921 user : str
1922 '''
1923 self.access = access
1924 self.display_name = display_name
1925 self.last_connection = last_connection
1926 self.user = user
1927
1928
1929 class ModelUserInfoResult(Type):
1930 _toSchema = {'result': 'result', 'error': 'error'}
1931 _toPy = {'result': 'result', 'error': 'error'}
1932 def __init__(self, error=None, result=None):
1933 '''
1934 error : Error
1935 result : ModelUserInfo
1936 '''
1937 self.error = Error.from_json(error) if error else None
1938 self.result = ModelUserInfo.from_json(result) if result else None
1939
1940
1941 class ModelUserInfoResults(Type):
1942 _toSchema = {'results': 'results'}
1943 _toPy = {'results': 'results'}
1944 def __init__(self, results=None):
1945 '''
1946 results : typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
1947 '''
1948 self.results = [ModelUserInfoResult.from_json(o) for o in results or []]
1949
1950
1951 class PrivateAddress(Type):
1952 _toSchema = {'target': 'target'}
1953 _toPy = {'target': 'target'}
1954 def __init__(self, target=None):
1955 '''
1956 target : str
1957 '''
1958 self.target = target
1959
1960
1961 class PrivateAddressResults(Type):
1962 _toSchema = {'private_address': 'private-address'}
1963 _toPy = {'private-address': 'private_address'}
1964 def __init__(self, private_address=None):
1965 '''
1966 private_address : str
1967 '''
1968 self.private_address = private_address
1969
1970
1971 class ProvisioningScriptParams(Type):
1972 _toSchema = {'disable_package_commands': 'disable-package-commands', 'machine_id': 'machine-id', 'nonce': 'nonce', 'data_dir': 'data-dir'}
1973 _toPy = {'data-dir': 'data_dir', 'nonce': 'nonce', 'disable-package-commands': 'disable_package_commands', 'machine-id': 'machine_id'}
1974 def __init__(self, data_dir=None, disable_package_commands=None, machine_id=None, nonce=None):
1975 '''
1976 data_dir : str
1977 disable_package_commands : bool
1978 machine_id : str
1979 nonce : str
1980 '''
1981 self.data_dir = data_dir
1982 self.disable_package_commands = disable_package_commands
1983 self.machine_id = machine_id
1984 self.nonce = nonce
1985
1986
1987 class ProvisioningScriptResult(Type):
1988 _toSchema = {'script': 'script'}
1989 _toPy = {'script': 'script'}
1990 def __init__(self, script=None):
1991 '''
1992 script : str
1993 '''
1994 self.script = script
1995
1996
1997 class PublicAddress(Type):
1998 _toSchema = {'target': 'target'}
1999 _toPy = {'target': 'target'}
2000 def __init__(self, target=None):
2001 '''
2002 target : str
2003 '''
2004 self.target = target
2005
2006
2007 class PublicAddressResults(Type):
2008 _toSchema = {'public_address': 'public-address'}
2009 _toPy = {'public-address': 'public_address'}
2010 def __init__(self, public_address=None):
2011 '''
2012 public_address : str
2013 '''
2014 self.public_address = public_address
2015
2016
2017 class RegionDefaults(Type):
2018 _toSchema = {'value': 'value', 'region_name': 'region-name'}
2019 _toPy = {'value': 'value', 'region-name': 'region_name'}
2020 def __init__(self, region_name=None, value=None):
2021 '''
2022 region_name : str
2023 value : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2024 '''
2025 self.region_name = region_name
2026 self.value = value
2027
2028
2029 class RelationStatus(Type):
2030 _toSchema = {'scope': 'scope', 'key': 'key', 'endpoints': 'endpoints', 'id_': 'id', 'interface': 'interface'}
2031 _toPy = {'scope': 'scope', 'key': 'key', 'interface': 'interface', 'endpoints': 'endpoints', 'id': 'id_'}
2032 def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None):
2033 '''
2034 endpoints : typing.Sequence<+T_co>[~EndpointStatus]<~EndpointStatus>
2035 id_ : int
2036 interface : str
2037 key : str
2038 scope : str
2039 '''
2040 self.endpoints = [EndpointStatus.from_json(o) for o in endpoints or []]
2041 self.id_ = id_
2042 self.interface = interface
2043 self.key = key
2044 self.scope = scope
2045
2046
2047 class ResolveCharmResult(Type):
2048 _toSchema = {'error': 'error', 'url': 'url'}
2049 _toPy = {'error': 'error', 'url': 'url'}
2050 def __init__(self, error=None, url=None):
2051 '''
2052 error : str
2053 url : str
2054 '''
2055 self.error = error
2056 self.url = url
2057
2058
2059 class ResolveCharmResults(Type):
2060 _toSchema = {'urls': 'urls'}
2061 _toPy = {'urls': 'urls'}
2062 def __init__(self, urls=None):
2063 '''
2064 urls : typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
2065 '''
2066 self.urls = [ResolveCharmResult.from_json(o) for o in urls or []]
2067
2068
2069 class ResolveCharms(Type):
2070 _toSchema = {'references': 'references'}
2071 _toPy = {'references': 'references'}
2072 def __init__(self, references=None):
2073 '''
2074 references : typing.Sequence<+T_co>[str]
2075 '''
2076 self.references = references
2077
2078
2079 class Resolved(Type):
2080 _toSchema = {'retry': 'retry', 'unit_name': 'unit-name'}
2081 _toPy = {'unit-name': 'unit_name', 'retry': 'retry'}
2082 def __init__(self, retry=None, unit_name=None):
2083 '''
2084 retry : bool
2085 unit_name : str
2086 '''
2087 self.retry = retry
2088 self.unit_name = unit_name
2089
2090
2091 class SetModelAgentVersion(Type):
2092 _toSchema = {'version': 'version'}
2093 _toPy = {'version': 'version'}
2094 def __init__(self, version=None):
2095 '''
2096 version : Number
2097 '''
2098 self.version = Number.from_json(version) if version else None
2099
2100
2101 class SetModelDefaults(Type):
2102 _toSchema = {'config': 'config'}
2103 _toPy = {'config': 'config'}
2104 def __init__(self, config=None):
2105 '''
2106 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
2107 '''
2108 self.config = [ModelDefaultValues.from_json(o) for o in config or []]
2109
2110
2111 class StatusHistoryFilter(Type):
2112 _toSchema = {'delta': 'delta', 'date': 'date', 'size': 'size'}
2113 _toPy = {'delta': 'delta', 'date': 'date', 'size': 'size'}
2114 def __init__(self, date=None, delta=None, size=None):
2115 '''
2116 date : str
2117 delta : int
2118 size : int
2119 '''
2120 self.date = date
2121 self.delta = delta
2122 self.size = size
2123
2124
2125 class StatusHistoryRequest(Type):
2126 _toSchema = {'tag': 'tag', 'historykind': 'historyKind', 'size': 'size', 'filter_': 'filter'}
2127 _toPy = {'tag': 'tag', 'size': 'size', 'historyKind': 'historykind', 'filter': 'filter_'}
2128 def __init__(self, filter_=None, historykind=None, size=None, tag=None):
2129 '''
2130 filter_ : StatusHistoryFilter
2131 historykind : str
2132 size : int
2133 tag : str
2134 '''
2135 self.filter_ = StatusHistoryFilter.from_json(filter_) if filter_ else None
2136 self.historykind = historykind
2137 self.size = size
2138 self.tag = tag
2139
2140
2141 class StatusHistoryRequests(Type):
2142 _toSchema = {'requests': 'requests'}
2143 _toPy = {'requests': 'requests'}
2144 def __init__(self, requests=None):
2145 '''
2146 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
2147 '''
2148 self.requests = [StatusHistoryRequest.from_json(o) for o in requests or []]
2149
2150
2151 class StatusHistoryResult(Type):
2152 _toSchema = {'error': 'error', 'history': 'history'}
2153 _toPy = {'error': 'error', 'history': 'history'}
2154 def __init__(self, error=None, history=None):
2155 '''
2156 error : Error
2157 history : History
2158 '''
2159 self.error = Error.from_json(error) if error else None
2160 self.history = History.from_json(history) if history else None
2161
2162
2163 class StatusHistoryResults(Type):
2164 _toSchema = {'results': 'results'}
2165 _toPy = {'results': 'results'}
2166 def __init__(self, results=None):
2167 '''
2168 results : typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
2169 '''
2170 self.results = [StatusHistoryResult.from_json(o) for o in results or []]
2171
2172
2173 class StatusParams(Type):
2174 _toSchema = {'patterns': 'patterns'}
2175 _toPy = {'patterns': 'patterns'}
2176 def __init__(self, patterns=None):
2177 '''
2178 patterns : typing.Sequence<+T_co>[str]
2179 '''
2180 self.patterns = patterns
2181
2182
2183 class Tools(Type):
2184 _toSchema = {'sha256': 'sha256', 'version': 'version', 'url': 'url', 'size': 'size'}
2185 _toPy = {'sha256': 'sha256', 'version': 'version', 'url': 'url', 'size': 'size'}
2186 def __init__(self, sha256=None, size=None, url=None, version=None):
2187 '''
2188 sha256 : str
2189 size : int
2190 url : str
2191 version : Binary
2192 '''
2193 self.sha256 = sha256
2194 self.size = size
2195 self.url = url
2196 self.version = Binary.from_json(version) if version else None
2197
2198
2199 class UnitStatus(Type):
2200 _toSchema = {'machine': 'machine', 'opened_ports': 'opened-ports', 'public_address': 'public-address', 'workload_version': 'workload-version', 'agent_status': 'agent-status', 'charm': 'charm', 'subordinates': 'subordinates', 'workload_status': 'workload-status'}
2201 _toPy = {'machine': 'machine', 'opened-ports': 'opened_ports', 'subordinates': 'subordinates', 'charm': 'charm', 'workload-status': 'workload_status', 'public-address': 'public_address', 'workload-version': 'workload_version', 'agent-status': 'agent_status'}
2202 def __init__(self, agent_status=None, charm=None, machine=None, opened_ports=None, public_address=None, subordinates=None, workload_status=None, workload_version=None):
2203 '''
2204 agent_status : DetailedStatus
2205 charm : str
2206 machine : str
2207 opened_ports : typing.Sequence<+T_co>[str]
2208 public_address : str
2209 subordinates : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus>
2210 workload_status : DetailedStatus
2211 workload_version : str
2212 '''
2213 self.agent_status = DetailedStatus.from_json(agent_status) if agent_status else None
2214 self.charm = charm
2215 self.machine = machine
2216 self.opened_ports = opened_ports
2217 self.public_address = public_address
2218 self.subordinates = subordinates
2219 self.workload_status = DetailedStatus.from_json(workload_status) if workload_status else None
2220 self.workload_version = workload_version
2221
2222
2223 class UnsetModelDefaults(Type):
2224 _toSchema = {'keys': 'keys'}
2225 _toPy = {'keys': 'keys'}
2226 def __init__(self, keys=None):
2227 '''
2228 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
2229 '''
2230 self.keys = [ModelUnsetKeys.from_json(o) for o in keys or []]
2231
2232
2233 class Cloud(Type):
2234 _toSchema = {'regions': 'regions', 'auth_types': 'auth-types', 'type_': 'type', 'endpoint': 'endpoint', 'storage_endpoint': 'storage-endpoint', 'identity_endpoint': 'identity-endpoint'}
2235 _toPy = {'regions': 'regions', 'auth-types': 'auth_types', 'storage-endpoint': 'storage_endpoint', 'identity-endpoint': 'identity_endpoint', 'type': 'type_', 'endpoint': 'endpoint'}
2236 def __init__(self, auth_types=None, endpoint=None, identity_endpoint=None, regions=None, storage_endpoint=None, type_=None):
2237 '''
2238 auth_types : typing.Sequence<+T_co>[str]
2239 endpoint : str
2240 identity_endpoint : str
2241 regions : typing.Sequence<+T_co>[~CloudRegion]<~CloudRegion>
2242 storage_endpoint : str
2243 type_ : str
2244 '''
2245 self.auth_types = auth_types
2246 self.endpoint = endpoint
2247 self.identity_endpoint = identity_endpoint
2248 self.regions = [CloudRegion.from_json(o) for o in regions or []]
2249 self.storage_endpoint = storage_endpoint
2250 self.type_ = type_
2251
2252
2253 class CloudCredentialResult(Type):
2254 _toSchema = {'result': 'result', 'error': 'error'}
2255 _toPy = {'result': 'result', 'error': 'error'}
2256 def __init__(self, error=None, result=None):
2257 '''
2258 error : Error
2259 result : CloudCredential
2260 '''
2261 self.error = Error.from_json(error) if error else None
2262 self.result = CloudCredential.from_json(result) if result else None
2263
2264
2265 class CloudCredentialResults(Type):
2266 _toSchema = {'results': 'results'}
2267 _toPy = {'results': 'results'}
2268 def __init__(self, results=None):
2269 '''
2270 results : typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
2271 '''
2272 self.results = [CloudCredentialResult.from_json(o) for o in results or []]
2273
2274
2275 class CloudRegion(Type):
2276 _toSchema = {'identity_endpoint': 'identity-endpoint', 'name': 'name', 'storage_endpoint': 'storage-endpoint', 'endpoint': 'endpoint'}
2277 _toPy = {'storage-endpoint': 'storage_endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'endpoint': 'endpoint'}
2278 def __init__(self, endpoint=None, identity_endpoint=None, name=None, storage_endpoint=None):
2279 '''
2280 endpoint : str
2281 identity_endpoint : str
2282 name : str
2283 storage_endpoint : str
2284 '''
2285 self.endpoint = endpoint
2286 self.identity_endpoint = identity_endpoint
2287 self.name = name
2288 self.storage_endpoint = storage_endpoint
2289
2290
2291 class CloudResult(Type):
2292 _toSchema = {'error': 'error', 'cloud': 'cloud'}
2293 _toPy = {'error': 'error', 'cloud': 'cloud'}
2294 def __init__(self, cloud=None, error=None):
2295 '''
2296 cloud : Cloud
2297 error : Error
2298 '''
2299 self.cloud = Cloud.from_json(cloud) if cloud else None
2300 self.error = Error.from_json(error) if error else None
2301
2302
2303 class CloudResults(Type):
2304 _toSchema = {'results': 'results'}
2305 _toPy = {'results': 'results'}
2306 def __init__(self, results=None):
2307 '''
2308 results : typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
2309 '''
2310 self.results = [CloudResult.from_json(o) for o in results or []]
2311
2312
2313 class CloudsResult(Type):
2314 _toSchema = {'clouds': 'clouds'}
2315 _toPy = {'clouds': 'clouds'}
2316 def __init__(self, clouds=None):
2317 '''
2318 clouds : typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
2319 '''
2320 self.clouds = clouds
2321
2322
2323 class StringsResult(Type):
2324 _toSchema = {'result': 'result', 'error': 'error'}
2325 _toPy = {'result': 'result', 'error': 'error'}
2326 def __init__(self, error=None, result=None):
2327 '''
2328 error : Error
2329 result : typing.Sequence<+T_co>[str]
2330 '''
2331 self.error = Error.from_json(error) if error else None
2332 self.result = result
2333
2334
2335 class StringsResults(Type):
2336 _toSchema = {'results': 'results'}
2337 _toPy = {'results': 'results'}
2338 def __init__(self, results=None):
2339 '''
2340 results : typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2341 '''
2342 self.results = [StringsResult.from_json(o) for o in results or []]
2343
2344
2345 class UpdateCloudCredential(Type):
2346 _toSchema = {'tag': 'tag', 'credential': 'credential'}
2347 _toPy = {'tag': 'tag', 'credential': 'credential'}
2348 def __init__(self, credential=None, tag=None):
2349 '''
2350 credential : CloudCredential
2351 tag : str
2352 '''
2353 self.credential = CloudCredential.from_json(credential) if credential else None
2354 self.tag = tag
2355
2356
2357 class UpdateCloudCredentials(Type):
2358 _toSchema = {'credentials': 'credentials'}
2359 _toPy = {'credentials': 'credentials'}
2360 def __init__(self, credentials=None):
2361 '''
2362 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
2363 '''
2364 self.credentials = [UpdateCloudCredential.from_json(o) for o in credentials or []]
2365
2366
2367 class UserCloud(Type):
2368 _toSchema = {'cloud_tag': 'cloud-tag', 'user_tag': 'user-tag'}
2369 _toPy = {'user-tag': 'user_tag', 'cloud-tag': 'cloud_tag'}
2370 def __init__(self, cloud_tag=None, user_tag=None):
2371 '''
2372 cloud_tag : str
2373 user_tag : str
2374 '''
2375 self.cloud_tag = cloud_tag
2376 self.user_tag = user_tag
2377
2378
2379 class UserClouds(Type):
2380 _toSchema = {'user_clouds': 'user-clouds'}
2381 _toPy = {'user-clouds': 'user_clouds'}
2382 def __init__(self, user_clouds=None):
2383 '''
2384 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
2385 '''
2386 self.user_clouds = [UserCloud.from_json(o) for o in user_clouds or []]
2387
2388
2389 class DestroyControllerArgs(Type):
2390 _toSchema = {'destroy_models': 'destroy-models'}
2391 _toPy = {'destroy-models': 'destroy_models'}
2392 def __init__(self, destroy_models=None):
2393 '''
2394 destroy_models : bool
2395 '''
2396 self.destroy_models = destroy_models
2397
2398
2399 class InitiateMigrationArgs(Type):
2400 _toSchema = {'specs': 'specs'}
2401 _toPy = {'specs': 'specs'}
2402 def __init__(self, specs=None):
2403 '''
2404 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
2405 '''
2406 self.specs = [MigrationSpec.from_json(o) for o in specs or []]
2407
2408
2409 class InitiateMigrationResult(Type):
2410 _toSchema = {'migration_id': 'migration-id', 'error': 'error', 'model_tag': 'model-tag'}
2411 _toPy = {'error': 'error', 'migration-id': 'migration_id', 'model-tag': 'model_tag'}
2412 def __init__(self, error=None, migration_id=None, model_tag=None):
2413 '''
2414 error : Error
2415 migration_id : str
2416 model_tag : str
2417 '''
2418 self.error = Error.from_json(error) if error else None
2419 self.migration_id = migration_id
2420 self.model_tag = model_tag
2421
2422
2423 class InitiateMigrationResults(Type):
2424 _toSchema = {'results': 'results'}
2425 _toPy = {'results': 'results'}
2426 def __init__(self, results=None):
2427 '''
2428 results : typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
2429 '''
2430 self.results = [InitiateMigrationResult.from_json(o) for o in results or []]
2431
2432
2433 class MigrationSpec(Type):
2434 _toSchema = {'external_control': 'external-control', 'model_tag': 'model-tag', 'target_info': 'target-info'}
2435 _toPy = {'model-tag': 'model_tag', 'target-info': 'target_info', 'external-control': 'external_control'}
2436 def __init__(self, external_control=None, model_tag=None, target_info=None):
2437 '''
2438 external_control : bool
2439 model_tag : str
2440 target_info : MigrationTargetInfo
2441 '''
2442 self.external_control = external_control
2443 self.model_tag = model_tag
2444 self.target_info = MigrationTargetInfo.from_json(target_info) if target_info else None
2445
2446
2447 class MigrationTargetInfo(Type):
2448 _toSchema = {'macaroons': 'macaroons', 'password': 'password', 'ca_cert': 'ca-cert', 'auth_tag': 'auth-tag', 'controller_tag': 'controller-tag', 'addrs': 'addrs'}
2449 _toPy = {'macaroons': 'macaroons', 'password': 'password', 'ca-cert': 'ca_cert', 'addrs': 'addrs', 'auth-tag': 'auth_tag', 'controller-tag': 'controller_tag'}
2450 def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_tag=None, macaroons=None, password=None):
2451 '''
2452 addrs : typing.Sequence<+T_co>[str]
2453 auth_tag : str
2454 ca_cert : str
2455 controller_tag : str
2456 macaroons : str
2457 password : str
2458 '''
2459 self.addrs = addrs
2460 self.auth_tag = auth_tag
2461 self.ca_cert = ca_cert
2462 self.controller_tag = controller_tag
2463 self.macaroons = macaroons
2464 self.password = password
2465
2466
2467 class Model(Type):
2468 _toSchema = {'name': 'name', 'uuid': 'uuid', 'owner_tag': 'owner-tag'}
2469 _toPy = {'owner-tag': 'owner_tag', 'name': 'name', 'uuid': 'uuid'}
2470 def __init__(self, name=None, owner_tag=None, uuid=None):
2471 '''
2472 name : str
2473 owner_tag : str
2474 uuid : str
2475 '''
2476 self.name = name
2477 self.owner_tag = owner_tag
2478 self.uuid = uuid
2479
2480
2481 class ModelBlockInfo(Type):
2482 _toSchema = {'model_uuid': 'model-uuid', 'name': 'name', 'blocks': 'blocks', 'owner_tag': 'owner-tag'}
2483 _toPy = {'model-uuid': 'model_uuid', 'owner-tag': 'owner_tag', 'name': 'name', 'blocks': 'blocks'}
2484 def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None):
2485 '''
2486 blocks : typing.Sequence<+T_co>[str]
2487 model_uuid : str
2488 name : str
2489 owner_tag : str
2490 '''
2491 self.blocks = blocks
2492 self.model_uuid = model_uuid
2493 self.name = name
2494 self.owner_tag = owner_tag
2495
2496
2497 class ModelBlockInfoList(Type):
2498 _toSchema = {'models': 'models'}
2499 _toPy = {'models': 'models'}
2500 def __init__(self, models=None):
2501 '''
2502 models : typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
2503 '''
2504 self.models = [ModelBlockInfo.from_json(o) for o in models or []]
2505
2506
2507 class ModelStatus(Type):
2508 _toSchema = {'hosted_machine_count': 'hosted-machine-count', 'machines': 'machines', 'owner_tag': 'owner-tag', 'application_count': 'application-count', 'model_tag': 'model-tag', 'life': 'life'}
2509 _toPy = {'machines': 'machines', 'model-tag': 'model_tag', 'application-count': 'application_count', 'owner-tag': 'owner_tag', 'hosted-machine-count': 'hosted_machine_count', 'life': 'life'}
2510 def __init__(self, application_count=None, hosted_machine_count=None, life=None, machines=None, model_tag=None, owner_tag=None):
2511 '''
2512 application_count : int
2513 hosted_machine_count : int
2514 life : str
2515 machines : typing.Sequence<+T_co>[~ModelMachineInfo]<~ModelMachineInfo>
2516 model_tag : str
2517 owner_tag : str
2518 '''
2519 self.application_count = application_count
2520 self.hosted_machine_count = hosted_machine_count
2521 self.life = life
2522 self.machines = [ModelMachineInfo.from_json(o) for o in machines or []]
2523 self.model_tag = model_tag
2524 self.owner_tag = owner_tag
2525
2526
2527 class ModelStatusResults(Type):
2528 _toSchema = {'models': 'models'}
2529 _toPy = {'models': 'models'}
2530 def __init__(self, models=None):
2531 '''
2532 models : typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
2533 '''
2534 self.models = [ModelStatus.from_json(o) for o in models or []]
2535
2536
2537 class ModifyControllerAccess(Type):
2538 _toSchema = {'user_tag': 'user-tag', 'action': 'action', 'access': 'access'}
2539 _toPy = {'user-tag': 'user_tag', 'action': 'action', 'access': 'access'}
2540 def __init__(self, access=None, action=None, user_tag=None):
2541 '''
2542 access : str
2543 action : str
2544 user_tag : str
2545 '''
2546 self.access = access
2547 self.action = action
2548 self.user_tag = user_tag
2549
2550
2551 class ModifyControllerAccessRequest(Type):
2552 _toSchema = {'changes': 'changes'}
2553 _toPy = {'changes': 'changes'}
2554 def __init__(self, changes=None):
2555 '''
2556 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
2557 '''
2558 self.changes = [ModifyControllerAccess.from_json(o) for o in changes or []]
2559
2560
2561 class RemoveBlocksArgs(Type):
2562 _toSchema = {'all_': 'all'}
2563 _toPy = {'all': 'all_'}
2564 def __init__(self, all_=None):
2565 '''
2566 all_ : bool
2567 '''
2568 self.all_ = all_
2569
2570
2571 class UserAccess(Type):
2572 _toSchema = {'user_tag': 'user-tag', 'access': 'access'}
2573 _toPy = {'user-tag': 'user_tag', 'access': 'access'}
2574 def __init__(self, access=None, user_tag=None):
2575 '''
2576 access : str
2577 user_tag : str
2578 '''
2579 self.access = access
2580 self.user_tag = user_tag
2581
2582
2583 class UserAccessResult(Type):
2584 _toSchema = {'result': 'result', 'error': 'error'}
2585 _toPy = {'result': 'result', 'error': 'error'}
2586 def __init__(self, error=None, result=None):
2587 '''
2588 error : Error
2589 result : UserAccess
2590 '''
2591 self.error = Error.from_json(error) if error else None
2592 self.result = UserAccess.from_json(result) if result else None
2593
2594
2595 class UserAccessResults(Type):
2596 _toSchema = {'results': 'results'}
2597 _toPy = {'results': 'results'}
2598 def __init__(self, results=None):
2599 '''
2600 results : typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
2601 '''
2602 self.results = [UserAccessResult.from_json(o) for o in results or []]
2603
2604
2605 class UserModel(Type):
2606 _toSchema = {'model': 'model', 'last_connection': 'last-connection'}
2607 _toPy = {'model': 'model', 'last-connection': 'last_connection'}
2608 def __init__(self, last_connection=None, model=None):
2609 '''
2610 last_connection : str
2611 model : Model
2612 '''
2613 self.last_connection = last_connection
2614 self.model = Model.from_json(model) if model else None
2615
2616
2617 class UserModelList(Type):
2618 _toSchema = {'user_models': 'user-models'}
2619 _toPy = {'user-models': 'user_models'}
2620 def __init__(self, user_models=None):
2621 '''
2622 user_models : typing.Sequence<+T_co>[~UserModel]<~UserModel>
2623 '''
2624 self.user_models = [UserModel.from_json(o) for o in user_models or []]
2625
2626
2627 class BytesResult(Type):
2628 _toSchema = {'result': 'result'}
2629 _toPy = {'result': 'result'}
2630 def __init__(self, result=None):
2631 '''
2632 result : typing.Sequence<+T_co>[int]
2633 '''
2634 self.result = result
2635
2636
2637 class DeployerConnectionValues(Type):
2638 _toSchema = {'api_addresses': 'api-addresses', 'state_addresses': 'state-addresses'}
2639 _toPy = {'api-addresses': 'api_addresses', 'state-addresses': 'state_addresses'}
2640 def __init__(self, api_addresses=None, state_addresses=None):
2641 '''
2642 api_addresses : typing.Sequence<+T_co>[str]
2643 state_addresses : typing.Sequence<+T_co>[str]
2644 '''
2645 self.api_addresses = api_addresses
2646 self.state_addresses = state_addresses
2647
2648
2649 class LifeResult(Type):
2650 _toSchema = {'error': 'error', 'life': 'life'}
2651 _toPy = {'error': 'error', 'life': 'life'}
2652 def __init__(self, error=None, life=None):
2653 '''
2654 error : Error
2655 life : str
2656 '''
2657 self.error = Error.from_json(error) if error else None
2658 self.life = life
2659
2660
2661 class LifeResults(Type):
2662 _toSchema = {'results': 'results'}
2663 _toPy = {'results': 'results'}
2664 def __init__(self, results=None):
2665 '''
2666 results : typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2667 '''
2668 self.results = [LifeResult.from_json(o) for o in results or []]
2669
2670
2671 class StringsWatchResults(Type):
2672 _toSchema = {'results': 'results'}
2673 _toPy = {'results': 'results'}
2674 def __init__(self, results=None):
2675 '''
2676 results : typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
2677 '''
2678 self.results = [StringsWatchResult.from_json(o) for o in results or []]
2679
2680
2681 class AddSubnetParams(Type):
2682 _toSchema = {'zones': 'zones', 'subnet_provider_id': 'subnet-provider-id', 'subnet_tag': 'subnet-tag', 'space_tag': 'space-tag'}
2683 _toPy = {'space-tag': 'space_tag', 'subnet-provider-id': 'subnet_provider_id', 'zones': 'zones', 'subnet-tag': 'subnet_tag'}
2684 def __init__(self, space_tag=None, subnet_provider_id=None, subnet_tag=None, zones=None):
2685 '''
2686 space_tag : str
2687 subnet_provider_id : str
2688 subnet_tag : str
2689 zones : typing.Sequence<+T_co>[str]
2690 '''
2691 self.space_tag = space_tag
2692 self.subnet_provider_id = subnet_provider_id
2693 self.subnet_tag = subnet_tag
2694 self.zones = zones
2695
2696
2697 class AddSubnetsParams(Type):
2698 _toSchema = {'subnets': 'subnets'}
2699 _toPy = {'subnets': 'subnets'}
2700 def __init__(self, subnets=None):
2701 '''
2702 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
2703 '''
2704 self.subnets = [AddSubnetParams.from_json(o) for o in subnets or []]
2705
2706
2707 class CreateSpaceParams(Type):
2708 _toSchema = {'subnet_tags': 'subnet-tags', 'public': 'public', 'space_tag': 'space-tag', 'provider_id': 'provider-id'}
2709 _toPy = {'space-tag': 'space_tag', 'public': 'public', 'provider-id': 'provider_id', 'subnet-tags': 'subnet_tags'}
2710 def __init__(self, provider_id=None, public=None, space_tag=None, subnet_tags=None):
2711 '''
2712 provider_id : str
2713 public : bool
2714 space_tag : str
2715 subnet_tags : typing.Sequence<+T_co>[str]
2716 '''
2717 self.provider_id = provider_id
2718 self.public = public
2719 self.space_tag = space_tag
2720 self.subnet_tags = subnet_tags
2721
2722
2723 class CreateSpacesParams(Type):
2724 _toSchema = {'spaces': 'spaces'}
2725 _toPy = {'spaces': 'spaces'}
2726 def __init__(self, spaces=None):
2727 '''
2728 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
2729 '''
2730 self.spaces = [CreateSpaceParams.from_json(o) for o in spaces or []]
2731
2732
2733 class DiscoverSpacesResults(Type):
2734 _toSchema = {'results': 'results'}
2735 _toPy = {'results': 'results'}
2736 def __init__(self, results=None):
2737 '''
2738 results : typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
2739 '''
2740 self.results = [ProviderSpace.from_json(o) for o in results or []]
2741
2742
2743 class ListSubnetsResults(Type):
2744 _toSchema = {'results': 'results'}
2745 _toPy = {'results': 'results'}
2746 def __init__(self, results=None):
2747 '''
2748 results : typing.Sequence<+T_co>[~Subnet]<~Subnet>
2749 '''
2750 self.results = [Subnet.from_json(o) for o in results or []]
2751
2752
2753 class ProviderSpace(Type):
2754 _toSchema = {'subnets': 'subnets', 'provider_id': 'provider-id', 'error': 'error', 'name': 'name'}
2755 _toPy = {'subnets': 'subnets', 'provider-id': 'provider_id', 'error': 'error', 'name': 'name'}
2756 def __init__(self, error=None, name=None, provider_id=None, subnets=None):
2757 '''
2758 error : Error
2759 name : str
2760 provider_id : str
2761 subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet>
2762 '''
2763 self.error = Error.from_json(error) if error else None
2764 self.name = name
2765 self.provider_id = provider_id
2766 self.subnets = [Subnet.from_json(o) for o in subnets or []]
2767
2768
2769 class Subnet(Type):
2770 _toSchema = {'vlan_tag': 'vlan-tag', 'zones': 'zones', 'cidr': 'cidr', 'life': 'life', 'status': 'status', 'space_tag': 'space-tag', 'provider_id': 'provider-id'}
2771 _toPy = {'zones': 'zones', 'cidr': 'cidr', 'provider-id': 'provider_id', 'status': 'status', 'space-tag': 'space_tag', 'vlan-tag': 'vlan_tag', 'life': 'life'}
2772 def __init__(self, cidr=None, life=None, provider_id=None, space_tag=None, status=None, vlan_tag=None, zones=None):
2773 '''
2774 cidr : str
2775 life : str
2776 provider_id : str
2777 space_tag : str
2778 status : str
2779 vlan_tag : int
2780 zones : typing.Sequence<+T_co>[str]
2781 '''
2782 self.cidr = cidr
2783 self.life = life
2784 self.provider_id = provider_id
2785 self.space_tag = space_tag
2786 self.status = status
2787 self.vlan_tag = vlan_tag
2788 self.zones = zones
2789
2790
2791 class SubnetsFilters(Type):
2792 _toSchema = {'zone': 'zone', 'space_tag': 'space-tag'}
2793 _toPy = {'space-tag': 'space_tag', 'zone': 'zone'}
2794 def __init__(self, space_tag=None, zone=None):
2795 '''
2796 space_tag : str
2797 zone : str
2798 '''
2799 self.space_tag = space_tag
2800 self.zone = zone
2801
2802
2803 class BlockDevice(Type):
2804 _toSchema = {'devicename': 'DeviceName', 'hardwareid': 'HardwareId', 'busaddress': 'BusAddress', 'devicelinks': 'DeviceLinks', 'inuse': 'InUse', 'size': 'Size', 'mountpoint': 'MountPoint', 'label': 'Label', 'uuid': 'UUID', 'filesystemtype': 'FilesystemType'}
2805 _toPy = {'HardwareId': 'hardwareid', 'UUID': 'uuid', 'Size': 'size', 'BusAddress': 'busaddress', 'MountPoint': 'mountpoint', 'DeviceLinks': 'devicelinks', 'DeviceName': 'devicename', 'InUse': 'inuse', 'FilesystemType': 'filesystemtype', 'Label': 'label'}
2806 def __init__(self, busaddress=None, devicelinks=None, devicename=None, filesystemtype=None, hardwareid=None, inuse=None, label=None, mountpoint=None, size=None, uuid=None):
2807 '''
2808 busaddress : str
2809 devicelinks : typing.Sequence<+T_co>[str]
2810 devicename : str
2811 filesystemtype : str
2812 hardwareid : str
2813 inuse : bool
2814 label : str
2815 mountpoint : str
2816 size : int
2817 uuid : str
2818 '''
2819 self.busaddress = busaddress
2820 self.devicelinks = devicelinks
2821 self.devicename = devicename
2822 self.filesystemtype = filesystemtype
2823 self.hardwareid = hardwareid
2824 self.inuse = inuse
2825 self.label = label
2826 self.mountpoint = mountpoint
2827 self.size = size
2828 self.uuid = uuid
2829
2830
2831 class MachineBlockDevices(Type):
2832 _toSchema = {'machine': 'machine', 'block_devices': 'block-devices'}
2833 _toPy = {'machine': 'machine', 'block-devices': 'block_devices'}
2834 def __init__(self, block_devices=None, machine=None):
2835 '''
2836 block_devices : typing.Sequence<+T_co>[~BlockDevice]<~BlockDevice>
2837 machine : str
2838 '''
2839 self.block_devices = [BlockDevice.from_json(o) for o in block_devices or []]
2840 self.machine = machine
2841
2842
2843 class SetMachineBlockDevices(Type):
2844 _toSchema = {'machine_block_devices': 'machine-block-devices'}
2845 _toPy = {'machine-block-devices': 'machine_block_devices'}
2846 def __init__(self, machine_block_devices=None):
2847 '''
2848 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
2849 '''
2850 self.machine_block_devices = [MachineBlockDevices.from_json(o) for o in machine_block_devices or []]
2851
2852
2853 class EntitiesWatchResult(Type):
2854 _toSchema = {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'}
2855 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
2856 def __init__(self, changes=None, error=None, watcher_id=None):
2857 '''
2858 changes : typing.Sequence<+T_co>[str]
2859 error : Error
2860 watcher_id : str
2861 '''
2862 self.changes = changes
2863 self.error = Error.from_json(error) if error else None
2864 self.watcher_id = watcher_id
2865
2866
2867 class MachineStorageId(Type):
2868 _toSchema = {'machine_tag': 'machine-tag', 'attachment_tag': 'attachment-tag'}
2869 _toPy = {'attachment-tag': 'attachment_tag', 'machine-tag': 'machine_tag'}
2870 def __init__(self, attachment_tag=None, machine_tag=None):
2871 '''
2872 attachment_tag : str
2873 machine_tag : str
2874 '''
2875 self.attachment_tag = attachment_tag
2876 self.machine_tag = machine_tag
2877
2878
2879 class MachineStorageIdsWatchResult(Type):
2880 _toSchema = {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'}
2881 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
2882 def __init__(self, changes=None, error=None, watcher_id=None):
2883 '''
2884 changes : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
2885 error : Error
2886 watcher_id : str
2887 '''
2888 self.changes = [MachineStorageId.from_json(o) for o in changes or []]
2889 self.error = Error.from_json(error) if error else None
2890 self.watcher_id = watcher_id
2891
2892
2893 class BoolResult(Type):
2894 _toSchema = {'result': 'result', 'error': 'error'}
2895 _toPy = {'result': 'result', 'error': 'error'}
2896 def __init__(self, error=None, result=None):
2897 '''
2898 error : Error
2899 result : bool
2900 '''
2901 self.error = Error.from_json(error) if error else None
2902 self.result = result
2903
2904
2905 class BoolResults(Type):
2906 _toSchema = {'results': 'results'}
2907 _toPy = {'results': 'results'}
2908 def __init__(self, results=None):
2909 '''
2910 results : typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
2911 '''
2912 self.results = [BoolResult.from_json(o) for o in results or []]
2913
2914
2915 class MachinePortRange(Type):
2916 _toSchema = {'port_range': 'port-range', 'unit_tag': 'unit-tag', 'relation_tag': 'relation-tag'}
2917 _toPy = {'relation-tag': 'relation_tag', 'unit-tag': 'unit_tag', 'port-range': 'port_range'}
2918 def __init__(self, port_range=None, relation_tag=None, unit_tag=None):
2919 '''
2920 port_range : PortRange
2921 relation_tag : str
2922 unit_tag : str
2923 '''
2924 self.port_range = PortRange.from_json(port_range) if port_range else None
2925 self.relation_tag = relation_tag
2926 self.unit_tag = unit_tag
2927
2928
2929 class MachinePorts(Type):
2930 _toSchema = {'machine_tag': 'machine-tag', 'subnet_tag': 'subnet-tag'}
2931 _toPy = {'machine-tag': 'machine_tag', 'subnet-tag': 'subnet_tag'}
2932 def __init__(self, machine_tag=None, subnet_tag=None):
2933 '''
2934 machine_tag : str
2935 subnet_tag : str
2936 '''
2937 self.machine_tag = machine_tag
2938 self.subnet_tag = subnet_tag
2939
2940
2941 class MachinePortsParams(Type):
2942 _toSchema = {'params': 'params'}
2943 _toPy = {'params': 'params'}
2944 def __init__(self, params=None):
2945 '''
2946 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
2947 '''
2948 self.params = [MachinePorts.from_json(o) for o in params or []]
2949
2950
2951 class MachinePortsResult(Type):
2952 _toSchema = {'ports': 'ports', 'error': 'error'}
2953 _toPy = {'ports': 'ports', 'error': 'error'}
2954 def __init__(self, error=None, ports=None):
2955 '''
2956 error : Error
2957 ports : typing.Sequence<+T_co>[~MachinePortRange]<~MachinePortRange>
2958 '''
2959 self.error = Error.from_json(error) if error else None
2960 self.ports = [MachinePortRange.from_json(o) for o in ports or []]
2961
2962
2963 class MachinePortsResults(Type):
2964 _toSchema = {'results': 'results'}
2965 _toPy = {'results': 'results'}
2966 def __init__(self, results=None):
2967 '''
2968 results : typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
2969 '''
2970 self.results = [MachinePortsResult.from_json(o) for o in results or []]
2971
2972
2973 class NotifyWatchResults(Type):
2974 _toSchema = {'results': 'results'}
2975 _toPy = {'results': 'results'}
2976 def __init__(self, results=None):
2977 '''
2978 results : typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2979 '''
2980 self.results = [NotifyWatchResult.from_json(o) for o in results or []]
2981
2982
2983 class PortRange(Type):
2984 _toSchema = {'from_port': 'from-port', 'protocol': 'protocol', 'to_port': 'to-port'}
2985 _toPy = {'from-port': 'from_port', 'protocol': 'protocol', 'to-port': 'to_port'}
2986 def __init__(self, from_port=None, protocol=None, to_port=None):
2987 '''
2988 from_port : int
2989 protocol : str
2990 to_port : int
2991 '''
2992 self.from_port = from_port
2993 self.protocol = protocol
2994 self.to_port = to_port
2995
2996
2997 class StringResults(Type):
2998 _toSchema = {'results': 'results'}
2999 _toPy = {'results': 'results'}
3000 def __init__(self, results=None):
3001 '''
3002 results : typing.Sequence<+T_co>[~StringResult]<~StringResult>
3003 '''
3004 self.results = [StringResult.from_json(o) for o in results or []]
3005
3006
3007 class ControllersChangeResult(Type):
3008 _toSchema = {'result': 'result', 'error': 'error'}
3009 _toPy = {'result': 'result', 'error': 'error'}
3010 def __init__(self, error=None, result=None):
3011 '''
3012 error : Error
3013 result : ControllersChanges
3014 '''
3015 self.error = Error.from_json(error) if error else None
3016 self.result = ControllersChanges.from_json(result) if result else None
3017
3018
3019 class ControllersChangeResults(Type):
3020 _toSchema = {'results': 'results'}
3021 _toPy = {'results': 'results'}
3022 def __init__(self, results=None):
3023 '''
3024 results : typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
3025 '''
3026 self.results = [ControllersChangeResult.from_json(o) for o in results or []]
3027
3028
3029 class ControllersChanges(Type):
3030 _toSchema = {'removed': 'removed', 'added': 'added', 'converted': 'converted', 'demoted': 'demoted', 'maintained': 'maintained', 'promoted': 'promoted'}
3031 _toPy = {'removed': 'removed', 'added': 'added', 'converted': 'converted', 'demoted': 'demoted', 'maintained': 'maintained', 'promoted': 'promoted'}
3032 def __init__(self, added=None, converted=None, demoted=None, maintained=None, promoted=None, removed=None):
3033 '''
3034 added : typing.Sequence<+T_co>[str]
3035 converted : typing.Sequence<+T_co>[str]
3036 demoted : typing.Sequence<+T_co>[str]
3037 maintained : typing.Sequence<+T_co>[str]
3038 promoted : typing.Sequence<+T_co>[str]
3039 removed : typing.Sequence<+T_co>[str]
3040 '''
3041 self.added = added
3042 self.converted = converted
3043 self.demoted = demoted
3044 self.maintained = maintained
3045 self.promoted = promoted
3046 self.removed = removed
3047
3048
3049 class ControllersSpec(Type):
3050 _toSchema = {'series': 'series', 'placement': 'placement', 'num_controllers': 'num-controllers', 'model_tag': 'model-tag', 'constraints': 'constraints'}
3051 _toPy = {'num-controllers': 'num_controllers', 'placement': 'placement', 'model-tag': 'model_tag', 'series': 'series', 'constraints': 'constraints'}
3052 def __init__(self, constraints=None, model_tag=None, num_controllers=None, placement=None, series=None):
3053 '''
3054 constraints : Value
3055 model_tag : str
3056 num_controllers : int
3057 placement : typing.Sequence<+T_co>[str]
3058 series : str
3059 '''
3060 self.constraints = Value.from_json(constraints) if constraints else None
3061 self.model_tag = model_tag
3062 self.num_controllers = num_controllers
3063 self.placement = placement
3064 self.series = series
3065
3066
3067 class ControllersSpecs(Type):
3068 _toSchema = {'specs': 'specs'}
3069 _toPy = {'specs': 'specs'}
3070 def __init__(self, specs=None):
3071 '''
3072 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
3073 '''
3074 self.specs = [ControllersSpec.from_json(o) for o in specs or []]
3075
3076
3077 class HAMember(Type):
3078 _toSchema = {'series': 'series', 'tag': 'tag', 'public_address': 'public-address'}
3079 _toPy = {'public-address': 'public_address', 'tag': 'tag', 'series': 'series'}
3080 def __init__(self, public_address=None, series=None, tag=None):
3081 '''
3082 public_address : Address
3083 series : str
3084 tag : str
3085 '''
3086 self.public_address = Address.from_json(public_address) if public_address else None
3087 self.series = series
3088 self.tag = tag
3089
3090
3091 class Member(Type):
3092 _toSchema = {'address': 'Address', 'tags': 'Tags', 'votes': 'Votes', 'buildindexes': 'BuildIndexes', 'arbiter': 'Arbiter', 'hidden': 'Hidden', 'slavedelay': 'SlaveDelay', 'id_': 'Id', 'priority': 'Priority'}
3093 _toPy = {'Id': 'id_', 'Votes': 'votes', 'Hidden': 'hidden', 'Priority': 'priority', 'Arbiter': 'arbiter', 'Tags': 'tags', 'Address': 'address', 'BuildIndexes': 'buildindexes', 'SlaveDelay': 'slavedelay'}
3094 def __init__(self, address=None, arbiter=None, buildindexes=None, hidden=None, id_=None, priority=None, slavedelay=None, tags=None, votes=None):
3095 '''
3096 address : str
3097 arbiter : bool
3098 buildindexes : bool
3099 hidden : bool
3100 id_ : int
3101 priority : float
3102 slavedelay : int
3103 tags : typing.Mapping<~KT, +VT_co>[str, str]
3104 votes : int
3105 '''
3106 self.address = address
3107 self.arbiter = arbiter
3108 self.buildindexes = buildindexes
3109 self.hidden = hidden
3110 self.id_ = id_
3111 self.priority = priority
3112 self.slavedelay = slavedelay
3113 self.tags = tags
3114 self.votes = votes
3115
3116
3117 class MongoUpgradeResults(Type):
3118 _toSchema = {'ha_members': 'ha-members', 'master': 'master', 'rs_members': 'rs-members'}
3119 _toPy = {'ha-members': 'ha_members', 'master': 'master', 'rs-members': 'rs_members'}
3120 def __init__(self, ha_members=None, master=None, rs_members=None):
3121 '''
3122 ha_members : typing.Sequence<+T_co>[~HAMember]<~HAMember>
3123 master : HAMember
3124 rs_members : typing.Sequence<+T_co>[~Member]<~Member>
3125 '''
3126 self.ha_members = [HAMember.from_json(o) for o in ha_members or []]
3127 self.master = HAMember.from_json(master) if master else None
3128 self.rs_members = [Member.from_json(o) for o in rs_members or []]
3129
3130
3131 class MongoVersion(Type):
3132 _toSchema = {'patch': 'patch', 'minor': 'minor', 'engine': 'engine', 'major': 'major'}
3133 _toPy = {'patch': 'patch', 'minor': 'minor', 'engine': 'engine', 'major': 'major'}
3134 def __init__(self, engine=None, major=None, minor=None, patch=None):
3135 '''
3136 engine : str
3137 major : int
3138 minor : int
3139 patch : str
3140 '''
3141 self.engine = engine
3142 self.major = major
3143 self.minor = minor
3144 self.patch = patch
3145
3146
3147 class ResumeReplicationParams(Type):
3148 _toSchema = {'members': 'members'}
3149 _toPy = {'members': 'members'}
3150 def __init__(self, members=None):
3151 '''
3152 members : typing.Sequence<+T_co>[~Member]<~Member>
3153 '''
3154 self.members = [Member.from_json(o) for o in members or []]
3155
3156
3157 class UpgradeMongoParams(Type):
3158 _toSchema = {'target': 'target'}
3159 _toPy = {'target': 'target'}
3160 def __init__(self, target=None):
3161 '''
3162 target : MongoVersion
3163 '''
3164 self.target = MongoVersion.from_json(target) if target else None
3165
3166
3167 class SSHHostKeySet(Type):
3168 _toSchema = {'entity_keys': 'entity-keys'}
3169 _toPy = {'entity-keys': 'entity_keys'}
3170 def __init__(self, entity_keys=None):
3171 '''
3172 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
3173 '''
3174 self.entity_keys = [SSHHostKeys.from_json(o) for o in entity_keys or []]
3175
3176
3177 class SSHHostKeys(Type):
3178 _toSchema = {'tag': 'tag', 'public_keys': 'public-keys'}
3179 _toPy = {'public-keys': 'public_keys', 'tag': 'tag'}
3180 def __init__(self, public_keys=None, tag=None):
3181 '''
3182 public_keys : typing.Sequence<+T_co>[str]
3183 tag : str
3184 '''
3185 self.public_keys = public_keys
3186 self.tag = tag
3187
3188
3189 class ImageFilterParams(Type):
3190 _toSchema = {'images': 'images'}
3191 _toPy = {'images': 'images'}
3192 def __init__(self, images=None):
3193 '''
3194 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
3195 '''
3196 self.images = [ImageSpec.from_json(o) for o in images or []]
3197
3198
3199 class ImageMetadata(Type):
3200 _toSchema = {'series': 'series', 'created': 'created', 'arch': 'arch', 'kind': 'kind', 'url': 'url'}
3201 _toPy = {'series': 'series', 'created': 'created', 'arch': 'arch', 'kind': 'kind', 'url': 'url'}
3202 def __init__(self, arch=None, created=None, kind=None, series=None, url=None):
3203 '''
3204 arch : str
3205 created : str
3206 kind : str
3207 series : str
3208 url : str
3209 '''
3210 self.arch = arch
3211 self.created = created
3212 self.kind = kind
3213 self.series = series
3214 self.url = url
3215
3216
3217 class ImageSpec(Type):
3218 _toSchema = {'series': 'series', 'kind': 'kind', 'arch': 'arch'}
3219 _toPy = {'series': 'series', 'kind': 'kind', 'arch': 'arch'}
3220 def __init__(self, arch=None, kind=None, series=None):
3221 '''
3222 arch : str
3223 kind : str
3224 series : str
3225 '''
3226 self.arch = arch
3227 self.kind = kind
3228 self.series = series
3229
3230
3231 class ListImageResult(Type):
3232 _toSchema = {'result': 'result'}
3233 _toPy = {'result': 'result'}
3234 def __init__(self, result=None):
3235 '''
3236 result : typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
3237 '''
3238 self.result = [ImageMetadata.from_json(o) for o in result or []]
3239
3240
3241 class CloudImageMetadata(Type):
3242 _toSchema = {'root_storage_size': 'root-storage-size', 'region': 'region', 'virt_type': 'virt-type', 'version': 'version', 'root_storage_type': 'root-storage-type', 'series': 'series', 'stream': 'stream', 'source': 'source', 'arch': 'arch', 'image_id': 'image-id', 'priority': 'priority'}
3243 _toPy = {'region': 'region', 'image-id': 'image_id', 'version': 'version', 'root-storage-size': 'root_storage_size', 'series': 'series', 'virt-type': 'virt_type', 'stream': 'stream', 'source': 'source', 'arch': 'arch', 'root-storage-type': 'root_storage_type', 'priority': 'priority'}
3244 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):
3245 '''
3246 arch : str
3247 image_id : str
3248 priority : int
3249 region : str
3250 root_storage_size : int
3251 root_storage_type : str
3252 series : str
3253 source : str
3254 stream : str
3255 version : str
3256 virt_type : str
3257 '''
3258 self.arch = arch
3259 self.image_id = image_id
3260 self.priority = priority
3261 self.region = region
3262 self.root_storage_size = root_storage_size
3263 self.root_storage_type = root_storage_type
3264 self.series = series
3265 self.source = source
3266 self.stream = stream
3267 self.version = version
3268 self.virt_type = virt_type
3269
3270
3271 class CloudImageMetadataList(Type):
3272 _toSchema = {'metadata': 'metadata'}
3273 _toPy = {'metadata': 'metadata'}
3274 def __init__(self, metadata=None):
3275 '''
3276 metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
3277 '''
3278 self.metadata = [CloudImageMetadata.from_json(o) for o in metadata or []]
3279
3280
3281 class ImageMetadataFilter(Type):
3282 _toSchema = {'region': 'region', 'arches': 'arches', 'root_storage_type': 'root-storage-type', 'series': 'series', 'stream': 'stream', 'virt_type': 'virt-type'}
3283 _toPy = {'region': 'region', 'root-storage-type': 'root_storage_type', 'arches': 'arches', 'series': 'series', 'virt-type': 'virt_type', 'stream': 'stream'}
3284 def __init__(self, arches=None, region=None, root_storage_type=None, series=None, stream=None, virt_type=None):
3285 '''
3286 arches : typing.Sequence<+T_co>[str]
3287 region : str
3288 root_storage_type : str
3289 series : typing.Sequence<+T_co>[str]
3290 stream : str
3291 virt_type : str
3292 '''
3293 self.arches = arches
3294 self.region = region
3295 self.root_storage_type = root_storage_type
3296 self.series = series
3297 self.stream = stream
3298 self.virt_type = virt_type
3299
3300
3301 class ListCloudImageMetadataResult(Type):
3302 _toSchema = {'result': 'result'}
3303 _toPy = {'result': 'result'}
3304 def __init__(self, result=None):
3305 '''
3306 result : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
3307 '''
3308 self.result = [CloudImageMetadata.from_json(o) for o in result or []]
3309
3310
3311 class MetadataImageIds(Type):
3312 _toSchema = {'image_ids': 'image-ids'}
3313 _toPy = {'image-ids': 'image_ids'}
3314 def __init__(self, image_ids=None):
3315 '''
3316 image_ids : typing.Sequence<+T_co>[str]
3317 '''
3318 self.image_ids = image_ids
3319
3320
3321 class MetadataSaveParams(Type):
3322 _toSchema = {'metadata': 'metadata'}
3323 _toPy = {'metadata': 'metadata'}
3324 def __init__(self, metadata=None):
3325 '''
3326 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
3327 '''
3328 self.metadata = [CloudImageMetadataList.from_json(o) for o in metadata or []]
3329
3330
3331 class EntityStatusArgs(Type):
3332 _toSchema = {'tag': 'tag', 'info': 'info', 'data': 'data', 'status': 'status'}
3333 _toPy = {'tag': 'tag', 'info': 'info', 'data': 'data', 'status': 'status'}
3334 def __init__(self, data=None, info=None, status=None, tag=None):
3335 '''
3336 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3337 info : str
3338 status : str
3339 tag : str
3340 '''
3341 self.data = data
3342 self.info = info
3343 self.status = status
3344 self.tag = tag
3345
3346
3347 class MachineAddresses(Type):
3348 _toSchema = {'tag': 'tag', 'addresses': 'addresses'}
3349 _toPy = {'tag': 'tag', 'addresses': 'addresses'}
3350 def __init__(self, addresses=None, tag=None):
3351 '''
3352 addresses : typing.Sequence<+T_co>[~Address]<~Address>
3353 tag : str
3354 '''
3355 self.addresses = [Address.from_json(o) for o in addresses or []]
3356 self.tag = tag
3357
3358
3359 class MachineAddressesResult(Type):
3360 _toSchema = {'error': 'error', 'addresses': 'addresses'}
3361 _toPy = {'error': 'error', 'addresses': 'addresses'}
3362 def __init__(self, addresses=None, error=None):
3363 '''
3364 addresses : typing.Sequence<+T_co>[~Address]<~Address>
3365 error : Error
3366 '''
3367 self.addresses = [Address.from_json(o) for o in addresses or []]
3368 self.error = Error.from_json(error) if error else None
3369
3370
3371 class MachineAddressesResults(Type):
3372 _toSchema = {'results': 'results'}
3373 _toPy = {'results': 'results'}
3374 def __init__(self, results=None):
3375 '''
3376 results : typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
3377 '''
3378 self.results = [MachineAddressesResult.from_json(o) for o in results or []]
3379
3380
3381 class SetMachinesAddresses(Type):
3382 _toSchema = {'machine_addresses': 'machine-addresses'}
3383 _toPy = {'machine-addresses': 'machine_addresses'}
3384 def __init__(self, machine_addresses=None):
3385 '''
3386 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
3387 '''
3388 self.machine_addresses = [MachineAddresses.from_json(o) for o in machine_addresses or []]
3389
3390
3391 class SetStatus(Type):
3392 _toSchema = {'entities': 'entities'}
3393 _toPy = {'entities': 'entities'}
3394 def __init__(self, entities=None):
3395 '''
3396 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3397 '''
3398 self.entities = [EntityStatusArgs.from_json(o) for o in entities or []]
3399
3400
3401 class StatusResult(Type):
3402 _toSchema = {'info': 'info', 'status': 'status', 'data': 'data', 'since': 'since', 'error': 'error', 'id_': 'id', 'life': 'life'}
3403 _toPy = {'since': 'since', 'status': 'status', 'data': 'data', 'id': 'id_', 'error': 'error', 'info': 'info', 'life': 'life'}
3404 def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None):
3405 '''
3406 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3407 error : Error
3408 id_ : str
3409 info : str
3410 life : str
3411 since : str
3412 status : str
3413 '''
3414 self.data = data
3415 self.error = Error.from_json(error) if error else None
3416 self.id_ = id_
3417 self.info = info
3418 self.life = life
3419 self.since = since
3420 self.status = status
3421
3422
3423 class StatusResults(Type):
3424 _toSchema = {'results': 'results'}
3425 _toPy = {'results': 'results'}
3426 def __init__(self, results=None):
3427 '''
3428 results : typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
3429 '''
3430 self.results = [StatusResult.from_json(o) for o in results or []]
3431
3432
3433 class ListSSHKeys(Type):
3434 _toSchema = {'mode': 'mode', 'entities': 'entities'}
3435 _toPy = {'mode': 'mode', 'entities': 'entities'}
3436 def __init__(self, entities=None, mode=None):
3437 '''
3438 entities : Entities
3439 mode : bool
3440 '''
3441 self.entities = Entities.from_json(entities) if entities else None
3442 self.mode = mode
3443
3444
3445 class ModifyUserSSHKeys(Type):
3446 _toSchema = {'ssh_keys': 'ssh-keys', 'user': 'user'}
3447 _toPy = {'ssh-keys': 'ssh_keys', 'user': 'user'}
3448 def __init__(self, ssh_keys=None, user=None):
3449 '''
3450 ssh_keys : typing.Sequence<+T_co>[str]
3451 user : str
3452 '''
3453 self.ssh_keys = ssh_keys
3454 self.user = user
3455
3456
3457 class ApplicationTag(Type):
3458 _toSchema = {'name': 'Name'}
3459 _toPy = {'Name': 'name'}
3460 def __init__(self, name=None):
3461 '''
3462 name : str
3463 '''
3464 self.name = name
3465
3466
3467 class ClaimLeadershipBulkParams(Type):
3468 _toSchema = {'params': 'params'}
3469 _toPy = {'params': 'params'}
3470 def __init__(self, params=None):
3471 '''
3472 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
3473 '''
3474 self.params = [ClaimLeadershipParams.from_json(o) for o in params or []]
3475
3476
3477 class ClaimLeadershipBulkResults(Type):
3478 _toSchema = {'results': 'results'}
3479 _toPy = {'results': 'results'}
3480 def __init__(self, results=None):
3481 '''
3482 results : typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3483 '''
3484 self.results = [ErrorResult.from_json(o) for o in results or []]
3485
3486
3487 class ClaimLeadershipParams(Type):
3488 _toSchema = {'duration': 'duration', 'application_tag': 'application-tag', 'unit_tag': 'unit-tag'}
3489 _toPy = {'duration': 'duration', 'unit-tag': 'unit_tag', 'application-tag': 'application_tag'}
3490 def __init__(self, application_tag=None, duration=None, unit_tag=None):
3491 '''
3492 application_tag : str
3493 duration : float
3494 unit_tag : str
3495 '''
3496 self.application_tag = application_tag
3497 self.duration = duration
3498 self.unit_tag = unit_tag
3499
3500
3501 class LogForwardingGetLastSentParams(Type):
3502 _toSchema = {'ids': 'ids'}
3503 _toPy = {'ids': 'ids'}
3504 def __init__(self, ids=None):
3505 '''
3506 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
3507 '''
3508 self.ids = [LogForwardingID.from_json(o) for o in ids or []]
3509
3510
3511 class LogForwardingGetLastSentResult(Type):
3512 _toSchema = {'record_id': 'record-id', 'record_timestamp': 'record-timestamp', 'err': 'err'}
3513 _toPy = {'record-timestamp': 'record_timestamp', 'record-id': 'record_id', 'err': 'err'}
3514 def __init__(self, err=None, record_id=None, record_timestamp=None):
3515 '''
3516 err : Error
3517 record_id : int
3518 record_timestamp : int
3519 '''
3520 self.err = Error.from_json(err) if err else None
3521 self.record_id = record_id
3522 self.record_timestamp = record_timestamp
3523
3524
3525 class LogForwardingGetLastSentResults(Type):
3526 _toSchema = {'results': 'results'}
3527 _toPy = {'results': 'results'}
3528 def __init__(self, results=None):
3529 '''
3530 results : typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
3531 '''
3532 self.results = [LogForwardingGetLastSentResult.from_json(o) for o in results or []]
3533
3534
3535 class LogForwardingID(Type):
3536 _toSchema = {'model': 'model', 'sink': 'sink'}
3537 _toPy = {'model': 'model', 'sink': 'sink'}
3538 def __init__(self, model=None, sink=None):
3539 '''
3540 model : str
3541 sink : str
3542 '''
3543 self.model = model
3544 self.sink = sink
3545
3546
3547 class LogForwardingSetLastSentParam(Type):
3548 _toSchema = {'logforwardingid': 'LogForwardingID', 'record_id': 'record-id', 'record_timestamp': 'record-timestamp'}
3549 _toPy = {'record-timestamp': 'record_timestamp', 'record-id': 'record_id', 'LogForwardingID': 'logforwardingid'}
3550 def __init__(self, logforwardingid=None, record_id=None, record_timestamp=None):
3551 '''
3552 logforwardingid : LogForwardingID
3553 record_id : int
3554 record_timestamp : int
3555 '''
3556 self.logforwardingid = LogForwardingID.from_json(logforwardingid) if logforwardingid else None
3557 self.record_id = record_id
3558 self.record_timestamp = record_timestamp
3559
3560
3561 class LogForwardingSetLastSentParams(Type):
3562 _toSchema = {'params': 'params'}
3563 _toPy = {'params': 'params'}
3564 def __init__(self, params=None):
3565 '''
3566 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
3567 '''
3568 self.params = [LogForwardingSetLastSentParam.from_json(o) for o in params or []]
3569
3570
3571 class ActionExecutionResult(Type):
3572 _toSchema = {'results': 'results', 'action_tag': 'action-tag', 'status': 'status', 'message': 'message'}
3573 _toPy = {'action-tag': 'action_tag', 'status': 'status', 'results': 'results', 'message': 'message'}
3574 def __init__(self, action_tag=None, message=None, results=None, status=None):
3575 '''
3576 action_tag : str
3577 message : str
3578 results : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3579 status : str
3580 '''
3581 self.action_tag = action_tag
3582 self.message = message
3583 self.results = results
3584 self.status = status
3585
3586
3587 class ActionExecutionResults(Type):
3588 _toSchema = {'results': 'results'}
3589 _toPy = {'results': 'results'}
3590 def __init__(self, results=None):
3591 '''
3592 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
3593 '''
3594 self.results = [ActionExecutionResult.from_json(o) for o in results or []]
3595
3596
3597 class EntitiesResult(Type):
3598 _toSchema = {'error': 'error', 'entities': 'entities'}
3599 _toPy = {'error': 'error', 'entities': 'entities'}
3600 def __init__(self, entities=None, error=None):
3601 '''
3602 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3603 error : Error
3604 '''
3605 self.entities = [Entity.from_json(o) for o in entities or []]
3606 self.error = Error.from_json(error) if error else None
3607
3608
3609 class EntitiesResults(Type):
3610 _toSchema = {'results': 'results'}
3611 _toPy = {'results': 'results'}
3612 def __init__(self, results=None):
3613 '''
3614 results : typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
3615 '''
3616 self.results = [EntitiesResult.from_json(o) for o in results or []]
3617
3618
3619 class ProviderInterfaceInfo(Type):
3620 _toSchema = {'interface_name': 'interface-name', 'provider_id': 'provider-id', 'mac_address': 'mac-address'}
3621 _toPy = {'mac-address': 'mac_address', 'provider-id': 'provider_id', 'interface-name': 'interface_name'}
3622 def __init__(self, interface_name=None, mac_address=None, provider_id=None):
3623 '''
3624 interface_name : str
3625 mac_address : str
3626 provider_id : str
3627 '''
3628 self.interface_name = interface_name
3629 self.mac_address = mac_address
3630 self.provider_id = provider_id
3631
3632
3633 class ProviderInterfaceInfoResult(Type):
3634 _toSchema = {'interfaces': 'interfaces', 'machine_tag': 'machine-tag', 'error': 'error'}
3635 _toPy = {'interfaces': 'interfaces', 'machine-tag': 'machine_tag', 'error': 'error'}
3636 def __init__(self, error=None, interfaces=None, machine_tag=None):
3637 '''
3638 error : Error
3639 interfaces : typing.Sequence<+T_co>[~ProviderInterfaceInfo]<~ProviderInterfaceInfo>
3640 machine_tag : str
3641 '''
3642 self.error = Error.from_json(error) if error else None
3643 self.interfaces = [ProviderInterfaceInfo.from_json(o) for o in interfaces or []]
3644 self.machine_tag = machine_tag
3645
3646
3647 class ProviderInterfaceInfoResults(Type):
3648 _toSchema = {'results': 'results'}
3649 _toPy = {'results': 'results'}
3650 def __init__(self, results=None):
3651 '''
3652 results : typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
3653 '''
3654 self.results = [ProviderInterfaceInfoResult.from_json(o) for o in results or []]
3655
3656
3657 class JobsResult(Type):
3658 _toSchema = {'jobs': 'jobs', 'error': 'error'}
3659 _toPy = {'jobs': 'jobs', 'error': 'error'}
3660 def __init__(self, error=None, jobs=None):
3661 '''
3662 error : Error
3663 jobs : typing.Sequence<+T_co>[str]
3664 '''
3665 self.error = Error.from_json(error) if error else None
3666 self.jobs = jobs
3667
3668
3669 class JobsResults(Type):
3670 _toSchema = {'results': 'results'}
3671 _toPy = {'results': 'results'}
3672 def __init__(self, results=None):
3673 '''
3674 results : typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
3675 '''
3676 self.results = [JobsResult.from_json(o) for o in results or []]
3677
3678
3679 class NetworkConfig(Type):
3680 _toSchema = {'interface_name': 'interface-name', 'cidr': 'cidr', 'mac_address': 'mac-address', 'dns_servers': 'dns-servers', 'provider_vlan_id': 'provider-vlan-id', 'provider_address_id': 'provider-address-id', 'no_auto_start': 'no-auto-start', 'interface_type': 'interface-type', 'provider_space_id': 'provider-space-id', 'address': 'address', 'dns_search_domains': 'dns-search-domains', 'mtu': 'mtu', 'disabled': 'disabled', 'provider_subnet_id': 'provider-subnet-id', 'config_type': 'config-type', 'parent_interface_name': 'parent-interface-name', 'gateway_address': 'gateway-address', 'vlan_tag': 'vlan-tag', 'device_index': 'device-index', 'provider_id': 'provider-id'}
3681 _toPy = {'provider-address-id': 'provider_address_id', 'mac-address': 'mac_address', 'cidr': 'cidr', 'device-index': 'device_index', 'dns-search-domains': 'dns_search_domains', 'provider-space-id': 'provider_space_id', 'parent-interface-name': 'parent_interface_name', 'vlan-tag': 'vlan_tag', 'address': 'address', 'provider-vlan-id': 'provider_vlan_id', 'mtu': 'mtu', 'dns-servers': 'dns_servers', 'disabled': 'disabled', 'interface-name': 'interface_name', 'provider-subnet-id': 'provider_subnet_id', 'no-auto-start': 'no_auto_start', 'provider-id': 'provider_id', 'config-type': 'config_type', 'interface-type': 'interface_type', 'gateway-address': 'gateway_address'}
3682 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):
3683 '''
3684 address : str
3685 cidr : str
3686 config_type : str
3687 device_index : int
3688 disabled : bool
3689 dns_search_domains : typing.Sequence<+T_co>[str]
3690 dns_servers : typing.Sequence<+T_co>[str]
3691 gateway_address : str
3692 interface_name : str
3693 interface_type : str
3694 mac_address : str
3695 mtu : int
3696 no_auto_start : bool
3697 parent_interface_name : str
3698 provider_address_id : str
3699 provider_id : str
3700 provider_space_id : str
3701 provider_subnet_id : str
3702 provider_vlan_id : str
3703 vlan_tag : int
3704 '''
3705 self.address = address
3706 self.cidr = cidr
3707 self.config_type = config_type
3708 self.device_index = device_index
3709 self.disabled = disabled
3710 self.dns_search_domains = dns_search_domains
3711 self.dns_servers = dns_servers
3712 self.gateway_address = gateway_address
3713 self.interface_name = interface_name
3714 self.interface_type = interface_type
3715 self.mac_address = mac_address
3716 self.mtu = mtu
3717 self.no_auto_start = no_auto_start
3718 self.parent_interface_name = parent_interface_name
3719 self.provider_address_id = provider_address_id
3720 self.provider_id = provider_id
3721 self.provider_space_id = provider_space_id
3722 self.provider_subnet_id = provider_subnet_id
3723 self.provider_vlan_id = provider_vlan_id
3724 self.vlan_tag = vlan_tag
3725
3726
3727 class SetMachineNetworkConfig(Type):
3728 _toSchema = {'tag': 'tag', 'config': 'config'}
3729 _toPy = {'tag': 'tag', 'config': 'config'}
3730 def __init__(self, config=None, tag=None):
3731 '''
3732 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3733 tag : str
3734 '''
3735 self.config = [NetworkConfig.from_json(o) for o in config or []]
3736 self.tag = tag
3737
3738
3739 class MeterStatusResult(Type):
3740 _toSchema = {'code': 'code', 'error': 'error', 'info': 'info'}
3741 _toPy = {'code': 'code', 'error': 'error', 'info': 'info'}
3742 def __init__(self, code=None, error=None, info=None):
3743 '''
3744 code : str
3745 error : Error
3746 info : str
3747 '''
3748 self.code = code
3749 self.error = Error.from_json(error) if error else None
3750 self.info = info
3751
3752
3753 class MeterStatusResults(Type):
3754 _toSchema = {'results': 'results'}
3755 _toPy = {'results': 'results'}
3756 def __init__(self, results=None):
3757 '''
3758 results : typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
3759 '''
3760 self.results = [MeterStatusResult.from_json(o) for o in results or []]
3761
3762
3763 class Metric(Type):
3764 _toSchema = {'key': 'key', 'value': 'value', 'time': 'time'}
3765 _toPy = {'key': 'key', 'value': 'value', 'time': 'time'}
3766 def __init__(self, key=None, time=None, value=None):
3767 '''
3768 key : str
3769 time : str
3770 value : str
3771 '''
3772 self.key = key
3773 self.time = time
3774 self.value = value
3775
3776
3777 class MetricBatch(Type):
3778 _toSchema = {'charm_url': 'charm-url', 'metrics': 'metrics', 'created': 'created', 'uuid': 'uuid'}
3779 _toPy = {'charm-url': 'charm_url', 'created': 'created', 'metrics': 'metrics', 'uuid': 'uuid'}
3780 def __init__(self, charm_url=None, created=None, metrics=None, uuid=None):
3781 '''
3782 charm_url : str
3783 created : str
3784 metrics : typing.Sequence<+T_co>[~Metric]<~Metric>
3785 uuid : str
3786 '''
3787 self.charm_url = charm_url
3788 self.created = created
3789 self.metrics = [Metric.from_json(o) for o in metrics or []]
3790 self.uuid = uuid
3791
3792
3793 class MetricBatchParam(Type):
3794 _toSchema = {'batch': 'batch', 'tag': 'tag'}
3795 _toPy = {'batch': 'batch', 'tag': 'tag'}
3796 def __init__(self, batch=None, tag=None):
3797 '''
3798 batch : MetricBatch
3799 tag : str
3800 '''
3801 self.batch = MetricBatch.from_json(batch) if batch else None
3802 self.tag = tag
3803
3804
3805 class MetricBatchParams(Type):
3806 _toSchema = {'batches': 'batches'}
3807 _toPy = {'batches': 'batches'}
3808 def __init__(self, batches=None):
3809 '''
3810 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
3811 '''
3812 self.batches = [MetricBatchParam.from_json(o) for o in batches or []]
3813
3814
3815 class EntityMetrics(Type):
3816 _toSchema = {'metrics': 'metrics', 'error': 'error'}
3817 _toPy = {'metrics': 'metrics', 'error': 'error'}
3818 def __init__(self, error=None, metrics=None):
3819 '''
3820 error : Error
3821 metrics : typing.Sequence<+T_co>[~MetricResult]<~MetricResult>
3822 '''
3823 self.error = Error.from_json(error) if error else None
3824 self.metrics = [MetricResult.from_json(o) for o in metrics or []]
3825
3826
3827 class MeterStatusParam(Type):
3828 _toSchema = {'code': 'code', 'tag': 'tag', 'info': 'info'}
3829 _toPy = {'code': 'code', 'tag': 'tag', 'info': 'info'}
3830 def __init__(self, code=None, info=None, tag=None):
3831 '''
3832 code : str
3833 info : str
3834 tag : str
3835 '''
3836 self.code = code
3837 self.info = info
3838 self.tag = tag
3839
3840
3841 class MeterStatusParams(Type):
3842 _toSchema = {'statues': 'statues'}
3843 _toPy = {'statues': 'statues'}
3844 def __init__(self, statues=None):
3845 '''
3846 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
3847 '''
3848 self.statues = [MeterStatusParam.from_json(o) for o in statues or []]
3849
3850
3851 class MetricResult(Type):
3852 _toSchema = {'key': 'key', 'value': 'value', 'time': 'time', 'unit': 'unit'}
3853 _toPy = {'key': 'key', 'value': 'value', 'time': 'time', 'unit': 'unit'}
3854 def __init__(self, key=None, time=None, unit=None, value=None):
3855 '''
3856 key : str
3857 time : str
3858 unit : str
3859 value : str
3860 '''
3861 self.key = key
3862 self.time = time
3863 self.unit = unit
3864 self.value = value
3865
3866
3867 class MetricResults(Type):
3868 _toSchema = {'results': 'results'}
3869 _toPy = {'results': 'results'}
3870 def __init__(self, results=None):
3871 '''
3872 results : typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
3873 '''
3874 self.results = [EntityMetrics.from_json(o) for o in results or []]
3875
3876
3877 class PhaseResult(Type):
3878 _toSchema = {'error': 'error', 'phase': 'phase'}
3879 _toPy = {'error': 'error', 'phase': 'phase'}
3880 def __init__(self, error=None, phase=None):
3881 '''
3882 error : Error
3883 phase : str
3884 '''
3885 self.error = Error.from_json(error) if error else None
3886 self.phase = phase
3887
3888
3889 class PhaseResults(Type):
3890 _toSchema = {'results': 'results'}
3891 _toPy = {'results': 'results'}
3892 def __init__(self, results=None):
3893 '''
3894 results : typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
3895 '''
3896 self.results = [PhaseResult.from_json(o) for o in results or []]
3897
3898
3899 class MasterMigrationStatus(Type):
3900 _toSchema = {'spec': 'spec', 'migration_id': 'migration-id', 'phase_changed_time': 'phase-changed-time', 'phase': 'phase'}
3901 _toPy = {'spec': 'spec', 'phase-changed-time': 'phase_changed_time', 'migration-id': 'migration_id', 'phase': 'phase'}
3902 def __init__(self, migration_id=None, phase=None, phase_changed_time=None, spec=None):
3903 '''
3904 migration_id : str
3905 phase : str
3906 phase_changed_time : str
3907 spec : MigrationSpec
3908 '''
3909 self.migration_id = migration_id
3910 self.phase = phase
3911 self.phase_changed_time = phase_changed_time
3912 self.spec = MigrationSpec.from_json(spec) if spec else None
3913
3914
3915 class MigrationModelInfo(Type):
3916 _toSchema = {'owner_tag': 'owner-tag', 'name': 'name', 'uuid': 'uuid', 'agent_version': 'agent-version'}
3917 _toPy = {'owner-tag': 'owner_tag', 'agent-version': 'agent_version', 'name': 'name', 'uuid': 'uuid'}
3918 def __init__(self, agent_version=None, name=None, owner_tag=None, uuid=None):
3919 '''
3920 agent_version : Number
3921 name : str
3922 owner_tag : str
3923 uuid : str
3924 '''
3925 self.agent_version = Number.from_json(agent_version) if agent_version else None
3926 self.name = name
3927 self.owner_tag = owner_tag
3928 self.uuid = uuid
3929
3930
3931 class MinionReports(Type):
3932 _toSchema = {'migration_id': 'migration-id', 'unknown_sample': 'unknown-sample', 'failed': 'failed', 'success_count': 'success-count', 'unknown_count': 'unknown-count', 'phase': 'phase'}
3933 _toPy = {'success-count': 'success_count', 'unknown-sample': 'unknown_sample', 'migration-id': 'migration_id', 'failed': 'failed', 'unknown-count': 'unknown_count', 'phase': 'phase'}
3934 def __init__(self, failed=None, migration_id=None, phase=None, success_count=None, unknown_count=None, unknown_sample=None):
3935 '''
3936 failed : typing.Sequence<+T_co>[str]
3937 migration_id : str
3938 phase : str
3939 success_count : int
3940 unknown_count : int
3941 unknown_sample : typing.Sequence<+T_co>[str]
3942 '''
3943 self.failed = failed
3944 self.migration_id = migration_id
3945 self.phase = phase
3946 self.success_count = success_count
3947 self.unknown_count = unknown_count
3948 self.unknown_sample = unknown_sample
3949
3950
3951 class SerializedModel(Type):
3952 _toSchema = {'charms': 'charms', 'bytes_': 'bytes', 'tools': 'tools'}
3953 _toPy = {'charms': 'charms', 'bytes': 'bytes_', 'tools': 'tools'}
3954 def __init__(self, bytes_=None, charms=None, tools=None):
3955 '''
3956 bytes_ : typing.Sequence<+T_co>[int]
3957 charms : typing.Sequence<+T_co>[str]
3958 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
3959 '''
3960 self.bytes_ = bytes_
3961 self.charms = charms
3962 self.tools = [SerializedModelTools.from_json(o) for o in tools or []]
3963
3964
3965 class SerializedModelTools(Type):
3966 _toSchema = {'uri': 'uri', 'version': 'version'}
3967 _toPy = {'uri': 'uri', 'version': 'version'}
3968 def __init__(self, uri=None, version=None):
3969 '''
3970 uri : str
3971 version : str
3972 '''
3973 self.uri = uri
3974 self.version = version
3975
3976
3977 class SetMigrationPhaseArgs(Type):
3978 _toSchema = {'phase': 'phase'}
3979 _toPy = {'phase': 'phase'}
3980 def __init__(self, phase=None):
3981 '''
3982 phase : str
3983 '''
3984 self.phase = phase
3985
3986
3987 class SetMigrationStatusMessageArgs(Type):
3988 _toSchema = {'message': 'message'}
3989 _toPy = {'message': 'message'}
3990 def __init__(self, message=None):
3991 '''
3992 message : str
3993 '''
3994 self.message = message
3995
3996
3997 class MinionReport(Type):
3998 _toSchema = {'migration_id': 'migration-id', 'success': 'success', 'phase': 'phase'}
3999 _toPy = {'success': 'success', 'migration-id': 'migration_id', 'phase': 'phase'}
4000 def __init__(self, migration_id=None, phase=None, success=None):
4001 '''
4002 migration_id : str
4003 phase : str
4004 success : bool
4005 '''
4006 self.migration_id = migration_id
4007 self.phase = phase
4008 self.success = success
4009
4010
4011 class MigrationStatus(Type):
4012 _toSchema = {'migration_id': 'migration-id', 'target_ca_cert': 'target-ca-cert', 'source_api_addrs': 'source-api-addrs', 'attempt': 'attempt', 'source_ca_cert': 'source-ca-cert', 'target_api_addrs': 'target-api-addrs', 'phase': 'phase'}
4013 _toPy = {'source-ca-cert': 'source_ca_cert', 'target-ca-cert': 'target_ca_cert', 'migration-id': 'migration_id', 'attempt': 'attempt', 'target-api-addrs': 'target_api_addrs', 'source-api-addrs': 'source_api_addrs', 'phase': 'phase'}
4014 def __init__(self, attempt=None, migration_id=None, phase=None, source_api_addrs=None, source_ca_cert=None, target_api_addrs=None, target_ca_cert=None):
4015 '''
4016 attempt : int
4017 migration_id : str
4018 phase : str
4019 source_api_addrs : typing.Sequence<+T_co>[str]
4020 source_ca_cert : str
4021 target_api_addrs : typing.Sequence<+T_co>[str]
4022 target_ca_cert : str
4023 '''
4024 self.attempt = attempt
4025 self.migration_id = migration_id
4026 self.phase = phase
4027 self.source_api_addrs = source_api_addrs
4028 self.source_ca_cert = source_ca_cert
4029 self.target_api_addrs = target_api_addrs
4030 self.target_ca_cert = target_ca_cert
4031
4032
4033 class ModelArgs(Type):
4034 _toSchema = {'model_tag': 'model-tag'}
4035 _toPy = {'model-tag': 'model_tag'}
4036 def __init__(self, model_tag=None):
4037 '''
4038 model_tag : str
4039 '''
4040 self.model_tag = model_tag
4041
4042
4043 class MapResult(Type):
4044 _toSchema = {'result': 'result', 'error': 'error'}
4045 _toPy = {'result': 'result', 'error': 'error'}
4046 def __init__(self, error=None, result=None):
4047 '''
4048 error : Error
4049 result : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4050 '''
4051 self.error = Error.from_json(error) if error else None
4052 self.result = result
4053
4054
4055 class MapResults(Type):
4056 _toSchema = {'results': 'results'}
4057 _toPy = {'results': 'results'}
4058 def __init__(self, results=None):
4059 '''
4060 results : typing.Sequence<+T_co>[~MapResult]<~MapResult>
4061 '''
4062 self.results = [MapResult.from_json(o) for o in results or []]
4063
4064
4065 class ModelCreateArgs(Type):
4066 _toSchema = {'cloud_tag': 'cloud-tag', 'owner_tag': 'owner-tag', 'config': 'config', 'region': 'region', 'name': 'name', 'credential': 'credential'}
4067 _toPy = {'region': 'region', 'cloud-tag': 'cloud_tag', 'config': 'config', 'owner-tag': 'owner_tag', 'name': 'name', 'credential': 'credential'}
4068 def __init__(self, cloud_tag=None, config=None, credential=None, name=None, owner_tag=None, region=None):
4069 '''
4070 cloud_tag : str
4071 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4072 credential : str
4073 name : str
4074 owner_tag : str
4075 region : str
4076 '''
4077 self.cloud_tag = cloud_tag
4078 self.config = config
4079 self.credential = credential
4080 self.name = name
4081 self.owner_tag = owner_tag
4082 self.region = region
4083
4084
4085 class ModelInfoResult(Type):
4086 _toSchema = {'result': 'result', 'error': 'error'}
4087 _toPy = {'result': 'result', 'error': 'error'}
4088 def __init__(self, error=None, result=None):
4089 '''
4090 error : Error
4091 result : ModelInfo
4092 '''
4093 self.error = Error.from_json(error) if error else None
4094 self.result = ModelInfo.from_json(result) if result else None
4095
4096
4097 class ModelInfoResults(Type):
4098 _toSchema = {'results': 'results'}
4099 _toPy = {'results': 'results'}
4100 def __init__(self, results=None):
4101 '''
4102 results : typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
4103 '''
4104 self.results = [ModelInfoResult.from_json(o) for o in results or []]
4105
4106
4107 class ModifyModelAccess(Type):
4108 _toSchema = {'user_tag': 'user-tag', 'action': 'action', 'access': 'access', 'model_tag': 'model-tag'}
4109 _toPy = {'user-tag': 'user_tag', 'action': 'action', 'access': 'access', 'model-tag': 'model_tag'}
4110 def __init__(self, access=None, action=None, model_tag=None, user_tag=None):
4111 '''
4112 access : str
4113 action : str
4114 model_tag : str
4115 user_tag : str
4116 '''
4117 self.access = access
4118 self.action = action
4119 self.model_tag = model_tag
4120 self.user_tag = user_tag
4121
4122
4123 class ModifyModelAccessRequest(Type):
4124 _toSchema = {'changes': 'changes'}
4125 _toPy = {'changes': 'changes'}
4126 def __init__(self, changes=None):
4127 '''
4128 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
4129 '''
4130 self.changes = [ModifyModelAccess.from_json(o) for o in changes or []]
4131
4132
4133 class ConstraintsResult(Type):
4134 _toSchema = {'error': 'error', 'constraints': 'constraints'}
4135 _toPy = {'error': 'error', 'constraints': 'constraints'}
4136 def __init__(self, constraints=None, error=None):
4137 '''
4138 constraints : Value
4139 error : Error
4140 '''
4141 self.constraints = Value.from_json(constraints) if constraints else None
4142 self.error = Error.from_json(error) if error else None
4143
4144
4145 class ConstraintsResults(Type):
4146 _toSchema = {'results': 'results'}
4147 _toPy = {'results': 'results'}
4148 def __init__(self, results=None):
4149 '''
4150 results : typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
4151 '''
4152 self.results = [ConstraintsResult.from_json(o) for o in results or []]
4153
4154
4155 class ContainerConfig(Type):
4156 _toSchema = {'updatebehavior': 'UpdateBehavior', 'authorized_keys': 'authorized-keys', 'apt_mirror': 'apt-mirror', 'provider_type': 'provider-type', 'apt_proxy': 'apt-proxy', 'proxy': 'proxy', 'ssl_hostname_verification': 'ssl-hostname-verification'}
4157 _toPy = {'ssl-hostname-verification': 'ssl_hostname_verification', 'authorized-keys': 'authorized_keys', 'UpdateBehavior': 'updatebehavior', 'proxy': 'proxy', 'apt-mirror': 'apt_mirror', 'apt-proxy': 'apt_proxy', 'provider-type': 'provider_type'}
4158 def __init__(self, updatebehavior=None, apt_mirror=None, apt_proxy=None, authorized_keys=None, provider_type=None, proxy=None, ssl_hostname_verification=None):
4159 '''
4160 updatebehavior : UpdateBehavior
4161 apt_mirror : str
4162 apt_proxy : Settings
4163 authorized_keys : str
4164 provider_type : str
4165 proxy : Settings
4166 ssl_hostname_verification : bool
4167 '''
4168 self.updatebehavior = UpdateBehavior.from_json(updatebehavior) if updatebehavior else None
4169 self.apt_mirror = apt_mirror
4170 self.apt_proxy = Settings.from_json(apt_proxy) if apt_proxy else None
4171 self.authorized_keys = authorized_keys
4172 self.provider_type = provider_type
4173 self.proxy = Settings.from_json(proxy) if proxy else None
4174 self.ssl_hostname_verification = ssl_hostname_verification
4175
4176
4177 class ContainerManagerConfig(Type):
4178 _toSchema = {'config': 'config'}
4179 _toPy = {'config': 'config'}
4180 def __init__(self, config=None):
4181 '''
4182 config : typing.Mapping<~KT, +VT_co>[str, str]
4183 '''
4184 self.config = config
4185
4186
4187 class ContainerManagerConfigParams(Type):
4188 _toSchema = {'type_': 'type'}
4189 _toPy = {'type': 'type_'}
4190 def __init__(self, type_=None):
4191 '''
4192 type_ : str
4193 '''
4194 self.type_ = type_
4195
4196
4197 class DistributionGroupResult(Type):
4198 _toSchema = {'result': 'result', 'error': 'error'}
4199 _toPy = {'result': 'result', 'error': 'error'}
4200 def __init__(self, error=None, result=None):
4201 '''
4202 error : Error
4203 result : typing.Sequence<+T_co>[str]
4204 '''
4205 self.error = Error.from_json(error) if error else None
4206 self.result = result
4207
4208
4209 class DistributionGroupResults(Type):
4210 _toSchema = {'results': 'results'}
4211 _toPy = {'results': 'results'}
4212 def __init__(self, results=None):
4213 '''
4214 results : typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
4215 '''
4216 self.results = [DistributionGroupResult.from_json(o) for o in results or []]
4217
4218
4219 class InstanceInfo(Type):
4220 _toSchema = {'network_config': 'network-config', 'tag': 'tag', 'volumes': 'volumes', 'instance_id': 'instance-id', 'volume_attachments': 'volume-attachments', 'nonce': 'nonce', 'characteristics': 'characteristics'}
4221 _toPy = {'tag': 'tag', 'network-config': 'network_config', 'volumes': 'volumes', 'instance-id': 'instance_id', 'nonce': 'nonce', 'volume-attachments': 'volume_attachments', 'characteristics': 'characteristics'}
4222 def __init__(self, characteristics=None, instance_id=None, network_config=None, nonce=None, tag=None, volume_attachments=None, volumes=None):
4223 '''
4224 characteristics : HardwareCharacteristics
4225 instance_id : str
4226 network_config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
4227 nonce : str
4228 tag : str
4229 volume_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo>
4230 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
4231 '''
4232 self.characteristics = HardwareCharacteristics.from_json(characteristics) if characteristics else None
4233 self.instance_id = instance_id
4234 self.network_config = [NetworkConfig.from_json(o) for o in network_config or []]
4235 self.nonce = nonce
4236 self.tag = tag
4237 self.volume_attachments = volume_attachments
4238 self.volumes = [Volume.from_json(o) for o in volumes or []]
4239
4240
4241 class InstancesInfo(Type):
4242 _toSchema = {'machines': 'machines'}
4243 _toPy = {'machines': 'machines'}
4244 def __init__(self, machines=None):
4245 '''
4246 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
4247 '''
4248 self.machines = [InstanceInfo.from_json(o) for o in machines or []]
4249
4250
4251 class MachineContainers(Type):
4252 _toSchema = {'container_types': 'container-types', 'machine_tag': 'machine-tag'}
4253 _toPy = {'container-types': 'container_types', 'machine-tag': 'machine_tag'}
4254 def __init__(self, container_types=None, machine_tag=None):
4255 '''
4256 container_types : typing.Sequence<+T_co>[str]
4257 machine_tag : str
4258 '''
4259 self.container_types = container_types
4260 self.machine_tag = machine_tag
4261
4262
4263 class MachineContainersParams(Type):
4264 _toSchema = {'params': 'params'}
4265 _toPy = {'params': 'params'}
4266 def __init__(self, params=None):
4267 '''
4268 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
4269 '''
4270 self.params = [MachineContainers.from_json(o) for o in params or []]
4271
4272
4273 class MachineNetworkConfigResult(Type):
4274 _toSchema = {'error': 'error', 'info': 'info'}
4275 _toPy = {'error': 'error', 'info': 'info'}
4276 def __init__(self, error=None, info=None):
4277 '''
4278 error : Error
4279 info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
4280 '''
4281 self.error = Error.from_json(error) if error else None
4282 self.info = [NetworkConfig.from_json(o) for o in info or []]
4283
4284
4285 class MachineNetworkConfigResults(Type):
4286 _toSchema = {'results': 'results'}
4287 _toPy = {'results': 'results'}
4288 def __init__(self, results=None):
4289 '''
4290 results : typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
4291 '''
4292 self.results = [MachineNetworkConfigResult.from_json(o) for o in results or []]
4293
4294
4295 class ProvisioningInfo(Type):
4296 _toSchema = {'series': 'series', 'controller_config': 'controller-config', 'subnets_to_zones': 'subnets-to-zones', 'image_metadata': 'image-metadata', 'tags': 'tags', 'endpoint_bindings': 'endpoint-bindings', 'volumes': 'volumes', 'constraints': 'constraints', 'jobs': 'jobs', 'placement': 'placement'}
4297 _toPy = {'series': 'series', 'placement': 'placement', 'jobs': 'jobs', 'tags': 'tags', 'constraints': 'constraints', 'subnets-to-zones': 'subnets_to_zones', 'endpoint-bindings': 'endpoint_bindings', 'image-metadata': 'image_metadata', 'volumes': 'volumes', 'controller-config': 'controller_config'}
4298 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):
4299 '''
4300 constraints : Value
4301 controller_config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4302 endpoint_bindings : typing.Mapping<~KT, +VT_co>[str, str]
4303 image_metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
4304 jobs : typing.Sequence<+T_co>[str]
4305 placement : str
4306 series : str
4307 subnets_to_zones : typing.Sequence<+T_co>[str]
4308 tags : typing.Mapping<~KT, +VT_co>[str, str]
4309 volumes : typing.Sequence<+T_co>[~VolumeParams]<~VolumeParams>
4310 '''
4311 self.constraints = Value.from_json(constraints) if constraints else None
4312 self.controller_config = controller_config
4313 self.endpoint_bindings = endpoint_bindings
4314 self.image_metadata = [CloudImageMetadata.from_json(o) for o in image_metadata or []]
4315 self.jobs = jobs
4316 self.placement = placement
4317 self.series = series
4318 self.subnets_to_zones = subnets_to_zones
4319 self.tags = tags
4320 self.volumes = [VolumeParams.from_json(o) for o in volumes or []]
4321
4322
4323 class ProvisioningInfoResult(Type):
4324 _toSchema = {'result': 'result', 'error': 'error'}
4325 _toPy = {'result': 'result', 'error': 'error'}
4326 def __init__(self, error=None, result=None):
4327 '''
4328 error : Error
4329 result : ProvisioningInfo
4330 '''
4331 self.error = Error.from_json(error) if error else None
4332 self.result = ProvisioningInfo.from_json(result) if result else None
4333
4334
4335 class ProvisioningInfoResults(Type):
4336 _toSchema = {'results': 'results'}
4337 _toPy = {'results': 'results'}
4338 def __init__(self, results=None):
4339 '''
4340 results : typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
4341 '''
4342 self.results = [ProvisioningInfoResult.from_json(o) for o in results or []]
4343
4344
4345 class Settings(Type):
4346 _toSchema = {'noproxy': 'NoProxy', 'https': 'Https', 'http': 'Http', 'ftp': 'Ftp'}
4347 _toPy = {'NoProxy': 'noproxy', 'Http': 'http', 'Ftp': 'ftp', 'Https': 'https'}
4348 def __init__(self, ftp=None, http=None, https=None, noproxy=None):
4349 '''
4350 ftp : str
4351 http : str
4352 https : str
4353 noproxy : str
4354 '''
4355 self.ftp = ftp
4356 self.http = http
4357 self.https = https
4358 self.noproxy = noproxy
4359
4360
4361 class ToolsResult(Type):
4362 _toSchema = {'tools': 'tools', 'disable_ssl_hostname_verification': 'disable-ssl-hostname-verification', 'error': 'error'}
4363 _toPy = {'disable-ssl-hostname-verification': 'disable_ssl_hostname_verification', 'tools': 'tools', 'error': 'error'}
4364 def __init__(self, disable_ssl_hostname_verification=None, error=None, tools=None):
4365 '''
4366 disable_ssl_hostname_verification : bool
4367 error : Error
4368 tools : typing.Sequence<+T_co>[~Tools]<~Tools>
4369 '''
4370 self.disable_ssl_hostname_verification = disable_ssl_hostname_verification
4371 self.error = Error.from_json(error) if error else None
4372 self.tools = [Tools.from_json(o) for o in tools or []]
4373
4374
4375 class ToolsResults(Type):
4376 _toSchema = {'results': 'results'}
4377 _toPy = {'results': 'results'}
4378 def __init__(self, results=None):
4379 '''
4380 results : typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
4381 '''
4382 self.results = [ToolsResult.from_json(o) for o in results or []]
4383
4384
4385 class UpdateBehavior(Type):
4386 _toSchema = {'enable_os_refresh_update': 'enable-os-refresh-update', 'enable_os_upgrade': 'enable-os-upgrade'}
4387 _toPy = {'enable-os-upgrade': 'enable_os_upgrade', 'enable-os-refresh-update': 'enable_os_refresh_update'}
4388 def __init__(self, enable_os_refresh_update=None, enable_os_upgrade=None):
4389 '''
4390 enable_os_refresh_update : bool
4391 enable_os_upgrade : bool
4392 '''
4393 self.enable_os_refresh_update = enable_os_refresh_update
4394 self.enable_os_upgrade = enable_os_upgrade
4395
4396
4397 class Volume(Type):
4398 _toSchema = {'volume_tag': 'volume-tag', 'info': 'info'}
4399 _toPy = {'volume-tag': 'volume_tag', 'info': 'info'}
4400 def __init__(self, info=None, volume_tag=None):
4401 '''
4402 info : VolumeInfo
4403 volume_tag : str
4404 '''
4405 self.info = VolumeInfo.from_json(info) if info else None
4406 self.volume_tag = volume_tag
4407
4408
4409 class VolumeAttachmentInfo(Type):
4410 _toSchema = {'device_link': 'device-link', 'bus_address': 'bus-address', 'read_only': 'read-only', 'device_name': 'device-name'}
4411 _toPy = {'device-name': 'device_name', 'device-link': 'device_link', 'bus-address': 'bus_address', 'read-only': 'read_only'}
4412 def __init__(self, bus_address=None, device_link=None, device_name=None, read_only=None):
4413 '''
4414 bus_address : str
4415 device_link : str
4416 device_name : str
4417 read_only : bool
4418 '''
4419 self.bus_address = bus_address
4420 self.device_link = device_link
4421 self.device_name = device_name
4422 self.read_only = read_only
4423
4424
4425 class VolumeAttachmentParams(Type):
4426 _toSchema = {'machine_tag': 'machine-tag', 'provider': 'provider', 'read_only': 'read-only', 'volume_id': 'volume-id', 'instance_id': 'instance-id', 'volume_tag': 'volume-tag'}
4427 _toPy = {'volume-tag': 'volume_tag', 'read-only': 'read_only', 'volume-id': 'volume_id', 'provider': 'provider', 'instance-id': 'instance_id', 'machine-tag': 'machine_tag'}
4428 def __init__(self, instance_id=None, machine_tag=None, provider=None, read_only=None, volume_id=None, volume_tag=None):
4429 '''
4430 instance_id : str
4431 machine_tag : str
4432 provider : str
4433 read_only : bool
4434 volume_id : str
4435 volume_tag : str
4436 '''
4437 self.instance_id = instance_id
4438 self.machine_tag = machine_tag
4439 self.provider = provider
4440 self.read_only = read_only
4441 self.volume_id = volume_id
4442 self.volume_tag = volume_tag
4443
4444
4445 class VolumeInfo(Type):
4446 _toSchema = {'persistent': 'persistent', 'size': 'size', 'volume_id': 'volume-id', 'hardware_id': 'hardware-id'}
4447 _toPy = {'persistent': 'persistent', 'size': 'size', 'volume-id': 'volume_id', 'hardware-id': 'hardware_id'}
4448 def __init__(self, hardware_id=None, persistent=None, size=None, volume_id=None):
4449 '''
4450 hardware_id : str
4451 persistent : bool
4452 size : int
4453 volume_id : str
4454 '''
4455 self.hardware_id = hardware_id
4456 self.persistent = persistent
4457 self.size = size
4458 self.volume_id = volume_id
4459
4460
4461 class VolumeParams(Type):
4462 _toSchema = {'tags': 'tags', 'volume_tag': 'volume-tag', 'attachment': 'attachment', 'provider': 'provider', 'attributes': 'attributes', 'size': 'size'}
4463 _toPy = {'tags': 'tags', 'volume-tag': 'volume_tag', 'attachment': 'attachment', 'provider': 'provider', 'attributes': 'attributes', 'size': 'size'}
4464 def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volume_tag=None):
4465 '''
4466 attachment : VolumeAttachmentParams
4467 attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4468 provider : str
4469 size : int
4470 tags : typing.Mapping<~KT, +VT_co>[str, str]
4471 volume_tag : str
4472 '''
4473 self.attachment = VolumeAttachmentParams.from_json(attachment) if attachment else None
4474 self.attributes = attributes
4475 self.provider = provider
4476 self.size = size
4477 self.tags = tags
4478 self.volume_tag = volume_tag
4479
4480
4481 class WatchContainer(Type):
4482 _toSchema = {'machine_tag': 'machine-tag', 'container_type': 'container-type'}
4483 _toPy = {'container-type': 'container_type', 'machine-tag': 'machine_tag'}
4484 def __init__(self, container_type=None, machine_tag=None):
4485 '''
4486 container_type : str
4487 machine_tag : str
4488 '''
4489 self.container_type = container_type
4490 self.machine_tag = machine_tag
4491
4492
4493 class WatchContainers(Type):
4494 _toSchema = {'params': 'params'}
4495 _toPy = {'params': 'params'}
4496 def __init__(self, params=None):
4497 '''
4498 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
4499 '''
4500 self.params = [WatchContainer.from_json(o) for o in params or []]
4501
4502
4503 class ProxyConfig(Type):
4504 _toSchema = {'no_proxy': 'no-proxy', 'https': 'https', 'http': 'http', 'ftp': 'ftp'}
4505 _toPy = {'no-proxy': 'no_proxy', 'https': 'https', 'http': 'http', 'ftp': 'ftp'}
4506 def __init__(self, ftp=None, http=None, https=None, no_proxy=None):
4507 '''
4508 ftp : str
4509 http : str
4510 https : str
4511 no_proxy : str
4512 '''
4513 self.ftp = ftp
4514 self.http = http
4515 self.https = https
4516 self.no_proxy = no_proxy
4517
4518
4519 class ProxyConfigResult(Type):
4520 _toSchema = {'proxy_settings': 'proxy-settings', 'error': 'error', 'apt_proxy_settings': 'apt-proxy-settings'}
4521 _toPy = {'proxy-settings': 'proxy_settings', 'apt-proxy-settings': 'apt_proxy_settings', 'error': 'error'}
4522 def __init__(self, apt_proxy_settings=None, error=None, proxy_settings=None):
4523 '''
4524 apt_proxy_settings : ProxyConfig
4525 error : Error
4526 proxy_settings : ProxyConfig
4527 '''
4528 self.apt_proxy_settings = ProxyConfig.from_json(apt_proxy_settings) if apt_proxy_settings else None
4529 self.error = Error.from_json(error) if error else None
4530 self.proxy_settings = ProxyConfig.from_json(proxy_settings) if proxy_settings else None
4531
4532
4533 class ProxyConfigResults(Type):
4534 _toSchema = {'results': 'results'}
4535 _toPy = {'results': 'results'}
4536 def __init__(self, results=None):
4537 '''
4538 results : typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
4539 '''
4540 self.results = [ProxyConfigResult.from_json(o) for o in results or []]
4541
4542
4543 class RebootActionResult(Type):
4544 _toSchema = {'result': 'result', 'error': 'error'}
4545 _toPy = {'result': 'result', 'error': 'error'}
4546 def __init__(self, error=None, result=None):
4547 '''
4548 error : Error
4549 result : str
4550 '''
4551 self.error = Error.from_json(error) if error else None
4552 self.result = result
4553
4554
4555 class RebootActionResults(Type):
4556 _toSchema = {'results': 'results'}
4557 _toPy = {'results': 'results'}
4558 def __init__(self, results=None):
4559 '''
4560 results : typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
4561 '''
4562 self.results = [RebootActionResult.from_json(o) for o in results or []]
4563
4564
4565 class RelationUnitsChange(Type):
4566 _toSchema = {'departed': 'departed', 'changed': 'changed'}
4567 _toPy = {'departed': 'departed', 'changed': 'changed'}
4568 def __init__(self, changed=None, departed=None):
4569 '''
4570 changed : typing.Mapping<~KT, +VT_co>[str, ~UnitSettings]<~UnitSettings>
4571 departed : typing.Sequence<+T_co>[str]
4572 '''
4573 self.changed = changed
4574 self.departed = departed
4575
4576
4577 class RelationUnitsWatchResult(Type):
4578 _toSchema = {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'}
4579 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
4580 def __init__(self, changes=None, error=None, watcher_id=None):
4581 '''
4582 changes : RelationUnitsChange
4583 error : Error
4584 watcher_id : str
4585 '''
4586 self.changes = RelationUnitsChange.from_json(changes) if changes else None
4587 self.error = Error.from_json(error) if error else None
4588 self.watcher_id = watcher_id
4589
4590
4591 class UnitSettings(Type):
4592 _toSchema = {'version': 'version'}
4593 _toPy = {'version': 'version'}
4594 def __init__(self, version=None):
4595 '''
4596 version : int
4597 '''
4598 self.version = version
4599
4600
4601 class RetryStrategy(Type):
4602 _toSchema = {'should_retry': 'should-retry', 'jitter_retry_time': 'jitter-retry-time', 'min_retry_time': 'min-retry-time', 'max_retry_time': 'max-retry-time', 'retry_time_factor': 'retry-time-factor'}
4603 _toPy = {'jitter-retry-time': 'jitter_retry_time', 'max-retry-time': 'max_retry_time', 'should-retry': 'should_retry', 'min-retry-time': 'min_retry_time', 'retry-time-factor': 'retry_time_factor'}
4604 def __init__(self, jitter_retry_time=None, max_retry_time=None, min_retry_time=None, retry_time_factor=None, should_retry=None):
4605 '''
4606 jitter_retry_time : bool
4607 max_retry_time : int
4608 min_retry_time : int
4609 retry_time_factor : int
4610 should_retry : bool
4611 '''
4612 self.jitter_retry_time = jitter_retry_time
4613 self.max_retry_time = max_retry_time
4614 self.min_retry_time = min_retry_time
4615 self.retry_time_factor = retry_time_factor
4616 self.should_retry = should_retry
4617
4618
4619 class RetryStrategyResult(Type):
4620 _toSchema = {'result': 'result', 'error': 'error'}
4621 _toPy = {'result': 'result', 'error': 'error'}
4622 def __init__(self, error=None, result=None):
4623 '''
4624 error : Error
4625 result : RetryStrategy
4626 '''
4627 self.error = Error.from_json(error) if error else None
4628 self.result = RetryStrategy.from_json(result) if result else None
4629
4630
4631 class RetryStrategyResults(Type):
4632 _toSchema = {'results': 'results'}
4633 _toPy = {'results': 'results'}
4634 def __init__(self, results=None):
4635 '''
4636 results : typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
4637 '''
4638 self.results = [RetryStrategyResult.from_json(o) for o in results or []]
4639
4640
4641 class SSHAddressResult(Type):
4642 _toSchema = {'address': 'address', 'error': 'error'}
4643 _toPy = {'address': 'address', 'error': 'error'}
4644 def __init__(self, address=None, error=None):
4645 '''
4646 address : str
4647 error : Error
4648 '''
4649 self.address = address
4650 self.error = Error.from_json(error) if error else None
4651
4652
4653 class SSHAddressResults(Type):
4654 _toSchema = {'results': 'results'}
4655 _toPy = {'results': 'results'}
4656 def __init__(self, results=None):
4657 '''
4658 results : typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
4659 '''
4660 self.results = [SSHAddressResult.from_json(o) for o in results or []]
4661
4662
4663 class SSHProxyResult(Type):
4664 _toSchema = {'use_proxy': 'use-proxy'}
4665 _toPy = {'use-proxy': 'use_proxy'}
4666 def __init__(self, use_proxy=None):
4667 '''
4668 use_proxy : bool
4669 '''
4670 self.use_proxy = use_proxy
4671
4672
4673 class SSHPublicKeysResult(Type):
4674 _toSchema = {'public_keys': 'public-keys', 'error': 'error'}
4675 _toPy = {'public-keys': 'public_keys', 'error': 'error'}
4676 def __init__(self, error=None, public_keys=None):
4677 '''
4678 error : Error
4679 public_keys : typing.Sequence<+T_co>[str]
4680 '''
4681 self.error = Error.from_json(error) if error else None
4682 self.public_keys = public_keys
4683
4684
4685 class SSHPublicKeysResults(Type):
4686 _toSchema = {'results': 'results'}
4687 _toPy = {'results': 'results'}
4688 def __init__(self, results=None):
4689 '''
4690 results : typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
4691 '''
4692 self.results = [SSHPublicKeysResult.from_json(o) for o in results or []]
4693
4694
4695 class SingularClaim(Type):
4696 _toSchema = {'duration': 'duration', 'model_tag': 'model-tag', 'controller_tag': 'controller-tag'}
4697 _toPy = {'duration': 'duration', 'controller-tag': 'controller_tag', 'model-tag': 'model_tag'}
4698 def __init__(self, controller_tag=None, duration=None, model_tag=None):
4699 '''
4700 controller_tag : str
4701 duration : int
4702 model_tag : str
4703 '''
4704 self.controller_tag = controller_tag
4705 self.duration = duration
4706 self.model_tag = model_tag
4707
4708
4709 class SingularClaims(Type):
4710 _toSchema = {'claims': 'claims'}
4711 _toPy = {'claims': 'claims'}
4712 def __init__(self, claims=None):
4713 '''
4714 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
4715 '''
4716 self.claims = [SingularClaim.from_json(o) for o in claims or []]
4717
4718
4719 class ListSpacesResults(Type):
4720 _toSchema = {'results': 'results'}
4721 _toPy = {'results': 'results'}
4722 def __init__(self, results=None):
4723 '''
4724 results : typing.Sequence<+T_co>[~Space]<~Space>
4725 '''
4726 self.results = [Space.from_json(o) for o in results or []]
4727
4728
4729 class Space(Type):
4730 _toSchema = {'subnets': 'subnets', 'error': 'error', 'name': 'name'}
4731 _toPy = {'subnets': 'subnets', 'error': 'error', 'name': 'name'}
4732 def __init__(self, error=None, name=None, subnets=None):
4733 '''
4734 error : Error
4735 name : str
4736 subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet>
4737 '''
4738 self.error = Error.from_json(error) if error else None
4739 self.name = name
4740 self.subnets = [Subnet.from_json(o) for o in subnets or []]
4741
4742
4743 class StatusHistoryPruneArgs(Type):
4744 _toSchema = {'max_history_mb': 'max-history-mb', 'max_history_time': 'max-history-time'}
4745 _toPy = {'max-history-mb': 'max_history_mb', 'max-history-time': 'max_history_time'}
4746 def __init__(self, max_history_mb=None, max_history_time=None):
4747 '''
4748 max_history_mb : int
4749 max_history_time : int
4750 '''
4751 self.max_history_mb = max_history_mb
4752 self.max_history_time = max_history_time
4753
4754
4755 class FilesystemAttachmentInfo(Type):
4756 _toSchema = {'mount_point': 'mount-point', 'read_only': 'read-only'}
4757 _toPy = {'read-only': 'read_only', 'mount-point': 'mount_point'}
4758 def __init__(self, mount_point=None, read_only=None):
4759 '''
4760 mount_point : str
4761 read_only : bool
4762 '''
4763 self.mount_point = mount_point
4764 self.read_only = read_only
4765
4766
4767 class FilesystemDetails(Type):
4768 _toSchema = {'storage': 'storage', 'status': 'status', 'machine_attachments': 'machine-attachments', 'volume_tag': 'volume-tag', 'filesystem_tag': 'filesystem-tag', 'info': 'info'}
4769 _toPy = {'machine-attachments': 'machine_attachments', 'storage': 'storage', 'volume-tag': 'volume_tag', 'status': 'status', 'filesystem-tag': 'filesystem_tag', 'info': 'info'}
4770 def __init__(self, filesystem_tag=None, info=None, machine_attachments=None, status=None, storage=None, volume_tag=None):
4771 '''
4772 filesystem_tag : str
4773 info : FilesystemInfo
4774 machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~FilesystemAttachmentInfo]<~FilesystemAttachmentInfo>
4775 status : EntityStatus
4776 storage : StorageDetails
4777 volume_tag : str
4778 '''
4779 self.filesystem_tag = filesystem_tag
4780 self.info = FilesystemInfo.from_json(info) if info else None
4781 self.machine_attachments = machine_attachments
4782 self.status = EntityStatus.from_json(status) if status else None
4783 self.storage = StorageDetails.from_json(storage) if storage else None
4784 self.volume_tag = volume_tag
4785
4786
4787 class FilesystemDetailsListResult(Type):
4788 _toSchema = {'result': 'result', 'error': 'error'}
4789 _toPy = {'result': 'result', 'error': 'error'}
4790 def __init__(self, error=None, result=None):
4791 '''
4792 error : Error
4793 result : typing.Sequence<+T_co>[~FilesystemDetails]<~FilesystemDetails>
4794 '''
4795 self.error = Error.from_json(error) if error else None
4796 self.result = [FilesystemDetails.from_json(o) for o in result or []]
4797
4798
4799 class FilesystemDetailsListResults(Type):
4800 _toSchema = {'results': 'results'}
4801 _toPy = {'results': 'results'}
4802 def __init__(self, results=None):
4803 '''
4804 results : typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
4805 '''
4806 self.results = [FilesystemDetailsListResult.from_json(o) for o in results or []]
4807
4808
4809 class FilesystemFilter(Type):
4810 _toSchema = {'machines': 'machines'}
4811 _toPy = {'machines': 'machines'}
4812 def __init__(self, machines=None):
4813 '''
4814 machines : typing.Sequence<+T_co>[str]
4815 '''
4816 self.machines = machines
4817
4818
4819 class FilesystemFilters(Type):
4820 _toSchema = {'filters': 'filters'}
4821 _toPy = {'filters': 'filters'}
4822 def __init__(self, filters=None):
4823 '''
4824 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
4825 '''
4826 self.filters = [FilesystemFilter.from_json(o) for o in filters or []]
4827
4828
4829 class FilesystemInfo(Type):
4830 _toSchema = {'size': 'size', 'filesystem_id': 'filesystem-id'}
4831 _toPy = {'size': 'size', 'filesystem-id': 'filesystem_id'}
4832 def __init__(self, filesystem_id=None, size=None):
4833 '''
4834 filesystem_id : str
4835 size : int
4836 '''
4837 self.filesystem_id = filesystem_id
4838 self.size = size
4839
4840
4841 class StorageAddParams(Type):
4842 _toSchema = {'storage': 'storage', 'name': 'name', 'unit': 'unit'}
4843 _toPy = {'storage': 'storage', 'name': 'name', 'unit': 'unit'}
4844 def __init__(self, name=None, storage=None, unit=None):
4845 '''
4846 name : str
4847 storage : StorageConstraints
4848 unit : str
4849 '''
4850 self.name = name
4851 self.storage = StorageConstraints.from_json(storage) if storage else None
4852 self.unit = unit
4853
4854
4855 class StorageAttachmentDetails(Type):
4856 _toSchema = {'machine_tag': 'machine-tag', 'storage_tag': 'storage-tag', 'location': 'location', 'unit_tag': 'unit-tag'}
4857 _toPy = {'unit-tag': 'unit_tag', 'storage-tag': 'storage_tag', 'machine-tag': 'machine_tag', 'location': 'location'}
4858 def __init__(self, location=None, machine_tag=None, storage_tag=None, unit_tag=None):
4859 '''
4860 location : str
4861 machine_tag : str
4862 storage_tag : str
4863 unit_tag : str
4864 '''
4865 self.location = location
4866 self.machine_tag = machine_tag
4867 self.storage_tag = storage_tag
4868 self.unit_tag = unit_tag
4869
4870
4871 class StorageConstraints(Type):
4872 _toSchema = {'size': 'size', 'pool': 'pool', 'count': 'count'}
4873 _toPy = {'size': 'size', 'pool': 'pool', 'count': 'count'}
4874 def __init__(self, count=None, pool=None, size=None):
4875 '''
4876 count : int
4877 pool : str
4878 size : int
4879 '''
4880 self.count = count
4881 self.pool = pool
4882 self.size = size
4883
4884
4885 class StorageDetails(Type):
4886 _toSchema = {'persistent': 'persistent', 'kind': 'kind', 'attachments': 'attachments', 'owner_tag': 'owner-tag', 'storage_tag': 'storage-tag', 'status': 'status'}
4887 _toPy = {'persistent': 'persistent', 'kind': 'kind', 'attachments': 'attachments', 'status': 'status', 'storage-tag': 'storage_tag', 'owner-tag': 'owner_tag'}
4888 def __init__(self, attachments=None, kind=None, owner_tag=None, persistent=None, status=None, storage_tag=None):
4889 '''
4890 attachments : typing.Mapping<~KT, +VT_co>[str, ~StorageAttachmentDetails]<~StorageAttachmentDetails>
4891 kind : int
4892 owner_tag : str
4893 persistent : bool
4894 status : EntityStatus
4895 storage_tag : str
4896 '''
4897 self.attachments = attachments
4898 self.kind = kind
4899 self.owner_tag = owner_tag
4900 self.persistent = persistent
4901 self.status = EntityStatus.from_json(status) if status else None
4902 self.storage_tag = storage_tag
4903
4904
4905 class StorageDetailsListResult(Type):
4906 _toSchema = {'result': 'result', 'error': 'error'}
4907 _toPy = {'result': 'result', 'error': 'error'}
4908 def __init__(self, error=None, result=None):
4909 '''
4910 error : Error
4911 result : typing.Sequence<+T_co>[~StorageDetails]<~StorageDetails>
4912 '''
4913 self.error = Error.from_json(error) if error else None
4914 self.result = [StorageDetails.from_json(o) for o in result or []]
4915
4916
4917 class StorageDetailsListResults(Type):
4918 _toSchema = {'results': 'results'}
4919 _toPy = {'results': 'results'}
4920 def __init__(self, results=None):
4921 '''
4922 results : typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
4923 '''
4924 self.results = [StorageDetailsListResult.from_json(o) for o in results or []]
4925
4926
4927 class StorageDetailsResult(Type):
4928 _toSchema = {'result': 'result', 'error': 'error'}
4929 _toPy = {'result': 'result', 'error': 'error'}
4930 def __init__(self, error=None, result=None):
4931 '''
4932 error : Error
4933 result : StorageDetails
4934 '''
4935 self.error = Error.from_json(error) if error else None
4936 self.result = StorageDetails.from_json(result) if result else None
4937
4938
4939 class StorageDetailsResults(Type):
4940 _toSchema = {'results': 'results'}
4941 _toPy = {'results': 'results'}
4942 def __init__(self, results=None):
4943 '''
4944 results : typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
4945 '''
4946 self.results = [StorageDetailsResult.from_json(o) for o in results or []]
4947
4948
4949 class StorageFilter(Type):
4950 _toSchema = {}
4951 _toPy = {}
4952 def __init__(self):
4953 '''
4954
4955 '''
4956 pass
4957
4958
4959 class StorageFilters(Type):
4960 _toSchema = {'filters': 'filters'}
4961 _toPy = {'filters': 'filters'}
4962 def __init__(self, filters=None):
4963 '''
4964 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
4965 '''
4966 self.filters = [StorageFilter.from_json(o) for o in filters or []]
4967
4968
4969 class StoragePool(Type):
4970 _toSchema = {'provider': 'provider', 'attrs': 'attrs', 'name': 'name'}
4971 _toPy = {'provider': 'provider', 'attrs': 'attrs', 'name': 'name'}
4972 def __init__(self, attrs=None, name=None, provider=None):
4973 '''
4974 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4975 name : str
4976 provider : str
4977 '''
4978 self.attrs = attrs
4979 self.name = name
4980 self.provider = provider
4981
4982
4983 class StoragePoolFilter(Type):
4984 _toSchema = {'providers': 'providers', 'names': 'names'}
4985 _toPy = {'providers': 'providers', 'names': 'names'}
4986 def __init__(self, names=None, providers=None):
4987 '''
4988 names : typing.Sequence<+T_co>[str]
4989 providers : typing.Sequence<+T_co>[str]
4990 '''
4991 self.names = names
4992 self.providers = providers
4993
4994
4995 class StoragePoolFilters(Type):
4996 _toSchema = {'filters': 'filters'}
4997 _toPy = {'filters': 'filters'}
4998 def __init__(self, filters=None):
4999 '''
5000 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
5001 '''
5002 self.filters = [StoragePoolFilter.from_json(o) for o in filters or []]
5003
5004
5005 class StoragePoolsResult(Type):
5006 _toSchema = {'error': 'error', 'storage_pools': 'storage-pools'}
5007 _toPy = {'storage-pools': 'storage_pools', 'error': 'error'}
5008 def __init__(self, error=None, storage_pools=None):
5009 '''
5010 error : Error
5011 storage_pools : typing.Sequence<+T_co>[~StoragePool]<~StoragePool>
5012 '''
5013 self.error = Error.from_json(error) if error else None
5014 self.storage_pools = [StoragePool.from_json(o) for o in storage_pools or []]
5015
5016
5017 class StoragePoolsResults(Type):
5018 _toSchema = {'results': 'results'}
5019 _toPy = {'results': 'results'}
5020 def __init__(self, results=None):
5021 '''
5022 results : typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
5023 '''
5024 self.results = [StoragePoolsResult.from_json(o) for o in results or []]
5025
5026
5027 class StoragesAddParams(Type):
5028 _toSchema = {'storages': 'storages'}
5029 _toPy = {'storages': 'storages'}
5030 def __init__(self, storages=None):
5031 '''
5032 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
5033 '''
5034 self.storages = [StorageAddParams.from_json(o) for o in storages or []]
5035
5036
5037 class VolumeDetails(Type):
5038 _toSchema = {'machine_attachments': 'machine-attachments', 'volume_tag': 'volume-tag', 'storage': 'storage', 'info': 'info', 'status': 'status'}
5039 _toPy = {'machine-attachments': 'machine_attachments', 'storage': 'storage', 'volume-tag': 'volume_tag', 'info': 'info', 'status': 'status'}
5040 def __init__(self, info=None, machine_attachments=None, status=None, storage=None, volume_tag=None):
5041 '''
5042 info : VolumeInfo
5043 machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo>
5044 status : EntityStatus
5045 storage : StorageDetails
5046 volume_tag : str
5047 '''
5048 self.info = VolumeInfo.from_json(info) if info else None
5049 self.machine_attachments = machine_attachments
5050 self.status = EntityStatus.from_json(status) if status else None
5051 self.storage = StorageDetails.from_json(storage) if storage else None
5052 self.volume_tag = volume_tag
5053
5054
5055 class VolumeDetailsListResult(Type):
5056 _toSchema = {'result': 'result', 'error': 'error'}
5057 _toPy = {'result': 'result', 'error': 'error'}
5058 def __init__(self, error=None, result=None):
5059 '''
5060 error : Error
5061 result : typing.Sequence<+T_co>[~VolumeDetails]<~VolumeDetails>
5062 '''
5063 self.error = Error.from_json(error) if error else None
5064 self.result = [VolumeDetails.from_json(o) for o in result or []]
5065
5066
5067 class VolumeDetailsListResults(Type):
5068 _toSchema = {'results': 'results'}
5069 _toPy = {'results': 'results'}
5070 def __init__(self, results=None):
5071 '''
5072 results : typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
5073 '''
5074 self.results = [VolumeDetailsListResult.from_json(o) for o in results or []]
5075
5076
5077 class VolumeFilter(Type):
5078 _toSchema = {'machines': 'machines'}
5079 _toPy = {'machines': 'machines'}
5080 def __init__(self, machines=None):
5081 '''
5082 machines : typing.Sequence<+T_co>[str]
5083 '''
5084 self.machines = machines
5085
5086
5087 class VolumeFilters(Type):
5088 _toSchema = {'filters': 'filters'}
5089 _toPy = {'filters': 'filters'}
5090 def __init__(self, filters=None):
5091 '''
5092 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
5093 '''
5094 self.filters = [VolumeFilter.from_json(o) for o in filters or []]
5095
5096
5097 class BlockDeviceResult(Type):
5098 _toSchema = {'result': 'result', 'error': 'error'}
5099 _toPy = {'result': 'result', 'error': 'error'}
5100 def __init__(self, error=None, result=None):
5101 '''
5102 error : Error
5103 result : BlockDevice
5104 '''
5105 self.error = Error.from_json(error) if error else None
5106 self.result = BlockDevice.from_json(result) if result else None
5107
5108
5109 class BlockDeviceResults(Type):
5110 _toSchema = {'results': 'results'}
5111 _toPy = {'results': 'results'}
5112 def __init__(self, results=None):
5113 '''
5114 results : typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
5115 '''
5116 self.results = [BlockDeviceResult.from_json(o) for o in results or []]
5117
5118
5119 class Filesystem(Type):
5120 _toSchema = {'volume_tag': 'volume-tag', 'filesystem_tag': 'filesystem-tag', 'info': 'info'}
5121 _toPy = {'volume-tag': 'volume_tag', 'info': 'info', 'filesystem-tag': 'filesystem_tag'}
5122 def __init__(self, filesystem_tag=None, info=None, volume_tag=None):
5123 '''
5124 filesystem_tag : str
5125 info : FilesystemInfo
5126 volume_tag : str
5127 '''
5128 self.filesystem_tag = filesystem_tag
5129 self.info = FilesystemInfo.from_json(info) if info else None
5130 self.volume_tag = volume_tag
5131
5132
5133 class FilesystemAttachment(Type):
5134 _toSchema = {'machine_tag': 'machine-tag', 'filesystem_tag': 'filesystem-tag', 'info': 'info'}
5135 _toPy = {'machine-tag': 'machine_tag', 'info': 'info', 'filesystem-tag': 'filesystem_tag'}
5136 def __init__(self, filesystem_tag=None, info=None, machine_tag=None):
5137 '''
5138 filesystem_tag : str
5139 info : FilesystemAttachmentInfo
5140 machine_tag : str
5141 '''
5142 self.filesystem_tag = filesystem_tag
5143 self.info = FilesystemAttachmentInfo.from_json(info) if info else None
5144 self.machine_tag = machine_tag
5145
5146
5147 class FilesystemAttachmentParams(Type):
5148 _toSchema = {'machine_tag': 'machine-tag', 'mount_point': 'mount-point', 'read_only': 'read-only', 'provider': 'provider', 'filesystem_id': 'filesystem-id', 'instance_id': 'instance-id', 'filesystem_tag': 'filesystem-tag'}
5149 _toPy = {'read-only': 'read_only', 'filesystem-id': 'filesystem_id', 'filesystem-tag': 'filesystem_tag', 'provider': 'provider', 'instance-id': 'instance_id', 'machine-tag': 'machine_tag', 'mount-point': 'mount_point'}
5150 def __init__(self, filesystem_id=None, filesystem_tag=None, instance_id=None, machine_tag=None, mount_point=None, provider=None, read_only=None):
5151 '''
5152 filesystem_id : str
5153 filesystem_tag : str
5154 instance_id : str
5155 machine_tag : str
5156 mount_point : str
5157 provider : str
5158 read_only : bool
5159 '''
5160 self.filesystem_id = filesystem_id
5161 self.filesystem_tag = filesystem_tag
5162 self.instance_id = instance_id
5163 self.machine_tag = machine_tag
5164 self.mount_point = mount_point
5165 self.provider = provider
5166 self.read_only = read_only
5167
5168
5169 class FilesystemAttachmentParamsResult(Type):
5170 _toSchema = {'result': 'result', 'error': 'error'}
5171 _toPy = {'result': 'result', 'error': 'error'}
5172 def __init__(self, error=None, result=None):
5173 '''
5174 error : Error
5175 result : FilesystemAttachmentParams
5176 '''
5177 self.error = Error.from_json(error) if error else None
5178 self.result = FilesystemAttachmentParams.from_json(result) if result else None
5179
5180
5181 class FilesystemAttachmentParamsResults(Type):
5182 _toSchema = {'results': 'results'}
5183 _toPy = {'results': 'results'}
5184 def __init__(self, results=None):
5185 '''
5186 results : typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
5187 '''
5188 self.results = [FilesystemAttachmentParamsResult.from_json(o) for o in results or []]
5189
5190
5191 class FilesystemAttachmentResult(Type):
5192 _toSchema = {'result': 'result', 'error': 'error'}
5193 _toPy = {'result': 'result', 'error': 'error'}
5194 def __init__(self, error=None, result=None):
5195 '''
5196 error : Error
5197 result : FilesystemAttachment
5198 '''
5199 self.error = Error.from_json(error) if error else None
5200 self.result = FilesystemAttachment.from_json(result) if result else None
5201
5202
5203 class FilesystemAttachmentResults(Type):
5204 _toSchema = {'results': 'results'}
5205 _toPy = {'results': 'results'}
5206 def __init__(self, results=None):
5207 '''
5208 results : typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
5209 '''
5210 self.results = [FilesystemAttachmentResult.from_json(o) for o in results or []]
5211
5212
5213 class FilesystemAttachments(Type):
5214 _toSchema = {'filesystem_attachments': 'filesystem-attachments'}
5215 _toPy = {'filesystem-attachments': 'filesystem_attachments'}
5216 def __init__(self, filesystem_attachments=None):
5217 '''
5218 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
5219 '''
5220 self.filesystem_attachments = [FilesystemAttachment.from_json(o) for o in filesystem_attachments or []]
5221
5222
5223 class FilesystemParams(Type):
5224 _toSchema = {'tags': 'tags', 'size': 'size', 'attachment': 'attachment', 'provider': 'provider', 'attributes': 'attributes', 'filesystem_tag': 'filesystem-tag', 'volume_tag': 'volume-tag'}
5225 _toPy = {'tags': 'tags', 'volume-tag': 'volume_tag', 'attachment': 'attachment', 'filesystem-tag': 'filesystem_tag', 'provider': 'provider', 'attributes': 'attributes', 'size': 'size'}
5226 def __init__(self, attachment=None, attributes=None, filesystem_tag=None, provider=None, size=None, tags=None, volume_tag=None):
5227 '''
5228 attachment : FilesystemAttachmentParams
5229 attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5230 filesystem_tag : str
5231 provider : str
5232 size : int
5233 tags : typing.Mapping<~KT, +VT_co>[str, str]
5234 volume_tag : str
5235 '''
5236 self.attachment = FilesystemAttachmentParams.from_json(attachment) if attachment else None
5237 self.attributes = attributes
5238 self.filesystem_tag = filesystem_tag
5239 self.provider = provider
5240 self.size = size
5241 self.tags = tags
5242 self.volume_tag = volume_tag
5243
5244
5245 class FilesystemParamsResult(Type):
5246 _toSchema = {'result': 'result', 'error': 'error'}
5247 _toPy = {'result': 'result', 'error': 'error'}
5248 def __init__(self, error=None, result=None):
5249 '''
5250 error : Error
5251 result : FilesystemParams
5252 '''
5253 self.error = Error.from_json(error) if error else None
5254 self.result = FilesystemParams.from_json(result) if result else None
5255
5256
5257 class FilesystemParamsResults(Type):
5258 _toSchema = {'results': 'results'}
5259 _toPy = {'results': 'results'}
5260 def __init__(self, results=None):
5261 '''
5262 results : typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
5263 '''
5264 self.results = [FilesystemParamsResult.from_json(o) for o in results or []]
5265
5266
5267 class FilesystemResult(Type):
5268 _toSchema = {'result': 'result', 'error': 'error'}
5269 _toPy = {'result': 'result', 'error': 'error'}
5270 def __init__(self, error=None, result=None):
5271 '''
5272 error : Error
5273 result : Filesystem
5274 '''
5275 self.error = Error.from_json(error) if error else None
5276 self.result = Filesystem.from_json(result) if result else None
5277
5278
5279 class FilesystemResults(Type):
5280 _toSchema = {'results': 'results'}
5281 _toPy = {'results': 'results'}
5282 def __init__(self, results=None):
5283 '''
5284 results : typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
5285 '''
5286 self.results = [FilesystemResult.from_json(o) for o in results or []]
5287
5288
5289 class Filesystems(Type):
5290 _toSchema = {'filesystems': 'filesystems'}
5291 _toPy = {'filesystems': 'filesystems'}
5292 def __init__(self, filesystems=None):
5293 '''
5294 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
5295 '''
5296 self.filesystems = [Filesystem.from_json(o) for o in filesystems or []]
5297
5298
5299 class MachineStorageIds(Type):
5300 _toSchema = {'ids': 'ids'}
5301 _toPy = {'ids': 'ids'}
5302 def __init__(self, ids=None):
5303 '''
5304 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
5305 '''
5306 self.ids = [MachineStorageId.from_json(o) for o in ids or []]
5307
5308
5309 class MachineStorageIdsWatchResults(Type):
5310 _toSchema = {'results': 'results'}
5311 _toPy = {'results': 'results'}
5312 def __init__(self, results=None):
5313 '''
5314 results : typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
5315 '''
5316 self.results = [MachineStorageIdsWatchResult.from_json(o) for o in results or []]
5317
5318
5319 class VolumeAttachment(Type):
5320 _toSchema = {'machine_tag': 'machine-tag', 'volume_tag': 'volume-tag', 'info': 'info'}
5321 _toPy = {'volume-tag': 'volume_tag', 'machine-tag': 'machine_tag', 'info': 'info'}
5322 def __init__(self, info=None, machine_tag=None, volume_tag=None):
5323 '''
5324 info : VolumeAttachmentInfo
5325 machine_tag : str
5326 volume_tag : str
5327 '''
5328 self.info = VolumeAttachmentInfo.from_json(info) if info else None
5329 self.machine_tag = machine_tag
5330 self.volume_tag = volume_tag
5331
5332
5333 class VolumeAttachmentParamsResult(Type):
5334 _toSchema = {'result': 'result', 'error': 'error'}
5335 _toPy = {'result': 'result', 'error': 'error'}
5336 def __init__(self, error=None, result=None):
5337 '''
5338 error : Error
5339 result : VolumeAttachmentParams
5340 '''
5341 self.error = Error.from_json(error) if error else None
5342 self.result = VolumeAttachmentParams.from_json(result) if result else None
5343
5344
5345 class VolumeAttachmentParamsResults(Type):
5346 _toSchema = {'results': 'results'}
5347 _toPy = {'results': 'results'}
5348 def __init__(self, results=None):
5349 '''
5350 results : typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
5351 '''
5352 self.results = [VolumeAttachmentParamsResult.from_json(o) for o in results or []]
5353
5354
5355 class VolumeAttachmentResult(Type):
5356 _toSchema = {'result': 'result', 'error': 'error'}
5357 _toPy = {'result': 'result', 'error': 'error'}
5358 def __init__(self, error=None, result=None):
5359 '''
5360 error : Error
5361 result : VolumeAttachment
5362 '''
5363 self.error = Error.from_json(error) if error else None
5364 self.result = VolumeAttachment.from_json(result) if result else None
5365
5366
5367 class VolumeAttachmentResults(Type):
5368 _toSchema = {'results': 'results'}
5369 _toPy = {'results': 'results'}
5370 def __init__(self, results=None):
5371 '''
5372 results : typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
5373 '''
5374 self.results = [VolumeAttachmentResult.from_json(o) for o in results or []]
5375
5376
5377 class VolumeAttachments(Type):
5378 _toSchema = {'volume_attachments': 'volume-attachments'}
5379 _toPy = {'volume-attachments': 'volume_attachments'}
5380 def __init__(self, volume_attachments=None):
5381 '''
5382 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
5383 '''
5384 self.volume_attachments = [VolumeAttachment.from_json(o) for o in volume_attachments or []]
5385
5386
5387 class VolumeParamsResult(Type):
5388 _toSchema = {'result': 'result', 'error': 'error'}
5389 _toPy = {'result': 'result', 'error': 'error'}
5390 def __init__(self, error=None, result=None):
5391 '''
5392 error : Error
5393 result : VolumeParams
5394 '''
5395 self.error = Error.from_json(error) if error else None
5396 self.result = VolumeParams.from_json(result) if result else None
5397
5398
5399 class VolumeParamsResults(Type):
5400 _toSchema = {'results': 'results'}
5401 _toPy = {'results': 'results'}
5402 def __init__(self, results=None):
5403 '''
5404 results : typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
5405 '''
5406 self.results = [VolumeParamsResult.from_json(o) for o in results or []]
5407
5408
5409 class VolumeResult(Type):
5410 _toSchema = {'result': 'result', 'error': 'error'}
5411 _toPy = {'result': 'result', 'error': 'error'}
5412 def __init__(self, error=None, result=None):
5413 '''
5414 error : Error
5415 result : Volume
5416 '''
5417 self.error = Error.from_json(error) if error else None
5418 self.result = Volume.from_json(result) if result else None
5419
5420
5421 class VolumeResults(Type):
5422 _toSchema = {'results': 'results'}
5423 _toPy = {'results': 'results'}
5424 def __init__(self, results=None):
5425 '''
5426 results : typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
5427 '''
5428 self.results = [VolumeResult.from_json(o) for o in results or []]
5429
5430
5431 class Volumes(Type):
5432 _toSchema = {'volumes': 'volumes'}
5433 _toPy = {'volumes': 'volumes'}
5434 def __init__(self, volumes=None):
5435 '''
5436 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
5437 '''
5438 self.volumes = [Volume.from_json(o) for o in volumes or []]
5439
5440
5441 class SpaceResult(Type):
5442 _toSchema = {'tag': 'tag', 'error': 'error'}
5443 _toPy = {'tag': 'tag', 'error': 'error'}
5444 def __init__(self, error=None, tag=None):
5445 '''
5446 error : Error
5447 tag : str
5448 '''
5449 self.error = Error.from_json(error) if error else None
5450 self.tag = tag
5451
5452
5453 class SpaceResults(Type):
5454 _toSchema = {'results': 'results'}
5455 _toPy = {'results': 'results'}
5456 def __init__(self, results=None):
5457 '''
5458 results : typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
5459 '''
5460 self.results = [SpaceResult.from_json(o) for o in results or []]
5461
5462
5463 class ZoneResult(Type):
5464 _toSchema = {'error': 'error', 'available': 'available', 'name': 'name'}
5465 _toPy = {'error': 'error', 'available': 'available', 'name': 'name'}
5466 def __init__(self, available=None, error=None, name=None):
5467 '''
5468 available : bool
5469 error : Error
5470 name : str
5471 '''
5472 self.available = available
5473 self.error = Error.from_json(error) if error else None
5474 self.name = name
5475
5476
5477 class ZoneResults(Type):
5478 _toSchema = {'results': 'results'}
5479 _toPy = {'results': 'results'}
5480 def __init__(self, results=None):
5481 '''
5482 results : typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
5483 '''
5484 self.results = [ZoneResult.from_json(o) for o in results or []]
5485
5486
5487 class UndertakerModelInfo(Type):
5488 _toSchema = {'is_system': 'is-system', 'global_name': 'global-name', 'name': 'name', 'uuid': 'uuid', 'life': 'life'}
5489 _toPy = {'life': 'life', 'is-system': 'is_system', 'name': 'name', 'uuid': 'uuid', 'global-name': 'global_name'}
5490 def __init__(self, global_name=None, is_system=None, life=None, name=None, uuid=None):
5491 '''
5492 global_name : str
5493 is_system : bool
5494 life : str
5495 name : str
5496 uuid : str
5497 '''
5498 self.global_name = global_name
5499 self.is_system = is_system
5500 self.life = life
5501 self.name = name
5502 self.uuid = uuid
5503
5504
5505 class UndertakerModelInfoResult(Type):
5506 _toSchema = {'result': 'result', 'error': 'error'}
5507 _toPy = {'result': 'result', 'error': 'error'}
5508 def __init__(self, error=None, result=None):
5509 '''
5510 error : Error
5511 result : UndertakerModelInfo
5512 '''
5513 self.error = Error.from_json(error) if error else None
5514 self.result = UndertakerModelInfo.from_json(result) if result else None
5515
5516
5517 class ApplicationStatusResult(Type):
5518 _toSchema = {'application': 'application', 'error': 'error', 'units': 'units'}
5519 _toPy = {'application': 'application', 'error': 'error', 'units': 'units'}
5520 def __init__(self, application=None, error=None, units=None):
5521 '''
5522 application : StatusResult
5523 error : Error
5524 units : typing.Mapping<~KT, +VT_co>[str, ~StatusResult]<~StatusResult>
5525 '''
5526 self.application = StatusResult.from_json(application) if application else None
5527 self.error = Error.from_json(error) if error else None
5528 self.units = units
5529
5530
5531 class ApplicationStatusResults(Type):
5532 _toSchema = {'results': 'results'}
5533 _toPy = {'results': 'results'}
5534 def __init__(self, results=None):
5535 '''
5536 results : typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult>
5537 '''
5538 self.results = [ApplicationStatusResult.from_json(o) for o in results or []]
5539
5540
5541 class CharmURLs(Type):
5542 _toSchema = {'urls': 'urls'}
5543 _toPy = {'urls': 'urls'}
5544 def __init__(self, urls=None):
5545 '''
5546 urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL>
5547 '''
5548 self.urls = [CharmURL.from_json(o) for o in urls or []]
5549
5550
5551 class ConfigSettingsResult(Type):
5552 _toSchema = {'error': 'error', 'settings': 'settings'}
5553 _toPy = {'error': 'error', 'settings': 'settings'}
5554 def __init__(self, error=None, settings=None):
5555 '''
5556 error : Error
5557 settings : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5558 '''
5559 self.error = Error.from_json(error) if error else None
5560 self.settings = settings
5561
5562
5563 class ConfigSettingsResults(Type):
5564 _toSchema = {'results': 'results'}
5565 _toPy = {'results': 'results'}
5566 def __init__(self, results=None):
5567 '''
5568 results : typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult>
5569 '''
5570 self.results = [ConfigSettingsResult.from_json(o) for o in results or []]
5571
5572
5573 class Endpoint(Type):
5574 _toSchema = {'application_name': 'application-name', 'relation': 'relation'}
5575 _toPy = {'relation': 'relation', 'application-name': 'application_name'}
5576 def __init__(self, application_name=None, relation=None):
5577 '''
5578 application_name : str
5579 relation : CharmRelation
5580 '''
5581 self.application_name = application_name
5582 self.relation = CharmRelation.from_json(relation) if relation else None
5583
5584
5585 class EntitiesCharmURL(Type):
5586 _toSchema = {'entities': 'entities'}
5587 _toPy = {'entities': 'entities'}
5588 def __init__(self, entities=None):
5589 '''
5590 entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL>
5591 '''
5592 self.entities = [EntityCharmURL.from_json(o) for o in entities or []]
5593
5594
5595 class EntitiesPortRanges(Type):
5596 _toSchema = {'entities': 'entities'}
5597 _toPy = {'entities': 'entities'}
5598 def __init__(self, entities=None):
5599 '''
5600 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
5601 '''
5602 self.entities = [EntityPortRange.from_json(o) for o in entities or []]
5603
5604
5605 class EntityCharmURL(Type):
5606 _toSchema = {'charm_url': 'charm-url', 'tag': 'tag'}
5607 _toPy = {'charm-url': 'charm_url', 'tag': 'tag'}
5608 def __init__(self, charm_url=None, tag=None):
5609 '''
5610 charm_url : str
5611 tag : str
5612 '''
5613 self.charm_url = charm_url
5614 self.tag = tag
5615
5616
5617 class EntityPortRange(Type):
5618 _toSchema = {'from_port': 'from-port', 'tag': 'tag', 'protocol': 'protocol', 'to_port': 'to-port'}
5619 _toPy = {'tag': 'tag', 'from-port': 'from_port', 'protocol': 'protocol', 'to-port': 'to_port'}
5620 def __init__(self, from_port=None, protocol=None, tag=None, to_port=None):
5621 '''
5622 from_port : int
5623 protocol : str
5624 tag : str
5625 to_port : int
5626 '''
5627 self.from_port = from_port
5628 self.protocol = protocol
5629 self.tag = tag
5630 self.to_port = to_port
5631
5632
5633 class EntityWorkloadVersion(Type):
5634 _toSchema = {'tag': 'tag', 'workload_version': 'workload-version'}
5635 _toPy = {'tag': 'tag', 'workload-version': 'workload_version'}
5636 def __init__(self, tag=None, workload_version=None):
5637 '''
5638 tag : str
5639 workload_version : str
5640 '''
5641 self.tag = tag
5642 self.workload_version = workload_version
5643
5644
5645 class EntityWorkloadVersions(Type):
5646 _toSchema = {'entities': 'entities'}
5647 _toPy = {'entities': 'entities'}
5648 def __init__(self, entities=None):
5649 '''
5650 entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion>
5651 '''
5652 self.entities = [EntityWorkloadVersion.from_json(o) for o in entities or []]
5653
5654
5655 class GetLeadershipSettingsBulkResults(Type):
5656 _toSchema = {'results': 'results'}
5657 _toPy = {'results': 'results'}
5658 def __init__(self, results=None):
5659 '''
5660 results : typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult>
5661 '''
5662 self.results = [GetLeadershipSettingsResult.from_json(o) for o in results or []]
5663
5664
5665 class GetLeadershipSettingsResult(Type):
5666 _toSchema = {'error': 'error', 'settings': 'settings'}
5667 _toPy = {'error': 'error', 'settings': 'settings'}
5668 def __init__(self, error=None, settings=None):
5669 '''
5670 error : Error
5671 settings : typing.Mapping<~KT, +VT_co>[str, str]
5672 '''
5673 self.error = Error.from_json(error) if error else None
5674 self.settings = settings
5675
5676
5677 class IntResult(Type):
5678 _toSchema = {'result': 'result', 'error': 'error'}
5679 _toPy = {'result': 'result', 'error': 'error'}
5680 def __init__(self, error=None, result=None):
5681 '''
5682 error : Error
5683 result : int
5684 '''
5685 self.error = Error.from_json(error) if error else None
5686 self.result = result
5687
5688
5689 class IntResults(Type):
5690 _toSchema = {'results': 'results'}
5691 _toPy = {'results': 'results'}
5692 def __init__(self, results=None):
5693 '''
5694 results : typing.Sequence<+T_co>[~IntResult]<~IntResult>
5695 '''
5696 self.results = [IntResult.from_json(o) for o in results or []]
5697
5698
5699 class MergeLeadershipSettingsBulkParams(Type):
5700 _toSchema = {'params': 'params'}
5701 _toPy = {'params': 'params'}
5702 def __init__(self, params=None):
5703 '''
5704 params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam>
5705 '''
5706 self.params = [MergeLeadershipSettingsParam.from_json(o) for o in params or []]
5707
5708
5709 class MergeLeadershipSettingsParam(Type):
5710 _toSchema = {'application_tag': 'application-tag', 'settings': 'settings'}
5711 _toPy = {'settings': 'settings', 'application-tag': 'application_tag'}
5712 def __init__(self, application_tag=None, settings=None):
5713 '''
5714 application_tag : str
5715 settings : typing.Mapping<~KT, +VT_co>[str, str]
5716 '''
5717 self.application_tag = application_tag
5718 self.settings = settings
5719
5720
5721 class ModelResult(Type):
5722 _toSchema = {'error': 'error', 'uuid': 'uuid', 'name': 'name'}
5723 _toPy = {'error': 'error', 'uuid': 'uuid', 'name': 'name'}
5724 def __init__(self, error=None, name=None, uuid=None):
5725 '''
5726 error : Error
5727 name : str
5728 uuid : str
5729 '''
5730 self.error = Error.from_json(error) if error else None
5731 self.name = name
5732 self.uuid = uuid
5733
5734
5735 class RelationIds(Type):
5736 _toSchema = {'relation_ids': 'relation-ids'}
5737 _toPy = {'relation-ids': 'relation_ids'}
5738 def __init__(self, relation_ids=None):
5739 '''
5740 relation_ids : typing.Sequence<+T_co>[int]
5741 '''
5742 self.relation_ids = relation_ids
5743
5744
5745 class RelationResult(Type):
5746 _toSchema = {'key': 'key', 'life': 'life', 'error': 'error', 'id_': 'id', 'endpoint': 'endpoint'}
5747 _toPy = {'key': 'key', 'id': 'id_', 'life': 'life', 'error': 'error', 'endpoint': 'endpoint'}
5748 def __init__(self, endpoint=None, error=None, id_=None, key=None, life=None):
5749 '''
5750 endpoint : Endpoint
5751 error : Error
5752 id_ : int
5753 key : str
5754 life : str
5755 '''
5756 self.endpoint = Endpoint.from_json(endpoint) if endpoint else None
5757 self.error = Error.from_json(error) if error else None
5758 self.id_ = id_
5759 self.key = key
5760 self.life = life
5761
5762
5763 class RelationResults(Type):
5764 _toSchema = {'results': 'results'}
5765 _toPy = {'results': 'results'}
5766 def __init__(self, results=None):
5767 '''
5768 results : typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
5769 '''
5770 self.results = [RelationResult.from_json(o) for o in results or []]
5771
5772
5773 class RelationUnit(Type):
5774 _toSchema = {'relation': 'relation', 'unit': 'unit'}
5775 _toPy = {'relation': 'relation', 'unit': 'unit'}
5776 def __init__(self, relation=None, unit=None):
5777 '''
5778 relation : str
5779 unit : str
5780 '''
5781 self.relation = relation
5782 self.unit = unit
5783
5784
5785 class RelationUnitPair(Type):
5786 _toSchema = {'remote_unit': 'remote-unit', 'relation': 'relation', 'local_unit': 'local-unit'}
5787 _toPy = {'relation': 'relation', 'remote-unit': 'remote_unit', 'local-unit': 'local_unit'}
5788 def __init__(self, local_unit=None, relation=None, remote_unit=None):
5789 '''
5790 local_unit : str
5791 relation : str
5792 remote_unit : str
5793 '''
5794 self.local_unit = local_unit
5795 self.relation = relation
5796 self.remote_unit = remote_unit
5797
5798
5799 class RelationUnitPairs(Type):
5800 _toSchema = {'relation_unit_pairs': 'relation-unit-pairs'}
5801 _toPy = {'relation-unit-pairs': 'relation_unit_pairs'}
5802 def __init__(self, relation_unit_pairs=None):
5803 '''
5804 relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair>
5805 '''
5806 self.relation_unit_pairs = [RelationUnitPair.from_json(o) for o in relation_unit_pairs or []]
5807
5808
5809 class RelationUnitSettings(Type):
5810 _toSchema = {'relation': 'relation', 'unit': 'unit', 'settings': 'settings'}
5811 _toPy = {'relation': 'relation', 'unit': 'unit', 'settings': 'settings'}
5812 def __init__(self, relation=None, settings=None, unit=None):
5813 '''
5814 relation : str
5815 settings : typing.Mapping<~KT, +VT_co>[str, str]
5816 unit : str
5817 '''
5818 self.relation = relation
5819 self.settings = settings
5820 self.unit = unit
5821
5822
5823 class RelationUnits(Type):
5824 _toSchema = {'relation_units': 'relation-units'}
5825 _toPy = {'relation-units': 'relation_units'}
5826 def __init__(self, relation_units=None):
5827 '''
5828 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
5829 '''
5830 self.relation_units = [RelationUnit.from_json(o) for o in relation_units or []]
5831
5832
5833 class RelationUnitsSettings(Type):
5834 _toSchema = {'relation_units': 'relation-units'}
5835 _toPy = {'relation-units': 'relation_units'}
5836 def __init__(self, relation_units=None):
5837 '''
5838 relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings>
5839 '''
5840 self.relation_units = [RelationUnitSettings.from_json(o) for o in relation_units or []]
5841
5842
5843 class RelationUnitsWatchResults(Type):
5844 _toSchema = {'results': 'results'}
5845 _toPy = {'results': 'results'}
5846 def __init__(self, results=None):
5847 '''
5848 results : typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult>
5849 '''
5850 self.results = [RelationUnitsWatchResult.from_json(o) for o in results or []]
5851
5852
5853 class ResolvedModeResult(Type):
5854 _toSchema = {'mode': 'mode', 'error': 'error'}
5855 _toPy = {'mode': 'mode', 'error': 'error'}
5856 def __init__(self, error=None, mode=None):
5857 '''
5858 error : Error
5859 mode : str
5860 '''
5861 self.error = Error.from_json(error) if error else None
5862 self.mode = mode
5863
5864
5865 class ResolvedModeResults(Type):
5866 _toSchema = {'results': 'results'}
5867 _toPy = {'results': 'results'}
5868 def __init__(self, results=None):
5869 '''
5870 results : typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult>
5871 '''
5872 self.results = [ResolvedModeResult.from_json(o) for o in results or []]
5873
5874
5875 class SettingsResult(Type):
5876 _toSchema = {'error': 'error', 'settings': 'settings'}
5877 _toPy = {'error': 'error', 'settings': 'settings'}
5878 def __init__(self, error=None, settings=None):
5879 '''
5880 error : Error
5881 settings : typing.Mapping<~KT, +VT_co>[str, str]
5882 '''
5883 self.error = Error.from_json(error) if error else None
5884 self.settings = settings
5885
5886
5887 class SettingsResults(Type):
5888 _toSchema = {'results': 'results'}
5889 _toPy = {'results': 'results'}
5890 def __init__(self, results=None):
5891 '''
5892 results : typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
5893 '''
5894 self.results = [SettingsResult.from_json(o) for o in results or []]
5895
5896
5897 class StorageAttachment(Type):
5898 _toSchema = {'storage_tag': 'storage-tag', 'owner_tag': 'owner-tag', 'unit_tag': 'unit-tag', 'life': 'life', 'kind': 'kind', 'location': 'location'}
5899 _toPy = {'unit-tag': 'unit_tag', 'kind': 'kind', 'storage-tag': 'storage_tag', 'owner-tag': 'owner_tag', 'location': 'location', 'life': 'life'}
5900 def __init__(self, kind=None, life=None, location=None, owner_tag=None, storage_tag=None, unit_tag=None):
5901 '''
5902 kind : int
5903 life : str
5904 location : str
5905 owner_tag : str
5906 storage_tag : str
5907 unit_tag : str
5908 '''
5909 self.kind = kind
5910 self.life = life
5911 self.location = location
5912 self.owner_tag = owner_tag
5913 self.storage_tag = storage_tag
5914 self.unit_tag = unit_tag
5915
5916
5917 class StorageAttachmentId(Type):
5918 _toSchema = {'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
5919 _toPy = {'unit-tag': 'unit_tag', 'storage-tag': 'storage_tag'}
5920 def __init__(self, storage_tag=None, unit_tag=None):
5921 '''
5922 storage_tag : str
5923 unit_tag : str
5924 '''
5925 self.storage_tag = storage_tag
5926 self.unit_tag = unit_tag
5927
5928
5929 class StorageAttachmentIds(Type):
5930 _toSchema = {'ids': 'ids'}
5931 _toPy = {'ids': 'ids'}
5932 def __init__(self, ids=None):
5933 '''
5934 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
5935 '''
5936 self.ids = [StorageAttachmentId.from_json(o) for o in ids or []]
5937
5938
5939 class StorageAttachmentIdsResult(Type):
5940 _toSchema = {'result': 'result', 'error': 'error'}
5941 _toPy = {'result': 'result', 'error': 'error'}
5942 def __init__(self, error=None, result=None):
5943 '''
5944 error : Error
5945 result : StorageAttachmentIds
5946 '''
5947 self.error = Error.from_json(error) if error else None
5948 self.result = StorageAttachmentIds.from_json(result) if result else None
5949
5950
5951 class StorageAttachmentIdsResults(Type):
5952 _toSchema = {'results': 'results'}
5953 _toPy = {'results': 'results'}
5954 def __init__(self, results=None):
5955 '''
5956 results : typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult>
5957 '''
5958 self.results = [StorageAttachmentIdsResult.from_json(o) for o in results or []]
5959
5960
5961 class StorageAttachmentResult(Type):
5962 _toSchema = {'result': 'result', 'error': 'error'}
5963 _toPy = {'result': 'result', 'error': 'error'}
5964 def __init__(self, error=None, result=None):
5965 '''
5966 error : Error
5967 result : StorageAttachment
5968 '''
5969 self.error = Error.from_json(error) if error else None
5970 self.result = StorageAttachment.from_json(result) if result else None
5971
5972
5973 class StorageAttachmentResults(Type):
5974 _toSchema = {'results': 'results'}
5975 _toPy = {'results': 'results'}
5976 def __init__(self, results=None):
5977 '''
5978 results : typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult>
5979 '''
5980 self.results = [StorageAttachmentResult.from_json(o) for o in results or []]
5981
5982
5983 class StringBoolResult(Type):
5984 _toSchema = {'result': 'result', 'ok': 'ok', 'error': 'error'}
5985 _toPy = {'result': 'result', 'ok': 'ok', 'error': 'error'}
5986 def __init__(self, error=None, ok=None, result=None):
5987 '''
5988 error : Error
5989 ok : bool
5990 result : str
5991 '''
5992 self.error = Error.from_json(error) if error else None
5993 self.ok = ok
5994 self.result = result
5995
5996
5997 class StringBoolResults(Type):
5998 _toSchema = {'results': 'results'}
5999 _toPy = {'results': 'results'}
6000 def __init__(self, results=None):
6001 '''
6002 results : typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
6003 '''
6004 self.results = [StringBoolResult.from_json(o) for o in results or []]
6005
6006
6007 class UnitNetworkConfig(Type):
6008 _toSchema = {'unit_tag': 'unit-tag', 'binding_name': 'binding-name'}
6009 _toPy = {'unit-tag': 'unit_tag', 'binding-name': 'binding_name'}
6010 def __init__(self, binding_name=None, unit_tag=None):
6011 '''
6012 binding_name : str
6013 unit_tag : str
6014 '''
6015 self.binding_name = binding_name
6016 self.unit_tag = unit_tag
6017
6018
6019 class UnitNetworkConfigResult(Type):
6020 _toSchema = {'error': 'error', 'info': 'info'}
6021 _toPy = {'error': 'error', 'info': 'info'}
6022 def __init__(self, error=None, info=None):
6023 '''
6024 error : Error
6025 info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
6026 '''
6027 self.error = Error.from_json(error) if error else None
6028 self.info = [NetworkConfig.from_json(o) for o in info or []]
6029
6030
6031 class UnitNetworkConfigResults(Type):
6032 _toSchema = {'results': 'results'}
6033 _toPy = {'results': 'results'}
6034 def __init__(self, results=None):
6035 '''
6036 results : typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult>
6037 '''
6038 self.results = [UnitNetworkConfigResult.from_json(o) for o in results or []]
6039
6040
6041 class UnitsNetworkConfig(Type):
6042 _toSchema = {'args': 'args'}
6043 _toPy = {'args': 'args'}
6044 def __init__(self, args=None):
6045 '''
6046 args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig>
6047 '''
6048 self.args = [UnitNetworkConfig.from_json(o) for o in args or []]
6049
6050
6051 class EntitiesVersion(Type):
6052 _toSchema = {'agent_tools': 'agent-tools'}
6053 _toPy = {'agent-tools': 'agent_tools'}
6054 def __init__(self, agent_tools=None):
6055 '''
6056 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
6057 '''
6058 self.agent_tools = [EntityVersion.from_json(o) for o in agent_tools or []]
6059
6060
6061 class EntityVersion(Type):
6062 _toSchema = {'tag': 'tag', 'tools': 'tools'}
6063 _toPy = {'tag': 'tag', 'tools': 'tools'}
6064 def __init__(self, tag=None, tools=None):
6065 '''
6066 tag : str
6067 tools : Version
6068 '''
6069 self.tag = tag
6070 self.tools = Version.from_json(tools) if tools else None
6071
6072
6073 class Version(Type):
6074 _toSchema = {'version': 'version'}
6075 _toPy = {'version': 'version'}
6076 def __init__(self, version=None):
6077 '''
6078 version : Binary
6079 '''
6080 self.version = Binary.from_json(version) if version else None
6081
6082
6083 class VersionResult(Type):
6084 _toSchema = {'version': 'version', 'error': 'error'}
6085 _toPy = {'version': 'version', 'error': 'error'}
6086 def __init__(self, error=None, version=None):
6087 '''
6088 error : Error
6089 version : Number
6090 '''
6091 self.error = Error.from_json(error) if error else None
6092 self.version = Number.from_json(version) if version else None
6093
6094
6095 class VersionResults(Type):
6096 _toSchema = {'results': 'results'}
6097 _toPy = {'results': 'results'}
6098 def __init__(self, results=None):
6099 '''
6100 results : typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
6101 '''
6102 self.results = [VersionResult.from_json(o) for o in results or []]
6103
6104
6105 class AddUser(Type):
6106 _toSchema = {'display_name': 'display-name', 'password': 'password', 'username': 'username'}
6107 _toPy = {'password': 'password', 'username': 'username', 'display-name': 'display_name'}
6108 def __init__(self, display_name=None, password=None, username=None):
6109 '''
6110 display_name : str
6111 password : str
6112 username : str
6113 '''
6114 self.display_name = display_name
6115 self.password = password
6116 self.username = username
6117
6118
6119 class AddUserResult(Type):
6120 _toSchema = {'tag': 'tag', 'error': 'error', 'secret_key': 'secret-key'}
6121 _toPy = {'tag': 'tag', 'error': 'error', 'secret-key': 'secret_key'}
6122 def __init__(self, error=None, secret_key=None, tag=None):
6123 '''
6124 error : Error
6125 secret_key : typing.Sequence<+T_co>[int]
6126 tag : str
6127 '''
6128 self.error = Error.from_json(error) if error else None
6129 self.secret_key = secret_key
6130 self.tag = tag
6131
6132
6133 class AddUserResults(Type):
6134 _toSchema = {'results': 'results'}
6135 _toPy = {'results': 'results'}
6136 def __init__(self, results=None):
6137 '''
6138 results : typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
6139 '''
6140 self.results = [AddUserResult.from_json(o) for o in results or []]
6141
6142
6143 class AddUsers(Type):
6144 _toSchema = {'users': 'users'}
6145 _toPy = {'users': 'users'}
6146 def __init__(self, users=None):
6147 '''
6148 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
6149 '''
6150 self.users = [AddUser.from_json(o) for o in users or []]
6151
6152
6153 class MacaroonResult(Type):
6154 _toSchema = {'result': 'result', 'error': 'error'}
6155 _toPy = {'result': 'result', 'error': 'error'}
6156 def __init__(self, error=None, result=None):
6157 '''
6158 error : Error
6159 result : Macaroon
6160 '''
6161 self.error = Error.from_json(error) if error else None
6162 self.result = Macaroon.from_json(result) if result else None
6163
6164
6165 class MacaroonResults(Type):
6166 _toSchema = {'results': 'results'}
6167 _toPy = {'results': 'results'}
6168 def __init__(self, results=None):
6169 '''
6170 results : typing.Sequence<+T_co>[~MacaroonResult]<~MacaroonResult>
6171 '''
6172 self.results = [MacaroonResult.from_json(o) for o in results or []]
6173
6174
6175 class UserInfo(Type):
6176 _toSchema = {'display_name': 'display-name', 'last_connection': 'last-connection', 'disabled': 'disabled', 'date_created': 'date-created', 'username': 'username', 'access': 'access', 'created_by': 'created-by'}
6177 _toPy = {'disabled': 'disabled', 'last-connection': 'last_connection', 'display-name': 'display_name', 'created-by': 'created_by', 'access': 'access', 'date-created': 'date_created', 'username': 'username'}
6178 def __init__(self, access=None, created_by=None, date_created=None, disabled=None, display_name=None, last_connection=None, username=None):
6179 '''
6180 access : str
6181 created_by : str
6182 date_created : str
6183 disabled : bool
6184 display_name : str
6185 last_connection : str
6186 username : str
6187 '''
6188 self.access = access
6189 self.created_by = created_by
6190 self.date_created = date_created
6191 self.disabled = disabled
6192 self.display_name = display_name
6193 self.last_connection = last_connection
6194 self.username = username
6195
6196
6197 class UserInfoRequest(Type):
6198 _toSchema = {'include_disabled': 'include-disabled', 'entities': 'entities'}
6199 _toPy = {'entities': 'entities', 'include-disabled': 'include_disabled'}
6200 def __init__(self, entities=None, include_disabled=None):
6201 '''
6202 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6203 include_disabled : bool
6204 '''
6205 self.entities = [Entity.from_json(o) for o in entities or []]
6206 self.include_disabled = include_disabled
6207
6208
6209 class UserInfoResult(Type):
6210 _toSchema = {'result': 'result', 'error': 'error'}
6211 _toPy = {'result': 'result', 'error': 'error'}
6212 def __init__(self, error=None, result=None):
6213 '''
6214 error : Error
6215 result : UserInfo
6216 '''
6217 self.error = Error.from_json(error) if error else None
6218 self.result = UserInfo.from_json(result) if result else None
6219
6220
6221 class UserInfoResults(Type):
6222 _toSchema = {'results': 'results'}
6223 _toPy = {'results': 'results'}
6224 def __init__(self, results=None):
6225 '''
6226 results : typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
6227 '''
6228 self.results = [UserInfoResult.from_json(o) for o in results or []]
6229
6230
6231 class ActionFacade(Type):
6232 name = 'Action'
6233 version = 2
6234 schema = {'definitions': {'Action': {'additionalProperties': False,
6235 'properties': {'name': {'type': 'string'},
6236 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
6237 'type': 'object'}},
6238 'type': 'object'},
6239 'receiver': {'type': 'string'},
6240 'tag': {'type': 'string'}},
6241 'required': ['tag', 'receiver', 'name'],
6242 'type': 'object'},
6243 'ActionResult': {'additionalProperties': False,
6244 'properties': {'action': {'$ref': '#/definitions/Action'},
6245 'completed': {'format': 'date-time',
6246 'type': 'string'},
6247 'enqueued': {'format': 'date-time',
6248 'type': 'string'},
6249 'error': {'$ref': '#/definitions/Error'},
6250 'message': {'type': 'string'},
6251 'output': {'patternProperties': {'.*': {'additionalProperties': True,
6252 'type': 'object'}},
6253 'type': 'object'},
6254 'started': {'format': 'date-time',
6255 'type': 'string'},
6256 'status': {'type': 'string'}},
6257 'type': 'object'},
6258 'ActionResults': {'additionalProperties': False,
6259 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
6260 'type': 'array'}},
6261 'type': 'object'},
6262 'ActionSpec': {'additionalProperties': False,
6263 'properties': {'description': {'type': 'string'},
6264 'params': {'patternProperties': {'.*': {'additionalProperties': True,
6265 'type': 'object'}},
6266 'type': 'object'}},
6267 'required': ['description', 'params'],
6268 'type': 'object'},
6269 'Actions': {'additionalProperties': False,
6270 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
6271 'type': 'array'}},
6272 'type': 'object'},
6273 'ActionsByName': {'additionalProperties': False,
6274 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
6275 'type': 'array'},
6276 'error': {'$ref': '#/definitions/Error'},
6277 'name': {'type': 'string'}},
6278 'type': 'object'},
6279 'ActionsByNames': {'additionalProperties': False,
6280 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
6281 'type': 'array'}},
6282 'type': 'object'},
6283 'ActionsByReceiver': {'additionalProperties': False,
6284 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
6285 'type': 'array'},
6286 'error': {'$ref': '#/definitions/Error'},
6287 'receiver': {'type': 'string'}},
6288 'type': 'object'},
6289 'ActionsByReceivers': {'additionalProperties': False,
6290 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
6291 'type': 'array'}},
6292 'type': 'object'},
6293 'ApplicationCharmActionsResult': {'additionalProperties': False,
6294 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
6295 'type': 'object'},
6296 'application-tag': {'type': 'string'},
6297 'error': {'$ref': '#/definitions/Error'}},
6298 'type': 'object'},
6299 'ApplicationsCharmActionsResults': {'additionalProperties': False,
6300 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
6301 'type': 'array'}},
6302 'type': 'object'},
6303 'Entities': {'additionalProperties': False,
6304 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6305 'type': 'array'}},
6306 'required': ['entities'],
6307 'type': 'object'},
6308 'Entity': {'additionalProperties': False,
6309 'properties': {'tag': {'type': 'string'}},
6310 'required': ['tag'],
6311 'type': 'object'},
6312 'Error': {'additionalProperties': False,
6313 'properties': {'code': {'type': 'string'},
6314 'info': {'$ref': '#/definitions/ErrorInfo'},
6315 'message': {'type': 'string'}},
6316 'required': ['message', 'code'],
6317 'type': 'object'},
6318 'ErrorInfo': {'additionalProperties': False,
6319 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6320 'macaroon-path': {'type': 'string'}},
6321 'type': 'object'},
6322 'FindActionsByNames': {'additionalProperties': False,
6323 'properties': {'names': {'items': {'type': 'string'},
6324 'type': 'array'}},
6325 'type': 'object'},
6326 'FindTags': {'additionalProperties': False,
6327 'properties': {'prefixes': {'items': {'type': 'string'},
6328 'type': 'array'}},
6329 'required': ['prefixes'],
6330 'type': 'object'},
6331 'FindTagsResults': {'additionalProperties': False,
6332 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
6333 'type': 'array'}},
6334 'type': 'object'}},
6335 'required': ['matches'],
6336 'type': 'object'},
6337 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6338 'RunParams': {'additionalProperties': False,
6339 'properties': {'applications': {'items': {'type': 'string'},
6340 'type': 'array'},
6341 'commands': {'type': 'string'},
6342 'machines': {'items': {'type': 'string'},
6343 'type': 'array'},
6344 'timeout': {'type': 'integer'},
6345 'units': {'items': {'type': 'string'},
6346 'type': 'array'}},
6347 'required': ['commands', 'timeout'],
6348 'type': 'object'}},
6349 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6350 'Result': {'$ref': '#/definitions/ActionResults'}},
6351 'type': 'object'},
6352 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6353 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
6354 'type': 'object'},
6355 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6356 'Result': {'$ref': '#/definitions/ActionResults'}},
6357 'type': 'object'},
6358 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
6359 'Result': {'$ref': '#/definitions/ActionResults'}},
6360 'type': 'object'},
6361 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
6362 'Result': {'$ref': '#/definitions/FindTagsResults'}},
6363 'type': 'object'},
6364 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
6365 'Result': {'$ref': '#/definitions/ActionsByNames'}},
6366 'type': 'object'},
6367 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6368 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6369 'type': 'object'},
6370 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6371 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6372 'type': 'object'},
6373 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6374 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6375 'type': 'object'},
6376 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6377 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6378 'type': 'object'},
6379 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6380 'Result': {'$ref': '#/definitions/ActionResults'}},
6381 'type': 'object'},
6382 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6383 'Result': {'$ref': '#/definitions/ActionResults'}},
6384 'type': 'object'}},
6385 'type': 'object'}
6386
6387
6388 @ReturnMapping(ActionResults)
6389 async def Actions(self, entities):
6390 '''
6391 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6392 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6393 '''
6394 # map input types to rpc msg
6395 params = dict()
6396 msg = dict(type='Action', request='Actions', version=2, params=params)
6397 params['entities'] = entities
6398 reply = await self.rpc(msg)
6399 return reply
6400
6401
6402
6403 @ReturnMapping(ApplicationsCharmActionsResults)
6404 async def ApplicationsCharmsActions(self, entities):
6405 '''
6406 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6407 Returns -> typing.Sequence<+T_co>[~ApplicationCharmActionsResult]<~ApplicationCharmActionsResult>
6408 '''
6409 # map input types to rpc msg
6410 params = dict()
6411 msg = dict(type='Action', request='ApplicationsCharmsActions', version=2, params=params)
6412 params['entities'] = entities
6413 reply = await self.rpc(msg)
6414 return reply
6415
6416
6417
6418 @ReturnMapping(ActionResults)
6419 async def Cancel(self, entities):
6420 '''
6421 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6422 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6423 '''
6424 # map input types to rpc msg
6425 params = dict()
6426 msg = dict(type='Action', request='Cancel', version=2, params=params)
6427 params['entities'] = entities
6428 reply = await self.rpc(msg)
6429 return reply
6430
6431
6432
6433 @ReturnMapping(ActionResults)
6434 async def Enqueue(self, actions):
6435 '''
6436 actions : typing.Sequence<+T_co>[~Action]<~Action>
6437 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6438 '''
6439 # map input types to rpc msg
6440 params = dict()
6441 msg = dict(type='Action', request='Enqueue', version=2, params=params)
6442 params['actions'] = actions
6443 reply = await self.rpc(msg)
6444 return reply
6445
6446
6447
6448 @ReturnMapping(FindTagsResults)
6449 async def FindActionTagsByPrefix(self, prefixes):
6450 '''
6451 prefixes : typing.Sequence<+T_co>[str]
6452 Returns -> typing.Sequence<+T_co>[~Entity]<~Entity>
6453 '''
6454 # map input types to rpc msg
6455 params = dict()
6456 msg = dict(type='Action', request='FindActionTagsByPrefix', version=2, params=params)
6457 params['prefixes'] = prefixes
6458 reply = await self.rpc(msg)
6459 return reply
6460
6461
6462
6463 @ReturnMapping(ActionsByNames)
6464 async def FindActionsByNames(self, names):
6465 '''
6466 names : typing.Sequence<+T_co>[str]
6467 Returns -> typing.Sequence<+T_co>[~ActionsByName]<~ActionsByName>
6468 '''
6469 # map input types to rpc msg
6470 params = dict()
6471 msg = dict(type='Action', request='FindActionsByNames', version=2, params=params)
6472 params['names'] = names
6473 reply = await self.rpc(msg)
6474 return reply
6475
6476
6477
6478 @ReturnMapping(ActionsByReceivers)
6479 async def ListAll(self, entities):
6480 '''
6481 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6482 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6483 '''
6484 # map input types to rpc msg
6485 params = dict()
6486 msg = dict(type='Action', request='ListAll', version=2, params=params)
6487 params['entities'] = entities
6488 reply = await self.rpc(msg)
6489 return reply
6490
6491
6492
6493 @ReturnMapping(ActionsByReceivers)
6494 async def ListCompleted(self, entities):
6495 '''
6496 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6497 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6498 '''
6499 # map input types to rpc msg
6500 params = dict()
6501 msg = dict(type='Action', request='ListCompleted', version=2, params=params)
6502 params['entities'] = entities
6503 reply = await self.rpc(msg)
6504 return reply
6505
6506
6507
6508 @ReturnMapping(ActionsByReceivers)
6509 async def ListPending(self, entities):
6510 '''
6511 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6512 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6513 '''
6514 # map input types to rpc msg
6515 params = dict()
6516 msg = dict(type='Action', request='ListPending', version=2, params=params)
6517 params['entities'] = entities
6518 reply = await self.rpc(msg)
6519 return reply
6520
6521
6522
6523 @ReturnMapping(ActionsByReceivers)
6524 async def ListRunning(self, entities):
6525 '''
6526 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6527 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6528 '''
6529 # map input types to rpc msg
6530 params = dict()
6531 msg = dict(type='Action', request='ListRunning', version=2, params=params)
6532 params['entities'] = entities
6533 reply = await self.rpc(msg)
6534 return reply
6535
6536
6537
6538 @ReturnMapping(ActionResults)
6539 async def Run(self, applications, commands, machines, timeout, units):
6540 '''
6541 applications : typing.Sequence<+T_co>[str]
6542 commands : str
6543 machines : typing.Sequence<+T_co>[str]
6544 timeout : int
6545 units : typing.Sequence<+T_co>[str]
6546 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6547 '''
6548 # map input types to rpc msg
6549 params = dict()
6550 msg = dict(type='Action', request='Run', version=2, params=params)
6551 params['applications'] = applications
6552 params['commands'] = commands
6553 params['machines'] = machines
6554 params['timeout'] = timeout
6555 params['units'] = units
6556 reply = await self.rpc(msg)
6557 return reply
6558
6559
6560
6561 @ReturnMapping(ActionResults)
6562 async def RunOnAllMachines(self, applications, commands, machines, timeout, units):
6563 '''
6564 applications : typing.Sequence<+T_co>[str]
6565 commands : str
6566 machines : typing.Sequence<+T_co>[str]
6567 timeout : int
6568 units : typing.Sequence<+T_co>[str]
6569 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6570 '''
6571 # map input types to rpc msg
6572 params = dict()
6573 msg = dict(type='Action', request='RunOnAllMachines', version=2, params=params)
6574 params['applications'] = applications
6575 params['commands'] = commands
6576 params['machines'] = machines
6577 params['timeout'] = timeout
6578 params['units'] = units
6579 reply = await self.rpc(msg)
6580 return reply
6581
6582
6583 class AgentFacade(Type):
6584 name = 'Agent'
6585 version = 2
6586 schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
6587 'properties': {'container-type': {'type': 'string'},
6588 'error': {'$ref': '#/definitions/Error'},
6589 'jobs': {'items': {'type': 'string'},
6590 'type': 'array'},
6591 'life': {'type': 'string'}},
6592 'required': ['life',
6593 'jobs',
6594 'container-type'],
6595 'type': 'object'},
6596 'AgentGetEntitiesResults': {'additionalProperties': False,
6597 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
6598 'type': 'array'}},
6599 'required': ['entities'],
6600 'type': 'object'},
6601 'CloudCredential': {'additionalProperties': False,
6602 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
6603 'type': 'object'},
6604 'auth-type': {'type': 'string'},
6605 'redacted': {'items': {'type': 'string'},
6606 'type': 'array'}},
6607 'required': ['auth-type'],
6608 'type': 'object'},
6609 'CloudSpec': {'additionalProperties': False,
6610 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
6611 'endpoint': {'type': 'string'},
6612 'identity-endpoint': {'type': 'string'},
6613 'name': {'type': 'string'},
6614 'region': {'type': 'string'},
6615 'storage-endpoint': {'type': 'string'},
6616 'type': {'type': 'string'}},
6617 'required': ['type', 'name'],
6618 'type': 'object'},
6619 'CloudSpecResult': {'additionalProperties': False,
6620 'properties': {'error': {'$ref': '#/definitions/Error'},
6621 'result': {'$ref': '#/definitions/CloudSpec'}},
6622 'type': 'object'},
6623 'CloudSpecResults': {'additionalProperties': False,
6624 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
6625 'type': 'array'}},
6626 'type': 'object'},
6627 'ControllerConfigResult': {'additionalProperties': False,
6628 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6629 'type': 'object'}},
6630 'type': 'object'}},
6631 'required': ['config'],
6632 'type': 'object'},
6633 'Entities': {'additionalProperties': False,
6634 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6635 'type': 'array'}},
6636 'required': ['entities'],
6637 'type': 'object'},
6638 'Entity': {'additionalProperties': False,
6639 'properties': {'tag': {'type': 'string'}},
6640 'required': ['tag'],
6641 'type': 'object'},
6642 'EntityPassword': {'additionalProperties': False,
6643 'properties': {'password': {'type': 'string'},
6644 'tag': {'type': 'string'}},
6645 'required': ['tag', 'password'],
6646 'type': 'object'},
6647 'EntityPasswords': {'additionalProperties': False,
6648 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
6649 'type': 'array'}},
6650 'required': ['changes'],
6651 'type': 'object'},
6652 'Error': {'additionalProperties': False,
6653 'properties': {'code': {'type': 'string'},
6654 'info': {'$ref': '#/definitions/ErrorInfo'},
6655 'message': {'type': 'string'}},
6656 'required': ['message', 'code'],
6657 'type': 'object'},
6658 'ErrorInfo': {'additionalProperties': False,
6659 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6660 'macaroon-path': {'type': 'string'}},
6661 'type': 'object'},
6662 'ErrorResult': {'additionalProperties': False,
6663 'properties': {'error': {'$ref': '#/definitions/Error'}},
6664 'type': 'object'},
6665 'ErrorResults': {'additionalProperties': False,
6666 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6667 'type': 'array'}},
6668 'required': ['results'],
6669 'type': 'object'},
6670 'IsMasterResult': {'additionalProperties': False,
6671 'properties': {'master': {'type': 'boolean'}},
6672 'required': ['master'],
6673 'type': 'object'},
6674 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6675 'ModelConfigResult': {'additionalProperties': False,
6676 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6677 'type': 'object'}},
6678 'type': 'object'}},
6679 'required': ['config'],
6680 'type': 'object'},
6681 'NotifyWatchResult': {'additionalProperties': False,
6682 'properties': {'NotifyWatcherId': {'type': 'string'},
6683 'error': {'$ref': '#/definitions/Error'}},
6684 'required': ['NotifyWatcherId'],
6685 'type': 'object'},
6686 'StateServingInfo': {'additionalProperties': False,
6687 'properties': {'api-port': {'type': 'integer'},
6688 'ca-private-key': {'type': 'string'},
6689 'cert': {'type': 'string'},
6690 'private-key': {'type': 'string'},
6691 'shared-secret': {'type': 'string'},
6692 'state-port': {'type': 'integer'},
6693 'system-identity': {'type': 'string'}},
6694 'required': ['api-port',
6695 'state-port',
6696 'cert',
6697 'private-key',
6698 'ca-private-key',
6699 'shared-secret',
6700 'system-identity'],
6701 'type': 'object'}},
6702 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6703 'Result': {'$ref': '#/definitions/ErrorResults'}},
6704 'type': 'object'},
6705 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6706 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
6707 'type': 'object'},
6708 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
6709 'type': 'object'},
6710 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6711 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
6712 'type': 'object'},
6713 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
6714 'type': 'object'},
6715 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6716 'type': 'object'},
6717 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6718 'Result': {'$ref': '#/definitions/ErrorResults'}},
6719 'type': 'object'},
6720 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
6721 'type': 'object'},
6722 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6723 'type': 'object'}},
6724 'type': 'object'}
6725
6726
6727 @ReturnMapping(ErrorResults)
6728 async def ClearReboot(self, entities):
6729 '''
6730 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6731 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6732 '''
6733 # map input types to rpc msg
6734 params = dict()
6735 msg = dict(type='Agent', request='ClearReboot', version=2, params=params)
6736 params['entities'] = entities
6737 reply = await self.rpc(msg)
6738 return reply
6739
6740
6741
6742 @ReturnMapping(CloudSpecResults)
6743 async def CloudSpec(self, entities):
6744 '''
6745 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6746 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
6747 '''
6748 # map input types to rpc msg
6749 params = dict()
6750 msg = dict(type='Agent', request='CloudSpec', version=2, params=params)
6751 params['entities'] = entities
6752 reply = await self.rpc(msg)
6753 return reply
6754
6755
6756
6757 @ReturnMapping(ControllerConfigResult)
6758 async def ControllerConfig(self):
6759 '''
6760
6761 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
6762 '''
6763 # map input types to rpc msg
6764 params = dict()
6765 msg = dict(type='Agent', request='ControllerConfig', version=2, params=params)
6766
6767 reply = await self.rpc(msg)
6768 return reply
6769
6770
6771
6772 @ReturnMapping(AgentGetEntitiesResults)
6773 async def GetEntities(self, entities):
6774 '''
6775 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6776 Returns -> typing.Sequence<+T_co>[~AgentGetEntitiesResult]<~AgentGetEntitiesResult>
6777 '''
6778 # map input types to rpc msg
6779 params = dict()
6780 msg = dict(type='Agent', request='GetEntities', version=2, params=params)
6781 params['entities'] = entities
6782 reply = await self.rpc(msg)
6783 return reply
6784
6785
6786
6787 @ReturnMapping(IsMasterResult)
6788 async def IsMaster(self):
6789 '''
6790
6791 Returns -> bool
6792 '''
6793 # map input types to rpc msg
6794 params = dict()
6795 msg = dict(type='Agent', request='IsMaster', version=2, params=params)
6796
6797 reply = await self.rpc(msg)
6798 return reply
6799
6800
6801
6802 @ReturnMapping(ModelConfigResult)
6803 async def ModelConfig(self):
6804 '''
6805
6806 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
6807 '''
6808 # map input types to rpc msg
6809 params = dict()
6810 msg = dict(type='Agent', request='ModelConfig', version=2, params=params)
6811
6812 reply = await self.rpc(msg)
6813 return reply
6814
6815
6816
6817 @ReturnMapping(ErrorResults)
6818 async def SetPasswords(self, changes):
6819 '''
6820 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
6821 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6822 '''
6823 # map input types to rpc msg
6824 params = dict()
6825 msg = dict(type='Agent', request='SetPasswords', version=2, params=params)
6826 params['changes'] = changes
6827 reply = await self.rpc(msg)
6828 return reply
6829
6830
6831
6832 @ReturnMapping(StateServingInfo)
6833 async def StateServingInfo(self):
6834 '''
6835
6836 Returns -> typing.Union[int, str]
6837 '''
6838 # map input types to rpc msg
6839 params = dict()
6840 msg = dict(type='Agent', request='StateServingInfo', version=2, params=params)
6841
6842 reply = await self.rpc(msg)
6843 return reply
6844
6845
6846
6847 @ReturnMapping(NotifyWatchResult)
6848 async def WatchForModelConfigChanges(self):
6849 '''
6850
6851 Returns -> typing.Union[str, _ForwardRef('Error')]
6852 '''
6853 # map input types to rpc msg
6854 params = dict()
6855 msg = dict(type='Agent', request='WatchForModelConfigChanges', version=2, params=params)
6856
6857 reply = await self.rpc(msg)
6858 return reply
6859
6860
6861 class AgentToolsFacade(Type):
6862 name = 'AgentTools'
6863 version = 1
6864 schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
6865
6866
6867 @ReturnMapping(None)
6868 async def UpdateToolsAvailable(self):
6869 '''
6870
6871 Returns -> None
6872 '''
6873 # map input types to rpc msg
6874 params = dict()
6875 msg = dict(type='AgentTools', request='UpdateToolsAvailable', version=1, params=params)
6876
6877 reply = await self.rpc(msg)
6878 return reply
6879
6880
6881 class AllModelWatcherFacade(Type):
6882 name = 'AllModelWatcher'
6883 version = 2
6884 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6885 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
6886 'type': 'array'}},
6887 'required': ['deltas'],
6888 'type': 'object'},
6889 'Delta': {'additionalProperties': False,
6890 'properties': {'entity': {'additionalProperties': True,
6891 'type': 'object'},
6892 'removed': {'type': 'boolean'}},
6893 'required': ['removed', 'entity'],
6894 'type': 'object'}},
6895 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6896 'type': 'object'},
6897 'Stop': {'type': 'object'}},
6898 'type': 'object'}
6899
6900
6901 @ReturnMapping(AllWatcherNextResults)
6902 async def Next(self):
6903 '''
6904
6905 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
6906 '''
6907 # map input types to rpc msg
6908 params = dict()
6909 msg = dict(type='AllModelWatcher', request='Next', version=2, params=params)
6910
6911 reply = await self.rpc(msg)
6912 return reply
6913
6914
6915
6916 @ReturnMapping(None)
6917 async def Stop(self):
6918 '''
6919
6920 Returns -> None
6921 '''
6922 # map input types to rpc msg
6923 params = dict()
6924 msg = dict(type='AllModelWatcher', request='Stop', version=2, params=params)
6925
6926 reply = await self.rpc(msg)
6927 return reply
6928
6929
6930 class AllWatcherFacade(Type):
6931 name = 'AllWatcher'
6932 version = 1
6933 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6934 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
6935 'type': 'array'}},
6936 'required': ['deltas'],
6937 'type': 'object'},
6938 'Delta': {'additionalProperties': False,
6939 'properties': {'entity': {'additionalProperties': True,
6940 'type': 'object'},
6941 'removed': {'type': 'boolean'}},
6942 'required': ['removed', 'entity'],
6943 'type': 'object'}},
6944 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6945 'type': 'object'},
6946 'Stop': {'type': 'object'}},
6947 'type': 'object'}
6948
6949
6950 @ReturnMapping(AllWatcherNextResults)
6951 async def Next(self):
6952 '''
6953
6954 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
6955 '''
6956 # map input types to rpc msg
6957 params = dict()
6958 msg = dict(type='AllWatcher', request='Next', version=1, params=params)
6959
6960 reply = await self.rpc(msg)
6961 return reply
6962
6963
6964
6965 @ReturnMapping(None)
6966 async def Stop(self):
6967 '''
6968
6969 Returns -> None
6970 '''
6971 # map input types to rpc msg
6972 params = dict()
6973 msg = dict(type='AllWatcher', request='Stop', version=1, params=params)
6974
6975 reply = await self.rpc(msg)
6976 return reply
6977
6978
6979 class AnnotationsFacade(Type):
6980 name = 'Annotations'
6981 version = 2
6982 schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
6983 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
6984 'type': 'object'},
6985 'entity': {'type': 'string'},
6986 'error': {'$ref': '#/definitions/ErrorResult'}},
6987 'required': ['entity', 'annotations'],
6988 'type': 'object'},
6989 'AnnotationsGetResults': {'additionalProperties': False,
6990 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
6991 'type': 'array'}},
6992 'required': ['results'],
6993 'type': 'object'},
6994 'AnnotationsSet': {'additionalProperties': False,
6995 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
6996 'type': 'array'}},
6997 'required': ['annotations'],
6998 'type': 'object'},
6999 'Entities': {'additionalProperties': False,
7000 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7001 'type': 'array'}},
7002 'required': ['entities'],
7003 'type': 'object'},
7004 'Entity': {'additionalProperties': False,
7005 'properties': {'tag': {'type': 'string'}},
7006 'required': ['tag'],
7007 'type': 'object'},
7008 'EntityAnnotations': {'additionalProperties': False,
7009 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
7010 'type': 'object'},
7011 'entity': {'type': 'string'}},
7012 'required': ['entity', 'annotations'],
7013 'type': 'object'},
7014 'Error': {'additionalProperties': False,
7015 'properties': {'code': {'type': 'string'},
7016 'info': {'$ref': '#/definitions/ErrorInfo'},
7017 'message': {'type': 'string'}},
7018 'required': ['message', 'code'],
7019 'type': 'object'},
7020 'ErrorInfo': {'additionalProperties': False,
7021 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7022 'macaroon-path': {'type': 'string'}},
7023 'type': 'object'},
7024 'ErrorResult': {'additionalProperties': False,
7025 'properties': {'error': {'$ref': '#/definitions/Error'}},
7026 'type': 'object'},
7027 'ErrorResults': {'additionalProperties': False,
7028 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7029 'type': 'array'}},
7030 'required': ['results'],
7031 'type': 'object'},
7032 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
7033 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7034 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
7035 'type': 'object'},
7036 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
7037 'Result': {'$ref': '#/definitions/ErrorResults'}},
7038 'type': 'object'}},
7039 'type': 'object'}
7040
7041
7042 @ReturnMapping(AnnotationsGetResults)
7043 async def Get(self, entities):
7044 '''
7045 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7046 Returns -> typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult>
7047 '''
7048 # map input types to rpc msg
7049 params = dict()
7050 msg = dict(type='Annotations', request='Get', version=2, params=params)
7051 params['entities'] = entities
7052 reply = await self.rpc(msg)
7053 return reply
7054
7055
7056
7057 @ReturnMapping(ErrorResults)
7058 async def Set(self, annotations):
7059 '''
7060 annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations>
7061 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7062 '''
7063 # map input types to rpc msg
7064 params = dict()
7065 msg = dict(type='Annotations', request='Set', version=2, params=params)
7066 params['annotations'] = annotations
7067 reply = await self.rpc(msg)
7068 return reply
7069
7070
7071 class ApplicationFacade(Type):
7072 name = 'Application'
7073 version = 1
7074 schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
7075 'properties': {'application': {'type': 'string'},
7076 'num-units': {'type': 'integer'},
7077 'placement': {'items': {'$ref': '#/definitions/Placement'},
7078 'type': 'array'}},
7079 'required': ['application',
7080 'num-units',
7081 'placement'],
7082 'type': 'object'},
7083 'AddApplicationUnitsResults': {'additionalProperties': False,
7084 'properties': {'units': {'items': {'type': 'string'},
7085 'type': 'array'}},
7086 'required': ['units'],
7087 'type': 'object'},
7088 'AddRelation': {'additionalProperties': False,
7089 'properties': {'endpoints': {'items': {'type': 'string'},
7090 'type': 'array'}},
7091 'required': ['endpoints'],
7092 'type': 'object'},
7093 'AddRelationResults': {'additionalProperties': False,
7094 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
7095 'type': 'object'}},
7096 'required': ['endpoints'],
7097 'type': 'object'},
7098 'ApplicationCharmRelations': {'additionalProperties': False,
7099 'properties': {'application': {'type': 'string'}},
7100 'required': ['application'],
7101 'type': 'object'},
7102 'ApplicationCharmRelationsResults': {'additionalProperties': False,
7103 'properties': {'charm-relations': {'items': {'type': 'string'},
7104 'type': 'array'}},
7105 'required': ['charm-relations'],
7106 'type': 'object'},
7107 'ApplicationDeploy': {'additionalProperties': False,
7108 'properties': {'application': {'type': 'string'},
7109 'channel': {'type': 'string'},
7110 'charm-url': {'type': 'string'},
7111 'config': {'patternProperties': {'.*': {'type': 'string'}},
7112 'type': 'object'},
7113 'config-yaml': {'type': 'string'},
7114 'constraints': {'$ref': '#/definitions/Value'},
7115 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
7116 'type': 'object'},
7117 'num-units': {'type': 'integer'},
7118 'placement': {'items': {'$ref': '#/definitions/Placement'},
7119 'type': 'array'},
7120 'resources': {'patternProperties': {'.*': {'type': 'string'}},
7121 'type': 'object'},
7122 'series': {'type': 'string'},
7123 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
7124 'type': 'object'}},
7125 'required': ['application',
7126 'series',
7127 'charm-url',
7128 'channel',
7129 'num-units',
7130 'config-yaml',
7131 'constraints'],
7132 'type': 'object'},
7133 'ApplicationDestroy': {'additionalProperties': False,
7134 'properties': {'application': {'type': 'string'}},
7135 'required': ['application'],
7136 'type': 'object'},
7137 'ApplicationExpose': {'additionalProperties': False,
7138 'properties': {'application': {'type': 'string'}},
7139 'required': ['application'],
7140 'type': 'object'},
7141 'ApplicationGet': {'additionalProperties': False,
7142 'properties': {'application': {'type': 'string'}},
7143 'required': ['application'],
7144 'type': 'object'},
7145 'ApplicationGetResults': {'additionalProperties': False,
7146 'properties': {'application': {'type': 'string'},
7147 'charm': {'type': 'string'},
7148 'config': {'patternProperties': {'.*': {'additionalProperties': True,
7149 'type': 'object'}},
7150 'type': 'object'},
7151 'constraints': {'$ref': '#/definitions/Value'},
7152 'series': {'type': 'string'}},
7153 'required': ['application',
7154 'charm',
7155 'config',
7156 'constraints',
7157 'series'],
7158 'type': 'object'},
7159 'ApplicationMetricCredential': {'additionalProperties': False,
7160 'properties': {'application': {'type': 'string'},
7161 'metrics-credentials': {'items': {'type': 'integer'},
7162 'type': 'array'}},
7163 'required': ['application',
7164 'metrics-credentials'],
7165 'type': 'object'},
7166 'ApplicationMetricCredentials': {'additionalProperties': False,
7167 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
7168 'type': 'array'}},
7169 'required': ['creds'],
7170 'type': 'object'},
7171 'ApplicationSet': {'additionalProperties': False,
7172 'properties': {'application': {'type': 'string'},
7173 'options': {'patternProperties': {'.*': {'type': 'string'}},
7174 'type': 'object'}},
7175 'required': ['application', 'options'],
7176 'type': 'object'},
7177 'ApplicationSetCharm': {'additionalProperties': False,
7178 'properties': {'application': {'type': 'string'},
7179 'channel': {'type': 'string'},
7180 'charm-url': {'type': 'string'},
7181 'force-series': {'type': 'boolean'},
7182 'force-units': {'type': 'boolean'},
7183 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
7184 'type': 'object'}},
7185 'required': ['application',
7186 'charm-url',
7187 'channel',
7188 'force-units',
7189 'force-series'],
7190 'type': 'object'},
7191 'ApplicationUnexpose': {'additionalProperties': False,
7192 'properties': {'application': {'type': 'string'}},
7193 'required': ['application'],
7194 'type': 'object'},
7195 'ApplicationUnset': {'additionalProperties': False,
7196 'properties': {'application': {'type': 'string'},
7197 'options': {'items': {'type': 'string'},
7198 'type': 'array'}},
7199 'required': ['application', 'options'],
7200 'type': 'object'},
7201 'ApplicationUpdate': {'additionalProperties': False,
7202 'properties': {'application': {'type': 'string'},
7203 'charm-url': {'type': 'string'},
7204 'constraints': {'$ref': '#/definitions/Value'},
7205 'force-charm-url': {'type': 'boolean'},
7206 'force-series': {'type': 'boolean'},
7207 'min-units': {'type': 'integer'},
7208 'settings': {'patternProperties': {'.*': {'type': 'string'}},
7209 'type': 'object'},
7210 'settings-yaml': {'type': 'string'}},
7211 'required': ['application',
7212 'charm-url',
7213 'force-charm-url',
7214 'force-series',
7215 'settings-yaml'],
7216 'type': 'object'},
7217 'ApplicationsDeploy': {'additionalProperties': False,
7218 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
7219 'type': 'array'}},
7220 'required': ['applications'],
7221 'type': 'object'},
7222 'CharmRelation': {'additionalProperties': False,
7223 'properties': {'interface': {'type': 'string'},
7224 'limit': {'type': 'integer'},
7225 'name': {'type': 'string'},
7226 'optional': {'type': 'boolean'},
7227 'role': {'type': 'string'},
7228 'scope': {'type': 'string'}},
7229 'required': ['name',
7230 'role',
7231 'interface',
7232 'optional',
7233 'limit',
7234 'scope'],
7235 'type': 'object'},
7236 'Constraints': {'additionalProperties': False,
7237 'properties': {'Count': {'type': 'integer'},
7238 'Pool': {'type': 'string'},
7239 'Size': {'type': 'integer'}},
7240 'required': ['Pool', 'Size', 'Count'],
7241 'type': 'object'},
7242 'DestroyApplicationUnits': {'additionalProperties': False,
7243 'properties': {'unit-names': {'items': {'type': 'string'},
7244 'type': 'array'}},
7245 'required': ['unit-names'],
7246 'type': 'object'},
7247 'DestroyRelation': {'additionalProperties': False,
7248 'properties': {'endpoints': {'items': {'type': 'string'},
7249 'type': 'array'}},
7250 'required': ['endpoints'],
7251 'type': 'object'},
7252 'Error': {'additionalProperties': False,
7253 'properties': {'code': {'type': 'string'},
7254 'info': {'$ref': '#/definitions/ErrorInfo'},
7255 'message': {'type': 'string'}},
7256 'required': ['message', 'code'],
7257 'type': 'object'},
7258 'ErrorInfo': {'additionalProperties': False,
7259 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7260 'macaroon-path': {'type': 'string'}},
7261 'type': 'object'},
7262 'ErrorResult': {'additionalProperties': False,
7263 'properties': {'error': {'$ref': '#/definitions/Error'}},
7264 'type': 'object'},
7265 'ErrorResults': {'additionalProperties': False,
7266 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7267 'type': 'array'}},
7268 'required': ['results'],
7269 'type': 'object'},
7270 'GetApplicationConstraints': {'additionalProperties': False,
7271 'properties': {'application': {'type': 'string'}},
7272 'required': ['application'],
7273 'type': 'object'},
7274 'GetConstraintsResults': {'additionalProperties': False,
7275 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
7276 'required': ['constraints'],
7277 'type': 'object'},
7278 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7279 'Placement': {'additionalProperties': False,
7280 'properties': {'directive': {'type': 'string'},
7281 'scope': {'type': 'string'}},
7282 'required': ['scope', 'directive'],
7283 'type': 'object'},
7284 'SetConstraints': {'additionalProperties': False,
7285 'properties': {'application': {'type': 'string'},
7286 'constraints': {'$ref': '#/definitions/Value'}},
7287 'required': ['application', 'constraints'],
7288 'type': 'object'},
7289 'StringResult': {'additionalProperties': False,
7290 'properties': {'error': {'$ref': '#/definitions/Error'},
7291 'result': {'type': 'string'}},
7292 'required': ['result'],
7293 'type': 'object'},
7294 'Value': {'additionalProperties': False,
7295 'properties': {'arch': {'type': 'string'},
7296 'container': {'type': 'string'},
7297 'cpu-cores': {'type': 'integer'},
7298 'cpu-power': {'type': 'integer'},
7299 'instance-type': {'type': 'string'},
7300 'mem': {'type': 'integer'},
7301 'root-disk': {'type': 'integer'},
7302 'spaces': {'items': {'type': 'string'},
7303 'type': 'array'},
7304 'tags': {'items': {'type': 'string'},
7305 'type': 'array'},
7306 'virt-type': {'type': 'string'}},
7307 'type': 'object'}},
7308 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
7309 'Result': {'$ref': '#/definitions/AddRelationResults'}},
7310 'type': 'object'},
7311 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
7312 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
7313 'type': 'object'},
7314 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
7315 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
7316 'type': 'object'},
7317 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
7318 'Result': {'$ref': '#/definitions/ErrorResults'}},
7319 'type': 'object'},
7320 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
7321 'type': 'object'},
7322 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
7323 'type': 'object'},
7324 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
7325 'type': 'object'},
7326 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
7327 'type': 'object'},
7328 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
7329 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
7330 'type': 'object'},
7331 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
7332 'Result': {'$ref': '#/definitions/StringResult'}},
7333 'type': 'object'},
7334 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
7335 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
7336 'type': 'object'},
7337 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
7338 'type': 'object'},
7339 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
7340 'type': 'object'},
7341 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
7342 'type': 'object'},
7343 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
7344 'Result': {'$ref': '#/definitions/ErrorResults'}},
7345 'type': 'object'},
7346 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
7347 'type': 'object'},
7348 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
7349 'type': 'object'},
7350 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
7351 'type': 'object'}},
7352 'type': 'object'}
7353
7354
7355 @ReturnMapping(AddRelationResults)
7356 async def AddRelation(self, endpoints):
7357 '''
7358 endpoints : typing.Sequence<+T_co>[str]
7359 Returns -> typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
7360 '''
7361 # map input types to rpc msg
7362 params = dict()
7363 msg = dict(type='Application', request='AddRelation', version=1, params=params)
7364 params['endpoints'] = endpoints
7365 reply = await self.rpc(msg)
7366 return reply
7367
7368
7369
7370 @ReturnMapping(AddApplicationUnitsResults)
7371 async def AddUnits(self, application, num_units, placement):
7372 '''
7373 application : str
7374 num_units : int
7375 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
7376 Returns -> typing.Sequence<+T_co>[str]
7377 '''
7378 # map input types to rpc msg
7379 params = dict()
7380 msg = dict(type='Application', request='AddUnits', version=1, params=params)
7381 params['application'] = application
7382 params['num-units'] = num_units
7383 params['placement'] = placement
7384 reply = await self.rpc(msg)
7385 return reply
7386
7387
7388
7389 @ReturnMapping(ApplicationCharmRelationsResults)
7390 async def CharmRelations(self, application):
7391 '''
7392 application : str
7393 Returns -> typing.Sequence<+T_co>[str]
7394 '''
7395 # map input types to rpc msg
7396 params = dict()
7397 msg = dict(type='Application', request='CharmRelations', version=1, params=params)
7398 params['application'] = application
7399 reply = await self.rpc(msg)
7400 return reply
7401
7402
7403
7404 @ReturnMapping(ErrorResults)
7405 async def Deploy(self, applications):
7406 '''
7407 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
7408 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7409 '''
7410 # map input types to rpc msg
7411 params = dict()
7412 msg = dict(type='Application', request='Deploy', version=1, params=params)
7413 params['applications'] = applications
7414 reply = await self.rpc(msg)
7415 return reply
7416
7417
7418
7419 @ReturnMapping(None)
7420 async def Destroy(self, application):
7421 '''
7422 application : str
7423 Returns -> None
7424 '''
7425 # map input types to rpc msg
7426 params = dict()
7427 msg = dict(type='Application', request='Destroy', version=1, params=params)
7428 params['application'] = application
7429 reply = await self.rpc(msg)
7430 return reply
7431
7432
7433
7434 @ReturnMapping(None)
7435 async def DestroyRelation(self, endpoints):
7436 '''
7437 endpoints : typing.Sequence<+T_co>[str]
7438 Returns -> None
7439 '''
7440 # map input types to rpc msg
7441 params = dict()
7442 msg = dict(type='Application', request='DestroyRelation', version=1, params=params)
7443 params['endpoints'] = endpoints
7444 reply = await self.rpc(msg)
7445 return reply
7446
7447
7448
7449 @ReturnMapping(None)
7450 async def DestroyUnits(self, unit_names):
7451 '''
7452 unit_names : typing.Sequence<+T_co>[str]
7453 Returns -> None
7454 '''
7455 # map input types to rpc msg
7456 params = dict()
7457 msg = dict(type='Application', request='DestroyUnits', version=1, params=params)
7458 params['unit-names'] = unit_names
7459 reply = await self.rpc(msg)
7460 return reply
7461
7462
7463
7464 @ReturnMapping(None)
7465 async def Expose(self, application):
7466 '''
7467 application : str
7468 Returns -> None
7469 '''
7470 # map input types to rpc msg
7471 params = dict()
7472 msg = dict(type='Application', request='Expose', version=1, params=params)
7473 params['application'] = application
7474 reply = await self.rpc(msg)
7475 return reply
7476
7477
7478
7479 @ReturnMapping(ApplicationGetResults)
7480 async def Get(self, application):
7481 '''
7482 application : str
7483 Returns -> typing.Union[str, typing.Mapping<~KT, +VT_co>[str, typing.Any], _ForwardRef('Value')]
7484 '''
7485 # map input types to rpc msg
7486 params = dict()
7487 msg = dict(type='Application', request='Get', version=1, params=params)
7488 params['application'] = application
7489 reply = await self.rpc(msg)
7490 return reply
7491
7492
7493
7494 @ReturnMapping(StringResult)
7495 async def GetCharmURL(self, application):
7496 '''
7497 application : str
7498 Returns -> typing.Union[_ForwardRef('Error'), str]
7499 '''
7500 # map input types to rpc msg
7501 params = dict()
7502 msg = dict(type='Application', request='GetCharmURL', version=1, params=params)
7503 params['application'] = application
7504 reply = await self.rpc(msg)
7505 return reply
7506
7507
7508
7509 @ReturnMapping(GetConstraintsResults)
7510 async def GetConstraints(self, application):
7511 '''
7512 application : str
7513 Returns -> Value
7514 '''
7515 # map input types to rpc msg
7516 params = dict()
7517 msg = dict(type='Application', request='GetConstraints', version=1, params=params)
7518 params['application'] = application
7519 reply = await self.rpc(msg)
7520 return reply
7521
7522
7523
7524 @ReturnMapping(None)
7525 async def Set(self, application, options):
7526 '''
7527 application : str
7528 options : typing.Mapping<~KT, +VT_co>[str, str]
7529 Returns -> None
7530 '''
7531 # map input types to rpc msg
7532 params = dict()
7533 msg = dict(type='Application', request='Set', version=1, params=params)
7534 params['application'] = application
7535 params['options'] = options
7536 reply = await self.rpc(msg)
7537 return reply
7538
7539
7540
7541 @ReturnMapping(None)
7542 async def SetCharm(self, application, channel, charm_url, force_series, force_units, resource_ids):
7543 '''
7544 application : str
7545 channel : str
7546 charm_url : str
7547 force_series : bool
7548 force_units : bool
7549 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
7550 Returns -> None
7551 '''
7552 # map input types to rpc msg
7553 params = dict()
7554 msg = dict(type='Application', request='SetCharm', version=1, params=params)
7555 params['application'] = application
7556 params['channel'] = channel
7557 params['charm-url'] = charm_url
7558 params['force-series'] = force_series
7559 params['force-units'] = force_units
7560 params['resource-ids'] = resource_ids
7561 reply = await self.rpc(msg)
7562 return reply
7563
7564
7565
7566 @ReturnMapping(None)
7567 async def SetConstraints(self, application, constraints):
7568 '''
7569 application : str
7570 constraints : Value
7571 Returns -> None
7572 '''
7573 # map input types to rpc msg
7574 params = dict()
7575 msg = dict(type='Application', request='SetConstraints', version=1, params=params)
7576 params['application'] = application
7577 params['constraints'] = constraints
7578 reply = await self.rpc(msg)
7579 return reply
7580
7581
7582
7583 @ReturnMapping(ErrorResults)
7584 async def SetMetricCredentials(self, creds):
7585 '''
7586 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
7587 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7588 '''
7589 # map input types to rpc msg
7590 params = dict()
7591 msg = dict(type='Application', request='SetMetricCredentials', version=1, params=params)
7592 params['creds'] = creds
7593 reply = await self.rpc(msg)
7594 return reply
7595
7596
7597
7598 @ReturnMapping(None)
7599 async def Unexpose(self, application):
7600 '''
7601 application : str
7602 Returns -> None
7603 '''
7604 # map input types to rpc msg
7605 params = dict()
7606 msg = dict(type='Application', request='Unexpose', version=1, params=params)
7607 params['application'] = application
7608 reply = await self.rpc(msg)
7609 return reply
7610
7611
7612
7613 @ReturnMapping(None)
7614 async def Unset(self, application, options):
7615 '''
7616 application : str
7617 options : typing.Sequence<+T_co>[str]
7618 Returns -> None
7619 '''
7620 # map input types to rpc msg
7621 params = dict()
7622 msg = dict(type='Application', request='Unset', version=1, params=params)
7623 params['application'] = application
7624 params['options'] = options
7625 reply = await self.rpc(msg)
7626 return reply
7627
7628
7629
7630 @ReturnMapping(None)
7631 async def Update(self, application, charm_url, constraints, force_charm_url, force_series, min_units, settings, settings_yaml):
7632 '''
7633 application : str
7634 charm_url : str
7635 constraints : Value
7636 force_charm_url : bool
7637 force_series : bool
7638 min_units : int
7639 settings : typing.Mapping<~KT, +VT_co>[str, str]
7640 settings_yaml : str
7641 Returns -> None
7642 '''
7643 # map input types to rpc msg
7644 params = dict()
7645 msg = dict(type='Application', request='Update', version=1, params=params)
7646 params['application'] = application
7647 params['charm-url'] = charm_url
7648 params['constraints'] = constraints
7649 params['force-charm-url'] = force_charm_url
7650 params['force-series'] = force_series
7651 params['min-units'] = min_units
7652 params['settings'] = settings
7653 params['settings-yaml'] = settings_yaml
7654 reply = await self.rpc(msg)
7655 return reply
7656
7657
7658 class ApplicationScalerFacade(Type):
7659 name = 'ApplicationScaler'
7660 version = 1
7661 schema = {'definitions': {'Entities': {'additionalProperties': False,
7662 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7663 'type': 'array'}},
7664 'required': ['entities'],
7665 'type': 'object'},
7666 'Entity': {'additionalProperties': False,
7667 'properties': {'tag': {'type': 'string'}},
7668 'required': ['tag'],
7669 'type': 'object'},
7670 'Error': {'additionalProperties': False,
7671 'properties': {'code': {'type': 'string'},
7672 'info': {'$ref': '#/definitions/ErrorInfo'},
7673 'message': {'type': 'string'}},
7674 'required': ['message', 'code'],
7675 'type': 'object'},
7676 'ErrorInfo': {'additionalProperties': False,
7677 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7678 'macaroon-path': {'type': 'string'}},
7679 'type': 'object'},
7680 'ErrorResult': {'additionalProperties': False,
7681 'properties': {'error': {'$ref': '#/definitions/Error'}},
7682 'type': 'object'},
7683 'ErrorResults': {'additionalProperties': False,
7684 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7685 'type': 'array'}},
7686 'required': ['results'],
7687 'type': 'object'},
7688 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7689 'StringsWatchResult': {'additionalProperties': False,
7690 'properties': {'changes': {'items': {'type': 'string'},
7691 'type': 'array'},
7692 'error': {'$ref': '#/definitions/Error'},
7693 'watcher-id': {'type': 'string'}},
7694 'required': ['watcher-id'],
7695 'type': 'object'}},
7696 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7697 'Result': {'$ref': '#/definitions/ErrorResults'}},
7698 'type': 'object'},
7699 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
7700 'type': 'object'}},
7701 'type': 'object'}
7702
7703
7704 @ReturnMapping(ErrorResults)
7705 async def Rescale(self, entities):
7706 '''
7707 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7708 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7709 '''
7710 # map input types to rpc msg
7711 params = dict()
7712 msg = dict(type='ApplicationScaler', request='Rescale', version=1, params=params)
7713 params['entities'] = entities
7714 reply = await self.rpc(msg)
7715 return reply
7716
7717
7718
7719 @ReturnMapping(StringsWatchResult)
7720 async def Watch(self):
7721 '''
7722
7723 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
7724 '''
7725 # map input types to rpc msg
7726 params = dict()
7727 msg = dict(type='ApplicationScaler', request='Watch', version=1, params=params)
7728
7729 reply = await self.rpc(msg)
7730 return reply
7731
7732
7733 class BackupsFacade(Type):
7734 name = 'Backups'
7735 version = 1
7736 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
7737 'properties': {'notes': {'type': 'string'}},
7738 'required': ['notes'],
7739 'type': 'object'},
7740 'BackupsInfoArgs': {'additionalProperties': False,
7741 'properties': {'id': {'type': 'string'}},
7742 'required': ['id'],
7743 'type': 'object'},
7744 'BackupsListArgs': {'additionalProperties': False,
7745 'type': 'object'},
7746 'BackupsListResult': {'additionalProperties': False,
7747 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
7748 'type': 'array'}},
7749 'required': ['list'],
7750 'type': 'object'},
7751 'BackupsMetadataResult': {'additionalProperties': False,
7752 'properties': {'ca-cert': {'type': 'string'},
7753 'ca-private-key': {'type': 'string'},
7754 'checksum': {'type': 'string'},
7755 'checksum-format': {'type': 'string'},
7756 'finished': {'format': 'date-time',
7757 'type': 'string'},
7758 'hostname': {'type': 'string'},
7759 'id': {'type': 'string'},
7760 'machine': {'type': 'string'},
7761 'model': {'type': 'string'},
7762 'notes': {'type': 'string'},
7763 'series': {'type': 'string'},
7764 'size': {'type': 'integer'},
7765 'started': {'format': 'date-time',
7766 'type': 'string'},
7767 'stored': {'format': 'date-time',
7768 'type': 'string'},
7769 'version': {'$ref': '#/definitions/Number'}},
7770 'required': ['id',
7771 'checksum',
7772 'checksum-format',
7773 'size',
7774 'stored',
7775 'started',
7776 'finished',
7777 'notes',
7778 'model',
7779 'machine',
7780 'hostname',
7781 'version',
7782 'series',
7783 'ca-cert',
7784 'ca-private-key'],
7785 'type': 'object'},
7786 'BackupsRemoveArgs': {'additionalProperties': False,
7787 'properties': {'id': {'type': 'string'}},
7788 'required': ['id'],
7789 'type': 'object'},
7790 'Number': {'additionalProperties': False,
7791 'properties': {'Build': {'type': 'integer'},
7792 'Major': {'type': 'integer'},
7793 'Minor': {'type': 'integer'},
7794 'Patch': {'type': 'integer'},
7795 'Tag': {'type': 'string'}},
7796 'required': ['Major',
7797 'Minor',
7798 'Tag',
7799 'Patch',
7800 'Build'],
7801 'type': 'object'},
7802 'RestoreArgs': {'additionalProperties': False,
7803 'properties': {'backup-id': {'type': 'string'}},
7804 'required': ['backup-id'],
7805 'type': 'object'}},
7806 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
7807 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7808 'type': 'object'},
7809 'FinishRestore': {'type': 'object'},
7810 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
7811 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7812 'type': 'object'},
7813 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
7814 'Result': {'$ref': '#/definitions/BackupsListResult'}},
7815 'type': 'object'},
7816 'PrepareRestore': {'type': 'object'},
7817 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
7818 'type': 'object'},
7819 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
7820 'type': 'object'}},
7821 'type': 'object'}
7822
7823
7824 @ReturnMapping(BackupsMetadataResult)
7825 async def Create(self, notes):
7826 '''
7827 notes : str
7828 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7829 '''
7830 # map input types to rpc msg
7831 params = dict()
7832 msg = dict(type='Backups', request='Create', version=1, params=params)
7833 params['notes'] = notes
7834 reply = await self.rpc(msg)
7835 return reply
7836
7837
7838
7839 @ReturnMapping(None)
7840 async def FinishRestore(self):
7841 '''
7842
7843 Returns -> None
7844 '''
7845 # map input types to rpc msg
7846 params = dict()
7847 msg = dict(type='Backups', request='FinishRestore', version=1, params=params)
7848
7849 reply = await self.rpc(msg)
7850 return reply
7851
7852
7853
7854 @ReturnMapping(BackupsMetadataResult)
7855 async def Info(self, id_):
7856 '''
7857 id_ : str
7858 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7859 '''
7860 # map input types to rpc msg
7861 params = dict()
7862 msg = dict(type='Backups', request='Info', version=1, params=params)
7863 params['id'] = id_
7864 reply = await self.rpc(msg)
7865 return reply
7866
7867
7868
7869 @ReturnMapping(BackupsListResult)
7870 async def List(self):
7871 '''
7872
7873 Returns -> typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
7874 '''
7875 # map input types to rpc msg
7876 params = dict()
7877 msg = dict(type='Backups', request='List', version=1, params=params)
7878
7879 reply = await self.rpc(msg)
7880 return reply
7881
7882
7883
7884 @ReturnMapping(None)
7885 async def PrepareRestore(self):
7886 '''
7887
7888 Returns -> None
7889 '''
7890 # map input types to rpc msg
7891 params = dict()
7892 msg = dict(type='Backups', request='PrepareRestore', version=1, params=params)
7893
7894 reply = await self.rpc(msg)
7895 return reply
7896
7897
7898
7899 @ReturnMapping(None)
7900 async def Remove(self, id_):
7901 '''
7902 id_ : str
7903 Returns -> None
7904 '''
7905 # map input types to rpc msg
7906 params = dict()
7907 msg = dict(type='Backups', request='Remove', version=1, params=params)
7908 params['id'] = id_
7909 reply = await self.rpc(msg)
7910 return reply
7911
7912
7913
7914 @ReturnMapping(None)
7915 async def Restore(self, backup_id):
7916 '''
7917 backup_id : str
7918 Returns -> None
7919 '''
7920 # map input types to rpc msg
7921 params = dict()
7922 msg = dict(type='Backups', request='Restore', version=1, params=params)
7923 params['backup-id'] = backup_id
7924 reply = await self.rpc(msg)
7925 return reply
7926
7927
7928 class BlockFacade(Type):
7929 name = 'Block'
7930 version = 2
7931 schema = {'definitions': {'Block': {'additionalProperties': False,
7932 'properties': {'id': {'type': 'string'},
7933 'message': {'type': 'string'},
7934 'tag': {'type': 'string'},
7935 'type': {'type': 'string'}},
7936 'required': ['id', 'tag', 'type'],
7937 'type': 'object'},
7938 'BlockResult': {'additionalProperties': False,
7939 'properties': {'error': {'$ref': '#/definitions/Error'},
7940 'result': {'$ref': '#/definitions/Block'}},
7941 'required': ['result'],
7942 'type': 'object'},
7943 'BlockResults': {'additionalProperties': False,
7944 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
7945 'type': 'array'}},
7946 'type': 'object'},
7947 'BlockSwitchParams': {'additionalProperties': False,
7948 'properties': {'message': {'type': 'string'},
7949 'type': {'type': 'string'}},
7950 'required': ['type'],
7951 'type': 'object'},
7952 'Error': {'additionalProperties': False,
7953 'properties': {'code': {'type': 'string'},
7954 'info': {'$ref': '#/definitions/ErrorInfo'},
7955 'message': {'type': 'string'}},
7956 'required': ['message', 'code'],
7957 'type': 'object'},
7958 'ErrorInfo': {'additionalProperties': False,
7959 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7960 'macaroon-path': {'type': 'string'}},
7961 'type': 'object'},
7962 'ErrorResult': {'additionalProperties': False,
7963 'properties': {'error': {'$ref': '#/definitions/Error'}},
7964 'type': 'object'},
7965 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
7966 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
7967 'type': 'object'},
7968 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7969 'Result': {'$ref': '#/definitions/ErrorResult'}},
7970 'type': 'object'},
7971 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7972 'Result': {'$ref': '#/definitions/ErrorResult'}},
7973 'type': 'object'}},
7974 'type': 'object'}
7975
7976
7977 @ReturnMapping(BlockResults)
7978 async def List(self):
7979 '''
7980
7981 Returns -> typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
7982 '''
7983 # map input types to rpc msg
7984 params = dict()
7985 msg = dict(type='Block', request='List', version=2, params=params)
7986
7987 reply = await self.rpc(msg)
7988 return reply
7989
7990
7991
7992 @ReturnMapping(ErrorResult)
7993 async def SwitchBlockOff(self, message, type_):
7994 '''
7995 message : str
7996 type_ : str
7997 Returns -> Error
7998 '''
7999 # map input types to rpc msg
8000 params = dict()
8001 msg = dict(type='Block', request='SwitchBlockOff', version=2, params=params)
8002 params['message'] = message
8003 params['type'] = type_
8004 reply = await self.rpc(msg)
8005 return reply
8006
8007
8008
8009 @ReturnMapping(ErrorResult)
8010 async def SwitchBlockOn(self, message, type_):
8011 '''
8012 message : str
8013 type_ : str
8014 Returns -> Error
8015 '''
8016 # map input types to rpc msg
8017 params = dict()
8018 msg = dict(type='Block', request='SwitchBlockOn', version=2, params=params)
8019 params['message'] = message
8020 params['type'] = type_
8021 reply = await self.rpc(msg)
8022 return reply
8023
8024
8025 class CharmRevisionUpdaterFacade(Type):
8026 name = 'CharmRevisionUpdater'
8027 version = 2
8028 schema = {'definitions': {'Error': {'additionalProperties': False,
8029 'properties': {'code': {'type': 'string'},
8030 'info': {'$ref': '#/definitions/ErrorInfo'},
8031 'message': {'type': 'string'}},
8032 'required': ['message', 'code'],
8033 'type': 'object'},
8034 'ErrorInfo': {'additionalProperties': False,
8035 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8036 'macaroon-path': {'type': 'string'}},
8037 'type': 'object'},
8038 'ErrorResult': {'additionalProperties': False,
8039 'properties': {'error': {'$ref': '#/definitions/Error'}},
8040 'type': 'object'},
8041 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
8042 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
8043 'type': 'object'}},
8044 'type': 'object'}
8045
8046
8047 @ReturnMapping(ErrorResult)
8048 async def UpdateLatestRevisions(self):
8049 '''
8050
8051 Returns -> Error
8052 '''
8053 # map input types to rpc msg
8054 params = dict()
8055 msg = dict(type='CharmRevisionUpdater', request='UpdateLatestRevisions', version=2, params=params)
8056
8057 reply = await self.rpc(msg)
8058 return reply
8059
8060
8061 class CharmsFacade(Type):
8062 name = 'Charms'
8063 version = 2
8064 schema = {'definitions': {'CharmActionSpec': {'additionalProperties': False,
8065 'properties': {'description': {'type': 'string'},
8066 'params': {'patternProperties': {'.*': {'additionalProperties': True,
8067 'type': 'object'}},
8068 'type': 'object'}},
8069 'required': ['description', 'params'],
8070 'type': 'object'},
8071 'CharmActions': {'additionalProperties': False,
8072 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}},
8073 'type': 'object'}},
8074 'type': 'object'},
8075 'CharmInfo': {'additionalProperties': False,
8076 'properties': {'actions': {'$ref': '#/definitions/CharmActions'},
8077 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}},
8078 'type': 'object'},
8079 'meta': {'$ref': '#/definitions/CharmMeta'},
8080 'metrics': {'$ref': '#/definitions/CharmMetrics'},
8081 'revision': {'type': 'integer'},
8082 'url': {'type': 'string'}},
8083 'required': ['revision', 'url', 'config'],
8084 'type': 'object'},
8085 'CharmMeta': {'additionalProperties': False,
8086 'properties': {'categories': {'items': {'type': 'string'},
8087 'type': 'array'},
8088 'description': {'type': 'string'},
8089 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}},
8090 'type': 'object'},
8091 'min-juju-version': {'type': 'string'},
8092 'name': {'type': 'string'},
8093 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}},
8094 'type': 'object'},
8095 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8096 'type': 'object'},
8097 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8098 'type': 'object'},
8099 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8100 'type': 'object'},
8101 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}},
8102 'type': 'object'},
8103 'series': {'items': {'type': 'string'},
8104 'type': 'array'},
8105 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}},
8106 'type': 'object'},
8107 'subordinate': {'type': 'boolean'},
8108 'summary': {'type': 'string'},
8109 'tags': {'items': {'type': 'string'},
8110 'type': 'array'},
8111 'terms': {'items': {'type': 'string'},
8112 'type': 'array'}},
8113 'required': ['name',
8114 'summary',
8115 'description',
8116 'subordinate'],
8117 'type': 'object'},
8118 'CharmMetric': {'additionalProperties': False,
8119 'properties': {'description': {'type': 'string'},
8120 'type': {'type': 'string'}},
8121 'required': ['type', 'description'],
8122 'type': 'object'},
8123 'CharmMetrics': {'additionalProperties': False,
8124 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}},
8125 'type': 'object'},
8126 'plan': {'$ref': '#/definitions/CharmPlan'}},
8127 'required': ['metrics', 'plan'],
8128 'type': 'object'},
8129 'CharmOption': {'additionalProperties': False,
8130 'properties': {'default': {'additionalProperties': True,
8131 'type': 'object'},
8132 'description': {'type': 'string'},
8133 'type': {'type': 'string'}},
8134 'required': ['type'],
8135 'type': 'object'},
8136 'CharmPayloadClass': {'additionalProperties': False,
8137 'properties': {'name': {'type': 'string'},
8138 'type': {'type': 'string'}},
8139 'required': ['name', 'type'],
8140 'type': 'object'},
8141 'CharmPlan': {'additionalProperties': False,
8142 'properties': {'required': {'type': 'boolean'}},
8143 'required': ['required'],
8144 'type': 'object'},
8145 'CharmRelation': {'additionalProperties': False,
8146 'properties': {'interface': {'type': 'string'},
8147 'limit': {'type': 'integer'},
8148 'name': {'type': 'string'},
8149 'optional': {'type': 'boolean'},
8150 'role': {'type': 'string'},
8151 'scope': {'type': 'string'}},
8152 'required': ['name',
8153 'role',
8154 'interface',
8155 'optional',
8156 'limit',
8157 'scope'],
8158 'type': 'object'},
8159 'CharmResourceMeta': {'additionalProperties': False,
8160 'properties': {'description': {'type': 'string'},
8161 'name': {'type': 'string'},
8162 'path': {'type': 'string'},
8163 'type': {'type': 'string'}},
8164 'required': ['name',
8165 'type',
8166 'path',
8167 'description'],
8168 'type': 'object'},
8169 'CharmStorage': {'additionalProperties': False,
8170 'properties': {'count-max': {'type': 'integer'},
8171 'count-min': {'type': 'integer'},
8172 'description': {'type': 'string'},
8173 'location': {'type': 'string'},
8174 'minimum-size': {'type': 'integer'},
8175 'name': {'type': 'string'},
8176 'properties': {'items': {'type': 'string'},
8177 'type': 'array'},
8178 'read-only': {'type': 'boolean'},
8179 'shared': {'type': 'boolean'},
8180 'type': {'type': 'string'}},
8181 'required': ['name',
8182 'description',
8183 'type',
8184 'shared',
8185 'read-only',
8186 'count-min',
8187 'count-max',
8188 'minimum-size'],
8189 'type': 'object'},
8190 'CharmURL': {'additionalProperties': False,
8191 'properties': {'url': {'type': 'string'}},
8192 'required': ['url'],
8193 'type': 'object'},
8194 'CharmsList': {'additionalProperties': False,
8195 'properties': {'names': {'items': {'type': 'string'},
8196 'type': 'array'}},
8197 'required': ['names'],
8198 'type': 'object'},
8199 'CharmsListResult': {'additionalProperties': False,
8200 'properties': {'charm-urls': {'items': {'type': 'string'},
8201 'type': 'array'}},
8202 'required': ['charm-urls'],
8203 'type': 'object'},
8204 'IsMeteredResult': {'additionalProperties': False,
8205 'properties': {'metered': {'type': 'boolean'}},
8206 'required': ['metered'],
8207 'type': 'object'}},
8208 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
8209 'Result': {'$ref': '#/definitions/CharmInfo'}},
8210 'type': 'object'},
8211 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
8212 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
8213 'type': 'object'},
8214 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
8215 'Result': {'$ref': '#/definitions/CharmsListResult'}},
8216 'type': 'object'}},
8217 'type': 'object'}
8218
8219
8220 @ReturnMapping(CharmInfo)
8221 async def CharmInfo(self, url):
8222 '''
8223 url : str
8224 Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>, _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str]
8225 '''
8226 # map input types to rpc msg
8227 params = dict()
8228 msg = dict(type='Charms', request='CharmInfo', version=2, params=params)
8229 params['url'] = url
8230 reply = await self.rpc(msg)
8231 return reply
8232
8233
8234
8235 @ReturnMapping(IsMeteredResult)
8236 async def IsMetered(self, url):
8237 '''
8238 url : str
8239 Returns -> bool
8240 '''
8241 # map input types to rpc msg
8242 params = dict()
8243 msg = dict(type='Charms', request='IsMetered', version=2, params=params)
8244 params['url'] = url
8245 reply = await self.rpc(msg)
8246 return reply
8247
8248
8249
8250 @ReturnMapping(CharmsListResult)
8251 async def List(self, names):
8252 '''
8253 names : typing.Sequence<+T_co>[str]
8254 Returns -> typing.Sequence<+T_co>[str]
8255 '''
8256 # map input types to rpc msg
8257 params = dict()
8258 msg = dict(type='Charms', request='List', version=2, params=params)
8259 params['names'] = names
8260 reply = await self.rpc(msg)
8261 return reply
8262
8263
8264 class CleanerFacade(Type):
8265 name = 'Cleaner'
8266 version = 2
8267 schema = {'definitions': {'Error': {'additionalProperties': False,
8268 'properties': {'code': {'type': 'string'},
8269 'info': {'$ref': '#/definitions/ErrorInfo'},
8270 'message': {'type': 'string'}},
8271 'required': ['message', 'code'],
8272 'type': 'object'},
8273 'ErrorInfo': {'additionalProperties': False,
8274 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8275 'macaroon-path': {'type': 'string'}},
8276 'type': 'object'},
8277 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8278 'NotifyWatchResult': {'additionalProperties': False,
8279 'properties': {'NotifyWatcherId': {'type': 'string'},
8280 'error': {'$ref': '#/definitions/Error'}},
8281 'required': ['NotifyWatcherId'],
8282 'type': 'object'}},
8283 'properties': {'Cleanup': {'type': 'object'},
8284 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
8285 'type': 'object'}},
8286 'type': 'object'}
8287
8288
8289 @ReturnMapping(None)
8290 async def Cleanup(self):
8291 '''
8292
8293 Returns -> None
8294 '''
8295 # map input types to rpc msg
8296 params = dict()
8297 msg = dict(type='Cleaner', request='Cleanup', version=2, params=params)
8298
8299 reply = await self.rpc(msg)
8300 return reply
8301
8302
8303
8304 @ReturnMapping(NotifyWatchResult)
8305 async def WatchCleanups(self):
8306 '''
8307
8308 Returns -> typing.Union[str, _ForwardRef('Error')]
8309 '''
8310 # map input types to rpc msg
8311 params = dict()
8312 msg = dict(type='Cleaner', request='WatchCleanups', version=2, params=params)
8313
8314 reply = await self.rpc(msg)
8315 return reply
8316
8317
8318 class ClientFacade(Type):
8319 name = 'Client'
8320 version = 1
8321 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
8322 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
8323 'type': 'array'},
8324 'type': 'array'}},
8325 'required': ['servers'],
8326 'type': 'object'},
8327 'AddCharm': {'additionalProperties': False,
8328 'properties': {'channel': {'type': 'string'},
8329 'url': {'type': 'string'}},
8330 'required': ['url', 'channel'],
8331 'type': 'object'},
8332 'AddCharmWithAuthorization': {'additionalProperties': False,
8333 'properties': {'channel': {'type': 'string'},
8334 'macaroon': {'$ref': '#/definitions/Macaroon'},
8335 'url': {'type': 'string'}},
8336 'required': ['url',
8337 'channel',
8338 'macaroon'],
8339 'type': 'object'},
8340 'AddMachineParams': {'additionalProperties': False,
8341 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
8342 'type': 'array'},
8343 'constraints': {'$ref': '#/definitions/Value'},
8344 'container-type': {'type': 'string'},
8345 'disks': {'items': {'$ref': '#/definitions/Constraints'},
8346 'type': 'array'},
8347 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
8348 'instance-id': {'type': 'string'},
8349 'jobs': {'items': {'type': 'string'},
8350 'type': 'array'},
8351 'nonce': {'type': 'string'},
8352 'parent-id': {'type': 'string'},
8353 'placement': {'$ref': '#/definitions/Placement'},
8354 'series': {'type': 'string'}},
8355 'required': ['series',
8356 'constraints',
8357 'jobs',
8358 'parent-id',
8359 'container-type',
8360 'instance-id',
8361 'nonce',
8362 'hardware-characteristics',
8363 'addresses'],
8364 'type': 'object'},
8365 'AddMachines': {'additionalProperties': False,
8366 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
8367 'type': 'array'}},
8368 'required': ['params'],
8369 'type': 'object'},
8370 'AddMachinesResult': {'additionalProperties': False,
8371 'properties': {'error': {'$ref': '#/definitions/Error'},
8372 'machine': {'type': 'string'}},
8373 'required': ['machine'],
8374 'type': 'object'},
8375 'AddMachinesResults': {'additionalProperties': False,
8376 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
8377 'type': 'array'}},
8378 'required': ['machines'],
8379 'type': 'object'},
8380 'Address': {'additionalProperties': False,
8381 'properties': {'scope': {'type': 'string'},
8382 'space-name': {'type': 'string'},
8383 'type': {'type': 'string'},
8384 'value': {'type': 'string'}},
8385 'required': ['value', 'type', 'scope'],
8386 'type': 'object'},
8387 'AgentVersionResult': {'additionalProperties': False,
8388 'properties': {'version': {'$ref': '#/definitions/Number'}},
8389 'required': ['version'],
8390 'type': 'object'},
8391 'AllWatcherId': {'additionalProperties': False,
8392 'properties': {'watcher-id': {'type': 'string'}},
8393 'required': ['watcher-id'],
8394 'type': 'object'},
8395 'ApplicationStatus': {'additionalProperties': False,
8396 'properties': {'can-upgrade-to': {'type': 'string'},
8397 'charm': {'type': 'string'},
8398 'err': {'additionalProperties': True,
8399 'type': 'object'},
8400 'exposed': {'type': 'boolean'},
8401 'life': {'type': 'string'},
8402 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
8403 'type': 'object'},
8404 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
8405 'type': 'array'}},
8406 'type': 'object'},
8407 'series': {'type': 'string'},
8408 'status': {'$ref': '#/definitions/DetailedStatus'},
8409 'subordinate-to': {'items': {'type': 'string'},
8410 'type': 'array'},
8411 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8412 'type': 'object'},
8413 'workload-version': {'type': 'string'}},
8414 'required': ['charm',
8415 'series',
8416 'exposed',
8417 'life',
8418 'relations',
8419 'can-upgrade-to',
8420 'subordinate-to',
8421 'units',
8422 'meter-statuses',
8423 'status',
8424 'workload-version'],
8425 'type': 'object'},
8426 'Binary': {'additionalProperties': False,
8427 'properties': {'Arch': {'type': 'string'},
8428 'Number': {'$ref': '#/definitions/Number'},
8429 'Series': {'type': 'string'}},
8430 'required': ['Number', 'Series', 'Arch'],
8431 'type': 'object'},
8432 'BundleChangesChange': {'additionalProperties': False,
8433 'properties': {'args': {'items': {'additionalProperties': True,
8434 'type': 'object'},
8435 'type': 'array'},
8436 'id': {'type': 'string'},
8437 'method': {'type': 'string'},
8438 'requires': {'items': {'type': 'string'},
8439 'type': 'array'}},
8440 'required': ['id',
8441 'method',
8442 'args',
8443 'requires'],
8444 'type': 'object'},
8445 'ConfigValue': {'additionalProperties': False,
8446 'properties': {'source': {'type': 'string'},
8447 'value': {'additionalProperties': True,
8448 'type': 'object'}},
8449 'required': ['value', 'source'],
8450 'type': 'object'},
8451 'Constraints': {'additionalProperties': False,
8452 'properties': {'Count': {'type': 'integer'},
8453 'Pool': {'type': 'string'},
8454 'Size': {'type': 'integer'}},
8455 'required': ['Pool', 'Size', 'Count'],
8456 'type': 'object'},
8457 'DestroyMachines': {'additionalProperties': False,
8458 'properties': {'force': {'type': 'boolean'},
8459 'machine-names': {'items': {'type': 'string'},
8460 'type': 'array'}},
8461 'required': ['machine-names', 'force'],
8462 'type': 'object'},
8463 'DetailedStatus': {'additionalProperties': False,
8464 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8465 'type': 'object'}},
8466 'type': 'object'},
8467 'err': {'additionalProperties': True,
8468 'type': 'object'},
8469 'info': {'type': 'string'},
8470 'kind': {'type': 'string'},
8471 'life': {'type': 'string'},
8472 'since': {'format': 'date-time',
8473 'type': 'string'},
8474 'status': {'type': 'string'},
8475 'version': {'type': 'string'}},
8476 'required': ['status',
8477 'info',
8478 'data',
8479 'since',
8480 'kind',
8481 'version',
8482 'life'],
8483 'type': 'object'},
8484 'EndpointStatus': {'additionalProperties': False,
8485 'properties': {'application': {'type': 'string'},
8486 'name': {'type': 'string'},
8487 'role': {'type': 'string'},
8488 'subordinate': {'type': 'boolean'}},
8489 'required': ['application',
8490 'name',
8491 'role',
8492 'subordinate'],
8493 'type': 'object'},
8494 'Entities': {'additionalProperties': False,
8495 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
8496 'type': 'array'}},
8497 'required': ['entities'],
8498 'type': 'object'},
8499 'Entity': {'additionalProperties': False,
8500 'properties': {'tag': {'type': 'string'}},
8501 'required': ['tag'],
8502 'type': 'object'},
8503 'EntityStatus': {'additionalProperties': False,
8504 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8505 'type': 'object'}},
8506 'type': 'object'},
8507 'info': {'type': 'string'},
8508 'since': {'format': 'date-time',
8509 'type': 'string'},
8510 'status': {'type': 'string'}},
8511 'required': ['status', 'info', 'since'],
8512 'type': 'object'},
8513 'Error': {'additionalProperties': False,
8514 'properties': {'code': {'type': 'string'},
8515 'info': {'$ref': '#/definitions/ErrorInfo'},
8516 'message': {'type': 'string'}},
8517 'required': ['message', 'code'],
8518 'type': 'object'},
8519 'ErrorInfo': {'additionalProperties': False,
8520 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8521 'macaroon-path': {'type': 'string'}},
8522 'type': 'object'},
8523 'ErrorResult': {'additionalProperties': False,
8524 'properties': {'error': {'$ref': '#/definitions/Error'}},
8525 'type': 'object'},
8526 'ErrorResults': {'additionalProperties': False,
8527 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
8528 'type': 'array'}},
8529 'required': ['results'],
8530 'type': 'object'},
8531 'FindToolsParams': {'additionalProperties': False,
8532 'properties': {'arch': {'type': 'string'},
8533 'major': {'type': 'integer'},
8534 'minor': {'type': 'integer'},
8535 'number': {'$ref': '#/definitions/Number'},
8536 'series': {'type': 'string'}},
8537 'required': ['number',
8538 'major',
8539 'minor',
8540 'arch',
8541 'series'],
8542 'type': 'object'},
8543 'FindToolsResult': {'additionalProperties': False,
8544 'properties': {'error': {'$ref': '#/definitions/Error'},
8545 'list': {'items': {'$ref': '#/definitions/Tools'},
8546 'type': 'array'}},
8547 'required': ['list'],
8548 'type': 'object'},
8549 'FullStatus': {'additionalProperties': False,
8550 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
8551 'type': 'object'},
8552 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8553 'type': 'object'},
8554 'model': {'$ref': '#/definitions/ModelStatusInfo'},
8555 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
8556 'type': 'array'}},
8557 'required': ['model',
8558 'machines',
8559 'applications',
8560 'relations'],
8561 'type': 'object'},
8562 'GetBundleChangesParams': {'additionalProperties': False,
8563 'properties': {'yaml': {'type': 'string'}},
8564 'required': ['yaml'],
8565 'type': 'object'},
8566 'GetBundleChangesResults': {'additionalProperties': False,
8567 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'},
8568 'type': 'array'},
8569 'errors': {'items': {'type': 'string'},
8570 'type': 'array'}},
8571 'type': 'object'},
8572 'GetConstraintsResults': {'additionalProperties': False,
8573 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
8574 'required': ['constraints'],
8575 'type': 'object'},
8576 'HardwareCharacteristics': {'additionalProperties': False,
8577 'properties': {'arch': {'type': 'string'},
8578 'availability-zone': {'type': 'string'},
8579 'cpu-cores': {'type': 'integer'},
8580 'cpu-power': {'type': 'integer'},
8581 'mem': {'type': 'integer'},
8582 'root-disk': {'type': 'integer'},
8583 'tags': {'items': {'type': 'string'},
8584 'type': 'array'}},
8585 'type': 'object'},
8586 'History': {'additionalProperties': False,
8587 'properties': {'error': {'$ref': '#/definitions/Error'},
8588 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
8589 'type': 'array'}},
8590 'required': ['statuses'],
8591 'type': 'object'},
8592 'HostPort': {'additionalProperties': False,
8593 'properties': {'Address': {'$ref': '#/definitions/Address'},
8594 'port': {'type': 'integer'}},
8595 'required': ['Address', 'port'],
8596 'type': 'object'},
8597 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8598 'MachineHardware': {'additionalProperties': False,
8599 'properties': {'arch': {'type': 'string'},
8600 'availability-zone': {'type': 'string'},
8601 'cores': {'type': 'integer'},
8602 'cpu-power': {'type': 'integer'},
8603 'mem': {'type': 'integer'},
8604 'root-disk': {'type': 'integer'},
8605 'tags': {'items': {'type': 'string'},
8606 'type': 'array'}},
8607 'type': 'object'},
8608 'MachineStatus': {'additionalProperties': False,
8609 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
8610 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8611 'type': 'object'},
8612 'dns-name': {'type': 'string'},
8613 'hardware': {'type': 'string'},
8614 'has-vote': {'type': 'boolean'},
8615 'id': {'type': 'string'},
8616 'instance-id': {'type': 'string'},
8617 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
8618 'jobs': {'items': {'type': 'string'},
8619 'type': 'array'},
8620 'series': {'type': 'string'},
8621 'wants-vote': {'type': 'boolean'}},
8622 'required': ['agent-status',
8623 'instance-status',
8624 'dns-name',
8625 'instance-id',
8626 'series',
8627 'id',
8628 'containers',
8629 'hardware',
8630 'jobs',
8631 'has-vote',
8632 'wants-vote'],
8633 'type': 'object'},
8634 'MeterStatus': {'additionalProperties': False,
8635 'properties': {'color': {'type': 'string'},
8636 'message': {'type': 'string'}},
8637 'required': ['color', 'message'],
8638 'type': 'object'},
8639 'ModelConfigResults': {'additionalProperties': False,
8640 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
8641 'type': 'object'}},
8642 'required': ['config'],
8643 'type': 'object'},
8644 'ModelDefaultValues': {'additionalProperties': False,
8645 'properties': {'cloud-region': {'type': 'string'},
8646 'cloud-tag': {'type': 'string'},
8647 'config': {'patternProperties': {'.*': {'additionalProperties': True,
8648 'type': 'object'}},
8649 'type': 'object'}},
8650 'required': ['config'],
8651 'type': 'object'},
8652 'ModelDefaults': {'additionalProperties': False,
8653 'properties': {'controller': {'additionalProperties': True,
8654 'type': 'object'},
8655 'default': {'additionalProperties': True,
8656 'type': 'object'},
8657 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
8658 'type': 'array'}},
8659 'type': 'object'},
8660 'ModelDefaultsResult': {'additionalProperties': False,
8661 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
8662 'type': 'object'}},
8663 'required': ['config'],
8664 'type': 'object'},
8665 'ModelInfo': {'additionalProperties': False,
8666 'properties': {'cloud': {'type': 'string'},
8667 'cloud-credential-tag': {'type': 'string'},
8668 'cloud-region': {'type': 'string'},
8669 'controller-uuid': {'type': 'string'},
8670 'default-series': {'type': 'string'},
8671 'life': {'type': 'string'},
8672 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
8673 'type': 'array'},
8674 'name': {'type': 'string'},
8675 'owner-tag': {'type': 'string'},
8676 'provider-type': {'type': 'string'},
8677 'status': {'$ref': '#/definitions/EntityStatus'},
8678 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
8679 'type': 'array'},
8680 'uuid': {'type': 'string'}},
8681 'required': ['name',
8682 'uuid',
8683 'controller-uuid',
8684 'provider-type',
8685 'default-series',
8686 'cloud',
8687 'owner-tag',
8688 'life',
8689 'status',
8690 'users',
8691 'machines'],
8692 'type': 'object'},
8693 'ModelMachineInfo': {'additionalProperties': False,
8694 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
8695 'id': {'type': 'string'}},
8696 'required': ['id'],
8697 'type': 'object'},
8698 'ModelSet': {'additionalProperties': False,
8699 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
8700 'type': 'object'}},
8701 'type': 'object'}},
8702 'required': ['config'],
8703 'type': 'object'},
8704 'ModelStatusInfo': {'additionalProperties': False,
8705 'properties': {'available-version': {'type': 'string'},
8706 'cloud': {'type': 'string'},
8707 'migration': {'type': 'string'},
8708 'name': {'type': 'string'},
8709 'region': {'type': 'string'},
8710 'version': {'type': 'string'}},
8711 'required': ['name',
8712 'cloud',
8713 'version',
8714 'available-version'],
8715 'type': 'object'},
8716 'ModelUnset': {'additionalProperties': False,
8717 'properties': {'keys': {'items': {'type': 'string'},
8718 'type': 'array'}},
8719 'required': ['keys'],
8720 'type': 'object'},
8721 'ModelUnsetKeys': {'additionalProperties': False,
8722 'properties': {'cloud-region': {'type': 'string'},
8723 'cloud-tag': {'type': 'string'},
8724 'keys': {'items': {'type': 'string'},
8725 'type': 'array'}},
8726 'required': ['keys'],
8727 'type': 'object'},
8728 'ModelUserInfo': {'additionalProperties': False,
8729 'properties': {'access': {'type': 'string'},
8730 'display-name': {'type': 'string'},
8731 'last-connection': {'format': 'date-time',
8732 'type': 'string'},
8733 'user': {'type': 'string'}},
8734 'required': ['user',
8735 'display-name',
8736 'last-connection',
8737 'access'],
8738 'type': 'object'},
8739 'ModelUserInfoResult': {'additionalProperties': False,
8740 'properties': {'error': {'$ref': '#/definitions/Error'},
8741 'result': {'$ref': '#/definitions/ModelUserInfo'}},
8742 'type': 'object'},
8743 'ModelUserInfoResults': {'additionalProperties': False,
8744 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
8745 'type': 'array'}},
8746 'required': ['results'],
8747 'type': 'object'},
8748 'Number': {'additionalProperties': False,
8749 'properties': {'Build': {'type': 'integer'},
8750 'Major': {'type': 'integer'},
8751 'Minor': {'type': 'integer'},
8752 'Patch': {'type': 'integer'},
8753 'Tag': {'type': 'string'}},
8754 'required': ['Major',
8755 'Minor',
8756 'Tag',
8757 'Patch',
8758 'Build'],
8759 'type': 'object'},
8760 'Placement': {'additionalProperties': False,
8761 'properties': {'directive': {'type': 'string'},
8762 'scope': {'type': 'string'}},
8763 'required': ['scope', 'directive'],
8764 'type': 'object'},
8765 'PrivateAddress': {'additionalProperties': False,
8766 'properties': {'target': {'type': 'string'}},
8767 'required': ['target'],
8768 'type': 'object'},
8769 'PrivateAddressResults': {'additionalProperties': False,
8770 'properties': {'private-address': {'type': 'string'}},
8771 'required': ['private-address'],
8772 'type': 'object'},
8773 'ProvisioningScriptParams': {'additionalProperties': False,
8774 'properties': {'data-dir': {'type': 'string'},
8775 'disable-package-commands': {'type': 'boolean'},
8776 'machine-id': {'type': 'string'},
8777 'nonce': {'type': 'string'}},
8778 'required': ['machine-id',
8779 'nonce',
8780 'data-dir',
8781 'disable-package-commands'],
8782 'type': 'object'},
8783 'ProvisioningScriptResult': {'additionalProperties': False,
8784 'properties': {'script': {'type': 'string'}},
8785 'required': ['script'],
8786 'type': 'object'},
8787 'PublicAddress': {'additionalProperties': False,
8788 'properties': {'target': {'type': 'string'}},
8789 'required': ['target'],
8790 'type': 'object'},
8791 'PublicAddressResults': {'additionalProperties': False,
8792 'properties': {'public-address': {'type': 'string'}},
8793 'required': ['public-address'],
8794 'type': 'object'},
8795 'RegionDefaults': {'additionalProperties': False,
8796 'properties': {'region-name': {'type': 'string'},
8797 'value': {'additionalProperties': True,
8798 'type': 'object'}},
8799 'required': ['region-name', 'value'],
8800 'type': 'object'},
8801 'RelationStatus': {'additionalProperties': False,
8802 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
8803 'type': 'array'},
8804 'id': {'type': 'integer'},
8805 'interface': {'type': 'string'},
8806 'key': {'type': 'string'},
8807 'scope': {'type': 'string'}},
8808 'required': ['id',
8809 'key',
8810 'interface',
8811 'scope',
8812 'endpoints'],
8813 'type': 'object'},
8814 'ResolveCharmResult': {'additionalProperties': False,
8815 'properties': {'error': {'type': 'string'},
8816 'url': {'type': 'string'}},
8817 'type': 'object'},
8818 'ResolveCharmResults': {'additionalProperties': False,
8819 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
8820 'type': 'array'}},
8821 'required': ['urls'],
8822 'type': 'object'},
8823 'ResolveCharms': {'additionalProperties': False,
8824 'properties': {'references': {'items': {'type': 'string'},
8825 'type': 'array'}},
8826 'required': ['references'],
8827 'type': 'object'},
8828 'Resolved': {'additionalProperties': False,
8829 'properties': {'retry': {'type': 'boolean'},
8830 'unit-name': {'type': 'string'}},
8831 'required': ['unit-name', 'retry'],
8832 'type': 'object'},
8833 'SetConstraints': {'additionalProperties': False,
8834 'properties': {'application': {'type': 'string'},
8835 'constraints': {'$ref': '#/definitions/Value'}},
8836 'required': ['application', 'constraints'],
8837 'type': 'object'},
8838 'SetModelAgentVersion': {'additionalProperties': False,
8839 'properties': {'version': {'$ref': '#/definitions/Number'}},
8840 'required': ['version'],
8841 'type': 'object'},
8842 'SetModelDefaults': {'additionalProperties': False,
8843 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
8844 'type': 'array'}},
8845 'required': ['config'],
8846 'type': 'object'},
8847 'StatusHistoryFilter': {'additionalProperties': False,
8848 'properties': {'date': {'format': 'date-time',
8849 'type': 'string'},
8850 'delta': {'type': 'integer'},
8851 'size': {'type': 'integer'}},
8852 'required': ['size', 'date', 'delta'],
8853 'type': 'object'},
8854 'StatusHistoryRequest': {'additionalProperties': False,
8855 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
8856 'historyKind': {'type': 'string'},
8857 'size': {'type': 'integer'},
8858 'tag': {'type': 'string'}},
8859 'required': ['historyKind',
8860 'size',
8861 'filter',
8862 'tag'],
8863 'type': 'object'},
8864 'StatusHistoryRequests': {'additionalProperties': False,
8865 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
8866 'type': 'array'}},
8867 'required': ['requests'],
8868 'type': 'object'},
8869 'StatusHistoryResult': {'additionalProperties': False,
8870 'properties': {'error': {'$ref': '#/definitions/Error'},
8871 'history': {'$ref': '#/definitions/History'}},
8872 'required': ['history'],
8873 'type': 'object'},
8874 'StatusHistoryResults': {'additionalProperties': False,
8875 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
8876 'type': 'array'}},
8877 'required': ['results'],
8878 'type': 'object'},
8879 'StatusParams': {'additionalProperties': False,
8880 'properties': {'patterns': {'items': {'type': 'string'},
8881 'type': 'array'}},
8882 'required': ['patterns'],
8883 'type': 'object'},
8884 'Tools': {'additionalProperties': False,
8885 'properties': {'sha256': {'type': 'string'},
8886 'size': {'type': 'integer'},
8887 'url': {'type': 'string'},
8888 'version': {'$ref': '#/definitions/Binary'}},
8889 'required': ['version', 'url', 'size'],
8890 'type': 'object'},
8891 'UnitStatus': {'additionalProperties': False,
8892 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
8893 'charm': {'type': 'string'},
8894 'machine': {'type': 'string'},
8895 'opened-ports': {'items': {'type': 'string'},
8896 'type': 'array'},
8897 'public-address': {'type': 'string'},
8898 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8899 'type': 'object'},
8900 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
8901 'workload-version': {'type': 'string'}},
8902 'required': ['agent-status',
8903 'workload-status',
8904 'workload-version',
8905 'machine',
8906 'opened-ports',
8907 'public-address',
8908 'charm',
8909 'subordinates'],
8910 'type': 'object'},
8911 'UnsetModelDefaults': {'additionalProperties': False,
8912 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
8913 'type': 'array'}},
8914 'required': ['keys'],
8915 'type': 'object'},
8916 'Value': {'additionalProperties': False,
8917 'properties': {'arch': {'type': 'string'},
8918 'container': {'type': 'string'},
8919 'cpu-cores': {'type': 'integer'},
8920 'cpu-power': {'type': 'integer'},
8921 'instance-type': {'type': 'string'},
8922 'mem': {'type': 'integer'},
8923 'root-disk': {'type': 'integer'},
8924 'spaces': {'items': {'type': 'string'},
8925 'type': 'array'},
8926 'tags': {'items': {'type': 'string'},
8927 'type': 'array'},
8928 'virt-type': {'type': 'string'}},
8929 'type': 'object'}},
8930 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
8931 'type': 'object'},
8932 'AbortCurrentUpgrade': {'type': 'object'},
8933 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
8934 'type': 'object'},
8935 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
8936 'type': 'object'},
8937 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8938 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8939 'type': 'object'},
8940 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8941 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8942 'type': 'object'},
8943 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
8944 'type': 'object'},
8945 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
8946 'type': 'object'},
8947 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
8948 'Result': {'$ref': '#/definitions/FindToolsResult'}},
8949 'type': 'object'},
8950 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
8951 'Result': {'$ref': '#/definitions/FullStatus'}},
8952 'type': 'object'},
8953 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'},
8954 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}},
8955 'type': 'object'},
8956 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
8957 'type': 'object'},
8958 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8959 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8960 'type': 'object'},
8961 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
8962 'type': 'object'},
8963 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
8964 'type': 'object'},
8965 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
8966 'type': 'object'},
8967 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
8968 'type': 'object'},
8969 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
8970 'type': 'object'},
8971 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
8972 'type': 'object'},
8973 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
8974 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
8975 'type': 'object'},
8976 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
8977 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
8978 'type': 'object'},
8979 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
8980 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
8981 'type': 'object'},
8982 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
8983 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
8984 'type': 'object'},
8985 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
8986 'type': 'object'},
8987 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8988 'Result': {'$ref': '#/definitions/ErrorResults'}},
8989 'type': 'object'},
8990 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
8991 'type': 'object'},
8992 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
8993 'type': 'object'},
8994 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
8995 'Result': {'$ref': '#/definitions/ErrorResults'}},
8996 'type': 'object'},
8997 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
8998 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
8999 'type': 'object'},
9000 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
9001 'Result': {'$ref': '#/definitions/ErrorResults'}},
9002 'type': 'object'},
9003 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
9004 'type': 'object'}},
9005 'type': 'object'}
9006
9007
9008 @ReturnMapping(APIHostPortsResult)
9009 async def APIHostPorts(self):
9010 '''
9011
9012 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
9013 '''
9014 # map input types to rpc msg
9015 params = dict()
9016 msg = dict(type='Client', request='APIHostPorts', version=1, params=params)
9017
9018 reply = await self.rpc(msg)
9019 return reply
9020
9021
9022
9023 @ReturnMapping(None)
9024 async def AbortCurrentUpgrade(self):
9025 '''
9026
9027 Returns -> None
9028 '''
9029 # map input types to rpc msg
9030 params = dict()
9031 msg = dict(type='Client', request='AbortCurrentUpgrade', version=1, params=params)
9032
9033 reply = await self.rpc(msg)
9034 return reply
9035
9036
9037
9038 @ReturnMapping(None)
9039 async def AddCharm(self, channel, url):
9040 '''
9041 channel : str
9042 url : str
9043 Returns -> None
9044 '''
9045 # map input types to rpc msg
9046 params = dict()
9047 msg = dict(type='Client', request='AddCharm', version=1, params=params)
9048 params['channel'] = channel
9049 params['url'] = url
9050 reply = await self.rpc(msg)
9051 return reply
9052
9053
9054
9055 @ReturnMapping(None)
9056 async def AddCharmWithAuthorization(self, channel, macaroon, url):
9057 '''
9058 channel : str
9059 macaroon : Macaroon
9060 url : str
9061 Returns -> None
9062 '''
9063 # map input types to rpc msg
9064 params = dict()
9065 msg = dict(type='Client', request='AddCharmWithAuthorization', version=1, params=params)
9066 params['channel'] = channel
9067 params['macaroon'] = macaroon
9068 params['url'] = url
9069 reply = await self.rpc(msg)
9070 return reply
9071
9072
9073
9074 @ReturnMapping(AddMachinesResults)
9075 async def AddMachines(self, params):
9076 '''
9077 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9078 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9079 '''
9080 # map input types to rpc msg
9081 params = dict()
9082 msg = dict(type='Client', request='AddMachines', version=1, params=params)
9083 params['params'] = params
9084 reply = await self.rpc(msg)
9085 return reply
9086
9087
9088
9089 @ReturnMapping(AddMachinesResults)
9090 async def AddMachinesV2(self, params):
9091 '''
9092 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9093 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9094 '''
9095 # map input types to rpc msg
9096 params = dict()
9097 msg = dict(type='Client', request='AddMachinesV2', version=1, params=params)
9098 params['params'] = params
9099 reply = await self.rpc(msg)
9100 return reply
9101
9102
9103
9104 @ReturnMapping(AgentVersionResult)
9105 async def AgentVersion(self):
9106 '''
9107
9108 Returns -> Number
9109 '''
9110 # map input types to rpc msg
9111 params = dict()
9112 msg = dict(type='Client', request='AgentVersion', version=1, params=params)
9113
9114 reply = await self.rpc(msg)
9115 return reply
9116
9117
9118
9119 @ReturnMapping(None)
9120 async def DestroyMachines(self, force, machine_names):
9121 '''
9122 force : bool
9123 machine_names : typing.Sequence<+T_co>[str]
9124 Returns -> None
9125 '''
9126 # map input types to rpc msg
9127 params = dict()
9128 msg = dict(type='Client', request='DestroyMachines', version=1, params=params)
9129 params['force'] = force
9130 params['machine-names'] = machine_names
9131 reply = await self.rpc(msg)
9132 return reply
9133
9134
9135
9136 @ReturnMapping(FindToolsResult)
9137 async def FindTools(self, arch, major, minor, number, series):
9138 '''
9139 arch : str
9140 major : int
9141 minor : int
9142 number : Number
9143 series : str
9144 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
9145 '''
9146 # map input types to rpc msg
9147 params = dict()
9148 msg = dict(type='Client', request='FindTools', version=1, params=params)
9149 params['arch'] = arch
9150 params['major'] = major
9151 params['minor'] = minor
9152 params['number'] = number
9153 params['series'] = series
9154 reply = await self.rpc(msg)
9155 return reply
9156
9157
9158
9159 @ReturnMapping(FullStatus)
9160 async def FullStatus(self, patterns):
9161 '''
9162 patterns : typing.Sequence<+T_co>[str]
9163 Returns -> typing.Union[typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>, _ForwardRef('ModelStatusInfo'), typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>]
9164 '''
9165 # map input types to rpc msg
9166 params = dict()
9167 msg = dict(type='Client', request='FullStatus', version=1, params=params)
9168 params['patterns'] = patterns
9169 reply = await self.rpc(msg)
9170 return reply
9171
9172
9173
9174 @ReturnMapping(GetBundleChangesResults)
9175 async def GetBundleChanges(self, yaml):
9176 '''
9177 yaml : str
9178 Returns -> typing.Sequence<+T_co>[~BundleChangesChange]<~BundleChangesChange>
9179 '''
9180 # map input types to rpc msg
9181 params = dict()
9182 msg = dict(type='Client', request='GetBundleChanges', version=1, params=params)
9183 params['yaml'] = yaml
9184 reply = await self.rpc(msg)
9185 return reply
9186
9187
9188
9189 @ReturnMapping(GetConstraintsResults)
9190 async def GetModelConstraints(self):
9191 '''
9192
9193 Returns -> Value
9194 '''
9195 # map input types to rpc msg
9196 params = dict()
9197 msg = dict(type='Client', request='GetModelConstraints', version=1, params=params)
9198
9199 reply = await self.rpc(msg)
9200 return reply
9201
9202
9203
9204 @ReturnMapping(AddMachinesResults)
9205 async def InjectMachines(self, params):
9206 '''
9207 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9208 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9209 '''
9210 # map input types to rpc msg
9211 params = dict()
9212 msg = dict(type='Client', request='InjectMachines', version=1, params=params)
9213 params['params'] = params
9214 reply = await self.rpc(msg)
9215 return reply
9216
9217
9218
9219 @ReturnMapping(ModelDefaultsResult)
9220 async def ModelDefaults(self):
9221 '''
9222
9223 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
9224 '''
9225 # map input types to rpc msg
9226 params = dict()
9227 msg = dict(type='Client', request='ModelDefaults', version=1, params=params)
9228
9229 reply = await self.rpc(msg)
9230 return reply
9231
9232
9233
9234 @ReturnMapping(ModelConfigResults)
9235 async def ModelGet(self):
9236 '''
9237
9238 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
9239 '''
9240 # map input types to rpc msg
9241 params = dict()
9242 msg = dict(type='Client', request='ModelGet', version=1, params=params)
9243
9244 reply = await self.rpc(msg)
9245 return reply
9246
9247
9248
9249 @ReturnMapping(ModelInfo)
9250 async def ModelInfo(self):
9251 '''
9252
9253 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
9254 '''
9255 # map input types to rpc msg
9256 params = dict()
9257 msg = dict(type='Client', request='ModelInfo', version=1, params=params)
9258
9259 reply = await self.rpc(msg)
9260 return reply
9261
9262
9263
9264 @ReturnMapping(None)
9265 async def ModelSet(self, config):
9266 '''
9267 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
9268 Returns -> None
9269 '''
9270 # map input types to rpc msg
9271 params = dict()
9272 msg = dict(type='Client', request='ModelSet', version=1, params=params)
9273 params['config'] = config
9274 reply = await self.rpc(msg)
9275 return reply
9276
9277
9278
9279 @ReturnMapping(None)
9280 async def ModelUnset(self, keys):
9281 '''
9282 keys : typing.Sequence<+T_co>[str]
9283 Returns -> None
9284 '''
9285 # map input types to rpc msg
9286 params = dict()
9287 msg = dict(type='Client', request='ModelUnset', version=1, params=params)
9288 params['keys'] = keys
9289 reply = await self.rpc(msg)
9290 return reply
9291
9292
9293
9294 @ReturnMapping(ModelUserInfoResults)
9295 async def ModelUserInfo(self):
9296 '''
9297
9298 Returns -> typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
9299 '''
9300 # map input types to rpc msg
9301 params = dict()
9302 msg = dict(type='Client', request='ModelUserInfo', version=1, params=params)
9303
9304 reply = await self.rpc(msg)
9305 return reply
9306
9307
9308
9309 @ReturnMapping(PrivateAddressResults)
9310 async def PrivateAddress(self, target):
9311 '''
9312 target : str
9313 Returns -> str
9314 '''
9315 # map input types to rpc msg
9316 params = dict()
9317 msg = dict(type='Client', request='PrivateAddress', version=1, params=params)
9318 params['target'] = target
9319 reply = await self.rpc(msg)
9320 return reply
9321
9322
9323
9324 @ReturnMapping(ProvisioningScriptResult)
9325 async def ProvisioningScript(self, data_dir, disable_package_commands, machine_id, nonce):
9326 '''
9327 data_dir : str
9328 disable_package_commands : bool
9329 machine_id : str
9330 nonce : str
9331 Returns -> str
9332 '''
9333 # map input types to rpc msg
9334 params = dict()
9335 msg = dict(type='Client', request='ProvisioningScript', version=1, params=params)
9336 params['data-dir'] = data_dir
9337 params['disable-package-commands'] = disable_package_commands
9338 params['machine-id'] = machine_id
9339 params['nonce'] = nonce
9340 reply = await self.rpc(msg)
9341 return reply
9342
9343
9344
9345 @ReturnMapping(PublicAddressResults)
9346 async def PublicAddress(self, target):
9347 '''
9348 target : str
9349 Returns -> str
9350 '''
9351 # map input types to rpc msg
9352 params = dict()
9353 msg = dict(type='Client', request='PublicAddress', version=1, params=params)
9354 params['target'] = target
9355 reply = await self.rpc(msg)
9356 return reply
9357
9358
9359
9360 @ReturnMapping(ResolveCharmResults)
9361 async def ResolveCharms(self, references):
9362 '''
9363 references : typing.Sequence<+T_co>[str]
9364 Returns -> typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
9365 '''
9366 # map input types to rpc msg
9367 params = dict()
9368 msg = dict(type='Client', request='ResolveCharms', version=1, params=params)
9369 params['references'] = references
9370 reply = await self.rpc(msg)
9371 return reply
9372
9373
9374
9375 @ReturnMapping(None)
9376 async def Resolved(self, retry, unit_name):
9377 '''
9378 retry : bool
9379 unit_name : str
9380 Returns -> None
9381 '''
9382 # map input types to rpc msg
9383 params = dict()
9384 msg = dict(type='Client', request='Resolved', version=1, params=params)
9385 params['retry'] = retry
9386 params['unit-name'] = unit_name
9387 reply = await self.rpc(msg)
9388 return reply
9389
9390
9391
9392 @ReturnMapping(ErrorResults)
9393 async def RetryProvisioning(self, entities):
9394 '''
9395 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9396 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9397 '''
9398 # map input types to rpc msg
9399 params = dict()
9400 msg = dict(type='Client', request='RetryProvisioning', version=1, params=params)
9401 params['entities'] = entities
9402 reply = await self.rpc(msg)
9403 return reply
9404
9405
9406
9407 @ReturnMapping(None)
9408 async def SetModelAgentVersion(self, version):
9409 '''
9410 version : Number
9411 Returns -> None
9412 '''
9413 # map input types to rpc msg
9414 params = dict()
9415 msg = dict(type='Client', request='SetModelAgentVersion', version=1, params=params)
9416 params['version'] = version
9417 reply = await self.rpc(msg)
9418 return reply
9419
9420
9421
9422 @ReturnMapping(None)
9423 async def SetModelConstraints(self, application, constraints):
9424 '''
9425 application : str
9426 constraints : Value
9427 Returns -> None
9428 '''
9429 # map input types to rpc msg
9430 params = dict()
9431 msg = dict(type='Client', request='SetModelConstraints', version=1, params=params)
9432 params['application'] = application
9433 params['constraints'] = constraints
9434 reply = await self.rpc(msg)
9435 return reply
9436
9437
9438
9439 @ReturnMapping(ErrorResults)
9440 async def SetModelDefaults(self, config):
9441 '''
9442 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
9443 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9444 '''
9445 # map input types to rpc msg
9446 params = dict()
9447 msg = dict(type='Client', request='SetModelDefaults', version=1, params=params)
9448 params['config'] = config
9449 reply = await self.rpc(msg)
9450 return reply
9451
9452
9453
9454 @ReturnMapping(StatusHistoryResults)
9455 async def StatusHistory(self, requests):
9456 '''
9457 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
9458 Returns -> typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
9459 '''
9460 # map input types to rpc msg
9461 params = dict()
9462 msg = dict(type='Client', request='StatusHistory', version=1, params=params)
9463 params['requests'] = requests
9464 reply = await self.rpc(msg)
9465 return reply
9466
9467
9468
9469 @ReturnMapping(ErrorResults)
9470 async def UnsetModelDefaults(self, keys):
9471 '''
9472 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
9473 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9474 '''
9475 # map input types to rpc msg
9476 params = dict()
9477 msg = dict(type='Client', request='UnsetModelDefaults', version=1, params=params)
9478 params['keys'] = keys
9479 reply = await self.rpc(msg)
9480 return reply
9481
9482
9483
9484 @ReturnMapping(AllWatcherId)
9485 async def WatchAll(self):
9486 '''
9487
9488 Returns -> str
9489 '''
9490 # map input types to rpc msg
9491 params = dict()
9492 msg = dict(type='Client', request='WatchAll', version=1, params=params)
9493
9494 reply = await self.rpc(msg)
9495 return reply
9496
9497
9498 class CloudFacade(Type):
9499 name = 'Cloud'
9500 version = 1
9501 schema = {'definitions': {'Cloud': {'additionalProperties': False,
9502 'properties': {'auth-types': {'items': {'type': 'string'},
9503 'type': 'array'},
9504 'endpoint': {'type': 'string'},
9505 'identity-endpoint': {'type': 'string'},
9506 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
9507 'type': 'array'},
9508 'storage-endpoint': {'type': 'string'},
9509 'type': {'type': 'string'}},
9510 'required': ['type'],
9511 'type': 'object'},
9512 'CloudCredential': {'additionalProperties': False,
9513 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
9514 'type': 'object'},
9515 'auth-type': {'type': 'string'},
9516 'redacted': {'items': {'type': 'string'},
9517 'type': 'array'}},
9518 'required': ['auth-type'],
9519 'type': 'object'},
9520 'CloudCredentialResult': {'additionalProperties': False,
9521 'properties': {'error': {'$ref': '#/definitions/Error'},
9522 'result': {'$ref': '#/definitions/CloudCredential'}},
9523 'type': 'object'},
9524 'CloudCredentialResults': {'additionalProperties': False,
9525 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
9526 'type': 'array'}},
9527 'type': 'object'},
9528 'CloudRegion': {'additionalProperties': False,
9529 'properties': {'endpoint': {'type': 'string'},
9530 'identity-endpoint': {'type': 'string'},
9531 'name': {'type': 'string'},
9532 'storage-endpoint': {'type': 'string'}},
9533 'required': ['name'],
9534 'type': 'object'},
9535 'CloudResult': {'additionalProperties': False,
9536 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
9537 'error': {'$ref': '#/definitions/Error'}},
9538 'type': 'object'},
9539 'CloudResults': {'additionalProperties': False,
9540 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
9541 'type': 'array'}},
9542 'type': 'object'},
9543 'CloudsResult': {'additionalProperties': False,
9544 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
9545 'type': 'object'}},
9546 'type': 'object'},
9547 'Entities': {'additionalProperties': False,
9548 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9549 'type': 'array'}},
9550 'required': ['entities'],
9551 'type': 'object'},
9552 'Entity': {'additionalProperties': False,
9553 'properties': {'tag': {'type': 'string'}},
9554 'required': ['tag'],
9555 'type': 'object'},
9556 'Error': {'additionalProperties': False,
9557 'properties': {'code': {'type': 'string'},
9558 'info': {'$ref': '#/definitions/ErrorInfo'},
9559 'message': {'type': 'string'}},
9560 'required': ['message', 'code'],
9561 'type': 'object'},
9562 'ErrorInfo': {'additionalProperties': False,
9563 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9564 'macaroon-path': {'type': 'string'}},
9565 'type': 'object'},
9566 'ErrorResult': {'additionalProperties': False,
9567 'properties': {'error': {'$ref': '#/definitions/Error'}},
9568 'type': 'object'},
9569 'ErrorResults': {'additionalProperties': False,
9570 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9571 'type': 'array'}},
9572 'required': ['results'],
9573 'type': 'object'},
9574 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9575 'StringResult': {'additionalProperties': False,
9576 'properties': {'error': {'$ref': '#/definitions/Error'},
9577 'result': {'type': 'string'}},
9578 'required': ['result'],
9579 'type': 'object'},
9580 'StringsResult': {'additionalProperties': False,
9581 'properties': {'error': {'$ref': '#/definitions/Error'},
9582 'result': {'items': {'type': 'string'},
9583 'type': 'array'}},
9584 'type': 'object'},
9585 'StringsResults': {'additionalProperties': False,
9586 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
9587 'type': 'array'}},
9588 'required': ['results'],
9589 'type': 'object'},
9590 'UpdateCloudCredential': {'additionalProperties': False,
9591 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
9592 'tag': {'type': 'string'}},
9593 'required': ['tag', 'credential'],
9594 'type': 'object'},
9595 'UpdateCloudCredentials': {'additionalProperties': False,
9596 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'},
9597 'type': 'array'}},
9598 'type': 'object'},
9599 'UserCloud': {'additionalProperties': False,
9600 'properties': {'cloud-tag': {'type': 'string'},
9601 'user-tag': {'type': 'string'}},
9602 'required': ['user-tag', 'cloud-tag'],
9603 'type': 'object'},
9604 'UserClouds': {'additionalProperties': False,
9605 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
9606 'type': 'array'}},
9607 'type': 'object'}},
9608 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9609 'Result': {'$ref': '#/definitions/CloudResults'}},
9610 'type': 'object'},
9611 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
9612 'type': 'object'},
9613 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9614 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
9615 'type': 'object'},
9616 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
9617 'type': 'object'},
9618 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9619 'Result': {'$ref': '#/definitions/ErrorResults'}},
9620 'type': 'object'},
9621 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'},
9622 'Result': {'$ref': '#/definitions/ErrorResults'}},
9623 'type': 'object'},
9624 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
9625 'Result': {'$ref': '#/definitions/StringsResults'}},
9626 'type': 'object'}},
9627 'type': 'object'}
9628
9629
9630 @ReturnMapping(CloudResults)
9631 async def Cloud(self, entities):
9632 '''
9633 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9634 Returns -> typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
9635 '''
9636 # map input types to rpc msg
9637 params = dict()
9638 msg = dict(type='Cloud', request='Cloud', version=1, params=params)
9639 params['entities'] = entities
9640 reply = await self.rpc(msg)
9641 return reply
9642
9643
9644
9645 @ReturnMapping(CloudsResult)
9646 async def Clouds(self):
9647 '''
9648
9649 Returns -> typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
9650 '''
9651 # map input types to rpc msg
9652 params = dict()
9653 msg = dict(type='Cloud', request='Clouds', version=1, params=params)
9654
9655 reply = await self.rpc(msg)
9656 return reply
9657
9658
9659
9660 @ReturnMapping(CloudCredentialResults)
9661 async def Credential(self, entities):
9662 '''
9663 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9664 Returns -> typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
9665 '''
9666 # map input types to rpc msg
9667 params = dict()
9668 msg = dict(type='Cloud', request='Credential', version=1, params=params)
9669 params['entities'] = entities
9670 reply = await self.rpc(msg)
9671 return reply
9672
9673
9674
9675 @ReturnMapping(StringResult)
9676 async def DefaultCloud(self):
9677 '''
9678
9679 Returns -> typing.Union[_ForwardRef('Error'), str]
9680 '''
9681 # map input types to rpc msg
9682 params = dict()
9683 msg = dict(type='Cloud', request='DefaultCloud', version=1, params=params)
9684
9685 reply = await self.rpc(msg)
9686 return reply
9687
9688
9689
9690 @ReturnMapping(ErrorResults)
9691 async def RevokeCredentials(self, entities):
9692 '''
9693 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9694 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9695 '''
9696 # map input types to rpc msg
9697 params = dict()
9698 msg = dict(type='Cloud', request='RevokeCredentials', version=1, params=params)
9699 params['entities'] = entities
9700 reply = await self.rpc(msg)
9701 return reply
9702
9703
9704
9705 @ReturnMapping(ErrorResults)
9706 async def UpdateCredentials(self, credentials):
9707 '''
9708 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
9709 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9710 '''
9711 # map input types to rpc msg
9712 params = dict()
9713 msg = dict(type='Cloud', request='UpdateCredentials', version=1, params=params)
9714 params['credentials'] = credentials
9715 reply = await self.rpc(msg)
9716 return reply
9717
9718
9719
9720 @ReturnMapping(StringsResults)
9721 async def UserCredentials(self, user_clouds):
9722 '''
9723 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
9724 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
9725 '''
9726 # map input types to rpc msg
9727 params = dict()
9728 msg = dict(type='Cloud', request='UserCredentials', version=1, params=params)
9729 params['user-clouds'] = user_clouds
9730 reply = await self.rpc(msg)
9731 return reply
9732
9733
9734 class ControllerFacade(Type):
9735 name = 'Controller'
9736 version = 3
9737 schema = {'definitions': {'AllWatcherId': {'additionalProperties': False,
9738 'properties': {'watcher-id': {'type': 'string'}},
9739 'required': ['watcher-id'],
9740 'type': 'object'},
9741 'CloudCredential': {'additionalProperties': False,
9742 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
9743 'type': 'object'},
9744 'auth-type': {'type': 'string'},
9745 'redacted': {'items': {'type': 'string'},
9746 'type': 'array'}},
9747 'required': ['auth-type'],
9748 'type': 'object'},
9749 'CloudSpec': {'additionalProperties': False,
9750 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
9751 'endpoint': {'type': 'string'},
9752 'identity-endpoint': {'type': 'string'},
9753 'name': {'type': 'string'},
9754 'region': {'type': 'string'},
9755 'storage-endpoint': {'type': 'string'},
9756 'type': {'type': 'string'}},
9757 'required': ['type', 'name'],
9758 'type': 'object'},
9759 'CloudSpecResult': {'additionalProperties': False,
9760 'properties': {'error': {'$ref': '#/definitions/Error'},
9761 'result': {'$ref': '#/definitions/CloudSpec'}},
9762 'type': 'object'},
9763 'CloudSpecResults': {'additionalProperties': False,
9764 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
9765 'type': 'array'}},
9766 'type': 'object'},
9767 'ConfigValue': {'additionalProperties': False,
9768 'properties': {'source': {'type': 'string'},
9769 'value': {'additionalProperties': True,
9770 'type': 'object'}},
9771 'required': ['value', 'source'],
9772 'type': 'object'},
9773 'ControllerConfigResult': {'additionalProperties': False,
9774 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
9775 'type': 'object'}},
9776 'type': 'object'}},
9777 'required': ['config'],
9778 'type': 'object'},
9779 'DestroyControllerArgs': {'additionalProperties': False,
9780 'properties': {'destroy-models': {'type': 'boolean'}},
9781 'required': ['destroy-models'],
9782 'type': 'object'},
9783 'Entities': {'additionalProperties': False,
9784 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9785 'type': 'array'}},
9786 'required': ['entities'],
9787 'type': 'object'},
9788 'Entity': {'additionalProperties': False,
9789 'properties': {'tag': {'type': 'string'}},
9790 'required': ['tag'],
9791 'type': 'object'},
9792 'Error': {'additionalProperties': False,
9793 'properties': {'code': {'type': 'string'},
9794 'info': {'$ref': '#/definitions/ErrorInfo'},
9795 'message': {'type': 'string'}},
9796 'required': ['message', 'code'],
9797 'type': 'object'},
9798 'ErrorInfo': {'additionalProperties': False,
9799 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9800 'macaroon-path': {'type': 'string'}},
9801 'type': 'object'},
9802 'ErrorResult': {'additionalProperties': False,
9803 'properties': {'error': {'$ref': '#/definitions/Error'}},
9804 'type': 'object'},
9805 'ErrorResults': {'additionalProperties': False,
9806 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9807 'type': 'array'}},
9808 'required': ['results'],
9809 'type': 'object'},
9810 'InitiateMigrationArgs': {'additionalProperties': False,
9811 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
9812 'type': 'array'}},
9813 'required': ['specs'],
9814 'type': 'object'},
9815 'InitiateMigrationResult': {'additionalProperties': False,
9816 'properties': {'error': {'$ref': '#/definitions/Error'},
9817 'migration-id': {'type': 'string'},
9818 'model-tag': {'type': 'string'}},
9819 'required': ['model-tag',
9820 'migration-id'],
9821 'type': 'object'},
9822 'InitiateMigrationResults': {'additionalProperties': False,
9823 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
9824 'type': 'array'}},
9825 'required': ['results'],
9826 'type': 'object'},
9827 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9828 'MachineHardware': {'additionalProperties': False,
9829 'properties': {'arch': {'type': 'string'},
9830 'availability-zone': {'type': 'string'},
9831 'cores': {'type': 'integer'},
9832 'cpu-power': {'type': 'integer'},
9833 'mem': {'type': 'integer'},
9834 'root-disk': {'type': 'integer'},
9835 'tags': {'items': {'type': 'string'},
9836 'type': 'array'}},
9837 'type': 'object'},
9838 'MigrationSpec': {'additionalProperties': False,
9839 'properties': {'external-control': {'type': 'boolean'},
9840 'model-tag': {'type': 'string'},
9841 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
9842 'required': ['model-tag',
9843 'target-info',
9844 'external-control'],
9845 'type': 'object'},
9846 'MigrationTargetInfo': {'additionalProperties': False,
9847 'properties': {'addrs': {'items': {'type': 'string'},
9848 'type': 'array'},
9849 'auth-tag': {'type': 'string'},
9850 'ca-cert': {'type': 'string'},
9851 'controller-tag': {'type': 'string'},
9852 'macaroons': {'type': 'string'},
9853 'password': {'type': 'string'}},
9854 'required': ['controller-tag',
9855 'addrs',
9856 'ca-cert',
9857 'auth-tag'],
9858 'type': 'object'},
9859 'Model': {'additionalProperties': False,
9860 'properties': {'name': {'type': 'string'},
9861 'owner-tag': {'type': 'string'},
9862 'uuid': {'type': 'string'}},
9863 'required': ['name', 'uuid', 'owner-tag'],
9864 'type': 'object'},
9865 'ModelBlockInfo': {'additionalProperties': False,
9866 'properties': {'blocks': {'items': {'type': 'string'},
9867 'type': 'array'},
9868 'model-uuid': {'type': 'string'},
9869 'name': {'type': 'string'},
9870 'owner-tag': {'type': 'string'}},
9871 'required': ['name',
9872 'model-uuid',
9873 'owner-tag',
9874 'blocks'],
9875 'type': 'object'},
9876 'ModelBlockInfoList': {'additionalProperties': False,
9877 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
9878 'type': 'array'}},
9879 'type': 'object'},
9880 'ModelConfigResults': {'additionalProperties': False,
9881 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
9882 'type': 'object'}},
9883 'required': ['config'],
9884 'type': 'object'},
9885 'ModelMachineInfo': {'additionalProperties': False,
9886 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
9887 'id': {'type': 'string'}},
9888 'required': ['id'],
9889 'type': 'object'},
9890 'ModelStatus': {'additionalProperties': False,
9891 'properties': {'application-count': {'type': 'integer'},
9892 'hosted-machine-count': {'type': 'integer'},
9893 'life': {'type': 'string'},
9894 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
9895 'type': 'array'},
9896 'model-tag': {'type': 'string'},
9897 'owner-tag': {'type': 'string'}},
9898 'required': ['model-tag',
9899 'life',
9900 'hosted-machine-count',
9901 'application-count',
9902 'owner-tag'],
9903 'type': 'object'},
9904 'ModelStatusResults': {'additionalProperties': False,
9905 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
9906 'type': 'array'}},
9907 'required': ['models'],
9908 'type': 'object'},
9909 'ModifyControllerAccess': {'additionalProperties': False,
9910 'properties': {'access': {'type': 'string'},
9911 'action': {'type': 'string'},
9912 'user-tag': {'type': 'string'}},
9913 'required': ['user-tag',
9914 'action',
9915 'access'],
9916 'type': 'object'},
9917 'ModifyControllerAccessRequest': {'additionalProperties': False,
9918 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
9919 'type': 'array'}},
9920 'required': ['changes'],
9921 'type': 'object'},
9922 'RemoveBlocksArgs': {'additionalProperties': False,
9923 'properties': {'all': {'type': 'boolean'}},
9924 'required': ['all'],
9925 'type': 'object'},
9926 'UserAccess': {'additionalProperties': False,
9927 'properties': {'access': {'type': 'string'},
9928 'user-tag': {'type': 'string'}},
9929 'required': ['user-tag', 'access'],
9930 'type': 'object'},
9931 'UserAccessResult': {'additionalProperties': False,
9932 'properties': {'error': {'$ref': '#/definitions/Error'},
9933 'result': {'$ref': '#/definitions/UserAccess'}},
9934 'type': 'object'},
9935 'UserAccessResults': {'additionalProperties': False,
9936 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
9937 'type': 'array'}},
9938 'type': 'object'},
9939 'UserModel': {'additionalProperties': False,
9940 'properties': {'last-connection': {'format': 'date-time',
9941 'type': 'string'},
9942 'model': {'$ref': '#/definitions/Model'}},
9943 'required': ['model', 'last-connection'],
9944 'type': 'object'},
9945 'UserModelList': {'additionalProperties': False,
9946 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
9947 'type': 'array'}},
9948 'required': ['user-models'],
9949 'type': 'object'}},
9950 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
9951 'type': 'object'},
9952 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9953 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
9954 'type': 'object'},
9955 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
9956 'type': 'object'},
9957 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
9958 'type': 'object'},
9959 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9960 'Result': {'$ref': '#/definitions/UserAccessResults'}},
9961 'type': 'object'},
9962 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
9963 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
9964 'type': 'object'},
9965 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
9966 'type': 'object'},
9967 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
9968 'type': 'object'},
9969 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9970 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
9971 'type': 'object'},
9972 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
9973 'Result': {'$ref': '#/definitions/ErrorResults'}},
9974 'type': 'object'},
9975 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
9976 'type': 'object'},
9977 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
9978 'type': 'object'}},
9979 'type': 'object'}
9980
9981
9982 @ReturnMapping(UserModelList)
9983 async def AllModels(self):
9984 '''
9985
9986 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
9987 '''
9988 # map input types to rpc msg
9989 params = dict()
9990 msg = dict(type='Controller', request='AllModels', version=3, params=params)
9991
9992 reply = await self.rpc(msg)
9993 return reply
9994
9995
9996
9997 @ReturnMapping(CloudSpecResults)
9998 async def CloudSpec(self, entities):
9999 '''
10000 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10001 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
10002 '''
10003 # map input types to rpc msg
10004 params = dict()
10005 msg = dict(type='Controller', request='CloudSpec', version=3, params=params)
10006 params['entities'] = entities
10007 reply = await self.rpc(msg)
10008 return reply
10009
10010
10011
10012 @ReturnMapping(ControllerConfigResult)
10013 async def ControllerConfig(self):
10014 '''
10015
10016 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
10017 '''
10018 # map input types to rpc msg
10019 params = dict()
10020 msg = dict(type='Controller', request='ControllerConfig', version=3, params=params)
10021
10022 reply = await self.rpc(msg)
10023 return reply
10024
10025
10026
10027 @ReturnMapping(None)
10028 async def DestroyController(self, destroy_models):
10029 '''
10030 destroy_models : bool
10031 Returns -> None
10032 '''
10033 # map input types to rpc msg
10034 params = dict()
10035 msg = dict(type='Controller', request='DestroyController', version=3, params=params)
10036 params['destroy-models'] = destroy_models
10037 reply = await self.rpc(msg)
10038 return reply
10039
10040
10041
10042 @ReturnMapping(UserAccessResults)
10043 async def GetControllerAccess(self, entities):
10044 '''
10045 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10046 Returns -> typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
10047 '''
10048 # map input types to rpc msg
10049 params = dict()
10050 msg = dict(type='Controller', request='GetControllerAccess', version=3, params=params)
10051 params['entities'] = entities
10052 reply = await self.rpc(msg)
10053 return reply
10054
10055
10056
10057 @ReturnMapping(InitiateMigrationResults)
10058 async def InitiateMigration(self, specs):
10059 '''
10060 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
10061 Returns -> typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
10062 '''
10063 # map input types to rpc msg
10064 params = dict()
10065 msg = dict(type='Controller', request='InitiateMigration', version=3, params=params)
10066 params['specs'] = specs
10067 reply = await self.rpc(msg)
10068 return reply
10069
10070
10071
10072 @ReturnMapping(ModelBlockInfoList)
10073 async def ListBlockedModels(self):
10074 '''
10075
10076 Returns -> typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
10077 '''
10078 # map input types to rpc msg
10079 params = dict()
10080 msg = dict(type='Controller', request='ListBlockedModels', version=3, params=params)
10081
10082 reply = await self.rpc(msg)
10083 return reply
10084
10085
10086
10087 @ReturnMapping(ModelConfigResults)
10088 async def ModelConfig(self):
10089 '''
10090
10091 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
10092 '''
10093 # map input types to rpc msg
10094 params = dict()
10095 msg = dict(type='Controller', request='ModelConfig', version=3, params=params)
10096
10097 reply = await self.rpc(msg)
10098 return reply
10099
10100
10101
10102 @ReturnMapping(ModelStatusResults)
10103 async def ModelStatus(self, entities):
10104 '''
10105 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10106 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
10107 '''
10108 # map input types to rpc msg
10109 params = dict()
10110 msg = dict(type='Controller', request='ModelStatus', version=3, params=params)
10111 params['entities'] = entities
10112 reply = await self.rpc(msg)
10113 return reply
10114
10115
10116
10117 @ReturnMapping(ErrorResults)
10118 async def ModifyControllerAccess(self, changes):
10119 '''
10120 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
10121 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10122 '''
10123 # map input types to rpc msg
10124 params = dict()
10125 msg = dict(type='Controller', request='ModifyControllerAccess', version=3, params=params)
10126 params['changes'] = changes
10127 reply = await self.rpc(msg)
10128 return reply
10129
10130
10131
10132 @ReturnMapping(None)
10133 async def RemoveBlocks(self, all_):
10134 '''
10135 all_ : bool
10136 Returns -> None
10137 '''
10138 # map input types to rpc msg
10139 params = dict()
10140 msg = dict(type='Controller', request='RemoveBlocks', version=3, params=params)
10141 params['all'] = all_
10142 reply = await self.rpc(msg)
10143 return reply
10144
10145
10146
10147 @ReturnMapping(AllWatcherId)
10148 async def WatchAllModels(self):
10149 '''
10150
10151 Returns -> str
10152 '''
10153 # map input types to rpc msg
10154 params = dict()
10155 msg = dict(type='Controller', request='WatchAllModels', version=3, params=params)
10156
10157 reply = await self.rpc(msg)
10158 return reply
10159
10160
10161 class DeployerFacade(Type):
10162 name = 'Deployer'
10163 version = 1
10164 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
10165 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
10166 'type': 'array'},
10167 'type': 'array'}},
10168 'required': ['servers'],
10169 'type': 'object'},
10170 'Address': {'additionalProperties': False,
10171 'properties': {'scope': {'type': 'string'},
10172 'space-name': {'type': 'string'},
10173 'type': {'type': 'string'},
10174 'value': {'type': 'string'}},
10175 'required': ['value', 'type', 'scope'],
10176 'type': 'object'},
10177 'BytesResult': {'additionalProperties': False,
10178 'properties': {'result': {'items': {'type': 'integer'},
10179 'type': 'array'}},
10180 'required': ['result'],
10181 'type': 'object'},
10182 'DeployerConnectionValues': {'additionalProperties': False,
10183 'properties': {'api-addresses': {'items': {'type': 'string'},
10184 'type': 'array'},
10185 'state-addresses': {'items': {'type': 'string'},
10186 'type': 'array'}},
10187 'required': ['state-addresses',
10188 'api-addresses'],
10189 'type': 'object'},
10190 'Entities': {'additionalProperties': False,
10191 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10192 'type': 'array'}},
10193 'required': ['entities'],
10194 'type': 'object'},
10195 'Entity': {'additionalProperties': False,
10196 'properties': {'tag': {'type': 'string'}},
10197 'required': ['tag'],
10198 'type': 'object'},
10199 'EntityPassword': {'additionalProperties': False,
10200 'properties': {'password': {'type': 'string'},
10201 'tag': {'type': 'string'}},
10202 'required': ['tag', 'password'],
10203 'type': 'object'},
10204 'EntityPasswords': {'additionalProperties': False,
10205 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
10206 'type': 'array'}},
10207 'required': ['changes'],
10208 'type': 'object'},
10209 'Error': {'additionalProperties': False,
10210 'properties': {'code': {'type': 'string'},
10211 'info': {'$ref': '#/definitions/ErrorInfo'},
10212 'message': {'type': 'string'}},
10213 'required': ['message', 'code'],
10214 'type': 'object'},
10215 'ErrorInfo': {'additionalProperties': False,
10216 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10217 'macaroon-path': {'type': 'string'}},
10218 'type': 'object'},
10219 'ErrorResult': {'additionalProperties': False,
10220 'properties': {'error': {'$ref': '#/definitions/Error'}},
10221 'type': 'object'},
10222 'ErrorResults': {'additionalProperties': False,
10223 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10224 'type': 'array'}},
10225 'required': ['results'],
10226 'type': 'object'},
10227 'HostPort': {'additionalProperties': False,
10228 'properties': {'Address': {'$ref': '#/definitions/Address'},
10229 'port': {'type': 'integer'}},
10230 'required': ['Address', 'port'],
10231 'type': 'object'},
10232 'LifeResult': {'additionalProperties': False,
10233 'properties': {'error': {'$ref': '#/definitions/Error'},
10234 'life': {'type': 'string'}},
10235 'required': ['life'],
10236 'type': 'object'},
10237 'LifeResults': {'additionalProperties': False,
10238 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
10239 'type': 'array'}},
10240 'required': ['results'],
10241 'type': 'object'},
10242 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10243 'NotifyWatchResult': {'additionalProperties': False,
10244 'properties': {'NotifyWatcherId': {'type': 'string'},
10245 'error': {'$ref': '#/definitions/Error'}},
10246 'required': ['NotifyWatcherId'],
10247 'type': 'object'},
10248 'StringResult': {'additionalProperties': False,
10249 'properties': {'error': {'$ref': '#/definitions/Error'},
10250 'result': {'type': 'string'}},
10251 'required': ['result'],
10252 'type': 'object'},
10253 'StringsResult': {'additionalProperties': False,
10254 'properties': {'error': {'$ref': '#/definitions/Error'},
10255 'result': {'items': {'type': 'string'},
10256 'type': 'array'}},
10257 'type': 'object'},
10258 'StringsWatchResult': {'additionalProperties': False,
10259 'properties': {'changes': {'items': {'type': 'string'},
10260 'type': 'array'},
10261 'error': {'$ref': '#/definitions/Error'},
10262 'watcher-id': {'type': 'string'}},
10263 'required': ['watcher-id'],
10264 'type': 'object'},
10265 'StringsWatchResults': {'additionalProperties': False,
10266 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
10267 'type': 'array'}},
10268 'required': ['results'],
10269 'type': 'object'}},
10270 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
10271 'type': 'object'},
10272 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
10273 'type': 'object'},
10274 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
10275 'type': 'object'},
10276 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
10277 'type': 'object'},
10278 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10279 'Result': {'$ref': '#/definitions/LifeResults'}},
10280 'type': 'object'},
10281 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
10282 'type': 'object'},
10283 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10284 'Result': {'$ref': '#/definitions/ErrorResults'}},
10285 'type': 'object'},
10286 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
10287 'Result': {'$ref': '#/definitions/ErrorResults'}},
10288 'type': 'object'},
10289 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
10290 'type': 'object'},
10291 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
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(StringsResult)
10300 async def APIAddresses(self):
10301 '''
10302
10303 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
10304 '''
10305 # map input types to rpc msg
10306 params = dict()
10307 msg = dict(type='Deployer', request='APIAddresses', version=1, params=params)
10308
10309 reply = await self.rpc(msg)
10310 return reply
10311
10312
10313
10314 @ReturnMapping(APIHostPortsResult)
10315 async def APIHostPorts(self):
10316 '''
10317
10318 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
10319 '''
10320 # map input types to rpc msg
10321 params = dict()
10322 msg = dict(type='Deployer', request='APIHostPorts', version=1, params=params)
10323
10324 reply = await self.rpc(msg)
10325 return reply
10326
10327
10328
10329 @ReturnMapping(BytesResult)
10330 async def CACert(self):
10331 '''
10332
10333 Returns -> typing.Sequence<+T_co>[int]
10334 '''
10335 # map input types to rpc msg
10336 params = dict()
10337 msg = dict(type='Deployer', request='CACert', version=1, params=params)
10338
10339 reply = await self.rpc(msg)
10340 return reply
10341
10342
10343
10344 @ReturnMapping(DeployerConnectionValues)
10345 async def ConnectionInfo(self):
10346 '''
10347
10348 Returns -> typing.Sequence<+T_co>[str]
10349 '''
10350 # map input types to rpc msg
10351 params = dict()
10352 msg = dict(type='Deployer', request='ConnectionInfo', version=1, params=params)
10353
10354 reply = await self.rpc(msg)
10355 return reply
10356
10357
10358
10359 @ReturnMapping(LifeResults)
10360 async def Life(self, entities):
10361 '''
10362 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10363 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
10364 '''
10365 # map input types to rpc msg
10366 params = dict()
10367 msg = dict(type='Deployer', request='Life', version=1, params=params)
10368 params['entities'] = entities
10369 reply = await self.rpc(msg)
10370 return reply
10371
10372
10373
10374 @ReturnMapping(StringResult)
10375 async def ModelUUID(self):
10376 '''
10377
10378 Returns -> typing.Union[_ForwardRef('Error'), str]
10379 '''
10380 # map input types to rpc msg
10381 params = dict()
10382 msg = dict(type='Deployer', request='ModelUUID', version=1, params=params)
10383
10384 reply = await self.rpc(msg)
10385 return reply
10386
10387
10388
10389 @ReturnMapping(ErrorResults)
10390 async def Remove(self, entities):
10391 '''
10392 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10393 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10394 '''
10395 # map input types to rpc msg
10396 params = dict()
10397 msg = dict(type='Deployer', request='Remove', version=1, params=params)
10398 params['entities'] = entities
10399 reply = await self.rpc(msg)
10400 return reply
10401
10402
10403
10404 @ReturnMapping(ErrorResults)
10405 async def SetPasswords(self, changes):
10406 '''
10407 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
10408 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10409 '''
10410 # map input types to rpc msg
10411 params = dict()
10412 msg = dict(type='Deployer', request='SetPasswords', version=1, params=params)
10413 params['changes'] = changes
10414 reply = await self.rpc(msg)
10415 return reply
10416
10417
10418
10419 @ReturnMapping(StringsResult)
10420 async def StateAddresses(self):
10421 '''
10422
10423 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
10424 '''
10425 # map input types to rpc msg
10426 params = dict()
10427 msg = dict(type='Deployer', request='StateAddresses', version=1, params=params)
10428
10429 reply = await self.rpc(msg)
10430 return reply
10431
10432
10433
10434 @ReturnMapping(NotifyWatchResult)
10435 async def WatchAPIHostPorts(self):
10436 '''
10437
10438 Returns -> typing.Union[str, _ForwardRef('Error')]
10439 '''
10440 # map input types to rpc msg
10441 params = dict()
10442 msg = dict(type='Deployer', request='WatchAPIHostPorts', version=1, params=params)
10443
10444 reply = await self.rpc(msg)
10445 return reply
10446
10447
10448
10449 @ReturnMapping(StringsWatchResults)
10450 async def WatchUnits(self, entities):
10451 '''
10452 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10453 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
10454 '''
10455 # map input types to rpc msg
10456 params = dict()
10457 msg = dict(type='Deployer', request='WatchUnits', version=1, params=params)
10458 params['entities'] = entities
10459 reply = await self.rpc(msg)
10460 return reply
10461
10462
10463 class DiscoverSpacesFacade(Type):
10464 name = 'DiscoverSpaces'
10465 version = 2
10466 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
10467 'properties': {'space-tag': {'type': 'string'},
10468 'subnet-provider-id': {'type': 'string'},
10469 'subnet-tag': {'type': 'string'},
10470 'zones': {'items': {'type': 'string'},
10471 'type': 'array'}},
10472 'required': ['space-tag'],
10473 'type': 'object'},
10474 'AddSubnetsParams': {'additionalProperties': False,
10475 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
10476 'type': 'array'}},
10477 'required': ['subnets'],
10478 'type': 'object'},
10479 'CreateSpaceParams': {'additionalProperties': False,
10480 'properties': {'provider-id': {'type': 'string'},
10481 'public': {'type': 'boolean'},
10482 'space-tag': {'type': 'string'},
10483 'subnet-tags': {'items': {'type': 'string'},
10484 'type': 'array'}},
10485 'required': ['subnet-tags',
10486 'space-tag',
10487 'public'],
10488 'type': 'object'},
10489 'CreateSpacesParams': {'additionalProperties': False,
10490 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
10491 'type': 'array'}},
10492 'required': ['spaces'],
10493 'type': 'object'},
10494 'DiscoverSpacesResults': {'additionalProperties': False,
10495 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'},
10496 'type': 'array'}},
10497 'required': ['results'],
10498 'type': 'object'},
10499 'Error': {'additionalProperties': False,
10500 'properties': {'code': {'type': 'string'},
10501 'info': {'$ref': '#/definitions/ErrorInfo'},
10502 'message': {'type': 'string'}},
10503 'required': ['message', 'code'],
10504 'type': 'object'},
10505 'ErrorInfo': {'additionalProperties': False,
10506 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10507 'macaroon-path': {'type': 'string'}},
10508 'type': 'object'},
10509 'ErrorResult': {'additionalProperties': False,
10510 'properties': {'error': {'$ref': '#/definitions/Error'}},
10511 'type': 'object'},
10512 'ErrorResults': {'additionalProperties': False,
10513 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10514 'type': 'array'}},
10515 'required': ['results'],
10516 'type': 'object'},
10517 'ListSubnetsResults': {'additionalProperties': False,
10518 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
10519 'type': 'array'}},
10520 'required': ['results'],
10521 'type': 'object'},
10522 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10523 'ModelConfigResult': {'additionalProperties': False,
10524 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
10525 'type': 'object'}},
10526 'type': 'object'}},
10527 'required': ['config'],
10528 'type': 'object'},
10529 'ProviderSpace': {'additionalProperties': False,
10530 'properties': {'error': {'$ref': '#/definitions/Error'},
10531 'name': {'type': 'string'},
10532 'provider-id': {'type': 'string'},
10533 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
10534 'type': 'array'}},
10535 'required': ['name',
10536 'provider-id',
10537 'subnets'],
10538 'type': 'object'},
10539 'Subnet': {'additionalProperties': False,
10540 'properties': {'cidr': {'type': 'string'},
10541 'life': {'type': 'string'},
10542 'provider-id': {'type': 'string'},
10543 'space-tag': {'type': 'string'},
10544 'status': {'type': 'string'},
10545 'vlan-tag': {'type': 'integer'},
10546 'zones': {'items': {'type': 'string'},
10547 'type': 'array'}},
10548 'required': ['cidr',
10549 'vlan-tag',
10550 'life',
10551 'space-tag',
10552 'zones'],
10553 'type': 'object'},
10554 'SubnetsFilters': {'additionalProperties': False,
10555 'properties': {'space-tag': {'type': 'string'},
10556 'zone': {'type': 'string'}},
10557 'type': 'object'}},
10558 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
10559 'Result': {'$ref': '#/definitions/ErrorResults'}},
10560 'type': 'object'},
10561 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
10562 'Result': {'$ref': '#/definitions/ErrorResults'}},
10563 'type': 'object'},
10564 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
10565 'type': 'object'},
10566 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
10567 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
10568 'type': 'object'},
10569 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10570 'type': 'object'}},
10571 'type': 'object'}
10572
10573
10574 @ReturnMapping(ErrorResults)
10575 async def AddSubnets(self, subnets):
10576 '''
10577 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
10578 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10579 '''
10580 # map input types to rpc msg
10581 params = dict()
10582 msg = dict(type='DiscoverSpaces', request='AddSubnets', version=2, params=params)
10583 params['subnets'] = subnets
10584 reply = await self.rpc(msg)
10585 return reply
10586
10587
10588
10589 @ReturnMapping(ErrorResults)
10590 async def CreateSpaces(self, spaces):
10591 '''
10592 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
10593 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10594 '''
10595 # map input types to rpc msg
10596 params = dict()
10597 msg = dict(type='DiscoverSpaces', request='CreateSpaces', version=2, params=params)
10598 params['spaces'] = spaces
10599 reply = await self.rpc(msg)
10600 return reply
10601
10602
10603
10604 @ReturnMapping(DiscoverSpacesResults)
10605 async def ListSpaces(self):
10606 '''
10607
10608 Returns -> typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
10609 '''
10610 # map input types to rpc msg
10611 params = dict()
10612 msg = dict(type='DiscoverSpaces', request='ListSpaces', version=2, params=params)
10613
10614 reply = await self.rpc(msg)
10615 return reply
10616
10617
10618
10619 @ReturnMapping(ListSubnetsResults)
10620 async def ListSubnets(self, space_tag, zone):
10621 '''
10622 space_tag : str
10623 zone : str
10624 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
10625 '''
10626 # map input types to rpc msg
10627 params = dict()
10628 msg = dict(type='DiscoverSpaces', request='ListSubnets', version=2, params=params)
10629 params['space-tag'] = space_tag
10630 params['zone'] = zone
10631 reply = await self.rpc(msg)
10632 return reply
10633
10634
10635
10636 @ReturnMapping(ModelConfigResult)
10637 async def ModelConfig(self):
10638 '''
10639
10640 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
10641 '''
10642 # map input types to rpc msg
10643 params = dict()
10644 msg = dict(type='DiscoverSpaces', request='ModelConfig', version=2, params=params)
10645
10646 reply = await self.rpc(msg)
10647 return reply
10648
10649
10650 class DiskManagerFacade(Type):
10651 name = 'DiskManager'
10652 version = 2
10653 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
10654 'properties': {'BusAddress': {'type': 'string'},
10655 'DeviceLinks': {'items': {'type': 'string'},
10656 'type': 'array'},
10657 'DeviceName': {'type': 'string'},
10658 'FilesystemType': {'type': 'string'},
10659 'HardwareId': {'type': 'string'},
10660 'InUse': {'type': 'boolean'},
10661 'Label': {'type': 'string'},
10662 'MountPoint': {'type': 'string'},
10663 'Size': {'type': 'integer'},
10664 'UUID': {'type': 'string'}},
10665 'required': ['DeviceName',
10666 'DeviceLinks',
10667 'Label',
10668 'UUID',
10669 'HardwareId',
10670 'BusAddress',
10671 'Size',
10672 'FilesystemType',
10673 'InUse',
10674 'MountPoint'],
10675 'type': 'object'},
10676 'Error': {'additionalProperties': False,
10677 'properties': {'code': {'type': 'string'},
10678 'info': {'$ref': '#/definitions/ErrorInfo'},
10679 'message': {'type': 'string'}},
10680 'required': ['message', 'code'],
10681 'type': 'object'},
10682 'ErrorInfo': {'additionalProperties': False,
10683 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10684 'macaroon-path': {'type': 'string'}},
10685 'type': 'object'},
10686 'ErrorResult': {'additionalProperties': False,
10687 'properties': {'error': {'$ref': '#/definitions/Error'}},
10688 'type': 'object'},
10689 'ErrorResults': {'additionalProperties': False,
10690 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10691 'type': 'array'}},
10692 'required': ['results'],
10693 'type': 'object'},
10694 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10695 'MachineBlockDevices': {'additionalProperties': False,
10696 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
10697 'type': 'array'},
10698 'machine': {'type': 'string'}},
10699 'required': ['machine'],
10700 'type': 'object'},
10701 'SetMachineBlockDevices': {'additionalProperties': False,
10702 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
10703 'type': 'array'}},
10704 'required': ['machine-block-devices'],
10705 'type': 'object'}},
10706 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
10707 'Result': {'$ref': '#/definitions/ErrorResults'}},
10708 'type': 'object'}},
10709 'type': 'object'}
10710
10711
10712 @ReturnMapping(ErrorResults)
10713 async def SetMachineBlockDevices(self, machine_block_devices):
10714 '''
10715 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
10716 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10717 '''
10718 # map input types to rpc msg
10719 params = dict()
10720 msg = dict(type='DiskManager', request='SetMachineBlockDevices', version=2, params=params)
10721 params['machine-block-devices'] = machine_block_devices
10722 reply = await self.rpc(msg)
10723 return reply
10724
10725
10726 class EntityWatcherFacade(Type):
10727 name = 'EntityWatcher'
10728 version = 2
10729 schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
10730 'properties': {'changes': {'items': {'type': 'string'},
10731 'type': 'array'},
10732 'error': {'$ref': '#/definitions/Error'},
10733 'watcher-id': {'type': 'string'}},
10734 'required': ['watcher-id'],
10735 'type': 'object'},
10736 'Error': {'additionalProperties': False,
10737 'properties': {'code': {'type': 'string'},
10738 'info': {'$ref': '#/definitions/ErrorInfo'},
10739 'message': {'type': 'string'}},
10740 'required': ['message', 'code'],
10741 'type': 'object'},
10742 'ErrorInfo': {'additionalProperties': False,
10743 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10744 'macaroon-path': {'type': 'string'}},
10745 'type': 'object'},
10746 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
10747 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
10748 'type': 'object'},
10749 'Stop': {'type': 'object'}},
10750 'type': 'object'}
10751
10752
10753 @ReturnMapping(EntitiesWatchResult)
10754 async def Next(self):
10755 '''
10756
10757 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
10758 '''
10759 # map input types to rpc msg
10760 params = dict()
10761 msg = dict(type='EntityWatcher', request='Next', version=2, params=params)
10762
10763 reply = await self.rpc(msg)
10764 return reply
10765
10766
10767
10768 @ReturnMapping(None)
10769 async def Stop(self):
10770 '''
10771
10772 Returns -> None
10773 '''
10774 # map input types to rpc msg
10775 params = dict()
10776 msg = dict(type='EntityWatcher', request='Stop', version=2, params=params)
10777
10778 reply = await self.rpc(msg)
10779 return reply
10780
10781
10782 class FilesystemAttachmentsWatcherFacade(Type):
10783 name = 'FilesystemAttachmentsWatcher'
10784 version = 2
10785 schema = {'definitions': {'Error': {'additionalProperties': False,
10786 'properties': {'code': {'type': 'string'},
10787 'info': {'$ref': '#/definitions/ErrorInfo'},
10788 'message': {'type': 'string'}},
10789 'required': ['message', 'code'],
10790 'type': 'object'},
10791 'ErrorInfo': {'additionalProperties': False,
10792 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10793 'macaroon-path': {'type': 'string'}},
10794 'type': 'object'},
10795 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10796 'MachineStorageId': {'additionalProperties': False,
10797 'properties': {'attachment-tag': {'type': 'string'},
10798 'machine-tag': {'type': 'string'}},
10799 'required': ['machine-tag',
10800 'attachment-tag'],
10801 'type': 'object'},
10802 'MachineStorageIdsWatchResult': {'additionalProperties': False,
10803 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
10804 'type': 'array'},
10805 'error': {'$ref': '#/definitions/Error'},
10806 'watcher-id': {'type': 'string'}},
10807 'required': ['watcher-id',
10808 'changes'],
10809 'type': 'object'}},
10810 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
10811 'type': 'object'},
10812 'Stop': {'type': 'object'}},
10813 'type': 'object'}
10814
10815
10816 @ReturnMapping(MachineStorageIdsWatchResult)
10817 async def Next(self):
10818 '''
10819
10820 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
10821 '''
10822 # map input types to rpc msg
10823 params = dict()
10824 msg = dict(type='FilesystemAttachmentsWatcher', request='Next', version=2, params=params)
10825
10826 reply = await self.rpc(msg)
10827 return reply
10828
10829
10830
10831 @ReturnMapping(None)
10832 async def Stop(self):
10833 '''
10834
10835 Returns -> None
10836 '''
10837 # map input types to rpc msg
10838 params = dict()
10839 msg = dict(type='FilesystemAttachmentsWatcher', request='Stop', version=2, params=params)
10840
10841 reply = await self.rpc(msg)
10842 return reply
10843
10844
10845 class FirewallerFacade(Type):
10846 name = 'Firewaller'
10847 version = 3
10848 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
10849 'properties': {'error': {'$ref': '#/definitions/Error'},
10850 'result': {'type': 'boolean'}},
10851 'required': ['result'],
10852 'type': 'object'},
10853 'BoolResults': {'additionalProperties': False,
10854 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
10855 'type': 'array'}},
10856 'required': ['results'],
10857 'type': 'object'},
10858 'CloudCredential': {'additionalProperties': False,
10859 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
10860 'type': 'object'},
10861 'auth-type': {'type': 'string'},
10862 'redacted': {'items': {'type': 'string'},
10863 'type': 'array'}},
10864 'required': ['auth-type'],
10865 'type': 'object'},
10866 'CloudSpec': {'additionalProperties': False,
10867 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
10868 'endpoint': {'type': 'string'},
10869 'identity-endpoint': {'type': 'string'},
10870 'name': {'type': 'string'},
10871 'region': {'type': 'string'},
10872 'storage-endpoint': {'type': 'string'},
10873 'type': {'type': 'string'}},
10874 'required': ['type', 'name'],
10875 'type': 'object'},
10876 'CloudSpecResult': {'additionalProperties': False,
10877 'properties': {'error': {'$ref': '#/definitions/Error'},
10878 'result': {'$ref': '#/definitions/CloudSpec'}},
10879 'type': 'object'},
10880 'CloudSpecResults': {'additionalProperties': False,
10881 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
10882 'type': 'array'}},
10883 'type': 'object'},
10884 'Entities': {'additionalProperties': False,
10885 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10886 'type': 'array'}},
10887 'required': ['entities'],
10888 'type': 'object'},
10889 'Entity': {'additionalProperties': False,
10890 'properties': {'tag': {'type': 'string'}},
10891 'required': ['tag'],
10892 'type': 'object'},
10893 'Error': {'additionalProperties': False,
10894 'properties': {'code': {'type': 'string'},
10895 'info': {'$ref': '#/definitions/ErrorInfo'},
10896 'message': {'type': 'string'}},
10897 'required': ['message', 'code'],
10898 'type': 'object'},
10899 'ErrorInfo': {'additionalProperties': False,
10900 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10901 'macaroon-path': {'type': 'string'}},
10902 'type': 'object'},
10903 'LifeResult': {'additionalProperties': False,
10904 'properties': {'error': {'$ref': '#/definitions/Error'},
10905 'life': {'type': 'string'}},
10906 'required': ['life'],
10907 'type': 'object'},
10908 'LifeResults': {'additionalProperties': False,
10909 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
10910 'type': 'array'}},
10911 'required': ['results'],
10912 'type': 'object'},
10913 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10914 'MachinePortRange': {'additionalProperties': False,
10915 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
10916 'relation-tag': {'type': 'string'},
10917 'unit-tag': {'type': 'string'}},
10918 'required': ['unit-tag',
10919 'relation-tag',
10920 'port-range'],
10921 'type': 'object'},
10922 'MachinePorts': {'additionalProperties': False,
10923 'properties': {'machine-tag': {'type': 'string'},
10924 'subnet-tag': {'type': 'string'}},
10925 'required': ['machine-tag', 'subnet-tag'],
10926 'type': 'object'},
10927 'MachinePortsParams': {'additionalProperties': False,
10928 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
10929 'type': 'array'}},
10930 'required': ['params'],
10931 'type': 'object'},
10932 'MachinePortsResult': {'additionalProperties': False,
10933 'properties': {'error': {'$ref': '#/definitions/Error'},
10934 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
10935 'type': 'array'}},
10936 'required': ['ports'],
10937 'type': 'object'},
10938 'MachinePortsResults': {'additionalProperties': False,
10939 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
10940 'type': 'array'}},
10941 'required': ['results'],
10942 'type': 'object'},
10943 'ModelConfigResult': {'additionalProperties': False,
10944 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
10945 'type': 'object'}},
10946 'type': 'object'}},
10947 'required': ['config'],
10948 'type': 'object'},
10949 'NotifyWatchResult': {'additionalProperties': False,
10950 'properties': {'NotifyWatcherId': {'type': 'string'},
10951 'error': {'$ref': '#/definitions/Error'}},
10952 'required': ['NotifyWatcherId'],
10953 'type': 'object'},
10954 'NotifyWatchResults': {'additionalProperties': False,
10955 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10956 'type': 'array'}},
10957 'required': ['results'],
10958 'type': 'object'},
10959 'PortRange': {'additionalProperties': False,
10960 'properties': {'from-port': {'type': 'integer'},
10961 'protocol': {'type': 'string'},
10962 'to-port': {'type': 'integer'}},
10963 'required': ['from-port', 'to-port', 'protocol'],
10964 'type': 'object'},
10965 'StringResult': {'additionalProperties': False,
10966 'properties': {'error': {'$ref': '#/definitions/Error'},
10967 'result': {'type': 'string'}},
10968 'required': ['result'],
10969 'type': 'object'},
10970 'StringResults': {'additionalProperties': False,
10971 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
10972 'type': 'array'}},
10973 'required': ['results'],
10974 'type': 'object'},
10975 'StringsResult': {'additionalProperties': False,
10976 'properties': {'error': {'$ref': '#/definitions/Error'},
10977 'result': {'items': {'type': 'string'},
10978 'type': 'array'}},
10979 'type': 'object'},
10980 'StringsResults': {'additionalProperties': False,
10981 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
10982 'type': 'array'}},
10983 'required': ['results'],
10984 'type': 'object'},
10985 'StringsWatchResult': {'additionalProperties': False,
10986 'properties': {'changes': {'items': {'type': 'string'},
10987 'type': 'array'},
10988 'error': {'$ref': '#/definitions/Error'},
10989 'watcher-id': {'type': 'string'}},
10990 'required': ['watcher-id'],
10991 'type': 'object'},
10992 'StringsWatchResults': {'additionalProperties': False,
10993 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
10994 'type': 'array'}},
10995 'required': ['results'],
10996 'type': 'object'}},
10997 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10998 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
10999 'type': 'object'},
11000 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11001 'Result': {'$ref': '#/definitions/StringResults'}},
11002 'type': 'object'},
11003 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11004 'Result': {'$ref': '#/definitions/BoolResults'}},
11005 'type': 'object'},
11006 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11007 'Result': {'$ref': '#/definitions/StringsResults'}},
11008 'type': 'object'},
11009 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
11010 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
11011 'type': 'object'},
11012 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11013 'Result': {'$ref': '#/definitions/StringResults'}},
11014 'type': 'object'},
11015 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11016 'Result': {'$ref': '#/definitions/LifeResults'}},
11017 'type': 'object'},
11018 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11019 'type': 'object'},
11020 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11021 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11022 'type': 'object'},
11023 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11024 'type': 'object'},
11025 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11026 'type': 'object'},
11027 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11028 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11029 'type': 'object'},
11030 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11031 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11032 'type': 'object'}},
11033 'type': 'object'}
11034
11035
11036 @ReturnMapping(CloudSpecResults)
11037 async def CloudSpec(self, entities):
11038 '''
11039 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11040 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
11041 '''
11042 # map input types to rpc msg
11043 params = dict()
11044 msg = dict(type='Firewaller', request='CloudSpec', version=3, params=params)
11045 params['entities'] = entities
11046 reply = await self.rpc(msg)
11047 return reply
11048
11049
11050
11051 @ReturnMapping(StringResults)
11052 async def GetAssignedMachine(self, entities):
11053 '''
11054 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11055 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
11056 '''
11057 # map input types to rpc msg
11058 params = dict()
11059 msg = dict(type='Firewaller', request='GetAssignedMachine', version=3, params=params)
11060 params['entities'] = entities
11061 reply = await self.rpc(msg)
11062 return reply
11063
11064
11065
11066 @ReturnMapping(BoolResults)
11067 async def GetExposed(self, entities):
11068 '''
11069 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11070 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
11071 '''
11072 # map input types to rpc msg
11073 params = dict()
11074 msg = dict(type='Firewaller', request='GetExposed', version=3, params=params)
11075 params['entities'] = entities
11076 reply = await self.rpc(msg)
11077 return reply
11078
11079
11080
11081 @ReturnMapping(StringsResults)
11082 async def GetMachineActiveSubnets(self, entities):
11083 '''
11084 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11085 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
11086 '''
11087 # map input types to rpc msg
11088 params = dict()
11089 msg = dict(type='Firewaller', request='GetMachineActiveSubnets', version=3, params=params)
11090 params['entities'] = entities
11091 reply = await self.rpc(msg)
11092 return reply
11093
11094
11095
11096 @ReturnMapping(MachinePortsResults)
11097 async def GetMachinePorts(self, params):
11098 '''
11099 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
11100 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
11101 '''
11102 # map input types to rpc msg
11103 params = dict()
11104 msg = dict(type='Firewaller', request='GetMachinePorts', version=3, params=params)
11105 params['params'] = params
11106 reply = await self.rpc(msg)
11107 return reply
11108
11109
11110
11111 @ReturnMapping(StringResults)
11112 async def InstanceId(self, entities):
11113 '''
11114 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11115 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
11116 '''
11117 # map input types to rpc msg
11118 params = dict()
11119 msg = dict(type='Firewaller', request='InstanceId', version=3, params=params)
11120 params['entities'] = entities
11121 reply = await self.rpc(msg)
11122 return reply
11123
11124
11125
11126 @ReturnMapping(LifeResults)
11127 async def Life(self, entities):
11128 '''
11129 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11130 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
11131 '''
11132 # map input types to rpc msg
11133 params = dict()
11134 msg = dict(type='Firewaller', request='Life', version=3, params=params)
11135 params['entities'] = entities
11136 reply = await self.rpc(msg)
11137 return reply
11138
11139
11140
11141 @ReturnMapping(ModelConfigResult)
11142 async def ModelConfig(self):
11143 '''
11144
11145 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
11146 '''
11147 # map input types to rpc msg
11148 params = dict()
11149 msg = dict(type='Firewaller', request='ModelConfig', version=3, params=params)
11150
11151 reply = await self.rpc(msg)
11152 return reply
11153
11154
11155
11156 @ReturnMapping(NotifyWatchResults)
11157 async def Watch(self, entities):
11158 '''
11159 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11160 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
11161 '''
11162 # map input types to rpc msg
11163 params = dict()
11164 msg = dict(type='Firewaller', request='Watch', version=3, params=params)
11165 params['entities'] = entities
11166 reply = await self.rpc(msg)
11167 return reply
11168
11169
11170
11171 @ReturnMapping(NotifyWatchResult)
11172 async def WatchForModelConfigChanges(self):
11173 '''
11174
11175 Returns -> typing.Union[str, _ForwardRef('Error')]
11176 '''
11177 # map input types to rpc msg
11178 params = dict()
11179 msg = dict(type='Firewaller', request='WatchForModelConfigChanges', version=3, params=params)
11180
11181 reply = await self.rpc(msg)
11182 return reply
11183
11184
11185
11186 @ReturnMapping(StringsWatchResult)
11187 async def WatchModelMachines(self):
11188 '''
11189
11190 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
11191 '''
11192 # map input types to rpc msg
11193 params = dict()
11194 msg = dict(type='Firewaller', request='WatchModelMachines', version=3, params=params)
11195
11196 reply = await self.rpc(msg)
11197 return reply
11198
11199
11200
11201 @ReturnMapping(StringsWatchResults)
11202 async def WatchOpenedPorts(self, entities):
11203 '''
11204 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11205 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
11206 '''
11207 # map input types to rpc msg
11208 params = dict()
11209 msg = dict(type='Firewaller', request='WatchOpenedPorts', version=3, params=params)
11210 params['entities'] = entities
11211 reply = await self.rpc(msg)
11212 return reply
11213
11214
11215
11216 @ReturnMapping(StringsWatchResults)
11217 async def WatchUnits(self, entities):
11218 '''
11219 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11220 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
11221 '''
11222 # map input types to rpc msg
11223 params = dict()
11224 msg = dict(type='Firewaller', request='WatchUnits', version=3, params=params)
11225 params['entities'] = entities
11226 reply = await self.rpc(msg)
11227 return reply
11228
11229
11230 class HighAvailabilityFacade(Type):
11231 name = 'HighAvailability'
11232 version = 2
11233 schema = {'definitions': {'Address': {'additionalProperties': False,
11234 'properties': {'Scope': {'type': 'string'},
11235 'SpaceName': {'type': 'string'},
11236 'SpaceProviderId': {'type': 'string'},
11237 'Type': {'type': 'string'},
11238 'Value': {'type': 'string'}},
11239 'required': ['Value',
11240 'Type',
11241 'Scope',
11242 'SpaceName',
11243 'SpaceProviderId'],
11244 'type': 'object'},
11245 'ControllersChangeResult': {'additionalProperties': False,
11246 'properties': {'error': {'$ref': '#/definitions/Error'},
11247 'result': {'$ref': '#/definitions/ControllersChanges'}},
11248 'required': ['result'],
11249 'type': 'object'},
11250 'ControllersChangeResults': {'additionalProperties': False,
11251 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
11252 'type': 'array'}},
11253 'required': ['results'],
11254 'type': 'object'},
11255 'ControllersChanges': {'additionalProperties': False,
11256 'properties': {'added': {'items': {'type': 'string'},
11257 'type': 'array'},
11258 'converted': {'items': {'type': 'string'},
11259 'type': 'array'},
11260 'demoted': {'items': {'type': 'string'},
11261 'type': 'array'},
11262 'maintained': {'items': {'type': 'string'},
11263 'type': 'array'},
11264 'promoted': {'items': {'type': 'string'},
11265 'type': 'array'},
11266 'removed': {'items': {'type': 'string'},
11267 'type': 'array'}},
11268 'type': 'object'},
11269 'ControllersSpec': {'additionalProperties': False,
11270 'properties': {'constraints': {'$ref': '#/definitions/Value'},
11271 'model-tag': {'type': 'string'},
11272 'num-controllers': {'type': 'integer'},
11273 'placement': {'items': {'type': 'string'},
11274 'type': 'array'},
11275 'series': {'type': 'string'}},
11276 'required': ['model-tag',
11277 'num-controllers'],
11278 'type': 'object'},
11279 'ControllersSpecs': {'additionalProperties': False,
11280 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
11281 'type': 'array'}},
11282 'required': ['specs'],
11283 'type': 'object'},
11284 'Error': {'additionalProperties': False,
11285 'properties': {'code': {'type': 'string'},
11286 'info': {'$ref': '#/definitions/ErrorInfo'},
11287 'message': {'type': 'string'}},
11288 'required': ['message', 'code'],
11289 'type': 'object'},
11290 'ErrorInfo': {'additionalProperties': False,
11291 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11292 'macaroon-path': {'type': 'string'}},
11293 'type': 'object'},
11294 'HAMember': {'additionalProperties': False,
11295 'properties': {'public-address': {'$ref': '#/definitions/Address'},
11296 'series': {'type': 'string'},
11297 'tag': {'type': 'string'}},
11298 'required': ['tag', 'public-address', 'series'],
11299 'type': 'object'},
11300 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11301 'Member': {'additionalProperties': False,
11302 'properties': {'Address': {'type': 'string'},
11303 'Arbiter': {'type': 'boolean'},
11304 'BuildIndexes': {'type': 'boolean'},
11305 'Hidden': {'type': 'boolean'},
11306 'Id': {'type': 'integer'},
11307 'Priority': {'type': 'number'},
11308 'SlaveDelay': {'type': 'integer'},
11309 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
11310 'type': 'object'},
11311 'Votes': {'type': 'integer'}},
11312 'required': ['Id',
11313 'Address',
11314 'Arbiter',
11315 'BuildIndexes',
11316 'Hidden',
11317 'Priority',
11318 'Tags',
11319 'SlaveDelay',
11320 'Votes'],
11321 'type': 'object'},
11322 'MongoUpgradeResults': {'additionalProperties': False,
11323 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
11324 'type': 'array'},
11325 'master': {'$ref': '#/definitions/HAMember'},
11326 'rs-members': {'items': {'$ref': '#/definitions/Member'},
11327 'type': 'array'}},
11328 'required': ['rs-members',
11329 'master',
11330 'ha-members'],
11331 'type': 'object'},
11332 'MongoVersion': {'additionalProperties': False,
11333 'properties': {'engine': {'type': 'string'},
11334 'major': {'type': 'integer'},
11335 'minor': {'type': 'integer'},
11336 'patch': {'type': 'string'}},
11337 'required': ['major',
11338 'minor',
11339 'patch',
11340 'engine'],
11341 'type': 'object'},
11342 'ResumeReplicationParams': {'additionalProperties': False,
11343 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
11344 'type': 'array'}},
11345 'required': ['members'],
11346 'type': 'object'},
11347 'UpgradeMongoParams': {'additionalProperties': False,
11348 'properties': {'target': {'$ref': '#/definitions/MongoVersion'}},
11349 'required': ['target'],
11350 'type': 'object'},
11351 'Value': {'additionalProperties': False,
11352 'properties': {'arch': {'type': 'string'},
11353 'container': {'type': 'string'},
11354 'cpu-cores': {'type': 'integer'},
11355 'cpu-power': {'type': 'integer'},
11356 'instance-type': {'type': 'string'},
11357 'mem': {'type': 'integer'},
11358 'root-disk': {'type': 'integer'},
11359 'spaces': {'items': {'type': 'string'},
11360 'type': 'array'},
11361 'tags': {'items': {'type': 'string'},
11362 'type': 'array'},
11363 'virt-type': {'type': 'string'}},
11364 'type': 'object'}},
11365 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
11366 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
11367 'type': 'object'},
11368 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
11369 'type': 'object'},
11370 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
11371 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
11372 'type': 'object'}},
11373 'type': 'object'}
11374
11375
11376 @ReturnMapping(ControllersChangeResults)
11377 async def EnableHA(self, specs):
11378 '''
11379 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
11380 Returns -> typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
11381 '''
11382 # map input types to rpc msg
11383 params = dict()
11384 msg = dict(type='HighAvailability', request='EnableHA', version=2, params=params)
11385 params['specs'] = specs
11386 reply = await self.rpc(msg)
11387 return reply
11388
11389
11390
11391 @ReturnMapping(None)
11392 async def ResumeHAReplicationAfterUpgrade(self, members):
11393 '''
11394 members : typing.Sequence<+T_co>[~Member]<~Member>
11395 Returns -> None
11396 '''
11397 # map input types to rpc msg
11398 params = dict()
11399 msg = dict(type='HighAvailability', request='ResumeHAReplicationAfterUpgrade', version=2, params=params)
11400 params['members'] = members
11401 reply = await self.rpc(msg)
11402 return reply
11403
11404
11405
11406 @ReturnMapping(MongoUpgradeResults)
11407 async def StopHAReplicationForUpgrade(self, target):
11408 '''
11409 target : MongoVersion
11410 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence<+T_co>[~Member]<~Member>]
11411 '''
11412 # map input types to rpc msg
11413 params = dict()
11414 msg = dict(type='HighAvailability', request='StopHAReplicationForUpgrade', version=2, params=params)
11415 params['target'] = target
11416 reply = await self.rpc(msg)
11417 return reply
11418
11419
11420 class HostKeyReporterFacade(Type):
11421 name = 'HostKeyReporter'
11422 version = 1
11423 schema = {'definitions': {'Error': {'additionalProperties': False,
11424 'properties': {'code': {'type': 'string'},
11425 'info': {'$ref': '#/definitions/ErrorInfo'},
11426 'message': {'type': 'string'}},
11427 'required': ['message', 'code'],
11428 'type': 'object'},
11429 'ErrorInfo': {'additionalProperties': False,
11430 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11431 'macaroon-path': {'type': 'string'}},
11432 'type': 'object'},
11433 'ErrorResult': {'additionalProperties': False,
11434 'properties': {'error': {'$ref': '#/definitions/Error'}},
11435 'type': 'object'},
11436 'ErrorResults': {'additionalProperties': False,
11437 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11438 'type': 'array'}},
11439 'required': ['results'],
11440 'type': 'object'},
11441 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11442 'SSHHostKeySet': {'additionalProperties': False,
11443 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
11444 'type': 'array'}},
11445 'required': ['entity-keys'],
11446 'type': 'object'},
11447 'SSHHostKeys': {'additionalProperties': False,
11448 'properties': {'public-keys': {'items': {'type': 'string'},
11449 'type': 'array'},
11450 'tag': {'type': 'string'}},
11451 'required': ['tag', 'public-keys'],
11452 'type': 'object'}},
11453 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
11454 'Result': {'$ref': '#/definitions/ErrorResults'}},
11455 'type': 'object'}},
11456 'type': 'object'}
11457
11458
11459 @ReturnMapping(ErrorResults)
11460 async def ReportKeys(self, entity_keys):
11461 '''
11462 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
11463 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11464 '''
11465 # map input types to rpc msg
11466 params = dict()
11467 msg = dict(type='HostKeyReporter', request='ReportKeys', version=1, params=params)
11468 params['entity-keys'] = entity_keys
11469 reply = await self.rpc(msg)
11470 return reply
11471
11472
11473 class ImageManagerFacade(Type):
11474 name = 'ImageManager'
11475 version = 2
11476 schema = {'definitions': {'Error': {'additionalProperties': False,
11477 'properties': {'code': {'type': 'string'},
11478 'info': {'$ref': '#/definitions/ErrorInfo'},
11479 'message': {'type': 'string'}},
11480 'required': ['message', 'code'],
11481 'type': 'object'},
11482 'ErrorInfo': {'additionalProperties': False,
11483 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11484 'macaroon-path': {'type': 'string'}},
11485 'type': 'object'},
11486 'ErrorResult': {'additionalProperties': False,
11487 'properties': {'error': {'$ref': '#/definitions/Error'}},
11488 'type': 'object'},
11489 'ErrorResults': {'additionalProperties': False,
11490 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11491 'type': 'array'}},
11492 'required': ['results'],
11493 'type': 'object'},
11494 'ImageFilterParams': {'additionalProperties': False,
11495 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
11496 'type': 'array'}},
11497 'required': ['images'],
11498 'type': 'object'},
11499 'ImageMetadata': {'additionalProperties': False,
11500 'properties': {'arch': {'type': 'string'},
11501 'created': {'format': 'date-time',
11502 'type': 'string'},
11503 'kind': {'type': 'string'},
11504 'series': {'type': 'string'},
11505 'url': {'type': 'string'}},
11506 'required': ['kind',
11507 'arch',
11508 'series',
11509 'url',
11510 'created'],
11511 'type': 'object'},
11512 'ImageSpec': {'additionalProperties': False,
11513 'properties': {'arch': {'type': 'string'},
11514 'kind': {'type': 'string'},
11515 'series': {'type': 'string'}},
11516 'required': ['kind', 'arch', 'series'],
11517 'type': 'object'},
11518 'ListImageResult': {'additionalProperties': False,
11519 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
11520 'type': 'array'}},
11521 'required': ['result'],
11522 'type': 'object'},
11523 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
11524 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
11525 'Result': {'$ref': '#/definitions/ErrorResults'}},
11526 'type': 'object'},
11527 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
11528 'Result': {'$ref': '#/definitions/ListImageResult'}},
11529 'type': 'object'}},
11530 'type': 'object'}
11531
11532
11533 @ReturnMapping(ErrorResults)
11534 async def DeleteImages(self, images):
11535 '''
11536 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
11537 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11538 '''
11539 # map input types to rpc msg
11540 params = dict()
11541 msg = dict(type='ImageManager', request='DeleteImages', version=2, params=params)
11542 params['images'] = images
11543 reply = await self.rpc(msg)
11544 return reply
11545
11546
11547
11548 @ReturnMapping(ListImageResult)
11549 async def ListImages(self, images):
11550 '''
11551 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
11552 Returns -> typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
11553 '''
11554 # map input types to rpc msg
11555 params = dict()
11556 msg = dict(type='ImageManager', request='ListImages', version=2, params=params)
11557 params['images'] = images
11558 reply = await self.rpc(msg)
11559 return reply
11560
11561
11562 class ImageMetadataFacade(Type):
11563 name = 'ImageMetadata'
11564 version = 2
11565 schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
11566 'properties': {'arch': {'type': 'string'},
11567 'image-id': {'type': 'string'},
11568 'priority': {'type': 'integer'},
11569 'region': {'type': 'string'},
11570 'root-storage-size': {'type': 'integer'},
11571 'root-storage-type': {'type': 'string'},
11572 'series': {'type': 'string'},
11573 'source': {'type': 'string'},
11574 'stream': {'type': 'string'},
11575 'version': {'type': 'string'},
11576 'virt-type': {'type': 'string'}},
11577 'required': ['image-id',
11578 'region',
11579 'version',
11580 'series',
11581 'arch',
11582 'source',
11583 'priority'],
11584 'type': 'object'},
11585 'CloudImageMetadataList': {'additionalProperties': False,
11586 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
11587 'type': 'array'}},
11588 'type': 'object'},
11589 'Error': {'additionalProperties': False,
11590 'properties': {'code': {'type': 'string'},
11591 'info': {'$ref': '#/definitions/ErrorInfo'},
11592 'message': {'type': 'string'}},
11593 'required': ['message', 'code'],
11594 'type': 'object'},
11595 'ErrorInfo': {'additionalProperties': False,
11596 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11597 'macaroon-path': {'type': 'string'}},
11598 'type': 'object'},
11599 'ErrorResult': {'additionalProperties': False,
11600 'properties': {'error': {'$ref': '#/definitions/Error'}},
11601 'type': 'object'},
11602 'ErrorResults': {'additionalProperties': False,
11603 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11604 'type': 'array'}},
11605 'required': ['results'],
11606 'type': 'object'},
11607 'ImageMetadataFilter': {'additionalProperties': False,
11608 'properties': {'arches': {'items': {'type': 'string'},
11609 'type': 'array'},
11610 'region': {'type': 'string'},
11611 'root-storage-type': {'type': 'string'},
11612 'series': {'items': {'type': 'string'},
11613 'type': 'array'},
11614 'stream': {'type': 'string'},
11615 'virt-type': {'type': 'string'}},
11616 'type': 'object'},
11617 'ListCloudImageMetadataResult': {'additionalProperties': False,
11618 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
11619 'type': 'array'}},
11620 'required': ['result'],
11621 'type': 'object'},
11622 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11623 'MetadataImageIds': {'additionalProperties': False,
11624 'properties': {'image-ids': {'items': {'type': 'string'},
11625 'type': 'array'}},
11626 'required': ['image-ids'],
11627 'type': 'object'},
11628 'MetadataSaveParams': {'additionalProperties': False,
11629 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
11630 'type': 'array'}},
11631 'type': 'object'}},
11632 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
11633 'Result': {'$ref': '#/definitions/ErrorResults'}},
11634 'type': 'object'},
11635 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
11636 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
11637 'type': 'object'},
11638 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
11639 'Result': {'$ref': '#/definitions/ErrorResults'}},
11640 'type': 'object'},
11641 'UpdateFromPublishedImages': {'type': 'object'}},
11642 'type': 'object'}
11643
11644
11645 @ReturnMapping(ErrorResults)
11646 async def Delete(self, image_ids):
11647 '''
11648 image_ids : typing.Sequence<+T_co>[str]
11649 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11650 '''
11651 # map input types to rpc msg
11652 params = dict()
11653 msg = dict(type='ImageMetadata', request='Delete', version=2, params=params)
11654 params['image-ids'] = image_ids
11655 reply = await self.rpc(msg)
11656 return reply
11657
11658
11659
11660 @ReturnMapping(ListCloudImageMetadataResult)
11661 async def List(self, arches, region, root_storage_type, series, stream, virt_type):
11662 '''
11663 arches : typing.Sequence<+T_co>[str]
11664 region : str
11665 root_storage_type : str
11666 series : typing.Sequence<+T_co>[str]
11667 stream : str
11668 virt_type : str
11669 Returns -> typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
11670 '''
11671 # map input types to rpc msg
11672 params = dict()
11673 msg = dict(type='ImageMetadata', request='List', version=2, params=params)
11674 params['arches'] = arches
11675 params['region'] = region
11676 params['root-storage-type'] = root_storage_type
11677 params['series'] = series
11678 params['stream'] = stream
11679 params['virt-type'] = virt_type
11680 reply = await self.rpc(msg)
11681 return reply
11682
11683
11684
11685 @ReturnMapping(ErrorResults)
11686 async def Save(self, metadata):
11687 '''
11688 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
11689 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11690 '''
11691 # map input types to rpc msg
11692 params = dict()
11693 msg = dict(type='ImageMetadata', request='Save', version=2, params=params)
11694 params['metadata'] = metadata
11695 reply = await self.rpc(msg)
11696 return reply
11697
11698
11699
11700 @ReturnMapping(None)
11701 async def UpdateFromPublishedImages(self):
11702 '''
11703
11704 Returns -> None
11705 '''
11706 # map input types to rpc msg
11707 params = dict()
11708 msg = dict(type='ImageMetadata', request='UpdateFromPublishedImages', version=2, params=params)
11709
11710 reply = await self.rpc(msg)
11711 return reply
11712
11713
11714 class InstancePollerFacade(Type):
11715 name = 'InstancePoller'
11716 version = 3
11717 schema = {'definitions': {'Address': {'additionalProperties': False,
11718 'properties': {'scope': {'type': 'string'},
11719 'space-name': {'type': 'string'},
11720 'type': {'type': 'string'},
11721 'value': {'type': 'string'}},
11722 'required': ['value', 'type', 'scope'],
11723 'type': 'object'},
11724 'BoolResult': {'additionalProperties': False,
11725 'properties': {'error': {'$ref': '#/definitions/Error'},
11726 'result': {'type': 'boolean'}},
11727 'required': ['result'],
11728 'type': 'object'},
11729 'BoolResults': {'additionalProperties': False,
11730 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
11731 'type': 'array'}},
11732 'required': ['results'],
11733 'type': 'object'},
11734 'Entities': {'additionalProperties': False,
11735 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11736 'type': 'array'}},
11737 'required': ['entities'],
11738 'type': 'object'},
11739 'Entity': {'additionalProperties': False,
11740 'properties': {'tag': {'type': 'string'}},
11741 'required': ['tag'],
11742 'type': 'object'},
11743 'EntityStatusArgs': {'additionalProperties': False,
11744 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
11745 'type': 'object'}},
11746 'type': 'object'},
11747 'info': {'type': 'string'},
11748 'status': {'type': 'string'},
11749 'tag': {'type': 'string'}},
11750 'required': ['tag',
11751 'status',
11752 'info',
11753 'data'],
11754 'type': 'object'},
11755 'Error': {'additionalProperties': False,
11756 'properties': {'code': {'type': 'string'},
11757 'info': {'$ref': '#/definitions/ErrorInfo'},
11758 'message': {'type': 'string'}},
11759 'required': ['message', 'code'],
11760 'type': 'object'},
11761 'ErrorInfo': {'additionalProperties': False,
11762 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11763 'macaroon-path': {'type': 'string'}},
11764 'type': 'object'},
11765 'ErrorResult': {'additionalProperties': False,
11766 'properties': {'error': {'$ref': '#/definitions/Error'}},
11767 'type': 'object'},
11768 'ErrorResults': {'additionalProperties': False,
11769 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11770 'type': 'array'}},
11771 'required': ['results'],
11772 'type': 'object'},
11773 'LifeResult': {'additionalProperties': False,
11774 'properties': {'error': {'$ref': '#/definitions/Error'},
11775 'life': {'type': 'string'}},
11776 'required': ['life'],
11777 'type': 'object'},
11778 'LifeResults': {'additionalProperties': False,
11779 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
11780 'type': 'array'}},
11781 'required': ['results'],
11782 'type': 'object'},
11783 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11784 'MachineAddresses': {'additionalProperties': False,
11785 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
11786 'type': 'array'},
11787 'tag': {'type': 'string'}},
11788 'required': ['tag', 'addresses'],
11789 'type': 'object'},
11790 'MachineAddressesResult': {'additionalProperties': False,
11791 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
11792 'type': 'array'},
11793 'error': {'$ref': '#/definitions/Error'}},
11794 'required': ['addresses'],
11795 'type': 'object'},
11796 'MachineAddressesResults': {'additionalProperties': False,
11797 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
11798 'type': 'array'}},
11799 'required': ['results'],
11800 'type': 'object'},
11801 'ModelConfigResult': {'additionalProperties': False,
11802 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
11803 'type': 'object'}},
11804 'type': 'object'}},
11805 'required': ['config'],
11806 'type': 'object'},
11807 'NotifyWatchResult': {'additionalProperties': False,
11808 'properties': {'NotifyWatcherId': {'type': 'string'},
11809 'error': {'$ref': '#/definitions/Error'}},
11810 'required': ['NotifyWatcherId'],
11811 'type': 'object'},
11812 'SetMachinesAddresses': {'additionalProperties': False,
11813 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
11814 'type': 'array'}},
11815 'required': ['machine-addresses'],
11816 'type': 'object'},
11817 'SetStatus': {'additionalProperties': False,
11818 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
11819 'type': 'array'}},
11820 'required': ['entities'],
11821 'type': 'object'},
11822 'StatusResult': {'additionalProperties': False,
11823 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
11824 'type': 'object'}},
11825 'type': 'object'},
11826 'error': {'$ref': '#/definitions/Error'},
11827 'id': {'type': 'string'},
11828 'info': {'type': 'string'},
11829 'life': {'type': 'string'},
11830 'since': {'format': 'date-time',
11831 'type': 'string'},
11832 'status': {'type': 'string'}},
11833 'required': ['id',
11834 'life',
11835 'status',
11836 'info',
11837 'data',
11838 'since'],
11839 'type': 'object'},
11840 'StatusResults': {'additionalProperties': False,
11841 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
11842 'type': 'array'}},
11843 'required': ['results'],
11844 'type': 'object'},
11845 'StringResult': {'additionalProperties': False,
11846 'properties': {'error': {'$ref': '#/definitions/Error'},
11847 'result': {'type': 'string'}},
11848 'required': ['result'],
11849 'type': 'object'},
11850 'StringResults': {'additionalProperties': False,
11851 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
11852 'type': 'array'}},
11853 'required': ['results'],
11854 'type': 'object'},
11855 'StringsWatchResult': {'additionalProperties': False,
11856 'properties': {'changes': {'items': {'type': 'string'},
11857 'type': 'array'},
11858 'error': {'$ref': '#/definitions/Error'},
11859 'watcher-id': {'type': 'string'}},
11860 'required': ['watcher-id'],
11861 'type': 'object'}},
11862 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11863 'Result': {'$ref': '#/definitions/BoolResults'}},
11864 'type': 'object'},
11865 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11866 'Result': {'$ref': '#/definitions/StringResults'}},
11867 'type': 'object'},
11868 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11869 'Result': {'$ref': '#/definitions/StatusResults'}},
11870 'type': 'object'},
11871 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11872 'Result': {'$ref': '#/definitions/LifeResults'}},
11873 'type': 'object'},
11874 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11875 'type': 'object'},
11876 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11877 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
11878 'type': 'object'},
11879 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11880 'Result': {'$ref': '#/definitions/ErrorResults'}},
11881 'type': 'object'},
11882 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
11883 'Result': {'$ref': '#/definitions/ErrorResults'}},
11884 'type': 'object'},
11885 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11886 'Result': {'$ref': '#/definitions/StatusResults'}},
11887 'type': 'object'},
11888 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11889 'type': 'object'},
11890 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11891 'type': 'object'}},
11892 'type': 'object'}
11893
11894
11895 @ReturnMapping(BoolResults)
11896 async def AreManuallyProvisioned(self, entities):
11897 '''
11898 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11899 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
11900 '''
11901 # map input types to rpc msg
11902 params = dict()
11903 msg = dict(type='InstancePoller', request='AreManuallyProvisioned', version=3, params=params)
11904 params['entities'] = entities
11905 reply = await self.rpc(msg)
11906 return reply
11907
11908
11909
11910 @ReturnMapping(StringResults)
11911 async def InstanceId(self, entities):
11912 '''
11913 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11914 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
11915 '''
11916 # map input types to rpc msg
11917 params = dict()
11918 msg = dict(type='InstancePoller', request='InstanceId', version=3, params=params)
11919 params['entities'] = entities
11920 reply = await self.rpc(msg)
11921 return reply
11922
11923
11924
11925 @ReturnMapping(StatusResults)
11926 async def InstanceStatus(self, entities):
11927 '''
11928 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11929 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
11930 '''
11931 # map input types to rpc msg
11932 params = dict()
11933 msg = dict(type='InstancePoller', request='InstanceStatus', version=3, params=params)
11934 params['entities'] = entities
11935 reply = await self.rpc(msg)
11936 return reply
11937
11938
11939
11940 @ReturnMapping(LifeResults)
11941 async def Life(self, entities):
11942 '''
11943 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11944 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
11945 '''
11946 # map input types to rpc msg
11947 params = dict()
11948 msg = dict(type='InstancePoller', request='Life', version=3, params=params)
11949 params['entities'] = entities
11950 reply = await self.rpc(msg)
11951 return reply
11952
11953
11954
11955 @ReturnMapping(ModelConfigResult)
11956 async def ModelConfig(self):
11957 '''
11958
11959 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
11960 '''
11961 # map input types to rpc msg
11962 params = dict()
11963 msg = dict(type='InstancePoller', request='ModelConfig', version=3, params=params)
11964
11965 reply = await self.rpc(msg)
11966 return reply
11967
11968
11969
11970 @ReturnMapping(MachineAddressesResults)
11971 async def ProviderAddresses(self, entities):
11972 '''
11973 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11974 Returns -> typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
11975 '''
11976 # map input types to rpc msg
11977 params = dict()
11978 msg = dict(type='InstancePoller', request='ProviderAddresses', version=3, params=params)
11979 params['entities'] = entities
11980 reply = await self.rpc(msg)
11981 return reply
11982
11983
11984
11985 @ReturnMapping(ErrorResults)
11986 async def SetInstanceStatus(self, entities):
11987 '''
11988 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
11989 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11990 '''
11991 # map input types to rpc msg
11992 params = dict()
11993 msg = dict(type='InstancePoller', request='SetInstanceStatus', version=3, params=params)
11994 params['entities'] = entities
11995 reply = await self.rpc(msg)
11996 return reply
11997
11998
11999
12000 @ReturnMapping(ErrorResults)
12001 async def SetProviderAddresses(self, machine_addresses):
12002 '''
12003 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
12004 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12005 '''
12006 # map input types to rpc msg
12007 params = dict()
12008 msg = dict(type='InstancePoller', request='SetProviderAddresses', version=3, params=params)
12009 params['machine-addresses'] = machine_addresses
12010 reply = await self.rpc(msg)
12011 return reply
12012
12013
12014
12015 @ReturnMapping(StatusResults)
12016 async def Status(self, entities):
12017 '''
12018 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12019 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
12020 '''
12021 # map input types to rpc msg
12022 params = dict()
12023 msg = dict(type='InstancePoller', request='Status', version=3, params=params)
12024 params['entities'] = entities
12025 reply = await self.rpc(msg)
12026 return reply
12027
12028
12029
12030 @ReturnMapping(NotifyWatchResult)
12031 async def WatchForModelConfigChanges(self):
12032 '''
12033
12034 Returns -> typing.Union[str, _ForwardRef('Error')]
12035 '''
12036 # map input types to rpc msg
12037 params = dict()
12038 msg = dict(type='InstancePoller', request='WatchForModelConfigChanges', version=3, params=params)
12039
12040 reply = await self.rpc(msg)
12041 return reply
12042
12043
12044
12045 @ReturnMapping(StringsWatchResult)
12046 async def WatchModelMachines(self):
12047 '''
12048
12049 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
12050 '''
12051 # map input types to rpc msg
12052 params = dict()
12053 msg = dict(type='InstancePoller', request='WatchModelMachines', version=3, params=params)
12054
12055 reply = await self.rpc(msg)
12056 return reply
12057
12058
12059 class KeyManagerFacade(Type):
12060 name = 'KeyManager'
12061 version = 1
12062 schema = {'definitions': {'Entities': {'additionalProperties': False,
12063 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12064 'type': 'array'}},
12065 'required': ['entities'],
12066 'type': 'object'},
12067 'Entity': {'additionalProperties': False,
12068 'properties': {'tag': {'type': 'string'}},
12069 'required': ['tag'],
12070 'type': 'object'},
12071 'Error': {'additionalProperties': False,
12072 'properties': {'code': {'type': 'string'},
12073 'info': {'$ref': '#/definitions/ErrorInfo'},
12074 'message': {'type': 'string'}},
12075 'required': ['message', 'code'],
12076 'type': 'object'},
12077 'ErrorInfo': {'additionalProperties': False,
12078 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12079 'macaroon-path': {'type': 'string'}},
12080 'type': 'object'},
12081 'ErrorResult': {'additionalProperties': False,
12082 'properties': {'error': {'$ref': '#/definitions/Error'}},
12083 'type': 'object'},
12084 'ErrorResults': {'additionalProperties': False,
12085 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12086 'type': 'array'}},
12087 'required': ['results'],
12088 'type': 'object'},
12089 'ListSSHKeys': {'additionalProperties': False,
12090 'properties': {'entities': {'$ref': '#/definitions/Entities'},
12091 'mode': {'type': 'boolean'}},
12092 'required': ['entities', 'mode'],
12093 'type': 'object'},
12094 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12095 'ModifyUserSSHKeys': {'additionalProperties': False,
12096 'properties': {'ssh-keys': {'items': {'type': 'string'},
12097 'type': 'array'},
12098 'user': {'type': 'string'}},
12099 'required': ['user', 'ssh-keys'],
12100 'type': 'object'},
12101 'StringsResult': {'additionalProperties': False,
12102 'properties': {'error': {'$ref': '#/definitions/Error'},
12103 'result': {'items': {'type': 'string'},
12104 'type': 'array'}},
12105 'type': 'object'},
12106 'StringsResults': {'additionalProperties': False,
12107 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
12108 'type': 'array'}},
12109 'required': ['results'],
12110 'type': 'object'}},
12111 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12112 'Result': {'$ref': '#/definitions/ErrorResults'}},
12113 'type': 'object'},
12114 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12115 'Result': {'$ref': '#/definitions/ErrorResults'}},
12116 'type': 'object'},
12117 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12118 'Result': {'$ref': '#/definitions/ErrorResults'}},
12119 'type': 'object'},
12120 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
12121 'Result': {'$ref': '#/definitions/StringsResults'}},
12122 'type': 'object'}},
12123 'type': 'object'}
12124
12125
12126 @ReturnMapping(ErrorResults)
12127 async def AddKeys(self, ssh_keys, user):
12128 '''
12129 ssh_keys : typing.Sequence<+T_co>[str]
12130 user : str
12131 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12132 '''
12133 # map input types to rpc msg
12134 params = dict()
12135 msg = dict(type='KeyManager', request='AddKeys', version=1, params=params)
12136 params['ssh-keys'] = ssh_keys
12137 params['user'] = user
12138 reply = await self.rpc(msg)
12139 return reply
12140
12141
12142
12143 @ReturnMapping(ErrorResults)
12144 async def DeleteKeys(self, ssh_keys, user):
12145 '''
12146 ssh_keys : typing.Sequence<+T_co>[str]
12147 user : str
12148 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12149 '''
12150 # map input types to rpc msg
12151 params = dict()
12152 msg = dict(type='KeyManager', request='DeleteKeys', version=1, params=params)
12153 params['ssh-keys'] = ssh_keys
12154 params['user'] = user
12155 reply = await self.rpc(msg)
12156 return reply
12157
12158
12159
12160 @ReturnMapping(ErrorResults)
12161 async def ImportKeys(self, ssh_keys, user):
12162 '''
12163 ssh_keys : typing.Sequence<+T_co>[str]
12164 user : str
12165 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12166 '''
12167 # map input types to rpc msg
12168 params = dict()
12169 msg = dict(type='KeyManager', request='ImportKeys', version=1, params=params)
12170 params['ssh-keys'] = ssh_keys
12171 params['user'] = user
12172 reply = await self.rpc(msg)
12173 return reply
12174
12175
12176
12177 @ReturnMapping(StringsResults)
12178 async def ListKeys(self, entities, mode):
12179 '''
12180 entities : Entities
12181 mode : bool
12182 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
12183 '''
12184 # map input types to rpc msg
12185 params = dict()
12186 msg = dict(type='KeyManager', request='ListKeys', version=1, params=params)
12187 params['entities'] = entities
12188 params['mode'] = mode
12189 reply = await self.rpc(msg)
12190 return reply
12191
12192
12193 class KeyUpdaterFacade(Type):
12194 name = 'KeyUpdater'
12195 version = 1
12196 schema = {'definitions': {'Entities': {'additionalProperties': False,
12197 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12198 'type': 'array'}},
12199 'required': ['entities'],
12200 'type': 'object'},
12201 'Entity': {'additionalProperties': False,
12202 'properties': {'tag': {'type': 'string'}},
12203 'required': ['tag'],
12204 'type': 'object'},
12205 'Error': {'additionalProperties': False,
12206 'properties': {'code': {'type': 'string'},
12207 'info': {'$ref': '#/definitions/ErrorInfo'},
12208 'message': {'type': 'string'}},
12209 'required': ['message', 'code'],
12210 'type': 'object'},
12211 'ErrorInfo': {'additionalProperties': False,
12212 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12213 'macaroon-path': {'type': 'string'}},
12214 'type': 'object'},
12215 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12216 'NotifyWatchResult': {'additionalProperties': False,
12217 'properties': {'NotifyWatcherId': {'type': 'string'},
12218 'error': {'$ref': '#/definitions/Error'}},
12219 'required': ['NotifyWatcherId'],
12220 'type': 'object'},
12221 'NotifyWatchResults': {'additionalProperties': False,
12222 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12223 'type': 'array'}},
12224 'required': ['results'],
12225 'type': 'object'},
12226 'StringsResult': {'additionalProperties': False,
12227 'properties': {'error': {'$ref': '#/definitions/Error'},
12228 'result': {'items': {'type': 'string'},
12229 'type': 'array'}},
12230 'type': 'object'},
12231 'StringsResults': {'additionalProperties': False,
12232 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
12233 'type': 'array'}},
12234 'required': ['results'],
12235 'type': 'object'}},
12236 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12237 'Result': {'$ref': '#/definitions/StringsResults'}},
12238 'type': 'object'},
12239 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12240 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12241 'type': 'object'}},
12242 'type': 'object'}
12243
12244
12245 @ReturnMapping(StringsResults)
12246 async def AuthorisedKeys(self, entities):
12247 '''
12248 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12249 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
12250 '''
12251 # map input types to rpc msg
12252 params = dict()
12253 msg = dict(type='KeyUpdater', request='AuthorisedKeys', version=1, params=params)
12254 params['entities'] = entities
12255 reply = await self.rpc(msg)
12256 return reply
12257
12258
12259
12260 @ReturnMapping(NotifyWatchResults)
12261 async def WatchAuthorisedKeys(self, entities):
12262 '''
12263 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12264 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
12265 '''
12266 # map input types to rpc msg
12267 params = dict()
12268 msg = dict(type='KeyUpdater', request='WatchAuthorisedKeys', version=1, params=params)
12269 params['entities'] = entities
12270 reply = await self.rpc(msg)
12271 return reply
12272
12273
12274 class LeadershipServiceFacade(Type):
12275 name = 'LeadershipService'
12276 version = 2
12277 schema = {'definitions': {'ApplicationTag': {'additionalProperties': False,
12278 'properties': {'Name': {'type': 'string'}},
12279 'required': ['Name'],
12280 'type': 'object'},
12281 'ClaimLeadershipBulkParams': {'additionalProperties': False,
12282 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
12283 'type': 'array'}},
12284 'required': ['params'],
12285 'type': 'object'},
12286 'ClaimLeadershipBulkResults': {'additionalProperties': False,
12287 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12288 'type': 'array'}},
12289 'required': ['results'],
12290 'type': 'object'},
12291 'ClaimLeadershipParams': {'additionalProperties': False,
12292 'properties': {'application-tag': {'type': 'string'},
12293 'duration': {'type': 'number'},
12294 'unit-tag': {'type': 'string'}},
12295 'required': ['application-tag',
12296 'unit-tag',
12297 'duration'],
12298 'type': 'object'},
12299 'Error': {'additionalProperties': False,
12300 'properties': {'code': {'type': 'string'},
12301 'info': {'$ref': '#/definitions/ErrorInfo'},
12302 'message': {'type': 'string'}},
12303 'required': ['message', 'code'],
12304 'type': 'object'},
12305 'ErrorInfo': {'additionalProperties': False,
12306 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12307 'macaroon-path': {'type': 'string'}},
12308 'type': 'object'},
12309 'ErrorResult': {'additionalProperties': False,
12310 'properties': {'error': {'$ref': '#/definitions/Error'}},
12311 'type': 'object'},
12312 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
12313 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
12314 'Result': {'$ref': '#/definitions/ErrorResult'}},
12315 'type': 'object'},
12316 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
12317 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
12318 'type': 'object'}},
12319 'type': 'object'}
12320
12321
12322 @ReturnMapping(ErrorResult)
12323 async def BlockUntilLeadershipReleased(self, name):
12324 '''
12325 name : str
12326 Returns -> Error
12327 '''
12328 # map input types to rpc msg
12329 params = dict()
12330 msg = dict(type='LeadershipService', request='BlockUntilLeadershipReleased', version=2, params=params)
12331 params['Name'] = name
12332 reply = await self.rpc(msg)
12333 return reply
12334
12335
12336
12337 @ReturnMapping(ClaimLeadershipBulkResults)
12338 async def ClaimLeadership(self, params):
12339 '''
12340 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
12341 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12342 '''
12343 # map input types to rpc msg
12344 params = dict()
12345 msg = dict(type='LeadershipService', request='ClaimLeadership', version=2, params=params)
12346 params['params'] = params
12347 reply = await self.rpc(msg)
12348 return reply
12349
12350
12351 class LifeFlagFacade(Type):
12352 name = 'LifeFlag'
12353 version = 1
12354 schema = {'definitions': {'Entities': {'additionalProperties': False,
12355 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12356 'type': 'array'}},
12357 'required': ['entities'],
12358 'type': 'object'},
12359 'Entity': {'additionalProperties': False,
12360 'properties': {'tag': {'type': 'string'}},
12361 'required': ['tag'],
12362 'type': 'object'},
12363 'Error': {'additionalProperties': False,
12364 'properties': {'code': {'type': 'string'},
12365 'info': {'$ref': '#/definitions/ErrorInfo'},
12366 'message': {'type': 'string'}},
12367 'required': ['message', 'code'],
12368 'type': 'object'},
12369 'ErrorInfo': {'additionalProperties': False,
12370 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12371 'macaroon-path': {'type': 'string'}},
12372 'type': 'object'},
12373 'LifeResult': {'additionalProperties': False,
12374 'properties': {'error': {'$ref': '#/definitions/Error'},
12375 'life': {'type': 'string'}},
12376 'required': ['life'],
12377 'type': 'object'},
12378 'LifeResults': {'additionalProperties': False,
12379 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
12380 'type': 'array'}},
12381 'required': ['results'],
12382 'type': 'object'},
12383 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12384 'NotifyWatchResult': {'additionalProperties': False,
12385 'properties': {'NotifyWatcherId': {'type': 'string'},
12386 'error': {'$ref': '#/definitions/Error'}},
12387 'required': ['NotifyWatcherId'],
12388 'type': 'object'},
12389 'NotifyWatchResults': {'additionalProperties': False,
12390 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12391 'type': 'array'}},
12392 'required': ['results'],
12393 'type': 'object'}},
12394 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12395 'Result': {'$ref': '#/definitions/LifeResults'}},
12396 'type': 'object'},
12397 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12398 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12399 'type': 'object'}},
12400 'type': 'object'}
12401
12402
12403 @ReturnMapping(LifeResults)
12404 async def Life(self, entities):
12405 '''
12406 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12407 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
12408 '''
12409 # map input types to rpc msg
12410 params = dict()
12411 msg = dict(type='LifeFlag', request='Life', version=1, params=params)
12412 params['entities'] = entities
12413 reply = await self.rpc(msg)
12414 return reply
12415
12416
12417
12418 @ReturnMapping(NotifyWatchResults)
12419 async def Watch(self, entities):
12420 '''
12421 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12422 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
12423 '''
12424 # map input types to rpc msg
12425 params = dict()
12426 msg = dict(type='LifeFlag', request='Watch', version=1, params=params)
12427 params['entities'] = entities
12428 reply = await self.rpc(msg)
12429 return reply
12430
12431
12432 class LogForwardingFacade(Type):
12433 name = 'LogForwarding'
12434 version = 1
12435 schema = {'definitions': {'Error': {'additionalProperties': False,
12436 'properties': {'code': {'type': 'string'},
12437 'info': {'$ref': '#/definitions/ErrorInfo'},
12438 'message': {'type': 'string'}},
12439 'required': ['message', 'code'],
12440 'type': 'object'},
12441 'ErrorInfo': {'additionalProperties': False,
12442 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12443 'macaroon-path': {'type': 'string'}},
12444 'type': 'object'},
12445 'ErrorResult': {'additionalProperties': False,
12446 'properties': {'error': {'$ref': '#/definitions/Error'}},
12447 'type': 'object'},
12448 'ErrorResults': {'additionalProperties': False,
12449 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12450 'type': 'array'}},
12451 'required': ['results'],
12452 'type': 'object'},
12453 'LogForwardingGetLastSentParams': {'additionalProperties': False,
12454 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
12455 'type': 'array'}},
12456 'required': ['ids'],
12457 'type': 'object'},
12458 'LogForwardingGetLastSentResult': {'additionalProperties': False,
12459 'properties': {'err': {'$ref': '#/definitions/Error'},
12460 'record-id': {'type': 'integer'},
12461 'record-timestamp': {'type': 'integer'}},
12462 'required': ['record-id',
12463 'record-timestamp',
12464 'err'],
12465 'type': 'object'},
12466 'LogForwardingGetLastSentResults': {'additionalProperties': False,
12467 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
12468 'type': 'array'}},
12469 'required': ['results'],
12470 'type': 'object'},
12471 'LogForwardingID': {'additionalProperties': False,
12472 'properties': {'model': {'type': 'string'},
12473 'sink': {'type': 'string'}},
12474 'required': ['model', 'sink'],
12475 'type': 'object'},
12476 'LogForwardingSetLastSentParam': {'additionalProperties': False,
12477 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
12478 'record-id': {'type': 'integer'},
12479 'record-timestamp': {'type': 'integer'}},
12480 'required': ['LogForwardingID',
12481 'record-id',
12482 'record-timestamp'],
12483 'type': 'object'},
12484 'LogForwardingSetLastSentParams': {'additionalProperties': False,
12485 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
12486 'type': 'array'}},
12487 'required': ['params'],
12488 'type': 'object'},
12489 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
12490 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
12491 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
12492 'type': 'object'},
12493 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
12494 'Result': {'$ref': '#/definitions/ErrorResults'}},
12495 'type': 'object'}},
12496 'type': 'object'}
12497
12498
12499 @ReturnMapping(LogForwardingGetLastSentResults)
12500 async def GetLastSent(self, ids):
12501 '''
12502 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
12503 Returns -> typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
12504 '''
12505 # map input types to rpc msg
12506 params = dict()
12507 msg = dict(type='LogForwarding', request='GetLastSent', version=1, params=params)
12508 params['ids'] = ids
12509 reply = await self.rpc(msg)
12510 return reply
12511
12512
12513
12514 @ReturnMapping(ErrorResults)
12515 async def SetLastSent(self, params):
12516 '''
12517 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
12518 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12519 '''
12520 # map input types to rpc msg
12521 params = dict()
12522 msg = dict(type='LogForwarding', request='SetLastSent', version=1, params=params)
12523 params['params'] = params
12524 reply = await self.rpc(msg)
12525 return reply
12526
12527
12528 class LoggerFacade(Type):
12529 name = 'Logger'
12530 version = 1
12531 schema = {'definitions': {'Entities': {'additionalProperties': False,
12532 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12533 'type': 'array'}},
12534 'required': ['entities'],
12535 'type': 'object'},
12536 'Entity': {'additionalProperties': False,
12537 'properties': {'tag': {'type': 'string'}},
12538 'required': ['tag'],
12539 'type': 'object'},
12540 'Error': {'additionalProperties': False,
12541 'properties': {'code': {'type': 'string'},
12542 'info': {'$ref': '#/definitions/ErrorInfo'},
12543 'message': {'type': 'string'}},
12544 'required': ['message', 'code'],
12545 'type': 'object'},
12546 'ErrorInfo': {'additionalProperties': False,
12547 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12548 'macaroon-path': {'type': 'string'}},
12549 'type': 'object'},
12550 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12551 'NotifyWatchResult': {'additionalProperties': False,
12552 'properties': {'NotifyWatcherId': {'type': 'string'},
12553 'error': {'$ref': '#/definitions/Error'}},
12554 'required': ['NotifyWatcherId'],
12555 'type': 'object'},
12556 'NotifyWatchResults': {'additionalProperties': False,
12557 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12558 'type': 'array'}},
12559 'required': ['results'],
12560 'type': 'object'},
12561 'StringResult': {'additionalProperties': False,
12562 'properties': {'error': {'$ref': '#/definitions/Error'},
12563 'result': {'type': 'string'}},
12564 'required': ['result'],
12565 'type': 'object'},
12566 'StringResults': {'additionalProperties': False,
12567 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
12568 'type': 'array'}},
12569 'required': ['results'],
12570 'type': 'object'}},
12571 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12572 'Result': {'$ref': '#/definitions/StringResults'}},
12573 'type': 'object'},
12574 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12575 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12576 'type': 'object'}},
12577 'type': 'object'}
12578
12579
12580 @ReturnMapping(StringResults)
12581 async def LoggingConfig(self, entities):
12582 '''
12583 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12584 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
12585 '''
12586 # map input types to rpc msg
12587 params = dict()
12588 msg = dict(type='Logger', request='LoggingConfig', version=1, params=params)
12589 params['entities'] = entities
12590 reply = await self.rpc(msg)
12591 return reply
12592
12593
12594
12595 @ReturnMapping(NotifyWatchResults)
12596 async def WatchLoggingConfig(self, entities):
12597 '''
12598 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12599 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
12600 '''
12601 # map input types to rpc msg
12602 params = dict()
12603 msg = dict(type='Logger', request='WatchLoggingConfig', version=1, params=params)
12604 params['entities'] = entities
12605 reply = await self.rpc(msg)
12606 return reply
12607
12608
12609 class MachineActionsFacade(Type):
12610 name = 'MachineActions'
12611 version = 1
12612 schema = {'definitions': {'Action': {'additionalProperties': False,
12613 'properties': {'name': {'type': 'string'},
12614 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
12615 'type': 'object'}},
12616 'type': 'object'},
12617 'receiver': {'type': 'string'},
12618 'tag': {'type': 'string'}},
12619 'required': ['tag', 'receiver', 'name'],
12620 'type': 'object'},
12621 'ActionExecutionResult': {'additionalProperties': False,
12622 'properties': {'action-tag': {'type': 'string'},
12623 'message': {'type': 'string'},
12624 'results': {'patternProperties': {'.*': {'additionalProperties': True,
12625 'type': 'object'}},
12626 'type': 'object'},
12627 'status': {'type': 'string'}},
12628 'required': ['action-tag', 'status'],
12629 'type': 'object'},
12630 'ActionExecutionResults': {'additionalProperties': False,
12631 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
12632 'type': 'array'}},
12633 'type': 'object'},
12634 'ActionResult': {'additionalProperties': False,
12635 'properties': {'action': {'$ref': '#/definitions/Action'},
12636 'completed': {'format': 'date-time',
12637 'type': 'string'},
12638 'enqueued': {'format': 'date-time',
12639 'type': 'string'},
12640 'error': {'$ref': '#/definitions/Error'},
12641 'message': {'type': 'string'},
12642 'output': {'patternProperties': {'.*': {'additionalProperties': True,
12643 'type': 'object'}},
12644 'type': 'object'},
12645 'started': {'format': 'date-time',
12646 'type': 'string'},
12647 'status': {'type': 'string'}},
12648 'type': 'object'},
12649 'ActionResults': {'additionalProperties': False,
12650 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
12651 'type': 'array'}},
12652 'type': 'object'},
12653 'ActionsByReceiver': {'additionalProperties': False,
12654 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
12655 'type': 'array'},
12656 'error': {'$ref': '#/definitions/Error'},
12657 'receiver': {'type': 'string'}},
12658 'type': 'object'},
12659 'ActionsByReceivers': {'additionalProperties': False,
12660 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
12661 'type': 'array'}},
12662 'type': 'object'},
12663 'Entities': {'additionalProperties': False,
12664 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12665 'type': 'array'}},
12666 'required': ['entities'],
12667 'type': 'object'},
12668 'Entity': {'additionalProperties': False,
12669 'properties': {'tag': {'type': 'string'}},
12670 'required': ['tag'],
12671 'type': 'object'},
12672 'Error': {'additionalProperties': False,
12673 'properties': {'code': {'type': 'string'},
12674 'info': {'$ref': '#/definitions/ErrorInfo'},
12675 'message': {'type': 'string'}},
12676 'required': ['message', 'code'],
12677 'type': 'object'},
12678 'ErrorInfo': {'additionalProperties': False,
12679 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12680 'macaroon-path': {'type': 'string'}},
12681 'type': 'object'},
12682 'ErrorResult': {'additionalProperties': False,
12683 'properties': {'error': {'$ref': '#/definitions/Error'}},
12684 'type': 'object'},
12685 'ErrorResults': {'additionalProperties': False,
12686 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12687 'type': 'array'}},
12688 'required': ['results'],
12689 'type': 'object'},
12690 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12691 'StringsWatchResult': {'additionalProperties': False,
12692 'properties': {'changes': {'items': {'type': 'string'},
12693 'type': 'array'},
12694 'error': {'$ref': '#/definitions/Error'},
12695 'watcher-id': {'type': 'string'}},
12696 'required': ['watcher-id'],
12697 'type': 'object'},
12698 'StringsWatchResults': {'additionalProperties': False,
12699 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
12700 'type': 'array'}},
12701 'required': ['results'],
12702 'type': 'object'}},
12703 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12704 'Result': {'$ref': '#/definitions/ActionResults'}},
12705 'type': 'object'},
12706 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12707 'Result': {'$ref': '#/definitions/ErrorResults'}},
12708 'type': 'object'},
12709 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
12710 'Result': {'$ref': '#/definitions/ErrorResults'}},
12711 'type': 'object'},
12712 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12713 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
12714 'type': 'object'},
12715 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12716 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
12717 'type': 'object'}},
12718 'type': 'object'}
12719
12720
12721 @ReturnMapping(ActionResults)
12722 async def Actions(self, entities):
12723 '''
12724 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12725 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
12726 '''
12727 # map input types to rpc msg
12728 params = dict()
12729 msg = dict(type='MachineActions', request='Actions', version=1, params=params)
12730 params['entities'] = entities
12731 reply = await self.rpc(msg)
12732 return reply
12733
12734
12735
12736 @ReturnMapping(ErrorResults)
12737 async def BeginActions(self, entities):
12738 '''
12739 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12740 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12741 '''
12742 # map input types to rpc msg
12743 params = dict()
12744 msg = dict(type='MachineActions', request='BeginActions', version=1, params=params)
12745 params['entities'] = entities
12746 reply = await self.rpc(msg)
12747 return reply
12748
12749
12750
12751 @ReturnMapping(ErrorResults)
12752 async def FinishActions(self, results):
12753 '''
12754 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
12755 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12756 '''
12757 # map input types to rpc msg
12758 params = dict()
12759 msg = dict(type='MachineActions', request='FinishActions', version=1, params=params)
12760 params['results'] = results
12761 reply = await self.rpc(msg)
12762 return reply
12763
12764
12765
12766 @ReturnMapping(ActionsByReceivers)
12767 async def RunningActions(self, entities):
12768 '''
12769 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12770 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
12771 '''
12772 # map input types to rpc msg
12773 params = dict()
12774 msg = dict(type='MachineActions', request='RunningActions', version=1, params=params)
12775 params['entities'] = entities
12776 reply = await self.rpc(msg)
12777 return reply
12778
12779
12780
12781 @ReturnMapping(StringsWatchResults)
12782 async def WatchActionNotifications(self, entities):
12783 '''
12784 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12785 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
12786 '''
12787 # map input types to rpc msg
12788 params = dict()
12789 msg = dict(type='MachineActions', request='WatchActionNotifications', version=1, params=params)
12790 params['entities'] = entities
12791 reply = await self.rpc(msg)
12792 return reply
12793
12794
12795 class MachineManagerFacade(Type):
12796 name = 'MachineManager'
12797 version = 2
12798 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
12799 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12800 'type': 'array'},
12801 'constraints': {'$ref': '#/definitions/Value'},
12802 'container-type': {'type': 'string'},
12803 'disks': {'items': {'$ref': '#/definitions/Constraints'},
12804 'type': 'array'},
12805 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
12806 'instance-id': {'type': 'string'},
12807 'jobs': {'items': {'type': 'string'},
12808 'type': 'array'},
12809 'nonce': {'type': 'string'},
12810 'parent-id': {'type': 'string'},
12811 'placement': {'$ref': '#/definitions/Placement'},
12812 'series': {'type': 'string'}},
12813 'required': ['series',
12814 'constraints',
12815 'jobs',
12816 'parent-id',
12817 'container-type',
12818 'instance-id',
12819 'nonce',
12820 'hardware-characteristics',
12821 'addresses'],
12822 'type': 'object'},
12823 'AddMachines': {'additionalProperties': False,
12824 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
12825 'type': 'array'}},
12826 'required': ['params'],
12827 'type': 'object'},
12828 'AddMachinesResult': {'additionalProperties': False,
12829 'properties': {'error': {'$ref': '#/definitions/Error'},
12830 'machine': {'type': 'string'}},
12831 'required': ['machine'],
12832 'type': 'object'},
12833 'AddMachinesResults': {'additionalProperties': False,
12834 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
12835 'type': 'array'}},
12836 'required': ['machines'],
12837 'type': 'object'},
12838 'Address': {'additionalProperties': False,
12839 'properties': {'scope': {'type': 'string'},
12840 'space-name': {'type': 'string'},
12841 'type': {'type': 'string'},
12842 'value': {'type': 'string'}},
12843 'required': ['value', 'type', 'scope'],
12844 'type': 'object'},
12845 'Constraints': {'additionalProperties': False,
12846 'properties': {'Count': {'type': 'integer'},
12847 'Pool': {'type': 'string'},
12848 'Size': {'type': 'integer'}},
12849 'required': ['Pool', 'Size', 'Count'],
12850 'type': 'object'},
12851 'Error': {'additionalProperties': False,
12852 'properties': {'code': {'type': 'string'},
12853 'info': {'$ref': '#/definitions/ErrorInfo'},
12854 'message': {'type': 'string'}},
12855 'required': ['message', 'code'],
12856 'type': 'object'},
12857 'ErrorInfo': {'additionalProperties': False,
12858 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12859 'macaroon-path': {'type': 'string'}},
12860 'type': 'object'},
12861 'HardwareCharacteristics': {'additionalProperties': False,
12862 'properties': {'arch': {'type': 'string'},
12863 'availability-zone': {'type': 'string'},
12864 'cpu-cores': {'type': 'integer'},
12865 'cpu-power': {'type': 'integer'},
12866 'mem': {'type': 'integer'},
12867 'root-disk': {'type': 'integer'},
12868 'tags': {'items': {'type': 'string'},
12869 'type': 'array'}},
12870 'type': 'object'},
12871 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12872 'Placement': {'additionalProperties': False,
12873 'properties': {'directive': {'type': 'string'},
12874 'scope': {'type': 'string'}},
12875 'required': ['scope', 'directive'],
12876 'type': 'object'},
12877 'Value': {'additionalProperties': False,
12878 'properties': {'arch': {'type': 'string'},
12879 'container': {'type': 'string'},
12880 'cpu-cores': {'type': 'integer'},
12881 'cpu-power': {'type': 'integer'},
12882 'instance-type': {'type': 'string'},
12883 'mem': {'type': 'integer'},
12884 'root-disk': {'type': 'integer'},
12885 'spaces': {'items': {'type': 'string'},
12886 'type': 'array'},
12887 'tags': {'items': {'type': 'string'},
12888 'type': 'array'},
12889 'virt-type': {'type': 'string'}},
12890 'type': 'object'}},
12891 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
12892 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
12893 'type': 'object'}},
12894 'type': 'object'}
12895
12896
12897 @ReturnMapping(AddMachinesResults)
12898 async def AddMachines(self, params):
12899 '''
12900 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
12901 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
12902 '''
12903 # map input types to rpc msg
12904 params = dict()
12905 msg = dict(type='MachineManager', request='AddMachines', version=2, params=params)
12906 params['params'] = params
12907 reply = await self.rpc(msg)
12908 return reply
12909
12910
12911 class MachineUndertakerFacade(Type):
12912 name = 'MachineUndertaker'
12913 version = 1
12914 schema = {'definitions': {'Entities': {'additionalProperties': False,
12915 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12916 'type': 'array'}},
12917 'required': ['entities'],
12918 'type': 'object'},
12919 'EntitiesResult': {'additionalProperties': False,
12920 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12921 'type': 'array'},
12922 'error': {'$ref': '#/definitions/Error'}},
12923 'required': ['entities'],
12924 'type': 'object'},
12925 'EntitiesResults': {'additionalProperties': False,
12926 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
12927 'type': 'array'}},
12928 'required': ['results'],
12929 'type': 'object'},
12930 'Entity': {'additionalProperties': False,
12931 'properties': {'tag': {'type': 'string'}},
12932 'required': ['tag'],
12933 'type': 'object'},
12934 'Error': {'additionalProperties': False,
12935 'properties': {'code': {'type': 'string'},
12936 'info': {'$ref': '#/definitions/ErrorInfo'},
12937 'message': {'type': 'string'}},
12938 'required': ['message', 'code'],
12939 'type': 'object'},
12940 'ErrorInfo': {'additionalProperties': False,
12941 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12942 'macaroon-path': {'type': 'string'}},
12943 'type': 'object'},
12944 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12945 'NotifyWatchResult': {'additionalProperties': False,
12946 'properties': {'NotifyWatcherId': {'type': 'string'},
12947 'error': {'$ref': '#/definitions/Error'}},
12948 'required': ['NotifyWatcherId'],
12949 'type': 'object'},
12950 'NotifyWatchResults': {'additionalProperties': False,
12951 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12952 'type': 'array'}},
12953 'required': ['results'],
12954 'type': 'object'},
12955 'ProviderInterfaceInfo': {'additionalProperties': False,
12956 'properties': {'interface-name': {'type': 'string'},
12957 'mac-address': {'type': 'string'},
12958 'provider-id': {'type': 'string'}},
12959 'required': ['interface-name',
12960 'mac-address',
12961 'provider-id'],
12962 'type': 'object'},
12963 'ProviderInterfaceInfoResult': {'additionalProperties': False,
12964 'properties': {'error': {'$ref': '#/definitions/Error'},
12965 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'},
12966 'type': 'array'},
12967 'machine-tag': {'type': 'string'}},
12968 'required': ['machine-tag',
12969 'interfaces'],
12970 'type': 'object'},
12971 'ProviderInterfaceInfoResults': {'additionalProperties': False,
12972 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'},
12973 'type': 'array'}},
12974 'required': ['results'],
12975 'type': 'object'}},
12976 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12977 'Result': {'$ref': '#/definitions/EntitiesResults'}},
12978 'type': 'object'},
12979 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}},
12980 'type': 'object'},
12981 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12982 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}},
12983 'type': 'object'},
12984 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12985 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12986 'type': 'object'}},
12987 'type': 'object'}
12988
12989
12990 @ReturnMapping(EntitiesResults)
12991 async def AllMachineRemovals(self, entities):
12992 '''
12993 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12994 Returns -> typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
12995 '''
12996 # map input types to rpc msg
12997 params = dict()
12998 msg = dict(type='MachineUndertaker', request='AllMachineRemovals', version=1, params=params)
12999 params['entities'] = entities
13000 reply = await self.rpc(msg)
13001 return reply
13002
13003
13004
13005 @ReturnMapping(None)
13006 async def CompleteMachineRemovals(self, entities):
13007 '''
13008 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13009 Returns -> None
13010 '''
13011 # map input types to rpc msg
13012 params = dict()
13013 msg = dict(type='MachineUndertaker', request='CompleteMachineRemovals', version=1, params=params)
13014 params['entities'] = entities
13015 reply = await self.rpc(msg)
13016 return reply
13017
13018
13019
13020 @ReturnMapping(ProviderInterfaceInfoResults)
13021 async def GetMachineProviderInterfaceInfo(self, entities):
13022 '''
13023 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13024 Returns -> typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
13025 '''
13026 # map input types to rpc msg
13027 params = dict()
13028 msg = dict(type='MachineUndertaker', request='GetMachineProviderInterfaceInfo', version=1, params=params)
13029 params['entities'] = entities
13030 reply = await self.rpc(msg)
13031 return reply
13032
13033
13034
13035 @ReturnMapping(NotifyWatchResults)
13036 async def WatchMachineRemovals(self, entities):
13037 '''
13038 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13039 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13040 '''
13041 # map input types to rpc msg
13042 params = dict()
13043 msg = dict(type='MachineUndertaker', request='WatchMachineRemovals', version=1, params=params)
13044 params['entities'] = entities
13045 reply = await self.rpc(msg)
13046 return reply
13047
13048
13049 class MachinerFacade(Type):
13050 name = 'Machiner'
13051 version = 1
13052 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
13053 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
13054 'type': 'array'},
13055 'type': 'array'}},
13056 'required': ['servers'],
13057 'type': 'object'},
13058 'Address': {'additionalProperties': False,
13059 'properties': {'scope': {'type': 'string'},
13060 'space-name': {'type': 'string'},
13061 'type': {'type': 'string'},
13062 'value': {'type': 'string'}},
13063 'required': ['value', 'type', 'scope'],
13064 'type': 'object'},
13065 'BytesResult': {'additionalProperties': False,
13066 'properties': {'result': {'items': {'type': 'integer'},
13067 'type': 'array'}},
13068 'required': ['result'],
13069 'type': 'object'},
13070 'Entities': {'additionalProperties': False,
13071 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13072 'type': 'array'}},
13073 'required': ['entities'],
13074 'type': 'object'},
13075 'Entity': {'additionalProperties': False,
13076 'properties': {'tag': {'type': 'string'}},
13077 'required': ['tag'],
13078 'type': 'object'},
13079 'EntityStatusArgs': {'additionalProperties': False,
13080 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
13081 'type': 'object'}},
13082 'type': 'object'},
13083 'info': {'type': 'string'},
13084 'status': {'type': 'string'},
13085 'tag': {'type': 'string'}},
13086 'required': ['tag',
13087 'status',
13088 'info',
13089 'data'],
13090 'type': 'object'},
13091 'Error': {'additionalProperties': False,
13092 'properties': {'code': {'type': 'string'},
13093 'info': {'$ref': '#/definitions/ErrorInfo'},
13094 'message': {'type': 'string'}},
13095 'required': ['message', 'code'],
13096 'type': 'object'},
13097 'ErrorInfo': {'additionalProperties': False,
13098 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13099 'macaroon-path': {'type': 'string'}},
13100 'type': 'object'},
13101 'ErrorResult': {'additionalProperties': False,
13102 'properties': {'error': {'$ref': '#/definitions/Error'}},
13103 'type': 'object'},
13104 'ErrorResults': {'additionalProperties': False,
13105 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13106 'type': 'array'}},
13107 'required': ['results'],
13108 'type': 'object'},
13109 'HostPort': {'additionalProperties': False,
13110 'properties': {'Address': {'$ref': '#/definitions/Address'},
13111 'port': {'type': 'integer'}},
13112 'required': ['Address', 'port'],
13113 'type': 'object'},
13114 'JobsResult': {'additionalProperties': False,
13115 'properties': {'error': {'$ref': '#/definitions/Error'},
13116 'jobs': {'items': {'type': 'string'},
13117 'type': 'array'}},
13118 'required': ['jobs'],
13119 'type': 'object'},
13120 'JobsResults': {'additionalProperties': False,
13121 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
13122 'type': 'array'}},
13123 'required': ['results'],
13124 'type': 'object'},
13125 'LifeResult': {'additionalProperties': False,
13126 'properties': {'error': {'$ref': '#/definitions/Error'},
13127 'life': {'type': 'string'}},
13128 'required': ['life'],
13129 'type': 'object'},
13130 'LifeResults': {'additionalProperties': False,
13131 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
13132 'type': 'array'}},
13133 'required': ['results'],
13134 'type': 'object'},
13135 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13136 'MachineAddresses': {'additionalProperties': False,
13137 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
13138 'type': 'array'},
13139 'tag': {'type': 'string'}},
13140 'required': ['tag', 'addresses'],
13141 'type': 'object'},
13142 'NetworkConfig': {'additionalProperties': False,
13143 'properties': {'address': {'type': 'string'},
13144 'cidr': {'type': 'string'},
13145 'config-type': {'type': 'string'},
13146 'device-index': {'type': 'integer'},
13147 'disabled': {'type': 'boolean'},
13148 'dns-search-domains': {'items': {'type': 'string'},
13149 'type': 'array'},
13150 'dns-servers': {'items': {'type': 'string'},
13151 'type': 'array'},
13152 'gateway-address': {'type': 'string'},
13153 'interface-name': {'type': 'string'},
13154 'interface-type': {'type': 'string'},
13155 'mac-address': {'type': 'string'},
13156 'mtu': {'type': 'integer'},
13157 'no-auto-start': {'type': 'boolean'},
13158 'parent-interface-name': {'type': 'string'},
13159 'provider-address-id': {'type': 'string'},
13160 'provider-id': {'type': 'string'},
13161 'provider-space-id': {'type': 'string'},
13162 'provider-subnet-id': {'type': 'string'},
13163 'provider-vlan-id': {'type': 'string'},
13164 'vlan-tag': {'type': 'integer'}},
13165 'required': ['device-index',
13166 'mac-address',
13167 'cidr',
13168 'mtu',
13169 'provider-id',
13170 'provider-subnet-id',
13171 'provider-space-id',
13172 'provider-address-id',
13173 'provider-vlan-id',
13174 'vlan-tag',
13175 'interface-name',
13176 'parent-interface-name',
13177 'interface-type',
13178 'disabled'],
13179 'type': 'object'},
13180 'NotifyWatchResult': {'additionalProperties': False,
13181 'properties': {'NotifyWatcherId': {'type': 'string'},
13182 'error': {'$ref': '#/definitions/Error'}},
13183 'required': ['NotifyWatcherId'],
13184 'type': 'object'},
13185 'NotifyWatchResults': {'additionalProperties': False,
13186 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13187 'type': 'array'}},
13188 'required': ['results'],
13189 'type': 'object'},
13190 'SetMachineNetworkConfig': {'additionalProperties': False,
13191 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
13192 'type': 'array'},
13193 'tag': {'type': 'string'}},
13194 'required': ['tag', 'config'],
13195 'type': 'object'},
13196 'SetMachinesAddresses': {'additionalProperties': False,
13197 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
13198 'type': 'array'}},
13199 'required': ['machine-addresses'],
13200 'type': 'object'},
13201 'SetStatus': {'additionalProperties': False,
13202 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
13203 'type': 'array'}},
13204 'required': ['entities'],
13205 'type': 'object'},
13206 'StringResult': {'additionalProperties': False,
13207 'properties': {'error': {'$ref': '#/definitions/Error'},
13208 'result': {'type': 'string'}},
13209 'required': ['result'],
13210 'type': 'object'},
13211 'StringsResult': {'additionalProperties': False,
13212 'properties': {'error': {'$ref': '#/definitions/Error'},
13213 'result': {'items': {'type': 'string'},
13214 'type': 'array'}},
13215 'type': 'object'}},
13216 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
13217 'type': 'object'},
13218 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
13219 'type': 'object'},
13220 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
13221 'type': 'object'},
13222 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13223 'Result': {'$ref': '#/definitions/ErrorResults'}},
13224 'type': 'object'},
13225 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13226 'Result': {'$ref': '#/definitions/JobsResults'}},
13227 'type': 'object'},
13228 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13229 'Result': {'$ref': '#/definitions/LifeResults'}},
13230 'type': 'object'},
13231 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
13232 'type': 'object'},
13233 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
13234 'Result': {'$ref': '#/definitions/ErrorResults'}},
13235 'type': 'object'},
13236 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
13237 'type': 'object'},
13238 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13239 'Result': {'$ref': '#/definitions/ErrorResults'}},
13240 'type': 'object'},
13241 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13242 'Result': {'$ref': '#/definitions/ErrorResults'}},
13243 'type': 'object'},
13244 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13245 'Result': {'$ref': '#/definitions/ErrorResults'}},
13246 'type': 'object'},
13247 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13248 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13249 'type': 'object'},
13250 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13251 'type': 'object'}},
13252 'type': 'object'}
13253
13254
13255 @ReturnMapping(StringsResult)
13256 async def APIAddresses(self):
13257 '''
13258
13259 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
13260 '''
13261 # map input types to rpc msg
13262 params = dict()
13263 msg = dict(type='Machiner', request='APIAddresses', version=1, params=params)
13264
13265 reply = await self.rpc(msg)
13266 return reply
13267
13268
13269
13270 @ReturnMapping(APIHostPortsResult)
13271 async def APIHostPorts(self):
13272 '''
13273
13274 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
13275 '''
13276 # map input types to rpc msg
13277 params = dict()
13278 msg = dict(type='Machiner', request='APIHostPorts', version=1, params=params)
13279
13280 reply = await self.rpc(msg)
13281 return reply
13282
13283
13284
13285 @ReturnMapping(BytesResult)
13286 async def CACert(self):
13287 '''
13288
13289 Returns -> typing.Sequence<+T_co>[int]
13290 '''
13291 # map input types to rpc msg
13292 params = dict()
13293 msg = dict(type='Machiner', request='CACert', version=1, params=params)
13294
13295 reply = await self.rpc(msg)
13296 return reply
13297
13298
13299
13300 @ReturnMapping(ErrorResults)
13301 async def EnsureDead(self, entities):
13302 '''
13303 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13304 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13305 '''
13306 # map input types to rpc msg
13307 params = dict()
13308 msg = dict(type='Machiner', request='EnsureDead', version=1, params=params)
13309 params['entities'] = entities
13310 reply = await self.rpc(msg)
13311 return reply
13312
13313
13314
13315 @ReturnMapping(JobsResults)
13316 async def Jobs(self, entities):
13317 '''
13318 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13319 Returns -> typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
13320 '''
13321 # map input types to rpc msg
13322 params = dict()
13323 msg = dict(type='Machiner', request='Jobs', version=1, params=params)
13324 params['entities'] = entities
13325 reply = await self.rpc(msg)
13326 return reply
13327
13328
13329
13330 @ReturnMapping(LifeResults)
13331 async def Life(self, entities):
13332 '''
13333 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13334 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
13335 '''
13336 # map input types to rpc msg
13337 params = dict()
13338 msg = dict(type='Machiner', request='Life', version=1, params=params)
13339 params['entities'] = entities
13340 reply = await self.rpc(msg)
13341 return reply
13342
13343
13344
13345 @ReturnMapping(StringResult)
13346 async def ModelUUID(self):
13347 '''
13348
13349 Returns -> typing.Union[_ForwardRef('Error'), str]
13350 '''
13351 # map input types to rpc msg
13352 params = dict()
13353 msg = dict(type='Machiner', request='ModelUUID', version=1, params=params)
13354
13355 reply = await self.rpc(msg)
13356 return reply
13357
13358
13359
13360 @ReturnMapping(ErrorResults)
13361 async def SetMachineAddresses(self, machine_addresses):
13362 '''
13363 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
13364 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13365 '''
13366 # map input types to rpc msg
13367 params = dict()
13368 msg = dict(type='Machiner', request='SetMachineAddresses', version=1, params=params)
13369 params['machine-addresses'] = machine_addresses
13370 reply = await self.rpc(msg)
13371 return reply
13372
13373
13374
13375 @ReturnMapping(None)
13376 async def SetObservedNetworkConfig(self, config, tag):
13377 '''
13378 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
13379 tag : str
13380 Returns -> None
13381 '''
13382 # map input types to rpc msg
13383 params = dict()
13384 msg = dict(type='Machiner', request='SetObservedNetworkConfig', version=1, params=params)
13385 params['config'] = config
13386 params['tag'] = tag
13387 reply = await self.rpc(msg)
13388 return reply
13389
13390
13391
13392 @ReturnMapping(ErrorResults)
13393 async def SetProviderNetworkConfig(self, entities):
13394 '''
13395 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13396 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13397 '''
13398 # map input types to rpc msg
13399 params = dict()
13400 msg = dict(type='Machiner', request='SetProviderNetworkConfig', version=1, params=params)
13401 params['entities'] = entities
13402 reply = await self.rpc(msg)
13403 return reply
13404
13405
13406
13407 @ReturnMapping(ErrorResults)
13408 async def SetStatus(self, entities):
13409 '''
13410 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
13411 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13412 '''
13413 # map input types to rpc msg
13414 params = dict()
13415 msg = dict(type='Machiner', request='SetStatus', version=1, params=params)
13416 params['entities'] = entities
13417 reply = await self.rpc(msg)
13418 return reply
13419
13420
13421
13422 @ReturnMapping(ErrorResults)
13423 async def UpdateStatus(self, entities):
13424 '''
13425 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
13426 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13427 '''
13428 # map input types to rpc msg
13429 params = dict()
13430 msg = dict(type='Machiner', request='UpdateStatus', version=1, params=params)
13431 params['entities'] = entities
13432 reply = await self.rpc(msg)
13433 return reply
13434
13435
13436
13437 @ReturnMapping(NotifyWatchResults)
13438 async def Watch(self, entities):
13439 '''
13440 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13441 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13442 '''
13443 # map input types to rpc msg
13444 params = dict()
13445 msg = dict(type='Machiner', request='Watch', version=1, params=params)
13446 params['entities'] = entities
13447 reply = await self.rpc(msg)
13448 return reply
13449
13450
13451
13452 @ReturnMapping(NotifyWatchResult)
13453 async def WatchAPIHostPorts(self):
13454 '''
13455
13456 Returns -> typing.Union[str, _ForwardRef('Error')]
13457 '''
13458 # map input types to rpc msg
13459 params = dict()
13460 msg = dict(type='Machiner', request='WatchAPIHostPorts', version=1, params=params)
13461
13462 reply = await self.rpc(msg)
13463 return reply
13464
13465
13466 class MeterStatusFacade(Type):
13467 name = 'MeterStatus'
13468 version = 1
13469 schema = {'definitions': {'Entities': {'additionalProperties': False,
13470 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13471 'type': 'array'}},
13472 'required': ['entities'],
13473 'type': 'object'},
13474 'Entity': {'additionalProperties': False,
13475 'properties': {'tag': {'type': 'string'}},
13476 'required': ['tag'],
13477 'type': 'object'},
13478 'Error': {'additionalProperties': False,
13479 'properties': {'code': {'type': 'string'},
13480 'info': {'$ref': '#/definitions/ErrorInfo'},
13481 'message': {'type': 'string'}},
13482 'required': ['message', 'code'],
13483 'type': 'object'},
13484 'ErrorInfo': {'additionalProperties': False,
13485 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13486 'macaroon-path': {'type': 'string'}},
13487 'type': 'object'},
13488 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13489 'MeterStatusResult': {'additionalProperties': False,
13490 'properties': {'code': {'type': 'string'},
13491 'error': {'$ref': '#/definitions/Error'},
13492 'info': {'type': 'string'}},
13493 'required': ['code', 'info'],
13494 'type': 'object'},
13495 'MeterStatusResults': {'additionalProperties': False,
13496 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
13497 'type': 'array'}},
13498 'required': ['results'],
13499 'type': 'object'},
13500 'NotifyWatchResult': {'additionalProperties': False,
13501 'properties': {'NotifyWatcherId': {'type': 'string'},
13502 'error': {'$ref': '#/definitions/Error'}},
13503 'required': ['NotifyWatcherId'],
13504 'type': 'object'},
13505 'NotifyWatchResults': {'additionalProperties': False,
13506 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13507 'type': 'array'}},
13508 'required': ['results'],
13509 'type': 'object'}},
13510 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13511 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
13512 'type': 'object'},
13513 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13514 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13515 'type': 'object'}},
13516 'type': 'object'}
13517
13518
13519 @ReturnMapping(MeterStatusResults)
13520 async def GetMeterStatus(self, entities):
13521 '''
13522 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13523 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
13524 '''
13525 # map input types to rpc msg
13526 params = dict()
13527 msg = dict(type='MeterStatus', request='GetMeterStatus', version=1, params=params)
13528 params['entities'] = entities
13529 reply = await self.rpc(msg)
13530 return reply
13531
13532
13533
13534 @ReturnMapping(NotifyWatchResults)
13535 async def WatchMeterStatus(self, entities):
13536 '''
13537 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13538 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13539 '''
13540 # map input types to rpc msg
13541 params = dict()
13542 msg = dict(type='MeterStatus', request='WatchMeterStatus', version=1, params=params)
13543 params['entities'] = entities
13544 reply = await self.rpc(msg)
13545 return reply
13546
13547
13548 class MetricsAdderFacade(Type):
13549 name = 'MetricsAdder'
13550 version = 2
13551 schema = {'definitions': {'Error': {'additionalProperties': False,
13552 'properties': {'code': {'type': 'string'},
13553 'info': {'$ref': '#/definitions/ErrorInfo'},
13554 'message': {'type': 'string'}},
13555 'required': ['message', 'code'],
13556 'type': 'object'},
13557 'ErrorInfo': {'additionalProperties': False,
13558 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13559 'macaroon-path': {'type': 'string'}},
13560 'type': 'object'},
13561 'ErrorResult': {'additionalProperties': False,
13562 'properties': {'error': {'$ref': '#/definitions/Error'}},
13563 'type': 'object'},
13564 'ErrorResults': {'additionalProperties': False,
13565 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13566 'type': 'array'}},
13567 'required': ['results'],
13568 'type': 'object'},
13569 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13570 'Metric': {'additionalProperties': False,
13571 'properties': {'key': {'type': 'string'},
13572 'time': {'format': 'date-time',
13573 'type': 'string'},
13574 'value': {'type': 'string'}},
13575 'required': ['key', 'value', 'time'],
13576 'type': 'object'},
13577 'MetricBatch': {'additionalProperties': False,
13578 'properties': {'charm-url': {'type': 'string'},
13579 'created': {'format': 'date-time',
13580 'type': 'string'},
13581 'metrics': {'items': {'$ref': '#/definitions/Metric'},
13582 'type': 'array'},
13583 'uuid': {'type': 'string'}},
13584 'required': ['uuid',
13585 'charm-url',
13586 'created',
13587 'metrics'],
13588 'type': 'object'},
13589 'MetricBatchParam': {'additionalProperties': False,
13590 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
13591 'tag': {'type': 'string'}},
13592 'required': ['tag', 'batch'],
13593 'type': 'object'},
13594 'MetricBatchParams': {'additionalProperties': False,
13595 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
13596 'type': 'array'}},
13597 'required': ['batches'],
13598 'type': 'object'}},
13599 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
13600 'Result': {'$ref': '#/definitions/ErrorResults'}},
13601 'type': 'object'}},
13602 'type': 'object'}
13603
13604
13605 @ReturnMapping(ErrorResults)
13606 async def AddMetricBatches(self, batches):
13607 '''
13608 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
13609 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13610 '''
13611 # map input types to rpc msg
13612 params = dict()
13613 msg = dict(type='MetricsAdder', request='AddMetricBatches', version=2, params=params)
13614 params['batches'] = batches
13615 reply = await self.rpc(msg)
13616 return reply
13617
13618
13619 class MetricsDebugFacade(Type):
13620 name = 'MetricsDebug'
13621 version = 2
13622 schema = {'definitions': {'Entities': {'additionalProperties': False,
13623 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13624 'type': 'array'}},
13625 'required': ['entities'],
13626 'type': 'object'},
13627 'Entity': {'additionalProperties': False,
13628 'properties': {'tag': {'type': 'string'}},
13629 'required': ['tag'],
13630 'type': 'object'},
13631 'EntityMetrics': {'additionalProperties': False,
13632 'properties': {'error': {'$ref': '#/definitions/Error'},
13633 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
13634 'type': 'array'}},
13635 'type': 'object'},
13636 'Error': {'additionalProperties': False,
13637 'properties': {'code': {'type': 'string'},
13638 'info': {'$ref': '#/definitions/ErrorInfo'},
13639 'message': {'type': 'string'}},
13640 'required': ['message', 'code'],
13641 'type': 'object'},
13642 'ErrorInfo': {'additionalProperties': False,
13643 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13644 'macaroon-path': {'type': 'string'}},
13645 'type': 'object'},
13646 'ErrorResult': {'additionalProperties': False,
13647 'properties': {'error': {'$ref': '#/definitions/Error'}},
13648 'type': 'object'},
13649 'ErrorResults': {'additionalProperties': False,
13650 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13651 'type': 'array'}},
13652 'required': ['results'],
13653 'type': 'object'},
13654 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13655 'MeterStatusParam': {'additionalProperties': False,
13656 'properties': {'code': {'type': 'string'},
13657 'info': {'type': 'string'},
13658 'tag': {'type': 'string'}},
13659 'required': ['tag', 'code', 'info'],
13660 'type': 'object'},
13661 'MeterStatusParams': {'additionalProperties': False,
13662 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
13663 'type': 'array'}},
13664 'required': ['statues'],
13665 'type': 'object'},
13666 'MetricResult': {'additionalProperties': False,
13667 'properties': {'key': {'type': 'string'},
13668 'time': {'format': 'date-time',
13669 'type': 'string'},
13670 'unit': {'type': 'string'},
13671 'value': {'type': 'string'}},
13672 'required': ['time', 'key', 'value', 'unit'],
13673 'type': 'object'},
13674 'MetricResults': {'additionalProperties': False,
13675 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
13676 'type': 'array'}},
13677 'required': ['results'],
13678 'type': 'object'}},
13679 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13680 'Result': {'$ref': '#/definitions/MetricResults'}},
13681 'type': 'object'},
13682 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
13683 'Result': {'$ref': '#/definitions/ErrorResults'}},
13684 'type': 'object'}},
13685 'type': 'object'}
13686
13687
13688 @ReturnMapping(MetricResults)
13689 async def GetMetrics(self, entities):
13690 '''
13691 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13692 Returns -> typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
13693 '''
13694 # map input types to rpc msg
13695 params = dict()
13696 msg = dict(type='MetricsDebug', request='GetMetrics', version=2, params=params)
13697 params['entities'] = entities
13698 reply = await self.rpc(msg)
13699 return reply
13700
13701
13702
13703 @ReturnMapping(ErrorResults)
13704 async def SetMeterStatus(self, statues):
13705 '''
13706 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
13707 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13708 '''
13709 # map input types to rpc msg
13710 params = dict()
13711 msg = dict(type='MetricsDebug', request='SetMeterStatus', version=2, params=params)
13712 params['statues'] = statues
13713 reply = await self.rpc(msg)
13714 return reply
13715
13716
13717 class MetricsManagerFacade(Type):
13718 name = 'MetricsManager'
13719 version = 1
13720 schema = {'definitions': {'Entities': {'additionalProperties': False,
13721 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13722 'type': 'array'}},
13723 'required': ['entities'],
13724 'type': 'object'},
13725 'Entity': {'additionalProperties': False,
13726 'properties': {'tag': {'type': 'string'}},
13727 'required': ['tag'],
13728 'type': 'object'},
13729 'Error': {'additionalProperties': False,
13730 'properties': {'code': {'type': 'string'},
13731 'info': {'$ref': '#/definitions/ErrorInfo'},
13732 'message': {'type': 'string'}},
13733 'required': ['message', 'code'],
13734 'type': 'object'},
13735 'ErrorInfo': {'additionalProperties': False,
13736 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13737 'macaroon-path': {'type': 'string'}},
13738 'type': 'object'},
13739 'ErrorResult': {'additionalProperties': False,
13740 'properties': {'error': {'$ref': '#/definitions/Error'}},
13741 'type': 'object'},
13742 'ErrorResults': {'additionalProperties': False,
13743 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13744 'type': 'array'}},
13745 'required': ['results'],
13746 'type': 'object'},
13747 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
13748 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13749 'Result': {'$ref': '#/definitions/ErrorResults'}},
13750 'type': 'object'},
13751 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13752 'Result': {'$ref': '#/definitions/ErrorResults'}},
13753 'type': 'object'}},
13754 'type': 'object'}
13755
13756
13757 @ReturnMapping(ErrorResults)
13758 async def CleanupOldMetrics(self, entities):
13759 '''
13760 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13761 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13762 '''
13763 # map input types to rpc msg
13764 params = dict()
13765 msg = dict(type='MetricsManager', request='CleanupOldMetrics', version=1, params=params)
13766 params['entities'] = entities
13767 reply = await self.rpc(msg)
13768 return reply
13769
13770
13771
13772 @ReturnMapping(ErrorResults)
13773 async def SendMetrics(self, entities):
13774 '''
13775 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13776 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13777 '''
13778 # map input types to rpc msg
13779 params = dict()
13780 msg = dict(type='MetricsManager', request='SendMetrics', version=1, params=params)
13781 params['entities'] = entities
13782 reply = await self.rpc(msg)
13783 return reply
13784
13785
13786 class MigrationFlagFacade(Type):
13787 name = 'MigrationFlag'
13788 version = 1
13789 schema = {'definitions': {'Entities': {'additionalProperties': False,
13790 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13791 'type': 'array'}},
13792 'required': ['entities'],
13793 'type': 'object'},
13794 'Entity': {'additionalProperties': False,
13795 'properties': {'tag': {'type': 'string'}},
13796 'required': ['tag'],
13797 'type': 'object'},
13798 'Error': {'additionalProperties': False,
13799 'properties': {'code': {'type': 'string'},
13800 'info': {'$ref': '#/definitions/ErrorInfo'},
13801 'message': {'type': 'string'}},
13802 'required': ['message', 'code'],
13803 'type': 'object'},
13804 'ErrorInfo': {'additionalProperties': False,
13805 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13806 'macaroon-path': {'type': 'string'}},
13807 'type': 'object'},
13808 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13809 'NotifyWatchResult': {'additionalProperties': False,
13810 'properties': {'NotifyWatcherId': {'type': 'string'},
13811 'error': {'$ref': '#/definitions/Error'}},
13812 'required': ['NotifyWatcherId'],
13813 'type': 'object'},
13814 'NotifyWatchResults': {'additionalProperties': False,
13815 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13816 'type': 'array'}},
13817 'required': ['results'],
13818 'type': 'object'},
13819 'PhaseResult': {'additionalProperties': False,
13820 'properties': {'error': {'$ref': '#/definitions/Error'},
13821 'phase': {'type': 'string'}},
13822 'type': 'object'},
13823 'PhaseResults': {'additionalProperties': False,
13824 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
13825 'type': 'array'}},
13826 'required': ['results'],
13827 'type': 'object'}},
13828 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13829 'Result': {'$ref': '#/definitions/PhaseResults'}},
13830 'type': 'object'},
13831 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13832 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13833 'type': 'object'}},
13834 'type': 'object'}
13835
13836
13837 @ReturnMapping(PhaseResults)
13838 async def Phase(self, entities):
13839 '''
13840 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13841 Returns -> typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
13842 '''
13843 # map input types to rpc msg
13844 params = dict()
13845 msg = dict(type='MigrationFlag', request='Phase', version=1, params=params)
13846 params['entities'] = entities
13847 reply = await self.rpc(msg)
13848 return reply
13849
13850
13851
13852 @ReturnMapping(NotifyWatchResults)
13853 async def Watch(self, entities):
13854 '''
13855 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13856 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13857 '''
13858 # map input types to rpc msg
13859 params = dict()
13860 msg = dict(type='MigrationFlag', request='Watch', version=1, params=params)
13861 params['entities'] = entities
13862 reply = await self.rpc(msg)
13863 return reply
13864
13865
13866 class MigrationMasterFacade(Type):
13867 name = 'MigrationMaster'
13868 version = 1
13869 schema = {'definitions': {'Error': {'additionalProperties': False,
13870 'properties': {'code': {'type': 'string'},
13871 'info': {'$ref': '#/definitions/ErrorInfo'},
13872 'message': {'type': 'string'}},
13873 'required': ['message', 'code'],
13874 'type': 'object'},
13875 'ErrorInfo': {'additionalProperties': False,
13876 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13877 'macaroon-path': {'type': 'string'}},
13878 'type': 'object'},
13879 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13880 'MasterMigrationStatus': {'additionalProperties': False,
13881 'properties': {'migration-id': {'type': 'string'},
13882 'phase': {'type': 'string'},
13883 'phase-changed-time': {'format': 'date-time',
13884 'type': 'string'},
13885 'spec': {'$ref': '#/definitions/MigrationSpec'}},
13886 'required': ['spec',
13887 'migration-id',
13888 'phase',
13889 'phase-changed-time'],
13890 'type': 'object'},
13891 'MigrationModelInfo': {'additionalProperties': False,
13892 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
13893 'name': {'type': 'string'},
13894 'owner-tag': {'type': 'string'},
13895 'uuid': {'type': 'string'}},
13896 'required': ['uuid',
13897 'name',
13898 'owner-tag',
13899 'agent-version'],
13900 'type': 'object'},
13901 'MigrationSpec': {'additionalProperties': False,
13902 'properties': {'external-control': {'type': 'boolean'},
13903 'model-tag': {'type': 'string'},
13904 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
13905 'required': ['model-tag',
13906 'target-info',
13907 'external-control'],
13908 'type': 'object'},
13909 'MigrationTargetInfo': {'additionalProperties': False,
13910 'properties': {'addrs': {'items': {'type': 'string'},
13911 'type': 'array'},
13912 'auth-tag': {'type': 'string'},
13913 'ca-cert': {'type': 'string'},
13914 'controller-tag': {'type': 'string'},
13915 'macaroons': {'type': 'string'},
13916 'password': {'type': 'string'}},
13917 'required': ['controller-tag',
13918 'addrs',
13919 'ca-cert',
13920 'auth-tag'],
13921 'type': 'object'},
13922 'MinionReports': {'additionalProperties': False,
13923 'properties': {'failed': {'items': {'type': 'string'},
13924 'type': 'array'},
13925 'migration-id': {'type': 'string'},
13926 'phase': {'type': 'string'},
13927 'success-count': {'type': 'integer'},
13928 'unknown-count': {'type': 'integer'},
13929 'unknown-sample': {'items': {'type': 'string'},
13930 'type': 'array'}},
13931 'required': ['migration-id',
13932 'phase',
13933 'success-count',
13934 'unknown-count',
13935 'unknown-sample',
13936 'failed'],
13937 'type': 'object'},
13938 'NotifyWatchResult': {'additionalProperties': False,
13939 'properties': {'NotifyWatcherId': {'type': 'string'},
13940 'error': {'$ref': '#/definitions/Error'}},
13941 'required': ['NotifyWatcherId'],
13942 'type': 'object'},
13943 'Number': {'additionalProperties': False,
13944 'properties': {'Build': {'type': 'integer'},
13945 'Major': {'type': 'integer'},
13946 'Minor': {'type': 'integer'},
13947 'Patch': {'type': 'integer'},
13948 'Tag': {'type': 'string'}},
13949 'required': ['Major',
13950 'Minor',
13951 'Tag',
13952 'Patch',
13953 'Build'],
13954 'type': 'object'},
13955 'SerializedModel': {'additionalProperties': False,
13956 'properties': {'bytes': {'items': {'type': 'integer'},
13957 'type': 'array'},
13958 'charms': {'items': {'type': 'string'},
13959 'type': 'array'},
13960 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
13961 'type': 'array'}},
13962 'required': ['bytes', 'charms', 'tools'],
13963 'type': 'object'},
13964 'SerializedModelTools': {'additionalProperties': False,
13965 'properties': {'uri': {'type': 'string'},
13966 'version': {'type': 'string'}},
13967 'required': ['version', 'uri'],
13968 'type': 'object'},
13969 'SetMigrationPhaseArgs': {'additionalProperties': False,
13970 'properties': {'phase': {'type': 'string'}},
13971 'required': ['phase'],
13972 'type': 'object'},
13973 'SetMigrationStatusMessageArgs': {'additionalProperties': False,
13974 'properties': {'message': {'type': 'string'}},
13975 'required': ['message'],
13976 'type': 'object'}},
13977 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
13978 'type': 'object'},
13979 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}},
13980 'type': 'object'},
13981 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}},
13982 'type': 'object'},
13983 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}},
13984 'type': 'object'},
13985 'Prechecks': {'type': 'object'},
13986 'Reap': {'type': 'object'},
13987 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
13988 'type': 'object'},
13989 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
13990 'type': 'object'},
13991 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13992 'type': 'object'},
13993 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13994 'type': 'object'}},
13995 'type': 'object'}
13996
13997
13998 @ReturnMapping(SerializedModel)
13999 async def Export(self):
14000 '''
14001
14002 Returns -> typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
14003 '''
14004 # map input types to rpc msg
14005 params = dict()
14006 msg = dict(type='MigrationMaster', request='Export', version=1, params=params)
14007
14008 reply = await self.rpc(msg)
14009 return reply
14010
14011
14012
14013 @ReturnMapping(MasterMigrationStatus)
14014 async def MigrationStatus(self):
14015 '''
14016
14017 Returns -> typing.Union[str, _ForwardRef('MigrationSpec')]
14018 '''
14019 # map input types to rpc msg
14020 params = dict()
14021 msg = dict(type='MigrationMaster', request='MigrationStatus', version=1, params=params)
14022
14023 reply = await self.rpc(msg)
14024 return reply
14025
14026
14027
14028 @ReturnMapping(MinionReports)
14029 async def MinionReports(self):
14030 '''
14031
14032 Returns -> typing.Union[typing.Sequence<+T_co>[str], int]
14033 '''
14034 # map input types to rpc msg
14035 params = dict()
14036 msg = dict(type='MigrationMaster', request='MinionReports', version=1, params=params)
14037
14038 reply = await self.rpc(msg)
14039 return reply
14040
14041
14042
14043 @ReturnMapping(MigrationModelInfo)
14044 async def ModelInfo(self):
14045 '''
14046
14047 Returns -> typing.Union[_ForwardRef('Number'), str]
14048 '''
14049 # map input types to rpc msg
14050 params = dict()
14051 msg = dict(type='MigrationMaster', request='ModelInfo', version=1, params=params)
14052
14053 reply = await self.rpc(msg)
14054 return reply
14055
14056
14057
14058 @ReturnMapping(None)
14059 async def Prechecks(self):
14060 '''
14061
14062 Returns -> None
14063 '''
14064 # map input types to rpc msg
14065 params = dict()
14066 msg = dict(type='MigrationMaster', request='Prechecks', version=1, params=params)
14067
14068 reply = await self.rpc(msg)
14069 return reply
14070
14071
14072
14073 @ReturnMapping(None)
14074 async def Reap(self):
14075 '''
14076
14077 Returns -> None
14078 '''
14079 # map input types to rpc msg
14080 params = dict()
14081 msg = dict(type='MigrationMaster', request='Reap', version=1, params=params)
14082
14083 reply = await self.rpc(msg)
14084 return reply
14085
14086
14087
14088 @ReturnMapping(None)
14089 async def SetPhase(self, phase):
14090 '''
14091 phase : str
14092 Returns -> None
14093 '''
14094 # map input types to rpc msg
14095 params = dict()
14096 msg = dict(type='MigrationMaster', request='SetPhase', version=1, params=params)
14097 params['phase'] = phase
14098 reply = await self.rpc(msg)
14099 return reply
14100
14101
14102
14103 @ReturnMapping(None)
14104 async def SetStatusMessage(self, message):
14105 '''
14106 message : str
14107 Returns -> None
14108 '''
14109 # map input types to rpc msg
14110 params = dict()
14111 msg = dict(type='MigrationMaster', request='SetStatusMessage', version=1, params=params)
14112 params['message'] = message
14113 reply = await self.rpc(msg)
14114 return reply
14115
14116
14117
14118 @ReturnMapping(NotifyWatchResult)
14119 async def Watch(self):
14120 '''
14121
14122 Returns -> typing.Union[str, _ForwardRef('Error')]
14123 '''
14124 # map input types to rpc msg
14125 params = dict()
14126 msg = dict(type='MigrationMaster', request='Watch', version=1, params=params)
14127
14128 reply = await self.rpc(msg)
14129 return reply
14130
14131
14132
14133 @ReturnMapping(NotifyWatchResult)
14134 async def WatchMinionReports(self):
14135 '''
14136
14137 Returns -> typing.Union[str, _ForwardRef('Error')]
14138 '''
14139 # map input types to rpc msg
14140 params = dict()
14141 msg = dict(type='MigrationMaster', request='WatchMinionReports', version=1, params=params)
14142
14143 reply = await self.rpc(msg)
14144 return reply
14145
14146
14147 class MigrationMinionFacade(Type):
14148 name = 'MigrationMinion'
14149 version = 1
14150 schema = {'definitions': {'Error': {'additionalProperties': False,
14151 'properties': {'code': {'type': 'string'},
14152 'info': {'$ref': '#/definitions/ErrorInfo'},
14153 'message': {'type': 'string'}},
14154 'required': ['message', 'code'],
14155 'type': 'object'},
14156 'ErrorInfo': {'additionalProperties': False,
14157 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14158 'macaroon-path': {'type': 'string'}},
14159 'type': 'object'},
14160 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14161 'MinionReport': {'additionalProperties': False,
14162 'properties': {'migration-id': {'type': 'string'},
14163 'phase': {'type': 'string'},
14164 'success': {'type': 'boolean'}},
14165 'required': ['migration-id',
14166 'phase',
14167 'success'],
14168 'type': 'object'},
14169 'NotifyWatchResult': {'additionalProperties': False,
14170 'properties': {'NotifyWatcherId': {'type': 'string'},
14171 'error': {'$ref': '#/definitions/Error'}},
14172 'required': ['NotifyWatcherId'],
14173 'type': 'object'}},
14174 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}},
14175 'type': 'object'},
14176 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14177 'type': 'object'}},
14178 'type': 'object'}
14179
14180
14181 @ReturnMapping(None)
14182 async def Report(self, migration_id, phase, success):
14183 '''
14184 migration_id : str
14185 phase : str
14186 success : bool
14187 Returns -> None
14188 '''
14189 # map input types to rpc msg
14190 params = dict()
14191 msg = dict(type='MigrationMinion', request='Report', version=1, params=params)
14192 params['migration-id'] = migration_id
14193 params['phase'] = phase
14194 params['success'] = success
14195 reply = await self.rpc(msg)
14196 return reply
14197
14198
14199
14200 @ReturnMapping(NotifyWatchResult)
14201 async def Watch(self):
14202 '''
14203
14204 Returns -> typing.Union[str, _ForwardRef('Error')]
14205 '''
14206 # map input types to rpc msg
14207 params = dict()
14208 msg = dict(type='MigrationMinion', request='Watch', version=1, params=params)
14209
14210 reply = await self.rpc(msg)
14211 return reply
14212
14213
14214 class MigrationStatusWatcherFacade(Type):
14215 name = 'MigrationStatusWatcher'
14216 version = 1
14217 schema = {'definitions': {'MigrationStatus': {'additionalProperties': False,
14218 'properties': {'attempt': {'type': 'integer'},
14219 'migration-id': {'type': 'string'},
14220 'phase': {'type': 'string'},
14221 'source-api-addrs': {'items': {'type': 'string'},
14222 'type': 'array'},
14223 'source-ca-cert': {'type': 'string'},
14224 'target-api-addrs': {'items': {'type': 'string'},
14225 'type': 'array'},
14226 'target-ca-cert': {'type': 'string'}},
14227 'required': ['migration-id',
14228 'attempt',
14229 'phase',
14230 'source-api-addrs',
14231 'source-ca-cert',
14232 'target-api-addrs',
14233 'target-ca-cert'],
14234 'type': 'object'}},
14235 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
14236 'type': 'object'},
14237 'Stop': {'type': 'object'}},
14238 'type': 'object'}
14239
14240
14241 @ReturnMapping(MigrationStatus)
14242 async def Next(self):
14243 '''
14244
14245 Returns -> typing.Union[int, typing.Sequence<+T_co>[str]]
14246 '''
14247 # map input types to rpc msg
14248 params = dict()
14249 msg = dict(type='MigrationStatusWatcher', request='Next', version=1, params=params)
14250
14251 reply = await self.rpc(msg)
14252 return reply
14253
14254
14255
14256 @ReturnMapping(None)
14257 async def Stop(self):
14258 '''
14259
14260 Returns -> None
14261 '''
14262 # map input types to rpc msg
14263 params = dict()
14264 msg = dict(type='MigrationStatusWatcher', request='Stop', version=1, params=params)
14265
14266 reply = await self.rpc(msg)
14267 return reply
14268
14269
14270 class MigrationTargetFacade(Type):
14271 name = 'MigrationTarget'
14272 version = 1
14273 schema = {'definitions': {'MigrationModelInfo': {'additionalProperties': False,
14274 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
14275 'name': {'type': 'string'},
14276 'owner-tag': {'type': 'string'},
14277 'uuid': {'type': 'string'}},
14278 'required': ['uuid',
14279 'name',
14280 'owner-tag',
14281 'agent-version'],
14282 'type': 'object'},
14283 'ModelArgs': {'additionalProperties': False,
14284 'properties': {'model-tag': {'type': 'string'}},
14285 'required': ['model-tag'],
14286 'type': 'object'},
14287 'Number': {'additionalProperties': False,
14288 'properties': {'Build': {'type': 'integer'},
14289 'Major': {'type': 'integer'},
14290 'Minor': {'type': 'integer'},
14291 'Patch': {'type': 'integer'},
14292 'Tag': {'type': 'string'}},
14293 'required': ['Major',
14294 'Minor',
14295 'Tag',
14296 'Patch',
14297 'Build'],
14298 'type': 'object'},
14299 'SerializedModel': {'additionalProperties': False,
14300 'properties': {'bytes': {'items': {'type': 'integer'},
14301 'type': 'array'},
14302 'charms': {'items': {'type': 'string'},
14303 'type': 'array'},
14304 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
14305 'type': 'array'}},
14306 'required': ['bytes', 'charms', 'tools'],
14307 'type': 'object'},
14308 'SerializedModelTools': {'additionalProperties': False,
14309 'properties': {'uri': {'type': 'string'},
14310 'version': {'type': 'string'}},
14311 'required': ['version', 'uri'],
14312 'type': 'object'}},
14313 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
14314 'type': 'object'},
14315 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
14316 'type': 'object'},
14317 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
14318 'type': 'object'},
14319 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}},
14320 'type': 'object'}},
14321 'type': 'object'}
14322
14323
14324 @ReturnMapping(None)
14325 async def Abort(self, model_tag):
14326 '''
14327 model_tag : str
14328 Returns -> None
14329 '''
14330 # map input types to rpc msg
14331 params = dict()
14332 msg = dict(type='MigrationTarget', request='Abort', version=1, params=params)
14333 params['model-tag'] = model_tag
14334 reply = await self.rpc(msg)
14335 return reply
14336
14337
14338
14339 @ReturnMapping(None)
14340 async def Activate(self, model_tag):
14341 '''
14342 model_tag : str
14343 Returns -> None
14344 '''
14345 # map input types to rpc msg
14346 params = dict()
14347 msg = dict(type='MigrationTarget', request='Activate', version=1, params=params)
14348 params['model-tag'] = model_tag
14349 reply = await self.rpc(msg)
14350 return reply
14351
14352
14353
14354 @ReturnMapping(None)
14355 async def Import(self, bytes_, charms, tools):
14356 '''
14357 bytes_ : typing.Sequence<+T_co>[int]
14358 charms : typing.Sequence<+T_co>[str]
14359 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
14360 Returns -> None
14361 '''
14362 # map input types to rpc msg
14363 params = dict()
14364 msg = dict(type='MigrationTarget', request='Import', version=1, params=params)
14365 params['bytes'] = bytes_
14366 params['charms'] = charms
14367 params['tools'] = tools
14368 reply = await self.rpc(msg)
14369 return reply
14370
14371
14372
14373 @ReturnMapping(None)
14374 async def Prechecks(self, agent_version, name, owner_tag, uuid):
14375 '''
14376 agent_version : Number
14377 name : str
14378 owner_tag : str
14379 uuid : str
14380 Returns -> None
14381 '''
14382 # map input types to rpc msg
14383 params = dict()
14384 msg = dict(type='MigrationTarget', request='Prechecks', version=1, params=params)
14385 params['agent-version'] = agent_version
14386 params['name'] = name
14387 params['owner-tag'] = owner_tag
14388 params['uuid'] = uuid
14389 reply = await self.rpc(msg)
14390 return reply
14391
14392
14393 class ModelConfigFacade(Type):
14394 name = 'ModelConfig'
14395 version = 1
14396 schema = {'definitions': {'ConfigValue': {'additionalProperties': False,
14397 'properties': {'source': {'type': 'string'},
14398 'value': {'additionalProperties': True,
14399 'type': 'object'}},
14400 'required': ['value', 'source'],
14401 'type': 'object'},
14402 'Error': {'additionalProperties': False,
14403 'properties': {'code': {'type': 'string'},
14404 'info': {'$ref': '#/definitions/ErrorInfo'},
14405 'message': {'type': 'string'}},
14406 'required': ['message', 'code'],
14407 'type': 'object'},
14408 'ErrorInfo': {'additionalProperties': False,
14409 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14410 'macaroon-path': {'type': 'string'}},
14411 'type': 'object'},
14412 'ErrorResult': {'additionalProperties': False,
14413 'properties': {'error': {'$ref': '#/definitions/Error'}},
14414 'type': 'object'},
14415 'ErrorResults': {'additionalProperties': False,
14416 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14417 'type': 'array'}},
14418 'required': ['results'],
14419 'type': 'object'},
14420 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14421 'ModelConfigResults': {'additionalProperties': False,
14422 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
14423 'type': 'object'}},
14424 'required': ['config'],
14425 'type': 'object'},
14426 'ModelDefaultValues': {'additionalProperties': False,
14427 'properties': {'cloud-region': {'type': 'string'},
14428 'cloud-tag': {'type': 'string'},
14429 'config': {'patternProperties': {'.*': {'additionalProperties': True,
14430 'type': 'object'}},
14431 'type': 'object'}},
14432 'required': ['config'],
14433 'type': 'object'},
14434 'ModelDefaults': {'additionalProperties': False,
14435 'properties': {'controller': {'additionalProperties': True,
14436 'type': 'object'},
14437 'default': {'additionalProperties': True,
14438 'type': 'object'},
14439 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
14440 'type': 'array'}},
14441 'type': 'object'},
14442 'ModelDefaultsResult': {'additionalProperties': False,
14443 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
14444 'type': 'object'}},
14445 'required': ['config'],
14446 'type': 'object'},
14447 'ModelSet': {'additionalProperties': False,
14448 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
14449 'type': 'object'}},
14450 'type': 'object'}},
14451 'required': ['config'],
14452 'type': 'object'},
14453 'ModelUnset': {'additionalProperties': False,
14454 'properties': {'keys': {'items': {'type': 'string'},
14455 'type': 'array'}},
14456 'required': ['keys'],
14457 'type': 'object'},
14458 'ModelUnsetKeys': {'additionalProperties': False,
14459 'properties': {'cloud-region': {'type': 'string'},
14460 'cloud-tag': {'type': 'string'},
14461 'keys': {'items': {'type': 'string'},
14462 'type': 'array'}},
14463 'required': ['keys'],
14464 'type': 'object'},
14465 'RegionDefaults': {'additionalProperties': False,
14466 'properties': {'region-name': {'type': 'string'},
14467 'value': {'additionalProperties': True,
14468 'type': 'object'}},
14469 'required': ['region-name', 'value'],
14470 'type': 'object'},
14471 'SetModelDefaults': {'additionalProperties': False,
14472 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
14473 'type': 'array'}},
14474 'required': ['config'],
14475 'type': 'object'},
14476 'UnsetModelDefaults': {'additionalProperties': False,
14477 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
14478 'type': 'array'}},
14479 'required': ['keys'],
14480 'type': 'object'}},
14481 'properties': {'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
14482 'type': 'object'},
14483 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
14484 'type': 'object'},
14485 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
14486 'type': 'object'},
14487 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
14488 'type': 'object'},
14489 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
14490 'Result': {'$ref': '#/definitions/ErrorResults'}},
14491 'type': 'object'},
14492 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
14493 'Result': {'$ref': '#/definitions/ErrorResults'}},
14494 'type': 'object'}},
14495 'type': 'object'}
14496
14497
14498 @ReturnMapping(ModelDefaultsResult)
14499 async def ModelDefaults(self):
14500 '''
14501
14502 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
14503 '''
14504 # map input types to rpc msg
14505 params = dict()
14506 msg = dict(type='ModelConfig', request='ModelDefaults', version=1, params=params)
14507
14508 reply = await self.rpc(msg)
14509 return reply
14510
14511
14512
14513 @ReturnMapping(ModelConfigResults)
14514 async def ModelGet(self):
14515 '''
14516
14517 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
14518 '''
14519 # map input types to rpc msg
14520 params = dict()
14521 msg = dict(type='ModelConfig', request='ModelGet', version=1, params=params)
14522
14523 reply = await self.rpc(msg)
14524 return reply
14525
14526
14527
14528 @ReturnMapping(None)
14529 async def ModelSet(self, config):
14530 '''
14531 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
14532 Returns -> None
14533 '''
14534 # map input types to rpc msg
14535 params = dict()
14536 msg = dict(type='ModelConfig', request='ModelSet', version=1, params=params)
14537 params['config'] = config
14538 reply = await self.rpc(msg)
14539 return reply
14540
14541
14542
14543 @ReturnMapping(None)
14544 async def ModelUnset(self, keys):
14545 '''
14546 keys : typing.Sequence<+T_co>[str]
14547 Returns -> None
14548 '''
14549 # map input types to rpc msg
14550 params = dict()
14551 msg = dict(type='ModelConfig', request='ModelUnset', version=1, params=params)
14552 params['keys'] = keys
14553 reply = await self.rpc(msg)
14554 return reply
14555
14556
14557
14558 @ReturnMapping(ErrorResults)
14559 async def SetModelDefaults(self, config):
14560 '''
14561 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
14562 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14563 '''
14564 # map input types to rpc msg
14565 params = dict()
14566 msg = dict(type='ModelConfig', request='SetModelDefaults', version=1, params=params)
14567 params['config'] = config
14568 reply = await self.rpc(msg)
14569 return reply
14570
14571
14572
14573 @ReturnMapping(ErrorResults)
14574 async def UnsetModelDefaults(self, keys):
14575 '''
14576 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
14577 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14578 '''
14579 # map input types to rpc msg
14580 params = dict()
14581 msg = dict(type='ModelConfig', request='UnsetModelDefaults', version=1, params=params)
14582 params['keys'] = keys
14583 reply = await self.rpc(msg)
14584 return reply
14585
14586
14587 class ModelManagerFacade(Type):
14588 name = 'ModelManager'
14589 version = 2
14590 schema = {'definitions': {'Entities': {'additionalProperties': False,
14591 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14592 'type': 'array'}},
14593 'required': ['entities'],
14594 'type': 'object'},
14595 'Entity': {'additionalProperties': False,
14596 'properties': {'tag': {'type': 'string'}},
14597 'required': ['tag'],
14598 'type': 'object'},
14599 'EntityStatus': {'additionalProperties': False,
14600 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
14601 'type': 'object'}},
14602 'type': 'object'},
14603 'info': {'type': 'string'},
14604 'since': {'format': 'date-time',
14605 'type': 'string'},
14606 'status': {'type': 'string'}},
14607 'required': ['status', 'info', 'since'],
14608 'type': 'object'},
14609 'Error': {'additionalProperties': False,
14610 'properties': {'code': {'type': 'string'},
14611 'info': {'$ref': '#/definitions/ErrorInfo'},
14612 'message': {'type': 'string'}},
14613 'required': ['message', 'code'],
14614 'type': 'object'},
14615 'ErrorInfo': {'additionalProperties': False,
14616 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14617 'macaroon-path': {'type': 'string'}},
14618 'type': 'object'},
14619 'ErrorResult': {'additionalProperties': False,
14620 'properties': {'error': {'$ref': '#/definitions/Error'}},
14621 'type': 'object'},
14622 'ErrorResults': {'additionalProperties': False,
14623 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14624 'type': 'array'}},
14625 'required': ['results'],
14626 'type': 'object'},
14627 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14628 'MachineHardware': {'additionalProperties': False,
14629 'properties': {'arch': {'type': 'string'},
14630 'availability-zone': {'type': 'string'},
14631 'cores': {'type': 'integer'},
14632 'cpu-power': {'type': 'integer'},
14633 'mem': {'type': 'integer'},
14634 'root-disk': {'type': 'integer'},
14635 'tags': {'items': {'type': 'string'},
14636 'type': 'array'}},
14637 'type': 'object'},
14638 'MapResult': {'additionalProperties': False,
14639 'properties': {'error': {'$ref': '#/definitions/Error'},
14640 'result': {'patternProperties': {'.*': {'additionalProperties': True,
14641 'type': 'object'}},
14642 'type': 'object'}},
14643 'required': ['result'],
14644 'type': 'object'},
14645 'MapResults': {'additionalProperties': False,
14646 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
14647 'type': 'array'}},
14648 'required': ['results'],
14649 'type': 'object'},
14650 'Model': {'additionalProperties': False,
14651 'properties': {'name': {'type': 'string'},
14652 'owner-tag': {'type': 'string'},
14653 'uuid': {'type': 'string'}},
14654 'required': ['name', 'uuid', 'owner-tag'],
14655 'type': 'object'},
14656 'ModelCreateArgs': {'additionalProperties': False,
14657 'properties': {'cloud-tag': {'type': 'string'},
14658 'config': {'patternProperties': {'.*': {'additionalProperties': True,
14659 'type': 'object'}},
14660 'type': 'object'},
14661 'credential': {'type': 'string'},
14662 'name': {'type': 'string'},
14663 'owner-tag': {'type': 'string'},
14664 'region': {'type': 'string'}},
14665 'required': ['name', 'owner-tag'],
14666 'type': 'object'},
14667 'ModelInfo': {'additionalProperties': False,
14668 'properties': {'cloud': {'type': 'string'},
14669 'cloud-credential-tag': {'type': 'string'},
14670 'cloud-region': {'type': 'string'},
14671 'controller-uuid': {'type': 'string'},
14672 'default-series': {'type': 'string'},
14673 'life': {'type': 'string'},
14674 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
14675 'type': 'array'},
14676 'name': {'type': 'string'},
14677 'owner-tag': {'type': 'string'},
14678 'provider-type': {'type': 'string'},
14679 'status': {'$ref': '#/definitions/EntityStatus'},
14680 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
14681 'type': 'array'},
14682 'uuid': {'type': 'string'}},
14683 'required': ['name',
14684 'uuid',
14685 'controller-uuid',
14686 'provider-type',
14687 'default-series',
14688 'cloud',
14689 'owner-tag',
14690 'life',
14691 'status',
14692 'users',
14693 'machines'],
14694 'type': 'object'},
14695 'ModelInfoResult': {'additionalProperties': False,
14696 'properties': {'error': {'$ref': '#/definitions/Error'},
14697 'result': {'$ref': '#/definitions/ModelInfo'}},
14698 'type': 'object'},
14699 'ModelInfoResults': {'additionalProperties': False,
14700 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
14701 'type': 'array'}},
14702 'required': ['results'],
14703 'type': 'object'},
14704 'ModelMachineInfo': {'additionalProperties': False,
14705 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
14706 'id': {'type': 'string'}},
14707 'required': ['id'],
14708 'type': 'object'},
14709 'ModelUserInfo': {'additionalProperties': False,
14710 'properties': {'access': {'type': 'string'},
14711 'display-name': {'type': 'string'},
14712 'last-connection': {'format': 'date-time',
14713 'type': 'string'},
14714 'user': {'type': 'string'}},
14715 'required': ['user',
14716 'display-name',
14717 'last-connection',
14718 'access'],
14719 'type': 'object'},
14720 'ModifyModelAccess': {'additionalProperties': False,
14721 'properties': {'access': {'type': 'string'},
14722 'action': {'type': 'string'},
14723 'model-tag': {'type': 'string'},
14724 'user-tag': {'type': 'string'}},
14725 'required': ['user-tag',
14726 'action',
14727 'access',
14728 'model-tag'],
14729 'type': 'object'},
14730 'ModifyModelAccessRequest': {'additionalProperties': False,
14731 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
14732 'type': 'array'}},
14733 'required': ['changes'],
14734 'type': 'object'},
14735 'UserModel': {'additionalProperties': False,
14736 'properties': {'last-connection': {'format': 'date-time',
14737 'type': 'string'},
14738 'model': {'$ref': '#/definitions/Model'}},
14739 'required': ['model', 'last-connection'],
14740 'type': 'object'},
14741 'UserModelList': {'additionalProperties': False,
14742 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
14743 'type': 'array'}},
14744 'required': ['user-models'],
14745 'type': 'object'}},
14746 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
14747 'Result': {'$ref': '#/definitions/ModelInfo'}},
14748 'type': 'object'},
14749 'DestroyModel': {'type': 'object'},
14750 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14751 'Result': {'$ref': '#/definitions/ErrorResults'}},
14752 'type': 'object'},
14753 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14754 'Result': {'$ref': '#/definitions/MapResults'}},
14755 'type': 'object'},
14756 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14757 'Result': {'$ref': '#/definitions/MapResults'}},
14758 'type': 'object'},
14759 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
14760 'Result': {'$ref': '#/definitions/UserModelList'}},
14761 'type': 'object'},
14762 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14763 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
14764 'type': 'object'},
14765 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
14766 'Result': {'$ref': '#/definitions/ErrorResults'}},
14767 'type': 'object'}},
14768 'type': 'object'}
14769
14770
14771 @ReturnMapping(ModelInfo)
14772 async def CreateModel(self, cloud_tag, config, credential, name, owner_tag, region):
14773 '''
14774 cloud_tag : str
14775 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
14776 credential : str
14777 name : str
14778 owner_tag : str
14779 region : str
14780 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
14781 '''
14782 # map input types to rpc msg
14783 params = dict()
14784 msg = dict(type='ModelManager', request='CreateModel', version=2, params=params)
14785 params['cloud-tag'] = cloud_tag
14786 params['config'] = config
14787 params['credential'] = credential
14788 params['name'] = name
14789 params['owner-tag'] = owner_tag
14790 params['region'] = region
14791 reply = await self.rpc(msg)
14792 return reply
14793
14794
14795
14796 @ReturnMapping(None)
14797 async def DestroyModel(self):
14798 '''
14799
14800 Returns -> None
14801 '''
14802 # map input types to rpc msg
14803 params = dict()
14804 msg = dict(type='ModelManager', request='DestroyModel', version=2, params=params)
14805
14806 reply = await self.rpc(msg)
14807 return reply
14808
14809
14810
14811 @ReturnMapping(ErrorResults)
14812 async def DestroyModels(self, entities):
14813 '''
14814 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14815 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14816 '''
14817 # map input types to rpc msg
14818 params = dict()
14819 msg = dict(type='ModelManager', request='DestroyModels', version=2, params=params)
14820 params['entities'] = entities
14821 reply = await self.rpc(msg)
14822 return reply
14823
14824
14825
14826 @ReturnMapping(MapResults)
14827 async def DumpModels(self, entities):
14828 '''
14829 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14830 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
14831 '''
14832 # map input types to rpc msg
14833 params = dict()
14834 msg = dict(type='ModelManager', request='DumpModels', version=2, params=params)
14835 params['entities'] = entities
14836 reply = await self.rpc(msg)
14837 return reply
14838
14839
14840
14841 @ReturnMapping(MapResults)
14842 async def DumpModelsDB(self, entities):
14843 '''
14844 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14845 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
14846 '''
14847 # map input types to rpc msg
14848 params = dict()
14849 msg = dict(type='ModelManager', request='DumpModelsDB', version=2, params=params)
14850 params['entities'] = entities
14851 reply = await self.rpc(msg)
14852 return reply
14853
14854
14855
14856 @ReturnMapping(UserModelList)
14857 async def ListModels(self, tag):
14858 '''
14859 tag : str
14860 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
14861 '''
14862 # map input types to rpc msg
14863 params = dict()
14864 msg = dict(type='ModelManager', request='ListModels', version=2, params=params)
14865 params['tag'] = tag
14866 reply = await self.rpc(msg)
14867 return reply
14868
14869
14870
14871 @ReturnMapping(ModelInfoResults)
14872 async def ModelInfo(self, entities):
14873 '''
14874 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14875 Returns -> typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
14876 '''
14877 # map input types to rpc msg
14878 params = dict()
14879 msg = dict(type='ModelManager', request='ModelInfo', version=2, params=params)
14880 params['entities'] = entities
14881 reply = await self.rpc(msg)
14882 return reply
14883
14884
14885
14886 @ReturnMapping(ErrorResults)
14887 async def ModifyModelAccess(self, changes):
14888 '''
14889 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
14890 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14891 '''
14892 # map input types to rpc msg
14893 params = dict()
14894 msg = dict(type='ModelManager', request='ModifyModelAccess', version=2, params=params)
14895 params['changes'] = changes
14896 reply = await self.rpc(msg)
14897 return reply
14898
14899
14900 class NotifyWatcherFacade(Type):
14901 name = 'NotifyWatcher'
14902 version = 1
14903 schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
14904 'type': 'object'}
14905
14906
14907 @ReturnMapping(None)
14908 async def Next(self):
14909 '''
14910
14911 Returns -> None
14912 '''
14913 # map input types to rpc msg
14914 params = dict()
14915 msg = dict(type='NotifyWatcher', request='Next', version=1, params=params)
14916
14917 reply = await self.rpc(msg)
14918 return reply
14919
14920
14921
14922 @ReturnMapping(None)
14923 async def Stop(self):
14924 '''
14925
14926 Returns -> None
14927 '''
14928 # map input types to rpc msg
14929 params = dict()
14930 msg = dict(type='NotifyWatcher', request='Stop', version=1, params=params)
14931
14932 reply = await self.rpc(msg)
14933 return reply
14934
14935
14936 class PingerFacade(Type):
14937 name = 'Pinger'
14938 version = 1
14939 schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
14940 'type': 'object'}
14941
14942
14943 @ReturnMapping(None)
14944 async def Ping(self):
14945 '''
14946
14947 Returns -> None
14948 '''
14949 # map input types to rpc msg
14950 params = dict()
14951 msg = dict(type='Pinger', request='Ping', version=1, params=params)
14952
14953 reply = await self.rpc(msg)
14954 return reply
14955
14956
14957
14958 @ReturnMapping(None)
14959 async def Stop(self):
14960 '''
14961
14962 Returns -> None
14963 '''
14964 # map input types to rpc msg
14965 params = dict()
14966 msg = dict(type='Pinger', request='Stop', version=1, params=params)
14967
14968 reply = await self.rpc(msg)
14969 return reply
14970
14971
14972 class ProvisionerFacade(Type):
14973 name = 'Provisioner'
14974 version = 3
14975 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
14976 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
14977 'type': 'array'},
14978 'type': 'array'}},
14979 'required': ['servers'],
14980 'type': 'object'},
14981 'Address': {'additionalProperties': False,
14982 'properties': {'scope': {'type': 'string'},
14983 'space-name': {'type': 'string'},
14984 'type': {'type': 'string'},
14985 'value': {'type': 'string'}},
14986 'required': ['value', 'type', 'scope'],
14987 'type': 'object'},
14988 'Binary': {'additionalProperties': False,
14989 'properties': {'Arch': {'type': 'string'},
14990 'Number': {'$ref': '#/definitions/Number'},
14991 'Series': {'type': 'string'}},
14992 'required': ['Number', 'Series', 'Arch'],
14993 'type': 'object'},
14994 'BytesResult': {'additionalProperties': False,
14995 'properties': {'result': {'items': {'type': 'integer'},
14996 'type': 'array'}},
14997 'required': ['result'],
14998 'type': 'object'},
14999 'CloudImageMetadata': {'additionalProperties': False,
15000 'properties': {'arch': {'type': 'string'},
15001 'image-id': {'type': 'string'},
15002 'priority': {'type': 'integer'},
15003 'region': {'type': 'string'},
15004 'root-storage-size': {'type': 'integer'},
15005 'root-storage-type': {'type': 'string'},
15006 'series': {'type': 'string'},
15007 'source': {'type': 'string'},
15008 'stream': {'type': 'string'},
15009 'version': {'type': 'string'},
15010 'virt-type': {'type': 'string'}},
15011 'required': ['image-id',
15012 'region',
15013 'version',
15014 'series',
15015 'arch',
15016 'source',
15017 'priority'],
15018 'type': 'object'},
15019 'ConstraintsResult': {'additionalProperties': False,
15020 'properties': {'constraints': {'$ref': '#/definitions/Value'},
15021 'error': {'$ref': '#/definitions/Error'}},
15022 'required': ['constraints'],
15023 'type': 'object'},
15024 'ConstraintsResults': {'additionalProperties': False,
15025 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
15026 'type': 'array'}},
15027 'required': ['results'],
15028 'type': 'object'},
15029 'ContainerConfig': {'additionalProperties': False,
15030 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
15031 'apt-mirror': {'type': 'string'},
15032 'apt-proxy': {'$ref': '#/definitions/Settings'},
15033 'authorized-keys': {'type': 'string'},
15034 'provider-type': {'type': 'string'},
15035 'proxy': {'$ref': '#/definitions/Settings'},
15036 'ssl-hostname-verification': {'type': 'boolean'}},
15037 'required': ['provider-type',
15038 'authorized-keys',
15039 'ssl-hostname-verification',
15040 'proxy',
15041 'apt-proxy',
15042 'apt-mirror',
15043 'UpdateBehavior'],
15044 'type': 'object'},
15045 'ContainerManagerConfig': {'additionalProperties': False,
15046 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
15047 'type': 'object'}},
15048 'required': ['config'],
15049 'type': 'object'},
15050 'ContainerManagerConfigParams': {'additionalProperties': False,
15051 'properties': {'type': {'type': 'string'}},
15052 'required': ['type'],
15053 'type': 'object'},
15054 'ControllerConfigResult': {'additionalProperties': False,
15055 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
15056 'type': 'object'}},
15057 'type': 'object'}},
15058 'required': ['config'],
15059 'type': 'object'},
15060 'DistributionGroupResult': {'additionalProperties': False,
15061 'properties': {'error': {'$ref': '#/definitions/Error'},
15062 'result': {'items': {'type': 'string'},
15063 'type': 'array'}},
15064 'required': ['result'],
15065 'type': 'object'},
15066 'DistributionGroupResults': {'additionalProperties': False,
15067 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
15068 'type': 'array'}},
15069 'required': ['results'],
15070 'type': 'object'},
15071 'Entities': {'additionalProperties': False,
15072 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15073 'type': 'array'}},
15074 'required': ['entities'],
15075 'type': 'object'},
15076 'Entity': {'additionalProperties': False,
15077 'properties': {'tag': {'type': 'string'}},
15078 'required': ['tag'],
15079 'type': 'object'},
15080 'EntityPassword': {'additionalProperties': False,
15081 'properties': {'password': {'type': 'string'},
15082 'tag': {'type': 'string'}},
15083 'required': ['tag', 'password'],
15084 'type': 'object'},
15085 'EntityPasswords': {'additionalProperties': False,
15086 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
15087 'type': 'array'}},
15088 'required': ['changes'],
15089 'type': 'object'},
15090 'EntityStatusArgs': {'additionalProperties': False,
15091 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15092 'type': 'object'}},
15093 'type': 'object'},
15094 'info': {'type': 'string'},
15095 'status': {'type': 'string'},
15096 'tag': {'type': 'string'}},
15097 'required': ['tag',
15098 'status',
15099 'info',
15100 'data'],
15101 'type': 'object'},
15102 'Error': {'additionalProperties': False,
15103 'properties': {'code': {'type': 'string'},
15104 'info': {'$ref': '#/definitions/ErrorInfo'},
15105 'message': {'type': 'string'}},
15106 'required': ['message', 'code'],
15107 'type': 'object'},
15108 'ErrorInfo': {'additionalProperties': False,
15109 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15110 'macaroon-path': {'type': 'string'}},
15111 'type': 'object'},
15112 'ErrorResult': {'additionalProperties': False,
15113 'properties': {'error': {'$ref': '#/definitions/Error'}},
15114 'type': 'object'},
15115 'ErrorResults': {'additionalProperties': False,
15116 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15117 'type': 'array'}},
15118 'required': ['results'],
15119 'type': 'object'},
15120 'FindToolsParams': {'additionalProperties': False,
15121 'properties': {'arch': {'type': 'string'},
15122 'major': {'type': 'integer'},
15123 'minor': {'type': 'integer'},
15124 'number': {'$ref': '#/definitions/Number'},
15125 'series': {'type': 'string'}},
15126 'required': ['number',
15127 'major',
15128 'minor',
15129 'arch',
15130 'series'],
15131 'type': 'object'},
15132 'FindToolsResult': {'additionalProperties': False,
15133 'properties': {'error': {'$ref': '#/definitions/Error'},
15134 'list': {'items': {'$ref': '#/definitions/Tools'},
15135 'type': 'array'}},
15136 'required': ['list'],
15137 'type': 'object'},
15138 'HardwareCharacteristics': {'additionalProperties': False,
15139 'properties': {'arch': {'type': 'string'},
15140 'availability-zone': {'type': 'string'},
15141 'cpu-cores': {'type': 'integer'},
15142 'cpu-power': {'type': 'integer'},
15143 'mem': {'type': 'integer'},
15144 'root-disk': {'type': 'integer'},
15145 'tags': {'items': {'type': 'string'},
15146 'type': 'array'}},
15147 'type': 'object'},
15148 'HostPort': {'additionalProperties': False,
15149 'properties': {'Address': {'$ref': '#/definitions/Address'},
15150 'port': {'type': 'integer'}},
15151 'required': ['Address', 'port'],
15152 'type': 'object'},
15153 'InstanceInfo': {'additionalProperties': False,
15154 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
15155 'instance-id': {'type': 'string'},
15156 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
15157 'type': 'array'},
15158 'nonce': {'type': 'string'},
15159 'tag': {'type': 'string'},
15160 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
15161 'type': 'object'},
15162 'volumes': {'items': {'$ref': '#/definitions/Volume'},
15163 'type': 'array'}},
15164 'required': ['tag',
15165 'instance-id',
15166 'nonce',
15167 'characteristics',
15168 'volumes',
15169 'volume-attachments',
15170 'network-config'],
15171 'type': 'object'},
15172 'InstancesInfo': {'additionalProperties': False,
15173 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
15174 'type': 'array'}},
15175 'required': ['machines'],
15176 'type': 'object'},
15177 'LifeResult': {'additionalProperties': False,
15178 'properties': {'error': {'$ref': '#/definitions/Error'},
15179 'life': {'type': 'string'}},
15180 'required': ['life'],
15181 'type': 'object'},
15182 'LifeResults': {'additionalProperties': False,
15183 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
15184 'type': 'array'}},
15185 'required': ['results'],
15186 'type': 'object'},
15187 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15188 'MachineContainers': {'additionalProperties': False,
15189 'properties': {'container-types': {'items': {'type': 'string'},
15190 'type': 'array'},
15191 'machine-tag': {'type': 'string'}},
15192 'required': ['machine-tag',
15193 'container-types'],
15194 'type': 'object'},
15195 'MachineContainersParams': {'additionalProperties': False,
15196 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
15197 'type': 'array'}},
15198 'required': ['params'],
15199 'type': 'object'},
15200 'MachineNetworkConfigResult': {'additionalProperties': False,
15201 'properties': {'error': {'$ref': '#/definitions/Error'},
15202 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
15203 'type': 'array'}},
15204 'required': ['info'],
15205 'type': 'object'},
15206 'MachineNetworkConfigResults': {'additionalProperties': False,
15207 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
15208 'type': 'array'}},
15209 'required': ['results'],
15210 'type': 'object'},
15211 'ModelConfigResult': {'additionalProperties': False,
15212 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
15213 'type': 'object'}},
15214 'type': 'object'}},
15215 'required': ['config'],
15216 'type': 'object'},
15217 'NetworkConfig': {'additionalProperties': False,
15218 'properties': {'address': {'type': 'string'},
15219 'cidr': {'type': 'string'},
15220 'config-type': {'type': 'string'},
15221 'device-index': {'type': 'integer'},
15222 'disabled': {'type': 'boolean'},
15223 'dns-search-domains': {'items': {'type': 'string'},
15224 'type': 'array'},
15225 'dns-servers': {'items': {'type': 'string'},
15226 'type': 'array'},
15227 'gateway-address': {'type': 'string'},
15228 'interface-name': {'type': 'string'},
15229 'interface-type': {'type': 'string'},
15230 'mac-address': {'type': 'string'},
15231 'mtu': {'type': 'integer'},
15232 'no-auto-start': {'type': 'boolean'},
15233 'parent-interface-name': {'type': 'string'},
15234 'provider-address-id': {'type': 'string'},
15235 'provider-id': {'type': 'string'},
15236 'provider-space-id': {'type': 'string'},
15237 'provider-subnet-id': {'type': 'string'},
15238 'provider-vlan-id': {'type': 'string'},
15239 'vlan-tag': {'type': 'integer'}},
15240 'required': ['device-index',
15241 'mac-address',
15242 'cidr',
15243 'mtu',
15244 'provider-id',
15245 'provider-subnet-id',
15246 'provider-space-id',
15247 'provider-address-id',
15248 'provider-vlan-id',
15249 'vlan-tag',
15250 'interface-name',
15251 'parent-interface-name',
15252 'interface-type',
15253 'disabled'],
15254 'type': 'object'},
15255 'NotifyWatchResult': {'additionalProperties': False,
15256 'properties': {'NotifyWatcherId': {'type': 'string'},
15257 'error': {'$ref': '#/definitions/Error'}},
15258 'required': ['NotifyWatcherId'],
15259 'type': 'object'},
15260 'Number': {'additionalProperties': False,
15261 'properties': {'Build': {'type': 'integer'},
15262 'Major': {'type': 'integer'},
15263 'Minor': {'type': 'integer'},
15264 'Patch': {'type': 'integer'},
15265 'Tag': {'type': 'string'}},
15266 'required': ['Major',
15267 'Minor',
15268 'Tag',
15269 'Patch',
15270 'Build'],
15271 'type': 'object'},
15272 'ProvisioningInfo': {'additionalProperties': False,
15273 'properties': {'constraints': {'$ref': '#/definitions/Value'},
15274 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
15275 'type': 'object'}},
15276 'type': 'object'},
15277 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
15278 'type': 'object'},
15279 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
15280 'type': 'array'},
15281 'jobs': {'items': {'type': 'string'},
15282 'type': 'array'},
15283 'placement': {'type': 'string'},
15284 'series': {'type': 'string'},
15285 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
15286 'type': 'array'}},
15287 'type': 'object'},
15288 'tags': {'patternProperties': {'.*': {'type': 'string'}},
15289 'type': 'object'},
15290 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
15291 'type': 'array'}},
15292 'required': ['constraints',
15293 'series',
15294 'placement',
15295 'jobs'],
15296 'type': 'object'},
15297 'ProvisioningInfoResult': {'additionalProperties': False,
15298 'properties': {'error': {'$ref': '#/definitions/Error'},
15299 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
15300 'required': ['result'],
15301 'type': 'object'},
15302 'ProvisioningInfoResults': {'additionalProperties': False,
15303 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
15304 'type': 'array'}},
15305 'required': ['results'],
15306 'type': 'object'},
15307 'SetStatus': {'additionalProperties': False,
15308 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15309 'type': 'array'}},
15310 'required': ['entities'],
15311 'type': 'object'},
15312 'Settings': {'additionalProperties': False,
15313 'properties': {'Ftp': {'type': 'string'},
15314 'Http': {'type': 'string'},
15315 'Https': {'type': 'string'},
15316 'NoProxy': {'type': 'string'}},
15317 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
15318 'type': 'object'},
15319 'StatusResult': {'additionalProperties': False,
15320 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15321 'type': 'object'}},
15322 'type': 'object'},
15323 'error': {'$ref': '#/definitions/Error'},
15324 'id': {'type': 'string'},
15325 'info': {'type': 'string'},
15326 'life': {'type': 'string'},
15327 'since': {'format': 'date-time',
15328 'type': 'string'},
15329 'status': {'type': 'string'}},
15330 'required': ['id',
15331 'life',
15332 'status',
15333 'info',
15334 'data',
15335 'since'],
15336 'type': 'object'},
15337 'StatusResults': {'additionalProperties': False,
15338 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
15339 'type': 'array'}},
15340 'required': ['results'],
15341 'type': 'object'},
15342 'StringResult': {'additionalProperties': False,
15343 'properties': {'error': {'$ref': '#/definitions/Error'},
15344 'result': {'type': 'string'}},
15345 'required': ['result'],
15346 'type': 'object'},
15347 'StringResults': {'additionalProperties': False,
15348 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
15349 'type': 'array'}},
15350 'required': ['results'],
15351 'type': 'object'},
15352 'StringsResult': {'additionalProperties': False,
15353 'properties': {'error': {'$ref': '#/definitions/Error'},
15354 'result': {'items': {'type': 'string'},
15355 'type': 'array'}},
15356 'type': 'object'},
15357 'StringsWatchResult': {'additionalProperties': False,
15358 'properties': {'changes': {'items': {'type': 'string'},
15359 'type': 'array'},
15360 'error': {'$ref': '#/definitions/Error'},
15361 'watcher-id': {'type': 'string'}},
15362 'required': ['watcher-id'],
15363 'type': 'object'},
15364 'StringsWatchResults': {'additionalProperties': False,
15365 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
15366 'type': 'array'}},
15367 'required': ['results'],
15368 'type': 'object'},
15369 'Tools': {'additionalProperties': False,
15370 'properties': {'sha256': {'type': 'string'},
15371 'size': {'type': 'integer'},
15372 'url': {'type': 'string'},
15373 'version': {'$ref': '#/definitions/Binary'}},
15374 'required': ['version', 'url', 'size'],
15375 'type': 'object'},
15376 'ToolsResult': {'additionalProperties': False,
15377 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
15378 'error': {'$ref': '#/definitions/Error'},
15379 'tools': {'items': {'$ref': '#/definitions/Tools'},
15380 'type': 'array'}},
15381 'required': ['tools',
15382 'disable-ssl-hostname-verification'],
15383 'type': 'object'},
15384 'ToolsResults': {'additionalProperties': False,
15385 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
15386 'type': 'array'}},
15387 'required': ['results'],
15388 'type': 'object'},
15389 'UpdateBehavior': {'additionalProperties': False,
15390 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
15391 'enable-os-upgrade': {'type': 'boolean'}},
15392 'required': ['enable-os-refresh-update',
15393 'enable-os-upgrade'],
15394 'type': 'object'},
15395 'Value': {'additionalProperties': False,
15396 'properties': {'arch': {'type': 'string'},
15397 'container': {'type': 'string'},
15398 'cpu-cores': {'type': 'integer'},
15399 'cpu-power': {'type': 'integer'},
15400 'instance-type': {'type': 'string'},
15401 'mem': {'type': 'integer'},
15402 'root-disk': {'type': 'integer'},
15403 'spaces': {'items': {'type': 'string'},
15404 'type': 'array'},
15405 'tags': {'items': {'type': 'string'},
15406 'type': 'array'},
15407 'virt-type': {'type': 'string'}},
15408 'type': 'object'},
15409 'Volume': {'additionalProperties': False,
15410 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
15411 'volume-tag': {'type': 'string'}},
15412 'required': ['volume-tag', 'info'],
15413 'type': 'object'},
15414 'VolumeAttachmentInfo': {'additionalProperties': False,
15415 'properties': {'bus-address': {'type': 'string'},
15416 'device-link': {'type': 'string'},
15417 'device-name': {'type': 'string'},
15418 'read-only': {'type': 'boolean'}},
15419 'type': 'object'},
15420 'VolumeAttachmentParams': {'additionalProperties': False,
15421 'properties': {'instance-id': {'type': 'string'},
15422 'machine-tag': {'type': 'string'},
15423 'provider': {'type': 'string'},
15424 'read-only': {'type': 'boolean'},
15425 'volume-id': {'type': 'string'},
15426 'volume-tag': {'type': 'string'}},
15427 'required': ['volume-tag',
15428 'machine-tag',
15429 'provider'],
15430 'type': 'object'},
15431 'VolumeInfo': {'additionalProperties': False,
15432 'properties': {'hardware-id': {'type': 'string'},
15433 'persistent': {'type': 'boolean'},
15434 'size': {'type': 'integer'},
15435 'volume-id': {'type': 'string'}},
15436 'required': ['volume-id', 'size', 'persistent'],
15437 'type': 'object'},
15438 'VolumeParams': {'additionalProperties': False,
15439 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
15440 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
15441 'type': 'object'}},
15442 'type': 'object'},
15443 'provider': {'type': 'string'},
15444 'size': {'type': 'integer'},
15445 'tags': {'patternProperties': {'.*': {'type': 'string'}},
15446 'type': 'object'},
15447 'volume-tag': {'type': 'string'}},
15448 'required': ['volume-tag',
15449 'size',
15450 'provider'],
15451 'type': 'object'},
15452 'WatchContainer': {'additionalProperties': False,
15453 'properties': {'container-type': {'type': 'string'},
15454 'machine-tag': {'type': 'string'}},
15455 'required': ['machine-tag',
15456 'container-type'],
15457 'type': 'object'},
15458 'WatchContainers': {'additionalProperties': False,
15459 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
15460 'type': 'array'}},
15461 'required': ['params'],
15462 'type': 'object'}},
15463 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
15464 'type': 'object'},
15465 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
15466 'type': 'object'},
15467 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
15468 'type': 'object'},
15469 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15470 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
15471 'type': 'object'},
15472 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
15473 'type': 'object'},
15474 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
15475 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
15476 'type': 'object'},
15477 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
15478 'type': 'object'},
15479 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15480 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
15481 'type': 'object'},
15482 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15483 'Result': {'$ref': '#/definitions/ErrorResults'}},
15484 'type': 'object'},
15485 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
15486 'Result': {'$ref': '#/definitions/FindToolsResult'}},
15487 'type': 'object'},
15488 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15489 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
15490 'type': 'object'},
15491 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15492 'Result': {'$ref': '#/definitions/StringResults'}},
15493 'type': 'object'},
15494 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15495 'Result': {'$ref': '#/definitions/StatusResults'}},
15496 'type': 'object'},
15497 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15498 'Result': {'$ref': '#/definitions/LifeResults'}},
15499 'type': 'object'},
15500 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
15501 'type': 'object'},
15502 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15503 'Result': {'$ref': '#/definitions/ErrorResults'}},
15504 'type': 'object'},
15505 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
15506 'type': 'object'},
15507 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
15508 'type': 'object'},
15509 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15510 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
15511 'type': 'object'},
15512 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15513 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
15514 'type': 'object'},
15515 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15516 'Result': {'$ref': '#/definitions/ErrorResults'}},
15517 'type': 'object'},
15518 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15519 'Result': {'$ref': '#/definitions/ErrorResults'}},
15520 'type': 'object'},
15521 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15522 'Result': {'$ref': '#/definitions/StringResults'}},
15523 'type': 'object'},
15524 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
15525 'Result': {'$ref': '#/definitions/ErrorResults'}},
15526 'type': 'object'},
15527 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15528 'Result': {'$ref': '#/definitions/ErrorResults'}},
15529 'type': 'object'},
15530 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
15531 'Result': {'$ref': '#/definitions/ErrorResults'}},
15532 'type': 'object'},
15533 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15534 'Result': {'$ref': '#/definitions/ErrorResults'}},
15535 'type': 'object'},
15536 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
15537 'Result': {'$ref': '#/definitions/ErrorResults'}},
15538 'type': 'object'},
15539 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
15540 'type': 'object'},
15541 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15542 'Result': {'$ref': '#/definitions/StatusResults'}},
15543 'type': 'object'},
15544 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15545 'Result': {'$ref': '#/definitions/ToolsResults'}},
15546 'type': 'object'},
15547 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15548 'Result': {'$ref': '#/definitions/ErrorResults'}},
15549 'type': 'object'},
15550 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15551 'type': 'object'},
15552 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
15553 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
15554 'type': 'object'},
15555 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
15556 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
15557 'type': 'object'},
15558 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15559 'type': 'object'},
15560 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15561 'type': 'object'},
15562 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
15563 'type': 'object'}},
15564 'type': 'object'}
15565
15566
15567 @ReturnMapping(StringsResult)
15568 async def APIAddresses(self):
15569 '''
15570
15571 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
15572 '''
15573 # map input types to rpc msg
15574 params = dict()
15575 msg = dict(type='Provisioner', request='APIAddresses', version=3, params=params)
15576
15577 reply = await self.rpc(msg)
15578 return reply
15579
15580
15581
15582 @ReturnMapping(APIHostPortsResult)
15583 async def APIHostPorts(self):
15584 '''
15585
15586 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
15587 '''
15588 # map input types to rpc msg
15589 params = dict()
15590 msg = dict(type='Provisioner', request='APIHostPorts', version=3, params=params)
15591
15592 reply = await self.rpc(msg)
15593 return reply
15594
15595
15596
15597 @ReturnMapping(BytesResult)
15598 async def CACert(self):
15599 '''
15600
15601 Returns -> typing.Sequence<+T_co>[int]
15602 '''
15603 # map input types to rpc msg
15604 params = dict()
15605 msg = dict(type='Provisioner', request='CACert', version=3, params=params)
15606
15607 reply = await self.rpc(msg)
15608 return reply
15609
15610
15611
15612 @ReturnMapping(ConstraintsResults)
15613 async def Constraints(self, entities):
15614 '''
15615 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15616 Returns -> typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
15617 '''
15618 # map input types to rpc msg
15619 params = dict()
15620 msg = dict(type='Provisioner', request='Constraints', version=3, params=params)
15621 params['entities'] = entities
15622 reply = await self.rpc(msg)
15623 return reply
15624
15625
15626
15627 @ReturnMapping(ContainerConfig)
15628 async def ContainerConfig(self):
15629 '''
15630
15631 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool]
15632 '''
15633 # map input types to rpc msg
15634 params = dict()
15635 msg = dict(type='Provisioner', request='ContainerConfig', version=3, params=params)
15636
15637 reply = await self.rpc(msg)
15638 return reply
15639
15640
15641
15642 @ReturnMapping(ContainerManagerConfig)
15643 async def ContainerManagerConfig(self, type_):
15644 '''
15645 type_ : str
15646 Returns -> typing.Mapping<~KT, +VT_co>[str, str]
15647 '''
15648 # map input types to rpc msg
15649 params = dict()
15650 msg = dict(type='Provisioner', request='ContainerManagerConfig', version=3, params=params)
15651 params['type'] = type_
15652 reply = await self.rpc(msg)
15653 return reply
15654
15655
15656
15657 @ReturnMapping(ControllerConfigResult)
15658 async def ControllerConfig(self):
15659 '''
15660
15661 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
15662 '''
15663 # map input types to rpc msg
15664 params = dict()
15665 msg = dict(type='Provisioner', request='ControllerConfig', version=3, params=params)
15666
15667 reply = await self.rpc(msg)
15668 return reply
15669
15670
15671
15672 @ReturnMapping(DistributionGroupResults)
15673 async def DistributionGroup(self, entities):
15674 '''
15675 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15676 Returns -> typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
15677 '''
15678 # map input types to rpc msg
15679 params = dict()
15680 msg = dict(type='Provisioner', request='DistributionGroup', version=3, params=params)
15681 params['entities'] = entities
15682 reply = await self.rpc(msg)
15683 return reply
15684
15685
15686
15687 @ReturnMapping(ErrorResults)
15688 async def EnsureDead(self, entities):
15689 '''
15690 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15691 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15692 '''
15693 # map input types to rpc msg
15694 params = dict()
15695 msg = dict(type='Provisioner', request='EnsureDead', version=3, params=params)
15696 params['entities'] = entities
15697 reply = await self.rpc(msg)
15698 return reply
15699
15700
15701
15702 @ReturnMapping(FindToolsResult)
15703 async def FindTools(self, arch, major, minor, number, series):
15704 '''
15705 arch : str
15706 major : int
15707 minor : int
15708 number : Number
15709 series : str
15710 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
15711 '''
15712 # map input types to rpc msg
15713 params = dict()
15714 msg = dict(type='Provisioner', request='FindTools', version=3, params=params)
15715 params['arch'] = arch
15716 params['major'] = major
15717 params['minor'] = minor
15718 params['number'] = number
15719 params['series'] = series
15720 reply = await self.rpc(msg)
15721 return reply
15722
15723
15724
15725 @ReturnMapping(MachineNetworkConfigResults)
15726 async def GetContainerInterfaceInfo(self, entities):
15727 '''
15728 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15729 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
15730 '''
15731 # map input types to rpc msg
15732 params = dict()
15733 msg = dict(type='Provisioner', request='GetContainerInterfaceInfo', version=3, params=params)
15734 params['entities'] = entities
15735 reply = await self.rpc(msg)
15736 return reply
15737
15738
15739
15740 @ReturnMapping(StringResults)
15741 async def InstanceId(self, entities):
15742 '''
15743 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15744 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
15745 '''
15746 # map input types to rpc msg
15747 params = dict()
15748 msg = dict(type='Provisioner', request='InstanceId', version=3, params=params)
15749 params['entities'] = entities
15750 reply = await self.rpc(msg)
15751 return reply
15752
15753
15754
15755 @ReturnMapping(StatusResults)
15756 async def InstanceStatus(self, entities):
15757 '''
15758 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15759 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
15760 '''
15761 # map input types to rpc msg
15762 params = dict()
15763 msg = dict(type='Provisioner', request='InstanceStatus', version=3, params=params)
15764 params['entities'] = entities
15765 reply = await self.rpc(msg)
15766 return reply
15767
15768
15769
15770 @ReturnMapping(LifeResults)
15771 async def Life(self, entities):
15772 '''
15773 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15774 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
15775 '''
15776 # map input types to rpc msg
15777 params = dict()
15778 msg = dict(type='Provisioner', request='Life', version=3, params=params)
15779 params['entities'] = entities
15780 reply = await self.rpc(msg)
15781 return reply
15782
15783
15784
15785 @ReturnMapping(StatusResults)
15786 async def MachinesWithTransientErrors(self):
15787 '''
15788
15789 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
15790 '''
15791 # map input types to rpc msg
15792 params = dict()
15793 msg = dict(type='Provisioner', request='MachinesWithTransientErrors', version=3, params=params)
15794
15795 reply = await self.rpc(msg)
15796 return reply
15797
15798
15799
15800 @ReturnMapping(ErrorResults)
15801 async def MarkMachinesForRemoval(self, entities):
15802 '''
15803 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15804 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15805 '''
15806 # map input types to rpc msg
15807 params = dict()
15808 msg = dict(type='Provisioner', request='MarkMachinesForRemoval', version=3, params=params)
15809 params['entities'] = entities
15810 reply = await self.rpc(msg)
15811 return reply
15812
15813
15814
15815 @ReturnMapping(ModelConfigResult)
15816 async def ModelConfig(self):
15817 '''
15818
15819 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
15820 '''
15821 # map input types to rpc msg
15822 params = dict()
15823 msg = dict(type='Provisioner', request='ModelConfig', version=3, params=params)
15824
15825 reply = await self.rpc(msg)
15826 return reply
15827
15828
15829
15830 @ReturnMapping(StringResult)
15831 async def ModelUUID(self):
15832 '''
15833
15834 Returns -> typing.Union[_ForwardRef('Error'), str]
15835 '''
15836 # map input types to rpc msg
15837 params = dict()
15838 msg = dict(type='Provisioner', request='ModelUUID', version=3, params=params)
15839
15840 reply = await self.rpc(msg)
15841 return reply
15842
15843
15844
15845 @ReturnMapping(MachineNetworkConfigResults)
15846 async def PrepareContainerInterfaceInfo(self, entities):
15847 '''
15848 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15849 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
15850 '''
15851 # map input types to rpc msg
15852 params = dict()
15853 msg = dict(type='Provisioner', request='PrepareContainerInterfaceInfo', version=3, params=params)
15854 params['entities'] = entities
15855 reply = await self.rpc(msg)
15856 return reply
15857
15858
15859
15860 @ReturnMapping(ProvisioningInfoResults)
15861 async def ProvisioningInfo(self, entities):
15862 '''
15863 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15864 Returns -> typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
15865 '''
15866 # map input types to rpc msg
15867 params = dict()
15868 msg = dict(type='Provisioner', request='ProvisioningInfo', version=3, params=params)
15869 params['entities'] = entities
15870 reply = await self.rpc(msg)
15871 return reply
15872
15873
15874
15875 @ReturnMapping(ErrorResults)
15876 async def ReleaseContainerAddresses(self, entities):
15877 '''
15878 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15879 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15880 '''
15881 # map input types to rpc msg
15882 params = dict()
15883 msg = dict(type='Provisioner', request='ReleaseContainerAddresses', version=3, params=params)
15884 params['entities'] = entities
15885 reply = await self.rpc(msg)
15886 return reply
15887
15888
15889
15890 @ReturnMapping(ErrorResults)
15891 async def Remove(self, entities):
15892 '''
15893 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15894 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15895 '''
15896 # map input types to rpc msg
15897 params = dict()
15898 msg = dict(type='Provisioner', request='Remove', version=3, params=params)
15899 params['entities'] = entities
15900 reply = await self.rpc(msg)
15901 return reply
15902
15903
15904
15905 @ReturnMapping(StringResults)
15906 async def Series(self, entities):
15907 '''
15908 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15909 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
15910 '''
15911 # map input types to rpc msg
15912 params = dict()
15913 msg = dict(type='Provisioner', request='Series', version=3, params=params)
15914 params['entities'] = entities
15915 reply = await self.rpc(msg)
15916 return reply
15917
15918
15919
15920 @ReturnMapping(ErrorResults)
15921 async def SetInstanceInfo(self, machines):
15922 '''
15923 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
15924 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15925 '''
15926 # map input types to rpc msg
15927 params = dict()
15928 msg = dict(type='Provisioner', request='SetInstanceInfo', version=3, params=params)
15929 params['machines'] = machines
15930 reply = await self.rpc(msg)
15931 return reply
15932
15933
15934
15935 @ReturnMapping(ErrorResults)
15936 async def SetInstanceStatus(self, entities):
15937 '''
15938 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
15939 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15940 '''
15941 # map input types to rpc msg
15942 params = dict()
15943 msg = dict(type='Provisioner', request='SetInstanceStatus', version=3, params=params)
15944 params['entities'] = entities
15945 reply = await self.rpc(msg)
15946 return reply
15947
15948
15949
15950 @ReturnMapping(ErrorResults)
15951 async def SetPasswords(self, changes):
15952 '''
15953 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
15954 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15955 '''
15956 # map input types to rpc msg
15957 params = dict()
15958 msg = dict(type='Provisioner', request='SetPasswords', version=3, params=params)
15959 params['changes'] = changes
15960 reply = await self.rpc(msg)
15961 return reply
15962
15963
15964
15965 @ReturnMapping(ErrorResults)
15966 async def SetStatus(self, entities):
15967 '''
15968 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
15969 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15970 '''
15971 # map input types to rpc msg
15972 params = dict()
15973 msg = dict(type='Provisioner', request='SetStatus', version=3, params=params)
15974 params['entities'] = entities
15975 reply = await self.rpc(msg)
15976 return reply
15977
15978
15979
15980 @ReturnMapping(ErrorResults)
15981 async def SetSupportedContainers(self, params):
15982 '''
15983 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
15984 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15985 '''
15986 # map input types to rpc msg
15987 params = dict()
15988 msg = dict(type='Provisioner', request='SetSupportedContainers', version=3, params=params)
15989 params['params'] = params
15990 reply = await self.rpc(msg)
15991 return reply
15992
15993
15994
15995 @ReturnMapping(StringsResult)
15996 async def StateAddresses(self):
15997 '''
15998
15999 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
16000 '''
16001 # map input types to rpc msg
16002 params = dict()
16003 msg = dict(type='Provisioner', request='StateAddresses', version=3, params=params)
16004
16005 reply = await self.rpc(msg)
16006 return reply
16007
16008
16009
16010 @ReturnMapping(StatusResults)
16011 async def Status(self, entities):
16012 '''
16013 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16014 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
16015 '''
16016 # map input types to rpc msg
16017 params = dict()
16018 msg = dict(type='Provisioner', request='Status', version=3, params=params)
16019 params['entities'] = entities
16020 reply = await self.rpc(msg)
16021 return reply
16022
16023
16024
16025 @ReturnMapping(ToolsResults)
16026 async def Tools(self, entities):
16027 '''
16028 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16029 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
16030 '''
16031 # map input types to rpc msg
16032 params = dict()
16033 msg = dict(type='Provisioner', request='Tools', version=3, params=params)
16034 params['entities'] = entities
16035 reply = await self.rpc(msg)
16036 return reply
16037
16038
16039
16040 @ReturnMapping(ErrorResults)
16041 async def UpdateStatus(self, entities):
16042 '''
16043 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
16044 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16045 '''
16046 # map input types to rpc msg
16047 params = dict()
16048 msg = dict(type='Provisioner', request='UpdateStatus', version=3, params=params)
16049 params['entities'] = entities
16050 reply = await self.rpc(msg)
16051 return reply
16052
16053
16054
16055 @ReturnMapping(NotifyWatchResult)
16056 async def WatchAPIHostPorts(self):
16057 '''
16058
16059 Returns -> typing.Union[str, _ForwardRef('Error')]
16060 '''
16061 # map input types to rpc msg
16062 params = dict()
16063 msg = dict(type='Provisioner', request='WatchAPIHostPorts', version=3, params=params)
16064
16065 reply = await self.rpc(msg)
16066 return reply
16067
16068
16069
16070 @ReturnMapping(StringsWatchResults)
16071 async def WatchAllContainers(self, params):
16072 '''
16073 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
16074 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
16075 '''
16076 # map input types to rpc msg
16077 params = dict()
16078 msg = dict(type='Provisioner', request='WatchAllContainers', version=3, params=params)
16079 params['params'] = params
16080 reply = await self.rpc(msg)
16081 return reply
16082
16083
16084
16085 @ReturnMapping(StringsWatchResults)
16086 async def WatchContainers(self, params):
16087 '''
16088 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
16089 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
16090 '''
16091 # map input types to rpc msg
16092 params = dict()
16093 msg = dict(type='Provisioner', request='WatchContainers', version=3, params=params)
16094 params['params'] = params
16095 reply = await self.rpc(msg)
16096 return reply
16097
16098
16099
16100 @ReturnMapping(NotifyWatchResult)
16101 async def WatchForModelConfigChanges(self):
16102 '''
16103
16104 Returns -> typing.Union[str, _ForwardRef('Error')]
16105 '''
16106 # map input types to rpc msg
16107 params = dict()
16108 msg = dict(type='Provisioner', request='WatchForModelConfigChanges', version=3, params=params)
16109
16110 reply = await self.rpc(msg)
16111 return reply
16112
16113
16114
16115 @ReturnMapping(NotifyWatchResult)
16116 async def WatchMachineErrorRetry(self):
16117 '''
16118
16119 Returns -> typing.Union[str, _ForwardRef('Error')]
16120 '''
16121 # map input types to rpc msg
16122 params = dict()
16123 msg = dict(type='Provisioner', request='WatchMachineErrorRetry', version=3, params=params)
16124
16125 reply = await self.rpc(msg)
16126 return reply
16127
16128
16129
16130 @ReturnMapping(StringsWatchResult)
16131 async def WatchModelMachines(self):
16132 '''
16133
16134 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
16135 '''
16136 # map input types to rpc msg
16137 params = dict()
16138 msg = dict(type='Provisioner', request='WatchModelMachines', version=3, params=params)
16139
16140 reply = await self.rpc(msg)
16141 return reply
16142
16143
16144 class ProxyUpdaterFacade(Type):
16145 name = 'ProxyUpdater'
16146 version = 1
16147 schema = {'definitions': {'Entities': {'additionalProperties': False,
16148 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16149 'type': 'array'}},
16150 'required': ['entities'],
16151 'type': 'object'},
16152 'Entity': {'additionalProperties': False,
16153 'properties': {'tag': {'type': 'string'}},
16154 'required': ['tag'],
16155 'type': 'object'},
16156 'Error': {'additionalProperties': False,
16157 'properties': {'code': {'type': 'string'},
16158 'info': {'$ref': '#/definitions/ErrorInfo'},
16159 'message': {'type': 'string'}},
16160 'required': ['message', 'code'],
16161 'type': 'object'},
16162 'ErrorInfo': {'additionalProperties': False,
16163 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16164 'macaroon-path': {'type': 'string'}},
16165 'type': 'object'},
16166 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16167 'NotifyWatchResult': {'additionalProperties': False,
16168 'properties': {'NotifyWatcherId': {'type': 'string'},
16169 'error': {'$ref': '#/definitions/Error'}},
16170 'required': ['NotifyWatcherId'],
16171 'type': 'object'},
16172 'NotifyWatchResults': {'additionalProperties': False,
16173 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16174 'type': 'array'}},
16175 'required': ['results'],
16176 'type': 'object'},
16177 'ProxyConfig': {'additionalProperties': False,
16178 'properties': {'ftp': {'type': 'string'},
16179 'http': {'type': 'string'},
16180 'https': {'type': 'string'},
16181 'no-proxy': {'type': 'string'}},
16182 'required': ['http',
16183 'https',
16184 'ftp',
16185 'no-proxy'],
16186 'type': 'object'},
16187 'ProxyConfigResult': {'additionalProperties': False,
16188 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
16189 'error': {'$ref': '#/definitions/Error'},
16190 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}},
16191 'required': ['proxy-settings',
16192 'apt-proxy-settings'],
16193 'type': 'object'},
16194 'ProxyConfigResults': {'additionalProperties': False,
16195 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
16196 'type': 'array'}},
16197 'required': ['results'],
16198 'type': 'object'}},
16199 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16200 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
16201 'type': 'object'},
16202 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16203 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16204 'type': 'object'}},
16205 'type': 'object'}
16206
16207
16208 @ReturnMapping(ProxyConfigResults)
16209 async def ProxyConfig(self, entities):
16210 '''
16211 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16212 Returns -> typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
16213 '''
16214 # map input types to rpc msg
16215 params = dict()
16216 msg = dict(type='ProxyUpdater', request='ProxyConfig', version=1, params=params)
16217 params['entities'] = entities
16218 reply = await self.rpc(msg)
16219 return reply
16220
16221
16222
16223 @ReturnMapping(NotifyWatchResults)
16224 async def WatchForProxyConfigAndAPIHostPortChanges(self, entities):
16225 '''
16226 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16227 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
16228 '''
16229 # map input types to rpc msg
16230 params = dict()
16231 msg = dict(type='ProxyUpdater', request='WatchForProxyConfigAndAPIHostPortChanges', version=1, params=params)
16232 params['entities'] = entities
16233 reply = await self.rpc(msg)
16234 return reply
16235
16236
16237 class RebootFacade(Type):
16238 name = 'Reboot'
16239 version = 2
16240 schema = {'definitions': {'Entities': {'additionalProperties': False,
16241 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16242 'type': 'array'}},
16243 'required': ['entities'],
16244 'type': 'object'},
16245 'Entity': {'additionalProperties': False,
16246 'properties': {'tag': {'type': 'string'}},
16247 'required': ['tag'],
16248 'type': 'object'},
16249 'Error': {'additionalProperties': False,
16250 'properties': {'code': {'type': 'string'},
16251 'info': {'$ref': '#/definitions/ErrorInfo'},
16252 'message': {'type': 'string'}},
16253 'required': ['message', 'code'],
16254 'type': 'object'},
16255 'ErrorInfo': {'additionalProperties': False,
16256 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16257 'macaroon-path': {'type': 'string'}},
16258 'type': 'object'},
16259 'ErrorResult': {'additionalProperties': False,
16260 'properties': {'error': {'$ref': '#/definitions/Error'}},
16261 'type': 'object'},
16262 'ErrorResults': {'additionalProperties': False,
16263 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16264 'type': 'array'}},
16265 'required': ['results'],
16266 'type': 'object'},
16267 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16268 'NotifyWatchResult': {'additionalProperties': False,
16269 'properties': {'NotifyWatcherId': {'type': 'string'},
16270 'error': {'$ref': '#/definitions/Error'}},
16271 'required': ['NotifyWatcherId'],
16272 'type': 'object'},
16273 'RebootActionResult': {'additionalProperties': False,
16274 'properties': {'error': {'$ref': '#/definitions/Error'},
16275 'result': {'type': 'string'}},
16276 'type': 'object'},
16277 'RebootActionResults': {'additionalProperties': False,
16278 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
16279 'type': 'array'}},
16280 'type': 'object'}},
16281 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16282 'Result': {'$ref': '#/definitions/ErrorResults'}},
16283 'type': 'object'},
16284 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16285 'Result': {'$ref': '#/definitions/RebootActionResults'}},
16286 'type': 'object'},
16287 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16288 'Result': {'$ref': '#/definitions/ErrorResults'}},
16289 'type': 'object'},
16290 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16291 'type': 'object'}},
16292 'type': 'object'}
16293
16294
16295 @ReturnMapping(ErrorResults)
16296 async def ClearReboot(self, entities):
16297 '''
16298 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16299 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16300 '''
16301 # map input types to rpc msg
16302 params = dict()
16303 msg = dict(type='Reboot', request='ClearReboot', version=2, params=params)
16304 params['entities'] = entities
16305 reply = await self.rpc(msg)
16306 return reply
16307
16308
16309
16310 @ReturnMapping(RebootActionResults)
16311 async def GetRebootAction(self, entities):
16312 '''
16313 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16314 Returns -> typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
16315 '''
16316 # map input types to rpc msg
16317 params = dict()
16318 msg = dict(type='Reboot', request='GetRebootAction', version=2, params=params)
16319 params['entities'] = entities
16320 reply = await self.rpc(msg)
16321 return reply
16322
16323
16324
16325 @ReturnMapping(ErrorResults)
16326 async def RequestReboot(self, entities):
16327 '''
16328 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16329 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16330 '''
16331 # map input types to rpc msg
16332 params = dict()
16333 msg = dict(type='Reboot', request='RequestReboot', version=2, params=params)
16334 params['entities'] = entities
16335 reply = await self.rpc(msg)
16336 return reply
16337
16338
16339
16340 @ReturnMapping(NotifyWatchResult)
16341 async def WatchForRebootEvent(self):
16342 '''
16343
16344 Returns -> typing.Union[str, _ForwardRef('Error')]
16345 '''
16346 # map input types to rpc msg
16347 params = dict()
16348 msg = dict(type='Reboot', request='WatchForRebootEvent', version=2, params=params)
16349
16350 reply = await self.rpc(msg)
16351 return reply
16352
16353
16354 class RelationUnitsWatcherFacade(Type):
16355 name = 'RelationUnitsWatcher'
16356 version = 1
16357 schema = {'definitions': {'Error': {'additionalProperties': False,
16358 'properties': {'code': {'type': 'string'},
16359 'info': {'$ref': '#/definitions/ErrorInfo'},
16360 'message': {'type': 'string'}},
16361 'required': ['message', 'code'],
16362 'type': 'object'},
16363 'ErrorInfo': {'additionalProperties': False,
16364 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16365 'macaroon-path': {'type': 'string'}},
16366 'type': 'object'},
16367 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16368 'RelationUnitsChange': {'additionalProperties': False,
16369 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
16370 'type': 'object'},
16371 'departed': {'items': {'type': 'string'},
16372 'type': 'array'}},
16373 'required': ['changed'],
16374 'type': 'object'},
16375 'RelationUnitsWatchResult': {'additionalProperties': False,
16376 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
16377 'error': {'$ref': '#/definitions/Error'},
16378 'watcher-id': {'type': 'string'}},
16379 'required': ['watcher-id',
16380 'changes'],
16381 'type': 'object'},
16382 'UnitSettings': {'additionalProperties': False,
16383 'properties': {'version': {'type': 'integer'}},
16384 'required': ['version'],
16385 'type': 'object'}},
16386 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
16387 'type': 'object'},
16388 'Stop': {'type': 'object'}},
16389 'type': 'object'}
16390
16391
16392 @ReturnMapping(RelationUnitsWatchResult)
16393 async def Next(self):
16394 '''
16395
16396 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
16397 '''
16398 # map input types to rpc msg
16399 params = dict()
16400 msg = dict(type='RelationUnitsWatcher', request='Next', version=1, params=params)
16401
16402 reply = await self.rpc(msg)
16403 return reply
16404
16405
16406
16407 @ReturnMapping(None)
16408 async def Stop(self):
16409 '''
16410
16411 Returns -> None
16412 '''
16413 # map input types to rpc msg
16414 params = dict()
16415 msg = dict(type='RelationUnitsWatcher', request='Stop', version=1, params=params)
16416
16417 reply = await self.rpc(msg)
16418 return reply
16419
16420
16421 class ResumerFacade(Type):
16422 name = 'Resumer'
16423 version = 2
16424 schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
16425
16426
16427 @ReturnMapping(None)
16428 async def ResumeTransactions(self):
16429 '''
16430
16431 Returns -> None
16432 '''
16433 # map input types to rpc msg
16434 params = dict()
16435 msg = dict(type='Resumer', request='ResumeTransactions', version=2, params=params)
16436
16437 reply = await self.rpc(msg)
16438 return reply
16439
16440
16441 class RetryStrategyFacade(Type):
16442 name = 'RetryStrategy'
16443 version = 1
16444 schema = {'definitions': {'Entities': {'additionalProperties': False,
16445 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16446 'type': 'array'}},
16447 'required': ['entities'],
16448 'type': 'object'},
16449 'Entity': {'additionalProperties': False,
16450 'properties': {'tag': {'type': 'string'}},
16451 'required': ['tag'],
16452 'type': 'object'},
16453 'Error': {'additionalProperties': False,
16454 'properties': {'code': {'type': 'string'},
16455 'info': {'$ref': '#/definitions/ErrorInfo'},
16456 'message': {'type': 'string'}},
16457 'required': ['message', 'code'],
16458 'type': 'object'},
16459 'ErrorInfo': {'additionalProperties': False,
16460 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16461 'macaroon-path': {'type': 'string'}},
16462 'type': 'object'},
16463 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16464 'NotifyWatchResult': {'additionalProperties': False,
16465 'properties': {'NotifyWatcherId': {'type': 'string'},
16466 'error': {'$ref': '#/definitions/Error'}},
16467 'required': ['NotifyWatcherId'],
16468 'type': 'object'},
16469 'NotifyWatchResults': {'additionalProperties': False,
16470 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16471 'type': 'array'}},
16472 'required': ['results'],
16473 'type': 'object'},
16474 'RetryStrategy': {'additionalProperties': False,
16475 'properties': {'jitter-retry-time': {'type': 'boolean'},
16476 'max-retry-time': {'type': 'integer'},
16477 'min-retry-time': {'type': 'integer'},
16478 'retry-time-factor': {'type': 'integer'},
16479 'should-retry': {'type': 'boolean'}},
16480 'required': ['should-retry',
16481 'min-retry-time',
16482 'max-retry-time',
16483 'jitter-retry-time',
16484 'retry-time-factor'],
16485 'type': 'object'},
16486 'RetryStrategyResult': {'additionalProperties': False,
16487 'properties': {'error': {'$ref': '#/definitions/Error'},
16488 'result': {'$ref': '#/definitions/RetryStrategy'}},
16489 'type': 'object'},
16490 'RetryStrategyResults': {'additionalProperties': False,
16491 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
16492 'type': 'array'}},
16493 'required': ['results'],
16494 'type': 'object'}},
16495 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16496 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
16497 'type': 'object'},
16498 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16499 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16500 'type': 'object'}},
16501 'type': 'object'}
16502
16503
16504 @ReturnMapping(RetryStrategyResults)
16505 async def RetryStrategy(self, entities):
16506 '''
16507 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16508 Returns -> typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
16509 '''
16510 # map input types to rpc msg
16511 params = dict()
16512 msg = dict(type='RetryStrategy', request='RetryStrategy', version=1, params=params)
16513 params['entities'] = entities
16514 reply = await self.rpc(msg)
16515 return reply
16516
16517
16518
16519 @ReturnMapping(NotifyWatchResults)
16520 async def WatchRetryStrategy(self, entities):
16521 '''
16522 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16523 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
16524 '''
16525 # map input types to rpc msg
16526 params = dict()
16527 msg = dict(type='RetryStrategy', request='WatchRetryStrategy', version=1, params=params)
16528 params['entities'] = entities
16529 reply = await self.rpc(msg)
16530 return reply
16531
16532
16533 class SSHClientFacade(Type):
16534 name = 'SSHClient'
16535 version = 1
16536 schema = {'definitions': {'Entities': {'additionalProperties': False,
16537 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16538 'type': 'array'}},
16539 'required': ['entities'],
16540 'type': 'object'},
16541 'Entity': {'additionalProperties': False,
16542 'properties': {'tag': {'type': 'string'}},
16543 'required': ['tag'],
16544 'type': 'object'},
16545 'Error': {'additionalProperties': False,
16546 'properties': {'code': {'type': 'string'},
16547 'info': {'$ref': '#/definitions/ErrorInfo'},
16548 'message': {'type': 'string'}},
16549 'required': ['message', 'code'],
16550 'type': 'object'},
16551 'ErrorInfo': {'additionalProperties': False,
16552 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16553 'macaroon-path': {'type': 'string'}},
16554 'type': 'object'},
16555 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16556 'SSHAddressResult': {'additionalProperties': False,
16557 'properties': {'address': {'type': 'string'},
16558 'error': {'$ref': '#/definitions/Error'}},
16559 'type': 'object'},
16560 'SSHAddressResults': {'additionalProperties': False,
16561 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
16562 'type': 'array'}},
16563 'required': ['results'],
16564 'type': 'object'},
16565 'SSHProxyResult': {'additionalProperties': False,
16566 'properties': {'use-proxy': {'type': 'boolean'}},
16567 'required': ['use-proxy'],
16568 'type': 'object'},
16569 'SSHPublicKeysResult': {'additionalProperties': False,
16570 'properties': {'error': {'$ref': '#/definitions/Error'},
16571 'public-keys': {'items': {'type': 'string'},
16572 'type': 'array'}},
16573 'type': 'object'},
16574 'SSHPublicKeysResults': {'additionalProperties': False,
16575 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
16576 'type': 'array'}},
16577 'required': ['results'],
16578 'type': 'object'}},
16579 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16580 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
16581 'type': 'object'},
16582 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
16583 'type': 'object'},
16584 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16585 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
16586 'type': 'object'},
16587 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16588 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
16589 'type': 'object'}},
16590 'type': 'object'}
16591
16592
16593 @ReturnMapping(SSHAddressResults)
16594 async def PrivateAddress(self, entities):
16595 '''
16596 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16597 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
16598 '''
16599 # map input types to rpc msg
16600 params = dict()
16601 msg = dict(type='SSHClient', request='PrivateAddress', version=1, params=params)
16602 params['entities'] = entities
16603 reply = await self.rpc(msg)
16604 return reply
16605
16606
16607
16608 @ReturnMapping(SSHProxyResult)
16609 async def Proxy(self):
16610 '''
16611
16612 Returns -> bool
16613 '''
16614 # map input types to rpc msg
16615 params = dict()
16616 msg = dict(type='SSHClient', request='Proxy', version=1, params=params)
16617
16618 reply = await self.rpc(msg)
16619 return reply
16620
16621
16622
16623 @ReturnMapping(SSHAddressResults)
16624 async def PublicAddress(self, entities):
16625 '''
16626 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16627 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
16628 '''
16629 # map input types to rpc msg
16630 params = dict()
16631 msg = dict(type='SSHClient', request='PublicAddress', version=1, params=params)
16632 params['entities'] = entities
16633 reply = await self.rpc(msg)
16634 return reply
16635
16636
16637
16638 @ReturnMapping(SSHPublicKeysResults)
16639 async def PublicKeys(self, entities):
16640 '''
16641 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16642 Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
16643 '''
16644 # map input types to rpc msg
16645 params = dict()
16646 msg = dict(type='SSHClient', request='PublicKeys', version=1, params=params)
16647 params['entities'] = entities
16648 reply = await self.rpc(msg)
16649 return reply
16650
16651
16652 class SingularFacade(Type):
16653 name = 'Singular'
16654 version = 1
16655 schema = {'definitions': {'Entities': {'additionalProperties': False,
16656 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16657 'type': 'array'}},
16658 'required': ['entities'],
16659 'type': 'object'},
16660 'Entity': {'additionalProperties': False,
16661 'properties': {'tag': {'type': 'string'}},
16662 'required': ['tag'],
16663 'type': 'object'},
16664 'Error': {'additionalProperties': False,
16665 'properties': {'code': {'type': 'string'},
16666 'info': {'$ref': '#/definitions/ErrorInfo'},
16667 'message': {'type': 'string'}},
16668 'required': ['message', 'code'],
16669 'type': 'object'},
16670 'ErrorInfo': {'additionalProperties': False,
16671 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16672 'macaroon-path': {'type': 'string'}},
16673 'type': 'object'},
16674 'ErrorResult': {'additionalProperties': False,
16675 'properties': {'error': {'$ref': '#/definitions/Error'}},
16676 'type': 'object'},
16677 'ErrorResults': {'additionalProperties': False,
16678 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16679 'type': 'array'}},
16680 'required': ['results'],
16681 'type': 'object'},
16682 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16683 'SingularClaim': {'additionalProperties': False,
16684 'properties': {'controller-tag': {'type': 'string'},
16685 'duration': {'type': 'integer'},
16686 'model-tag': {'type': 'string'}},
16687 'required': ['model-tag',
16688 'controller-tag',
16689 'duration'],
16690 'type': 'object'},
16691 'SingularClaims': {'additionalProperties': False,
16692 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
16693 'type': 'array'}},
16694 'required': ['claims'],
16695 'type': 'object'}},
16696 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
16697 'Result': {'$ref': '#/definitions/ErrorResults'}},
16698 'type': 'object'},
16699 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16700 'Result': {'$ref': '#/definitions/ErrorResults'}},
16701 'type': 'object'}},
16702 'type': 'object'}
16703
16704
16705 @ReturnMapping(ErrorResults)
16706 async def Claim(self, claims):
16707 '''
16708 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
16709 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16710 '''
16711 # map input types to rpc msg
16712 params = dict()
16713 msg = dict(type='Singular', request='Claim', version=1, params=params)
16714 params['claims'] = claims
16715 reply = await self.rpc(msg)
16716 return reply
16717
16718
16719
16720 @ReturnMapping(ErrorResults)
16721 async def Wait(self, entities):
16722 '''
16723 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16724 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16725 '''
16726 # map input types to rpc msg
16727 params = dict()
16728 msg = dict(type='Singular', request='Wait', version=1, params=params)
16729 params['entities'] = entities
16730 reply = await self.rpc(msg)
16731 return reply
16732
16733
16734 class SpacesFacade(Type):
16735 name = 'Spaces'
16736 version = 2
16737 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
16738 'properties': {'provider-id': {'type': 'string'},
16739 'public': {'type': 'boolean'},
16740 'space-tag': {'type': 'string'},
16741 'subnet-tags': {'items': {'type': 'string'},
16742 'type': 'array'}},
16743 'required': ['subnet-tags',
16744 'space-tag',
16745 'public'],
16746 'type': 'object'},
16747 'CreateSpacesParams': {'additionalProperties': False,
16748 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
16749 'type': 'array'}},
16750 'required': ['spaces'],
16751 'type': 'object'},
16752 'Error': {'additionalProperties': False,
16753 'properties': {'code': {'type': 'string'},
16754 'info': {'$ref': '#/definitions/ErrorInfo'},
16755 'message': {'type': 'string'}},
16756 'required': ['message', 'code'],
16757 'type': 'object'},
16758 'ErrorInfo': {'additionalProperties': False,
16759 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16760 'macaroon-path': {'type': 'string'}},
16761 'type': 'object'},
16762 'ErrorResult': {'additionalProperties': False,
16763 'properties': {'error': {'$ref': '#/definitions/Error'}},
16764 'type': 'object'},
16765 'ErrorResults': {'additionalProperties': False,
16766 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16767 'type': 'array'}},
16768 'required': ['results'],
16769 'type': 'object'},
16770 'ListSpacesResults': {'additionalProperties': False,
16771 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
16772 'type': 'array'}},
16773 'required': ['results'],
16774 'type': 'object'},
16775 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16776 'Space': {'additionalProperties': False,
16777 'properties': {'error': {'$ref': '#/definitions/Error'},
16778 'name': {'type': 'string'},
16779 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
16780 'type': 'array'}},
16781 'required': ['name', 'subnets'],
16782 'type': 'object'},
16783 'Subnet': {'additionalProperties': False,
16784 'properties': {'cidr': {'type': 'string'},
16785 'life': {'type': 'string'},
16786 'provider-id': {'type': 'string'},
16787 'space-tag': {'type': 'string'},
16788 'status': {'type': 'string'},
16789 'vlan-tag': {'type': 'integer'},
16790 'zones': {'items': {'type': 'string'},
16791 'type': 'array'}},
16792 'required': ['cidr',
16793 'vlan-tag',
16794 'life',
16795 'space-tag',
16796 'zones'],
16797 'type': 'object'}},
16798 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
16799 'Result': {'$ref': '#/definitions/ErrorResults'}},
16800 'type': 'object'},
16801 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
16802 'type': 'object'}},
16803 'type': 'object'}
16804
16805
16806 @ReturnMapping(ErrorResults)
16807 async def CreateSpaces(self, spaces):
16808 '''
16809 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
16810 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16811 '''
16812 # map input types to rpc msg
16813 params = dict()
16814 msg = dict(type='Spaces', request='CreateSpaces', version=2, params=params)
16815 params['spaces'] = spaces
16816 reply = await self.rpc(msg)
16817 return reply
16818
16819
16820
16821 @ReturnMapping(ListSpacesResults)
16822 async def ListSpaces(self):
16823 '''
16824
16825 Returns -> typing.Sequence<+T_co>[~Space]<~Space>
16826 '''
16827 # map input types to rpc msg
16828 params = dict()
16829 msg = dict(type='Spaces', request='ListSpaces', version=2, params=params)
16830
16831 reply = await self.rpc(msg)
16832 return reply
16833
16834
16835 class StatusHistoryFacade(Type):
16836 name = 'StatusHistory'
16837 version = 2
16838 schema = {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
16839 'properties': {'max-history-mb': {'type': 'integer'},
16840 'max-history-time': {'type': 'integer'}},
16841 'required': ['max-history-time',
16842 'max-history-mb'],
16843 'type': 'object'}},
16844 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
16845 'type': 'object'}},
16846 'type': 'object'}
16847
16848
16849 @ReturnMapping(None)
16850 async def Prune(self, max_history_mb, max_history_time):
16851 '''
16852 max_history_mb : int
16853 max_history_time : int
16854 Returns -> None
16855 '''
16856 # map input types to rpc msg
16857 params = dict()
16858 msg = dict(type='StatusHistory', request='Prune', version=2, params=params)
16859 params['max-history-mb'] = max_history_mb
16860 params['max-history-time'] = max_history_time
16861 reply = await self.rpc(msg)
16862 return reply
16863
16864
16865 class StorageFacade(Type):
16866 name = 'Storage'
16867 version = 3
16868 schema = {'definitions': {'Entities': {'additionalProperties': False,
16869 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16870 'type': 'array'}},
16871 'required': ['entities'],
16872 'type': 'object'},
16873 'Entity': {'additionalProperties': False,
16874 'properties': {'tag': {'type': 'string'}},
16875 'required': ['tag'],
16876 'type': 'object'},
16877 'EntityStatus': {'additionalProperties': False,
16878 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
16879 'type': 'object'}},
16880 'type': 'object'},
16881 'info': {'type': 'string'},
16882 'since': {'format': 'date-time',
16883 'type': 'string'},
16884 'status': {'type': 'string'}},
16885 'required': ['status', 'info', 'since'],
16886 'type': 'object'},
16887 'Error': {'additionalProperties': False,
16888 'properties': {'code': {'type': 'string'},
16889 'info': {'$ref': '#/definitions/ErrorInfo'},
16890 'message': {'type': 'string'}},
16891 'required': ['message', 'code'],
16892 'type': 'object'},
16893 'ErrorInfo': {'additionalProperties': False,
16894 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16895 'macaroon-path': {'type': 'string'}},
16896 'type': 'object'},
16897 'ErrorResult': {'additionalProperties': False,
16898 'properties': {'error': {'$ref': '#/definitions/Error'}},
16899 'type': 'object'},
16900 'ErrorResults': {'additionalProperties': False,
16901 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16902 'type': 'array'}},
16903 'required': ['results'],
16904 'type': 'object'},
16905 'FilesystemAttachmentInfo': {'additionalProperties': False,
16906 'properties': {'mount-point': {'type': 'string'},
16907 'read-only': {'type': 'boolean'}},
16908 'type': 'object'},
16909 'FilesystemDetails': {'additionalProperties': False,
16910 'properties': {'filesystem-tag': {'type': 'string'},
16911 'info': {'$ref': '#/definitions/FilesystemInfo'},
16912 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
16913 'type': 'object'},
16914 'status': {'$ref': '#/definitions/EntityStatus'},
16915 'storage': {'$ref': '#/definitions/StorageDetails'},
16916 'volume-tag': {'type': 'string'}},
16917 'required': ['filesystem-tag',
16918 'info',
16919 'status'],
16920 'type': 'object'},
16921 'FilesystemDetailsListResult': {'additionalProperties': False,
16922 'properties': {'error': {'$ref': '#/definitions/Error'},
16923 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
16924 'type': 'array'}},
16925 'type': 'object'},
16926 'FilesystemDetailsListResults': {'additionalProperties': False,
16927 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
16928 'type': 'array'}},
16929 'type': 'object'},
16930 'FilesystemFilter': {'additionalProperties': False,
16931 'properties': {'machines': {'items': {'type': 'string'},
16932 'type': 'array'}},
16933 'type': 'object'},
16934 'FilesystemFilters': {'additionalProperties': False,
16935 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
16936 'type': 'array'}},
16937 'type': 'object'},
16938 'FilesystemInfo': {'additionalProperties': False,
16939 'properties': {'filesystem-id': {'type': 'string'},
16940 'size': {'type': 'integer'}},
16941 'required': ['filesystem-id', 'size'],
16942 'type': 'object'},
16943 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16944 'StorageAddParams': {'additionalProperties': False,
16945 'properties': {'name': {'type': 'string'},
16946 'storage': {'$ref': '#/definitions/StorageConstraints'},
16947 'unit': {'type': 'string'}},
16948 'required': ['unit', 'name', 'storage'],
16949 'type': 'object'},
16950 'StorageAttachmentDetails': {'additionalProperties': False,
16951 'properties': {'location': {'type': 'string'},
16952 'machine-tag': {'type': 'string'},
16953 'storage-tag': {'type': 'string'},
16954 'unit-tag': {'type': 'string'}},
16955 'required': ['storage-tag',
16956 'unit-tag',
16957 'machine-tag'],
16958 'type': 'object'},
16959 'StorageConstraints': {'additionalProperties': False,
16960 'properties': {'count': {'type': 'integer'},
16961 'pool': {'type': 'string'},
16962 'size': {'type': 'integer'}},
16963 'type': 'object'},
16964 'StorageDetails': {'additionalProperties': False,
16965 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
16966 'type': 'object'},
16967 'kind': {'type': 'integer'},
16968 'owner-tag': {'type': 'string'},
16969 'persistent': {'type': 'boolean'},
16970 'status': {'$ref': '#/definitions/EntityStatus'},
16971 'storage-tag': {'type': 'string'}},
16972 'required': ['storage-tag',
16973 'owner-tag',
16974 'kind',
16975 'status',
16976 'persistent'],
16977 'type': 'object'},
16978 'StorageDetailsListResult': {'additionalProperties': False,
16979 'properties': {'error': {'$ref': '#/definitions/Error'},
16980 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
16981 'type': 'array'}},
16982 'type': 'object'},
16983 'StorageDetailsListResults': {'additionalProperties': False,
16984 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
16985 'type': 'array'}},
16986 'type': 'object'},
16987 'StorageDetailsResult': {'additionalProperties': False,
16988 'properties': {'error': {'$ref': '#/definitions/Error'},
16989 'result': {'$ref': '#/definitions/StorageDetails'}},
16990 'type': 'object'},
16991 'StorageDetailsResults': {'additionalProperties': False,
16992 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
16993 'type': 'array'}},
16994 'type': 'object'},
16995 'StorageFilter': {'additionalProperties': False,
16996 'type': 'object'},
16997 'StorageFilters': {'additionalProperties': False,
16998 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
16999 'type': 'array'}},
17000 'type': 'object'},
17001 'StoragePool': {'additionalProperties': False,
17002 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
17003 'type': 'object'}},
17004 'type': 'object'},
17005 'name': {'type': 'string'},
17006 'provider': {'type': 'string'}},
17007 'required': ['name', 'provider', 'attrs'],
17008 'type': 'object'},
17009 'StoragePoolFilter': {'additionalProperties': False,
17010 'properties': {'names': {'items': {'type': 'string'},
17011 'type': 'array'},
17012 'providers': {'items': {'type': 'string'},
17013 'type': 'array'}},
17014 'type': 'object'},
17015 'StoragePoolFilters': {'additionalProperties': False,
17016 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
17017 'type': 'array'}},
17018 'type': 'object'},
17019 'StoragePoolsResult': {'additionalProperties': False,
17020 'properties': {'error': {'$ref': '#/definitions/Error'},
17021 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
17022 'type': 'array'}},
17023 'type': 'object'},
17024 'StoragePoolsResults': {'additionalProperties': False,
17025 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
17026 'type': 'array'}},
17027 'type': 'object'},
17028 'StoragesAddParams': {'additionalProperties': False,
17029 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
17030 'type': 'array'}},
17031 'required': ['storages'],
17032 'type': 'object'},
17033 'VolumeAttachmentInfo': {'additionalProperties': False,
17034 'properties': {'bus-address': {'type': 'string'},
17035 'device-link': {'type': 'string'},
17036 'device-name': {'type': 'string'},
17037 'read-only': {'type': 'boolean'}},
17038 'type': 'object'},
17039 'VolumeDetails': {'additionalProperties': False,
17040 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
17041 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
17042 'type': 'object'},
17043 'status': {'$ref': '#/definitions/EntityStatus'},
17044 'storage': {'$ref': '#/definitions/StorageDetails'},
17045 'volume-tag': {'type': 'string'}},
17046 'required': ['volume-tag', 'info', 'status'],
17047 'type': 'object'},
17048 'VolumeDetailsListResult': {'additionalProperties': False,
17049 'properties': {'error': {'$ref': '#/definitions/Error'},
17050 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
17051 'type': 'array'}},
17052 'type': 'object'},
17053 'VolumeDetailsListResults': {'additionalProperties': False,
17054 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
17055 'type': 'array'}},
17056 'type': 'object'},
17057 'VolumeFilter': {'additionalProperties': False,
17058 'properties': {'machines': {'items': {'type': 'string'},
17059 'type': 'array'}},
17060 'type': 'object'},
17061 'VolumeFilters': {'additionalProperties': False,
17062 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
17063 'type': 'array'}},
17064 'type': 'object'},
17065 'VolumeInfo': {'additionalProperties': False,
17066 'properties': {'hardware-id': {'type': 'string'},
17067 'persistent': {'type': 'boolean'},
17068 'size': {'type': 'integer'},
17069 'volume-id': {'type': 'string'}},
17070 'required': ['volume-id', 'size', 'persistent'],
17071 'type': 'object'}},
17072 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
17073 'Result': {'$ref': '#/definitions/ErrorResults'}},
17074 'type': 'object'},
17075 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
17076 'type': 'object'},
17077 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
17078 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
17079 'type': 'object'},
17080 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
17081 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
17082 'type': 'object'},
17083 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
17084 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
17085 'type': 'object'},
17086 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
17087 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
17088 'type': 'object'},
17089 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17090 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
17091 'type': 'object'}},
17092 'type': 'object'}
17093
17094
17095 @ReturnMapping(ErrorResults)
17096 async def AddToUnit(self, storages):
17097 '''
17098 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
17099 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17100 '''
17101 # map input types to rpc msg
17102 params = dict()
17103 msg = dict(type='Storage', request='AddToUnit', version=3, params=params)
17104 params['storages'] = storages
17105 reply = await self.rpc(msg)
17106 return reply
17107
17108
17109
17110 @ReturnMapping(None)
17111 async def CreatePool(self, attrs, name, provider):
17112 '''
17113 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
17114 name : str
17115 provider : str
17116 Returns -> None
17117 '''
17118 # map input types to rpc msg
17119 params = dict()
17120 msg = dict(type='Storage', request='CreatePool', version=3, params=params)
17121 params['attrs'] = attrs
17122 params['name'] = name
17123 params['provider'] = provider
17124 reply = await self.rpc(msg)
17125 return reply
17126
17127
17128
17129 @ReturnMapping(FilesystemDetailsListResults)
17130 async def ListFilesystems(self, filters):
17131 '''
17132 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
17133 Returns -> typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
17134 '''
17135 # map input types to rpc msg
17136 params = dict()
17137 msg = dict(type='Storage', request='ListFilesystems', version=3, params=params)
17138 params['filters'] = filters
17139 reply = await self.rpc(msg)
17140 return reply
17141
17142
17143
17144 @ReturnMapping(StoragePoolsResults)
17145 async def ListPools(self, filters):
17146 '''
17147 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
17148 Returns -> typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
17149 '''
17150 # map input types to rpc msg
17151 params = dict()
17152 msg = dict(type='Storage', request='ListPools', version=3, params=params)
17153 params['filters'] = filters
17154 reply = await self.rpc(msg)
17155 return reply
17156
17157
17158
17159 @ReturnMapping(StorageDetailsListResults)
17160 async def ListStorageDetails(self, filters):
17161 '''
17162 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
17163 Returns -> typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
17164 '''
17165 # map input types to rpc msg
17166 params = dict()
17167 msg = dict(type='Storage', request='ListStorageDetails', version=3, params=params)
17168 params['filters'] = filters
17169 reply = await self.rpc(msg)
17170 return reply
17171
17172
17173
17174 @ReturnMapping(VolumeDetailsListResults)
17175 async def ListVolumes(self, filters):
17176 '''
17177 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
17178 Returns -> typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
17179 '''
17180 # map input types to rpc msg
17181 params = dict()
17182 msg = dict(type='Storage', request='ListVolumes', version=3, params=params)
17183 params['filters'] = filters
17184 reply = await self.rpc(msg)
17185 return reply
17186
17187
17188
17189 @ReturnMapping(StorageDetailsResults)
17190 async def StorageDetails(self, entities):
17191 '''
17192 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17193 Returns -> typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
17194 '''
17195 # map input types to rpc msg
17196 params = dict()
17197 msg = dict(type='Storage', request='StorageDetails', version=3, params=params)
17198 params['entities'] = entities
17199 reply = await self.rpc(msg)
17200 return reply
17201
17202
17203 class StorageProvisionerFacade(Type):
17204 name = 'StorageProvisioner'
17205 version = 3
17206 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
17207 'properties': {'BusAddress': {'type': 'string'},
17208 'DeviceLinks': {'items': {'type': 'string'},
17209 'type': 'array'},
17210 'DeviceName': {'type': 'string'},
17211 'FilesystemType': {'type': 'string'},
17212 'HardwareId': {'type': 'string'},
17213 'InUse': {'type': 'boolean'},
17214 'Label': {'type': 'string'},
17215 'MountPoint': {'type': 'string'},
17216 'Size': {'type': 'integer'},
17217 'UUID': {'type': 'string'}},
17218 'required': ['DeviceName',
17219 'DeviceLinks',
17220 'Label',
17221 'UUID',
17222 'HardwareId',
17223 'BusAddress',
17224 'Size',
17225 'FilesystemType',
17226 'InUse',
17227 'MountPoint'],
17228 'type': 'object'},
17229 'BlockDeviceResult': {'additionalProperties': False,
17230 'properties': {'error': {'$ref': '#/definitions/Error'},
17231 'result': {'$ref': '#/definitions/BlockDevice'}},
17232 'required': ['result'],
17233 'type': 'object'},
17234 'BlockDeviceResults': {'additionalProperties': False,
17235 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
17236 'type': 'array'}},
17237 'type': 'object'},
17238 'Entities': {'additionalProperties': False,
17239 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17240 'type': 'array'}},
17241 'required': ['entities'],
17242 'type': 'object'},
17243 'Entity': {'additionalProperties': False,
17244 'properties': {'tag': {'type': 'string'}},
17245 'required': ['tag'],
17246 'type': 'object'},
17247 'EntityStatusArgs': {'additionalProperties': False,
17248 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17249 'type': 'object'}},
17250 'type': 'object'},
17251 'info': {'type': 'string'},
17252 'status': {'type': 'string'},
17253 'tag': {'type': 'string'}},
17254 'required': ['tag',
17255 'status',
17256 'info',
17257 'data'],
17258 'type': 'object'},
17259 'Error': {'additionalProperties': False,
17260 'properties': {'code': {'type': 'string'},
17261 'info': {'$ref': '#/definitions/ErrorInfo'},
17262 'message': {'type': 'string'}},
17263 'required': ['message', 'code'],
17264 'type': 'object'},
17265 'ErrorInfo': {'additionalProperties': False,
17266 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17267 'macaroon-path': {'type': 'string'}},
17268 'type': 'object'},
17269 'ErrorResult': {'additionalProperties': False,
17270 'properties': {'error': {'$ref': '#/definitions/Error'}},
17271 'type': 'object'},
17272 'ErrorResults': {'additionalProperties': False,
17273 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17274 'type': 'array'}},
17275 'required': ['results'],
17276 'type': 'object'},
17277 'Filesystem': {'additionalProperties': False,
17278 'properties': {'filesystem-tag': {'type': 'string'},
17279 'info': {'$ref': '#/definitions/FilesystemInfo'},
17280 'volume-tag': {'type': 'string'}},
17281 'required': ['filesystem-tag', 'info'],
17282 'type': 'object'},
17283 'FilesystemAttachment': {'additionalProperties': False,
17284 'properties': {'filesystem-tag': {'type': 'string'},
17285 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
17286 'machine-tag': {'type': 'string'}},
17287 'required': ['filesystem-tag',
17288 'machine-tag',
17289 'info'],
17290 'type': 'object'},
17291 'FilesystemAttachmentInfo': {'additionalProperties': False,
17292 'properties': {'mount-point': {'type': 'string'},
17293 'read-only': {'type': 'boolean'}},
17294 'type': 'object'},
17295 'FilesystemAttachmentParams': {'additionalProperties': False,
17296 'properties': {'filesystem-id': {'type': 'string'},
17297 'filesystem-tag': {'type': 'string'},
17298 'instance-id': {'type': 'string'},
17299 'machine-tag': {'type': 'string'},
17300 'mount-point': {'type': 'string'},
17301 'provider': {'type': 'string'},
17302 'read-only': {'type': 'boolean'}},
17303 'required': ['filesystem-tag',
17304 'machine-tag',
17305 'provider'],
17306 'type': 'object'},
17307 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
17308 'properties': {'error': {'$ref': '#/definitions/Error'},
17309 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
17310 'required': ['result'],
17311 'type': 'object'},
17312 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
17313 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
17314 'type': 'array'}},
17315 'type': 'object'},
17316 'FilesystemAttachmentResult': {'additionalProperties': False,
17317 'properties': {'error': {'$ref': '#/definitions/Error'},
17318 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
17319 'required': ['result'],
17320 'type': 'object'},
17321 'FilesystemAttachmentResults': {'additionalProperties': False,
17322 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
17323 'type': 'array'}},
17324 'type': 'object'},
17325 'FilesystemAttachments': {'additionalProperties': False,
17326 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
17327 'type': 'array'}},
17328 'required': ['filesystem-attachments'],
17329 'type': 'object'},
17330 'FilesystemInfo': {'additionalProperties': False,
17331 'properties': {'filesystem-id': {'type': 'string'},
17332 'size': {'type': 'integer'}},
17333 'required': ['filesystem-id', 'size'],
17334 'type': 'object'},
17335 'FilesystemParams': {'additionalProperties': False,
17336 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
17337 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
17338 'type': 'object'}},
17339 'type': 'object'},
17340 'filesystem-tag': {'type': 'string'},
17341 'provider': {'type': 'string'},
17342 'size': {'type': 'integer'},
17343 'tags': {'patternProperties': {'.*': {'type': 'string'}},
17344 'type': 'object'},
17345 'volume-tag': {'type': 'string'}},
17346 'required': ['filesystem-tag',
17347 'size',
17348 'provider'],
17349 'type': 'object'},
17350 'FilesystemParamsResult': {'additionalProperties': False,
17351 'properties': {'error': {'$ref': '#/definitions/Error'},
17352 'result': {'$ref': '#/definitions/FilesystemParams'}},
17353 'required': ['result'],
17354 'type': 'object'},
17355 'FilesystemParamsResults': {'additionalProperties': False,
17356 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
17357 'type': 'array'}},
17358 'type': 'object'},
17359 'FilesystemResult': {'additionalProperties': False,
17360 'properties': {'error': {'$ref': '#/definitions/Error'},
17361 'result': {'$ref': '#/definitions/Filesystem'}},
17362 'required': ['result'],
17363 'type': 'object'},
17364 'FilesystemResults': {'additionalProperties': False,
17365 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
17366 'type': 'array'}},
17367 'type': 'object'},
17368 'Filesystems': {'additionalProperties': False,
17369 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
17370 'type': 'array'}},
17371 'required': ['filesystems'],
17372 'type': 'object'},
17373 'LifeResult': {'additionalProperties': False,
17374 'properties': {'error': {'$ref': '#/definitions/Error'},
17375 'life': {'type': 'string'}},
17376 'required': ['life'],
17377 'type': 'object'},
17378 'LifeResults': {'additionalProperties': False,
17379 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
17380 'type': 'array'}},
17381 'required': ['results'],
17382 'type': 'object'},
17383 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17384 'MachineStorageId': {'additionalProperties': False,
17385 'properties': {'attachment-tag': {'type': 'string'},
17386 'machine-tag': {'type': 'string'}},
17387 'required': ['machine-tag',
17388 'attachment-tag'],
17389 'type': 'object'},
17390 'MachineStorageIds': {'additionalProperties': False,
17391 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
17392 'type': 'array'}},
17393 'required': ['ids'],
17394 'type': 'object'},
17395 'MachineStorageIdsWatchResult': {'additionalProperties': False,
17396 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
17397 'type': 'array'},
17398 'error': {'$ref': '#/definitions/Error'},
17399 'watcher-id': {'type': 'string'}},
17400 'required': ['watcher-id',
17401 'changes'],
17402 'type': 'object'},
17403 'MachineStorageIdsWatchResults': {'additionalProperties': False,
17404 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
17405 'type': 'array'}},
17406 'required': ['results'],
17407 'type': 'object'},
17408 'NotifyWatchResult': {'additionalProperties': False,
17409 'properties': {'NotifyWatcherId': {'type': 'string'},
17410 'error': {'$ref': '#/definitions/Error'}},
17411 'required': ['NotifyWatcherId'],
17412 'type': 'object'},
17413 'NotifyWatchResults': {'additionalProperties': False,
17414 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17415 'type': 'array'}},
17416 'required': ['results'],
17417 'type': 'object'},
17418 'SetStatus': {'additionalProperties': False,
17419 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17420 'type': 'array'}},
17421 'required': ['entities'],
17422 'type': 'object'},
17423 'StringResult': {'additionalProperties': False,
17424 'properties': {'error': {'$ref': '#/definitions/Error'},
17425 'result': {'type': 'string'}},
17426 'required': ['result'],
17427 'type': 'object'},
17428 'StringResults': {'additionalProperties': False,
17429 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
17430 'type': 'array'}},
17431 'required': ['results'],
17432 'type': 'object'},
17433 'StringsWatchResult': {'additionalProperties': False,
17434 'properties': {'changes': {'items': {'type': 'string'},
17435 'type': 'array'},
17436 'error': {'$ref': '#/definitions/Error'},
17437 'watcher-id': {'type': 'string'}},
17438 'required': ['watcher-id'],
17439 'type': 'object'},
17440 'StringsWatchResults': {'additionalProperties': False,
17441 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
17442 'type': 'array'}},
17443 'required': ['results'],
17444 'type': 'object'},
17445 'Volume': {'additionalProperties': False,
17446 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
17447 'volume-tag': {'type': 'string'}},
17448 'required': ['volume-tag', 'info'],
17449 'type': 'object'},
17450 'VolumeAttachment': {'additionalProperties': False,
17451 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
17452 'machine-tag': {'type': 'string'},
17453 'volume-tag': {'type': 'string'}},
17454 'required': ['volume-tag',
17455 'machine-tag',
17456 'info'],
17457 'type': 'object'},
17458 'VolumeAttachmentInfo': {'additionalProperties': False,
17459 'properties': {'bus-address': {'type': 'string'},
17460 'device-link': {'type': 'string'},
17461 'device-name': {'type': 'string'},
17462 'read-only': {'type': 'boolean'}},
17463 'type': 'object'},
17464 'VolumeAttachmentParams': {'additionalProperties': False,
17465 'properties': {'instance-id': {'type': 'string'},
17466 'machine-tag': {'type': 'string'},
17467 'provider': {'type': 'string'},
17468 'read-only': {'type': 'boolean'},
17469 'volume-id': {'type': 'string'},
17470 'volume-tag': {'type': 'string'}},
17471 'required': ['volume-tag',
17472 'machine-tag',
17473 'provider'],
17474 'type': 'object'},
17475 'VolumeAttachmentParamsResult': {'additionalProperties': False,
17476 'properties': {'error': {'$ref': '#/definitions/Error'},
17477 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
17478 'required': ['result'],
17479 'type': 'object'},
17480 'VolumeAttachmentParamsResults': {'additionalProperties': False,
17481 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
17482 'type': 'array'}},
17483 'type': 'object'},
17484 'VolumeAttachmentResult': {'additionalProperties': False,
17485 'properties': {'error': {'$ref': '#/definitions/Error'},
17486 'result': {'$ref': '#/definitions/VolumeAttachment'}},
17487 'required': ['result'],
17488 'type': 'object'},
17489 'VolumeAttachmentResults': {'additionalProperties': False,
17490 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
17491 'type': 'array'}},
17492 'type': 'object'},
17493 'VolumeAttachments': {'additionalProperties': False,
17494 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
17495 'type': 'array'}},
17496 'required': ['volume-attachments'],
17497 'type': 'object'},
17498 'VolumeInfo': {'additionalProperties': False,
17499 'properties': {'hardware-id': {'type': 'string'},
17500 'persistent': {'type': 'boolean'},
17501 'size': {'type': 'integer'},
17502 'volume-id': {'type': 'string'}},
17503 'required': ['volume-id', 'size', 'persistent'],
17504 'type': 'object'},
17505 'VolumeParams': {'additionalProperties': False,
17506 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
17507 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
17508 'type': 'object'}},
17509 'type': 'object'},
17510 'provider': {'type': 'string'},
17511 'size': {'type': 'integer'},
17512 'tags': {'patternProperties': {'.*': {'type': 'string'}},
17513 'type': 'object'},
17514 'volume-tag': {'type': 'string'}},
17515 'required': ['volume-tag',
17516 'size',
17517 'provider'],
17518 'type': 'object'},
17519 'VolumeParamsResult': {'additionalProperties': False,
17520 'properties': {'error': {'$ref': '#/definitions/Error'},
17521 'result': {'$ref': '#/definitions/VolumeParams'}},
17522 'required': ['result'],
17523 'type': 'object'},
17524 'VolumeParamsResults': {'additionalProperties': False,
17525 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
17526 'type': 'array'}},
17527 'type': 'object'},
17528 'VolumeResult': {'additionalProperties': False,
17529 'properties': {'error': {'$ref': '#/definitions/Error'},
17530 'result': {'$ref': '#/definitions/Volume'}},
17531 'required': ['result'],
17532 'type': 'object'},
17533 'VolumeResults': {'additionalProperties': False,
17534 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
17535 'type': 'array'}},
17536 'type': 'object'},
17537 'Volumes': {'additionalProperties': False,
17538 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
17539 'type': 'array'}},
17540 'required': ['volumes'],
17541 'type': 'object'}},
17542 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17543 'Result': {'$ref': '#/definitions/LifeResults'}},
17544 'type': 'object'},
17545 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17546 'Result': {'$ref': '#/definitions/ErrorResults'}},
17547 'type': 'object'},
17548 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17549 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
17550 'type': 'object'},
17551 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17552 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
17553 'type': 'object'},
17554 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17555 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
17556 'type': 'object'},
17557 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17558 'Result': {'$ref': '#/definitions/FilesystemResults'}},
17559 'type': 'object'},
17560 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17561 'Result': {'$ref': '#/definitions/StringResults'}},
17562 'type': 'object'},
17563 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17564 'Result': {'$ref': '#/definitions/LifeResults'}},
17565 'type': 'object'},
17566 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17567 'Result': {'$ref': '#/definitions/ErrorResults'}},
17568 'type': 'object'},
17569 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17570 'Result': {'$ref': '#/definitions/ErrorResults'}},
17571 'type': 'object'},
17572 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
17573 'Result': {'$ref': '#/definitions/ErrorResults'}},
17574 'type': 'object'},
17575 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
17576 'Result': {'$ref': '#/definitions/ErrorResults'}},
17577 'type': 'object'},
17578 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17579 'Result': {'$ref': '#/definitions/ErrorResults'}},
17580 'type': 'object'},
17581 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
17582 'Result': {'$ref': '#/definitions/ErrorResults'}},
17583 'type': 'object'},
17584 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
17585 'Result': {'$ref': '#/definitions/ErrorResults'}},
17586 'type': 'object'},
17587 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17588 'Result': {'$ref': '#/definitions/ErrorResults'}},
17589 'type': 'object'},
17590 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17591 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
17592 'type': 'object'},
17593 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17594 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
17595 'type': 'object'},
17596 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17597 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
17598 'type': 'object'},
17599 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17600 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
17601 'type': 'object'},
17602 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17603 'Result': {'$ref': '#/definitions/VolumeResults'}},
17604 'type': 'object'},
17605 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17606 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17607 'type': 'object'},
17608 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17609 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
17610 'type': 'object'},
17611 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17612 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
17613 'type': 'object'},
17614 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17615 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17616 'type': 'object'},
17617 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17618 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
17619 'type': 'object'},
17620 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17621 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
17622 'type': 'object'}},
17623 'type': 'object'}
17624
17625
17626 @ReturnMapping(LifeResults)
17627 async def AttachmentLife(self, ids):
17628 '''
17629 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17630 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
17631 '''
17632 # map input types to rpc msg
17633 params = dict()
17634 msg = dict(type='StorageProvisioner', request='AttachmentLife', version=3, params=params)
17635 params['ids'] = ids
17636 reply = await self.rpc(msg)
17637 return reply
17638
17639
17640
17641 @ReturnMapping(ErrorResults)
17642 async def EnsureDead(self, entities):
17643 '''
17644 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17645 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17646 '''
17647 # map input types to rpc msg
17648 params = dict()
17649 msg = dict(type='StorageProvisioner', request='EnsureDead', version=3, params=params)
17650 params['entities'] = entities
17651 reply = await self.rpc(msg)
17652 return reply
17653
17654
17655
17656 @ReturnMapping(FilesystemAttachmentParamsResults)
17657 async def FilesystemAttachmentParams(self, ids):
17658 '''
17659 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17660 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
17661 '''
17662 # map input types to rpc msg
17663 params = dict()
17664 msg = dict(type='StorageProvisioner', request='FilesystemAttachmentParams', version=3, params=params)
17665 params['ids'] = ids
17666 reply = await self.rpc(msg)
17667 return reply
17668
17669
17670
17671 @ReturnMapping(FilesystemAttachmentResults)
17672 async def FilesystemAttachments(self, ids):
17673 '''
17674 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17675 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
17676 '''
17677 # map input types to rpc msg
17678 params = dict()
17679 msg = dict(type='StorageProvisioner', request='FilesystemAttachments', version=3, params=params)
17680 params['ids'] = ids
17681 reply = await self.rpc(msg)
17682 return reply
17683
17684
17685
17686 @ReturnMapping(FilesystemParamsResults)
17687 async def FilesystemParams(self, entities):
17688 '''
17689 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17690 Returns -> typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
17691 '''
17692 # map input types to rpc msg
17693 params = dict()
17694 msg = dict(type='StorageProvisioner', request='FilesystemParams', version=3, params=params)
17695 params['entities'] = entities
17696 reply = await self.rpc(msg)
17697 return reply
17698
17699
17700
17701 @ReturnMapping(FilesystemResults)
17702 async def Filesystems(self, entities):
17703 '''
17704 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17705 Returns -> typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
17706 '''
17707 # map input types to rpc msg
17708 params = dict()
17709 msg = dict(type='StorageProvisioner', request='Filesystems', version=3, params=params)
17710 params['entities'] = entities
17711 reply = await self.rpc(msg)
17712 return reply
17713
17714
17715
17716 @ReturnMapping(StringResults)
17717 async def InstanceId(self, entities):
17718 '''
17719 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17720 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
17721 '''
17722 # map input types to rpc msg
17723 params = dict()
17724 msg = dict(type='StorageProvisioner', request='InstanceId', version=3, params=params)
17725 params['entities'] = entities
17726 reply = await self.rpc(msg)
17727 return reply
17728
17729
17730
17731 @ReturnMapping(LifeResults)
17732 async def Life(self, entities):
17733 '''
17734 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17735 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
17736 '''
17737 # map input types to rpc msg
17738 params = dict()
17739 msg = dict(type='StorageProvisioner', request='Life', version=3, params=params)
17740 params['entities'] = entities
17741 reply = await self.rpc(msg)
17742 return reply
17743
17744
17745
17746 @ReturnMapping(ErrorResults)
17747 async def Remove(self, entities):
17748 '''
17749 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17750 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17751 '''
17752 # map input types to rpc msg
17753 params = dict()
17754 msg = dict(type='StorageProvisioner', request='Remove', version=3, params=params)
17755 params['entities'] = entities
17756 reply = await self.rpc(msg)
17757 return reply
17758
17759
17760
17761 @ReturnMapping(ErrorResults)
17762 async def RemoveAttachment(self, ids):
17763 '''
17764 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17765 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17766 '''
17767 # map input types to rpc msg
17768 params = dict()
17769 msg = dict(type='StorageProvisioner', request='RemoveAttachment', version=3, params=params)
17770 params['ids'] = ids
17771 reply = await self.rpc(msg)
17772 return reply
17773
17774
17775
17776 @ReturnMapping(ErrorResults)
17777 async def SetFilesystemAttachmentInfo(self, filesystem_attachments):
17778 '''
17779 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
17780 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17781 '''
17782 # map input types to rpc msg
17783 params = dict()
17784 msg = dict(type='StorageProvisioner', request='SetFilesystemAttachmentInfo', version=3, params=params)
17785 params['filesystem-attachments'] = filesystem_attachments
17786 reply = await self.rpc(msg)
17787 return reply
17788
17789
17790
17791 @ReturnMapping(ErrorResults)
17792 async def SetFilesystemInfo(self, filesystems):
17793 '''
17794 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
17795 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17796 '''
17797 # map input types to rpc msg
17798 params = dict()
17799 msg = dict(type='StorageProvisioner', request='SetFilesystemInfo', version=3, params=params)
17800 params['filesystems'] = filesystems
17801 reply = await self.rpc(msg)
17802 return reply
17803
17804
17805
17806 @ReturnMapping(ErrorResults)
17807 async def SetStatus(self, entities):
17808 '''
17809 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
17810 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17811 '''
17812 # map input types to rpc msg
17813 params = dict()
17814 msg = dict(type='StorageProvisioner', request='SetStatus', version=3, params=params)
17815 params['entities'] = entities
17816 reply = await self.rpc(msg)
17817 return reply
17818
17819
17820
17821 @ReturnMapping(ErrorResults)
17822 async def SetVolumeAttachmentInfo(self, volume_attachments):
17823 '''
17824 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
17825 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17826 '''
17827 # map input types to rpc msg
17828 params = dict()
17829 msg = dict(type='StorageProvisioner', request='SetVolumeAttachmentInfo', version=3, params=params)
17830 params['volume-attachments'] = volume_attachments
17831 reply = await self.rpc(msg)
17832 return reply
17833
17834
17835
17836 @ReturnMapping(ErrorResults)
17837 async def SetVolumeInfo(self, volumes):
17838 '''
17839 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
17840 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17841 '''
17842 # map input types to rpc msg
17843 params = dict()
17844 msg = dict(type='StorageProvisioner', request='SetVolumeInfo', version=3, params=params)
17845 params['volumes'] = volumes
17846 reply = await self.rpc(msg)
17847 return reply
17848
17849
17850
17851 @ReturnMapping(ErrorResults)
17852 async def UpdateStatus(self, entities):
17853 '''
17854 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
17855 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17856 '''
17857 # map input types to rpc msg
17858 params = dict()
17859 msg = dict(type='StorageProvisioner', request='UpdateStatus', version=3, params=params)
17860 params['entities'] = entities
17861 reply = await self.rpc(msg)
17862 return reply
17863
17864
17865
17866 @ReturnMapping(VolumeAttachmentParamsResults)
17867 async def VolumeAttachmentParams(self, ids):
17868 '''
17869 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17870 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
17871 '''
17872 # map input types to rpc msg
17873 params = dict()
17874 msg = dict(type='StorageProvisioner', request='VolumeAttachmentParams', version=3, params=params)
17875 params['ids'] = ids
17876 reply = await self.rpc(msg)
17877 return reply
17878
17879
17880
17881 @ReturnMapping(VolumeAttachmentResults)
17882 async def VolumeAttachments(self, ids):
17883 '''
17884 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17885 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
17886 '''
17887 # map input types to rpc msg
17888 params = dict()
17889 msg = dict(type='StorageProvisioner', request='VolumeAttachments', version=3, params=params)
17890 params['ids'] = ids
17891 reply = await self.rpc(msg)
17892 return reply
17893
17894
17895
17896 @ReturnMapping(BlockDeviceResults)
17897 async def VolumeBlockDevices(self, ids):
17898 '''
17899 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17900 Returns -> typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
17901 '''
17902 # map input types to rpc msg
17903 params = dict()
17904 msg = dict(type='StorageProvisioner', request='VolumeBlockDevices', version=3, params=params)
17905 params['ids'] = ids
17906 reply = await self.rpc(msg)
17907 return reply
17908
17909
17910
17911 @ReturnMapping(VolumeParamsResults)
17912 async def VolumeParams(self, entities):
17913 '''
17914 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17915 Returns -> typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
17916 '''
17917 # map input types to rpc msg
17918 params = dict()
17919 msg = dict(type='StorageProvisioner', request='VolumeParams', version=3, params=params)
17920 params['entities'] = entities
17921 reply = await self.rpc(msg)
17922 return reply
17923
17924
17925
17926 @ReturnMapping(VolumeResults)
17927 async def Volumes(self, entities):
17928 '''
17929 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17930 Returns -> typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
17931 '''
17932 # map input types to rpc msg
17933 params = dict()
17934 msg = dict(type='StorageProvisioner', request='Volumes', version=3, params=params)
17935 params['entities'] = entities
17936 reply = await self.rpc(msg)
17937 return reply
17938
17939
17940
17941 @ReturnMapping(NotifyWatchResults)
17942 async def WatchBlockDevices(self, entities):
17943 '''
17944 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17945 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
17946 '''
17947 # map input types to rpc msg
17948 params = dict()
17949 msg = dict(type='StorageProvisioner', request='WatchBlockDevices', version=3, params=params)
17950 params['entities'] = entities
17951 reply = await self.rpc(msg)
17952 return reply
17953
17954
17955
17956 @ReturnMapping(MachineStorageIdsWatchResults)
17957 async def WatchFilesystemAttachments(self, entities):
17958 '''
17959 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17960 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
17961 '''
17962 # map input types to rpc msg
17963 params = dict()
17964 msg = dict(type='StorageProvisioner', request='WatchFilesystemAttachments', version=3, params=params)
17965 params['entities'] = entities
17966 reply = await self.rpc(msg)
17967 return reply
17968
17969
17970
17971 @ReturnMapping(StringsWatchResults)
17972 async def WatchFilesystems(self, entities):
17973 '''
17974 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17975 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
17976 '''
17977 # map input types to rpc msg
17978 params = dict()
17979 msg = dict(type='StorageProvisioner', request='WatchFilesystems', version=3, params=params)
17980 params['entities'] = entities
17981 reply = await self.rpc(msg)
17982 return reply
17983
17984
17985
17986 @ReturnMapping(NotifyWatchResults)
17987 async def WatchMachines(self, entities):
17988 '''
17989 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17990 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
17991 '''
17992 # map input types to rpc msg
17993 params = dict()
17994 msg = dict(type='StorageProvisioner', request='WatchMachines', version=3, params=params)
17995 params['entities'] = entities
17996 reply = await self.rpc(msg)
17997 return reply
17998
17999
18000
18001 @ReturnMapping(MachineStorageIdsWatchResults)
18002 async def WatchVolumeAttachments(self, entities):
18003 '''
18004 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18005 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
18006 '''
18007 # map input types to rpc msg
18008 params = dict()
18009 msg = dict(type='StorageProvisioner', request='WatchVolumeAttachments', version=3, params=params)
18010 params['entities'] = entities
18011 reply = await self.rpc(msg)
18012 return reply
18013
18014
18015
18016 @ReturnMapping(StringsWatchResults)
18017 async def WatchVolumes(self, entities):
18018 '''
18019 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18020 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
18021 '''
18022 # map input types to rpc msg
18023 params = dict()
18024 msg = dict(type='StorageProvisioner', request='WatchVolumes', version=3, params=params)
18025 params['entities'] = entities
18026 reply = await self.rpc(msg)
18027 return reply
18028
18029
18030 class StringsWatcherFacade(Type):
18031 name = 'StringsWatcher'
18032 version = 1
18033 schema = {'definitions': {'Error': {'additionalProperties': False,
18034 'properties': {'code': {'type': 'string'},
18035 'info': {'$ref': '#/definitions/ErrorInfo'},
18036 'message': {'type': 'string'}},
18037 'required': ['message', 'code'],
18038 'type': 'object'},
18039 'ErrorInfo': {'additionalProperties': False,
18040 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18041 'macaroon-path': {'type': 'string'}},
18042 'type': 'object'},
18043 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18044 'StringsWatchResult': {'additionalProperties': False,
18045 'properties': {'changes': {'items': {'type': 'string'},
18046 'type': 'array'},
18047 'error': {'$ref': '#/definitions/Error'},
18048 'watcher-id': {'type': 'string'}},
18049 'required': ['watcher-id'],
18050 'type': 'object'}},
18051 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
18052 'type': 'object'},
18053 'Stop': {'type': 'object'}},
18054 'type': 'object'}
18055
18056
18057 @ReturnMapping(StringsWatchResult)
18058 async def Next(self):
18059 '''
18060
18061 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
18062 '''
18063 # map input types to rpc msg
18064 params = dict()
18065 msg = dict(type='StringsWatcher', request='Next', version=1, params=params)
18066
18067 reply = await self.rpc(msg)
18068 return reply
18069
18070
18071
18072 @ReturnMapping(None)
18073 async def Stop(self):
18074 '''
18075
18076 Returns -> None
18077 '''
18078 # map input types to rpc msg
18079 params = dict()
18080 msg = dict(type='StringsWatcher', request='Stop', version=1, params=params)
18081
18082 reply = await self.rpc(msg)
18083 return reply
18084
18085
18086 class SubnetsFacade(Type):
18087 name = 'Subnets'
18088 version = 2
18089 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
18090 'properties': {'space-tag': {'type': 'string'},
18091 'subnet-provider-id': {'type': 'string'},
18092 'subnet-tag': {'type': 'string'},
18093 'zones': {'items': {'type': 'string'},
18094 'type': 'array'}},
18095 'required': ['space-tag'],
18096 'type': 'object'},
18097 'AddSubnetsParams': {'additionalProperties': False,
18098 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
18099 'type': 'array'}},
18100 'required': ['subnets'],
18101 'type': 'object'},
18102 'Error': {'additionalProperties': False,
18103 'properties': {'code': {'type': 'string'},
18104 'info': {'$ref': '#/definitions/ErrorInfo'},
18105 'message': {'type': 'string'}},
18106 'required': ['message', 'code'],
18107 'type': 'object'},
18108 'ErrorInfo': {'additionalProperties': False,
18109 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18110 'macaroon-path': {'type': 'string'}},
18111 'type': 'object'},
18112 'ErrorResult': {'additionalProperties': False,
18113 'properties': {'error': {'$ref': '#/definitions/Error'}},
18114 'type': 'object'},
18115 'ErrorResults': {'additionalProperties': False,
18116 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18117 'type': 'array'}},
18118 'required': ['results'],
18119 'type': 'object'},
18120 'ListSubnetsResults': {'additionalProperties': False,
18121 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
18122 'type': 'array'}},
18123 'required': ['results'],
18124 'type': 'object'},
18125 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18126 'SpaceResult': {'additionalProperties': False,
18127 'properties': {'error': {'$ref': '#/definitions/Error'},
18128 'tag': {'type': 'string'}},
18129 'required': ['tag'],
18130 'type': 'object'},
18131 'SpaceResults': {'additionalProperties': False,
18132 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'},
18133 'type': 'array'}},
18134 'required': ['results'],
18135 'type': 'object'},
18136 'Subnet': {'additionalProperties': False,
18137 'properties': {'cidr': {'type': 'string'},
18138 'life': {'type': 'string'},
18139 'provider-id': {'type': 'string'},
18140 'space-tag': {'type': 'string'},
18141 'status': {'type': 'string'},
18142 'vlan-tag': {'type': 'integer'},
18143 'zones': {'items': {'type': 'string'},
18144 'type': 'array'}},
18145 'required': ['cidr',
18146 'vlan-tag',
18147 'life',
18148 'space-tag',
18149 'zones'],
18150 'type': 'object'},
18151 'SubnetsFilters': {'additionalProperties': False,
18152 'properties': {'space-tag': {'type': 'string'},
18153 'zone': {'type': 'string'}},
18154 'type': 'object'},
18155 'ZoneResult': {'additionalProperties': False,
18156 'properties': {'available': {'type': 'boolean'},
18157 'error': {'$ref': '#/definitions/Error'},
18158 'name': {'type': 'string'}},
18159 'required': ['name', 'available'],
18160 'type': 'object'},
18161 'ZoneResults': {'additionalProperties': False,
18162 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'},
18163 'type': 'array'}},
18164 'required': ['results'],
18165 'type': 'object'}},
18166 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
18167 'Result': {'$ref': '#/definitions/ErrorResults'}},
18168 'type': 'object'},
18169 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
18170 'type': 'object'},
18171 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
18172 'type': 'object'},
18173 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
18174 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
18175 'type': 'object'}},
18176 'type': 'object'}
18177
18178
18179 @ReturnMapping(ErrorResults)
18180 async def AddSubnets(self, subnets):
18181 '''
18182 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
18183 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18184 '''
18185 # map input types to rpc msg
18186 params = dict()
18187 msg = dict(type='Subnets', request='AddSubnets', version=2, params=params)
18188 params['subnets'] = subnets
18189 reply = await self.rpc(msg)
18190 return reply
18191
18192
18193
18194 @ReturnMapping(SpaceResults)
18195 async def AllSpaces(self):
18196 '''
18197
18198 Returns -> typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
18199 '''
18200 # map input types to rpc msg
18201 params = dict()
18202 msg = dict(type='Subnets', request='AllSpaces', version=2, params=params)
18203
18204 reply = await self.rpc(msg)
18205 return reply
18206
18207
18208
18209 @ReturnMapping(ZoneResults)
18210 async def AllZones(self):
18211 '''
18212
18213 Returns -> typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
18214 '''
18215 # map input types to rpc msg
18216 params = dict()
18217 msg = dict(type='Subnets', request='AllZones', version=2, params=params)
18218
18219 reply = await self.rpc(msg)
18220 return reply
18221
18222
18223
18224 @ReturnMapping(ListSubnetsResults)
18225 async def ListSubnets(self, space_tag, zone):
18226 '''
18227 space_tag : str
18228 zone : str
18229 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
18230 '''
18231 # map input types to rpc msg
18232 params = dict()
18233 msg = dict(type='Subnets', request='ListSubnets', version=2, params=params)
18234 params['space-tag'] = space_tag
18235 params['zone'] = zone
18236 reply = await self.rpc(msg)
18237 return reply
18238
18239
18240 class UndertakerFacade(Type):
18241 name = 'Undertaker'
18242 version = 1
18243 schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
18244 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18245 'type': 'object'}},
18246 'type': 'object'},
18247 'info': {'type': 'string'},
18248 'status': {'type': 'string'},
18249 'tag': {'type': 'string'}},
18250 'required': ['tag',
18251 'status',
18252 'info',
18253 'data'],
18254 'type': 'object'},
18255 'Error': {'additionalProperties': False,
18256 'properties': {'code': {'type': 'string'},
18257 'info': {'$ref': '#/definitions/ErrorInfo'},
18258 'message': {'type': 'string'}},
18259 'required': ['message', 'code'],
18260 'type': 'object'},
18261 'ErrorInfo': {'additionalProperties': False,
18262 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18263 'macaroon-path': {'type': 'string'}},
18264 'type': 'object'},
18265 'ErrorResult': {'additionalProperties': False,
18266 'properties': {'error': {'$ref': '#/definitions/Error'}},
18267 'type': 'object'},
18268 'ErrorResults': {'additionalProperties': False,
18269 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18270 'type': 'array'}},
18271 'required': ['results'],
18272 'type': 'object'},
18273 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18274 'ModelConfigResult': {'additionalProperties': False,
18275 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
18276 'type': 'object'}},
18277 'type': 'object'}},
18278 'required': ['config'],
18279 'type': 'object'},
18280 'NotifyWatchResult': {'additionalProperties': False,
18281 'properties': {'NotifyWatcherId': {'type': 'string'},
18282 'error': {'$ref': '#/definitions/Error'}},
18283 'required': ['NotifyWatcherId'],
18284 'type': 'object'},
18285 'NotifyWatchResults': {'additionalProperties': False,
18286 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
18287 'type': 'array'}},
18288 'required': ['results'],
18289 'type': 'object'},
18290 'SetStatus': {'additionalProperties': False,
18291 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18292 'type': 'array'}},
18293 'required': ['entities'],
18294 'type': 'object'},
18295 'UndertakerModelInfo': {'additionalProperties': False,
18296 'properties': {'global-name': {'type': 'string'},
18297 'is-system': {'type': 'boolean'},
18298 'life': {'type': 'string'},
18299 'name': {'type': 'string'},
18300 'uuid': {'type': 'string'}},
18301 'required': ['uuid',
18302 'name',
18303 'global-name',
18304 'is-system',
18305 'life'],
18306 'type': 'object'},
18307 'UndertakerModelInfoResult': {'additionalProperties': False,
18308 'properties': {'error': {'$ref': '#/definitions/Error'},
18309 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
18310 'required': ['result'],
18311 'type': 'object'}},
18312 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
18313 'type': 'object'},
18314 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
18315 'type': 'object'},
18316 'ProcessDyingModel': {'type': 'object'},
18317 'RemoveModel': {'type': 'object'},
18318 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18319 'Result': {'$ref': '#/definitions/ErrorResults'}},
18320 'type': 'object'},
18321 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18322 'Result': {'$ref': '#/definitions/ErrorResults'}},
18323 'type': 'object'},
18324 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18325 'type': 'object'}},
18326 'type': 'object'}
18327
18328
18329 @ReturnMapping(ModelConfigResult)
18330 async def ModelConfig(self):
18331 '''
18332
18333 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
18334 '''
18335 # map input types to rpc msg
18336 params = dict()
18337 msg = dict(type='Undertaker', request='ModelConfig', version=1, params=params)
18338
18339 reply = await self.rpc(msg)
18340 return reply
18341
18342
18343
18344 @ReturnMapping(UndertakerModelInfoResult)
18345 async def ModelInfo(self):
18346 '''
18347
18348 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
18349 '''
18350 # map input types to rpc msg
18351 params = dict()
18352 msg = dict(type='Undertaker', request='ModelInfo', version=1, params=params)
18353
18354 reply = await self.rpc(msg)
18355 return reply
18356
18357
18358
18359 @ReturnMapping(None)
18360 async def ProcessDyingModel(self):
18361 '''
18362
18363 Returns -> None
18364 '''
18365 # map input types to rpc msg
18366 params = dict()
18367 msg = dict(type='Undertaker', request='ProcessDyingModel', version=1, params=params)
18368
18369 reply = await self.rpc(msg)
18370 return reply
18371
18372
18373
18374 @ReturnMapping(None)
18375 async def RemoveModel(self):
18376 '''
18377
18378 Returns -> None
18379 '''
18380 # map input types to rpc msg
18381 params = dict()
18382 msg = dict(type='Undertaker', request='RemoveModel', version=1, params=params)
18383
18384 reply = await self.rpc(msg)
18385 return reply
18386
18387
18388
18389 @ReturnMapping(ErrorResults)
18390 async def SetStatus(self, entities):
18391 '''
18392 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18393 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18394 '''
18395 # map input types to rpc msg
18396 params = dict()
18397 msg = dict(type='Undertaker', request='SetStatus', version=1, params=params)
18398 params['entities'] = entities
18399 reply = await self.rpc(msg)
18400 return reply
18401
18402
18403
18404 @ReturnMapping(ErrorResults)
18405 async def UpdateStatus(self, entities):
18406 '''
18407 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18408 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18409 '''
18410 # map input types to rpc msg
18411 params = dict()
18412 msg = dict(type='Undertaker', request='UpdateStatus', version=1, params=params)
18413 params['entities'] = entities
18414 reply = await self.rpc(msg)
18415 return reply
18416
18417
18418
18419 @ReturnMapping(NotifyWatchResults)
18420 async def WatchModelResources(self):
18421 '''
18422
18423 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
18424 '''
18425 # map input types to rpc msg
18426 params = dict()
18427 msg = dict(type='Undertaker', request='WatchModelResources', version=1, params=params)
18428
18429 reply = await self.rpc(msg)
18430 return reply
18431
18432
18433 class UnitAssignerFacade(Type):
18434 name = 'UnitAssigner'
18435 version = 1
18436 schema = {'definitions': {'Entities': {'additionalProperties': False,
18437 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
18438 'type': 'array'}},
18439 'required': ['entities'],
18440 'type': 'object'},
18441 'Entity': {'additionalProperties': False,
18442 'properties': {'tag': {'type': 'string'}},
18443 'required': ['tag'],
18444 'type': 'object'},
18445 'EntityStatusArgs': {'additionalProperties': False,
18446 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18447 'type': 'object'}},
18448 'type': 'object'},
18449 'info': {'type': 'string'},
18450 'status': {'type': 'string'},
18451 'tag': {'type': 'string'}},
18452 'required': ['tag',
18453 'status',
18454 'info',
18455 'data'],
18456 'type': 'object'},
18457 'Error': {'additionalProperties': False,
18458 'properties': {'code': {'type': 'string'},
18459 'info': {'$ref': '#/definitions/ErrorInfo'},
18460 'message': {'type': 'string'}},
18461 'required': ['message', 'code'],
18462 'type': 'object'},
18463 'ErrorInfo': {'additionalProperties': False,
18464 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18465 'macaroon-path': {'type': 'string'}},
18466 'type': 'object'},
18467 'ErrorResult': {'additionalProperties': False,
18468 'properties': {'error': {'$ref': '#/definitions/Error'}},
18469 'type': 'object'},
18470 'ErrorResults': {'additionalProperties': False,
18471 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18472 'type': 'array'}},
18473 'required': ['results'],
18474 'type': 'object'},
18475 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18476 'SetStatus': {'additionalProperties': False,
18477 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18478 'type': 'array'}},
18479 'required': ['entities'],
18480 'type': 'object'},
18481 'StringsWatchResult': {'additionalProperties': False,
18482 'properties': {'changes': {'items': {'type': 'string'},
18483 'type': 'array'},
18484 'error': {'$ref': '#/definitions/Error'},
18485 'watcher-id': {'type': 'string'}},
18486 'required': ['watcher-id'],
18487 'type': 'object'}},
18488 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18489 'Result': {'$ref': '#/definitions/ErrorResults'}},
18490 'type': 'object'},
18491 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18492 'Result': {'$ref': '#/definitions/ErrorResults'}},
18493 'type': 'object'},
18494 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
18495 'type': 'object'}},
18496 'type': 'object'}
18497
18498
18499 @ReturnMapping(ErrorResults)
18500 async def AssignUnits(self, entities):
18501 '''
18502 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18503 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18504 '''
18505 # map input types to rpc msg
18506 params = dict()
18507 msg = dict(type='UnitAssigner', request='AssignUnits', version=1, params=params)
18508 params['entities'] = entities
18509 reply = await self.rpc(msg)
18510 return reply
18511
18512
18513
18514 @ReturnMapping(ErrorResults)
18515 async def SetAgentStatus(self, entities):
18516 '''
18517 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18518 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18519 '''
18520 # map input types to rpc msg
18521 params = dict()
18522 msg = dict(type='UnitAssigner', request='SetAgentStatus', version=1, params=params)
18523 params['entities'] = entities
18524 reply = await self.rpc(msg)
18525 return reply
18526
18527
18528
18529 @ReturnMapping(StringsWatchResult)
18530 async def WatchUnitAssignments(self):
18531 '''
18532
18533 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
18534 '''
18535 # map input types to rpc msg
18536 params = dict()
18537 msg = dict(type='UnitAssigner', request='WatchUnitAssignments', version=1, params=params)
18538
18539 reply = await self.rpc(msg)
18540 return reply
18541
18542
18543 class UniterFacade(Type):
18544 name = 'Uniter'
18545 version = 4
18546 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
18547 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
18548 'type': 'array'},
18549 'type': 'array'}},
18550 'required': ['servers'],
18551 'type': 'object'},
18552 'Action': {'additionalProperties': False,
18553 'properties': {'name': {'type': 'string'},
18554 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
18555 'type': 'object'}},
18556 'type': 'object'},
18557 'receiver': {'type': 'string'},
18558 'tag': {'type': 'string'}},
18559 'required': ['tag', 'receiver', 'name'],
18560 'type': 'object'},
18561 'ActionExecutionResult': {'additionalProperties': False,
18562 'properties': {'action-tag': {'type': 'string'},
18563 'message': {'type': 'string'},
18564 'results': {'patternProperties': {'.*': {'additionalProperties': True,
18565 'type': 'object'}},
18566 'type': 'object'},
18567 'status': {'type': 'string'}},
18568 'required': ['action-tag', 'status'],
18569 'type': 'object'},
18570 'ActionExecutionResults': {'additionalProperties': False,
18571 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
18572 'type': 'array'}},
18573 'type': 'object'},
18574 'ActionResult': {'additionalProperties': False,
18575 'properties': {'action': {'$ref': '#/definitions/Action'},
18576 'completed': {'format': 'date-time',
18577 'type': 'string'},
18578 'enqueued': {'format': 'date-time',
18579 'type': 'string'},
18580 'error': {'$ref': '#/definitions/Error'},
18581 'message': {'type': 'string'},
18582 'output': {'patternProperties': {'.*': {'additionalProperties': True,
18583 'type': 'object'}},
18584 'type': 'object'},
18585 'started': {'format': 'date-time',
18586 'type': 'string'},
18587 'status': {'type': 'string'}},
18588 'type': 'object'},
18589 'ActionResults': {'additionalProperties': False,
18590 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
18591 'type': 'array'}},
18592 'type': 'object'},
18593 'Address': {'additionalProperties': False,
18594 'properties': {'scope': {'type': 'string'},
18595 'space-name': {'type': 'string'},
18596 'type': {'type': 'string'},
18597 'value': {'type': 'string'}},
18598 'required': ['value', 'type', 'scope'],
18599 'type': 'object'},
18600 'ApplicationStatusResult': {'additionalProperties': False,
18601 'properties': {'application': {'$ref': '#/definitions/StatusResult'},
18602 'error': {'$ref': '#/definitions/Error'},
18603 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
18604 'type': 'object'}},
18605 'required': ['application',
18606 'units'],
18607 'type': 'object'},
18608 'ApplicationStatusResults': {'additionalProperties': False,
18609 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
18610 'type': 'array'}},
18611 'required': ['results'],
18612 'type': 'object'},
18613 'BoolResult': {'additionalProperties': False,
18614 'properties': {'error': {'$ref': '#/definitions/Error'},
18615 'result': {'type': 'boolean'}},
18616 'required': ['result'],
18617 'type': 'object'},
18618 'BoolResults': {'additionalProperties': False,
18619 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
18620 'type': 'array'}},
18621 'required': ['results'],
18622 'type': 'object'},
18623 'BytesResult': {'additionalProperties': False,
18624 'properties': {'result': {'items': {'type': 'integer'},
18625 'type': 'array'}},
18626 'required': ['result'],
18627 'type': 'object'},
18628 'CharmRelation': {'additionalProperties': False,
18629 'properties': {'interface': {'type': 'string'},
18630 'limit': {'type': 'integer'},
18631 'name': {'type': 'string'},
18632 'optional': {'type': 'boolean'},
18633 'role': {'type': 'string'},
18634 'scope': {'type': 'string'}},
18635 'required': ['name',
18636 'role',
18637 'interface',
18638 'optional',
18639 'limit',
18640 'scope'],
18641 'type': 'object'},
18642 'CharmURL': {'additionalProperties': False,
18643 'properties': {'url': {'type': 'string'}},
18644 'required': ['url'],
18645 'type': 'object'},
18646 'CharmURLs': {'additionalProperties': False,
18647 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'},
18648 'type': 'array'}},
18649 'required': ['urls'],
18650 'type': 'object'},
18651 'ConfigSettingsResult': {'additionalProperties': False,
18652 'properties': {'error': {'$ref': '#/definitions/Error'},
18653 'settings': {'patternProperties': {'.*': {'additionalProperties': True,
18654 'type': 'object'}},
18655 'type': 'object'}},
18656 'required': ['settings'],
18657 'type': 'object'},
18658 'ConfigSettingsResults': {'additionalProperties': False,
18659 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
18660 'type': 'array'}},
18661 'required': ['results'],
18662 'type': 'object'},
18663 'Endpoint': {'additionalProperties': False,
18664 'properties': {'application-name': {'type': 'string'},
18665 'relation': {'$ref': '#/definitions/CharmRelation'}},
18666 'required': ['application-name', 'relation'],
18667 'type': 'object'},
18668 'Entities': {'additionalProperties': False,
18669 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
18670 'type': 'array'}},
18671 'required': ['entities'],
18672 'type': 'object'},
18673 'EntitiesCharmURL': {'additionalProperties': False,
18674 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
18675 'type': 'array'}},
18676 'required': ['entities'],
18677 'type': 'object'},
18678 'EntitiesPortRanges': {'additionalProperties': False,
18679 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
18680 'type': 'array'}},
18681 'required': ['entities'],
18682 'type': 'object'},
18683 'Entity': {'additionalProperties': False,
18684 'properties': {'tag': {'type': 'string'}},
18685 'required': ['tag'],
18686 'type': 'object'},
18687 'EntityCharmURL': {'additionalProperties': False,
18688 'properties': {'charm-url': {'type': 'string'},
18689 'tag': {'type': 'string'}},
18690 'required': ['tag', 'charm-url'],
18691 'type': 'object'},
18692 'EntityPortRange': {'additionalProperties': False,
18693 'properties': {'from-port': {'type': 'integer'},
18694 'protocol': {'type': 'string'},
18695 'tag': {'type': 'string'},
18696 'to-port': {'type': 'integer'}},
18697 'required': ['tag',
18698 'protocol',
18699 'from-port',
18700 'to-port'],
18701 'type': 'object'},
18702 'EntityStatusArgs': {'additionalProperties': False,
18703 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18704 'type': 'object'}},
18705 'type': 'object'},
18706 'info': {'type': 'string'},
18707 'status': {'type': 'string'},
18708 'tag': {'type': 'string'}},
18709 'required': ['tag',
18710 'status',
18711 'info',
18712 'data'],
18713 'type': 'object'},
18714 'EntityWorkloadVersion': {'additionalProperties': False,
18715 'properties': {'tag': {'type': 'string'},
18716 'workload-version': {'type': 'string'}},
18717 'required': ['tag',
18718 'workload-version'],
18719 'type': 'object'},
18720 'EntityWorkloadVersions': {'additionalProperties': False,
18721 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'},
18722 'type': 'array'}},
18723 'required': ['entities'],
18724 'type': 'object'},
18725 'Error': {'additionalProperties': False,
18726 'properties': {'code': {'type': 'string'},
18727 'info': {'$ref': '#/definitions/ErrorInfo'},
18728 'message': {'type': 'string'}},
18729 'required': ['message', 'code'],
18730 'type': 'object'},
18731 'ErrorInfo': {'additionalProperties': False,
18732 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18733 'macaroon-path': {'type': 'string'}},
18734 'type': 'object'},
18735 'ErrorResult': {'additionalProperties': False,
18736 'properties': {'error': {'$ref': '#/definitions/Error'}},
18737 'type': 'object'},
18738 'ErrorResults': {'additionalProperties': False,
18739 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18740 'type': 'array'}},
18741 'required': ['results'],
18742 'type': 'object'},
18743 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
18744 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
18745 'type': 'array'}},
18746 'required': ['results'],
18747 'type': 'object'},
18748 'GetLeadershipSettingsResult': {'additionalProperties': False,
18749 'properties': {'error': {'$ref': '#/definitions/Error'},
18750 'settings': {'patternProperties': {'.*': {'type': 'string'}},
18751 'type': 'object'}},
18752 'required': ['settings'],
18753 'type': 'object'},
18754 'HostPort': {'additionalProperties': False,
18755 'properties': {'Address': {'$ref': '#/definitions/Address'},
18756 'port': {'type': 'integer'}},
18757 'required': ['Address', 'port'],
18758 'type': 'object'},
18759 'IntResult': {'additionalProperties': False,
18760 'properties': {'error': {'$ref': '#/definitions/Error'},
18761 'result': {'type': 'integer'}},
18762 'required': ['result'],
18763 'type': 'object'},
18764 'IntResults': {'additionalProperties': False,
18765 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
18766 'type': 'array'}},
18767 'required': ['results'],
18768 'type': 'object'},
18769 'LifeResult': {'additionalProperties': False,
18770 'properties': {'error': {'$ref': '#/definitions/Error'},
18771 'life': {'type': 'string'}},
18772 'required': ['life'],
18773 'type': 'object'},
18774 'LifeResults': {'additionalProperties': False,
18775 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
18776 'type': 'array'}},
18777 'required': ['results'],
18778 'type': 'object'},
18779 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18780 'MachinePortRange': {'additionalProperties': False,
18781 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
18782 'relation-tag': {'type': 'string'},
18783 'unit-tag': {'type': 'string'}},
18784 'required': ['unit-tag',
18785 'relation-tag',
18786 'port-range'],
18787 'type': 'object'},
18788 'MachinePortsResult': {'additionalProperties': False,
18789 'properties': {'error': {'$ref': '#/definitions/Error'},
18790 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
18791 'type': 'array'}},
18792 'required': ['ports'],
18793 'type': 'object'},
18794 'MachinePortsResults': {'additionalProperties': False,
18795 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
18796 'type': 'array'}},
18797 'required': ['results'],
18798 'type': 'object'},
18799 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
18800 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
18801 'type': 'array'}},
18802 'required': ['params'],
18803 'type': 'object'},
18804 'MergeLeadershipSettingsParam': {'additionalProperties': False,
18805 'properties': {'application-tag': {'type': 'string'},
18806 'settings': {'patternProperties': {'.*': {'type': 'string'}},
18807 'type': 'object'}},
18808 'required': ['application-tag',
18809 'settings'],
18810 'type': 'object'},
18811 'MeterStatusResult': {'additionalProperties': False,
18812 'properties': {'code': {'type': 'string'},
18813 'error': {'$ref': '#/definitions/Error'},
18814 'info': {'type': 'string'}},
18815 'required': ['code', 'info'],
18816 'type': 'object'},
18817 'MeterStatusResults': {'additionalProperties': False,
18818 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
18819 'type': 'array'}},
18820 'required': ['results'],
18821 'type': 'object'},
18822 'Metric': {'additionalProperties': False,
18823 'properties': {'key': {'type': 'string'},
18824 'time': {'format': 'date-time',
18825 'type': 'string'},
18826 'value': {'type': 'string'}},
18827 'required': ['key', 'value', 'time'],
18828 'type': 'object'},
18829 'MetricBatch': {'additionalProperties': False,
18830 'properties': {'charm-url': {'type': 'string'},
18831 'created': {'format': 'date-time',
18832 'type': 'string'},
18833 'metrics': {'items': {'$ref': '#/definitions/Metric'},
18834 'type': 'array'},
18835 'uuid': {'type': 'string'}},
18836 'required': ['uuid',
18837 'charm-url',
18838 'created',
18839 'metrics'],
18840 'type': 'object'},
18841 'MetricBatchParam': {'additionalProperties': False,
18842 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
18843 'tag': {'type': 'string'}},
18844 'required': ['tag', 'batch'],
18845 'type': 'object'},
18846 'MetricBatchParams': {'additionalProperties': False,
18847 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
18848 'type': 'array'}},
18849 'required': ['batches'],
18850 'type': 'object'},
18851 'ModelConfigResult': {'additionalProperties': False,
18852 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
18853 'type': 'object'}},
18854 'type': 'object'}},
18855 'required': ['config'],
18856 'type': 'object'},
18857 'ModelResult': {'additionalProperties': False,
18858 'properties': {'error': {'$ref': '#/definitions/Error'},
18859 'name': {'type': 'string'},
18860 'uuid': {'type': 'string'}},
18861 'required': ['name', 'uuid'],
18862 'type': 'object'},
18863 'NetworkConfig': {'additionalProperties': False,
18864 'properties': {'address': {'type': 'string'},
18865 'cidr': {'type': 'string'},
18866 'config-type': {'type': 'string'},
18867 'device-index': {'type': 'integer'},
18868 'disabled': {'type': 'boolean'},
18869 'dns-search-domains': {'items': {'type': 'string'},
18870 'type': 'array'},
18871 'dns-servers': {'items': {'type': 'string'},
18872 'type': 'array'},
18873 'gateway-address': {'type': 'string'},
18874 'interface-name': {'type': 'string'},
18875 'interface-type': {'type': 'string'},
18876 'mac-address': {'type': 'string'},
18877 'mtu': {'type': 'integer'},
18878 'no-auto-start': {'type': 'boolean'},
18879 'parent-interface-name': {'type': 'string'},
18880 'provider-address-id': {'type': 'string'},
18881 'provider-id': {'type': 'string'},
18882 'provider-space-id': {'type': 'string'},
18883 'provider-subnet-id': {'type': 'string'},
18884 'provider-vlan-id': {'type': 'string'},
18885 'vlan-tag': {'type': 'integer'}},
18886 'required': ['device-index',
18887 'mac-address',
18888 'cidr',
18889 'mtu',
18890 'provider-id',
18891 'provider-subnet-id',
18892 'provider-space-id',
18893 'provider-address-id',
18894 'provider-vlan-id',
18895 'vlan-tag',
18896 'interface-name',
18897 'parent-interface-name',
18898 'interface-type',
18899 'disabled'],
18900 'type': 'object'},
18901 'NotifyWatchResult': {'additionalProperties': False,
18902 'properties': {'NotifyWatcherId': {'type': 'string'},
18903 'error': {'$ref': '#/definitions/Error'}},
18904 'required': ['NotifyWatcherId'],
18905 'type': 'object'},
18906 'NotifyWatchResults': {'additionalProperties': False,
18907 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
18908 'type': 'array'}},
18909 'required': ['results'],
18910 'type': 'object'},
18911 'PortRange': {'additionalProperties': False,
18912 'properties': {'from-port': {'type': 'integer'},
18913 'protocol': {'type': 'string'},
18914 'to-port': {'type': 'integer'}},
18915 'required': ['from-port', 'to-port', 'protocol'],
18916 'type': 'object'},
18917 'RelationIds': {'additionalProperties': False,
18918 'properties': {'relation-ids': {'items': {'type': 'integer'},
18919 'type': 'array'}},
18920 'required': ['relation-ids'],
18921 'type': 'object'},
18922 'RelationResult': {'additionalProperties': False,
18923 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'},
18924 'error': {'$ref': '#/definitions/Error'},
18925 'id': {'type': 'integer'},
18926 'key': {'type': 'string'},
18927 'life': {'type': 'string'}},
18928 'required': ['life',
18929 'id',
18930 'key',
18931 'endpoint'],
18932 'type': 'object'},
18933 'RelationResults': {'additionalProperties': False,
18934 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'},
18935 'type': 'array'}},
18936 'required': ['results'],
18937 'type': 'object'},
18938 'RelationUnit': {'additionalProperties': False,
18939 'properties': {'relation': {'type': 'string'},
18940 'unit': {'type': 'string'}},
18941 'required': ['relation', 'unit'],
18942 'type': 'object'},
18943 'RelationUnitPair': {'additionalProperties': False,
18944 'properties': {'local-unit': {'type': 'string'},
18945 'relation': {'type': 'string'},
18946 'remote-unit': {'type': 'string'}},
18947 'required': ['relation',
18948 'local-unit',
18949 'remote-unit'],
18950 'type': 'object'},
18951 'RelationUnitPairs': {'additionalProperties': False,
18952 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
18953 'type': 'array'}},
18954 'required': ['relation-unit-pairs'],
18955 'type': 'object'},
18956 'RelationUnitSettings': {'additionalProperties': False,
18957 'properties': {'relation': {'type': 'string'},
18958 'settings': {'patternProperties': {'.*': {'type': 'string'}},
18959 'type': 'object'},
18960 'unit': {'type': 'string'}},
18961 'required': ['relation',
18962 'unit',
18963 'settings'],
18964 'type': 'object'},
18965 'RelationUnits': {'additionalProperties': False,
18966 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
18967 'type': 'array'}},
18968 'required': ['relation-units'],
18969 'type': 'object'},
18970 'RelationUnitsChange': {'additionalProperties': False,
18971 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
18972 'type': 'object'},
18973 'departed': {'items': {'type': 'string'},
18974 'type': 'array'}},
18975 'required': ['changed'],
18976 'type': 'object'},
18977 'RelationUnitsSettings': {'additionalProperties': False,
18978 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
18979 'type': 'array'}},
18980 'required': ['relation-units'],
18981 'type': 'object'},
18982 'RelationUnitsWatchResult': {'additionalProperties': False,
18983 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
18984 'error': {'$ref': '#/definitions/Error'},
18985 'watcher-id': {'type': 'string'}},
18986 'required': ['watcher-id',
18987 'changes'],
18988 'type': 'object'},
18989 'RelationUnitsWatchResults': {'additionalProperties': False,
18990 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
18991 'type': 'array'}},
18992 'required': ['results'],
18993 'type': 'object'},
18994 'ResolvedModeResult': {'additionalProperties': False,
18995 'properties': {'error': {'$ref': '#/definitions/Error'},
18996 'mode': {'type': 'string'}},
18997 'required': ['mode'],
18998 'type': 'object'},
18999 'ResolvedModeResults': {'additionalProperties': False,
19000 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
19001 'type': 'array'}},
19002 'required': ['results'],
19003 'type': 'object'},
19004 'SetStatus': {'additionalProperties': False,
19005 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
19006 'type': 'array'}},
19007 'required': ['entities'],
19008 'type': 'object'},
19009 'SettingsResult': {'additionalProperties': False,
19010 'properties': {'error': {'$ref': '#/definitions/Error'},
19011 'settings': {'patternProperties': {'.*': {'type': 'string'}},
19012 'type': 'object'}},
19013 'required': ['settings'],
19014 'type': 'object'},
19015 'SettingsResults': {'additionalProperties': False,
19016 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
19017 'type': 'array'}},
19018 'required': ['results'],
19019 'type': 'object'},
19020 'StatusResult': {'additionalProperties': False,
19021 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
19022 'type': 'object'}},
19023 'type': 'object'},
19024 'error': {'$ref': '#/definitions/Error'},
19025 'id': {'type': 'string'},
19026 'info': {'type': 'string'},
19027 'life': {'type': 'string'},
19028 'since': {'format': 'date-time',
19029 'type': 'string'},
19030 'status': {'type': 'string'}},
19031 'required': ['id',
19032 'life',
19033 'status',
19034 'info',
19035 'data',
19036 'since'],
19037 'type': 'object'},
19038 'StatusResults': {'additionalProperties': False,
19039 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
19040 'type': 'array'}},
19041 'required': ['results'],
19042 'type': 'object'},
19043 'StorageAddParams': {'additionalProperties': False,
19044 'properties': {'name': {'type': 'string'},
19045 'storage': {'$ref': '#/definitions/StorageConstraints'},
19046 'unit': {'type': 'string'}},
19047 'required': ['unit', 'name', 'storage'],
19048 'type': 'object'},
19049 'StorageAttachment': {'additionalProperties': False,
19050 'properties': {'kind': {'type': 'integer'},
19051 'life': {'type': 'string'},
19052 'location': {'type': 'string'},
19053 'owner-tag': {'type': 'string'},
19054 'storage-tag': {'type': 'string'},
19055 'unit-tag': {'type': 'string'}},
19056 'required': ['storage-tag',
19057 'owner-tag',
19058 'unit-tag',
19059 'kind',
19060 'location',
19061 'life'],
19062 'type': 'object'},
19063 'StorageAttachmentId': {'additionalProperties': False,
19064 'properties': {'storage-tag': {'type': 'string'},
19065 'unit-tag': {'type': 'string'}},
19066 'required': ['storage-tag',
19067 'unit-tag'],
19068 'type': 'object'},
19069 'StorageAttachmentIds': {'additionalProperties': False,
19070 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
19071 'type': 'array'}},
19072 'required': ['ids'],
19073 'type': 'object'},
19074 'StorageAttachmentIdsResult': {'additionalProperties': False,
19075 'properties': {'error': {'$ref': '#/definitions/Error'},
19076 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
19077 'required': ['result'],
19078 'type': 'object'},
19079 'StorageAttachmentIdsResults': {'additionalProperties': False,
19080 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
19081 'type': 'array'}},
19082 'type': 'object'},
19083 'StorageAttachmentResult': {'additionalProperties': False,
19084 'properties': {'error': {'$ref': '#/definitions/Error'},
19085 'result': {'$ref': '#/definitions/StorageAttachment'}},
19086 'required': ['result'],
19087 'type': 'object'},
19088 'StorageAttachmentResults': {'additionalProperties': False,
19089 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
19090 'type': 'array'}},
19091 'type': 'object'},
19092 'StorageConstraints': {'additionalProperties': False,
19093 'properties': {'count': {'type': 'integer'},
19094 'pool': {'type': 'string'},
19095 'size': {'type': 'integer'}},
19096 'type': 'object'},
19097 'StoragesAddParams': {'additionalProperties': False,
19098 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
19099 'type': 'array'}},
19100 'required': ['storages'],
19101 'type': 'object'},
19102 'StringBoolResult': {'additionalProperties': False,
19103 'properties': {'error': {'$ref': '#/definitions/Error'},
19104 'ok': {'type': 'boolean'},
19105 'result': {'type': 'string'}},
19106 'required': ['result', 'ok'],
19107 'type': 'object'},
19108 'StringBoolResults': {'additionalProperties': False,
19109 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'},
19110 'type': 'array'}},
19111 'required': ['results'],
19112 'type': 'object'},
19113 'StringResult': {'additionalProperties': False,
19114 'properties': {'error': {'$ref': '#/definitions/Error'},
19115 'result': {'type': 'string'}},
19116 'required': ['result'],
19117 'type': 'object'},
19118 'StringResults': {'additionalProperties': False,
19119 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
19120 'type': 'array'}},
19121 'required': ['results'],
19122 'type': 'object'},
19123 'StringsResult': {'additionalProperties': False,
19124 'properties': {'error': {'$ref': '#/definitions/Error'},
19125 'result': {'items': {'type': 'string'},
19126 'type': 'array'}},
19127 'type': 'object'},
19128 'StringsResults': {'additionalProperties': False,
19129 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
19130 'type': 'array'}},
19131 'required': ['results'],
19132 'type': 'object'},
19133 'StringsWatchResult': {'additionalProperties': False,
19134 'properties': {'changes': {'items': {'type': 'string'},
19135 'type': 'array'},
19136 'error': {'$ref': '#/definitions/Error'},
19137 'watcher-id': {'type': 'string'}},
19138 'required': ['watcher-id'],
19139 'type': 'object'},
19140 'StringsWatchResults': {'additionalProperties': False,
19141 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
19142 'type': 'array'}},
19143 'required': ['results'],
19144 'type': 'object'},
19145 'UnitNetworkConfig': {'additionalProperties': False,
19146 'properties': {'binding-name': {'type': 'string'},
19147 'unit-tag': {'type': 'string'}},
19148 'required': ['unit-tag', 'binding-name'],
19149 'type': 'object'},
19150 'UnitNetworkConfigResult': {'additionalProperties': False,
19151 'properties': {'error': {'$ref': '#/definitions/Error'},
19152 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
19153 'type': 'array'}},
19154 'required': ['info'],
19155 'type': 'object'},
19156 'UnitNetworkConfigResults': {'additionalProperties': False,
19157 'properties': {'results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
19158 'type': 'array'}},
19159 'required': ['results'],
19160 'type': 'object'},
19161 'UnitSettings': {'additionalProperties': False,
19162 'properties': {'version': {'type': 'integer'}},
19163 'required': ['version'],
19164 'type': 'object'},
19165 'UnitsNetworkConfig': {'additionalProperties': False,
19166 'properties': {'args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
19167 'type': 'array'}},
19168 'required': ['args'],
19169 'type': 'object'}},
19170 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
19171 'type': 'object'},
19172 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
19173 'type': 'object'},
19174 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19175 'Result': {'$ref': '#/definitions/ActionResults'}},
19176 'type': 'object'},
19177 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
19178 'Result': {'$ref': '#/definitions/ErrorResults'}},
19179 'type': 'object'},
19180 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
19181 'Result': {'$ref': '#/definitions/ErrorResults'}},
19182 'type': 'object'},
19183 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19184 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
19185 'type': 'object'},
19186 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19187 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
19188 'type': 'object'},
19189 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19190 'Result': {'$ref': '#/definitions/StringResults'}},
19191 'type': 'object'},
19192 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19193 'Result': {'$ref': '#/definitions/StringResults'}},
19194 'type': 'object'},
19195 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19196 'Result': {'$ref': '#/definitions/ErrorResults'}},
19197 'type': 'object'},
19198 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
19199 'type': 'object'},
19200 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
19201 'Result': {'$ref': '#/definitions/StringResults'}},
19202 'type': 'object'},
19203 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19204 'Result': {'$ref': '#/definitions/IntResults'}},
19205 'type': 'object'},
19206 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19207 'Result': {'$ref': '#/definitions/StringBoolResults'}},
19208 'type': 'object'},
19209 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19210 'Result': {'$ref': '#/definitions/ErrorResults'}},
19211 'type': 'object'},
19212 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
19213 'Result': {'$ref': '#/definitions/ErrorResults'}},
19214 'type': 'object'},
19215 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19216 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
19217 'type': 'object'},
19218 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
19219 'type': 'object'},
19220 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19221 'Result': {'$ref': '#/definitions/ErrorResults'}},
19222 'type': 'object'},
19223 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19224 'Result': {'$ref': '#/definitions/ErrorResults'}},
19225 'type': 'object'},
19226 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19227 'Result': {'$ref': '#/definitions/ErrorResults'}},
19228 'type': 'object'},
19229 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19230 'Result': {'$ref': '#/definitions/ErrorResults'}},
19231 'type': 'object'},
19232 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19233 'Result': {'$ref': '#/definitions/ErrorResults'}},
19234 'type': 'object'},
19235 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
19236 'Result': {'$ref': '#/definitions/ErrorResults'}},
19237 'type': 'object'},
19238 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19239 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
19240 'type': 'object'},
19241 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19242 'Result': {'$ref': '#/definitions/StringBoolResults'}},
19243 'type': 'object'},
19244 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19245 'Result': {'$ref': '#/definitions/BoolResults'}},
19246 'type': 'object'},
19247 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19248 'Result': {'$ref': '#/definitions/StringsResults'}},
19249 'type': 'object'},
19250 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19251 'Result': {'$ref': '#/definitions/ErrorResults'}},
19252 'type': 'object'},
19253 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19254 'Result': {'$ref': '#/definitions/LifeResults'}},
19255 'type': 'object'},
19256 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
19257 'Result': {'$ref': '#/definitions/ErrorResults'}},
19258 'type': 'object'},
19259 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
19260 'type': 'object'},
19261 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
19262 'type': 'object'},
19263 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
19264 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
19265 'type': 'object'},
19266 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
19267 'Result': {'$ref': '#/definitions/ErrorResults'}},
19268 'type': 'object'},
19269 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19270 'Result': {'$ref': '#/definitions/StringResults'}},
19271 'type': 'object'},
19272 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
19273 'type': 'object'},
19274 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19275 'Result': {'$ref': '#/definitions/StringResults'}},
19276 'type': 'object'},
19277 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19278 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
19279 'type': 'object'},
19280 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
19281 'Result': {'$ref': '#/definitions/SettingsResults'}},
19282 'type': 'object'},
19283 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19284 'Result': {'$ref': '#/definitions/SettingsResults'}},
19285 'type': 'object'},
19286 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19287 'Result': {'$ref': '#/definitions/RelationResults'}},
19288 'type': 'object'},
19289 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
19290 'Result': {'$ref': '#/definitions/RelationResults'}},
19291 'type': 'object'},
19292 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19293 'Result': {'$ref': '#/definitions/ErrorResults'}},
19294 'type': 'object'},
19295 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19296 'Result': {'$ref': '#/definitions/ErrorResults'}},
19297 'type': 'object'},
19298 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19299 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
19300 'type': 'object'},
19301 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19302 'Result': {'$ref': '#/definitions/ErrorResults'}},
19303 'type': 'object'},
19304 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19305 'Result': {'$ref': '#/definitions/ErrorResults'}},
19306 'type': 'object'},
19307 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
19308 'Result': {'$ref': '#/definitions/ErrorResults'}},
19309 'type': 'object'},
19310 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19311 'Result': {'$ref': '#/definitions/ErrorResults'}},
19312 'type': 'object'},
19313 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19314 'Result': {'$ref': '#/definitions/ErrorResults'}},
19315 'type': 'object'},
19316 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'},
19317 'Result': {'$ref': '#/definitions/ErrorResults'}},
19318 'type': 'object'},
19319 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19320 'Result': {'$ref': '#/definitions/LifeResults'}},
19321 'type': 'object'},
19322 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19323 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
19324 'type': 'object'},
19325 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19326 'Result': {'$ref': '#/definitions/StatusResults'}},
19327 'type': 'object'},
19328 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19329 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
19330 'type': 'object'},
19331 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
19332 'Result': {'$ref': '#/definitions/ErrorResults'}},
19333 'type': 'object'},
19334 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19335 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19336 'type': 'object'},
19337 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
19338 'type': 'object'},
19339 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19340 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19341 'type': 'object'},
19342 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19343 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19344 'type': 'object'},
19345 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19346 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19347 'type': 'object'},
19348 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
19349 'type': 'object'},
19350 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19351 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19352 'type': 'object'},
19353 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19354 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19355 'type': 'object'},
19356 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19357 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
19358 'type': 'object'},
19359 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19360 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19361 'type': 'object'},
19362 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19363 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19364 'type': 'object'},
19365 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19366 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19367 'type': 'object'},
19368 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19369 'Result': {'$ref': '#/definitions/StringResults'}},
19370 'type': 'object'}},
19371 'type': 'object'}
19372
19373
19374 @ReturnMapping(StringsResult)
19375 async def APIAddresses(self):
19376 '''
19377
19378 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
19379 '''
19380 # map input types to rpc msg
19381 params = dict()
19382 msg = dict(type='Uniter', request='APIAddresses', version=4, params=params)
19383
19384 reply = await self.rpc(msg)
19385 return reply
19386
19387
19388
19389 @ReturnMapping(APIHostPortsResult)
19390 async def APIHostPorts(self):
19391 '''
19392
19393 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
19394 '''
19395 # map input types to rpc msg
19396 params = dict()
19397 msg = dict(type='Uniter', request='APIHostPorts', version=4, params=params)
19398
19399 reply = await self.rpc(msg)
19400 return reply
19401
19402
19403
19404 @ReturnMapping(ActionResults)
19405 async def Actions(self, entities):
19406 '''
19407 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19408 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
19409 '''
19410 # map input types to rpc msg
19411 params = dict()
19412 msg = dict(type='Uniter', request='Actions', version=4, params=params)
19413 params['entities'] = entities
19414 reply = await self.rpc(msg)
19415 return reply
19416
19417
19418
19419 @ReturnMapping(ErrorResults)
19420 async def AddMetricBatches(self, batches):
19421 '''
19422 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
19423 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19424 '''
19425 # map input types to rpc msg
19426 params = dict()
19427 msg = dict(type='Uniter', request='AddMetricBatches', version=4, params=params)
19428 params['batches'] = batches
19429 reply = await self.rpc(msg)
19430 return reply
19431
19432
19433
19434 @ReturnMapping(ErrorResults)
19435 async def AddUnitStorage(self, storages):
19436 '''
19437 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
19438 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19439 '''
19440 # map input types to rpc msg
19441 params = dict()
19442 msg = dict(type='Uniter', request='AddUnitStorage', version=4, params=params)
19443 params['storages'] = storages
19444 reply = await self.rpc(msg)
19445 return reply
19446
19447
19448
19449 @ReturnMapping(MachinePortsResults)
19450 async def AllMachinePorts(self, entities):
19451 '''
19452 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19453 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
19454 '''
19455 # map input types to rpc msg
19456 params = dict()
19457 msg = dict(type='Uniter', request='AllMachinePorts', version=4, params=params)
19458 params['entities'] = entities
19459 reply = await self.rpc(msg)
19460 return reply
19461
19462
19463
19464 @ReturnMapping(ApplicationStatusResults)
19465 async def ApplicationStatus(self, entities):
19466 '''
19467 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19468 Returns -> typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult>
19469 '''
19470 # map input types to rpc msg
19471 params = dict()
19472 msg = dict(type='Uniter', request='ApplicationStatus', version=4, params=params)
19473 params['entities'] = entities
19474 reply = await self.rpc(msg)
19475 return reply
19476
19477
19478
19479 @ReturnMapping(StringResults)
19480 async def AssignedMachine(self, entities):
19481 '''
19482 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19483 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19484 '''
19485 # map input types to rpc msg
19486 params = dict()
19487 msg = dict(type='Uniter', request='AssignedMachine', version=4, params=params)
19488 params['entities'] = entities
19489 reply = await self.rpc(msg)
19490 return reply
19491
19492
19493
19494 @ReturnMapping(StringResults)
19495 async def AvailabilityZone(self, entities):
19496 '''
19497 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19498 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19499 '''
19500 # map input types to rpc msg
19501 params = dict()
19502 msg = dict(type='Uniter', request='AvailabilityZone', version=4, params=params)
19503 params['entities'] = entities
19504 reply = await self.rpc(msg)
19505 return reply
19506
19507
19508
19509 @ReturnMapping(ErrorResults)
19510 async def BeginActions(self, entities):
19511 '''
19512 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19513 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19514 '''
19515 # map input types to rpc msg
19516 params = dict()
19517 msg = dict(type='Uniter', request='BeginActions', version=4, params=params)
19518 params['entities'] = entities
19519 reply = await self.rpc(msg)
19520 return reply
19521
19522
19523
19524 @ReturnMapping(BytesResult)
19525 async def CACert(self):
19526 '''
19527
19528 Returns -> typing.Sequence<+T_co>[int]
19529 '''
19530 # map input types to rpc msg
19531 params = dict()
19532 msg = dict(type='Uniter', request='CACert', version=4, params=params)
19533
19534 reply = await self.rpc(msg)
19535 return reply
19536
19537
19538
19539 @ReturnMapping(StringResults)
19540 async def CharmArchiveSha256(self, urls):
19541 '''
19542 urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL>
19543 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19544 '''
19545 # map input types to rpc msg
19546 params = dict()
19547 msg = dict(type='Uniter', request='CharmArchiveSha256', version=4, params=params)
19548 params['urls'] = urls
19549 reply = await self.rpc(msg)
19550 return reply
19551
19552
19553
19554 @ReturnMapping(IntResults)
19555 async def CharmModifiedVersion(self, entities):
19556 '''
19557 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19558 Returns -> typing.Sequence<+T_co>[~IntResult]<~IntResult>
19559 '''
19560 # map input types to rpc msg
19561 params = dict()
19562 msg = dict(type='Uniter', request='CharmModifiedVersion', version=4, params=params)
19563 params['entities'] = entities
19564 reply = await self.rpc(msg)
19565 return reply
19566
19567
19568
19569 @ReturnMapping(StringBoolResults)
19570 async def CharmURL(self, entities):
19571 '''
19572 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19573 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
19574 '''
19575 # map input types to rpc msg
19576 params = dict()
19577 msg = dict(type='Uniter', request='CharmURL', version=4, params=params)
19578 params['entities'] = entities
19579 reply = await self.rpc(msg)
19580 return reply
19581
19582
19583
19584 @ReturnMapping(ErrorResults)
19585 async def ClearResolved(self, entities):
19586 '''
19587 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19588 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19589 '''
19590 # map input types to rpc msg
19591 params = dict()
19592 msg = dict(type='Uniter', request='ClearResolved', version=4, params=params)
19593 params['entities'] = entities
19594 reply = await self.rpc(msg)
19595 return reply
19596
19597
19598
19599 @ReturnMapping(ErrorResults)
19600 async def ClosePorts(self, entities):
19601 '''
19602 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
19603 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19604 '''
19605 # map input types to rpc msg
19606 params = dict()
19607 msg = dict(type='Uniter', request='ClosePorts', version=4, params=params)
19608 params['entities'] = entities
19609 reply = await self.rpc(msg)
19610 return reply
19611
19612
19613
19614 @ReturnMapping(ConfigSettingsResults)
19615 async def ConfigSettings(self, entities):
19616 '''
19617 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19618 Returns -> typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult>
19619 '''
19620 # map input types to rpc msg
19621 params = dict()
19622 msg = dict(type='Uniter', request='ConfigSettings', version=4, params=params)
19623 params['entities'] = entities
19624 reply = await self.rpc(msg)
19625 return reply
19626
19627
19628
19629 @ReturnMapping(ModelResult)
19630 async def CurrentModel(self):
19631 '''
19632
19633 Returns -> typing.Union[_ForwardRef('Error'), str]
19634 '''
19635 # map input types to rpc msg
19636 params = dict()
19637 msg = dict(type='Uniter', request='CurrentModel', version=4, params=params)
19638
19639 reply = await self.rpc(msg)
19640 return reply
19641
19642
19643
19644 @ReturnMapping(ErrorResults)
19645 async def Destroy(self, entities):
19646 '''
19647 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19648 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19649 '''
19650 # map input types to rpc msg
19651 params = dict()
19652 msg = dict(type='Uniter', request='Destroy', version=4, params=params)
19653 params['entities'] = entities
19654 reply = await self.rpc(msg)
19655 return reply
19656
19657
19658
19659 @ReturnMapping(ErrorResults)
19660 async def DestroyAllSubordinates(self, entities):
19661 '''
19662 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19663 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19664 '''
19665 # map input types to rpc msg
19666 params = dict()
19667 msg = dict(type='Uniter', request='DestroyAllSubordinates', version=4, params=params)
19668 params['entities'] = entities
19669 reply = await self.rpc(msg)
19670 return reply
19671
19672
19673
19674 @ReturnMapping(ErrorResults)
19675 async def DestroyUnitStorageAttachments(self, entities):
19676 '''
19677 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19678 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19679 '''
19680 # map input types to rpc msg
19681 params = dict()
19682 msg = dict(type='Uniter', request='DestroyUnitStorageAttachments', version=4, params=params)
19683 params['entities'] = entities
19684 reply = await self.rpc(msg)
19685 return reply
19686
19687
19688
19689 @ReturnMapping(ErrorResults)
19690 async def EnsureDead(self, entities):
19691 '''
19692 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19693 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19694 '''
19695 # map input types to rpc msg
19696 params = dict()
19697 msg = dict(type='Uniter', request='EnsureDead', version=4, params=params)
19698 params['entities'] = entities
19699 reply = await self.rpc(msg)
19700 return reply
19701
19702
19703
19704 @ReturnMapping(ErrorResults)
19705 async def EnterScope(self, relation_units):
19706 '''
19707 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
19708 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19709 '''
19710 # map input types to rpc msg
19711 params = dict()
19712 msg = dict(type='Uniter', request='EnterScope', version=4, params=params)
19713 params['relation-units'] = relation_units
19714 reply = await self.rpc(msg)
19715 return reply
19716
19717
19718
19719 @ReturnMapping(ErrorResults)
19720 async def FinishActions(self, results):
19721 '''
19722 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
19723 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19724 '''
19725 # map input types to rpc msg
19726 params = dict()
19727 msg = dict(type='Uniter', request='FinishActions', version=4, params=params)
19728 params['results'] = results
19729 reply = await self.rpc(msg)
19730 return reply
19731
19732
19733
19734 @ReturnMapping(MeterStatusResults)
19735 async def GetMeterStatus(self, entities):
19736 '''
19737 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19738 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
19739 '''
19740 # map input types to rpc msg
19741 params = dict()
19742 msg = dict(type='Uniter', request='GetMeterStatus', version=4, params=params)
19743 params['entities'] = entities
19744 reply = await self.rpc(msg)
19745 return reply
19746
19747
19748
19749 @ReturnMapping(StringBoolResults)
19750 async def GetPrincipal(self, entities):
19751 '''
19752 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19753 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
19754 '''
19755 # map input types to rpc msg
19756 params = dict()
19757 msg = dict(type='Uniter', request='GetPrincipal', version=4, params=params)
19758 params['entities'] = entities
19759 reply = await self.rpc(msg)
19760 return reply
19761
19762
19763
19764 @ReturnMapping(BoolResults)
19765 async def HasSubordinates(self, entities):
19766 '''
19767 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19768 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
19769 '''
19770 # map input types to rpc msg
19771 params = dict()
19772 msg = dict(type='Uniter', request='HasSubordinates', version=4, params=params)
19773 params['entities'] = entities
19774 reply = await self.rpc(msg)
19775 return reply
19776
19777
19778
19779 @ReturnMapping(StringsResults)
19780 async def JoinedRelations(self, entities):
19781 '''
19782 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19783 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
19784 '''
19785 # map input types to rpc msg
19786 params = dict()
19787 msg = dict(type='Uniter', request='JoinedRelations', version=4, params=params)
19788 params['entities'] = entities
19789 reply = await self.rpc(msg)
19790 return reply
19791
19792
19793
19794 @ReturnMapping(ErrorResults)
19795 async def LeaveScope(self, relation_units):
19796 '''
19797 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
19798 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19799 '''
19800 # map input types to rpc msg
19801 params = dict()
19802 msg = dict(type='Uniter', request='LeaveScope', version=4, params=params)
19803 params['relation-units'] = relation_units
19804 reply = await self.rpc(msg)
19805 return reply
19806
19807
19808
19809 @ReturnMapping(LifeResults)
19810 async def Life(self, entities):
19811 '''
19812 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19813 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
19814 '''
19815 # map input types to rpc msg
19816 params = dict()
19817 msg = dict(type='Uniter', request='Life', version=4, params=params)
19818 params['entities'] = entities
19819 reply = await self.rpc(msg)
19820 return reply
19821
19822
19823
19824 @ReturnMapping(ErrorResults)
19825 async def Merge(self, params):
19826 '''
19827 params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam>
19828 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19829 '''
19830 # map input types to rpc msg
19831 params = dict()
19832 msg = dict(type='Uniter', request='Merge', version=4, params=params)
19833 params['params'] = params
19834 reply = await self.rpc(msg)
19835 return reply
19836
19837
19838
19839 @ReturnMapping(ModelConfigResult)
19840 async def ModelConfig(self):
19841 '''
19842
19843 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
19844 '''
19845 # map input types to rpc msg
19846 params = dict()
19847 msg = dict(type='Uniter', request='ModelConfig', version=4, params=params)
19848
19849 reply = await self.rpc(msg)
19850 return reply
19851
19852
19853
19854 @ReturnMapping(StringResult)
19855 async def ModelUUID(self):
19856 '''
19857
19858 Returns -> typing.Union[_ForwardRef('Error'), str]
19859 '''
19860 # map input types to rpc msg
19861 params = dict()
19862 msg = dict(type='Uniter', request='ModelUUID', version=4, params=params)
19863
19864 reply = await self.rpc(msg)
19865 return reply
19866
19867
19868
19869 @ReturnMapping(UnitNetworkConfigResults)
19870 async def NetworkConfig(self, args):
19871 '''
19872 args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig>
19873 Returns -> typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult>
19874 '''
19875 # map input types to rpc msg
19876 params = dict()
19877 msg = dict(type='Uniter', request='NetworkConfig', version=4, params=params)
19878 params['args'] = args
19879 reply = await self.rpc(msg)
19880 return reply
19881
19882
19883
19884 @ReturnMapping(ErrorResults)
19885 async def OpenPorts(self, entities):
19886 '''
19887 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
19888 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19889 '''
19890 # map input types to rpc msg
19891 params = dict()
19892 msg = dict(type='Uniter', request='OpenPorts', version=4, params=params)
19893 params['entities'] = entities
19894 reply = await self.rpc(msg)
19895 return reply
19896
19897
19898
19899 @ReturnMapping(StringResults)
19900 async def PrivateAddress(self, entities):
19901 '''
19902 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19903 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19904 '''
19905 # map input types to rpc msg
19906 params = dict()
19907 msg = dict(type='Uniter', request='PrivateAddress', version=4, params=params)
19908 params['entities'] = entities
19909 reply = await self.rpc(msg)
19910 return reply
19911
19912
19913
19914 @ReturnMapping(StringResult)
19915 async def ProviderType(self):
19916 '''
19917
19918 Returns -> typing.Union[_ForwardRef('Error'), str]
19919 '''
19920 # map input types to rpc msg
19921 params = dict()
19922 msg = dict(type='Uniter', request='ProviderType', version=4, params=params)
19923
19924 reply = await self.rpc(msg)
19925 return reply
19926
19927
19928
19929 @ReturnMapping(StringResults)
19930 async def PublicAddress(self, entities):
19931 '''
19932 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19933 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19934 '''
19935 # map input types to rpc msg
19936 params = dict()
19937 msg = dict(type='Uniter', request='PublicAddress', version=4, params=params)
19938 params['entities'] = entities
19939 reply = await self.rpc(msg)
19940 return reply
19941
19942
19943
19944 @ReturnMapping(GetLeadershipSettingsBulkResults)
19945 async def Read(self, entities):
19946 '''
19947 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19948 Returns -> typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult>
19949 '''
19950 # map input types to rpc msg
19951 params = dict()
19952 msg = dict(type='Uniter', request='Read', version=4, params=params)
19953 params['entities'] = entities
19954 reply = await self.rpc(msg)
19955 return reply
19956
19957
19958
19959 @ReturnMapping(SettingsResults)
19960 async def ReadRemoteSettings(self, relation_unit_pairs):
19961 '''
19962 relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair>
19963 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
19964 '''
19965 # map input types to rpc msg
19966 params = dict()
19967 msg = dict(type='Uniter', request='ReadRemoteSettings', version=4, params=params)
19968 params['relation-unit-pairs'] = relation_unit_pairs
19969 reply = await self.rpc(msg)
19970 return reply
19971
19972
19973
19974 @ReturnMapping(SettingsResults)
19975 async def ReadSettings(self, relation_units):
19976 '''
19977 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
19978 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
19979 '''
19980 # map input types to rpc msg
19981 params = dict()
19982 msg = dict(type='Uniter', request='ReadSettings', version=4, params=params)
19983 params['relation-units'] = relation_units
19984 reply = await self.rpc(msg)
19985 return reply
19986
19987
19988
19989 @ReturnMapping(RelationResults)
19990 async def Relation(self, relation_units):
19991 '''
19992 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
19993 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
19994 '''
19995 # map input types to rpc msg
19996 params = dict()
19997 msg = dict(type='Uniter', request='Relation', version=4, params=params)
19998 params['relation-units'] = relation_units
19999 reply = await self.rpc(msg)
20000 return reply
20001
20002
20003
20004 @ReturnMapping(RelationResults)
20005 async def RelationById(self, relation_ids):
20006 '''
20007 relation_ids : typing.Sequence<+T_co>[int]
20008 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
20009 '''
20010 # map input types to rpc msg
20011 params = dict()
20012 msg = dict(type='Uniter', request='RelationById', version=4, params=params)
20013 params['relation-ids'] = relation_ids
20014 reply = await self.rpc(msg)
20015 return reply
20016
20017
20018
20019 @ReturnMapping(ErrorResults)
20020 async def RemoveStorageAttachments(self, ids):
20021 '''
20022 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20023 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20024 '''
20025 # map input types to rpc msg
20026 params = dict()
20027 msg = dict(type='Uniter', request='RemoveStorageAttachments', version=4, params=params)
20028 params['ids'] = ids
20029 reply = await self.rpc(msg)
20030 return reply
20031
20032
20033
20034 @ReturnMapping(ErrorResults)
20035 async def RequestReboot(self, entities):
20036 '''
20037 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20038 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20039 '''
20040 # map input types to rpc msg
20041 params = dict()
20042 msg = dict(type='Uniter', request='RequestReboot', version=4, params=params)
20043 params['entities'] = entities
20044 reply = await self.rpc(msg)
20045 return reply
20046
20047
20048
20049 @ReturnMapping(ResolvedModeResults)
20050 async def Resolved(self, entities):
20051 '''
20052 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20053 Returns -> typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult>
20054 '''
20055 # map input types to rpc msg
20056 params = dict()
20057 msg = dict(type='Uniter', request='Resolved', version=4, params=params)
20058 params['entities'] = entities
20059 reply = await self.rpc(msg)
20060 return reply
20061
20062
20063
20064 @ReturnMapping(ErrorResults)
20065 async def SetAgentStatus(self, entities):
20066 '''
20067 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20068 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20069 '''
20070 # map input types to rpc msg
20071 params = dict()
20072 msg = dict(type='Uniter', request='SetAgentStatus', version=4, params=params)
20073 params['entities'] = entities
20074 reply = await self.rpc(msg)
20075 return reply
20076
20077
20078
20079 @ReturnMapping(ErrorResults)
20080 async def SetApplicationStatus(self, entities):
20081 '''
20082 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20083 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20084 '''
20085 # map input types to rpc msg
20086 params = dict()
20087 msg = dict(type='Uniter', request='SetApplicationStatus', version=4, params=params)
20088 params['entities'] = entities
20089 reply = await self.rpc(msg)
20090 return reply
20091
20092
20093
20094 @ReturnMapping(ErrorResults)
20095 async def SetCharmURL(self, entities):
20096 '''
20097 entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL>
20098 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20099 '''
20100 # map input types to rpc msg
20101 params = dict()
20102 msg = dict(type='Uniter', request='SetCharmURL', version=4, params=params)
20103 params['entities'] = entities
20104 reply = await self.rpc(msg)
20105 return reply
20106
20107
20108
20109 @ReturnMapping(ErrorResults)
20110 async def SetStatus(self, entities):
20111 '''
20112 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20113 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20114 '''
20115 # map input types to rpc msg
20116 params = dict()
20117 msg = dict(type='Uniter', request='SetStatus', version=4, params=params)
20118 params['entities'] = entities
20119 reply = await self.rpc(msg)
20120 return reply
20121
20122
20123
20124 @ReturnMapping(ErrorResults)
20125 async def SetUnitStatus(self, entities):
20126 '''
20127 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20128 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20129 '''
20130 # map input types to rpc msg
20131 params = dict()
20132 msg = dict(type='Uniter', request='SetUnitStatus', version=4, params=params)
20133 params['entities'] = entities
20134 reply = await self.rpc(msg)
20135 return reply
20136
20137
20138
20139 @ReturnMapping(ErrorResults)
20140 async def SetWorkloadVersion(self, entities):
20141 '''
20142 entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion>
20143 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20144 '''
20145 # map input types to rpc msg
20146 params = dict()
20147 msg = dict(type='Uniter', request='SetWorkloadVersion', version=4, params=params)
20148 params['entities'] = entities
20149 reply = await self.rpc(msg)
20150 return reply
20151
20152
20153
20154 @ReturnMapping(LifeResults)
20155 async def StorageAttachmentLife(self, ids):
20156 '''
20157 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20158 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
20159 '''
20160 # map input types to rpc msg
20161 params = dict()
20162 msg = dict(type='Uniter', request='StorageAttachmentLife', version=4, params=params)
20163 params['ids'] = ids
20164 reply = await self.rpc(msg)
20165 return reply
20166
20167
20168
20169 @ReturnMapping(StorageAttachmentResults)
20170 async def StorageAttachments(self, ids):
20171 '''
20172 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20173 Returns -> typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult>
20174 '''
20175 # map input types to rpc msg
20176 params = dict()
20177 msg = dict(type='Uniter', request='StorageAttachments', version=4, params=params)
20178 params['ids'] = ids
20179 reply = await self.rpc(msg)
20180 return reply
20181
20182
20183
20184 @ReturnMapping(StatusResults)
20185 async def UnitStatus(self, entities):
20186 '''
20187 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20188 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
20189 '''
20190 # map input types to rpc msg
20191 params = dict()
20192 msg = dict(type='Uniter', request='UnitStatus', version=4, params=params)
20193 params['entities'] = entities
20194 reply = await self.rpc(msg)
20195 return reply
20196
20197
20198
20199 @ReturnMapping(StorageAttachmentIdsResults)
20200 async def UnitStorageAttachments(self, entities):
20201 '''
20202 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20203 Returns -> typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult>
20204 '''
20205 # map input types to rpc msg
20206 params = dict()
20207 msg = dict(type='Uniter', request='UnitStorageAttachments', version=4, params=params)
20208 params['entities'] = entities
20209 reply = await self.rpc(msg)
20210 return reply
20211
20212
20213
20214 @ReturnMapping(ErrorResults)
20215 async def UpdateSettings(self, relation_units):
20216 '''
20217 relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings>
20218 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20219 '''
20220 # map input types to rpc msg
20221 params = dict()
20222 msg = dict(type='Uniter', request='UpdateSettings', version=4, params=params)
20223 params['relation-units'] = relation_units
20224 reply = await self.rpc(msg)
20225 return reply
20226
20227
20228
20229 @ReturnMapping(NotifyWatchResults)
20230 async def Watch(self, entities):
20231 '''
20232 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20233 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20234 '''
20235 # map input types to rpc msg
20236 params = dict()
20237 msg = dict(type='Uniter', request='Watch', version=4, params=params)
20238 params['entities'] = entities
20239 reply = await self.rpc(msg)
20240 return reply
20241
20242
20243
20244 @ReturnMapping(NotifyWatchResult)
20245 async def WatchAPIHostPorts(self):
20246 '''
20247
20248 Returns -> typing.Union[str, _ForwardRef('Error')]
20249 '''
20250 # map input types to rpc msg
20251 params = dict()
20252 msg = dict(type='Uniter', request='WatchAPIHostPorts', version=4, params=params)
20253
20254 reply = await self.rpc(msg)
20255 return reply
20256
20257
20258
20259 @ReturnMapping(StringsWatchResults)
20260 async def WatchActionNotifications(self, entities):
20261 '''
20262 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20263 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20264 '''
20265 # map input types to rpc msg
20266 params = dict()
20267 msg = dict(type='Uniter', request='WatchActionNotifications', version=4, params=params)
20268 params['entities'] = entities
20269 reply = await self.rpc(msg)
20270 return reply
20271
20272
20273
20274 @ReturnMapping(StringsWatchResults)
20275 async def WatchApplicationRelations(self, entities):
20276 '''
20277 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20278 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20279 '''
20280 # map input types to rpc msg
20281 params = dict()
20282 msg = dict(type='Uniter', request='WatchApplicationRelations', version=4, params=params)
20283 params['entities'] = entities
20284 reply = await self.rpc(msg)
20285 return reply
20286
20287
20288
20289 @ReturnMapping(NotifyWatchResults)
20290 async def WatchConfigSettings(self, entities):
20291 '''
20292 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20293 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20294 '''
20295 # map input types to rpc msg
20296 params = dict()
20297 msg = dict(type='Uniter', request='WatchConfigSettings', version=4, params=params)
20298 params['entities'] = entities
20299 reply = await self.rpc(msg)
20300 return reply
20301
20302
20303
20304 @ReturnMapping(NotifyWatchResult)
20305 async def WatchForModelConfigChanges(self):
20306 '''
20307
20308 Returns -> typing.Union[str, _ForwardRef('Error')]
20309 '''
20310 # map input types to rpc msg
20311 params = dict()
20312 msg = dict(type='Uniter', request='WatchForModelConfigChanges', version=4, params=params)
20313
20314 reply = await self.rpc(msg)
20315 return reply
20316
20317
20318
20319 @ReturnMapping(NotifyWatchResults)
20320 async def WatchLeadershipSettings(self, entities):
20321 '''
20322 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20323 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20324 '''
20325 # map input types to rpc msg
20326 params = dict()
20327 msg = dict(type='Uniter', request='WatchLeadershipSettings', version=4, params=params)
20328 params['entities'] = entities
20329 reply = await self.rpc(msg)
20330 return reply
20331
20332
20333
20334 @ReturnMapping(NotifyWatchResults)
20335 async def WatchMeterStatus(self, entities):
20336 '''
20337 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20338 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20339 '''
20340 # map input types to rpc msg
20341 params = dict()
20342 msg = dict(type='Uniter', request='WatchMeterStatus', version=4, params=params)
20343 params['entities'] = entities
20344 reply = await self.rpc(msg)
20345 return reply
20346
20347
20348
20349 @ReturnMapping(RelationUnitsWatchResults)
20350 async def WatchRelationUnits(self, relation_units):
20351 '''
20352 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20353 Returns -> typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult>
20354 '''
20355 # map input types to rpc msg
20356 params = dict()
20357 msg = dict(type='Uniter', request='WatchRelationUnits', version=4, params=params)
20358 params['relation-units'] = relation_units
20359 reply = await self.rpc(msg)
20360 return reply
20361
20362
20363
20364 @ReturnMapping(NotifyWatchResults)
20365 async def WatchStorageAttachments(self, ids):
20366 '''
20367 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20368 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20369 '''
20370 # map input types to rpc msg
20371 params = dict()
20372 msg = dict(type='Uniter', request='WatchStorageAttachments', version=4, params=params)
20373 params['ids'] = ids
20374 reply = await self.rpc(msg)
20375 return reply
20376
20377
20378
20379 @ReturnMapping(NotifyWatchResults)
20380 async def WatchUnitAddresses(self, entities):
20381 '''
20382 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20383 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20384 '''
20385 # map input types to rpc msg
20386 params = dict()
20387 msg = dict(type='Uniter', request='WatchUnitAddresses', version=4, params=params)
20388 params['entities'] = entities
20389 reply = await self.rpc(msg)
20390 return reply
20391
20392
20393
20394 @ReturnMapping(StringsWatchResults)
20395 async def WatchUnitStorageAttachments(self, entities):
20396 '''
20397 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20398 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20399 '''
20400 # map input types to rpc msg
20401 params = dict()
20402 msg = dict(type='Uniter', request='WatchUnitStorageAttachments', version=4, params=params)
20403 params['entities'] = entities
20404 reply = await self.rpc(msg)
20405 return reply
20406
20407
20408
20409 @ReturnMapping(StringResults)
20410 async def WorkloadVersion(self, entities):
20411 '''
20412 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20413 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
20414 '''
20415 # map input types to rpc msg
20416 params = dict()
20417 msg = dict(type='Uniter', request='WorkloadVersion', version=4, params=params)
20418 params['entities'] = entities
20419 reply = await self.rpc(msg)
20420 return reply
20421
20422
20423 class UpgraderFacade(Type):
20424 name = 'Upgrader'
20425 version = 1
20426 schema = {'definitions': {'Binary': {'additionalProperties': False,
20427 'properties': {'Arch': {'type': 'string'},
20428 'Number': {'$ref': '#/definitions/Number'},
20429 'Series': {'type': 'string'}},
20430 'required': ['Number', 'Series', 'Arch'],
20431 'type': 'object'},
20432 'Entities': {'additionalProperties': False,
20433 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20434 'type': 'array'}},
20435 'required': ['entities'],
20436 'type': 'object'},
20437 'EntitiesVersion': {'additionalProperties': False,
20438 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
20439 'type': 'array'}},
20440 'required': ['agent-tools'],
20441 'type': 'object'},
20442 'Entity': {'additionalProperties': False,
20443 'properties': {'tag': {'type': 'string'}},
20444 'required': ['tag'],
20445 'type': 'object'},
20446 'EntityVersion': {'additionalProperties': False,
20447 'properties': {'tag': {'type': 'string'},
20448 'tools': {'$ref': '#/definitions/Version'}},
20449 'required': ['tag', 'tools'],
20450 'type': 'object'},
20451 'Error': {'additionalProperties': False,
20452 'properties': {'code': {'type': 'string'},
20453 'info': {'$ref': '#/definitions/ErrorInfo'},
20454 'message': {'type': 'string'}},
20455 'required': ['message', 'code'],
20456 'type': 'object'},
20457 'ErrorInfo': {'additionalProperties': False,
20458 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20459 'macaroon-path': {'type': 'string'}},
20460 'type': 'object'},
20461 'ErrorResult': {'additionalProperties': False,
20462 'properties': {'error': {'$ref': '#/definitions/Error'}},
20463 'type': 'object'},
20464 'ErrorResults': {'additionalProperties': False,
20465 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
20466 'type': 'array'}},
20467 'required': ['results'],
20468 'type': 'object'},
20469 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20470 'NotifyWatchResult': {'additionalProperties': False,
20471 'properties': {'NotifyWatcherId': {'type': 'string'},
20472 'error': {'$ref': '#/definitions/Error'}},
20473 'required': ['NotifyWatcherId'],
20474 'type': 'object'},
20475 'NotifyWatchResults': {'additionalProperties': False,
20476 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
20477 'type': 'array'}},
20478 'required': ['results'],
20479 'type': 'object'},
20480 'Number': {'additionalProperties': False,
20481 'properties': {'Build': {'type': 'integer'},
20482 'Major': {'type': 'integer'},
20483 'Minor': {'type': 'integer'},
20484 'Patch': {'type': 'integer'},
20485 'Tag': {'type': 'string'}},
20486 'required': ['Major',
20487 'Minor',
20488 'Tag',
20489 'Patch',
20490 'Build'],
20491 'type': 'object'},
20492 'Tools': {'additionalProperties': False,
20493 'properties': {'sha256': {'type': 'string'},
20494 'size': {'type': 'integer'},
20495 'url': {'type': 'string'},
20496 'version': {'$ref': '#/definitions/Binary'}},
20497 'required': ['version', 'url', 'size'],
20498 'type': 'object'},
20499 'ToolsResult': {'additionalProperties': False,
20500 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
20501 'error': {'$ref': '#/definitions/Error'},
20502 'tools': {'items': {'$ref': '#/definitions/Tools'},
20503 'type': 'array'}},
20504 'required': ['tools',
20505 'disable-ssl-hostname-verification'],
20506 'type': 'object'},
20507 'ToolsResults': {'additionalProperties': False,
20508 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
20509 'type': 'array'}},
20510 'required': ['results'],
20511 'type': 'object'},
20512 'Version': {'additionalProperties': False,
20513 'properties': {'version': {'$ref': '#/definitions/Binary'}},
20514 'required': ['version'],
20515 'type': 'object'},
20516 'VersionResult': {'additionalProperties': False,
20517 'properties': {'error': {'$ref': '#/definitions/Error'},
20518 'version': {'$ref': '#/definitions/Number'}},
20519 'type': 'object'},
20520 'VersionResults': {'additionalProperties': False,
20521 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
20522 'type': 'array'}},
20523 'required': ['results'],
20524 'type': 'object'}},
20525 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20526 'Result': {'$ref': '#/definitions/VersionResults'}},
20527 'type': 'object'},
20528 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
20529 'Result': {'$ref': '#/definitions/ErrorResults'}},
20530 'type': 'object'},
20531 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20532 'Result': {'$ref': '#/definitions/ToolsResults'}},
20533 'type': 'object'},
20534 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20535 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
20536 'type': 'object'}},
20537 'type': 'object'}
20538
20539
20540 @ReturnMapping(VersionResults)
20541 async def DesiredVersion(self, entities):
20542 '''
20543 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20544 Returns -> typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
20545 '''
20546 # map input types to rpc msg
20547 params = dict()
20548 msg = dict(type='Upgrader', request='DesiredVersion', version=1, params=params)
20549 params['entities'] = entities
20550 reply = await self.rpc(msg)
20551 return reply
20552
20553
20554
20555 @ReturnMapping(ErrorResults)
20556 async def SetTools(self, agent_tools):
20557 '''
20558 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
20559 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20560 '''
20561 # map input types to rpc msg
20562 params = dict()
20563 msg = dict(type='Upgrader', request='SetTools', version=1, params=params)
20564 params['agent-tools'] = agent_tools
20565 reply = await self.rpc(msg)
20566 return reply
20567
20568
20569
20570 @ReturnMapping(ToolsResults)
20571 async def Tools(self, entities):
20572 '''
20573 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20574 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
20575 '''
20576 # map input types to rpc msg
20577 params = dict()
20578 msg = dict(type='Upgrader', request='Tools', version=1, params=params)
20579 params['entities'] = entities
20580 reply = await self.rpc(msg)
20581 return reply
20582
20583
20584
20585 @ReturnMapping(NotifyWatchResults)
20586 async def WatchAPIVersion(self, entities):
20587 '''
20588 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20589 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20590 '''
20591 # map input types to rpc msg
20592 params = dict()
20593 msg = dict(type='Upgrader', request='WatchAPIVersion', version=1, params=params)
20594 params['entities'] = entities
20595 reply = await self.rpc(msg)
20596 return reply
20597
20598
20599 class UserManagerFacade(Type):
20600 name = 'UserManager'
20601 version = 1
20602 schema = {'definitions': {'AddUser': {'additionalProperties': False,
20603 'properties': {'display-name': {'type': 'string'},
20604 'password': {'type': 'string'},
20605 'username': {'type': 'string'}},
20606 'required': ['username', 'display-name'],
20607 'type': 'object'},
20608 'AddUserResult': {'additionalProperties': False,
20609 'properties': {'error': {'$ref': '#/definitions/Error'},
20610 'secret-key': {'items': {'type': 'integer'},
20611 'type': 'array'},
20612 'tag': {'type': 'string'}},
20613 'type': 'object'},
20614 'AddUserResults': {'additionalProperties': False,
20615 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
20616 'type': 'array'}},
20617 'required': ['results'],
20618 'type': 'object'},
20619 'AddUsers': {'additionalProperties': False,
20620 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
20621 'type': 'array'}},
20622 'required': ['users'],
20623 'type': 'object'},
20624 'Entities': {'additionalProperties': False,
20625 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20626 'type': 'array'}},
20627 'required': ['entities'],
20628 'type': 'object'},
20629 'Entity': {'additionalProperties': False,
20630 'properties': {'tag': {'type': 'string'}},
20631 'required': ['tag'],
20632 'type': 'object'},
20633 'EntityPassword': {'additionalProperties': False,
20634 'properties': {'password': {'type': 'string'},
20635 'tag': {'type': 'string'}},
20636 'required': ['tag', 'password'],
20637 'type': 'object'},
20638 'EntityPasswords': {'additionalProperties': False,
20639 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
20640 'type': 'array'}},
20641 'required': ['changes'],
20642 'type': 'object'},
20643 'Error': {'additionalProperties': False,
20644 'properties': {'code': {'type': 'string'},
20645 'info': {'$ref': '#/definitions/ErrorInfo'},
20646 'message': {'type': 'string'}},
20647 'required': ['message', 'code'],
20648 'type': 'object'},
20649 'ErrorInfo': {'additionalProperties': False,
20650 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20651 'macaroon-path': {'type': 'string'}},
20652 'type': 'object'},
20653 'ErrorResult': {'additionalProperties': False,
20654 'properties': {'error': {'$ref': '#/definitions/Error'}},
20655 'type': 'object'},
20656 'ErrorResults': {'additionalProperties': False,
20657 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
20658 'type': 'array'}},
20659 'required': ['results'],
20660 'type': 'object'},
20661 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20662 'MacaroonResult': {'additionalProperties': False,
20663 'properties': {'error': {'$ref': '#/definitions/Error'},
20664 'result': {'$ref': '#/definitions/Macaroon'}},
20665 'type': 'object'},
20666 'MacaroonResults': {'additionalProperties': False,
20667 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
20668 'type': 'array'}},
20669 'required': ['results'],
20670 'type': 'object'},
20671 'UserInfo': {'additionalProperties': False,
20672 'properties': {'access': {'type': 'string'},
20673 'created-by': {'type': 'string'},
20674 'date-created': {'format': 'date-time',
20675 'type': 'string'},
20676 'disabled': {'type': 'boolean'},
20677 'display-name': {'type': 'string'},
20678 'last-connection': {'format': 'date-time',
20679 'type': 'string'},
20680 'username': {'type': 'string'}},
20681 'required': ['username',
20682 'display-name',
20683 'access',
20684 'created-by',
20685 'date-created',
20686 'disabled'],
20687 'type': 'object'},
20688 'UserInfoRequest': {'additionalProperties': False,
20689 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20690 'type': 'array'},
20691 'include-disabled': {'type': 'boolean'}},
20692 'required': ['entities',
20693 'include-disabled'],
20694 'type': 'object'},
20695 'UserInfoResult': {'additionalProperties': False,
20696 'properties': {'error': {'$ref': '#/definitions/Error'},
20697 'result': {'$ref': '#/definitions/UserInfo'}},
20698 'type': 'object'},
20699 'UserInfoResults': {'additionalProperties': False,
20700 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
20701 'type': 'array'}},
20702 'required': ['results'],
20703 'type': 'object'}},
20704 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
20705 'Result': {'$ref': '#/definitions/AddUserResults'}},
20706 'type': 'object'},
20707 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20708 'Result': {'$ref': '#/definitions/MacaroonResults'}},
20709 'type': 'object'},
20710 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20711 'Result': {'$ref': '#/definitions/ErrorResults'}},
20712 'type': 'object'},
20713 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20714 'Result': {'$ref': '#/definitions/ErrorResults'}},
20715 'type': 'object'},
20716 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20717 'Result': {'$ref': '#/definitions/ErrorResults'}},
20718 'type': 'object'},
20719 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
20720 'Result': {'$ref': '#/definitions/ErrorResults'}},
20721 'type': 'object'},
20722 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
20723 'Result': {'$ref': '#/definitions/UserInfoResults'}},
20724 'type': 'object'}},
20725 'type': 'object'}
20726
20727
20728 @ReturnMapping(AddUserResults)
20729 async def AddUser(self, users):
20730 '''
20731 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
20732 Returns -> typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
20733 '''
20734 # map input types to rpc msg
20735 params = dict()
20736 msg = dict(type='UserManager', request='AddUser', version=1, params=params)
20737 params['users'] = users
20738 reply = await self.rpc(msg)
20739 return reply
20740
20741
20742
20743 @ReturnMapping(MacaroonResults)
20744 async def CreateLocalLoginMacaroon(self, entities):
20745 '''
20746 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20747 Returns -> typing.Sequence<+T_co>[~MacaroonResult]<~MacaroonResult>
20748 '''
20749 # map input types to rpc msg
20750 params = dict()
20751 msg = dict(type='UserManager', request='CreateLocalLoginMacaroon', version=1, params=params)
20752 params['entities'] = entities
20753 reply = await self.rpc(msg)
20754 return reply
20755
20756
20757
20758 @ReturnMapping(ErrorResults)
20759 async def DisableUser(self, entities):
20760 '''
20761 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20762 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20763 '''
20764 # map input types to rpc msg
20765 params = dict()
20766 msg = dict(type='UserManager', request='DisableUser', version=1, params=params)
20767 params['entities'] = entities
20768 reply = await self.rpc(msg)
20769 return reply
20770
20771
20772
20773 @ReturnMapping(ErrorResults)
20774 async def EnableUser(self, entities):
20775 '''
20776 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20777 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20778 '''
20779 # map input types to rpc msg
20780 params = dict()
20781 msg = dict(type='UserManager', request='EnableUser', version=1, params=params)
20782 params['entities'] = entities
20783 reply = await self.rpc(msg)
20784 return reply
20785
20786
20787
20788 @ReturnMapping(ErrorResults)
20789 async def RemoveUser(self, entities):
20790 '''
20791 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20792 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20793 '''
20794 # map input types to rpc msg
20795 params = dict()
20796 msg = dict(type='UserManager', request='RemoveUser', version=1, params=params)
20797 params['entities'] = entities
20798 reply = await self.rpc(msg)
20799 return reply
20800
20801
20802
20803 @ReturnMapping(ErrorResults)
20804 async def SetPassword(self, changes):
20805 '''
20806 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
20807 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20808 '''
20809 # map input types to rpc msg
20810 params = dict()
20811 msg = dict(type='UserManager', request='SetPassword', version=1, params=params)
20812 params['changes'] = changes
20813 reply = await self.rpc(msg)
20814 return reply
20815
20816
20817
20818 @ReturnMapping(UserInfoResults)
20819 async def UserInfo(self, entities, include_disabled):
20820 '''
20821 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20822 include_disabled : bool
20823 Returns -> typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
20824 '''
20825 # map input types to rpc msg
20826 params = dict()
20827 msg = dict(type='UserManager', request='UserInfo', version=1, params=params)
20828 params['entities'] = entities
20829 params['include-disabled'] = include_disabled
20830 reply = await self.rpc(msg)
20831 return reply
20832
20833
20834 class VolumeAttachmentsWatcherFacade(Type):
20835 name = 'VolumeAttachmentsWatcher'
20836 version = 2
20837 schema = {'definitions': {'Error': {'additionalProperties': False,
20838 'properties': {'code': {'type': 'string'},
20839 'info': {'$ref': '#/definitions/ErrorInfo'},
20840 'message': {'type': 'string'}},
20841 'required': ['message', 'code'],
20842 'type': 'object'},
20843 'ErrorInfo': {'additionalProperties': False,
20844 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20845 'macaroon-path': {'type': 'string'}},
20846 'type': 'object'},
20847 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20848 'MachineStorageId': {'additionalProperties': False,
20849 'properties': {'attachment-tag': {'type': 'string'},
20850 'machine-tag': {'type': 'string'}},
20851 'required': ['machine-tag',
20852 'attachment-tag'],
20853 'type': 'object'},
20854 'MachineStorageIdsWatchResult': {'additionalProperties': False,
20855 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
20856 'type': 'array'},
20857 'error': {'$ref': '#/definitions/Error'},
20858 'watcher-id': {'type': 'string'}},
20859 'required': ['watcher-id',
20860 'changes'],
20861 'type': 'object'}},
20862 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
20863 'type': 'object'},
20864 'Stop': {'type': 'object'}},
20865 'type': 'object'}
20866
20867
20868 @ReturnMapping(MachineStorageIdsWatchResult)
20869 async def Next(self):
20870 '''
20871
20872 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
20873 '''
20874 # map input types to rpc msg
20875 params = dict()
20876 msg = dict(type='VolumeAttachmentsWatcher', request='Next', version=2, params=params)
20877
20878 reply = await self.rpc(msg)
20879 return reply
20880
20881
20882
20883 @ReturnMapping(None)
20884 async def Stop(self):
20885 '''
20886
20887 Returns -> None
20888 '''
20889 # map input types to rpc msg
20890 params = dict()
20891 msg = dict(type='VolumeAttachmentsWatcher', request='Stop', version=2, params=params)
20892
20893 reply = await self.rpc(msg)
20894 return reply
20895
20896