69fbc4ccf426d5417ac8c946ed3f01f5e381b4a1
[osm/N2VC.git] / juju / client / _client.py
1 # DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py.
2 # Changes will be overwritten/lost when the file is regenerated.
3
4 from juju.client.facade import Type, ReturnMapping
5
6
7 class Action(Type):
8 _toSchema = {'name': 'name', 'parameters': 'parameters', 'receiver': 'receiver', 'tag': 'tag'}
9 _toPy = {'name': 'name', 'parameters': 'parameters', 'receiver': 'receiver', '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 = {'action': 'action', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'message': 'message', 'output': 'output', 'started': 'started', 'status': 'status'}
25 _toPy = {'action': 'action', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'message': 'message', 'output': 'output', 'started': 'started', 'status': 'status'}
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', 'error': 'error', 'receiver': 'receiver'}
105 _toPy = {'actions': 'actions', 'error': 'error', 'receiver': 'receiver'}
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 = {'actions': 'actions', 'application_tag': 'application-tag', 'error': 'error'}
129 _toPy = {'actions': 'actions', 'application-tag': 'application_tag', 'error': 'error'}
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': 'macaroon', 'macaroon_path': 'macaroon-path'}
187 _toPy = {'macaroon': 'macaroon', 'macaroon-path': 'macaroon_path'}
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 = {'applications': 'applications', 'commands': 'commands', 'machines': 'machines', 'timeout': 'timeout', 'units': 'units'}
239 _toPy = {'applications': 'applications', 'commands': 'commands', 'machines': 'machines', 'timeout': 'timeout', 'units': 'units'}
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 = {'container_type': 'container-type', 'error': 'error', 'jobs': 'jobs', 'life': 'life'}
257 _toPy = {'container-type': 'container_type', 'error': 'error', 'jobs': 'jobs', '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', 'auth-type': 'auth_type', 'redacted': 'redacted'}
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 = {'credential': 'credential', 'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'name': 'name', 'region': 'region', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'}
297 _toPy = {'credential': 'credential', 'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'region': 'region', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'}
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 = {'error': 'error', 'result': 'result'}
319 _toPy = {'error': 'error', 'result': 'result'}
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 ModelTag(Type):
412 _toSchema = {}
413 _toPy = {}
414 def __init__(self):
415 '''
416
417 '''
418 pass
419
420
421 class NotifyWatchResult(Type):
422 _toSchema = {'error': 'error', 'notifywatcherid': 'NotifyWatcherId'}
423 _toPy = {'NotifyWatcherId': 'notifywatcherid', 'error': 'error'}
424 def __init__(self, notifywatcherid=None, error=None):
425 '''
426 notifywatcherid : str
427 error : Error
428 '''
429 self.notifywatcherid = notifywatcherid
430 self.error = Error.from_json(error) if error else None
431
432
433 class NotifyWatchResults(Type):
434 _toSchema = {'results': 'results'}
435 _toPy = {'results': 'results'}
436 def __init__(self, results=None):
437 '''
438 results : typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
439 '''
440 self.results = [NotifyWatchResult.from_json(o) for o in results or []]
441
442
443 class StateServingInfo(Type):
444 _toSchema = {'api_port': 'api-port', 'ca_private_key': 'ca-private-key', 'cert': 'cert', 'private_key': 'private-key', 'shared_secret': 'shared-secret', 'state_port': 'state-port', 'system_identity': 'system-identity'}
445 _toPy = {'api-port': 'api_port', 'ca-private-key': 'ca_private_key', 'cert': 'cert', 'private-key': 'private_key', 'shared-secret': 'shared_secret', 'state-port': 'state_port', 'system-identity': 'system_identity'}
446 def __init__(self, api_port=None, ca_private_key=None, cert=None, private_key=None, shared_secret=None, state_port=None, system_identity=None):
447 '''
448 api_port : int
449 ca_private_key : str
450 cert : str
451 private_key : str
452 shared_secret : str
453 state_port : int
454 system_identity : str
455 '''
456 self.api_port = api_port
457 self.ca_private_key = ca_private_key
458 self.cert = cert
459 self.private_key = private_key
460 self.shared_secret = shared_secret
461 self.state_port = state_port
462 self.system_identity = system_identity
463
464
465 class AllWatcherNextResults(Type):
466 _toSchema = {'deltas': 'deltas'}
467 _toPy = {'deltas': 'deltas'}
468 def __init__(self, deltas=None):
469 '''
470 deltas : typing.Sequence<+T_co>[~Delta]<~Delta>
471 '''
472 self.deltas = [Delta.from_json(o) for o in deltas or []]
473
474
475 class Delta(Type):
476 _toSchema = {'entity': 'entity', 'removed': 'removed'}
477 _toPy = {'entity': 'entity', 'removed': 'removed'}
478 def __init__(self, entity=None, removed=None):
479 '''
480 entity : typing.Mapping<~KT, +VT_co>[str, typing.Any]
481 removed : bool
482 '''
483 self.entity = entity
484 self.removed = removed
485
486
487 class AnnotationsGetResult(Type):
488 _toSchema = {'annotations': 'annotations', 'entity': 'entity', 'error': 'error'}
489 _toPy = {'annotations': 'annotations', 'entity': 'entity', 'error': 'error'}
490 def __init__(self, annotations=None, entity=None, error=None):
491 '''
492 annotations : typing.Mapping<~KT, +VT_co>[str, str]
493 entity : str
494 error : ErrorResult
495 '''
496 self.annotations = annotations
497 self.entity = entity
498 self.error = ErrorResult.from_json(error) if error else None
499
500
501 class AnnotationsGetResults(Type):
502 _toSchema = {'results': 'results'}
503 _toPy = {'results': 'results'}
504 def __init__(self, results=None):
505 '''
506 results : typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult>
507 '''
508 self.results = [AnnotationsGetResult.from_json(o) for o in results or []]
509
510
511 class AnnotationsSet(Type):
512 _toSchema = {'annotations': 'annotations'}
513 _toPy = {'annotations': 'annotations'}
514 def __init__(self, annotations=None):
515 '''
516 annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations>
517 '''
518 self.annotations = [EntityAnnotations.from_json(o) for o in annotations or []]
519
520
521 class EntityAnnotations(Type):
522 _toSchema = {'annotations': 'annotations', 'entity': 'entity'}
523 _toPy = {'annotations': 'annotations', 'entity': 'entity'}
524 def __init__(self, annotations=None, entity=None):
525 '''
526 annotations : typing.Mapping<~KT, +VT_co>[str, str]
527 entity : str
528 '''
529 self.annotations = annotations
530 self.entity = entity
531
532
533 class AddApplicationUnits(Type):
534 _toSchema = {'application': 'application', 'num_units': 'num-units', 'placement': 'placement'}
535 _toPy = {'application': 'application', 'num-units': 'num_units', 'placement': 'placement'}
536 def __init__(self, application=None, num_units=None, placement=None):
537 '''
538 application : str
539 num_units : int
540 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
541 '''
542 self.application = application
543 self.num_units = num_units
544 self.placement = [Placement.from_json(o) for o in placement or []]
545
546
547 class AddApplicationUnitsResults(Type):
548 _toSchema = {'units': 'units'}
549 _toPy = {'units': 'units'}
550 def __init__(self, units=None):
551 '''
552 units : typing.Sequence<+T_co>[str]
553 '''
554 self.units = units
555
556
557 class AddRelation(Type):
558 _toSchema = {'endpoints': 'endpoints'}
559 _toPy = {'endpoints': 'endpoints'}
560 def __init__(self, endpoints=None):
561 '''
562 endpoints : typing.Sequence<+T_co>[str]
563 '''
564 self.endpoints = endpoints
565
566
567 class AddRelationResults(Type):
568 _toSchema = {'endpoints': 'endpoints'}
569 _toPy = {'endpoints': 'endpoints'}
570 def __init__(self, endpoints=None):
571 '''
572 endpoints : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
573 '''
574 self.endpoints = endpoints
575
576
577 class ApplicationCharmRelations(Type):
578 _toSchema = {'application': 'application'}
579 _toPy = {'application': 'application'}
580 def __init__(self, application=None):
581 '''
582 application : str
583 '''
584 self.application = application
585
586
587 class ApplicationCharmRelationsResults(Type):
588 _toSchema = {'charm_relations': 'charm-relations'}
589 _toPy = {'charm-relations': 'charm_relations'}
590 def __init__(self, charm_relations=None):
591 '''
592 charm_relations : typing.Sequence<+T_co>[str]
593 '''
594 self.charm_relations = charm_relations
595
596
597 class ApplicationDeploy(Type):
598 _toSchema = {'application': 'application', 'channel': 'channel', 'charm_url': 'charm-url', 'config': 'config', 'config_yaml': 'config-yaml', 'constraints': 'constraints', 'endpoint_bindings': 'endpoint-bindings', 'num_units': 'num-units', 'placement': 'placement', 'resources': 'resources', 'series': 'series', 'storage': 'storage'}
599 _toPy = {'application': 'application', 'channel': 'channel', 'charm-url': 'charm_url', 'config': 'config', 'config-yaml': 'config_yaml', 'constraints': 'constraints', 'endpoint-bindings': 'endpoint_bindings', 'num-units': 'num_units', 'placement': 'placement', 'resources': 'resources', 'series': 'series', 'storage': 'storage'}
600 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):
601 '''
602 application : str
603 channel : str
604 charm_url : str
605 config : typing.Mapping<~KT, +VT_co>[str, str]
606 config_yaml : str
607 constraints : Value
608 endpoint_bindings : typing.Mapping<~KT, +VT_co>[str, str]
609 num_units : int
610 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
611 resources : typing.Mapping<~KT, +VT_co>[str, str]
612 series : str
613 storage : typing.Mapping<~KT, +VT_co>[str, ~Constraints]<~Constraints>
614 '''
615 self.application = application
616 self.channel = channel
617 self.charm_url = charm_url
618 self.config = config
619 self.config_yaml = config_yaml
620 self.constraints = Value.from_json(constraints) if constraints else None
621 self.endpoint_bindings = endpoint_bindings
622 self.num_units = num_units
623 self.placement = [Placement.from_json(o) for o in placement or []]
624 self.resources = resources
625 self.series = series
626 self.storage = storage
627
628
629 class ApplicationDestroy(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 ApplicationExpose(Type):
640 _toSchema = {'application': 'application'}
641 _toPy = {'application': 'application'}
642 def __init__(self, application=None):
643 '''
644 application : str
645 '''
646 self.application = application
647
648
649 class ApplicationGet(Type):
650 _toSchema = {'application': 'application'}
651 _toPy = {'application': 'application'}
652 def __init__(self, application=None):
653 '''
654 application : str
655 '''
656 self.application = application
657
658
659 class ApplicationGetResults(Type):
660 _toSchema = {'application': 'application', 'charm': 'charm', 'config': 'config', 'constraints': 'constraints', 'series': 'series'}
661 _toPy = {'application': 'application', 'charm': 'charm', 'config': 'config', 'constraints': 'constraints', 'series': 'series'}
662 def __init__(self, application=None, charm=None, config=None, constraints=None, series=None):
663 '''
664 application : str
665 charm : str
666 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
667 constraints : Value
668 series : str
669 '''
670 self.application = application
671 self.charm = charm
672 self.config = config
673 self.constraints = Value.from_json(constraints) if constraints else None
674 self.series = series
675
676
677 class ApplicationMetricCredential(Type):
678 _toSchema = {'application': 'application', 'metrics_credentials': 'metrics-credentials'}
679 _toPy = {'application': 'application', 'metrics-credentials': 'metrics_credentials'}
680 def __init__(self, application=None, metrics_credentials=None):
681 '''
682 application : str
683 metrics_credentials : typing.Sequence<+T_co>[int]
684 '''
685 self.application = application
686 self.metrics_credentials = metrics_credentials
687
688
689 class ApplicationMetricCredentials(Type):
690 _toSchema = {'creds': 'creds'}
691 _toPy = {'creds': 'creds'}
692 def __init__(self, creds=None):
693 '''
694 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
695 '''
696 self.creds = [ApplicationMetricCredential.from_json(o) for o in creds or []]
697
698
699 class ApplicationSet(Type):
700 _toSchema = {'application': 'application', 'options': 'options'}
701 _toPy = {'application': 'application', 'options': 'options'}
702 def __init__(self, application=None, options=None):
703 '''
704 application : str
705 options : typing.Mapping<~KT, +VT_co>[str, str]
706 '''
707 self.application = application
708 self.options = options
709
710
711 class ApplicationSetCharm(Type):
712 _toSchema = {'application': 'application', 'channel': 'channel', 'charm_url': 'charm-url', 'config_settings': 'config-settings', 'config_settings_yaml': 'config-settings-yaml', 'force_series': 'force-series', 'force_units': 'force-units', 'resource_ids': 'resource-ids', 'storage_constraints': 'storage-constraints'}
713 _toPy = {'application': 'application', 'channel': 'channel', 'charm-url': 'charm_url', 'config-settings': 'config_settings', 'config-settings-yaml': 'config_settings_yaml', 'force-series': 'force_series', 'force-units': 'force_units', 'resource-ids': 'resource_ids', 'storage-constraints': 'storage_constraints'}
714 def __init__(self, application=None, channel=None, charm_url=None, config_settings=None, config_settings_yaml=None, force_series=None, force_units=None, resource_ids=None, storage_constraints=None):
715 '''
716 application : str
717 channel : str
718 charm_url : str
719 config_settings : typing.Mapping<~KT, +VT_co>[str, str]
720 config_settings_yaml : str
721 force_series : bool
722 force_units : bool
723 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
724 storage_constraints : typing.Mapping<~KT, +VT_co>[str, ~StorageConstraints]<~StorageConstraints>
725 '''
726 self.application = application
727 self.channel = channel
728 self.charm_url = charm_url
729 self.config_settings = config_settings
730 self.config_settings_yaml = config_settings_yaml
731 self.force_series = force_series
732 self.force_units = force_units
733 self.resource_ids = resource_ids
734 self.storage_constraints = storage_constraints
735
736
737 class ApplicationUnexpose(Type):
738 _toSchema = {'application': 'application'}
739 _toPy = {'application': 'application'}
740 def __init__(self, application=None):
741 '''
742 application : str
743 '''
744 self.application = application
745
746
747 class ApplicationUnset(Type):
748 _toSchema = {'application': 'application', 'options': 'options'}
749 _toPy = {'application': 'application', 'options': 'options'}
750 def __init__(self, application=None, options=None):
751 '''
752 application : str
753 options : typing.Sequence<+T_co>[str]
754 '''
755 self.application = application
756 self.options = options
757
758
759 class ApplicationUpdate(Type):
760 _toSchema = {'application': 'application', 'charm_url': 'charm-url', 'constraints': 'constraints', 'force_charm_url': 'force-charm-url', 'force_series': 'force-series', 'min_units': 'min-units', 'settings': 'settings', 'settings_yaml': 'settings-yaml'}
761 _toPy = {'application': 'application', 'charm-url': 'charm_url', 'constraints': 'constraints', 'force-charm-url': 'force_charm_url', 'force-series': 'force_series', 'min-units': 'min_units', 'settings': 'settings', 'settings-yaml': 'settings_yaml'}
762 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):
763 '''
764 application : str
765 charm_url : str
766 constraints : Value
767 force_charm_url : bool
768 force_series : bool
769 min_units : int
770 settings : typing.Mapping<~KT, +VT_co>[str, str]
771 settings_yaml : str
772 '''
773 self.application = application
774 self.charm_url = charm_url
775 self.constraints = Value.from_json(constraints) if constraints else None
776 self.force_charm_url = force_charm_url
777 self.force_series = force_series
778 self.min_units = min_units
779 self.settings = settings
780 self.settings_yaml = settings_yaml
781
782
783 class ApplicationsDeploy(Type):
784 _toSchema = {'applications': 'applications'}
785 _toPy = {'applications': 'applications'}
786 def __init__(self, applications=None):
787 '''
788 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
789 '''
790 self.applications = [ApplicationDeploy.from_json(o) for o in applications or []]
791
792
793 class CharmRelation(Type):
794 _toSchema = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'optional': 'optional', 'role': 'role', 'scope': 'scope'}
795 _toPy = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'optional': 'optional', 'role': 'role', 'scope': 'scope'}
796 def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None):
797 '''
798 interface : str
799 limit : int
800 name : str
801 optional : bool
802 role : str
803 scope : str
804 '''
805 self.interface = interface
806 self.limit = limit
807 self.name = name
808 self.optional = optional
809 self.role = role
810 self.scope = scope
811
812
813 class Constraints(Type):
814 _toSchema = {'count': 'Count', 'pool': 'Pool', 'size': 'Size'}
815 _toPy = {'Count': 'count', 'Pool': 'pool', 'Size': 'size'}
816 def __init__(self, count=None, pool=None, size=None):
817 '''
818 count : int
819 pool : str
820 size : int
821 '''
822 self.count = count
823 self.pool = pool
824 self.size = size
825
826
827 class DestroyApplicationUnits(Type):
828 _toSchema = {'unit_names': 'unit-names'}
829 _toPy = {'unit-names': 'unit_names'}
830 def __init__(self, unit_names=None):
831 '''
832 unit_names : typing.Sequence<+T_co>[str]
833 '''
834 self.unit_names = unit_names
835
836
837 class DestroyRelation(Type):
838 _toSchema = {'endpoints': 'endpoints'}
839 _toPy = {'endpoints': 'endpoints'}
840 def __init__(self, endpoints=None):
841 '''
842 endpoints : typing.Sequence<+T_co>[str]
843 '''
844 self.endpoints = endpoints
845
846
847 class GetApplicationConstraints(Type):
848 _toSchema = {'application': 'application'}
849 _toPy = {'application': 'application'}
850 def __init__(self, application=None):
851 '''
852 application : str
853 '''
854 self.application = application
855
856
857 class GetConstraintsResults(Type):
858 _toSchema = {'constraints': 'constraints'}
859 _toPy = {'constraints': 'constraints'}
860 def __init__(self, constraints=None):
861 '''
862 constraints : Value
863 '''
864 self.constraints = Value.from_json(constraints) if constraints else None
865
866
867 class Placement(Type):
868 _toSchema = {'directive': 'directive', 'scope': 'scope'}
869 _toPy = {'directive': 'directive', 'scope': 'scope'}
870 def __init__(self, directive=None, scope=None):
871 '''
872 directive : str
873 scope : str
874 '''
875 self.directive = directive
876 self.scope = scope
877
878
879 class SetConstraints(Type):
880 _toSchema = {'application': 'application', 'constraints': 'constraints'}
881 _toPy = {'application': 'application', 'constraints': 'constraints'}
882 def __init__(self, application=None, constraints=None):
883 '''
884 application : str
885 constraints : Value
886 '''
887 self.application = application
888 self.constraints = Value.from_json(constraints) if constraints else None
889
890
891 class StorageConstraints(Type):
892 _toSchema = {'count': 'count', 'pool': 'pool', 'size': 'size'}
893 _toPy = {'count': 'count', 'pool': 'pool', 'size': 'size'}
894 def __init__(self, count=None, pool=None, size=None):
895 '''
896 count : int
897 pool : str
898 size : int
899 '''
900 self.count = count
901 self.pool = pool
902 self.size = size
903
904
905 class StringResult(Type):
906 _toSchema = {'error': 'error', 'result': 'result'}
907 _toPy = {'error': 'error', 'result': 'result'}
908 def __init__(self, error=None, result=None):
909 '''
910 error : Error
911 result : str
912 '''
913 self.error = Error.from_json(error) if error else None
914 self.result = result
915
916
917 class Value(Type):
918 _toSchema = {'arch': 'arch', 'container': 'container', 'cores': 'cores', 'cpu_power': 'cpu-power', 'instance_type': 'instance-type', 'mem': 'mem', 'root_disk': 'root-disk', 'spaces': 'spaces', 'tags': 'tags', 'virt_type': 'virt-type'}
919 _toPy = {'arch': 'arch', 'container': 'container', 'cores': 'cores', 'cpu-power': 'cpu_power', 'instance-type': 'instance_type', 'mem': 'mem', 'root-disk': 'root_disk', 'spaces': 'spaces', 'tags': 'tags', 'virt-type': 'virt_type'}
920 def __init__(self, arch=None, container=None, cores=None, cpu_power=None, instance_type=None, mem=None, root_disk=None, spaces=None, tags=None, virt_type=None):
921 '''
922 arch : str
923 container : str
924 cores : int
925 cpu_power : int
926 instance_type : str
927 mem : int
928 root_disk : int
929 spaces : typing.Sequence<+T_co>[str]
930 tags : typing.Sequence<+T_co>[str]
931 virt_type : str
932 '''
933 self.arch = arch
934 self.container = container
935 self.cores = cores
936 self.cpu_power = cpu_power
937 self.instance_type = instance_type
938 self.mem = mem
939 self.root_disk = root_disk
940 self.spaces = spaces
941 self.tags = tags
942 self.virt_type = virt_type
943
944
945 class ApplicationRelationsChange(Type):
946 _toSchema = {'changed': 'changed', 'removed': 'removed'}
947 _toPy = {'changed': 'changed', 'removed': 'removed'}
948 def __init__(self, changed=None, removed=None):
949 '''
950 changed : typing.Sequence<+T_co>[~RelationChange]<~RelationChange>
951 removed : typing.Sequence<+T_co>[int]
952 '''
953 self.changed = [RelationChange.from_json(o) for o in changed or []]
954 self.removed = removed
955
956
957 class ApplicationRelationsWatchResult(Type):
958 _toSchema = {'applicationrelationswatcherid': 'ApplicationRelationsWatcherId', 'changes': 'changes', 'error': 'error'}
959 _toPy = {'ApplicationRelationsWatcherId': 'applicationrelationswatcherid', 'changes': 'changes', 'error': 'error'}
960 def __init__(self, applicationrelationswatcherid=None, changes=None, error=None):
961 '''
962 applicationrelationswatcherid : str
963 changes : ApplicationRelationsChange
964 error : Error
965 '''
966 self.applicationrelationswatcherid = applicationrelationswatcherid
967 self.changes = ApplicationRelationsChange.from_json(changes) if changes else None
968 self.error = Error.from_json(error) if error else None
969
970
971 class RelationChange(Type):
972 _toSchema = {'changedunits': 'changedunits', 'departedunits': 'departedunits', 'id_': 'id', 'life': 'life'}
973 _toPy = {'changedunits': 'changedunits', 'departedunits': 'departedunits', 'id': 'id_', 'life': 'life'}
974 def __init__(self, changedunits=None, departedunits=None, id_=None, life=None):
975 '''
976 changedunits : typing.Mapping<~KT, +VT_co>[str, ~RelationUnitChange]<~RelationUnitChange>
977 departedunits : typing.Sequence<+T_co>[str]
978 id_ : int
979 life : str
980 '''
981 self.changedunits = changedunits
982 self.departedunits = departedunits
983 self.id_ = id_
984 self.life = life
985
986
987 class RelationUnitChange(Type):
988 _toSchema = {'settings': 'settings'}
989 _toPy = {'settings': 'settings'}
990 def __init__(self, settings=None):
991 '''
992 settings : typing.Mapping<~KT, +VT_co>[str, typing.Any]
993 '''
994 self.settings = settings
995
996
997 class StringsWatchResult(Type):
998 _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
999 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
1000 def __init__(self, changes=None, error=None, watcher_id=None):
1001 '''
1002 changes : typing.Sequence<+T_co>[str]
1003 error : Error
1004 watcher_id : str
1005 '''
1006 self.changes = changes
1007 self.error = Error.from_json(error) if error else None
1008 self.watcher_id = watcher_id
1009
1010
1011 class BackupsCreateArgs(Type):
1012 _toSchema = {'notes': 'notes'}
1013 _toPy = {'notes': 'notes'}
1014 def __init__(self, notes=None):
1015 '''
1016 notes : str
1017 '''
1018 self.notes = notes
1019
1020
1021 class BackupsInfoArgs(Type):
1022 _toSchema = {'id_': 'id'}
1023 _toPy = {'id': 'id_'}
1024 def __init__(self, id_=None):
1025 '''
1026 id_ : str
1027 '''
1028 self.id_ = id_
1029
1030
1031 class BackupsListArgs(Type):
1032 _toSchema = {}
1033 _toPy = {}
1034 def __init__(self):
1035 '''
1036
1037 '''
1038 pass
1039
1040
1041 class BackupsListResult(Type):
1042 _toSchema = {'list_': 'list'}
1043 _toPy = {'list': 'list_'}
1044 def __init__(self, list_=None):
1045 '''
1046 list_ : typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
1047 '''
1048 self.list_ = [BackupsMetadataResult.from_json(o) for o in list_ or []]
1049
1050
1051 class BackupsMetadataResult(Type):
1052 _toSchema = {'ca_cert': 'ca-cert', 'ca_private_key': 'ca-private-key', 'checksum': 'checksum', 'checksum_format': 'checksum-format', 'finished': 'finished', 'hostname': 'hostname', 'id_': 'id', 'machine': 'machine', 'model': 'model', 'notes': 'notes', 'series': 'series', 'size': 'size', 'started': 'started', 'stored': 'stored', 'version': 'version'}
1053 _toPy = {'ca-cert': 'ca_cert', 'ca-private-key': 'ca_private_key', 'checksum': 'checksum', 'checksum-format': 'checksum_format', 'finished': 'finished', 'hostname': 'hostname', 'id': 'id_', 'machine': 'machine', 'model': 'model', 'notes': 'notes', 'series': 'series', 'size': 'size', 'started': 'started', 'stored': 'stored', 'version': 'version'}
1054 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):
1055 '''
1056 ca_cert : str
1057 ca_private_key : str
1058 checksum : str
1059 checksum_format : str
1060 finished : str
1061 hostname : str
1062 id_ : str
1063 machine : str
1064 model : str
1065 notes : str
1066 series : str
1067 size : int
1068 started : str
1069 stored : str
1070 version : Number
1071 '''
1072 self.ca_cert = ca_cert
1073 self.ca_private_key = ca_private_key
1074 self.checksum = checksum
1075 self.checksum_format = checksum_format
1076 self.finished = finished
1077 self.hostname = hostname
1078 self.id_ = id_
1079 self.machine = machine
1080 self.model = model
1081 self.notes = notes
1082 self.series = series
1083 self.size = size
1084 self.started = started
1085 self.stored = stored
1086 self.version = Number.from_json(version) if version else None
1087
1088
1089 class BackupsRemoveArgs(Type):
1090 _toSchema = {'id_': 'id'}
1091 _toPy = {'id': 'id_'}
1092 def __init__(self, id_=None):
1093 '''
1094 id_ : str
1095 '''
1096 self.id_ = id_
1097
1098
1099 class Number(Type):
1100 _toSchema = {'build': 'Build', 'major': 'Major', 'minor': 'Minor', 'patch': 'Patch', 'tag': 'Tag'}
1101 _toPy = {'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch', 'Tag': 'tag'}
1102 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
1103 '''
1104 build : int
1105 major : int
1106 minor : int
1107 patch : int
1108 tag : str
1109 '''
1110 self.build = build
1111 self.major = major
1112 self.minor = minor
1113 self.patch = patch
1114 self.tag = tag
1115
1116
1117 class RestoreArgs(Type):
1118 _toSchema = {'backup_id': 'backup-id'}
1119 _toPy = {'backup-id': 'backup_id'}
1120 def __init__(self, backup_id=None):
1121 '''
1122 backup_id : str
1123 '''
1124 self.backup_id = backup_id
1125
1126
1127 class Block(Type):
1128 _toSchema = {'id_': 'id', 'message': 'message', 'tag': 'tag', 'type_': 'type'}
1129 _toPy = {'id': 'id_', 'message': 'message', 'tag': 'tag', 'type': 'type_'}
1130 def __init__(self, id_=None, message=None, tag=None, type_=None):
1131 '''
1132 id_ : str
1133 message : str
1134 tag : str
1135 type_ : str
1136 '''
1137 self.id_ = id_
1138 self.message = message
1139 self.tag = tag
1140 self.type_ = type_
1141
1142
1143 class BlockResult(Type):
1144 _toSchema = {'error': 'error', 'result': 'result'}
1145 _toPy = {'error': 'error', 'result': 'result'}
1146 def __init__(self, error=None, result=None):
1147 '''
1148 error : Error
1149 result : Block
1150 '''
1151 self.error = Error.from_json(error) if error else None
1152 self.result = Block.from_json(result) if result else None
1153
1154
1155 class BlockResults(Type):
1156 _toSchema = {'results': 'results'}
1157 _toPy = {'results': 'results'}
1158 def __init__(self, results=None):
1159 '''
1160 results : typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
1161 '''
1162 self.results = [BlockResult.from_json(o) for o in results or []]
1163
1164
1165 class BlockSwitchParams(Type):
1166 _toSchema = {'message': 'message', 'type_': 'type'}
1167 _toPy = {'message': 'message', 'type': 'type_'}
1168 def __init__(self, message=None, type_=None):
1169 '''
1170 message : str
1171 type_ : str
1172 '''
1173 self.message = message
1174 self.type_ = type_
1175
1176
1177 class BundleChange(Type):
1178 _toSchema = {'args': 'args', 'id_': 'id', 'method': 'method', 'requires': 'requires'}
1179 _toPy = {'args': 'args', 'id': 'id_', 'method': 'method', 'requires': 'requires'}
1180 def __init__(self, args=None, id_=None, method=None, requires=None):
1181 '''
1182 args : typing.Sequence<+T_co>[typing.Any]
1183 id_ : str
1184 method : str
1185 requires : typing.Sequence<+T_co>[str]
1186 '''
1187 self.args = args
1188 self.id_ = id_
1189 self.method = method
1190 self.requires = requires
1191
1192
1193 class BundleChangesParams(Type):
1194 _toSchema = {'yaml': 'yaml'}
1195 _toPy = {'yaml': 'yaml'}
1196 def __init__(self, yaml=None):
1197 '''
1198 yaml : str
1199 '''
1200 self.yaml = yaml
1201
1202
1203 class BundleChangesResults(Type):
1204 _toSchema = {'changes': 'changes', 'errors': 'errors'}
1205 _toPy = {'changes': 'changes', 'errors': 'errors'}
1206 def __init__(self, changes=None, errors=None):
1207 '''
1208 changes : typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
1209 errors : typing.Sequence<+T_co>[str]
1210 '''
1211 self.changes = [BundleChange.from_json(o) for o in changes or []]
1212 self.errors = errors
1213
1214
1215 class CharmActionSpec(Type):
1216 _toSchema = {'description': 'description', 'params': 'params'}
1217 _toPy = {'description': 'description', 'params': 'params'}
1218 def __init__(self, description=None, params=None):
1219 '''
1220 description : str
1221 params : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1222 '''
1223 self.description = description
1224 self.params = params
1225
1226
1227 class CharmActions(Type):
1228 _toSchema = {'specs': 'specs'}
1229 _toPy = {'specs': 'specs'}
1230 def __init__(self, specs=None):
1231 '''
1232 specs : typing.Mapping<~KT, +VT_co>[str, ~CharmActionSpec]<~CharmActionSpec>
1233 '''
1234 self.specs = specs
1235
1236
1237 class CharmInfo(Type):
1238 _toSchema = {'actions': 'actions', 'config': 'config', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'}
1239 _toPy = {'actions': 'actions', 'config': 'config', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'}
1240 def __init__(self, actions=None, config=None, meta=None, metrics=None, revision=None, url=None):
1241 '''
1242 actions : CharmActions
1243 config : typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>
1244 meta : CharmMeta
1245 metrics : CharmMetrics
1246 revision : int
1247 url : str
1248 '''
1249 self.actions = CharmActions.from_json(actions) if actions else None
1250 self.config = config
1251 self.meta = CharmMeta.from_json(meta) if meta else None
1252 self.metrics = CharmMetrics.from_json(metrics) if metrics else None
1253 self.revision = revision
1254 self.url = url
1255
1256
1257 class CharmMeta(Type):
1258 _toSchema = {'categories': 'categories', 'description': 'description', 'extra_bindings': 'extra-bindings', 'min_juju_version': 'min-juju-version', 'name': 'name', 'payload_classes': 'payload-classes', 'peers': 'peers', 'provides': 'provides', 'requires': 'requires', 'resources': 'resources', 'series': 'series', 'storage': 'storage', 'subordinate': 'subordinate', 'summary': 'summary', 'tags': 'tags', 'terms': 'terms'}
1259 _toPy = {'categories': 'categories', 'description': 'description', 'extra-bindings': 'extra_bindings', 'min-juju-version': 'min_juju_version', 'name': 'name', 'payload-classes': 'payload_classes', 'peers': 'peers', 'provides': 'provides', 'requires': 'requires', 'resources': 'resources', 'series': 'series', 'storage': 'storage', 'subordinate': 'subordinate', 'summary': 'summary', 'tags': 'tags', 'terms': 'terms'}
1260 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):
1261 '''
1262 categories : typing.Sequence<+T_co>[str]
1263 description : str
1264 extra_bindings : typing.Mapping<~KT, +VT_co>[str, str]
1265 min_juju_version : str
1266 name : str
1267 payload_classes : typing.Mapping<~KT, +VT_co>[str, ~CharmPayloadClass]<~CharmPayloadClass>
1268 peers : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1269 provides : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1270 requires : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1271 resources : typing.Mapping<~KT, +VT_co>[str, ~CharmResourceMeta]<~CharmResourceMeta>
1272 series : typing.Sequence<+T_co>[str]
1273 storage : typing.Mapping<~KT, +VT_co>[str, ~CharmStorage]<~CharmStorage>
1274 subordinate : bool
1275 summary : str
1276 tags : typing.Sequence<+T_co>[str]
1277 terms : typing.Sequence<+T_co>[str]
1278 '''
1279 self.categories = categories
1280 self.description = description
1281 self.extra_bindings = extra_bindings
1282 self.min_juju_version = min_juju_version
1283 self.name = name
1284 self.payload_classes = payload_classes
1285 self.peers = peers
1286 self.provides = provides
1287 self.requires = requires
1288 self.resources = resources
1289 self.series = series
1290 self.storage = storage
1291 self.subordinate = subordinate
1292 self.summary = summary
1293 self.tags = tags
1294 self.terms = terms
1295
1296
1297 class CharmMetric(Type):
1298 _toSchema = {'description': 'description', 'type_': 'type'}
1299 _toPy = {'description': 'description', 'type': 'type_'}
1300 def __init__(self, description=None, type_=None):
1301 '''
1302 description : str
1303 type_ : str
1304 '''
1305 self.description = description
1306 self.type_ = type_
1307
1308
1309 class CharmMetrics(Type):
1310 _toSchema = {'metrics': 'metrics', 'plan': 'plan'}
1311 _toPy = {'metrics': 'metrics', 'plan': 'plan'}
1312 def __init__(self, metrics=None, plan=None):
1313 '''
1314 metrics : typing.Mapping<~KT, +VT_co>[str, ~CharmMetric]<~CharmMetric>
1315 plan : CharmPlan
1316 '''
1317 self.metrics = metrics
1318 self.plan = CharmPlan.from_json(plan) if plan else None
1319
1320
1321 class CharmOption(Type):
1322 _toSchema = {'default': 'default', 'description': 'description', 'type_': 'type'}
1323 _toPy = {'default': 'default', 'description': 'description', 'type': 'type_'}
1324 def __init__(self, default=None, description=None, type_=None):
1325 '''
1326 default : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1327 description : str
1328 type_ : str
1329 '''
1330 self.default = default
1331 self.description = description
1332 self.type_ = type_
1333
1334
1335 class CharmPayloadClass(Type):
1336 _toSchema = {'name': 'name', 'type_': 'type'}
1337 _toPy = {'name': 'name', 'type': 'type_'}
1338 def __init__(self, name=None, type_=None):
1339 '''
1340 name : str
1341 type_ : str
1342 '''
1343 self.name = name
1344 self.type_ = type_
1345
1346
1347 class CharmPlan(Type):
1348 _toSchema = {'required': 'required'}
1349 _toPy = {'required': 'required'}
1350 def __init__(self, required=None):
1351 '''
1352 required : bool
1353 '''
1354 self.required = required
1355
1356
1357 class CharmResourceMeta(Type):
1358 _toSchema = {'description': 'description', 'name': 'name', 'path': 'path', 'type_': 'type'}
1359 _toPy = {'description': 'description', 'name': 'name', 'path': 'path', 'type': 'type_'}
1360 def __init__(self, description=None, name=None, path=None, type_=None):
1361 '''
1362 description : str
1363 name : str
1364 path : str
1365 type_ : str
1366 '''
1367 self.description = description
1368 self.name = name
1369 self.path = path
1370 self.type_ = type_
1371
1372
1373 class CharmStorage(Type):
1374 _toSchema = {'count_max': 'count-max', 'count_min': 'count-min', 'description': 'description', 'location': 'location', 'minimum_size': 'minimum-size', 'name': 'name', 'properties': 'properties', 'read_only': 'read-only', 'shared': 'shared', 'type_': 'type'}
1375 _toPy = {'count-max': 'count_max', 'count-min': 'count_min', 'description': 'description', 'location': 'location', 'minimum-size': 'minimum_size', 'name': 'name', 'properties': 'properties', 'read-only': 'read_only', 'shared': 'shared', 'type': 'type_'}
1376 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):
1377 '''
1378 count_max : int
1379 count_min : int
1380 description : str
1381 location : str
1382 minimum_size : int
1383 name : str
1384 properties : typing.Sequence<+T_co>[str]
1385 read_only : bool
1386 shared : bool
1387 type_ : str
1388 '''
1389 self.count_max = count_max
1390 self.count_min = count_min
1391 self.description = description
1392 self.location = location
1393 self.minimum_size = minimum_size
1394 self.name = name
1395 self.properties = properties
1396 self.read_only = read_only
1397 self.shared = shared
1398 self.type_ = type_
1399
1400
1401 class CharmURL(Type):
1402 _toSchema = {'url': 'url'}
1403 _toPy = {'url': 'url'}
1404 def __init__(self, url=None):
1405 '''
1406 url : str
1407 '''
1408 self.url = url
1409
1410
1411 class CharmsList(Type):
1412 _toSchema = {'names': 'names'}
1413 _toPy = {'names': 'names'}
1414 def __init__(self, names=None):
1415 '''
1416 names : typing.Sequence<+T_co>[str]
1417 '''
1418 self.names = names
1419
1420
1421 class CharmsListResult(Type):
1422 _toSchema = {'charm_urls': 'charm-urls'}
1423 _toPy = {'charm-urls': 'charm_urls'}
1424 def __init__(self, charm_urls=None):
1425 '''
1426 charm_urls : typing.Sequence<+T_co>[str]
1427 '''
1428 self.charm_urls = charm_urls
1429
1430
1431 class IsMeteredResult(Type):
1432 _toSchema = {'metered': 'metered'}
1433 _toPy = {'metered': 'metered'}
1434 def __init__(self, metered=None):
1435 '''
1436 metered : bool
1437 '''
1438 self.metered = metered
1439
1440
1441 class APIHostPortsResult(Type):
1442 _toSchema = {'servers': 'servers'}
1443 _toPy = {'servers': 'servers'}
1444 def __init__(self, servers=None):
1445 '''
1446 servers : typing.Sequence<+T_co>[~HostPort]<~HostPort>
1447 '''
1448 self.servers = [HostPort.from_json(o) for o in servers or []]
1449
1450
1451 class AddCharm(Type):
1452 _toSchema = {'channel': 'channel', 'url': 'url'}
1453 _toPy = {'channel': 'channel', 'url': 'url'}
1454 def __init__(self, channel=None, url=None):
1455 '''
1456 channel : str
1457 url : str
1458 '''
1459 self.channel = channel
1460 self.url = url
1461
1462
1463 class AddCharmWithAuthorization(Type):
1464 _toSchema = {'channel': 'channel', 'macaroon': 'macaroon', 'url': 'url'}
1465 _toPy = {'channel': 'channel', 'macaroon': 'macaroon', 'url': 'url'}
1466 def __init__(self, channel=None, macaroon=None, url=None):
1467 '''
1468 channel : str
1469 macaroon : Macaroon
1470 url : str
1471 '''
1472 self.channel = channel
1473 self.macaroon = Macaroon.from_json(macaroon) if macaroon else None
1474 self.url = url
1475
1476
1477 class AddMachineParams(Type):
1478 _toSchema = {'addresses': 'addresses', 'constraints': 'constraints', 'container_type': 'container-type', 'disks': 'disks', 'hardware_characteristics': 'hardware-characteristics', 'instance_id': 'instance-id', 'jobs': 'jobs', 'nonce': 'nonce', 'parent_id': 'parent-id', 'placement': 'placement', 'series': 'series'}
1479 _toPy = {'addresses': 'addresses', 'constraints': 'constraints', 'container-type': 'container_type', 'disks': 'disks', 'hardware-characteristics': 'hardware_characteristics', 'instance-id': 'instance_id', 'jobs': 'jobs', 'nonce': 'nonce', 'parent-id': 'parent_id', 'placement': 'placement', 'series': 'series'}
1480 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):
1481 '''
1482 addresses : typing.Sequence<+T_co>[~Address]<~Address>
1483 constraints : Value
1484 container_type : str
1485 disks : typing.Sequence<+T_co>[~Constraints]<~Constraints>
1486 hardware_characteristics : HardwareCharacteristics
1487 instance_id : str
1488 jobs : typing.Sequence<+T_co>[str]
1489 nonce : str
1490 parent_id : str
1491 placement : Placement
1492 series : str
1493 '''
1494 self.addresses = [Address.from_json(o) for o in addresses or []]
1495 self.constraints = Value.from_json(constraints) if constraints else None
1496 self.container_type = container_type
1497 self.disks = [Constraints.from_json(o) for o in disks or []]
1498 self.hardware_characteristics = HardwareCharacteristics.from_json(hardware_characteristics) if hardware_characteristics else None
1499 self.instance_id = instance_id
1500 self.jobs = jobs
1501 self.nonce = nonce
1502 self.parent_id = parent_id
1503 self.placement = Placement.from_json(placement) if placement else None
1504 self.series = series
1505
1506
1507 class AddMachines(Type):
1508 _toSchema = {'params': 'params'}
1509 _toPy = {'params': 'params'}
1510 def __init__(self, params=None):
1511 '''
1512 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1513 '''
1514 self.params = [AddMachineParams.from_json(o) for o in params or []]
1515
1516
1517 class AddMachinesResult(Type):
1518 _toSchema = {'error': 'error', 'machine': 'machine'}
1519 _toPy = {'error': 'error', 'machine': 'machine'}
1520 def __init__(self, error=None, machine=None):
1521 '''
1522 error : Error
1523 machine : str
1524 '''
1525 self.error = Error.from_json(error) if error else None
1526 self.machine = machine
1527
1528
1529 class AddMachinesResults(Type):
1530 _toSchema = {'machines': 'machines'}
1531 _toPy = {'machines': 'machines'}
1532 def __init__(self, machines=None):
1533 '''
1534 machines : typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1535 '''
1536 self.machines = [AddMachinesResult.from_json(o) for o in machines or []]
1537
1538
1539 class Address(Type):
1540 _toSchema = {'scope': 'scope', 'space_name': 'space-name', 'type_': 'type', 'value': 'value'}
1541 _toPy = {'scope': 'scope', 'space-name': 'space_name', 'type': 'type_', 'value': 'value'}
1542 def __init__(self, scope=None, space_name=None, type_=None, value=None):
1543 '''
1544 scope : str
1545 space_name : str
1546 type_ : str
1547 value : str
1548 '''
1549 self.scope = scope
1550 self.space_name = space_name
1551 self.type_ = type_
1552 self.value = value
1553
1554
1555 class AgentVersionResult(Type):
1556 _toSchema = {'version': 'version'}
1557 _toPy = {'version': 'version'}
1558 def __init__(self, version=None):
1559 '''
1560 version : Number
1561 '''
1562 self.version = Number.from_json(version) if version else None
1563
1564
1565 class AllWatcherId(Type):
1566 _toSchema = {'watcher_id': 'watcher-id'}
1567 _toPy = {'watcher-id': 'watcher_id'}
1568 def __init__(self, watcher_id=None):
1569 '''
1570 watcher_id : str
1571 '''
1572 self.watcher_id = watcher_id
1573
1574
1575 class ApplicationStatus(Type):
1576 _toSchema = {'can_upgrade_to': 'can-upgrade-to', 'charm': 'charm', 'err': 'err', 'exposed': 'exposed', 'life': 'life', 'meter_statuses': 'meter-statuses', 'relations': 'relations', 'series': 'series', 'status': 'status', 'subordinate_to': 'subordinate-to', 'units': 'units', 'workload_version': 'workload-version'}
1577 _toPy = {'can-upgrade-to': 'can_upgrade_to', 'charm': 'charm', 'err': 'err', 'exposed': 'exposed', 'life': 'life', 'meter-statuses': 'meter_statuses', 'relations': 'relations', 'series': 'series', 'status': 'status', 'subordinate-to': 'subordinate_to', 'units': 'units', 'workload-version': 'workload_version'}
1578 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):
1579 '''
1580 can_upgrade_to : str
1581 charm : str
1582 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1583 exposed : bool
1584 life : str
1585 meter_statuses : typing.Mapping<~KT, +VT_co>[str, ~MeterStatus]<~MeterStatus>
1586 relations : typing.Sequence<+T_co>[str]
1587 series : str
1588 status : DetailedStatus
1589 subordinate_to : typing.Sequence<+T_co>[str]
1590 units : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus>
1591 workload_version : str
1592 '''
1593 self.can_upgrade_to = can_upgrade_to
1594 self.charm = charm
1595 self.err = err
1596 self.exposed = exposed
1597 self.life = life
1598 self.meter_statuses = meter_statuses
1599 self.relations = relations
1600 self.series = series
1601 self.status = DetailedStatus.from_json(status) if status else None
1602 self.subordinate_to = subordinate_to
1603 self.units = units
1604 self.workload_version = workload_version
1605
1606
1607 class Binary(Type):
1608 _toSchema = {'arch': 'Arch', 'number': 'Number', 'series': 'Series'}
1609 _toPy = {'Arch': 'arch', 'Number': 'number', 'Series': 'series'}
1610 def __init__(self, arch=None, number=None, series=None):
1611 '''
1612 arch : str
1613 number : Number
1614 series : str
1615 '''
1616 self.arch = arch
1617 self.number = Number.from_json(number) if number else None
1618 self.series = series
1619
1620
1621 class ConfigValue(Type):
1622 _toSchema = {'source': 'source', 'value': 'value'}
1623 _toPy = {'source': 'source', 'value': 'value'}
1624 def __init__(self, source=None, value=None):
1625 '''
1626 source : str
1627 value : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1628 '''
1629 self.source = source
1630 self.value = value
1631
1632
1633 class DestroyMachines(Type):
1634 _toSchema = {'force': 'force', 'machine_names': 'machine-names'}
1635 _toPy = {'force': 'force', 'machine-names': 'machine_names'}
1636 def __init__(self, force=None, machine_names=None):
1637 '''
1638 force : bool
1639 machine_names : typing.Sequence<+T_co>[str]
1640 '''
1641 self.force = force
1642 self.machine_names = machine_names
1643
1644
1645 class DetailedStatus(Type):
1646 _toSchema = {'data': 'data', 'err': 'err', 'info': 'info', 'kind': 'kind', 'life': 'life', 'since': 'since', 'status': 'status', 'version': 'version'}
1647 _toPy = {'data': 'data', 'err': 'err', 'info': 'info', 'kind': 'kind', 'life': 'life', 'since': 'since', 'status': 'status', 'version': 'version'}
1648 def __init__(self, data=None, err=None, info=None, kind=None, life=None, since=None, status=None, version=None):
1649 '''
1650 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1651 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1652 info : str
1653 kind : str
1654 life : str
1655 since : str
1656 status : str
1657 version : str
1658 '''
1659 self.data = data
1660 self.err = err
1661 self.info = info
1662 self.kind = kind
1663 self.life = life
1664 self.since = since
1665 self.status = status
1666 self.version = version
1667
1668
1669 class EndpointStatus(Type):
1670 _toSchema = {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'}
1671 _toPy = {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'}
1672 def __init__(self, application=None, name=None, role=None, subordinate=None):
1673 '''
1674 application : str
1675 name : str
1676 role : str
1677 subordinate : bool
1678 '''
1679 self.application = application
1680 self.name = name
1681 self.role = role
1682 self.subordinate = subordinate
1683
1684
1685 class EntityStatus(Type):
1686 _toSchema = {'data': 'data', 'info': 'info', 'since': 'since', 'status': 'status'}
1687 _toPy = {'data': 'data', 'info': 'info', 'since': 'since', 'status': 'status'}
1688 def __init__(self, data=None, info=None, since=None, status=None):
1689 '''
1690 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1691 info : str
1692 since : str
1693 status : str
1694 '''
1695 self.data = data
1696 self.info = info
1697 self.since = since
1698 self.status = status
1699
1700
1701 class FindToolsParams(Type):
1702 _toSchema = {'arch': 'arch', 'major': 'major', 'minor': 'minor', 'number': 'number', 'series': 'series'}
1703 _toPy = {'arch': 'arch', 'major': 'major', 'minor': 'minor', 'number': 'number', 'series': 'series'}
1704 def __init__(self, arch=None, major=None, minor=None, number=None, series=None):
1705 '''
1706 arch : str
1707 major : int
1708 minor : int
1709 number : Number
1710 series : str
1711 '''
1712 self.arch = arch
1713 self.major = major
1714 self.minor = minor
1715 self.number = Number.from_json(number) if number else None
1716 self.series = series
1717
1718
1719 class FindToolsResult(Type):
1720 _toSchema = {'error': 'error', 'list_': 'list'}
1721 _toPy = {'error': 'error', 'list': 'list_'}
1722 def __init__(self, error=None, list_=None):
1723 '''
1724 error : Error
1725 list_ : typing.Sequence<+T_co>[~Tools]<~Tools>
1726 '''
1727 self.error = Error.from_json(error) if error else None
1728 self.list_ = [Tools.from_json(o) for o in list_ or []]
1729
1730
1731 class FullStatus(Type):
1732 _toSchema = {'applications': 'applications', 'machines': 'machines', 'model': 'model', 'relations': 'relations', 'remote_applications': 'remote-applications'}
1733 _toPy = {'applications': 'applications', 'machines': 'machines', 'model': 'model', 'relations': 'relations', 'remote-applications': 'remote_applications'}
1734 def __init__(self, applications=None, machines=None, model=None, relations=None, remote_applications=None):
1735 '''
1736 applications : typing.Mapping<~KT, +VT_co>[str, ~ApplicationStatus]<~ApplicationStatus>
1737 machines : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>
1738 model : ModelStatusInfo
1739 relations : typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>
1740 remote_applications : typing.Mapping<~KT, +VT_co>[str, ~RemoteApplicationStatus]<~RemoteApplicationStatus>
1741 '''
1742 self.applications = applications
1743 self.machines = machines
1744 self.model = ModelStatusInfo.from_json(model) if model else None
1745 self.relations = [RelationStatus.from_json(o) for o in relations or []]
1746 self.remote_applications = remote_applications
1747
1748
1749 class HardwareCharacteristics(Type):
1750 _toSchema = {'arch': 'arch', 'availability_zone': 'availability-zone', 'cpu_cores': 'cpu-cores', 'cpu_power': 'cpu-power', 'mem': 'mem', 'root_disk': 'root-disk', 'tags': 'tags'}
1751 _toPy = {'arch': 'arch', 'availability-zone': 'availability_zone', 'cpu-cores': 'cpu_cores', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'tags': 'tags'}
1752 def __init__(self, arch=None, availability_zone=None, cpu_cores=None, cpu_power=None, mem=None, root_disk=None, tags=None):
1753 '''
1754 arch : str
1755 availability_zone : str
1756 cpu_cores : int
1757 cpu_power : int
1758 mem : int
1759 root_disk : int
1760 tags : typing.Sequence<+T_co>[str]
1761 '''
1762 self.arch = arch
1763 self.availability_zone = availability_zone
1764 self.cpu_cores = cpu_cores
1765 self.cpu_power = cpu_power
1766 self.mem = mem
1767 self.root_disk = root_disk
1768 self.tags = tags
1769
1770
1771 class History(Type):
1772 _toSchema = {'error': 'error', 'statuses': 'statuses'}
1773 _toPy = {'error': 'error', 'statuses': 'statuses'}
1774 def __init__(self, error=None, statuses=None):
1775 '''
1776 error : Error
1777 statuses : typing.Sequence<+T_co>[~DetailedStatus]<~DetailedStatus>
1778 '''
1779 self.error = Error.from_json(error) if error else None
1780 self.statuses = [DetailedStatus.from_json(o) for o in statuses or []]
1781
1782
1783 class HostPort(Type):
1784 _toSchema = {'address': 'Address', 'port': 'port'}
1785 _toPy = {'Address': 'address', 'port': 'port'}
1786 def __init__(self, address=None, port=None):
1787 '''
1788 address : Address
1789 port : int
1790 '''
1791 self.address = Address.from_json(address) if address else None
1792 self.port = port
1793
1794
1795 class MachineHardware(Type):
1796 _toSchema = {'arch': 'arch', 'availability_zone': 'availability-zone', 'cores': 'cores', 'cpu_power': 'cpu-power', 'mem': 'mem', 'root_disk': 'root-disk', 'tags': 'tags'}
1797 _toPy = {'arch': 'arch', 'availability-zone': 'availability_zone', 'cores': 'cores', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'tags': 'tags'}
1798 def __init__(self, arch=None, availability_zone=None, cores=None, cpu_power=None, mem=None, root_disk=None, tags=None):
1799 '''
1800 arch : str
1801 availability_zone : str
1802 cores : int
1803 cpu_power : int
1804 mem : int
1805 root_disk : int
1806 tags : typing.Sequence<+T_co>[str]
1807 '''
1808 self.arch = arch
1809 self.availability_zone = availability_zone
1810 self.cores = cores
1811 self.cpu_power = cpu_power
1812 self.mem = mem
1813 self.root_disk = root_disk
1814 self.tags = tags
1815
1816
1817 class MachineStatus(Type):
1818 _toSchema = {'agent_status': 'agent-status', 'containers': 'containers', 'dns_name': 'dns-name', 'hardware': 'hardware', 'has_vote': 'has-vote', 'id_': 'id', 'instance_id': 'instance-id', 'instance_status': 'instance-status', 'ip_addresses': 'ip-addresses', 'jobs': 'jobs', 'series': 'series', 'wants_vote': 'wants-vote'}
1819 _toPy = {'agent-status': 'agent_status', 'containers': 'containers', 'dns-name': 'dns_name', 'hardware': 'hardware', 'has-vote': 'has_vote', 'id': 'id_', 'instance-id': 'instance_id', 'instance-status': 'instance_status', 'ip-addresses': 'ip_addresses', 'jobs': 'jobs', 'series': 'series', 'wants-vote': 'wants_vote'}
1820 def __init__(self, agent_status=None, containers=None, dns_name=None, hardware=None, has_vote=None, id_=None, instance_id=None, instance_status=None, ip_addresses=None, jobs=None, series=None, wants_vote=None):
1821 '''
1822 agent_status : DetailedStatus
1823 containers : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>
1824 dns_name : str
1825 hardware : str
1826 has_vote : bool
1827 id_ : str
1828 instance_id : str
1829 instance_status : DetailedStatus
1830 ip_addresses : typing.Sequence<+T_co>[str]
1831 jobs : typing.Sequence<+T_co>[str]
1832 series : str
1833 wants_vote : bool
1834 '''
1835 self.agent_status = DetailedStatus.from_json(agent_status) if agent_status else None
1836 self.containers = containers
1837 self.dns_name = dns_name
1838 self.hardware = hardware
1839 self.has_vote = has_vote
1840 self.id_ = id_
1841 self.instance_id = instance_id
1842 self.instance_status = DetailedStatus.from_json(instance_status) if instance_status else None
1843 self.ip_addresses = ip_addresses
1844 self.jobs = jobs
1845 self.series = series
1846 self.wants_vote = wants_vote
1847
1848
1849 class MeterStatus(Type):
1850 _toSchema = {'color': 'color', 'message': 'message'}
1851 _toPy = {'color': 'color', 'message': 'message'}
1852 def __init__(self, color=None, message=None):
1853 '''
1854 color : str
1855 message : str
1856 '''
1857 self.color = color
1858 self.message = message
1859
1860
1861 class ModelConfigResults(Type):
1862 _toSchema = {'config': 'config'}
1863 _toPy = {'config': 'config'}
1864 def __init__(self, config=None):
1865 '''
1866 config : typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1867 '''
1868 self.config = config
1869
1870
1871 class ModelInfo(Type):
1872 _toSchema = {'cloud_credential_tag': 'cloud-credential-tag', 'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'controller_uuid': 'controller-uuid', 'default_series': 'default-series', 'life': 'life', 'machines': 'machines', 'name': 'name', 'owner_tag': 'owner-tag', 'provider_type': 'provider-type', 'status': 'status', 'users': 'users', 'uuid': 'uuid'}
1873 _toPy = {'cloud-credential-tag': 'cloud_credential_tag', 'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'controller-uuid': 'controller_uuid', 'default-series': 'default_series', 'life': 'life', 'machines': 'machines', 'name': 'name', 'owner-tag': 'owner_tag', 'provider-type': 'provider_type', 'status': 'status', 'users': 'users', 'uuid': 'uuid'}
1874 def __init__(self, cloud_credential_tag=None, cloud_region=None, cloud_tag=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):
1875 '''
1876 cloud_credential_tag : str
1877 cloud_region : str
1878 cloud_tag : str
1879 controller_uuid : str
1880 default_series : str
1881 life : str
1882 machines : typing.Sequence<+T_co>[~ModelMachineInfo]<~ModelMachineInfo>
1883 name : str
1884 owner_tag : str
1885 provider_type : str
1886 status : EntityStatus
1887 users : typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>
1888 uuid : str
1889 '''
1890 self.cloud_credential_tag = cloud_credential_tag
1891 self.cloud_region = cloud_region
1892 self.cloud_tag = cloud_tag
1893 self.controller_uuid = controller_uuid
1894 self.default_series = default_series
1895 self.life = life
1896 self.machines = [ModelMachineInfo.from_json(o) for o in machines or []]
1897 self.name = name
1898 self.owner_tag = owner_tag
1899 self.provider_type = provider_type
1900 self.status = EntityStatus.from_json(status) if status else None
1901 self.users = [ModelUserInfo.from_json(o) for o in users or []]
1902 self.uuid = uuid
1903
1904
1905 class ModelMachineInfo(Type):
1906 _toSchema = {'hardware': 'hardware', 'has_vote': 'has-vote', 'id_': 'id', 'instance_id': 'instance-id', 'status': 'status', 'wants_vote': 'wants-vote'}
1907 _toPy = {'hardware': 'hardware', 'has-vote': 'has_vote', 'id': 'id_', 'instance-id': 'instance_id', 'status': 'status', 'wants-vote': 'wants_vote'}
1908 def __init__(self, hardware=None, has_vote=None, id_=None, instance_id=None, status=None, wants_vote=None):
1909 '''
1910 hardware : MachineHardware
1911 has_vote : bool
1912 id_ : str
1913 instance_id : str
1914 status : str
1915 wants_vote : bool
1916 '''
1917 self.hardware = MachineHardware.from_json(hardware) if hardware else None
1918 self.has_vote = has_vote
1919 self.id_ = id_
1920 self.instance_id = instance_id
1921 self.status = status
1922 self.wants_vote = wants_vote
1923
1924
1925 class ModelSet(Type):
1926 _toSchema = {'config': 'config'}
1927 _toPy = {'config': 'config'}
1928 def __init__(self, config=None):
1929 '''
1930 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1931 '''
1932 self.config = config
1933
1934
1935 class ModelStatusInfo(Type):
1936 _toSchema = {'available_version': 'available-version', 'cloud_tag': 'cloud-tag', 'migration': 'migration', 'name': 'name', 'region': 'region', 'version': 'version'}
1937 _toPy = {'available-version': 'available_version', 'cloud-tag': 'cloud_tag', 'migration': 'migration', 'name': 'name', 'region': 'region', 'version': 'version'}
1938 def __init__(self, available_version=None, cloud_tag=None, migration=None, name=None, region=None, version=None):
1939 '''
1940 available_version : str
1941 cloud_tag : str
1942 migration : str
1943 name : str
1944 region : str
1945 version : str
1946 '''
1947 self.available_version = available_version
1948 self.cloud_tag = cloud_tag
1949 self.migration = migration
1950 self.name = name
1951 self.region = region
1952 self.version = version
1953
1954
1955 class ModelUnset(Type):
1956 _toSchema = {'keys': 'keys'}
1957 _toPy = {'keys': 'keys'}
1958 def __init__(self, keys=None):
1959 '''
1960 keys : typing.Sequence<+T_co>[str]
1961 '''
1962 self.keys = keys
1963
1964
1965 class ModelUserInfo(Type):
1966 _toSchema = {'access': 'access', 'display_name': 'display-name', 'last_connection': 'last-connection', 'user': 'user'}
1967 _toPy = {'access': 'access', 'display-name': 'display_name', 'last-connection': 'last_connection', 'user': 'user'}
1968 def __init__(self, access=None, display_name=None, last_connection=None, user=None):
1969 '''
1970 access : str
1971 display_name : str
1972 last_connection : str
1973 user : str
1974 '''
1975 self.access = access
1976 self.display_name = display_name
1977 self.last_connection = last_connection
1978 self.user = user
1979
1980
1981 class ModelUserInfoResult(Type):
1982 _toSchema = {'error': 'error', 'result': 'result'}
1983 _toPy = {'error': 'error', 'result': 'result'}
1984 def __init__(self, error=None, result=None):
1985 '''
1986 error : Error
1987 result : ModelUserInfo
1988 '''
1989 self.error = Error.from_json(error) if error else None
1990 self.result = ModelUserInfo.from_json(result) if result else None
1991
1992
1993 class ModelUserInfoResults(Type):
1994 _toSchema = {'results': 'results'}
1995 _toPy = {'results': 'results'}
1996 def __init__(self, results=None):
1997 '''
1998 results : typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
1999 '''
2000 self.results = [ModelUserInfoResult.from_json(o) for o in results or []]
2001
2002
2003 class PrivateAddress(Type):
2004 _toSchema = {'target': 'target'}
2005 _toPy = {'target': 'target'}
2006 def __init__(self, target=None):
2007 '''
2008 target : str
2009 '''
2010 self.target = target
2011
2012
2013 class PrivateAddressResults(Type):
2014 _toSchema = {'private_address': 'private-address'}
2015 _toPy = {'private-address': 'private_address'}
2016 def __init__(self, private_address=None):
2017 '''
2018 private_address : str
2019 '''
2020 self.private_address = private_address
2021
2022
2023 class ProvisioningScriptParams(Type):
2024 _toSchema = {'data_dir': 'data-dir', 'disable_package_commands': 'disable-package-commands', 'machine_id': 'machine-id', 'nonce': 'nonce'}
2025 _toPy = {'data-dir': 'data_dir', 'disable-package-commands': 'disable_package_commands', 'machine-id': 'machine_id', 'nonce': 'nonce'}
2026 def __init__(self, data_dir=None, disable_package_commands=None, machine_id=None, nonce=None):
2027 '''
2028 data_dir : str
2029 disable_package_commands : bool
2030 machine_id : str
2031 nonce : str
2032 '''
2033 self.data_dir = data_dir
2034 self.disable_package_commands = disable_package_commands
2035 self.machine_id = machine_id
2036 self.nonce = nonce
2037
2038
2039 class ProvisioningScriptResult(Type):
2040 _toSchema = {'script': 'script'}
2041 _toPy = {'script': 'script'}
2042 def __init__(self, script=None):
2043 '''
2044 script : str
2045 '''
2046 self.script = script
2047
2048
2049 class PublicAddress(Type):
2050 _toSchema = {'target': 'target'}
2051 _toPy = {'target': 'target'}
2052 def __init__(self, target=None):
2053 '''
2054 target : str
2055 '''
2056 self.target = target
2057
2058
2059 class PublicAddressResults(Type):
2060 _toSchema = {'public_address': 'public-address'}
2061 _toPy = {'public-address': 'public_address'}
2062 def __init__(self, public_address=None):
2063 '''
2064 public_address : str
2065 '''
2066 self.public_address = public_address
2067
2068
2069 class RelationStatus(Type):
2070 _toSchema = {'endpoints': 'endpoints', 'id_': 'id', 'interface': 'interface', 'key': 'key', 'scope': 'scope'}
2071 _toPy = {'endpoints': 'endpoints', 'id': 'id_', 'interface': 'interface', 'key': 'key', 'scope': 'scope'}
2072 def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None):
2073 '''
2074 endpoints : typing.Sequence<+T_co>[~EndpointStatus]<~EndpointStatus>
2075 id_ : int
2076 interface : str
2077 key : str
2078 scope : str
2079 '''
2080 self.endpoints = [EndpointStatus.from_json(o) for o in endpoints or []]
2081 self.id_ = id_
2082 self.interface = interface
2083 self.key = key
2084 self.scope = scope
2085
2086
2087 class RemoteApplicationStatus(Type):
2088 _toSchema = {'application_name': 'application-name', 'application_url': 'application-url', 'endpoints': 'endpoints', 'err': 'err', 'life': 'life', 'relations': 'relations', 'status': 'status'}
2089 _toPy = {'application-name': 'application_name', 'application-url': 'application_url', 'endpoints': 'endpoints', 'err': 'err', 'life': 'life', 'relations': 'relations', 'status': 'status'}
2090 def __init__(self, application_name=None, application_url=None, endpoints=None, err=None, life=None, relations=None, status=None):
2091 '''
2092 application_name : str
2093 application_url : str
2094 endpoints : typing.Sequence<+T_co>[~RemoteEndpoint]<~RemoteEndpoint>
2095 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2096 life : str
2097 relations : typing.Sequence<+T_co>[str]
2098 status : DetailedStatus
2099 '''
2100 self.application_name = application_name
2101 self.application_url = application_url
2102 self.endpoints = [RemoteEndpoint.from_json(o) for o in endpoints or []]
2103 self.err = err
2104 self.life = life
2105 self.relations = relations
2106 self.status = DetailedStatus.from_json(status) if status else None
2107
2108
2109 class RemoteEndpoint(Type):
2110 _toSchema = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'role': 'role', 'scope': 'scope'}
2111 _toPy = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'role': 'role', 'scope': 'scope'}
2112 def __init__(self, interface=None, limit=None, name=None, role=None, scope=None):
2113 '''
2114 interface : str
2115 limit : int
2116 name : str
2117 role : str
2118 scope : str
2119 '''
2120 self.interface = interface
2121 self.limit = limit
2122 self.name = name
2123 self.role = role
2124 self.scope = scope
2125
2126
2127 class ResolveCharmResult(Type):
2128 _toSchema = {'error': 'error', 'url': 'url'}
2129 _toPy = {'error': 'error', 'url': 'url'}
2130 def __init__(self, error=None, url=None):
2131 '''
2132 error : str
2133 url : str
2134 '''
2135 self.error = error
2136 self.url = url
2137
2138
2139 class ResolveCharmResults(Type):
2140 _toSchema = {'urls': 'urls'}
2141 _toPy = {'urls': 'urls'}
2142 def __init__(self, urls=None):
2143 '''
2144 urls : typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
2145 '''
2146 self.urls = [ResolveCharmResult.from_json(o) for o in urls or []]
2147
2148
2149 class ResolveCharms(Type):
2150 _toSchema = {'references': 'references'}
2151 _toPy = {'references': 'references'}
2152 def __init__(self, references=None):
2153 '''
2154 references : typing.Sequence<+T_co>[str]
2155 '''
2156 self.references = references
2157
2158
2159 class Resolved(Type):
2160 _toSchema = {'retry': 'retry', 'unit_name': 'unit-name'}
2161 _toPy = {'retry': 'retry', 'unit-name': 'unit_name'}
2162 def __init__(self, retry=None, unit_name=None):
2163 '''
2164 retry : bool
2165 unit_name : str
2166 '''
2167 self.retry = retry
2168 self.unit_name = unit_name
2169
2170
2171 class SetModelAgentVersion(Type):
2172 _toSchema = {'version': 'version'}
2173 _toPy = {'version': 'version'}
2174 def __init__(self, version=None):
2175 '''
2176 version : Number
2177 '''
2178 self.version = Number.from_json(version) if version else None
2179
2180
2181 class StatusHistoryFilter(Type):
2182 _toSchema = {'date': 'date', 'delta': 'delta', 'size': 'size'}
2183 _toPy = {'date': 'date', 'delta': 'delta', 'size': 'size'}
2184 def __init__(self, date=None, delta=None, size=None):
2185 '''
2186 date : str
2187 delta : int
2188 size : int
2189 '''
2190 self.date = date
2191 self.delta = delta
2192 self.size = size
2193
2194
2195 class StatusHistoryRequest(Type):
2196 _toSchema = {'filter_': 'filter', 'historykind': 'historyKind', 'size': 'size', 'tag': 'tag'}
2197 _toPy = {'filter': 'filter_', 'historyKind': 'historykind', 'size': 'size', 'tag': 'tag'}
2198 def __init__(self, filter_=None, historykind=None, size=None, tag=None):
2199 '''
2200 filter_ : StatusHistoryFilter
2201 historykind : str
2202 size : int
2203 tag : str
2204 '''
2205 self.filter_ = StatusHistoryFilter.from_json(filter_) if filter_ else None
2206 self.historykind = historykind
2207 self.size = size
2208 self.tag = tag
2209
2210
2211 class StatusHistoryRequests(Type):
2212 _toSchema = {'requests': 'requests'}
2213 _toPy = {'requests': 'requests'}
2214 def __init__(self, requests=None):
2215 '''
2216 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
2217 '''
2218 self.requests = [StatusHistoryRequest.from_json(o) for o in requests or []]
2219
2220
2221 class StatusHistoryResult(Type):
2222 _toSchema = {'error': 'error', 'history': 'history'}
2223 _toPy = {'error': 'error', 'history': 'history'}
2224 def __init__(self, error=None, history=None):
2225 '''
2226 error : Error
2227 history : History
2228 '''
2229 self.error = Error.from_json(error) if error else None
2230 self.history = History.from_json(history) if history else None
2231
2232
2233 class StatusHistoryResults(Type):
2234 _toSchema = {'results': 'results'}
2235 _toPy = {'results': 'results'}
2236 def __init__(self, results=None):
2237 '''
2238 results : typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
2239 '''
2240 self.results = [StatusHistoryResult.from_json(o) for o in results or []]
2241
2242
2243 class StatusParams(Type):
2244 _toSchema = {'patterns': 'patterns'}
2245 _toPy = {'patterns': 'patterns'}
2246 def __init__(self, patterns=None):
2247 '''
2248 patterns : typing.Sequence<+T_co>[str]
2249 '''
2250 self.patterns = patterns
2251
2252
2253 class Tools(Type):
2254 _toSchema = {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'}
2255 _toPy = {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'}
2256 def __init__(self, sha256=None, size=None, url=None, version=None):
2257 '''
2258 sha256 : str
2259 size : int
2260 url : str
2261 version : Binary
2262 '''
2263 self.sha256 = sha256
2264 self.size = size
2265 self.url = url
2266 self.version = Binary.from_json(version) if version else None
2267
2268
2269 class UnitStatus(Type):
2270 _toSchema = {'agent_status': 'agent-status', 'charm': 'charm', 'leader': 'leader', 'machine': 'machine', 'opened_ports': 'opened-ports', 'public_address': 'public-address', 'subordinates': 'subordinates', 'workload_status': 'workload-status', 'workload_version': 'workload-version'}
2271 _toPy = {'agent-status': 'agent_status', 'charm': 'charm', 'leader': 'leader', 'machine': 'machine', 'opened-ports': 'opened_ports', 'public-address': 'public_address', 'subordinates': 'subordinates', 'workload-status': 'workload_status', 'workload-version': 'workload_version'}
2272 def __init__(self, agent_status=None, charm=None, leader=None, machine=None, opened_ports=None, public_address=None, subordinates=None, workload_status=None, workload_version=None):
2273 '''
2274 agent_status : DetailedStatus
2275 charm : str
2276 leader : bool
2277 machine : str
2278 opened_ports : typing.Sequence<+T_co>[str]
2279 public_address : str
2280 subordinates : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus>
2281 workload_status : DetailedStatus
2282 workload_version : str
2283 '''
2284 self.agent_status = DetailedStatus.from_json(agent_status) if agent_status else None
2285 self.charm = charm
2286 self.leader = leader
2287 self.machine = machine
2288 self.opened_ports = opened_ports
2289 self.public_address = public_address
2290 self.subordinates = subordinates
2291 self.workload_status = DetailedStatus.from_json(workload_status) if workload_status else None
2292 self.workload_version = workload_version
2293
2294
2295 class Cloud(Type):
2296 _toSchema = {'auth_types': 'auth-types', 'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'regions': 'regions', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'}
2297 _toPy = {'auth-types': 'auth_types', 'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'regions': 'regions', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'}
2298 def __init__(self, auth_types=None, endpoint=None, identity_endpoint=None, regions=None, storage_endpoint=None, type_=None):
2299 '''
2300 auth_types : typing.Sequence<+T_co>[str]
2301 endpoint : str
2302 identity_endpoint : str
2303 regions : typing.Sequence<+T_co>[~CloudRegion]<~CloudRegion>
2304 storage_endpoint : str
2305 type_ : str
2306 '''
2307 self.auth_types = auth_types
2308 self.endpoint = endpoint
2309 self.identity_endpoint = identity_endpoint
2310 self.regions = [CloudRegion.from_json(o) for o in regions or []]
2311 self.storage_endpoint = storage_endpoint
2312 self.type_ = type_
2313
2314
2315 class CloudCredentialResult(Type):
2316 _toSchema = {'error': 'error', 'result': 'result'}
2317 _toPy = {'error': 'error', 'result': 'result'}
2318 def __init__(self, error=None, result=None):
2319 '''
2320 error : Error
2321 result : CloudCredential
2322 '''
2323 self.error = Error.from_json(error) if error else None
2324 self.result = CloudCredential.from_json(result) if result else None
2325
2326
2327 class CloudCredentialResults(Type):
2328 _toSchema = {'results': 'results'}
2329 _toPy = {'results': 'results'}
2330 def __init__(self, results=None):
2331 '''
2332 results : typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
2333 '''
2334 self.results = [CloudCredentialResult.from_json(o) for o in results or []]
2335
2336
2337 class CloudRegion(Type):
2338 _toSchema = {'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'name': 'name', 'storage_endpoint': 'storage-endpoint'}
2339 _toPy = {'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'storage-endpoint': 'storage_endpoint'}
2340 def __init__(self, endpoint=None, identity_endpoint=None, name=None, storage_endpoint=None):
2341 '''
2342 endpoint : str
2343 identity_endpoint : str
2344 name : str
2345 storage_endpoint : str
2346 '''
2347 self.endpoint = endpoint
2348 self.identity_endpoint = identity_endpoint
2349 self.name = name
2350 self.storage_endpoint = storage_endpoint
2351
2352
2353 class CloudResult(Type):
2354 _toSchema = {'cloud': 'cloud', 'error': 'error'}
2355 _toPy = {'cloud': 'cloud', 'error': 'error'}
2356 def __init__(self, cloud=None, error=None):
2357 '''
2358 cloud : Cloud
2359 error : Error
2360 '''
2361 self.cloud = Cloud.from_json(cloud) if cloud else None
2362 self.error = Error.from_json(error) if error else None
2363
2364
2365 class CloudResults(Type):
2366 _toSchema = {'results': 'results'}
2367 _toPy = {'results': 'results'}
2368 def __init__(self, results=None):
2369 '''
2370 results : typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
2371 '''
2372 self.results = [CloudResult.from_json(o) for o in results or []]
2373
2374
2375 class CloudsResult(Type):
2376 _toSchema = {'clouds': 'clouds'}
2377 _toPy = {'clouds': 'clouds'}
2378 def __init__(self, clouds=None):
2379 '''
2380 clouds : typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
2381 '''
2382 self.clouds = clouds
2383
2384
2385 class StringsResult(Type):
2386 _toSchema = {'error': 'error', 'result': 'result'}
2387 _toPy = {'error': 'error', 'result': 'result'}
2388 def __init__(self, error=None, result=None):
2389 '''
2390 error : Error
2391 result : typing.Sequence<+T_co>[str]
2392 '''
2393 self.error = Error.from_json(error) if error else None
2394 self.result = result
2395
2396
2397 class StringsResults(Type):
2398 _toSchema = {'results': 'results'}
2399 _toPy = {'results': 'results'}
2400 def __init__(self, results=None):
2401 '''
2402 results : typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2403 '''
2404 self.results = [StringsResult.from_json(o) for o in results or []]
2405
2406
2407 class UpdateCloudCredential(Type):
2408 _toSchema = {'credential': 'credential', 'tag': 'tag'}
2409 _toPy = {'credential': 'credential', 'tag': 'tag'}
2410 def __init__(self, credential=None, tag=None):
2411 '''
2412 credential : CloudCredential
2413 tag : str
2414 '''
2415 self.credential = CloudCredential.from_json(credential) if credential else None
2416 self.tag = tag
2417
2418
2419 class UpdateCloudCredentials(Type):
2420 _toSchema = {'credentials': 'credentials'}
2421 _toPy = {'credentials': 'credentials'}
2422 def __init__(self, credentials=None):
2423 '''
2424 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
2425 '''
2426 self.credentials = [UpdateCloudCredential.from_json(o) for o in credentials or []]
2427
2428
2429 class UserCloud(Type):
2430 _toSchema = {'cloud_tag': 'cloud-tag', 'user_tag': 'user-tag'}
2431 _toPy = {'cloud-tag': 'cloud_tag', 'user-tag': 'user_tag'}
2432 def __init__(self, cloud_tag=None, user_tag=None):
2433 '''
2434 cloud_tag : str
2435 user_tag : str
2436 '''
2437 self.cloud_tag = cloud_tag
2438 self.user_tag = user_tag
2439
2440
2441 class UserClouds(Type):
2442 _toSchema = {'user_clouds': 'user-clouds'}
2443 _toPy = {'user-clouds': 'user_clouds'}
2444 def __init__(self, user_clouds=None):
2445 '''
2446 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
2447 '''
2448 self.user_clouds = [UserCloud.from_json(o) for o in user_clouds or []]
2449
2450
2451 class DestroyControllerArgs(Type):
2452 _toSchema = {'destroy_models': 'destroy-models'}
2453 _toPy = {'destroy-models': 'destroy_models'}
2454 def __init__(self, destroy_models=None):
2455 '''
2456 destroy_models : bool
2457 '''
2458 self.destroy_models = destroy_models
2459
2460
2461 class HostedModelConfig(Type):
2462 _toSchema = {'cloud_spec': 'cloud-spec', 'config': 'config', 'error': 'error', 'name': 'name', 'owner': 'owner'}
2463 _toPy = {'cloud-spec': 'cloud_spec', 'config': 'config', 'error': 'error', 'name': 'name', 'owner': 'owner'}
2464 def __init__(self, cloud_spec=None, config=None, error=None, name=None, owner=None):
2465 '''
2466 cloud_spec : CloudSpec
2467 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2468 error : Error
2469 name : str
2470 owner : str
2471 '''
2472 self.cloud_spec = CloudSpec.from_json(cloud_spec) if cloud_spec else None
2473 self.config = config
2474 self.error = Error.from_json(error) if error else None
2475 self.name = name
2476 self.owner = owner
2477
2478
2479 class HostedModelConfigsResults(Type):
2480 _toSchema = {'models': 'models'}
2481 _toPy = {'models': 'models'}
2482 def __init__(self, models=None):
2483 '''
2484 models : typing.Sequence<+T_co>[~HostedModelConfig]<~HostedModelConfig>
2485 '''
2486 self.models = [HostedModelConfig.from_json(o) for o in models or []]
2487
2488
2489 class InitiateMigrationArgs(Type):
2490 _toSchema = {'specs': 'specs'}
2491 _toPy = {'specs': 'specs'}
2492 def __init__(self, specs=None):
2493 '''
2494 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
2495 '''
2496 self.specs = [MigrationSpec.from_json(o) for o in specs or []]
2497
2498
2499 class InitiateMigrationResult(Type):
2500 _toSchema = {'error': 'error', 'migration_id': 'migration-id', 'model_tag': 'model-tag'}
2501 _toPy = {'error': 'error', 'migration-id': 'migration_id', 'model-tag': 'model_tag'}
2502 def __init__(self, error=None, migration_id=None, model_tag=None):
2503 '''
2504 error : Error
2505 migration_id : str
2506 model_tag : str
2507 '''
2508 self.error = Error.from_json(error) if error else None
2509 self.migration_id = migration_id
2510 self.model_tag = model_tag
2511
2512
2513 class InitiateMigrationResults(Type):
2514 _toSchema = {'results': 'results'}
2515 _toPy = {'results': 'results'}
2516 def __init__(self, results=None):
2517 '''
2518 results : typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
2519 '''
2520 self.results = [InitiateMigrationResult.from_json(o) for o in results or []]
2521
2522
2523 class MigrationSpec(Type):
2524 _toSchema = {'external_control': 'external-control', 'model_tag': 'model-tag', 'skip_initial_prechecks': 'skip-initial-prechecks', 'target_info': 'target-info'}
2525 _toPy = {'external-control': 'external_control', 'model-tag': 'model_tag', 'skip-initial-prechecks': 'skip_initial_prechecks', 'target-info': 'target_info'}
2526 def __init__(self, external_control=None, model_tag=None, skip_initial_prechecks=None, target_info=None):
2527 '''
2528 external_control : bool
2529 model_tag : str
2530 skip_initial_prechecks : bool
2531 target_info : MigrationTargetInfo
2532 '''
2533 self.external_control = external_control
2534 self.model_tag = model_tag
2535 self.skip_initial_prechecks = skip_initial_prechecks
2536 self.target_info = MigrationTargetInfo.from_json(target_info) if target_info else None
2537
2538
2539 class MigrationTargetInfo(Type):
2540 _toSchema = {'addrs': 'addrs', 'auth_tag': 'auth-tag', 'ca_cert': 'ca-cert', 'controller_tag': 'controller-tag', 'macaroons': 'macaroons', 'password': 'password'}
2541 _toPy = {'addrs': 'addrs', 'auth-tag': 'auth_tag', 'ca-cert': 'ca_cert', 'controller-tag': 'controller_tag', 'macaroons': 'macaroons', 'password': 'password'}
2542 def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_tag=None, macaroons=None, password=None):
2543 '''
2544 addrs : typing.Sequence<+T_co>[str]
2545 auth_tag : str
2546 ca_cert : str
2547 controller_tag : str
2548 macaroons : str
2549 password : str
2550 '''
2551 self.addrs = addrs
2552 self.auth_tag = auth_tag
2553 self.ca_cert = ca_cert
2554 self.controller_tag = controller_tag
2555 self.macaroons = macaroons
2556 self.password = password
2557
2558
2559 class Model(Type):
2560 _toSchema = {'name': 'name', 'owner_tag': 'owner-tag', 'uuid': 'uuid'}
2561 _toPy = {'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'}
2562 def __init__(self, name=None, owner_tag=None, uuid=None):
2563 '''
2564 name : str
2565 owner_tag : str
2566 uuid : str
2567 '''
2568 self.name = name
2569 self.owner_tag = owner_tag
2570 self.uuid = uuid
2571
2572
2573 class ModelBlockInfo(Type):
2574 _toSchema = {'blocks': 'blocks', 'model_uuid': 'model-uuid', 'name': 'name', 'owner_tag': 'owner-tag'}
2575 _toPy = {'blocks': 'blocks', 'model-uuid': 'model_uuid', 'name': 'name', 'owner-tag': 'owner_tag'}
2576 def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None):
2577 '''
2578 blocks : typing.Sequence<+T_co>[str]
2579 model_uuid : str
2580 name : str
2581 owner_tag : str
2582 '''
2583 self.blocks = blocks
2584 self.model_uuid = model_uuid
2585 self.name = name
2586 self.owner_tag = owner_tag
2587
2588
2589 class ModelBlockInfoList(Type):
2590 _toSchema = {'models': 'models'}
2591 _toPy = {'models': 'models'}
2592 def __init__(self, models=None):
2593 '''
2594 models : typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
2595 '''
2596 self.models = [ModelBlockInfo.from_json(o) for o in models or []]
2597
2598
2599 class ModelStatus(Type):
2600 _toSchema = {'application_count': 'application-count', 'hosted_machine_count': 'hosted-machine-count', 'life': 'life', 'machines': 'machines', 'model_tag': 'model-tag', 'owner_tag': 'owner-tag'}
2601 _toPy = {'application-count': 'application_count', 'hosted-machine-count': 'hosted_machine_count', 'life': 'life', 'machines': 'machines', 'model-tag': 'model_tag', 'owner-tag': 'owner_tag'}
2602 def __init__(self, application_count=None, hosted_machine_count=None, life=None, machines=None, model_tag=None, owner_tag=None):
2603 '''
2604 application_count : int
2605 hosted_machine_count : int
2606 life : str
2607 machines : typing.Sequence<+T_co>[~ModelMachineInfo]<~ModelMachineInfo>
2608 model_tag : str
2609 owner_tag : str
2610 '''
2611 self.application_count = application_count
2612 self.hosted_machine_count = hosted_machine_count
2613 self.life = life
2614 self.machines = [ModelMachineInfo.from_json(o) for o in machines or []]
2615 self.model_tag = model_tag
2616 self.owner_tag = owner_tag
2617
2618
2619 class ModelStatusResults(Type):
2620 _toSchema = {'models': 'models'}
2621 _toPy = {'models': 'models'}
2622 def __init__(self, models=None):
2623 '''
2624 models : typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
2625 '''
2626 self.models = [ModelStatus.from_json(o) for o in models or []]
2627
2628
2629 class ModifyControllerAccess(Type):
2630 _toSchema = {'access': 'access', 'action': 'action', 'user_tag': 'user-tag'}
2631 _toPy = {'access': 'access', 'action': 'action', 'user-tag': 'user_tag'}
2632 def __init__(self, access=None, action=None, user_tag=None):
2633 '''
2634 access : str
2635 action : str
2636 user_tag : str
2637 '''
2638 self.access = access
2639 self.action = action
2640 self.user_tag = user_tag
2641
2642
2643 class ModifyControllerAccessRequest(Type):
2644 _toSchema = {'changes': 'changes'}
2645 _toPy = {'changes': 'changes'}
2646 def __init__(self, changes=None):
2647 '''
2648 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
2649 '''
2650 self.changes = [ModifyControllerAccess.from_json(o) for o in changes or []]
2651
2652
2653 class RemoveBlocksArgs(Type):
2654 _toSchema = {'all_': 'all'}
2655 _toPy = {'all': 'all_'}
2656 def __init__(self, all_=None):
2657 '''
2658 all_ : bool
2659 '''
2660 self.all_ = all_
2661
2662
2663 class UserAccess(Type):
2664 _toSchema = {'access': 'access', 'user_tag': 'user-tag'}
2665 _toPy = {'access': 'access', 'user-tag': 'user_tag'}
2666 def __init__(self, access=None, user_tag=None):
2667 '''
2668 access : str
2669 user_tag : str
2670 '''
2671 self.access = access
2672 self.user_tag = user_tag
2673
2674
2675 class UserAccessResult(Type):
2676 _toSchema = {'error': 'error', 'result': 'result'}
2677 _toPy = {'error': 'error', 'result': 'result'}
2678 def __init__(self, error=None, result=None):
2679 '''
2680 error : Error
2681 result : UserAccess
2682 '''
2683 self.error = Error.from_json(error) if error else None
2684 self.result = UserAccess.from_json(result) if result else None
2685
2686
2687 class UserAccessResults(Type):
2688 _toSchema = {'results': 'results'}
2689 _toPy = {'results': 'results'}
2690 def __init__(self, results=None):
2691 '''
2692 results : typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
2693 '''
2694 self.results = [UserAccessResult.from_json(o) for o in results or []]
2695
2696
2697 class UserModel(Type):
2698 _toSchema = {'last_connection': 'last-connection', 'model': 'model'}
2699 _toPy = {'last-connection': 'last_connection', 'model': 'model'}
2700 def __init__(self, last_connection=None, model=None):
2701 '''
2702 last_connection : str
2703 model : Model
2704 '''
2705 self.last_connection = last_connection
2706 self.model = Model.from_json(model) if model else None
2707
2708
2709 class UserModelList(Type):
2710 _toSchema = {'user_models': 'user-models'}
2711 _toPy = {'user-models': 'user_models'}
2712 def __init__(self, user_models=None):
2713 '''
2714 user_models : typing.Sequence<+T_co>[~UserModel]<~UserModel>
2715 '''
2716 self.user_models = [UserModel.from_json(o) for o in user_models or []]
2717
2718
2719 class BytesResult(Type):
2720 _toSchema = {'result': 'result'}
2721 _toPy = {'result': 'result'}
2722 def __init__(self, result=None):
2723 '''
2724 result : typing.Sequence<+T_co>[int]
2725 '''
2726 self.result = result
2727
2728
2729 class DeployerConnectionValues(Type):
2730 _toSchema = {'api_addresses': 'api-addresses', 'state_addresses': 'state-addresses'}
2731 _toPy = {'api-addresses': 'api_addresses', 'state-addresses': 'state_addresses'}
2732 def __init__(self, api_addresses=None, state_addresses=None):
2733 '''
2734 api_addresses : typing.Sequence<+T_co>[str]
2735 state_addresses : typing.Sequence<+T_co>[str]
2736 '''
2737 self.api_addresses = api_addresses
2738 self.state_addresses = state_addresses
2739
2740
2741 class EntityStatusArgs(Type):
2742 _toSchema = {'data': 'data', 'info': 'info', 'status': 'status', 'tag': 'tag'}
2743 _toPy = {'data': 'data', 'info': 'info', 'status': 'status', 'tag': 'tag'}
2744 def __init__(self, data=None, info=None, status=None, tag=None):
2745 '''
2746 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2747 info : str
2748 status : str
2749 tag : str
2750 '''
2751 self.data = data
2752 self.info = info
2753 self.status = status
2754 self.tag = tag
2755
2756
2757 class LifeResult(Type):
2758 _toSchema = {'error': 'error', 'life': 'life'}
2759 _toPy = {'error': 'error', 'life': 'life'}
2760 def __init__(self, error=None, life=None):
2761 '''
2762 error : Error
2763 life : str
2764 '''
2765 self.error = Error.from_json(error) if error else None
2766 self.life = life
2767
2768
2769 class LifeResults(Type):
2770 _toSchema = {'results': 'results'}
2771 _toPy = {'results': 'results'}
2772 def __init__(self, results=None):
2773 '''
2774 results : typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2775 '''
2776 self.results = [LifeResult.from_json(o) for o in results or []]
2777
2778
2779 class SetStatus(Type):
2780 _toSchema = {'entities': 'entities'}
2781 _toPy = {'entities': 'entities'}
2782 def __init__(self, entities=None):
2783 '''
2784 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2785 '''
2786 self.entities = [EntityStatusArgs.from_json(o) for o in entities or []]
2787
2788
2789 class StringsWatchResults(Type):
2790 _toSchema = {'results': 'results'}
2791 _toPy = {'results': 'results'}
2792 def __init__(self, results=None):
2793 '''
2794 results : typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
2795 '''
2796 self.results = [StringsWatchResult.from_json(o) for o in results or []]
2797
2798
2799 class AddSubnetParams(Type):
2800 _toSchema = {'space_tag': 'space-tag', 'subnet_provider_id': 'subnet-provider-id', 'subnet_tag': 'subnet-tag', 'zones': 'zones'}
2801 _toPy = {'space-tag': 'space_tag', 'subnet-provider-id': 'subnet_provider_id', 'subnet-tag': 'subnet_tag', 'zones': 'zones'}
2802 def __init__(self, space_tag=None, subnet_provider_id=None, subnet_tag=None, zones=None):
2803 '''
2804 space_tag : str
2805 subnet_provider_id : str
2806 subnet_tag : str
2807 zones : typing.Sequence<+T_co>[str]
2808 '''
2809 self.space_tag = space_tag
2810 self.subnet_provider_id = subnet_provider_id
2811 self.subnet_tag = subnet_tag
2812 self.zones = zones
2813
2814
2815 class AddSubnetsParams(Type):
2816 _toSchema = {'subnets': 'subnets'}
2817 _toPy = {'subnets': 'subnets'}
2818 def __init__(self, subnets=None):
2819 '''
2820 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
2821 '''
2822 self.subnets = [AddSubnetParams.from_json(o) for o in subnets or []]
2823
2824
2825 class CreateSpaceParams(Type):
2826 _toSchema = {'provider_id': 'provider-id', 'public': 'public', 'space_tag': 'space-tag', 'subnet_tags': 'subnet-tags'}
2827 _toPy = {'provider-id': 'provider_id', 'public': 'public', 'space-tag': 'space_tag', 'subnet-tags': 'subnet_tags'}
2828 def __init__(self, provider_id=None, public=None, space_tag=None, subnet_tags=None):
2829 '''
2830 provider_id : str
2831 public : bool
2832 space_tag : str
2833 subnet_tags : typing.Sequence<+T_co>[str]
2834 '''
2835 self.provider_id = provider_id
2836 self.public = public
2837 self.space_tag = space_tag
2838 self.subnet_tags = subnet_tags
2839
2840
2841 class CreateSpacesParams(Type):
2842 _toSchema = {'spaces': 'spaces'}
2843 _toPy = {'spaces': 'spaces'}
2844 def __init__(self, spaces=None):
2845 '''
2846 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
2847 '''
2848 self.spaces = [CreateSpaceParams.from_json(o) for o in spaces or []]
2849
2850
2851 class DiscoverSpacesResults(Type):
2852 _toSchema = {'results': 'results'}
2853 _toPy = {'results': 'results'}
2854 def __init__(self, results=None):
2855 '''
2856 results : typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
2857 '''
2858 self.results = [ProviderSpace.from_json(o) for o in results or []]
2859
2860
2861 class ListSubnetsResults(Type):
2862 _toSchema = {'results': 'results'}
2863 _toPy = {'results': 'results'}
2864 def __init__(self, results=None):
2865 '''
2866 results : typing.Sequence<+T_co>[~Subnet]<~Subnet>
2867 '''
2868 self.results = [Subnet.from_json(o) for o in results or []]
2869
2870
2871 class ProviderSpace(Type):
2872 _toSchema = {'error': 'error', 'name': 'name', 'provider_id': 'provider-id', 'subnets': 'subnets'}
2873 _toPy = {'error': 'error', 'name': 'name', 'provider-id': 'provider_id', 'subnets': 'subnets'}
2874 def __init__(self, error=None, name=None, provider_id=None, subnets=None):
2875 '''
2876 error : Error
2877 name : str
2878 provider_id : str
2879 subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet>
2880 '''
2881 self.error = Error.from_json(error) if error else None
2882 self.name = name
2883 self.provider_id = provider_id
2884 self.subnets = [Subnet.from_json(o) for o in subnets or []]
2885
2886
2887 class Subnet(Type):
2888 _toSchema = {'cidr': 'cidr', 'life': 'life', 'provider_id': 'provider-id', 'space_tag': 'space-tag', 'status': 'status', 'vlan_tag': 'vlan-tag', 'zones': 'zones'}
2889 _toPy = {'cidr': 'cidr', 'life': 'life', 'provider-id': 'provider_id', 'space-tag': 'space_tag', 'status': 'status', 'vlan-tag': 'vlan_tag', 'zones': 'zones'}
2890 def __init__(self, cidr=None, life=None, provider_id=None, space_tag=None, status=None, vlan_tag=None, zones=None):
2891 '''
2892 cidr : str
2893 life : str
2894 provider_id : str
2895 space_tag : str
2896 status : str
2897 vlan_tag : int
2898 zones : typing.Sequence<+T_co>[str]
2899 '''
2900 self.cidr = cidr
2901 self.life = life
2902 self.provider_id = provider_id
2903 self.space_tag = space_tag
2904 self.status = status
2905 self.vlan_tag = vlan_tag
2906 self.zones = zones
2907
2908
2909 class SubnetsFilters(Type):
2910 _toSchema = {'space_tag': 'space-tag', 'zone': 'zone'}
2911 _toPy = {'space-tag': 'space_tag', 'zone': 'zone'}
2912 def __init__(self, space_tag=None, zone=None):
2913 '''
2914 space_tag : str
2915 zone : str
2916 '''
2917 self.space_tag = space_tag
2918 self.zone = zone
2919
2920
2921 class BlockDevice(Type):
2922 _toSchema = {'busaddress': 'BusAddress', 'devicelinks': 'DeviceLinks', 'devicename': 'DeviceName', 'filesystemtype': 'FilesystemType', 'hardwareid': 'HardwareId', 'inuse': 'InUse', 'label': 'Label', 'mountpoint': 'MountPoint', 'size': 'Size', 'uuid': 'UUID'}
2923 _toPy = {'BusAddress': 'busaddress', 'DeviceLinks': 'devicelinks', 'DeviceName': 'devicename', 'FilesystemType': 'filesystemtype', 'HardwareId': 'hardwareid', 'InUse': 'inuse', 'Label': 'label', 'MountPoint': 'mountpoint', 'Size': 'size', 'UUID': 'uuid'}
2924 def __init__(self, busaddress=None, devicelinks=None, devicename=None, filesystemtype=None, hardwareid=None, inuse=None, label=None, mountpoint=None, size=None, uuid=None):
2925 '''
2926 busaddress : str
2927 devicelinks : typing.Sequence<+T_co>[str]
2928 devicename : str
2929 filesystemtype : str
2930 hardwareid : str
2931 inuse : bool
2932 label : str
2933 mountpoint : str
2934 size : int
2935 uuid : str
2936 '''
2937 self.busaddress = busaddress
2938 self.devicelinks = devicelinks
2939 self.devicename = devicename
2940 self.filesystemtype = filesystemtype
2941 self.hardwareid = hardwareid
2942 self.inuse = inuse
2943 self.label = label
2944 self.mountpoint = mountpoint
2945 self.size = size
2946 self.uuid = uuid
2947
2948
2949 class MachineBlockDevices(Type):
2950 _toSchema = {'block_devices': 'block-devices', 'machine': 'machine'}
2951 _toPy = {'block-devices': 'block_devices', 'machine': 'machine'}
2952 def __init__(self, block_devices=None, machine=None):
2953 '''
2954 block_devices : typing.Sequence<+T_co>[~BlockDevice]<~BlockDevice>
2955 machine : str
2956 '''
2957 self.block_devices = [BlockDevice.from_json(o) for o in block_devices or []]
2958 self.machine = machine
2959
2960
2961 class SetMachineBlockDevices(Type):
2962 _toSchema = {'machine_block_devices': 'machine-block-devices'}
2963 _toPy = {'machine-block-devices': 'machine_block_devices'}
2964 def __init__(self, machine_block_devices=None):
2965 '''
2966 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
2967 '''
2968 self.machine_block_devices = [MachineBlockDevices.from_json(o) for o in machine_block_devices or []]
2969
2970
2971 class EntitiesWatchResult(Type):
2972 _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
2973 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
2974 def __init__(self, changes=None, error=None, watcher_id=None):
2975 '''
2976 changes : typing.Sequence<+T_co>[str]
2977 error : Error
2978 watcher_id : str
2979 '''
2980 self.changes = changes
2981 self.error = Error.from_json(error) if error else None
2982 self.watcher_id = watcher_id
2983
2984
2985 class MachineStorageId(Type):
2986 _toSchema = {'attachment_tag': 'attachment-tag', 'machine_tag': 'machine-tag'}
2987 _toPy = {'attachment-tag': 'attachment_tag', 'machine-tag': 'machine_tag'}
2988 def __init__(self, attachment_tag=None, machine_tag=None):
2989 '''
2990 attachment_tag : str
2991 machine_tag : str
2992 '''
2993 self.attachment_tag = attachment_tag
2994 self.machine_tag = machine_tag
2995
2996
2997 class MachineStorageIdsWatchResult(Type):
2998 _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
2999 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
3000 def __init__(self, changes=None, error=None, watcher_id=None):
3001 '''
3002 changes : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
3003 error : Error
3004 watcher_id : str
3005 '''
3006 self.changes = [MachineStorageId.from_json(o) for o in changes or []]
3007 self.error = Error.from_json(error) if error else None
3008 self.watcher_id = watcher_id
3009
3010
3011 class BoolResult(Type):
3012 _toSchema = {'error': 'error', 'result': 'result'}
3013 _toPy = {'error': 'error', 'result': 'result'}
3014 def __init__(self, error=None, result=None):
3015 '''
3016 error : Error
3017 result : bool
3018 '''
3019 self.error = Error.from_json(error) if error else None
3020 self.result = result
3021
3022
3023 class BoolResults(Type):
3024 _toSchema = {'results': 'results'}
3025 _toPy = {'results': 'results'}
3026 def __init__(self, results=None):
3027 '''
3028 results : typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
3029 '''
3030 self.results = [BoolResult.from_json(o) for o in results or []]
3031
3032
3033 class MachinePortRange(Type):
3034 _toSchema = {'port_range': 'port-range', 'relation_tag': 'relation-tag', 'unit_tag': 'unit-tag'}
3035 _toPy = {'port-range': 'port_range', 'relation-tag': 'relation_tag', 'unit-tag': 'unit_tag'}
3036 def __init__(self, port_range=None, relation_tag=None, unit_tag=None):
3037 '''
3038 port_range : PortRange
3039 relation_tag : str
3040 unit_tag : str
3041 '''
3042 self.port_range = PortRange.from_json(port_range) if port_range else None
3043 self.relation_tag = relation_tag
3044 self.unit_tag = unit_tag
3045
3046
3047 class MachinePorts(Type):
3048 _toSchema = {'machine_tag': 'machine-tag', 'subnet_tag': 'subnet-tag'}
3049 _toPy = {'machine-tag': 'machine_tag', 'subnet-tag': 'subnet_tag'}
3050 def __init__(self, machine_tag=None, subnet_tag=None):
3051 '''
3052 machine_tag : str
3053 subnet_tag : str
3054 '''
3055 self.machine_tag = machine_tag
3056 self.subnet_tag = subnet_tag
3057
3058
3059 class MachinePortsParams(Type):
3060 _toSchema = {'params': 'params'}
3061 _toPy = {'params': 'params'}
3062 def __init__(self, params=None):
3063 '''
3064 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
3065 '''
3066 self.params = [MachinePorts.from_json(o) for o in params or []]
3067
3068
3069 class MachinePortsResult(Type):
3070 _toSchema = {'error': 'error', 'ports': 'ports'}
3071 _toPy = {'error': 'error', 'ports': 'ports'}
3072 def __init__(self, error=None, ports=None):
3073 '''
3074 error : Error
3075 ports : typing.Sequence<+T_co>[~MachinePortRange]<~MachinePortRange>
3076 '''
3077 self.error = Error.from_json(error) if error else None
3078 self.ports = [MachinePortRange.from_json(o) for o in ports or []]
3079
3080
3081 class MachinePortsResults(Type):
3082 _toSchema = {'results': 'results'}
3083 _toPy = {'results': 'results'}
3084 def __init__(self, results=None):
3085 '''
3086 results : typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
3087 '''
3088 self.results = [MachinePortsResult.from_json(o) for o in results or []]
3089
3090
3091 class PortRange(Type):
3092 _toSchema = {'from_port': 'from-port', 'protocol': 'protocol', 'to_port': 'to-port'}
3093 _toPy = {'from-port': 'from_port', 'protocol': 'protocol', 'to-port': 'to_port'}
3094 def __init__(self, from_port=None, protocol=None, to_port=None):
3095 '''
3096 from_port : int
3097 protocol : str
3098 to_port : int
3099 '''
3100 self.from_port = from_port
3101 self.protocol = protocol
3102 self.to_port = to_port
3103
3104
3105 class StringResults(Type):
3106 _toSchema = {'results': 'results'}
3107 _toPy = {'results': 'results'}
3108 def __init__(self, results=None):
3109 '''
3110 results : typing.Sequence<+T_co>[~StringResult]<~StringResult>
3111 '''
3112 self.results = [StringResult.from_json(o) for o in results or []]
3113
3114
3115 class ControllersChangeResult(Type):
3116 _toSchema = {'error': 'error', 'result': 'result'}
3117 _toPy = {'error': 'error', 'result': 'result'}
3118 def __init__(self, error=None, result=None):
3119 '''
3120 error : Error
3121 result : ControllersChanges
3122 '''
3123 self.error = Error.from_json(error) if error else None
3124 self.result = ControllersChanges.from_json(result) if result else None
3125
3126
3127 class ControllersChangeResults(Type):
3128 _toSchema = {'results': 'results'}
3129 _toPy = {'results': 'results'}
3130 def __init__(self, results=None):
3131 '''
3132 results : typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
3133 '''
3134 self.results = [ControllersChangeResult.from_json(o) for o in results or []]
3135
3136
3137 class ControllersChanges(Type):
3138 _toSchema = {'added': 'added', 'converted': 'converted', 'demoted': 'demoted', 'maintained': 'maintained', 'promoted': 'promoted', 'removed': 'removed'}
3139 _toPy = {'added': 'added', 'converted': 'converted', 'demoted': 'demoted', 'maintained': 'maintained', 'promoted': 'promoted', 'removed': 'removed'}
3140 def __init__(self, added=None, converted=None, demoted=None, maintained=None, promoted=None, removed=None):
3141 '''
3142 added : typing.Sequence<+T_co>[str]
3143 converted : typing.Sequence<+T_co>[str]
3144 demoted : typing.Sequence<+T_co>[str]
3145 maintained : typing.Sequence<+T_co>[str]
3146 promoted : typing.Sequence<+T_co>[str]
3147 removed : typing.Sequence<+T_co>[str]
3148 '''
3149 self.added = added
3150 self.converted = converted
3151 self.demoted = demoted
3152 self.maintained = maintained
3153 self.promoted = promoted
3154 self.removed = removed
3155
3156
3157 class ControllersSpec(Type):
3158 _toSchema = {'constraints': 'constraints', 'num_controllers': 'num-controllers', 'placement': 'placement', 'series': 'series'}
3159 _toPy = {'constraints': 'constraints', 'num-controllers': 'num_controllers', 'placement': 'placement', 'series': 'series'}
3160 def __init__(self, constraints=None, num_controllers=None, placement=None, series=None):
3161 '''
3162 constraints : Value
3163 num_controllers : int
3164 placement : typing.Sequence<+T_co>[str]
3165 series : str
3166 '''
3167 self.constraints = Value.from_json(constraints) if constraints else None
3168 self.num_controllers = num_controllers
3169 self.placement = placement
3170 self.series = series
3171
3172
3173 class ControllersSpecs(Type):
3174 _toSchema = {'specs': 'specs'}
3175 _toPy = {'specs': 'specs'}
3176 def __init__(self, specs=None):
3177 '''
3178 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
3179 '''
3180 self.specs = [ControllersSpec.from_json(o) for o in specs or []]
3181
3182
3183 class HAMember(Type):
3184 _toSchema = {'public_address': 'public-address', 'series': 'series', 'tag': 'tag'}
3185 _toPy = {'public-address': 'public_address', 'series': 'series', 'tag': 'tag'}
3186 def __init__(self, public_address=None, series=None, tag=None):
3187 '''
3188 public_address : Address
3189 series : str
3190 tag : str
3191 '''
3192 self.public_address = Address.from_json(public_address) if public_address else None
3193 self.series = series
3194 self.tag = tag
3195
3196
3197 class Member(Type):
3198 _toSchema = {'address': 'Address', 'arbiter': 'Arbiter', 'buildindexes': 'BuildIndexes', 'hidden': 'Hidden', 'id_': 'Id', 'priority': 'Priority', 'slavedelay': 'SlaveDelay', 'tags': 'Tags', 'votes': 'Votes'}
3199 _toPy = {'Address': 'address', 'Arbiter': 'arbiter', 'BuildIndexes': 'buildindexes', 'Hidden': 'hidden', 'Id': 'id_', 'Priority': 'priority', 'SlaveDelay': 'slavedelay', 'Tags': 'tags', 'Votes': 'votes'}
3200 def __init__(self, address=None, arbiter=None, buildindexes=None, hidden=None, id_=None, priority=None, slavedelay=None, tags=None, votes=None):
3201 '''
3202 address : str
3203 arbiter : bool
3204 buildindexes : bool
3205 hidden : bool
3206 id_ : int
3207 priority : float
3208 slavedelay : int
3209 tags : typing.Mapping<~KT, +VT_co>[str, str]
3210 votes : int
3211 '''
3212 self.address = address
3213 self.arbiter = arbiter
3214 self.buildindexes = buildindexes
3215 self.hidden = hidden
3216 self.id_ = id_
3217 self.priority = priority
3218 self.slavedelay = slavedelay
3219 self.tags = tags
3220 self.votes = votes
3221
3222
3223 class MongoUpgradeResults(Type):
3224 _toSchema = {'ha_members': 'ha-members', 'master': 'master', 'rs_members': 'rs-members'}
3225 _toPy = {'ha-members': 'ha_members', 'master': 'master', 'rs-members': 'rs_members'}
3226 def __init__(self, ha_members=None, master=None, rs_members=None):
3227 '''
3228 ha_members : typing.Sequence<+T_co>[~HAMember]<~HAMember>
3229 master : HAMember
3230 rs_members : typing.Sequence<+T_co>[~Member]<~Member>
3231 '''
3232 self.ha_members = [HAMember.from_json(o) for o in ha_members or []]
3233 self.master = HAMember.from_json(master) if master else None
3234 self.rs_members = [Member.from_json(o) for o in rs_members or []]
3235
3236
3237 class MongoVersion(Type):
3238 _toSchema = {'engine': 'engine', 'major': 'major', 'minor': 'minor', 'patch': 'patch'}
3239 _toPy = {'engine': 'engine', 'major': 'major', 'minor': 'minor', 'patch': 'patch'}
3240 def __init__(self, engine=None, major=None, minor=None, patch=None):
3241 '''
3242 engine : str
3243 major : int
3244 minor : int
3245 patch : str
3246 '''
3247 self.engine = engine
3248 self.major = major
3249 self.minor = minor
3250 self.patch = patch
3251
3252
3253 class ResumeReplicationParams(Type):
3254 _toSchema = {'members': 'members'}
3255 _toPy = {'members': 'members'}
3256 def __init__(self, members=None):
3257 '''
3258 members : typing.Sequence<+T_co>[~Member]<~Member>
3259 '''
3260 self.members = [Member.from_json(o) for o in members or []]
3261
3262
3263 class UpgradeMongoParams(Type):
3264 _toSchema = {'target': 'target'}
3265 _toPy = {'target': 'target'}
3266 def __init__(self, target=None):
3267 '''
3268 target : MongoVersion
3269 '''
3270 self.target = MongoVersion.from_json(target) if target else None
3271
3272
3273 class SSHHostKeySet(Type):
3274 _toSchema = {'entity_keys': 'entity-keys'}
3275 _toPy = {'entity-keys': 'entity_keys'}
3276 def __init__(self, entity_keys=None):
3277 '''
3278 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
3279 '''
3280 self.entity_keys = [SSHHostKeys.from_json(o) for o in entity_keys or []]
3281
3282
3283 class SSHHostKeys(Type):
3284 _toSchema = {'public_keys': 'public-keys', 'tag': 'tag'}
3285 _toPy = {'public-keys': 'public_keys', 'tag': 'tag'}
3286 def __init__(self, public_keys=None, tag=None):
3287 '''
3288 public_keys : typing.Sequence<+T_co>[str]
3289 tag : str
3290 '''
3291 self.public_keys = public_keys
3292 self.tag = tag
3293
3294
3295 class ImageFilterParams(Type):
3296 _toSchema = {'images': 'images'}
3297 _toPy = {'images': 'images'}
3298 def __init__(self, images=None):
3299 '''
3300 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
3301 '''
3302 self.images = [ImageSpec.from_json(o) for o in images or []]
3303
3304
3305 class ImageMetadata(Type):
3306 _toSchema = {'arch': 'arch', 'created': 'created', 'kind': 'kind', 'series': 'series', 'url': 'url'}
3307 _toPy = {'arch': 'arch', 'created': 'created', 'kind': 'kind', 'series': 'series', 'url': 'url'}
3308 def __init__(self, arch=None, created=None, kind=None, series=None, url=None):
3309 '''
3310 arch : str
3311 created : str
3312 kind : str
3313 series : str
3314 url : str
3315 '''
3316 self.arch = arch
3317 self.created = created
3318 self.kind = kind
3319 self.series = series
3320 self.url = url
3321
3322
3323 class ImageSpec(Type):
3324 _toSchema = {'arch': 'arch', 'kind': 'kind', 'series': 'series'}
3325 _toPy = {'arch': 'arch', 'kind': 'kind', 'series': 'series'}
3326 def __init__(self, arch=None, kind=None, series=None):
3327 '''
3328 arch : str
3329 kind : str
3330 series : str
3331 '''
3332 self.arch = arch
3333 self.kind = kind
3334 self.series = series
3335
3336
3337 class ListImageResult(Type):
3338 _toSchema = {'result': 'result'}
3339 _toPy = {'result': 'result'}
3340 def __init__(self, result=None):
3341 '''
3342 result : typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
3343 '''
3344 self.result = [ImageMetadata.from_json(o) for o in result or []]
3345
3346
3347 class CloudImageMetadata(Type):
3348 _toSchema = {'arch': 'arch', 'image_id': 'image-id', 'priority': 'priority', 'region': 'region', 'root_storage_size': 'root-storage-size', 'root_storage_type': 'root-storage-type', 'series': 'series', 'source': 'source', 'stream': 'stream', 'version': 'version', 'virt_type': 'virt-type'}
3349 _toPy = {'arch': 'arch', 'image-id': 'image_id', 'priority': 'priority', 'region': 'region', 'root-storage-size': 'root_storage_size', 'root-storage-type': 'root_storage_type', 'series': 'series', 'source': 'source', 'stream': 'stream', 'version': 'version', 'virt-type': 'virt_type'}
3350 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):
3351 '''
3352 arch : str
3353 image_id : str
3354 priority : int
3355 region : str
3356 root_storage_size : int
3357 root_storage_type : str
3358 series : str
3359 source : str
3360 stream : str
3361 version : str
3362 virt_type : str
3363 '''
3364 self.arch = arch
3365 self.image_id = image_id
3366 self.priority = priority
3367 self.region = region
3368 self.root_storage_size = root_storage_size
3369 self.root_storage_type = root_storage_type
3370 self.series = series
3371 self.source = source
3372 self.stream = stream
3373 self.version = version
3374 self.virt_type = virt_type
3375
3376
3377 class CloudImageMetadataList(Type):
3378 _toSchema = {'metadata': 'metadata'}
3379 _toPy = {'metadata': 'metadata'}
3380 def __init__(self, metadata=None):
3381 '''
3382 metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
3383 '''
3384 self.metadata = [CloudImageMetadata.from_json(o) for o in metadata or []]
3385
3386
3387 class ImageMetadataFilter(Type):
3388 _toSchema = {'arches': 'arches', 'region': 'region', 'root_storage_type': 'root-storage-type', 'series': 'series', 'stream': 'stream', 'virt_type': 'virt-type'}
3389 _toPy = {'arches': 'arches', 'region': 'region', 'root-storage-type': 'root_storage_type', 'series': 'series', 'stream': 'stream', 'virt-type': 'virt_type'}
3390 def __init__(self, arches=None, region=None, root_storage_type=None, series=None, stream=None, virt_type=None):
3391 '''
3392 arches : typing.Sequence<+T_co>[str]
3393 region : str
3394 root_storage_type : str
3395 series : typing.Sequence<+T_co>[str]
3396 stream : str
3397 virt_type : str
3398 '''
3399 self.arches = arches
3400 self.region = region
3401 self.root_storage_type = root_storage_type
3402 self.series = series
3403 self.stream = stream
3404 self.virt_type = virt_type
3405
3406
3407 class ListCloudImageMetadataResult(Type):
3408 _toSchema = {'result': 'result'}
3409 _toPy = {'result': 'result'}
3410 def __init__(self, result=None):
3411 '''
3412 result : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
3413 '''
3414 self.result = [CloudImageMetadata.from_json(o) for o in result or []]
3415
3416
3417 class MetadataImageIds(Type):
3418 _toSchema = {'image_ids': 'image-ids'}
3419 _toPy = {'image-ids': 'image_ids'}
3420 def __init__(self, image_ids=None):
3421 '''
3422 image_ids : typing.Sequence<+T_co>[str]
3423 '''
3424 self.image_ids = image_ids
3425
3426
3427 class MetadataSaveParams(Type):
3428 _toSchema = {'metadata': 'metadata'}
3429 _toPy = {'metadata': 'metadata'}
3430 def __init__(self, metadata=None):
3431 '''
3432 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
3433 '''
3434 self.metadata = [CloudImageMetadataList.from_json(o) for o in metadata or []]
3435
3436
3437 class MachineAddresses(Type):
3438 _toSchema = {'addresses': 'addresses', 'tag': 'tag'}
3439 _toPy = {'addresses': 'addresses', 'tag': 'tag'}
3440 def __init__(self, addresses=None, tag=None):
3441 '''
3442 addresses : typing.Sequence<+T_co>[~Address]<~Address>
3443 tag : str
3444 '''
3445 self.addresses = [Address.from_json(o) for o in addresses or []]
3446 self.tag = tag
3447
3448
3449 class MachineAddressesResult(Type):
3450 _toSchema = {'addresses': 'addresses', 'error': 'error'}
3451 _toPy = {'addresses': 'addresses', 'error': 'error'}
3452 def __init__(self, addresses=None, error=None):
3453 '''
3454 addresses : typing.Sequence<+T_co>[~Address]<~Address>
3455 error : Error
3456 '''
3457 self.addresses = [Address.from_json(o) for o in addresses or []]
3458 self.error = Error.from_json(error) if error else None
3459
3460
3461 class MachineAddressesResults(Type):
3462 _toSchema = {'results': 'results'}
3463 _toPy = {'results': 'results'}
3464 def __init__(self, results=None):
3465 '''
3466 results : typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
3467 '''
3468 self.results = [MachineAddressesResult.from_json(o) for o in results or []]
3469
3470
3471 class SetMachinesAddresses(Type):
3472 _toSchema = {'machine_addresses': 'machine-addresses'}
3473 _toPy = {'machine-addresses': 'machine_addresses'}
3474 def __init__(self, machine_addresses=None):
3475 '''
3476 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
3477 '''
3478 self.machine_addresses = [MachineAddresses.from_json(o) for o in machine_addresses or []]
3479
3480
3481 class StatusResult(Type):
3482 _toSchema = {'data': 'data', 'error': 'error', 'id_': 'id', 'info': 'info', 'life': 'life', 'since': 'since', 'status': 'status'}
3483 _toPy = {'data': 'data', 'error': 'error', 'id': 'id_', 'info': 'info', 'life': 'life', 'since': 'since', 'status': 'status'}
3484 def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None):
3485 '''
3486 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3487 error : Error
3488 id_ : str
3489 info : str
3490 life : str
3491 since : str
3492 status : str
3493 '''
3494 self.data = data
3495 self.error = Error.from_json(error) if error else None
3496 self.id_ = id_
3497 self.info = info
3498 self.life = life
3499 self.since = since
3500 self.status = status
3501
3502
3503 class StatusResults(Type):
3504 _toSchema = {'results': 'results'}
3505 _toPy = {'results': 'results'}
3506 def __init__(self, results=None):
3507 '''
3508 results : typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
3509 '''
3510 self.results = [StatusResult.from_json(o) for o in results or []]
3511
3512
3513 class ListSSHKeys(Type):
3514 _toSchema = {'entities': 'entities', 'mode': 'mode'}
3515 _toPy = {'entities': 'entities', 'mode': 'mode'}
3516 def __init__(self, entities=None, mode=None):
3517 '''
3518 entities : Entities
3519 mode : bool
3520 '''
3521 self.entities = Entities.from_json(entities) if entities else None
3522 self.mode = mode
3523
3524
3525 class ModifyUserSSHKeys(Type):
3526 _toSchema = {'ssh_keys': 'ssh-keys', 'user': 'user'}
3527 _toPy = {'ssh-keys': 'ssh_keys', 'user': 'user'}
3528 def __init__(self, ssh_keys=None, user=None):
3529 '''
3530 ssh_keys : typing.Sequence<+T_co>[str]
3531 user : str
3532 '''
3533 self.ssh_keys = ssh_keys
3534 self.user = user
3535
3536
3537 class ApplicationTag(Type):
3538 _toSchema = {'name': 'Name'}
3539 _toPy = {'Name': 'name'}
3540 def __init__(self, name=None):
3541 '''
3542 name : str
3543 '''
3544 self.name = name
3545
3546
3547 class ClaimLeadershipBulkParams(Type):
3548 _toSchema = {'params': 'params'}
3549 _toPy = {'params': 'params'}
3550 def __init__(self, params=None):
3551 '''
3552 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
3553 '''
3554 self.params = [ClaimLeadershipParams.from_json(o) for o in params or []]
3555
3556
3557 class ClaimLeadershipBulkResults(Type):
3558 _toSchema = {'results': 'results'}
3559 _toPy = {'results': 'results'}
3560 def __init__(self, results=None):
3561 '''
3562 results : typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3563 '''
3564 self.results = [ErrorResult.from_json(o) for o in results or []]
3565
3566
3567 class ClaimLeadershipParams(Type):
3568 _toSchema = {'application_tag': 'application-tag', 'duration': 'duration', 'unit_tag': 'unit-tag'}
3569 _toPy = {'application-tag': 'application_tag', 'duration': 'duration', 'unit-tag': 'unit_tag'}
3570 def __init__(self, application_tag=None, duration=None, unit_tag=None):
3571 '''
3572 application_tag : str
3573 duration : float
3574 unit_tag : str
3575 '''
3576 self.application_tag = application_tag
3577 self.duration = duration
3578 self.unit_tag = unit_tag
3579
3580
3581 class LogForwardingGetLastSentParams(Type):
3582 _toSchema = {'ids': 'ids'}
3583 _toPy = {'ids': 'ids'}
3584 def __init__(self, ids=None):
3585 '''
3586 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
3587 '''
3588 self.ids = [LogForwardingID.from_json(o) for o in ids or []]
3589
3590
3591 class LogForwardingGetLastSentResult(Type):
3592 _toSchema = {'err': 'err', 'record_id': 'record-id', 'record_timestamp': 'record-timestamp'}
3593 _toPy = {'err': 'err', 'record-id': 'record_id', 'record-timestamp': 'record_timestamp'}
3594 def __init__(self, err=None, record_id=None, record_timestamp=None):
3595 '''
3596 err : Error
3597 record_id : int
3598 record_timestamp : int
3599 '''
3600 self.err = Error.from_json(err) if err else None
3601 self.record_id = record_id
3602 self.record_timestamp = record_timestamp
3603
3604
3605 class LogForwardingGetLastSentResults(Type):
3606 _toSchema = {'results': 'results'}
3607 _toPy = {'results': 'results'}
3608 def __init__(self, results=None):
3609 '''
3610 results : typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
3611 '''
3612 self.results = [LogForwardingGetLastSentResult.from_json(o) for o in results or []]
3613
3614
3615 class LogForwardingID(Type):
3616 _toSchema = {'model': 'model', 'sink': 'sink'}
3617 _toPy = {'model': 'model', 'sink': 'sink'}
3618 def __init__(self, model=None, sink=None):
3619 '''
3620 model : str
3621 sink : str
3622 '''
3623 self.model = model
3624 self.sink = sink
3625
3626
3627 class LogForwardingSetLastSentParam(Type):
3628 _toSchema = {'logforwardingid': 'LogForwardingID', 'record_id': 'record-id', 'record_timestamp': 'record-timestamp'}
3629 _toPy = {'LogForwardingID': 'logforwardingid', 'record-id': 'record_id', 'record-timestamp': 'record_timestamp'}
3630 def __init__(self, logforwardingid=None, record_id=None, record_timestamp=None):
3631 '''
3632 logforwardingid : LogForwardingID
3633 record_id : int
3634 record_timestamp : int
3635 '''
3636 self.logforwardingid = LogForwardingID.from_json(logforwardingid) if logforwardingid else None
3637 self.record_id = record_id
3638 self.record_timestamp = record_timestamp
3639
3640
3641 class LogForwardingSetLastSentParams(Type):
3642 _toSchema = {'params': 'params'}
3643 _toPy = {'params': 'params'}
3644 def __init__(self, params=None):
3645 '''
3646 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
3647 '''
3648 self.params = [LogForwardingSetLastSentParam.from_json(o) for o in params or []]
3649
3650
3651 class ActionExecutionResult(Type):
3652 _toSchema = {'action_tag': 'action-tag', 'message': 'message', 'results': 'results', 'status': 'status'}
3653 _toPy = {'action-tag': 'action_tag', 'message': 'message', 'results': 'results', 'status': 'status'}
3654 def __init__(self, action_tag=None, message=None, results=None, status=None):
3655 '''
3656 action_tag : str
3657 message : str
3658 results : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3659 status : str
3660 '''
3661 self.action_tag = action_tag
3662 self.message = message
3663 self.results = results
3664 self.status = status
3665
3666
3667 class ActionExecutionResults(Type):
3668 _toSchema = {'results': 'results'}
3669 _toPy = {'results': 'results'}
3670 def __init__(self, results=None):
3671 '''
3672 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
3673 '''
3674 self.results = [ActionExecutionResult.from_json(o) for o in results or []]
3675
3676
3677 class EntitiesResult(Type):
3678 _toSchema = {'entities': 'entities', 'error': 'error'}
3679 _toPy = {'entities': 'entities', 'error': 'error'}
3680 def __init__(self, entities=None, error=None):
3681 '''
3682 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3683 error : Error
3684 '''
3685 self.entities = [Entity.from_json(o) for o in entities or []]
3686 self.error = Error.from_json(error) if error else None
3687
3688
3689 class EntitiesResults(Type):
3690 _toSchema = {'results': 'results'}
3691 _toPy = {'results': 'results'}
3692 def __init__(self, results=None):
3693 '''
3694 results : typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
3695 '''
3696 self.results = [EntitiesResult.from_json(o) for o in results or []]
3697
3698
3699 class ProviderInterfaceInfo(Type):
3700 _toSchema = {'interface_name': 'interface-name', 'mac_address': 'mac-address', 'provider_id': 'provider-id'}
3701 _toPy = {'interface-name': 'interface_name', 'mac-address': 'mac_address', 'provider-id': 'provider_id'}
3702 def __init__(self, interface_name=None, mac_address=None, provider_id=None):
3703 '''
3704 interface_name : str
3705 mac_address : str
3706 provider_id : str
3707 '''
3708 self.interface_name = interface_name
3709 self.mac_address = mac_address
3710 self.provider_id = provider_id
3711
3712
3713 class ProviderInterfaceInfoResult(Type):
3714 _toSchema = {'error': 'error', 'interfaces': 'interfaces', 'machine_tag': 'machine-tag'}
3715 _toPy = {'error': 'error', 'interfaces': 'interfaces', 'machine-tag': 'machine_tag'}
3716 def __init__(self, error=None, interfaces=None, machine_tag=None):
3717 '''
3718 error : Error
3719 interfaces : typing.Sequence<+T_co>[~ProviderInterfaceInfo]<~ProviderInterfaceInfo>
3720 machine_tag : str
3721 '''
3722 self.error = Error.from_json(error) if error else None
3723 self.interfaces = [ProviderInterfaceInfo.from_json(o) for o in interfaces or []]
3724 self.machine_tag = machine_tag
3725
3726
3727 class ProviderInterfaceInfoResults(Type):
3728 _toSchema = {'results': 'results'}
3729 _toPy = {'results': 'results'}
3730 def __init__(self, results=None):
3731 '''
3732 results : typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
3733 '''
3734 self.results = [ProviderInterfaceInfoResult.from_json(o) for o in results or []]
3735
3736
3737 class JobsResult(Type):
3738 _toSchema = {'error': 'error', 'jobs': 'jobs'}
3739 _toPy = {'error': 'error', 'jobs': 'jobs'}
3740 def __init__(self, error=None, jobs=None):
3741 '''
3742 error : Error
3743 jobs : typing.Sequence<+T_co>[str]
3744 '''
3745 self.error = Error.from_json(error) if error else None
3746 self.jobs = jobs
3747
3748
3749 class JobsResults(Type):
3750 _toSchema = {'results': 'results'}
3751 _toPy = {'results': 'results'}
3752 def __init__(self, results=None):
3753 '''
3754 results : typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
3755 '''
3756 self.results = [JobsResult.from_json(o) for o in results or []]
3757
3758
3759 class NetworkConfig(Type):
3760 _toSchema = {'address': 'address', 'cidr': 'cidr', 'config_type': 'config-type', 'device_index': 'device-index', 'disabled': 'disabled', 'dns_search_domains': 'dns-search-domains', 'dns_servers': 'dns-servers', 'gateway_address': 'gateway-address', 'interface_name': 'interface-name', 'interface_type': 'interface-type', 'mac_address': 'mac-address', 'mtu': 'mtu', 'no_auto_start': 'no-auto-start', 'parent_interface_name': 'parent-interface-name', 'provider_address_id': 'provider-address-id', 'provider_id': 'provider-id', 'provider_space_id': 'provider-space-id', 'provider_subnet_id': 'provider-subnet-id', 'provider_vlan_id': 'provider-vlan-id', 'vlan_tag': 'vlan-tag'}
3761 _toPy = {'address': 'address', 'cidr': 'cidr', 'config-type': 'config_type', 'device-index': 'device_index', 'disabled': 'disabled', 'dns-search-domains': 'dns_search_domains', 'dns-servers': 'dns_servers', 'gateway-address': 'gateway_address', 'interface-name': 'interface_name', 'interface-type': 'interface_type', 'mac-address': 'mac_address', 'mtu': 'mtu', 'no-auto-start': 'no_auto_start', 'parent-interface-name': 'parent_interface_name', 'provider-address-id': 'provider_address_id', 'provider-id': 'provider_id', 'provider-space-id': 'provider_space_id', 'provider-subnet-id': 'provider_subnet_id', 'provider-vlan-id': 'provider_vlan_id', 'vlan-tag': 'vlan_tag'}
3762 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):
3763 '''
3764 address : str
3765 cidr : str
3766 config_type : str
3767 device_index : int
3768 disabled : bool
3769 dns_search_domains : typing.Sequence<+T_co>[str]
3770 dns_servers : typing.Sequence<+T_co>[str]
3771 gateway_address : str
3772 interface_name : str
3773 interface_type : str
3774 mac_address : str
3775 mtu : int
3776 no_auto_start : bool
3777 parent_interface_name : str
3778 provider_address_id : str
3779 provider_id : str
3780 provider_space_id : str
3781 provider_subnet_id : str
3782 provider_vlan_id : str
3783 vlan_tag : int
3784 '''
3785 self.address = address
3786 self.cidr = cidr
3787 self.config_type = config_type
3788 self.device_index = device_index
3789 self.disabled = disabled
3790 self.dns_search_domains = dns_search_domains
3791 self.dns_servers = dns_servers
3792 self.gateway_address = gateway_address
3793 self.interface_name = interface_name
3794 self.interface_type = interface_type
3795 self.mac_address = mac_address
3796 self.mtu = mtu
3797 self.no_auto_start = no_auto_start
3798 self.parent_interface_name = parent_interface_name
3799 self.provider_address_id = provider_address_id
3800 self.provider_id = provider_id
3801 self.provider_space_id = provider_space_id
3802 self.provider_subnet_id = provider_subnet_id
3803 self.provider_vlan_id = provider_vlan_id
3804 self.vlan_tag = vlan_tag
3805
3806
3807 class SetMachineNetworkConfig(Type):
3808 _toSchema = {'config': 'config', 'tag': 'tag'}
3809 _toPy = {'config': 'config', 'tag': 'tag'}
3810 def __init__(self, config=None, tag=None):
3811 '''
3812 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3813 tag : str
3814 '''
3815 self.config = [NetworkConfig.from_json(o) for o in config or []]
3816 self.tag = tag
3817
3818
3819 class MeterStatusResult(Type):
3820 _toSchema = {'code': 'code', 'error': 'error', 'info': 'info'}
3821 _toPy = {'code': 'code', 'error': 'error', 'info': 'info'}
3822 def __init__(self, code=None, error=None, info=None):
3823 '''
3824 code : str
3825 error : Error
3826 info : str
3827 '''
3828 self.code = code
3829 self.error = Error.from_json(error) if error else None
3830 self.info = info
3831
3832
3833 class MeterStatusResults(Type):
3834 _toSchema = {'results': 'results'}
3835 _toPy = {'results': 'results'}
3836 def __init__(self, results=None):
3837 '''
3838 results : typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
3839 '''
3840 self.results = [MeterStatusResult.from_json(o) for o in results or []]
3841
3842
3843 class Metric(Type):
3844 _toSchema = {'key': 'key', 'time': 'time', 'value': 'value'}
3845 _toPy = {'key': 'key', 'time': 'time', 'value': 'value'}
3846 def __init__(self, key=None, time=None, value=None):
3847 '''
3848 key : str
3849 time : str
3850 value : str
3851 '''
3852 self.key = key
3853 self.time = time
3854 self.value = value
3855
3856
3857 class MetricBatch(Type):
3858 _toSchema = {'charm_url': 'charm-url', 'created': 'created', 'metrics': 'metrics', 'uuid': 'uuid'}
3859 _toPy = {'charm-url': 'charm_url', 'created': 'created', 'metrics': 'metrics', 'uuid': 'uuid'}
3860 def __init__(self, charm_url=None, created=None, metrics=None, uuid=None):
3861 '''
3862 charm_url : str
3863 created : str
3864 metrics : typing.Sequence<+T_co>[~Metric]<~Metric>
3865 uuid : str
3866 '''
3867 self.charm_url = charm_url
3868 self.created = created
3869 self.metrics = [Metric.from_json(o) for o in metrics or []]
3870 self.uuid = uuid
3871
3872
3873 class MetricBatchParam(Type):
3874 _toSchema = {'batch': 'batch', 'tag': 'tag'}
3875 _toPy = {'batch': 'batch', 'tag': 'tag'}
3876 def __init__(self, batch=None, tag=None):
3877 '''
3878 batch : MetricBatch
3879 tag : str
3880 '''
3881 self.batch = MetricBatch.from_json(batch) if batch else None
3882 self.tag = tag
3883
3884
3885 class MetricBatchParams(Type):
3886 _toSchema = {'batches': 'batches'}
3887 _toPy = {'batches': 'batches'}
3888 def __init__(self, batches=None):
3889 '''
3890 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
3891 '''
3892 self.batches = [MetricBatchParam.from_json(o) for o in batches or []]
3893
3894
3895 class EntityMetrics(Type):
3896 _toSchema = {'error': 'error', 'metrics': 'metrics'}
3897 _toPy = {'error': 'error', 'metrics': 'metrics'}
3898 def __init__(self, error=None, metrics=None):
3899 '''
3900 error : Error
3901 metrics : typing.Sequence<+T_co>[~MetricResult]<~MetricResult>
3902 '''
3903 self.error = Error.from_json(error) if error else None
3904 self.metrics = [MetricResult.from_json(o) for o in metrics or []]
3905
3906
3907 class MeterStatusParam(Type):
3908 _toSchema = {'code': 'code', 'info': 'info', 'tag': 'tag'}
3909 _toPy = {'code': 'code', 'info': 'info', 'tag': 'tag'}
3910 def __init__(self, code=None, info=None, tag=None):
3911 '''
3912 code : str
3913 info : str
3914 tag : str
3915 '''
3916 self.code = code
3917 self.info = info
3918 self.tag = tag
3919
3920
3921 class MeterStatusParams(Type):
3922 _toSchema = {'statues': 'statues'}
3923 _toPy = {'statues': 'statues'}
3924 def __init__(self, statues=None):
3925 '''
3926 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
3927 '''
3928 self.statues = [MeterStatusParam.from_json(o) for o in statues or []]
3929
3930
3931 class MetricResult(Type):
3932 _toSchema = {'key': 'key', 'time': 'time', 'unit': 'unit', 'value': 'value'}
3933 _toPy = {'key': 'key', 'time': 'time', 'unit': 'unit', 'value': 'value'}
3934 def __init__(self, key=None, time=None, unit=None, value=None):
3935 '''
3936 key : str
3937 time : str
3938 unit : str
3939 value : str
3940 '''
3941 self.key = key
3942 self.time = time
3943 self.unit = unit
3944 self.value = value
3945
3946
3947 class MetricResults(Type):
3948 _toSchema = {'results': 'results'}
3949 _toPy = {'results': 'results'}
3950 def __init__(self, results=None):
3951 '''
3952 results : typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
3953 '''
3954 self.results = [EntityMetrics.from_json(o) for o in results or []]
3955
3956
3957 class PhaseResult(Type):
3958 _toSchema = {'error': 'error', 'phase': 'phase'}
3959 _toPy = {'error': 'error', 'phase': 'phase'}
3960 def __init__(self, error=None, phase=None):
3961 '''
3962 error : Error
3963 phase : str
3964 '''
3965 self.error = Error.from_json(error) if error else None
3966 self.phase = phase
3967
3968
3969 class PhaseResults(Type):
3970 _toSchema = {'results': 'results'}
3971 _toPy = {'results': 'results'}
3972 def __init__(self, results=None):
3973 '''
3974 results : typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
3975 '''
3976 self.results = [PhaseResult.from_json(o) for o in results or []]
3977
3978
3979 class MasterMigrationStatus(Type):
3980 _toSchema = {'migration_id': 'migration-id', 'phase': 'phase', 'phase_changed_time': 'phase-changed-time', 'spec': 'spec'}
3981 _toPy = {'migration-id': 'migration_id', 'phase': 'phase', 'phase-changed-time': 'phase_changed_time', 'spec': 'spec'}
3982 def __init__(self, migration_id=None, phase=None, phase_changed_time=None, spec=None):
3983 '''
3984 migration_id : str
3985 phase : str
3986 phase_changed_time : str
3987 spec : MigrationSpec
3988 '''
3989 self.migration_id = migration_id
3990 self.phase = phase
3991 self.phase_changed_time = phase_changed_time
3992 self.spec = MigrationSpec.from_json(spec) if spec else None
3993
3994
3995 class MigrationModelInfo(Type):
3996 _toSchema = {'agent_version': 'agent-version', 'name': 'name', 'owner_tag': 'owner-tag', 'uuid': 'uuid'}
3997 _toPy = {'agent-version': 'agent_version', 'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'}
3998 def __init__(self, agent_version=None, name=None, owner_tag=None, uuid=None):
3999 '''
4000 agent_version : Number
4001 name : str
4002 owner_tag : str
4003 uuid : str
4004 '''
4005 self.agent_version = Number.from_json(agent_version) if agent_version else None
4006 self.name = name
4007 self.owner_tag = owner_tag
4008 self.uuid = uuid
4009
4010
4011 class MinionReports(Type):
4012 _toSchema = {'failed': 'failed', 'migration_id': 'migration-id', 'phase': 'phase', 'success_count': 'success-count', 'unknown_count': 'unknown-count', 'unknown_sample': 'unknown-sample'}
4013 _toPy = {'failed': 'failed', 'migration-id': 'migration_id', 'phase': 'phase', 'success-count': 'success_count', 'unknown-count': 'unknown_count', 'unknown-sample': 'unknown_sample'}
4014 def __init__(self, failed=None, migration_id=None, phase=None, success_count=None, unknown_count=None, unknown_sample=None):
4015 '''
4016 failed : typing.Sequence<+T_co>[str]
4017 migration_id : str
4018 phase : str
4019 success_count : int
4020 unknown_count : int
4021 unknown_sample : typing.Sequence<+T_co>[str]
4022 '''
4023 self.failed = failed
4024 self.migration_id = migration_id
4025 self.phase = phase
4026 self.success_count = success_count
4027 self.unknown_count = unknown_count
4028 self.unknown_sample = unknown_sample
4029
4030
4031 class SerializedModel(Type):
4032 _toSchema = {'bytes_': 'bytes', 'charms': 'charms', 'tools': 'tools'}
4033 _toPy = {'bytes': 'bytes_', 'charms': 'charms', 'tools': 'tools'}
4034 def __init__(self, bytes_=None, charms=None, tools=None):
4035 '''
4036 bytes_ : typing.Sequence<+T_co>[int]
4037 charms : typing.Sequence<+T_co>[str]
4038 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
4039 '''
4040 self.bytes_ = bytes_
4041 self.charms = charms
4042 self.tools = [SerializedModelTools.from_json(o) for o in tools or []]
4043
4044
4045 class SerializedModelTools(Type):
4046 _toSchema = {'uri': 'uri', 'version': 'version'}
4047 _toPy = {'uri': 'uri', 'version': 'version'}
4048 def __init__(self, uri=None, version=None):
4049 '''
4050 uri : str
4051 version : str
4052 '''
4053 self.uri = uri
4054 self.version = version
4055
4056
4057 class SetMigrationPhaseArgs(Type):
4058 _toSchema = {'phase': 'phase'}
4059 _toPy = {'phase': 'phase'}
4060 def __init__(self, phase=None):
4061 '''
4062 phase : str
4063 '''
4064 self.phase = phase
4065
4066
4067 class SetMigrationStatusMessageArgs(Type):
4068 _toSchema = {'message': 'message'}
4069 _toPy = {'message': 'message'}
4070 def __init__(self, message=None):
4071 '''
4072 message : str
4073 '''
4074 self.message = message
4075
4076
4077 class MinionReport(Type):
4078 _toSchema = {'migration_id': 'migration-id', 'phase': 'phase', 'success': 'success'}
4079 _toPy = {'migration-id': 'migration_id', 'phase': 'phase', 'success': 'success'}
4080 def __init__(self, migration_id=None, phase=None, success=None):
4081 '''
4082 migration_id : str
4083 phase : str
4084 success : bool
4085 '''
4086 self.migration_id = migration_id
4087 self.phase = phase
4088 self.success = success
4089
4090
4091 class MigrationStatus(Type):
4092 _toSchema = {'attempt': 'attempt', 'external_control': 'external-control', 'migration_id': 'migration-id', 'phase': 'phase', 'source_api_addrs': 'source-api-addrs', 'source_ca_cert': 'source-ca-cert', 'target_api_addrs': 'target-api-addrs', 'target_ca_cert': 'target-ca-cert'}
4093 _toPy = {'attempt': 'attempt', 'external-control': 'external_control', 'migration-id': 'migration_id', 'phase': 'phase', 'source-api-addrs': 'source_api_addrs', 'source-ca-cert': 'source_ca_cert', 'target-api-addrs': 'target_api_addrs', 'target-ca-cert': 'target_ca_cert'}
4094 def __init__(self, attempt=None, external_control=None, migration_id=None, phase=None, source_api_addrs=None, source_ca_cert=None, target_api_addrs=None, target_ca_cert=None):
4095 '''
4096 attempt : int
4097 external_control : bool
4098 migration_id : str
4099 phase : str
4100 source_api_addrs : typing.Sequence<+T_co>[str]
4101 source_ca_cert : str
4102 target_api_addrs : typing.Sequence<+T_co>[str]
4103 target_ca_cert : str
4104 '''
4105 self.attempt = attempt
4106 self.external_control = external_control
4107 self.migration_id = migration_id
4108 self.phase = phase
4109 self.source_api_addrs = source_api_addrs
4110 self.source_ca_cert = source_ca_cert
4111 self.target_api_addrs = target_api_addrs
4112 self.target_ca_cert = target_ca_cert
4113
4114
4115 class ModelArgs(Type):
4116 _toSchema = {'model_tag': 'model-tag'}
4117 _toPy = {'model-tag': 'model_tag'}
4118 def __init__(self, model_tag=None):
4119 '''
4120 model_tag : str
4121 '''
4122 self.model_tag = model_tag
4123
4124
4125 class MapResult(Type):
4126 _toSchema = {'error': 'error', 'result': 'result'}
4127 _toPy = {'error': 'error', 'result': 'result'}
4128 def __init__(self, error=None, result=None):
4129 '''
4130 error : Error
4131 result : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4132 '''
4133 self.error = Error.from_json(error) if error else None
4134 self.result = result
4135
4136
4137 class MapResults(Type):
4138 _toSchema = {'results': 'results'}
4139 _toPy = {'results': 'results'}
4140 def __init__(self, results=None):
4141 '''
4142 results : typing.Sequence<+T_co>[~MapResult]<~MapResult>
4143 '''
4144 self.results = [MapResult.from_json(o) for o in results or []]
4145
4146
4147 class ModelCreateArgs(Type):
4148 _toSchema = {'cloud_tag': 'cloud-tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner_tag': 'owner-tag', 'region': 'region'}
4149 _toPy = {'cloud-tag': 'cloud_tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner-tag': 'owner_tag', 'region': 'region'}
4150 def __init__(self, cloud_tag=None, config=None, credential=None, name=None, owner_tag=None, region=None):
4151 '''
4152 cloud_tag : str
4153 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4154 credential : str
4155 name : str
4156 owner_tag : str
4157 region : str
4158 '''
4159 self.cloud_tag = cloud_tag
4160 self.config = config
4161 self.credential = credential
4162 self.name = name
4163 self.owner_tag = owner_tag
4164 self.region = region
4165
4166
4167 class ModelDefaultValues(Type):
4168 _toSchema = {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'config': 'config'}
4169 _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'config': 'config'}
4170 def __init__(self, cloud_region=None, cloud_tag=None, config=None):
4171 '''
4172 cloud_region : str
4173 cloud_tag : str
4174 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4175 '''
4176 self.cloud_region = cloud_region
4177 self.cloud_tag = cloud_tag
4178 self.config = config
4179
4180
4181 class ModelDefaults(Type):
4182 _toSchema = {'controller': 'controller', 'default': 'default', 'regions': 'regions'}
4183 _toPy = {'controller': 'controller', 'default': 'default', 'regions': 'regions'}
4184 def __init__(self, controller=None, default=None, regions=None):
4185 '''
4186 controller : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4187 default : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4188 regions : typing.Sequence<+T_co>[~RegionDefaults]<~RegionDefaults>
4189 '''
4190 self.controller = controller
4191 self.default = default
4192 self.regions = [RegionDefaults.from_json(o) for o in regions or []]
4193
4194
4195 class ModelDefaultsResult(Type):
4196 _toSchema = {'config': 'config'}
4197 _toPy = {'config': 'config'}
4198 def __init__(self, config=None):
4199 '''
4200 config : typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
4201 '''
4202 self.config = config
4203
4204
4205 class ModelInfoResult(Type):
4206 _toSchema = {'error': 'error', 'result': 'result'}
4207 _toPy = {'error': 'error', 'result': 'result'}
4208 def __init__(self, error=None, result=None):
4209 '''
4210 error : Error
4211 result : ModelInfo
4212 '''
4213 self.error = Error.from_json(error) if error else None
4214 self.result = ModelInfo.from_json(result) if result else None
4215
4216
4217 class ModelInfoResults(Type):
4218 _toSchema = {'results': 'results'}
4219 _toPy = {'results': 'results'}
4220 def __init__(self, results=None):
4221 '''
4222 results : typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
4223 '''
4224 self.results = [ModelInfoResult.from_json(o) for o in results or []]
4225
4226
4227 class ModelUnsetKeys(Type):
4228 _toSchema = {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'keys': 'keys'}
4229 _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'keys': 'keys'}
4230 def __init__(self, cloud_region=None, cloud_tag=None, keys=None):
4231 '''
4232 cloud_region : str
4233 cloud_tag : str
4234 keys : typing.Sequence<+T_co>[str]
4235 '''
4236 self.cloud_region = cloud_region
4237 self.cloud_tag = cloud_tag
4238 self.keys = keys
4239
4240
4241 class ModifyModelAccess(Type):
4242 _toSchema = {'access': 'access', 'action': 'action', 'model_tag': 'model-tag', 'user_tag': 'user-tag'}
4243 _toPy = {'access': 'access', 'action': 'action', 'model-tag': 'model_tag', 'user-tag': 'user_tag'}
4244 def __init__(self, access=None, action=None, model_tag=None, user_tag=None):
4245 '''
4246 access : str
4247 action : str
4248 model_tag : str
4249 user_tag : str
4250 '''
4251 self.access = access
4252 self.action = action
4253 self.model_tag = model_tag
4254 self.user_tag = user_tag
4255
4256
4257 class ModifyModelAccessRequest(Type):
4258 _toSchema = {'changes': 'changes'}
4259 _toPy = {'changes': 'changes'}
4260 def __init__(self, changes=None):
4261 '''
4262 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
4263 '''
4264 self.changes = [ModifyModelAccess.from_json(o) for o in changes or []]
4265
4266
4267 class RegionDefaults(Type):
4268 _toSchema = {'region_name': 'region-name', 'value': 'value'}
4269 _toPy = {'region-name': 'region_name', 'value': 'value'}
4270 def __init__(self, region_name=None, value=None):
4271 '''
4272 region_name : str
4273 value : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4274 '''
4275 self.region_name = region_name
4276 self.value = value
4277
4278
4279 class SetModelDefaults(Type):
4280 _toSchema = {'config': 'config'}
4281 _toPy = {'config': 'config'}
4282 def __init__(self, config=None):
4283 '''
4284 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
4285 '''
4286 self.config = [ModelDefaultValues.from_json(o) for o in config or []]
4287
4288
4289 class UnsetModelDefaults(Type):
4290 _toSchema = {'keys': 'keys'}
4291 _toPy = {'keys': 'keys'}
4292 def __init__(self, keys=None):
4293 '''
4294 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
4295 '''
4296 self.keys = [ModelUnsetKeys.from_json(o) for o in keys or []]
4297
4298
4299 class ConstraintsResult(Type):
4300 _toSchema = {'constraints': 'constraints', 'error': 'error'}
4301 _toPy = {'constraints': 'constraints', 'error': 'error'}
4302 def __init__(self, constraints=None, error=None):
4303 '''
4304 constraints : Value
4305 error : Error
4306 '''
4307 self.constraints = Value.from_json(constraints) if constraints else None
4308 self.error = Error.from_json(error) if error else None
4309
4310
4311 class ConstraintsResults(Type):
4312 _toSchema = {'results': 'results'}
4313 _toPy = {'results': 'results'}
4314 def __init__(self, results=None):
4315 '''
4316 results : typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
4317 '''
4318 self.results = [ConstraintsResult.from_json(o) for o in results or []]
4319
4320
4321 class ContainerConfig(Type):
4322 _toSchema = {'apt_mirror': 'apt-mirror', 'apt_proxy': 'apt-proxy', 'authorized_keys': 'authorized-keys', 'provider_type': 'provider-type', 'proxy': 'proxy', 'ssl_hostname_verification': 'ssl-hostname-verification', 'updatebehavior': 'UpdateBehavior'}
4323 _toPy = {'UpdateBehavior': 'updatebehavior', 'apt-mirror': 'apt_mirror', 'apt-proxy': 'apt_proxy', 'authorized-keys': 'authorized_keys', 'provider-type': 'provider_type', 'proxy': 'proxy', 'ssl-hostname-verification': 'ssl_hostname_verification'}
4324 def __init__(self, updatebehavior=None, apt_mirror=None, apt_proxy=None, authorized_keys=None, provider_type=None, proxy=None, ssl_hostname_verification=None):
4325 '''
4326 updatebehavior : UpdateBehavior
4327 apt_mirror : str
4328 apt_proxy : Settings
4329 authorized_keys : str
4330 provider_type : str
4331 proxy : Settings
4332 ssl_hostname_verification : bool
4333 '''
4334 self.updatebehavior = UpdateBehavior.from_json(updatebehavior) if updatebehavior else None
4335 self.apt_mirror = apt_mirror
4336 self.apt_proxy = Settings.from_json(apt_proxy) if apt_proxy else None
4337 self.authorized_keys = authorized_keys
4338 self.provider_type = provider_type
4339 self.proxy = Settings.from_json(proxy) if proxy else None
4340 self.ssl_hostname_verification = ssl_hostname_verification
4341
4342
4343 class ContainerManagerConfig(Type):
4344 _toSchema = {'config': 'config'}
4345 _toPy = {'config': 'config'}
4346 def __init__(self, config=None):
4347 '''
4348 config : typing.Mapping<~KT, +VT_co>[str, str]
4349 '''
4350 self.config = config
4351
4352
4353 class ContainerManagerConfigParams(Type):
4354 _toSchema = {'type_': 'type'}
4355 _toPy = {'type': 'type_'}
4356 def __init__(self, type_=None):
4357 '''
4358 type_ : str
4359 '''
4360 self.type_ = type_
4361
4362
4363 class DistributionGroupResult(Type):
4364 _toSchema = {'error': 'error', 'result': 'result'}
4365 _toPy = {'error': 'error', 'result': 'result'}
4366 def __init__(self, error=None, result=None):
4367 '''
4368 error : Error
4369 result : typing.Sequence<+T_co>[str]
4370 '''
4371 self.error = Error.from_json(error) if error else None
4372 self.result = result
4373
4374
4375 class DistributionGroupResults(Type):
4376 _toSchema = {'results': 'results'}
4377 _toPy = {'results': 'results'}
4378 def __init__(self, results=None):
4379 '''
4380 results : typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
4381 '''
4382 self.results = [DistributionGroupResult.from_json(o) for o in results or []]
4383
4384
4385 class InstanceInfo(Type):
4386 _toSchema = {'characteristics': 'characteristics', 'instance_id': 'instance-id', 'network_config': 'network-config', 'nonce': 'nonce', 'tag': 'tag', 'volume_attachments': 'volume-attachments', 'volumes': 'volumes'}
4387 _toPy = {'characteristics': 'characteristics', 'instance-id': 'instance_id', 'network-config': 'network_config', 'nonce': 'nonce', 'tag': 'tag', 'volume-attachments': 'volume_attachments', 'volumes': 'volumes'}
4388 def __init__(self, characteristics=None, instance_id=None, network_config=None, nonce=None, tag=None, volume_attachments=None, volumes=None):
4389 '''
4390 characteristics : HardwareCharacteristics
4391 instance_id : str
4392 network_config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
4393 nonce : str
4394 tag : str
4395 volume_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo>
4396 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
4397 '''
4398 self.characteristics = HardwareCharacteristics.from_json(characteristics) if characteristics else None
4399 self.instance_id = instance_id
4400 self.network_config = [NetworkConfig.from_json(o) for o in network_config or []]
4401 self.nonce = nonce
4402 self.tag = tag
4403 self.volume_attachments = volume_attachments
4404 self.volumes = [Volume.from_json(o) for o in volumes or []]
4405
4406
4407 class InstancesInfo(Type):
4408 _toSchema = {'machines': 'machines'}
4409 _toPy = {'machines': 'machines'}
4410 def __init__(self, machines=None):
4411 '''
4412 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
4413 '''
4414 self.machines = [InstanceInfo.from_json(o) for o in machines or []]
4415
4416
4417 class MachineContainers(Type):
4418 _toSchema = {'container_types': 'container-types', 'machine_tag': 'machine-tag'}
4419 _toPy = {'container-types': 'container_types', 'machine-tag': 'machine_tag'}
4420 def __init__(self, container_types=None, machine_tag=None):
4421 '''
4422 container_types : typing.Sequence<+T_co>[str]
4423 machine_tag : str
4424 '''
4425 self.container_types = container_types
4426 self.machine_tag = machine_tag
4427
4428
4429 class MachineContainersParams(Type):
4430 _toSchema = {'params': 'params'}
4431 _toPy = {'params': 'params'}
4432 def __init__(self, params=None):
4433 '''
4434 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
4435 '''
4436 self.params = [MachineContainers.from_json(o) for o in params or []]
4437
4438
4439 class MachineNetworkConfigResult(Type):
4440 _toSchema = {'error': 'error', 'info': 'info'}
4441 _toPy = {'error': 'error', 'info': 'info'}
4442 def __init__(self, error=None, info=None):
4443 '''
4444 error : Error
4445 info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
4446 '''
4447 self.error = Error.from_json(error) if error else None
4448 self.info = [NetworkConfig.from_json(o) for o in info or []]
4449
4450
4451 class MachineNetworkConfigResults(Type):
4452 _toSchema = {'results': 'results'}
4453 _toPy = {'results': 'results'}
4454 def __init__(self, results=None):
4455 '''
4456 results : typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
4457 '''
4458 self.results = [MachineNetworkConfigResult.from_json(o) for o in results or []]
4459
4460
4461 class ProvisioningInfo(Type):
4462 _toSchema = {'constraints': 'constraints', 'controller_config': 'controller-config', 'endpoint_bindings': 'endpoint-bindings', 'image_metadata': 'image-metadata', 'jobs': 'jobs', 'placement': 'placement', 'series': 'series', 'subnets_to_zones': 'subnets-to-zones', 'tags': 'tags', 'volumes': 'volumes'}
4463 _toPy = {'constraints': 'constraints', 'controller-config': 'controller_config', 'endpoint-bindings': 'endpoint_bindings', 'image-metadata': 'image_metadata', 'jobs': 'jobs', 'placement': 'placement', 'series': 'series', 'subnets-to-zones': 'subnets_to_zones', 'tags': 'tags', 'volumes': 'volumes'}
4464 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):
4465 '''
4466 constraints : Value
4467 controller_config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4468 endpoint_bindings : typing.Mapping<~KT, +VT_co>[str, str]
4469 image_metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
4470 jobs : typing.Sequence<+T_co>[str]
4471 placement : str
4472 series : str
4473 subnets_to_zones : typing.Sequence<+T_co>[str]
4474 tags : typing.Mapping<~KT, +VT_co>[str, str]
4475 volumes : typing.Sequence<+T_co>[~VolumeParams]<~VolumeParams>
4476 '''
4477 self.constraints = Value.from_json(constraints) if constraints else None
4478 self.controller_config = controller_config
4479 self.endpoint_bindings = endpoint_bindings
4480 self.image_metadata = [CloudImageMetadata.from_json(o) for o in image_metadata or []]
4481 self.jobs = jobs
4482 self.placement = placement
4483 self.series = series
4484 self.subnets_to_zones = subnets_to_zones
4485 self.tags = tags
4486 self.volumes = [VolumeParams.from_json(o) for o in volumes or []]
4487
4488
4489 class ProvisioningInfoResult(Type):
4490 _toSchema = {'error': 'error', 'result': 'result'}
4491 _toPy = {'error': 'error', 'result': 'result'}
4492 def __init__(self, error=None, result=None):
4493 '''
4494 error : Error
4495 result : ProvisioningInfo
4496 '''
4497 self.error = Error.from_json(error) if error else None
4498 self.result = ProvisioningInfo.from_json(result) if result else None
4499
4500
4501 class ProvisioningInfoResults(Type):
4502 _toSchema = {'results': 'results'}
4503 _toPy = {'results': 'results'}
4504 def __init__(self, results=None):
4505 '''
4506 results : typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
4507 '''
4508 self.results = [ProvisioningInfoResult.from_json(o) for o in results or []]
4509
4510
4511 class Settings(Type):
4512 _toSchema = {'ftp': 'Ftp', 'http': 'Http', 'https': 'Https', 'noproxy': 'NoProxy'}
4513 _toPy = {'Ftp': 'ftp', 'Http': 'http', 'Https': 'https', 'NoProxy': 'noproxy'}
4514 def __init__(self, ftp=None, http=None, https=None, noproxy=None):
4515 '''
4516 ftp : str
4517 http : str
4518 https : str
4519 noproxy : str
4520 '''
4521 self.ftp = ftp
4522 self.http = http
4523 self.https = https
4524 self.noproxy = noproxy
4525
4526
4527 class ToolsResult(Type):
4528 _toSchema = {'disable_ssl_hostname_verification': 'disable-ssl-hostname-verification', 'error': 'error', 'tools': 'tools'}
4529 _toPy = {'disable-ssl-hostname-verification': 'disable_ssl_hostname_verification', 'error': 'error', 'tools': 'tools'}
4530 def __init__(self, disable_ssl_hostname_verification=None, error=None, tools=None):
4531 '''
4532 disable_ssl_hostname_verification : bool
4533 error : Error
4534 tools : typing.Sequence<+T_co>[~Tools]<~Tools>
4535 '''
4536 self.disable_ssl_hostname_verification = disable_ssl_hostname_verification
4537 self.error = Error.from_json(error) if error else None
4538 self.tools = [Tools.from_json(o) for o in tools or []]
4539
4540
4541 class ToolsResults(Type):
4542 _toSchema = {'results': 'results'}
4543 _toPy = {'results': 'results'}
4544 def __init__(self, results=None):
4545 '''
4546 results : typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
4547 '''
4548 self.results = [ToolsResult.from_json(o) for o in results or []]
4549
4550
4551 class UpdateBehavior(Type):
4552 _toSchema = {'enable_os_refresh_update': 'enable-os-refresh-update', 'enable_os_upgrade': 'enable-os-upgrade'}
4553 _toPy = {'enable-os-refresh-update': 'enable_os_refresh_update', 'enable-os-upgrade': 'enable_os_upgrade'}
4554 def __init__(self, enable_os_refresh_update=None, enable_os_upgrade=None):
4555 '''
4556 enable_os_refresh_update : bool
4557 enable_os_upgrade : bool
4558 '''
4559 self.enable_os_refresh_update = enable_os_refresh_update
4560 self.enable_os_upgrade = enable_os_upgrade
4561
4562
4563 class Volume(Type):
4564 _toSchema = {'info': 'info', 'volume_tag': 'volume-tag'}
4565 _toPy = {'info': 'info', 'volume-tag': 'volume_tag'}
4566 def __init__(self, info=None, volume_tag=None):
4567 '''
4568 info : VolumeInfo
4569 volume_tag : str
4570 '''
4571 self.info = VolumeInfo.from_json(info) if info else None
4572 self.volume_tag = volume_tag
4573
4574
4575 class VolumeAttachmentInfo(Type):
4576 _toSchema = {'bus_address': 'bus-address', 'device_link': 'device-link', 'device_name': 'device-name', 'read_only': 'read-only'}
4577 _toPy = {'bus-address': 'bus_address', 'device-link': 'device_link', 'device-name': 'device_name', 'read-only': 'read_only'}
4578 def __init__(self, bus_address=None, device_link=None, device_name=None, read_only=None):
4579 '''
4580 bus_address : str
4581 device_link : str
4582 device_name : str
4583 read_only : bool
4584 '''
4585 self.bus_address = bus_address
4586 self.device_link = device_link
4587 self.device_name = device_name
4588 self.read_only = read_only
4589
4590
4591 class VolumeAttachmentParams(Type):
4592 _toSchema = {'instance_id': 'instance-id', 'machine_tag': 'machine-tag', 'provider': 'provider', 'read_only': 'read-only', 'volume_id': 'volume-id', 'volume_tag': 'volume-tag'}
4593 _toPy = {'instance-id': 'instance_id', 'machine-tag': 'machine_tag', 'provider': 'provider', 'read-only': 'read_only', 'volume-id': 'volume_id', 'volume-tag': 'volume_tag'}
4594 def __init__(self, instance_id=None, machine_tag=None, provider=None, read_only=None, volume_id=None, volume_tag=None):
4595 '''
4596 instance_id : str
4597 machine_tag : str
4598 provider : str
4599 read_only : bool
4600 volume_id : str
4601 volume_tag : str
4602 '''
4603 self.instance_id = instance_id
4604 self.machine_tag = machine_tag
4605 self.provider = provider
4606 self.read_only = read_only
4607 self.volume_id = volume_id
4608 self.volume_tag = volume_tag
4609
4610
4611 class VolumeInfo(Type):
4612 _toSchema = {'hardware_id': 'hardware-id', 'persistent': 'persistent', 'size': 'size', 'volume_id': 'volume-id'}
4613 _toPy = {'hardware-id': 'hardware_id', 'persistent': 'persistent', 'size': 'size', 'volume-id': 'volume_id'}
4614 def __init__(self, hardware_id=None, persistent=None, size=None, volume_id=None):
4615 '''
4616 hardware_id : str
4617 persistent : bool
4618 size : int
4619 volume_id : str
4620 '''
4621 self.hardware_id = hardware_id
4622 self.persistent = persistent
4623 self.size = size
4624 self.volume_id = volume_id
4625
4626
4627 class VolumeParams(Type):
4628 _toSchema = {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume_tag': 'volume-tag'}
4629 _toPy = {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume-tag': 'volume_tag'}
4630 def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volume_tag=None):
4631 '''
4632 attachment : VolumeAttachmentParams
4633 attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4634 provider : str
4635 size : int
4636 tags : typing.Mapping<~KT, +VT_co>[str, str]
4637 volume_tag : str
4638 '''
4639 self.attachment = VolumeAttachmentParams.from_json(attachment) if attachment else None
4640 self.attributes = attributes
4641 self.provider = provider
4642 self.size = size
4643 self.tags = tags
4644 self.volume_tag = volume_tag
4645
4646
4647 class WatchContainer(Type):
4648 _toSchema = {'container_type': 'container-type', 'machine_tag': 'machine-tag'}
4649 _toPy = {'container-type': 'container_type', 'machine-tag': 'machine_tag'}
4650 def __init__(self, container_type=None, machine_tag=None):
4651 '''
4652 container_type : str
4653 machine_tag : str
4654 '''
4655 self.container_type = container_type
4656 self.machine_tag = machine_tag
4657
4658
4659 class WatchContainers(Type):
4660 _toSchema = {'params': 'params'}
4661 _toPy = {'params': 'params'}
4662 def __init__(self, params=None):
4663 '''
4664 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
4665 '''
4666 self.params = [WatchContainer.from_json(o) for o in params or []]
4667
4668
4669 class ProxyConfig(Type):
4670 _toSchema = {'ftp': 'ftp', 'http': 'http', 'https': 'https', 'no_proxy': 'no-proxy'}
4671 _toPy = {'ftp': 'ftp', 'http': 'http', 'https': 'https', 'no-proxy': 'no_proxy'}
4672 def __init__(self, ftp=None, http=None, https=None, no_proxy=None):
4673 '''
4674 ftp : str
4675 http : str
4676 https : str
4677 no_proxy : str
4678 '''
4679 self.ftp = ftp
4680 self.http = http
4681 self.https = https
4682 self.no_proxy = no_proxy
4683
4684
4685 class ProxyConfigResult(Type):
4686 _toSchema = {'apt_proxy_settings': 'apt-proxy-settings', 'error': 'error', 'proxy_settings': 'proxy-settings'}
4687 _toPy = {'apt-proxy-settings': 'apt_proxy_settings', 'error': 'error', 'proxy-settings': 'proxy_settings'}
4688 def __init__(self, apt_proxy_settings=None, error=None, proxy_settings=None):
4689 '''
4690 apt_proxy_settings : ProxyConfig
4691 error : Error
4692 proxy_settings : ProxyConfig
4693 '''
4694 self.apt_proxy_settings = ProxyConfig.from_json(apt_proxy_settings) if apt_proxy_settings else None
4695 self.error = Error.from_json(error) if error else None
4696 self.proxy_settings = ProxyConfig.from_json(proxy_settings) if proxy_settings else None
4697
4698
4699 class ProxyConfigResults(Type):
4700 _toSchema = {'results': 'results'}
4701 _toPy = {'results': 'results'}
4702 def __init__(self, results=None):
4703 '''
4704 results : typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
4705 '''
4706 self.results = [ProxyConfigResult.from_json(o) for o in results or []]
4707
4708
4709 class RebootActionResult(Type):
4710 _toSchema = {'error': 'error', 'result': 'result'}
4711 _toPy = {'error': 'error', 'result': 'result'}
4712 def __init__(self, error=None, result=None):
4713 '''
4714 error : Error
4715 result : str
4716 '''
4717 self.error = Error.from_json(error) if error else None
4718 self.result = result
4719
4720
4721 class RebootActionResults(Type):
4722 _toSchema = {'results': 'results'}
4723 _toPy = {'results': 'results'}
4724 def __init__(self, results=None):
4725 '''
4726 results : typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
4727 '''
4728 self.results = [RebootActionResult.from_json(o) for o in results or []]
4729
4730
4731 class RelationUnitsChange(Type):
4732 _toSchema = {'changed': 'changed', 'departed': 'departed'}
4733 _toPy = {'changed': 'changed', 'departed': 'departed'}
4734 def __init__(self, changed=None, departed=None):
4735 '''
4736 changed : typing.Mapping<~KT, +VT_co>[str, ~UnitSettings]<~UnitSettings>
4737 departed : typing.Sequence<+T_co>[str]
4738 '''
4739 self.changed = changed
4740 self.departed = departed
4741
4742
4743 class RelationUnitsWatchResult(Type):
4744 _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
4745 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
4746 def __init__(self, changes=None, error=None, watcher_id=None):
4747 '''
4748 changes : RelationUnitsChange
4749 error : Error
4750 watcher_id : str
4751 '''
4752 self.changes = RelationUnitsChange.from_json(changes) if changes else None
4753 self.error = Error.from_json(error) if error else None
4754 self.watcher_id = watcher_id
4755
4756
4757 class UnitSettings(Type):
4758 _toSchema = {'version': 'version'}
4759 _toPy = {'version': 'version'}
4760 def __init__(self, version=None):
4761 '''
4762 version : int
4763 '''
4764 self.version = version
4765
4766
4767 class RetryStrategy(Type):
4768 _toSchema = {'jitter_retry_time': 'jitter-retry-time', 'max_retry_time': 'max-retry-time', 'min_retry_time': 'min-retry-time', 'retry_time_factor': 'retry-time-factor', 'should_retry': 'should-retry'}
4769 _toPy = {'jitter-retry-time': 'jitter_retry_time', 'max-retry-time': 'max_retry_time', 'min-retry-time': 'min_retry_time', 'retry-time-factor': 'retry_time_factor', 'should-retry': 'should_retry'}
4770 def __init__(self, jitter_retry_time=None, max_retry_time=None, min_retry_time=None, retry_time_factor=None, should_retry=None):
4771 '''
4772 jitter_retry_time : bool
4773 max_retry_time : int
4774 min_retry_time : int
4775 retry_time_factor : int
4776 should_retry : bool
4777 '''
4778 self.jitter_retry_time = jitter_retry_time
4779 self.max_retry_time = max_retry_time
4780 self.min_retry_time = min_retry_time
4781 self.retry_time_factor = retry_time_factor
4782 self.should_retry = should_retry
4783
4784
4785 class RetryStrategyResult(Type):
4786 _toSchema = {'error': 'error', 'result': 'result'}
4787 _toPy = {'error': 'error', 'result': 'result'}
4788 def __init__(self, error=None, result=None):
4789 '''
4790 error : Error
4791 result : RetryStrategy
4792 '''
4793 self.error = Error.from_json(error) if error else None
4794 self.result = RetryStrategy.from_json(result) if result else None
4795
4796
4797 class RetryStrategyResults(Type):
4798 _toSchema = {'results': 'results'}
4799 _toPy = {'results': 'results'}
4800 def __init__(self, results=None):
4801 '''
4802 results : typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
4803 '''
4804 self.results = [RetryStrategyResult.from_json(o) for o in results or []]
4805
4806
4807 class SSHAddressResult(Type):
4808 _toSchema = {'address': 'address', 'error': 'error'}
4809 _toPy = {'address': 'address', 'error': 'error'}
4810 def __init__(self, address=None, error=None):
4811 '''
4812 address : str
4813 error : Error
4814 '''
4815 self.address = address
4816 self.error = Error.from_json(error) if error else None
4817
4818
4819 class SSHAddressResults(Type):
4820 _toSchema = {'results': 'results'}
4821 _toPy = {'results': 'results'}
4822 def __init__(self, results=None):
4823 '''
4824 results : typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
4825 '''
4826 self.results = [SSHAddressResult.from_json(o) for o in results or []]
4827
4828
4829 class SSHAddressesResult(Type):
4830 _toSchema = {'addresses': 'addresses', 'error': 'error'}
4831 _toPy = {'addresses': 'addresses', 'error': 'error'}
4832 def __init__(self, addresses=None, error=None):
4833 '''
4834 addresses : typing.Sequence<+T_co>[str]
4835 error : Error
4836 '''
4837 self.addresses = addresses
4838 self.error = Error.from_json(error) if error else None
4839
4840
4841 class SSHAddressesResults(Type):
4842 _toSchema = {'results': 'results'}
4843 _toPy = {'results': 'results'}
4844 def __init__(self, results=None):
4845 '''
4846 results : typing.Sequence<+T_co>[~SSHAddressesResult]<~SSHAddressesResult>
4847 '''
4848 self.results = [SSHAddressesResult.from_json(o) for o in results or []]
4849
4850
4851 class SSHProxyResult(Type):
4852 _toSchema = {'use_proxy': 'use-proxy'}
4853 _toPy = {'use-proxy': 'use_proxy'}
4854 def __init__(self, use_proxy=None):
4855 '''
4856 use_proxy : bool
4857 '''
4858 self.use_proxy = use_proxy
4859
4860
4861 class SSHPublicKeysResult(Type):
4862 _toSchema = {'error': 'error', 'public_keys': 'public-keys'}
4863 _toPy = {'error': 'error', 'public-keys': 'public_keys'}
4864 def __init__(self, error=None, public_keys=None):
4865 '''
4866 error : Error
4867 public_keys : typing.Sequence<+T_co>[str]
4868 '''
4869 self.error = Error.from_json(error) if error else None
4870 self.public_keys = public_keys
4871
4872
4873 class SSHPublicKeysResults(Type):
4874 _toSchema = {'results': 'results'}
4875 _toPy = {'results': 'results'}
4876 def __init__(self, results=None):
4877 '''
4878 results : typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
4879 '''
4880 self.results = [SSHPublicKeysResult.from_json(o) for o in results or []]
4881
4882
4883 class SingularClaim(Type):
4884 _toSchema = {'controller_tag': 'controller-tag', 'duration': 'duration', 'model_tag': 'model-tag'}
4885 _toPy = {'controller-tag': 'controller_tag', 'duration': 'duration', 'model-tag': 'model_tag'}
4886 def __init__(self, controller_tag=None, duration=None, model_tag=None):
4887 '''
4888 controller_tag : str
4889 duration : int
4890 model_tag : str
4891 '''
4892 self.controller_tag = controller_tag
4893 self.duration = duration
4894 self.model_tag = model_tag
4895
4896
4897 class SingularClaims(Type):
4898 _toSchema = {'claims': 'claims'}
4899 _toPy = {'claims': 'claims'}
4900 def __init__(self, claims=None):
4901 '''
4902 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
4903 '''
4904 self.claims = [SingularClaim.from_json(o) for o in claims or []]
4905
4906
4907 class ListSpacesResults(Type):
4908 _toSchema = {'results': 'results'}
4909 _toPy = {'results': 'results'}
4910 def __init__(self, results=None):
4911 '''
4912 results : typing.Sequence<+T_co>[~Space]<~Space>
4913 '''
4914 self.results = [Space.from_json(o) for o in results or []]
4915
4916
4917 class Space(Type):
4918 _toSchema = {'error': 'error', 'name': 'name', 'subnets': 'subnets'}
4919 _toPy = {'error': 'error', 'name': 'name', 'subnets': 'subnets'}
4920 def __init__(self, error=None, name=None, subnets=None):
4921 '''
4922 error : Error
4923 name : str
4924 subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet>
4925 '''
4926 self.error = Error.from_json(error) if error else None
4927 self.name = name
4928 self.subnets = [Subnet.from_json(o) for o in subnets or []]
4929
4930
4931 class StatusHistoryPruneArgs(Type):
4932 _toSchema = {'max_history_mb': 'max-history-mb', 'max_history_time': 'max-history-time'}
4933 _toPy = {'max-history-mb': 'max_history_mb', 'max-history-time': 'max_history_time'}
4934 def __init__(self, max_history_mb=None, max_history_time=None):
4935 '''
4936 max_history_mb : int
4937 max_history_time : int
4938 '''
4939 self.max_history_mb = max_history_mb
4940 self.max_history_time = max_history_time
4941
4942
4943 class FilesystemAttachmentInfo(Type):
4944 _toSchema = {'mount_point': 'mount-point', 'read_only': 'read-only'}
4945 _toPy = {'mount-point': 'mount_point', 'read-only': 'read_only'}
4946 def __init__(self, mount_point=None, read_only=None):
4947 '''
4948 mount_point : str
4949 read_only : bool
4950 '''
4951 self.mount_point = mount_point
4952 self.read_only = read_only
4953
4954
4955 class FilesystemDetails(Type):
4956 _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'machine_attachments': 'machine-attachments', 'status': 'status', 'storage': 'storage', 'volume_tag': 'volume-tag'}
4957 _toPy = {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'machine-attachments': 'machine_attachments', 'status': 'status', 'storage': 'storage', 'volume-tag': 'volume_tag'}
4958 def __init__(self, filesystem_tag=None, info=None, machine_attachments=None, status=None, storage=None, volume_tag=None):
4959 '''
4960 filesystem_tag : str
4961 info : FilesystemInfo
4962 machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~FilesystemAttachmentInfo]<~FilesystemAttachmentInfo>
4963 status : EntityStatus
4964 storage : StorageDetails
4965 volume_tag : str
4966 '''
4967 self.filesystem_tag = filesystem_tag
4968 self.info = FilesystemInfo.from_json(info) if info else None
4969 self.machine_attachments = machine_attachments
4970 self.status = EntityStatus.from_json(status) if status else None
4971 self.storage = StorageDetails.from_json(storage) if storage else None
4972 self.volume_tag = volume_tag
4973
4974
4975 class FilesystemDetailsListResult(Type):
4976 _toSchema = {'error': 'error', 'result': 'result'}
4977 _toPy = {'error': 'error', 'result': 'result'}
4978 def __init__(self, error=None, result=None):
4979 '''
4980 error : Error
4981 result : typing.Sequence<+T_co>[~FilesystemDetails]<~FilesystemDetails>
4982 '''
4983 self.error = Error.from_json(error) if error else None
4984 self.result = [FilesystemDetails.from_json(o) for o in result or []]
4985
4986
4987 class FilesystemDetailsListResults(Type):
4988 _toSchema = {'results': 'results'}
4989 _toPy = {'results': 'results'}
4990 def __init__(self, results=None):
4991 '''
4992 results : typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
4993 '''
4994 self.results = [FilesystemDetailsListResult.from_json(o) for o in results or []]
4995
4996
4997 class FilesystemFilter(Type):
4998 _toSchema = {'machines': 'machines'}
4999 _toPy = {'machines': 'machines'}
5000 def __init__(self, machines=None):
5001 '''
5002 machines : typing.Sequence<+T_co>[str]
5003 '''
5004 self.machines = machines
5005
5006
5007 class FilesystemFilters(Type):
5008 _toSchema = {'filters': 'filters'}
5009 _toPy = {'filters': 'filters'}
5010 def __init__(self, filters=None):
5011 '''
5012 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
5013 '''
5014 self.filters = [FilesystemFilter.from_json(o) for o in filters or []]
5015
5016
5017 class FilesystemInfo(Type):
5018 _toSchema = {'filesystem_id': 'filesystem-id', 'size': 'size'}
5019 _toPy = {'filesystem-id': 'filesystem_id', 'size': 'size'}
5020 def __init__(self, filesystem_id=None, size=None):
5021 '''
5022 filesystem_id : str
5023 size : int
5024 '''
5025 self.filesystem_id = filesystem_id
5026 self.size = size
5027
5028
5029 class StorageAddParams(Type):
5030 _toSchema = {'name': 'name', 'storage': 'storage', 'unit': 'unit'}
5031 _toPy = {'name': 'name', 'storage': 'storage', 'unit': 'unit'}
5032 def __init__(self, name=None, storage=None, unit=None):
5033 '''
5034 name : str
5035 storage : StorageConstraints
5036 unit : str
5037 '''
5038 self.name = name
5039 self.storage = StorageConstraints.from_json(storage) if storage else None
5040 self.unit = unit
5041
5042
5043 class StorageAttachmentDetails(Type):
5044 _toSchema = {'location': 'location', 'machine_tag': 'machine-tag', 'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
5045 _toPy = {'location': 'location', 'machine-tag': 'machine_tag', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'}
5046 def __init__(self, location=None, machine_tag=None, storage_tag=None, unit_tag=None):
5047 '''
5048 location : str
5049 machine_tag : str
5050 storage_tag : str
5051 unit_tag : str
5052 '''
5053 self.location = location
5054 self.machine_tag = machine_tag
5055 self.storage_tag = storage_tag
5056 self.unit_tag = unit_tag
5057
5058
5059 class StorageDetails(Type):
5060 _toSchema = {'attachments': 'attachments', 'kind': 'kind', 'owner_tag': 'owner-tag', 'persistent': 'persistent', 'status': 'status', 'storage_tag': 'storage-tag'}
5061 _toPy = {'attachments': 'attachments', 'kind': 'kind', 'owner-tag': 'owner_tag', 'persistent': 'persistent', 'status': 'status', 'storage-tag': 'storage_tag'}
5062 def __init__(self, attachments=None, kind=None, owner_tag=None, persistent=None, status=None, storage_tag=None):
5063 '''
5064 attachments : typing.Mapping<~KT, +VT_co>[str, ~StorageAttachmentDetails]<~StorageAttachmentDetails>
5065 kind : int
5066 owner_tag : str
5067 persistent : bool
5068 status : EntityStatus
5069 storage_tag : str
5070 '''
5071 self.attachments = attachments
5072 self.kind = kind
5073 self.owner_tag = owner_tag
5074 self.persistent = persistent
5075 self.status = EntityStatus.from_json(status) if status else None
5076 self.storage_tag = storage_tag
5077
5078
5079 class StorageDetailsListResult(Type):
5080 _toSchema = {'error': 'error', 'result': 'result'}
5081 _toPy = {'error': 'error', 'result': 'result'}
5082 def __init__(self, error=None, result=None):
5083 '''
5084 error : Error
5085 result : typing.Sequence<+T_co>[~StorageDetails]<~StorageDetails>
5086 '''
5087 self.error = Error.from_json(error) if error else None
5088 self.result = [StorageDetails.from_json(o) for o in result or []]
5089
5090
5091 class StorageDetailsListResults(Type):
5092 _toSchema = {'results': 'results'}
5093 _toPy = {'results': 'results'}
5094 def __init__(self, results=None):
5095 '''
5096 results : typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
5097 '''
5098 self.results = [StorageDetailsListResult.from_json(o) for o in results or []]
5099
5100
5101 class StorageDetailsResult(Type):
5102 _toSchema = {'error': 'error', 'result': 'result'}
5103 _toPy = {'error': 'error', 'result': 'result'}
5104 def __init__(self, error=None, result=None):
5105 '''
5106 error : Error
5107 result : StorageDetails
5108 '''
5109 self.error = Error.from_json(error) if error else None
5110 self.result = StorageDetails.from_json(result) if result else None
5111
5112
5113 class StorageDetailsResults(Type):
5114 _toSchema = {'results': 'results'}
5115 _toPy = {'results': 'results'}
5116 def __init__(self, results=None):
5117 '''
5118 results : typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
5119 '''
5120 self.results = [StorageDetailsResult.from_json(o) for o in results or []]
5121
5122
5123 class StorageFilter(Type):
5124 _toSchema = {}
5125 _toPy = {}
5126 def __init__(self):
5127 '''
5128
5129 '''
5130 pass
5131
5132
5133 class StorageFilters(Type):
5134 _toSchema = {'filters': 'filters'}
5135 _toPy = {'filters': 'filters'}
5136 def __init__(self, filters=None):
5137 '''
5138 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
5139 '''
5140 self.filters = [StorageFilter.from_json(o) for o in filters or []]
5141
5142
5143 class StoragePool(Type):
5144 _toSchema = {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'}
5145 _toPy = {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'}
5146 def __init__(self, attrs=None, name=None, provider=None):
5147 '''
5148 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5149 name : str
5150 provider : str
5151 '''
5152 self.attrs = attrs
5153 self.name = name
5154 self.provider = provider
5155
5156
5157 class StoragePoolFilter(Type):
5158 _toSchema = {'names': 'names', 'providers': 'providers'}
5159 _toPy = {'names': 'names', 'providers': 'providers'}
5160 def __init__(self, names=None, providers=None):
5161 '''
5162 names : typing.Sequence<+T_co>[str]
5163 providers : typing.Sequence<+T_co>[str]
5164 '''
5165 self.names = names
5166 self.providers = providers
5167
5168
5169 class StoragePoolFilters(Type):
5170 _toSchema = {'filters': 'filters'}
5171 _toPy = {'filters': 'filters'}
5172 def __init__(self, filters=None):
5173 '''
5174 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
5175 '''
5176 self.filters = [StoragePoolFilter.from_json(o) for o in filters or []]
5177
5178
5179 class StoragePoolsResult(Type):
5180 _toSchema = {'error': 'error', 'storage_pools': 'storage-pools'}
5181 _toPy = {'error': 'error', 'storage-pools': 'storage_pools'}
5182 def __init__(self, error=None, storage_pools=None):
5183 '''
5184 error : Error
5185 storage_pools : typing.Sequence<+T_co>[~StoragePool]<~StoragePool>
5186 '''
5187 self.error = Error.from_json(error) if error else None
5188 self.storage_pools = [StoragePool.from_json(o) for o in storage_pools or []]
5189
5190
5191 class StoragePoolsResults(Type):
5192 _toSchema = {'results': 'results'}
5193 _toPy = {'results': 'results'}
5194 def __init__(self, results=None):
5195 '''
5196 results : typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
5197 '''
5198 self.results = [StoragePoolsResult.from_json(o) for o in results or []]
5199
5200
5201 class StoragesAddParams(Type):
5202 _toSchema = {'storages': 'storages'}
5203 _toPy = {'storages': 'storages'}
5204 def __init__(self, storages=None):
5205 '''
5206 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
5207 '''
5208 self.storages = [StorageAddParams.from_json(o) for o in storages or []]
5209
5210
5211 class VolumeDetails(Type):
5212 _toSchema = {'info': 'info', 'machine_attachments': 'machine-attachments', 'status': 'status', 'storage': 'storage', 'volume_tag': 'volume-tag'}
5213 _toPy = {'info': 'info', 'machine-attachments': 'machine_attachments', 'status': 'status', 'storage': 'storage', 'volume-tag': 'volume_tag'}
5214 def __init__(self, info=None, machine_attachments=None, status=None, storage=None, volume_tag=None):
5215 '''
5216 info : VolumeInfo
5217 machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo>
5218 status : EntityStatus
5219 storage : StorageDetails
5220 volume_tag : str
5221 '''
5222 self.info = VolumeInfo.from_json(info) if info else None
5223 self.machine_attachments = machine_attachments
5224 self.status = EntityStatus.from_json(status) if status else None
5225 self.storage = StorageDetails.from_json(storage) if storage else None
5226 self.volume_tag = volume_tag
5227
5228
5229 class VolumeDetailsListResult(Type):
5230 _toSchema = {'error': 'error', 'result': 'result'}
5231 _toPy = {'error': 'error', 'result': 'result'}
5232 def __init__(self, error=None, result=None):
5233 '''
5234 error : Error
5235 result : typing.Sequence<+T_co>[~VolumeDetails]<~VolumeDetails>
5236 '''
5237 self.error = Error.from_json(error) if error else None
5238 self.result = [VolumeDetails.from_json(o) for o in result or []]
5239
5240
5241 class VolumeDetailsListResults(Type):
5242 _toSchema = {'results': 'results'}
5243 _toPy = {'results': 'results'}
5244 def __init__(self, results=None):
5245 '''
5246 results : typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
5247 '''
5248 self.results = [VolumeDetailsListResult.from_json(o) for o in results or []]
5249
5250
5251 class VolumeFilter(Type):
5252 _toSchema = {'machines': 'machines'}
5253 _toPy = {'machines': 'machines'}
5254 def __init__(self, machines=None):
5255 '''
5256 machines : typing.Sequence<+T_co>[str]
5257 '''
5258 self.machines = machines
5259
5260
5261 class VolumeFilters(Type):
5262 _toSchema = {'filters': 'filters'}
5263 _toPy = {'filters': 'filters'}
5264 def __init__(self, filters=None):
5265 '''
5266 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
5267 '''
5268 self.filters = [VolumeFilter.from_json(o) for o in filters or []]
5269
5270
5271 class BlockDeviceResult(Type):
5272 _toSchema = {'error': 'error', 'result': 'result'}
5273 _toPy = {'error': 'error', 'result': 'result'}
5274 def __init__(self, error=None, result=None):
5275 '''
5276 error : Error
5277 result : BlockDevice
5278 '''
5279 self.error = Error.from_json(error) if error else None
5280 self.result = BlockDevice.from_json(result) if result else None
5281
5282
5283 class BlockDeviceResults(Type):
5284 _toSchema = {'results': 'results'}
5285 _toPy = {'results': 'results'}
5286 def __init__(self, results=None):
5287 '''
5288 results : typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
5289 '''
5290 self.results = [BlockDeviceResult.from_json(o) for o in results or []]
5291
5292
5293 class Filesystem(Type):
5294 _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'volume_tag': 'volume-tag'}
5295 _toPy = {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'volume-tag': 'volume_tag'}
5296 def __init__(self, filesystem_tag=None, info=None, volume_tag=None):
5297 '''
5298 filesystem_tag : str
5299 info : FilesystemInfo
5300 volume_tag : str
5301 '''
5302 self.filesystem_tag = filesystem_tag
5303 self.info = FilesystemInfo.from_json(info) if info else None
5304 self.volume_tag = volume_tag
5305
5306
5307 class FilesystemAttachment(Type):
5308 _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'machine_tag': 'machine-tag'}
5309 _toPy = {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'machine-tag': 'machine_tag'}
5310 def __init__(self, filesystem_tag=None, info=None, machine_tag=None):
5311 '''
5312 filesystem_tag : str
5313 info : FilesystemAttachmentInfo
5314 machine_tag : str
5315 '''
5316 self.filesystem_tag = filesystem_tag
5317 self.info = FilesystemAttachmentInfo.from_json(info) if info else None
5318 self.machine_tag = machine_tag
5319
5320
5321 class FilesystemAttachmentParams(Type):
5322 _toSchema = {'filesystem_id': 'filesystem-id', 'filesystem_tag': 'filesystem-tag', 'instance_id': 'instance-id', 'machine_tag': 'machine-tag', 'mount_point': 'mount-point', 'provider': 'provider', 'read_only': 'read-only'}
5323 _toPy = {'filesystem-id': 'filesystem_id', 'filesystem-tag': 'filesystem_tag', 'instance-id': 'instance_id', 'machine-tag': 'machine_tag', 'mount-point': 'mount_point', 'provider': 'provider', 'read-only': 'read_only'}
5324 def __init__(self, filesystem_id=None, filesystem_tag=None, instance_id=None, machine_tag=None, mount_point=None, provider=None, read_only=None):
5325 '''
5326 filesystem_id : str
5327 filesystem_tag : str
5328 instance_id : str
5329 machine_tag : str
5330 mount_point : str
5331 provider : str
5332 read_only : bool
5333 '''
5334 self.filesystem_id = filesystem_id
5335 self.filesystem_tag = filesystem_tag
5336 self.instance_id = instance_id
5337 self.machine_tag = machine_tag
5338 self.mount_point = mount_point
5339 self.provider = provider
5340 self.read_only = read_only
5341
5342
5343 class FilesystemAttachmentParamsResult(Type):
5344 _toSchema = {'error': 'error', 'result': 'result'}
5345 _toPy = {'error': 'error', 'result': 'result'}
5346 def __init__(self, error=None, result=None):
5347 '''
5348 error : Error
5349 result : FilesystemAttachmentParams
5350 '''
5351 self.error = Error.from_json(error) if error else None
5352 self.result = FilesystemAttachmentParams.from_json(result) if result else None
5353
5354
5355 class FilesystemAttachmentParamsResults(Type):
5356 _toSchema = {'results': 'results'}
5357 _toPy = {'results': 'results'}
5358 def __init__(self, results=None):
5359 '''
5360 results : typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
5361 '''
5362 self.results = [FilesystemAttachmentParamsResult.from_json(o) for o in results or []]
5363
5364
5365 class FilesystemAttachmentResult(Type):
5366 _toSchema = {'error': 'error', 'result': 'result'}
5367 _toPy = {'error': 'error', 'result': 'result'}
5368 def __init__(self, error=None, result=None):
5369 '''
5370 error : Error
5371 result : FilesystemAttachment
5372 '''
5373 self.error = Error.from_json(error) if error else None
5374 self.result = FilesystemAttachment.from_json(result) if result else None
5375
5376
5377 class FilesystemAttachmentResults(Type):
5378 _toSchema = {'results': 'results'}
5379 _toPy = {'results': 'results'}
5380 def __init__(self, results=None):
5381 '''
5382 results : typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
5383 '''
5384 self.results = [FilesystemAttachmentResult.from_json(o) for o in results or []]
5385
5386
5387 class FilesystemAttachments(Type):
5388 _toSchema = {'filesystem_attachments': 'filesystem-attachments'}
5389 _toPy = {'filesystem-attachments': 'filesystem_attachments'}
5390 def __init__(self, filesystem_attachments=None):
5391 '''
5392 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
5393 '''
5394 self.filesystem_attachments = [FilesystemAttachment.from_json(o) for o in filesystem_attachments or []]
5395
5396
5397 class FilesystemParams(Type):
5398 _toSchema = {'attachment': 'attachment', 'attributes': 'attributes', 'filesystem_tag': 'filesystem-tag', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume_tag': 'volume-tag'}
5399 _toPy = {'attachment': 'attachment', 'attributes': 'attributes', 'filesystem-tag': 'filesystem_tag', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume-tag': 'volume_tag'}
5400 def __init__(self, attachment=None, attributes=None, filesystem_tag=None, provider=None, size=None, tags=None, volume_tag=None):
5401 '''
5402 attachment : FilesystemAttachmentParams
5403 attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5404 filesystem_tag : str
5405 provider : str
5406 size : int
5407 tags : typing.Mapping<~KT, +VT_co>[str, str]
5408 volume_tag : str
5409 '''
5410 self.attachment = FilesystemAttachmentParams.from_json(attachment) if attachment else None
5411 self.attributes = attributes
5412 self.filesystem_tag = filesystem_tag
5413 self.provider = provider
5414 self.size = size
5415 self.tags = tags
5416 self.volume_tag = volume_tag
5417
5418
5419 class FilesystemParamsResult(Type):
5420 _toSchema = {'error': 'error', 'result': 'result'}
5421 _toPy = {'error': 'error', 'result': 'result'}
5422 def __init__(self, error=None, result=None):
5423 '''
5424 error : Error
5425 result : FilesystemParams
5426 '''
5427 self.error = Error.from_json(error) if error else None
5428 self.result = FilesystemParams.from_json(result) if result else None
5429
5430
5431 class FilesystemParamsResults(Type):
5432 _toSchema = {'results': 'results'}
5433 _toPy = {'results': 'results'}
5434 def __init__(self, results=None):
5435 '''
5436 results : typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
5437 '''
5438 self.results = [FilesystemParamsResult.from_json(o) for o in results or []]
5439
5440
5441 class FilesystemResult(Type):
5442 _toSchema = {'error': 'error', 'result': 'result'}
5443 _toPy = {'error': 'error', 'result': 'result'}
5444 def __init__(self, error=None, result=None):
5445 '''
5446 error : Error
5447 result : Filesystem
5448 '''
5449 self.error = Error.from_json(error) if error else None
5450 self.result = Filesystem.from_json(result) if result else None
5451
5452
5453 class FilesystemResults(Type):
5454 _toSchema = {'results': 'results'}
5455 _toPy = {'results': 'results'}
5456 def __init__(self, results=None):
5457 '''
5458 results : typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
5459 '''
5460 self.results = [FilesystemResult.from_json(o) for o in results or []]
5461
5462
5463 class Filesystems(Type):
5464 _toSchema = {'filesystems': 'filesystems'}
5465 _toPy = {'filesystems': 'filesystems'}
5466 def __init__(self, filesystems=None):
5467 '''
5468 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
5469 '''
5470 self.filesystems = [Filesystem.from_json(o) for o in filesystems or []]
5471
5472
5473 class MachineStorageIds(Type):
5474 _toSchema = {'ids': 'ids'}
5475 _toPy = {'ids': 'ids'}
5476 def __init__(self, ids=None):
5477 '''
5478 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
5479 '''
5480 self.ids = [MachineStorageId.from_json(o) for o in ids or []]
5481
5482
5483 class MachineStorageIdsWatchResults(Type):
5484 _toSchema = {'results': 'results'}
5485 _toPy = {'results': 'results'}
5486 def __init__(self, results=None):
5487 '''
5488 results : typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
5489 '''
5490 self.results = [MachineStorageIdsWatchResult.from_json(o) for o in results or []]
5491
5492
5493 class VolumeAttachment(Type):
5494 _toSchema = {'info': 'info', 'machine_tag': 'machine-tag', 'volume_tag': 'volume-tag'}
5495 _toPy = {'info': 'info', 'machine-tag': 'machine_tag', 'volume-tag': 'volume_tag'}
5496 def __init__(self, info=None, machine_tag=None, volume_tag=None):
5497 '''
5498 info : VolumeAttachmentInfo
5499 machine_tag : str
5500 volume_tag : str
5501 '''
5502 self.info = VolumeAttachmentInfo.from_json(info) if info else None
5503 self.machine_tag = machine_tag
5504 self.volume_tag = volume_tag
5505
5506
5507 class VolumeAttachmentParamsResult(Type):
5508 _toSchema = {'error': 'error', 'result': 'result'}
5509 _toPy = {'error': 'error', 'result': 'result'}
5510 def __init__(self, error=None, result=None):
5511 '''
5512 error : Error
5513 result : VolumeAttachmentParams
5514 '''
5515 self.error = Error.from_json(error) if error else None
5516 self.result = VolumeAttachmentParams.from_json(result) if result else None
5517
5518
5519 class VolumeAttachmentParamsResults(Type):
5520 _toSchema = {'results': 'results'}
5521 _toPy = {'results': 'results'}
5522 def __init__(self, results=None):
5523 '''
5524 results : typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
5525 '''
5526 self.results = [VolumeAttachmentParamsResult.from_json(o) for o in results or []]
5527
5528
5529 class VolumeAttachmentResult(Type):
5530 _toSchema = {'error': 'error', 'result': 'result'}
5531 _toPy = {'error': 'error', 'result': 'result'}
5532 def __init__(self, error=None, result=None):
5533 '''
5534 error : Error
5535 result : VolumeAttachment
5536 '''
5537 self.error = Error.from_json(error) if error else None
5538 self.result = VolumeAttachment.from_json(result) if result else None
5539
5540
5541 class VolumeAttachmentResults(Type):
5542 _toSchema = {'results': 'results'}
5543 _toPy = {'results': 'results'}
5544 def __init__(self, results=None):
5545 '''
5546 results : typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
5547 '''
5548 self.results = [VolumeAttachmentResult.from_json(o) for o in results or []]
5549
5550
5551 class VolumeAttachments(Type):
5552 _toSchema = {'volume_attachments': 'volume-attachments'}
5553 _toPy = {'volume-attachments': 'volume_attachments'}
5554 def __init__(self, volume_attachments=None):
5555 '''
5556 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
5557 '''
5558 self.volume_attachments = [VolumeAttachment.from_json(o) for o in volume_attachments or []]
5559
5560
5561 class VolumeParamsResult(Type):
5562 _toSchema = {'error': 'error', 'result': 'result'}
5563 _toPy = {'error': 'error', 'result': 'result'}
5564 def __init__(self, error=None, result=None):
5565 '''
5566 error : Error
5567 result : VolumeParams
5568 '''
5569 self.error = Error.from_json(error) if error else None
5570 self.result = VolumeParams.from_json(result) if result else None
5571
5572
5573 class VolumeParamsResults(Type):
5574 _toSchema = {'results': 'results'}
5575 _toPy = {'results': 'results'}
5576 def __init__(self, results=None):
5577 '''
5578 results : typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
5579 '''
5580 self.results = [VolumeParamsResult.from_json(o) for o in results or []]
5581
5582
5583 class VolumeResult(Type):
5584 _toSchema = {'error': 'error', 'result': 'result'}
5585 _toPy = {'error': 'error', 'result': 'result'}
5586 def __init__(self, error=None, result=None):
5587 '''
5588 error : Error
5589 result : Volume
5590 '''
5591 self.error = Error.from_json(error) if error else None
5592 self.result = Volume.from_json(result) if result else None
5593
5594
5595 class VolumeResults(Type):
5596 _toSchema = {'results': 'results'}
5597 _toPy = {'results': 'results'}
5598 def __init__(self, results=None):
5599 '''
5600 results : typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
5601 '''
5602 self.results = [VolumeResult.from_json(o) for o in results or []]
5603
5604
5605 class Volumes(Type):
5606 _toSchema = {'volumes': 'volumes'}
5607 _toPy = {'volumes': 'volumes'}
5608 def __init__(self, volumes=None):
5609 '''
5610 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
5611 '''
5612 self.volumes = [Volume.from_json(o) for o in volumes or []]
5613
5614
5615 class SpaceResult(Type):
5616 _toSchema = {'error': 'error', 'tag': 'tag'}
5617 _toPy = {'error': 'error', 'tag': 'tag'}
5618 def __init__(self, error=None, tag=None):
5619 '''
5620 error : Error
5621 tag : str
5622 '''
5623 self.error = Error.from_json(error) if error else None
5624 self.tag = tag
5625
5626
5627 class SpaceResults(Type):
5628 _toSchema = {'results': 'results'}
5629 _toPy = {'results': 'results'}
5630 def __init__(self, results=None):
5631 '''
5632 results : typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
5633 '''
5634 self.results = [SpaceResult.from_json(o) for o in results or []]
5635
5636
5637 class ZoneResult(Type):
5638 _toSchema = {'available': 'available', 'error': 'error', 'name': 'name'}
5639 _toPy = {'available': 'available', 'error': 'error', 'name': 'name'}
5640 def __init__(self, available=None, error=None, name=None):
5641 '''
5642 available : bool
5643 error : Error
5644 name : str
5645 '''
5646 self.available = available
5647 self.error = Error.from_json(error) if error else None
5648 self.name = name
5649
5650
5651 class ZoneResults(Type):
5652 _toSchema = {'results': 'results'}
5653 _toPy = {'results': 'results'}
5654 def __init__(self, results=None):
5655 '''
5656 results : typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
5657 '''
5658 self.results = [ZoneResult.from_json(o) for o in results or []]
5659
5660
5661 class UndertakerModelInfo(Type):
5662 _toSchema = {'global_name': 'global-name', 'is_system': 'is-system', 'life': 'life', 'name': 'name', 'uuid': 'uuid'}
5663 _toPy = {'global-name': 'global_name', 'is-system': 'is_system', 'life': 'life', 'name': 'name', 'uuid': 'uuid'}
5664 def __init__(self, global_name=None, is_system=None, life=None, name=None, uuid=None):
5665 '''
5666 global_name : str
5667 is_system : bool
5668 life : str
5669 name : str
5670 uuid : str
5671 '''
5672 self.global_name = global_name
5673 self.is_system = is_system
5674 self.life = life
5675 self.name = name
5676 self.uuid = uuid
5677
5678
5679 class UndertakerModelInfoResult(Type):
5680 _toSchema = {'error': 'error', 'result': 'result'}
5681 _toPy = {'error': 'error', 'result': 'result'}
5682 def __init__(self, error=None, result=None):
5683 '''
5684 error : Error
5685 result : UndertakerModelInfo
5686 '''
5687 self.error = Error.from_json(error) if error else None
5688 self.result = UndertakerModelInfo.from_json(result) if result else None
5689
5690
5691 class ApplicationStatusResult(Type):
5692 _toSchema = {'application': 'application', 'error': 'error', 'units': 'units'}
5693 _toPy = {'application': 'application', 'error': 'error', 'units': 'units'}
5694 def __init__(self, application=None, error=None, units=None):
5695 '''
5696 application : StatusResult
5697 error : Error
5698 units : typing.Mapping<~KT, +VT_co>[str, ~StatusResult]<~StatusResult>
5699 '''
5700 self.application = StatusResult.from_json(application) if application else None
5701 self.error = Error.from_json(error) if error else None
5702 self.units = units
5703
5704
5705 class ApplicationStatusResults(Type):
5706 _toSchema = {'results': 'results'}
5707 _toPy = {'results': 'results'}
5708 def __init__(self, results=None):
5709 '''
5710 results : typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult>
5711 '''
5712 self.results = [ApplicationStatusResult.from_json(o) for o in results or []]
5713
5714
5715 class CharmURLs(Type):
5716 _toSchema = {'urls': 'urls'}
5717 _toPy = {'urls': 'urls'}
5718 def __init__(self, urls=None):
5719 '''
5720 urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL>
5721 '''
5722 self.urls = [CharmURL.from_json(o) for o in urls or []]
5723
5724
5725 class ConfigSettingsResult(Type):
5726 _toSchema = {'error': 'error', 'settings': 'settings'}
5727 _toPy = {'error': 'error', 'settings': 'settings'}
5728 def __init__(self, error=None, settings=None):
5729 '''
5730 error : Error
5731 settings : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5732 '''
5733 self.error = Error.from_json(error) if error else None
5734 self.settings = settings
5735
5736
5737 class ConfigSettingsResults(Type):
5738 _toSchema = {'results': 'results'}
5739 _toPy = {'results': 'results'}
5740 def __init__(self, results=None):
5741 '''
5742 results : typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult>
5743 '''
5744 self.results = [ConfigSettingsResult.from_json(o) for o in results or []]
5745
5746
5747 class Endpoint(Type):
5748 _toSchema = {'application_name': 'application-name', 'relation': 'relation'}
5749 _toPy = {'application-name': 'application_name', 'relation': 'relation'}
5750 def __init__(self, application_name=None, relation=None):
5751 '''
5752 application_name : str
5753 relation : CharmRelation
5754 '''
5755 self.application_name = application_name
5756 self.relation = CharmRelation.from_json(relation) if relation else None
5757
5758
5759 class EntitiesCharmURL(Type):
5760 _toSchema = {'entities': 'entities'}
5761 _toPy = {'entities': 'entities'}
5762 def __init__(self, entities=None):
5763 '''
5764 entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL>
5765 '''
5766 self.entities = [EntityCharmURL.from_json(o) for o in entities or []]
5767
5768
5769 class EntitiesPortRanges(Type):
5770 _toSchema = {'entities': 'entities'}
5771 _toPy = {'entities': 'entities'}
5772 def __init__(self, entities=None):
5773 '''
5774 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
5775 '''
5776 self.entities = [EntityPortRange.from_json(o) for o in entities or []]
5777
5778
5779 class EntityCharmURL(Type):
5780 _toSchema = {'charm_url': 'charm-url', 'tag': 'tag'}
5781 _toPy = {'charm-url': 'charm_url', 'tag': 'tag'}
5782 def __init__(self, charm_url=None, tag=None):
5783 '''
5784 charm_url : str
5785 tag : str
5786 '''
5787 self.charm_url = charm_url
5788 self.tag = tag
5789
5790
5791 class EntityPortRange(Type):
5792 _toSchema = {'from_port': 'from-port', 'protocol': 'protocol', 'tag': 'tag', 'to_port': 'to-port'}
5793 _toPy = {'from-port': 'from_port', 'protocol': 'protocol', 'tag': 'tag', 'to-port': 'to_port'}
5794 def __init__(self, from_port=None, protocol=None, tag=None, to_port=None):
5795 '''
5796 from_port : int
5797 protocol : str
5798 tag : str
5799 to_port : int
5800 '''
5801 self.from_port = from_port
5802 self.protocol = protocol
5803 self.tag = tag
5804 self.to_port = to_port
5805
5806
5807 class EntityWorkloadVersion(Type):
5808 _toSchema = {'tag': 'tag', 'workload_version': 'workload-version'}
5809 _toPy = {'tag': 'tag', 'workload-version': 'workload_version'}
5810 def __init__(self, tag=None, workload_version=None):
5811 '''
5812 tag : str
5813 workload_version : str
5814 '''
5815 self.tag = tag
5816 self.workload_version = workload_version
5817
5818
5819 class EntityWorkloadVersions(Type):
5820 _toSchema = {'entities': 'entities'}
5821 _toPy = {'entities': 'entities'}
5822 def __init__(self, entities=None):
5823 '''
5824 entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion>
5825 '''
5826 self.entities = [EntityWorkloadVersion.from_json(o) for o in entities or []]
5827
5828
5829 class GetLeadershipSettingsBulkResults(Type):
5830 _toSchema = {'results': 'results'}
5831 _toPy = {'results': 'results'}
5832 def __init__(self, results=None):
5833 '''
5834 results : typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult>
5835 '''
5836 self.results = [GetLeadershipSettingsResult.from_json(o) for o in results or []]
5837
5838
5839 class GetLeadershipSettingsResult(Type):
5840 _toSchema = {'error': 'error', 'settings': 'settings'}
5841 _toPy = {'error': 'error', 'settings': 'settings'}
5842 def __init__(self, error=None, settings=None):
5843 '''
5844 error : Error
5845 settings : typing.Mapping<~KT, +VT_co>[str, str]
5846 '''
5847 self.error = Error.from_json(error) if error else None
5848 self.settings = settings
5849
5850
5851 class IntResult(Type):
5852 _toSchema = {'error': 'error', 'result': 'result'}
5853 _toPy = {'error': 'error', 'result': 'result'}
5854 def __init__(self, error=None, result=None):
5855 '''
5856 error : Error
5857 result : int
5858 '''
5859 self.error = Error.from_json(error) if error else None
5860 self.result = result
5861
5862
5863 class IntResults(Type):
5864 _toSchema = {'results': 'results'}
5865 _toPy = {'results': 'results'}
5866 def __init__(self, results=None):
5867 '''
5868 results : typing.Sequence<+T_co>[~IntResult]<~IntResult>
5869 '''
5870 self.results = [IntResult.from_json(o) for o in results or []]
5871
5872
5873 class MergeLeadershipSettingsBulkParams(Type):
5874 _toSchema = {'params': 'params'}
5875 _toPy = {'params': 'params'}
5876 def __init__(self, params=None):
5877 '''
5878 params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam>
5879 '''
5880 self.params = [MergeLeadershipSettingsParam.from_json(o) for o in params or []]
5881
5882
5883 class MergeLeadershipSettingsParam(Type):
5884 _toSchema = {'application_tag': 'application-tag', 'settings': 'settings'}
5885 _toPy = {'application-tag': 'application_tag', 'settings': 'settings'}
5886 def __init__(self, application_tag=None, settings=None):
5887 '''
5888 application_tag : str
5889 settings : typing.Mapping<~KT, +VT_co>[str, str]
5890 '''
5891 self.application_tag = application_tag
5892 self.settings = settings
5893
5894
5895 class ModelResult(Type):
5896 _toSchema = {'error': 'error', 'name': 'name', 'uuid': 'uuid'}
5897 _toPy = {'error': 'error', 'name': 'name', 'uuid': 'uuid'}
5898 def __init__(self, error=None, name=None, uuid=None):
5899 '''
5900 error : Error
5901 name : str
5902 uuid : str
5903 '''
5904 self.error = Error.from_json(error) if error else None
5905 self.name = name
5906 self.uuid = uuid
5907
5908
5909 class RelationIds(Type):
5910 _toSchema = {'relation_ids': 'relation-ids'}
5911 _toPy = {'relation-ids': 'relation_ids'}
5912 def __init__(self, relation_ids=None):
5913 '''
5914 relation_ids : typing.Sequence<+T_co>[int]
5915 '''
5916 self.relation_ids = relation_ids
5917
5918
5919 class RelationResult(Type):
5920 _toSchema = {'endpoint': 'endpoint', 'error': 'error', 'id_': 'id', 'key': 'key', 'life': 'life'}
5921 _toPy = {'endpoint': 'endpoint', 'error': 'error', 'id': 'id_', 'key': 'key', 'life': 'life'}
5922 def __init__(self, endpoint=None, error=None, id_=None, key=None, life=None):
5923 '''
5924 endpoint : Endpoint
5925 error : Error
5926 id_ : int
5927 key : str
5928 life : str
5929 '''
5930 self.endpoint = Endpoint.from_json(endpoint) if endpoint else None
5931 self.error = Error.from_json(error) if error else None
5932 self.id_ = id_
5933 self.key = key
5934 self.life = life
5935
5936
5937 class RelationResults(Type):
5938 _toSchema = {'results': 'results'}
5939 _toPy = {'results': 'results'}
5940 def __init__(self, results=None):
5941 '''
5942 results : typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
5943 '''
5944 self.results = [RelationResult.from_json(o) for o in results or []]
5945
5946
5947 class RelationUnit(Type):
5948 _toSchema = {'relation': 'relation', 'unit': 'unit'}
5949 _toPy = {'relation': 'relation', 'unit': 'unit'}
5950 def __init__(self, relation=None, unit=None):
5951 '''
5952 relation : str
5953 unit : str
5954 '''
5955 self.relation = relation
5956 self.unit = unit
5957
5958
5959 class RelationUnitPair(Type):
5960 _toSchema = {'local_unit': 'local-unit', 'relation': 'relation', 'remote_unit': 'remote-unit'}
5961 _toPy = {'local-unit': 'local_unit', 'relation': 'relation', 'remote-unit': 'remote_unit'}
5962 def __init__(self, local_unit=None, relation=None, remote_unit=None):
5963 '''
5964 local_unit : str
5965 relation : str
5966 remote_unit : str
5967 '''
5968 self.local_unit = local_unit
5969 self.relation = relation
5970 self.remote_unit = remote_unit
5971
5972
5973 class RelationUnitPairs(Type):
5974 _toSchema = {'relation_unit_pairs': 'relation-unit-pairs'}
5975 _toPy = {'relation-unit-pairs': 'relation_unit_pairs'}
5976 def __init__(self, relation_unit_pairs=None):
5977 '''
5978 relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair>
5979 '''
5980 self.relation_unit_pairs = [RelationUnitPair.from_json(o) for o in relation_unit_pairs or []]
5981
5982
5983 class RelationUnitSettings(Type):
5984 _toSchema = {'relation': 'relation', 'settings': 'settings', 'unit': 'unit'}
5985 _toPy = {'relation': 'relation', 'settings': 'settings', 'unit': 'unit'}
5986 def __init__(self, relation=None, settings=None, unit=None):
5987 '''
5988 relation : str
5989 settings : typing.Mapping<~KT, +VT_co>[str, str]
5990 unit : str
5991 '''
5992 self.relation = relation
5993 self.settings = settings
5994 self.unit = unit
5995
5996
5997 class RelationUnits(Type):
5998 _toSchema = {'relation_units': 'relation-units'}
5999 _toPy = {'relation-units': 'relation_units'}
6000 def __init__(self, relation_units=None):
6001 '''
6002 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
6003 '''
6004 self.relation_units = [RelationUnit.from_json(o) for o in relation_units or []]
6005
6006
6007 class RelationUnitsSettings(Type):
6008 _toSchema = {'relation_units': 'relation-units'}
6009 _toPy = {'relation-units': 'relation_units'}
6010 def __init__(self, relation_units=None):
6011 '''
6012 relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings>
6013 '''
6014 self.relation_units = [RelationUnitSettings.from_json(o) for o in relation_units or []]
6015
6016
6017 class RelationUnitsWatchResults(Type):
6018 _toSchema = {'results': 'results'}
6019 _toPy = {'results': 'results'}
6020 def __init__(self, results=None):
6021 '''
6022 results : typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult>
6023 '''
6024 self.results = [RelationUnitsWatchResult.from_json(o) for o in results or []]
6025
6026
6027 class ResolvedModeResult(Type):
6028 _toSchema = {'error': 'error', 'mode': 'mode'}
6029 _toPy = {'error': 'error', 'mode': 'mode'}
6030 def __init__(self, error=None, mode=None):
6031 '''
6032 error : Error
6033 mode : str
6034 '''
6035 self.error = Error.from_json(error) if error else None
6036 self.mode = mode
6037
6038
6039 class ResolvedModeResults(Type):
6040 _toSchema = {'results': 'results'}
6041 _toPy = {'results': 'results'}
6042 def __init__(self, results=None):
6043 '''
6044 results : typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult>
6045 '''
6046 self.results = [ResolvedModeResult.from_json(o) for o in results or []]
6047
6048
6049 class SettingsResult(Type):
6050 _toSchema = {'error': 'error', 'settings': 'settings'}
6051 _toPy = {'error': 'error', 'settings': 'settings'}
6052 def __init__(self, error=None, settings=None):
6053 '''
6054 error : Error
6055 settings : typing.Mapping<~KT, +VT_co>[str, str]
6056 '''
6057 self.error = Error.from_json(error) if error else None
6058 self.settings = settings
6059
6060
6061 class SettingsResults(Type):
6062 _toSchema = {'results': 'results'}
6063 _toPy = {'results': 'results'}
6064 def __init__(self, results=None):
6065 '''
6066 results : typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
6067 '''
6068 self.results = [SettingsResult.from_json(o) for o in results or []]
6069
6070
6071 class StorageAttachment(Type):
6072 _toSchema = {'kind': 'kind', 'life': 'life', 'location': 'location', 'owner_tag': 'owner-tag', 'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
6073 _toPy = {'kind': 'kind', 'life': 'life', 'location': 'location', 'owner-tag': 'owner_tag', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'}
6074 def __init__(self, kind=None, life=None, location=None, owner_tag=None, storage_tag=None, unit_tag=None):
6075 '''
6076 kind : int
6077 life : str
6078 location : str
6079 owner_tag : str
6080 storage_tag : str
6081 unit_tag : str
6082 '''
6083 self.kind = kind
6084 self.life = life
6085 self.location = location
6086 self.owner_tag = owner_tag
6087 self.storage_tag = storage_tag
6088 self.unit_tag = unit_tag
6089
6090
6091 class StorageAttachmentId(Type):
6092 _toSchema = {'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
6093 _toPy = {'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'}
6094 def __init__(self, storage_tag=None, unit_tag=None):
6095 '''
6096 storage_tag : str
6097 unit_tag : str
6098 '''
6099 self.storage_tag = storage_tag
6100 self.unit_tag = unit_tag
6101
6102
6103 class StorageAttachmentIds(Type):
6104 _toSchema = {'ids': 'ids'}
6105 _toPy = {'ids': 'ids'}
6106 def __init__(self, ids=None):
6107 '''
6108 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
6109 '''
6110 self.ids = [StorageAttachmentId.from_json(o) for o in ids or []]
6111
6112
6113 class StorageAttachmentIdsResult(Type):
6114 _toSchema = {'error': 'error', 'result': 'result'}
6115 _toPy = {'error': 'error', 'result': 'result'}
6116 def __init__(self, error=None, result=None):
6117 '''
6118 error : Error
6119 result : StorageAttachmentIds
6120 '''
6121 self.error = Error.from_json(error) if error else None
6122 self.result = StorageAttachmentIds.from_json(result) if result else None
6123
6124
6125 class StorageAttachmentIdsResults(Type):
6126 _toSchema = {'results': 'results'}
6127 _toPy = {'results': 'results'}
6128 def __init__(self, results=None):
6129 '''
6130 results : typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult>
6131 '''
6132 self.results = [StorageAttachmentIdsResult.from_json(o) for o in results or []]
6133
6134
6135 class StorageAttachmentResult(Type):
6136 _toSchema = {'error': 'error', 'result': 'result'}
6137 _toPy = {'error': 'error', 'result': 'result'}
6138 def __init__(self, error=None, result=None):
6139 '''
6140 error : Error
6141 result : StorageAttachment
6142 '''
6143 self.error = Error.from_json(error) if error else None
6144 self.result = StorageAttachment.from_json(result) if result else None
6145
6146
6147 class StorageAttachmentResults(Type):
6148 _toSchema = {'results': 'results'}
6149 _toPy = {'results': 'results'}
6150 def __init__(self, results=None):
6151 '''
6152 results : typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult>
6153 '''
6154 self.results = [StorageAttachmentResult.from_json(o) for o in results or []]
6155
6156
6157 class StringBoolResult(Type):
6158 _toSchema = {'error': 'error', 'ok': 'ok', 'result': 'result'}
6159 _toPy = {'error': 'error', 'ok': 'ok', 'result': 'result'}
6160 def __init__(self, error=None, ok=None, result=None):
6161 '''
6162 error : Error
6163 ok : bool
6164 result : str
6165 '''
6166 self.error = Error.from_json(error) if error else None
6167 self.ok = ok
6168 self.result = result
6169
6170
6171 class StringBoolResults(Type):
6172 _toSchema = {'results': 'results'}
6173 _toPy = {'results': 'results'}
6174 def __init__(self, results=None):
6175 '''
6176 results : typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
6177 '''
6178 self.results = [StringBoolResult.from_json(o) for o in results or []]
6179
6180
6181 class UnitNetworkConfig(Type):
6182 _toSchema = {'binding_name': 'binding-name', 'unit_tag': 'unit-tag'}
6183 _toPy = {'binding-name': 'binding_name', 'unit-tag': 'unit_tag'}
6184 def __init__(self, binding_name=None, unit_tag=None):
6185 '''
6186 binding_name : str
6187 unit_tag : str
6188 '''
6189 self.binding_name = binding_name
6190 self.unit_tag = unit_tag
6191
6192
6193 class UnitNetworkConfigResult(Type):
6194 _toSchema = {'error': 'error', 'info': 'info'}
6195 _toPy = {'error': 'error', 'info': 'info'}
6196 def __init__(self, error=None, info=None):
6197 '''
6198 error : Error
6199 info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
6200 '''
6201 self.error = Error.from_json(error) if error else None
6202 self.info = [NetworkConfig.from_json(o) for o in info or []]
6203
6204
6205 class UnitNetworkConfigResults(Type):
6206 _toSchema = {'results': 'results'}
6207 _toPy = {'results': 'results'}
6208 def __init__(self, results=None):
6209 '''
6210 results : typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult>
6211 '''
6212 self.results = [UnitNetworkConfigResult.from_json(o) for o in results or []]
6213
6214
6215 class UnitsNetworkConfig(Type):
6216 _toSchema = {'args': 'args'}
6217 _toPy = {'args': 'args'}
6218 def __init__(self, args=None):
6219 '''
6220 args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig>
6221 '''
6222 self.args = [UnitNetworkConfig.from_json(o) for o in args or []]
6223
6224
6225 class EntitiesVersion(Type):
6226 _toSchema = {'agent_tools': 'agent-tools'}
6227 _toPy = {'agent-tools': 'agent_tools'}
6228 def __init__(self, agent_tools=None):
6229 '''
6230 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
6231 '''
6232 self.agent_tools = [EntityVersion.from_json(o) for o in agent_tools or []]
6233
6234
6235 class EntityVersion(Type):
6236 _toSchema = {'tag': 'tag', 'tools': 'tools'}
6237 _toPy = {'tag': 'tag', 'tools': 'tools'}
6238 def __init__(self, tag=None, tools=None):
6239 '''
6240 tag : str
6241 tools : Version
6242 '''
6243 self.tag = tag
6244 self.tools = Version.from_json(tools) if tools else None
6245
6246
6247 class Version(Type):
6248 _toSchema = {'version': 'version'}
6249 _toPy = {'version': 'version'}
6250 def __init__(self, version=None):
6251 '''
6252 version : Binary
6253 '''
6254 self.version = Binary.from_json(version) if version else None
6255
6256
6257 class VersionResult(Type):
6258 _toSchema = {'error': 'error', 'version': 'version'}
6259 _toPy = {'error': 'error', 'version': 'version'}
6260 def __init__(self, error=None, version=None):
6261 '''
6262 error : Error
6263 version : Number
6264 '''
6265 self.error = Error.from_json(error) if error else None
6266 self.version = Number.from_json(version) if version else None
6267
6268
6269 class VersionResults(Type):
6270 _toSchema = {'results': 'results'}
6271 _toPy = {'results': 'results'}
6272 def __init__(self, results=None):
6273 '''
6274 results : typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
6275 '''
6276 self.results = [VersionResult.from_json(o) for o in results or []]
6277
6278
6279 class AddUser(Type):
6280 _toSchema = {'display_name': 'display-name', 'password': 'password', 'username': 'username'}
6281 _toPy = {'display-name': 'display_name', 'password': 'password', 'username': 'username'}
6282 def __init__(self, display_name=None, password=None, username=None):
6283 '''
6284 display_name : str
6285 password : str
6286 username : str
6287 '''
6288 self.display_name = display_name
6289 self.password = password
6290 self.username = username
6291
6292
6293 class AddUserResult(Type):
6294 _toSchema = {'error': 'error', 'secret_key': 'secret-key', 'tag': 'tag'}
6295 _toPy = {'error': 'error', 'secret-key': 'secret_key', 'tag': 'tag'}
6296 def __init__(self, error=None, secret_key=None, tag=None):
6297 '''
6298 error : Error
6299 secret_key : typing.Sequence<+T_co>[int]
6300 tag : str
6301 '''
6302 self.error = Error.from_json(error) if error else None
6303 self.secret_key = secret_key
6304 self.tag = tag
6305
6306
6307 class AddUserResults(Type):
6308 _toSchema = {'results': 'results'}
6309 _toPy = {'results': 'results'}
6310 def __init__(self, results=None):
6311 '''
6312 results : typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
6313 '''
6314 self.results = [AddUserResult.from_json(o) for o in results or []]
6315
6316
6317 class AddUsers(Type):
6318 _toSchema = {'users': 'users'}
6319 _toPy = {'users': 'users'}
6320 def __init__(self, users=None):
6321 '''
6322 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
6323 '''
6324 self.users = [AddUser.from_json(o) for o in users or []]
6325
6326
6327 class UserInfo(Type):
6328 _toSchema = {'access': 'access', 'created_by': 'created-by', 'date_created': 'date-created', 'disabled': 'disabled', 'display_name': 'display-name', 'last_connection': 'last-connection', 'username': 'username'}
6329 _toPy = {'access': 'access', 'created-by': 'created_by', 'date-created': 'date_created', 'disabled': 'disabled', 'display-name': 'display_name', 'last-connection': 'last_connection', 'username': 'username'}
6330 def __init__(self, access=None, created_by=None, date_created=None, disabled=None, display_name=None, last_connection=None, username=None):
6331 '''
6332 access : str
6333 created_by : str
6334 date_created : str
6335 disabled : bool
6336 display_name : str
6337 last_connection : str
6338 username : str
6339 '''
6340 self.access = access
6341 self.created_by = created_by
6342 self.date_created = date_created
6343 self.disabled = disabled
6344 self.display_name = display_name
6345 self.last_connection = last_connection
6346 self.username = username
6347
6348
6349 class UserInfoRequest(Type):
6350 _toSchema = {'entities': 'entities', 'include_disabled': 'include-disabled'}
6351 _toPy = {'entities': 'entities', 'include-disabled': 'include_disabled'}
6352 def __init__(self, entities=None, include_disabled=None):
6353 '''
6354 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6355 include_disabled : bool
6356 '''
6357 self.entities = [Entity.from_json(o) for o in entities or []]
6358 self.include_disabled = include_disabled
6359
6360
6361 class UserInfoResult(Type):
6362 _toSchema = {'error': 'error', 'result': 'result'}
6363 _toPy = {'error': 'error', 'result': 'result'}
6364 def __init__(self, error=None, result=None):
6365 '''
6366 error : Error
6367 result : UserInfo
6368 '''
6369 self.error = Error.from_json(error) if error else None
6370 self.result = UserInfo.from_json(result) if result else None
6371
6372
6373 class UserInfoResults(Type):
6374 _toSchema = {'results': 'results'}
6375 _toPy = {'results': 'results'}
6376 def __init__(self, results=None):
6377 '''
6378 results : typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
6379 '''
6380 self.results = [UserInfoResult.from_json(o) for o in results or []]
6381
6382
6383 class ActionFacade(Type):
6384 name = 'Action'
6385 version = 2
6386 schema = {'definitions': {'Action': {'additionalProperties': False,
6387 'properties': {'name': {'type': 'string'},
6388 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
6389 'type': 'object'}},
6390 'type': 'object'},
6391 'receiver': {'type': 'string'},
6392 'tag': {'type': 'string'}},
6393 'required': ['tag', 'receiver', 'name'],
6394 'type': 'object'},
6395 'ActionResult': {'additionalProperties': False,
6396 'properties': {'action': {'$ref': '#/definitions/Action'},
6397 'completed': {'format': 'date-time',
6398 'type': 'string'},
6399 'enqueued': {'format': 'date-time',
6400 'type': 'string'},
6401 'error': {'$ref': '#/definitions/Error'},
6402 'message': {'type': 'string'},
6403 'output': {'patternProperties': {'.*': {'additionalProperties': True,
6404 'type': 'object'}},
6405 'type': 'object'},
6406 'started': {'format': 'date-time',
6407 'type': 'string'},
6408 'status': {'type': 'string'}},
6409 'type': 'object'},
6410 'ActionResults': {'additionalProperties': False,
6411 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
6412 'type': 'array'}},
6413 'type': 'object'},
6414 'ActionSpec': {'additionalProperties': False,
6415 'properties': {'description': {'type': 'string'},
6416 'params': {'patternProperties': {'.*': {'additionalProperties': True,
6417 'type': 'object'}},
6418 'type': 'object'}},
6419 'required': ['description', 'params'],
6420 'type': 'object'},
6421 'Actions': {'additionalProperties': False,
6422 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
6423 'type': 'array'}},
6424 'type': 'object'},
6425 'ActionsByName': {'additionalProperties': False,
6426 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
6427 'type': 'array'},
6428 'error': {'$ref': '#/definitions/Error'},
6429 'name': {'type': 'string'}},
6430 'type': 'object'},
6431 'ActionsByNames': {'additionalProperties': False,
6432 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
6433 'type': 'array'}},
6434 'type': 'object'},
6435 'ActionsByReceiver': {'additionalProperties': False,
6436 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
6437 'type': 'array'},
6438 'error': {'$ref': '#/definitions/Error'},
6439 'receiver': {'type': 'string'}},
6440 'type': 'object'},
6441 'ActionsByReceivers': {'additionalProperties': False,
6442 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
6443 'type': 'array'}},
6444 'type': 'object'},
6445 'ApplicationCharmActionsResult': {'additionalProperties': False,
6446 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
6447 'type': 'object'},
6448 'application-tag': {'type': 'string'},
6449 'error': {'$ref': '#/definitions/Error'}},
6450 'type': 'object'},
6451 'ApplicationsCharmActionsResults': {'additionalProperties': False,
6452 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
6453 'type': 'array'}},
6454 'type': 'object'},
6455 'Entities': {'additionalProperties': False,
6456 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6457 'type': 'array'}},
6458 'required': ['entities'],
6459 'type': 'object'},
6460 'Entity': {'additionalProperties': False,
6461 'properties': {'tag': {'type': 'string'}},
6462 'required': ['tag'],
6463 'type': 'object'},
6464 'Error': {'additionalProperties': False,
6465 'properties': {'code': {'type': 'string'},
6466 'info': {'$ref': '#/definitions/ErrorInfo'},
6467 'message': {'type': 'string'}},
6468 'required': ['message', 'code'],
6469 'type': 'object'},
6470 'ErrorInfo': {'additionalProperties': False,
6471 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6472 'macaroon-path': {'type': 'string'}},
6473 'type': 'object'},
6474 'FindActionsByNames': {'additionalProperties': False,
6475 'properties': {'names': {'items': {'type': 'string'},
6476 'type': 'array'}},
6477 'type': 'object'},
6478 'FindTags': {'additionalProperties': False,
6479 'properties': {'prefixes': {'items': {'type': 'string'},
6480 'type': 'array'}},
6481 'required': ['prefixes'],
6482 'type': 'object'},
6483 'FindTagsResults': {'additionalProperties': False,
6484 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
6485 'type': 'array'}},
6486 'type': 'object'}},
6487 'required': ['matches'],
6488 'type': 'object'},
6489 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6490 'RunParams': {'additionalProperties': False,
6491 'properties': {'applications': {'items': {'type': 'string'},
6492 'type': 'array'},
6493 'commands': {'type': 'string'},
6494 'machines': {'items': {'type': 'string'},
6495 'type': 'array'},
6496 'timeout': {'type': 'integer'},
6497 'units': {'items': {'type': 'string'},
6498 'type': 'array'}},
6499 'required': ['commands', 'timeout'],
6500 'type': 'object'}},
6501 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6502 'Result': {'$ref': '#/definitions/ActionResults'}},
6503 'type': 'object'},
6504 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6505 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
6506 'type': 'object'},
6507 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6508 'Result': {'$ref': '#/definitions/ActionResults'}},
6509 'type': 'object'},
6510 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
6511 'Result': {'$ref': '#/definitions/ActionResults'}},
6512 'type': 'object'},
6513 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
6514 'Result': {'$ref': '#/definitions/FindTagsResults'}},
6515 'type': 'object'},
6516 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
6517 'Result': {'$ref': '#/definitions/ActionsByNames'}},
6518 'type': 'object'},
6519 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6520 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6521 'type': 'object'},
6522 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6523 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6524 'type': 'object'},
6525 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6526 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6527 'type': 'object'},
6528 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6529 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6530 'type': 'object'},
6531 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6532 'Result': {'$ref': '#/definitions/ActionResults'}},
6533 'type': 'object'},
6534 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6535 'Result': {'$ref': '#/definitions/ActionResults'}},
6536 'type': 'object'}},
6537 'type': 'object'}
6538
6539
6540 @ReturnMapping(ActionResults)
6541 async def Actions(self, entities):
6542 '''
6543 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6544 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6545 '''
6546 # map input types to rpc msg
6547 _params = dict()
6548 msg = dict(type='Action', request='Actions', version=2, params=_params)
6549 _params['entities'] = entities
6550 reply = await self.rpc(msg)
6551 return reply
6552
6553
6554
6555 @ReturnMapping(ApplicationsCharmActionsResults)
6556 async def ApplicationsCharmsActions(self, entities):
6557 '''
6558 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6559 Returns -> typing.Sequence<+T_co>[~ApplicationCharmActionsResult]<~ApplicationCharmActionsResult>
6560 '''
6561 # map input types to rpc msg
6562 _params = dict()
6563 msg = dict(type='Action', request='ApplicationsCharmsActions', version=2, params=_params)
6564 _params['entities'] = entities
6565 reply = await self.rpc(msg)
6566 return reply
6567
6568
6569
6570 @ReturnMapping(ActionResults)
6571 async def Cancel(self, entities):
6572 '''
6573 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6574 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6575 '''
6576 # map input types to rpc msg
6577 _params = dict()
6578 msg = dict(type='Action', request='Cancel', version=2, params=_params)
6579 _params['entities'] = entities
6580 reply = await self.rpc(msg)
6581 return reply
6582
6583
6584
6585 @ReturnMapping(ActionResults)
6586 async def Enqueue(self, actions):
6587 '''
6588 actions : typing.Sequence<+T_co>[~Action]<~Action>
6589 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6590 '''
6591 # map input types to rpc msg
6592 _params = dict()
6593 msg = dict(type='Action', request='Enqueue', version=2, params=_params)
6594 _params['actions'] = actions
6595 reply = await self.rpc(msg)
6596 return reply
6597
6598
6599
6600 @ReturnMapping(FindTagsResults)
6601 async def FindActionTagsByPrefix(self, prefixes):
6602 '''
6603 prefixes : typing.Sequence<+T_co>[str]
6604 Returns -> typing.Sequence<+T_co>[~Entity]<~Entity>
6605 '''
6606 # map input types to rpc msg
6607 _params = dict()
6608 msg = dict(type='Action', request='FindActionTagsByPrefix', version=2, params=_params)
6609 _params['prefixes'] = prefixes
6610 reply = await self.rpc(msg)
6611 return reply
6612
6613
6614
6615 @ReturnMapping(ActionsByNames)
6616 async def FindActionsByNames(self, names):
6617 '''
6618 names : typing.Sequence<+T_co>[str]
6619 Returns -> typing.Sequence<+T_co>[~ActionsByName]<~ActionsByName>
6620 '''
6621 # map input types to rpc msg
6622 _params = dict()
6623 msg = dict(type='Action', request='FindActionsByNames', version=2, params=_params)
6624 _params['names'] = names
6625 reply = await self.rpc(msg)
6626 return reply
6627
6628
6629
6630 @ReturnMapping(ActionsByReceivers)
6631 async def ListAll(self, entities):
6632 '''
6633 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6634 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6635 '''
6636 # map input types to rpc msg
6637 _params = dict()
6638 msg = dict(type='Action', request='ListAll', version=2, params=_params)
6639 _params['entities'] = entities
6640 reply = await self.rpc(msg)
6641 return reply
6642
6643
6644
6645 @ReturnMapping(ActionsByReceivers)
6646 async def ListCompleted(self, entities):
6647 '''
6648 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6649 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6650 '''
6651 # map input types to rpc msg
6652 _params = dict()
6653 msg = dict(type='Action', request='ListCompleted', version=2, params=_params)
6654 _params['entities'] = entities
6655 reply = await self.rpc(msg)
6656 return reply
6657
6658
6659
6660 @ReturnMapping(ActionsByReceivers)
6661 async def ListPending(self, entities):
6662 '''
6663 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6664 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6665 '''
6666 # map input types to rpc msg
6667 _params = dict()
6668 msg = dict(type='Action', request='ListPending', version=2, params=_params)
6669 _params['entities'] = entities
6670 reply = await self.rpc(msg)
6671 return reply
6672
6673
6674
6675 @ReturnMapping(ActionsByReceivers)
6676 async def ListRunning(self, entities):
6677 '''
6678 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6679 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6680 '''
6681 # map input types to rpc msg
6682 _params = dict()
6683 msg = dict(type='Action', request='ListRunning', version=2, params=_params)
6684 _params['entities'] = entities
6685 reply = await self.rpc(msg)
6686 return reply
6687
6688
6689
6690 @ReturnMapping(ActionResults)
6691 async def Run(self, applications, commands, machines, timeout, units):
6692 '''
6693 applications : typing.Sequence<+T_co>[str]
6694 commands : str
6695 machines : typing.Sequence<+T_co>[str]
6696 timeout : int
6697 units : typing.Sequence<+T_co>[str]
6698 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6699 '''
6700 # map input types to rpc msg
6701 _params = dict()
6702 msg = dict(type='Action', request='Run', version=2, params=_params)
6703 _params['applications'] = applications
6704 _params['commands'] = commands
6705 _params['machines'] = machines
6706 _params['timeout'] = timeout
6707 _params['units'] = units
6708 reply = await self.rpc(msg)
6709 return reply
6710
6711
6712
6713 @ReturnMapping(ActionResults)
6714 async def RunOnAllMachines(self, applications, commands, machines, timeout, units):
6715 '''
6716 applications : typing.Sequence<+T_co>[str]
6717 commands : str
6718 machines : typing.Sequence<+T_co>[str]
6719 timeout : int
6720 units : typing.Sequence<+T_co>[str]
6721 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6722 '''
6723 # map input types to rpc msg
6724 _params = dict()
6725 msg = dict(type='Action', request='RunOnAllMachines', version=2, params=_params)
6726 _params['applications'] = applications
6727 _params['commands'] = commands
6728 _params['machines'] = machines
6729 _params['timeout'] = timeout
6730 _params['units'] = units
6731 reply = await self.rpc(msg)
6732 return reply
6733
6734
6735 class AgentFacade(Type):
6736 name = 'Agent'
6737 version = 2
6738 schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
6739 'properties': {'container-type': {'type': 'string'},
6740 'error': {'$ref': '#/definitions/Error'},
6741 'jobs': {'items': {'type': 'string'},
6742 'type': 'array'},
6743 'life': {'type': 'string'}},
6744 'required': ['life',
6745 'jobs',
6746 'container-type'],
6747 'type': 'object'},
6748 'AgentGetEntitiesResults': {'additionalProperties': False,
6749 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
6750 'type': 'array'}},
6751 'required': ['entities'],
6752 'type': 'object'},
6753 'CloudCredential': {'additionalProperties': False,
6754 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
6755 'type': 'object'},
6756 'auth-type': {'type': 'string'},
6757 'redacted': {'items': {'type': 'string'},
6758 'type': 'array'}},
6759 'required': ['auth-type'],
6760 'type': 'object'},
6761 'CloudSpec': {'additionalProperties': False,
6762 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
6763 'endpoint': {'type': 'string'},
6764 'identity-endpoint': {'type': 'string'},
6765 'name': {'type': 'string'},
6766 'region': {'type': 'string'},
6767 'storage-endpoint': {'type': 'string'},
6768 'type': {'type': 'string'}},
6769 'required': ['type', 'name'],
6770 'type': 'object'},
6771 'CloudSpecResult': {'additionalProperties': False,
6772 'properties': {'error': {'$ref': '#/definitions/Error'},
6773 'result': {'$ref': '#/definitions/CloudSpec'}},
6774 'type': 'object'},
6775 'CloudSpecResults': {'additionalProperties': False,
6776 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
6777 'type': 'array'}},
6778 'type': 'object'},
6779 'ControllerConfigResult': {'additionalProperties': False,
6780 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6781 'type': 'object'}},
6782 'type': 'object'}},
6783 'required': ['config'],
6784 'type': 'object'},
6785 'Entities': {'additionalProperties': False,
6786 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6787 'type': 'array'}},
6788 'required': ['entities'],
6789 'type': 'object'},
6790 'Entity': {'additionalProperties': False,
6791 'properties': {'tag': {'type': 'string'}},
6792 'required': ['tag'],
6793 'type': 'object'},
6794 'EntityPassword': {'additionalProperties': False,
6795 'properties': {'password': {'type': 'string'},
6796 'tag': {'type': 'string'}},
6797 'required': ['tag', 'password'],
6798 'type': 'object'},
6799 'EntityPasswords': {'additionalProperties': False,
6800 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
6801 'type': 'array'}},
6802 'required': ['changes'],
6803 'type': 'object'},
6804 'Error': {'additionalProperties': False,
6805 'properties': {'code': {'type': 'string'},
6806 'info': {'$ref': '#/definitions/ErrorInfo'},
6807 'message': {'type': 'string'}},
6808 'required': ['message', 'code'],
6809 'type': 'object'},
6810 'ErrorInfo': {'additionalProperties': False,
6811 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6812 'macaroon-path': {'type': 'string'}},
6813 'type': 'object'},
6814 'ErrorResult': {'additionalProperties': False,
6815 'properties': {'error': {'$ref': '#/definitions/Error'}},
6816 'type': 'object'},
6817 'ErrorResults': {'additionalProperties': False,
6818 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6819 'type': 'array'}},
6820 'required': ['results'],
6821 'type': 'object'},
6822 'IsMasterResult': {'additionalProperties': False,
6823 'properties': {'master': {'type': 'boolean'}},
6824 'required': ['master'],
6825 'type': 'object'},
6826 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6827 'ModelConfigResult': {'additionalProperties': False,
6828 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6829 'type': 'object'}},
6830 'type': 'object'}},
6831 'required': ['config'],
6832 'type': 'object'},
6833 'ModelTag': {'additionalProperties': False, 'type': 'object'},
6834 'NotifyWatchResult': {'additionalProperties': False,
6835 'properties': {'NotifyWatcherId': {'type': 'string'},
6836 'error': {'$ref': '#/definitions/Error'}},
6837 'required': ['NotifyWatcherId'],
6838 'type': 'object'},
6839 'NotifyWatchResults': {'additionalProperties': False,
6840 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6841 'type': 'array'}},
6842 'required': ['results'],
6843 'type': 'object'},
6844 'StateServingInfo': {'additionalProperties': False,
6845 'properties': {'api-port': {'type': 'integer'},
6846 'ca-private-key': {'type': 'string'},
6847 'cert': {'type': 'string'},
6848 'private-key': {'type': 'string'},
6849 'shared-secret': {'type': 'string'},
6850 'state-port': {'type': 'integer'},
6851 'system-identity': {'type': 'string'}},
6852 'required': ['api-port',
6853 'state-port',
6854 'cert',
6855 'private-key',
6856 'ca-private-key',
6857 'shared-secret',
6858 'system-identity'],
6859 'type': 'object'}},
6860 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6861 'Result': {'$ref': '#/definitions/ErrorResults'}},
6862 'type': 'object'},
6863 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6864 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
6865 'type': 'object'},
6866 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
6867 'type': 'object'},
6868 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
6869 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
6870 'type': 'object'},
6871 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6872 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
6873 'type': 'object'},
6874 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
6875 'type': 'object'},
6876 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6877 'type': 'object'},
6878 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6879 'Result': {'$ref': '#/definitions/ErrorResults'}},
6880 'type': 'object'},
6881 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
6882 'type': 'object'},
6883 'WatchCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6884 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6885 'type': 'object'},
6886 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6887 'type': 'object'}},
6888 'type': 'object'}
6889
6890
6891 @ReturnMapping(ErrorResults)
6892 async def ClearReboot(self, entities):
6893 '''
6894 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6895 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6896 '''
6897 # map input types to rpc msg
6898 _params = dict()
6899 msg = dict(type='Agent', request='ClearReboot', version=2, params=_params)
6900 _params['entities'] = entities
6901 reply = await self.rpc(msg)
6902 return reply
6903
6904
6905
6906 @ReturnMapping(CloudSpecResults)
6907 async def CloudSpec(self, entities):
6908 '''
6909 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6910 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
6911 '''
6912 # map input types to rpc msg
6913 _params = dict()
6914 msg = dict(type='Agent', request='CloudSpec', version=2, params=_params)
6915 _params['entities'] = entities
6916 reply = await self.rpc(msg)
6917 return reply
6918
6919
6920
6921 @ReturnMapping(ControllerConfigResult)
6922 async def ControllerConfig(self):
6923 '''
6924
6925 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
6926 '''
6927 # map input types to rpc msg
6928 _params = dict()
6929 msg = dict(type='Agent', request='ControllerConfig', version=2, params=_params)
6930
6931 reply = await self.rpc(msg)
6932 return reply
6933
6934
6935
6936 @ReturnMapping(CloudSpecResult)
6937 async def GetCloudSpec(self):
6938 '''
6939
6940 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
6941 '''
6942 # map input types to rpc msg
6943 _params = dict()
6944 msg = dict(type='Agent', request='GetCloudSpec', version=2, params=_params)
6945
6946 reply = await self.rpc(msg)
6947 return reply
6948
6949
6950
6951 @ReturnMapping(AgentGetEntitiesResults)
6952 async def GetEntities(self, entities):
6953 '''
6954 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6955 Returns -> typing.Sequence<+T_co>[~AgentGetEntitiesResult]<~AgentGetEntitiesResult>
6956 '''
6957 # map input types to rpc msg
6958 _params = dict()
6959 msg = dict(type='Agent', request='GetEntities', version=2, params=_params)
6960 _params['entities'] = entities
6961 reply = await self.rpc(msg)
6962 return reply
6963
6964
6965
6966 @ReturnMapping(IsMasterResult)
6967 async def IsMaster(self):
6968 '''
6969
6970 Returns -> bool
6971 '''
6972 # map input types to rpc msg
6973 _params = dict()
6974 msg = dict(type='Agent', request='IsMaster', version=2, params=_params)
6975
6976 reply = await self.rpc(msg)
6977 return reply
6978
6979
6980
6981 @ReturnMapping(ModelConfigResult)
6982 async def ModelConfig(self):
6983 '''
6984
6985 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
6986 '''
6987 # map input types to rpc msg
6988 _params = dict()
6989 msg = dict(type='Agent', request='ModelConfig', version=2, params=_params)
6990
6991 reply = await self.rpc(msg)
6992 return reply
6993
6994
6995
6996 @ReturnMapping(ErrorResults)
6997 async def SetPasswords(self, changes):
6998 '''
6999 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
7000 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7001 '''
7002 # map input types to rpc msg
7003 _params = dict()
7004 msg = dict(type='Agent', request='SetPasswords', version=2, params=_params)
7005 _params['changes'] = changes
7006 reply = await self.rpc(msg)
7007 return reply
7008
7009
7010
7011 @ReturnMapping(StateServingInfo)
7012 async def StateServingInfo(self):
7013 '''
7014
7015 Returns -> typing.Union[int, str]
7016 '''
7017 # map input types to rpc msg
7018 _params = dict()
7019 msg = dict(type='Agent', request='StateServingInfo', version=2, params=_params)
7020
7021 reply = await self.rpc(msg)
7022 return reply
7023
7024
7025
7026 @ReturnMapping(NotifyWatchResults)
7027 async def WatchCredentials(self, entities):
7028 '''
7029 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7030 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
7031 '''
7032 # map input types to rpc msg
7033 _params = dict()
7034 msg = dict(type='Agent', request='WatchCredentials', version=2, params=_params)
7035 _params['entities'] = entities
7036 reply = await self.rpc(msg)
7037 return reply
7038
7039
7040
7041 @ReturnMapping(NotifyWatchResult)
7042 async def WatchForModelConfigChanges(self):
7043 '''
7044
7045 Returns -> typing.Union[str, _ForwardRef('Error')]
7046 '''
7047 # map input types to rpc msg
7048 _params = dict()
7049 msg = dict(type='Agent', request='WatchForModelConfigChanges', version=2, params=_params)
7050
7051 reply = await self.rpc(msg)
7052 return reply
7053
7054
7055 class AgentToolsFacade(Type):
7056 name = 'AgentTools'
7057 version = 1
7058 schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
7059
7060
7061 @ReturnMapping(None)
7062 async def UpdateToolsAvailable(self):
7063 '''
7064
7065 Returns -> None
7066 '''
7067 # map input types to rpc msg
7068 _params = dict()
7069 msg = dict(type='AgentTools', request='UpdateToolsAvailable', version=1, params=_params)
7070
7071 reply = await self.rpc(msg)
7072 return reply
7073
7074
7075 class AllModelWatcherFacade(Type):
7076 name = 'AllModelWatcher'
7077 version = 2
7078 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
7079 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
7080 'type': 'array'}},
7081 'required': ['deltas'],
7082 'type': 'object'},
7083 'Delta': {'additionalProperties': False,
7084 'properties': {'entity': {'additionalProperties': True,
7085 'type': 'object'},
7086 'removed': {'type': 'boolean'}},
7087 'required': ['removed', 'entity'],
7088 'type': 'object'}},
7089 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
7090 'type': 'object'},
7091 'Stop': {'type': 'object'}},
7092 'type': 'object'}
7093
7094
7095 @ReturnMapping(AllWatcherNextResults)
7096 async def Next(self):
7097 '''
7098
7099 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
7100 '''
7101 # map input types to rpc msg
7102 _params = dict()
7103 msg = dict(type='AllModelWatcher', request='Next', version=2, params=_params)
7104
7105 reply = await self.rpc(msg)
7106 return reply
7107
7108
7109
7110 @ReturnMapping(None)
7111 async def Stop(self):
7112 '''
7113
7114 Returns -> None
7115 '''
7116 # map input types to rpc msg
7117 _params = dict()
7118 msg = dict(type='AllModelWatcher', request='Stop', version=2, params=_params)
7119
7120 reply = await self.rpc(msg)
7121 return reply
7122
7123
7124 class AllWatcherFacade(Type):
7125 name = 'AllWatcher'
7126 version = 1
7127 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
7128 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
7129 'type': 'array'}},
7130 'required': ['deltas'],
7131 'type': 'object'},
7132 'Delta': {'additionalProperties': False,
7133 'properties': {'entity': {'additionalProperties': True,
7134 'type': 'object'},
7135 'removed': {'type': 'boolean'}},
7136 'required': ['removed', 'entity'],
7137 'type': 'object'}},
7138 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
7139 'type': 'object'},
7140 'Stop': {'type': 'object'}},
7141 'type': 'object'}
7142
7143
7144 @ReturnMapping(AllWatcherNextResults)
7145 async def Next(self):
7146 '''
7147
7148 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
7149 '''
7150 # map input types to rpc msg
7151 _params = dict()
7152 msg = dict(type='AllWatcher', request='Next', version=1, params=_params)
7153
7154 reply = await self.rpc(msg)
7155 return reply
7156
7157
7158
7159 @ReturnMapping(None)
7160 async def Stop(self):
7161 '''
7162
7163 Returns -> None
7164 '''
7165 # map input types to rpc msg
7166 _params = dict()
7167 msg = dict(type='AllWatcher', request='Stop', version=1, params=_params)
7168
7169 reply = await self.rpc(msg)
7170 return reply
7171
7172
7173 class AnnotationsFacade(Type):
7174 name = 'Annotations'
7175 version = 2
7176 schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
7177 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
7178 'type': 'object'},
7179 'entity': {'type': 'string'},
7180 'error': {'$ref': '#/definitions/ErrorResult'}},
7181 'required': ['entity', 'annotations'],
7182 'type': 'object'},
7183 'AnnotationsGetResults': {'additionalProperties': False,
7184 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
7185 'type': 'array'}},
7186 'required': ['results'],
7187 'type': 'object'},
7188 'AnnotationsSet': {'additionalProperties': False,
7189 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
7190 'type': 'array'}},
7191 'required': ['annotations'],
7192 'type': 'object'},
7193 'Entities': {'additionalProperties': False,
7194 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7195 'type': 'array'}},
7196 'required': ['entities'],
7197 'type': 'object'},
7198 'Entity': {'additionalProperties': False,
7199 'properties': {'tag': {'type': 'string'}},
7200 'required': ['tag'],
7201 'type': 'object'},
7202 'EntityAnnotations': {'additionalProperties': False,
7203 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
7204 'type': 'object'},
7205 'entity': {'type': 'string'}},
7206 'required': ['entity', 'annotations'],
7207 'type': 'object'},
7208 'Error': {'additionalProperties': False,
7209 'properties': {'code': {'type': 'string'},
7210 'info': {'$ref': '#/definitions/ErrorInfo'},
7211 'message': {'type': 'string'}},
7212 'required': ['message', 'code'],
7213 'type': 'object'},
7214 'ErrorInfo': {'additionalProperties': False,
7215 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7216 'macaroon-path': {'type': 'string'}},
7217 'type': 'object'},
7218 'ErrorResult': {'additionalProperties': False,
7219 'properties': {'error': {'$ref': '#/definitions/Error'}},
7220 'type': 'object'},
7221 'ErrorResults': {'additionalProperties': False,
7222 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7223 'type': 'array'}},
7224 'required': ['results'],
7225 'type': 'object'},
7226 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
7227 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7228 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
7229 'type': 'object'},
7230 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
7231 'Result': {'$ref': '#/definitions/ErrorResults'}},
7232 'type': 'object'}},
7233 'type': 'object'}
7234
7235
7236 @ReturnMapping(AnnotationsGetResults)
7237 async def Get(self, entities):
7238 '''
7239 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7240 Returns -> typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult>
7241 '''
7242 # map input types to rpc msg
7243 _params = dict()
7244 msg = dict(type='Annotations', request='Get', version=2, params=_params)
7245 _params['entities'] = entities
7246 reply = await self.rpc(msg)
7247 return reply
7248
7249
7250
7251 @ReturnMapping(ErrorResults)
7252 async def Set(self, annotations):
7253 '''
7254 annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations>
7255 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7256 '''
7257 # map input types to rpc msg
7258 _params = dict()
7259 msg = dict(type='Annotations', request='Set', version=2, params=_params)
7260 _params['annotations'] = annotations
7261 reply = await self.rpc(msg)
7262 return reply
7263
7264
7265 class ApplicationFacade(Type):
7266 name = 'Application'
7267 version = 3
7268 schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
7269 'properties': {'application': {'type': 'string'},
7270 'num-units': {'type': 'integer'},
7271 'placement': {'items': {'$ref': '#/definitions/Placement'},
7272 'type': 'array'}},
7273 'required': ['application',
7274 'num-units',
7275 'placement'],
7276 'type': 'object'},
7277 'AddApplicationUnitsResults': {'additionalProperties': False,
7278 'properties': {'units': {'items': {'type': 'string'},
7279 'type': 'array'}},
7280 'required': ['units'],
7281 'type': 'object'},
7282 'AddRelation': {'additionalProperties': False,
7283 'properties': {'endpoints': {'items': {'type': 'string'},
7284 'type': 'array'}},
7285 'required': ['endpoints'],
7286 'type': 'object'},
7287 'AddRelationResults': {'additionalProperties': False,
7288 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
7289 'type': 'object'}},
7290 'required': ['endpoints'],
7291 'type': 'object'},
7292 'ApplicationCharmRelations': {'additionalProperties': False,
7293 'properties': {'application': {'type': 'string'}},
7294 'required': ['application'],
7295 'type': 'object'},
7296 'ApplicationCharmRelationsResults': {'additionalProperties': False,
7297 'properties': {'charm-relations': {'items': {'type': 'string'},
7298 'type': 'array'}},
7299 'required': ['charm-relations'],
7300 'type': 'object'},
7301 'ApplicationDeploy': {'additionalProperties': False,
7302 'properties': {'application': {'type': 'string'},
7303 'channel': {'type': 'string'},
7304 'charm-url': {'type': 'string'},
7305 'config': {'patternProperties': {'.*': {'type': 'string'}},
7306 'type': 'object'},
7307 'config-yaml': {'type': 'string'},
7308 'constraints': {'$ref': '#/definitions/Value'},
7309 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
7310 'type': 'object'},
7311 'num-units': {'type': 'integer'},
7312 'placement': {'items': {'$ref': '#/definitions/Placement'},
7313 'type': 'array'},
7314 'resources': {'patternProperties': {'.*': {'type': 'string'}},
7315 'type': 'object'},
7316 'series': {'type': 'string'},
7317 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
7318 'type': 'object'}},
7319 'required': ['application',
7320 'series',
7321 'charm-url',
7322 'channel',
7323 'num-units',
7324 'config-yaml',
7325 'constraints'],
7326 'type': 'object'},
7327 'ApplicationDestroy': {'additionalProperties': False,
7328 'properties': {'application': {'type': 'string'}},
7329 'required': ['application'],
7330 'type': 'object'},
7331 'ApplicationExpose': {'additionalProperties': False,
7332 'properties': {'application': {'type': 'string'}},
7333 'required': ['application'],
7334 'type': 'object'},
7335 'ApplicationGet': {'additionalProperties': False,
7336 'properties': {'application': {'type': 'string'}},
7337 'required': ['application'],
7338 'type': 'object'},
7339 'ApplicationGetResults': {'additionalProperties': False,
7340 'properties': {'application': {'type': 'string'},
7341 'charm': {'type': 'string'},
7342 'config': {'patternProperties': {'.*': {'additionalProperties': True,
7343 'type': 'object'}},
7344 'type': 'object'},
7345 'constraints': {'$ref': '#/definitions/Value'},
7346 'series': {'type': 'string'}},
7347 'required': ['application',
7348 'charm',
7349 'config',
7350 'constraints',
7351 'series'],
7352 'type': 'object'},
7353 'ApplicationMetricCredential': {'additionalProperties': False,
7354 'properties': {'application': {'type': 'string'},
7355 'metrics-credentials': {'items': {'type': 'integer'},
7356 'type': 'array'}},
7357 'required': ['application',
7358 'metrics-credentials'],
7359 'type': 'object'},
7360 'ApplicationMetricCredentials': {'additionalProperties': False,
7361 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
7362 'type': 'array'}},
7363 'required': ['creds'],
7364 'type': 'object'},
7365 'ApplicationSet': {'additionalProperties': False,
7366 'properties': {'application': {'type': 'string'},
7367 'options': {'patternProperties': {'.*': {'type': 'string'}},
7368 'type': 'object'}},
7369 'required': ['application', 'options'],
7370 'type': 'object'},
7371 'ApplicationSetCharm': {'additionalProperties': False,
7372 'properties': {'application': {'type': 'string'},
7373 'channel': {'type': 'string'},
7374 'charm-url': {'type': 'string'},
7375 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
7376 'type': 'object'},
7377 'config-settings-yaml': {'type': 'string'},
7378 'force-series': {'type': 'boolean'},
7379 'force-units': {'type': 'boolean'},
7380 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
7381 'type': 'object'},
7382 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
7383 'type': 'object'}},
7384 'required': ['application',
7385 'charm-url',
7386 'channel',
7387 'force-units',
7388 'force-series'],
7389 'type': 'object'},
7390 'ApplicationUnexpose': {'additionalProperties': False,
7391 'properties': {'application': {'type': 'string'}},
7392 'required': ['application'],
7393 'type': 'object'},
7394 'ApplicationUnset': {'additionalProperties': False,
7395 'properties': {'application': {'type': 'string'},
7396 'options': {'items': {'type': 'string'},
7397 'type': 'array'}},
7398 'required': ['application', 'options'],
7399 'type': 'object'},
7400 'ApplicationUpdate': {'additionalProperties': False,
7401 'properties': {'application': {'type': 'string'},
7402 'charm-url': {'type': 'string'},
7403 'constraints': {'$ref': '#/definitions/Value'},
7404 'force-charm-url': {'type': 'boolean'},
7405 'force-series': {'type': 'boolean'},
7406 'min-units': {'type': 'integer'},
7407 'settings': {'patternProperties': {'.*': {'type': 'string'}},
7408 'type': 'object'},
7409 'settings-yaml': {'type': 'string'}},
7410 'required': ['application',
7411 'charm-url',
7412 'force-charm-url',
7413 'force-series',
7414 'settings-yaml'],
7415 'type': 'object'},
7416 'ApplicationsDeploy': {'additionalProperties': False,
7417 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
7418 'type': 'array'}},
7419 'required': ['applications'],
7420 'type': 'object'},
7421 'CharmRelation': {'additionalProperties': False,
7422 'properties': {'interface': {'type': 'string'},
7423 'limit': {'type': 'integer'},
7424 'name': {'type': 'string'},
7425 'optional': {'type': 'boolean'},
7426 'role': {'type': 'string'},
7427 'scope': {'type': 'string'}},
7428 'required': ['name',
7429 'role',
7430 'interface',
7431 'optional',
7432 'limit',
7433 'scope'],
7434 'type': 'object'},
7435 'Constraints': {'additionalProperties': False,
7436 'properties': {'Count': {'type': 'integer'},
7437 'Pool': {'type': 'string'},
7438 'Size': {'type': 'integer'}},
7439 'required': ['Pool', 'Size', 'Count'],
7440 'type': 'object'},
7441 'DestroyApplicationUnits': {'additionalProperties': False,
7442 'properties': {'unit-names': {'items': {'type': 'string'},
7443 'type': 'array'}},
7444 'required': ['unit-names'],
7445 'type': 'object'},
7446 'DestroyRelation': {'additionalProperties': False,
7447 'properties': {'endpoints': {'items': {'type': 'string'},
7448 'type': 'array'}},
7449 'required': ['endpoints'],
7450 'type': 'object'},
7451 'Error': {'additionalProperties': False,
7452 'properties': {'code': {'type': 'string'},
7453 'info': {'$ref': '#/definitions/ErrorInfo'},
7454 'message': {'type': 'string'}},
7455 'required': ['message', 'code'],
7456 'type': 'object'},
7457 'ErrorInfo': {'additionalProperties': False,
7458 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7459 'macaroon-path': {'type': 'string'}},
7460 'type': 'object'},
7461 'ErrorResult': {'additionalProperties': False,
7462 'properties': {'error': {'$ref': '#/definitions/Error'}},
7463 'type': 'object'},
7464 'ErrorResults': {'additionalProperties': False,
7465 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7466 'type': 'array'}},
7467 'required': ['results'],
7468 'type': 'object'},
7469 'GetApplicationConstraints': {'additionalProperties': False,
7470 'properties': {'application': {'type': 'string'}},
7471 'required': ['application'],
7472 'type': 'object'},
7473 'GetConstraintsResults': {'additionalProperties': False,
7474 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
7475 'required': ['constraints'],
7476 'type': 'object'},
7477 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7478 'Placement': {'additionalProperties': False,
7479 'properties': {'directive': {'type': 'string'},
7480 'scope': {'type': 'string'}},
7481 'required': ['scope', 'directive'],
7482 'type': 'object'},
7483 'SetConstraints': {'additionalProperties': False,
7484 'properties': {'application': {'type': 'string'},
7485 'constraints': {'$ref': '#/definitions/Value'}},
7486 'required': ['application', 'constraints'],
7487 'type': 'object'},
7488 'StorageConstraints': {'additionalProperties': False,
7489 'properties': {'count': {'type': 'integer'},
7490 'pool': {'type': 'string'},
7491 'size': {'type': 'integer'}},
7492 'type': 'object'},
7493 'StringResult': {'additionalProperties': False,
7494 'properties': {'error': {'$ref': '#/definitions/Error'},
7495 'result': {'type': 'string'}},
7496 'required': ['result'],
7497 'type': 'object'},
7498 'Value': {'additionalProperties': False,
7499 'properties': {'arch': {'type': 'string'},
7500 'container': {'type': 'string'},
7501 'cores': {'type': 'integer'},
7502 'cpu-power': {'type': 'integer'},
7503 'instance-type': {'type': 'string'},
7504 'mem': {'type': 'integer'},
7505 'root-disk': {'type': 'integer'},
7506 'spaces': {'items': {'type': 'string'},
7507 'type': 'array'},
7508 'tags': {'items': {'type': 'string'},
7509 'type': 'array'},
7510 'virt-type': {'type': 'string'}},
7511 'type': 'object'}},
7512 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
7513 'Result': {'$ref': '#/definitions/AddRelationResults'}},
7514 'type': 'object'},
7515 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
7516 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
7517 'type': 'object'},
7518 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
7519 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
7520 'type': 'object'},
7521 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
7522 'Result': {'$ref': '#/definitions/ErrorResults'}},
7523 'type': 'object'},
7524 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
7525 'type': 'object'},
7526 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
7527 'type': 'object'},
7528 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
7529 'type': 'object'},
7530 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
7531 'type': 'object'},
7532 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
7533 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
7534 'type': 'object'},
7535 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
7536 'Result': {'$ref': '#/definitions/StringResult'}},
7537 'type': 'object'},
7538 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
7539 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
7540 'type': 'object'},
7541 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
7542 'type': 'object'},
7543 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
7544 'type': 'object'},
7545 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
7546 'type': 'object'},
7547 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
7548 'Result': {'$ref': '#/definitions/ErrorResults'}},
7549 'type': 'object'},
7550 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
7551 'type': 'object'},
7552 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
7553 'type': 'object'},
7554 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
7555 'type': 'object'}},
7556 'type': 'object'}
7557
7558
7559 @ReturnMapping(AddRelationResults)
7560 async def AddRelation(self, endpoints):
7561 '''
7562 endpoints : typing.Sequence<+T_co>[str]
7563 Returns -> typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
7564 '''
7565 # map input types to rpc msg
7566 _params = dict()
7567 msg = dict(type='Application', request='AddRelation', version=3, params=_params)
7568 _params['endpoints'] = endpoints
7569 reply = await self.rpc(msg)
7570 return reply
7571
7572
7573
7574 @ReturnMapping(AddApplicationUnitsResults)
7575 async def AddUnits(self, application, num_units, placement):
7576 '''
7577 application : str
7578 num_units : int
7579 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
7580 Returns -> typing.Sequence<+T_co>[str]
7581 '''
7582 # map input types to rpc msg
7583 _params = dict()
7584 msg = dict(type='Application', request='AddUnits', version=3, params=_params)
7585 _params['application'] = application
7586 _params['num-units'] = num_units
7587 _params['placement'] = placement
7588 reply = await self.rpc(msg)
7589 return reply
7590
7591
7592
7593 @ReturnMapping(ApplicationCharmRelationsResults)
7594 async def CharmRelations(self, application):
7595 '''
7596 application : str
7597 Returns -> typing.Sequence<+T_co>[str]
7598 '''
7599 # map input types to rpc msg
7600 _params = dict()
7601 msg = dict(type='Application', request='CharmRelations', version=3, params=_params)
7602 _params['application'] = application
7603 reply = await self.rpc(msg)
7604 return reply
7605
7606
7607
7608 @ReturnMapping(ErrorResults)
7609 async def Deploy(self, applications):
7610 '''
7611 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
7612 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7613 '''
7614 # map input types to rpc msg
7615 _params = dict()
7616 msg = dict(type='Application', request='Deploy', version=3, params=_params)
7617 _params['applications'] = applications
7618 reply = await self.rpc(msg)
7619 return reply
7620
7621
7622
7623 @ReturnMapping(None)
7624 async def Destroy(self, application):
7625 '''
7626 application : str
7627 Returns -> None
7628 '''
7629 # map input types to rpc msg
7630 _params = dict()
7631 msg = dict(type='Application', request='Destroy', version=3, params=_params)
7632 _params['application'] = application
7633 reply = await self.rpc(msg)
7634 return reply
7635
7636
7637
7638 @ReturnMapping(None)
7639 async def DestroyRelation(self, endpoints):
7640 '''
7641 endpoints : typing.Sequence<+T_co>[str]
7642 Returns -> None
7643 '''
7644 # map input types to rpc msg
7645 _params = dict()
7646 msg = dict(type='Application', request='DestroyRelation', version=3, params=_params)
7647 _params['endpoints'] = endpoints
7648 reply = await self.rpc(msg)
7649 return reply
7650
7651
7652
7653 @ReturnMapping(None)
7654 async def DestroyUnits(self, unit_names):
7655 '''
7656 unit_names : typing.Sequence<+T_co>[str]
7657 Returns -> None
7658 '''
7659 # map input types to rpc msg
7660 _params = dict()
7661 msg = dict(type='Application', request='DestroyUnits', version=3, params=_params)
7662 _params['unit-names'] = unit_names
7663 reply = await self.rpc(msg)
7664 return reply
7665
7666
7667
7668 @ReturnMapping(None)
7669 async def Expose(self, application):
7670 '''
7671 application : str
7672 Returns -> None
7673 '''
7674 # map input types to rpc msg
7675 _params = dict()
7676 msg = dict(type='Application', request='Expose', version=3, params=_params)
7677 _params['application'] = application
7678 reply = await self.rpc(msg)
7679 return reply
7680
7681
7682
7683 @ReturnMapping(ApplicationGetResults)
7684 async def Get(self, application):
7685 '''
7686 application : str
7687 Returns -> typing.Union[str, typing.Mapping<~KT, +VT_co>[str, typing.Any], _ForwardRef('Value')]
7688 '''
7689 # map input types to rpc msg
7690 _params = dict()
7691 msg = dict(type='Application', request='Get', version=3, params=_params)
7692 _params['application'] = application
7693 reply = await self.rpc(msg)
7694 return reply
7695
7696
7697
7698 @ReturnMapping(StringResult)
7699 async def GetCharmURL(self, application):
7700 '''
7701 application : str
7702 Returns -> typing.Union[_ForwardRef('Error'), str]
7703 '''
7704 # map input types to rpc msg
7705 _params = dict()
7706 msg = dict(type='Application', request='GetCharmURL', version=3, params=_params)
7707 _params['application'] = application
7708 reply = await self.rpc(msg)
7709 return reply
7710
7711
7712
7713 @ReturnMapping(GetConstraintsResults)
7714 async def GetConstraints(self, application):
7715 '''
7716 application : str
7717 Returns -> Value
7718 '''
7719 # map input types to rpc msg
7720 _params = dict()
7721 msg = dict(type='Application', request='GetConstraints', version=3, params=_params)
7722 _params['application'] = application
7723 reply = await self.rpc(msg)
7724 return reply
7725
7726
7727
7728 @ReturnMapping(None)
7729 async def Set(self, application, options):
7730 '''
7731 application : str
7732 options : typing.Mapping<~KT, +VT_co>[str, str]
7733 Returns -> None
7734 '''
7735 # map input types to rpc msg
7736 _params = dict()
7737 msg = dict(type='Application', request='Set', version=3, params=_params)
7738 _params['application'] = application
7739 _params['options'] = options
7740 reply = await self.rpc(msg)
7741 return reply
7742
7743
7744
7745 @ReturnMapping(None)
7746 async def SetCharm(self, application, channel, charm_url, config_settings, config_settings_yaml, force_series, force_units, resource_ids, storage_constraints):
7747 '''
7748 application : str
7749 channel : str
7750 charm_url : str
7751 config_settings : typing.Mapping<~KT, +VT_co>[str, str]
7752 config_settings_yaml : str
7753 force_series : bool
7754 force_units : bool
7755 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
7756 storage_constraints : typing.Mapping<~KT, +VT_co>[str, ~StorageConstraints]<~StorageConstraints>
7757 Returns -> None
7758 '''
7759 # map input types to rpc msg
7760 _params = dict()
7761 msg = dict(type='Application', request='SetCharm', version=3, params=_params)
7762 _params['application'] = application
7763 _params['channel'] = channel
7764 _params['charm-url'] = charm_url
7765 _params['config-settings'] = config_settings
7766 _params['config-settings-yaml'] = config_settings_yaml
7767 _params['force-series'] = force_series
7768 _params['force-units'] = force_units
7769 _params['resource-ids'] = resource_ids
7770 _params['storage-constraints'] = storage_constraints
7771 reply = await self.rpc(msg)
7772 return reply
7773
7774
7775
7776 @ReturnMapping(None)
7777 async def SetConstraints(self, application, constraints):
7778 '''
7779 application : str
7780 constraints : Value
7781 Returns -> None
7782 '''
7783 # map input types to rpc msg
7784 _params = dict()
7785 msg = dict(type='Application', request='SetConstraints', version=3, params=_params)
7786 _params['application'] = application
7787 _params['constraints'] = constraints
7788 reply = await self.rpc(msg)
7789 return reply
7790
7791
7792
7793 @ReturnMapping(ErrorResults)
7794 async def SetMetricCredentials(self, creds):
7795 '''
7796 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
7797 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7798 '''
7799 # map input types to rpc msg
7800 _params = dict()
7801 msg = dict(type='Application', request='SetMetricCredentials', version=3, params=_params)
7802 _params['creds'] = creds
7803 reply = await self.rpc(msg)
7804 return reply
7805
7806
7807
7808 @ReturnMapping(None)
7809 async def Unexpose(self, application):
7810 '''
7811 application : str
7812 Returns -> None
7813 '''
7814 # map input types to rpc msg
7815 _params = dict()
7816 msg = dict(type='Application', request='Unexpose', version=3, params=_params)
7817 _params['application'] = application
7818 reply = await self.rpc(msg)
7819 return reply
7820
7821
7822
7823 @ReturnMapping(None)
7824 async def Unset(self, application, options):
7825 '''
7826 application : str
7827 options : typing.Sequence<+T_co>[str]
7828 Returns -> None
7829 '''
7830 # map input types to rpc msg
7831 _params = dict()
7832 msg = dict(type='Application', request='Unset', version=3, params=_params)
7833 _params['application'] = application
7834 _params['options'] = options
7835 reply = await self.rpc(msg)
7836 return reply
7837
7838
7839
7840 @ReturnMapping(None)
7841 async def Update(self, application, charm_url, constraints, force_charm_url, force_series, min_units, settings, settings_yaml):
7842 '''
7843 application : str
7844 charm_url : str
7845 constraints : Value
7846 force_charm_url : bool
7847 force_series : bool
7848 min_units : int
7849 settings : typing.Mapping<~KT, +VT_co>[str, str]
7850 settings_yaml : str
7851 Returns -> None
7852 '''
7853 # map input types to rpc msg
7854 _params = dict()
7855 msg = dict(type='Application', request='Update', version=3, params=_params)
7856 _params['application'] = application
7857 _params['charm-url'] = charm_url
7858 _params['constraints'] = constraints
7859 _params['force-charm-url'] = force_charm_url
7860 _params['force-series'] = force_series
7861 _params['min-units'] = min_units
7862 _params['settings'] = settings
7863 _params['settings-yaml'] = settings_yaml
7864 reply = await self.rpc(msg)
7865 return reply
7866
7867
7868 class ApplicationRelationsWatcherFacade(Type):
7869 name = 'ApplicationRelationsWatcher'
7870 version = 1
7871 schema = {'definitions': {'ApplicationRelationsChange': {'additionalProperties': False,
7872 'properties': {'changed': {'items': {'$ref': '#/definitions/RelationChange'},
7873 'type': 'array'},
7874 'removed': {'items': {'type': 'integer'},
7875 'type': 'array'}},
7876 'type': 'object'},
7877 'ApplicationRelationsWatchResult': {'additionalProperties': False,
7878 'properties': {'ApplicationRelationsWatcherId': {'type': 'string'},
7879 'changes': {'$ref': '#/definitions/ApplicationRelationsChange'},
7880 'error': {'$ref': '#/definitions/Error'}},
7881 'required': ['ApplicationRelationsWatcherId'],
7882 'type': 'object'},
7883 'Error': {'additionalProperties': False,
7884 'properties': {'code': {'type': 'string'},
7885 'info': {'$ref': '#/definitions/ErrorInfo'},
7886 'message': {'type': 'string'}},
7887 'required': ['message', 'code'],
7888 'type': 'object'},
7889 'ErrorInfo': {'additionalProperties': False,
7890 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7891 'macaroon-path': {'type': 'string'}},
7892 'type': 'object'},
7893 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7894 'RelationChange': {'additionalProperties': False,
7895 'properties': {'changedunits': {'patternProperties': {'.*': {'$ref': '#/definitions/RelationUnitChange'}},
7896 'type': 'object'},
7897 'departedunits': {'items': {'type': 'string'},
7898 'type': 'array'},
7899 'id': {'type': 'integer'},
7900 'life': {'type': 'string'}},
7901 'required': ['id', 'life'],
7902 'type': 'object'},
7903 'RelationUnitChange': {'additionalProperties': False,
7904 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
7905 'type': 'object'}},
7906 'type': 'object'}},
7907 'type': 'object'}},
7908 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/ApplicationRelationsWatchResult'}},
7909 'type': 'object'},
7910 'Stop': {'type': 'object'}},
7911 'type': 'object'}
7912
7913
7914 @ReturnMapping(ApplicationRelationsWatchResult)
7915 async def Next(self):
7916 '''
7917
7918 Returns -> typing.Union[str, _ForwardRef('ApplicationRelationsChange'), _ForwardRef('Error')]
7919 '''
7920 # map input types to rpc msg
7921 _params = dict()
7922 msg = dict(type='ApplicationRelationsWatcher', request='Next', version=1, params=_params)
7923
7924 reply = await self.rpc(msg)
7925 return reply
7926
7927
7928
7929 @ReturnMapping(None)
7930 async def Stop(self):
7931 '''
7932
7933 Returns -> None
7934 '''
7935 # map input types to rpc msg
7936 _params = dict()
7937 msg = dict(type='ApplicationRelationsWatcher', request='Stop', version=1, params=_params)
7938
7939 reply = await self.rpc(msg)
7940 return reply
7941
7942
7943 class ApplicationScalerFacade(Type):
7944 name = 'ApplicationScaler'
7945 version = 1
7946 schema = {'definitions': {'Entities': {'additionalProperties': False,
7947 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7948 'type': 'array'}},
7949 'required': ['entities'],
7950 'type': 'object'},
7951 'Entity': {'additionalProperties': False,
7952 'properties': {'tag': {'type': 'string'}},
7953 'required': ['tag'],
7954 'type': 'object'},
7955 'Error': {'additionalProperties': False,
7956 'properties': {'code': {'type': 'string'},
7957 'info': {'$ref': '#/definitions/ErrorInfo'},
7958 'message': {'type': 'string'}},
7959 'required': ['message', 'code'],
7960 'type': 'object'},
7961 'ErrorInfo': {'additionalProperties': False,
7962 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7963 'macaroon-path': {'type': 'string'}},
7964 'type': 'object'},
7965 'ErrorResult': {'additionalProperties': False,
7966 'properties': {'error': {'$ref': '#/definitions/Error'}},
7967 'type': 'object'},
7968 'ErrorResults': {'additionalProperties': False,
7969 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7970 'type': 'array'}},
7971 'required': ['results'],
7972 'type': 'object'},
7973 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7974 'StringsWatchResult': {'additionalProperties': False,
7975 'properties': {'changes': {'items': {'type': 'string'},
7976 'type': 'array'},
7977 'error': {'$ref': '#/definitions/Error'},
7978 'watcher-id': {'type': 'string'}},
7979 'required': ['watcher-id'],
7980 'type': 'object'}},
7981 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7982 'Result': {'$ref': '#/definitions/ErrorResults'}},
7983 'type': 'object'},
7984 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
7985 'type': 'object'}},
7986 'type': 'object'}
7987
7988
7989 @ReturnMapping(ErrorResults)
7990 async def Rescale(self, entities):
7991 '''
7992 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7993 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7994 '''
7995 # map input types to rpc msg
7996 _params = dict()
7997 msg = dict(type='ApplicationScaler', request='Rescale', version=1, params=_params)
7998 _params['entities'] = entities
7999 reply = await self.rpc(msg)
8000 return reply
8001
8002
8003
8004 @ReturnMapping(StringsWatchResult)
8005 async def Watch(self):
8006 '''
8007
8008 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
8009 '''
8010 # map input types to rpc msg
8011 _params = dict()
8012 msg = dict(type='ApplicationScaler', request='Watch', version=1, params=_params)
8013
8014 reply = await self.rpc(msg)
8015 return reply
8016
8017
8018 class BackupsFacade(Type):
8019 name = 'Backups'
8020 version = 1
8021 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
8022 'properties': {'notes': {'type': 'string'}},
8023 'required': ['notes'],
8024 'type': 'object'},
8025 'BackupsInfoArgs': {'additionalProperties': False,
8026 'properties': {'id': {'type': 'string'}},
8027 'required': ['id'],
8028 'type': 'object'},
8029 'BackupsListArgs': {'additionalProperties': False,
8030 'type': 'object'},
8031 'BackupsListResult': {'additionalProperties': False,
8032 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
8033 'type': 'array'}},
8034 'required': ['list'],
8035 'type': 'object'},
8036 'BackupsMetadataResult': {'additionalProperties': False,
8037 'properties': {'ca-cert': {'type': 'string'},
8038 'ca-private-key': {'type': 'string'},
8039 'checksum': {'type': 'string'},
8040 'checksum-format': {'type': 'string'},
8041 'finished': {'format': 'date-time',
8042 'type': 'string'},
8043 'hostname': {'type': 'string'},
8044 'id': {'type': 'string'},
8045 'machine': {'type': 'string'},
8046 'model': {'type': 'string'},
8047 'notes': {'type': 'string'},
8048 'series': {'type': 'string'},
8049 'size': {'type': 'integer'},
8050 'started': {'format': 'date-time',
8051 'type': 'string'},
8052 'stored': {'format': 'date-time',
8053 'type': 'string'},
8054 'version': {'$ref': '#/definitions/Number'}},
8055 'required': ['id',
8056 'checksum',
8057 'checksum-format',
8058 'size',
8059 'stored',
8060 'started',
8061 'finished',
8062 'notes',
8063 'model',
8064 'machine',
8065 'hostname',
8066 'version',
8067 'series',
8068 'ca-cert',
8069 'ca-private-key'],
8070 'type': 'object'},
8071 'BackupsRemoveArgs': {'additionalProperties': False,
8072 'properties': {'id': {'type': 'string'}},
8073 'required': ['id'],
8074 'type': 'object'},
8075 'Number': {'additionalProperties': False,
8076 'properties': {'Build': {'type': 'integer'},
8077 'Major': {'type': 'integer'},
8078 'Minor': {'type': 'integer'},
8079 'Patch': {'type': 'integer'},
8080 'Tag': {'type': 'string'}},
8081 'required': ['Major',
8082 'Minor',
8083 'Tag',
8084 'Patch',
8085 'Build'],
8086 'type': 'object'},
8087 'RestoreArgs': {'additionalProperties': False,
8088 'properties': {'backup-id': {'type': 'string'}},
8089 'required': ['backup-id'],
8090 'type': 'object'}},
8091 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
8092 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
8093 'type': 'object'},
8094 'FinishRestore': {'type': 'object'},
8095 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
8096 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
8097 'type': 'object'},
8098 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
8099 'Result': {'$ref': '#/definitions/BackupsListResult'}},
8100 'type': 'object'},
8101 'PrepareRestore': {'type': 'object'},
8102 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
8103 'type': 'object'},
8104 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
8105 'type': 'object'}},
8106 'type': 'object'}
8107
8108
8109 @ReturnMapping(BackupsMetadataResult)
8110 async def Create(self, notes):
8111 '''
8112 notes : str
8113 Returns -> typing.Union[str, int, _ForwardRef('Number')]
8114 '''
8115 # map input types to rpc msg
8116 _params = dict()
8117 msg = dict(type='Backups', request='Create', version=1, params=_params)
8118 _params['notes'] = notes
8119 reply = await self.rpc(msg)
8120 return reply
8121
8122
8123
8124 @ReturnMapping(None)
8125 async def FinishRestore(self):
8126 '''
8127
8128 Returns -> None
8129 '''
8130 # map input types to rpc msg
8131 _params = dict()
8132 msg = dict(type='Backups', request='FinishRestore', version=1, params=_params)
8133
8134 reply = await self.rpc(msg)
8135 return reply
8136
8137
8138
8139 @ReturnMapping(BackupsMetadataResult)
8140 async def Info(self, id_):
8141 '''
8142 id_ : str
8143 Returns -> typing.Union[str, int, _ForwardRef('Number')]
8144 '''
8145 # map input types to rpc msg
8146 _params = dict()
8147 msg = dict(type='Backups', request='Info', version=1, params=_params)
8148 _params['id'] = id_
8149 reply = await self.rpc(msg)
8150 return reply
8151
8152
8153
8154 @ReturnMapping(BackupsListResult)
8155 async def List(self):
8156 '''
8157
8158 Returns -> typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
8159 '''
8160 # map input types to rpc msg
8161 _params = dict()
8162 msg = dict(type='Backups', request='List', version=1, params=_params)
8163
8164 reply = await self.rpc(msg)
8165 return reply
8166
8167
8168
8169 @ReturnMapping(None)
8170 async def PrepareRestore(self):
8171 '''
8172
8173 Returns -> None
8174 '''
8175 # map input types to rpc msg
8176 _params = dict()
8177 msg = dict(type='Backups', request='PrepareRestore', version=1, params=_params)
8178
8179 reply = await self.rpc(msg)
8180 return reply
8181
8182
8183
8184 @ReturnMapping(None)
8185 async def Remove(self, id_):
8186 '''
8187 id_ : str
8188 Returns -> None
8189 '''
8190 # map input types to rpc msg
8191 _params = dict()
8192 msg = dict(type='Backups', request='Remove', version=1, params=_params)
8193 _params['id'] = id_
8194 reply = await self.rpc(msg)
8195 return reply
8196
8197
8198
8199 @ReturnMapping(None)
8200 async def Restore(self, backup_id):
8201 '''
8202 backup_id : str
8203 Returns -> None
8204 '''
8205 # map input types to rpc msg
8206 _params = dict()
8207 msg = dict(type='Backups', request='Restore', version=1, params=_params)
8208 _params['backup-id'] = backup_id
8209 reply = await self.rpc(msg)
8210 return reply
8211
8212
8213 class BlockFacade(Type):
8214 name = 'Block'
8215 version = 2
8216 schema = {'definitions': {'Block': {'additionalProperties': False,
8217 'properties': {'id': {'type': 'string'},
8218 'message': {'type': 'string'},
8219 'tag': {'type': 'string'},
8220 'type': {'type': 'string'}},
8221 'required': ['id', 'tag', 'type'],
8222 'type': 'object'},
8223 'BlockResult': {'additionalProperties': False,
8224 'properties': {'error': {'$ref': '#/definitions/Error'},
8225 'result': {'$ref': '#/definitions/Block'}},
8226 'required': ['result'],
8227 'type': 'object'},
8228 'BlockResults': {'additionalProperties': False,
8229 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
8230 'type': 'array'}},
8231 'type': 'object'},
8232 'BlockSwitchParams': {'additionalProperties': False,
8233 'properties': {'message': {'type': 'string'},
8234 'type': {'type': 'string'}},
8235 'required': ['type'],
8236 'type': 'object'},
8237 'Error': {'additionalProperties': False,
8238 'properties': {'code': {'type': 'string'},
8239 'info': {'$ref': '#/definitions/ErrorInfo'},
8240 'message': {'type': 'string'}},
8241 'required': ['message', 'code'],
8242 'type': 'object'},
8243 'ErrorInfo': {'additionalProperties': False,
8244 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8245 'macaroon-path': {'type': 'string'}},
8246 'type': 'object'},
8247 'ErrorResult': {'additionalProperties': False,
8248 'properties': {'error': {'$ref': '#/definitions/Error'}},
8249 'type': 'object'},
8250 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
8251 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
8252 'type': 'object'},
8253 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
8254 'Result': {'$ref': '#/definitions/ErrorResult'}},
8255 'type': 'object'},
8256 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
8257 'Result': {'$ref': '#/definitions/ErrorResult'}},
8258 'type': 'object'}},
8259 'type': 'object'}
8260
8261
8262 @ReturnMapping(BlockResults)
8263 async def List(self):
8264 '''
8265
8266 Returns -> typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
8267 '''
8268 # map input types to rpc msg
8269 _params = dict()
8270 msg = dict(type='Block', request='List', version=2, params=_params)
8271
8272 reply = await self.rpc(msg)
8273 return reply
8274
8275
8276
8277 @ReturnMapping(ErrorResult)
8278 async def SwitchBlockOff(self, message, type_):
8279 '''
8280 message : str
8281 type_ : str
8282 Returns -> Error
8283 '''
8284 # map input types to rpc msg
8285 _params = dict()
8286 msg = dict(type='Block', request='SwitchBlockOff', version=2, params=_params)
8287 _params['message'] = message
8288 _params['type'] = type_
8289 reply = await self.rpc(msg)
8290 return reply
8291
8292
8293
8294 @ReturnMapping(ErrorResult)
8295 async def SwitchBlockOn(self, message, type_):
8296 '''
8297 message : str
8298 type_ : str
8299 Returns -> Error
8300 '''
8301 # map input types to rpc msg
8302 _params = dict()
8303 msg = dict(type='Block', request='SwitchBlockOn', version=2, params=_params)
8304 _params['message'] = message
8305 _params['type'] = type_
8306 reply = await self.rpc(msg)
8307 return reply
8308
8309
8310 class BundleFacade(Type):
8311 name = 'Bundle'
8312 version = 1
8313 schema = {'definitions': {'BundleChange': {'additionalProperties': False,
8314 'properties': {'args': {'items': {'additionalProperties': True,
8315 'type': 'object'},
8316 'type': 'array'},
8317 'id': {'type': 'string'},
8318 'method': {'type': 'string'},
8319 'requires': {'items': {'type': 'string'},
8320 'type': 'array'}},
8321 'required': ['id',
8322 'method',
8323 'args',
8324 'requires'],
8325 'type': 'object'},
8326 'BundleChangesParams': {'additionalProperties': False,
8327 'properties': {'yaml': {'type': 'string'}},
8328 'required': ['yaml'],
8329 'type': 'object'},
8330 'BundleChangesResults': {'additionalProperties': False,
8331 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
8332 'type': 'array'},
8333 'errors': {'items': {'type': 'string'},
8334 'type': 'array'}},
8335 'type': 'object'}},
8336 'properties': {'GetChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
8337 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
8338 'type': 'object'}},
8339 'type': 'object'}
8340
8341
8342 @ReturnMapping(BundleChangesResults)
8343 async def GetChanges(self, yaml):
8344 '''
8345 yaml : str
8346 Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
8347 '''
8348 # map input types to rpc msg
8349 _params = dict()
8350 msg = dict(type='Bundle', request='GetChanges', version=1, params=_params)
8351 _params['yaml'] = yaml
8352 reply = await self.rpc(msg)
8353 return reply
8354
8355
8356 class CharmRevisionUpdaterFacade(Type):
8357 name = 'CharmRevisionUpdater'
8358 version = 2
8359 schema = {'definitions': {'Error': {'additionalProperties': False,
8360 'properties': {'code': {'type': 'string'},
8361 'info': {'$ref': '#/definitions/ErrorInfo'},
8362 'message': {'type': 'string'}},
8363 'required': ['message', 'code'],
8364 'type': 'object'},
8365 'ErrorInfo': {'additionalProperties': False,
8366 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8367 'macaroon-path': {'type': 'string'}},
8368 'type': 'object'},
8369 'ErrorResult': {'additionalProperties': False,
8370 'properties': {'error': {'$ref': '#/definitions/Error'}},
8371 'type': 'object'},
8372 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
8373 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
8374 'type': 'object'}},
8375 'type': 'object'}
8376
8377
8378 @ReturnMapping(ErrorResult)
8379 async def UpdateLatestRevisions(self):
8380 '''
8381
8382 Returns -> Error
8383 '''
8384 # map input types to rpc msg
8385 _params = dict()
8386 msg = dict(type='CharmRevisionUpdater', request='UpdateLatestRevisions', version=2, params=_params)
8387
8388 reply = await self.rpc(msg)
8389 return reply
8390
8391
8392 class CharmsFacade(Type):
8393 name = 'Charms'
8394 version = 2
8395 schema = {'definitions': {'CharmActionSpec': {'additionalProperties': False,
8396 'properties': {'description': {'type': 'string'},
8397 'params': {'patternProperties': {'.*': {'additionalProperties': True,
8398 'type': 'object'}},
8399 'type': 'object'}},
8400 'required': ['description', 'params'],
8401 'type': 'object'},
8402 'CharmActions': {'additionalProperties': False,
8403 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}},
8404 'type': 'object'}},
8405 'type': 'object'},
8406 'CharmInfo': {'additionalProperties': False,
8407 'properties': {'actions': {'$ref': '#/definitions/CharmActions'},
8408 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}},
8409 'type': 'object'},
8410 'meta': {'$ref': '#/definitions/CharmMeta'},
8411 'metrics': {'$ref': '#/definitions/CharmMetrics'},
8412 'revision': {'type': 'integer'},
8413 'url': {'type': 'string'}},
8414 'required': ['revision', 'url', 'config'],
8415 'type': 'object'},
8416 'CharmMeta': {'additionalProperties': False,
8417 'properties': {'categories': {'items': {'type': 'string'},
8418 'type': 'array'},
8419 'description': {'type': 'string'},
8420 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}},
8421 'type': 'object'},
8422 'min-juju-version': {'type': 'string'},
8423 'name': {'type': 'string'},
8424 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}},
8425 'type': 'object'},
8426 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8427 'type': 'object'},
8428 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8429 'type': 'object'},
8430 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8431 'type': 'object'},
8432 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}},
8433 'type': 'object'},
8434 'series': {'items': {'type': 'string'},
8435 'type': 'array'},
8436 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}},
8437 'type': 'object'},
8438 'subordinate': {'type': 'boolean'},
8439 'summary': {'type': 'string'},
8440 'tags': {'items': {'type': 'string'},
8441 'type': 'array'},
8442 'terms': {'items': {'type': 'string'},
8443 'type': 'array'}},
8444 'required': ['name',
8445 'summary',
8446 'description',
8447 'subordinate'],
8448 'type': 'object'},
8449 'CharmMetric': {'additionalProperties': False,
8450 'properties': {'description': {'type': 'string'},
8451 'type': {'type': 'string'}},
8452 'required': ['type', 'description'],
8453 'type': 'object'},
8454 'CharmMetrics': {'additionalProperties': False,
8455 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}},
8456 'type': 'object'},
8457 'plan': {'$ref': '#/definitions/CharmPlan'}},
8458 'required': ['metrics', 'plan'],
8459 'type': 'object'},
8460 'CharmOption': {'additionalProperties': False,
8461 'properties': {'default': {'additionalProperties': True,
8462 'type': 'object'},
8463 'description': {'type': 'string'},
8464 'type': {'type': 'string'}},
8465 'required': ['type'],
8466 'type': 'object'},
8467 'CharmPayloadClass': {'additionalProperties': False,
8468 'properties': {'name': {'type': 'string'},
8469 'type': {'type': 'string'}},
8470 'required': ['name', 'type'],
8471 'type': 'object'},
8472 'CharmPlan': {'additionalProperties': False,
8473 'properties': {'required': {'type': 'boolean'}},
8474 'required': ['required'],
8475 'type': 'object'},
8476 'CharmRelation': {'additionalProperties': False,
8477 'properties': {'interface': {'type': 'string'},
8478 'limit': {'type': 'integer'},
8479 'name': {'type': 'string'},
8480 'optional': {'type': 'boolean'},
8481 'role': {'type': 'string'},
8482 'scope': {'type': 'string'}},
8483 'required': ['name',
8484 'role',
8485 'interface',
8486 'optional',
8487 'limit',
8488 'scope'],
8489 'type': 'object'},
8490 'CharmResourceMeta': {'additionalProperties': False,
8491 'properties': {'description': {'type': 'string'},
8492 'name': {'type': 'string'},
8493 'path': {'type': 'string'},
8494 'type': {'type': 'string'}},
8495 'required': ['name',
8496 'type',
8497 'path',
8498 'description'],
8499 'type': 'object'},
8500 'CharmStorage': {'additionalProperties': False,
8501 'properties': {'count-max': {'type': 'integer'},
8502 'count-min': {'type': 'integer'},
8503 'description': {'type': 'string'},
8504 'location': {'type': 'string'},
8505 'minimum-size': {'type': 'integer'},
8506 'name': {'type': 'string'},
8507 'properties': {'items': {'type': 'string'},
8508 'type': 'array'},
8509 'read-only': {'type': 'boolean'},
8510 'shared': {'type': 'boolean'},
8511 'type': {'type': 'string'}},
8512 'required': ['name',
8513 'description',
8514 'type',
8515 'shared',
8516 'read-only',
8517 'count-min',
8518 'count-max',
8519 'minimum-size'],
8520 'type': 'object'},
8521 'CharmURL': {'additionalProperties': False,
8522 'properties': {'url': {'type': 'string'}},
8523 'required': ['url'],
8524 'type': 'object'},
8525 'CharmsList': {'additionalProperties': False,
8526 'properties': {'names': {'items': {'type': 'string'},
8527 'type': 'array'}},
8528 'required': ['names'],
8529 'type': 'object'},
8530 'CharmsListResult': {'additionalProperties': False,
8531 'properties': {'charm-urls': {'items': {'type': 'string'},
8532 'type': 'array'}},
8533 'required': ['charm-urls'],
8534 'type': 'object'},
8535 'IsMeteredResult': {'additionalProperties': False,
8536 'properties': {'metered': {'type': 'boolean'}},
8537 'required': ['metered'],
8538 'type': 'object'}},
8539 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
8540 'Result': {'$ref': '#/definitions/CharmInfo'}},
8541 'type': 'object'},
8542 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
8543 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
8544 'type': 'object'},
8545 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
8546 'Result': {'$ref': '#/definitions/CharmsListResult'}},
8547 'type': 'object'}},
8548 'type': 'object'}
8549
8550
8551 @ReturnMapping(CharmInfo)
8552 async def CharmInfo(self, url):
8553 '''
8554 url : str
8555 Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>, _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str]
8556 '''
8557 # map input types to rpc msg
8558 _params = dict()
8559 msg = dict(type='Charms', request='CharmInfo', version=2, params=_params)
8560 _params['url'] = url
8561 reply = await self.rpc(msg)
8562 return reply
8563
8564
8565
8566 @ReturnMapping(IsMeteredResult)
8567 async def IsMetered(self, url):
8568 '''
8569 url : str
8570 Returns -> bool
8571 '''
8572 # map input types to rpc msg
8573 _params = dict()
8574 msg = dict(type='Charms', request='IsMetered', version=2, params=_params)
8575 _params['url'] = url
8576 reply = await self.rpc(msg)
8577 return reply
8578
8579
8580
8581 @ReturnMapping(CharmsListResult)
8582 async def List(self, names):
8583 '''
8584 names : typing.Sequence<+T_co>[str]
8585 Returns -> typing.Sequence<+T_co>[str]
8586 '''
8587 # map input types to rpc msg
8588 _params = dict()
8589 msg = dict(type='Charms', request='List', version=2, params=_params)
8590 _params['names'] = names
8591 reply = await self.rpc(msg)
8592 return reply
8593
8594
8595 class CleanerFacade(Type):
8596 name = 'Cleaner'
8597 version = 2
8598 schema = {'definitions': {'Error': {'additionalProperties': False,
8599 'properties': {'code': {'type': 'string'},
8600 'info': {'$ref': '#/definitions/ErrorInfo'},
8601 'message': {'type': 'string'}},
8602 'required': ['message', 'code'],
8603 'type': 'object'},
8604 'ErrorInfo': {'additionalProperties': False,
8605 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8606 'macaroon-path': {'type': 'string'}},
8607 'type': 'object'},
8608 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8609 'NotifyWatchResult': {'additionalProperties': False,
8610 'properties': {'NotifyWatcherId': {'type': 'string'},
8611 'error': {'$ref': '#/definitions/Error'}},
8612 'required': ['NotifyWatcherId'],
8613 'type': 'object'}},
8614 'properties': {'Cleanup': {'type': 'object'},
8615 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
8616 'type': 'object'}},
8617 'type': 'object'}
8618
8619
8620 @ReturnMapping(None)
8621 async def Cleanup(self):
8622 '''
8623
8624 Returns -> None
8625 '''
8626 # map input types to rpc msg
8627 _params = dict()
8628 msg = dict(type='Cleaner', request='Cleanup', version=2, params=_params)
8629
8630 reply = await self.rpc(msg)
8631 return reply
8632
8633
8634
8635 @ReturnMapping(NotifyWatchResult)
8636 async def WatchCleanups(self):
8637 '''
8638
8639 Returns -> typing.Union[str, _ForwardRef('Error')]
8640 '''
8641 # map input types to rpc msg
8642 _params = dict()
8643 msg = dict(type='Cleaner', request='WatchCleanups', version=2, params=_params)
8644
8645 reply = await self.rpc(msg)
8646 return reply
8647
8648
8649 class ClientFacade(Type):
8650 name = 'Client'
8651 version = 1
8652 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
8653 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
8654 'type': 'array'},
8655 'type': 'array'}},
8656 'required': ['servers'],
8657 'type': 'object'},
8658 'AddCharm': {'additionalProperties': False,
8659 'properties': {'channel': {'type': 'string'},
8660 'url': {'type': 'string'}},
8661 'required': ['url', 'channel'],
8662 'type': 'object'},
8663 'AddCharmWithAuthorization': {'additionalProperties': False,
8664 'properties': {'channel': {'type': 'string'},
8665 'macaroon': {'$ref': '#/definitions/Macaroon'},
8666 'url': {'type': 'string'}},
8667 'required': ['url',
8668 'channel',
8669 'macaroon'],
8670 'type': 'object'},
8671 'AddMachineParams': {'additionalProperties': False,
8672 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
8673 'type': 'array'},
8674 'constraints': {'$ref': '#/definitions/Value'},
8675 'container-type': {'type': 'string'},
8676 'disks': {'items': {'$ref': '#/definitions/Constraints'},
8677 'type': 'array'},
8678 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
8679 'instance-id': {'type': 'string'},
8680 'jobs': {'items': {'type': 'string'},
8681 'type': 'array'},
8682 'nonce': {'type': 'string'},
8683 'parent-id': {'type': 'string'},
8684 'placement': {'$ref': '#/definitions/Placement'},
8685 'series': {'type': 'string'}},
8686 'required': ['series',
8687 'constraints',
8688 'jobs',
8689 'parent-id',
8690 'container-type',
8691 'instance-id',
8692 'nonce',
8693 'hardware-characteristics',
8694 'addresses'],
8695 'type': 'object'},
8696 'AddMachines': {'additionalProperties': False,
8697 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
8698 'type': 'array'}},
8699 'required': ['params'],
8700 'type': 'object'},
8701 'AddMachinesResult': {'additionalProperties': False,
8702 'properties': {'error': {'$ref': '#/definitions/Error'},
8703 'machine': {'type': 'string'}},
8704 'required': ['machine'],
8705 'type': 'object'},
8706 'AddMachinesResults': {'additionalProperties': False,
8707 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
8708 'type': 'array'}},
8709 'required': ['machines'],
8710 'type': 'object'},
8711 'Address': {'additionalProperties': False,
8712 'properties': {'scope': {'type': 'string'},
8713 'space-name': {'type': 'string'},
8714 'type': {'type': 'string'},
8715 'value': {'type': 'string'}},
8716 'required': ['value', 'type', 'scope'],
8717 'type': 'object'},
8718 'AgentVersionResult': {'additionalProperties': False,
8719 'properties': {'version': {'$ref': '#/definitions/Number'}},
8720 'required': ['version'],
8721 'type': 'object'},
8722 'AllWatcherId': {'additionalProperties': False,
8723 'properties': {'watcher-id': {'type': 'string'}},
8724 'required': ['watcher-id'],
8725 'type': 'object'},
8726 'ApplicationStatus': {'additionalProperties': False,
8727 'properties': {'can-upgrade-to': {'type': 'string'},
8728 'charm': {'type': 'string'},
8729 'err': {'additionalProperties': True,
8730 'type': 'object'},
8731 'exposed': {'type': 'boolean'},
8732 'life': {'type': 'string'},
8733 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
8734 'type': 'object'},
8735 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
8736 'type': 'array'}},
8737 'type': 'object'},
8738 'series': {'type': 'string'},
8739 'status': {'$ref': '#/definitions/DetailedStatus'},
8740 'subordinate-to': {'items': {'type': 'string'},
8741 'type': 'array'},
8742 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8743 'type': 'object'},
8744 'workload-version': {'type': 'string'}},
8745 'required': ['charm',
8746 'series',
8747 'exposed',
8748 'life',
8749 'relations',
8750 'can-upgrade-to',
8751 'subordinate-to',
8752 'units',
8753 'meter-statuses',
8754 'status',
8755 'workload-version'],
8756 'type': 'object'},
8757 'Binary': {'additionalProperties': False,
8758 'properties': {'Arch': {'type': 'string'},
8759 'Number': {'$ref': '#/definitions/Number'},
8760 'Series': {'type': 'string'}},
8761 'required': ['Number', 'Series', 'Arch'],
8762 'type': 'object'},
8763 'BundleChange': {'additionalProperties': False,
8764 'properties': {'args': {'items': {'additionalProperties': True,
8765 'type': 'object'},
8766 'type': 'array'},
8767 'id': {'type': 'string'},
8768 'method': {'type': 'string'},
8769 'requires': {'items': {'type': 'string'},
8770 'type': 'array'}},
8771 'required': ['id',
8772 'method',
8773 'args',
8774 'requires'],
8775 'type': 'object'},
8776 'BundleChangesParams': {'additionalProperties': False,
8777 'properties': {'yaml': {'type': 'string'}},
8778 'required': ['yaml'],
8779 'type': 'object'},
8780 'BundleChangesResults': {'additionalProperties': False,
8781 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
8782 'type': 'array'},
8783 'errors': {'items': {'type': 'string'},
8784 'type': 'array'}},
8785 'type': 'object'},
8786 'ConfigValue': {'additionalProperties': False,
8787 'properties': {'source': {'type': 'string'},
8788 'value': {'additionalProperties': True,
8789 'type': 'object'}},
8790 'required': ['value', 'source'],
8791 'type': 'object'},
8792 'Constraints': {'additionalProperties': False,
8793 'properties': {'Count': {'type': 'integer'},
8794 'Pool': {'type': 'string'},
8795 'Size': {'type': 'integer'}},
8796 'required': ['Pool', 'Size', 'Count'],
8797 'type': 'object'},
8798 'DestroyMachines': {'additionalProperties': False,
8799 'properties': {'force': {'type': 'boolean'},
8800 'machine-names': {'items': {'type': 'string'},
8801 'type': 'array'}},
8802 'required': ['machine-names', 'force'],
8803 'type': 'object'},
8804 'DetailedStatus': {'additionalProperties': False,
8805 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8806 'type': 'object'}},
8807 'type': 'object'},
8808 'err': {'additionalProperties': True,
8809 'type': 'object'},
8810 'info': {'type': 'string'},
8811 'kind': {'type': 'string'},
8812 'life': {'type': 'string'},
8813 'since': {'format': 'date-time',
8814 'type': 'string'},
8815 'status': {'type': 'string'},
8816 'version': {'type': 'string'}},
8817 'required': ['status',
8818 'info',
8819 'data',
8820 'since',
8821 'kind',
8822 'version',
8823 'life'],
8824 'type': 'object'},
8825 'EndpointStatus': {'additionalProperties': False,
8826 'properties': {'application': {'type': 'string'},
8827 'name': {'type': 'string'},
8828 'role': {'type': 'string'},
8829 'subordinate': {'type': 'boolean'}},
8830 'required': ['application',
8831 'name',
8832 'role',
8833 'subordinate'],
8834 'type': 'object'},
8835 'Entities': {'additionalProperties': False,
8836 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
8837 'type': 'array'}},
8838 'required': ['entities'],
8839 'type': 'object'},
8840 'Entity': {'additionalProperties': False,
8841 'properties': {'tag': {'type': 'string'}},
8842 'required': ['tag'],
8843 'type': 'object'},
8844 'EntityStatus': {'additionalProperties': False,
8845 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8846 'type': 'object'}},
8847 'type': 'object'},
8848 'info': {'type': 'string'},
8849 'since': {'format': 'date-time',
8850 'type': 'string'},
8851 'status': {'type': 'string'}},
8852 'required': ['status', 'info', 'since'],
8853 'type': 'object'},
8854 'Error': {'additionalProperties': False,
8855 'properties': {'code': {'type': 'string'},
8856 'info': {'$ref': '#/definitions/ErrorInfo'},
8857 'message': {'type': 'string'}},
8858 'required': ['message', 'code'],
8859 'type': 'object'},
8860 'ErrorInfo': {'additionalProperties': False,
8861 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8862 'macaroon-path': {'type': 'string'}},
8863 'type': 'object'},
8864 'ErrorResult': {'additionalProperties': False,
8865 'properties': {'error': {'$ref': '#/definitions/Error'}},
8866 'type': 'object'},
8867 'ErrorResults': {'additionalProperties': False,
8868 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
8869 'type': 'array'}},
8870 'required': ['results'],
8871 'type': 'object'},
8872 'FindToolsParams': {'additionalProperties': False,
8873 'properties': {'arch': {'type': 'string'},
8874 'major': {'type': 'integer'},
8875 'minor': {'type': 'integer'},
8876 'number': {'$ref': '#/definitions/Number'},
8877 'series': {'type': 'string'}},
8878 'required': ['number',
8879 'major',
8880 'minor',
8881 'arch',
8882 'series'],
8883 'type': 'object'},
8884 'FindToolsResult': {'additionalProperties': False,
8885 'properties': {'error': {'$ref': '#/definitions/Error'},
8886 'list': {'items': {'$ref': '#/definitions/Tools'},
8887 'type': 'array'}},
8888 'required': ['list'],
8889 'type': 'object'},
8890 'FullStatus': {'additionalProperties': False,
8891 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
8892 'type': 'object'},
8893 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8894 'type': 'object'},
8895 'model': {'$ref': '#/definitions/ModelStatusInfo'},
8896 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
8897 'type': 'array'},
8898 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}},
8899 'type': 'object'}},
8900 'required': ['model',
8901 'machines',
8902 'applications',
8903 'remote-applications',
8904 'relations'],
8905 'type': 'object'},
8906 'GetConstraintsResults': {'additionalProperties': False,
8907 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
8908 'required': ['constraints'],
8909 'type': 'object'},
8910 'HardwareCharacteristics': {'additionalProperties': False,
8911 'properties': {'arch': {'type': 'string'},
8912 'availability-zone': {'type': 'string'},
8913 'cpu-cores': {'type': 'integer'},
8914 'cpu-power': {'type': 'integer'},
8915 'mem': {'type': 'integer'},
8916 'root-disk': {'type': 'integer'},
8917 'tags': {'items': {'type': 'string'},
8918 'type': 'array'}},
8919 'type': 'object'},
8920 'History': {'additionalProperties': False,
8921 'properties': {'error': {'$ref': '#/definitions/Error'},
8922 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
8923 'type': 'array'}},
8924 'required': ['statuses'],
8925 'type': 'object'},
8926 'HostPort': {'additionalProperties': False,
8927 'properties': {'Address': {'$ref': '#/definitions/Address'},
8928 'port': {'type': 'integer'}},
8929 'required': ['Address', 'port'],
8930 'type': 'object'},
8931 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8932 'MachineHardware': {'additionalProperties': False,
8933 'properties': {'arch': {'type': 'string'},
8934 'availability-zone': {'type': 'string'},
8935 'cores': {'type': 'integer'},
8936 'cpu-power': {'type': 'integer'},
8937 'mem': {'type': 'integer'},
8938 'root-disk': {'type': 'integer'},
8939 'tags': {'items': {'type': 'string'},
8940 'type': 'array'}},
8941 'type': 'object'},
8942 'MachineStatus': {'additionalProperties': False,
8943 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
8944 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8945 'type': 'object'},
8946 'dns-name': {'type': 'string'},
8947 'hardware': {'type': 'string'},
8948 'has-vote': {'type': 'boolean'},
8949 'id': {'type': 'string'},
8950 'instance-id': {'type': 'string'},
8951 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
8952 'ip-addresses': {'items': {'type': 'string'},
8953 'type': 'array'},
8954 'jobs': {'items': {'type': 'string'},
8955 'type': 'array'},
8956 'series': {'type': 'string'},
8957 'wants-vote': {'type': 'boolean'}},
8958 'required': ['agent-status',
8959 'instance-status',
8960 'dns-name',
8961 'ip-addresses',
8962 'instance-id',
8963 'series',
8964 'id',
8965 'containers',
8966 'hardware',
8967 'jobs',
8968 'has-vote',
8969 'wants-vote'],
8970 'type': 'object'},
8971 'MeterStatus': {'additionalProperties': False,
8972 'properties': {'color': {'type': 'string'},
8973 'message': {'type': 'string'}},
8974 'required': ['color', 'message'],
8975 'type': 'object'},
8976 'ModelConfigResults': {'additionalProperties': False,
8977 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
8978 'type': 'object'}},
8979 'required': ['config'],
8980 'type': 'object'},
8981 'ModelInfo': {'additionalProperties': False,
8982 'properties': {'cloud-credential-tag': {'type': 'string'},
8983 'cloud-region': {'type': 'string'},
8984 'cloud-tag': {'type': 'string'},
8985 'controller-uuid': {'type': 'string'},
8986 'default-series': {'type': 'string'},
8987 'life': {'type': 'string'},
8988 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
8989 'type': 'array'},
8990 'name': {'type': 'string'},
8991 'owner-tag': {'type': 'string'},
8992 'provider-type': {'type': 'string'},
8993 'status': {'$ref': '#/definitions/EntityStatus'},
8994 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
8995 'type': 'array'},
8996 'uuid': {'type': 'string'}},
8997 'required': ['name',
8998 'uuid',
8999 'controller-uuid',
9000 'provider-type',
9001 'default-series',
9002 'cloud-tag',
9003 'owner-tag',
9004 'life',
9005 'status',
9006 'users',
9007 'machines'],
9008 'type': 'object'},
9009 'ModelMachineInfo': {'additionalProperties': False,
9010 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
9011 'has-vote': {'type': 'boolean'},
9012 'id': {'type': 'string'},
9013 'instance-id': {'type': 'string'},
9014 'status': {'type': 'string'},
9015 'wants-vote': {'type': 'boolean'}},
9016 'required': ['id'],
9017 'type': 'object'},
9018 'ModelSet': {'additionalProperties': False,
9019 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
9020 'type': 'object'}},
9021 'type': 'object'}},
9022 'required': ['config'],
9023 'type': 'object'},
9024 'ModelStatusInfo': {'additionalProperties': False,
9025 'properties': {'available-version': {'type': 'string'},
9026 'cloud-tag': {'type': 'string'},
9027 'migration': {'type': 'string'},
9028 'name': {'type': 'string'},
9029 'region': {'type': 'string'},
9030 'version': {'type': 'string'}},
9031 'required': ['name',
9032 'cloud-tag',
9033 'version',
9034 'available-version'],
9035 'type': 'object'},
9036 'ModelUnset': {'additionalProperties': False,
9037 'properties': {'keys': {'items': {'type': 'string'},
9038 'type': 'array'}},
9039 'required': ['keys'],
9040 'type': 'object'},
9041 'ModelUserInfo': {'additionalProperties': False,
9042 'properties': {'access': {'type': 'string'},
9043 'display-name': {'type': 'string'},
9044 'last-connection': {'format': 'date-time',
9045 'type': 'string'},
9046 'user': {'type': 'string'}},
9047 'required': ['user',
9048 'display-name',
9049 'last-connection',
9050 'access'],
9051 'type': 'object'},
9052 'ModelUserInfoResult': {'additionalProperties': False,
9053 'properties': {'error': {'$ref': '#/definitions/Error'},
9054 'result': {'$ref': '#/definitions/ModelUserInfo'}},
9055 'type': 'object'},
9056 'ModelUserInfoResults': {'additionalProperties': False,
9057 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
9058 'type': 'array'}},
9059 'required': ['results'],
9060 'type': 'object'},
9061 'Number': {'additionalProperties': False,
9062 'properties': {'Build': {'type': 'integer'},
9063 'Major': {'type': 'integer'},
9064 'Minor': {'type': 'integer'},
9065 'Patch': {'type': 'integer'},
9066 'Tag': {'type': 'string'}},
9067 'required': ['Major',
9068 'Minor',
9069 'Tag',
9070 'Patch',
9071 'Build'],
9072 'type': 'object'},
9073 'Placement': {'additionalProperties': False,
9074 'properties': {'directive': {'type': 'string'},
9075 'scope': {'type': 'string'}},
9076 'required': ['scope', 'directive'],
9077 'type': 'object'},
9078 'PrivateAddress': {'additionalProperties': False,
9079 'properties': {'target': {'type': 'string'}},
9080 'required': ['target'],
9081 'type': 'object'},
9082 'PrivateAddressResults': {'additionalProperties': False,
9083 'properties': {'private-address': {'type': 'string'}},
9084 'required': ['private-address'],
9085 'type': 'object'},
9086 'ProvisioningScriptParams': {'additionalProperties': False,
9087 'properties': {'data-dir': {'type': 'string'},
9088 'disable-package-commands': {'type': 'boolean'},
9089 'machine-id': {'type': 'string'},
9090 'nonce': {'type': 'string'}},
9091 'required': ['machine-id',
9092 'nonce',
9093 'data-dir',
9094 'disable-package-commands'],
9095 'type': 'object'},
9096 'ProvisioningScriptResult': {'additionalProperties': False,
9097 'properties': {'script': {'type': 'string'}},
9098 'required': ['script'],
9099 'type': 'object'},
9100 'PublicAddress': {'additionalProperties': False,
9101 'properties': {'target': {'type': 'string'}},
9102 'required': ['target'],
9103 'type': 'object'},
9104 'PublicAddressResults': {'additionalProperties': False,
9105 'properties': {'public-address': {'type': 'string'}},
9106 'required': ['public-address'],
9107 'type': 'object'},
9108 'RelationStatus': {'additionalProperties': False,
9109 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
9110 'type': 'array'},
9111 'id': {'type': 'integer'},
9112 'interface': {'type': 'string'},
9113 'key': {'type': 'string'},
9114 'scope': {'type': 'string'}},
9115 'required': ['id',
9116 'key',
9117 'interface',
9118 'scope',
9119 'endpoints'],
9120 'type': 'object'},
9121 'RemoteApplicationStatus': {'additionalProperties': False,
9122 'properties': {'application-name': {'type': 'string'},
9123 'application-url': {'type': 'string'},
9124 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
9125 'type': 'array'},
9126 'err': {'additionalProperties': True,
9127 'type': 'object'},
9128 'life': {'type': 'string'},
9129 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
9130 'type': 'array'}},
9131 'type': 'object'},
9132 'status': {'$ref': '#/definitions/DetailedStatus'}},
9133 'required': ['application-url',
9134 'application-name',
9135 'endpoints',
9136 'life',
9137 'relations',
9138 'status'],
9139 'type': 'object'},
9140 'RemoteEndpoint': {'additionalProperties': False,
9141 'properties': {'interface': {'type': 'string'},
9142 'limit': {'type': 'integer'},
9143 'name': {'type': 'string'},
9144 'role': {'type': 'string'},
9145 'scope': {'type': 'string'}},
9146 'required': ['name',
9147 'role',
9148 'interface',
9149 'limit',
9150 'scope'],
9151 'type': 'object'},
9152 'ResolveCharmResult': {'additionalProperties': False,
9153 'properties': {'error': {'type': 'string'},
9154 'url': {'type': 'string'}},
9155 'type': 'object'},
9156 'ResolveCharmResults': {'additionalProperties': False,
9157 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
9158 'type': 'array'}},
9159 'required': ['urls'],
9160 'type': 'object'},
9161 'ResolveCharms': {'additionalProperties': False,
9162 'properties': {'references': {'items': {'type': 'string'},
9163 'type': 'array'}},
9164 'required': ['references'],
9165 'type': 'object'},
9166 'Resolved': {'additionalProperties': False,
9167 'properties': {'retry': {'type': 'boolean'},
9168 'unit-name': {'type': 'string'}},
9169 'required': ['unit-name', 'retry'],
9170 'type': 'object'},
9171 'SetConstraints': {'additionalProperties': False,
9172 'properties': {'application': {'type': 'string'},
9173 'constraints': {'$ref': '#/definitions/Value'}},
9174 'required': ['application', 'constraints'],
9175 'type': 'object'},
9176 'SetModelAgentVersion': {'additionalProperties': False,
9177 'properties': {'version': {'$ref': '#/definitions/Number'}},
9178 'required': ['version'],
9179 'type': 'object'},
9180 'StatusHistoryFilter': {'additionalProperties': False,
9181 'properties': {'date': {'format': 'date-time',
9182 'type': 'string'},
9183 'delta': {'type': 'integer'},
9184 'size': {'type': 'integer'}},
9185 'required': ['size', 'date', 'delta'],
9186 'type': 'object'},
9187 'StatusHistoryRequest': {'additionalProperties': False,
9188 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
9189 'historyKind': {'type': 'string'},
9190 'size': {'type': 'integer'},
9191 'tag': {'type': 'string'}},
9192 'required': ['historyKind',
9193 'size',
9194 'filter',
9195 'tag'],
9196 'type': 'object'},
9197 'StatusHistoryRequests': {'additionalProperties': False,
9198 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
9199 'type': 'array'}},
9200 'required': ['requests'],
9201 'type': 'object'},
9202 'StatusHistoryResult': {'additionalProperties': False,
9203 'properties': {'error': {'$ref': '#/definitions/Error'},
9204 'history': {'$ref': '#/definitions/History'}},
9205 'required': ['history'],
9206 'type': 'object'},
9207 'StatusHistoryResults': {'additionalProperties': False,
9208 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
9209 'type': 'array'}},
9210 'required': ['results'],
9211 'type': 'object'},
9212 'StatusParams': {'additionalProperties': False,
9213 'properties': {'patterns': {'items': {'type': 'string'},
9214 'type': 'array'}},
9215 'required': ['patterns'],
9216 'type': 'object'},
9217 'Tools': {'additionalProperties': False,
9218 'properties': {'sha256': {'type': 'string'},
9219 'size': {'type': 'integer'},
9220 'url': {'type': 'string'},
9221 'version': {'$ref': '#/definitions/Binary'}},
9222 'required': ['version', 'url', 'size'],
9223 'type': 'object'},
9224 'UnitStatus': {'additionalProperties': False,
9225 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
9226 'charm': {'type': 'string'},
9227 'leader': {'type': 'boolean'},
9228 'machine': {'type': 'string'},
9229 'opened-ports': {'items': {'type': 'string'},
9230 'type': 'array'},
9231 'public-address': {'type': 'string'},
9232 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
9233 'type': 'object'},
9234 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
9235 'workload-version': {'type': 'string'}},
9236 'required': ['agent-status',
9237 'workload-status',
9238 'workload-version',
9239 'machine',
9240 'opened-ports',
9241 'public-address',
9242 'charm',
9243 'subordinates'],
9244 'type': 'object'},
9245 'Value': {'additionalProperties': False,
9246 'properties': {'arch': {'type': 'string'},
9247 'container': {'type': 'string'},
9248 'cores': {'type': 'integer'},
9249 'cpu-power': {'type': 'integer'},
9250 'instance-type': {'type': 'string'},
9251 'mem': {'type': 'integer'},
9252 'root-disk': {'type': 'integer'},
9253 'spaces': {'items': {'type': 'string'},
9254 'type': 'array'},
9255 'tags': {'items': {'type': 'string'},
9256 'type': 'array'},
9257 'virt-type': {'type': 'string'}},
9258 'type': 'object'}},
9259 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
9260 'type': 'object'},
9261 'AbortCurrentUpgrade': {'type': 'object'},
9262 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
9263 'type': 'object'},
9264 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
9265 'type': 'object'},
9266 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
9267 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
9268 'type': 'object'},
9269 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
9270 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
9271 'type': 'object'},
9272 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
9273 'type': 'object'},
9274 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
9275 'type': 'object'},
9276 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
9277 'Result': {'$ref': '#/definitions/FindToolsResult'}},
9278 'type': 'object'},
9279 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
9280 'Result': {'$ref': '#/definitions/FullStatus'}},
9281 'type': 'object'},
9282 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
9283 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
9284 'type': 'object'},
9285 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
9286 'type': 'object'},
9287 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
9288 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
9289 'type': 'object'},
9290 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
9291 'type': 'object'},
9292 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
9293 'type': 'object'},
9294 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
9295 'type': 'object'},
9296 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
9297 'type': 'object'},
9298 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
9299 'type': 'object'},
9300 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
9301 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
9302 'type': 'object'},
9303 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
9304 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
9305 'type': 'object'},
9306 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
9307 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
9308 'type': 'object'},
9309 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
9310 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
9311 'type': 'object'},
9312 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
9313 'type': 'object'},
9314 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9315 'Result': {'$ref': '#/definitions/ErrorResults'}},
9316 'type': 'object'},
9317 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
9318 'type': 'object'},
9319 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
9320 'type': 'object'},
9321 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
9322 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
9323 'type': 'object'},
9324 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
9325 'type': 'object'}},
9326 'type': 'object'}
9327
9328
9329 @ReturnMapping(APIHostPortsResult)
9330 async def APIHostPorts(self):
9331 '''
9332
9333 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
9334 '''
9335 # map input types to rpc msg
9336 _params = dict()
9337 msg = dict(type='Client', request='APIHostPorts', version=1, params=_params)
9338
9339 reply = await self.rpc(msg)
9340 return reply
9341
9342
9343
9344 @ReturnMapping(None)
9345 async def AbortCurrentUpgrade(self):
9346 '''
9347
9348 Returns -> None
9349 '''
9350 # map input types to rpc msg
9351 _params = dict()
9352 msg = dict(type='Client', request='AbortCurrentUpgrade', version=1, params=_params)
9353
9354 reply = await self.rpc(msg)
9355 return reply
9356
9357
9358
9359 @ReturnMapping(None)
9360 async def AddCharm(self, channel, url):
9361 '''
9362 channel : str
9363 url : str
9364 Returns -> None
9365 '''
9366 # map input types to rpc msg
9367 _params = dict()
9368 msg = dict(type='Client', request='AddCharm', version=1, params=_params)
9369 _params['channel'] = channel
9370 _params['url'] = url
9371 reply = await self.rpc(msg)
9372 return reply
9373
9374
9375
9376 @ReturnMapping(None)
9377 async def AddCharmWithAuthorization(self, channel, macaroon, url):
9378 '''
9379 channel : str
9380 macaroon : Macaroon
9381 url : str
9382 Returns -> None
9383 '''
9384 # map input types to rpc msg
9385 _params = dict()
9386 msg = dict(type='Client', request='AddCharmWithAuthorization', version=1, params=_params)
9387 _params['channel'] = channel
9388 _params['macaroon'] = macaroon
9389 _params['url'] = url
9390 reply = await self.rpc(msg)
9391 return reply
9392
9393
9394
9395 @ReturnMapping(AddMachinesResults)
9396 async def AddMachines(self, params):
9397 '''
9398 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9399 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9400 '''
9401 # map input types to rpc msg
9402 _params = dict()
9403 msg = dict(type='Client', request='AddMachines', version=1, params=_params)
9404 _params['params'] = params
9405 reply = await self.rpc(msg)
9406 return reply
9407
9408
9409
9410 @ReturnMapping(AddMachinesResults)
9411 async def AddMachinesV2(self, params):
9412 '''
9413 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9414 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9415 '''
9416 # map input types to rpc msg
9417 _params = dict()
9418 msg = dict(type='Client', request='AddMachinesV2', version=1, params=_params)
9419 _params['params'] = params
9420 reply = await self.rpc(msg)
9421 return reply
9422
9423
9424
9425 @ReturnMapping(AgentVersionResult)
9426 async def AgentVersion(self):
9427 '''
9428
9429 Returns -> Number
9430 '''
9431 # map input types to rpc msg
9432 _params = dict()
9433 msg = dict(type='Client', request='AgentVersion', version=1, params=_params)
9434
9435 reply = await self.rpc(msg)
9436 return reply
9437
9438
9439
9440 @ReturnMapping(None)
9441 async def DestroyMachines(self, force, machine_names):
9442 '''
9443 force : bool
9444 machine_names : typing.Sequence<+T_co>[str]
9445 Returns -> None
9446 '''
9447 # map input types to rpc msg
9448 _params = dict()
9449 msg = dict(type='Client', request='DestroyMachines', version=1, params=_params)
9450 _params['force'] = force
9451 _params['machine-names'] = machine_names
9452 reply = await self.rpc(msg)
9453 return reply
9454
9455
9456
9457 @ReturnMapping(FindToolsResult)
9458 async def FindTools(self, arch, major, minor, number, series):
9459 '''
9460 arch : str
9461 major : int
9462 minor : int
9463 number : Number
9464 series : str
9465 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
9466 '''
9467 # map input types to rpc msg
9468 _params = dict()
9469 msg = dict(type='Client', request='FindTools', version=1, params=_params)
9470 _params['arch'] = arch
9471 _params['major'] = major
9472 _params['minor'] = minor
9473 _params['number'] = number
9474 _params['series'] = series
9475 reply = await self.rpc(msg)
9476 return reply
9477
9478
9479
9480 @ReturnMapping(FullStatus)
9481 async def FullStatus(self, patterns):
9482 '''
9483 patterns : typing.Sequence<+T_co>[str]
9484 Returns -> typing.Union[_ForwardRef('ModelStatusInfo'), typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>, typing.Mapping<~KT, +VT_co>[str, ~RemoteApplicationStatus]<~RemoteApplicationStatus>]
9485 '''
9486 # map input types to rpc msg
9487 _params = dict()
9488 msg = dict(type='Client', request='FullStatus', version=1, params=_params)
9489 _params['patterns'] = patterns
9490 reply = await self.rpc(msg)
9491 return reply
9492
9493
9494
9495 @ReturnMapping(BundleChangesResults)
9496 async def GetBundleChanges(self, yaml):
9497 '''
9498 yaml : str
9499 Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
9500 '''
9501 # map input types to rpc msg
9502 _params = dict()
9503 msg = dict(type='Client', request='GetBundleChanges', version=1, params=_params)
9504 _params['yaml'] = yaml
9505 reply = await self.rpc(msg)
9506 return reply
9507
9508
9509
9510 @ReturnMapping(GetConstraintsResults)
9511 async def GetModelConstraints(self):
9512 '''
9513
9514 Returns -> Value
9515 '''
9516 # map input types to rpc msg
9517 _params = dict()
9518 msg = dict(type='Client', request='GetModelConstraints', version=1, params=_params)
9519
9520 reply = await self.rpc(msg)
9521 return reply
9522
9523
9524
9525 @ReturnMapping(AddMachinesResults)
9526 async def InjectMachines(self, params):
9527 '''
9528 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9529 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9530 '''
9531 # map input types to rpc msg
9532 _params = dict()
9533 msg = dict(type='Client', request='InjectMachines', version=1, params=_params)
9534 _params['params'] = params
9535 reply = await self.rpc(msg)
9536 return reply
9537
9538
9539
9540 @ReturnMapping(ModelConfigResults)
9541 async def ModelGet(self):
9542 '''
9543
9544 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
9545 '''
9546 # map input types to rpc msg
9547 _params = dict()
9548 msg = dict(type='Client', request='ModelGet', version=1, params=_params)
9549
9550 reply = await self.rpc(msg)
9551 return reply
9552
9553
9554
9555 @ReturnMapping(ModelInfo)
9556 async def ModelInfo(self):
9557 '''
9558
9559 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
9560 '''
9561 # map input types to rpc msg
9562 _params = dict()
9563 msg = dict(type='Client', request='ModelInfo', version=1, params=_params)
9564
9565 reply = await self.rpc(msg)
9566 return reply
9567
9568
9569
9570 @ReturnMapping(None)
9571 async def ModelSet(self, config):
9572 '''
9573 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
9574 Returns -> None
9575 '''
9576 # map input types to rpc msg
9577 _params = dict()
9578 msg = dict(type='Client', request='ModelSet', version=1, params=_params)
9579 _params['config'] = config
9580 reply = await self.rpc(msg)
9581 return reply
9582
9583
9584
9585 @ReturnMapping(None)
9586 async def ModelUnset(self, keys):
9587 '''
9588 keys : typing.Sequence<+T_co>[str]
9589 Returns -> None
9590 '''
9591 # map input types to rpc msg
9592 _params = dict()
9593 msg = dict(type='Client', request='ModelUnset', version=1, params=_params)
9594 _params['keys'] = keys
9595 reply = await self.rpc(msg)
9596 return reply
9597
9598
9599
9600 @ReturnMapping(ModelUserInfoResults)
9601 async def ModelUserInfo(self):
9602 '''
9603
9604 Returns -> typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
9605 '''
9606 # map input types to rpc msg
9607 _params = dict()
9608 msg = dict(type='Client', request='ModelUserInfo', version=1, params=_params)
9609
9610 reply = await self.rpc(msg)
9611 return reply
9612
9613
9614
9615 @ReturnMapping(PrivateAddressResults)
9616 async def PrivateAddress(self, target):
9617 '''
9618 target : str
9619 Returns -> str
9620 '''
9621 # map input types to rpc msg
9622 _params = dict()
9623 msg = dict(type='Client', request='PrivateAddress', version=1, params=_params)
9624 _params['target'] = target
9625 reply = await self.rpc(msg)
9626 return reply
9627
9628
9629
9630 @ReturnMapping(ProvisioningScriptResult)
9631 async def ProvisioningScript(self, data_dir, disable_package_commands, machine_id, nonce):
9632 '''
9633 data_dir : str
9634 disable_package_commands : bool
9635 machine_id : str
9636 nonce : str
9637 Returns -> str
9638 '''
9639 # map input types to rpc msg
9640 _params = dict()
9641 msg = dict(type='Client', request='ProvisioningScript', version=1, params=_params)
9642 _params['data-dir'] = data_dir
9643 _params['disable-package-commands'] = disable_package_commands
9644 _params['machine-id'] = machine_id
9645 _params['nonce'] = nonce
9646 reply = await self.rpc(msg)
9647 return reply
9648
9649
9650
9651 @ReturnMapping(PublicAddressResults)
9652 async def PublicAddress(self, target):
9653 '''
9654 target : str
9655 Returns -> str
9656 '''
9657 # map input types to rpc msg
9658 _params = dict()
9659 msg = dict(type='Client', request='PublicAddress', version=1, params=_params)
9660 _params['target'] = target
9661 reply = await self.rpc(msg)
9662 return reply
9663
9664
9665
9666 @ReturnMapping(ResolveCharmResults)
9667 async def ResolveCharms(self, references):
9668 '''
9669 references : typing.Sequence<+T_co>[str]
9670 Returns -> typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
9671 '''
9672 # map input types to rpc msg
9673 _params = dict()
9674 msg = dict(type='Client', request='ResolveCharms', version=1, params=_params)
9675 _params['references'] = references
9676 reply = await self.rpc(msg)
9677 return reply
9678
9679
9680
9681 @ReturnMapping(None)
9682 async def Resolved(self, retry, unit_name):
9683 '''
9684 retry : bool
9685 unit_name : str
9686 Returns -> None
9687 '''
9688 # map input types to rpc msg
9689 _params = dict()
9690 msg = dict(type='Client', request='Resolved', version=1, params=_params)
9691 _params['retry'] = retry
9692 _params['unit-name'] = unit_name
9693 reply = await self.rpc(msg)
9694 return reply
9695
9696
9697
9698 @ReturnMapping(ErrorResults)
9699 async def RetryProvisioning(self, entities):
9700 '''
9701 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9702 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9703 '''
9704 # map input types to rpc msg
9705 _params = dict()
9706 msg = dict(type='Client', request='RetryProvisioning', version=1, params=_params)
9707 _params['entities'] = entities
9708 reply = await self.rpc(msg)
9709 return reply
9710
9711
9712
9713 @ReturnMapping(None)
9714 async def SetModelAgentVersion(self, version):
9715 '''
9716 version : Number
9717 Returns -> None
9718 '''
9719 # map input types to rpc msg
9720 _params = dict()
9721 msg = dict(type='Client', request='SetModelAgentVersion', version=1, params=_params)
9722 _params['version'] = version
9723 reply = await self.rpc(msg)
9724 return reply
9725
9726
9727
9728 @ReturnMapping(None)
9729 async def SetModelConstraints(self, application, constraints):
9730 '''
9731 application : str
9732 constraints : Value
9733 Returns -> None
9734 '''
9735 # map input types to rpc msg
9736 _params = dict()
9737 msg = dict(type='Client', request='SetModelConstraints', version=1, params=_params)
9738 _params['application'] = application
9739 _params['constraints'] = constraints
9740 reply = await self.rpc(msg)
9741 return reply
9742
9743
9744
9745 @ReturnMapping(StatusHistoryResults)
9746 async def StatusHistory(self, requests):
9747 '''
9748 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
9749 Returns -> typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
9750 '''
9751 # map input types to rpc msg
9752 _params = dict()
9753 msg = dict(type='Client', request='StatusHistory', version=1, params=_params)
9754 _params['requests'] = requests
9755 reply = await self.rpc(msg)
9756 return reply
9757
9758
9759
9760 @ReturnMapping(AllWatcherId)
9761 async def WatchAll(self):
9762 '''
9763
9764 Returns -> str
9765 '''
9766 # map input types to rpc msg
9767 _params = dict()
9768 msg = dict(type='Client', request='WatchAll', version=1, params=_params)
9769
9770 reply = await self.rpc(msg)
9771 return reply
9772
9773
9774 class CloudFacade(Type):
9775 name = 'Cloud'
9776 version = 1
9777 schema = {'definitions': {'Cloud': {'additionalProperties': False,
9778 'properties': {'auth-types': {'items': {'type': 'string'},
9779 'type': 'array'},
9780 'endpoint': {'type': 'string'},
9781 'identity-endpoint': {'type': 'string'},
9782 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
9783 'type': 'array'},
9784 'storage-endpoint': {'type': 'string'},
9785 'type': {'type': 'string'}},
9786 'required': ['type'],
9787 'type': 'object'},
9788 'CloudCredential': {'additionalProperties': False,
9789 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
9790 'type': 'object'},
9791 'auth-type': {'type': 'string'},
9792 'redacted': {'items': {'type': 'string'},
9793 'type': 'array'}},
9794 'required': ['auth-type'],
9795 'type': 'object'},
9796 'CloudCredentialResult': {'additionalProperties': False,
9797 'properties': {'error': {'$ref': '#/definitions/Error'},
9798 'result': {'$ref': '#/definitions/CloudCredential'}},
9799 'type': 'object'},
9800 'CloudCredentialResults': {'additionalProperties': False,
9801 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
9802 'type': 'array'}},
9803 'type': 'object'},
9804 'CloudRegion': {'additionalProperties': False,
9805 'properties': {'endpoint': {'type': 'string'},
9806 'identity-endpoint': {'type': 'string'},
9807 'name': {'type': 'string'},
9808 'storage-endpoint': {'type': 'string'}},
9809 'required': ['name'],
9810 'type': 'object'},
9811 'CloudResult': {'additionalProperties': False,
9812 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
9813 'error': {'$ref': '#/definitions/Error'}},
9814 'type': 'object'},
9815 'CloudResults': {'additionalProperties': False,
9816 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
9817 'type': 'array'}},
9818 'type': 'object'},
9819 'CloudsResult': {'additionalProperties': False,
9820 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
9821 'type': 'object'}},
9822 'type': 'object'},
9823 'Entities': {'additionalProperties': False,
9824 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9825 'type': 'array'}},
9826 'required': ['entities'],
9827 'type': 'object'},
9828 'Entity': {'additionalProperties': False,
9829 'properties': {'tag': {'type': 'string'}},
9830 'required': ['tag'],
9831 'type': 'object'},
9832 'Error': {'additionalProperties': False,
9833 'properties': {'code': {'type': 'string'},
9834 'info': {'$ref': '#/definitions/ErrorInfo'},
9835 'message': {'type': 'string'}},
9836 'required': ['message', 'code'],
9837 'type': 'object'},
9838 'ErrorInfo': {'additionalProperties': False,
9839 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9840 'macaroon-path': {'type': 'string'}},
9841 'type': 'object'},
9842 'ErrorResult': {'additionalProperties': False,
9843 'properties': {'error': {'$ref': '#/definitions/Error'}},
9844 'type': 'object'},
9845 'ErrorResults': {'additionalProperties': False,
9846 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9847 'type': 'array'}},
9848 'required': ['results'],
9849 'type': 'object'},
9850 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9851 'StringResult': {'additionalProperties': False,
9852 'properties': {'error': {'$ref': '#/definitions/Error'},
9853 'result': {'type': 'string'}},
9854 'required': ['result'],
9855 'type': 'object'},
9856 'StringsResult': {'additionalProperties': False,
9857 'properties': {'error': {'$ref': '#/definitions/Error'},
9858 'result': {'items': {'type': 'string'},
9859 'type': 'array'}},
9860 'type': 'object'},
9861 'StringsResults': {'additionalProperties': False,
9862 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
9863 'type': 'array'}},
9864 'required': ['results'],
9865 'type': 'object'},
9866 'UpdateCloudCredential': {'additionalProperties': False,
9867 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
9868 'tag': {'type': 'string'}},
9869 'required': ['tag', 'credential'],
9870 'type': 'object'},
9871 'UpdateCloudCredentials': {'additionalProperties': False,
9872 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'},
9873 'type': 'array'}},
9874 'type': 'object'},
9875 'UserCloud': {'additionalProperties': False,
9876 'properties': {'cloud-tag': {'type': 'string'},
9877 'user-tag': {'type': 'string'}},
9878 'required': ['user-tag', 'cloud-tag'],
9879 'type': 'object'},
9880 'UserClouds': {'additionalProperties': False,
9881 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
9882 'type': 'array'}},
9883 'type': 'object'}},
9884 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9885 'Result': {'$ref': '#/definitions/CloudResults'}},
9886 'type': 'object'},
9887 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
9888 'type': 'object'},
9889 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9890 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
9891 'type': 'object'},
9892 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
9893 'type': 'object'},
9894 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9895 'Result': {'$ref': '#/definitions/ErrorResults'}},
9896 'type': 'object'},
9897 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'},
9898 'Result': {'$ref': '#/definitions/ErrorResults'}},
9899 'type': 'object'},
9900 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
9901 'Result': {'$ref': '#/definitions/StringsResults'}},
9902 'type': 'object'}},
9903 'type': 'object'}
9904
9905
9906 @ReturnMapping(CloudResults)
9907 async def Cloud(self, entities):
9908 '''
9909 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9910 Returns -> typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
9911 '''
9912 # map input types to rpc msg
9913 _params = dict()
9914 msg = dict(type='Cloud', request='Cloud', version=1, params=_params)
9915 _params['entities'] = entities
9916 reply = await self.rpc(msg)
9917 return reply
9918
9919
9920
9921 @ReturnMapping(CloudsResult)
9922 async def Clouds(self):
9923 '''
9924
9925 Returns -> typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
9926 '''
9927 # map input types to rpc msg
9928 _params = dict()
9929 msg = dict(type='Cloud', request='Clouds', version=1, params=_params)
9930
9931 reply = await self.rpc(msg)
9932 return reply
9933
9934
9935
9936 @ReturnMapping(CloudCredentialResults)
9937 async def Credential(self, entities):
9938 '''
9939 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9940 Returns -> typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
9941 '''
9942 # map input types to rpc msg
9943 _params = dict()
9944 msg = dict(type='Cloud', request='Credential', version=1, params=_params)
9945 _params['entities'] = entities
9946 reply = await self.rpc(msg)
9947 return reply
9948
9949
9950
9951 @ReturnMapping(StringResult)
9952 async def DefaultCloud(self):
9953 '''
9954
9955 Returns -> typing.Union[_ForwardRef('Error'), str]
9956 '''
9957 # map input types to rpc msg
9958 _params = dict()
9959 msg = dict(type='Cloud', request='DefaultCloud', version=1, params=_params)
9960
9961 reply = await self.rpc(msg)
9962 return reply
9963
9964
9965
9966 @ReturnMapping(ErrorResults)
9967 async def RevokeCredentials(self, entities):
9968 '''
9969 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9970 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9971 '''
9972 # map input types to rpc msg
9973 _params = dict()
9974 msg = dict(type='Cloud', request='RevokeCredentials', version=1, params=_params)
9975 _params['entities'] = entities
9976 reply = await self.rpc(msg)
9977 return reply
9978
9979
9980
9981 @ReturnMapping(ErrorResults)
9982 async def UpdateCredentials(self, credentials):
9983 '''
9984 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
9985 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9986 '''
9987 # map input types to rpc msg
9988 _params = dict()
9989 msg = dict(type='Cloud', request='UpdateCredentials', version=1, params=_params)
9990 _params['credentials'] = credentials
9991 reply = await self.rpc(msg)
9992 return reply
9993
9994
9995
9996 @ReturnMapping(StringsResults)
9997 async def UserCredentials(self, user_clouds):
9998 '''
9999 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
10000 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
10001 '''
10002 # map input types to rpc msg
10003 _params = dict()
10004 msg = dict(type='Cloud', request='UserCredentials', version=1, params=_params)
10005 _params['user-clouds'] = user_clouds
10006 reply = await self.rpc(msg)
10007 return reply
10008
10009
10010 class ControllerFacade(Type):
10011 name = 'Controller'
10012 version = 3
10013 schema = {'definitions': {'AllWatcherId': {'additionalProperties': False,
10014 'properties': {'watcher-id': {'type': 'string'}},
10015 'required': ['watcher-id'],
10016 'type': 'object'},
10017 'CloudCredential': {'additionalProperties': False,
10018 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
10019 'type': 'object'},
10020 'auth-type': {'type': 'string'},
10021 'redacted': {'items': {'type': 'string'},
10022 'type': 'array'}},
10023 'required': ['auth-type'],
10024 'type': 'object'},
10025 'CloudSpec': {'additionalProperties': False,
10026 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
10027 'endpoint': {'type': 'string'},
10028 'identity-endpoint': {'type': 'string'},
10029 'name': {'type': 'string'},
10030 'region': {'type': 'string'},
10031 'storage-endpoint': {'type': 'string'},
10032 'type': {'type': 'string'}},
10033 'required': ['type', 'name'],
10034 'type': 'object'},
10035 'CloudSpecResult': {'additionalProperties': False,
10036 'properties': {'error': {'$ref': '#/definitions/Error'},
10037 'result': {'$ref': '#/definitions/CloudSpec'}},
10038 'type': 'object'},
10039 'CloudSpecResults': {'additionalProperties': False,
10040 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
10041 'type': 'array'}},
10042 'type': 'object'},
10043 'ConfigValue': {'additionalProperties': False,
10044 'properties': {'source': {'type': 'string'},
10045 'value': {'additionalProperties': True,
10046 'type': 'object'}},
10047 'required': ['value', 'source'],
10048 'type': 'object'},
10049 'ControllerConfigResult': {'additionalProperties': False,
10050 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
10051 'type': 'object'}},
10052 'type': 'object'}},
10053 'required': ['config'],
10054 'type': 'object'},
10055 'DestroyControllerArgs': {'additionalProperties': False,
10056 'properties': {'destroy-models': {'type': 'boolean'}},
10057 'required': ['destroy-models'],
10058 'type': 'object'},
10059 'Entities': {'additionalProperties': False,
10060 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10061 'type': 'array'}},
10062 'required': ['entities'],
10063 'type': 'object'},
10064 'Entity': {'additionalProperties': False,
10065 'properties': {'tag': {'type': 'string'}},
10066 'required': ['tag'],
10067 'type': 'object'},
10068 'Error': {'additionalProperties': False,
10069 'properties': {'code': {'type': 'string'},
10070 'info': {'$ref': '#/definitions/ErrorInfo'},
10071 'message': {'type': 'string'}},
10072 'required': ['message', 'code'],
10073 'type': 'object'},
10074 'ErrorInfo': {'additionalProperties': False,
10075 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10076 'macaroon-path': {'type': 'string'}},
10077 'type': 'object'},
10078 'ErrorResult': {'additionalProperties': False,
10079 'properties': {'error': {'$ref': '#/definitions/Error'}},
10080 'type': 'object'},
10081 'ErrorResults': {'additionalProperties': False,
10082 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10083 'type': 'array'}},
10084 'required': ['results'],
10085 'type': 'object'},
10086 'HostedModelConfig': {'additionalProperties': False,
10087 'properties': {'cloud-spec': {'$ref': '#/definitions/CloudSpec'},
10088 'config': {'patternProperties': {'.*': {'additionalProperties': True,
10089 'type': 'object'}},
10090 'type': 'object'},
10091 'error': {'$ref': '#/definitions/Error'},
10092 'name': {'type': 'string'},
10093 'owner': {'type': 'string'}},
10094 'required': ['name', 'owner'],
10095 'type': 'object'},
10096 'HostedModelConfigsResults': {'additionalProperties': False,
10097 'properties': {'models': {'items': {'$ref': '#/definitions/HostedModelConfig'},
10098 'type': 'array'}},
10099 'required': ['models'],
10100 'type': 'object'},
10101 'InitiateMigrationArgs': {'additionalProperties': False,
10102 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
10103 'type': 'array'}},
10104 'required': ['specs'],
10105 'type': 'object'},
10106 'InitiateMigrationResult': {'additionalProperties': False,
10107 'properties': {'error': {'$ref': '#/definitions/Error'},
10108 'migration-id': {'type': 'string'},
10109 'model-tag': {'type': 'string'}},
10110 'required': ['model-tag',
10111 'migration-id'],
10112 'type': 'object'},
10113 'InitiateMigrationResults': {'additionalProperties': False,
10114 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
10115 'type': 'array'}},
10116 'required': ['results'],
10117 'type': 'object'},
10118 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10119 'MachineHardware': {'additionalProperties': False,
10120 'properties': {'arch': {'type': 'string'},
10121 'availability-zone': {'type': 'string'},
10122 'cores': {'type': 'integer'},
10123 'cpu-power': {'type': 'integer'},
10124 'mem': {'type': 'integer'},
10125 'root-disk': {'type': 'integer'},
10126 'tags': {'items': {'type': 'string'},
10127 'type': 'array'}},
10128 'type': 'object'},
10129 'MigrationSpec': {'additionalProperties': False,
10130 'properties': {'external-control': {'type': 'boolean'},
10131 'model-tag': {'type': 'string'},
10132 'skip-initial-prechecks': {'type': 'boolean'},
10133 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
10134 'required': ['model-tag',
10135 'target-info',
10136 'external-control',
10137 'skip-initial-prechecks'],
10138 'type': 'object'},
10139 'MigrationTargetInfo': {'additionalProperties': False,
10140 'properties': {'addrs': {'items': {'type': 'string'},
10141 'type': 'array'},
10142 'auth-tag': {'type': 'string'},
10143 'ca-cert': {'type': 'string'},
10144 'controller-tag': {'type': 'string'},
10145 'macaroons': {'type': 'string'},
10146 'password': {'type': 'string'}},
10147 'required': ['controller-tag',
10148 'addrs',
10149 'ca-cert',
10150 'auth-tag'],
10151 'type': 'object'},
10152 'Model': {'additionalProperties': False,
10153 'properties': {'name': {'type': 'string'},
10154 'owner-tag': {'type': 'string'},
10155 'uuid': {'type': 'string'}},
10156 'required': ['name', 'uuid', 'owner-tag'],
10157 'type': 'object'},
10158 'ModelBlockInfo': {'additionalProperties': False,
10159 'properties': {'blocks': {'items': {'type': 'string'},
10160 'type': 'array'},
10161 'model-uuid': {'type': 'string'},
10162 'name': {'type': 'string'},
10163 'owner-tag': {'type': 'string'}},
10164 'required': ['name',
10165 'model-uuid',
10166 'owner-tag',
10167 'blocks'],
10168 'type': 'object'},
10169 'ModelBlockInfoList': {'additionalProperties': False,
10170 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
10171 'type': 'array'}},
10172 'type': 'object'},
10173 'ModelConfigResults': {'additionalProperties': False,
10174 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
10175 'type': 'object'}},
10176 'required': ['config'],
10177 'type': 'object'},
10178 'ModelMachineInfo': {'additionalProperties': False,
10179 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
10180 'has-vote': {'type': 'boolean'},
10181 'id': {'type': 'string'},
10182 'instance-id': {'type': 'string'},
10183 'status': {'type': 'string'},
10184 'wants-vote': {'type': 'boolean'}},
10185 'required': ['id'],
10186 'type': 'object'},
10187 'ModelStatus': {'additionalProperties': False,
10188 'properties': {'application-count': {'type': 'integer'},
10189 'hosted-machine-count': {'type': 'integer'},
10190 'life': {'type': 'string'},
10191 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
10192 'type': 'array'},
10193 'model-tag': {'type': 'string'},
10194 'owner-tag': {'type': 'string'}},
10195 'required': ['model-tag',
10196 'life',
10197 'hosted-machine-count',
10198 'application-count',
10199 'owner-tag'],
10200 'type': 'object'},
10201 'ModelStatusResults': {'additionalProperties': False,
10202 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
10203 'type': 'array'}},
10204 'required': ['models'],
10205 'type': 'object'},
10206 'ModelTag': {'additionalProperties': False, 'type': 'object'},
10207 'ModifyControllerAccess': {'additionalProperties': False,
10208 'properties': {'access': {'type': 'string'},
10209 'action': {'type': 'string'},
10210 'user-tag': {'type': 'string'}},
10211 'required': ['user-tag',
10212 'action',
10213 'access'],
10214 'type': 'object'},
10215 'ModifyControllerAccessRequest': {'additionalProperties': False,
10216 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
10217 'type': 'array'}},
10218 'required': ['changes'],
10219 'type': 'object'},
10220 'RemoveBlocksArgs': {'additionalProperties': False,
10221 'properties': {'all': {'type': 'boolean'}},
10222 'required': ['all'],
10223 'type': 'object'},
10224 'UserAccess': {'additionalProperties': False,
10225 'properties': {'access': {'type': 'string'},
10226 'user-tag': {'type': 'string'}},
10227 'required': ['user-tag', 'access'],
10228 'type': 'object'},
10229 'UserAccessResult': {'additionalProperties': False,
10230 'properties': {'error': {'$ref': '#/definitions/Error'},
10231 'result': {'$ref': '#/definitions/UserAccess'}},
10232 'type': 'object'},
10233 'UserAccessResults': {'additionalProperties': False,
10234 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
10235 'type': 'array'}},
10236 'type': 'object'},
10237 'UserModel': {'additionalProperties': False,
10238 'properties': {'last-connection': {'format': 'date-time',
10239 'type': 'string'},
10240 'model': {'$ref': '#/definitions/Model'}},
10241 'required': ['model', 'last-connection'],
10242 'type': 'object'},
10243 'UserModelList': {'additionalProperties': False,
10244 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
10245 'type': 'array'}},
10246 'required': ['user-models'],
10247 'type': 'object'}},
10248 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
10249 'type': 'object'},
10250 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10251 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
10252 'type': 'object'},
10253 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
10254 'type': 'object'},
10255 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
10256 'type': 'object'},
10257 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
10258 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
10259 'type': 'object'},
10260 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10261 'Result': {'$ref': '#/definitions/UserAccessResults'}},
10262 'type': 'object'},
10263 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}},
10264 'type': 'object'},
10265 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
10266 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
10267 'type': 'object'},
10268 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
10269 'type': 'object'},
10270 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
10271 'type': 'object'},
10272 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10273 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
10274 'type': 'object'},
10275 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
10276 'Result': {'$ref': '#/definitions/ErrorResults'}},
10277 'type': 'object'},
10278 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
10279 'type': 'object'},
10280 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
10281 'type': 'object'}},
10282 'type': 'object'}
10283
10284
10285 @ReturnMapping(UserModelList)
10286 async def AllModels(self):
10287 '''
10288
10289 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
10290 '''
10291 # map input types to rpc msg
10292 _params = dict()
10293 msg = dict(type='Controller', request='AllModels', version=3, params=_params)
10294
10295 reply = await self.rpc(msg)
10296 return reply
10297
10298
10299
10300 @ReturnMapping(CloudSpecResults)
10301 async def CloudSpec(self, entities):
10302 '''
10303 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10304 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
10305 '''
10306 # map input types to rpc msg
10307 _params = dict()
10308 msg = dict(type='Controller', request='CloudSpec', version=3, params=_params)
10309 _params['entities'] = entities
10310 reply = await self.rpc(msg)
10311 return reply
10312
10313
10314
10315 @ReturnMapping(ControllerConfigResult)
10316 async def ControllerConfig(self):
10317 '''
10318
10319 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
10320 '''
10321 # map input types to rpc msg
10322 _params = dict()
10323 msg = dict(type='Controller', request='ControllerConfig', version=3, params=_params)
10324
10325 reply = await self.rpc(msg)
10326 return reply
10327
10328
10329
10330 @ReturnMapping(None)
10331 async def DestroyController(self, destroy_models):
10332 '''
10333 destroy_models : bool
10334 Returns -> None
10335 '''
10336 # map input types to rpc msg
10337 _params = dict()
10338 msg = dict(type='Controller', request='DestroyController', version=3, params=_params)
10339 _params['destroy-models'] = destroy_models
10340 reply = await self.rpc(msg)
10341 return reply
10342
10343
10344
10345 @ReturnMapping(CloudSpecResult)
10346 async def GetCloudSpec(self):
10347 '''
10348
10349 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
10350 '''
10351 # map input types to rpc msg
10352 _params = dict()
10353 msg = dict(type='Controller', request='GetCloudSpec', version=3, params=_params)
10354
10355 reply = await self.rpc(msg)
10356 return reply
10357
10358
10359
10360 @ReturnMapping(UserAccessResults)
10361 async def GetControllerAccess(self, entities):
10362 '''
10363 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10364 Returns -> typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
10365 '''
10366 # map input types to rpc msg
10367 _params = dict()
10368 msg = dict(type='Controller', request='GetControllerAccess', version=3, params=_params)
10369 _params['entities'] = entities
10370 reply = await self.rpc(msg)
10371 return reply
10372
10373
10374
10375 @ReturnMapping(HostedModelConfigsResults)
10376 async def HostedModelConfigs(self):
10377 '''
10378
10379 Returns -> typing.Sequence<+T_co>[~HostedModelConfig]<~HostedModelConfig>
10380 '''
10381 # map input types to rpc msg
10382 _params = dict()
10383 msg = dict(type='Controller', request='HostedModelConfigs', version=3, params=_params)
10384
10385 reply = await self.rpc(msg)
10386 return reply
10387
10388
10389
10390 @ReturnMapping(InitiateMigrationResults)
10391 async def InitiateMigration(self, specs):
10392 '''
10393 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
10394 Returns -> typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
10395 '''
10396 # map input types to rpc msg
10397 _params = dict()
10398 msg = dict(type='Controller', request='InitiateMigration', version=3, params=_params)
10399 _params['specs'] = specs
10400 reply = await self.rpc(msg)
10401 return reply
10402
10403
10404
10405 @ReturnMapping(ModelBlockInfoList)
10406 async def ListBlockedModels(self):
10407 '''
10408
10409 Returns -> typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
10410 '''
10411 # map input types to rpc msg
10412 _params = dict()
10413 msg = dict(type='Controller', request='ListBlockedModels', version=3, params=_params)
10414
10415 reply = await self.rpc(msg)
10416 return reply
10417
10418
10419
10420 @ReturnMapping(ModelConfigResults)
10421 async def ModelConfig(self):
10422 '''
10423
10424 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
10425 '''
10426 # map input types to rpc msg
10427 _params = dict()
10428 msg = dict(type='Controller', request='ModelConfig', version=3, params=_params)
10429
10430 reply = await self.rpc(msg)
10431 return reply
10432
10433
10434
10435 @ReturnMapping(ModelStatusResults)
10436 async def ModelStatus(self, entities):
10437 '''
10438 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10439 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
10440 '''
10441 # map input types to rpc msg
10442 _params = dict()
10443 msg = dict(type='Controller', request='ModelStatus', version=3, params=_params)
10444 _params['entities'] = entities
10445 reply = await self.rpc(msg)
10446 return reply
10447
10448
10449
10450 @ReturnMapping(ErrorResults)
10451 async def ModifyControllerAccess(self, changes):
10452 '''
10453 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
10454 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10455 '''
10456 # map input types to rpc msg
10457 _params = dict()
10458 msg = dict(type='Controller', request='ModifyControllerAccess', version=3, params=_params)
10459 _params['changes'] = changes
10460 reply = await self.rpc(msg)
10461 return reply
10462
10463
10464
10465 @ReturnMapping(None)
10466 async def RemoveBlocks(self, all_):
10467 '''
10468 all_ : bool
10469 Returns -> None
10470 '''
10471 # map input types to rpc msg
10472 _params = dict()
10473 msg = dict(type='Controller', request='RemoveBlocks', version=3, params=_params)
10474 _params['all'] = all_
10475 reply = await self.rpc(msg)
10476 return reply
10477
10478
10479
10480 @ReturnMapping(AllWatcherId)
10481 async def WatchAllModels(self):
10482 '''
10483
10484 Returns -> str
10485 '''
10486 # map input types to rpc msg
10487 _params = dict()
10488 msg = dict(type='Controller', request='WatchAllModels', version=3, params=_params)
10489
10490 reply = await self.rpc(msg)
10491 return reply
10492
10493
10494 class DeployerFacade(Type):
10495 name = 'Deployer'
10496 version = 1
10497 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
10498 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
10499 'type': 'array'},
10500 'type': 'array'}},
10501 'required': ['servers'],
10502 'type': 'object'},
10503 'Address': {'additionalProperties': False,
10504 'properties': {'scope': {'type': 'string'},
10505 'space-name': {'type': 'string'},
10506 'type': {'type': 'string'},
10507 'value': {'type': 'string'}},
10508 'required': ['value', 'type', 'scope'],
10509 'type': 'object'},
10510 'BytesResult': {'additionalProperties': False,
10511 'properties': {'result': {'items': {'type': 'integer'},
10512 'type': 'array'}},
10513 'required': ['result'],
10514 'type': 'object'},
10515 'DeployerConnectionValues': {'additionalProperties': False,
10516 'properties': {'api-addresses': {'items': {'type': 'string'},
10517 'type': 'array'},
10518 'state-addresses': {'items': {'type': 'string'},
10519 'type': 'array'}},
10520 'required': ['state-addresses',
10521 'api-addresses'],
10522 'type': 'object'},
10523 'Entities': {'additionalProperties': False,
10524 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10525 'type': 'array'}},
10526 'required': ['entities'],
10527 'type': 'object'},
10528 'Entity': {'additionalProperties': False,
10529 'properties': {'tag': {'type': 'string'}},
10530 'required': ['tag'],
10531 'type': 'object'},
10532 'EntityPassword': {'additionalProperties': False,
10533 'properties': {'password': {'type': 'string'},
10534 'tag': {'type': 'string'}},
10535 'required': ['tag', 'password'],
10536 'type': 'object'},
10537 'EntityPasswords': {'additionalProperties': False,
10538 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
10539 'type': 'array'}},
10540 'required': ['changes'],
10541 'type': 'object'},
10542 'EntityStatusArgs': {'additionalProperties': False,
10543 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
10544 'type': 'object'}},
10545 'type': 'object'},
10546 'info': {'type': 'string'},
10547 'status': {'type': 'string'},
10548 'tag': {'type': 'string'}},
10549 'required': ['tag',
10550 'status',
10551 'info',
10552 'data'],
10553 'type': 'object'},
10554 'Error': {'additionalProperties': False,
10555 'properties': {'code': {'type': 'string'},
10556 'info': {'$ref': '#/definitions/ErrorInfo'},
10557 'message': {'type': 'string'}},
10558 'required': ['message', 'code'],
10559 'type': 'object'},
10560 'ErrorInfo': {'additionalProperties': False,
10561 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10562 'macaroon-path': {'type': 'string'}},
10563 'type': 'object'},
10564 'ErrorResult': {'additionalProperties': False,
10565 'properties': {'error': {'$ref': '#/definitions/Error'}},
10566 'type': 'object'},
10567 'ErrorResults': {'additionalProperties': False,
10568 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10569 'type': 'array'}},
10570 'required': ['results'],
10571 'type': 'object'},
10572 'HostPort': {'additionalProperties': False,
10573 'properties': {'Address': {'$ref': '#/definitions/Address'},
10574 'port': {'type': 'integer'}},
10575 'required': ['Address', 'port'],
10576 'type': 'object'},
10577 'LifeResult': {'additionalProperties': False,
10578 'properties': {'error': {'$ref': '#/definitions/Error'},
10579 'life': {'type': 'string'}},
10580 'required': ['life'],
10581 'type': 'object'},
10582 'LifeResults': {'additionalProperties': False,
10583 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
10584 'type': 'array'}},
10585 'required': ['results'],
10586 'type': 'object'},
10587 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10588 'NotifyWatchResult': {'additionalProperties': False,
10589 'properties': {'NotifyWatcherId': {'type': 'string'},
10590 'error': {'$ref': '#/definitions/Error'}},
10591 'required': ['NotifyWatcherId'],
10592 'type': 'object'},
10593 'SetStatus': {'additionalProperties': False,
10594 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
10595 'type': 'array'}},
10596 'required': ['entities'],
10597 'type': 'object'},
10598 'StringResult': {'additionalProperties': False,
10599 'properties': {'error': {'$ref': '#/definitions/Error'},
10600 'result': {'type': 'string'}},
10601 'required': ['result'],
10602 'type': 'object'},
10603 'StringsResult': {'additionalProperties': False,
10604 'properties': {'error': {'$ref': '#/definitions/Error'},
10605 'result': {'items': {'type': 'string'},
10606 'type': 'array'}},
10607 'type': 'object'},
10608 'StringsWatchResult': {'additionalProperties': False,
10609 'properties': {'changes': {'items': {'type': 'string'},
10610 'type': 'array'},
10611 'error': {'$ref': '#/definitions/Error'},
10612 'watcher-id': {'type': 'string'}},
10613 'required': ['watcher-id'],
10614 'type': 'object'},
10615 'StringsWatchResults': {'additionalProperties': False,
10616 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
10617 'type': 'array'}},
10618 'required': ['results'],
10619 'type': 'object'}},
10620 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
10621 'type': 'object'},
10622 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
10623 'type': 'object'},
10624 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
10625 'type': 'object'},
10626 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
10627 'type': 'object'},
10628 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10629 'Result': {'$ref': '#/definitions/LifeResults'}},
10630 'type': 'object'},
10631 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
10632 'type': 'object'},
10633 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10634 'Result': {'$ref': '#/definitions/ErrorResults'}},
10635 'type': 'object'},
10636 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
10637 'Result': {'$ref': '#/definitions/ErrorResults'}},
10638 'type': 'object'},
10639 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
10640 'Result': {'$ref': '#/definitions/ErrorResults'}},
10641 'type': 'object'},
10642 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
10643 'type': 'object'},
10644 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
10645 'Result': {'$ref': '#/definitions/ErrorResults'}},
10646 'type': 'object'},
10647 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10648 'type': 'object'},
10649 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10650 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10651 'type': 'object'}},
10652 'type': 'object'}
10653
10654
10655 @ReturnMapping(StringsResult)
10656 async def APIAddresses(self):
10657 '''
10658
10659 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
10660 '''
10661 # map input types to rpc msg
10662 _params = dict()
10663 msg = dict(type='Deployer', request='APIAddresses', version=1, params=_params)
10664
10665 reply = await self.rpc(msg)
10666 return reply
10667
10668
10669
10670 @ReturnMapping(APIHostPortsResult)
10671 async def APIHostPorts(self):
10672 '''
10673
10674 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
10675 '''
10676 # map input types to rpc msg
10677 _params = dict()
10678 msg = dict(type='Deployer', request='APIHostPorts', version=1, params=_params)
10679
10680 reply = await self.rpc(msg)
10681 return reply
10682
10683
10684
10685 @ReturnMapping(BytesResult)
10686 async def CACert(self):
10687 '''
10688
10689 Returns -> typing.Sequence<+T_co>[int]
10690 '''
10691 # map input types to rpc msg
10692 _params = dict()
10693 msg = dict(type='Deployer', request='CACert', version=1, params=_params)
10694
10695 reply = await self.rpc(msg)
10696 return reply
10697
10698
10699
10700 @ReturnMapping(DeployerConnectionValues)
10701 async def ConnectionInfo(self):
10702 '''
10703
10704 Returns -> typing.Sequence<+T_co>[str]
10705 '''
10706 # map input types to rpc msg
10707 _params = dict()
10708 msg = dict(type='Deployer', request='ConnectionInfo', version=1, params=_params)
10709
10710 reply = await self.rpc(msg)
10711 return reply
10712
10713
10714
10715 @ReturnMapping(LifeResults)
10716 async def Life(self, entities):
10717 '''
10718 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10719 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
10720 '''
10721 # map input types to rpc msg
10722 _params = dict()
10723 msg = dict(type='Deployer', request='Life', version=1, params=_params)
10724 _params['entities'] = entities
10725 reply = await self.rpc(msg)
10726 return reply
10727
10728
10729
10730 @ReturnMapping(StringResult)
10731 async def ModelUUID(self):
10732 '''
10733
10734 Returns -> typing.Union[_ForwardRef('Error'), str]
10735 '''
10736 # map input types to rpc msg
10737 _params = dict()
10738 msg = dict(type='Deployer', request='ModelUUID', version=1, params=_params)
10739
10740 reply = await self.rpc(msg)
10741 return reply
10742
10743
10744
10745 @ReturnMapping(ErrorResults)
10746 async def Remove(self, entities):
10747 '''
10748 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10749 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10750 '''
10751 # map input types to rpc msg
10752 _params = dict()
10753 msg = dict(type='Deployer', request='Remove', version=1, params=_params)
10754 _params['entities'] = entities
10755 reply = await self.rpc(msg)
10756 return reply
10757
10758
10759
10760 @ReturnMapping(ErrorResults)
10761 async def SetPasswords(self, changes):
10762 '''
10763 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
10764 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10765 '''
10766 # map input types to rpc msg
10767 _params = dict()
10768 msg = dict(type='Deployer', request='SetPasswords', version=1, params=_params)
10769 _params['changes'] = changes
10770 reply = await self.rpc(msg)
10771 return reply
10772
10773
10774
10775 @ReturnMapping(ErrorResults)
10776 async def SetStatus(self, entities):
10777 '''
10778 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
10779 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10780 '''
10781 # map input types to rpc msg
10782 _params = dict()
10783 msg = dict(type='Deployer', request='SetStatus', version=1, params=_params)
10784 _params['entities'] = entities
10785 reply = await self.rpc(msg)
10786 return reply
10787
10788
10789
10790 @ReturnMapping(StringsResult)
10791 async def StateAddresses(self):
10792 '''
10793
10794 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
10795 '''
10796 # map input types to rpc msg
10797 _params = dict()
10798 msg = dict(type='Deployer', request='StateAddresses', version=1, params=_params)
10799
10800 reply = await self.rpc(msg)
10801 return reply
10802
10803
10804
10805 @ReturnMapping(ErrorResults)
10806 async def UpdateStatus(self, entities):
10807 '''
10808 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
10809 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10810 '''
10811 # map input types to rpc msg
10812 _params = dict()
10813 msg = dict(type='Deployer', request='UpdateStatus', version=1, params=_params)
10814 _params['entities'] = entities
10815 reply = await self.rpc(msg)
10816 return reply
10817
10818
10819
10820 @ReturnMapping(NotifyWatchResult)
10821 async def WatchAPIHostPorts(self):
10822 '''
10823
10824 Returns -> typing.Union[str, _ForwardRef('Error')]
10825 '''
10826 # map input types to rpc msg
10827 _params = dict()
10828 msg = dict(type='Deployer', request='WatchAPIHostPorts', version=1, params=_params)
10829
10830 reply = await self.rpc(msg)
10831 return reply
10832
10833
10834
10835 @ReturnMapping(StringsWatchResults)
10836 async def WatchUnits(self, entities):
10837 '''
10838 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10839 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
10840 '''
10841 # map input types to rpc msg
10842 _params = dict()
10843 msg = dict(type='Deployer', request='WatchUnits', version=1, params=_params)
10844 _params['entities'] = entities
10845 reply = await self.rpc(msg)
10846 return reply
10847
10848
10849 class DiscoverSpacesFacade(Type):
10850 name = 'DiscoverSpaces'
10851 version = 2
10852 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
10853 'properties': {'space-tag': {'type': 'string'},
10854 'subnet-provider-id': {'type': 'string'},
10855 'subnet-tag': {'type': 'string'},
10856 'zones': {'items': {'type': 'string'},
10857 'type': 'array'}},
10858 'required': ['space-tag'],
10859 'type': 'object'},
10860 'AddSubnetsParams': {'additionalProperties': False,
10861 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
10862 'type': 'array'}},
10863 'required': ['subnets'],
10864 'type': 'object'},
10865 'CreateSpaceParams': {'additionalProperties': False,
10866 'properties': {'provider-id': {'type': 'string'},
10867 'public': {'type': 'boolean'},
10868 'space-tag': {'type': 'string'},
10869 'subnet-tags': {'items': {'type': 'string'},
10870 'type': 'array'}},
10871 'required': ['subnet-tags',
10872 'space-tag',
10873 'public'],
10874 'type': 'object'},
10875 'CreateSpacesParams': {'additionalProperties': False,
10876 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
10877 'type': 'array'}},
10878 'required': ['spaces'],
10879 'type': 'object'},
10880 'DiscoverSpacesResults': {'additionalProperties': False,
10881 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'},
10882 'type': 'array'}},
10883 'required': ['results'],
10884 'type': 'object'},
10885 'Error': {'additionalProperties': False,
10886 'properties': {'code': {'type': 'string'},
10887 'info': {'$ref': '#/definitions/ErrorInfo'},
10888 'message': {'type': 'string'}},
10889 'required': ['message', 'code'],
10890 'type': 'object'},
10891 'ErrorInfo': {'additionalProperties': False,
10892 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10893 'macaroon-path': {'type': 'string'}},
10894 'type': 'object'},
10895 'ErrorResult': {'additionalProperties': False,
10896 'properties': {'error': {'$ref': '#/definitions/Error'}},
10897 'type': 'object'},
10898 'ErrorResults': {'additionalProperties': False,
10899 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10900 'type': 'array'}},
10901 'required': ['results'],
10902 'type': 'object'},
10903 'ListSubnetsResults': {'additionalProperties': False,
10904 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
10905 'type': 'array'}},
10906 'required': ['results'],
10907 'type': 'object'},
10908 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10909 'ModelConfigResult': {'additionalProperties': False,
10910 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
10911 'type': 'object'}},
10912 'type': 'object'}},
10913 'required': ['config'],
10914 'type': 'object'},
10915 'ProviderSpace': {'additionalProperties': False,
10916 'properties': {'error': {'$ref': '#/definitions/Error'},
10917 'name': {'type': 'string'},
10918 'provider-id': {'type': 'string'},
10919 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
10920 'type': 'array'}},
10921 'required': ['name',
10922 'provider-id',
10923 'subnets'],
10924 'type': 'object'},
10925 'Subnet': {'additionalProperties': False,
10926 'properties': {'cidr': {'type': 'string'},
10927 'life': {'type': 'string'},
10928 'provider-id': {'type': 'string'},
10929 'space-tag': {'type': 'string'},
10930 'status': {'type': 'string'},
10931 'vlan-tag': {'type': 'integer'},
10932 'zones': {'items': {'type': 'string'},
10933 'type': 'array'}},
10934 'required': ['cidr',
10935 'vlan-tag',
10936 'life',
10937 'space-tag',
10938 'zones'],
10939 'type': 'object'},
10940 'SubnetsFilters': {'additionalProperties': False,
10941 'properties': {'space-tag': {'type': 'string'},
10942 'zone': {'type': 'string'}},
10943 'type': 'object'}},
10944 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
10945 'Result': {'$ref': '#/definitions/ErrorResults'}},
10946 'type': 'object'},
10947 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
10948 'Result': {'$ref': '#/definitions/ErrorResults'}},
10949 'type': 'object'},
10950 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
10951 'type': 'object'},
10952 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
10953 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
10954 'type': 'object'},
10955 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10956 'type': 'object'}},
10957 'type': 'object'}
10958
10959
10960 @ReturnMapping(ErrorResults)
10961 async def AddSubnets(self, subnets):
10962 '''
10963 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
10964 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10965 '''
10966 # map input types to rpc msg
10967 _params = dict()
10968 msg = dict(type='DiscoverSpaces', request='AddSubnets', version=2, params=_params)
10969 _params['subnets'] = subnets
10970 reply = await self.rpc(msg)
10971 return reply
10972
10973
10974
10975 @ReturnMapping(ErrorResults)
10976 async def CreateSpaces(self, spaces):
10977 '''
10978 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
10979 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10980 '''
10981 # map input types to rpc msg
10982 _params = dict()
10983 msg = dict(type='DiscoverSpaces', request='CreateSpaces', version=2, params=_params)
10984 _params['spaces'] = spaces
10985 reply = await self.rpc(msg)
10986 return reply
10987
10988
10989
10990 @ReturnMapping(DiscoverSpacesResults)
10991 async def ListSpaces(self):
10992 '''
10993
10994 Returns -> typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
10995 '''
10996 # map input types to rpc msg
10997 _params = dict()
10998 msg = dict(type='DiscoverSpaces', request='ListSpaces', version=2, params=_params)
10999
11000 reply = await self.rpc(msg)
11001 return reply
11002
11003
11004
11005 @ReturnMapping(ListSubnetsResults)
11006 async def ListSubnets(self, space_tag, zone):
11007 '''
11008 space_tag : str
11009 zone : str
11010 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
11011 '''
11012 # map input types to rpc msg
11013 _params = dict()
11014 msg = dict(type='DiscoverSpaces', request='ListSubnets', version=2, params=_params)
11015 _params['space-tag'] = space_tag
11016 _params['zone'] = zone
11017 reply = await self.rpc(msg)
11018 return reply
11019
11020
11021
11022 @ReturnMapping(ModelConfigResult)
11023 async def ModelConfig(self):
11024 '''
11025
11026 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
11027 '''
11028 # map input types to rpc msg
11029 _params = dict()
11030 msg = dict(type='DiscoverSpaces', request='ModelConfig', version=2, params=_params)
11031
11032 reply = await self.rpc(msg)
11033 return reply
11034
11035
11036 class DiskManagerFacade(Type):
11037 name = 'DiskManager'
11038 version = 2
11039 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
11040 'properties': {'BusAddress': {'type': 'string'},
11041 'DeviceLinks': {'items': {'type': 'string'},
11042 'type': 'array'},
11043 'DeviceName': {'type': 'string'},
11044 'FilesystemType': {'type': 'string'},
11045 'HardwareId': {'type': 'string'},
11046 'InUse': {'type': 'boolean'},
11047 'Label': {'type': 'string'},
11048 'MountPoint': {'type': 'string'},
11049 'Size': {'type': 'integer'},
11050 'UUID': {'type': 'string'}},
11051 'required': ['DeviceName',
11052 'DeviceLinks',
11053 'Label',
11054 'UUID',
11055 'HardwareId',
11056 'BusAddress',
11057 'Size',
11058 'FilesystemType',
11059 'InUse',
11060 'MountPoint'],
11061 'type': 'object'},
11062 'Error': {'additionalProperties': False,
11063 'properties': {'code': {'type': 'string'},
11064 'info': {'$ref': '#/definitions/ErrorInfo'},
11065 'message': {'type': 'string'}},
11066 'required': ['message', 'code'],
11067 'type': 'object'},
11068 'ErrorInfo': {'additionalProperties': False,
11069 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11070 'macaroon-path': {'type': 'string'}},
11071 'type': 'object'},
11072 'ErrorResult': {'additionalProperties': False,
11073 'properties': {'error': {'$ref': '#/definitions/Error'}},
11074 'type': 'object'},
11075 'ErrorResults': {'additionalProperties': False,
11076 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11077 'type': 'array'}},
11078 'required': ['results'],
11079 'type': 'object'},
11080 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11081 'MachineBlockDevices': {'additionalProperties': False,
11082 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
11083 'type': 'array'},
11084 'machine': {'type': 'string'}},
11085 'required': ['machine'],
11086 'type': 'object'},
11087 'SetMachineBlockDevices': {'additionalProperties': False,
11088 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
11089 'type': 'array'}},
11090 'required': ['machine-block-devices'],
11091 'type': 'object'}},
11092 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
11093 'Result': {'$ref': '#/definitions/ErrorResults'}},
11094 'type': 'object'}},
11095 'type': 'object'}
11096
11097
11098 @ReturnMapping(ErrorResults)
11099 async def SetMachineBlockDevices(self, machine_block_devices):
11100 '''
11101 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
11102 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11103 '''
11104 # map input types to rpc msg
11105 _params = dict()
11106 msg = dict(type='DiskManager', request='SetMachineBlockDevices', version=2, params=_params)
11107 _params['machine-block-devices'] = machine_block_devices
11108 reply = await self.rpc(msg)
11109 return reply
11110
11111
11112 class EntityWatcherFacade(Type):
11113 name = 'EntityWatcher'
11114 version = 2
11115 schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
11116 'properties': {'changes': {'items': {'type': 'string'},
11117 'type': 'array'},
11118 'error': {'$ref': '#/definitions/Error'},
11119 'watcher-id': {'type': 'string'}},
11120 'required': ['watcher-id'],
11121 'type': 'object'},
11122 'Error': {'additionalProperties': False,
11123 'properties': {'code': {'type': 'string'},
11124 'info': {'$ref': '#/definitions/ErrorInfo'},
11125 'message': {'type': 'string'}},
11126 'required': ['message', 'code'],
11127 'type': 'object'},
11128 'ErrorInfo': {'additionalProperties': False,
11129 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11130 'macaroon-path': {'type': 'string'}},
11131 'type': 'object'},
11132 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
11133 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
11134 'type': 'object'},
11135 'Stop': {'type': 'object'}},
11136 'type': 'object'}
11137
11138
11139 @ReturnMapping(EntitiesWatchResult)
11140 async def Next(self):
11141 '''
11142
11143 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
11144 '''
11145 # map input types to rpc msg
11146 _params = dict()
11147 msg = dict(type='EntityWatcher', request='Next', version=2, params=_params)
11148
11149 reply = await self.rpc(msg)
11150 return reply
11151
11152
11153
11154 @ReturnMapping(None)
11155 async def Stop(self):
11156 '''
11157
11158 Returns -> None
11159 '''
11160 # map input types to rpc msg
11161 _params = dict()
11162 msg = dict(type='EntityWatcher', request='Stop', version=2, params=_params)
11163
11164 reply = await self.rpc(msg)
11165 return reply
11166
11167
11168 class FilesystemAttachmentsWatcherFacade(Type):
11169 name = 'FilesystemAttachmentsWatcher'
11170 version = 2
11171 schema = {'definitions': {'Error': {'additionalProperties': False,
11172 'properties': {'code': {'type': 'string'},
11173 'info': {'$ref': '#/definitions/ErrorInfo'},
11174 'message': {'type': 'string'}},
11175 'required': ['message', 'code'],
11176 'type': 'object'},
11177 'ErrorInfo': {'additionalProperties': False,
11178 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11179 'macaroon-path': {'type': 'string'}},
11180 'type': 'object'},
11181 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11182 'MachineStorageId': {'additionalProperties': False,
11183 'properties': {'attachment-tag': {'type': 'string'},
11184 'machine-tag': {'type': 'string'}},
11185 'required': ['machine-tag',
11186 'attachment-tag'],
11187 'type': 'object'},
11188 'MachineStorageIdsWatchResult': {'additionalProperties': False,
11189 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
11190 'type': 'array'},
11191 'error': {'$ref': '#/definitions/Error'},
11192 'watcher-id': {'type': 'string'}},
11193 'required': ['watcher-id',
11194 'changes'],
11195 'type': 'object'}},
11196 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
11197 'type': 'object'},
11198 'Stop': {'type': 'object'}},
11199 'type': 'object'}
11200
11201
11202 @ReturnMapping(MachineStorageIdsWatchResult)
11203 async def Next(self):
11204 '''
11205
11206 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
11207 '''
11208 # map input types to rpc msg
11209 _params = dict()
11210 msg = dict(type='FilesystemAttachmentsWatcher', request='Next', version=2, params=_params)
11211
11212 reply = await self.rpc(msg)
11213 return reply
11214
11215
11216
11217 @ReturnMapping(None)
11218 async def Stop(self):
11219 '''
11220
11221 Returns -> None
11222 '''
11223 # map input types to rpc msg
11224 _params = dict()
11225 msg = dict(type='FilesystemAttachmentsWatcher', request='Stop', version=2, params=_params)
11226
11227 reply = await self.rpc(msg)
11228 return reply
11229
11230
11231 class FirewallerFacade(Type):
11232 name = 'Firewaller'
11233 version = 3
11234 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
11235 'properties': {'error': {'$ref': '#/definitions/Error'},
11236 'result': {'type': 'boolean'}},
11237 'required': ['result'],
11238 'type': 'object'},
11239 'BoolResults': {'additionalProperties': False,
11240 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
11241 'type': 'array'}},
11242 'required': ['results'],
11243 'type': 'object'},
11244 'CloudCredential': {'additionalProperties': False,
11245 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
11246 'type': 'object'},
11247 'auth-type': {'type': 'string'},
11248 'redacted': {'items': {'type': 'string'},
11249 'type': 'array'}},
11250 'required': ['auth-type'],
11251 'type': 'object'},
11252 'CloudSpec': {'additionalProperties': False,
11253 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
11254 'endpoint': {'type': 'string'},
11255 'identity-endpoint': {'type': 'string'},
11256 'name': {'type': 'string'},
11257 'region': {'type': 'string'},
11258 'storage-endpoint': {'type': 'string'},
11259 'type': {'type': 'string'}},
11260 'required': ['type', 'name'],
11261 'type': 'object'},
11262 'CloudSpecResult': {'additionalProperties': False,
11263 'properties': {'error': {'$ref': '#/definitions/Error'},
11264 'result': {'$ref': '#/definitions/CloudSpec'}},
11265 'type': 'object'},
11266 'CloudSpecResults': {'additionalProperties': False,
11267 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
11268 'type': 'array'}},
11269 'type': 'object'},
11270 'Entities': {'additionalProperties': False,
11271 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11272 'type': 'array'}},
11273 'required': ['entities'],
11274 'type': 'object'},
11275 'Entity': {'additionalProperties': False,
11276 'properties': {'tag': {'type': 'string'}},
11277 'required': ['tag'],
11278 'type': 'object'},
11279 'Error': {'additionalProperties': False,
11280 'properties': {'code': {'type': 'string'},
11281 'info': {'$ref': '#/definitions/ErrorInfo'},
11282 'message': {'type': 'string'}},
11283 'required': ['message', 'code'],
11284 'type': 'object'},
11285 'ErrorInfo': {'additionalProperties': False,
11286 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11287 'macaroon-path': {'type': 'string'}},
11288 'type': 'object'},
11289 'LifeResult': {'additionalProperties': False,
11290 'properties': {'error': {'$ref': '#/definitions/Error'},
11291 'life': {'type': 'string'}},
11292 'required': ['life'],
11293 'type': 'object'},
11294 'LifeResults': {'additionalProperties': False,
11295 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
11296 'type': 'array'}},
11297 'required': ['results'],
11298 'type': 'object'},
11299 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11300 'MachinePortRange': {'additionalProperties': False,
11301 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
11302 'relation-tag': {'type': 'string'},
11303 'unit-tag': {'type': 'string'}},
11304 'required': ['unit-tag',
11305 'relation-tag',
11306 'port-range'],
11307 'type': 'object'},
11308 'MachinePorts': {'additionalProperties': False,
11309 'properties': {'machine-tag': {'type': 'string'},
11310 'subnet-tag': {'type': 'string'}},
11311 'required': ['machine-tag', 'subnet-tag'],
11312 'type': 'object'},
11313 'MachinePortsParams': {'additionalProperties': False,
11314 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
11315 'type': 'array'}},
11316 'required': ['params'],
11317 'type': 'object'},
11318 'MachinePortsResult': {'additionalProperties': False,
11319 'properties': {'error': {'$ref': '#/definitions/Error'},
11320 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
11321 'type': 'array'}},
11322 'required': ['ports'],
11323 'type': 'object'},
11324 'MachinePortsResults': {'additionalProperties': False,
11325 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
11326 'type': 'array'}},
11327 'required': ['results'],
11328 'type': 'object'},
11329 'ModelConfigResult': {'additionalProperties': False,
11330 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
11331 'type': 'object'}},
11332 'type': 'object'}},
11333 'required': ['config'],
11334 'type': 'object'},
11335 'ModelTag': {'additionalProperties': False, 'type': 'object'},
11336 'NotifyWatchResult': {'additionalProperties': False,
11337 'properties': {'NotifyWatcherId': {'type': 'string'},
11338 'error': {'$ref': '#/definitions/Error'}},
11339 'required': ['NotifyWatcherId'],
11340 'type': 'object'},
11341 'NotifyWatchResults': {'additionalProperties': False,
11342 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11343 'type': 'array'}},
11344 'required': ['results'],
11345 'type': 'object'},
11346 'PortRange': {'additionalProperties': False,
11347 'properties': {'from-port': {'type': 'integer'},
11348 'protocol': {'type': 'string'},
11349 'to-port': {'type': 'integer'}},
11350 'required': ['from-port', 'to-port', 'protocol'],
11351 'type': 'object'},
11352 'StringResult': {'additionalProperties': False,
11353 'properties': {'error': {'$ref': '#/definitions/Error'},
11354 'result': {'type': 'string'}},
11355 'required': ['result'],
11356 'type': 'object'},
11357 'StringResults': {'additionalProperties': False,
11358 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
11359 'type': 'array'}},
11360 'required': ['results'],
11361 'type': 'object'},
11362 'StringsResult': {'additionalProperties': False,
11363 'properties': {'error': {'$ref': '#/definitions/Error'},
11364 'result': {'items': {'type': 'string'},
11365 'type': 'array'}},
11366 'type': 'object'},
11367 'StringsResults': {'additionalProperties': False,
11368 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
11369 'type': 'array'}},
11370 'required': ['results'],
11371 'type': 'object'},
11372 'StringsWatchResult': {'additionalProperties': False,
11373 'properties': {'changes': {'items': {'type': 'string'},
11374 'type': 'array'},
11375 'error': {'$ref': '#/definitions/Error'},
11376 'watcher-id': {'type': 'string'}},
11377 'required': ['watcher-id'],
11378 'type': 'object'},
11379 'StringsWatchResults': {'additionalProperties': False,
11380 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
11381 'type': 'array'}},
11382 'required': ['results'],
11383 'type': 'object'}},
11384 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11385 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
11386 'type': 'object'},
11387 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11388 'Result': {'$ref': '#/definitions/StringResults'}},
11389 'type': 'object'},
11390 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
11391 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
11392 'type': 'object'},
11393 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11394 'Result': {'$ref': '#/definitions/BoolResults'}},
11395 'type': 'object'},
11396 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11397 'Result': {'$ref': '#/definitions/StringsResults'}},
11398 'type': 'object'},
11399 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
11400 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
11401 'type': 'object'},
11402 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11403 'Result': {'$ref': '#/definitions/StringResults'}},
11404 'type': 'object'},
11405 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11406 'Result': {'$ref': '#/definitions/LifeResults'}},
11407 'type': 'object'},
11408 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11409 'type': 'object'},
11410 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11411 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11412 'type': 'object'},
11413 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11414 'type': 'object'},
11415 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11416 'type': 'object'},
11417 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11418 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11419 'type': 'object'},
11420 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11421 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11422 'type': 'object'}},
11423 'type': 'object'}
11424
11425
11426 @ReturnMapping(CloudSpecResults)
11427 async def CloudSpec(self, entities):
11428 '''
11429 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11430 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
11431 '''
11432 # map input types to rpc msg
11433 _params = dict()
11434 msg = dict(type='Firewaller', request='CloudSpec', version=3, params=_params)
11435 _params['entities'] = entities
11436 reply = await self.rpc(msg)
11437 return reply
11438
11439
11440
11441 @ReturnMapping(StringResults)
11442 async def GetAssignedMachine(self, entities):
11443 '''
11444 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11445 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
11446 '''
11447 # map input types to rpc msg
11448 _params = dict()
11449 msg = dict(type='Firewaller', request='GetAssignedMachine', version=3, params=_params)
11450 _params['entities'] = entities
11451 reply = await self.rpc(msg)
11452 return reply
11453
11454
11455
11456 @ReturnMapping(CloudSpecResult)
11457 async def GetCloudSpec(self):
11458 '''
11459
11460 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
11461 '''
11462 # map input types to rpc msg
11463 _params = dict()
11464 msg = dict(type='Firewaller', request='GetCloudSpec', version=3, params=_params)
11465
11466 reply = await self.rpc(msg)
11467 return reply
11468
11469
11470
11471 @ReturnMapping(BoolResults)
11472 async def GetExposed(self, entities):
11473 '''
11474 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11475 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
11476 '''
11477 # map input types to rpc msg
11478 _params = dict()
11479 msg = dict(type='Firewaller', request='GetExposed', version=3, params=_params)
11480 _params['entities'] = entities
11481 reply = await self.rpc(msg)
11482 return reply
11483
11484
11485
11486 @ReturnMapping(StringsResults)
11487 async def GetMachineActiveSubnets(self, entities):
11488 '''
11489 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11490 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
11491 '''
11492 # map input types to rpc msg
11493 _params = dict()
11494 msg = dict(type='Firewaller', request='GetMachineActiveSubnets', version=3, params=_params)
11495 _params['entities'] = entities
11496 reply = await self.rpc(msg)
11497 return reply
11498
11499
11500
11501 @ReturnMapping(MachinePortsResults)
11502 async def GetMachinePorts(self, params):
11503 '''
11504 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
11505 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
11506 '''
11507 # map input types to rpc msg
11508 _params = dict()
11509 msg = dict(type='Firewaller', request='GetMachinePorts', version=3, params=_params)
11510 _params['params'] = params
11511 reply = await self.rpc(msg)
11512 return reply
11513
11514
11515
11516 @ReturnMapping(StringResults)
11517 async def InstanceId(self, entities):
11518 '''
11519 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11520 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
11521 '''
11522 # map input types to rpc msg
11523 _params = dict()
11524 msg = dict(type='Firewaller', request='InstanceId', version=3, params=_params)
11525 _params['entities'] = entities
11526 reply = await self.rpc(msg)
11527 return reply
11528
11529
11530
11531 @ReturnMapping(LifeResults)
11532 async def Life(self, entities):
11533 '''
11534 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11535 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
11536 '''
11537 # map input types to rpc msg
11538 _params = dict()
11539 msg = dict(type='Firewaller', request='Life', version=3, params=_params)
11540 _params['entities'] = entities
11541 reply = await self.rpc(msg)
11542 return reply
11543
11544
11545
11546 @ReturnMapping(ModelConfigResult)
11547 async def ModelConfig(self):
11548 '''
11549
11550 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
11551 '''
11552 # map input types to rpc msg
11553 _params = dict()
11554 msg = dict(type='Firewaller', request='ModelConfig', version=3, params=_params)
11555
11556 reply = await self.rpc(msg)
11557 return reply
11558
11559
11560
11561 @ReturnMapping(NotifyWatchResults)
11562 async def Watch(self, entities):
11563 '''
11564 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11565 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
11566 '''
11567 # map input types to rpc msg
11568 _params = dict()
11569 msg = dict(type='Firewaller', request='Watch', version=3, params=_params)
11570 _params['entities'] = entities
11571 reply = await self.rpc(msg)
11572 return reply
11573
11574
11575
11576 @ReturnMapping(NotifyWatchResult)
11577 async def WatchForModelConfigChanges(self):
11578 '''
11579
11580 Returns -> typing.Union[str, _ForwardRef('Error')]
11581 '''
11582 # map input types to rpc msg
11583 _params = dict()
11584 msg = dict(type='Firewaller', request='WatchForModelConfigChanges', version=3, params=_params)
11585
11586 reply = await self.rpc(msg)
11587 return reply
11588
11589
11590
11591 @ReturnMapping(StringsWatchResult)
11592 async def WatchModelMachines(self):
11593 '''
11594
11595 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
11596 '''
11597 # map input types to rpc msg
11598 _params = dict()
11599 msg = dict(type='Firewaller', request='WatchModelMachines', version=3, params=_params)
11600
11601 reply = await self.rpc(msg)
11602 return reply
11603
11604
11605
11606 @ReturnMapping(StringsWatchResults)
11607 async def WatchOpenedPorts(self, entities):
11608 '''
11609 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11610 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
11611 '''
11612 # map input types to rpc msg
11613 _params = dict()
11614 msg = dict(type='Firewaller', request='WatchOpenedPorts', version=3, params=_params)
11615 _params['entities'] = entities
11616 reply = await self.rpc(msg)
11617 return reply
11618
11619
11620
11621 @ReturnMapping(StringsWatchResults)
11622 async def WatchUnits(self, entities):
11623 '''
11624 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11625 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
11626 '''
11627 # map input types to rpc msg
11628 _params = dict()
11629 msg = dict(type='Firewaller', request='WatchUnits', version=3, params=_params)
11630 _params['entities'] = entities
11631 reply = await self.rpc(msg)
11632 return reply
11633
11634
11635 class HighAvailabilityFacade(Type):
11636 name = 'HighAvailability'
11637 version = 2
11638 schema = {'definitions': {'Address': {'additionalProperties': False,
11639 'properties': {'Scope': {'type': 'string'},
11640 'SpaceName': {'type': 'string'},
11641 'SpaceProviderId': {'type': 'string'},
11642 'Type': {'type': 'string'},
11643 'Value': {'type': 'string'}},
11644 'required': ['Value',
11645 'Type',
11646 'Scope',
11647 'SpaceName',
11648 'SpaceProviderId'],
11649 'type': 'object'},
11650 'ControllersChangeResult': {'additionalProperties': False,
11651 'properties': {'error': {'$ref': '#/definitions/Error'},
11652 'result': {'$ref': '#/definitions/ControllersChanges'}},
11653 'required': ['result'],
11654 'type': 'object'},
11655 'ControllersChangeResults': {'additionalProperties': False,
11656 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
11657 'type': 'array'}},
11658 'required': ['results'],
11659 'type': 'object'},
11660 'ControllersChanges': {'additionalProperties': False,
11661 'properties': {'added': {'items': {'type': 'string'},
11662 'type': 'array'},
11663 'converted': {'items': {'type': 'string'},
11664 'type': 'array'},
11665 'demoted': {'items': {'type': 'string'},
11666 'type': 'array'},
11667 'maintained': {'items': {'type': 'string'},
11668 'type': 'array'},
11669 'promoted': {'items': {'type': 'string'},
11670 'type': 'array'},
11671 'removed': {'items': {'type': 'string'},
11672 'type': 'array'}},
11673 'type': 'object'},
11674 'ControllersSpec': {'additionalProperties': False,
11675 'properties': {'constraints': {'$ref': '#/definitions/Value'},
11676 'num-controllers': {'type': 'integer'},
11677 'placement': {'items': {'type': 'string'},
11678 'type': 'array'},
11679 'series': {'type': 'string'}},
11680 'required': ['num-controllers'],
11681 'type': 'object'},
11682 'ControllersSpecs': {'additionalProperties': False,
11683 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
11684 'type': 'array'}},
11685 'required': ['specs'],
11686 'type': 'object'},
11687 'Error': {'additionalProperties': False,
11688 'properties': {'code': {'type': 'string'},
11689 'info': {'$ref': '#/definitions/ErrorInfo'},
11690 'message': {'type': 'string'}},
11691 'required': ['message', 'code'],
11692 'type': 'object'},
11693 'ErrorInfo': {'additionalProperties': False,
11694 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11695 'macaroon-path': {'type': 'string'}},
11696 'type': 'object'},
11697 'HAMember': {'additionalProperties': False,
11698 'properties': {'public-address': {'$ref': '#/definitions/Address'},
11699 'series': {'type': 'string'},
11700 'tag': {'type': 'string'}},
11701 'required': ['tag', 'public-address', 'series'],
11702 'type': 'object'},
11703 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11704 'Member': {'additionalProperties': False,
11705 'properties': {'Address': {'type': 'string'},
11706 'Arbiter': {'type': 'boolean'},
11707 'BuildIndexes': {'type': 'boolean'},
11708 'Hidden': {'type': 'boolean'},
11709 'Id': {'type': 'integer'},
11710 'Priority': {'type': 'number'},
11711 'SlaveDelay': {'type': 'integer'},
11712 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
11713 'type': 'object'},
11714 'Votes': {'type': 'integer'}},
11715 'required': ['Id',
11716 'Address',
11717 'Arbiter',
11718 'BuildIndexes',
11719 'Hidden',
11720 'Priority',
11721 'Tags',
11722 'SlaveDelay',
11723 'Votes'],
11724 'type': 'object'},
11725 'MongoUpgradeResults': {'additionalProperties': False,
11726 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
11727 'type': 'array'},
11728 'master': {'$ref': '#/definitions/HAMember'},
11729 'rs-members': {'items': {'$ref': '#/definitions/Member'},
11730 'type': 'array'}},
11731 'required': ['rs-members',
11732 'master',
11733 'ha-members'],
11734 'type': 'object'},
11735 'MongoVersion': {'additionalProperties': False,
11736 'properties': {'engine': {'type': 'string'},
11737 'major': {'type': 'integer'},
11738 'minor': {'type': 'integer'},
11739 'patch': {'type': 'string'}},
11740 'required': ['major',
11741 'minor',
11742 'patch',
11743 'engine'],
11744 'type': 'object'},
11745 'ResumeReplicationParams': {'additionalProperties': False,
11746 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
11747 'type': 'array'}},
11748 'required': ['members'],
11749 'type': 'object'},
11750 'UpgradeMongoParams': {'additionalProperties': False,
11751 'properties': {'target': {'$ref': '#/definitions/MongoVersion'}},
11752 'required': ['target'],
11753 'type': 'object'},
11754 'Value': {'additionalProperties': False,
11755 'properties': {'arch': {'type': 'string'},
11756 'container': {'type': 'string'},
11757 'cores': {'type': 'integer'},
11758 'cpu-power': {'type': 'integer'},
11759 'instance-type': {'type': 'string'},
11760 'mem': {'type': 'integer'},
11761 'root-disk': {'type': 'integer'},
11762 'spaces': {'items': {'type': 'string'},
11763 'type': 'array'},
11764 'tags': {'items': {'type': 'string'},
11765 'type': 'array'},
11766 'virt-type': {'type': 'string'}},
11767 'type': 'object'}},
11768 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
11769 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
11770 'type': 'object'},
11771 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
11772 'type': 'object'},
11773 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
11774 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
11775 'type': 'object'}},
11776 'type': 'object'}
11777
11778
11779 @ReturnMapping(ControllersChangeResults)
11780 async def EnableHA(self, specs):
11781 '''
11782 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
11783 Returns -> typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
11784 '''
11785 # map input types to rpc msg
11786 _params = dict()
11787 msg = dict(type='HighAvailability', request='EnableHA', version=2, params=_params)
11788 _params['specs'] = specs
11789 reply = await self.rpc(msg)
11790 return reply
11791
11792
11793
11794 @ReturnMapping(None)
11795 async def ResumeHAReplicationAfterUpgrade(self, members):
11796 '''
11797 members : typing.Sequence<+T_co>[~Member]<~Member>
11798 Returns -> None
11799 '''
11800 # map input types to rpc msg
11801 _params = dict()
11802 msg = dict(type='HighAvailability', request='ResumeHAReplicationAfterUpgrade', version=2, params=_params)
11803 _params['members'] = members
11804 reply = await self.rpc(msg)
11805 return reply
11806
11807
11808
11809 @ReturnMapping(MongoUpgradeResults)
11810 async def StopHAReplicationForUpgrade(self, target):
11811 '''
11812 target : MongoVersion
11813 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence<+T_co>[~Member]<~Member>]
11814 '''
11815 # map input types to rpc msg
11816 _params = dict()
11817 msg = dict(type='HighAvailability', request='StopHAReplicationForUpgrade', version=2, params=_params)
11818 _params['target'] = target
11819 reply = await self.rpc(msg)
11820 return reply
11821
11822
11823 class HostKeyReporterFacade(Type):
11824 name = 'HostKeyReporter'
11825 version = 1
11826 schema = {'definitions': {'Error': {'additionalProperties': False,
11827 'properties': {'code': {'type': 'string'},
11828 'info': {'$ref': '#/definitions/ErrorInfo'},
11829 'message': {'type': 'string'}},
11830 'required': ['message', 'code'],
11831 'type': 'object'},
11832 'ErrorInfo': {'additionalProperties': False,
11833 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11834 'macaroon-path': {'type': 'string'}},
11835 'type': 'object'},
11836 'ErrorResult': {'additionalProperties': False,
11837 'properties': {'error': {'$ref': '#/definitions/Error'}},
11838 'type': 'object'},
11839 'ErrorResults': {'additionalProperties': False,
11840 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11841 'type': 'array'}},
11842 'required': ['results'],
11843 'type': 'object'},
11844 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11845 'SSHHostKeySet': {'additionalProperties': False,
11846 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
11847 'type': 'array'}},
11848 'required': ['entity-keys'],
11849 'type': 'object'},
11850 'SSHHostKeys': {'additionalProperties': False,
11851 'properties': {'public-keys': {'items': {'type': 'string'},
11852 'type': 'array'},
11853 'tag': {'type': 'string'}},
11854 'required': ['tag', 'public-keys'],
11855 'type': 'object'}},
11856 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
11857 'Result': {'$ref': '#/definitions/ErrorResults'}},
11858 'type': 'object'}},
11859 'type': 'object'}
11860
11861
11862 @ReturnMapping(ErrorResults)
11863 async def ReportKeys(self, entity_keys):
11864 '''
11865 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
11866 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11867 '''
11868 # map input types to rpc msg
11869 _params = dict()
11870 msg = dict(type='HostKeyReporter', request='ReportKeys', version=1, params=_params)
11871 _params['entity-keys'] = entity_keys
11872 reply = await self.rpc(msg)
11873 return reply
11874
11875
11876 class ImageManagerFacade(Type):
11877 name = 'ImageManager'
11878 version = 2
11879 schema = {'definitions': {'Error': {'additionalProperties': False,
11880 'properties': {'code': {'type': 'string'},
11881 'info': {'$ref': '#/definitions/ErrorInfo'},
11882 'message': {'type': 'string'}},
11883 'required': ['message', 'code'],
11884 'type': 'object'},
11885 'ErrorInfo': {'additionalProperties': False,
11886 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11887 'macaroon-path': {'type': 'string'}},
11888 'type': 'object'},
11889 'ErrorResult': {'additionalProperties': False,
11890 'properties': {'error': {'$ref': '#/definitions/Error'}},
11891 'type': 'object'},
11892 'ErrorResults': {'additionalProperties': False,
11893 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11894 'type': 'array'}},
11895 'required': ['results'],
11896 'type': 'object'},
11897 'ImageFilterParams': {'additionalProperties': False,
11898 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
11899 'type': 'array'}},
11900 'required': ['images'],
11901 'type': 'object'},
11902 'ImageMetadata': {'additionalProperties': False,
11903 'properties': {'arch': {'type': 'string'},
11904 'created': {'format': 'date-time',
11905 'type': 'string'},
11906 'kind': {'type': 'string'},
11907 'series': {'type': 'string'},
11908 'url': {'type': 'string'}},
11909 'required': ['kind',
11910 'arch',
11911 'series',
11912 'url',
11913 'created'],
11914 'type': 'object'},
11915 'ImageSpec': {'additionalProperties': False,
11916 'properties': {'arch': {'type': 'string'},
11917 'kind': {'type': 'string'},
11918 'series': {'type': 'string'}},
11919 'required': ['kind', 'arch', 'series'],
11920 'type': 'object'},
11921 'ListImageResult': {'additionalProperties': False,
11922 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
11923 'type': 'array'}},
11924 'required': ['result'],
11925 'type': 'object'},
11926 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
11927 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
11928 'Result': {'$ref': '#/definitions/ErrorResults'}},
11929 'type': 'object'},
11930 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
11931 'Result': {'$ref': '#/definitions/ListImageResult'}},
11932 'type': 'object'}},
11933 'type': 'object'}
11934
11935
11936 @ReturnMapping(ErrorResults)
11937 async def DeleteImages(self, images):
11938 '''
11939 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
11940 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11941 '''
11942 # map input types to rpc msg
11943 _params = dict()
11944 msg = dict(type='ImageManager', request='DeleteImages', version=2, params=_params)
11945 _params['images'] = images
11946 reply = await self.rpc(msg)
11947 return reply
11948
11949
11950
11951 @ReturnMapping(ListImageResult)
11952 async def ListImages(self, images):
11953 '''
11954 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
11955 Returns -> typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
11956 '''
11957 # map input types to rpc msg
11958 _params = dict()
11959 msg = dict(type='ImageManager', request='ListImages', version=2, params=_params)
11960 _params['images'] = images
11961 reply = await self.rpc(msg)
11962 return reply
11963
11964
11965 class ImageMetadataFacade(Type):
11966 name = 'ImageMetadata'
11967 version = 2
11968 schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
11969 'properties': {'arch': {'type': 'string'},
11970 'image-id': {'type': 'string'},
11971 'priority': {'type': 'integer'},
11972 'region': {'type': 'string'},
11973 'root-storage-size': {'type': 'integer'},
11974 'root-storage-type': {'type': 'string'},
11975 'series': {'type': 'string'},
11976 'source': {'type': 'string'},
11977 'stream': {'type': 'string'},
11978 'version': {'type': 'string'},
11979 'virt-type': {'type': 'string'}},
11980 'required': ['image-id',
11981 'region',
11982 'version',
11983 'series',
11984 'arch',
11985 'source',
11986 'priority'],
11987 'type': 'object'},
11988 'CloudImageMetadataList': {'additionalProperties': False,
11989 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
11990 'type': 'array'}},
11991 'type': 'object'},
11992 'Error': {'additionalProperties': False,
11993 'properties': {'code': {'type': 'string'},
11994 'info': {'$ref': '#/definitions/ErrorInfo'},
11995 'message': {'type': 'string'}},
11996 'required': ['message', 'code'],
11997 'type': 'object'},
11998 'ErrorInfo': {'additionalProperties': False,
11999 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12000 'macaroon-path': {'type': 'string'}},
12001 'type': 'object'},
12002 'ErrorResult': {'additionalProperties': False,
12003 'properties': {'error': {'$ref': '#/definitions/Error'}},
12004 'type': 'object'},
12005 'ErrorResults': {'additionalProperties': False,
12006 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12007 'type': 'array'}},
12008 'required': ['results'],
12009 'type': 'object'},
12010 'ImageMetadataFilter': {'additionalProperties': False,
12011 'properties': {'arches': {'items': {'type': 'string'},
12012 'type': 'array'},
12013 'region': {'type': 'string'},
12014 'root-storage-type': {'type': 'string'},
12015 'series': {'items': {'type': 'string'},
12016 'type': 'array'},
12017 'stream': {'type': 'string'},
12018 'virt-type': {'type': 'string'}},
12019 'type': 'object'},
12020 'ListCloudImageMetadataResult': {'additionalProperties': False,
12021 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
12022 'type': 'array'}},
12023 'required': ['result'],
12024 'type': 'object'},
12025 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12026 'MetadataImageIds': {'additionalProperties': False,
12027 'properties': {'image-ids': {'items': {'type': 'string'},
12028 'type': 'array'}},
12029 'required': ['image-ids'],
12030 'type': 'object'},
12031 'MetadataSaveParams': {'additionalProperties': False,
12032 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
12033 'type': 'array'}},
12034 'type': 'object'}},
12035 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
12036 'Result': {'$ref': '#/definitions/ErrorResults'}},
12037 'type': 'object'},
12038 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
12039 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
12040 'type': 'object'},
12041 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
12042 'Result': {'$ref': '#/definitions/ErrorResults'}},
12043 'type': 'object'},
12044 'UpdateFromPublishedImages': {'type': 'object'}},
12045 'type': 'object'}
12046
12047
12048 @ReturnMapping(ErrorResults)
12049 async def Delete(self, image_ids):
12050 '''
12051 image_ids : typing.Sequence<+T_co>[str]
12052 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12053 '''
12054 # map input types to rpc msg
12055 _params = dict()
12056 msg = dict(type='ImageMetadata', request='Delete', version=2, params=_params)
12057 _params['image-ids'] = image_ids
12058 reply = await self.rpc(msg)
12059 return reply
12060
12061
12062
12063 @ReturnMapping(ListCloudImageMetadataResult)
12064 async def List(self, arches, region, root_storage_type, series, stream, virt_type):
12065 '''
12066 arches : typing.Sequence<+T_co>[str]
12067 region : str
12068 root_storage_type : str
12069 series : typing.Sequence<+T_co>[str]
12070 stream : str
12071 virt_type : str
12072 Returns -> typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
12073 '''
12074 # map input types to rpc msg
12075 _params = dict()
12076 msg = dict(type='ImageMetadata', request='List', version=2, params=_params)
12077 _params['arches'] = arches
12078 _params['region'] = region
12079 _params['root-storage-type'] = root_storage_type
12080 _params['series'] = series
12081 _params['stream'] = stream
12082 _params['virt-type'] = virt_type
12083 reply = await self.rpc(msg)
12084 return reply
12085
12086
12087
12088 @ReturnMapping(ErrorResults)
12089 async def Save(self, metadata):
12090 '''
12091 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
12092 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12093 '''
12094 # map input types to rpc msg
12095 _params = dict()
12096 msg = dict(type='ImageMetadata', request='Save', version=2, params=_params)
12097 _params['metadata'] = metadata
12098 reply = await self.rpc(msg)
12099 return reply
12100
12101
12102
12103 @ReturnMapping(None)
12104 async def UpdateFromPublishedImages(self):
12105 '''
12106
12107 Returns -> None
12108 '''
12109 # map input types to rpc msg
12110 _params = dict()
12111 msg = dict(type='ImageMetadata', request='UpdateFromPublishedImages', version=2, params=_params)
12112
12113 reply = await self.rpc(msg)
12114 return reply
12115
12116
12117 class InstancePollerFacade(Type):
12118 name = 'InstancePoller'
12119 version = 3
12120 schema = {'definitions': {'Address': {'additionalProperties': False,
12121 'properties': {'scope': {'type': 'string'},
12122 'space-name': {'type': 'string'},
12123 'type': {'type': 'string'},
12124 'value': {'type': 'string'}},
12125 'required': ['value', 'type', 'scope'],
12126 'type': 'object'},
12127 'BoolResult': {'additionalProperties': False,
12128 'properties': {'error': {'$ref': '#/definitions/Error'},
12129 'result': {'type': 'boolean'}},
12130 'required': ['result'],
12131 'type': 'object'},
12132 'BoolResults': {'additionalProperties': False,
12133 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
12134 'type': 'array'}},
12135 'required': ['results'],
12136 'type': 'object'},
12137 'Entities': {'additionalProperties': False,
12138 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12139 'type': 'array'}},
12140 'required': ['entities'],
12141 'type': 'object'},
12142 'Entity': {'additionalProperties': False,
12143 'properties': {'tag': {'type': 'string'}},
12144 'required': ['tag'],
12145 'type': 'object'},
12146 'EntityStatusArgs': {'additionalProperties': False,
12147 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
12148 'type': 'object'}},
12149 'type': 'object'},
12150 'info': {'type': 'string'},
12151 'status': {'type': 'string'},
12152 'tag': {'type': 'string'}},
12153 'required': ['tag',
12154 'status',
12155 'info',
12156 'data'],
12157 'type': 'object'},
12158 'Error': {'additionalProperties': False,
12159 'properties': {'code': {'type': 'string'},
12160 'info': {'$ref': '#/definitions/ErrorInfo'},
12161 'message': {'type': 'string'}},
12162 'required': ['message', 'code'],
12163 'type': 'object'},
12164 'ErrorInfo': {'additionalProperties': False,
12165 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12166 'macaroon-path': {'type': 'string'}},
12167 'type': 'object'},
12168 'ErrorResult': {'additionalProperties': False,
12169 'properties': {'error': {'$ref': '#/definitions/Error'}},
12170 'type': 'object'},
12171 'ErrorResults': {'additionalProperties': False,
12172 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12173 'type': 'array'}},
12174 'required': ['results'],
12175 'type': 'object'},
12176 'LifeResult': {'additionalProperties': False,
12177 'properties': {'error': {'$ref': '#/definitions/Error'},
12178 'life': {'type': 'string'}},
12179 'required': ['life'],
12180 'type': 'object'},
12181 'LifeResults': {'additionalProperties': False,
12182 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
12183 'type': 'array'}},
12184 'required': ['results'],
12185 'type': 'object'},
12186 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12187 'MachineAddresses': {'additionalProperties': False,
12188 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12189 'type': 'array'},
12190 'tag': {'type': 'string'}},
12191 'required': ['tag', 'addresses'],
12192 'type': 'object'},
12193 'MachineAddressesResult': {'additionalProperties': False,
12194 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12195 'type': 'array'},
12196 'error': {'$ref': '#/definitions/Error'}},
12197 'required': ['addresses'],
12198 'type': 'object'},
12199 'MachineAddressesResults': {'additionalProperties': False,
12200 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
12201 'type': 'array'}},
12202 'required': ['results'],
12203 'type': 'object'},
12204 'ModelConfigResult': {'additionalProperties': False,
12205 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
12206 'type': 'object'}},
12207 'type': 'object'}},
12208 'required': ['config'],
12209 'type': 'object'},
12210 'NotifyWatchResult': {'additionalProperties': False,
12211 'properties': {'NotifyWatcherId': {'type': 'string'},
12212 'error': {'$ref': '#/definitions/Error'}},
12213 'required': ['NotifyWatcherId'],
12214 'type': 'object'},
12215 'SetMachinesAddresses': {'additionalProperties': False,
12216 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
12217 'type': 'array'}},
12218 'required': ['machine-addresses'],
12219 'type': 'object'},
12220 'SetStatus': {'additionalProperties': False,
12221 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
12222 'type': 'array'}},
12223 'required': ['entities'],
12224 'type': 'object'},
12225 'StatusResult': {'additionalProperties': False,
12226 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
12227 'type': 'object'}},
12228 'type': 'object'},
12229 'error': {'$ref': '#/definitions/Error'},
12230 'id': {'type': 'string'},
12231 'info': {'type': 'string'},
12232 'life': {'type': 'string'},
12233 'since': {'format': 'date-time',
12234 'type': 'string'},
12235 'status': {'type': 'string'}},
12236 'required': ['id',
12237 'life',
12238 'status',
12239 'info',
12240 'data',
12241 'since'],
12242 'type': 'object'},
12243 'StatusResults': {'additionalProperties': False,
12244 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
12245 'type': 'array'}},
12246 'required': ['results'],
12247 'type': 'object'},
12248 'StringResult': {'additionalProperties': False,
12249 'properties': {'error': {'$ref': '#/definitions/Error'},
12250 'result': {'type': 'string'}},
12251 'required': ['result'],
12252 'type': 'object'},
12253 'StringResults': {'additionalProperties': False,
12254 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
12255 'type': 'array'}},
12256 'required': ['results'],
12257 'type': 'object'},
12258 'StringsWatchResult': {'additionalProperties': False,
12259 'properties': {'changes': {'items': {'type': 'string'},
12260 'type': 'array'},
12261 'error': {'$ref': '#/definitions/Error'},
12262 'watcher-id': {'type': 'string'}},
12263 'required': ['watcher-id'],
12264 'type': 'object'}},
12265 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12266 'Result': {'$ref': '#/definitions/BoolResults'}},
12267 'type': 'object'},
12268 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12269 'Result': {'$ref': '#/definitions/StringResults'}},
12270 'type': 'object'},
12271 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12272 'Result': {'$ref': '#/definitions/StatusResults'}},
12273 'type': 'object'},
12274 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12275 'Result': {'$ref': '#/definitions/LifeResults'}},
12276 'type': 'object'},
12277 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
12278 'type': 'object'},
12279 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12280 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
12281 'type': 'object'},
12282 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
12283 'Result': {'$ref': '#/definitions/ErrorResults'}},
12284 'type': 'object'},
12285 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
12286 'Result': {'$ref': '#/definitions/ErrorResults'}},
12287 'type': 'object'},
12288 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12289 'Result': {'$ref': '#/definitions/StatusResults'}},
12290 'type': 'object'},
12291 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12292 'type': 'object'},
12293 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
12294 'type': 'object'}},
12295 'type': 'object'}
12296
12297
12298 @ReturnMapping(BoolResults)
12299 async def AreManuallyProvisioned(self, entities):
12300 '''
12301 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12302 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
12303 '''
12304 # map input types to rpc msg
12305 _params = dict()
12306 msg = dict(type='InstancePoller', request='AreManuallyProvisioned', version=3, params=_params)
12307 _params['entities'] = entities
12308 reply = await self.rpc(msg)
12309 return reply
12310
12311
12312
12313 @ReturnMapping(StringResults)
12314 async def InstanceId(self, entities):
12315 '''
12316 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12317 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
12318 '''
12319 # map input types to rpc msg
12320 _params = dict()
12321 msg = dict(type='InstancePoller', request='InstanceId', version=3, params=_params)
12322 _params['entities'] = entities
12323 reply = await self.rpc(msg)
12324 return reply
12325
12326
12327
12328 @ReturnMapping(StatusResults)
12329 async def InstanceStatus(self, entities):
12330 '''
12331 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12332 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
12333 '''
12334 # map input types to rpc msg
12335 _params = dict()
12336 msg = dict(type='InstancePoller', request='InstanceStatus', version=3, params=_params)
12337 _params['entities'] = entities
12338 reply = await self.rpc(msg)
12339 return reply
12340
12341
12342
12343 @ReturnMapping(LifeResults)
12344 async def Life(self, entities):
12345 '''
12346 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12347 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
12348 '''
12349 # map input types to rpc msg
12350 _params = dict()
12351 msg = dict(type='InstancePoller', request='Life', version=3, params=_params)
12352 _params['entities'] = entities
12353 reply = await self.rpc(msg)
12354 return reply
12355
12356
12357
12358 @ReturnMapping(ModelConfigResult)
12359 async def ModelConfig(self):
12360 '''
12361
12362 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
12363 '''
12364 # map input types to rpc msg
12365 _params = dict()
12366 msg = dict(type='InstancePoller', request='ModelConfig', version=3, params=_params)
12367
12368 reply = await self.rpc(msg)
12369 return reply
12370
12371
12372
12373 @ReturnMapping(MachineAddressesResults)
12374 async def ProviderAddresses(self, entities):
12375 '''
12376 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12377 Returns -> typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
12378 '''
12379 # map input types to rpc msg
12380 _params = dict()
12381 msg = dict(type='InstancePoller', request='ProviderAddresses', version=3, params=_params)
12382 _params['entities'] = entities
12383 reply = await self.rpc(msg)
12384 return reply
12385
12386
12387
12388 @ReturnMapping(ErrorResults)
12389 async def SetInstanceStatus(self, entities):
12390 '''
12391 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
12392 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12393 '''
12394 # map input types to rpc msg
12395 _params = dict()
12396 msg = dict(type='InstancePoller', request='SetInstanceStatus', version=3, params=_params)
12397 _params['entities'] = entities
12398 reply = await self.rpc(msg)
12399 return reply
12400
12401
12402
12403 @ReturnMapping(ErrorResults)
12404 async def SetProviderAddresses(self, machine_addresses):
12405 '''
12406 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
12407 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12408 '''
12409 # map input types to rpc msg
12410 _params = dict()
12411 msg = dict(type='InstancePoller', request='SetProviderAddresses', version=3, params=_params)
12412 _params['machine-addresses'] = machine_addresses
12413 reply = await self.rpc(msg)
12414 return reply
12415
12416
12417
12418 @ReturnMapping(StatusResults)
12419 async def Status(self, entities):
12420 '''
12421 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12422 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
12423 '''
12424 # map input types to rpc msg
12425 _params = dict()
12426 msg = dict(type='InstancePoller', request='Status', version=3, params=_params)
12427 _params['entities'] = entities
12428 reply = await self.rpc(msg)
12429 return reply
12430
12431
12432
12433 @ReturnMapping(NotifyWatchResult)
12434 async def WatchForModelConfigChanges(self):
12435 '''
12436
12437 Returns -> typing.Union[str, _ForwardRef('Error')]
12438 '''
12439 # map input types to rpc msg
12440 _params = dict()
12441 msg = dict(type='InstancePoller', request='WatchForModelConfigChanges', version=3, params=_params)
12442
12443 reply = await self.rpc(msg)
12444 return reply
12445
12446
12447
12448 @ReturnMapping(StringsWatchResult)
12449 async def WatchModelMachines(self):
12450 '''
12451
12452 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
12453 '''
12454 # map input types to rpc msg
12455 _params = dict()
12456 msg = dict(type='InstancePoller', request='WatchModelMachines', version=3, params=_params)
12457
12458 reply = await self.rpc(msg)
12459 return reply
12460
12461
12462 class KeyManagerFacade(Type):
12463 name = 'KeyManager'
12464 version = 1
12465 schema = {'definitions': {'Entities': {'additionalProperties': False,
12466 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12467 'type': 'array'}},
12468 'required': ['entities'],
12469 'type': 'object'},
12470 'Entity': {'additionalProperties': False,
12471 'properties': {'tag': {'type': 'string'}},
12472 'required': ['tag'],
12473 'type': 'object'},
12474 'Error': {'additionalProperties': False,
12475 'properties': {'code': {'type': 'string'},
12476 'info': {'$ref': '#/definitions/ErrorInfo'},
12477 'message': {'type': 'string'}},
12478 'required': ['message', 'code'],
12479 'type': 'object'},
12480 'ErrorInfo': {'additionalProperties': False,
12481 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12482 'macaroon-path': {'type': 'string'}},
12483 'type': 'object'},
12484 'ErrorResult': {'additionalProperties': False,
12485 'properties': {'error': {'$ref': '#/definitions/Error'}},
12486 'type': 'object'},
12487 'ErrorResults': {'additionalProperties': False,
12488 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12489 'type': 'array'}},
12490 'required': ['results'],
12491 'type': 'object'},
12492 'ListSSHKeys': {'additionalProperties': False,
12493 'properties': {'entities': {'$ref': '#/definitions/Entities'},
12494 'mode': {'type': 'boolean'}},
12495 'required': ['entities', 'mode'],
12496 'type': 'object'},
12497 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12498 'ModifyUserSSHKeys': {'additionalProperties': False,
12499 'properties': {'ssh-keys': {'items': {'type': 'string'},
12500 'type': 'array'},
12501 'user': {'type': 'string'}},
12502 'required': ['user', 'ssh-keys'],
12503 'type': 'object'},
12504 'StringsResult': {'additionalProperties': False,
12505 'properties': {'error': {'$ref': '#/definitions/Error'},
12506 'result': {'items': {'type': 'string'},
12507 'type': 'array'}},
12508 'type': 'object'},
12509 'StringsResults': {'additionalProperties': False,
12510 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
12511 'type': 'array'}},
12512 'required': ['results'],
12513 'type': 'object'}},
12514 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12515 'Result': {'$ref': '#/definitions/ErrorResults'}},
12516 'type': 'object'},
12517 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12518 'Result': {'$ref': '#/definitions/ErrorResults'}},
12519 'type': 'object'},
12520 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12521 'Result': {'$ref': '#/definitions/ErrorResults'}},
12522 'type': 'object'},
12523 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
12524 'Result': {'$ref': '#/definitions/StringsResults'}},
12525 'type': 'object'}},
12526 'type': 'object'}
12527
12528
12529 @ReturnMapping(ErrorResults)
12530 async def AddKeys(self, ssh_keys, user):
12531 '''
12532 ssh_keys : typing.Sequence<+T_co>[str]
12533 user : str
12534 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12535 '''
12536 # map input types to rpc msg
12537 _params = dict()
12538 msg = dict(type='KeyManager', request='AddKeys', version=1, params=_params)
12539 _params['ssh-keys'] = ssh_keys
12540 _params['user'] = user
12541 reply = await self.rpc(msg)
12542 return reply
12543
12544
12545
12546 @ReturnMapping(ErrorResults)
12547 async def DeleteKeys(self, ssh_keys, user):
12548 '''
12549 ssh_keys : typing.Sequence<+T_co>[str]
12550 user : str
12551 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12552 '''
12553 # map input types to rpc msg
12554 _params = dict()
12555 msg = dict(type='KeyManager', request='DeleteKeys', version=1, params=_params)
12556 _params['ssh-keys'] = ssh_keys
12557 _params['user'] = user
12558 reply = await self.rpc(msg)
12559 return reply
12560
12561
12562
12563 @ReturnMapping(ErrorResults)
12564 async def ImportKeys(self, ssh_keys, user):
12565 '''
12566 ssh_keys : typing.Sequence<+T_co>[str]
12567 user : str
12568 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12569 '''
12570 # map input types to rpc msg
12571 _params = dict()
12572 msg = dict(type='KeyManager', request='ImportKeys', version=1, params=_params)
12573 _params['ssh-keys'] = ssh_keys
12574 _params['user'] = user
12575 reply = await self.rpc(msg)
12576 return reply
12577
12578
12579
12580 @ReturnMapping(StringsResults)
12581 async def ListKeys(self, entities, mode):
12582 '''
12583 entities : Entities
12584 mode : bool
12585 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
12586 '''
12587 # map input types to rpc msg
12588 _params = dict()
12589 msg = dict(type='KeyManager', request='ListKeys', version=1, params=_params)
12590 _params['entities'] = entities
12591 _params['mode'] = mode
12592 reply = await self.rpc(msg)
12593 return reply
12594
12595
12596 class KeyUpdaterFacade(Type):
12597 name = 'KeyUpdater'
12598 version = 1
12599 schema = {'definitions': {'Entities': {'additionalProperties': False,
12600 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12601 'type': 'array'}},
12602 'required': ['entities'],
12603 'type': 'object'},
12604 'Entity': {'additionalProperties': False,
12605 'properties': {'tag': {'type': 'string'}},
12606 'required': ['tag'],
12607 'type': 'object'},
12608 'Error': {'additionalProperties': False,
12609 'properties': {'code': {'type': 'string'},
12610 'info': {'$ref': '#/definitions/ErrorInfo'},
12611 'message': {'type': 'string'}},
12612 'required': ['message', 'code'],
12613 'type': 'object'},
12614 'ErrorInfo': {'additionalProperties': False,
12615 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12616 'macaroon-path': {'type': 'string'}},
12617 'type': 'object'},
12618 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12619 'NotifyWatchResult': {'additionalProperties': False,
12620 'properties': {'NotifyWatcherId': {'type': 'string'},
12621 'error': {'$ref': '#/definitions/Error'}},
12622 'required': ['NotifyWatcherId'],
12623 'type': 'object'},
12624 'NotifyWatchResults': {'additionalProperties': False,
12625 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12626 'type': 'array'}},
12627 'required': ['results'],
12628 'type': 'object'},
12629 'StringsResult': {'additionalProperties': False,
12630 'properties': {'error': {'$ref': '#/definitions/Error'},
12631 'result': {'items': {'type': 'string'},
12632 'type': 'array'}},
12633 'type': 'object'},
12634 'StringsResults': {'additionalProperties': False,
12635 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
12636 'type': 'array'}},
12637 'required': ['results'],
12638 'type': 'object'}},
12639 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12640 'Result': {'$ref': '#/definitions/StringsResults'}},
12641 'type': 'object'},
12642 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12643 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12644 'type': 'object'}},
12645 'type': 'object'}
12646
12647
12648 @ReturnMapping(StringsResults)
12649 async def AuthorisedKeys(self, entities):
12650 '''
12651 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12652 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
12653 '''
12654 # map input types to rpc msg
12655 _params = dict()
12656 msg = dict(type='KeyUpdater', request='AuthorisedKeys', version=1, params=_params)
12657 _params['entities'] = entities
12658 reply = await self.rpc(msg)
12659 return reply
12660
12661
12662
12663 @ReturnMapping(NotifyWatchResults)
12664 async def WatchAuthorisedKeys(self, entities):
12665 '''
12666 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12667 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
12668 '''
12669 # map input types to rpc msg
12670 _params = dict()
12671 msg = dict(type='KeyUpdater', request='WatchAuthorisedKeys', version=1, params=_params)
12672 _params['entities'] = entities
12673 reply = await self.rpc(msg)
12674 return reply
12675
12676
12677 class LeadershipServiceFacade(Type):
12678 name = 'LeadershipService'
12679 version = 2
12680 schema = {'definitions': {'ApplicationTag': {'additionalProperties': False,
12681 'properties': {'Name': {'type': 'string'}},
12682 'required': ['Name'],
12683 'type': 'object'},
12684 'ClaimLeadershipBulkParams': {'additionalProperties': False,
12685 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
12686 'type': 'array'}},
12687 'required': ['params'],
12688 'type': 'object'},
12689 'ClaimLeadershipBulkResults': {'additionalProperties': False,
12690 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12691 'type': 'array'}},
12692 'required': ['results'],
12693 'type': 'object'},
12694 'ClaimLeadershipParams': {'additionalProperties': False,
12695 'properties': {'application-tag': {'type': 'string'},
12696 'duration': {'type': 'number'},
12697 'unit-tag': {'type': 'string'}},
12698 'required': ['application-tag',
12699 'unit-tag',
12700 'duration'],
12701 'type': 'object'},
12702 'Error': {'additionalProperties': False,
12703 'properties': {'code': {'type': 'string'},
12704 'info': {'$ref': '#/definitions/ErrorInfo'},
12705 'message': {'type': 'string'}},
12706 'required': ['message', 'code'],
12707 'type': 'object'},
12708 'ErrorInfo': {'additionalProperties': False,
12709 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12710 'macaroon-path': {'type': 'string'}},
12711 'type': 'object'},
12712 'ErrorResult': {'additionalProperties': False,
12713 'properties': {'error': {'$ref': '#/definitions/Error'}},
12714 'type': 'object'},
12715 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
12716 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
12717 'Result': {'$ref': '#/definitions/ErrorResult'}},
12718 'type': 'object'},
12719 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
12720 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
12721 'type': 'object'}},
12722 'type': 'object'}
12723
12724
12725 @ReturnMapping(ErrorResult)
12726 async def BlockUntilLeadershipReleased(self, name):
12727 '''
12728 name : str
12729 Returns -> Error
12730 '''
12731 # map input types to rpc msg
12732 _params = dict()
12733 msg = dict(type='LeadershipService', request='BlockUntilLeadershipReleased', version=2, params=_params)
12734 _params['Name'] = name
12735 reply = await self.rpc(msg)
12736 return reply
12737
12738
12739
12740 @ReturnMapping(ClaimLeadershipBulkResults)
12741 async def ClaimLeadership(self, params):
12742 '''
12743 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
12744 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12745 '''
12746 # map input types to rpc msg
12747 _params = dict()
12748 msg = dict(type='LeadershipService', request='ClaimLeadership', version=2, params=_params)
12749 _params['params'] = params
12750 reply = await self.rpc(msg)
12751 return reply
12752
12753
12754 class LifeFlagFacade(Type):
12755 name = 'LifeFlag'
12756 version = 1
12757 schema = {'definitions': {'Entities': {'additionalProperties': False,
12758 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12759 'type': 'array'}},
12760 'required': ['entities'],
12761 'type': 'object'},
12762 'Entity': {'additionalProperties': False,
12763 'properties': {'tag': {'type': 'string'}},
12764 'required': ['tag'],
12765 'type': 'object'},
12766 'Error': {'additionalProperties': False,
12767 'properties': {'code': {'type': 'string'},
12768 'info': {'$ref': '#/definitions/ErrorInfo'},
12769 'message': {'type': 'string'}},
12770 'required': ['message', 'code'],
12771 'type': 'object'},
12772 'ErrorInfo': {'additionalProperties': False,
12773 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12774 'macaroon-path': {'type': 'string'}},
12775 'type': 'object'},
12776 'LifeResult': {'additionalProperties': False,
12777 'properties': {'error': {'$ref': '#/definitions/Error'},
12778 'life': {'type': 'string'}},
12779 'required': ['life'],
12780 'type': 'object'},
12781 'LifeResults': {'additionalProperties': False,
12782 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
12783 'type': 'array'}},
12784 'required': ['results'],
12785 'type': 'object'},
12786 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12787 'NotifyWatchResult': {'additionalProperties': False,
12788 'properties': {'NotifyWatcherId': {'type': 'string'},
12789 'error': {'$ref': '#/definitions/Error'}},
12790 'required': ['NotifyWatcherId'],
12791 'type': 'object'},
12792 'NotifyWatchResults': {'additionalProperties': False,
12793 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12794 'type': 'array'}},
12795 'required': ['results'],
12796 'type': 'object'}},
12797 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12798 'Result': {'$ref': '#/definitions/LifeResults'}},
12799 'type': 'object'},
12800 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12801 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12802 'type': 'object'}},
12803 'type': 'object'}
12804
12805
12806 @ReturnMapping(LifeResults)
12807 async def Life(self, entities):
12808 '''
12809 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12810 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
12811 '''
12812 # map input types to rpc msg
12813 _params = dict()
12814 msg = dict(type='LifeFlag', request='Life', version=1, params=_params)
12815 _params['entities'] = entities
12816 reply = await self.rpc(msg)
12817 return reply
12818
12819
12820
12821 @ReturnMapping(NotifyWatchResults)
12822 async def Watch(self, entities):
12823 '''
12824 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12825 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
12826 '''
12827 # map input types to rpc msg
12828 _params = dict()
12829 msg = dict(type='LifeFlag', request='Watch', version=1, params=_params)
12830 _params['entities'] = entities
12831 reply = await self.rpc(msg)
12832 return reply
12833
12834
12835 class LogForwardingFacade(Type):
12836 name = 'LogForwarding'
12837 version = 1
12838 schema = {'definitions': {'Error': {'additionalProperties': False,
12839 'properties': {'code': {'type': 'string'},
12840 'info': {'$ref': '#/definitions/ErrorInfo'},
12841 'message': {'type': 'string'}},
12842 'required': ['message', 'code'],
12843 'type': 'object'},
12844 'ErrorInfo': {'additionalProperties': False,
12845 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12846 'macaroon-path': {'type': 'string'}},
12847 'type': 'object'},
12848 'ErrorResult': {'additionalProperties': False,
12849 'properties': {'error': {'$ref': '#/definitions/Error'}},
12850 'type': 'object'},
12851 'ErrorResults': {'additionalProperties': False,
12852 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12853 'type': 'array'}},
12854 'required': ['results'],
12855 'type': 'object'},
12856 'LogForwardingGetLastSentParams': {'additionalProperties': False,
12857 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
12858 'type': 'array'}},
12859 'required': ['ids'],
12860 'type': 'object'},
12861 'LogForwardingGetLastSentResult': {'additionalProperties': False,
12862 'properties': {'err': {'$ref': '#/definitions/Error'},
12863 'record-id': {'type': 'integer'},
12864 'record-timestamp': {'type': 'integer'}},
12865 'required': ['record-id',
12866 'record-timestamp',
12867 'err'],
12868 'type': 'object'},
12869 'LogForwardingGetLastSentResults': {'additionalProperties': False,
12870 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
12871 'type': 'array'}},
12872 'required': ['results'],
12873 'type': 'object'},
12874 'LogForwardingID': {'additionalProperties': False,
12875 'properties': {'model': {'type': 'string'},
12876 'sink': {'type': 'string'}},
12877 'required': ['model', 'sink'],
12878 'type': 'object'},
12879 'LogForwardingSetLastSentParam': {'additionalProperties': False,
12880 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
12881 'record-id': {'type': 'integer'},
12882 'record-timestamp': {'type': 'integer'}},
12883 'required': ['LogForwardingID',
12884 'record-id',
12885 'record-timestamp'],
12886 'type': 'object'},
12887 'LogForwardingSetLastSentParams': {'additionalProperties': False,
12888 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
12889 'type': 'array'}},
12890 'required': ['params'],
12891 'type': 'object'},
12892 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
12893 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
12894 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
12895 'type': 'object'},
12896 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
12897 'Result': {'$ref': '#/definitions/ErrorResults'}},
12898 'type': 'object'}},
12899 'type': 'object'}
12900
12901
12902 @ReturnMapping(LogForwardingGetLastSentResults)
12903 async def GetLastSent(self, ids):
12904 '''
12905 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
12906 Returns -> typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
12907 '''
12908 # map input types to rpc msg
12909 _params = dict()
12910 msg = dict(type='LogForwarding', request='GetLastSent', version=1, params=_params)
12911 _params['ids'] = ids
12912 reply = await self.rpc(msg)
12913 return reply
12914
12915
12916
12917 @ReturnMapping(ErrorResults)
12918 async def SetLastSent(self, params):
12919 '''
12920 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
12921 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12922 '''
12923 # map input types to rpc msg
12924 _params = dict()
12925 msg = dict(type='LogForwarding', request='SetLastSent', version=1, params=_params)
12926 _params['params'] = params
12927 reply = await self.rpc(msg)
12928 return reply
12929
12930
12931 class LoggerFacade(Type):
12932 name = 'Logger'
12933 version = 1
12934 schema = {'definitions': {'Entities': {'additionalProperties': False,
12935 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12936 'type': 'array'}},
12937 'required': ['entities'],
12938 'type': 'object'},
12939 'Entity': {'additionalProperties': False,
12940 'properties': {'tag': {'type': 'string'}},
12941 'required': ['tag'],
12942 'type': 'object'},
12943 'Error': {'additionalProperties': False,
12944 'properties': {'code': {'type': 'string'},
12945 'info': {'$ref': '#/definitions/ErrorInfo'},
12946 'message': {'type': 'string'}},
12947 'required': ['message', 'code'],
12948 'type': 'object'},
12949 'ErrorInfo': {'additionalProperties': False,
12950 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12951 'macaroon-path': {'type': 'string'}},
12952 'type': 'object'},
12953 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12954 'NotifyWatchResult': {'additionalProperties': False,
12955 'properties': {'NotifyWatcherId': {'type': 'string'},
12956 'error': {'$ref': '#/definitions/Error'}},
12957 'required': ['NotifyWatcherId'],
12958 'type': 'object'},
12959 'NotifyWatchResults': {'additionalProperties': False,
12960 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12961 'type': 'array'}},
12962 'required': ['results'],
12963 'type': 'object'},
12964 'StringResult': {'additionalProperties': False,
12965 'properties': {'error': {'$ref': '#/definitions/Error'},
12966 'result': {'type': 'string'}},
12967 'required': ['result'],
12968 'type': 'object'},
12969 'StringResults': {'additionalProperties': False,
12970 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
12971 'type': 'array'}},
12972 'required': ['results'],
12973 'type': 'object'}},
12974 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12975 'Result': {'$ref': '#/definitions/StringResults'}},
12976 'type': 'object'},
12977 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12978 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12979 'type': 'object'}},
12980 'type': 'object'}
12981
12982
12983 @ReturnMapping(StringResults)
12984 async def LoggingConfig(self, entities):
12985 '''
12986 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12987 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
12988 '''
12989 # map input types to rpc msg
12990 _params = dict()
12991 msg = dict(type='Logger', request='LoggingConfig', version=1, params=_params)
12992 _params['entities'] = entities
12993 reply = await self.rpc(msg)
12994 return reply
12995
12996
12997
12998 @ReturnMapping(NotifyWatchResults)
12999 async def WatchLoggingConfig(self, entities):
13000 '''
13001 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13002 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13003 '''
13004 # map input types to rpc msg
13005 _params = dict()
13006 msg = dict(type='Logger', request='WatchLoggingConfig', version=1, params=_params)
13007 _params['entities'] = entities
13008 reply = await self.rpc(msg)
13009 return reply
13010
13011
13012 class MachineActionsFacade(Type):
13013 name = 'MachineActions'
13014 version = 1
13015 schema = {'definitions': {'Action': {'additionalProperties': False,
13016 'properties': {'name': {'type': 'string'},
13017 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
13018 'type': 'object'}},
13019 'type': 'object'},
13020 'receiver': {'type': 'string'},
13021 'tag': {'type': 'string'}},
13022 'required': ['tag', 'receiver', 'name'],
13023 'type': 'object'},
13024 'ActionExecutionResult': {'additionalProperties': False,
13025 'properties': {'action-tag': {'type': 'string'},
13026 'message': {'type': 'string'},
13027 'results': {'patternProperties': {'.*': {'additionalProperties': True,
13028 'type': 'object'}},
13029 'type': 'object'},
13030 'status': {'type': 'string'}},
13031 'required': ['action-tag', 'status'],
13032 'type': 'object'},
13033 'ActionExecutionResults': {'additionalProperties': False,
13034 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
13035 'type': 'array'}},
13036 'type': 'object'},
13037 'ActionResult': {'additionalProperties': False,
13038 'properties': {'action': {'$ref': '#/definitions/Action'},
13039 'completed': {'format': 'date-time',
13040 'type': 'string'},
13041 'enqueued': {'format': 'date-time',
13042 'type': 'string'},
13043 'error': {'$ref': '#/definitions/Error'},
13044 'message': {'type': 'string'},
13045 'output': {'patternProperties': {'.*': {'additionalProperties': True,
13046 'type': 'object'}},
13047 'type': 'object'},
13048 'started': {'format': 'date-time',
13049 'type': 'string'},
13050 'status': {'type': 'string'}},
13051 'type': 'object'},
13052 'ActionResults': {'additionalProperties': False,
13053 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
13054 'type': 'array'}},
13055 'type': 'object'},
13056 'ActionsByReceiver': {'additionalProperties': False,
13057 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
13058 'type': 'array'},
13059 'error': {'$ref': '#/definitions/Error'},
13060 'receiver': {'type': 'string'}},
13061 'type': 'object'},
13062 'ActionsByReceivers': {'additionalProperties': False,
13063 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
13064 'type': 'array'}},
13065 'type': 'object'},
13066 'Entities': {'additionalProperties': False,
13067 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13068 'type': 'array'}},
13069 'required': ['entities'],
13070 'type': 'object'},
13071 'Entity': {'additionalProperties': False,
13072 'properties': {'tag': {'type': 'string'}},
13073 'required': ['tag'],
13074 'type': 'object'},
13075 'Error': {'additionalProperties': False,
13076 'properties': {'code': {'type': 'string'},
13077 'info': {'$ref': '#/definitions/ErrorInfo'},
13078 'message': {'type': 'string'}},
13079 'required': ['message', 'code'],
13080 'type': 'object'},
13081 'ErrorInfo': {'additionalProperties': False,
13082 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13083 'macaroon-path': {'type': 'string'}},
13084 'type': 'object'},
13085 'ErrorResult': {'additionalProperties': False,
13086 'properties': {'error': {'$ref': '#/definitions/Error'}},
13087 'type': 'object'},
13088 'ErrorResults': {'additionalProperties': False,
13089 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13090 'type': 'array'}},
13091 'required': ['results'],
13092 'type': 'object'},
13093 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13094 'StringsWatchResult': {'additionalProperties': False,
13095 'properties': {'changes': {'items': {'type': 'string'},
13096 'type': 'array'},
13097 'error': {'$ref': '#/definitions/Error'},
13098 'watcher-id': {'type': 'string'}},
13099 'required': ['watcher-id'],
13100 'type': 'object'},
13101 'StringsWatchResults': {'additionalProperties': False,
13102 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
13103 'type': 'array'}},
13104 'required': ['results'],
13105 'type': 'object'}},
13106 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13107 'Result': {'$ref': '#/definitions/ActionResults'}},
13108 'type': 'object'},
13109 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13110 'Result': {'$ref': '#/definitions/ErrorResults'}},
13111 'type': 'object'},
13112 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
13113 'Result': {'$ref': '#/definitions/ErrorResults'}},
13114 'type': 'object'},
13115 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13116 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
13117 'type': 'object'},
13118 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13119 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
13120 'type': 'object'}},
13121 'type': 'object'}
13122
13123
13124 @ReturnMapping(ActionResults)
13125 async def Actions(self, entities):
13126 '''
13127 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13128 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
13129 '''
13130 # map input types to rpc msg
13131 _params = dict()
13132 msg = dict(type='MachineActions', request='Actions', version=1, params=_params)
13133 _params['entities'] = entities
13134 reply = await self.rpc(msg)
13135 return reply
13136
13137
13138
13139 @ReturnMapping(ErrorResults)
13140 async def BeginActions(self, entities):
13141 '''
13142 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13143 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13144 '''
13145 # map input types to rpc msg
13146 _params = dict()
13147 msg = dict(type='MachineActions', request='BeginActions', version=1, params=_params)
13148 _params['entities'] = entities
13149 reply = await self.rpc(msg)
13150 return reply
13151
13152
13153
13154 @ReturnMapping(ErrorResults)
13155 async def FinishActions(self, results):
13156 '''
13157 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
13158 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13159 '''
13160 # map input types to rpc msg
13161 _params = dict()
13162 msg = dict(type='MachineActions', request='FinishActions', version=1, params=_params)
13163 _params['results'] = results
13164 reply = await self.rpc(msg)
13165 return reply
13166
13167
13168
13169 @ReturnMapping(ActionsByReceivers)
13170 async def RunningActions(self, entities):
13171 '''
13172 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13173 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
13174 '''
13175 # map input types to rpc msg
13176 _params = dict()
13177 msg = dict(type='MachineActions', request='RunningActions', version=1, params=_params)
13178 _params['entities'] = entities
13179 reply = await self.rpc(msg)
13180 return reply
13181
13182
13183
13184 @ReturnMapping(StringsWatchResults)
13185 async def WatchActionNotifications(self, entities):
13186 '''
13187 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13188 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
13189 '''
13190 # map input types to rpc msg
13191 _params = dict()
13192 msg = dict(type='MachineActions', request='WatchActionNotifications', version=1, params=_params)
13193 _params['entities'] = entities
13194 reply = await self.rpc(msg)
13195 return reply
13196
13197
13198 class MachineManagerFacade(Type):
13199 name = 'MachineManager'
13200 version = 2
13201 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
13202 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
13203 'type': 'array'},
13204 'constraints': {'$ref': '#/definitions/Value'},
13205 'container-type': {'type': 'string'},
13206 'disks': {'items': {'$ref': '#/definitions/Constraints'},
13207 'type': 'array'},
13208 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
13209 'instance-id': {'type': 'string'},
13210 'jobs': {'items': {'type': 'string'},
13211 'type': 'array'},
13212 'nonce': {'type': 'string'},
13213 'parent-id': {'type': 'string'},
13214 'placement': {'$ref': '#/definitions/Placement'},
13215 'series': {'type': 'string'}},
13216 'required': ['series',
13217 'constraints',
13218 'jobs',
13219 'parent-id',
13220 'container-type',
13221 'instance-id',
13222 'nonce',
13223 'hardware-characteristics',
13224 'addresses'],
13225 'type': 'object'},
13226 'AddMachines': {'additionalProperties': False,
13227 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
13228 'type': 'array'}},
13229 'required': ['params'],
13230 'type': 'object'},
13231 'AddMachinesResult': {'additionalProperties': False,
13232 'properties': {'error': {'$ref': '#/definitions/Error'},
13233 'machine': {'type': 'string'}},
13234 'required': ['machine'],
13235 'type': 'object'},
13236 'AddMachinesResults': {'additionalProperties': False,
13237 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
13238 'type': 'array'}},
13239 'required': ['machines'],
13240 'type': 'object'},
13241 'Address': {'additionalProperties': False,
13242 'properties': {'scope': {'type': 'string'},
13243 'space-name': {'type': 'string'},
13244 'type': {'type': 'string'},
13245 'value': {'type': 'string'}},
13246 'required': ['value', 'type', 'scope'],
13247 'type': 'object'},
13248 'Constraints': {'additionalProperties': False,
13249 'properties': {'Count': {'type': 'integer'},
13250 'Pool': {'type': 'string'},
13251 'Size': {'type': 'integer'}},
13252 'required': ['Pool', 'Size', 'Count'],
13253 'type': 'object'},
13254 'Error': {'additionalProperties': False,
13255 'properties': {'code': {'type': 'string'},
13256 'info': {'$ref': '#/definitions/ErrorInfo'},
13257 'message': {'type': 'string'}},
13258 'required': ['message', 'code'],
13259 'type': 'object'},
13260 'ErrorInfo': {'additionalProperties': False,
13261 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13262 'macaroon-path': {'type': 'string'}},
13263 'type': 'object'},
13264 'HardwareCharacteristics': {'additionalProperties': False,
13265 'properties': {'arch': {'type': 'string'},
13266 'availability-zone': {'type': 'string'},
13267 'cpu-cores': {'type': 'integer'},
13268 'cpu-power': {'type': 'integer'},
13269 'mem': {'type': 'integer'},
13270 'root-disk': {'type': 'integer'},
13271 'tags': {'items': {'type': 'string'},
13272 'type': 'array'}},
13273 'type': 'object'},
13274 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13275 'Placement': {'additionalProperties': False,
13276 'properties': {'directive': {'type': 'string'},
13277 'scope': {'type': 'string'}},
13278 'required': ['scope', 'directive'],
13279 'type': 'object'},
13280 'Value': {'additionalProperties': False,
13281 'properties': {'arch': {'type': 'string'},
13282 'container': {'type': 'string'},
13283 'cores': {'type': 'integer'},
13284 'cpu-power': {'type': 'integer'},
13285 'instance-type': {'type': 'string'},
13286 'mem': {'type': 'integer'},
13287 'root-disk': {'type': 'integer'},
13288 'spaces': {'items': {'type': 'string'},
13289 'type': 'array'},
13290 'tags': {'items': {'type': 'string'},
13291 'type': 'array'},
13292 'virt-type': {'type': 'string'}},
13293 'type': 'object'}},
13294 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
13295 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
13296 'type': 'object'}},
13297 'type': 'object'}
13298
13299
13300 @ReturnMapping(AddMachinesResults)
13301 async def AddMachines(self, params):
13302 '''
13303 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
13304 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
13305 '''
13306 # map input types to rpc msg
13307 _params = dict()
13308 msg = dict(type='MachineManager', request='AddMachines', version=2, params=_params)
13309 _params['params'] = params
13310 reply = await self.rpc(msg)
13311 return reply
13312
13313
13314 class MachineUndertakerFacade(Type):
13315 name = 'MachineUndertaker'
13316 version = 1
13317 schema = {'definitions': {'Entities': {'additionalProperties': False,
13318 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13319 'type': 'array'}},
13320 'required': ['entities'],
13321 'type': 'object'},
13322 'EntitiesResult': {'additionalProperties': False,
13323 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13324 'type': 'array'},
13325 'error': {'$ref': '#/definitions/Error'}},
13326 'required': ['entities'],
13327 'type': 'object'},
13328 'EntitiesResults': {'additionalProperties': False,
13329 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
13330 'type': 'array'}},
13331 'required': ['results'],
13332 'type': 'object'},
13333 'Entity': {'additionalProperties': False,
13334 'properties': {'tag': {'type': 'string'}},
13335 'required': ['tag'],
13336 'type': 'object'},
13337 'Error': {'additionalProperties': False,
13338 'properties': {'code': {'type': 'string'},
13339 'info': {'$ref': '#/definitions/ErrorInfo'},
13340 'message': {'type': 'string'}},
13341 'required': ['message', 'code'],
13342 'type': 'object'},
13343 'ErrorInfo': {'additionalProperties': False,
13344 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13345 'macaroon-path': {'type': 'string'}},
13346 'type': 'object'},
13347 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13348 'NotifyWatchResult': {'additionalProperties': False,
13349 'properties': {'NotifyWatcherId': {'type': 'string'},
13350 'error': {'$ref': '#/definitions/Error'}},
13351 'required': ['NotifyWatcherId'],
13352 'type': 'object'},
13353 'NotifyWatchResults': {'additionalProperties': False,
13354 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13355 'type': 'array'}},
13356 'required': ['results'],
13357 'type': 'object'},
13358 'ProviderInterfaceInfo': {'additionalProperties': False,
13359 'properties': {'interface-name': {'type': 'string'},
13360 'mac-address': {'type': 'string'},
13361 'provider-id': {'type': 'string'}},
13362 'required': ['interface-name',
13363 'mac-address',
13364 'provider-id'],
13365 'type': 'object'},
13366 'ProviderInterfaceInfoResult': {'additionalProperties': False,
13367 'properties': {'error': {'$ref': '#/definitions/Error'},
13368 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'},
13369 'type': 'array'},
13370 'machine-tag': {'type': 'string'}},
13371 'required': ['machine-tag',
13372 'interfaces'],
13373 'type': 'object'},
13374 'ProviderInterfaceInfoResults': {'additionalProperties': False,
13375 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'},
13376 'type': 'array'}},
13377 'required': ['results'],
13378 'type': 'object'}},
13379 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13380 'Result': {'$ref': '#/definitions/EntitiesResults'}},
13381 'type': 'object'},
13382 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}},
13383 'type': 'object'},
13384 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13385 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}},
13386 'type': 'object'},
13387 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13388 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13389 'type': 'object'}},
13390 'type': 'object'}
13391
13392
13393 @ReturnMapping(EntitiesResults)
13394 async def AllMachineRemovals(self, entities):
13395 '''
13396 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13397 Returns -> typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
13398 '''
13399 # map input types to rpc msg
13400 _params = dict()
13401 msg = dict(type='MachineUndertaker', request='AllMachineRemovals', version=1, params=_params)
13402 _params['entities'] = entities
13403 reply = await self.rpc(msg)
13404 return reply
13405
13406
13407
13408 @ReturnMapping(None)
13409 async def CompleteMachineRemovals(self, entities):
13410 '''
13411 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13412 Returns -> None
13413 '''
13414 # map input types to rpc msg
13415 _params = dict()
13416 msg = dict(type='MachineUndertaker', request='CompleteMachineRemovals', version=1, params=_params)
13417 _params['entities'] = entities
13418 reply = await self.rpc(msg)
13419 return reply
13420
13421
13422
13423 @ReturnMapping(ProviderInterfaceInfoResults)
13424 async def GetMachineProviderInterfaceInfo(self, entities):
13425 '''
13426 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13427 Returns -> typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
13428 '''
13429 # map input types to rpc msg
13430 _params = dict()
13431 msg = dict(type='MachineUndertaker', request='GetMachineProviderInterfaceInfo', version=1, params=_params)
13432 _params['entities'] = entities
13433 reply = await self.rpc(msg)
13434 return reply
13435
13436
13437
13438 @ReturnMapping(NotifyWatchResults)
13439 async def WatchMachineRemovals(self, entities):
13440 '''
13441 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13442 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13443 '''
13444 # map input types to rpc msg
13445 _params = dict()
13446 msg = dict(type='MachineUndertaker', request='WatchMachineRemovals', version=1, params=_params)
13447 _params['entities'] = entities
13448 reply = await self.rpc(msg)
13449 return reply
13450
13451
13452 class MachinerFacade(Type):
13453 name = 'Machiner'
13454 version = 1
13455 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
13456 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
13457 'type': 'array'},
13458 'type': 'array'}},
13459 'required': ['servers'],
13460 'type': 'object'},
13461 'Address': {'additionalProperties': False,
13462 'properties': {'scope': {'type': 'string'},
13463 'space-name': {'type': 'string'},
13464 'type': {'type': 'string'},
13465 'value': {'type': 'string'}},
13466 'required': ['value', 'type', 'scope'],
13467 'type': 'object'},
13468 'BytesResult': {'additionalProperties': False,
13469 'properties': {'result': {'items': {'type': 'integer'},
13470 'type': 'array'}},
13471 'required': ['result'],
13472 'type': 'object'},
13473 'Entities': {'additionalProperties': False,
13474 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13475 'type': 'array'}},
13476 'required': ['entities'],
13477 'type': 'object'},
13478 'Entity': {'additionalProperties': False,
13479 'properties': {'tag': {'type': 'string'}},
13480 'required': ['tag'],
13481 'type': 'object'},
13482 'EntityStatusArgs': {'additionalProperties': False,
13483 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
13484 'type': 'object'}},
13485 'type': 'object'},
13486 'info': {'type': 'string'},
13487 'status': {'type': 'string'},
13488 'tag': {'type': 'string'}},
13489 'required': ['tag',
13490 'status',
13491 'info',
13492 'data'],
13493 'type': 'object'},
13494 'Error': {'additionalProperties': False,
13495 'properties': {'code': {'type': 'string'},
13496 'info': {'$ref': '#/definitions/ErrorInfo'},
13497 'message': {'type': 'string'}},
13498 'required': ['message', 'code'],
13499 'type': 'object'},
13500 'ErrorInfo': {'additionalProperties': False,
13501 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13502 'macaroon-path': {'type': 'string'}},
13503 'type': 'object'},
13504 'ErrorResult': {'additionalProperties': False,
13505 'properties': {'error': {'$ref': '#/definitions/Error'}},
13506 'type': 'object'},
13507 'ErrorResults': {'additionalProperties': False,
13508 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13509 'type': 'array'}},
13510 'required': ['results'],
13511 'type': 'object'},
13512 'HostPort': {'additionalProperties': False,
13513 'properties': {'Address': {'$ref': '#/definitions/Address'},
13514 'port': {'type': 'integer'}},
13515 'required': ['Address', 'port'],
13516 'type': 'object'},
13517 'JobsResult': {'additionalProperties': False,
13518 'properties': {'error': {'$ref': '#/definitions/Error'},
13519 'jobs': {'items': {'type': 'string'},
13520 'type': 'array'}},
13521 'required': ['jobs'],
13522 'type': 'object'},
13523 'JobsResults': {'additionalProperties': False,
13524 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
13525 'type': 'array'}},
13526 'required': ['results'],
13527 'type': 'object'},
13528 'LifeResult': {'additionalProperties': False,
13529 'properties': {'error': {'$ref': '#/definitions/Error'},
13530 'life': {'type': 'string'}},
13531 'required': ['life'],
13532 'type': 'object'},
13533 'LifeResults': {'additionalProperties': False,
13534 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
13535 'type': 'array'}},
13536 'required': ['results'],
13537 'type': 'object'},
13538 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13539 'MachineAddresses': {'additionalProperties': False,
13540 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
13541 'type': 'array'},
13542 'tag': {'type': 'string'}},
13543 'required': ['tag', 'addresses'],
13544 'type': 'object'},
13545 'NetworkConfig': {'additionalProperties': False,
13546 'properties': {'address': {'type': 'string'},
13547 'cidr': {'type': 'string'},
13548 'config-type': {'type': 'string'},
13549 'device-index': {'type': 'integer'},
13550 'disabled': {'type': 'boolean'},
13551 'dns-search-domains': {'items': {'type': 'string'},
13552 'type': 'array'},
13553 'dns-servers': {'items': {'type': 'string'},
13554 'type': 'array'},
13555 'gateway-address': {'type': 'string'},
13556 'interface-name': {'type': 'string'},
13557 'interface-type': {'type': 'string'},
13558 'mac-address': {'type': 'string'},
13559 'mtu': {'type': 'integer'},
13560 'no-auto-start': {'type': 'boolean'},
13561 'parent-interface-name': {'type': 'string'},
13562 'provider-address-id': {'type': 'string'},
13563 'provider-id': {'type': 'string'},
13564 'provider-space-id': {'type': 'string'},
13565 'provider-subnet-id': {'type': 'string'},
13566 'provider-vlan-id': {'type': 'string'},
13567 'vlan-tag': {'type': 'integer'}},
13568 'required': ['device-index',
13569 'mac-address',
13570 'cidr',
13571 'mtu',
13572 'provider-id',
13573 'provider-subnet-id',
13574 'provider-space-id',
13575 'provider-address-id',
13576 'provider-vlan-id',
13577 'vlan-tag',
13578 'interface-name',
13579 'parent-interface-name',
13580 'interface-type',
13581 'disabled'],
13582 'type': 'object'},
13583 'NotifyWatchResult': {'additionalProperties': False,
13584 'properties': {'NotifyWatcherId': {'type': 'string'},
13585 'error': {'$ref': '#/definitions/Error'}},
13586 'required': ['NotifyWatcherId'],
13587 'type': 'object'},
13588 'NotifyWatchResults': {'additionalProperties': False,
13589 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13590 'type': 'array'}},
13591 'required': ['results'],
13592 'type': 'object'},
13593 'SetMachineNetworkConfig': {'additionalProperties': False,
13594 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
13595 'type': 'array'},
13596 'tag': {'type': 'string'}},
13597 'required': ['tag', 'config'],
13598 'type': 'object'},
13599 'SetMachinesAddresses': {'additionalProperties': False,
13600 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
13601 'type': 'array'}},
13602 'required': ['machine-addresses'],
13603 'type': 'object'},
13604 'SetStatus': {'additionalProperties': False,
13605 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
13606 'type': 'array'}},
13607 'required': ['entities'],
13608 'type': 'object'},
13609 'StringResult': {'additionalProperties': False,
13610 'properties': {'error': {'$ref': '#/definitions/Error'},
13611 'result': {'type': 'string'}},
13612 'required': ['result'],
13613 'type': 'object'},
13614 'StringsResult': {'additionalProperties': False,
13615 'properties': {'error': {'$ref': '#/definitions/Error'},
13616 'result': {'items': {'type': 'string'},
13617 'type': 'array'}},
13618 'type': 'object'}},
13619 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
13620 'type': 'object'},
13621 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
13622 'type': 'object'},
13623 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
13624 'type': 'object'},
13625 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13626 'Result': {'$ref': '#/definitions/ErrorResults'}},
13627 'type': 'object'},
13628 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13629 'Result': {'$ref': '#/definitions/JobsResults'}},
13630 'type': 'object'},
13631 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13632 'Result': {'$ref': '#/definitions/LifeResults'}},
13633 'type': 'object'},
13634 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
13635 'type': 'object'},
13636 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
13637 'Result': {'$ref': '#/definitions/ErrorResults'}},
13638 'type': 'object'},
13639 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
13640 'type': 'object'},
13641 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13642 'Result': {'$ref': '#/definitions/ErrorResults'}},
13643 'type': 'object'},
13644 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13645 'Result': {'$ref': '#/definitions/ErrorResults'}},
13646 'type': 'object'},
13647 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13648 'Result': {'$ref': '#/definitions/ErrorResults'}},
13649 'type': 'object'},
13650 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13651 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13652 'type': 'object'},
13653 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13654 'type': 'object'}},
13655 'type': 'object'}
13656
13657
13658 @ReturnMapping(StringsResult)
13659 async def APIAddresses(self):
13660 '''
13661
13662 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
13663 '''
13664 # map input types to rpc msg
13665 _params = dict()
13666 msg = dict(type='Machiner', request='APIAddresses', version=1, params=_params)
13667
13668 reply = await self.rpc(msg)
13669 return reply
13670
13671
13672
13673 @ReturnMapping(APIHostPortsResult)
13674 async def APIHostPorts(self):
13675 '''
13676
13677 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
13678 '''
13679 # map input types to rpc msg
13680 _params = dict()
13681 msg = dict(type='Machiner', request='APIHostPorts', version=1, params=_params)
13682
13683 reply = await self.rpc(msg)
13684 return reply
13685
13686
13687
13688 @ReturnMapping(BytesResult)
13689 async def CACert(self):
13690 '''
13691
13692 Returns -> typing.Sequence<+T_co>[int]
13693 '''
13694 # map input types to rpc msg
13695 _params = dict()
13696 msg = dict(type='Machiner', request='CACert', version=1, params=_params)
13697
13698 reply = await self.rpc(msg)
13699 return reply
13700
13701
13702
13703 @ReturnMapping(ErrorResults)
13704 async def EnsureDead(self, entities):
13705 '''
13706 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13707 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13708 '''
13709 # map input types to rpc msg
13710 _params = dict()
13711 msg = dict(type='Machiner', request='EnsureDead', version=1, params=_params)
13712 _params['entities'] = entities
13713 reply = await self.rpc(msg)
13714 return reply
13715
13716
13717
13718 @ReturnMapping(JobsResults)
13719 async def Jobs(self, entities):
13720 '''
13721 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13722 Returns -> typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
13723 '''
13724 # map input types to rpc msg
13725 _params = dict()
13726 msg = dict(type='Machiner', request='Jobs', version=1, params=_params)
13727 _params['entities'] = entities
13728 reply = await self.rpc(msg)
13729 return reply
13730
13731
13732
13733 @ReturnMapping(LifeResults)
13734 async def Life(self, entities):
13735 '''
13736 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13737 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
13738 '''
13739 # map input types to rpc msg
13740 _params = dict()
13741 msg = dict(type='Machiner', request='Life', version=1, params=_params)
13742 _params['entities'] = entities
13743 reply = await self.rpc(msg)
13744 return reply
13745
13746
13747
13748 @ReturnMapping(StringResult)
13749 async def ModelUUID(self):
13750 '''
13751
13752 Returns -> typing.Union[_ForwardRef('Error'), str]
13753 '''
13754 # map input types to rpc msg
13755 _params = dict()
13756 msg = dict(type='Machiner', request='ModelUUID', version=1, params=_params)
13757
13758 reply = await self.rpc(msg)
13759 return reply
13760
13761
13762
13763 @ReturnMapping(ErrorResults)
13764 async def SetMachineAddresses(self, machine_addresses):
13765 '''
13766 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
13767 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13768 '''
13769 # map input types to rpc msg
13770 _params = dict()
13771 msg = dict(type='Machiner', request='SetMachineAddresses', version=1, params=_params)
13772 _params['machine-addresses'] = machine_addresses
13773 reply = await self.rpc(msg)
13774 return reply
13775
13776
13777
13778 @ReturnMapping(None)
13779 async def SetObservedNetworkConfig(self, config, tag):
13780 '''
13781 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
13782 tag : str
13783 Returns -> None
13784 '''
13785 # map input types to rpc msg
13786 _params = dict()
13787 msg = dict(type='Machiner', request='SetObservedNetworkConfig', version=1, params=_params)
13788 _params['config'] = config
13789 _params['tag'] = tag
13790 reply = await self.rpc(msg)
13791 return reply
13792
13793
13794
13795 @ReturnMapping(ErrorResults)
13796 async def SetProviderNetworkConfig(self, entities):
13797 '''
13798 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13799 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13800 '''
13801 # map input types to rpc msg
13802 _params = dict()
13803 msg = dict(type='Machiner', request='SetProviderNetworkConfig', version=1, params=_params)
13804 _params['entities'] = entities
13805 reply = await self.rpc(msg)
13806 return reply
13807
13808
13809
13810 @ReturnMapping(ErrorResults)
13811 async def SetStatus(self, entities):
13812 '''
13813 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
13814 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13815 '''
13816 # map input types to rpc msg
13817 _params = dict()
13818 msg = dict(type='Machiner', request='SetStatus', version=1, params=_params)
13819 _params['entities'] = entities
13820 reply = await self.rpc(msg)
13821 return reply
13822
13823
13824
13825 @ReturnMapping(ErrorResults)
13826 async def UpdateStatus(self, entities):
13827 '''
13828 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
13829 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13830 '''
13831 # map input types to rpc msg
13832 _params = dict()
13833 msg = dict(type='Machiner', request='UpdateStatus', version=1, params=_params)
13834 _params['entities'] = entities
13835 reply = await self.rpc(msg)
13836 return reply
13837
13838
13839
13840 @ReturnMapping(NotifyWatchResults)
13841 async def Watch(self, entities):
13842 '''
13843 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13844 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13845 '''
13846 # map input types to rpc msg
13847 _params = dict()
13848 msg = dict(type='Machiner', request='Watch', version=1, params=_params)
13849 _params['entities'] = entities
13850 reply = await self.rpc(msg)
13851 return reply
13852
13853
13854
13855 @ReturnMapping(NotifyWatchResult)
13856 async def WatchAPIHostPorts(self):
13857 '''
13858
13859 Returns -> typing.Union[str, _ForwardRef('Error')]
13860 '''
13861 # map input types to rpc msg
13862 _params = dict()
13863 msg = dict(type='Machiner', request='WatchAPIHostPorts', version=1, params=_params)
13864
13865 reply = await self.rpc(msg)
13866 return reply
13867
13868
13869 class MeterStatusFacade(Type):
13870 name = 'MeterStatus'
13871 version = 1
13872 schema = {'definitions': {'Entities': {'additionalProperties': False,
13873 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13874 'type': 'array'}},
13875 'required': ['entities'],
13876 'type': 'object'},
13877 'Entity': {'additionalProperties': False,
13878 'properties': {'tag': {'type': 'string'}},
13879 'required': ['tag'],
13880 'type': 'object'},
13881 'Error': {'additionalProperties': False,
13882 'properties': {'code': {'type': 'string'},
13883 'info': {'$ref': '#/definitions/ErrorInfo'},
13884 'message': {'type': 'string'}},
13885 'required': ['message', 'code'],
13886 'type': 'object'},
13887 'ErrorInfo': {'additionalProperties': False,
13888 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13889 'macaroon-path': {'type': 'string'}},
13890 'type': 'object'},
13891 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13892 'MeterStatusResult': {'additionalProperties': False,
13893 'properties': {'code': {'type': 'string'},
13894 'error': {'$ref': '#/definitions/Error'},
13895 'info': {'type': 'string'}},
13896 'required': ['code', 'info'],
13897 'type': 'object'},
13898 'MeterStatusResults': {'additionalProperties': False,
13899 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
13900 'type': 'array'}},
13901 'required': ['results'],
13902 'type': 'object'},
13903 'NotifyWatchResult': {'additionalProperties': False,
13904 'properties': {'NotifyWatcherId': {'type': 'string'},
13905 'error': {'$ref': '#/definitions/Error'}},
13906 'required': ['NotifyWatcherId'],
13907 'type': 'object'},
13908 'NotifyWatchResults': {'additionalProperties': False,
13909 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13910 'type': 'array'}},
13911 'required': ['results'],
13912 'type': 'object'}},
13913 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13914 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
13915 'type': 'object'},
13916 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13917 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13918 'type': 'object'}},
13919 'type': 'object'}
13920
13921
13922 @ReturnMapping(MeterStatusResults)
13923 async def GetMeterStatus(self, entities):
13924 '''
13925 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13926 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
13927 '''
13928 # map input types to rpc msg
13929 _params = dict()
13930 msg = dict(type='MeterStatus', request='GetMeterStatus', version=1, params=_params)
13931 _params['entities'] = entities
13932 reply = await self.rpc(msg)
13933 return reply
13934
13935
13936
13937 @ReturnMapping(NotifyWatchResults)
13938 async def WatchMeterStatus(self, entities):
13939 '''
13940 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13941 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13942 '''
13943 # map input types to rpc msg
13944 _params = dict()
13945 msg = dict(type='MeterStatus', request='WatchMeterStatus', version=1, params=_params)
13946 _params['entities'] = entities
13947 reply = await self.rpc(msg)
13948 return reply
13949
13950
13951 class MetricsAdderFacade(Type):
13952 name = 'MetricsAdder'
13953 version = 2
13954 schema = {'definitions': {'Error': {'additionalProperties': False,
13955 'properties': {'code': {'type': 'string'},
13956 'info': {'$ref': '#/definitions/ErrorInfo'},
13957 'message': {'type': 'string'}},
13958 'required': ['message', 'code'],
13959 'type': 'object'},
13960 'ErrorInfo': {'additionalProperties': False,
13961 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13962 'macaroon-path': {'type': 'string'}},
13963 'type': 'object'},
13964 'ErrorResult': {'additionalProperties': False,
13965 'properties': {'error': {'$ref': '#/definitions/Error'}},
13966 'type': 'object'},
13967 'ErrorResults': {'additionalProperties': False,
13968 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13969 'type': 'array'}},
13970 'required': ['results'],
13971 'type': 'object'},
13972 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13973 'Metric': {'additionalProperties': False,
13974 'properties': {'key': {'type': 'string'},
13975 'time': {'format': 'date-time',
13976 'type': 'string'},
13977 'value': {'type': 'string'}},
13978 'required': ['key', 'value', 'time'],
13979 'type': 'object'},
13980 'MetricBatch': {'additionalProperties': False,
13981 'properties': {'charm-url': {'type': 'string'},
13982 'created': {'format': 'date-time',
13983 'type': 'string'},
13984 'metrics': {'items': {'$ref': '#/definitions/Metric'},
13985 'type': 'array'},
13986 'uuid': {'type': 'string'}},
13987 'required': ['uuid',
13988 'charm-url',
13989 'created',
13990 'metrics'],
13991 'type': 'object'},
13992 'MetricBatchParam': {'additionalProperties': False,
13993 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
13994 'tag': {'type': 'string'}},
13995 'required': ['tag', 'batch'],
13996 'type': 'object'},
13997 'MetricBatchParams': {'additionalProperties': False,
13998 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
13999 'type': 'array'}},
14000 'required': ['batches'],
14001 'type': 'object'}},
14002 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
14003 'Result': {'$ref': '#/definitions/ErrorResults'}},
14004 'type': 'object'}},
14005 'type': 'object'}
14006
14007
14008 @ReturnMapping(ErrorResults)
14009 async def AddMetricBatches(self, batches):
14010 '''
14011 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
14012 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14013 '''
14014 # map input types to rpc msg
14015 _params = dict()
14016 msg = dict(type='MetricsAdder', request='AddMetricBatches', version=2, params=_params)
14017 _params['batches'] = batches
14018 reply = await self.rpc(msg)
14019 return reply
14020
14021
14022 class MetricsDebugFacade(Type):
14023 name = 'MetricsDebug'
14024 version = 2
14025 schema = {'definitions': {'Entities': {'additionalProperties': False,
14026 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14027 'type': 'array'}},
14028 'required': ['entities'],
14029 'type': 'object'},
14030 'Entity': {'additionalProperties': False,
14031 'properties': {'tag': {'type': 'string'}},
14032 'required': ['tag'],
14033 'type': 'object'},
14034 'EntityMetrics': {'additionalProperties': False,
14035 'properties': {'error': {'$ref': '#/definitions/Error'},
14036 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
14037 'type': 'array'}},
14038 'type': 'object'},
14039 'Error': {'additionalProperties': False,
14040 'properties': {'code': {'type': 'string'},
14041 'info': {'$ref': '#/definitions/ErrorInfo'},
14042 'message': {'type': 'string'}},
14043 'required': ['message', 'code'],
14044 'type': 'object'},
14045 'ErrorInfo': {'additionalProperties': False,
14046 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14047 'macaroon-path': {'type': 'string'}},
14048 'type': 'object'},
14049 'ErrorResult': {'additionalProperties': False,
14050 'properties': {'error': {'$ref': '#/definitions/Error'}},
14051 'type': 'object'},
14052 'ErrorResults': {'additionalProperties': False,
14053 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14054 'type': 'array'}},
14055 'required': ['results'],
14056 'type': 'object'},
14057 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14058 'MeterStatusParam': {'additionalProperties': False,
14059 'properties': {'code': {'type': 'string'},
14060 'info': {'type': 'string'},
14061 'tag': {'type': 'string'}},
14062 'required': ['tag', 'code', 'info'],
14063 'type': 'object'},
14064 'MeterStatusParams': {'additionalProperties': False,
14065 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
14066 'type': 'array'}},
14067 'required': ['statues'],
14068 'type': 'object'},
14069 'MetricResult': {'additionalProperties': False,
14070 'properties': {'key': {'type': 'string'},
14071 'time': {'format': 'date-time',
14072 'type': 'string'},
14073 'unit': {'type': 'string'},
14074 'value': {'type': 'string'}},
14075 'required': ['time', 'key', 'value', 'unit'],
14076 'type': 'object'},
14077 'MetricResults': {'additionalProperties': False,
14078 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
14079 'type': 'array'}},
14080 'required': ['results'],
14081 'type': 'object'}},
14082 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14083 'Result': {'$ref': '#/definitions/MetricResults'}},
14084 'type': 'object'},
14085 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
14086 'Result': {'$ref': '#/definitions/ErrorResults'}},
14087 'type': 'object'}},
14088 'type': 'object'}
14089
14090
14091 @ReturnMapping(MetricResults)
14092 async def GetMetrics(self, entities):
14093 '''
14094 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14095 Returns -> typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
14096 '''
14097 # map input types to rpc msg
14098 _params = dict()
14099 msg = dict(type='MetricsDebug', request='GetMetrics', version=2, params=_params)
14100 _params['entities'] = entities
14101 reply = await self.rpc(msg)
14102 return reply
14103
14104
14105
14106 @ReturnMapping(ErrorResults)
14107 async def SetMeterStatus(self, statues):
14108 '''
14109 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
14110 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14111 '''
14112 # map input types to rpc msg
14113 _params = dict()
14114 msg = dict(type='MetricsDebug', request='SetMeterStatus', version=2, params=_params)
14115 _params['statues'] = statues
14116 reply = await self.rpc(msg)
14117 return reply
14118
14119
14120 class MetricsManagerFacade(Type):
14121 name = 'MetricsManager'
14122 version = 1
14123 schema = {'definitions': {'Entities': {'additionalProperties': False,
14124 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14125 'type': 'array'}},
14126 'required': ['entities'],
14127 'type': 'object'},
14128 'Entity': {'additionalProperties': False,
14129 'properties': {'tag': {'type': 'string'}},
14130 'required': ['tag'],
14131 'type': 'object'},
14132 'Error': {'additionalProperties': False,
14133 'properties': {'code': {'type': 'string'},
14134 'info': {'$ref': '#/definitions/ErrorInfo'},
14135 'message': {'type': 'string'}},
14136 'required': ['message', 'code'],
14137 'type': 'object'},
14138 'ErrorInfo': {'additionalProperties': False,
14139 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14140 'macaroon-path': {'type': 'string'}},
14141 'type': 'object'},
14142 'ErrorResult': {'additionalProperties': False,
14143 'properties': {'error': {'$ref': '#/definitions/Error'}},
14144 'type': 'object'},
14145 'ErrorResults': {'additionalProperties': False,
14146 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14147 'type': 'array'}},
14148 'required': ['results'],
14149 'type': 'object'},
14150 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
14151 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14152 'Result': {'$ref': '#/definitions/ErrorResults'}},
14153 'type': 'object'},
14154 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14155 'Result': {'$ref': '#/definitions/ErrorResults'}},
14156 'type': 'object'}},
14157 'type': 'object'}
14158
14159
14160 @ReturnMapping(ErrorResults)
14161 async def CleanupOldMetrics(self, entities):
14162 '''
14163 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14164 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14165 '''
14166 # map input types to rpc msg
14167 _params = dict()
14168 msg = dict(type='MetricsManager', request='CleanupOldMetrics', version=1, params=_params)
14169 _params['entities'] = entities
14170 reply = await self.rpc(msg)
14171 return reply
14172
14173
14174
14175 @ReturnMapping(ErrorResults)
14176 async def SendMetrics(self, entities):
14177 '''
14178 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14179 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14180 '''
14181 # map input types to rpc msg
14182 _params = dict()
14183 msg = dict(type='MetricsManager', request='SendMetrics', version=1, params=_params)
14184 _params['entities'] = entities
14185 reply = await self.rpc(msg)
14186 return reply
14187
14188
14189 class MigrationFlagFacade(Type):
14190 name = 'MigrationFlag'
14191 version = 1
14192 schema = {'definitions': {'Entities': {'additionalProperties': False,
14193 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14194 'type': 'array'}},
14195 'required': ['entities'],
14196 'type': 'object'},
14197 'Entity': {'additionalProperties': False,
14198 'properties': {'tag': {'type': 'string'}},
14199 'required': ['tag'],
14200 'type': 'object'},
14201 'Error': {'additionalProperties': False,
14202 'properties': {'code': {'type': 'string'},
14203 'info': {'$ref': '#/definitions/ErrorInfo'},
14204 'message': {'type': 'string'}},
14205 'required': ['message', 'code'],
14206 'type': 'object'},
14207 'ErrorInfo': {'additionalProperties': False,
14208 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14209 'macaroon-path': {'type': 'string'}},
14210 'type': 'object'},
14211 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14212 'NotifyWatchResult': {'additionalProperties': False,
14213 'properties': {'NotifyWatcherId': {'type': 'string'},
14214 'error': {'$ref': '#/definitions/Error'}},
14215 'required': ['NotifyWatcherId'],
14216 'type': 'object'},
14217 'NotifyWatchResults': {'additionalProperties': False,
14218 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14219 'type': 'array'}},
14220 'required': ['results'],
14221 'type': 'object'},
14222 'PhaseResult': {'additionalProperties': False,
14223 'properties': {'error': {'$ref': '#/definitions/Error'},
14224 'phase': {'type': 'string'}},
14225 'type': 'object'},
14226 'PhaseResults': {'additionalProperties': False,
14227 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
14228 'type': 'array'}},
14229 'required': ['results'],
14230 'type': 'object'}},
14231 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14232 'Result': {'$ref': '#/definitions/PhaseResults'}},
14233 'type': 'object'},
14234 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14235 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14236 'type': 'object'}},
14237 'type': 'object'}
14238
14239
14240 @ReturnMapping(PhaseResults)
14241 async def Phase(self, entities):
14242 '''
14243 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14244 Returns -> typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
14245 '''
14246 # map input types to rpc msg
14247 _params = dict()
14248 msg = dict(type='MigrationFlag', request='Phase', version=1, params=_params)
14249 _params['entities'] = entities
14250 reply = await self.rpc(msg)
14251 return reply
14252
14253
14254
14255 @ReturnMapping(NotifyWatchResults)
14256 async def Watch(self, entities):
14257 '''
14258 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14259 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
14260 '''
14261 # map input types to rpc msg
14262 _params = dict()
14263 msg = dict(type='MigrationFlag', request='Watch', version=1, params=_params)
14264 _params['entities'] = entities
14265 reply = await self.rpc(msg)
14266 return reply
14267
14268
14269 class MigrationMasterFacade(Type):
14270 name = 'MigrationMaster'
14271 version = 1
14272 schema = {'definitions': {'Error': {'additionalProperties': False,
14273 'properties': {'code': {'type': 'string'},
14274 'info': {'$ref': '#/definitions/ErrorInfo'},
14275 'message': {'type': 'string'}},
14276 'required': ['message', 'code'],
14277 'type': 'object'},
14278 'ErrorInfo': {'additionalProperties': False,
14279 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14280 'macaroon-path': {'type': 'string'}},
14281 'type': 'object'},
14282 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14283 'MasterMigrationStatus': {'additionalProperties': False,
14284 'properties': {'migration-id': {'type': 'string'},
14285 'phase': {'type': 'string'},
14286 'phase-changed-time': {'format': 'date-time',
14287 'type': 'string'},
14288 'spec': {'$ref': '#/definitions/MigrationSpec'}},
14289 'required': ['spec',
14290 'migration-id',
14291 'phase',
14292 'phase-changed-time'],
14293 'type': 'object'},
14294 'MigrationModelInfo': {'additionalProperties': False,
14295 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
14296 'name': {'type': 'string'},
14297 'owner-tag': {'type': 'string'},
14298 'uuid': {'type': 'string'}},
14299 'required': ['uuid',
14300 'name',
14301 'owner-tag',
14302 'agent-version'],
14303 'type': 'object'},
14304 'MigrationSpec': {'additionalProperties': False,
14305 'properties': {'external-control': {'type': 'boolean'},
14306 'model-tag': {'type': 'string'},
14307 'skip-initial-prechecks': {'type': 'boolean'},
14308 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
14309 'required': ['model-tag',
14310 'target-info',
14311 'external-control',
14312 'skip-initial-prechecks'],
14313 'type': 'object'},
14314 'MigrationTargetInfo': {'additionalProperties': False,
14315 'properties': {'addrs': {'items': {'type': 'string'},
14316 'type': 'array'},
14317 'auth-tag': {'type': 'string'},
14318 'ca-cert': {'type': 'string'},
14319 'controller-tag': {'type': 'string'},
14320 'macaroons': {'type': 'string'},
14321 'password': {'type': 'string'}},
14322 'required': ['controller-tag',
14323 'addrs',
14324 'ca-cert',
14325 'auth-tag'],
14326 'type': 'object'},
14327 'MinionReports': {'additionalProperties': False,
14328 'properties': {'failed': {'items': {'type': 'string'},
14329 'type': 'array'},
14330 'migration-id': {'type': 'string'},
14331 'phase': {'type': 'string'},
14332 'success-count': {'type': 'integer'},
14333 'unknown-count': {'type': 'integer'},
14334 'unknown-sample': {'items': {'type': 'string'},
14335 'type': 'array'}},
14336 'required': ['migration-id',
14337 'phase',
14338 'success-count',
14339 'unknown-count',
14340 'unknown-sample',
14341 'failed'],
14342 'type': 'object'},
14343 'NotifyWatchResult': {'additionalProperties': False,
14344 'properties': {'NotifyWatcherId': {'type': 'string'},
14345 'error': {'$ref': '#/definitions/Error'}},
14346 'required': ['NotifyWatcherId'],
14347 'type': 'object'},
14348 'Number': {'additionalProperties': False,
14349 'properties': {'Build': {'type': 'integer'},
14350 'Major': {'type': 'integer'},
14351 'Minor': {'type': 'integer'},
14352 'Patch': {'type': 'integer'},
14353 'Tag': {'type': 'string'}},
14354 'required': ['Major',
14355 'Minor',
14356 'Tag',
14357 'Patch',
14358 'Build'],
14359 'type': 'object'},
14360 'SerializedModel': {'additionalProperties': False,
14361 'properties': {'bytes': {'items': {'type': 'integer'},
14362 'type': 'array'},
14363 'charms': {'items': {'type': 'string'},
14364 'type': 'array'},
14365 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
14366 'type': 'array'}},
14367 'required': ['bytes', 'charms', 'tools'],
14368 'type': 'object'},
14369 'SerializedModelTools': {'additionalProperties': False,
14370 'properties': {'uri': {'type': 'string'},
14371 'version': {'type': 'string'}},
14372 'required': ['version', 'uri'],
14373 'type': 'object'},
14374 'SetMigrationPhaseArgs': {'additionalProperties': False,
14375 'properties': {'phase': {'type': 'string'}},
14376 'required': ['phase'],
14377 'type': 'object'},
14378 'SetMigrationStatusMessageArgs': {'additionalProperties': False,
14379 'properties': {'message': {'type': 'string'}},
14380 'required': ['message'],
14381 'type': 'object'}},
14382 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
14383 'type': 'object'},
14384 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}},
14385 'type': 'object'},
14386 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}},
14387 'type': 'object'},
14388 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}},
14389 'type': 'object'},
14390 'Prechecks': {'type': 'object'},
14391 'Reap': {'type': 'object'},
14392 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
14393 'type': 'object'},
14394 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
14395 'type': 'object'},
14396 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14397 'type': 'object'},
14398 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14399 'type': 'object'}},
14400 'type': 'object'}
14401
14402
14403 @ReturnMapping(SerializedModel)
14404 async def Export(self):
14405 '''
14406
14407 Returns -> typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
14408 '''
14409 # map input types to rpc msg
14410 _params = dict()
14411 msg = dict(type='MigrationMaster', request='Export', version=1, params=_params)
14412
14413 reply = await self.rpc(msg)
14414 return reply
14415
14416
14417
14418 @ReturnMapping(MasterMigrationStatus)
14419 async def MigrationStatus(self):
14420 '''
14421
14422 Returns -> typing.Union[str, _ForwardRef('MigrationSpec')]
14423 '''
14424 # map input types to rpc msg
14425 _params = dict()
14426 msg = dict(type='MigrationMaster', request='MigrationStatus', version=1, params=_params)
14427
14428 reply = await self.rpc(msg)
14429 return reply
14430
14431
14432
14433 @ReturnMapping(MinionReports)
14434 async def MinionReports(self):
14435 '''
14436
14437 Returns -> typing.Union[typing.Sequence<+T_co>[str], int]
14438 '''
14439 # map input types to rpc msg
14440 _params = dict()
14441 msg = dict(type='MigrationMaster', request='MinionReports', version=1, params=_params)
14442
14443 reply = await self.rpc(msg)
14444 return reply
14445
14446
14447
14448 @ReturnMapping(MigrationModelInfo)
14449 async def ModelInfo(self):
14450 '''
14451
14452 Returns -> typing.Union[_ForwardRef('Number'), str]
14453 '''
14454 # map input types to rpc msg
14455 _params = dict()
14456 msg = dict(type='MigrationMaster', request='ModelInfo', version=1, params=_params)
14457
14458 reply = await self.rpc(msg)
14459 return reply
14460
14461
14462
14463 @ReturnMapping(None)
14464 async def Prechecks(self):
14465 '''
14466
14467 Returns -> None
14468 '''
14469 # map input types to rpc msg
14470 _params = dict()
14471 msg = dict(type='MigrationMaster', request='Prechecks', version=1, params=_params)
14472
14473 reply = await self.rpc(msg)
14474 return reply
14475
14476
14477
14478 @ReturnMapping(None)
14479 async def Reap(self):
14480 '''
14481
14482 Returns -> None
14483 '''
14484 # map input types to rpc msg
14485 _params = dict()
14486 msg = dict(type='MigrationMaster', request='Reap', version=1, params=_params)
14487
14488 reply = await self.rpc(msg)
14489 return reply
14490
14491
14492
14493 @ReturnMapping(None)
14494 async def SetPhase(self, phase):
14495 '''
14496 phase : str
14497 Returns -> None
14498 '''
14499 # map input types to rpc msg
14500 _params = dict()
14501 msg = dict(type='MigrationMaster', request='SetPhase', version=1, params=_params)
14502 _params['phase'] = phase
14503 reply = await self.rpc(msg)
14504 return reply
14505
14506
14507
14508 @ReturnMapping(None)
14509 async def SetStatusMessage(self, message):
14510 '''
14511 message : str
14512 Returns -> None
14513 '''
14514 # map input types to rpc msg
14515 _params = dict()
14516 msg = dict(type='MigrationMaster', request='SetStatusMessage', version=1, params=_params)
14517 _params['message'] = message
14518 reply = await self.rpc(msg)
14519 return reply
14520
14521
14522
14523 @ReturnMapping(NotifyWatchResult)
14524 async def Watch(self):
14525 '''
14526
14527 Returns -> typing.Union[str, _ForwardRef('Error')]
14528 '''
14529 # map input types to rpc msg
14530 _params = dict()
14531 msg = dict(type='MigrationMaster', request='Watch', version=1, params=_params)
14532
14533 reply = await self.rpc(msg)
14534 return reply
14535
14536
14537
14538 @ReturnMapping(NotifyWatchResult)
14539 async def WatchMinionReports(self):
14540 '''
14541
14542 Returns -> typing.Union[str, _ForwardRef('Error')]
14543 '''
14544 # map input types to rpc msg
14545 _params = dict()
14546 msg = dict(type='MigrationMaster', request='WatchMinionReports', version=1, params=_params)
14547
14548 reply = await self.rpc(msg)
14549 return reply
14550
14551
14552 class MigrationMinionFacade(Type):
14553 name = 'MigrationMinion'
14554 version = 1
14555 schema = {'definitions': {'Error': {'additionalProperties': False,
14556 'properties': {'code': {'type': 'string'},
14557 'info': {'$ref': '#/definitions/ErrorInfo'},
14558 'message': {'type': 'string'}},
14559 'required': ['message', 'code'],
14560 'type': 'object'},
14561 'ErrorInfo': {'additionalProperties': False,
14562 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14563 'macaroon-path': {'type': 'string'}},
14564 'type': 'object'},
14565 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14566 'MinionReport': {'additionalProperties': False,
14567 'properties': {'migration-id': {'type': 'string'},
14568 'phase': {'type': 'string'},
14569 'success': {'type': 'boolean'}},
14570 'required': ['migration-id',
14571 'phase',
14572 'success'],
14573 'type': 'object'},
14574 'NotifyWatchResult': {'additionalProperties': False,
14575 'properties': {'NotifyWatcherId': {'type': 'string'},
14576 'error': {'$ref': '#/definitions/Error'}},
14577 'required': ['NotifyWatcherId'],
14578 'type': 'object'}},
14579 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}},
14580 'type': 'object'},
14581 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14582 'type': 'object'}},
14583 'type': 'object'}
14584
14585
14586 @ReturnMapping(None)
14587 async def Report(self, migration_id, phase, success):
14588 '''
14589 migration_id : str
14590 phase : str
14591 success : bool
14592 Returns -> None
14593 '''
14594 # map input types to rpc msg
14595 _params = dict()
14596 msg = dict(type='MigrationMinion', request='Report', version=1, params=_params)
14597 _params['migration-id'] = migration_id
14598 _params['phase'] = phase
14599 _params['success'] = success
14600 reply = await self.rpc(msg)
14601 return reply
14602
14603
14604
14605 @ReturnMapping(NotifyWatchResult)
14606 async def Watch(self):
14607 '''
14608
14609 Returns -> typing.Union[str, _ForwardRef('Error')]
14610 '''
14611 # map input types to rpc msg
14612 _params = dict()
14613 msg = dict(type='MigrationMinion', request='Watch', version=1, params=_params)
14614
14615 reply = await self.rpc(msg)
14616 return reply
14617
14618
14619 class MigrationStatusWatcherFacade(Type):
14620 name = 'MigrationStatusWatcher'
14621 version = 1
14622 schema = {'definitions': {'MigrationStatus': {'additionalProperties': False,
14623 'properties': {'attempt': {'type': 'integer'},
14624 'external-control': {'type': 'boolean'},
14625 'migration-id': {'type': 'string'},
14626 'phase': {'type': 'string'},
14627 'source-api-addrs': {'items': {'type': 'string'},
14628 'type': 'array'},
14629 'source-ca-cert': {'type': 'string'},
14630 'target-api-addrs': {'items': {'type': 'string'},
14631 'type': 'array'},
14632 'target-ca-cert': {'type': 'string'}},
14633 'required': ['migration-id',
14634 'attempt',
14635 'phase',
14636 'external-control',
14637 'source-api-addrs',
14638 'source-ca-cert',
14639 'target-api-addrs',
14640 'target-ca-cert'],
14641 'type': 'object'}},
14642 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
14643 'type': 'object'},
14644 'Stop': {'type': 'object'}},
14645 'type': 'object'}
14646
14647
14648 @ReturnMapping(MigrationStatus)
14649 async def Next(self):
14650 '''
14651
14652 Returns -> typing.Union[int, typing.Sequence<+T_co>[str]]
14653 '''
14654 # map input types to rpc msg
14655 _params = dict()
14656 msg = dict(type='MigrationStatusWatcher', request='Next', version=1, params=_params)
14657
14658 reply = await self.rpc(msg)
14659 return reply
14660
14661
14662
14663 @ReturnMapping(None)
14664 async def Stop(self):
14665 '''
14666
14667 Returns -> None
14668 '''
14669 # map input types to rpc msg
14670 _params = dict()
14671 msg = dict(type='MigrationStatusWatcher', request='Stop', version=1, params=_params)
14672
14673 reply = await self.rpc(msg)
14674 return reply
14675
14676
14677 class MigrationTargetFacade(Type):
14678 name = 'MigrationTarget'
14679 version = 1
14680 schema = {'definitions': {'MigrationModelInfo': {'additionalProperties': False,
14681 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
14682 'name': {'type': 'string'},
14683 'owner-tag': {'type': 'string'},
14684 'uuid': {'type': 'string'}},
14685 'required': ['uuid',
14686 'name',
14687 'owner-tag',
14688 'agent-version'],
14689 'type': 'object'},
14690 'ModelArgs': {'additionalProperties': False,
14691 'properties': {'model-tag': {'type': 'string'}},
14692 'required': ['model-tag'],
14693 'type': 'object'},
14694 'Number': {'additionalProperties': False,
14695 'properties': {'Build': {'type': 'integer'},
14696 'Major': {'type': 'integer'},
14697 'Minor': {'type': 'integer'},
14698 'Patch': {'type': 'integer'},
14699 'Tag': {'type': 'string'}},
14700 'required': ['Major',
14701 'Minor',
14702 'Tag',
14703 'Patch',
14704 'Build'],
14705 'type': 'object'},
14706 'SerializedModel': {'additionalProperties': False,
14707 'properties': {'bytes': {'items': {'type': 'integer'},
14708 'type': 'array'},
14709 'charms': {'items': {'type': 'string'},
14710 'type': 'array'},
14711 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
14712 'type': 'array'}},
14713 'required': ['bytes', 'charms', 'tools'],
14714 'type': 'object'},
14715 'SerializedModelTools': {'additionalProperties': False,
14716 'properties': {'uri': {'type': 'string'},
14717 'version': {'type': 'string'}},
14718 'required': ['version', 'uri'],
14719 'type': 'object'}},
14720 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
14721 'type': 'object'},
14722 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
14723 'type': 'object'},
14724 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
14725 'type': 'object'},
14726 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}},
14727 'type': 'object'}},
14728 'type': 'object'}
14729
14730
14731 @ReturnMapping(None)
14732 async def Abort(self, model_tag):
14733 '''
14734 model_tag : str
14735 Returns -> None
14736 '''
14737 # map input types to rpc msg
14738 _params = dict()
14739 msg = dict(type='MigrationTarget', request='Abort', version=1, params=_params)
14740 _params['model-tag'] = model_tag
14741 reply = await self.rpc(msg)
14742 return reply
14743
14744
14745
14746 @ReturnMapping(None)
14747 async def Activate(self, model_tag):
14748 '''
14749 model_tag : str
14750 Returns -> None
14751 '''
14752 # map input types to rpc msg
14753 _params = dict()
14754 msg = dict(type='MigrationTarget', request='Activate', version=1, params=_params)
14755 _params['model-tag'] = model_tag
14756 reply = await self.rpc(msg)
14757 return reply
14758
14759
14760
14761 @ReturnMapping(None)
14762 async def Import(self, bytes_, charms, tools):
14763 '''
14764 bytes_ : typing.Sequence<+T_co>[int]
14765 charms : typing.Sequence<+T_co>[str]
14766 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
14767 Returns -> None
14768 '''
14769 # map input types to rpc msg
14770 _params = dict()
14771 msg = dict(type='MigrationTarget', request='Import', version=1, params=_params)
14772 _params['bytes'] = bytes_
14773 _params['charms'] = charms
14774 _params['tools'] = tools
14775 reply = await self.rpc(msg)
14776 return reply
14777
14778
14779
14780 @ReturnMapping(None)
14781 async def Prechecks(self, agent_version, name, owner_tag, uuid):
14782 '''
14783 agent_version : Number
14784 name : str
14785 owner_tag : str
14786 uuid : str
14787 Returns -> None
14788 '''
14789 # map input types to rpc msg
14790 _params = dict()
14791 msg = dict(type='MigrationTarget', request='Prechecks', version=1, params=_params)
14792 _params['agent-version'] = agent_version
14793 _params['name'] = name
14794 _params['owner-tag'] = owner_tag
14795 _params['uuid'] = uuid
14796 reply = await self.rpc(msg)
14797 return reply
14798
14799
14800 class ModelConfigFacade(Type):
14801 name = 'ModelConfig'
14802 version = 1
14803 schema = {'definitions': {'ConfigValue': {'additionalProperties': False,
14804 'properties': {'source': {'type': 'string'},
14805 'value': {'additionalProperties': True,
14806 'type': 'object'}},
14807 'required': ['value', 'source'],
14808 'type': 'object'},
14809 'ModelConfigResults': {'additionalProperties': False,
14810 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
14811 'type': 'object'}},
14812 'required': ['config'],
14813 'type': 'object'},
14814 'ModelSet': {'additionalProperties': False,
14815 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
14816 'type': 'object'}},
14817 'type': 'object'}},
14818 'required': ['config'],
14819 'type': 'object'},
14820 'ModelUnset': {'additionalProperties': False,
14821 'properties': {'keys': {'items': {'type': 'string'},
14822 'type': 'array'}},
14823 'required': ['keys'],
14824 'type': 'object'}},
14825 'properties': {'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
14826 'type': 'object'},
14827 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
14828 'type': 'object'},
14829 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
14830 'type': 'object'}},
14831 'type': 'object'}
14832
14833
14834 @ReturnMapping(ModelConfigResults)
14835 async def ModelGet(self):
14836 '''
14837
14838 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
14839 '''
14840 # map input types to rpc msg
14841 _params = dict()
14842 msg = dict(type='ModelConfig', request='ModelGet', version=1, params=_params)
14843
14844 reply = await self.rpc(msg)
14845 return reply
14846
14847
14848
14849 @ReturnMapping(None)
14850 async def ModelSet(self, config):
14851 '''
14852 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
14853 Returns -> None
14854 '''
14855 # map input types to rpc msg
14856 _params = dict()
14857 msg = dict(type='ModelConfig', request='ModelSet', version=1, params=_params)
14858 _params['config'] = config
14859 reply = await self.rpc(msg)
14860 return reply
14861
14862
14863
14864 @ReturnMapping(None)
14865 async def ModelUnset(self, keys):
14866 '''
14867 keys : typing.Sequence<+T_co>[str]
14868 Returns -> None
14869 '''
14870 # map input types to rpc msg
14871 _params = dict()
14872 msg = dict(type='ModelConfig', request='ModelUnset', version=1, params=_params)
14873 _params['keys'] = keys
14874 reply = await self.rpc(msg)
14875 return reply
14876
14877
14878 class ModelManagerFacade(Type):
14879 name = 'ModelManager'
14880 version = 2
14881 schema = {'definitions': {'Entities': {'additionalProperties': False,
14882 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14883 'type': 'array'}},
14884 'required': ['entities'],
14885 'type': 'object'},
14886 'Entity': {'additionalProperties': False,
14887 'properties': {'tag': {'type': 'string'}},
14888 'required': ['tag'],
14889 'type': 'object'},
14890 'EntityStatus': {'additionalProperties': False,
14891 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
14892 'type': 'object'}},
14893 'type': 'object'},
14894 'info': {'type': 'string'},
14895 'since': {'format': 'date-time',
14896 'type': 'string'},
14897 'status': {'type': 'string'}},
14898 'required': ['status', 'info', 'since'],
14899 'type': 'object'},
14900 'Error': {'additionalProperties': False,
14901 'properties': {'code': {'type': 'string'},
14902 'info': {'$ref': '#/definitions/ErrorInfo'},
14903 'message': {'type': 'string'}},
14904 'required': ['message', 'code'],
14905 'type': 'object'},
14906 'ErrorInfo': {'additionalProperties': False,
14907 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14908 'macaroon-path': {'type': 'string'}},
14909 'type': 'object'},
14910 'ErrorResult': {'additionalProperties': False,
14911 'properties': {'error': {'$ref': '#/definitions/Error'}},
14912 'type': 'object'},
14913 'ErrorResults': {'additionalProperties': False,
14914 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14915 'type': 'array'}},
14916 'required': ['results'],
14917 'type': 'object'},
14918 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14919 'MachineHardware': {'additionalProperties': False,
14920 'properties': {'arch': {'type': 'string'},
14921 'availability-zone': {'type': 'string'},
14922 'cores': {'type': 'integer'},
14923 'cpu-power': {'type': 'integer'},
14924 'mem': {'type': 'integer'},
14925 'root-disk': {'type': 'integer'},
14926 'tags': {'items': {'type': 'string'},
14927 'type': 'array'}},
14928 'type': 'object'},
14929 'MapResult': {'additionalProperties': False,
14930 'properties': {'error': {'$ref': '#/definitions/Error'},
14931 'result': {'patternProperties': {'.*': {'additionalProperties': True,
14932 'type': 'object'}},
14933 'type': 'object'}},
14934 'required': ['result'],
14935 'type': 'object'},
14936 'MapResults': {'additionalProperties': False,
14937 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
14938 'type': 'array'}},
14939 'required': ['results'],
14940 'type': 'object'},
14941 'Model': {'additionalProperties': False,
14942 'properties': {'name': {'type': 'string'},
14943 'owner-tag': {'type': 'string'},
14944 'uuid': {'type': 'string'}},
14945 'required': ['name', 'uuid', 'owner-tag'],
14946 'type': 'object'},
14947 'ModelCreateArgs': {'additionalProperties': False,
14948 'properties': {'cloud-tag': {'type': 'string'},
14949 'config': {'patternProperties': {'.*': {'additionalProperties': True,
14950 'type': 'object'}},
14951 'type': 'object'},
14952 'credential': {'type': 'string'},
14953 'name': {'type': 'string'},
14954 'owner-tag': {'type': 'string'},
14955 'region': {'type': 'string'}},
14956 'required': ['name', 'owner-tag'],
14957 'type': 'object'},
14958 'ModelDefaultValues': {'additionalProperties': False,
14959 'properties': {'cloud-region': {'type': 'string'},
14960 'cloud-tag': {'type': 'string'},
14961 'config': {'patternProperties': {'.*': {'additionalProperties': True,
14962 'type': 'object'}},
14963 'type': 'object'}},
14964 'required': ['config'],
14965 'type': 'object'},
14966 'ModelDefaults': {'additionalProperties': False,
14967 'properties': {'controller': {'additionalProperties': True,
14968 'type': 'object'},
14969 'default': {'additionalProperties': True,
14970 'type': 'object'},
14971 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
14972 'type': 'array'}},
14973 'type': 'object'},
14974 'ModelDefaultsResult': {'additionalProperties': False,
14975 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
14976 'type': 'object'}},
14977 'required': ['config'],
14978 'type': 'object'},
14979 'ModelInfo': {'additionalProperties': False,
14980 'properties': {'cloud-credential-tag': {'type': 'string'},
14981 'cloud-region': {'type': 'string'},
14982 'cloud-tag': {'type': 'string'},
14983 'controller-uuid': {'type': 'string'},
14984 'default-series': {'type': 'string'},
14985 'life': {'type': 'string'},
14986 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
14987 'type': 'array'},
14988 'name': {'type': 'string'},
14989 'owner-tag': {'type': 'string'},
14990 'provider-type': {'type': 'string'},
14991 'status': {'$ref': '#/definitions/EntityStatus'},
14992 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
14993 'type': 'array'},
14994 'uuid': {'type': 'string'}},
14995 'required': ['name',
14996 'uuid',
14997 'controller-uuid',
14998 'provider-type',
14999 'default-series',
15000 'cloud-tag',
15001 'owner-tag',
15002 'life',
15003 'status',
15004 'users',
15005 'machines'],
15006 'type': 'object'},
15007 'ModelInfoResult': {'additionalProperties': False,
15008 'properties': {'error': {'$ref': '#/definitions/Error'},
15009 'result': {'$ref': '#/definitions/ModelInfo'}},
15010 'type': 'object'},
15011 'ModelInfoResults': {'additionalProperties': False,
15012 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
15013 'type': 'array'}},
15014 'required': ['results'],
15015 'type': 'object'},
15016 'ModelMachineInfo': {'additionalProperties': False,
15017 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
15018 'has-vote': {'type': 'boolean'},
15019 'id': {'type': 'string'},
15020 'instance-id': {'type': 'string'},
15021 'status': {'type': 'string'},
15022 'wants-vote': {'type': 'boolean'}},
15023 'required': ['id'],
15024 'type': 'object'},
15025 'ModelStatus': {'additionalProperties': False,
15026 'properties': {'application-count': {'type': 'integer'},
15027 'hosted-machine-count': {'type': 'integer'},
15028 'life': {'type': 'string'},
15029 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
15030 'type': 'array'},
15031 'model-tag': {'type': 'string'},
15032 'owner-tag': {'type': 'string'}},
15033 'required': ['model-tag',
15034 'life',
15035 'hosted-machine-count',
15036 'application-count',
15037 'owner-tag'],
15038 'type': 'object'},
15039 'ModelStatusResults': {'additionalProperties': False,
15040 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
15041 'type': 'array'}},
15042 'required': ['models'],
15043 'type': 'object'},
15044 'ModelUnsetKeys': {'additionalProperties': False,
15045 'properties': {'cloud-region': {'type': 'string'},
15046 'cloud-tag': {'type': 'string'},
15047 'keys': {'items': {'type': 'string'},
15048 'type': 'array'}},
15049 'required': ['keys'],
15050 'type': 'object'},
15051 'ModelUserInfo': {'additionalProperties': False,
15052 'properties': {'access': {'type': 'string'},
15053 'display-name': {'type': 'string'},
15054 'last-connection': {'format': 'date-time',
15055 'type': 'string'},
15056 'user': {'type': 'string'}},
15057 'required': ['user',
15058 'display-name',
15059 'last-connection',
15060 'access'],
15061 'type': 'object'},
15062 'ModifyModelAccess': {'additionalProperties': False,
15063 'properties': {'access': {'type': 'string'},
15064 'action': {'type': 'string'},
15065 'model-tag': {'type': 'string'},
15066 'user-tag': {'type': 'string'}},
15067 'required': ['user-tag',
15068 'action',
15069 'access',
15070 'model-tag'],
15071 'type': 'object'},
15072 'ModifyModelAccessRequest': {'additionalProperties': False,
15073 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
15074 'type': 'array'}},
15075 'required': ['changes'],
15076 'type': 'object'},
15077 'RegionDefaults': {'additionalProperties': False,
15078 'properties': {'region-name': {'type': 'string'},
15079 'value': {'additionalProperties': True,
15080 'type': 'object'}},
15081 'required': ['region-name', 'value'],
15082 'type': 'object'},
15083 'SetModelDefaults': {'additionalProperties': False,
15084 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
15085 'type': 'array'}},
15086 'required': ['config'],
15087 'type': 'object'},
15088 'UnsetModelDefaults': {'additionalProperties': False,
15089 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
15090 'type': 'array'}},
15091 'required': ['keys'],
15092 'type': 'object'},
15093 'UserModel': {'additionalProperties': False,
15094 'properties': {'last-connection': {'format': 'date-time',
15095 'type': 'string'},
15096 'model': {'$ref': '#/definitions/Model'}},
15097 'required': ['model', 'last-connection'],
15098 'type': 'object'},
15099 'UserModelList': {'additionalProperties': False,
15100 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
15101 'type': 'array'}},
15102 'required': ['user-models'],
15103 'type': 'object'}},
15104 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
15105 'Result': {'$ref': '#/definitions/ModelInfo'}},
15106 'type': 'object'},
15107 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15108 'Result': {'$ref': '#/definitions/ErrorResults'}},
15109 'type': 'object'},
15110 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15111 'Result': {'$ref': '#/definitions/MapResults'}},
15112 'type': 'object'},
15113 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15114 'Result': {'$ref': '#/definitions/MapResults'}},
15115 'type': 'object'},
15116 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
15117 'Result': {'$ref': '#/definitions/UserModelList'}},
15118 'type': 'object'},
15119 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
15120 'type': 'object'},
15121 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15122 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
15123 'type': 'object'},
15124 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15125 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
15126 'type': 'object'},
15127 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
15128 'Result': {'$ref': '#/definitions/ErrorResults'}},
15129 'type': 'object'},
15130 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
15131 'Result': {'$ref': '#/definitions/ErrorResults'}},
15132 'type': 'object'},
15133 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
15134 'Result': {'$ref': '#/definitions/ErrorResults'}},
15135 'type': 'object'}},
15136 'type': 'object'}
15137
15138
15139 @ReturnMapping(ModelInfo)
15140 async def CreateModel(self, cloud_tag, config, credential, name, owner_tag, region):
15141 '''
15142 cloud_tag : str
15143 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
15144 credential : str
15145 name : str
15146 owner_tag : str
15147 region : str
15148 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
15149 '''
15150 # map input types to rpc msg
15151 _params = dict()
15152 msg = dict(type='ModelManager', request='CreateModel', version=2, params=_params)
15153 _params['cloud-tag'] = cloud_tag
15154 _params['config'] = config
15155 _params['credential'] = credential
15156 _params['name'] = name
15157 _params['owner-tag'] = owner_tag
15158 _params['region'] = region
15159 reply = await self.rpc(msg)
15160 return reply
15161
15162
15163
15164 @ReturnMapping(ErrorResults)
15165 async def DestroyModels(self, entities):
15166 '''
15167 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15168 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15169 '''
15170 # map input types to rpc msg
15171 _params = dict()
15172 msg = dict(type='ModelManager', request='DestroyModels', version=2, params=_params)
15173 _params['entities'] = entities
15174 reply = await self.rpc(msg)
15175 return reply
15176
15177
15178
15179 @ReturnMapping(MapResults)
15180 async def DumpModels(self, entities):
15181 '''
15182 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15183 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
15184 '''
15185 # map input types to rpc msg
15186 _params = dict()
15187 msg = dict(type='ModelManager', request='DumpModels', version=2, params=_params)
15188 _params['entities'] = entities
15189 reply = await self.rpc(msg)
15190 return reply
15191
15192
15193
15194 @ReturnMapping(MapResults)
15195 async def DumpModelsDB(self, entities):
15196 '''
15197 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15198 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
15199 '''
15200 # map input types to rpc msg
15201 _params = dict()
15202 msg = dict(type='ModelManager', request='DumpModelsDB', version=2, params=_params)
15203 _params['entities'] = entities
15204 reply = await self.rpc(msg)
15205 return reply
15206
15207
15208
15209 @ReturnMapping(UserModelList)
15210 async def ListModels(self, tag):
15211 '''
15212 tag : str
15213 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
15214 '''
15215 # map input types to rpc msg
15216 _params = dict()
15217 msg = dict(type='ModelManager', request='ListModels', version=2, params=_params)
15218 _params['tag'] = tag
15219 reply = await self.rpc(msg)
15220 return reply
15221
15222
15223
15224 @ReturnMapping(ModelDefaultsResult)
15225 async def ModelDefaults(self):
15226 '''
15227
15228 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
15229 '''
15230 # map input types to rpc msg
15231 _params = dict()
15232 msg = dict(type='ModelManager', request='ModelDefaults', version=2, params=_params)
15233
15234 reply = await self.rpc(msg)
15235 return reply
15236
15237
15238
15239 @ReturnMapping(ModelInfoResults)
15240 async def ModelInfo(self, entities):
15241 '''
15242 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15243 Returns -> typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
15244 '''
15245 # map input types to rpc msg
15246 _params = dict()
15247 msg = dict(type='ModelManager', request='ModelInfo', version=2, params=_params)
15248 _params['entities'] = entities
15249 reply = await self.rpc(msg)
15250 return reply
15251
15252
15253
15254 @ReturnMapping(ModelStatusResults)
15255 async def ModelStatus(self, entities):
15256 '''
15257 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15258 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
15259 '''
15260 # map input types to rpc msg
15261 _params = dict()
15262 msg = dict(type='ModelManager', request='ModelStatus', version=2, params=_params)
15263 _params['entities'] = entities
15264 reply = await self.rpc(msg)
15265 return reply
15266
15267
15268
15269 @ReturnMapping(ErrorResults)
15270 async def ModifyModelAccess(self, changes):
15271 '''
15272 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
15273 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15274 '''
15275 # map input types to rpc msg
15276 _params = dict()
15277 msg = dict(type='ModelManager', request='ModifyModelAccess', version=2, params=_params)
15278 _params['changes'] = changes
15279 reply = await self.rpc(msg)
15280 return reply
15281
15282
15283
15284 @ReturnMapping(ErrorResults)
15285 async def SetModelDefaults(self, config):
15286 '''
15287 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
15288 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15289 '''
15290 # map input types to rpc msg
15291 _params = dict()
15292 msg = dict(type='ModelManager', request='SetModelDefaults', version=2, params=_params)
15293 _params['config'] = config
15294 reply = await self.rpc(msg)
15295 return reply
15296
15297
15298
15299 @ReturnMapping(ErrorResults)
15300 async def UnsetModelDefaults(self, keys):
15301 '''
15302 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
15303 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15304 '''
15305 # map input types to rpc msg
15306 _params = dict()
15307 msg = dict(type='ModelManager', request='UnsetModelDefaults', version=2, params=_params)
15308 _params['keys'] = keys
15309 reply = await self.rpc(msg)
15310 return reply
15311
15312
15313 class NotifyWatcherFacade(Type):
15314 name = 'NotifyWatcher'
15315 version = 1
15316 schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
15317 'type': 'object'}
15318
15319
15320 @ReturnMapping(None)
15321 async def Next(self):
15322 '''
15323
15324 Returns -> None
15325 '''
15326 # map input types to rpc msg
15327 _params = dict()
15328 msg = dict(type='NotifyWatcher', request='Next', version=1, params=_params)
15329
15330 reply = await self.rpc(msg)
15331 return reply
15332
15333
15334
15335 @ReturnMapping(None)
15336 async def Stop(self):
15337 '''
15338
15339 Returns -> None
15340 '''
15341 # map input types to rpc msg
15342 _params = dict()
15343 msg = dict(type='NotifyWatcher', request='Stop', version=1, params=_params)
15344
15345 reply = await self.rpc(msg)
15346 return reply
15347
15348
15349 class PingerFacade(Type):
15350 name = 'Pinger'
15351 version = 1
15352 schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
15353 'type': 'object'}
15354
15355
15356 @ReturnMapping(None)
15357 async def Ping(self):
15358 '''
15359
15360 Returns -> None
15361 '''
15362 # map input types to rpc msg
15363 _params = dict()
15364 msg = dict(type='Pinger', request='Ping', version=1, params=_params)
15365
15366 reply = await self.rpc(msg)
15367 return reply
15368
15369
15370
15371 @ReturnMapping(None)
15372 async def Stop(self):
15373 '''
15374
15375 Returns -> None
15376 '''
15377 # map input types to rpc msg
15378 _params = dict()
15379 msg = dict(type='Pinger', request='Stop', version=1, params=_params)
15380
15381 reply = await self.rpc(msg)
15382 return reply
15383
15384
15385 class ProvisionerFacade(Type):
15386 name = 'Provisioner'
15387 version = 3
15388 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
15389 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
15390 'type': 'array'},
15391 'type': 'array'}},
15392 'required': ['servers'],
15393 'type': 'object'},
15394 'Address': {'additionalProperties': False,
15395 'properties': {'scope': {'type': 'string'},
15396 'space-name': {'type': 'string'},
15397 'type': {'type': 'string'},
15398 'value': {'type': 'string'}},
15399 'required': ['value', 'type', 'scope'],
15400 'type': 'object'},
15401 'Binary': {'additionalProperties': False,
15402 'properties': {'Arch': {'type': 'string'},
15403 'Number': {'$ref': '#/definitions/Number'},
15404 'Series': {'type': 'string'}},
15405 'required': ['Number', 'Series', 'Arch'],
15406 'type': 'object'},
15407 'BytesResult': {'additionalProperties': False,
15408 'properties': {'result': {'items': {'type': 'integer'},
15409 'type': 'array'}},
15410 'required': ['result'],
15411 'type': 'object'},
15412 'CloudImageMetadata': {'additionalProperties': False,
15413 'properties': {'arch': {'type': 'string'},
15414 'image-id': {'type': 'string'},
15415 'priority': {'type': 'integer'},
15416 'region': {'type': 'string'},
15417 'root-storage-size': {'type': 'integer'},
15418 'root-storage-type': {'type': 'string'},
15419 'series': {'type': 'string'},
15420 'source': {'type': 'string'},
15421 'stream': {'type': 'string'},
15422 'version': {'type': 'string'},
15423 'virt-type': {'type': 'string'}},
15424 'required': ['image-id',
15425 'region',
15426 'version',
15427 'series',
15428 'arch',
15429 'source',
15430 'priority'],
15431 'type': 'object'},
15432 'ConstraintsResult': {'additionalProperties': False,
15433 'properties': {'constraints': {'$ref': '#/definitions/Value'},
15434 'error': {'$ref': '#/definitions/Error'}},
15435 'required': ['constraints'],
15436 'type': 'object'},
15437 'ConstraintsResults': {'additionalProperties': False,
15438 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
15439 'type': 'array'}},
15440 'required': ['results'],
15441 'type': 'object'},
15442 'ContainerConfig': {'additionalProperties': False,
15443 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
15444 'apt-mirror': {'type': 'string'},
15445 'apt-proxy': {'$ref': '#/definitions/Settings'},
15446 'authorized-keys': {'type': 'string'},
15447 'provider-type': {'type': 'string'},
15448 'proxy': {'$ref': '#/definitions/Settings'},
15449 'ssl-hostname-verification': {'type': 'boolean'}},
15450 'required': ['provider-type',
15451 'authorized-keys',
15452 'ssl-hostname-verification',
15453 'proxy',
15454 'apt-proxy',
15455 'apt-mirror',
15456 'UpdateBehavior'],
15457 'type': 'object'},
15458 'ContainerManagerConfig': {'additionalProperties': False,
15459 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
15460 'type': 'object'}},
15461 'required': ['config'],
15462 'type': 'object'},
15463 'ContainerManagerConfigParams': {'additionalProperties': False,
15464 'properties': {'type': {'type': 'string'}},
15465 'required': ['type'],
15466 'type': 'object'},
15467 'ControllerConfigResult': {'additionalProperties': False,
15468 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
15469 'type': 'object'}},
15470 'type': 'object'}},
15471 'required': ['config'],
15472 'type': 'object'},
15473 'DistributionGroupResult': {'additionalProperties': False,
15474 'properties': {'error': {'$ref': '#/definitions/Error'},
15475 'result': {'items': {'type': 'string'},
15476 'type': 'array'}},
15477 'required': ['result'],
15478 'type': 'object'},
15479 'DistributionGroupResults': {'additionalProperties': False,
15480 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
15481 'type': 'array'}},
15482 'required': ['results'],
15483 'type': 'object'},
15484 'Entities': {'additionalProperties': False,
15485 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15486 'type': 'array'}},
15487 'required': ['entities'],
15488 'type': 'object'},
15489 'Entity': {'additionalProperties': False,
15490 'properties': {'tag': {'type': 'string'}},
15491 'required': ['tag'],
15492 'type': 'object'},
15493 'EntityPassword': {'additionalProperties': False,
15494 'properties': {'password': {'type': 'string'},
15495 'tag': {'type': 'string'}},
15496 'required': ['tag', 'password'],
15497 'type': 'object'},
15498 'EntityPasswords': {'additionalProperties': False,
15499 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
15500 'type': 'array'}},
15501 'required': ['changes'],
15502 'type': 'object'},
15503 'EntityStatusArgs': {'additionalProperties': False,
15504 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15505 'type': 'object'}},
15506 'type': 'object'},
15507 'info': {'type': 'string'},
15508 'status': {'type': 'string'},
15509 'tag': {'type': 'string'}},
15510 'required': ['tag',
15511 'status',
15512 'info',
15513 'data'],
15514 'type': 'object'},
15515 'Error': {'additionalProperties': False,
15516 'properties': {'code': {'type': 'string'},
15517 'info': {'$ref': '#/definitions/ErrorInfo'},
15518 'message': {'type': 'string'}},
15519 'required': ['message', 'code'],
15520 'type': 'object'},
15521 'ErrorInfo': {'additionalProperties': False,
15522 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15523 'macaroon-path': {'type': 'string'}},
15524 'type': 'object'},
15525 'ErrorResult': {'additionalProperties': False,
15526 'properties': {'error': {'$ref': '#/definitions/Error'}},
15527 'type': 'object'},
15528 'ErrorResults': {'additionalProperties': False,
15529 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15530 'type': 'array'}},
15531 'required': ['results'],
15532 'type': 'object'},
15533 'FindToolsParams': {'additionalProperties': False,
15534 'properties': {'arch': {'type': 'string'},
15535 'major': {'type': 'integer'},
15536 'minor': {'type': 'integer'},
15537 'number': {'$ref': '#/definitions/Number'},
15538 'series': {'type': 'string'}},
15539 'required': ['number',
15540 'major',
15541 'minor',
15542 'arch',
15543 'series'],
15544 'type': 'object'},
15545 'FindToolsResult': {'additionalProperties': False,
15546 'properties': {'error': {'$ref': '#/definitions/Error'},
15547 'list': {'items': {'$ref': '#/definitions/Tools'},
15548 'type': 'array'}},
15549 'required': ['list'],
15550 'type': 'object'},
15551 'HardwareCharacteristics': {'additionalProperties': False,
15552 'properties': {'arch': {'type': 'string'},
15553 'availability-zone': {'type': 'string'},
15554 'cpu-cores': {'type': 'integer'},
15555 'cpu-power': {'type': 'integer'},
15556 'mem': {'type': 'integer'},
15557 'root-disk': {'type': 'integer'},
15558 'tags': {'items': {'type': 'string'},
15559 'type': 'array'}},
15560 'type': 'object'},
15561 'HostPort': {'additionalProperties': False,
15562 'properties': {'Address': {'$ref': '#/definitions/Address'},
15563 'port': {'type': 'integer'}},
15564 'required': ['Address', 'port'],
15565 'type': 'object'},
15566 'InstanceInfo': {'additionalProperties': False,
15567 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
15568 'instance-id': {'type': 'string'},
15569 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
15570 'type': 'array'},
15571 'nonce': {'type': 'string'},
15572 'tag': {'type': 'string'},
15573 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
15574 'type': 'object'},
15575 'volumes': {'items': {'$ref': '#/definitions/Volume'},
15576 'type': 'array'}},
15577 'required': ['tag',
15578 'instance-id',
15579 'nonce',
15580 'characteristics',
15581 'volumes',
15582 'volume-attachments',
15583 'network-config'],
15584 'type': 'object'},
15585 'InstancesInfo': {'additionalProperties': False,
15586 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
15587 'type': 'array'}},
15588 'required': ['machines'],
15589 'type': 'object'},
15590 'LifeResult': {'additionalProperties': False,
15591 'properties': {'error': {'$ref': '#/definitions/Error'},
15592 'life': {'type': 'string'}},
15593 'required': ['life'],
15594 'type': 'object'},
15595 'LifeResults': {'additionalProperties': False,
15596 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
15597 'type': 'array'}},
15598 'required': ['results'],
15599 'type': 'object'},
15600 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15601 'MachineContainers': {'additionalProperties': False,
15602 'properties': {'container-types': {'items': {'type': 'string'},
15603 'type': 'array'},
15604 'machine-tag': {'type': 'string'}},
15605 'required': ['machine-tag',
15606 'container-types'],
15607 'type': 'object'},
15608 'MachineContainersParams': {'additionalProperties': False,
15609 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
15610 'type': 'array'}},
15611 'required': ['params'],
15612 'type': 'object'},
15613 'MachineNetworkConfigResult': {'additionalProperties': False,
15614 'properties': {'error': {'$ref': '#/definitions/Error'},
15615 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
15616 'type': 'array'}},
15617 'required': ['info'],
15618 'type': 'object'},
15619 'MachineNetworkConfigResults': {'additionalProperties': False,
15620 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
15621 'type': 'array'}},
15622 'required': ['results'],
15623 'type': 'object'},
15624 'ModelConfigResult': {'additionalProperties': False,
15625 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
15626 'type': 'object'}},
15627 'type': 'object'}},
15628 'required': ['config'],
15629 'type': 'object'},
15630 'NetworkConfig': {'additionalProperties': False,
15631 'properties': {'address': {'type': 'string'},
15632 'cidr': {'type': 'string'},
15633 'config-type': {'type': 'string'},
15634 'device-index': {'type': 'integer'},
15635 'disabled': {'type': 'boolean'},
15636 'dns-search-domains': {'items': {'type': 'string'},
15637 'type': 'array'},
15638 'dns-servers': {'items': {'type': 'string'},
15639 'type': 'array'},
15640 'gateway-address': {'type': 'string'},
15641 'interface-name': {'type': 'string'},
15642 'interface-type': {'type': 'string'},
15643 'mac-address': {'type': 'string'},
15644 'mtu': {'type': 'integer'},
15645 'no-auto-start': {'type': 'boolean'},
15646 'parent-interface-name': {'type': 'string'},
15647 'provider-address-id': {'type': 'string'},
15648 'provider-id': {'type': 'string'},
15649 'provider-space-id': {'type': 'string'},
15650 'provider-subnet-id': {'type': 'string'},
15651 'provider-vlan-id': {'type': 'string'},
15652 'vlan-tag': {'type': 'integer'}},
15653 'required': ['device-index',
15654 'mac-address',
15655 'cidr',
15656 'mtu',
15657 'provider-id',
15658 'provider-subnet-id',
15659 'provider-space-id',
15660 'provider-address-id',
15661 'provider-vlan-id',
15662 'vlan-tag',
15663 'interface-name',
15664 'parent-interface-name',
15665 'interface-type',
15666 'disabled'],
15667 'type': 'object'},
15668 'NotifyWatchResult': {'additionalProperties': False,
15669 'properties': {'NotifyWatcherId': {'type': 'string'},
15670 'error': {'$ref': '#/definitions/Error'}},
15671 'required': ['NotifyWatcherId'],
15672 'type': 'object'},
15673 'Number': {'additionalProperties': False,
15674 'properties': {'Build': {'type': 'integer'},
15675 'Major': {'type': 'integer'},
15676 'Minor': {'type': 'integer'},
15677 'Patch': {'type': 'integer'},
15678 'Tag': {'type': 'string'}},
15679 'required': ['Major',
15680 'Minor',
15681 'Tag',
15682 'Patch',
15683 'Build'],
15684 'type': 'object'},
15685 'ProvisioningInfo': {'additionalProperties': False,
15686 'properties': {'constraints': {'$ref': '#/definitions/Value'},
15687 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
15688 'type': 'object'}},
15689 'type': 'object'},
15690 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
15691 'type': 'object'},
15692 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
15693 'type': 'array'},
15694 'jobs': {'items': {'type': 'string'},
15695 'type': 'array'},
15696 'placement': {'type': 'string'},
15697 'series': {'type': 'string'},
15698 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
15699 'type': 'array'}},
15700 'type': 'object'},
15701 'tags': {'patternProperties': {'.*': {'type': 'string'}},
15702 'type': 'object'},
15703 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
15704 'type': 'array'}},
15705 'required': ['constraints',
15706 'series',
15707 'placement',
15708 'jobs'],
15709 'type': 'object'},
15710 'ProvisioningInfoResult': {'additionalProperties': False,
15711 'properties': {'error': {'$ref': '#/definitions/Error'},
15712 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
15713 'required': ['result'],
15714 'type': 'object'},
15715 'ProvisioningInfoResults': {'additionalProperties': False,
15716 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
15717 'type': 'array'}},
15718 'required': ['results'],
15719 'type': 'object'},
15720 'SetStatus': {'additionalProperties': False,
15721 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15722 'type': 'array'}},
15723 'required': ['entities'],
15724 'type': 'object'},
15725 'Settings': {'additionalProperties': False,
15726 'properties': {'Ftp': {'type': 'string'},
15727 'Http': {'type': 'string'},
15728 'Https': {'type': 'string'},
15729 'NoProxy': {'type': 'string'}},
15730 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
15731 'type': 'object'},
15732 'StatusResult': {'additionalProperties': False,
15733 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15734 'type': 'object'}},
15735 'type': 'object'},
15736 'error': {'$ref': '#/definitions/Error'},
15737 'id': {'type': 'string'},
15738 'info': {'type': 'string'},
15739 'life': {'type': 'string'},
15740 'since': {'format': 'date-time',
15741 'type': 'string'},
15742 'status': {'type': 'string'}},
15743 'required': ['id',
15744 'life',
15745 'status',
15746 'info',
15747 'data',
15748 'since'],
15749 'type': 'object'},
15750 'StatusResults': {'additionalProperties': False,
15751 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
15752 'type': 'array'}},
15753 'required': ['results'],
15754 'type': 'object'},
15755 'StringResult': {'additionalProperties': False,
15756 'properties': {'error': {'$ref': '#/definitions/Error'},
15757 'result': {'type': 'string'}},
15758 'required': ['result'],
15759 'type': 'object'},
15760 'StringResults': {'additionalProperties': False,
15761 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
15762 'type': 'array'}},
15763 'required': ['results'],
15764 'type': 'object'},
15765 'StringsResult': {'additionalProperties': False,
15766 'properties': {'error': {'$ref': '#/definitions/Error'},
15767 'result': {'items': {'type': 'string'},
15768 'type': 'array'}},
15769 'type': 'object'},
15770 'StringsWatchResult': {'additionalProperties': False,
15771 'properties': {'changes': {'items': {'type': 'string'},
15772 'type': 'array'},
15773 'error': {'$ref': '#/definitions/Error'},
15774 'watcher-id': {'type': 'string'}},
15775 'required': ['watcher-id'],
15776 'type': 'object'},
15777 'StringsWatchResults': {'additionalProperties': False,
15778 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
15779 'type': 'array'}},
15780 'required': ['results'],
15781 'type': 'object'},
15782 'Tools': {'additionalProperties': False,
15783 'properties': {'sha256': {'type': 'string'},
15784 'size': {'type': 'integer'},
15785 'url': {'type': 'string'},
15786 'version': {'$ref': '#/definitions/Binary'}},
15787 'required': ['version', 'url', 'size'],
15788 'type': 'object'},
15789 'ToolsResult': {'additionalProperties': False,
15790 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
15791 'error': {'$ref': '#/definitions/Error'},
15792 'tools': {'items': {'$ref': '#/definitions/Tools'},
15793 'type': 'array'}},
15794 'required': ['tools',
15795 'disable-ssl-hostname-verification'],
15796 'type': 'object'},
15797 'ToolsResults': {'additionalProperties': False,
15798 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
15799 'type': 'array'}},
15800 'required': ['results'],
15801 'type': 'object'},
15802 'UpdateBehavior': {'additionalProperties': False,
15803 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
15804 'enable-os-upgrade': {'type': 'boolean'}},
15805 'required': ['enable-os-refresh-update',
15806 'enable-os-upgrade'],
15807 'type': 'object'},
15808 'Value': {'additionalProperties': False,
15809 'properties': {'arch': {'type': 'string'},
15810 'container': {'type': 'string'},
15811 'cores': {'type': 'integer'},
15812 'cpu-power': {'type': 'integer'},
15813 'instance-type': {'type': 'string'},
15814 'mem': {'type': 'integer'},
15815 'root-disk': {'type': 'integer'},
15816 'spaces': {'items': {'type': 'string'},
15817 'type': 'array'},
15818 'tags': {'items': {'type': 'string'},
15819 'type': 'array'},
15820 'virt-type': {'type': 'string'}},
15821 'type': 'object'},
15822 'Volume': {'additionalProperties': False,
15823 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
15824 'volume-tag': {'type': 'string'}},
15825 'required': ['volume-tag', 'info'],
15826 'type': 'object'},
15827 'VolumeAttachmentInfo': {'additionalProperties': False,
15828 'properties': {'bus-address': {'type': 'string'},
15829 'device-link': {'type': 'string'},
15830 'device-name': {'type': 'string'},
15831 'read-only': {'type': 'boolean'}},
15832 'type': 'object'},
15833 'VolumeAttachmentParams': {'additionalProperties': False,
15834 'properties': {'instance-id': {'type': 'string'},
15835 'machine-tag': {'type': 'string'},
15836 'provider': {'type': 'string'},
15837 'read-only': {'type': 'boolean'},
15838 'volume-id': {'type': 'string'},
15839 'volume-tag': {'type': 'string'}},
15840 'required': ['volume-tag',
15841 'machine-tag',
15842 'provider'],
15843 'type': 'object'},
15844 'VolumeInfo': {'additionalProperties': False,
15845 'properties': {'hardware-id': {'type': 'string'},
15846 'persistent': {'type': 'boolean'},
15847 'size': {'type': 'integer'},
15848 'volume-id': {'type': 'string'}},
15849 'required': ['volume-id', 'size', 'persistent'],
15850 'type': 'object'},
15851 'VolumeParams': {'additionalProperties': False,
15852 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
15853 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
15854 'type': 'object'}},
15855 'type': 'object'},
15856 'provider': {'type': 'string'},
15857 'size': {'type': 'integer'},
15858 'tags': {'patternProperties': {'.*': {'type': 'string'}},
15859 'type': 'object'},
15860 'volume-tag': {'type': 'string'}},
15861 'required': ['volume-tag',
15862 'size',
15863 'provider'],
15864 'type': 'object'},
15865 'WatchContainer': {'additionalProperties': False,
15866 'properties': {'container-type': {'type': 'string'},
15867 'machine-tag': {'type': 'string'}},
15868 'required': ['machine-tag',
15869 'container-type'],
15870 'type': 'object'},
15871 'WatchContainers': {'additionalProperties': False,
15872 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
15873 'type': 'array'}},
15874 'required': ['params'],
15875 'type': 'object'}},
15876 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
15877 'type': 'object'},
15878 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
15879 'type': 'object'},
15880 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
15881 'type': 'object'},
15882 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15883 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
15884 'type': 'object'},
15885 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
15886 'type': 'object'},
15887 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
15888 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
15889 'type': 'object'},
15890 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
15891 'type': 'object'},
15892 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15893 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
15894 'type': 'object'},
15895 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15896 'Result': {'$ref': '#/definitions/ErrorResults'}},
15897 'type': 'object'},
15898 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
15899 'Result': {'$ref': '#/definitions/FindToolsResult'}},
15900 'type': 'object'},
15901 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15902 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
15903 'type': 'object'},
15904 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15905 'Result': {'$ref': '#/definitions/StringResults'}},
15906 'type': 'object'},
15907 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15908 'Result': {'$ref': '#/definitions/StatusResults'}},
15909 'type': 'object'},
15910 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15911 'Result': {'$ref': '#/definitions/LifeResults'}},
15912 'type': 'object'},
15913 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
15914 'type': 'object'},
15915 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15916 'Result': {'$ref': '#/definitions/ErrorResults'}},
15917 'type': 'object'},
15918 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
15919 'type': 'object'},
15920 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
15921 'type': 'object'},
15922 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15923 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
15924 'type': 'object'},
15925 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15926 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
15927 'type': 'object'},
15928 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15929 'Result': {'$ref': '#/definitions/ErrorResults'}},
15930 'type': 'object'},
15931 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15932 'Result': {'$ref': '#/definitions/ErrorResults'}},
15933 'type': 'object'},
15934 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15935 'Result': {'$ref': '#/definitions/StringResults'}},
15936 'type': 'object'},
15937 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
15938 'Result': {'$ref': '#/definitions/ErrorResults'}},
15939 'type': 'object'},
15940 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15941 'Result': {'$ref': '#/definitions/ErrorResults'}},
15942 'type': 'object'},
15943 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
15944 'Result': {'$ref': '#/definitions/ErrorResults'}},
15945 'type': 'object'},
15946 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15947 'Result': {'$ref': '#/definitions/ErrorResults'}},
15948 'type': 'object'},
15949 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
15950 'Result': {'$ref': '#/definitions/ErrorResults'}},
15951 'type': 'object'},
15952 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
15953 'type': 'object'},
15954 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15955 'Result': {'$ref': '#/definitions/StatusResults'}},
15956 'type': 'object'},
15957 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15958 'Result': {'$ref': '#/definitions/ToolsResults'}},
15959 'type': 'object'},
15960 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15961 'Result': {'$ref': '#/definitions/ErrorResults'}},
15962 'type': 'object'},
15963 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15964 'type': 'object'},
15965 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
15966 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
15967 'type': 'object'},
15968 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
15969 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
15970 'type': 'object'},
15971 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15972 'type': 'object'},
15973 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15974 'type': 'object'},
15975 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
15976 'type': 'object'}},
15977 'type': 'object'}
15978
15979
15980 @ReturnMapping(StringsResult)
15981 async def APIAddresses(self):
15982 '''
15983
15984 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
15985 '''
15986 # map input types to rpc msg
15987 _params = dict()
15988 msg = dict(type='Provisioner', request='APIAddresses', version=3, params=_params)
15989
15990 reply = await self.rpc(msg)
15991 return reply
15992
15993
15994
15995 @ReturnMapping(APIHostPortsResult)
15996 async def APIHostPorts(self):
15997 '''
15998
15999 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
16000 '''
16001 # map input types to rpc msg
16002 _params = dict()
16003 msg = dict(type='Provisioner', request='APIHostPorts', version=3, params=_params)
16004
16005 reply = await self.rpc(msg)
16006 return reply
16007
16008
16009
16010 @ReturnMapping(BytesResult)
16011 async def CACert(self):
16012 '''
16013
16014 Returns -> typing.Sequence<+T_co>[int]
16015 '''
16016 # map input types to rpc msg
16017 _params = dict()
16018 msg = dict(type='Provisioner', request='CACert', version=3, params=_params)
16019
16020 reply = await self.rpc(msg)
16021 return reply
16022
16023
16024
16025 @ReturnMapping(ConstraintsResults)
16026 async def Constraints(self, entities):
16027 '''
16028 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16029 Returns -> typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
16030 '''
16031 # map input types to rpc msg
16032 _params = dict()
16033 msg = dict(type='Provisioner', request='Constraints', version=3, params=_params)
16034 _params['entities'] = entities
16035 reply = await self.rpc(msg)
16036 return reply
16037
16038
16039
16040 @ReturnMapping(ContainerConfig)
16041 async def ContainerConfig(self):
16042 '''
16043
16044 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool]
16045 '''
16046 # map input types to rpc msg
16047 _params = dict()
16048 msg = dict(type='Provisioner', request='ContainerConfig', version=3, params=_params)
16049
16050 reply = await self.rpc(msg)
16051 return reply
16052
16053
16054
16055 @ReturnMapping(ContainerManagerConfig)
16056 async def ContainerManagerConfig(self, type_):
16057 '''
16058 type_ : str
16059 Returns -> typing.Mapping<~KT, +VT_co>[str, str]
16060 '''
16061 # map input types to rpc msg
16062 _params = dict()
16063 msg = dict(type='Provisioner', request='ContainerManagerConfig', version=3, params=_params)
16064 _params['type'] = type_
16065 reply = await self.rpc(msg)
16066 return reply
16067
16068
16069
16070 @ReturnMapping(ControllerConfigResult)
16071 async def ControllerConfig(self):
16072 '''
16073
16074 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
16075 '''
16076 # map input types to rpc msg
16077 _params = dict()
16078 msg = dict(type='Provisioner', request='ControllerConfig', version=3, params=_params)
16079
16080 reply = await self.rpc(msg)
16081 return reply
16082
16083
16084
16085 @ReturnMapping(DistributionGroupResults)
16086 async def DistributionGroup(self, entities):
16087 '''
16088 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16089 Returns -> typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
16090 '''
16091 # map input types to rpc msg
16092 _params = dict()
16093 msg = dict(type='Provisioner', request='DistributionGroup', version=3, params=_params)
16094 _params['entities'] = entities
16095 reply = await self.rpc(msg)
16096 return reply
16097
16098
16099
16100 @ReturnMapping(ErrorResults)
16101 async def EnsureDead(self, entities):
16102 '''
16103 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16104 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16105 '''
16106 # map input types to rpc msg
16107 _params = dict()
16108 msg = dict(type='Provisioner', request='EnsureDead', version=3, params=_params)
16109 _params['entities'] = entities
16110 reply = await self.rpc(msg)
16111 return reply
16112
16113
16114
16115 @ReturnMapping(FindToolsResult)
16116 async def FindTools(self, arch, major, minor, number, series):
16117 '''
16118 arch : str
16119 major : int
16120 minor : int
16121 number : Number
16122 series : str
16123 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
16124 '''
16125 # map input types to rpc msg
16126 _params = dict()
16127 msg = dict(type='Provisioner', request='FindTools', version=3, params=_params)
16128 _params['arch'] = arch
16129 _params['major'] = major
16130 _params['minor'] = minor
16131 _params['number'] = number
16132 _params['series'] = series
16133 reply = await self.rpc(msg)
16134 return reply
16135
16136
16137
16138 @ReturnMapping(MachineNetworkConfigResults)
16139 async def GetContainerInterfaceInfo(self, entities):
16140 '''
16141 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16142 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
16143 '''
16144 # map input types to rpc msg
16145 _params = dict()
16146 msg = dict(type='Provisioner', request='GetContainerInterfaceInfo', version=3, params=_params)
16147 _params['entities'] = entities
16148 reply = await self.rpc(msg)
16149 return reply
16150
16151
16152
16153 @ReturnMapping(StringResults)
16154 async def InstanceId(self, entities):
16155 '''
16156 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16157 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
16158 '''
16159 # map input types to rpc msg
16160 _params = dict()
16161 msg = dict(type='Provisioner', request='InstanceId', version=3, params=_params)
16162 _params['entities'] = entities
16163 reply = await self.rpc(msg)
16164 return reply
16165
16166
16167
16168 @ReturnMapping(StatusResults)
16169 async def InstanceStatus(self, entities):
16170 '''
16171 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16172 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
16173 '''
16174 # map input types to rpc msg
16175 _params = dict()
16176 msg = dict(type='Provisioner', request='InstanceStatus', version=3, params=_params)
16177 _params['entities'] = entities
16178 reply = await self.rpc(msg)
16179 return reply
16180
16181
16182
16183 @ReturnMapping(LifeResults)
16184 async def Life(self, entities):
16185 '''
16186 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16187 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
16188 '''
16189 # map input types to rpc msg
16190 _params = dict()
16191 msg = dict(type='Provisioner', request='Life', version=3, params=_params)
16192 _params['entities'] = entities
16193 reply = await self.rpc(msg)
16194 return reply
16195
16196
16197
16198 @ReturnMapping(StatusResults)
16199 async def MachinesWithTransientErrors(self):
16200 '''
16201
16202 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
16203 '''
16204 # map input types to rpc msg
16205 _params = dict()
16206 msg = dict(type='Provisioner', request='MachinesWithTransientErrors', version=3, params=_params)
16207
16208 reply = await self.rpc(msg)
16209 return reply
16210
16211
16212
16213 @ReturnMapping(ErrorResults)
16214 async def MarkMachinesForRemoval(self, entities):
16215 '''
16216 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16217 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16218 '''
16219 # map input types to rpc msg
16220 _params = dict()
16221 msg = dict(type='Provisioner', request='MarkMachinesForRemoval', version=3, params=_params)
16222 _params['entities'] = entities
16223 reply = await self.rpc(msg)
16224 return reply
16225
16226
16227
16228 @ReturnMapping(ModelConfigResult)
16229 async def ModelConfig(self):
16230 '''
16231
16232 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
16233 '''
16234 # map input types to rpc msg
16235 _params = dict()
16236 msg = dict(type='Provisioner', request='ModelConfig', version=3, params=_params)
16237
16238 reply = await self.rpc(msg)
16239 return reply
16240
16241
16242
16243 @ReturnMapping(StringResult)
16244 async def ModelUUID(self):
16245 '''
16246
16247 Returns -> typing.Union[_ForwardRef('Error'), str]
16248 '''
16249 # map input types to rpc msg
16250 _params = dict()
16251 msg = dict(type='Provisioner', request='ModelUUID', version=3, params=_params)
16252
16253 reply = await self.rpc(msg)
16254 return reply
16255
16256
16257
16258 @ReturnMapping(MachineNetworkConfigResults)
16259 async def PrepareContainerInterfaceInfo(self, entities):
16260 '''
16261 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16262 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
16263 '''
16264 # map input types to rpc msg
16265 _params = dict()
16266 msg = dict(type='Provisioner', request='PrepareContainerInterfaceInfo', version=3, params=_params)
16267 _params['entities'] = entities
16268 reply = await self.rpc(msg)
16269 return reply
16270
16271
16272
16273 @ReturnMapping(ProvisioningInfoResults)
16274 async def ProvisioningInfo(self, entities):
16275 '''
16276 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16277 Returns -> typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
16278 '''
16279 # map input types to rpc msg
16280 _params = dict()
16281 msg = dict(type='Provisioner', request='ProvisioningInfo', version=3, params=_params)
16282 _params['entities'] = entities
16283 reply = await self.rpc(msg)
16284 return reply
16285
16286
16287
16288 @ReturnMapping(ErrorResults)
16289 async def ReleaseContainerAddresses(self, entities):
16290 '''
16291 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16292 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16293 '''
16294 # map input types to rpc msg
16295 _params = dict()
16296 msg = dict(type='Provisioner', request='ReleaseContainerAddresses', version=3, params=_params)
16297 _params['entities'] = entities
16298 reply = await self.rpc(msg)
16299 return reply
16300
16301
16302
16303 @ReturnMapping(ErrorResults)
16304 async def Remove(self, entities):
16305 '''
16306 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16307 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16308 '''
16309 # map input types to rpc msg
16310 _params = dict()
16311 msg = dict(type='Provisioner', request='Remove', version=3, params=_params)
16312 _params['entities'] = entities
16313 reply = await self.rpc(msg)
16314 return reply
16315
16316
16317
16318 @ReturnMapping(StringResults)
16319 async def Series(self, entities):
16320 '''
16321 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16322 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
16323 '''
16324 # map input types to rpc msg
16325 _params = dict()
16326 msg = dict(type='Provisioner', request='Series', version=3, params=_params)
16327 _params['entities'] = entities
16328 reply = await self.rpc(msg)
16329 return reply
16330
16331
16332
16333 @ReturnMapping(ErrorResults)
16334 async def SetInstanceInfo(self, machines):
16335 '''
16336 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
16337 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16338 '''
16339 # map input types to rpc msg
16340 _params = dict()
16341 msg = dict(type='Provisioner', request='SetInstanceInfo', version=3, params=_params)
16342 _params['machines'] = machines
16343 reply = await self.rpc(msg)
16344 return reply
16345
16346
16347
16348 @ReturnMapping(ErrorResults)
16349 async def SetInstanceStatus(self, entities):
16350 '''
16351 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
16352 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16353 '''
16354 # map input types to rpc msg
16355 _params = dict()
16356 msg = dict(type='Provisioner', request='SetInstanceStatus', version=3, params=_params)
16357 _params['entities'] = entities
16358 reply = await self.rpc(msg)
16359 return reply
16360
16361
16362
16363 @ReturnMapping(ErrorResults)
16364 async def SetPasswords(self, changes):
16365 '''
16366 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
16367 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16368 '''
16369 # map input types to rpc msg
16370 _params = dict()
16371 msg = dict(type='Provisioner', request='SetPasswords', version=3, params=_params)
16372 _params['changes'] = changes
16373 reply = await self.rpc(msg)
16374 return reply
16375
16376
16377
16378 @ReturnMapping(ErrorResults)
16379 async def SetStatus(self, entities):
16380 '''
16381 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
16382 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16383 '''
16384 # map input types to rpc msg
16385 _params = dict()
16386 msg = dict(type='Provisioner', request='SetStatus', version=3, params=_params)
16387 _params['entities'] = entities
16388 reply = await self.rpc(msg)
16389 return reply
16390
16391
16392
16393 @ReturnMapping(ErrorResults)
16394 async def SetSupportedContainers(self, params):
16395 '''
16396 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
16397 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16398 '''
16399 # map input types to rpc msg
16400 _params = dict()
16401 msg = dict(type='Provisioner', request='SetSupportedContainers', version=3, params=_params)
16402 _params['params'] = params
16403 reply = await self.rpc(msg)
16404 return reply
16405
16406
16407
16408 @ReturnMapping(StringsResult)
16409 async def StateAddresses(self):
16410 '''
16411
16412 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
16413 '''
16414 # map input types to rpc msg
16415 _params = dict()
16416 msg = dict(type='Provisioner', request='StateAddresses', version=3, params=_params)
16417
16418 reply = await self.rpc(msg)
16419 return reply
16420
16421
16422
16423 @ReturnMapping(StatusResults)
16424 async def Status(self, entities):
16425 '''
16426 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16427 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
16428 '''
16429 # map input types to rpc msg
16430 _params = dict()
16431 msg = dict(type='Provisioner', request='Status', version=3, params=_params)
16432 _params['entities'] = entities
16433 reply = await self.rpc(msg)
16434 return reply
16435
16436
16437
16438 @ReturnMapping(ToolsResults)
16439 async def Tools(self, entities):
16440 '''
16441 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16442 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
16443 '''
16444 # map input types to rpc msg
16445 _params = dict()
16446 msg = dict(type='Provisioner', request='Tools', version=3, params=_params)
16447 _params['entities'] = entities
16448 reply = await self.rpc(msg)
16449 return reply
16450
16451
16452
16453 @ReturnMapping(ErrorResults)
16454 async def UpdateStatus(self, entities):
16455 '''
16456 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
16457 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16458 '''
16459 # map input types to rpc msg
16460 _params = dict()
16461 msg = dict(type='Provisioner', request='UpdateStatus', version=3, params=_params)
16462 _params['entities'] = entities
16463 reply = await self.rpc(msg)
16464 return reply
16465
16466
16467
16468 @ReturnMapping(NotifyWatchResult)
16469 async def WatchAPIHostPorts(self):
16470 '''
16471
16472 Returns -> typing.Union[str, _ForwardRef('Error')]
16473 '''
16474 # map input types to rpc msg
16475 _params = dict()
16476 msg = dict(type='Provisioner', request='WatchAPIHostPorts', version=3, params=_params)
16477
16478 reply = await self.rpc(msg)
16479 return reply
16480
16481
16482
16483 @ReturnMapping(StringsWatchResults)
16484 async def WatchAllContainers(self, params):
16485 '''
16486 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
16487 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
16488 '''
16489 # map input types to rpc msg
16490 _params = dict()
16491 msg = dict(type='Provisioner', request='WatchAllContainers', version=3, params=_params)
16492 _params['params'] = params
16493 reply = await self.rpc(msg)
16494 return reply
16495
16496
16497
16498 @ReturnMapping(StringsWatchResults)
16499 async def WatchContainers(self, params):
16500 '''
16501 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
16502 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
16503 '''
16504 # map input types to rpc msg
16505 _params = dict()
16506 msg = dict(type='Provisioner', request='WatchContainers', version=3, params=_params)
16507 _params['params'] = params
16508 reply = await self.rpc(msg)
16509 return reply
16510
16511
16512
16513 @ReturnMapping(NotifyWatchResult)
16514 async def WatchForModelConfigChanges(self):
16515 '''
16516
16517 Returns -> typing.Union[str, _ForwardRef('Error')]
16518 '''
16519 # map input types to rpc msg
16520 _params = dict()
16521 msg = dict(type='Provisioner', request='WatchForModelConfigChanges', version=3, params=_params)
16522
16523 reply = await self.rpc(msg)
16524 return reply
16525
16526
16527
16528 @ReturnMapping(NotifyWatchResult)
16529 async def WatchMachineErrorRetry(self):
16530 '''
16531
16532 Returns -> typing.Union[str, _ForwardRef('Error')]
16533 '''
16534 # map input types to rpc msg
16535 _params = dict()
16536 msg = dict(type='Provisioner', request='WatchMachineErrorRetry', version=3, params=_params)
16537
16538 reply = await self.rpc(msg)
16539 return reply
16540
16541
16542
16543 @ReturnMapping(StringsWatchResult)
16544 async def WatchModelMachines(self):
16545 '''
16546
16547 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
16548 '''
16549 # map input types to rpc msg
16550 _params = dict()
16551 msg = dict(type='Provisioner', request='WatchModelMachines', version=3, params=_params)
16552
16553 reply = await self.rpc(msg)
16554 return reply
16555
16556
16557 class ProxyUpdaterFacade(Type):
16558 name = 'ProxyUpdater'
16559 version = 1
16560 schema = {'definitions': {'Entities': {'additionalProperties': False,
16561 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16562 'type': 'array'}},
16563 'required': ['entities'],
16564 'type': 'object'},
16565 'Entity': {'additionalProperties': False,
16566 'properties': {'tag': {'type': 'string'}},
16567 'required': ['tag'],
16568 'type': 'object'},
16569 'Error': {'additionalProperties': False,
16570 'properties': {'code': {'type': 'string'},
16571 'info': {'$ref': '#/definitions/ErrorInfo'},
16572 'message': {'type': 'string'}},
16573 'required': ['message', 'code'],
16574 'type': 'object'},
16575 'ErrorInfo': {'additionalProperties': False,
16576 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16577 'macaroon-path': {'type': 'string'}},
16578 'type': 'object'},
16579 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16580 'NotifyWatchResult': {'additionalProperties': False,
16581 'properties': {'NotifyWatcherId': {'type': 'string'},
16582 'error': {'$ref': '#/definitions/Error'}},
16583 'required': ['NotifyWatcherId'],
16584 'type': 'object'},
16585 'NotifyWatchResults': {'additionalProperties': False,
16586 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16587 'type': 'array'}},
16588 'required': ['results'],
16589 'type': 'object'},
16590 'ProxyConfig': {'additionalProperties': False,
16591 'properties': {'ftp': {'type': 'string'},
16592 'http': {'type': 'string'},
16593 'https': {'type': 'string'},
16594 'no-proxy': {'type': 'string'}},
16595 'required': ['http',
16596 'https',
16597 'ftp',
16598 'no-proxy'],
16599 'type': 'object'},
16600 'ProxyConfigResult': {'additionalProperties': False,
16601 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
16602 'error': {'$ref': '#/definitions/Error'},
16603 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}},
16604 'required': ['proxy-settings',
16605 'apt-proxy-settings'],
16606 'type': 'object'},
16607 'ProxyConfigResults': {'additionalProperties': False,
16608 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
16609 'type': 'array'}},
16610 'required': ['results'],
16611 'type': 'object'}},
16612 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16613 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
16614 'type': 'object'},
16615 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16616 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16617 'type': 'object'}},
16618 'type': 'object'}
16619
16620
16621 @ReturnMapping(ProxyConfigResults)
16622 async def ProxyConfig(self, entities):
16623 '''
16624 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16625 Returns -> typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
16626 '''
16627 # map input types to rpc msg
16628 _params = dict()
16629 msg = dict(type='ProxyUpdater', request='ProxyConfig', version=1, params=_params)
16630 _params['entities'] = entities
16631 reply = await self.rpc(msg)
16632 return reply
16633
16634
16635
16636 @ReturnMapping(NotifyWatchResults)
16637 async def WatchForProxyConfigAndAPIHostPortChanges(self, entities):
16638 '''
16639 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16640 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
16641 '''
16642 # map input types to rpc msg
16643 _params = dict()
16644 msg = dict(type='ProxyUpdater', request='WatchForProxyConfigAndAPIHostPortChanges', version=1, params=_params)
16645 _params['entities'] = entities
16646 reply = await self.rpc(msg)
16647 return reply
16648
16649
16650 class RebootFacade(Type):
16651 name = 'Reboot'
16652 version = 2
16653 schema = {'definitions': {'Entities': {'additionalProperties': False,
16654 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16655 'type': 'array'}},
16656 'required': ['entities'],
16657 'type': 'object'},
16658 'Entity': {'additionalProperties': False,
16659 'properties': {'tag': {'type': 'string'}},
16660 'required': ['tag'],
16661 'type': 'object'},
16662 'Error': {'additionalProperties': False,
16663 'properties': {'code': {'type': 'string'},
16664 'info': {'$ref': '#/definitions/ErrorInfo'},
16665 'message': {'type': 'string'}},
16666 'required': ['message', 'code'],
16667 'type': 'object'},
16668 'ErrorInfo': {'additionalProperties': False,
16669 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16670 'macaroon-path': {'type': 'string'}},
16671 'type': 'object'},
16672 'ErrorResult': {'additionalProperties': False,
16673 'properties': {'error': {'$ref': '#/definitions/Error'}},
16674 'type': 'object'},
16675 'ErrorResults': {'additionalProperties': False,
16676 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16677 'type': 'array'}},
16678 'required': ['results'],
16679 'type': 'object'},
16680 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16681 'NotifyWatchResult': {'additionalProperties': False,
16682 'properties': {'NotifyWatcherId': {'type': 'string'},
16683 'error': {'$ref': '#/definitions/Error'}},
16684 'required': ['NotifyWatcherId'],
16685 'type': 'object'},
16686 'RebootActionResult': {'additionalProperties': False,
16687 'properties': {'error': {'$ref': '#/definitions/Error'},
16688 'result': {'type': 'string'}},
16689 'type': 'object'},
16690 'RebootActionResults': {'additionalProperties': False,
16691 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
16692 'type': 'array'}},
16693 'type': 'object'}},
16694 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16695 'Result': {'$ref': '#/definitions/ErrorResults'}},
16696 'type': 'object'},
16697 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16698 'Result': {'$ref': '#/definitions/RebootActionResults'}},
16699 'type': 'object'},
16700 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16701 'Result': {'$ref': '#/definitions/ErrorResults'}},
16702 'type': 'object'},
16703 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16704 'type': 'object'}},
16705 'type': 'object'}
16706
16707
16708 @ReturnMapping(ErrorResults)
16709 async def ClearReboot(self, entities):
16710 '''
16711 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16712 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16713 '''
16714 # map input types to rpc msg
16715 _params = dict()
16716 msg = dict(type='Reboot', request='ClearReboot', version=2, params=_params)
16717 _params['entities'] = entities
16718 reply = await self.rpc(msg)
16719 return reply
16720
16721
16722
16723 @ReturnMapping(RebootActionResults)
16724 async def GetRebootAction(self, entities):
16725 '''
16726 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16727 Returns -> typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
16728 '''
16729 # map input types to rpc msg
16730 _params = dict()
16731 msg = dict(type='Reboot', request='GetRebootAction', version=2, params=_params)
16732 _params['entities'] = entities
16733 reply = await self.rpc(msg)
16734 return reply
16735
16736
16737
16738 @ReturnMapping(ErrorResults)
16739 async def RequestReboot(self, entities):
16740 '''
16741 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16742 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16743 '''
16744 # map input types to rpc msg
16745 _params = dict()
16746 msg = dict(type='Reboot', request='RequestReboot', version=2, params=_params)
16747 _params['entities'] = entities
16748 reply = await self.rpc(msg)
16749 return reply
16750
16751
16752
16753 @ReturnMapping(NotifyWatchResult)
16754 async def WatchForRebootEvent(self):
16755 '''
16756
16757 Returns -> typing.Union[str, _ForwardRef('Error')]
16758 '''
16759 # map input types to rpc msg
16760 _params = dict()
16761 msg = dict(type='Reboot', request='WatchForRebootEvent', version=2, params=_params)
16762
16763 reply = await self.rpc(msg)
16764 return reply
16765
16766
16767 class RelationUnitsWatcherFacade(Type):
16768 name = 'RelationUnitsWatcher'
16769 version = 1
16770 schema = {'definitions': {'Error': {'additionalProperties': False,
16771 'properties': {'code': {'type': 'string'},
16772 'info': {'$ref': '#/definitions/ErrorInfo'},
16773 'message': {'type': 'string'}},
16774 'required': ['message', 'code'],
16775 'type': 'object'},
16776 'ErrorInfo': {'additionalProperties': False,
16777 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16778 'macaroon-path': {'type': 'string'}},
16779 'type': 'object'},
16780 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16781 'RelationUnitsChange': {'additionalProperties': False,
16782 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
16783 'type': 'object'},
16784 'departed': {'items': {'type': 'string'},
16785 'type': 'array'}},
16786 'required': ['changed'],
16787 'type': 'object'},
16788 'RelationUnitsWatchResult': {'additionalProperties': False,
16789 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
16790 'error': {'$ref': '#/definitions/Error'},
16791 'watcher-id': {'type': 'string'}},
16792 'required': ['watcher-id',
16793 'changes'],
16794 'type': 'object'},
16795 'UnitSettings': {'additionalProperties': False,
16796 'properties': {'version': {'type': 'integer'}},
16797 'required': ['version'],
16798 'type': 'object'}},
16799 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
16800 'type': 'object'},
16801 'Stop': {'type': 'object'}},
16802 'type': 'object'}
16803
16804
16805 @ReturnMapping(RelationUnitsWatchResult)
16806 async def Next(self):
16807 '''
16808
16809 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
16810 '''
16811 # map input types to rpc msg
16812 _params = dict()
16813 msg = dict(type='RelationUnitsWatcher', request='Next', version=1, params=_params)
16814
16815 reply = await self.rpc(msg)
16816 return reply
16817
16818
16819
16820 @ReturnMapping(None)
16821 async def Stop(self):
16822 '''
16823
16824 Returns -> None
16825 '''
16826 # map input types to rpc msg
16827 _params = dict()
16828 msg = dict(type='RelationUnitsWatcher', request='Stop', version=1, params=_params)
16829
16830 reply = await self.rpc(msg)
16831 return reply
16832
16833
16834 class ResumerFacade(Type):
16835 name = 'Resumer'
16836 version = 2
16837 schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
16838
16839
16840 @ReturnMapping(None)
16841 async def ResumeTransactions(self):
16842 '''
16843
16844 Returns -> None
16845 '''
16846 # map input types to rpc msg
16847 _params = dict()
16848 msg = dict(type='Resumer', request='ResumeTransactions', version=2, params=_params)
16849
16850 reply = await self.rpc(msg)
16851 return reply
16852
16853
16854 class RetryStrategyFacade(Type):
16855 name = 'RetryStrategy'
16856 version = 1
16857 schema = {'definitions': {'Entities': {'additionalProperties': False,
16858 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16859 'type': 'array'}},
16860 'required': ['entities'],
16861 'type': 'object'},
16862 'Entity': {'additionalProperties': False,
16863 'properties': {'tag': {'type': 'string'}},
16864 'required': ['tag'],
16865 'type': 'object'},
16866 'Error': {'additionalProperties': False,
16867 'properties': {'code': {'type': 'string'},
16868 'info': {'$ref': '#/definitions/ErrorInfo'},
16869 'message': {'type': 'string'}},
16870 'required': ['message', 'code'],
16871 'type': 'object'},
16872 'ErrorInfo': {'additionalProperties': False,
16873 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16874 'macaroon-path': {'type': 'string'}},
16875 'type': 'object'},
16876 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16877 'NotifyWatchResult': {'additionalProperties': False,
16878 'properties': {'NotifyWatcherId': {'type': 'string'},
16879 'error': {'$ref': '#/definitions/Error'}},
16880 'required': ['NotifyWatcherId'],
16881 'type': 'object'},
16882 'NotifyWatchResults': {'additionalProperties': False,
16883 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16884 'type': 'array'}},
16885 'required': ['results'],
16886 'type': 'object'},
16887 'RetryStrategy': {'additionalProperties': False,
16888 'properties': {'jitter-retry-time': {'type': 'boolean'},
16889 'max-retry-time': {'type': 'integer'},
16890 'min-retry-time': {'type': 'integer'},
16891 'retry-time-factor': {'type': 'integer'},
16892 'should-retry': {'type': 'boolean'}},
16893 'required': ['should-retry',
16894 'min-retry-time',
16895 'max-retry-time',
16896 'jitter-retry-time',
16897 'retry-time-factor'],
16898 'type': 'object'},
16899 'RetryStrategyResult': {'additionalProperties': False,
16900 'properties': {'error': {'$ref': '#/definitions/Error'},
16901 'result': {'$ref': '#/definitions/RetryStrategy'}},
16902 'type': 'object'},
16903 'RetryStrategyResults': {'additionalProperties': False,
16904 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
16905 'type': 'array'}},
16906 'required': ['results'],
16907 'type': 'object'}},
16908 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16909 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
16910 'type': 'object'},
16911 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16912 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16913 'type': 'object'}},
16914 'type': 'object'}
16915
16916
16917 @ReturnMapping(RetryStrategyResults)
16918 async def RetryStrategy(self, entities):
16919 '''
16920 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16921 Returns -> typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
16922 '''
16923 # map input types to rpc msg
16924 _params = dict()
16925 msg = dict(type='RetryStrategy', request='RetryStrategy', version=1, params=_params)
16926 _params['entities'] = entities
16927 reply = await self.rpc(msg)
16928 return reply
16929
16930
16931
16932 @ReturnMapping(NotifyWatchResults)
16933 async def WatchRetryStrategy(self, entities):
16934 '''
16935 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16936 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
16937 '''
16938 # map input types to rpc msg
16939 _params = dict()
16940 msg = dict(type='RetryStrategy', request='WatchRetryStrategy', version=1, params=_params)
16941 _params['entities'] = entities
16942 reply = await self.rpc(msg)
16943 return reply
16944
16945
16946 class SSHClientFacade(Type):
16947 name = 'SSHClient'
16948 version = 2
16949 schema = {'definitions': {'Entities': {'additionalProperties': False,
16950 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16951 'type': 'array'}},
16952 'required': ['entities'],
16953 'type': 'object'},
16954 'Entity': {'additionalProperties': False,
16955 'properties': {'tag': {'type': 'string'}},
16956 'required': ['tag'],
16957 'type': 'object'},
16958 'Error': {'additionalProperties': False,
16959 'properties': {'code': {'type': 'string'},
16960 'info': {'$ref': '#/definitions/ErrorInfo'},
16961 'message': {'type': 'string'}},
16962 'required': ['message', 'code'],
16963 'type': 'object'},
16964 'ErrorInfo': {'additionalProperties': False,
16965 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16966 'macaroon-path': {'type': 'string'}},
16967 'type': 'object'},
16968 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16969 'SSHAddressResult': {'additionalProperties': False,
16970 'properties': {'address': {'type': 'string'},
16971 'error': {'$ref': '#/definitions/Error'}},
16972 'type': 'object'},
16973 'SSHAddressResults': {'additionalProperties': False,
16974 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
16975 'type': 'array'}},
16976 'required': ['results'],
16977 'type': 'object'},
16978 'SSHAddressesResult': {'additionalProperties': False,
16979 'properties': {'addresses': {'items': {'type': 'string'},
16980 'type': 'array'},
16981 'error': {'$ref': '#/definitions/Error'}},
16982 'required': ['addresses'],
16983 'type': 'object'},
16984 'SSHAddressesResults': {'additionalProperties': False,
16985 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressesResult'},
16986 'type': 'array'}},
16987 'required': ['results'],
16988 'type': 'object'},
16989 'SSHProxyResult': {'additionalProperties': False,
16990 'properties': {'use-proxy': {'type': 'boolean'}},
16991 'required': ['use-proxy'],
16992 'type': 'object'},
16993 'SSHPublicKeysResult': {'additionalProperties': False,
16994 'properties': {'error': {'$ref': '#/definitions/Error'},
16995 'public-keys': {'items': {'type': 'string'},
16996 'type': 'array'}},
16997 'type': 'object'},
16998 'SSHPublicKeysResults': {'additionalProperties': False,
16999 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
17000 'type': 'array'}},
17001 'required': ['results'],
17002 'type': 'object'}},
17003 'properties': {'AllAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17004 'Result': {'$ref': '#/definitions/SSHAddressesResults'}},
17005 'type': 'object'},
17006 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17007 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
17008 'type': 'object'},
17009 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
17010 'type': 'object'},
17011 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17012 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
17013 'type': 'object'},
17014 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17015 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
17016 'type': 'object'}},
17017 'type': 'object'}
17018
17019
17020 @ReturnMapping(SSHAddressesResults)
17021 async def AllAddresses(self, entities):
17022 '''
17023 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17024 Returns -> typing.Sequence<+T_co>[~SSHAddressesResult]<~SSHAddressesResult>
17025 '''
17026 # map input types to rpc msg
17027 _params = dict()
17028 msg = dict(type='SSHClient', request='AllAddresses', version=2, params=_params)
17029 _params['entities'] = entities
17030 reply = await self.rpc(msg)
17031 return reply
17032
17033
17034
17035 @ReturnMapping(SSHAddressResults)
17036 async def PrivateAddress(self, entities):
17037 '''
17038 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17039 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
17040 '''
17041 # map input types to rpc msg
17042 _params = dict()
17043 msg = dict(type='SSHClient', request='PrivateAddress', version=2, params=_params)
17044 _params['entities'] = entities
17045 reply = await self.rpc(msg)
17046 return reply
17047
17048
17049
17050 @ReturnMapping(SSHProxyResult)
17051 async def Proxy(self):
17052 '''
17053
17054 Returns -> bool
17055 '''
17056 # map input types to rpc msg
17057 _params = dict()
17058 msg = dict(type='SSHClient', request='Proxy', version=2, params=_params)
17059
17060 reply = await self.rpc(msg)
17061 return reply
17062
17063
17064
17065 @ReturnMapping(SSHAddressResults)
17066 async def PublicAddress(self, entities):
17067 '''
17068 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17069 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
17070 '''
17071 # map input types to rpc msg
17072 _params = dict()
17073 msg = dict(type='SSHClient', request='PublicAddress', version=2, params=_params)
17074 _params['entities'] = entities
17075 reply = await self.rpc(msg)
17076 return reply
17077
17078
17079
17080 @ReturnMapping(SSHPublicKeysResults)
17081 async def PublicKeys(self, entities):
17082 '''
17083 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17084 Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
17085 '''
17086 # map input types to rpc msg
17087 _params = dict()
17088 msg = dict(type='SSHClient', request='PublicKeys', version=2, params=_params)
17089 _params['entities'] = entities
17090 reply = await self.rpc(msg)
17091 return reply
17092
17093
17094 class SingularFacade(Type):
17095 name = 'Singular'
17096 version = 1
17097 schema = {'definitions': {'Entities': {'additionalProperties': False,
17098 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17099 'type': 'array'}},
17100 'required': ['entities'],
17101 'type': 'object'},
17102 'Entity': {'additionalProperties': False,
17103 'properties': {'tag': {'type': 'string'}},
17104 'required': ['tag'],
17105 'type': 'object'},
17106 'Error': {'additionalProperties': False,
17107 'properties': {'code': {'type': 'string'},
17108 'info': {'$ref': '#/definitions/ErrorInfo'},
17109 'message': {'type': 'string'}},
17110 'required': ['message', 'code'],
17111 'type': 'object'},
17112 'ErrorInfo': {'additionalProperties': False,
17113 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17114 'macaroon-path': {'type': 'string'}},
17115 'type': 'object'},
17116 'ErrorResult': {'additionalProperties': False,
17117 'properties': {'error': {'$ref': '#/definitions/Error'}},
17118 'type': 'object'},
17119 'ErrorResults': {'additionalProperties': False,
17120 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17121 'type': 'array'}},
17122 'required': ['results'],
17123 'type': 'object'},
17124 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17125 'SingularClaim': {'additionalProperties': False,
17126 'properties': {'controller-tag': {'type': 'string'},
17127 'duration': {'type': 'integer'},
17128 'model-tag': {'type': 'string'}},
17129 'required': ['model-tag',
17130 'controller-tag',
17131 'duration'],
17132 'type': 'object'},
17133 'SingularClaims': {'additionalProperties': False,
17134 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
17135 'type': 'array'}},
17136 'required': ['claims'],
17137 'type': 'object'}},
17138 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
17139 'Result': {'$ref': '#/definitions/ErrorResults'}},
17140 'type': 'object'},
17141 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17142 'Result': {'$ref': '#/definitions/ErrorResults'}},
17143 'type': 'object'}},
17144 'type': 'object'}
17145
17146
17147 @ReturnMapping(ErrorResults)
17148 async def Claim(self, claims):
17149 '''
17150 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
17151 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17152 '''
17153 # map input types to rpc msg
17154 _params = dict()
17155 msg = dict(type='Singular', request='Claim', version=1, params=_params)
17156 _params['claims'] = claims
17157 reply = await self.rpc(msg)
17158 return reply
17159
17160
17161
17162 @ReturnMapping(ErrorResults)
17163 async def Wait(self, entities):
17164 '''
17165 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17166 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17167 '''
17168 # map input types to rpc msg
17169 _params = dict()
17170 msg = dict(type='Singular', request='Wait', version=1, params=_params)
17171 _params['entities'] = entities
17172 reply = await self.rpc(msg)
17173 return reply
17174
17175
17176 class SpacesFacade(Type):
17177 name = 'Spaces'
17178 version = 2
17179 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
17180 'properties': {'provider-id': {'type': 'string'},
17181 'public': {'type': 'boolean'},
17182 'space-tag': {'type': 'string'},
17183 'subnet-tags': {'items': {'type': 'string'},
17184 'type': 'array'}},
17185 'required': ['subnet-tags',
17186 'space-tag',
17187 'public'],
17188 'type': 'object'},
17189 'CreateSpacesParams': {'additionalProperties': False,
17190 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
17191 'type': 'array'}},
17192 'required': ['spaces'],
17193 'type': 'object'},
17194 'Error': {'additionalProperties': False,
17195 'properties': {'code': {'type': 'string'},
17196 'info': {'$ref': '#/definitions/ErrorInfo'},
17197 'message': {'type': 'string'}},
17198 'required': ['message', 'code'],
17199 'type': 'object'},
17200 'ErrorInfo': {'additionalProperties': False,
17201 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17202 'macaroon-path': {'type': 'string'}},
17203 'type': 'object'},
17204 'ErrorResult': {'additionalProperties': False,
17205 'properties': {'error': {'$ref': '#/definitions/Error'}},
17206 'type': 'object'},
17207 'ErrorResults': {'additionalProperties': False,
17208 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17209 'type': 'array'}},
17210 'required': ['results'],
17211 'type': 'object'},
17212 'ListSpacesResults': {'additionalProperties': False,
17213 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
17214 'type': 'array'}},
17215 'required': ['results'],
17216 'type': 'object'},
17217 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17218 'Space': {'additionalProperties': False,
17219 'properties': {'error': {'$ref': '#/definitions/Error'},
17220 'name': {'type': 'string'},
17221 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
17222 'type': 'array'}},
17223 'required': ['name', 'subnets'],
17224 'type': 'object'},
17225 'Subnet': {'additionalProperties': False,
17226 'properties': {'cidr': {'type': 'string'},
17227 'life': {'type': 'string'},
17228 'provider-id': {'type': 'string'},
17229 'space-tag': {'type': 'string'},
17230 'status': {'type': 'string'},
17231 'vlan-tag': {'type': 'integer'},
17232 'zones': {'items': {'type': 'string'},
17233 'type': 'array'}},
17234 'required': ['cidr',
17235 'vlan-tag',
17236 'life',
17237 'space-tag',
17238 'zones'],
17239 'type': 'object'}},
17240 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
17241 'Result': {'$ref': '#/definitions/ErrorResults'}},
17242 'type': 'object'},
17243 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
17244 'type': 'object'}},
17245 'type': 'object'}
17246
17247
17248 @ReturnMapping(ErrorResults)
17249 async def CreateSpaces(self, spaces):
17250 '''
17251 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
17252 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17253 '''
17254 # map input types to rpc msg
17255 _params = dict()
17256 msg = dict(type='Spaces', request='CreateSpaces', version=2, params=_params)
17257 _params['spaces'] = spaces
17258 reply = await self.rpc(msg)
17259 return reply
17260
17261
17262
17263 @ReturnMapping(ListSpacesResults)
17264 async def ListSpaces(self):
17265 '''
17266
17267 Returns -> typing.Sequence<+T_co>[~Space]<~Space>
17268 '''
17269 # map input types to rpc msg
17270 _params = dict()
17271 msg = dict(type='Spaces', request='ListSpaces', version=2, params=_params)
17272
17273 reply = await self.rpc(msg)
17274 return reply
17275
17276
17277 class StatusHistoryFacade(Type):
17278 name = 'StatusHistory'
17279 version = 2
17280 schema = {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
17281 'properties': {'max-history-mb': {'type': 'integer'},
17282 'max-history-time': {'type': 'integer'}},
17283 'required': ['max-history-time',
17284 'max-history-mb'],
17285 'type': 'object'}},
17286 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
17287 'type': 'object'}},
17288 'type': 'object'}
17289
17290
17291 @ReturnMapping(None)
17292 async def Prune(self, max_history_mb, max_history_time):
17293 '''
17294 max_history_mb : int
17295 max_history_time : int
17296 Returns -> None
17297 '''
17298 # map input types to rpc msg
17299 _params = dict()
17300 msg = dict(type='StatusHistory', request='Prune', version=2, params=_params)
17301 _params['max-history-mb'] = max_history_mb
17302 _params['max-history-time'] = max_history_time
17303 reply = await self.rpc(msg)
17304 return reply
17305
17306
17307 class StorageFacade(Type):
17308 name = 'Storage'
17309 version = 3
17310 schema = {'definitions': {'Entities': {'additionalProperties': False,
17311 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17312 'type': 'array'}},
17313 'required': ['entities'],
17314 'type': 'object'},
17315 'Entity': {'additionalProperties': False,
17316 'properties': {'tag': {'type': 'string'}},
17317 'required': ['tag'],
17318 'type': 'object'},
17319 'EntityStatus': {'additionalProperties': False,
17320 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17321 'type': 'object'}},
17322 'type': 'object'},
17323 'info': {'type': 'string'},
17324 'since': {'format': 'date-time',
17325 'type': 'string'},
17326 'status': {'type': 'string'}},
17327 'required': ['status', 'info', 'since'],
17328 'type': 'object'},
17329 'Error': {'additionalProperties': False,
17330 'properties': {'code': {'type': 'string'},
17331 'info': {'$ref': '#/definitions/ErrorInfo'},
17332 'message': {'type': 'string'}},
17333 'required': ['message', 'code'],
17334 'type': 'object'},
17335 'ErrorInfo': {'additionalProperties': False,
17336 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17337 'macaroon-path': {'type': 'string'}},
17338 'type': 'object'},
17339 'ErrorResult': {'additionalProperties': False,
17340 'properties': {'error': {'$ref': '#/definitions/Error'}},
17341 'type': 'object'},
17342 'ErrorResults': {'additionalProperties': False,
17343 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17344 'type': 'array'}},
17345 'required': ['results'],
17346 'type': 'object'},
17347 'FilesystemAttachmentInfo': {'additionalProperties': False,
17348 'properties': {'mount-point': {'type': 'string'},
17349 'read-only': {'type': 'boolean'}},
17350 'type': 'object'},
17351 'FilesystemDetails': {'additionalProperties': False,
17352 'properties': {'filesystem-tag': {'type': 'string'},
17353 'info': {'$ref': '#/definitions/FilesystemInfo'},
17354 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
17355 'type': 'object'},
17356 'status': {'$ref': '#/definitions/EntityStatus'},
17357 'storage': {'$ref': '#/definitions/StorageDetails'},
17358 'volume-tag': {'type': 'string'}},
17359 'required': ['filesystem-tag',
17360 'info',
17361 'status'],
17362 'type': 'object'},
17363 'FilesystemDetailsListResult': {'additionalProperties': False,
17364 'properties': {'error': {'$ref': '#/definitions/Error'},
17365 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
17366 'type': 'array'}},
17367 'type': 'object'},
17368 'FilesystemDetailsListResults': {'additionalProperties': False,
17369 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
17370 'type': 'array'}},
17371 'type': 'object'},
17372 'FilesystemFilter': {'additionalProperties': False,
17373 'properties': {'machines': {'items': {'type': 'string'},
17374 'type': 'array'}},
17375 'type': 'object'},
17376 'FilesystemFilters': {'additionalProperties': False,
17377 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
17378 'type': 'array'}},
17379 'type': 'object'},
17380 'FilesystemInfo': {'additionalProperties': False,
17381 'properties': {'filesystem-id': {'type': 'string'},
17382 'size': {'type': 'integer'}},
17383 'required': ['filesystem-id', 'size'],
17384 'type': 'object'},
17385 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17386 'StorageAddParams': {'additionalProperties': False,
17387 'properties': {'name': {'type': 'string'},
17388 'storage': {'$ref': '#/definitions/StorageConstraints'},
17389 'unit': {'type': 'string'}},
17390 'required': ['unit', 'name', 'storage'],
17391 'type': 'object'},
17392 'StorageAttachmentDetails': {'additionalProperties': False,
17393 'properties': {'location': {'type': 'string'},
17394 'machine-tag': {'type': 'string'},
17395 'storage-tag': {'type': 'string'},
17396 'unit-tag': {'type': 'string'}},
17397 'required': ['storage-tag',
17398 'unit-tag',
17399 'machine-tag'],
17400 'type': 'object'},
17401 'StorageConstraints': {'additionalProperties': False,
17402 'properties': {'count': {'type': 'integer'},
17403 'pool': {'type': 'string'},
17404 'size': {'type': 'integer'}},
17405 'type': 'object'},
17406 'StorageDetails': {'additionalProperties': False,
17407 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
17408 'type': 'object'},
17409 'kind': {'type': 'integer'},
17410 'owner-tag': {'type': 'string'},
17411 'persistent': {'type': 'boolean'},
17412 'status': {'$ref': '#/definitions/EntityStatus'},
17413 'storage-tag': {'type': 'string'}},
17414 'required': ['storage-tag',
17415 'owner-tag',
17416 'kind',
17417 'status',
17418 'persistent'],
17419 'type': 'object'},
17420 'StorageDetailsListResult': {'additionalProperties': False,
17421 'properties': {'error': {'$ref': '#/definitions/Error'},
17422 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
17423 'type': 'array'}},
17424 'type': 'object'},
17425 'StorageDetailsListResults': {'additionalProperties': False,
17426 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
17427 'type': 'array'}},
17428 'type': 'object'},
17429 'StorageDetailsResult': {'additionalProperties': False,
17430 'properties': {'error': {'$ref': '#/definitions/Error'},
17431 'result': {'$ref': '#/definitions/StorageDetails'}},
17432 'type': 'object'},
17433 'StorageDetailsResults': {'additionalProperties': False,
17434 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
17435 'type': 'array'}},
17436 'type': 'object'},
17437 'StorageFilter': {'additionalProperties': False,
17438 'type': 'object'},
17439 'StorageFilters': {'additionalProperties': False,
17440 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
17441 'type': 'array'}},
17442 'type': 'object'},
17443 'StoragePool': {'additionalProperties': False,
17444 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
17445 'type': 'object'}},
17446 'type': 'object'},
17447 'name': {'type': 'string'},
17448 'provider': {'type': 'string'}},
17449 'required': ['name', 'provider', 'attrs'],
17450 'type': 'object'},
17451 'StoragePoolFilter': {'additionalProperties': False,
17452 'properties': {'names': {'items': {'type': 'string'},
17453 'type': 'array'},
17454 'providers': {'items': {'type': 'string'},
17455 'type': 'array'}},
17456 'type': 'object'},
17457 'StoragePoolFilters': {'additionalProperties': False,
17458 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
17459 'type': 'array'}},
17460 'type': 'object'},
17461 'StoragePoolsResult': {'additionalProperties': False,
17462 'properties': {'error': {'$ref': '#/definitions/Error'},
17463 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
17464 'type': 'array'}},
17465 'type': 'object'},
17466 'StoragePoolsResults': {'additionalProperties': False,
17467 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
17468 'type': 'array'}},
17469 'type': 'object'},
17470 'StoragesAddParams': {'additionalProperties': False,
17471 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
17472 'type': 'array'}},
17473 'required': ['storages'],
17474 'type': 'object'},
17475 'VolumeAttachmentInfo': {'additionalProperties': False,
17476 'properties': {'bus-address': {'type': 'string'},
17477 'device-link': {'type': 'string'},
17478 'device-name': {'type': 'string'},
17479 'read-only': {'type': 'boolean'}},
17480 'type': 'object'},
17481 'VolumeDetails': {'additionalProperties': False,
17482 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
17483 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
17484 'type': 'object'},
17485 'status': {'$ref': '#/definitions/EntityStatus'},
17486 'storage': {'$ref': '#/definitions/StorageDetails'},
17487 'volume-tag': {'type': 'string'}},
17488 'required': ['volume-tag', 'info', 'status'],
17489 'type': 'object'},
17490 'VolumeDetailsListResult': {'additionalProperties': False,
17491 'properties': {'error': {'$ref': '#/definitions/Error'},
17492 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
17493 'type': 'array'}},
17494 'type': 'object'},
17495 'VolumeDetailsListResults': {'additionalProperties': False,
17496 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
17497 'type': 'array'}},
17498 'type': 'object'},
17499 'VolumeFilter': {'additionalProperties': False,
17500 'properties': {'machines': {'items': {'type': 'string'},
17501 'type': 'array'}},
17502 'type': 'object'},
17503 'VolumeFilters': {'additionalProperties': False,
17504 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
17505 'type': 'array'}},
17506 'type': 'object'},
17507 'VolumeInfo': {'additionalProperties': False,
17508 'properties': {'hardware-id': {'type': 'string'},
17509 'persistent': {'type': 'boolean'},
17510 'size': {'type': 'integer'},
17511 'volume-id': {'type': 'string'}},
17512 'required': ['volume-id', 'size', 'persistent'],
17513 'type': 'object'}},
17514 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
17515 'Result': {'$ref': '#/definitions/ErrorResults'}},
17516 'type': 'object'},
17517 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
17518 'type': 'object'},
17519 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
17520 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
17521 'type': 'object'},
17522 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
17523 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
17524 'type': 'object'},
17525 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
17526 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
17527 'type': 'object'},
17528 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
17529 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
17530 'type': 'object'},
17531 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17532 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
17533 'type': 'object'}},
17534 'type': 'object'}
17535
17536
17537 @ReturnMapping(ErrorResults)
17538 async def AddToUnit(self, storages):
17539 '''
17540 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
17541 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17542 '''
17543 # map input types to rpc msg
17544 _params = dict()
17545 msg = dict(type='Storage', request='AddToUnit', version=3, params=_params)
17546 _params['storages'] = storages
17547 reply = await self.rpc(msg)
17548 return reply
17549
17550
17551
17552 @ReturnMapping(None)
17553 async def CreatePool(self, attrs, name, provider):
17554 '''
17555 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
17556 name : str
17557 provider : str
17558 Returns -> None
17559 '''
17560 # map input types to rpc msg
17561 _params = dict()
17562 msg = dict(type='Storage', request='CreatePool', version=3, params=_params)
17563 _params['attrs'] = attrs
17564 _params['name'] = name
17565 _params['provider'] = provider
17566 reply = await self.rpc(msg)
17567 return reply
17568
17569
17570
17571 @ReturnMapping(FilesystemDetailsListResults)
17572 async def ListFilesystems(self, filters):
17573 '''
17574 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
17575 Returns -> typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
17576 '''
17577 # map input types to rpc msg
17578 _params = dict()
17579 msg = dict(type='Storage', request='ListFilesystems', version=3, params=_params)
17580 _params['filters'] = filters
17581 reply = await self.rpc(msg)
17582 return reply
17583
17584
17585
17586 @ReturnMapping(StoragePoolsResults)
17587 async def ListPools(self, filters):
17588 '''
17589 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
17590 Returns -> typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
17591 '''
17592 # map input types to rpc msg
17593 _params = dict()
17594 msg = dict(type='Storage', request='ListPools', version=3, params=_params)
17595 _params['filters'] = filters
17596 reply = await self.rpc(msg)
17597 return reply
17598
17599
17600
17601 @ReturnMapping(StorageDetailsListResults)
17602 async def ListStorageDetails(self, filters):
17603 '''
17604 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
17605 Returns -> typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
17606 '''
17607 # map input types to rpc msg
17608 _params = dict()
17609 msg = dict(type='Storage', request='ListStorageDetails', version=3, params=_params)
17610 _params['filters'] = filters
17611 reply = await self.rpc(msg)
17612 return reply
17613
17614
17615
17616 @ReturnMapping(VolumeDetailsListResults)
17617 async def ListVolumes(self, filters):
17618 '''
17619 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
17620 Returns -> typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
17621 '''
17622 # map input types to rpc msg
17623 _params = dict()
17624 msg = dict(type='Storage', request='ListVolumes', version=3, params=_params)
17625 _params['filters'] = filters
17626 reply = await self.rpc(msg)
17627 return reply
17628
17629
17630
17631 @ReturnMapping(StorageDetailsResults)
17632 async def StorageDetails(self, entities):
17633 '''
17634 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17635 Returns -> typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
17636 '''
17637 # map input types to rpc msg
17638 _params = dict()
17639 msg = dict(type='Storage', request='StorageDetails', version=3, params=_params)
17640 _params['entities'] = entities
17641 reply = await self.rpc(msg)
17642 return reply
17643
17644
17645 class StorageProvisionerFacade(Type):
17646 name = 'StorageProvisioner'
17647 version = 3
17648 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
17649 'properties': {'BusAddress': {'type': 'string'},
17650 'DeviceLinks': {'items': {'type': 'string'},
17651 'type': 'array'},
17652 'DeviceName': {'type': 'string'},
17653 'FilesystemType': {'type': 'string'},
17654 'HardwareId': {'type': 'string'},
17655 'InUse': {'type': 'boolean'},
17656 'Label': {'type': 'string'},
17657 'MountPoint': {'type': 'string'},
17658 'Size': {'type': 'integer'},
17659 'UUID': {'type': 'string'}},
17660 'required': ['DeviceName',
17661 'DeviceLinks',
17662 'Label',
17663 'UUID',
17664 'HardwareId',
17665 'BusAddress',
17666 'Size',
17667 'FilesystemType',
17668 'InUse',
17669 'MountPoint'],
17670 'type': 'object'},
17671 'BlockDeviceResult': {'additionalProperties': False,
17672 'properties': {'error': {'$ref': '#/definitions/Error'},
17673 'result': {'$ref': '#/definitions/BlockDevice'}},
17674 'required': ['result'],
17675 'type': 'object'},
17676 'BlockDeviceResults': {'additionalProperties': False,
17677 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
17678 'type': 'array'}},
17679 'type': 'object'},
17680 'Entities': {'additionalProperties': False,
17681 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17682 'type': 'array'}},
17683 'required': ['entities'],
17684 'type': 'object'},
17685 'Entity': {'additionalProperties': False,
17686 'properties': {'tag': {'type': 'string'}},
17687 'required': ['tag'],
17688 'type': 'object'},
17689 'EntityStatusArgs': {'additionalProperties': False,
17690 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17691 'type': 'object'}},
17692 'type': 'object'},
17693 'info': {'type': 'string'},
17694 'status': {'type': 'string'},
17695 'tag': {'type': 'string'}},
17696 'required': ['tag',
17697 'status',
17698 'info',
17699 'data'],
17700 'type': 'object'},
17701 'Error': {'additionalProperties': False,
17702 'properties': {'code': {'type': 'string'},
17703 'info': {'$ref': '#/definitions/ErrorInfo'},
17704 'message': {'type': 'string'}},
17705 'required': ['message', 'code'],
17706 'type': 'object'},
17707 'ErrorInfo': {'additionalProperties': False,
17708 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17709 'macaroon-path': {'type': 'string'}},
17710 'type': 'object'},
17711 'ErrorResult': {'additionalProperties': False,
17712 'properties': {'error': {'$ref': '#/definitions/Error'}},
17713 'type': 'object'},
17714 'ErrorResults': {'additionalProperties': False,
17715 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17716 'type': 'array'}},
17717 'required': ['results'],
17718 'type': 'object'},
17719 'Filesystem': {'additionalProperties': False,
17720 'properties': {'filesystem-tag': {'type': 'string'},
17721 'info': {'$ref': '#/definitions/FilesystemInfo'},
17722 'volume-tag': {'type': 'string'}},
17723 'required': ['filesystem-tag', 'info'],
17724 'type': 'object'},
17725 'FilesystemAttachment': {'additionalProperties': False,
17726 'properties': {'filesystem-tag': {'type': 'string'},
17727 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
17728 'machine-tag': {'type': 'string'}},
17729 'required': ['filesystem-tag',
17730 'machine-tag',
17731 'info'],
17732 'type': 'object'},
17733 'FilesystemAttachmentInfo': {'additionalProperties': False,
17734 'properties': {'mount-point': {'type': 'string'},
17735 'read-only': {'type': 'boolean'}},
17736 'type': 'object'},
17737 'FilesystemAttachmentParams': {'additionalProperties': False,
17738 'properties': {'filesystem-id': {'type': 'string'},
17739 'filesystem-tag': {'type': 'string'},
17740 'instance-id': {'type': 'string'},
17741 'machine-tag': {'type': 'string'},
17742 'mount-point': {'type': 'string'},
17743 'provider': {'type': 'string'},
17744 'read-only': {'type': 'boolean'}},
17745 'required': ['filesystem-tag',
17746 'machine-tag',
17747 'provider'],
17748 'type': 'object'},
17749 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
17750 'properties': {'error': {'$ref': '#/definitions/Error'},
17751 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
17752 'required': ['result'],
17753 'type': 'object'},
17754 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
17755 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
17756 'type': 'array'}},
17757 'type': 'object'},
17758 'FilesystemAttachmentResult': {'additionalProperties': False,
17759 'properties': {'error': {'$ref': '#/definitions/Error'},
17760 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
17761 'required': ['result'],
17762 'type': 'object'},
17763 'FilesystemAttachmentResults': {'additionalProperties': False,
17764 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
17765 'type': 'array'}},
17766 'type': 'object'},
17767 'FilesystemAttachments': {'additionalProperties': False,
17768 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
17769 'type': 'array'}},
17770 'required': ['filesystem-attachments'],
17771 'type': 'object'},
17772 'FilesystemInfo': {'additionalProperties': False,
17773 'properties': {'filesystem-id': {'type': 'string'},
17774 'size': {'type': 'integer'}},
17775 'required': ['filesystem-id', 'size'],
17776 'type': 'object'},
17777 'FilesystemParams': {'additionalProperties': False,
17778 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
17779 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
17780 'type': 'object'}},
17781 'type': 'object'},
17782 'filesystem-tag': {'type': 'string'},
17783 'provider': {'type': 'string'},
17784 'size': {'type': 'integer'},
17785 'tags': {'patternProperties': {'.*': {'type': 'string'}},
17786 'type': 'object'},
17787 'volume-tag': {'type': 'string'}},
17788 'required': ['filesystem-tag',
17789 'size',
17790 'provider'],
17791 'type': 'object'},
17792 'FilesystemParamsResult': {'additionalProperties': False,
17793 'properties': {'error': {'$ref': '#/definitions/Error'},
17794 'result': {'$ref': '#/definitions/FilesystemParams'}},
17795 'required': ['result'],
17796 'type': 'object'},
17797 'FilesystemParamsResults': {'additionalProperties': False,
17798 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
17799 'type': 'array'}},
17800 'type': 'object'},
17801 'FilesystemResult': {'additionalProperties': False,
17802 'properties': {'error': {'$ref': '#/definitions/Error'},
17803 'result': {'$ref': '#/definitions/Filesystem'}},
17804 'required': ['result'],
17805 'type': 'object'},
17806 'FilesystemResults': {'additionalProperties': False,
17807 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
17808 'type': 'array'}},
17809 'type': 'object'},
17810 'Filesystems': {'additionalProperties': False,
17811 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
17812 'type': 'array'}},
17813 'required': ['filesystems'],
17814 'type': 'object'},
17815 'LifeResult': {'additionalProperties': False,
17816 'properties': {'error': {'$ref': '#/definitions/Error'},
17817 'life': {'type': 'string'}},
17818 'required': ['life'],
17819 'type': 'object'},
17820 'LifeResults': {'additionalProperties': False,
17821 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
17822 'type': 'array'}},
17823 'required': ['results'],
17824 'type': 'object'},
17825 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17826 'MachineStorageId': {'additionalProperties': False,
17827 'properties': {'attachment-tag': {'type': 'string'},
17828 'machine-tag': {'type': 'string'}},
17829 'required': ['machine-tag',
17830 'attachment-tag'],
17831 'type': 'object'},
17832 'MachineStorageIds': {'additionalProperties': False,
17833 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
17834 'type': 'array'}},
17835 'required': ['ids'],
17836 'type': 'object'},
17837 'MachineStorageIdsWatchResult': {'additionalProperties': False,
17838 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
17839 'type': 'array'},
17840 'error': {'$ref': '#/definitions/Error'},
17841 'watcher-id': {'type': 'string'}},
17842 'required': ['watcher-id',
17843 'changes'],
17844 'type': 'object'},
17845 'MachineStorageIdsWatchResults': {'additionalProperties': False,
17846 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
17847 'type': 'array'}},
17848 'required': ['results'],
17849 'type': 'object'},
17850 'NotifyWatchResult': {'additionalProperties': False,
17851 'properties': {'NotifyWatcherId': {'type': 'string'},
17852 'error': {'$ref': '#/definitions/Error'}},
17853 'required': ['NotifyWatcherId'],
17854 'type': 'object'},
17855 'NotifyWatchResults': {'additionalProperties': False,
17856 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17857 'type': 'array'}},
17858 'required': ['results'],
17859 'type': 'object'},
17860 'SetStatus': {'additionalProperties': False,
17861 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17862 'type': 'array'}},
17863 'required': ['entities'],
17864 'type': 'object'},
17865 'StringResult': {'additionalProperties': False,
17866 'properties': {'error': {'$ref': '#/definitions/Error'},
17867 'result': {'type': 'string'}},
17868 'required': ['result'],
17869 'type': 'object'},
17870 'StringResults': {'additionalProperties': False,
17871 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
17872 'type': 'array'}},
17873 'required': ['results'],
17874 'type': 'object'},
17875 'StringsWatchResult': {'additionalProperties': False,
17876 'properties': {'changes': {'items': {'type': 'string'},
17877 'type': 'array'},
17878 'error': {'$ref': '#/definitions/Error'},
17879 'watcher-id': {'type': 'string'}},
17880 'required': ['watcher-id'],
17881 'type': 'object'},
17882 'StringsWatchResults': {'additionalProperties': False,
17883 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
17884 'type': 'array'}},
17885 'required': ['results'],
17886 'type': 'object'},
17887 'Volume': {'additionalProperties': False,
17888 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
17889 'volume-tag': {'type': 'string'}},
17890 'required': ['volume-tag', 'info'],
17891 'type': 'object'},
17892 'VolumeAttachment': {'additionalProperties': False,
17893 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
17894 'machine-tag': {'type': 'string'},
17895 'volume-tag': {'type': 'string'}},
17896 'required': ['volume-tag',
17897 'machine-tag',
17898 'info'],
17899 'type': 'object'},
17900 'VolumeAttachmentInfo': {'additionalProperties': False,
17901 'properties': {'bus-address': {'type': 'string'},
17902 'device-link': {'type': 'string'},
17903 'device-name': {'type': 'string'},
17904 'read-only': {'type': 'boolean'}},
17905 'type': 'object'},
17906 'VolumeAttachmentParams': {'additionalProperties': False,
17907 'properties': {'instance-id': {'type': 'string'},
17908 'machine-tag': {'type': 'string'},
17909 'provider': {'type': 'string'},
17910 'read-only': {'type': 'boolean'},
17911 'volume-id': {'type': 'string'},
17912 'volume-tag': {'type': 'string'}},
17913 'required': ['volume-tag',
17914 'machine-tag',
17915 'provider'],
17916 'type': 'object'},
17917 'VolumeAttachmentParamsResult': {'additionalProperties': False,
17918 'properties': {'error': {'$ref': '#/definitions/Error'},
17919 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
17920 'required': ['result'],
17921 'type': 'object'},
17922 'VolumeAttachmentParamsResults': {'additionalProperties': False,
17923 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
17924 'type': 'array'}},
17925 'type': 'object'},
17926 'VolumeAttachmentResult': {'additionalProperties': False,
17927 'properties': {'error': {'$ref': '#/definitions/Error'},
17928 'result': {'$ref': '#/definitions/VolumeAttachment'}},
17929 'required': ['result'],
17930 'type': 'object'},
17931 'VolumeAttachmentResults': {'additionalProperties': False,
17932 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
17933 'type': 'array'}},
17934 'type': 'object'},
17935 'VolumeAttachments': {'additionalProperties': False,
17936 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
17937 'type': 'array'}},
17938 'required': ['volume-attachments'],
17939 'type': 'object'},
17940 'VolumeInfo': {'additionalProperties': False,
17941 'properties': {'hardware-id': {'type': 'string'},
17942 'persistent': {'type': 'boolean'},
17943 'size': {'type': 'integer'},
17944 'volume-id': {'type': 'string'}},
17945 'required': ['volume-id', 'size', 'persistent'],
17946 'type': 'object'},
17947 'VolumeParams': {'additionalProperties': False,
17948 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
17949 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
17950 'type': 'object'}},
17951 'type': 'object'},
17952 'provider': {'type': 'string'},
17953 'size': {'type': 'integer'},
17954 'tags': {'patternProperties': {'.*': {'type': 'string'}},
17955 'type': 'object'},
17956 'volume-tag': {'type': 'string'}},
17957 'required': ['volume-tag',
17958 'size',
17959 'provider'],
17960 'type': 'object'},
17961 'VolumeParamsResult': {'additionalProperties': False,
17962 'properties': {'error': {'$ref': '#/definitions/Error'},
17963 'result': {'$ref': '#/definitions/VolumeParams'}},
17964 'required': ['result'],
17965 'type': 'object'},
17966 'VolumeParamsResults': {'additionalProperties': False,
17967 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
17968 'type': 'array'}},
17969 'type': 'object'},
17970 'VolumeResult': {'additionalProperties': False,
17971 'properties': {'error': {'$ref': '#/definitions/Error'},
17972 'result': {'$ref': '#/definitions/Volume'}},
17973 'required': ['result'],
17974 'type': 'object'},
17975 'VolumeResults': {'additionalProperties': False,
17976 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
17977 'type': 'array'}},
17978 'type': 'object'},
17979 'Volumes': {'additionalProperties': False,
17980 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
17981 'type': 'array'}},
17982 'required': ['volumes'],
17983 'type': 'object'}},
17984 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17985 'Result': {'$ref': '#/definitions/LifeResults'}},
17986 'type': 'object'},
17987 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17988 'Result': {'$ref': '#/definitions/ErrorResults'}},
17989 'type': 'object'},
17990 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17991 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
17992 'type': 'object'},
17993 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17994 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
17995 'type': 'object'},
17996 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17997 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
17998 'type': 'object'},
17999 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18000 'Result': {'$ref': '#/definitions/FilesystemResults'}},
18001 'type': 'object'},
18002 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18003 'Result': {'$ref': '#/definitions/StringResults'}},
18004 'type': 'object'},
18005 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18006 'Result': {'$ref': '#/definitions/LifeResults'}},
18007 'type': 'object'},
18008 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18009 'Result': {'$ref': '#/definitions/ErrorResults'}},
18010 'type': 'object'},
18011 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
18012 'Result': {'$ref': '#/definitions/ErrorResults'}},
18013 'type': 'object'},
18014 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
18015 'Result': {'$ref': '#/definitions/ErrorResults'}},
18016 'type': 'object'},
18017 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
18018 'Result': {'$ref': '#/definitions/ErrorResults'}},
18019 'type': 'object'},
18020 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18021 'Result': {'$ref': '#/definitions/ErrorResults'}},
18022 'type': 'object'},
18023 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
18024 'Result': {'$ref': '#/definitions/ErrorResults'}},
18025 'type': 'object'},
18026 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
18027 'Result': {'$ref': '#/definitions/ErrorResults'}},
18028 'type': 'object'},
18029 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18030 'Result': {'$ref': '#/definitions/ErrorResults'}},
18031 'type': 'object'},
18032 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
18033 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
18034 'type': 'object'},
18035 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
18036 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
18037 'type': 'object'},
18038 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
18039 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
18040 'type': 'object'},
18041 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18042 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
18043 'type': 'object'},
18044 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18045 'Result': {'$ref': '#/definitions/VolumeResults'}},
18046 'type': 'object'},
18047 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18048 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18049 'type': 'object'},
18050 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18051 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
18052 'type': 'object'},
18053 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18054 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18055 'type': 'object'},
18056 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18057 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18058 'type': 'object'},
18059 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18060 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
18061 'type': 'object'},
18062 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18063 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18064 'type': 'object'}},
18065 'type': 'object'}
18066
18067
18068 @ReturnMapping(LifeResults)
18069 async def AttachmentLife(self, ids):
18070 '''
18071 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18072 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
18073 '''
18074 # map input types to rpc msg
18075 _params = dict()
18076 msg = dict(type='StorageProvisioner', request='AttachmentLife', version=3, params=_params)
18077 _params['ids'] = ids
18078 reply = await self.rpc(msg)
18079 return reply
18080
18081
18082
18083 @ReturnMapping(ErrorResults)
18084 async def EnsureDead(self, entities):
18085 '''
18086 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18087 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18088 '''
18089 # map input types to rpc msg
18090 _params = dict()
18091 msg = dict(type='StorageProvisioner', request='EnsureDead', version=3, params=_params)
18092 _params['entities'] = entities
18093 reply = await self.rpc(msg)
18094 return reply
18095
18096
18097
18098 @ReturnMapping(FilesystemAttachmentParamsResults)
18099 async def FilesystemAttachmentParams(self, ids):
18100 '''
18101 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18102 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
18103 '''
18104 # map input types to rpc msg
18105 _params = dict()
18106 msg = dict(type='StorageProvisioner', request='FilesystemAttachmentParams', version=3, params=_params)
18107 _params['ids'] = ids
18108 reply = await self.rpc(msg)
18109 return reply
18110
18111
18112
18113 @ReturnMapping(FilesystemAttachmentResults)
18114 async def FilesystemAttachments(self, ids):
18115 '''
18116 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18117 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
18118 '''
18119 # map input types to rpc msg
18120 _params = dict()
18121 msg = dict(type='StorageProvisioner', request='FilesystemAttachments', version=3, params=_params)
18122 _params['ids'] = ids
18123 reply = await self.rpc(msg)
18124 return reply
18125
18126
18127
18128 @ReturnMapping(FilesystemParamsResults)
18129 async def FilesystemParams(self, entities):
18130 '''
18131 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18132 Returns -> typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
18133 '''
18134 # map input types to rpc msg
18135 _params = dict()
18136 msg = dict(type='StorageProvisioner', request='FilesystemParams', version=3, params=_params)
18137 _params['entities'] = entities
18138 reply = await self.rpc(msg)
18139 return reply
18140
18141
18142
18143 @ReturnMapping(FilesystemResults)
18144 async def Filesystems(self, entities):
18145 '''
18146 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18147 Returns -> typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
18148 '''
18149 # map input types to rpc msg
18150 _params = dict()
18151 msg = dict(type='StorageProvisioner', request='Filesystems', version=3, params=_params)
18152 _params['entities'] = entities
18153 reply = await self.rpc(msg)
18154 return reply
18155
18156
18157
18158 @ReturnMapping(StringResults)
18159 async def InstanceId(self, entities):
18160 '''
18161 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18162 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
18163 '''
18164 # map input types to rpc msg
18165 _params = dict()
18166 msg = dict(type='StorageProvisioner', request='InstanceId', version=3, params=_params)
18167 _params['entities'] = entities
18168 reply = await self.rpc(msg)
18169 return reply
18170
18171
18172
18173 @ReturnMapping(LifeResults)
18174 async def Life(self, entities):
18175 '''
18176 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18177 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
18178 '''
18179 # map input types to rpc msg
18180 _params = dict()
18181 msg = dict(type='StorageProvisioner', request='Life', version=3, params=_params)
18182 _params['entities'] = entities
18183 reply = await self.rpc(msg)
18184 return reply
18185
18186
18187
18188 @ReturnMapping(ErrorResults)
18189 async def Remove(self, entities):
18190 '''
18191 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18192 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18193 '''
18194 # map input types to rpc msg
18195 _params = dict()
18196 msg = dict(type='StorageProvisioner', request='Remove', version=3, params=_params)
18197 _params['entities'] = entities
18198 reply = await self.rpc(msg)
18199 return reply
18200
18201
18202
18203 @ReturnMapping(ErrorResults)
18204 async def RemoveAttachment(self, ids):
18205 '''
18206 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18207 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18208 '''
18209 # map input types to rpc msg
18210 _params = dict()
18211 msg = dict(type='StorageProvisioner', request='RemoveAttachment', version=3, params=_params)
18212 _params['ids'] = ids
18213 reply = await self.rpc(msg)
18214 return reply
18215
18216
18217
18218 @ReturnMapping(ErrorResults)
18219 async def SetFilesystemAttachmentInfo(self, filesystem_attachments):
18220 '''
18221 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
18222 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18223 '''
18224 # map input types to rpc msg
18225 _params = dict()
18226 msg = dict(type='StorageProvisioner', request='SetFilesystemAttachmentInfo', version=3, params=_params)
18227 _params['filesystem-attachments'] = filesystem_attachments
18228 reply = await self.rpc(msg)
18229 return reply
18230
18231
18232
18233 @ReturnMapping(ErrorResults)
18234 async def SetFilesystemInfo(self, filesystems):
18235 '''
18236 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
18237 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18238 '''
18239 # map input types to rpc msg
18240 _params = dict()
18241 msg = dict(type='StorageProvisioner', request='SetFilesystemInfo', version=3, params=_params)
18242 _params['filesystems'] = filesystems
18243 reply = await self.rpc(msg)
18244 return reply
18245
18246
18247
18248 @ReturnMapping(ErrorResults)
18249 async def SetStatus(self, entities):
18250 '''
18251 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18252 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18253 '''
18254 # map input types to rpc msg
18255 _params = dict()
18256 msg = dict(type='StorageProvisioner', request='SetStatus', version=3, params=_params)
18257 _params['entities'] = entities
18258 reply = await self.rpc(msg)
18259 return reply
18260
18261
18262
18263 @ReturnMapping(ErrorResults)
18264 async def SetVolumeAttachmentInfo(self, volume_attachments):
18265 '''
18266 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
18267 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18268 '''
18269 # map input types to rpc msg
18270 _params = dict()
18271 msg = dict(type='StorageProvisioner', request='SetVolumeAttachmentInfo', version=3, params=_params)
18272 _params['volume-attachments'] = volume_attachments
18273 reply = await self.rpc(msg)
18274 return reply
18275
18276
18277
18278 @ReturnMapping(ErrorResults)
18279 async def SetVolumeInfo(self, volumes):
18280 '''
18281 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
18282 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18283 '''
18284 # map input types to rpc msg
18285 _params = dict()
18286 msg = dict(type='StorageProvisioner', request='SetVolumeInfo', version=3, params=_params)
18287 _params['volumes'] = volumes
18288 reply = await self.rpc(msg)
18289 return reply
18290
18291
18292
18293 @ReturnMapping(ErrorResults)
18294 async def UpdateStatus(self, entities):
18295 '''
18296 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18297 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18298 '''
18299 # map input types to rpc msg
18300 _params = dict()
18301 msg = dict(type='StorageProvisioner', request='UpdateStatus', version=3, params=_params)
18302 _params['entities'] = entities
18303 reply = await self.rpc(msg)
18304 return reply
18305
18306
18307
18308 @ReturnMapping(VolumeAttachmentParamsResults)
18309 async def VolumeAttachmentParams(self, ids):
18310 '''
18311 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18312 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
18313 '''
18314 # map input types to rpc msg
18315 _params = dict()
18316 msg = dict(type='StorageProvisioner', request='VolumeAttachmentParams', version=3, params=_params)
18317 _params['ids'] = ids
18318 reply = await self.rpc(msg)
18319 return reply
18320
18321
18322
18323 @ReturnMapping(VolumeAttachmentResults)
18324 async def VolumeAttachments(self, ids):
18325 '''
18326 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18327 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
18328 '''
18329 # map input types to rpc msg
18330 _params = dict()
18331 msg = dict(type='StorageProvisioner', request='VolumeAttachments', version=3, params=_params)
18332 _params['ids'] = ids
18333 reply = await self.rpc(msg)
18334 return reply
18335
18336
18337
18338 @ReturnMapping(BlockDeviceResults)
18339 async def VolumeBlockDevices(self, ids):
18340 '''
18341 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18342 Returns -> typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
18343 '''
18344 # map input types to rpc msg
18345 _params = dict()
18346 msg = dict(type='StorageProvisioner', request='VolumeBlockDevices', version=3, params=_params)
18347 _params['ids'] = ids
18348 reply = await self.rpc(msg)
18349 return reply
18350
18351
18352
18353 @ReturnMapping(VolumeParamsResults)
18354 async def VolumeParams(self, entities):
18355 '''
18356 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18357 Returns -> typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
18358 '''
18359 # map input types to rpc msg
18360 _params = dict()
18361 msg = dict(type='StorageProvisioner', request='VolumeParams', version=3, params=_params)
18362 _params['entities'] = entities
18363 reply = await self.rpc(msg)
18364 return reply
18365
18366
18367
18368 @ReturnMapping(VolumeResults)
18369 async def Volumes(self, entities):
18370 '''
18371 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18372 Returns -> typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
18373 '''
18374 # map input types to rpc msg
18375 _params = dict()
18376 msg = dict(type='StorageProvisioner', request='Volumes', version=3, params=_params)
18377 _params['entities'] = entities
18378 reply = await self.rpc(msg)
18379 return reply
18380
18381
18382
18383 @ReturnMapping(NotifyWatchResults)
18384 async def WatchBlockDevices(self, entities):
18385 '''
18386 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18387 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
18388 '''
18389 # map input types to rpc msg
18390 _params = dict()
18391 msg = dict(type='StorageProvisioner', request='WatchBlockDevices', version=3, params=_params)
18392 _params['entities'] = entities
18393 reply = await self.rpc(msg)
18394 return reply
18395
18396
18397
18398 @ReturnMapping(MachineStorageIdsWatchResults)
18399 async def WatchFilesystemAttachments(self, entities):
18400 '''
18401 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18402 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
18403 '''
18404 # map input types to rpc msg
18405 _params = dict()
18406 msg = dict(type='StorageProvisioner', request='WatchFilesystemAttachments', version=3, params=_params)
18407 _params['entities'] = entities
18408 reply = await self.rpc(msg)
18409 return reply
18410
18411
18412
18413 @ReturnMapping(StringsWatchResults)
18414 async def WatchFilesystems(self, entities):
18415 '''
18416 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18417 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
18418 '''
18419 # map input types to rpc msg
18420 _params = dict()
18421 msg = dict(type='StorageProvisioner', request='WatchFilesystems', version=3, params=_params)
18422 _params['entities'] = entities
18423 reply = await self.rpc(msg)
18424 return reply
18425
18426
18427
18428 @ReturnMapping(NotifyWatchResults)
18429 async def WatchMachines(self, entities):
18430 '''
18431 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18432 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
18433 '''
18434 # map input types to rpc msg
18435 _params = dict()
18436 msg = dict(type='StorageProvisioner', request='WatchMachines', version=3, params=_params)
18437 _params['entities'] = entities
18438 reply = await self.rpc(msg)
18439 return reply
18440
18441
18442
18443 @ReturnMapping(MachineStorageIdsWatchResults)
18444 async def WatchVolumeAttachments(self, entities):
18445 '''
18446 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18447 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
18448 '''
18449 # map input types to rpc msg
18450 _params = dict()
18451 msg = dict(type='StorageProvisioner', request='WatchVolumeAttachments', version=3, params=_params)
18452 _params['entities'] = entities
18453 reply = await self.rpc(msg)
18454 return reply
18455
18456
18457
18458 @ReturnMapping(StringsWatchResults)
18459 async def WatchVolumes(self, entities):
18460 '''
18461 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18462 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
18463 '''
18464 # map input types to rpc msg
18465 _params = dict()
18466 msg = dict(type='StorageProvisioner', request='WatchVolumes', version=3, params=_params)
18467 _params['entities'] = entities
18468 reply = await self.rpc(msg)
18469 return reply
18470
18471
18472 class StringsWatcherFacade(Type):
18473 name = 'StringsWatcher'
18474 version = 1
18475 schema = {'definitions': {'Error': {'additionalProperties': False,
18476 'properties': {'code': {'type': 'string'},
18477 'info': {'$ref': '#/definitions/ErrorInfo'},
18478 'message': {'type': 'string'}},
18479 'required': ['message', 'code'],
18480 'type': 'object'},
18481 'ErrorInfo': {'additionalProperties': False,
18482 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18483 'macaroon-path': {'type': 'string'}},
18484 'type': 'object'},
18485 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18486 'StringsWatchResult': {'additionalProperties': False,
18487 'properties': {'changes': {'items': {'type': 'string'},
18488 'type': 'array'},
18489 'error': {'$ref': '#/definitions/Error'},
18490 'watcher-id': {'type': 'string'}},
18491 'required': ['watcher-id'],
18492 'type': 'object'}},
18493 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
18494 'type': 'object'},
18495 'Stop': {'type': 'object'}},
18496 'type': 'object'}
18497
18498
18499 @ReturnMapping(StringsWatchResult)
18500 async def Next(self):
18501 '''
18502
18503 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
18504 '''
18505 # map input types to rpc msg
18506 _params = dict()
18507 msg = dict(type='StringsWatcher', request='Next', version=1, params=_params)
18508
18509 reply = await self.rpc(msg)
18510 return reply
18511
18512
18513
18514 @ReturnMapping(None)
18515 async def Stop(self):
18516 '''
18517
18518 Returns -> None
18519 '''
18520 # map input types to rpc msg
18521 _params = dict()
18522 msg = dict(type='StringsWatcher', request='Stop', version=1, params=_params)
18523
18524 reply = await self.rpc(msg)
18525 return reply
18526
18527
18528 class SubnetsFacade(Type):
18529 name = 'Subnets'
18530 version = 2
18531 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
18532 'properties': {'space-tag': {'type': 'string'},
18533 'subnet-provider-id': {'type': 'string'},
18534 'subnet-tag': {'type': 'string'},
18535 'zones': {'items': {'type': 'string'},
18536 'type': 'array'}},
18537 'required': ['space-tag'],
18538 'type': 'object'},
18539 'AddSubnetsParams': {'additionalProperties': False,
18540 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
18541 'type': 'array'}},
18542 'required': ['subnets'],
18543 'type': 'object'},
18544 'Error': {'additionalProperties': False,
18545 'properties': {'code': {'type': 'string'},
18546 'info': {'$ref': '#/definitions/ErrorInfo'},
18547 'message': {'type': 'string'}},
18548 'required': ['message', 'code'],
18549 'type': 'object'},
18550 'ErrorInfo': {'additionalProperties': False,
18551 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18552 'macaroon-path': {'type': 'string'}},
18553 'type': 'object'},
18554 'ErrorResult': {'additionalProperties': False,
18555 'properties': {'error': {'$ref': '#/definitions/Error'}},
18556 'type': 'object'},
18557 'ErrorResults': {'additionalProperties': False,
18558 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18559 'type': 'array'}},
18560 'required': ['results'],
18561 'type': 'object'},
18562 'ListSubnetsResults': {'additionalProperties': False,
18563 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
18564 'type': 'array'}},
18565 'required': ['results'],
18566 'type': 'object'},
18567 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18568 'SpaceResult': {'additionalProperties': False,
18569 'properties': {'error': {'$ref': '#/definitions/Error'},
18570 'tag': {'type': 'string'}},
18571 'required': ['tag'],
18572 'type': 'object'},
18573 'SpaceResults': {'additionalProperties': False,
18574 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'},
18575 'type': 'array'}},
18576 'required': ['results'],
18577 'type': 'object'},
18578 'Subnet': {'additionalProperties': False,
18579 'properties': {'cidr': {'type': 'string'},
18580 'life': {'type': 'string'},
18581 'provider-id': {'type': 'string'},
18582 'space-tag': {'type': 'string'},
18583 'status': {'type': 'string'},
18584 'vlan-tag': {'type': 'integer'},
18585 'zones': {'items': {'type': 'string'},
18586 'type': 'array'}},
18587 'required': ['cidr',
18588 'vlan-tag',
18589 'life',
18590 'space-tag',
18591 'zones'],
18592 'type': 'object'},
18593 'SubnetsFilters': {'additionalProperties': False,
18594 'properties': {'space-tag': {'type': 'string'},
18595 'zone': {'type': 'string'}},
18596 'type': 'object'},
18597 'ZoneResult': {'additionalProperties': False,
18598 'properties': {'available': {'type': 'boolean'},
18599 'error': {'$ref': '#/definitions/Error'},
18600 'name': {'type': 'string'}},
18601 'required': ['name', 'available'],
18602 'type': 'object'},
18603 'ZoneResults': {'additionalProperties': False,
18604 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'},
18605 'type': 'array'}},
18606 'required': ['results'],
18607 'type': 'object'}},
18608 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
18609 'Result': {'$ref': '#/definitions/ErrorResults'}},
18610 'type': 'object'},
18611 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
18612 'type': 'object'},
18613 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
18614 'type': 'object'},
18615 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
18616 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
18617 'type': 'object'}},
18618 'type': 'object'}
18619
18620
18621 @ReturnMapping(ErrorResults)
18622 async def AddSubnets(self, subnets):
18623 '''
18624 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
18625 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18626 '''
18627 # map input types to rpc msg
18628 _params = dict()
18629 msg = dict(type='Subnets', request='AddSubnets', version=2, params=_params)
18630 _params['subnets'] = subnets
18631 reply = await self.rpc(msg)
18632 return reply
18633
18634
18635
18636 @ReturnMapping(SpaceResults)
18637 async def AllSpaces(self):
18638 '''
18639
18640 Returns -> typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
18641 '''
18642 # map input types to rpc msg
18643 _params = dict()
18644 msg = dict(type='Subnets', request='AllSpaces', version=2, params=_params)
18645
18646 reply = await self.rpc(msg)
18647 return reply
18648
18649
18650
18651 @ReturnMapping(ZoneResults)
18652 async def AllZones(self):
18653 '''
18654
18655 Returns -> typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
18656 '''
18657 # map input types to rpc msg
18658 _params = dict()
18659 msg = dict(type='Subnets', request='AllZones', version=2, params=_params)
18660
18661 reply = await self.rpc(msg)
18662 return reply
18663
18664
18665
18666 @ReturnMapping(ListSubnetsResults)
18667 async def ListSubnets(self, space_tag, zone):
18668 '''
18669 space_tag : str
18670 zone : str
18671 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
18672 '''
18673 # map input types to rpc msg
18674 _params = dict()
18675 msg = dict(type='Subnets', request='ListSubnets', version=2, params=_params)
18676 _params['space-tag'] = space_tag
18677 _params['zone'] = zone
18678 reply = await self.rpc(msg)
18679 return reply
18680
18681
18682 class UndertakerFacade(Type):
18683 name = 'Undertaker'
18684 version = 1
18685 schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
18686 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18687 'type': 'object'}},
18688 'type': 'object'},
18689 'info': {'type': 'string'},
18690 'status': {'type': 'string'},
18691 'tag': {'type': 'string'}},
18692 'required': ['tag',
18693 'status',
18694 'info',
18695 'data'],
18696 'type': 'object'},
18697 'Error': {'additionalProperties': False,
18698 'properties': {'code': {'type': 'string'},
18699 'info': {'$ref': '#/definitions/ErrorInfo'},
18700 'message': {'type': 'string'}},
18701 'required': ['message', 'code'],
18702 'type': 'object'},
18703 'ErrorInfo': {'additionalProperties': False,
18704 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18705 'macaroon-path': {'type': 'string'}},
18706 'type': 'object'},
18707 'ErrorResult': {'additionalProperties': False,
18708 'properties': {'error': {'$ref': '#/definitions/Error'}},
18709 'type': 'object'},
18710 'ErrorResults': {'additionalProperties': False,
18711 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18712 'type': 'array'}},
18713 'required': ['results'],
18714 'type': 'object'},
18715 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18716 'ModelConfigResult': {'additionalProperties': False,
18717 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
18718 'type': 'object'}},
18719 'type': 'object'}},
18720 'required': ['config'],
18721 'type': 'object'},
18722 'NotifyWatchResult': {'additionalProperties': False,
18723 'properties': {'NotifyWatcherId': {'type': 'string'},
18724 'error': {'$ref': '#/definitions/Error'}},
18725 'required': ['NotifyWatcherId'],
18726 'type': 'object'},
18727 'NotifyWatchResults': {'additionalProperties': False,
18728 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
18729 'type': 'array'}},
18730 'required': ['results'],
18731 'type': 'object'},
18732 'SetStatus': {'additionalProperties': False,
18733 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18734 'type': 'array'}},
18735 'required': ['entities'],
18736 'type': 'object'},
18737 'UndertakerModelInfo': {'additionalProperties': False,
18738 'properties': {'global-name': {'type': 'string'},
18739 'is-system': {'type': 'boolean'},
18740 'life': {'type': 'string'},
18741 'name': {'type': 'string'},
18742 'uuid': {'type': 'string'}},
18743 'required': ['uuid',
18744 'name',
18745 'global-name',
18746 'is-system',
18747 'life'],
18748 'type': 'object'},
18749 'UndertakerModelInfoResult': {'additionalProperties': False,
18750 'properties': {'error': {'$ref': '#/definitions/Error'},
18751 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
18752 'required': ['result'],
18753 'type': 'object'}},
18754 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
18755 'type': 'object'},
18756 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
18757 'type': 'object'},
18758 'ProcessDyingModel': {'type': 'object'},
18759 'RemoveModel': {'type': 'object'},
18760 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18761 'Result': {'$ref': '#/definitions/ErrorResults'}},
18762 'type': 'object'},
18763 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18764 'Result': {'$ref': '#/definitions/ErrorResults'}},
18765 'type': 'object'},
18766 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18767 'type': 'object'}},
18768 'type': 'object'}
18769
18770
18771 @ReturnMapping(ModelConfigResult)
18772 async def ModelConfig(self):
18773 '''
18774
18775 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
18776 '''
18777 # map input types to rpc msg
18778 _params = dict()
18779 msg = dict(type='Undertaker', request='ModelConfig', version=1, params=_params)
18780
18781 reply = await self.rpc(msg)
18782 return reply
18783
18784
18785
18786 @ReturnMapping(UndertakerModelInfoResult)
18787 async def ModelInfo(self):
18788 '''
18789
18790 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
18791 '''
18792 # map input types to rpc msg
18793 _params = dict()
18794 msg = dict(type='Undertaker', request='ModelInfo', version=1, params=_params)
18795
18796 reply = await self.rpc(msg)
18797 return reply
18798
18799
18800
18801 @ReturnMapping(None)
18802 async def ProcessDyingModel(self):
18803 '''
18804
18805 Returns -> None
18806 '''
18807 # map input types to rpc msg
18808 _params = dict()
18809 msg = dict(type='Undertaker', request='ProcessDyingModel', version=1, params=_params)
18810
18811 reply = await self.rpc(msg)
18812 return reply
18813
18814
18815
18816 @ReturnMapping(None)
18817 async def RemoveModel(self):
18818 '''
18819
18820 Returns -> None
18821 '''
18822 # map input types to rpc msg
18823 _params = dict()
18824 msg = dict(type='Undertaker', request='RemoveModel', version=1, params=_params)
18825
18826 reply = await self.rpc(msg)
18827 return reply
18828
18829
18830
18831 @ReturnMapping(ErrorResults)
18832 async def SetStatus(self, entities):
18833 '''
18834 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18835 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18836 '''
18837 # map input types to rpc msg
18838 _params = dict()
18839 msg = dict(type='Undertaker', request='SetStatus', version=1, params=_params)
18840 _params['entities'] = entities
18841 reply = await self.rpc(msg)
18842 return reply
18843
18844
18845
18846 @ReturnMapping(ErrorResults)
18847 async def UpdateStatus(self, entities):
18848 '''
18849 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18850 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18851 '''
18852 # map input types to rpc msg
18853 _params = dict()
18854 msg = dict(type='Undertaker', request='UpdateStatus', version=1, params=_params)
18855 _params['entities'] = entities
18856 reply = await self.rpc(msg)
18857 return reply
18858
18859
18860
18861 @ReturnMapping(NotifyWatchResults)
18862 async def WatchModelResources(self):
18863 '''
18864
18865 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
18866 '''
18867 # map input types to rpc msg
18868 _params = dict()
18869 msg = dict(type='Undertaker', request='WatchModelResources', version=1, params=_params)
18870
18871 reply = await self.rpc(msg)
18872 return reply
18873
18874
18875 class UnitAssignerFacade(Type):
18876 name = 'UnitAssigner'
18877 version = 1
18878 schema = {'definitions': {'Entities': {'additionalProperties': False,
18879 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
18880 'type': 'array'}},
18881 'required': ['entities'],
18882 'type': 'object'},
18883 'Entity': {'additionalProperties': False,
18884 'properties': {'tag': {'type': 'string'}},
18885 'required': ['tag'],
18886 'type': 'object'},
18887 'EntityStatusArgs': {'additionalProperties': False,
18888 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18889 'type': 'object'}},
18890 'type': 'object'},
18891 'info': {'type': 'string'},
18892 'status': {'type': 'string'},
18893 'tag': {'type': 'string'}},
18894 'required': ['tag',
18895 'status',
18896 'info',
18897 'data'],
18898 'type': 'object'},
18899 'Error': {'additionalProperties': False,
18900 'properties': {'code': {'type': 'string'},
18901 'info': {'$ref': '#/definitions/ErrorInfo'},
18902 'message': {'type': 'string'}},
18903 'required': ['message', 'code'],
18904 'type': 'object'},
18905 'ErrorInfo': {'additionalProperties': False,
18906 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18907 'macaroon-path': {'type': 'string'}},
18908 'type': 'object'},
18909 'ErrorResult': {'additionalProperties': False,
18910 'properties': {'error': {'$ref': '#/definitions/Error'}},
18911 'type': 'object'},
18912 'ErrorResults': {'additionalProperties': False,
18913 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18914 'type': 'array'}},
18915 'required': ['results'],
18916 'type': 'object'},
18917 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18918 'SetStatus': {'additionalProperties': False,
18919 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18920 'type': 'array'}},
18921 'required': ['entities'],
18922 'type': 'object'},
18923 'StringsWatchResult': {'additionalProperties': False,
18924 'properties': {'changes': {'items': {'type': 'string'},
18925 'type': 'array'},
18926 'error': {'$ref': '#/definitions/Error'},
18927 'watcher-id': {'type': 'string'}},
18928 'required': ['watcher-id'],
18929 'type': 'object'}},
18930 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18931 'Result': {'$ref': '#/definitions/ErrorResults'}},
18932 'type': 'object'},
18933 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18934 'Result': {'$ref': '#/definitions/ErrorResults'}},
18935 'type': 'object'},
18936 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
18937 'type': 'object'}},
18938 'type': 'object'}
18939
18940
18941 @ReturnMapping(ErrorResults)
18942 async def AssignUnits(self, entities):
18943 '''
18944 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18945 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18946 '''
18947 # map input types to rpc msg
18948 _params = dict()
18949 msg = dict(type='UnitAssigner', request='AssignUnits', version=1, params=_params)
18950 _params['entities'] = entities
18951 reply = await self.rpc(msg)
18952 return reply
18953
18954
18955
18956 @ReturnMapping(ErrorResults)
18957 async def SetAgentStatus(self, entities):
18958 '''
18959 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18960 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18961 '''
18962 # map input types to rpc msg
18963 _params = dict()
18964 msg = dict(type='UnitAssigner', request='SetAgentStatus', version=1, params=_params)
18965 _params['entities'] = entities
18966 reply = await self.rpc(msg)
18967 return reply
18968
18969
18970
18971 @ReturnMapping(StringsWatchResult)
18972 async def WatchUnitAssignments(self):
18973 '''
18974
18975 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
18976 '''
18977 # map input types to rpc msg
18978 _params = dict()
18979 msg = dict(type='UnitAssigner', request='WatchUnitAssignments', version=1, params=_params)
18980
18981 reply = await self.rpc(msg)
18982 return reply
18983
18984
18985 class UniterFacade(Type):
18986 name = 'Uniter'
18987 version = 4
18988 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
18989 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
18990 'type': 'array'},
18991 'type': 'array'}},
18992 'required': ['servers'],
18993 'type': 'object'},
18994 'Action': {'additionalProperties': False,
18995 'properties': {'name': {'type': 'string'},
18996 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
18997 'type': 'object'}},
18998 'type': 'object'},
18999 'receiver': {'type': 'string'},
19000 'tag': {'type': 'string'}},
19001 'required': ['tag', 'receiver', 'name'],
19002 'type': 'object'},
19003 'ActionExecutionResult': {'additionalProperties': False,
19004 'properties': {'action-tag': {'type': 'string'},
19005 'message': {'type': 'string'},
19006 'results': {'patternProperties': {'.*': {'additionalProperties': True,
19007 'type': 'object'}},
19008 'type': 'object'},
19009 'status': {'type': 'string'}},
19010 'required': ['action-tag', 'status'],
19011 'type': 'object'},
19012 'ActionExecutionResults': {'additionalProperties': False,
19013 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
19014 'type': 'array'}},
19015 'type': 'object'},
19016 'ActionResult': {'additionalProperties': False,
19017 'properties': {'action': {'$ref': '#/definitions/Action'},
19018 'completed': {'format': 'date-time',
19019 'type': 'string'},
19020 'enqueued': {'format': 'date-time',
19021 'type': 'string'},
19022 'error': {'$ref': '#/definitions/Error'},
19023 'message': {'type': 'string'},
19024 'output': {'patternProperties': {'.*': {'additionalProperties': True,
19025 'type': 'object'}},
19026 'type': 'object'},
19027 'started': {'format': 'date-time',
19028 'type': 'string'},
19029 'status': {'type': 'string'}},
19030 'type': 'object'},
19031 'ActionResults': {'additionalProperties': False,
19032 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
19033 'type': 'array'}},
19034 'type': 'object'},
19035 'Address': {'additionalProperties': False,
19036 'properties': {'scope': {'type': 'string'},
19037 'space-name': {'type': 'string'},
19038 'type': {'type': 'string'},
19039 'value': {'type': 'string'}},
19040 'required': ['value', 'type', 'scope'],
19041 'type': 'object'},
19042 'ApplicationStatusResult': {'additionalProperties': False,
19043 'properties': {'application': {'$ref': '#/definitions/StatusResult'},
19044 'error': {'$ref': '#/definitions/Error'},
19045 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
19046 'type': 'object'}},
19047 'required': ['application',
19048 'units'],
19049 'type': 'object'},
19050 'ApplicationStatusResults': {'additionalProperties': False,
19051 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
19052 'type': 'array'}},
19053 'required': ['results'],
19054 'type': 'object'},
19055 'BoolResult': {'additionalProperties': False,
19056 'properties': {'error': {'$ref': '#/definitions/Error'},
19057 'result': {'type': 'boolean'}},
19058 'required': ['result'],
19059 'type': 'object'},
19060 'BoolResults': {'additionalProperties': False,
19061 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
19062 'type': 'array'}},
19063 'required': ['results'],
19064 'type': 'object'},
19065 'BytesResult': {'additionalProperties': False,
19066 'properties': {'result': {'items': {'type': 'integer'},
19067 'type': 'array'}},
19068 'required': ['result'],
19069 'type': 'object'},
19070 'CharmRelation': {'additionalProperties': False,
19071 'properties': {'interface': {'type': 'string'},
19072 'limit': {'type': 'integer'},
19073 'name': {'type': 'string'},
19074 'optional': {'type': 'boolean'},
19075 'role': {'type': 'string'},
19076 'scope': {'type': 'string'}},
19077 'required': ['name',
19078 'role',
19079 'interface',
19080 'optional',
19081 'limit',
19082 'scope'],
19083 'type': 'object'},
19084 'CharmURL': {'additionalProperties': False,
19085 'properties': {'url': {'type': 'string'}},
19086 'required': ['url'],
19087 'type': 'object'},
19088 'CharmURLs': {'additionalProperties': False,
19089 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'},
19090 'type': 'array'}},
19091 'required': ['urls'],
19092 'type': 'object'},
19093 'ConfigSettingsResult': {'additionalProperties': False,
19094 'properties': {'error': {'$ref': '#/definitions/Error'},
19095 'settings': {'patternProperties': {'.*': {'additionalProperties': True,
19096 'type': 'object'}},
19097 'type': 'object'}},
19098 'required': ['settings'],
19099 'type': 'object'},
19100 'ConfigSettingsResults': {'additionalProperties': False,
19101 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
19102 'type': 'array'}},
19103 'required': ['results'],
19104 'type': 'object'},
19105 'Endpoint': {'additionalProperties': False,
19106 'properties': {'application-name': {'type': 'string'},
19107 'relation': {'$ref': '#/definitions/CharmRelation'}},
19108 'required': ['application-name', 'relation'],
19109 'type': 'object'},
19110 'Entities': {'additionalProperties': False,
19111 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
19112 'type': 'array'}},
19113 'required': ['entities'],
19114 'type': 'object'},
19115 'EntitiesCharmURL': {'additionalProperties': False,
19116 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
19117 'type': 'array'}},
19118 'required': ['entities'],
19119 'type': 'object'},
19120 'EntitiesPortRanges': {'additionalProperties': False,
19121 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
19122 'type': 'array'}},
19123 'required': ['entities'],
19124 'type': 'object'},
19125 'Entity': {'additionalProperties': False,
19126 'properties': {'tag': {'type': 'string'}},
19127 'required': ['tag'],
19128 'type': 'object'},
19129 'EntityCharmURL': {'additionalProperties': False,
19130 'properties': {'charm-url': {'type': 'string'},
19131 'tag': {'type': 'string'}},
19132 'required': ['tag', 'charm-url'],
19133 'type': 'object'},
19134 'EntityPortRange': {'additionalProperties': False,
19135 'properties': {'from-port': {'type': 'integer'},
19136 'protocol': {'type': 'string'},
19137 'tag': {'type': 'string'},
19138 'to-port': {'type': 'integer'}},
19139 'required': ['tag',
19140 'protocol',
19141 'from-port',
19142 'to-port'],
19143 'type': 'object'},
19144 'EntityStatusArgs': {'additionalProperties': False,
19145 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
19146 'type': 'object'}},
19147 'type': 'object'},
19148 'info': {'type': 'string'},
19149 'status': {'type': 'string'},
19150 'tag': {'type': 'string'}},
19151 'required': ['tag',
19152 'status',
19153 'info',
19154 'data'],
19155 'type': 'object'},
19156 'EntityWorkloadVersion': {'additionalProperties': False,
19157 'properties': {'tag': {'type': 'string'},
19158 'workload-version': {'type': 'string'}},
19159 'required': ['tag',
19160 'workload-version'],
19161 'type': 'object'},
19162 'EntityWorkloadVersions': {'additionalProperties': False,
19163 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'},
19164 'type': 'array'}},
19165 'required': ['entities'],
19166 'type': 'object'},
19167 'Error': {'additionalProperties': False,
19168 'properties': {'code': {'type': 'string'},
19169 'info': {'$ref': '#/definitions/ErrorInfo'},
19170 'message': {'type': 'string'}},
19171 'required': ['message', 'code'],
19172 'type': 'object'},
19173 'ErrorInfo': {'additionalProperties': False,
19174 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
19175 'macaroon-path': {'type': 'string'}},
19176 'type': 'object'},
19177 'ErrorResult': {'additionalProperties': False,
19178 'properties': {'error': {'$ref': '#/definitions/Error'}},
19179 'type': 'object'},
19180 'ErrorResults': {'additionalProperties': False,
19181 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
19182 'type': 'array'}},
19183 'required': ['results'],
19184 'type': 'object'},
19185 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
19186 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
19187 'type': 'array'}},
19188 'required': ['results'],
19189 'type': 'object'},
19190 'GetLeadershipSettingsResult': {'additionalProperties': False,
19191 'properties': {'error': {'$ref': '#/definitions/Error'},
19192 'settings': {'patternProperties': {'.*': {'type': 'string'}},
19193 'type': 'object'}},
19194 'required': ['settings'],
19195 'type': 'object'},
19196 'HostPort': {'additionalProperties': False,
19197 'properties': {'Address': {'$ref': '#/definitions/Address'},
19198 'port': {'type': 'integer'}},
19199 'required': ['Address', 'port'],
19200 'type': 'object'},
19201 'IntResult': {'additionalProperties': False,
19202 'properties': {'error': {'$ref': '#/definitions/Error'},
19203 'result': {'type': 'integer'}},
19204 'required': ['result'],
19205 'type': 'object'},
19206 'IntResults': {'additionalProperties': False,
19207 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
19208 'type': 'array'}},
19209 'required': ['results'],
19210 'type': 'object'},
19211 'LifeResult': {'additionalProperties': False,
19212 'properties': {'error': {'$ref': '#/definitions/Error'},
19213 'life': {'type': 'string'}},
19214 'required': ['life'],
19215 'type': 'object'},
19216 'LifeResults': {'additionalProperties': False,
19217 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
19218 'type': 'array'}},
19219 'required': ['results'],
19220 'type': 'object'},
19221 'Macaroon': {'additionalProperties': False, 'type': 'object'},
19222 'MachinePortRange': {'additionalProperties': False,
19223 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
19224 'relation-tag': {'type': 'string'},
19225 'unit-tag': {'type': 'string'}},
19226 'required': ['unit-tag',
19227 'relation-tag',
19228 'port-range'],
19229 'type': 'object'},
19230 'MachinePortsResult': {'additionalProperties': False,
19231 'properties': {'error': {'$ref': '#/definitions/Error'},
19232 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
19233 'type': 'array'}},
19234 'required': ['ports'],
19235 'type': 'object'},
19236 'MachinePortsResults': {'additionalProperties': False,
19237 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
19238 'type': 'array'}},
19239 'required': ['results'],
19240 'type': 'object'},
19241 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
19242 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
19243 'type': 'array'}},
19244 'required': ['params'],
19245 'type': 'object'},
19246 'MergeLeadershipSettingsParam': {'additionalProperties': False,
19247 'properties': {'application-tag': {'type': 'string'},
19248 'settings': {'patternProperties': {'.*': {'type': 'string'}},
19249 'type': 'object'}},
19250 'required': ['application-tag',
19251 'settings'],
19252 'type': 'object'},
19253 'MeterStatusResult': {'additionalProperties': False,
19254 'properties': {'code': {'type': 'string'},
19255 'error': {'$ref': '#/definitions/Error'},
19256 'info': {'type': 'string'}},
19257 'required': ['code', 'info'],
19258 'type': 'object'},
19259 'MeterStatusResults': {'additionalProperties': False,
19260 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
19261 'type': 'array'}},
19262 'required': ['results'],
19263 'type': 'object'},
19264 'Metric': {'additionalProperties': False,
19265 'properties': {'key': {'type': 'string'},
19266 'time': {'format': 'date-time',
19267 'type': 'string'},
19268 'value': {'type': 'string'}},
19269 'required': ['key', 'value', 'time'],
19270 'type': 'object'},
19271 'MetricBatch': {'additionalProperties': False,
19272 'properties': {'charm-url': {'type': 'string'},
19273 'created': {'format': 'date-time',
19274 'type': 'string'},
19275 'metrics': {'items': {'$ref': '#/definitions/Metric'},
19276 'type': 'array'},
19277 'uuid': {'type': 'string'}},
19278 'required': ['uuid',
19279 'charm-url',
19280 'created',
19281 'metrics'],
19282 'type': 'object'},
19283 'MetricBatchParam': {'additionalProperties': False,
19284 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
19285 'tag': {'type': 'string'}},
19286 'required': ['tag', 'batch'],
19287 'type': 'object'},
19288 'MetricBatchParams': {'additionalProperties': False,
19289 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
19290 'type': 'array'}},
19291 'required': ['batches'],
19292 'type': 'object'},
19293 'ModelConfigResult': {'additionalProperties': False,
19294 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
19295 'type': 'object'}},
19296 'type': 'object'}},
19297 'required': ['config'],
19298 'type': 'object'},
19299 'ModelResult': {'additionalProperties': False,
19300 'properties': {'error': {'$ref': '#/definitions/Error'},
19301 'name': {'type': 'string'},
19302 'uuid': {'type': 'string'}},
19303 'required': ['name', 'uuid'],
19304 'type': 'object'},
19305 'NetworkConfig': {'additionalProperties': False,
19306 'properties': {'address': {'type': 'string'},
19307 'cidr': {'type': 'string'},
19308 'config-type': {'type': 'string'},
19309 'device-index': {'type': 'integer'},
19310 'disabled': {'type': 'boolean'},
19311 'dns-search-domains': {'items': {'type': 'string'},
19312 'type': 'array'},
19313 'dns-servers': {'items': {'type': 'string'},
19314 'type': 'array'},
19315 'gateway-address': {'type': 'string'},
19316 'interface-name': {'type': 'string'},
19317 'interface-type': {'type': 'string'},
19318 'mac-address': {'type': 'string'},
19319 'mtu': {'type': 'integer'},
19320 'no-auto-start': {'type': 'boolean'},
19321 'parent-interface-name': {'type': 'string'},
19322 'provider-address-id': {'type': 'string'},
19323 'provider-id': {'type': 'string'},
19324 'provider-space-id': {'type': 'string'},
19325 'provider-subnet-id': {'type': 'string'},
19326 'provider-vlan-id': {'type': 'string'},
19327 'vlan-tag': {'type': 'integer'}},
19328 'required': ['device-index',
19329 'mac-address',
19330 'cidr',
19331 'mtu',
19332 'provider-id',
19333 'provider-subnet-id',
19334 'provider-space-id',
19335 'provider-address-id',
19336 'provider-vlan-id',
19337 'vlan-tag',
19338 'interface-name',
19339 'parent-interface-name',
19340 'interface-type',
19341 'disabled'],
19342 'type': 'object'},
19343 'NotifyWatchResult': {'additionalProperties': False,
19344 'properties': {'NotifyWatcherId': {'type': 'string'},
19345 'error': {'$ref': '#/definitions/Error'}},
19346 'required': ['NotifyWatcherId'],
19347 'type': 'object'},
19348 'NotifyWatchResults': {'additionalProperties': False,
19349 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
19350 'type': 'array'}},
19351 'required': ['results'],
19352 'type': 'object'},
19353 'PortRange': {'additionalProperties': False,
19354 'properties': {'from-port': {'type': 'integer'},
19355 'protocol': {'type': 'string'},
19356 'to-port': {'type': 'integer'}},
19357 'required': ['from-port', 'to-port', 'protocol'],
19358 'type': 'object'},
19359 'RelationIds': {'additionalProperties': False,
19360 'properties': {'relation-ids': {'items': {'type': 'integer'},
19361 'type': 'array'}},
19362 'required': ['relation-ids'],
19363 'type': 'object'},
19364 'RelationResult': {'additionalProperties': False,
19365 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'},
19366 'error': {'$ref': '#/definitions/Error'},
19367 'id': {'type': 'integer'},
19368 'key': {'type': 'string'},
19369 'life': {'type': 'string'}},
19370 'required': ['life',
19371 'id',
19372 'key',
19373 'endpoint'],
19374 'type': 'object'},
19375 'RelationResults': {'additionalProperties': False,
19376 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'},
19377 'type': 'array'}},
19378 'required': ['results'],
19379 'type': 'object'},
19380 'RelationUnit': {'additionalProperties': False,
19381 'properties': {'relation': {'type': 'string'},
19382 'unit': {'type': 'string'}},
19383 'required': ['relation', 'unit'],
19384 'type': 'object'},
19385 'RelationUnitPair': {'additionalProperties': False,
19386 'properties': {'local-unit': {'type': 'string'},
19387 'relation': {'type': 'string'},
19388 'remote-unit': {'type': 'string'}},
19389 'required': ['relation',
19390 'local-unit',
19391 'remote-unit'],
19392 'type': 'object'},
19393 'RelationUnitPairs': {'additionalProperties': False,
19394 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
19395 'type': 'array'}},
19396 'required': ['relation-unit-pairs'],
19397 'type': 'object'},
19398 'RelationUnitSettings': {'additionalProperties': False,
19399 'properties': {'relation': {'type': 'string'},
19400 'settings': {'patternProperties': {'.*': {'type': 'string'}},
19401 'type': 'object'},
19402 'unit': {'type': 'string'}},
19403 'required': ['relation',
19404 'unit',
19405 'settings'],
19406 'type': 'object'},
19407 'RelationUnits': {'additionalProperties': False,
19408 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
19409 'type': 'array'}},
19410 'required': ['relation-units'],
19411 'type': 'object'},
19412 'RelationUnitsChange': {'additionalProperties': False,
19413 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
19414 'type': 'object'},
19415 'departed': {'items': {'type': 'string'},
19416 'type': 'array'}},
19417 'required': ['changed'],
19418 'type': 'object'},
19419 'RelationUnitsSettings': {'additionalProperties': False,
19420 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
19421 'type': 'array'}},
19422 'required': ['relation-units'],
19423 'type': 'object'},
19424 'RelationUnitsWatchResult': {'additionalProperties': False,
19425 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
19426 'error': {'$ref': '#/definitions/Error'},
19427 'watcher-id': {'type': 'string'}},
19428 'required': ['watcher-id',
19429 'changes'],
19430 'type': 'object'},
19431 'RelationUnitsWatchResults': {'additionalProperties': False,
19432 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
19433 'type': 'array'}},
19434 'required': ['results'],
19435 'type': 'object'},
19436 'ResolvedModeResult': {'additionalProperties': False,
19437 'properties': {'error': {'$ref': '#/definitions/Error'},
19438 'mode': {'type': 'string'}},
19439 'required': ['mode'],
19440 'type': 'object'},
19441 'ResolvedModeResults': {'additionalProperties': False,
19442 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
19443 'type': 'array'}},
19444 'required': ['results'],
19445 'type': 'object'},
19446 'SetStatus': {'additionalProperties': False,
19447 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
19448 'type': 'array'}},
19449 'required': ['entities'],
19450 'type': 'object'},
19451 'SettingsResult': {'additionalProperties': False,
19452 'properties': {'error': {'$ref': '#/definitions/Error'},
19453 'settings': {'patternProperties': {'.*': {'type': 'string'}},
19454 'type': 'object'}},
19455 'required': ['settings'],
19456 'type': 'object'},
19457 'SettingsResults': {'additionalProperties': False,
19458 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
19459 'type': 'array'}},
19460 'required': ['results'],
19461 'type': 'object'},
19462 'StatusResult': {'additionalProperties': False,
19463 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
19464 'type': 'object'}},
19465 'type': 'object'},
19466 'error': {'$ref': '#/definitions/Error'},
19467 'id': {'type': 'string'},
19468 'info': {'type': 'string'},
19469 'life': {'type': 'string'},
19470 'since': {'format': 'date-time',
19471 'type': 'string'},
19472 'status': {'type': 'string'}},
19473 'required': ['id',
19474 'life',
19475 'status',
19476 'info',
19477 'data',
19478 'since'],
19479 'type': 'object'},
19480 'StatusResults': {'additionalProperties': False,
19481 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
19482 'type': 'array'}},
19483 'required': ['results'],
19484 'type': 'object'},
19485 'StorageAddParams': {'additionalProperties': False,
19486 'properties': {'name': {'type': 'string'},
19487 'storage': {'$ref': '#/definitions/StorageConstraints'},
19488 'unit': {'type': 'string'}},
19489 'required': ['unit', 'name', 'storage'],
19490 'type': 'object'},
19491 'StorageAttachment': {'additionalProperties': False,
19492 'properties': {'kind': {'type': 'integer'},
19493 'life': {'type': 'string'},
19494 'location': {'type': 'string'},
19495 'owner-tag': {'type': 'string'},
19496 'storage-tag': {'type': 'string'},
19497 'unit-tag': {'type': 'string'}},
19498 'required': ['storage-tag',
19499 'owner-tag',
19500 'unit-tag',
19501 'kind',
19502 'location',
19503 'life'],
19504 'type': 'object'},
19505 'StorageAttachmentId': {'additionalProperties': False,
19506 'properties': {'storage-tag': {'type': 'string'},
19507 'unit-tag': {'type': 'string'}},
19508 'required': ['storage-tag',
19509 'unit-tag'],
19510 'type': 'object'},
19511 'StorageAttachmentIds': {'additionalProperties': False,
19512 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
19513 'type': 'array'}},
19514 'required': ['ids'],
19515 'type': 'object'},
19516 'StorageAttachmentIdsResult': {'additionalProperties': False,
19517 'properties': {'error': {'$ref': '#/definitions/Error'},
19518 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
19519 'required': ['result'],
19520 'type': 'object'},
19521 'StorageAttachmentIdsResults': {'additionalProperties': False,
19522 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
19523 'type': 'array'}},
19524 'type': 'object'},
19525 'StorageAttachmentResult': {'additionalProperties': False,
19526 'properties': {'error': {'$ref': '#/definitions/Error'},
19527 'result': {'$ref': '#/definitions/StorageAttachment'}},
19528 'required': ['result'],
19529 'type': 'object'},
19530 'StorageAttachmentResults': {'additionalProperties': False,
19531 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
19532 'type': 'array'}},
19533 'type': 'object'},
19534 'StorageConstraints': {'additionalProperties': False,
19535 'properties': {'count': {'type': 'integer'},
19536 'pool': {'type': 'string'},
19537 'size': {'type': 'integer'}},
19538 'type': 'object'},
19539 'StoragesAddParams': {'additionalProperties': False,
19540 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
19541 'type': 'array'}},
19542 'required': ['storages'],
19543 'type': 'object'},
19544 'StringBoolResult': {'additionalProperties': False,
19545 'properties': {'error': {'$ref': '#/definitions/Error'},
19546 'ok': {'type': 'boolean'},
19547 'result': {'type': 'string'}},
19548 'required': ['result', 'ok'],
19549 'type': 'object'},
19550 'StringBoolResults': {'additionalProperties': False,
19551 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'},
19552 'type': 'array'}},
19553 'required': ['results'],
19554 'type': 'object'},
19555 'StringResult': {'additionalProperties': False,
19556 'properties': {'error': {'$ref': '#/definitions/Error'},
19557 'result': {'type': 'string'}},
19558 'required': ['result'],
19559 'type': 'object'},
19560 'StringResults': {'additionalProperties': False,
19561 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
19562 'type': 'array'}},
19563 'required': ['results'],
19564 'type': 'object'},
19565 'StringsResult': {'additionalProperties': False,
19566 'properties': {'error': {'$ref': '#/definitions/Error'},
19567 'result': {'items': {'type': 'string'},
19568 'type': 'array'}},
19569 'type': 'object'},
19570 'StringsResults': {'additionalProperties': False,
19571 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
19572 'type': 'array'}},
19573 'required': ['results'],
19574 'type': 'object'},
19575 'StringsWatchResult': {'additionalProperties': False,
19576 'properties': {'changes': {'items': {'type': 'string'},
19577 'type': 'array'},
19578 'error': {'$ref': '#/definitions/Error'},
19579 'watcher-id': {'type': 'string'}},
19580 'required': ['watcher-id'],
19581 'type': 'object'},
19582 'StringsWatchResults': {'additionalProperties': False,
19583 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
19584 'type': 'array'}},
19585 'required': ['results'],
19586 'type': 'object'},
19587 'UnitNetworkConfig': {'additionalProperties': False,
19588 'properties': {'binding-name': {'type': 'string'},
19589 'unit-tag': {'type': 'string'}},
19590 'required': ['unit-tag', 'binding-name'],
19591 'type': 'object'},
19592 'UnitNetworkConfigResult': {'additionalProperties': False,
19593 'properties': {'error': {'$ref': '#/definitions/Error'},
19594 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
19595 'type': 'array'}},
19596 'required': ['info'],
19597 'type': 'object'},
19598 'UnitNetworkConfigResults': {'additionalProperties': False,
19599 'properties': {'results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
19600 'type': 'array'}},
19601 'required': ['results'],
19602 'type': 'object'},
19603 'UnitSettings': {'additionalProperties': False,
19604 'properties': {'version': {'type': 'integer'}},
19605 'required': ['version'],
19606 'type': 'object'},
19607 'UnitsNetworkConfig': {'additionalProperties': False,
19608 'properties': {'args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
19609 'type': 'array'}},
19610 'required': ['args'],
19611 'type': 'object'}},
19612 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
19613 'type': 'object'},
19614 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
19615 'type': 'object'},
19616 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19617 'Result': {'$ref': '#/definitions/ActionResults'}},
19618 'type': 'object'},
19619 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
19620 'Result': {'$ref': '#/definitions/ErrorResults'}},
19621 'type': 'object'},
19622 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
19623 'Result': {'$ref': '#/definitions/ErrorResults'}},
19624 'type': 'object'},
19625 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19626 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
19627 'type': 'object'},
19628 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19629 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
19630 'type': 'object'},
19631 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19632 'Result': {'$ref': '#/definitions/StringResults'}},
19633 'type': 'object'},
19634 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19635 'Result': {'$ref': '#/definitions/StringResults'}},
19636 'type': 'object'},
19637 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19638 'Result': {'$ref': '#/definitions/ErrorResults'}},
19639 'type': 'object'},
19640 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
19641 'type': 'object'},
19642 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
19643 'Result': {'$ref': '#/definitions/StringResults'}},
19644 'type': 'object'},
19645 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19646 'Result': {'$ref': '#/definitions/IntResults'}},
19647 'type': 'object'},
19648 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19649 'Result': {'$ref': '#/definitions/StringBoolResults'}},
19650 'type': 'object'},
19651 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19652 'Result': {'$ref': '#/definitions/ErrorResults'}},
19653 'type': 'object'},
19654 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
19655 'Result': {'$ref': '#/definitions/ErrorResults'}},
19656 'type': 'object'},
19657 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19658 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
19659 'type': 'object'},
19660 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
19661 'type': 'object'},
19662 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19663 'Result': {'$ref': '#/definitions/ErrorResults'}},
19664 'type': 'object'},
19665 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19666 'Result': {'$ref': '#/definitions/ErrorResults'}},
19667 'type': 'object'},
19668 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19669 'Result': {'$ref': '#/definitions/ErrorResults'}},
19670 'type': 'object'},
19671 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19672 'Result': {'$ref': '#/definitions/ErrorResults'}},
19673 'type': 'object'},
19674 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19675 'Result': {'$ref': '#/definitions/ErrorResults'}},
19676 'type': 'object'},
19677 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
19678 'Result': {'$ref': '#/definitions/ErrorResults'}},
19679 'type': 'object'},
19680 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19681 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
19682 'type': 'object'},
19683 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19684 'Result': {'$ref': '#/definitions/StringBoolResults'}},
19685 'type': 'object'},
19686 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19687 'Result': {'$ref': '#/definitions/BoolResults'}},
19688 'type': 'object'},
19689 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19690 'Result': {'$ref': '#/definitions/StringsResults'}},
19691 'type': 'object'},
19692 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19693 'Result': {'$ref': '#/definitions/ErrorResults'}},
19694 'type': 'object'},
19695 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19696 'Result': {'$ref': '#/definitions/LifeResults'}},
19697 'type': 'object'},
19698 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
19699 'Result': {'$ref': '#/definitions/ErrorResults'}},
19700 'type': 'object'},
19701 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
19702 'type': 'object'},
19703 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
19704 'type': 'object'},
19705 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
19706 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
19707 'type': 'object'},
19708 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
19709 'Result': {'$ref': '#/definitions/ErrorResults'}},
19710 'type': 'object'},
19711 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19712 'Result': {'$ref': '#/definitions/StringResults'}},
19713 'type': 'object'},
19714 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
19715 'type': 'object'},
19716 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19717 'Result': {'$ref': '#/definitions/StringResults'}},
19718 'type': 'object'},
19719 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19720 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
19721 'type': 'object'},
19722 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
19723 'Result': {'$ref': '#/definitions/SettingsResults'}},
19724 'type': 'object'},
19725 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19726 'Result': {'$ref': '#/definitions/SettingsResults'}},
19727 'type': 'object'},
19728 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19729 'Result': {'$ref': '#/definitions/RelationResults'}},
19730 'type': 'object'},
19731 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
19732 'Result': {'$ref': '#/definitions/RelationResults'}},
19733 'type': 'object'},
19734 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19735 'Result': {'$ref': '#/definitions/ErrorResults'}},
19736 'type': 'object'},
19737 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19738 'Result': {'$ref': '#/definitions/ErrorResults'}},
19739 'type': 'object'},
19740 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19741 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
19742 'type': 'object'},
19743 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19744 'Result': {'$ref': '#/definitions/ErrorResults'}},
19745 'type': 'object'},
19746 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19747 'Result': {'$ref': '#/definitions/ErrorResults'}},
19748 'type': 'object'},
19749 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
19750 'Result': {'$ref': '#/definitions/ErrorResults'}},
19751 'type': 'object'},
19752 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19753 'Result': {'$ref': '#/definitions/ErrorResults'}},
19754 'type': 'object'},
19755 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19756 'Result': {'$ref': '#/definitions/ErrorResults'}},
19757 'type': 'object'},
19758 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'},
19759 'Result': {'$ref': '#/definitions/ErrorResults'}},
19760 'type': 'object'},
19761 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19762 'Result': {'$ref': '#/definitions/LifeResults'}},
19763 'type': 'object'},
19764 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19765 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
19766 'type': 'object'},
19767 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19768 'Result': {'$ref': '#/definitions/StatusResults'}},
19769 'type': 'object'},
19770 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19771 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
19772 'type': 'object'},
19773 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
19774 'Result': {'$ref': '#/definitions/ErrorResults'}},
19775 'type': 'object'},
19776 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19777 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19778 'type': 'object'},
19779 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
19780 'type': 'object'},
19781 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19782 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19783 'type': 'object'},
19784 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19785 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19786 'type': 'object'},
19787 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19788 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19789 'type': 'object'},
19790 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
19791 'type': 'object'},
19792 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19793 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19794 'type': 'object'},
19795 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19796 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19797 'type': 'object'},
19798 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19799 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
19800 'type': 'object'},
19801 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19802 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19803 'type': 'object'},
19804 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19805 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19806 'type': 'object'},
19807 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19808 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19809 'type': 'object'},
19810 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19811 'Result': {'$ref': '#/definitions/StringResults'}},
19812 'type': 'object'}},
19813 'type': 'object'}
19814
19815
19816 @ReturnMapping(StringsResult)
19817 async def APIAddresses(self):
19818 '''
19819
19820 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
19821 '''
19822 # map input types to rpc msg
19823 _params = dict()
19824 msg = dict(type='Uniter', request='APIAddresses', version=4, params=_params)
19825
19826 reply = await self.rpc(msg)
19827 return reply
19828
19829
19830
19831 @ReturnMapping(APIHostPortsResult)
19832 async def APIHostPorts(self):
19833 '''
19834
19835 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
19836 '''
19837 # map input types to rpc msg
19838 _params = dict()
19839 msg = dict(type='Uniter', request='APIHostPorts', version=4, params=_params)
19840
19841 reply = await self.rpc(msg)
19842 return reply
19843
19844
19845
19846 @ReturnMapping(ActionResults)
19847 async def Actions(self, entities):
19848 '''
19849 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19850 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
19851 '''
19852 # map input types to rpc msg
19853 _params = dict()
19854 msg = dict(type='Uniter', request='Actions', version=4, params=_params)
19855 _params['entities'] = entities
19856 reply = await self.rpc(msg)
19857 return reply
19858
19859
19860
19861 @ReturnMapping(ErrorResults)
19862 async def AddMetricBatches(self, batches):
19863 '''
19864 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
19865 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19866 '''
19867 # map input types to rpc msg
19868 _params = dict()
19869 msg = dict(type='Uniter', request='AddMetricBatches', version=4, params=_params)
19870 _params['batches'] = batches
19871 reply = await self.rpc(msg)
19872 return reply
19873
19874
19875
19876 @ReturnMapping(ErrorResults)
19877 async def AddUnitStorage(self, storages):
19878 '''
19879 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
19880 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19881 '''
19882 # map input types to rpc msg
19883 _params = dict()
19884 msg = dict(type='Uniter', request='AddUnitStorage', version=4, params=_params)
19885 _params['storages'] = storages
19886 reply = await self.rpc(msg)
19887 return reply
19888
19889
19890
19891 @ReturnMapping(MachinePortsResults)
19892 async def AllMachinePorts(self, entities):
19893 '''
19894 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19895 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
19896 '''
19897 # map input types to rpc msg
19898 _params = dict()
19899 msg = dict(type='Uniter', request='AllMachinePorts', version=4, params=_params)
19900 _params['entities'] = entities
19901 reply = await self.rpc(msg)
19902 return reply
19903
19904
19905
19906 @ReturnMapping(ApplicationStatusResults)
19907 async def ApplicationStatus(self, entities):
19908 '''
19909 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19910 Returns -> typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult>
19911 '''
19912 # map input types to rpc msg
19913 _params = dict()
19914 msg = dict(type='Uniter', request='ApplicationStatus', version=4, params=_params)
19915 _params['entities'] = entities
19916 reply = await self.rpc(msg)
19917 return reply
19918
19919
19920
19921 @ReturnMapping(StringResults)
19922 async def AssignedMachine(self, entities):
19923 '''
19924 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19925 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19926 '''
19927 # map input types to rpc msg
19928 _params = dict()
19929 msg = dict(type='Uniter', request='AssignedMachine', version=4, params=_params)
19930 _params['entities'] = entities
19931 reply = await self.rpc(msg)
19932 return reply
19933
19934
19935
19936 @ReturnMapping(StringResults)
19937 async def AvailabilityZone(self, entities):
19938 '''
19939 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19940 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19941 '''
19942 # map input types to rpc msg
19943 _params = dict()
19944 msg = dict(type='Uniter', request='AvailabilityZone', version=4, params=_params)
19945 _params['entities'] = entities
19946 reply = await self.rpc(msg)
19947 return reply
19948
19949
19950
19951 @ReturnMapping(ErrorResults)
19952 async def BeginActions(self, entities):
19953 '''
19954 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19955 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19956 '''
19957 # map input types to rpc msg
19958 _params = dict()
19959 msg = dict(type='Uniter', request='BeginActions', version=4, params=_params)
19960 _params['entities'] = entities
19961 reply = await self.rpc(msg)
19962 return reply
19963
19964
19965
19966 @ReturnMapping(BytesResult)
19967 async def CACert(self):
19968 '''
19969
19970 Returns -> typing.Sequence<+T_co>[int]
19971 '''
19972 # map input types to rpc msg
19973 _params = dict()
19974 msg = dict(type='Uniter', request='CACert', version=4, params=_params)
19975
19976 reply = await self.rpc(msg)
19977 return reply
19978
19979
19980
19981 @ReturnMapping(StringResults)
19982 async def CharmArchiveSha256(self, urls):
19983 '''
19984 urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL>
19985 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19986 '''
19987 # map input types to rpc msg
19988 _params = dict()
19989 msg = dict(type='Uniter', request='CharmArchiveSha256', version=4, params=_params)
19990 _params['urls'] = urls
19991 reply = await self.rpc(msg)
19992 return reply
19993
19994
19995
19996 @ReturnMapping(IntResults)
19997 async def CharmModifiedVersion(self, entities):
19998 '''
19999 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20000 Returns -> typing.Sequence<+T_co>[~IntResult]<~IntResult>
20001 '''
20002 # map input types to rpc msg
20003 _params = dict()
20004 msg = dict(type='Uniter', request='CharmModifiedVersion', version=4, params=_params)
20005 _params['entities'] = entities
20006 reply = await self.rpc(msg)
20007 return reply
20008
20009
20010
20011 @ReturnMapping(StringBoolResults)
20012 async def CharmURL(self, entities):
20013 '''
20014 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20015 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
20016 '''
20017 # map input types to rpc msg
20018 _params = dict()
20019 msg = dict(type='Uniter', request='CharmURL', version=4, params=_params)
20020 _params['entities'] = entities
20021 reply = await self.rpc(msg)
20022 return reply
20023
20024
20025
20026 @ReturnMapping(ErrorResults)
20027 async def ClearResolved(self, entities):
20028 '''
20029 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20030 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20031 '''
20032 # map input types to rpc msg
20033 _params = dict()
20034 msg = dict(type='Uniter', request='ClearResolved', version=4, params=_params)
20035 _params['entities'] = entities
20036 reply = await self.rpc(msg)
20037 return reply
20038
20039
20040
20041 @ReturnMapping(ErrorResults)
20042 async def ClosePorts(self, entities):
20043 '''
20044 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
20045 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20046 '''
20047 # map input types to rpc msg
20048 _params = dict()
20049 msg = dict(type='Uniter', request='ClosePorts', version=4, params=_params)
20050 _params['entities'] = entities
20051 reply = await self.rpc(msg)
20052 return reply
20053
20054
20055
20056 @ReturnMapping(ConfigSettingsResults)
20057 async def ConfigSettings(self, entities):
20058 '''
20059 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20060 Returns -> typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult>
20061 '''
20062 # map input types to rpc msg
20063 _params = dict()
20064 msg = dict(type='Uniter', request='ConfigSettings', version=4, params=_params)
20065 _params['entities'] = entities
20066 reply = await self.rpc(msg)
20067 return reply
20068
20069
20070
20071 @ReturnMapping(ModelResult)
20072 async def CurrentModel(self):
20073 '''
20074
20075 Returns -> typing.Union[_ForwardRef('Error'), str]
20076 '''
20077 # map input types to rpc msg
20078 _params = dict()
20079 msg = dict(type='Uniter', request='CurrentModel', version=4, params=_params)
20080
20081 reply = await self.rpc(msg)
20082 return reply
20083
20084
20085
20086 @ReturnMapping(ErrorResults)
20087 async def Destroy(self, entities):
20088 '''
20089 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20090 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20091 '''
20092 # map input types to rpc msg
20093 _params = dict()
20094 msg = dict(type='Uniter', request='Destroy', version=4, params=_params)
20095 _params['entities'] = entities
20096 reply = await self.rpc(msg)
20097 return reply
20098
20099
20100
20101 @ReturnMapping(ErrorResults)
20102 async def DestroyAllSubordinates(self, entities):
20103 '''
20104 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20105 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20106 '''
20107 # map input types to rpc msg
20108 _params = dict()
20109 msg = dict(type='Uniter', request='DestroyAllSubordinates', version=4, params=_params)
20110 _params['entities'] = entities
20111 reply = await self.rpc(msg)
20112 return reply
20113
20114
20115
20116 @ReturnMapping(ErrorResults)
20117 async def DestroyUnitStorageAttachments(self, entities):
20118 '''
20119 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20120 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20121 '''
20122 # map input types to rpc msg
20123 _params = dict()
20124 msg = dict(type='Uniter', request='DestroyUnitStorageAttachments', version=4, params=_params)
20125 _params['entities'] = entities
20126 reply = await self.rpc(msg)
20127 return reply
20128
20129
20130
20131 @ReturnMapping(ErrorResults)
20132 async def EnsureDead(self, entities):
20133 '''
20134 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20135 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20136 '''
20137 # map input types to rpc msg
20138 _params = dict()
20139 msg = dict(type='Uniter', request='EnsureDead', version=4, params=_params)
20140 _params['entities'] = entities
20141 reply = await self.rpc(msg)
20142 return reply
20143
20144
20145
20146 @ReturnMapping(ErrorResults)
20147 async def EnterScope(self, relation_units):
20148 '''
20149 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20150 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20151 '''
20152 # map input types to rpc msg
20153 _params = dict()
20154 msg = dict(type='Uniter', request='EnterScope', version=4, params=_params)
20155 _params['relation-units'] = relation_units
20156 reply = await self.rpc(msg)
20157 return reply
20158
20159
20160
20161 @ReturnMapping(ErrorResults)
20162 async def FinishActions(self, results):
20163 '''
20164 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
20165 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20166 '''
20167 # map input types to rpc msg
20168 _params = dict()
20169 msg = dict(type='Uniter', request='FinishActions', version=4, params=_params)
20170 _params['results'] = results
20171 reply = await self.rpc(msg)
20172 return reply
20173
20174
20175
20176 @ReturnMapping(MeterStatusResults)
20177 async def GetMeterStatus(self, entities):
20178 '''
20179 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20180 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
20181 '''
20182 # map input types to rpc msg
20183 _params = dict()
20184 msg = dict(type='Uniter', request='GetMeterStatus', version=4, params=_params)
20185 _params['entities'] = entities
20186 reply = await self.rpc(msg)
20187 return reply
20188
20189
20190
20191 @ReturnMapping(StringBoolResults)
20192 async def GetPrincipal(self, entities):
20193 '''
20194 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20195 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
20196 '''
20197 # map input types to rpc msg
20198 _params = dict()
20199 msg = dict(type='Uniter', request='GetPrincipal', version=4, params=_params)
20200 _params['entities'] = entities
20201 reply = await self.rpc(msg)
20202 return reply
20203
20204
20205
20206 @ReturnMapping(BoolResults)
20207 async def HasSubordinates(self, entities):
20208 '''
20209 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20210 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
20211 '''
20212 # map input types to rpc msg
20213 _params = dict()
20214 msg = dict(type='Uniter', request='HasSubordinates', version=4, params=_params)
20215 _params['entities'] = entities
20216 reply = await self.rpc(msg)
20217 return reply
20218
20219
20220
20221 @ReturnMapping(StringsResults)
20222 async def JoinedRelations(self, entities):
20223 '''
20224 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20225 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
20226 '''
20227 # map input types to rpc msg
20228 _params = dict()
20229 msg = dict(type='Uniter', request='JoinedRelations', version=4, params=_params)
20230 _params['entities'] = entities
20231 reply = await self.rpc(msg)
20232 return reply
20233
20234
20235
20236 @ReturnMapping(ErrorResults)
20237 async def LeaveScope(self, relation_units):
20238 '''
20239 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20240 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20241 '''
20242 # map input types to rpc msg
20243 _params = dict()
20244 msg = dict(type='Uniter', request='LeaveScope', version=4, params=_params)
20245 _params['relation-units'] = relation_units
20246 reply = await self.rpc(msg)
20247 return reply
20248
20249
20250
20251 @ReturnMapping(LifeResults)
20252 async def Life(self, entities):
20253 '''
20254 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20255 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
20256 '''
20257 # map input types to rpc msg
20258 _params = dict()
20259 msg = dict(type='Uniter', request='Life', version=4, params=_params)
20260 _params['entities'] = entities
20261 reply = await self.rpc(msg)
20262 return reply
20263
20264
20265
20266 @ReturnMapping(ErrorResults)
20267 async def Merge(self, params):
20268 '''
20269 params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam>
20270 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20271 '''
20272 # map input types to rpc msg
20273 _params = dict()
20274 msg = dict(type='Uniter', request='Merge', version=4, params=_params)
20275 _params['params'] = params
20276 reply = await self.rpc(msg)
20277 return reply
20278
20279
20280
20281 @ReturnMapping(ModelConfigResult)
20282 async def ModelConfig(self):
20283 '''
20284
20285 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
20286 '''
20287 # map input types to rpc msg
20288 _params = dict()
20289 msg = dict(type='Uniter', request='ModelConfig', version=4, params=_params)
20290
20291 reply = await self.rpc(msg)
20292 return reply
20293
20294
20295
20296 @ReturnMapping(StringResult)
20297 async def ModelUUID(self):
20298 '''
20299
20300 Returns -> typing.Union[_ForwardRef('Error'), str]
20301 '''
20302 # map input types to rpc msg
20303 _params = dict()
20304 msg = dict(type='Uniter', request='ModelUUID', version=4, params=_params)
20305
20306 reply = await self.rpc(msg)
20307 return reply
20308
20309
20310
20311 @ReturnMapping(UnitNetworkConfigResults)
20312 async def NetworkConfig(self, args):
20313 '''
20314 args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig>
20315 Returns -> typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult>
20316 '''
20317 # map input types to rpc msg
20318 _params = dict()
20319 msg = dict(type='Uniter', request='NetworkConfig', version=4, params=_params)
20320 _params['args'] = args
20321 reply = await self.rpc(msg)
20322 return reply
20323
20324
20325
20326 @ReturnMapping(ErrorResults)
20327 async def OpenPorts(self, entities):
20328 '''
20329 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
20330 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20331 '''
20332 # map input types to rpc msg
20333 _params = dict()
20334 msg = dict(type='Uniter', request='OpenPorts', version=4, params=_params)
20335 _params['entities'] = entities
20336 reply = await self.rpc(msg)
20337 return reply
20338
20339
20340
20341 @ReturnMapping(StringResults)
20342 async def PrivateAddress(self, entities):
20343 '''
20344 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20345 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
20346 '''
20347 # map input types to rpc msg
20348 _params = dict()
20349 msg = dict(type='Uniter', request='PrivateAddress', version=4, params=_params)
20350 _params['entities'] = entities
20351 reply = await self.rpc(msg)
20352 return reply
20353
20354
20355
20356 @ReturnMapping(StringResult)
20357 async def ProviderType(self):
20358 '''
20359
20360 Returns -> typing.Union[_ForwardRef('Error'), str]
20361 '''
20362 # map input types to rpc msg
20363 _params = dict()
20364 msg = dict(type='Uniter', request='ProviderType', version=4, params=_params)
20365
20366 reply = await self.rpc(msg)
20367 return reply
20368
20369
20370
20371 @ReturnMapping(StringResults)
20372 async def PublicAddress(self, entities):
20373 '''
20374 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20375 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
20376 '''
20377 # map input types to rpc msg
20378 _params = dict()
20379 msg = dict(type='Uniter', request='PublicAddress', version=4, params=_params)
20380 _params['entities'] = entities
20381 reply = await self.rpc(msg)
20382 return reply
20383
20384
20385
20386 @ReturnMapping(GetLeadershipSettingsBulkResults)
20387 async def Read(self, entities):
20388 '''
20389 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20390 Returns -> typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult>
20391 '''
20392 # map input types to rpc msg
20393 _params = dict()
20394 msg = dict(type='Uniter', request='Read', version=4, params=_params)
20395 _params['entities'] = entities
20396 reply = await self.rpc(msg)
20397 return reply
20398
20399
20400
20401 @ReturnMapping(SettingsResults)
20402 async def ReadRemoteSettings(self, relation_unit_pairs):
20403 '''
20404 relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair>
20405 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
20406 '''
20407 # map input types to rpc msg
20408 _params = dict()
20409 msg = dict(type='Uniter', request='ReadRemoteSettings', version=4, params=_params)
20410 _params['relation-unit-pairs'] = relation_unit_pairs
20411 reply = await self.rpc(msg)
20412 return reply
20413
20414
20415
20416 @ReturnMapping(SettingsResults)
20417 async def ReadSettings(self, relation_units):
20418 '''
20419 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20420 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
20421 '''
20422 # map input types to rpc msg
20423 _params = dict()
20424 msg = dict(type='Uniter', request='ReadSettings', version=4, params=_params)
20425 _params['relation-units'] = relation_units
20426 reply = await self.rpc(msg)
20427 return reply
20428
20429
20430
20431 @ReturnMapping(RelationResults)
20432 async def Relation(self, relation_units):
20433 '''
20434 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20435 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
20436 '''
20437 # map input types to rpc msg
20438 _params = dict()
20439 msg = dict(type='Uniter', request='Relation', version=4, params=_params)
20440 _params['relation-units'] = relation_units
20441 reply = await self.rpc(msg)
20442 return reply
20443
20444
20445
20446 @ReturnMapping(RelationResults)
20447 async def RelationById(self, relation_ids):
20448 '''
20449 relation_ids : typing.Sequence<+T_co>[int]
20450 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
20451 '''
20452 # map input types to rpc msg
20453 _params = dict()
20454 msg = dict(type='Uniter', request='RelationById', version=4, params=_params)
20455 _params['relation-ids'] = relation_ids
20456 reply = await self.rpc(msg)
20457 return reply
20458
20459
20460
20461 @ReturnMapping(ErrorResults)
20462 async def RemoveStorageAttachments(self, ids):
20463 '''
20464 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20465 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20466 '''
20467 # map input types to rpc msg
20468 _params = dict()
20469 msg = dict(type='Uniter', request='RemoveStorageAttachments', version=4, params=_params)
20470 _params['ids'] = ids
20471 reply = await self.rpc(msg)
20472 return reply
20473
20474
20475
20476 @ReturnMapping(ErrorResults)
20477 async def RequestReboot(self, entities):
20478 '''
20479 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20480 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20481 '''
20482 # map input types to rpc msg
20483 _params = dict()
20484 msg = dict(type='Uniter', request='RequestReboot', version=4, params=_params)
20485 _params['entities'] = entities
20486 reply = await self.rpc(msg)
20487 return reply
20488
20489
20490
20491 @ReturnMapping(ResolvedModeResults)
20492 async def Resolved(self, entities):
20493 '''
20494 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20495 Returns -> typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult>
20496 '''
20497 # map input types to rpc msg
20498 _params = dict()
20499 msg = dict(type='Uniter', request='Resolved', version=4, params=_params)
20500 _params['entities'] = entities
20501 reply = await self.rpc(msg)
20502 return reply
20503
20504
20505
20506 @ReturnMapping(ErrorResults)
20507 async def SetAgentStatus(self, entities):
20508 '''
20509 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20510 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20511 '''
20512 # map input types to rpc msg
20513 _params = dict()
20514 msg = dict(type='Uniter', request='SetAgentStatus', version=4, params=_params)
20515 _params['entities'] = entities
20516 reply = await self.rpc(msg)
20517 return reply
20518
20519
20520
20521 @ReturnMapping(ErrorResults)
20522 async def SetApplicationStatus(self, entities):
20523 '''
20524 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20525 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20526 '''
20527 # map input types to rpc msg
20528 _params = dict()
20529 msg = dict(type='Uniter', request='SetApplicationStatus', version=4, params=_params)
20530 _params['entities'] = entities
20531 reply = await self.rpc(msg)
20532 return reply
20533
20534
20535
20536 @ReturnMapping(ErrorResults)
20537 async def SetCharmURL(self, entities):
20538 '''
20539 entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL>
20540 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20541 '''
20542 # map input types to rpc msg
20543 _params = dict()
20544 msg = dict(type='Uniter', request='SetCharmURL', version=4, params=_params)
20545 _params['entities'] = entities
20546 reply = await self.rpc(msg)
20547 return reply
20548
20549
20550
20551 @ReturnMapping(ErrorResults)
20552 async def SetStatus(self, entities):
20553 '''
20554 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20555 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20556 '''
20557 # map input types to rpc msg
20558 _params = dict()
20559 msg = dict(type='Uniter', request='SetStatus', version=4, params=_params)
20560 _params['entities'] = entities
20561 reply = await self.rpc(msg)
20562 return reply
20563
20564
20565
20566 @ReturnMapping(ErrorResults)
20567 async def SetUnitStatus(self, entities):
20568 '''
20569 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20570 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20571 '''
20572 # map input types to rpc msg
20573 _params = dict()
20574 msg = dict(type='Uniter', request='SetUnitStatus', version=4, params=_params)
20575 _params['entities'] = entities
20576 reply = await self.rpc(msg)
20577 return reply
20578
20579
20580
20581 @ReturnMapping(ErrorResults)
20582 async def SetWorkloadVersion(self, entities):
20583 '''
20584 entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion>
20585 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20586 '''
20587 # map input types to rpc msg
20588 _params = dict()
20589 msg = dict(type='Uniter', request='SetWorkloadVersion', version=4, params=_params)
20590 _params['entities'] = entities
20591 reply = await self.rpc(msg)
20592 return reply
20593
20594
20595
20596 @ReturnMapping(LifeResults)
20597 async def StorageAttachmentLife(self, ids):
20598 '''
20599 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20600 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
20601 '''
20602 # map input types to rpc msg
20603 _params = dict()
20604 msg = dict(type='Uniter', request='StorageAttachmentLife', version=4, params=_params)
20605 _params['ids'] = ids
20606 reply = await self.rpc(msg)
20607 return reply
20608
20609
20610
20611 @ReturnMapping(StorageAttachmentResults)
20612 async def StorageAttachments(self, ids):
20613 '''
20614 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20615 Returns -> typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult>
20616 '''
20617 # map input types to rpc msg
20618 _params = dict()
20619 msg = dict(type='Uniter', request='StorageAttachments', version=4, params=_params)
20620 _params['ids'] = ids
20621 reply = await self.rpc(msg)
20622 return reply
20623
20624
20625
20626 @ReturnMapping(StatusResults)
20627 async def UnitStatus(self, entities):
20628 '''
20629 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20630 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
20631 '''
20632 # map input types to rpc msg
20633 _params = dict()
20634 msg = dict(type='Uniter', request='UnitStatus', version=4, params=_params)
20635 _params['entities'] = entities
20636 reply = await self.rpc(msg)
20637 return reply
20638
20639
20640
20641 @ReturnMapping(StorageAttachmentIdsResults)
20642 async def UnitStorageAttachments(self, entities):
20643 '''
20644 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20645 Returns -> typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult>
20646 '''
20647 # map input types to rpc msg
20648 _params = dict()
20649 msg = dict(type='Uniter', request='UnitStorageAttachments', version=4, params=_params)
20650 _params['entities'] = entities
20651 reply = await self.rpc(msg)
20652 return reply
20653
20654
20655
20656 @ReturnMapping(ErrorResults)
20657 async def UpdateSettings(self, relation_units):
20658 '''
20659 relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings>
20660 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20661 '''
20662 # map input types to rpc msg
20663 _params = dict()
20664 msg = dict(type='Uniter', request='UpdateSettings', version=4, params=_params)
20665 _params['relation-units'] = relation_units
20666 reply = await self.rpc(msg)
20667 return reply
20668
20669
20670
20671 @ReturnMapping(NotifyWatchResults)
20672 async def Watch(self, entities):
20673 '''
20674 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20675 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20676 '''
20677 # map input types to rpc msg
20678 _params = dict()
20679 msg = dict(type='Uniter', request='Watch', version=4, params=_params)
20680 _params['entities'] = entities
20681 reply = await self.rpc(msg)
20682 return reply
20683
20684
20685
20686 @ReturnMapping(NotifyWatchResult)
20687 async def WatchAPIHostPorts(self):
20688 '''
20689
20690 Returns -> typing.Union[str, _ForwardRef('Error')]
20691 '''
20692 # map input types to rpc msg
20693 _params = dict()
20694 msg = dict(type='Uniter', request='WatchAPIHostPorts', version=4, params=_params)
20695
20696 reply = await self.rpc(msg)
20697 return reply
20698
20699
20700
20701 @ReturnMapping(StringsWatchResults)
20702 async def WatchActionNotifications(self, entities):
20703 '''
20704 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20705 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20706 '''
20707 # map input types to rpc msg
20708 _params = dict()
20709 msg = dict(type='Uniter', request='WatchActionNotifications', version=4, params=_params)
20710 _params['entities'] = entities
20711 reply = await self.rpc(msg)
20712 return reply
20713
20714
20715
20716 @ReturnMapping(StringsWatchResults)
20717 async def WatchApplicationRelations(self, entities):
20718 '''
20719 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20720 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20721 '''
20722 # map input types to rpc msg
20723 _params = dict()
20724 msg = dict(type='Uniter', request='WatchApplicationRelations', version=4, params=_params)
20725 _params['entities'] = entities
20726 reply = await self.rpc(msg)
20727 return reply
20728
20729
20730
20731 @ReturnMapping(NotifyWatchResults)
20732 async def WatchConfigSettings(self, entities):
20733 '''
20734 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20735 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20736 '''
20737 # map input types to rpc msg
20738 _params = dict()
20739 msg = dict(type='Uniter', request='WatchConfigSettings', version=4, params=_params)
20740 _params['entities'] = entities
20741 reply = await self.rpc(msg)
20742 return reply
20743
20744
20745
20746 @ReturnMapping(NotifyWatchResult)
20747 async def WatchForModelConfigChanges(self):
20748 '''
20749
20750 Returns -> typing.Union[str, _ForwardRef('Error')]
20751 '''
20752 # map input types to rpc msg
20753 _params = dict()
20754 msg = dict(type='Uniter', request='WatchForModelConfigChanges', version=4, params=_params)
20755
20756 reply = await self.rpc(msg)
20757 return reply
20758
20759
20760
20761 @ReturnMapping(NotifyWatchResults)
20762 async def WatchLeadershipSettings(self, entities):
20763 '''
20764 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20765 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20766 '''
20767 # map input types to rpc msg
20768 _params = dict()
20769 msg = dict(type='Uniter', request='WatchLeadershipSettings', version=4, params=_params)
20770 _params['entities'] = entities
20771 reply = await self.rpc(msg)
20772 return reply
20773
20774
20775
20776 @ReturnMapping(NotifyWatchResults)
20777 async def WatchMeterStatus(self, entities):
20778 '''
20779 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20780 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20781 '''
20782 # map input types to rpc msg
20783 _params = dict()
20784 msg = dict(type='Uniter', request='WatchMeterStatus', version=4, params=_params)
20785 _params['entities'] = entities
20786 reply = await self.rpc(msg)
20787 return reply
20788
20789
20790
20791 @ReturnMapping(RelationUnitsWatchResults)
20792 async def WatchRelationUnits(self, relation_units):
20793 '''
20794 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20795 Returns -> typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult>
20796 '''
20797 # map input types to rpc msg
20798 _params = dict()
20799 msg = dict(type='Uniter', request='WatchRelationUnits', version=4, params=_params)
20800 _params['relation-units'] = relation_units
20801 reply = await self.rpc(msg)
20802 return reply
20803
20804
20805
20806 @ReturnMapping(NotifyWatchResults)
20807 async def WatchStorageAttachments(self, ids):
20808 '''
20809 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20810 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20811 '''
20812 # map input types to rpc msg
20813 _params = dict()
20814 msg = dict(type='Uniter', request='WatchStorageAttachments', version=4, params=_params)
20815 _params['ids'] = ids
20816 reply = await self.rpc(msg)
20817 return reply
20818
20819
20820
20821 @ReturnMapping(NotifyWatchResults)
20822 async def WatchUnitAddresses(self, entities):
20823 '''
20824 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20825 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20826 '''
20827 # map input types to rpc msg
20828 _params = dict()
20829 msg = dict(type='Uniter', request='WatchUnitAddresses', version=4, params=_params)
20830 _params['entities'] = entities
20831 reply = await self.rpc(msg)
20832 return reply
20833
20834
20835
20836 @ReturnMapping(StringsWatchResults)
20837 async def WatchUnitStorageAttachments(self, entities):
20838 '''
20839 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20840 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20841 '''
20842 # map input types to rpc msg
20843 _params = dict()
20844 msg = dict(type='Uniter', request='WatchUnitStorageAttachments', version=4, params=_params)
20845 _params['entities'] = entities
20846 reply = await self.rpc(msg)
20847 return reply
20848
20849
20850
20851 @ReturnMapping(StringResults)
20852 async def WorkloadVersion(self, entities):
20853 '''
20854 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20855 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
20856 '''
20857 # map input types to rpc msg
20858 _params = dict()
20859 msg = dict(type='Uniter', request='WorkloadVersion', version=4, params=_params)
20860 _params['entities'] = entities
20861 reply = await self.rpc(msg)
20862 return reply
20863
20864
20865 class UpgraderFacade(Type):
20866 name = 'Upgrader'
20867 version = 1
20868 schema = {'definitions': {'Binary': {'additionalProperties': False,
20869 'properties': {'Arch': {'type': 'string'},
20870 'Number': {'$ref': '#/definitions/Number'},
20871 'Series': {'type': 'string'}},
20872 'required': ['Number', 'Series', 'Arch'],
20873 'type': 'object'},
20874 'Entities': {'additionalProperties': False,
20875 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20876 'type': 'array'}},
20877 'required': ['entities'],
20878 'type': 'object'},
20879 'EntitiesVersion': {'additionalProperties': False,
20880 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
20881 'type': 'array'}},
20882 'required': ['agent-tools'],
20883 'type': 'object'},
20884 'Entity': {'additionalProperties': False,
20885 'properties': {'tag': {'type': 'string'}},
20886 'required': ['tag'],
20887 'type': 'object'},
20888 'EntityVersion': {'additionalProperties': False,
20889 'properties': {'tag': {'type': 'string'},
20890 'tools': {'$ref': '#/definitions/Version'}},
20891 'required': ['tag', 'tools'],
20892 'type': 'object'},
20893 'Error': {'additionalProperties': False,
20894 'properties': {'code': {'type': 'string'},
20895 'info': {'$ref': '#/definitions/ErrorInfo'},
20896 'message': {'type': 'string'}},
20897 'required': ['message', 'code'],
20898 'type': 'object'},
20899 'ErrorInfo': {'additionalProperties': False,
20900 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20901 'macaroon-path': {'type': 'string'}},
20902 'type': 'object'},
20903 'ErrorResult': {'additionalProperties': False,
20904 'properties': {'error': {'$ref': '#/definitions/Error'}},
20905 'type': 'object'},
20906 'ErrorResults': {'additionalProperties': False,
20907 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
20908 'type': 'array'}},
20909 'required': ['results'],
20910 'type': 'object'},
20911 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20912 'NotifyWatchResult': {'additionalProperties': False,
20913 'properties': {'NotifyWatcherId': {'type': 'string'},
20914 'error': {'$ref': '#/definitions/Error'}},
20915 'required': ['NotifyWatcherId'],
20916 'type': 'object'},
20917 'NotifyWatchResults': {'additionalProperties': False,
20918 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
20919 'type': 'array'}},
20920 'required': ['results'],
20921 'type': 'object'},
20922 'Number': {'additionalProperties': False,
20923 'properties': {'Build': {'type': 'integer'},
20924 'Major': {'type': 'integer'},
20925 'Minor': {'type': 'integer'},
20926 'Patch': {'type': 'integer'},
20927 'Tag': {'type': 'string'}},
20928 'required': ['Major',
20929 'Minor',
20930 'Tag',
20931 'Patch',
20932 'Build'],
20933 'type': 'object'},
20934 'Tools': {'additionalProperties': False,
20935 'properties': {'sha256': {'type': 'string'},
20936 'size': {'type': 'integer'},
20937 'url': {'type': 'string'},
20938 'version': {'$ref': '#/definitions/Binary'}},
20939 'required': ['version', 'url', 'size'],
20940 'type': 'object'},
20941 'ToolsResult': {'additionalProperties': False,
20942 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
20943 'error': {'$ref': '#/definitions/Error'},
20944 'tools': {'items': {'$ref': '#/definitions/Tools'},
20945 'type': 'array'}},
20946 'required': ['tools',
20947 'disable-ssl-hostname-verification'],
20948 'type': 'object'},
20949 'ToolsResults': {'additionalProperties': False,
20950 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
20951 'type': 'array'}},
20952 'required': ['results'],
20953 'type': 'object'},
20954 'Version': {'additionalProperties': False,
20955 'properties': {'version': {'$ref': '#/definitions/Binary'}},
20956 'required': ['version'],
20957 'type': 'object'},
20958 'VersionResult': {'additionalProperties': False,
20959 'properties': {'error': {'$ref': '#/definitions/Error'},
20960 'version': {'$ref': '#/definitions/Number'}},
20961 'type': 'object'},
20962 'VersionResults': {'additionalProperties': False,
20963 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
20964 'type': 'array'}},
20965 'required': ['results'],
20966 'type': 'object'}},
20967 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20968 'Result': {'$ref': '#/definitions/VersionResults'}},
20969 'type': 'object'},
20970 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
20971 'Result': {'$ref': '#/definitions/ErrorResults'}},
20972 'type': 'object'},
20973 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20974 'Result': {'$ref': '#/definitions/ToolsResults'}},
20975 'type': 'object'},
20976 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20977 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
20978 'type': 'object'}},
20979 'type': 'object'}
20980
20981
20982 @ReturnMapping(VersionResults)
20983 async def DesiredVersion(self, entities):
20984 '''
20985 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20986 Returns -> typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
20987 '''
20988 # map input types to rpc msg
20989 _params = dict()
20990 msg = dict(type='Upgrader', request='DesiredVersion', version=1, params=_params)
20991 _params['entities'] = entities
20992 reply = await self.rpc(msg)
20993 return reply
20994
20995
20996
20997 @ReturnMapping(ErrorResults)
20998 async def SetTools(self, agent_tools):
20999 '''
21000 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
21001 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21002 '''
21003 # map input types to rpc msg
21004 _params = dict()
21005 msg = dict(type='Upgrader', request='SetTools', version=1, params=_params)
21006 _params['agent-tools'] = agent_tools
21007 reply = await self.rpc(msg)
21008 return reply
21009
21010
21011
21012 @ReturnMapping(ToolsResults)
21013 async def Tools(self, entities):
21014 '''
21015 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21016 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
21017 '''
21018 # map input types to rpc msg
21019 _params = dict()
21020 msg = dict(type='Upgrader', request='Tools', version=1, params=_params)
21021 _params['entities'] = entities
21022 reply = await self.rpc(msg)
21023 return reply
21024
21025
21026
21027 @ReturnMapping(NotifyWatchResults)
21028 async def WatchAPIVersion(self, entities):
21029 '''
21030 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21031 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
21032 '''
21033 # map input types to rpc msg
21034 _params = dict()
21035 msg = dict(type='Upgrader', request='WatchAPIVersion', version=1, params=_params)
21036 _params['entities'] = entities
21037 reply = await self.rpc(msg)
21038 return reply
21039
21040
21041 class UserManagerFacade(Type):
21042 name = 'UserManager'
21043 version = 1
21044 schema = {'definitions': {'AddUser': {'additionalProperties': False,
21045 'properties': {'display-name': {'type': 'string'},
21046 'password': {'type': 'string'},
21047 'username': {'type': 'string'}},
21048 'required': ['username', 'display-name'],
21049 'type': 'object'},
21050 'AddUserResult': {'additionalProperties': False,
21051 'properties': {'error': {'$ref': '#/definitions/Error'},
21052 'secret-key': {'items': {'type': 'integer'},
21053 'type': 'array'},
21054 'tag': {'type': 'string'}},
21055 'type': 'object'},
21056 'AddUserResults': {'additionalProperties': False,
21057 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
21058 'type': 'array'}},
21059 'required': ['results'],
21060 'type': 'object'},
21061 'AddUsers': {'additionalProperties': False,
21062 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
21063 'type': 'array'}},
21064 'required': ['users'],
21065 'type': 'object'},
21066 'Entities': {'additionalProperties': False,
21067 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
21068 'type': 'array'}},
21069 'required': ['entities'],
21070 'type': 'object'},
21071 'Entity': {'additionalProperties': False,
21072 'properties': {'tag': {'type': 'string'}},
21073 'required': ['tag'],
21074 'type': 'object'},
21075 'EntityPassword': {'additionalProperties': False,
21076 'properties': {'password': {'type': 'string'},
21077 'tag': {'type': 'string'}},
21078 'required': ['tag', 'password'],
21079 'type': 'object'},
21080 'EntityPasswords': {'additionalProperties': False,
21081 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
21082 'type': 'array'}},
21083 'required': ['changes'],
21084 'type': 'object'},
21085 'Error': {'additionalProperties': False,
21086 'properties': {'code': {'type': 'string'},
21087 'info': {'$ref': '#/definitions/ErrorInfo'},
21088 'message': {'type': 'string'}},
21089 'required': ['message', 'code'],
21090 'type': 'object'},
21091 'ErrorInfo': {'additionalProperties': False,
21092 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
21093 'macaroon-path': {'type': 'string'}},
21094 'type': 'object'},
21095 'ErrorResult': {'additionalProperties': False,
21096 'properties': {'error': {'$ref': '#/definitions/Error'}},
21097 'type': 'object'},
21098 'ErrorResults': {'additionalProperties': False,
21099 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
21100 'type': 'array'}},
21101 'required': ['results'],
21102 'type': 'object'},
21103 'Macaroon': {'additionalProperties': False, 'type': 'object'},
21104 'UserInfo': {'additionalProperties': False,
21105 'properties': {'access': {'type': 'string'},
21106 'created-by': {'type': 'string'},
21107 'date-created': {'format': 'date-time',
21108 'type': 'string'},
21109 'disabled': {'type': 'boolean'},
21110 'display-name': {'type': 'string'},
21111 'last-connection': {'format': 'date-time',
21112 'type': 'string'},
21113 'username': {'type': 'string'}},
21114 'required': ['username',
21115 'display-name',
21116 'access',
21117 'created-by',
21118 'date-created',
21119 'disabled'],
21120 'type': 'object'},
21121 'UserInfoRequest': {'additionalProperties': False,
21122 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
21123 'type': 'array'},
21124 'include-disabled': {'type': 'boolean'}},
21125 'required': ['entities',
21126 'include-disabled'],
21127 'type': 'object'},
21128 'UserInfoResult': {'additionalProperties': False,
21129 'properties': {'error': {'$ref': '#/definitions/Error'},
21130 'result': {'$ref': '#/definitions/UserInfo'}},
21131 'type': 'object'},
21132 'UserInfoResults': {'additionalProperties': False,
21133 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
21134 'type': 'array'}},
21135 'required': ['results'],
21136 'type': 'object'}},
21137 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
21138 'Result': {'$ref': '#/definitions/AddUserResults'}},
21139 'type': 'object'},
21140 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21141 'Result': {'$ref': '#/definitions/ErrorResults'}},
21142 'type': 'object'},
21143 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21144 'Result': {'$ref': '#/definitions/ErrorResults'}},
21145 'type': 'object'},
21146 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21147 'Result': {'$ref': '#/definitions/ErrorResults'}},
21148 'type': 'object'},
21149 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
21150 'Result': {'$ref': '#/definitions/ErrorResults'}},
21151 'type': 'object'},
21152 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
21153 'Result': {'$ref': '#/definitions/UserInfoResults'}},
21154 'type': 'object'}},
21155 'type': 'object'}
21156
21157
21158 @ReturnMapping(AddUserResults)
21159 async def AddUser(self, users):
21160 '''
21161 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
21162 Returns -> typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
21163 '''
21164 # map input types to rpc msg
21165 _params = dict()
21166 msg = dict(type='UserManager', request='AddUser', version=1, params=_params)
21167 _params['users'] = users
21168 reply = await self.rpc(msg)
21169 return reply
21170
21171
21172
21173 @ReturnMapping(ErrorResults)
21174 async def DisableUser(self, entities):
21175 '''
21176 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21177 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21178 '''
21179 # map input types to rpc msg
21180 _params = dict()
21181 msg = dict(type='UserManager', request='DisableUser', version=1, params=_params)
21182 _params['entities'] = entities
21183 reply = await self.rpc(msg)
21184 return reply
21185
21186
21187
21188 @ReturnMapping(ErrorResults)
21189 async def EnableUser(self, entities):
21190 '''
21191 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21192 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21193 '''
21194 # map input types to rpc msg
21195 _params = dict()
21196 msg = dict(type='UserManager', request='EnableUser', version=1, params=_params)
21197 _params['entities'] = entities
21198 reply = await self.rpc(msg)
21199 return reply
21200
21201
21202
21203 @ReturnMapping(ErrorResults)
21204 async def RemoveUser(self, entities):
21205 '''
21206 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21207 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21208 '''
21209 # map input types to rpc msg
21210 _params = dict()
21211 msg = dict(type='UserManager', request='RemoveUser', version=1, params=_params)
21212 _params['entities'] = entities
21213 reply = await self.rpc(msg)
21214 return reply
21215
21216
21217
21218 @ReturnMapping(ErrorResults)
21219 async def SetPassword(self, changes):
21220 '''
21221 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
21222 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21223 '''
21224 # map input types to rpc msg
21225 _params = dict()
21226 msg = dict(type='UserManager', request='SetPassword', version=1, params=_params)
21227 _params['changes'] = changes
21228 reply = await self.rpc(msg)
21229 return reply
21230
21231
21232
21233 @ReturnMapping(UserInfoResults)
21234 async def UserInfo(self, entities, include_disabled):
21235 '''
21236 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21237 include_disabled : bool
21238 Returns -> typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
21239 '''
21240 # map input types to rpc msg
21241 _params = dict()
21242 msg = dict(type='UserManager', request='UserInfo', version=1, params=_params)
21243 _params['entities'] = entities
21244 _params['include-disabled'] = include_disabled
21245 reply = await self.rpc(msg)
21246 return reply
21247
21248
21249 class VolumeAttachmentsWatcherFacade(Type):
21250 name = 'VolumeAttachmentsWatcher'
21251 version = 2
21252 schema = {'definitions': {'Error': {'additionalProperties': False,
21253 'properties': {'code': {'type': 'string'},
21254 'info': {'$ref': '#/definitions/ErrorInfo'},
21255 'message': {'type': 'string'}},
21256 'required': ['message', 'code'],
21257 'type': 'object'},
21258 'ErrorInfo': {'additionalProperties': False,
21259 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
21260 'macaroon-path': {'type': 'string'}},
21261 'type': 'object'},
21262 'Macaroon': {'additionalProperties': False, 'type': 'object'},
21263 'MachineStorageId': {'additionalProperties': False,
21264 'properties': {'attachment-tag': {'type': 'string'},
21265 'machine-tag': {'type': 'string'}},
21266 'required': ['machine-tag',
21267 'attachment-tag'],
21268 'type': 'object'},
21269 'MachineStorageIdsWatchResult': {'additionalProperties': False,
21270 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
21271 'type': 'array'},
21272 'error': {'$ref': '#/definitions/Error'},
21273 'watcher-id': {'type': 'string'}},
21274 'required': ['watcher-id',
21275 'changes'],
21276 'type': 'object'}},
21277 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
21278 'type': 'object'},
21279 'Stop': {'type': 'object'}},
21280 'type': 'object'}
21281
21282
21283 @ReturnMapping(MachineStorageIdsWatchResult)
21284 async def Next(self):
21285 '''
21286
21287 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
21288 '''
21289 # map input types to rpc msg
21290 _params = dict()
21291 msg = dict(type='VolumeAttachmentsWatcher', request='Next', version=2, params=_params)
21292
21293 reply = await self.rpc(msg)
21294 return reply
21295
21296
21297
21298 @ReturnMapping(None)
21299 async def Stop(self):
21300 '''
21301
21302 Returns -> None
21303 '''
21304 # map input types to rpc msg
21305 _params = dict()
21306 msg = dict(type='VolumeAttachmentsWatcher', request='Stop', version=2, params=_params)
21307
21308 reply = await self.rpc(msg)
21309 return reply
21310
21311