Regen schema to pick up missing APIs
[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 StringsWatchResult(Type):
946 _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
947 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
948 def __init__(self, changes=None, error=None, watcher_id=None):
949 '''
950 changes : typing.Sequence<+T_co>[str]
951 error : Error
952 watcher_id : str
953 '''
954 self.changes = changes
955 self.error = Error.from_json(error) if error else None
956 self.watcher_id = watcher_id
957
958
959 class BackupsCreateArgs(Type):
960 _toSchema = {'notes': 'notes'}
961 _toPy = {'notes': 'notes'}
962 def __init__(self, notes=None):
963 '''
964 notes : str
965 '''
966 self.notes = notes
967
968
969 class BackupsInfoArgs(Type):
970 _toSchema = {'id_': 'id'}
971 _toPy = {'id': 'id_'}
972 def __init__(self, id_=None):
973 '''
974 id_ : str
975 '''
976 self.id_ = id_
977
978
979 class BackupsListArgs(Type):
980 _toSchema = {}
981 _toPy = {}
982 def __init__(self):
983 '''
984
985 '''
986 pass
987
988
989 class BackupsListResult(Type):
990 _toSchema = {'list_': 'list'}
991 _toPy = {'list': 'list_'}
992 def __init__(self, list_=None):
993 '''
994 list_ : typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
995 '''
996 self.list_ = [BackupsMetadataResult.from_json(o) for o in list_ or []]
997
998
999 class BackupsMetadataResult(Type):
1000 _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'}
1001 _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'}
1002 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):
1003 '''
1004 ca_cert : str
1005 ca_private_key : str
1006 checksum : str
1007 checksum_format : str
1008 finished : str
1009 hostname : str
1010 id_ : str
1011 machine : str
1012 model : str
1013 notes : str
1014 series : str
1015 size : int
1016 started : str
1017 stored : str
1018 version : Number
1019 '''
1020 self.ca_cert = ca_cert
1021 self.ca_private_key = ca_private_key
1022 self.checksum = checksum
1023 self.checksum_format = checksum_format
1024 self.finished = finished
1025 self.hostname = hostname
1026 self.id_ = id_
1027 self.machine = machine
1028 self.model = model
1029 self.notes = notes
1030 self.series = series
1031 self.size = size
1032 self.started = started
1033 self.stored = stored
1034 self.version = Number.from_json(version) if version else None
1035
1036
1037 class BackupsRemoveArgs(Type):
1038 _toSchema = {'id_': 'id'}
1039 _toPy = {'id': 'id_'}
1040 def __init__(self, id_=None):
1041 '''
1042 id_ : str
1043 '''
1044 self.id_ = id_
1045
1046
1047 class Number(Type):
1048 _toSchema = {'build': 'Build', 'major': 'Major', 'minor': 'Minor', 'patch': 'Patch', 'tag': 'Tag'}
1049 _toPy = {'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch', 'Tag': 'tag'}
1050 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
1051 '''
1052 build : int
1053 major : int
1054 minor : int
1055 patch : int
1056 tag : str
1057 '''
1058 self.build = build
1059 self.major = major
1060 self.minor = minor
1061 self.patch = patch
1062 self.tag = tag
1063
1064
1065 class RestoreArgs(Type):
1066 _toSchema = {'backup_id': 'backup-id'}
1067 _toPy = {'backup-id': 'backup_id'}
1068 def __init__(self, backup_id=None):
1069 '''
1070 backup_id : str
1071 '''
1072 self.backup_id = backup_id
1073
1074
1075 class Block(Type):
1076 _toSchema = {'id_': 'id', 'message': 'message', 'tag': 'tag', 'type_': 'type'}
1077 _toPy = {'id': 'id_', 'message': 'message', 'tag': 'tag', 'type': 'type_'}
1078 def __init__(self, id_=None, message=None, tag=None, type_=None):
1079 '''
1080 id_ : str
1081 message : str
1082 tag : str
1083 type_ : str
1084 '''
1085 self.id_ = id_
1086 self.message = message
1087 self.tag = tag
1088 self.type_ = type_
1089
1090
1091 class BlockResult(Type):
1092 _toSchema = {'error': 'error', 'result': 'result'}
1093 _toPy = {'error': 'error', 'result': 'result'}
1094 def __init__(self, error=None, result=None):
1095 '''
1096 error : Error
1097 result : Block
1098 '''
1099 self.error = Error.from_json(error) if error else None
1100 self.result = Block.from_json(result) if result else None
1101
1102
1103 class BlockResults(Type):
1104 _toSchema = {'results': 'results'}
1105 _toPy = {'results': 'results'}
1106 def __init__(self, results=None):
1107 '''
1108 results : typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
1109 '''
1110 self.results = [BlockResult.from_json(o) for o in results or []]
1111
1112
1113 class BlockSwitchParams(Type):
1114 _toSchema = {'message': 'message', 'type_': 'type'}
1115 _toPy = {'message': 'message', 'type': 'type_'}
1116 def __init__(self, message=None, type_=None):
1117 '''
1118 message : str
1119 type_ : str
1120 '''
1121 self.message = message
1122 self.type_ = type_
1123
1124
1125 class BundleChange(Type):
1126 _toSchema = {'args': 'args', 'id_': 'id', 'method': 'method', 'requires': 'requires'}
1127 _toPy = {'args': 'args', 'id': 'id_', 'method': 'method', 'requires': 'requires'}
1128 def __init__(self, args=None, id_=None, method=None, requires=None):
1129 '''
1130 args : typing.Sequence<+T_co>[typing.Any]
1131 id_ : str
1132 method : str
1133 requires : typing.Sequence<+T_co>[str]
1134 '''
1135 self.args = args
1136 self.id_ = id_
1137 self.method = method
1138 self.requires = requires
1139
1140
1141 class BundleChangesParams(Type):
1142 _toSchema = {'yaml': 'yaml'}
1143 _toPy = {'yaml': 'yaml'}
1144 def __init__(self, yaml=None):
1145 '''
1146 yaml : str
1147 '''
1148 self.yaml = yaml
1149
1150
1151 class BundleChangesResults(Type):
1152 _toSchema = {'changes': 'changes', 'errors': 'errors'}
1153 _toPy = {'changes': 'changes', 'errors': 'errors'}
1154 def __init__(self, changes=None, errors=None):
1155 '''
1156 changes : typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
1157 errors : typing.Sequence<+T_co>[str]
1158 '''
1159 self.changes = [BundleChange.from_json(o) for o in changes or []]
1160 self.errors = errors
1161
1162
1163 class CharmActionSpec(Type):
1164 _toSchema = {'description': 'description', 'params': 'params'}
1165 _toPy = {'description': 'description', 'params': 'params'}
1166 def __init__(self, description=None, params=None):
1167 '''
1168 description : str
1169 params : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1170 '''
1171 self.description = description
1172 self.params = params
1173
1174
1175 class CharmActions(Type):
1176 _toSchema = {'specs': 'specs'}
1177 _toPy = {'specs': 'specs'}
1178 def __init__(self, specs=None):
1179 '''
1180 specs : typing.Mapping<~KT, +VT_co>[str, ~CharmActionSpec]<~CharmActionSpec>
1181 '''
1182 self.specs = specs
1183
1184
1185 class CharmInfo(Type):
1186 _toSchema = {'actions': 'actions', 'config': 'config', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'}
1187 _toPy = {'actions': 'actions', 'config': 'config', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'}
1188 def __init__(self, actions=None, config=None, meta=None, metrics=None, revision=None, url=None):
1189 '''
1190 actions : CharmActions
1191 config : typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>
1192 meta : CharmMeta
1193 metrics : CharmMetrics
1194 revision : int
1195 url : str
1196 '''
1197 self.actions = CharmActions.from_json(actions) if actions else None
1198 self.config = config
1199 self.meta = CharmMeta.from_json(meta) if meta else None
1200 self.metrics = CharmMetrics.from_json(metrics) if metrics else None
1201 self.revision = revision
1202 self.url = url
1203
1204
1205 class CharmMeta(Type):
1206 _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'}
1207 _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'}
1208 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):
1209 '''
1210 categories : typing.Sequence<+T_co>[str]
1211 description : str
1212 extra_bindings : typing.Mapping<~KT, +VT_co>[str, str]
1213 min_juju_version : str
1214 name : str
1215 payload_classes : typing.Mapping<~KT, +VT_co>[str, ~CharmPayloadClass]<~CharmPayloadClass>
1216 peers : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1217 provides : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1218 requires : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1219 resources : typing.Mapping<~KT, +VT_co>[str, ~CharmResourceMeta]<~CharmResourceMeta>
1220 series : typing.Sequence<+T_co>[str]
1221 storage : typing.Mapping<~KT, +VT_co>[str, ~CharmStorage]<~CharmStorage>
1222 subordinate : bool
1223 summary : str
1224 tags : typing.Sequence<+T_co>[str]
1225 terms : typing.Sequence<+T_co>[str]
1226 '''
1227 self.categories = categories
1228 self.description = description
1229 self.extra_bindings = extra_bindings
1230 self.min_juju_version = min_juju_version
1231 self.name = name
1232 self.payload_classes = payload_classes
1233 self.peers = peers
1234 self.provides = provides
1235 self.requires = requires
1236 self.resources = resources
1237 self.series = series
1238 self.storage = storage
1239 self.subordinate = subordinate
1240 self.summary = summary
1241 self.tags = tags
1242 self.terms = terms
1243
1244
1245 class CharmMetric(Type):
1246 _toSchema = {'description': 'description', 'type_': 'type'}
1247 _toPy = {'description': 'description', 'type': 'type_'}
1248 def __init__(self, description=None, type_=None):
1249 '''
1250 description : str
1251 type_ : str
1252 '''
1253 self.description = description
1254 self.type_ = type_
1255
1256
1257 class CharmMetrics(Type):
1258 _toSchema = {'metrics': 'metrics', 'plan': 'plan'}
1259 _toPy = {'metrics': 'metrics', 'plan': 'plan'}
1260 def __init__(self, metrics=None, plan=None):
1261 '''
1262 metrics : typing.Mapping<~KT, +VT_co>[str, ~CharmMetric]<~CharmMetric>
1263 plan : CharmPlan
1264 '''
1265 self.metrics = metrics
1266 self.plan = CharmPlan.from_json(plan) if plan else None
1267
1268
1269 class CharmOption(Type):
1270 _toSchema = {'default': 'default', 'description': 'description', 'type_': 'type'}
1271 _toPy = {'default': 'default', 'description': 'description', 'type': 'type_'}
1272 def __init__(self, default=None, description=None, type_=None):
1273 '''
1274 default : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1275 description : str
1276 type_ : str
1277 '''
1278 self.default = default
1279 self.description = description
1280 self.type_ = type_
1281
1282
1283 class CharmPayloadClass(Type):
1284 _toSchema = {'name': 'name', 'type_': 'type'}
1285 _toPy = {'name': 'name', 'type': 'type_'}
1286 def __init__(self, name=None, type_=None):
1287 '''
1288 name : str
1289 type_ : str
1290 '''
1291 self.name = name
1292 self.type_ = type_
1293
1294
1295 class CharmPlan(Type):
1296 _toSchema = {'required': 'required'}
1297 _toPy = {'required': 'required'}
1298 def __init__(self, required=None):
1299 '''
1300 required : bool
1301 '''
1302 self.required = required
1303
1304
1305 class CharmResourceMeta(Type):
1306 _toSchema = {'description': 'description', 'name': 'name', 'path': 'path', 'type_': 'type'}
1307 _toPy = {'description': 'description', 'name': 'name', 'path': 'path', 'type': 'type_'}
1308 def __init__(self, description=None, name=None, path=None, type_=None):
1309 '''
1310 description : str
1311 name : str
1312 path : str
1313 type_ : str
1314 '''
1315 self.description = description
1316 self.name = name
1317 self.path = path
1318 self.type_ = type_
1319
1320
1321 class CharmStorage(Type):
1322 _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'}
1323 _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_'}
1324 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):
1325 '''
1326 count_max : int
1327 count_min : int
1328 description : str
1329 location : str
1330 minimum_size : int
1331 name : str
1332 properties : typing.Sequence<+T_co>[str]
1333 read_only : bool
1334 shared : bool
1335 type_ : str
1336 '''
1337 self.count_max = count_max
1338 self.count_min = count_min
1339 self.description = description
1340 self.location = location
1341 self.minimum_size = minimum_size
1342 self.name = name
1343 self.properties = properties
1344 self.read_only = read_only
1345 self.shared = shared
1346 self.type_ = type_
1347
1348
1349 class CharmURL(Type):
1350 _toSchema = {'url': 'url'}
1351 _toPy = {'url': 'url'}
1352 def __init__(self, url=None):
1353 '''
1354 url : str
1355 '''
1356 self.url = url
1357
1358
1359 class CharmsList(Type):
1360 _toSchema = {'names': 'names'}
1361 _toPy = {'names': 'names'}
1362 def __init__(self, names=None):
1363 '''
1364 names : typing.Sequence<+T_co>[str]
1365 '''
1366 self.names = names
1367
1368
1369 class CharmsListResult(Type):
1370 _toSchema = {'charm_urls': 'charm-urls'}
1371 _toPy = {'charm-urls': 'charm_urls'}
1372 def __init__(self, charm_urls=None):
1373 '''
1374 charm_urls : typing.Sequence<+T_co>[str]
1375 '''
1376 self.charm_urls = charm_urls
1377
1378
1379 class IsMeteredResult(Type):
1380 _toSchema = {'metered': 'metered'}
1381 _toPy = {'metered': 'metered'}
1382 def __init__(self, metered=None):
1383 '''
1384 metered : bool
1385 '''
1386 self.metered = metered
1387
1388
1389 class APIHostPortsResult(Type):
1390 _toSchema = {'servers': 'servers'}
1391 _toPy = {'servers': 'servers'}
1392 def __init__(self, servers=None):
1393 '''
1394 servers : typing.Sequence<+T_co>[~HostPort]<~HostPort>
1395 '''
1396 self.servers = [HostPort.from_json(o) for o in servers or []]
1397
1398
1399 class AddCharm(Type):
1400 _toSchema = {'channel': 'channel', 'url': 'url'}
1401 _toPy = {'channel': 'channel', 'url': 'url'}
1402 def __init__(self, channel=None, url=None):
1403 '''
1404 channel : str
1405 url : str
1406 '''
1407 self.channel = channel
1408 self.url = url
1409
1410
1411 class AddCharmWithAuthorization(Type):
1412 _toSchema = {'channel': 'channel', 'macaroon': 'macaroon', 'url': 'url'}
1413 _toPy = {'channel': 'channel', 'macaroon': 'macaroon', 'url': 'url'}
1414 def __init__(self, channel=None, macaroon=None, url=None):
1415 '''
1416 channel : str
1417 macaroon : Macaroon
1418 url : str
1419 '''
1420 self.channel = channel
1421 self.macaroon = Macaroon.from_json(macaroon) if macaroon else None
1422 self.url = url
1423
1424
1425 class AddMachineParams(Type):
1426 _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'}
1427 _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'}
1428 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):
1429 '''
1430 addresses : typing.Sequence<+T_co>[~Address]<~Address>
1431 constraints : Value
1432 container_type : str
1433 disks : typing.Sequence<+T_co>[~Constraints]<~Constraints>
1434 hardware_characteristics : HardwareCharacteristics
1435 instance_id : str
1436 jobs : typing.Sequence<+T_co>[str]
1437 nonce : str
1438 parent_id : str
1439 placement : Placement
1440 series : str
1441 '''
1442 self.addresses = [Address.from_json(o) for o in addresses or []]
1443 self.constraints = Value.from_json(constraints) if constraints else None
1444 self.container_type = container_type
1445 self.disks = [Constraints.from_json(o) for o in disks or []]
1446 self.hardware_characteristics = HardwareCharacteristics.from_json(hardware_characteristics) if hardware_characteristics else None
1447 self.instance_id = instance_id
1448 self.jobs = jobs
1449 self.nonce = nonce
1450 self.parent_id = parent_id
1451 self.placement = Placement.from_json(placement) if placement else None
1452 self.series = series
1453
1454
1455 class AddMachines(Type):
1456 _toSchema = {'params': 'params'}
1457 _toPy = {'params': 'params'}
1458 def __init__(self, params=None):
1459 '''
1460 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1461 '''
1462 self.params = [AddMachineParams.from_json(o) for o in params or []]
1463
1464
1465 class AddMachinesResult(Type):
1466 _toSchema = {'error': 'error', 'machine': 'machine'}
1467 _toPy = {'error': 'error', 'machine': 'machine'}
1468 def __init__(self, error=None, machine=None):
1469 '''
1470 error : Error
1471 machine : str
1472 '''
1473 self.error = Error.from_json(error) if error else None
1474 self.machine = machine
1475
1476
1477 class AddMachinesResults(Type):
1478 _toSchema = {'machines': 'machines'}
1479 _toPy = {'machines': 'machines'}
1480 def __init__(self, machines=None):
1481 '''
1482 machines : typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1483 '''
1484 self.machines = [AddMachinesResult.from_json(o) for o in machines or []]
1485
1486
1487 class Address(Type):
1488 _toSchema = {'scope': 'scope', 'space_name': 'space-name', 'type_': 'type', 'value': 'value'}
1489 _toPy = {'scope': 'scope', 'space-name': 'space_name', 'type': 'type_', 'value': 'value'}
1490 def __init__(self, scope=None, space_name=None, type_=None, value=None):
1491 '''
1492 scope : str
1493 space_name : str
1494 type_ : str
1495 value : str
1496 '''
1497 self.scope = scope
1498 self.space_name = space_name
1499 self.type_ = type_
1500 self.value = value
1501
1502
1503 class AgentVersionResult(Type):
1504 _toSchema = {'version': 'version'}
1505 _toPy = {'version': 'version'}
1506 def __init__(self, version=None):
1507 '''
1508 version : Number
1509 '''
1510 self.version = Number.from_json(version) if version else None
1511
1512
1513 class AllWatcherId(Type):
1514 _toSchema = {'watcher_id': 'watcher-id'}
1515 _toPy = {'watcher-id': 'watcher_id'}
1516 def __init__(self, watcher_id=None):
1517 '''
1518 watcher_id : str
1519 '''
1520 self.watcher_id = watcher_id
1521
1522
1523 class ApplicationStatus(Type):
1524 _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'}
1525 _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'}
1526 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):
1527 '''
1528 can_upgrade_to : str
1529 charm : str
1530 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1531 exposed : bool
1532 life : str
1533 meter_statuses : typing.Mapping<~KT, +VT_co>[str, ~MeterStatus]<~MeterStatus>
1534 relations : typing.Sequence<+T_co>[str]
1535 series : str
1536 status : DetailedStatus
1537 subordinate_to : typing.Sequence<+T_co>[str]
1538 units : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus>
1539 workload_version : str
1540 '''
1541 self.can_upgrade_to = can_upgrade_to
1542 self.charm = charm
1543 self.err = err
1544 self.exposed = exposed
1545 self.life = life
1546 self.meter_statuses = meter_statuses
1547 self.relations = relations
1548 self.series = series
1549 self.status = DetailedStatus.from_json(status) if status else None
1550 self.subordinate_to = subordinate_to
1551 self.units = units
1552 self.workload_version = workload_version
1553
1554
1555 class Binary(Type):
1556 _toSchema = {'arch': 'Arch', 'number': 'Number', 'series': 'Series'}
1557 _toPy = {'Arch': 'arch', 'Number': 'number', 'Series': 'series'}
1558 def __init__(self, arch=None, number=None, series=None):
1559 '''
1560 arch : str
1561 number : Number
1562 series : str
1563 '''
1564 self.arch = arch
1565 self.number = Number.from_json(number) if number else None
1566 self.series = series
1567
1568
1569 class ConfigValue(Type):
1570 _toSchema = {'source': 'source', 'value': 'value'}
1571 _toPy = {'source': 'source', 'value': 'value'}
1572 def __init__(self, source=None, value=None):
1573 '''
1574 source : str
1575 value : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1576 '''
1577 self.source = source
1578 self.value = value
1579
1580
1581 class DestroyMachines(Type):
1582 _toSchema = {'force': 'force', 'machine_names': 'machine-names'}
1583 _toPy = {'force': 'force', 'machine-names': 'machine_names'}
1584 def __init__(self, force=None, machine_names=None):
1585 '''
1586 force : bool
1587 machine_names : typing.Sequence<+T_co>[str]
1588 '''
1589 self.force = force
1590 self.machine_names = machine_names
1591
1592
1593 class DetailedStatus(Type):
1594 _toSchema = {'data': 'data', 'err': 'err', 'info': 'info', 'kind': 'kind', 'life': 'life', 'since': 'since', 'status': 'status', 'version': 'version'}
1595 _toPy = {'data': 'data', 'err': 'err', 'info': 'info', 'kind': 'kind', 'life': 'life', 'since': 'since', 'status': 'status', 'version': 'version'}
1596 def __init__(self, data=None, err=None, info=None, kind=None, life=None, since=None, status=None, version=None):
1597 '''
1598 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1599 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1600 info : str
1601 kind : str
1602 life : str
1603 since : str
1604 status : str
1605 version : str
1606 '''
1607 self.data = data
1608 self.err = err
1609 self.info = info
1610 self.kind = kind
1611 self.life = life
1612 self.since = since
1613 self.status = status
1614 self.version = version
1615
1616
1617 class EndpointStatus(Type):
1618 _toSchema = {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'}
1619 _toPy = {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'}
1620 def __init__(self, application=None, name=None, role=None, subordinate=None):
1621 '''
1622 application : str
1623 name : str
1624 role : str
1625 subordinate : bool
1626 '''
1627 self.application = application
1628 self.name = name
1629 self.role = role
1630 self.subordinate = subordinate
1631
1632
1633 class EntityStatus(Type):
1634 _toSchema = {'data': 'data', 'info': 'info', 'since': 'since', 'status': 'status'}
1635 _toPy = {'data': 'data', 'info': 'info', 'since': 'since', 'status': 'status'}
1636 def __init__(self, data=None, info=None, since=None, status=None):
1637 '''
1638 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1639 info : str
1640 since : str
1641 status : str
1642 '''
1643 self.data = data
1644 self.info = info
1645 self.since = since
1646 self.status = status
1647
1648
1649 class FindToolsParams(Type):
1650 _toSchema = {'arch': 'arch', 'major': 'major', 'minor': 'minor', 'number': 'number', 'series': 'series'}
1651 _toPy = {'arch': 'arch', 'major': 'major', 'minor': 'minor', 'number': 'number', 'series': 'series'}
1652 def __init__(self, arch=None, major=None, minor=None, number=None, series=None):
1653 '''
1654 arch : str
1655 major : int
1656 minor : int
1657 number : Number
1658 series : str
1659 '''
1660 self.arch = arch
1661 self.major = major
1662 self.minor = minor
1663 self.number = Number.from_json(number) if number else None
1664 self.series = series
1665
1666
1667 class FindToolsResult(Type):
1668 _toSchema = {'error': 'error', 'list_': 'list'}
1669 _toPy = {'error': 'error', 'list': 'list_'}
1670 def __init__(self, error=None, list_=None):
1671 '''
1672 error : Error
1673 list_ : typing.Sequence<+T_co>[~Tools]<~Tools>
1674 '''
1675 self.error = Error.from_json(error) if error else None
1676 self.list_ = [Tools.from_json(o) for o in list_ or []]
1677
1678
1679 class FullStatus(Type):
1680 _toSchema = {'applications': 'applications', 'machines': 'machines', 'model': 'model', 'relations': 'relations', 'remote_applications': 'remote-applications'}
1681 _toPy = {'applications': 'applications', 'machines': 'machines', 'model': 'model', 'relations': 'relations', 'remote-applications': 'remote_applications'}
1682 def __init__(self, applications=None, machines=None, model=None, relations=None, remote_applications=None):
1683 '''
1684 applications : typing.Mapping<~KT, +VT_co>[str, ~ApplicationStatus]<~ApplicationStatus>
1685 machines : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>
1686 model : ModelStatusInfo
1687 relations : typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>
1688 remote_applications : typing.Mapping<~KT, +VT_co>[str, ~RemoteApplicationStatus]<~RemoteApplicationStatus>
1689 '''
1690 self.applications = applications
1691 self.machines = machines
1692 self.model = ModelStatusInfo.from_json(model) if model else None
1693 self.relations = [RelationStatus.from_json(o) for o in relations or []]
1694 self.remote_applications = remote_applications
1695
1696
1697 class HardwareCharacteristics(Type):
1698 _toSchema = {'arch': 'arch', 'availability_zone': 'availability-zone', 'cpu_cores': 'cpu-cores', 'cpu_power': 'cpu-power', 'mem': 'mem', 'root_disk': 'root-disk', 'tags': 'tags'}
1699 _toPy = {'arch': 'arch', 'availability-zone': 'availability_zone', 'cpu-cores': 'cpu_cores', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'tags': 'tags'}
1700 def __init__(self, arch=None, availability_zone=None, cpu_cores=None, cpu_power=None, mem=None, root_disk=None, tags=None):
1701 '''
1702 arch : str
1703 availability_zone : str
1704 cpu_cores : int
1705 cpu_power : int
1706 mem : int
1707 root_disk : int
1708 tags : typing.Sequence<+T_co>[str]
1709 '''
1710 self.arch = arch
1711 self.availability_zone = availability_zone
1712 self.cpu_cores = cpu_cores
1713 self.cpu_power = cpu_power
1714 self.mem = mem
1715 self.root_disk = root_disk
1716 self.tags = tags
1717
1718
1719 class History(Type):
1720 _toSchema = {'error': 'error', 'statuses': 'statuses'}
1721 _toPy = {'error': 'error', 'statuses': 'statuses'}
1722 def __init__(self, error=None, statuses=None):
1723 '''
1724 error : Error
1725 statuses : typing.Sequence<+T_co>[~DetailedStatus]<~DetailedStatus>
1726 '''
1727 self.error = Error.from_json(error) if error else None
1728 self.statuses = [DetailedStatus.from_json(o) for o in statuses or []]
1729
1730
1731 class HostPort(Type):
1732 _toSchema = {'address': 'Address', 'port': 'port'}
1733 _toPy = {'Address': 'address', 'port': 'port'}
1734 def __init__(self, address=None, port=None):
1735 '''
1736 address : Address
1737 port : int
1738 '''
1739 self.address = Address.from_json(address) if address else None
1740 self.port = port
1741
1742
1743 class MachineHardware(Type):
1744 _toSchema = {'arch': 'arch', 'availability_zone': 'availability-zone', 'cores': 'cores', 'cpu_power': 'cpu-power', 'mem': 'mem', 'root_disk': 'root-disk', 'tags': 'tags'}
1745 _toPy = {'arch': 'arch', 'availability-zone': 'availability_zone', 'cores': 'cores', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'tags': 'tags'}
1746 def __init__(self, arch=None, availability_zone=None, cores=None, cpu_power=None, mem=None, root_disk=None, tags=None):
1747 '''
1748 arch : str
1749 availability_zone : str
1750 cores : int
1751 cpu_power : int
1752 mem : int
1753 root_disk : int
1754 tags : typing.Sequence<+T_co>[str]
1755 '''
1756 self.arch = arch
1757 self.availability_zone = availability_zone
1758 self.cores = cores
1759 self.cpu_power = cpu_power
1760 self.mem = mem
1761 self.root_disk = root_disk
1762 self.tags = tags
1763
1764
1765 class MachineStatus(Type):
1766 _toSchema = {'agent_status': 'agent-status', 'constraints': 'constraints', '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'}
1767 _toPy = {'agent-status': 'agent_status', 'constraints': 'constraints', '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'}
1768 def __init__(self, agent_status=None, constraints=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):
1769 '''
1770 agent_status : DetailedStatus
1771 constraints : str
1772 containers : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>
1773 dns_name : str
1774 hardware : str
1775 has_vote : bool
1776 id_ : str
1777 instance_id : str
1778 instance_status : DetailedStatus
1779 ip_addresses : typing.Sequence<+T_co>[str]
1780 jobs : typing.Sequence<+T_co>[str]
1781 series : str
1782 wants_vote : bool
1783 '''
1784 self.agent_status = DetailedStatus.from_json(agent_status) if agent_status else None
1785 self.constraints = constraints
1786 self.containers = containers
1787 self.dns_name = dns_name
1788 self.hardware = hardware
1789 self.has_vote = has_vote
1790 self.id_ = id_
1791 self.instance_id = instance_id
1792 self.instance_status = DetailedStatus.from_json(instance_status) if instance_status else None
1793 self.ip_addresses = ip_addresses
1794 self.jobs = jobs
1795 self.series = series
1796 self.wants_vote = wants_vote
1797
1798
1799 class MeterStatus(Type):
1800 _toSchema = {'color': 'color', 'message': 'message'}
1801 _toPy = {'color': 'color', 'message': 'message'}
1802 def __init__(self, color=None, message=None):
1803 '''
1804 color : str
1805 message : str
1806 '''
1807 self.color = color
1808 self.message = message
1809
1810
1811 class ModelConfigResults(Type):
1812 _toSchema = {'config': 'config'}
1813 _toPy = {'config': 'config'}
1814 def __init__(self, config=None):
1815 '''
1816 config : typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1817 '''
1818 self.config = config
1819
1820
1821 class ModelInfo(Type):
1822 _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', 'migration': 'migration', 'name': 'name', 'owner_tag': 'owner-tag', 'provider_type': 'provider-type', 'status': 'status', 'users': 'users', 'uuid': 'uuid'}
1823 _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', 'migration': 'migration', 'name': 'name', 'owner-tag': 'owner_tag', 'provider-type': 'provider_type', 'status': 'status', 'users': 'users', 'uuid': 'uuid'}
1824 def __init__(self, cloud_credential_tag=None, cloud_region=None, cloud_tag=None, controller_uuid=None, default_series=None, life=None, machines=None, migration=None, name=None, owner_tag=None, provider_type=None, status=None, users=None, uuid=None):
1825 '''
1826 cloud_credential_tag : str
1827 cloud_region : str
1828 cloud_tag : str
1829 controller_uuid : str
1830 default_series : str
1831 life : str
1832 machines : typing.Sequence<+T_co>[~ModelMachineInfo]<~ModelMachineInfo>
1833 migration : ModelMigrationStatus
1834 name : str
1835 owner_tag : str
1836 provider_type : str
1837 status : EntityStatus
1838 users : typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>
1839 uuid : str
1840 '''
1841 self.cloud_credential_tag = cloud_credential_tag
1842 self.cloud_region = cloud_region
1843 self.cloud_tag = cloud_tag
1844 self.controller_uuid = controller_uuid
1845 self.default_series = default_series
1846 self.life = life
1847 self.machines = [ModelMachineInfo.from_json(o) for o in machines or []]
1848 self.migration = ModelMigrationStatus.from_json(migration) if migration else None
1849 self.name = name
1850 self.owner_tag = owner_tag
1851 self.provider_type = provider_type
1852 self.status = EntityStatus.from_json(status) if status else None
1853 self.users = [ModelUserInfo.from_json(o) for o in users or []]
1854 self.uuid = uuid
1855
1856
1857 class ModelMachineInfo(Type):
1858 _toSchema = {'hardware': 'hardware', 'has_vote': 'has-vote', 'id_': 'id', 'instance_id': 'instance-id', 'status': 'status', 'wants_vote': 'wants-vote'}
1859 _toPy = {'hardware': 'hardware', 'has-vote': 'has_vote', 'id': 'id_', 'instance-id': 'instance_id', 'status': 'status', 'wants-vote': 'wants_vote'}
1860 def __init__(self, hardware=None, has_vote=None, id_=None, instance_id=None, status=None, wants_vote=None):
1861 '''
1862 hardware : MachineHardware
1863 has_vote : bool
1864 id_ : str
1865 instance_id : str
1866 status : str
1867 wants_vote : bool
1868 '''
1869 self.hardware = MachineHardware.from_json(hardware) if hardware else None
1870 self.has_vote = has_vote
1871 self.id_ = id_
1872 self.instance_id = instance_id
1873 self.status = status
1874 self.wants_vote = wants_vote
1875
1876
1877 class ModelMigrationStatus(Type):
1878 _toSchema = {'end': 'end', 'start': 'start', 'status': 'status'}
1879 _toPy = {'end': 'end', 'start': 'start', 'status': 'status'}
1880 def __init__(self, end=None, start=None, status=None):
1881 '''
1882 end : str
1883 start : str
1884 status : str
1885 '''
1886 self.end = end
1887 self.start = start
1888 self.status = status
1889
1890
1891 class ModelSet(Type):
1892 _toSchema = {'config': 'config'}
1893 _toPy = {'config': 'config'}
1894 def __init__(self, config=None):
1895 '''
1896 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1897 '''
1898 self.config = config
1899
1900
1901 class ModelStatusInfo(Type):
1902 _toSchema = {'available_version': 'available-version', 'cloud_tag': 'cloud-tag', 'migration': 'migration', 'name': 'name', 'region': 'region', 'version': 'version'}
1903 _toPy = {'available-version': 'available_version', 'cloud-tag': 'cloud_tag', 'migration': 'migration', 'name': 'name', 'region': 'region', 'version': 'version'}
1904 def __init__(self, available_version=None, cloud_tag=None, migration=None, name=None, region=None, version=None):
1905 '''
1906 available_version : str
1907 cloud_tag : str
1908 migration : str
1909 name : str
1910 region : str
1911 version : str
1912 '''
1913 self.available_version = available_version
1914 self.cloud_tag = cloud_tag
1915 self.migration = migration
1916 self.name = name
1917 self.region = region
1918 self.version = version
1919
1920
1921 class ModelUnset(Type):
1922 _toSchema = {'keys': 'keys'}
1923 _toPy = {'keys': 'keys'}
1924 def __init__(self, keys=None):
1925 '''
1926 keys : typing.Sequence<+T_co>[str]
1927 '''
1928 self.keys = keys
1929
1930
1931 class ModelUserInfo(Type):
1932 _toSchema = {'access': 'access', 'display_name': 'display-name', 'last_connection': 'last-connection', 'user': 'user'}
1933 _toPy = {'access': 'access', 'display-name': 'display_name', 'last-connection': 'last_connection', 'user': 'user'}
1934 def __init__(self, access=None, display_name=None, last_connection=None, user=None):
1935 '''
1936 access : str
1937 display_name : str
1938 last_connection : str
1939 user : str
1940 '''
1941 self.access = access
1942 self.display_name = display_name
1943 self.last_connection = last_connection
1944 self.user = user
1945
1946
1947 class ModelUserInfoResult(Type):
1948 _toSchema = {'error': 'error', 'result': 'result'}
1949 _toPy = {'error': 'error', 'result': 'result'}
1950 def __init__(self, error=None, result=None):
1951 '''
1952 error : Error
1953 result : ModelUserInfo
1954 '''
1955 self.error = Error.from_json(error) if error else None
1956 self.result = ModelUserInfo.from_json(result) if result else None
1957
1958
1959 class ModelUserInfoResults(Type):
1960 _toSchema = {'results': 'results'}
1961 _toPy = {'results': 'results'}
1962 def __init__(self, results=None):
1963 '''
1964 results : typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
1965 '''
1966 self.results = [ModelUserInfoResult.from_json(o) for o in results or []]
1967
1968
1969 class PrivateAddress(Type):
1970 _toSchema = {'target': 'target'}
1971 _toPy = {'target': 'target'}
1972 def __init__(self, target=None):
1973 '''
1974 target : str
1975 '''
1976 self.target = target
1977
1978
1979 class PrivateAddressResults(Type):
1980 _toSchema = {'private_address': 'private-address'}
1981 _toPy = {'private-address': 'private_address'}
1982 def __init__(self, private_address=None):
1983 '''
1984 private_address : str
1985 '''
1986 self.private_address = private_address
1987
1988
1989 class ProvisioningScriptParams(Type):
1990 _toSchema = {'data_dir': 'data-dir', 'disable_package_commands': 'disable-package-commands', 'machine_id': 'machine-id', 'nonce': 'nonce'}
1991 _toPy = {'data-dir': 'data_dir', 'disable-package-commands': 'disable_package_commands', 'machine-id': 'machine_id', 'nonce': 'nonce'}
1992 def __init__(self, data_dir=None, disable_package_commands=None, machine_id=None, nonce=None):
1993 '''
1994 data_dir : str
1995 disable_package_commands : bool
1996 machine_id : str
1997 nonce : str
1998 '''
1999 self.data_dir = data_dir
2000 self.disable_package_commands = disable_package_commands
2001 self.machine_id = machine_id
2002 self.nonce = nonce
2003
2004
2005 class ProvisioningScriptResult(Type):
2006 _toSchema = {'script': 'script'}
2007 _toPy = {'script': 'script'}
2008 def __init__(self, script=None):
2009 '''
2010 script : str
2011 '''
2012 self.script = script
2013
2014
2015 class PublicAddress(Type):
2016 _toSchema = {'target': 'target'}
2017 _toPy = {'target': 'target'}
2018 def __init__(self, target=None):
2019 '''
2020 target : str
2021 '''
2022 self.target = target
2023
2024
2025 class PublicAddressResults(Type):
2026 _toSchema = {'public_address': 'public-address'}
2027 _toPy = {'public-address': 'public_address'}
2028 def __init__(self, public_address=None):
2029 '''
2030 public_address : str
2031 '''
2032 self.public_address = public_address
2033
2034
2035 class RelationStatus(Type):
2036 _toSchema = {'endpoints': 'endpoints', 'id_': 'id', 'interface': 'interface', 'key': 'key', 'scope': 'scope'}
2037 _toPy = {'endpoints': 'endpoints', 'id': 'id_', 'interface': 'interface', 'key': 'key', 'scope': 'scope'}
2038 def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None):
2039 '''
2040 endpoints : typing.Sequence<+T_co>[~EndpointStatus]<~EndpointStatus>
2041 id_ : int
2042 interface : str
2043 key : str
2044 scope : str
2045 '''
2046 self.endpoints = [EndpointStatus.from_json(o) for o in endpoints or []]
2047 self.id_ = id_
2048 self.interface = interface
2049 self.key = key
2050 self.scope = scope
2051
2052
2053 class RemoteApplicationStatus(Type):
2054 _toSchema = {'application_name': 'application-name', 'application_url': 'application-url', 'endpoints': 'endpoints', 'err': 'err', 'life': 'life', 'relations': 'relations', 'status': 'status'}
2055 _toPy = {'application-name': 'application_name', 'application-url': 'application_url', 'endpoints': 'endpoints', 'err': 'err', 'life': 'life', 'relations': 'relations', 'status': 'status'}
2056 def __init__(self, application_name=None, application_url=None, endpoints=None, err=None, life=None, relations=None, status=None):
2057 '''
2058 application_name : str
2059 application_url : str
2060 endpoints : typing.Sequence<+T_co>[~RemoteEndpoint]<~RemoteEndpoint>
2061 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2062 life : str
2063 relations : typing.Sequence<+T_co>[str]
2064 status : DetailedStatus
2065 '''
2066 self.application_name = application_name
2067 self.application_url = application_url
2068 self.endpoints = [RemoteEndpoint.from_json(o) for o in endpoints or []]
2069 self.err = err
2070 self.life = life
2071 self.relations = relations
2072 self.status = DetailedStatus.from_json(status) if status else None
2073
2074
2075 class RemoteEndpoint(Type):
2076 _toSchema = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'role': 'role', 'scope': 'scope'}
2077 _toPy = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'role': 'role', 'scope': 'scope'}
2078 def __init__(self, interface=None, limit=None, name=None, role=None, scope=None):
2079 '''
2080 interface : str
2081 limit : int
2082 name : str
2083 role : str
2084 scope : str
2085 '''
2086 self.interface = interface
2087 self.limit = limit
2088 self.name = name
2089 self.role = role
2090 self.scope = scope
2091
2092
2093 class ResolveCharmResult(Type):
2094 _toSchema = {'error': 'error', 'url': 'url'}
2095 _toPy = {'error': 'error', 'url': 'url'}
2096 def __init__(self, error=None, url=None):
2097 '''
2098 error : str
2099 url : str
2100 '''
2101 self.error = error
2102 self.url = url
2103
2104
2105 class ResolveCharmResults(Type):
2106 _toSchema = {'urls': 'urls'}
2107 _toPy = {'urls': 'urls'}
2108 def __init__(self, urls=None):
2109 '''
2110 urls : typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
2111 '''
2112 self.urls = [ResolveCharmResult.from_json(o) for o in urls or []]
2113
2114
2115 class ResolveCharms(Type):
2116 _toSchema = {'references': 'references'}
2117 _toPy = {'references': 'references'}
2118 def __init__(self, references=None):
2119 '''
2120 references : typing.Sequence<+T_co>[str]
2121 '''
2122 self.references = references
2123
2124
2125 class Resolved(Type):
2126 _toSchema = {'retry': 'retry', 'unit_name': 'unit-name'}
2127 _toPy = {'retry': 'retry', 'unit-name': 'unit_name'}
2128 def __init__(self, retry=None, unit_name=None):
2129 '''
2130 retry : bool
2131 unit_name : str
2132 '''
2133 self.retry = retry
2134 self.unit_name = unit_name
2135
2136
2137 class SetModelAgentVersion(Type):
2138 _toSchema = {'version': 'version'}
2139 _toPy = {'version': 'version'}
2140 def __init__(self, version=None):
2141 '''
2142 version : Number
2143 '''
2144 self.version = Number.from_json(version) if version else None
2145
2146
2147 class StatusHistoryFilter(Type):
2148 _toSchema = {'date': 'date', 'delta': 'delta', 'size': 'size'}
2149 _toPy = {'date': 'date', 'delta': 'delta', 'size': 'size'}
2150 def __init__(self, date=None, delta=None, size=None):
2151 '''
2152 date : str
2153 delta : int
2154 size : int
2155 '''
2156 self.date = date
2157 self.delta = delta
2158 self.size = size
2159
2160
2161 class StatusHistoryRequest(Type):
2162 _toSchema = {'filter_': 'filter', 'historykind': 'historyKind', 'size': 'size', 'tag': 'tag'}
2163 _toPy = {'filter': 'filter_', 'historyKind': 'historykind', 'size': 'size', 'tag': 'tag'}
2164 def __init__(self, filter_=None, historykind=None, size=None, tag=None):
2165 '''
2166 filter_ : StatusHistoryFilter
2167 historykind : str
2168 size : int
2169 tag : str
2170 '''
2171 self.filter_ = StatusHistoryFilter.from_json(filter_) if filter_ else None
2172 self.historykind = historykind
2173 self.size = size
2174 self.tag = tag
2175
2176
2177 class StatusHistoryRequests(Type):
2178 _toSchema = {'requests': 'requests'}
2179 _toPy = {'requests': 'requests'}
2180 def __init__(self, requests=None):
2181 '''
2182 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
2183 '''
2184 self.requests = [StatusHistoryRequest.from_json(o) for o in requests or []]
2185
2186
2187 class StatusHistoryResult(Type):
2188 _toSchema = {'error': 'error', 'history': 'history'}
2189 _toPy = {'error': 'error', 'history': 'history'}
2190 def __init__(self, error=None, history=None):
2191 '''
2192 error : Error
2193 history : History
2194 '''
2195 self.error = Error.from_json(error) if error else None
2196 self.history = History.from_json(history) if history else None
2197
2198
2199 class StatusHistoryResults(Type):
2200 _toSchema = {'results': 'results'}
2201 _toPy = {'results': 'results'}
2202 def __init__(self, results=None):
2203 '''
2204 results : typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
2205 '''
2206 self.results = [StatusHistoryResult.from_json(o) for o in results or []]
2207
2208
2209 class StatusParams(Type):
2210 _toSchema = {'patterns': 'patterns'}
2211 _toPy = {'patterns': 'patterns'}
2212 def __init__(self, patterns=None):
2213 '''
2214 patterns : typing.Sequence<+T_co>[str]
2215 '''
2216 self.patterns = patterns
2217
2218
2219 class Tools(Type):
2220 _toSchema = {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'}
2221 _toPy = {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'}
2222 def __init__(self, sha256=None, size=None, url=None, version=None):
2223 '''
2224 sha256 : str
2225 size : int
2226 url : str
2227 version : Binary
2228 '''
2229 self.sha256 = sha256
2230 self.size = size
2231 self.url = url
2232 self.version = Binary.from_json(version) if version else None
2233
2234
2235 class UnitStatus(Type):
2236 _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'}
2237 _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'}
2238 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):
2239 '''
2240 agent_status : DetailedStatus
2241 charm : str
2242 leader : bool
2243 machine : str
2244 opened_ports : typing.Sequence<+T_co>[str]
2245 public_address : str
2246 subordinates : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus>
2247 workload_status : DetailedStatus
2248 workload_version : str
2249 '''
2250 self.agent_status = DetailedStatus.from_json(agent_status) if agent_status else None
2251 self.charm = charm
2252 self.leader = leader
2253 self.machine = machine
2254 self.opened_ports = opened_ports
2255 self.public_address = public_address
2256 self.subordinates = subordinates
2257 self.workload_status = DetailedStatus.from_json(workload_status) if workload_status else None
2258 self.workload_version = workload_version
2259
2260
2261 class Cloud(Type):
2262 _toSchema = {'auth_types': 'auth-types', 'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'regions': 'regions', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'}
2263 _toPy = {'auth-types': 'auth_types', 'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'regions': 'regions', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'}
2264 def __init__(self, auth_types=None, endpoint=None, identity_endpoint=None, regions=None, storage_endpoint=None, type_=None):
2265 '''
2266 auth_types : typing.Sequence<+T_co>[str]
2267 endpoint : str
2268 identity_endpoint : str
2269 regions : typing.Sequence<+T_co>[~CloudRegion]<~CloudRegion>
2270 storage_endpoint : str
2271 type_ : str
2272 '''
2273 self.auth_types = auth_types
2274 self.endpoint = endpoint
2275 self.identity_endpoint = identity_endpoint
2276 self.regions = [CloudRegion.from_json(o) for o in regions or []]
2277 self.storage_endpoint = storage_endpoint
2278 self.type_ = type_
2279
2280
2281 class CloudCredentialResult(Type):
2282 _toSchema = {'error': 'error', 'result': 'result'}
2283 _toPy = {'error': 'error', 'result': 'result'}
2284 def __init__(self, error=None, result=None):
2285 '''
2286 error : Error
2287 result : CloudCredential
2288 '''
2289 self.error = Error.from_json(error) if error else None
2290 self.result = CloudCredential.from_json(result) if result else None
2291
2292
2293 class CloudCredentialResults(Type):
2294 _toSchema = {'results': 'results'}
2295 _toPy = {'results': 'results'}
2296 def __init__(self, results=None):
2297 '''
2298 results : typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
2299 '''
2300 self.results = [CloudCredentialResult.from_json(o) for o in results or []]
2301
2302
2303 class CloudInstanceTypesConstraint(Type):
2304 _toSchema = {'cloud_tag': 'cloud-tag', 'constraints': 'constraints', 'region': 'region'}
2305 _toPy = {'cloud-tag': 'cloud_tag', 'constraints': 'constraints', 'region': 'region'}
2306 def __init__(self, cloud_tag=None, constraints=None, region=None):
2307 '''
2308 cloud_tag : str
2309 constraints : Value
2310 region : str
2311 '''
2312 self.cloud_tag = cloud_tag
2313 self.constraints = Value.from_json(constraints) if constraints else None
2314 self.region = region
2315
2316
2317 class CloudInstanceTypesConstraints(Type):
2318 _toSchema = {'constraints': 'constraints'}
2319 _toPy = {'constraints': 'constraints'}
2320 def __init__(self, constraints=None):
2321 '''
2322 constraints : typing.Sequence<+T_co>[~CloudInstanceTypesConstraint]<~CloudInstanceTypesConstraint>
2323 '''
2324 self.constraints = [CloudInstanceTypesConstraint.from_json(o) for o in constraints or []]
2325
2326
2327 class CloudRegion(Type):
2328 _toSchema = {'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'name': 'name', 'storage_endpoint': 'storage-endpoint'}
2329 _toPy = {'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'storage-endpoint': 'storage_endpoint'}
2330 def __init__(self, endpoint=None, identity_endpoint=None, name=None, storage_endpoint=None):
2331 '''
2332 endpoint : str
2333 identity_endpoint : str
2334 name : str
2335 storage_endpoint : str
2336 '''
2337 self.endpoint = endpoint
2338 self.identity_endpoint = identity_endpoint
2339 self.name = name
2340 self.storage_endpoint = storage_endpoint
2341
2342
2343 class CloudResult(Type):
2344 _toSchema = {'cloud': 'cloud', 'error': 'error'}
2345 _toPy = {'cloud': 'cloud', 'error': 'error'}
2346 def __init__(self, cloud=None, error=None):
2347 '''
2348 cloud : Cloud
2349 error : Error
2350 '''
2351 self.cloud = Cloud.from_json(cloud) if cloud else None
2352 self.error = Error.from_json(error) if error else None
2353
2354
2355 class CloudResults(Type):
2356 _toSchema = {'results': 'results'}
2357 _toPy = {'results': 'results'}
2358 def __init__(self, results=None):
2359 '''
2360 results : typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
2361 '''
2362 self.results = [CloudResult.from_json(o) for o in results or []]
2363
2364
2365 class CloudsResult(Type):
2366 _toSchema = {'clouds': 'clouds'}
2367 _toPy = {'clouds': 'clouds'}
2368 def __init__(self, clouds=None):
2369 '''
2370 clouds : typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
2371 '''
2372 self.clouds = clouds
2373
2374
2375 class InstanceType(Type):
2376 _toSchema = {'arches': 'arches', 'cost': 'cost', 'cpu_cores': 'cpu-cores', 'deprecated': 'deprecated', 'memory': 'memory', 'name': 'name', 'root_disk': 'root-disk', 'virt_type': 'virt-type'}
2377 _toPy = {'arches': 'arches', 'cost': 'cost', 'cpu-cores': 'cpu_cores', 'deprecated': 'deprecated', 'memory': 'memory', 'name': 'name', 'root-disk': 'root_disk', 'virt-type': 'virt_type'}
2378 def __init__(self, arches=None, cost=None, cpu_cores=None, deprecated=None, memory=None, name=None, root_disk=None, virt_type=None):
2379 '''
2380 arches : typing.Sequence<+T_co>[str]
2381 cost : int
2382 cpu_cores : int
2383 deprecated : bool
2384 memory : int
2385 name : str
2386 root_disk : int
2387 virt_type : str
2388 '''
2389 self.arches = arches
2390 self.cost = cost
2391 self.cpu_cores = cpu_cores
2392 self.deprecated = deprecated
2393 self.memory = memory
2394 self.name = name
2395 self.root_disk = root_disk
2396 self.virt_type = virt_type
2397
2398
2399 class InstanceTypesResult(Type):
2400 _toSchema = {'cost_currency': 'cost-currency', 'cost_divisor': 'cost-divisor', 'cost_unit': 'cost-unit', 'error': 'error', 'instance_types': 'instance-types'}
2401 _toPy = {'cost-currency': 'cost_currency', 'cost-divisor': 'cost_divisor', 'cost-unit': 'cost_unit', 'error': 'error', 'instance-types': 'instance_types'}
2402 def __init__(self, cost_currency=None, cost_divisor=None, cost_unit=None, error=None, instance_types=None):
2403 '''
2404 cost_currency : str
2405 cost_divisor : int
2406 cost_unit : str
2407 error : Error
2408 instance_types : typing.Sequence<+T_co>[~InstanceType]<~InstanceType>
2409 '''
2410 self.cost_currency = cost_currency
2411 self.cost_divisor = cost_divisor
2412 self.cost_unit = cost_unit
2413 self.error = Error.from_json(error) if error else None
2414 self.instance_types = [InstanceType.from_json(o) for o in instance_types or []]
2415
2416
2417 class InstanceTypesResults(Type):
2418 _toSchema = {'results': 'results'}
2419 _toPy = {'results': 'results'}
2420 def __init__(self, results=None):
2421 '''
2422 results : typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
2423 '''
2424 self.results = [InstanceTypesResult.from_json(o) for o in results or []]
2425
2426
2427 class StringsResult(Type):
2428 _toSchema = {'error': 'error', 'result': 'result'}
2429 _toPy = {'error': 'error', 'result': 'result'}
2430 def __init__(self, error=None, result=None):
2431 '''
2432 error : Error
2433 result : typing.Sequence<+T_co>[str]
2434 '''
2435 self.error = Error.from_json(error) if error else None
2436 self.result = result
2437
2438
2439 class StringsResults(Type):
2440 _toSchema = {'results': 'results'}
2441 _toPy = {'results': 'results'}
2442 def __init__(self, results=None):
2443 '''
2444 results : typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2445 '''
2446 self.results = [StringsResult.from_json(o) for o in results or []]
2447
2448
2449 class UpdateCloudCredential(Type):
2450 _toSchema = {'credential': 'credential', 'tag': 'tag'}
2451 _toPy = {'credential': 'credential', 'tag': 'tag'}
2452 def __init__(self, credential=None, tag=None):
2453 '''
2454 credential : CloudCredential
2455 tag : str
2456 '''
2457 self.credential = CloudCredential.from_json(credential) if credential else None
2458 self.tag = tag
2459
2460
2461 class UpdateCloudCredentials(Type):
2462 _toSchema = {'credentials': 'credentials'}
2463 _toPy = {'credentials': 'credentials'}
2464 def __init__(self, credentials=None):
2465 '''
2466 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
2467 '''
2468 self.credentials = [UpdateCloudCredential.from_json(o) for o in credentials or []]
2469
2470
2471 class UserCloud(Type):
2472 _toSchema = {'cloud_tag': 'cloud-tag', 'user_tag': 'user-tag'}
2473 _toPy = {'cloud-tag': 'cloud_tag', 'user-tag': 'user_tag'}
2474 def __init__(self, cloud_tag=None, user_tag=None):
2475 '''
2476 cloud_tag : str
2477 user_tag : str
2478 '''
2479 self.cloud_tag = cloud_tag
2480 self.user_tag = user_tag
2481
2482
2483 class UserClouds(Type):
2484 _toSchema = {'user_clouds': 'user-clouds'}
2485 _toPy = {'user-clouds': 'user_clouds'}
2486 def __init__(self, user_clouds=None):
2487 '''
2488 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
2489 '''
2490 self.user_clouds = [UserCloud.from_json(o) for o in user_clouds or []]
2491
2492
2493 class DestroyControllerArgs(Type):
2494 _toSchema = {'destroy_models': 'destroy-models'}
2495 _toPy = {'destroy-models': 'destroy_models'}
2496 def __init__(self, destroy_models=None):
2497 '''
2498 destroy_models : bool
2499 '''
2500 self.destroy_models = destroy_models
2501
2502
2503 class HostedModelConfig(Type):
2504 _toSchema = {'cloud_spec': 'cloud-spec', 'config': 'config', 'error': 'error', 'name': 'name', 'owner': 'owner'}
2505 _toPy = {'cloud-spec': 'cloud_spec', 'config': 'config', 'error': 'error', 'name': 'name', 'owner': 'owner'}
2506 def __init__(self, cloud_spec=None, config=None, error=None, name=None, owner=None):
2507 '''
2508 cloud_spec : CloudSpec
2509 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2510 error : Error
2511 name : str
2512 owner : str
2513 '''
2514 self.cloud_spec = CloudSpec.from_json(cloud_spec) if cloud_spec else None
2515 self.config = config
2516 self.error = Error.from_json(error) if error else None
2517 self.name = name
2518 self.owner = owner
2519
2520
2521 class HostedModelConfigsResults(Type):
2522 _toSchema = {'models': 'models'}
2523 _toPy = {'models': 'models'}
2524 def __init__(self, models=None):
2525 '''
2526 models : typing.Sequence<+T_co>[~HostedModelConfig]<~HostedModelConfig>
2527 '''
2528 self.models = [HostedModelConfig.from_json(o) for o in models or []]
2529
2530
2531 class InitiateMigrationArgs(Type):
2532 _toSchema = {'specs': 'specs'}
2533 _toPy = {'specs': 'specs'}
2534 def __init__(self, specs=None):
2535 '''
2536 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
2537 '''
2538 self.specs = [MigrationSpec.from_json(o) for o in specs or []]
2539
2540
2541 class InitiateMigrationResult(Type):
2542 _toSchema = {'error': 'error', 'migration_id': 'migration-id', 'model_tag': 'model-tag'}
2543 _toPy = {'error': 'error', 'migration-id': 'migration_id', 'model-tag': 'model_tag'}
2544 def __init__(self, error=None, migration_id=None, model_tag=None):
2545 '''
2546 error : Error
2547 migration_id : str
2548 model_tag : str
2549 '''
2550 self.error = Error.from_json(error) if error else None
2551 self.migration_id = migration_id
2552 self.model_tag = model_tag
2553
2554
2555 class InitiateMigrationResults(Type):
2556 _toSchema = {'results': 'results'}
2557 _toPy = {'results': 'results'}
2558 def __init__(self, results=None):
2559 '''
2560 results : typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
2561 '''
2562 self.results = [InitiateMigrationResult.from_json(o) for o in results or []]
2563
2564
2565 class MigrationSpec(Type):
2566 _toSchema = {'external_control': 'external-control', 'model_tag': 'model-tag', 'skip_initial_prechecks': 'skip-initial-prechecks', 'target_info': 'target-info'}
2567 _toPy = {'external-control': 'external_control', 'model-tag': 'model_tag', 'skip-initial-prechecks': 'skip_initial_prechecks', 'target-info': 'target_info'}
2568 def __init__(self, external_control=None, model_tag=None, skip_initial_prechecks=None, target_info=None):
2569 '''
2570 external_control : bool
2571 model_tag : str
2572 skip_initial_prechecks : bool
2573 target_info : MigrationTargetInfo
2574 '''
2575 self.external_control = external_control
2576 self.model_tag = model_tag
2577 self.skip_initial_prechecks = skip_initial_prechecks
2578 self.target_info = MigrationTargetInfo.from_json(target_info) if target_info else None
2579
2580
2581 class MigrationTargetInfo(Type):
2582 _toSchema = {'addrs': 'addrs', 'auth_tag': 'auth-tag', 'ca_cert': 'ca-cert', 'controller_tag': 'controller-tag', 'macaroons': 'macaroons', 'password': 'password'}
2583 _toPy = {'addrs': 'addrs', 'auth-tag': 'auth_tag', 'ca-cert': 'ca_cert', 'controller-tag': 'controller_tag', 'macaroons': 'macaroons', 'password': 'password'}
2584 def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_tag=None, macaroons=None, password=None):
2585 '''
2586 addrs : typing.Sequence<+T_co>[str]
2587 auth_tag : str
2588 ca_cert : str
2589 controller_tag : str
2590 macaroons : str
2591 password : str
2592 '''
2593 self.addrs = addrs
2594 self.auth_tag = auth_tag
2595 self.ca_cert = ca_cert
2596 self.controller_tag = controller_tag
2597 self.macaroons = macaroons
2598 self.password = password
2599
2600
2601 class Model(Type):
2602 _toSchema = {'name': 'name', 'owner_tag': 'owner-tag', 'uuid': 'uuid'}
2603 _toPy = {'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'}
2604 def __init__(self, name=None, owner_tag=None, uuid=None):
2605 '''
2606 name : str
2607 owner_tag : str
2608 uuid : str
2609 '''
2610 self.name = name
2611 self.owner_tag = owner_tag
2612 self.uuid = uuid
2613
2614
2615 class ModelBlockInfo(Type):
2616 _toSchema = {'blocks': 'blocks', 'model_uuid': 'model-uuid', 'name': 'name', 'owner_tag': 'owner-tag'}
2617 _toPy = {'blocks': 'blocks', 'model-uuid': 'model_uuid', 'name': 'name', 'owner-tag': 'owner_tag'}
2618 def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None):
2619 '''
2620 blocks : typing.Sequence<+T_co>[str]
2621 model_uuid : str
2622 name : str
2623 owner_tag : str
2624 '''
2625 self.blocks = blocks
2626 self.model_uuid = model_uuid
2627 self.name = name
2628 self.owner_tag = owner_tag
2629
2630
2631 class ModelBlockInfoList(Type):
2632 _toSchema = {'models': 'models'}
2633 _toPy = {'models': 'models'}
2634 def __init__(self, models=None):
2635 '''
2636 models : typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
2637 '''
2638 self.models = [ModelBlockInfo.from_json(o) for o in models or []]
2639
2640
2641 class ModelStatus(Type):
2642 _toSchema = {'application_count': 'application-count', 'hosted_machine_count': 'hosted-machine-count', 'life': 'life', 'machines': 'machines', 'model_tag': 'model-tag', 'owner_tag': 'owner-tag'}
2643 _toPy = {'application-count': 'application_count', 'hosted-machine-count': 'hosted_machine_count', 'life': 'life', 'machines': 'machines', 'model-tag': 'model_tag', 'owner-tag': 'owner_tag'}
2644 def __init__(self, application_count=None, hosted_machine_count=None, life=None, machines=None, model_tag=None, owner_tag=None):
2645 '''
2646 application_count : int
2647 hosted_machine_count : int
2648 life : str
2649 machines : typing.Sequence<+T_co>[~ModelMachineInfo]<~ModelMachineInfo>
2650 model_tag : str
2651 owner_tag : str
2652 '''
2653 self.application_count = application_count
2654 self.hosted_machine_count = hosted_machine_count
2655 self.life = life
2656 self.machines = [ModelMachineInfo.from_json(o) for o in machines or []]
2657 self.model_tag = model_tag
2658 self.owner_tag = owner_tag
2659
2660
2661 class ModelStatusResults(Type):
2662 _toSchema = {'models': 'models'}
2663 _toPy = {'models': 'models'}
2664 def __init__(self, models=None):
2665 '''
2666 models : typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
2667 '''
2668 self.models = [ModelStatus.from_json(o) for o in models or []]
2669
2670
2671 class ModifyControllerAccess(Type):
2672 _toSchema = {'access': 'access', 'action': 'action', 'user_tag': 'user-tag'}
2673 _toPy = {'access': 'access', 'action': 'action', 'user-tag': 'user_tag'}
2674 def __init__(self, access=None, action=None, user_tag=None):
2675 '''
2676 access : str
2677 action : str
2678 user_tag : str
2679 '''
2680 self.access = access
2681 self.action = action
2682 self.user_tag = user_tag
2683
2684
2685 class ModifyControllerAccessRequest(Type):
2686 _toSchema = {'changes': 'changes'}
2687 _toPy = {'changes': 'changes'}
2688 def __init__(self, changes=None):
2689 '''
2690 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
2691 '''
2692 self.changes = [ModifyControllerAccess.from_json(o) for o in changes or []]
2693
2694
2695 class RemoveBlocksArgs(Type):
2696 _toSchema = {'all_': 'all'}
2697 _toPy = {'all': 'all_'}
2698 def __init__(self, all_=None):
2699 '''
2700 all_ : bool
2701 '''
2702 self.all_ = all_
2703
2704
2705 class UserAccess(Type):
2706 _toSchema = {'access': 'access', 'user_tag': 'user-tag'}
2707 _toPy = {'access': 'access', 'user-tag': 'user_tag'}
2708 def __init__(self, access=None, user_tag=None):
2709 '''
2710 access : str
2711 user_tag : str
2712 '''
2713 self.access = access
2714 self.user_tag = user_tag
2715
2716
2717 class UserAccessResult(Type):
2718 _toSchema = {'error': 'error', 'result': 'result'}
2719 _toPy = {'error': 'error', 'result': 'result'}
2720 def __init__(self, error=None, result=None):
2721 '''
2722 error : Error
2723 result : UserAccess
2724 '''
2725 self.error = Error.from_json(error) if error else None
2726 self.result = UserAccess.from_json(result) if result else None
2727
2728
2729 class UserAccessResults(Type):
2730 _toSchema = {'results': 'results'}
2731 _toPy = {'results': 'results'}
2732 def __init__(self, results=None):
2733 '''
2734 results : typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
2735 '''
2736 self.results = [UserAccessResult.from_json(o) for o in results or []]
2737
2738
2739 class UserModel(Type):
2740 _toSchema = {'last_connection': 'last-connection', 'model': 'model'}
2741 _toPy = {'last-connection': 'last_connection', 'model': 'model'}
2742 def __init__(self, last_connection=None, model=None):
2743 '''
2744 last_connection : str
2745 model : Model
2746 '''
2747 self.last_connection = last_connection
2748 self.model = Model.from_json(model) if model else None
2749
2750
2751 class UserModelList(Type):
2752 _toSchema = {'user_models': 'user-models'}
2753 _toPy = {'user-models': 'user_models'}
2754 def __init__(self, user_models=None):
2755 '''
2756 user_models : typing.Sequence<+T_co>[~UserModel]<~UserModel>
2757 '''
2758 self.user_models = [UserModel.from_json(o) for o in user_models or []]
2759
2760
2761 class BytesResult(Type):
2762 _toSchema = {'result': 'result'}
2763 _toPy = {'result': 'result'}
2764 def __init__(self, result=None):
2765 '''
2766 result : typing.Sequence<+T_co>[int]
2767 '''
2768 self.result = result
2769
2770
2771 class DeployerConnectionValues(Type):
2772 _toSchema = {'api_addresses': 'api-addresses', 'state_addresses': 'state-addresses'}
2773 _toPy = {'api-addresses': 'api_addresses', 'state-addresses': 'state_addresses'}
2774 def __init__(self, api_addresses=None, state_addresses=None):
2775 '''
2776 api_addresses : typing.Sequence<+T_co>[str]
2777 state_addresses : typing.Sequence<+T_co>[str]
2778 '''
2779 self.api_addresses = api_addresses
2780 self.state_addresses = state_addresses
2781
2782
2783 class EntityStatusArgs(Type):
2784 _toSchema = {'data': 'data', 'info': 'info', 'status': 'status', 'tag': 'tag'}
2785 _toPy = {'data': 'data', 'info': 'info', 'status': 'status', 'tag': 'tag'}
2786 def __init__(self, data=None, info=None, status=None, tag=None):
2787 '''
2788 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2789 info : str
2790 status : str
2791 tag : str
2792 '''
2793 self.data = data
2794 self.info = info
2795 self.status = status
2796 self.tag = tag
2797
2798
2799 class LifeResult(Type):
2800 _toSchema = {'error': 'error', 'life': 'life'}
2801 _toPy = {'error': 'error', 'life': 'life'}
2802 def __init__(self, error=None, life=None):
2803 '''
2804 error : Error
2805 life : str
2806 '''
2807 self.error = Error.from_json(error) if error else None
2808 self.life = life
2809
2810
2811 class LifeResults(Type):
2812 _toSchema = {'results': 'results'}
2813 _toPy = {'results': 'results'}
2814 def __init__(self, results=None):
2815 '''
2816 results : typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2817 '''
2818 self.results = [LifeResult.from_json(o) for o in results or []]
2819
2820
2821 class SetStatus(Type):
2822 _toSchema = {'entities': 'entities'}
2823 _toPy = {'entities': 'entities'}
2824 def __init__(self, entities=None):
2825 '''
2826 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2827 '''
2828 self.entities = [EntityStatusArgs.from_json(o) for o in entities or []]
2829
2830
2831 class StringsWatchResults(Type):
2832 _toSchema = {'results': 'results'}
2833 _toPy = {'results': 'results'}
2834 def __init__(self, results=None):
2835 '''
2836 results : typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
2837 '''
2838 self.results = [StringsWatchResult.from_json(o) for o in results or []]
2839
2840
2841 class AddSubnetParams(Type):
2842 _toSchema = {'space_tag': 'space-tag', 'subnet_provider_id': 'subnet-provider-id', 'subnet_tag': 'subnet-tag', 'zones': 'zones'}
2843 _toPy = {'space-tag': 'space_tag', 'subnet-provider-id': 'subnet_provider_id', 'subnet-tag': 'subnet_tag', 'zones': 'zones'}
2844 def __init__(self, space_tag=None, subnet_provider_id=None, subnet_tag=None, zones=None):
2845 '''
2846 space_tag : str
2847 subnet_provider_id : str
2848 subnet_tag : str
2849 zones : typing.Sequence<+T_co>[str]
2850 '''
2851 self.space_tag = space_tag
2852 self.subnet_provider_id = subnet_provider_id
2853 self.subnet_tag = subnet_tag
2854 self.zones = zones
2855
2856
2857 class AddSubnetsParams(Type):
2858 _toSchema = {'subnets': 'subnets'}
2859 _toPy = {'subnets': 'subnets'}
2860 def __init__(self, subnets=None):
2861 '''
2862 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
2863 '''
2864 self.subnets = [AddSubnetParams.from_json(o) for o in subnets or []]
2865
2866
2867 class CreateSpaceParams(Type):
2868 _toSchema = {'provider_id': 'provider-id', 'public': 'public', 'space_tag': 'space-tag', 'subnet_tags': 'subnet-tags'}
2869 _toPy = {'provider-id': 'provider_id', 'public': 'public', 'space-tag': 'space_tag', 'subnet-tags': 'subnet_tags'}
2870 def __init__(self, provider_id=None, public=None, space_tag=None, subnet_tags=None):
2871 '''
2872 provider_id : str
2873 public : bool
2874 space_tag : str
2875 subnet_tags : typing.Sequence<+T_co>[str]
2876 '''
2877 self.provider_id = provider_id
2878 self.public = public
2879 self.space_tag = space_tag
2880 self.subnet_tags = subnet_tags
2881
2882
2883 class CreateSpacesParams(Type):
2884 _toSchema = {'spaces': 'spaces'}
2885 _toPy = {'spaces': 'spaces'}
2886 def __init__(self, spaces=None):
2887 '''
2888 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
2889 '''
2890 self.spaces = [CreateSpaceParams.from_json(o) for o in spaces or []]
2891
2892
2893 class DiscoverSpacesResults(Type):
2894 _toSchema = {'results': 'results'}
2895 _toPy = {'results': 'results'}
2896 def __init__(self, results=None):
2897 '''
2898 results : typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
2899 '''
2900 self.results = [ProviderSpace.from_json(o) for o in results or []]
2901
2902
2903 class ListSubnetsResults(Type):
2904 _toSchema = {'results': 'results'}
2905 _toPy = {'results': 'results'}
2906 def __init__(self, results=None):
2907 '''
2908 results : typing.Sequence<+T_co>[~Subnet]<~Subnet>
2909 '''
2910 self.results = [Subnet.from_json(o) for o in results or []]
2911
2912
2913 class ProviderSpace(Type):
2914 _toSchema = {'error': 'error', 'name': 'name', 'provider_id': 'provider-id', 'subnets': 'subnets'}
2915 _toPy = {'error': 'error', 'name': 'name', 'provider-id': 'provider_id', 'subnets': 'subnets'}
2916 def __init__(self, error=None, name=None, provider_id=None, subnets=None):
2917 '''
2918 error : Error
2919 name : str
2920 provider_id : str
2921 subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet>
2922 '''
2923 self.error = Error.from_json(error) if error else None
2924 self.name = name
2925 self.provider_id = provider_id
2926 self.subnets = [Subnet.from_json(o) for o in subnets or []]
2927
2928
2929 class Subnet(Type):
2930 _toSchema = {'cidr': 'cidr', 'life': 'life', 'provider_id': 'provider-id', 'space_tag': 'space-tag', 'status': 'status', 'vlan_tag': 'vlan-tag', 'zones': 'zones'}
2931 _toPy = {'cidr': 'cidr', 'life': 'life', 'provider-id': 'provider_id', 'space-tag': 'space_tag', 'status': 'status', 'vlan-tag': 'vlan_tag', 'zones': 'zones'}
2932 def __init__(self, cidr=None, life=None, provider_id=None, space_tag=None, status=None, vlan_tag=None, zones=None):
2933 '''
2934 cidr : str
2935 life : str
2936 provider_id : str
2937 space_tag : str
2938 status : str
2939 vlan_tag : int
2940 zones : typing.Sequence<+T_co>[str]
2941 '''
2942 self.cidr = cidr
2943 self.life = life
2944 self.provider_id = provider_id
2945 self.space_tag = space_tag
2946 self.status = status
2947 self.vlan_tag = vlan_tag
2948 self.zones = zones
2949
2950
2951 class SubnetsFilters(Type):
2952 _toSchema = {'space_tag': 'space-tag', 'zone': 'zone'}
2953 _toPy = {'space-tag': 'space_tag', 'zone': 'zone'}
2954 def __init__(self, space_tag=None, zone=None):
2955 '''
2956 space_tag : str
2957 zone : str
2958 '''
2959 self.space_tag = space_tag
2960 self.zone = zone
2961
2962
2963 class BlockDevice(Type):
2964 _toSchema = {'busaddress': 'BusAddress', 'devicelinks': 'DeviceLinks', 'devicename': 'DeviceName', 'filesystemtype': 'FilesystemType', 'hardwareid': 'HardwareId', 'inuse': 'InUse', 'label': 'Label', 'mountpoint': 'MountPoint', 'size': 'Size', 'uuid': 'UUID'}
2965 _toPy = {'BusAddress': 'busaddress', 'DeviceLinks': 'devicelinks', 'DeviceName': 'devicename', 'FilesystemType': 'filesystemtype', 'HardwareId': 'hardwareid', 'InUse': 'inuse', 'Label': 'label', 'MountPoint': 'mountpoint', 'Size': 'size', 'UUID': 'uuid'}
2966 def __init__(self, busaddress=None, devicelinks=None, devicename=None, filesystemtype=None, hardwareid=None, inuse=None, label=None, mountpoint=None, size=None, uuid=None):
2967 '''
2968 busaddress : str
2969 devicelinks : typing.Sequence<+T_co>[str]
2970 devicename : str
2971 filesystemtype : str
2972 hardwareid : str
2973 inuse : bool
2974 label : str
2975 mountpoint : str
2976 size : int
2977 uuid : str
2978 '''
2979 self.busaddress = busaddress
2980 self.devicelinks = devicelinks
2981 self.devicename = devicename
2982 self.filesystemtype = filesystemtype
2983 self.hardwareid = hardwareid
2984 self.inuse = inuse
2985 self.label = label
2986 self.mountpoint = mountpoint
2987 self.size = size
2988 self.uuid = uuid
2989
2990
2991 class MachineBlockDevices(Type):
2992 _toSchema = {'block_devices': 'block-devices', 'machine': 'machine'}
2993 _toPy = {'block-devices': 'block_devices', 'machine': 'machine'}
2994 def __init__(self, block_devices=None, machine=None):
2995 '''
2996 block_devices : typing.Sequence<+T_co>[~BlockDevice]<~BlockDevice>
2997 machine : str
2998 '''
2999 self.block_devices = [BlockDevice.from_json(o) for o in block_devices or []]
3000 self.machine = machine
3001
3002
3003 class SetMachineBlockDevices(Type):
3004 _toSchema = {'machine_block_devices': 'machine-block-devices'}
3005 _toPy = {'machine-block-devices': 'machine_block_devices'}
3006 def __init__(self, machine_block_devices=None):
3007 '''
3008 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
3009 '''
3010 self.machine_block_devices = [MachineBlockDevices.from_json(o) for o in machine_block_devices or []]
3011
3012
3013 class EntitiesWatchResult(Type):
3014 _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
3015 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
3016 def __init__(self, changes=None, error=None, watcher_id=None):
3017 '''
3018 changes : typing.Sequence<+T_co>[str]
3019 error : Error
3020 watcher_id : str
3021 '''
3022 self.changes = changes
3023 self.error = Error.from_json(error) if error else None
3024 self.watcher_id = watcher_id
3025
3026
3027 class MachineStorageId(Type):
3028 _toSchema = {'attachment_tag': 'attachment-tag', 'machine_tag': 'machine-tag'}
3029 _toPy = {'attachment-tag': 'attachment_tag', 'machine-tag': 'machine_tag'}
3030 def __init__(self, attachment_tag=None, machine_tag=None):
3031 '''
3032 attachment_tag : str
3033 machine_tag : str
3034 '''
3035 self.attachment_tag = attachment_tag
3036 self.machine_tag = machine_tag
3037
3038
3039 class MachineStorageIdsWatchResult(Type):
3040 _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
3041 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
3042 def __init__(self, changes=None, error=None, watcher_id=None):
3043 '''
3044 changes : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
3045 error : Error
3046 watcher_id : str
3047 '''
3048 self.changes = [MachineStorageId.from_json(o) for o in changes or []]
3049 self.error = Error.from_json(error) if error else None
3050 self.watcher_id = watcher_id
3051
3052
3053 class BoolResult(Type):
3054 _toSchema = {'error': 'error', 'result': 'result'}
3055 _toPy = {'error': 'error', 'result': 'result'}
3056 def __init__(self, error=None, result=None):
3057 '''
3058 error : Error
3059 result : bool
3060 '''
3061 self.error = Error.from_json(error) if error else None
3062 self.result = result
3063
3064
3065 class BoolResults(Type):
3066 _toSchema = {'results': 'results'}
3067 _toPy = {'results': 'results'}
3068 def __init__(self, results=None):
3069 '''
3070 results : typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
3071 '''
3072 self.results = [BoolResult.from_json(o) for o in results or []]
3073
3074
3075 class MachinePortRange(Type):
3076 _toSchema = {'port_range': 'port-range', 'relation_tag': 'relation-tag', 'unit_tag': 'unit-tag'}
3077 _toPy = {'port-range': 'port_range', 'relation-tag': 'relation_tag', 'unit-tag': 'unit_tag'}
3078 def __init__(self, port_range=None, relation_tag=None, unit_tag=None):
3079 '''
3080 port_range : PortRange
3081 relation_tag : str
3082 unit_tag : str
3083 '''
3084 self.port_range = PortRange.from_json(port_range) if port_range else None
3085 self.relation_tag = relation_tag
3086 self.unit_tag = unit_tag
3087
3088
3089 class MachinePorts(Type):
3090 _toSchema = {'machine_tag': 'machine-tag', 'subnet_tag': 'subnet-tag'}
3091 _toPy = {'machine-tag': 'machine_tag', 'subnet-tag': 'subnet_tag'}
3092 def __init__(self, machine_tag=None, subnet_tag=None):
3093 '''
3094 machine_tag : str
3095 subnet_tag : str
3096 '''
3097 self.machine_tag = machine_tag
3098 self.subnet_tag = subnet_tag
3099
3100
3101 class MachinePortsParams(Type):
3102 _toSchema = {'params': 'params'}
3103 _toPy = {'params': 'params'}
3104 def __init__(self, params=None):
3105 '''
3106 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
3107 '''
3108 self.params = [MachinePorts.from_json(o) for o in params or []]
3109
3110
3111 class MachinePortsResult(Type):
3112 _toSchema = {'error': 'error', 'ports': 'ports'}
3113 _toPy = {'error': 'error', 'ports': 'ports'}
3114 def __init__(self, error=None, ports=None):
3115 '''
3116 error : Error
3117 ports : typing.Sequence<+T_co>[~MachinePortRange]<~MachinePortRange>
3118 '''
3119 self.error = Error.from_json(error) if error else None
3120 self.ports = [MachinePortRange.from_json(o) for o in ports or []]
3121
3122
3123 class MachinePortsResults(Type):
3124 _toSchema = {'results': 'results'}
3125 _toPy = {'results': 'results'}
3126 def __init__(self, results=None):
3127 '''
3128 results : typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
3129 '''
3130 self.results = [MachinePortsResult.from_json(o) for o in results or []]
3131
3132
3133 class PortRange(Type):
3134 _toSchema = {'from_port': 'from-port', 'protocol': 'protocol', 'to_port': 'to-port'}
3135 _toPy = {'from-port': 'from_port', 'protocol': 'protocol', 'to-port': 'to_port'}
3136 def __init__(self, from_port=None, protocol=None, to_port=None):
3137 '''
3138 from_port : int
3139 protocol : str
3140 to_port : int
3141 '''
3142 self.from_port = from_port
3143 self.protocol = protocol
3144 self.to_port = to_port
3145
3146
3147 class StringResults(Type):
3148 _toSchema = {'results': 'results'}
3149 _toPy = {'results': 'results'}
3150 def __init__(self, results=None):
3151 '''
3152 results : typing.Sequence<+T_co>[~StringResult]<~StringResult>
3153 '''
3154 self.results = [StringResult.from_json(o) for o in results or []]
3155
3156
3157 class ControllersChangeResult(Type):
3158 _toSchema = {'error': 'error', 'result': 'result'}
3159 _toPy = {'error': 'error', 'result': 'result'}
3160 def __init__(self, error=None, result=None):
3161 '''
3162 error : Error
3163 result : ControllersChanges
3164 '''
3165 self.error = Error.from_json(error) if error else None
3166 self.result = ControllersChanges.from_json(result) if result else None
3167
3168
3169 class ControllersChangeResults(Type):
3170 _toSchema = {'results': 'results'}
3171 _toPy = {'results': 'results'}
3172 def __init__(self, results=None):
3173 '''
3174 results : typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
3175 '''
3176 self.results = [ControllersChangeResult.from_json(o) for o in results or []]
3177
3178
3179 class ControllersChanges(Type):
3180 _toSchema = {'added': 'added', 'converted': 'converted', 'demoted': 'demoted', 'maintained': 'maintained', 'promoted': 'promoted', 'removed': 'removed'}
3181 _toPy = {'added': 'added', 'converted': 'converted', 'demoted': 'demoted', 'maintained': 'maintained', 'promoted': 'promoted', 'removed': 'removed'}
3182 def __init__(self, added=None, converted=None, demoted=None, maintained=None, promoted=None, removed=None):
3183 '''
3184 added : typing.Sequence<+T_co>[str]
3185 converted : typing.Sequence<+T_co>[str]
3186 demoted : typing.Sequence<+T_co>[str]
3187 maintained : typing.Sequence<+T_co>[str]
3188 promoted : typing.Sequence<+T_co>[str]
3189 removed : typing.Sequence<+T_co>[str]
3190 '''
3191 self.added = added
3192 self.converted = converted
3193 self.demoted = demoted
3194 self.maintained = maintained
3195 self.promoted = promoted
3196 self.removed = removed
3197
3198
3199 class ControllersSpec(Type):
3200 _toSchema = {'constraints': 'constraints', 'num_controllers': 'num-controllers', 'placement': 'placement', 'series': 'series'}
3201 _toPy = {'constraints': 'constraints', 'num-controllers': 'num_controllers', 'placement': 'placement', 'series': 'series'}
3202 def __init__(self, constraints=None, num_controllers=None, placement=None, series=None):
3203 '''
3204 constraints : Value
3205 num_controllers : int
3206 placement : typing.Sequence<+T_co>[str]
3207 series : str
3208 '''
3209 self.constraints = Value.from_json(constraints) if constraints else None
3210 self.num_controllers = num_controllers
3211 self.placement = placement
3212 self.series = series
3213
3214
3215 class ControllersSpecs(Type):
3216 _toSchema = {'specs': 'specs'}
3217 _toPy = {'specs': 'specs'}
3218 def __init__(self, specs=None):
3219 '''
3220 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
3221 '''
3222 self.specs = [ControllersSpec.from_json(o) for o in specs or []]
3223
3224
3225 class HAMember(Type):
3226 _toSchema = {'public_address': 'public-address', 'series': 'series', 'tag': 'tag'}
3227 _toPy = {'public-address': 'public_address', 'series': 'series', 'tag': 'tag'}
3228 def __init__(self, public_address=None, series=None, tag=None):
3229 '''
3230 public_address : Address
3231 series : str
3232 tag : str
3233 '''
3234 self.public_address = Address.from_json(public_address) if public_address else None
3235 self.series = series
3236 self.tag = tag
3237
3238
3239 class Member(Type):
3240 _toSchema = {'address': 'Address', 'arbiter': 'Arbiter', 'buildindexes': 'BuildIndexes', 'hidden': 'Hidden', 'id_': 'Id', 'priority': 'Priority', 'slavedelay': 'SlaveDelay', 'tags': 'Tags', 'votes': 'Votes'}
3241 _toPy = {'Address': 'address', 'Arbiter': 'arbiter', 'BuildIndexes': 'buildindexes', 'Hidden': 'hidden', 'Id': 'id_', 'Priority': 'priority', 'SlaveDelay': 'slavedelay', 'Tags': 'tags', 'Votes': 'votes'}
3242 def __init__(self, address=None, arbiter=None, buildindexes=None, hidden=None, id_=None, priority=None, slavedelay=None, tags=None, votes=None):
3243 '''
3244 address : str
3245 arbiter : bool
3246 buildindexes : bool
3247 hidden : bool
3248 id_ : int
3249 priority : float
3250 slavedelay : int
3251 tags : typing.Mapping<~KT, +VT_co>[str, str]
3252 votes : int
3253 '''
3254 self.address = address
3255 self.arbiter = arbiter
3256 self.buildindexes = buildindexes
3257 self.hidden = hidden
3258 self.id_ = id_
3259 self.priority = priority
3260 self.slavedelay = slavedelay
3261 self.tags = tags
3262 self.votes = votes
3263
3264
3265 class MongoUpgradeResults(Type):
3266 _toSchema = {'ha_members': 'ha-members', 'master': 'master', 'rs_members': 'rs-members'}
3267 _toPy = {'ha-members': 'ha_members', 'master': 'master', 'rs-members': 'rs_members'}
3268 def __init__(self, ha_members=None, master=None, rs_members=None):
3269 '''
3270 ha_members : typing.Sequence<+T_co>[~HAMember]<~HAMember>
3271 master : HAMember
3272 rs_members : typing.Sequence<+T_co>[~Member]<~Member>
3273 '''
3274 self.ha_members = [HAMember.from_json(o) for o in ha_members or []]
3275 self.master = HAMember.from_json(master) if master else None
3276 self.rs_members = [Member.from_json(o) for o in rs_members or []]
3277
3278
3279 class MongoVersion(Type):
3280 _toSchema = {'engine': 'engine', 'major': 'major', 'minor': 'minor', 'patch': 'patch'}
3281 _toPy = {'engine': 'engine', 'major': 'major', 'minor': 'minor', 'patch': 'patch'}
3282 def __init__(self, engine=None, major=None, minor=None, patch=None):
3283 '''
3284 engine : str
3285 major : int
3286 minor : int
3287 patch : str
3288 '''
3289 self.engine = engine
3290 self.major = major
3291 self.minor = minor
3292 self.patch = patch
3293
3294
3295 class ResumeReplicationParams(Type):
3296 _toSchema = {'members': 'members'}
3297 _toPy = {'members': 'members'}
3298 def __init__(self, members=None):
3299 '''
3300 members : typing.Sequence<+T_co>[~Member]<~Member>
3301 '''
3302 self.members = [Member.from_json(o) for o in members or []]
3303
3304
3305 class UpgradeMongoParams(Type):
3306 _toSchema = {'target': 'target'}
3307 _toPy = {'target': 'target'}
3308 def __init__(self, target=None):
3309 '''
3310 target : MongoVersion
3311 '''
3312 self.target = MongoVersion.from_json(target) if target else None
3313
3314
3315 class SSHHostKeySet(Type):
3316 _toSchema = {'entity_keys': 'entity-keys'}
3317 _toPy = {'entity-keys': 'entity_keys'}
3318 def __init__(self, entity_keys=None):
3319 '''
3320 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
3321 '''
3322 self.entity_keys = [SSHHostKeys.from_json(o) for o in entity_keys or []]
3323
3324
3325 class SSHHostKeys(Type):
3326 _toSchema = {'public_keys': 'public-keys', 'tag': 'tag'}
3327 _toPy = {'public-keys': 'public_keys', 'tag': 'tag'}
3328 def __init__(self, public_keys=None, tag=None):
3329 '''
3330 public_keys : typing.Sequence<+T_co>[str]
3331 tag : str
3332 '''
3333 self.public_keys = public_keys
3334 self.tag = tag
3335
3336
3337 class ImageFilterParams(Type):
3338 _toSchema = {'images': 'images'}
3339 _toPy = {'images': 'images'}
3340 def __init__(self, images=None):
3341 '''
3342 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
3343 '''
3344 self.images = [ImageSpec.from_json(o) for o in images or []]
3345
3346
3347 class ImageMetadata(Type):
3348 _toSchema = {'arch': 'arch', 'created': 'created', 'kind': 'kind', 'series': 'series', 'url': 'url'}
3349 _toPy = {'arch': 'arch', 'created': 'created', 'kind': 'kind', 'series': 'series', 'url': 'url'}
3350 def __init__(self, arch=None, created=None, kind=None, series=None, url=None):
3351 '''
3352 arch : str
3353 created : str
3354 kind : str
3355 series : str
3356 url : str
3357 '''
3358 self.arch = arch
3359 self.created = created
3360 self.kind = kind
3361 self.series = series
3362 self.url = url
3363
3364
3365 class ImageSpec(Type):
3366 _toSchema = {'arch': 'arch', 'kind': 'kind', 'series': 'series'}
3367 _toPy = {'arch': 'arch', 'kind': 'kind', 'series': 'series'}
3368 def __init__(self, arch=None, kind=None, series=None):
3369 '''
3370 arch : str
3371 kind : str
3372 series : str
3373 '''
3374 self.arch = arch
3375 self.kind = kind
3376 self.series = series
3377
3378
3379 class ListImageResult(Type):
3380 _toSchema = {'result': 'result'}
3381 _toPy = {'result': 'result'}
3382 def __init__(self, result=None):
3383 '''
3384 result : typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
3385 '''
3386 self.result = [ImageMetadata.from_json(o) for o in result or []]
3387
3388
3389 class CloudImageMetadata(Type):
3390 _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'}
3391 _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'}
3392 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):
3393 '''
3394 arch : str
3395 image_id : str
3396 priority : int
3397 region : str
3398 root_storage_size : int
3399 root_storage_type : str
3400 series : str
3401 source : str
3402 stream : str
3403 version : str
3404 virt_type : str
3405 '''
3406 self.arch = arch
3407 self.image_id = image_id
3408 self.priority = priority
3409 self.region = region
3410 self.root_storage_size = root_storage_size
3411 self.root_storage_type = root_storage_type
3412 self.series = series
3413 self.source = source
3414 self.stream = stream
3415 self.version = version
3416 self.virt_type = virt_type
3417
3418
3419 class CloudImageMetadataList(Type):
3420 _toSchema = {'metadata': 'metadata'}
3421 _toPy = {'metadata': 'metadata'}
3422 def __init__(self, metadata=None):
3423 '''
3424 metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
3425 '''
3426 self.metadata = [CloudImageMetadata.from_json(o) for o in metadata or []]
3427
3428
3429 class ImageMetadataFilter(Type):
3430 _toSchema = {'arches': 'arches', 'region': 'region', 'root_storage_type': 'root-storage-type', 'series': 'series', 'stream': 'stream', 'virt_type': 'virt-type'}
3431 _toPy = {'arches': 'arches', 'region': 'region', 'root-storage-type': 'root_storage_type', 'series': 'series', 'stream': 'stream', 'virt-type': 'virt_type'}
3432 def __init__(self, arches=None, region=None, root_storage_type=None, series=None, stream=None, virt_type=None):
3433 '''
3434 arches : typing.Sequence<+T_co>[str]
3435 region : str
3436 root_storage_type : str
3437 series : typing.Sequence<+T_co>[str]
3438 stream : str
3439 virt_type : str
3440 '''
3441 self.arches = arches
3442 self.region = region
3443 self.root_storage_type = root_storage_type
3444 self.series = series
3445 self.stream = stream
3446 self.virt_type = virt_type
3447
3448
3449 class ListCloudImageMetadataResult(Type):
3450 _toSchema = {'result': 'result'}
3451 _toPy = {'result': 'result'}
3452 def __init__(self, result=None):
3453 '''
3454 result : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
3455 '''
3456 self.result = [CloudImageMetadata.from_json(o) for o in result or []]
3457
3458
3459 class MetadataImageIds(Type):
3460 _toSchema = {'image_ids': 'image-ids'}
3461 _toPy = {'image-ids': 'image_ids'}
3462 def __init__(self, image_ids=None):
3463 '''
3464 image_ids : typing.Sequence<+T_co>[str]
3465 '''
3466 self.image_ids = image_ids
3467
3468
3469 class MetadataSaveParams(Type):
3470 _toSchema = {'metadata': 'metadata'}
3471 _toPy = {'metadata': 'metadata'}
3472 def __init__(self, metadata=None):
3473 '''
3474 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
3475 '''
3476 self.metadata = [CloudImageMetadataList.from_json(o) for o in metadata or []]
3477
3478
3479 class MachineAddresses(Type):
3480 _toSchema = {'addresses': 'addresses', 'tag': 'tag'}
3481 _toPy = {'addresses': 'addresses', 'tag': 'tag'}
3482 def __init__(self, addresses=None, tag=None):
3483 '''
3484 addresses : typing.Sequence<+T_co>[~Address]<~Address>
3485 tag : str
3486 '''
3487 self.addresses = [Address.from_json(o) for o in addresses or []]
3488 self.tag = tag
3489
3490
3491 class MachineAddressesResult(Type):
3492 _toSchema = {'addresses': 'addresses', 'error': 'error'}
3493 _toPy = {'addresses': 'addresses', 'error': 'error'}
3494 def __init__(self, addresses=None, error=None):
3495 '''
3496 addresses : typing.Sequence<+T_co>[~Address]<~Address>
3497 error : Error
3498 '''
3499 self.addresses = [Address.from_json(o) for o in addresses or []]
3500 self.error = Error.from_json(error) if error else None
3501
3502
3503 class MachineAddressesResults(Type):
3504 _toSchema = {'results': 'results'}
3505 _toPy = {'results': 'results'}
3506 def __init__(self, results=None):
3507 '''
3508 results : typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
3509 '''
3510 self.results = [MachineAddressesResult.from_json(o) for o in results or []]
3511
3512
3513 class SetMachinesAddresses(Type):
3514 _toSchema = {'machine_addresses': 'machine-addresses'}
3515 _toPy = {'machine-addresses': 'machine_addresses'}
3516 def __init__(self, machine_addresses=None):
3517 '''
3518 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
3519 '''
3520 self.machine_addresses = [MachineAddresses.from_json(o) for o in machine_addresses or []]
3521
3522
3523 class StatusResult(Type):
3524 _toSchema = {'data': 'data', 'error': 'error', 'id_': 'id', 'info': 'info', 'life': 'life', 'since': 'since', 'status': 'status'}
3525 _toPy = {'data': 'data', 'error': 'error', 'id': 'id_', 'info': 'info', 'life': 'life', 'since': 'since', 'status': 'status'}
3526 def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None):
3527 '''
3528 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3529 error : Error
3530 id_ : str
3531 info : str
3532 life : str
3533 since : str
3534 status : str
3535 '''
3536 self.data = data
3537 self.error = Error.from_json(error) if error else None
3538 self.id_ = id_
3539 self.info = info
3540 self.life = life
3541 self.since = since
3542 self.status = status
3543
3544
3545 class StatusResults(Type):
3546 _toSchema = {'results': 'results'}
3547 _toPy = {'results': 'results'}
3548 def __init__(self, results=None):
3549 '''
3550 results : typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
3551 '''
3552 self.results = [StatusResult.from_json(o) for o in results or []]
3553
3554
3555 class ListSSHKeys(Type):
3556 _toSchema = {'entities': 'entities', 'mode': 'mode'}
3557 _toPy = {'entities': 'entities', 'mode': 'mode'}
3558 def __init__(self, entities=None, mode=None):
3559 '''
3560 entities : Entities
3561 mode : bool
3562 '''
3563 self.entities = Entities.from_json(entities) if entities else None
3564 self.mode = mode
3565
3566
3567 class ModifyUserSSHKeys(Type):
3568 _toSchema = {'ssh_keys': 'ssh-keys', 'user': 'user'}
3569 _toPy = {'ssh-keys': 'ssh_keys', 'user': 'user'}
3570 def __init__(self, ssh_keys=None, user=None):
3571 '''
3572 ssh_keys : typing.Sequence<+T_co>[str]
3573 user : str
3574 '''
3575 self.ssh_keys = ssh_keys
3576 self.user = user
3577
3578
3579 class ApplicationTag(Type):
3580 _toSchema = {'name': 'Name'}
3581 _toPy = {'Name': 'name'}
3582 def __init__(self, name=None):
3583 '''
3584 name : str
3585 '''
3586 self.name = name
3587
3588
3589 class ClaimLeadershipBulkParams(Type):
3590 _toSchema = {'params': 'params'}
3591 _toPy = {'params': 'params'}
3592 def __init__(self, params=None):
3593 '''
3594 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
3595 '''
3596 self.params = [ClaimLeadershipParams.from_json(o) for o in params or []]
3597
3598
3599 class ClaimLeadershipBulkResults(Type):
3600 _toSchema = {'results': 'results'}
3601 _toPy = {'results': 'results'}
3602 def __init__(self, results=None):
3603 '''
3604 results : typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3605 '''
3606 self.results = [ErrorResult.from_json(o) for o in results or []]
3607
3608
3609 class ClaimLeadershipParams(Type):
3610 _toSchema = {'application_tag': 'application-tag', 'duration': 'duration', 'unit_tag': 'unit-tag'}
3611 _toPy = {'application-tag': 'application_tag', 'duration': 'duration', 'unit-tag': 'unit_tag'}
3612 def __init__(self, application_tag=None, duration=None, unit_tag=None):
3613 '''
3614 application_tag : str
3615 duration : float
3616 unit_tag : str
3617 '''
3618 self.application_tag = application_tag
3619 self.duration = duration
3620 self.unit_tag = unit_tag
3621
3622
3623 class LogForwardingGetLastSentParams(Type):
3624 _toSchema = {'ids': 'ids'}
3625 _toPy = {'ids': 'ids'}
3626 def __init__(self, ids=None):
3627 '''
3628 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
3629 '''
3630 self.ids = [LogForwardingID.from_json(o) for o in ids or []]
3631
3632
3633 class LogForwardingGetLastSentResult(Type):
3634 _toSchema = {'err': 'err', 'record_id': 'record-id', 'record_timestamp': 'record-timestamp'}
3635 _toPy = {'err': 'err', 'record-id': 'record_id', 'record-timestamp': 'record_timestamp'}
3636 def __init__(self, err=None, record_id=None, record_timestamp=None):
3637 '''
3638 err : Error
3639 record_id : int
3640 record_timestamp : int
3641 '''
3642 self.err = Error.from_json(err) if err else None
3643 self.record_id = record_id
3644 self.record_timestamp = record_timestamp
3645
3646
3647 class LogForwardingGetLastSentResults(Type):
3648 _toSchema = {'results': 'results'}
3649 _toPy = {'results': 'results'}
3650 def __init__(self, results=None):
3651 '''
3652 results : typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
3653 '''
3654 self.results = [LogForwardingGetLastSentResult.from_json(o) for o in results or []]
3655
3656
3657 class LogForwardingID(Type):
3658 _toSchema = {'model': 'model', 'sink': 'sink'}
3659 _toPy = {'model': 'model', 'sink': 'sink'}
3660 def __init__(self, model=None, sink=None):
3661 '''
3662 model : str
3663 sink : str
3664 '''
3665 self.model = model
3666 self.sink = sink
3667
3668
3669 class LogForwardingSetLastSentParam(Type):
3670 _toSchema = {'logforwardingid': 'LogForwardingID', 'record_id': 'record-id', 'record_timestamp': 'record-timestamp'}
3671 _toPy = {'LogForwardingID': 'logforwardingid', 'record-id': 'record_id', 'record-timestamp': 'record_timestamp'}
3672 def __init__(self, logforwardingid=None, record_id=None, record_timestamp=None):
3673 '''
3674 logforwardingid : LogForwardingID
3675 record_id : int
3676 record_timestamp : int
3677 '''
3678 self.logforwardingid = LogForwardingID.from_json(logforwardingid) if logforwardingid else None
3679 self.record_id = record_id
3680 self.record_timestamp = record_timestamp
3681
3682
3683 class LogForwardingSetLastSentParams(Type):
3684 _toSchema = {'params': 'params'}
3685 _toPy = {'params': 'params'}
3686 def __init__(self, params=None):
3687 '''
3688 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
3689 '''
3690 self.params = [LogForwardingSetLastSentParam.from_json(o) for o in params or []]
3691
3692
3693 class ActionExecutionResult(Type):
3694 _toSchema = {'action_tag': 'action-tag', 'message': 'message', 'results': 'results', 'status': 'status'}
3695 _toPy = {'action-tag': 'action_tag', 'message': 'message', 'results': 'results', 'status': 'status'}
3696 def __init__(self, action_tag=None, message=None, results=None, status=None):
3697 '''
3698 action_tag : str
3699 message : str
3700 results : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3701 status : str
3702 '''
3703 self.action_tag = action_tag
3704 self.message = message
3705 self.results = results
3706 self.status = status
3707
3708
3709 class ActionExecutionResults(Type):
3710 _toSchema = {'results': 'results'}
3711 _toPy = {'results': 'results'}
3712 def __init__(self, results=None):
3713 '''
3714 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
3715 '''
3716 self.results = [ActionExecutionResult.from_json(o) for o in results or []]
3717
3718
3719 class ModelInstanceTypesConstraint(Type):
3720 _toSchema = {'value': 'value'}
3721 _toPy = {'value': 'value'}
3722 def __init__(self, value=None):
3723 '''
3724 value : Value
3725 '''
3726 self.value = Value.from_json(value) if value else None
3727
3728
3729 class ModelInstanceTypesConstraints(Type):
3730 _toSchema = {'constraints': 'constraints'}
3731 _toPy = {'constraints': 'constraints'}
3732 def __init__(self, constraints=None):
3733 '''
3734 constraints : typing.Sequence<+T_co>[~ModelInstanceTypesConstraint]<~ModelInstanceTypesConstraint>
3735 '''
3736 self.constraints = [ModelInstanceTypesConstraint.from_json(o) for o in constraints or []]
3737
3738
3739 class EntitiesResult(Type):
3740 _toSchema = {'entities': 'entities', 'error': 'error'}
3741 _toPy = {'entities': 'entities', 'error': 'error'}
3742 def __init__(self, entities=None, error=None):
3743 '''
3744 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3745 error : Error
3746 '''
3747 self.entities = [Entity.from_json(o) for o in entities or []]
3748 self.error = Error.from_json(error) if error else None
3749
3750
3751 class EntitiesResults(Type):
3752 _toSchema = {'results': 'results'}
3753 _toPy = {'results': 'results'}
3754 def __init__(self, results=None):
3755 '''
3756 results : typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
3757 '''
3758 self.results = [EntitiesResult.from_json(o) for o in results or []]
3759
3760
3761 class ProviderInterfaceInfo(Type):
3762 _toSchema = {'interface_name': 'interface-name', 'mac_address': 'mac-address', 'provider_id': 'provider-id'}
3763 _toPy = {'interface-name': 'interface_name', 'mac-address': 'mac_address', 'provider-id': 'provider_id'}
3764 def __init__(self, interface_name=None, mac_address=None, provider_id=None):
3765 '''
3766 interface_name : str
3767 mac_address : str
3768 provider_id : str
3769 '''
3770 self.interface_name = interface_name
3771 self.mac_address = mac_address
3772 self.provider_id = provider_id
3773
3774
3775 class ProviderInterfaceInfoResult(Type):
3776 _toSchema = {'error': 'error', 'interfaces': 'interfaces', 'machine_tag': 'machine-tag'}
3777 _toPy = {'error': 'error', 'interfaces': 'interfaces', 'machine-tag': 'machine_tag'}
3778 def __init__(self, error=None, interfaces=None, machine_tag=None):
3779 '''
3780 error : Error
3781 interfaces : typing.Sequence<+T_co>[~ProviderInterfaceInfo]<~ProviderInterfaceInfo>
3782 machine_tag : str
3783 '''
3784 self.error = Error.from_json(error) if error else None
3785 self.interfaces = [ProviderInterfaceInfo.from_json(o) for o in interfaces or []]
3786 self.machine_tag = machine_tag
3787
3788
3789 class ProviderInterfaceInfoResults(Type):
3790 _toSchema = {'results': 'results'}
3791 _toPy = {'results': 'results'}
3792 def __init__(self, results=None):
3793 '''
3794 results : typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
3795 '''
3796 self.results = [ProviderInterfaceInfoResult.from_json(o) for o in results or []]
3797
3798
3799 class JobsResult(Type):
3800 _toSchema = {'error': 'error', 'jobs': 'jobs'}
3801 _toPy = {'error': 'error', 'jobs': 'jobs'}
3802 def __init__(self, error=None, jobs=None):
3803 '''
3804 error : Error
3805 jobs : typing.Sequence<+T_co>[str]
3806 '''
3807 self.error = Error.from_json(error) if error else None
3808 self.jobs = jobs
3809
3810
3811 class JobsResults(Type):
3812 _toSchema = {'results': 'results'}
3813 _toPy = {'results': 'results'}
3814 def __init__(self, results=None):
3815 '''
3816 results : typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
3817 '''
3818 self.results = [JobsResult.from_json(o) for o in results or []]
3819
3820
3821 class NetworkConfig(Type):
3822 _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', 'routes': 'routes', 'vlan_tag': 'vlan-tag'}
3823 _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', 'routes': 'routes', 'vlan-tag': 'vlan_tag'}
3824 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, routes=None, vlan_tag=None):
3825 '''
3826 address : str
3827 cidr : str
3828 config_type : str
3829 device_index : int
3830 disabled : bool
3831 dns_search_domains : typing.Sequence<+T_co>[str]
3832 dns_servers : typing.Sequence<+T_co>[str]
3833 gateway_address : str
3834 interface_name : str
3835 interface_type : str
3836 mac_address : str
3837 mtu : int
3838 no_auto_start : bool
3839 parent_interface_name : str
3840 provider_address_id : str
3841 provider_id : str
3842 provider_space_id : str
3843 provider_subnet_id : str
3844 provider_vlan_id : str
3845 routes : typing.Sequence<+T_co>[~NetworkRoute]<~NetworkRoute>
3846 vlan_tag : int
3847 '''
3848 self.address = address
3849 self.cidr = cidr
3850 self.config_type = config_type
3851 self.device_index = device_index
3852 self.disabled = disabled
3853 self.dns_search_domains = dns_search_domains
3854 self.dns_servers = dns_servers
3855 self.gateway_address = gateway_address
3856 self.interface_name = interface_name
3857 self.interface_type = interface_type
3858 self.mac_address = mac_address
3859 self.mtu = mtu
3860 self.no_auto_start = no_auto_start
3861 self.parent_interface_name = parent_interface_name
3862 self.provider_address_id = provider_address_id
3863 self.provider_id = provider_id
3864 self.provider_space_id = provider_space_id
3865 self.provider_subnet_id = provider_subnet_id
3866 self.provider_vlan_id = provider_vlan_id
3867 self.routes = [NetworkRoute.from_json(o) for o in routes or []]
3868 self.vlan_tag = vlan_tag
3869
3870
3871 class NetworkRoute(Type):
3872 _toSchema = {'destination_cidr': 'destination-cidr', 'gateway_ip': 'gateway-ip', 'metric': 'metric'}
3873 _toPy = {'destination-cidr': 'destination_cidr', 'gateway-ip': 'gateway_ip', 'metric': 'metric'}
3874 def __init__(self, destination_cidr=None, gateway_ip=None, metric=None):
3875 '''
3876 destination_cidr : str
3877 gateway_ip : str
3878 metric : int
3879 '''
3880 self.destination_cidr = destination_cidr
3881 self.gateway_ip = gateway_ip
3882 self.metric = metric
3883
3884
3885 class SetMachineNetworkConfig(Type):
3886 _toSchema = {'config': 'config', 'tag': 'tag'}
3887 _toPy = {'config': 'config', 'tag': 'tag'}
3888 def __init__(self, config=None, tag=None):
3889 '''
3890 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3891 tag : str
3892 '''
3893 self.config = [NetworkConfig.from_json(o) for o in config or []]
3894 self.tag = tag
3895
3896
3897 class MeterStatusResult(Type):
3898 _toSchema = {'code': 'code', 'error': 'error', 'info': 'info'}
3899 _toPy = {'code': 'code', 'error': 'error', 'info': 'info'}
3900 def __init__(self, code=None, error=None, info=None):
3901 '''
3902 code : str
3903 error : Error
3904 info : str
3905 '''
3906 self.code = code
3907 self.error = Error.from_json(error) if error else None
3908 self.info = info
3909
3910
3911 class MeterStatusResults(Type):
3912 _toSchema = {'results': 'results'}
3913 _toPy = {'results': 'results'}
3914 def __init__(self, results=None):
3915 '''
3916 results : typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
3917 '''
3918 self.results = [MeterStatusResult.from_json(o) for o in results or []]
3919
3920
3921 class Metric(Type):
3922 _toSchema = {'key': 'key', 'time': 'time', 'value': 'value'}
3923 _toPy = {'key': 'key', 'time': 'time', 'value': 'value'}
3924 def __init__(self, key=None, time=None, value=None):
3925 '''
3926 key : str
3927 time : str
3928 value : str
3929 '''
3930 self.key = key
3931 self.time = time
3932 self.value = value
3933
3934
3935 class MetricBatch(Type):
3936 _toSchema = {'charm_url': 'charm-url', 'created': 'created', 'metrics': 'metrics', 'uuid': 'uuid'}
3937 _toPy = {'charm-url': 'charm_url', 'created': 'created', 'metrics': 'metrics', 'uuid': 'uuid'}
3938 def __init__(self, charm_url=None, created=None, metrics=None, uuid=None):
3939 '''
3940 charm_url : str
3941 created : str
3942 metrics : typing.Sequence<+T_co>[~Metric]<~Metric>
3943 uuid : str
3944 '''
3945 self.charm_url = charm_url
3946 self.created = created
3947 self.metrics = [Metric.from_json(o) for o in metrics or []]
3948 self.uuid = uuid
3949
3950
3951 class MetricBatchParam(Type):
3952 _toSchema = {'batch': 'batch', 'tag': 'tag'}
3953 _toPy = {'batch': 'batch', 'tag': 'tag'}
3954 def __init__(self, batch=None, tag=None):
3955 '''
3956 batch : MetricBatch
3957 tag : str
3958 '''
3959 self.batch = MetricBatch.from_json(batch) if batch else None
3960 self.tag = tag
3961
3962
3963 class MetricBatchParams(Type):
3964 _toSchema = {'batches': 'batches'}
3965 _toPy = {'batches': 'batches'}
3966 def __init__(self, batches=None):
3967 '''
3968 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
3969 '''
3970 self.batches = [MetricBatchParam.from_json(o) for o in batches or []]
3971
3972
3973 class EntityMetrics(Type):
3974 _toSchema = {'error': 'error', 'metrics': 'metrics'}
3975 _toPy = {'error': 'error', 'metrics': 'metrics'}
3976 def __init__(self, error=None, metrics=None):
3977 '''
3978 error : Error
3979 metrics : typing.Sequence<+T_co>[~MetricResult]<~MetricResult>
3980 '''
3981 self.error = Error.from_json(error) if error else None
3982 self.metrics = [MetricResult.from_json(o) for o in metrics or []]
3983
3984
3985 class MeterStatusParam(Type):
3986 _toSchema = {'code': 'code', 'info': 'info', 'tag': 'tag'}
3987 _toPy = {'code': 'code', 'info': 'info', 'tag': 'tag'}
3988 def __init__(self, code=None, info=None, tag=None):
3989 '''
3990 code : str
3991 info : str
3992 tag : str
3993 '''
3994 self.code = code
3995 self.info = info
3996 self.tag = tag
3997
3998
3999 class MeterStatusParams(Type):
4000 _toSchema = {'statues': 'statues'}
4001 _toPy = {'statues': 'statues'}
4002 def __init__(self, statues=None):
4003 '''
4004 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
4005 '''
4006 self.statues = [MeterStatusParam.from_json(o) for o in statues or []]
4007
4008
4009 class MetricResult(Type):
4010 _toSchema = {'key': 'key', 'time': 'time', 'unit': 'unit', 'value': 'value'}
4011 _toPy = {'key': 'key', 'time': 'time', 'unit': 'unit', 'value': 'value'}
4012 def __init__(self, key=None, time=None, unit=None, value=None):
4013 '''
4014 key : str
4015 time : str
4016 unit : str
4017 value : str
4018 '''
4019 self.key = key
4020 self.time = time
4021 self.unit = unit
4022 self.value = value
4023
4024
4025 class MetricResults(Type):
4026 _toSchema = {'results': 'results'}
4027 _toPy = {'results': 'results'}
4028 def __init__(self, results=None):
4029 '''
4030 results : typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
4031 '''
4032 self.results = [EntityMetrics.from_json(o) for o in results or []]
4033
4034
4035 class PhaseResult(Type):
4036 _toSchema = {'error': 'error', 'phase': 'phase'}
4037 _toPy = {'error': 'error', 'phase': 'phase'}
4038 def __init__(self, error=None, phase=None):
4039 '''
4040 error : Error
4041 phase : str
4042 '''
4043 self.error = Error.from_json(error) if error else None
4044 self.phase = phase
4045
4046
4047 class PhaseResults(Type):
4048 _toSchema = {'results': 'results'}
4049 _toPy = {'results': 'results'}
4050 def __init__(self, results=None):
4051 '''
4052 results : typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
4053 '''
4054 self.results = [PhaseResult.from_json(o) for o in results or []]
4055
4056
4057 class MasterMigrationStatus(Type):
4058 _toSchema = {'migration_id': 'migration-id', 'phase': 'phase', 'phase_changed_time': 'phase-changed-time', 'spec': 'spec'}
4059 _toPy = {'migration-id': 'migration_id', 'phase': 'phase', 'phase-changed-time': 'phase_changed_time', 'spec': 'spec'}
4060 def __init__(self, migration_id=None, phase=None, phase_changed_time=None, spec=None):
4061 '''
4062 migration_id : str
4063 phase : str
4064 phase_changed_time : str
4065 spec : MigrationSpec
4066 '''
4067 self.migration_id = migration_id
4068 self.phase = phase
4069 self.phase_changed_time = phase_changed_time
4070 self.spec = MigrationSpec.from_json(spec) if spec else None
4071
4072
4073 class MigrationModelInfo(Type):
4074 _toSchema = {'agent_version': 'agent-version', 'controller_agent_version': 'controller-agent-version', 'name': 'name', 'owner_tag': 'owner-tag', 'uuid': 'uuid'}
4075 _toPy = {'agent-version': 'agent_version', 'controller-agent-version': 'controller_agent_version', 'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'}
4076 def __init__(self, agent_version=None, controller_agent_version=None, name=None, owner_tag=None, uuid=None):
4077 '''
4078 agent_version : Number
4079 controller_agent_version : Number
4080 name : str
4081 owner_tag : str
4082 uuid : str
4083 '''
4084 self.agent_version = Number.from_json(agent_version) if agent_version else None
4085 self.controller_agent_version = Number.from_json(controller_agent_version) if controller_agent_version else None
4086 self.name = name
4087 self.owner_tag = owner_tag
4088 self.uuid = uuid
4089
4090
4091 class MinionReports(Type):
4092 _toSchema = {'failed': 'failed', 'migration_id': 'migration-id', 'phase': 'phase', 'success_count': 'success-count', 'unknown_count': 'unknown-count', 'unknown_sample': 'unknown-sample'}
4093 _toPy = {'failed': 'failed', 'migration-id': 'migration_id', 'phase': 'phase', 'success-count': 'success_count', 'unknown-count': 'unknown_count', 'unknown-sample': 'unknown_sample'}
4094 def __init__(self, failed=None, migration_id=None, phase=None, success_count=None, unknown_count=None, unknown_sample=None):
4095 '''
4096 failed : typing.Sequence<+T_co>[str]
4097 migration_id : str
4098 phase : str
4099 success_count : int
4100 unknown_count : int
4101 unknown_sample : typing.Sequence<+T_co>[str]
4102 '''
4103 self.failed = failed
4104 self.migration_id = migration_id
4105 self.phase = phase
4106 self.success_count = success_count
4107 self.unknown_count = unknown_count
4108 self.unknown_sample = unknown_sample
4109
4110
4111 class SerializedModel(Type):
4112 _toSchema = {'bytes_': 'bytes', 'charms': 'charms', 'resources': 'resources', 'tools': 'tools'}
4113 _toPy = {'bytes': 'bytes_', 'charms': 'charms', 'resources': 'resources', 'tools': 'tools'}
4114 def __init__(self, bytes_=None, charms=None, resources=None, tools=None):
4115 '''
4116 bytes_ : typing.Sequence<+T_co>[int]
4117 charms : typing.Sequence<+T_co>[str]
4118 resources : typing.Sequence<+T_co>[~SerializedModelResource]<~SerializedModelResource>
4119 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
4120 '''
4121 self.bytes_ = bytes_
4122 self.charms = charms
4123 self.resources = [SerializedModelResource.from_json(o) for o in resources or []]
4124 self.tools = [SerializedModelTools.from_json(o) for o in tools or []]
4125
4126
4127 class SerializedModelResource(Type):
4128 _toSchema = {'application': 'application', 'application_revision': 'application-revision', 'charmstore_revision': 'charmstore-revision', 'name': 'name', 'unit_revisions': 'unit-revisions'}
4129 _toPy = {'application': 'application', 'application-revision': 'application_revision', 'charmstore-revision': 'charmstore_revision', 'name': 'name', 'unit-revisions': 'unit_revisions'}
4130 def __init__(self, application=None, application_revision=None, charmstore_revision=None, name=None, unit_revisions=None):
4131 '''
4132 application : str
4133 application_revision : SerializedModelResourceRevision
4134 charmstore_revision : SerializedModelResourceRevision
4135 name : str
4136 unit_revisions : typing.Mapping<~KT, +VT_co>[str, ~SerializedModelResourceRevision]<~SerializedModelResourceRevision>
4137 '''
4138 self.application = application
4139 self.application_revision = SerializedModelResourceRevision.from_json(application_revision) if application_revision else None
4140 self.charmstore_revision = SerializedModelResourceRevision.from_json(charmstore_revision) if charmstore_revision else None
4141 self.name = name
4142 self.unit_revisions = unit_revisions
4143
4144
4145 class SerializedModelResourceRevision(Type):
4146 _toSchema = {'description': 'description', 'fingerprint': 'fingerprint', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type_': 'type', 'username': 'username'}
4147 _toPy = {'description': 'description', 'fingerprint': 'fingerprint', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type': 'type_', 'username': 'username'}
4148 def __init__(self, description=None, fingerprint=None, origin=None, path=None, revision=None, size=None, timestamp=None, type_=None, username=None):
4149 '''
4150 description : str
4151 fingerprint : str
4152 origin : str
4153 path : str
4154 revision : int
4155 size : int
4156 timestamp : str
4157 type_ : str
4158 username : str
4159 '''
4160 self.description = description
4161 self.fingerprint = fingerprint
4162 self.origin = origin
4163 self.path = path
4164 self.revision = revision
4165 self.size = size
4166 self.timestamp = timestamp
4167 self.type_ = type_
4168 self.username = username
4169
4170
4171 class SerializedModelTools(Type):
4172 _toSchema = {'uri': 'uri', 'version': 'version'}
4173 _toPy = {'uri': 'uri', 'version': 'version'}
4174 def __init__(self, uri=None, version=None):
4175 '''
4176 uri : str
4177 version : str
4178 '''
4179 self.uri = uri
4180 self.version = version
4181
4182
4183 class SetMigrationPhaseArgs(Type):
4184 _toSchema = {'phase': 'phase'}
4185 _toPy = {'phase': 'phase'}
4186 def __init__(self, phase=None):
4187 '''
4188 phase : str
4189 '''
4190 self.phase = phase
4191
4192
4193 class SetMigrationStatusMessageArgs(Type):
4194 _toSchema = {'message': 'message'}
4195 _toPy = {'message': 'message'}
4196 def __init__(self, message=None):
4197 '''
4198 message : str
4199 '''
4200 self.message = message
4201
4202
4203 class MinionReport(Type):
4204 _toSchema = {'migration_id': 'migration-id', 'phase': 'phase', 'success': 'success'}
4205 _toPy = {'migration-id': 'migration_id', 'phase': 'phase', 'success': 'success'}
4206 def __init__(self, migration_id=None, phase=None, success=None):
4207 '''
4208 migration_id : str
4209 phase : str
4210 success : bool
4211 '''
4212 self.migration_id = migration_id
4213 self.phase = phase
4214 self.success = success
4215
4216
4217 class MigrationStatus(Type):
4218 _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'}
4219 _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'}
4220 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):
4221 '''
4222 attempt : int
4223 external_control : bool
4224 migration_id : str
4225 phase : str
4226 source_api_addrs : typing.Sequence<+T_co>[str]
4227 source_ca_cert : str
4228 target_api_addrs : typing.Sequence<+T_co>[str]
4229 target_ca_cert : str
4230 '''
4231 self.attempt = attempt
4232 self.external_control = external_control
4233 self.migration_id = migration_id
4234 self.phase = phase
4235 self.source_api_addrs = source_api_addrs
4236 self.source_ca_cert = source_ca_cert
4237 self.target_api_addrs = target_api_addrs
4238 self.target_ca_cert = target_ca_cert
4239
4240
4241 class AdoptResourcesArgs(Type):
4242 _toSchema = {'model_tag': 'model-tag', 'source_controller_version': 'source-controller-version'}
4243 _toPy = {'model-tag': 'model_tag', 'source-controller-version': 'source_controller_version'}
4244 def __init__(self, model_tag=None, source_controller_version=None):
4245 '''
4246 model_tag : str
4247 source_controller_version : Number
4248 '''
4249 self.model_tag = model_tag
4250 self.source_controller_version = Number.from_json(source_controller_version) if source_controller_version else None
4251
4252
4253 class ModelArgs(Type):
4254 _toSchema = {'model_tag': 'model-tag'}
4255 _toPy = {'model-tag': 'model_tag'}
4256 def __init__(self, model_tag=None):
4257 '''
4258 model_tag : str
4259 '''
4260 self.model_tag = model_tag
4261
4262
4263 class MapResult(Type):
4264 _toSchema = {'error': 'error', 'result': 'result'}
4265 _toPy = {'error': 'error', 'result': 'result'}
4266 def __init__(self, error=None, result=None):
4267 '''
4268 error : Error
4269 result : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4270 '''
4271 self.error = Error.from_json(error) if error else None
4272 self.result = result
4273
4274
4275 class MapResults(Type):
4276 _toSchema = {'results': 'results'}
4277 _toPy = {'results': 'results'}
4278 def __init__(self, results=None):
4279 '''
4280 results : typing.Sequence<+T_co>[~MapResult]<~MapResult>
4281 '''
4282 self.results = [MapResult.from_json(o) for o in results or []]
4283
4284
4285 class ModelCreateArgs(Type):
4286 _toSchema = {'cloud_tag': 'cloud-tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner_tag': 'owner-tag', 'region': 'region'}
4287 _toPy = {'cloud-tag': 'cloud_tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner-tag': 'owner_tag', 'region': 'region'}
4288 def __init__(self, cloud_tag=None, config=None, credential=None, name=None, owner_tag=None, region=None):
4289 '''
4290 cloud_tag : str
4291 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4292 credential : str
4293 name : str
4294 owner_tag : str
4295 region : str
4296 '''
4297 self.cloud_tag = cloud_tag
4298 self.config = config
4299 self.credential = credential
4300 self.name = name
4301 self.owner_tag = owner_tag
4302 self.region = region
4303
4304
4305 class ModelDefaultValues(Type):
4306 _toSchema = {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'config': 'config'}
4307 _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'config': 'config'}
4308 def __init__(self, cloud_region=None, cloud_tag=None, config=None):
4309 '''
4310 cloud_region : str
4311 cloud_tag : str
4312 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4313 '''
4314 self.cloud_region = cloud_region
4315 self.cloud_tag = cloud_tag
4316 self.config = config
4317
4318
4319 class ModelDefaults(Type):
4320 _toSchema = {'controller': 'controller', 'default': 'default', 'regions': 'regions'}
4321 _toPy = {'controller': 'controller', 'default': 'default', 'regions': 'regions'}
4322 def __init__(self, controller=None, default=None, regions=None):
4323 '''
4324 controller : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4325 default : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4326 regions : typing.Sequence<+T_co>[~RegionDefaults]<~RegionDefaults>
4327 '''
4328 self.controller = controller
4329 self.default = default
4330 self.regions = [RegionDefaults.from_json(o) for o in regions or []]
4331
4332
4333 class ModelDefaultsResult(Type):
4334 _toSchema = {'config': 'config'}
4335 _toPy = {'config': 'config'}
4336 def __init__(self, config=None):
4337 '''
4338 config : typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
4339 '''
4340 self.config = config
4341
4342
4343 class ModelInfoResult(Type):
4344 _toSchema = {'error': 'error', 'result': 'result'}
4345 _toPy = {'error': 'error', 'result': 'result'}
4346 def __init__(self, error=None, result=None):
4347 '''
4348 error : Error
4349 result : ModelInfo
4350 '''
4351 self.error = Error.from_json(error) if error else None
4352 self.result = ModelInfo.from_json(result) if result else None
4353
4354
4355 class ModelInfoResults(Type):
4356 _toSchema = {'results': 'results'}
4357 _toPy = {'results': 'results'}
4358 def __init__(self, results=None):
4359 '''
4360 results : typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
4361 '''
4362 self.results = [ModelInfoResult.from_json(o) for o in results or []]
4363
4364
4365 class ModelUnsetKeys(Type):
4366 _toSchema = {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'keys': 'keys'}
4367 _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'keys': 'keys'}
4368 def __init__(self, cloud_region=None, cloud_tag=None, keys=None):
4369 '''
4370 cloud_region : str
4371 cloud_tag : str
4372 keys : typing.Sequence<+T_co>[str]
4373 '''
4374 self.cloud_region = cloud_region
4375 self.cloud_tag = cloud_tag
4376 self.keys = keys
4377
4378
4379 class ModifyModelAccess(Type):
4380 _toSchema = {'access': 'access', 'action': 'action', 'model_tag': 'model-tag', 'user_tag': 'user-tag'}
4381 _toPy = {'access': 'access', 'action': 'action', 'model-tag': 'model_tag', 'user-tag': 'user_tag'}
4382 def __init__(self, access=None, action=None, model_tag=None, user_tag=None):
4383 '''
4384 access : str
4385 action : str
4386 model_tag : str
4387 user_tag : str
4388 '''
4389 self.access = access
4390 self.action = action
4391 self.model_tag = model_tag
4392 self.user_tag = user_tag
4393
4394
4395 class ModifyModelAccessRequest(Type):
4396 _toSchema = {'changes': 'changes'}
4397 _toPy = {'changes': 'changes'}
4398 def __init__(self, changes=None):
4399 '''
4400 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
4401 '''
4402 self.changes = [ModifyModelAccess.from_json(o) for o in changes or []]
4403
4404
4405 class RegionDefaults(Type):
4406 _toSchema = {'region_name': 'region-name', 'value': 'value'}
4407 _toPy = {'region-name': 'region_name', 'value': 'value'}
4408 def __init__(self, region_name=None, value=None):
4409 '''
4410 region_name : str
4411 value : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4412 '''
4413 self.region_name = region_name
4414 self.value = value
4415
4416
4417 class SetModelDefaults(Type):
4418 _toSchema = {'config': 'config'}
4419 _toPy = {'config': 'config'}
4420 def __init__(self, config=None):
4421 '''
4422 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
4423 '''
4424 self.config = [ModelDefaultValues.from_json(o) for o in config or []]
4425
4426
4427 class UnsetModelDefaults(Type):
4428 _toSchema = {'keys': 'keys'}
4429 _toPy = {'keys': 'keys'}
4430 def __init__(self, keys=None):
4431 '''
4432 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
4433 '''
4434 self.keys = [ModelUnsetKeys.from_json(o) for o in keys or []]
4435
4436
4437 class EnvListArgs(Type):
4438 _toSchema = {'patterns': 'patterns'}
4439 _toPy = {'patterns': 'patterns'}
4440 def __init__(self, patterns=None):
4441 '''
4442 patterns : typing.Sequence<+T_co>[str]
4443 '''
4444 self.patterns = patterns
4445
4446
4447 class EnvListResults(Type):
4448 _toSchema = {'results': 'results'}
4449 _toPy = {'results': 'results'}
4450 def __init__(self, results=None):
4451 '''
4452 results : typing.Sequence<+T_co>[~Payload]<~Payload>
4453 '''
4454 self.results = [Payload.from_json(o) for o in results or []]
4455
4456
4457 class Payload(Type):
4458 _toSchema = {'class_': 'class', 'id_': 'id', 'labels': 'labels', 'machine': 'machine', 'status': 'status', 'type_': 'type', 'unit': 'unit'}
4459 _toPy = {'class': 'class_', 'id': 'id_', 'labels': 'labels', 'machine': 'machine', 'status': 'status', 'type': 'type_', 'unit': 'unit'}
4460 def __init__(self, class_=None, id_=None, labels=None, machine=None, status=None, type_=None, unit=None):
4461 '''
4462 class_ : str
4463 id_ : str
4464 labels : typing.Sequence<+T_co>[str]
4465 machine : str
4466 status : str
4467 type_ : str
4468 unit : str
4469 '''
4470 self.class_ = class_
4471 self.id_ = id_
4472 self.labels = labels
4473 self.machine = machine
4474 self.status = status
4475 self.type_ = type_
4476 self.unit = unit
4477
4478
4479 class LookUpArg(Type):
4480 _toSchema = {'id_': 'id', 'name': 'name'}
4481 _toPy = {'id': 'id_', 'name': 'name'}
4482 def __init__(self, id_=None, name=None):
4483 '''
4484 id_ : str
4485 name : str
4486 '''
4487 self.id_ = id_
4488 self.name = name
4489
4490
4491 class LookUpArgs(Type):
4492 _toSchema = {'args': 'args'}
4493 _toPy = {'args': 'args'}
4494 def __init__(self, args=None):
4495 '''
4496 args : typing.Sequence<+T_co>[~LookUpArg]<~LookUpArg>
4497 '''
4498 self.args = [LookUpArg.from_json(o) for o in args or []]
4499
4500
4501 class PayloadResult(Type):
4502 _toSchema = {'entity': 'Entity', 'error': 'error', 'not_found': 'not-found', 'payload': 'payload'}
4503 _toPy = {'Entity': 'entity', 'error': 'error', 'not-found': 'not_found', 'payload': 'payload'}
4504 def __init__(self, entity=None, error=None, not_found=None, payload=None):
4505 '''
4506 entity : Entity
4507 error : Error
4508 not_found : bool
4509 payload : Payload
4510 '''
4511 self.entity = Entity.from_json(entity) if entity else None
4512 self.error = Error.from_json(error) if error else None
4513 self.not_found = not_found
4514 self.payload = Payload.from_json(payload) if payload else None
4515
4516
4517 class PayloadResults(Type):
4518 _toSchema = {'results': 'results'}
4519 _toPy = {'results': 'results'}
4520 def __init__(self, results=None):
4521 '''
4522 results : typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
4523 '''
4524 self.results = [PayloadResult.from_json(o) for o in results or []]
4525
4526
4527 class SetStatusArg(Type):
4528 _toSchema = {'entity': 'Entity', 'status': 'status'}
4529 _toPy = {'Entity': 'entity', 'status': 'status'}
4530 def __init__(self, entity=None, status=None):
4531 '''
4532 entity : Entity
4533 status : str
4534 '''
4535 self.entity = Entity.from_json(entity) if entity else None
4536 self.status = status
4537
4538
4539 class SetStatusArgs(Type):
4540 _toSchema = {'args': 'args'}
4541 _toPy = {'args': 'args'}
4542 def __init__(self, args=None):
4543 '''
4544 args : typing.Sequence<+T_co>[~SetStatusArg]<~SetStatusArg>
4545 '''
4546 self.args = [SetStatusArg.from_json(o) for o in args or []]
4547
4548
4549 class TrackArgs(Type):
4550 _toSchema = {'payloads': 'payloads'}
4551 _toPy = {'payloads': 'payloads'}
4552 def __init__(self, payloads=None):
4553 '''
4554 payloads : typing.Sequence<+T_co>[~Payload]<~Payload>
4555 '''
4556 self.payloads = [Payload.from_json(o) for o in payloads or []]
4557
4558
4559 class ConstraintsResult(Type):
4560 _toSchema = {'constraints': 'constraints', 'error': 'error'}
4561 _toPy = {'constraints': 'constraints', 'error': 'error'}
4562 def __init__(self, constraints=None, error=None):
4563 '''
4564 constraints : Value
4565 error : Error
4566 '''
4567 self.constraints = Value.from_json(constraints) if constraints else None
4568 self.error = Error.from_json(error) if error else None
4569
4570
4571 class ConstraintsResults(Type):
4572 _toSchema = {'results': 'results'}
4573 _toPy = {'results': 'results'}
4574 def __init__(self, results=None):
4575 '''
4576 results : typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
4577 '''
4578 self.results = [ConstraintsResult.from_json(o) for o in results or []]
4579
4580
4581 class ContainerConfig(Type):
4582 _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'}
4583 _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'}
4584 def __init__(self, updatebehavior=None, apt_mirror=None, apt_proxy=None, authorized_keys=None, provider_type=None, proxy=None, ssl_hostname_verification=None):
4585 '''
4586 updatebehavior : UpdateBehavior
4587 apt_mirror : str
4588 apt_proxy : Settings
4589 authorized_keys : str
4590 provider_type : str
4591 proxy : Settings
4592 ssl_hostname_verification : bool
4593 '''
4594 self.updatebehavior = UpdateBehavior.from_json(updatebehavior) if updatebehavior else None
4595 self.apt_mirror = apt_mirror
4596 self.apt_proxy = Settings.from_json(apt_proxy) if apt_proxy else None
4597 self.authorized_keys = authorized_keys
4598 self.provider_type = provider_type
4599 self.proxy = Settings.from_json(proxy) if proxy else None
4600 self.ssl_hostname_verification = ssl_hostname_verification
4601
4602
4603 class ContainerManagerConfig(Type):
4604 _toSchema = {'config': 'config'}
4605 _toPy = {'config': 'config'}
4606 def __init__(self, config=None):
4607 '''
4608 config : typing.Mapping<~KT, +VT_co>[str, str]
4609 '''
4610 self.config = config
4611
4612
4613 class ContainerManagerConfigParams(Type):
4614 _toSchema = {'type_': 'type'}
4615 _toPy = {'type': 'type_'}
4616 def __init__(self, type_=None):
4617 '''
4618 type_ : str
4619 '''
4620 self.type_ = type_
4621
4622
4623 class DeviceBridgeInfo(Type):
4624 _toSchema = {'bridge_name': 'bridge-name', 'host_device_name': 'host-device-name'}
4625 _toPy = {'bridge-name': 'bridge_name', 'host-device-name': 'host_device_name'}
4626 def __init__(self, bridge_name=None, host_device_name=None):
4627 '''
4628 bridge_name : str
4629 host_device_name : str
4630 '''
4631 self.bridge_name = bridge_name
4632 self.host_device_name = host_device_name
4633
4634
4635 class DistributionGroupResult(Type):
4636 _toSchema = {'error': 'error', 'result': 'result'}
4637 _toPy = {'error': 'error', 'result': 'result'}
4638 def __init__(self, error=None, result=None):
4639 '''
4640 error : Error
4641 result : typing.Sequence<+T_co>[str]
4642 '''
4643 self.error = Error.from_json(error) if error else None
4644 self.result = result
4645
4646
4647 class DistributionGroupResults(Type):
4648 _toSchema = {'results': 'results'}
4649 _toPy = {'results': 'results'}
4650 def __init__(self, results=None):
4651 '''
4652 results : typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
4653 '''
4654 self.results = [DistributionGroupResult.from_json(o) for o in results or []]
4655
4656
4657 class HostNetworkChange(Type):
4658 _toSchema = {'error': 'error', 'new_bridges': 'new-bridges', 'reconfigure_delay': 'reconfigure-delay'}
4659 _toPy = {'error': 'error', 'new-bridges': 'new_bridges', 'reconfigure-delay': 'reconfigure_delay'}
4660 def __init__(self, error=None, new_bridges=None, reconfigure_delay=None):
4661 '''
4662 error : Error
4663 new_bridges : typing.Sequence<+T_co>[~DeviceBridgeInfo]<~DeviceBridgeInfo>
4664 reconfigure_delay : int
4665 '''
4666 self.error = Error.from_json(error) if error else None
4667 self.new_bridges = [DeviceBridgeInfo.from_json(o) for o in new_bridges or []]
4668 self.reconfigure_delay = reconfigure_delay
4669
4670
4671 class HostNetworkChangeResults(Type):
4672 _toSchema = {'results': 'results'}
4673 _toPy = {'results': 'results'}
4674 def __init__(self, results=None):
4675 '''
4676 results : typing.Sequence<+T_co>[~HostNetworkChange]<~HostNetworkChange>
4677 '''
4678 self.results = [HostNetworkChange.from_json(o) for o in results or []]
4679
4680
4681 class InstanceInfo(Type):
4682 _toSchema = {'characteristics': 'characteristics', 'instance_id': 'instance-id', 'network_config': 'network-config', 'nonce': 'nonce', 'tag': 'tag', 'volume_attachments': 'volume-attachments', 'volumes': 'volumes'}
4683 _toPy = {'characteristics': 'characteristics', 'instance-id': 'instance_id', 'network-config': 'network_config', 'nonce': 'nonce', 'tag': 'tag', 'volume-attachments': 'volume_attachments', 'volumes': 'volumes'}
4684 def __init__(self, characteristics=None, instance_id=None, network_config=None, nonce=None, tag=None, volume_attachments=None, volumes=None):
4685 '''
4686 characteristics : HardwareCharacteristics
4687 instance_id : str
4688 network_config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
4689 nonce : str
4690 tag : str
4691 volume_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo>
4692 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
4693 '''
4694 self.characteristics = HardwareCharacteristics.from_json(characteristics) if characteristics else None
4695 self.instance_id = instance_id
4696 self.network_config = [NetworkConfig.from_json(o) for o in network_config or []]
4697 self.nonce = nonce
4698 self.tag = tag
4699 self.volume_attachments = volume_attachments
4700 self.volumes = [Volume.from_json(o) for o in volumes or []]
4701
4702
4703 class InstancesInfo(Type):
4704 _toSchema = {'machines': 'machines'}
4705 _toPy = {'machines': 'machines'}
4706 def __init__(self, machines=None):
4707 '''
4708 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
4709 '''
4710 self.machines = [InstanceInfo.from_json(o) for o in machines or []]
4711
4712
4713 class MachineContainers(Type):
4714 _toSchema = {'container_types': 'container-types', 'machine_tag': 'machine-tag'}
4715 _toPy = {'container-types': 'container_types', 'machine-tag': 'machine_tag'}
4716 def __init__(self, container_types=None, machine_tag=None):
4717 '''
4718 container_types : typing.Sequence<+T_co>[str]
4719 machine_tag : str
4720 '''
4721 self.container_types = container_types
4722 self.machine_tag = machine_tag
4723
4724
4725 class MachineContainersParams(Type):
4726 _toSchema = {'params': 'params'}
4727 _toPy = {'params': 'params'}
4728 def __init__(self, params=None):
4729 '''
4730 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
4731 '''
4732 self.params = [MachineContainers.from_json(o) for o in params or []]
4733
4734
4735 class MachineNetworkConfigResult(Type):
4736 _toSchema = {'error': 'error', 'info': 'info'}
4737 _toPy = {'error': 'error', 'info': 'info'}
4738 def __init__(self, error=None, info=None):
4739 '''
4740 error : Error
4741 info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
4742 '''
4743 self.error = Error.from_json(error) if error else None
4744 self.info = [NetworkConfig.from_json(o) for o in info or []]
4745
4746
4747 class MachineNetworkConfigResults(Type):
4748 _toSchema = {'results': 'results'}
4749 _toPy = {'results': 'results'}
4750 def __init__(self, results=None):
4751 '''
4752 results : typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
4753 '''
4754 self.results = [MachineNetworkConfigResult.from_json(o) for o in results or []]
4755
4756
4757 class ProvisioningInfo(Type):
4758 _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'}
4759 _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'}
4760 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):
4761 '''
4762 constraints : Value
4763 controller_config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4764 endpoint_bindings : typing.Mapping<~KT, +VT_co>[str, str]
4765 image_metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
4766 jobs : typing.Sequence<+T_co>[str]
4767 placement : str
4768 series : str
4769 subnets_to_zones : typing.Sequence<+T_co>[str]
4770 tags : typing.Mapping<~KT, +VT_co>[str, str]
4771 volumes : typing.Sequence<+T_co>[~VolumeParams]<~VolumeParams>
4772 '''
4773 self.constraints = Value.from_json(constraints) if constraints else None
4774 self.controller_config = controller_config
4775 self.endpoint_bindings = endpoint_bindings
4776 self.image_metadata = [CloudImageMetadata.from_json(o) for o in image_metadata or []]
4777 self.jobs = jobs
4778 self.placement = placement
4779 self.series = series
4780 self.subnets_to_zones = subnets_to_zones
4781 self.tags = tags
4782 self.volumes = [VolumeParams.from_json(o) for o in volumes or []]
4783
4784
4785 class ProvisioningInfoResult(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 : ProvisioningInfo
4792 '''
4793 self.error = Error.from_json(error) if error else None
4794 self.result = ProvisioningInfo.from_json(result) if result else None
4795
4796
4797 class ProvisioningInfoResults(Type):
4798 _toSchema = {'results': 'results'}
4799 _toPy = {'results': 'results'}
4800 def __init__(self, results=None):
4801 '''
4802 results : typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
4803 '''
4804 self.results = [ProvisioningInfoResult.from_json(o) for o in results or []]
4805
4806
4807 class Settings(Type):
4808 _toSchema = {'ftp': 'Ftp', 'http': 'Http', 'https': 'Https', 'noproxy': 'NoProxy'}
4809 _toPy = {'Ftp': 'ftp', 'Http': 'http', 'Https': 'https', 'NoProxy': 'noproxy'}
4810 def __init__(self, ftp=None, http=None, https=None, noproxy=None):
4811 '''
4812 ftp : str
4813 http : str
4814 https : str
4815 noproxy : str
4816 '''
4817 self.ftp = ftp
4818 self.http = http
4819 self.https = https
4820 self.noproxy = noproxy
4821
4822
4823 class ToolsResult(Type):
4824 _toSchema = {'disable_ssl_hostname_verification': 'disable-ssl-hostname-verification', 'error': 'error', 'tools': 'tools'}
4825 _toPy = {'disable-ssl-hostname-verification': 'disable_ssl_hostname_verification', 'error': 'error', 'tools': 'tools'}
4826 def __init__(self, disable_ssl_hostname_verification=None, error=None, tools=None):
4827 '''
4828 disable_ssl_hostname_verification : bool
4829 error : Error
4830 tools : typing.Sequence<+T_co>[~Tools]<~Tools>
4831 '''
4832 self.disable_ssl_hostname_verification = disable_ssl_hostname_verification
4833 self.error = Error.from_json(error) if error else None
4834 self.tools = [Tools.from_json(o) for o in tools or []]
4835
4836
4837 class ToolsResults(Type):
4838 _toSchema = {'results': 'results'}
4839 _toPy = {'results': 'results'}
4840 def __init__(self, results=None):
4841 '''
4842 results : typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
4843 '''
4844 self.results = [ToolsResult.from_json(o) for o in results or []]
4845
4846
4847 class UpdateBehavior(Type):
4848 _toSchema = {'enable_os_refresh_update': 'enable-os-refresh-update', 'enable_os_upgrade': 'enable-os-upgrade'}
4849 _toPy = {'enable-os-refresh-update': 'enable_os_refresh_update', 'enable-os-upgrade': 'enable_os_upgrade'}
4850 def __init__(self, enable_os_refresh_update=None, enable_os_upgrade=None):
4851 '''
4852 enable_os_refresh_update : bool
4853 enable_os_upgrade : bool
4854 '''
4855 self.enable_os_refresh_update = enable_os_refresh_update
4856 self.enable_os_upgrade = enable_os_upgrade
4857
4858
4859 class Volume(Type):
4860 _toSchema = {'info': 'info', 'volume_tag': 'volume-tag'}
4861 _toPy = {'info': 'info', 'volume-tag': 'volume_tag'}
4862 def __init__(self, info=None, volume_tag=None):
4863 '''
4864 info : VolumeInfo
4865 volume_tag : str
4866 '''
4867 self.info = VolumeInfo.from_json(info) if info else None
4868 self.volume_tag = volume_tag
4869
4870
4871 class VolumeAttachmentInfo(Type):
4872 _toSchema = {'bus_address': 'bus-address', 'device_link': 'device-link', 'device_name': 'device-name', 'read_only': 'read-only'}
4873 _toPy = {'bus-address': 'bus_address', 'device-link': 'device_link', 'device-name': 'device_name', 'read-only': 'read_only'}
4874 def __init__(self, bus_address=None, device_link=None, device_name=None, read_only=None):
4875 '''
4876 bus_address : str
4877 device_link : str
4878 device_name : str
4879 read_only : bool
4880 '''
4881 self.bus_address = bus_address
4882 self.device_link = device_link
4883 self.device_name = device_name
4884 self.read_only = read_only
4885
4886
4887 class VolumeAttachmentParams(Type):
4888 _toSchema = {'instance_id': 'instance-id', 'machine_tag': 'machine-tag', 'provider': 'provider', 'read_only': 'read-only', 'volume_id': 'volume-id', 'volume_tag': 'volume-tag'}
4889 _toPy = {'instance-id': 'instance_id', 'machine-tag': 'machine_tag', 'provider': 'provider', 'read-only': 'read_only', 'volume-id': 'volume_id', 'volume-tag': 'volume_tag'}
4890 def __init__(self, instance_id=None, machine_tag=None, provider=None, read_only=None, volume_id=None, volume_tag=None):
4891 '''
4892 instance_id : str
4893 machine_tag : str
4894 provider : str
4895 read_only : bool
4896 volume_id : str
4897 volume_tag : str
4898 '''
4899 self.instance_id = instance_id
4900 self.machine_tag = machine_tag
4901 self.provider = provider
4902 self.read_only = read_only
4903 self.volume_id = volume_id
4904 self.volume_tag = volume_tag
4905
4906
4907 class VolumeInfo(Type):
4908 _toSchema = {'hardware_id': 'hardware-id', 'persistent': 'persistent', 'size': 'size', 'volume_id': 'volume-id'}
4909 _toPy = {'hardware-id': 'hardware_id', 'persistent': 'persistent', 'size': 'size', 'volume-id': 'volume_id'}
4910 def __init__(self, hardware_id=None, persistent=None, size=None, volume_id=None):
4911 '''
4912 hardware_id : str
4913 persistent : bool
4914 size : int
4915 volume_id : str
4916 '''
4917 self.hardware_id = hardware_id
4918 self.persistent = persistent
4919 self.size = size
4920 self.volume_id = volume_id
4921
4922
4923 class VolumeParams(Type):
4924 _toSchema = {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume_tag': 'volume-tag'}
4925 _toPy = {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume-tag': 'volume_tag'}
4926 def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volume_tag=None):
4927 '''
4928 attachment : VolumeAttachmentParams
4929 attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4930 provider : str
4931 size : int
4932 tags : typing.Mapping<~KT, +VT_co>[str, str]
4933 volume_tag : str
4934 '''
4935 self.attachment = VolumeAttachmentParams.from_json(attachment) if attachment else None
4936 self.attributes = attributes
4937 self.provider = provider
4938 self.size = size
4939 self.tags = tags
4940 self.volume_tag = volume_tag
4941
4942
4943 class WatchContainer(Type):
4944 _toSchema = {'container_type': 'container-type', 'machine_tag': 'machine-tag'}
4945 _toPy = {'container-type': 'container_type', 'machine-tag': 'machine_tag'}
4946 def __init__(self, container_type=None, machine_tag=None):
4947 '''
4948 container_type : str
4949 machine_tag : str
4950 '''
4951 self.container_type = container_type
4952 self.machine_tag = machine_tag
4953
4954
4955 class WatchContainers(Type):
4956 _toSchema = {'params': 'params'}
4957 _toPy = {'params': 'params'}
4958 def __init__(self, params=None):
4959 '''
4960 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
4961 '''
4962 self.params = [WatchContainer.from_json(o) for o in params or []]
4963
4964
4965 class ProxyConfig(Type):
4966 _toSchema = {'ftp': 'ftp', 'http': 'http', 'https': 'https', 'no_proxy': 'no-proxy'}
4967 _toPy = {'ftp': 'ftp', 'http': 'http', 'https': 'https', 'no-proxy': 'no_proxy'}
4968 def __init__(self, ftp=None, http=None, https=None, no_proxy=None):
4969 '''
4970 ftp : str
4971 http : str
4972 https : str
4973 no_proxy : str
4974 '''
4975 self.ftp = ftp
4976 self.http = http
4977 self.https = https
4978 self.no_proxy = no_proxy
4979
4980
4981 class ProxyConfigResult(Type):
4982 _toSchema = {'apt_proxy_settings': 'apt-proxy-settings', 'error': 'error', 'proxy_settings': 'proxy-settings'}
4983 _toPy = {'apt-proxy-settings': 'apt_proxy_settings', 'error': 'error', 'proxy-settings': 'proxy_settings'}
4984 def __init__(self, apt_proxy_settings=None, error=None, proxy_settings=None):
4985 '''
4986 apt_proxy_settings : ProxyConfig
4987 error : Error
4988 proxy_settings : ProxyConfig
4989 '''
4990 self.apt_proxy_settings = ProxyConfig.from_json(apt_proxy_settings) if apt_proxy_settings else None
4991 self.error = Error.from_json(error) if error else None
4992 self.proxy_settings = ProxyConfig.from_json(proxy_settings) if proxy_settings else None
4993
4994
4995 class ProxyConfigResults(Type):
4996 _toSchema = {'results': 'results'}
4997 _toPy = {'results': 'results'}
4998 def __init__(self, results=None):
4999 '''
5000 results : typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
5001 '''
5002 self.results = [ProxyConfigResult.from_json(o) for o in results or []]
5003
5004
5005 class RebootActionResult(Type):
5006 _toSchema = {'error': 'error', 'result': 'result'}
5007 _toPy = {'error': 'error', 'result': 'result'}
5008 def __init__(self, error=None, result=None):
5009 '''
5010 error : Error
5011 result : str
5012 '''
5013 self.error = Error.from_json(error) if error else None
5014 self.result = result
5015
5016
5017 class RebootActionResults(Type):
5018 _toSchema = {'results': 'results'}
5019 _toPy = {'results': 'results'}
5020 def __init__(self, results=None):
5021 '''
5022 results : typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
5023 '''
5024 self.results = [RebootActionResult.from_json(o) for o in results or []]
5025
5026
5027 class RelationUnitsChange(Type):
5028 _toSchema = {'changed': 'changed', 'departed': 'departed'}
5029 _toPy = {'changed': 'changed', 'departed': 'departed'}
5030 def __init__(self, changed=None, departed=None):
5031 '''
5032 changed : typing.Mapping<~KT, +VT_co>[str, ~UnitSettings]<~UnitSettings>
5033 departed : typing.Sequence<+T_co>[str]
5034 '''
5035 self.changed = changed
5036 self.departed = departed
5037
5038
5039 class RelationUnitsWatchResult(Type):
5040 _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
5041 _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
5042 def __init__(self, changes=None, error=None, watcher_id=None):
5043 '''
5044 changes : RelationUnitsChange
5045 error : Error
5046 watcher_id : str
5047 '''
5048 self.changes = RelationUnitsChange.from_json(changes) if changes else None
5049 self.error = Error.from_json(error) if error else None
5050 self.watcher_id = watcher_id
5051
5052
5053 class UnitSettings(Type):
5054 _toSchema = {'version': 'version'}
5055 _toPy = {'version': 'version'}
5056 def __init__(self, version=None):
5057 '''
5058 version : int
5059 '''
5060 self.version = version
5061
5062
5063 class RemoteApplicationChange(Type):
5064 _toSchema = {'application_tag': 'application-tag', 'life': 'life', 'relations': 'relations'}
5065 _toPy = {'application-tag': 'application_tag', 'life': 'life', 'relations': 'relations'}
5066 def __init__(self, application_tag=None, life=None, relations=None):
5067 '''
5068 application_tag : str
5069 life : str
5070 relations : RemoteRelationsChange
5071 '''
5072 self.application_tag = application_tag
5073 self.life = life
5074 self.relations = RemoteRelationsChange.from_json(relations) if relations else None
5075
5076
5077 class RemoteApplicationWatchResult(Type):
5078 _toSchema = {'change': 'change', 'error': 'error', 'id_': 'id'}
5079 _toPy = {'change': 'change', 'error': 'error', 'id': 'id_'}
5080 def __init__(self, change=None, error=None, id_=None):
5081 '''
5082 change : RemoteApplicationChange
5083 error : Error
5084 id_ : str
5085 '''
5086 self.change = RemoteApplicationChange.from_json(change) if change else None
5087 self.error = Error.from_json(error) if error else None
5088 self.id_ = id_
5089
5090
5091 class RemoteEntityId(Type):
5092 _toSchema = {'model_uuid': 'model-uuid', 'token': 'token'}
5093 _toPy = {'model-uuid': 'model_uuid', 'token': 'token'}
5094 def __init__(self, model_uuid=None, token=None):
5095 '''
5096 model_uuid : str
5097 token : str
5098 '''
5099 self.model_uuid = model_uuid
5100 self.token = token
5101
5102
5103 class RemoteRelationChange(Type):
5104 _toSchema = {'changed_units': 'changed-units', 'departed_units': 'departed-units', 'id_': 'id', 'life': 'life'}
5105 _toPy = {'changed-units': 'changed_units', 'departed-units': 'departed_units', 'id': 'id_', 'life': 'life'}
5106 def __init__(self, changed_units=None, departed_units=None, id_=None, life=None):
5107 '''
5108 changed_units : typing.Mapping<~KT, +VT_co>[str, ~RemoteRelationUnitChange]<~RemoteRelationUnitChange>
5109 departed_units : typing.Sequence<+T_co>[str]
5110 id_ : int
5111 life : str
5112 '''
5113 self.changed_units = changed_units
5114 self.departed_units = departed_units
5115 self.id_ = id_
5116 self.life = life
5117
5118
5119 class RemoteRelationUnitChange(Type):
5120 _toSchema = {'settings': 'settings', 'unit_id': 'unit-id'}
5121 _toPy = {'settings': 'settings', 'unit-id': 'unit_id'}
5122 def __init__(self, settings=None, unit_id=None):
5123 '''
5124 settings : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5125 unit_id : RemoteEntityId
5126 '''
5127 self.settings = settings
5128 self.unit_id = RemoteEntityId.from_json(unit_id) if unit_id else None
5129
5130
5131 class RemoteRelationsChange(Type):
5132 _toSchema = {'changed': 'changed', 'initial': 'initial', 'removed': 'removed'}
5133 _toPy = {'changed': 'changed', 'initial': 'initial', 'removed': 'removed'}
5134 def __init__(self, changed=None, initial=None, removed=None):
5135 '''
5136 changed : typing.Sequence<+T_co>[~RemoteRelationChange]<~RemoteRelationChange>
5137 initial : bool
5138 removed : typing.Sequence<+T_co>[int]
5139 '''
5140 self.changed = [RemoteRelationChange.from_json(o) for o in changed or []]
5141 self.initial = initial
5142 self.removed = removed
5143
5144
5145 class RemoteRelationsWatchResult(Type):
5146 _toSchema = {'change': 'change', 'error': 'error', 'remoterelationswatcherid': 'RemoteRelationsWatcherId'}
5147 _toPy = {'RemoteRelationsWatcherId': 'remoterelationswatcherid', 'change': 'change', 'error': 'error'}
5148 def __init__(self, remoterelationswatcherid=None, change=None, error=None):
5149 '''
5150 remoterelationswatcherid : str
5151 change : RemoteRelationsChange
5152 error : Error
5153 '''
5154 self.remoterelationswatcherid = remoterelationswatcherid
5155 self.change = RemoteRelationsChange.from_json(change) if change else None
5156 self.error = Error.from_json(error) if error else None
5157
5158
5159 class AddPendingResourcesArgs(Type):
5160 _toSchema = {'addcharmwithauthorization': 'AddCharmWithAuthorization', 'entity': 'Entity', 'resources': 'Resources'}
5161 _toPy = {'AddCharmWithAuthorization': 'addcharmwithauthorization', 'Entity': 'entity', 'Resources': 'resources'}
5162 def __init__(self, addcharmwithauthorization=None, entity=None, resources=None):
5163 '''
5164 addcharmwithauthorization : AddCharmWithAuthorization
5165 entity : Entity
5166 resources : typing.Sequence<+T_co>[~CharmResource]<~CharmResource>
5167 '''
5168 self.addcharmwithauthorization = AddCharmWithAuthorization.from_json(addcharmwithauthorization) if addcharmwithauthorization else None
5169 self.entity = Entity.from_json(entity) if entity else None
5170 self.resources = [CharmResource.from_json(o) for o in resources or []]
5171
5172
5173 class AddPendingResourcesResult(Type):
5174 _toSchema = {'errorresult': 'ErrorResult', 'pending_ids': 'pending-ids'}
5175 _toPy = {'ErrorResult': 'errorresult', 'pending-ids': 'pending_ids'}
5176 def __init__(self, errorresult=None, pending_ids=None):
5177 '''
5178 errorresult : ErrorResult
5179 pending_ids : typing.Sequence<+T_co>[str]
5180 '''
5181 self.errorresult = ErrorResult.from_json(errorresult) if errorresult else None
5182 self.pending_ids = pending_ids
5183
5184
5185 class CharmResource(Type):
5186 _toSchema = {'description': 'description', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type_': 'type'}
5187 _toPy = {'description': 'description', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type': 'type_'}
5188 def __init__(self, description=None, fingerprint=None, name=None, origin=None, path=None, revision=None, size=None, type_=None):
5189 '''
5190 description : str
5191 fingerprint : typing.Sequence<+T_co>[int]
5192 name : str
5193 origin : str
5194 path : str
5195 revision : int
5196 size : int
5197 type_ : str
5198 '''
5199 self.description = description
5200 self.fingerprint = fingerprint
5201 self.name = name
5202 self.origin = origin
5203 self.path = path
5204 self.revision = revision
5205 self.size = size
5206 self.type_ = type_
5207
5208
5209 class ListResourcesArgs(Type):
5210 _toSchema = {'entities': 'entities'}
5211 _toPy = {'entities': 'entities'}
5212 def __init__(self, entities=None):
5213 '''
5214 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
5215 '''
5216 self.entities = [Entity.from_json(o) for o in entities or []]
5217
5218
5219 class Resource(Type):
5220 _toSchema = {'application': 'application', 'charmresource': 'CharmResource', 'id_': 'id', 'pending_id': 'pending-id', 'timestamp': 'timestamp', 'username': 'username'}
5221 _toPy = {'CharmResource': 'charmresource', 'application': 'application', 'id': 'id_', 'pending-id': 'pending_id', 'timestamp': 'timestamp', 'username': 'username'}
5222 def __init__(self, charmresource=None, application=None, id_=None, pending_id=None, timestamp=None, username=None):
5223 '''
5224 charmresource : CharmResource
5225 application : str
5226 id_ : str
5227 pending_id : str
5228 timestamp : str
5229 username : str
5230 '''
5231 self.charmresource = CharmResource.from_json(charmresource) if charmresource else None
5232 self.application = application
5233 self.id_ = id_
5234 self.pending_id = pending_id
5235 self.timestamp = timestamp
5236 self.username = username
5237
5238
5239 class ResourcesResult(Type):
5240 _toSchema = {'charm_store_resources': 'charm-store-resources', 'errorresult': 'ErrorResult', 'resources': 'resources', 'unit_resources': 'unit-resources'}
5241 _toPy = {'ErrorResult': 'errorresult', 'charm-store-resources': 'charm_store_resources', 'resources': 'resources', 'unit-resources': 'unit_resources'}
5242 def __init__(self, errorresult=None, charm_store_resources=None, resources=None, unit_resources=None):
5243 '''
5244 errorresult : ErrorResult
5245 charm_store_resources : typing.Sequence<+T_co>[~CharmResource]<~CharmResource>
5246 resources : typing.Sequence<+T_co>[~Resource]<~Resource>
5247 unit_resources : typing.Sequence<+T_co>[~UnitResources]<~UnitResources>
5248 '''
5249 self.errorresult = ErrorResult.from_json(errorresult) if errorresult else None
5250 self.charm_store_resources = [CharmResource.from_json(o) for o in charm_store_resources or []]
5251 self.resources = [Resource.from_json(o) for o in resources or []]
5252 self.unit_resources = [UnitResources.from_json(o) for o in unit_resources or []]
5253
5254
5255 class ResourcesResults(Type):
5256 _toSchema = {'results': 'results'}
5257 _toPy = {'results': 'results'}
5258 def __init__(self, results=None):
5259 '''
5260 results : typing.Sequence<+T_co>[~ResourcesResult]<~ResourcesResult>
5261 '''
5262 self.results = [ResourcesResult.from_json(o) for o in results or []]
5263
5264
5265 class UnitResources(Type):
5266 _toSchema = {'download_progress': 'download-progress', 'entity': 'Entity', 'resources': 'resources'}
5267 _toPy = {'Entity': 'entity', 'download-progress': 'download_progress', 'resources': 'resources'}
5268 def __init__(self, entity=None, download_progress=None, resources=None):
5269 '''
5270 entity : Entity
5271 download_progress : typing.Mapping<~KT, +VT_co>[str, int]
5272 resources : typing.Sequence<+T_co>[~Resource]<~Resource>
5273 '''
5274 self.entity = Entity.from_json(entity) if entity else None
5275 self.download_progress = download_progress
5276 self.resources = [Resource.from_json(o) for o in resources or []]
5277
5278
5279 class ResourceResult(Type):
5280 _toSchema = {'errorresult': 'ErrorResult', 'resource': 'resource'}
5281 _toPy = {'ErrorResult': 'errorresult', 'resource': 'resource'}
5282 def __init__(self, errorresult=None, resource=None):
5283 '''
5284 errorresult : ErrorResult
5285 resource : Resource
5286 '''
5287 self.errorresult = ErrorResult.from_json(errorresult) if errorresult else None
5288 self.resource = Resource.from_json(resource) if resource else None
5289
5290
5291 class RetryStrategy(Type):
5292 _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'}
5293 _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'}
5294 def __init__(self, jitter_retry_time=None, max_retry_time=None, min_retry_time=None, retry_time_factor=None, should_retry=None):
5295 '''
5296 jitter_retry_time : bool
5297 max_retry_time : int
5298 min_retry_time : int
5299 retry_time_factor : int
5300 should_retry : bool
5301 '''
5302 self.jitter_retry_time = jitter_retry_time
5303 self.max_retry_time = max_retry_time
5304 self.min_retry_time = min_retry_time
5305 self.retry_time_factor = retry_time_factor
5306 self.should_retry = should_retry
5307
5308
5309 class RetryStrategyResult(Type):
5310 _toSchema = {'error': 'error', 'result': 'result'}
5311 _toPy = {'error': 'error', 'result': 'result'}
5312 def __init__(self, error=None, result=None):
5313 '''
5314 error : Error
5315 result : RetryStrategy
5316 '''
5317 self.error = Error.from_json(error) if error else None
5318 self.result = RetryStrategy.from_json(result) if result else None
5319
5320
5321 class RetryStrategyResults(Type):
5322 _toSchema = {'results': 'results'}
5323 _toPy = {'results': 'results'}
5324 def __init__(self, results=None):
5325 '''
5326 results : typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
5327 '''
5328 self.results = [RetryStrategyResult.from_json(o) for o in results or []]
5329
5330
5331 class SSHAddressResult(Type):
5332 _toSchema = {'address': 'address', 'error': 'error'}
5333 _toPy = {'address': 'address', 'error': 'error'}
5334 def __init__(self, address=None, error=None):
5335 '''
5336 address : str
5337 error : Error
5338 '''
5339 self.address = address
5340 self.error = Error.from_json(error) if error else None
5341
5342
5343 class SSHAddressResults(Type):
5344 _toSchema = {'results': 'results'}
5345 _toPy = {'results': 'results'}
5346 def __init__(self, results=None):
5347 '''
5348 results : typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
5349 '''
5350 self.results = [SSHAddressResult.from_json(o) for o in results or []]
5351
5352
5353 class SSHAddressesResult(Type):
5354 _toSchema = {'addresses': 'addresses', 'error': 'error'}
5355 _toPy = {'addresses': 'addresses', 'error': 'error'}
5356 def __init__(self, addresses=None, error=None):
5357 '''
5358 addresses : typing.Sequence<+T_co>[str]
5359 error : Error
5360 '''
5361 self.addresses = addresses
5362 self.error = Error.from_json(error) if error else None
5363
5364
5365 class SSHAddressesResults(Type):
5366 _toSchema = {'results': 'results'}
5367 _toPy = {'results': 'results'}
5368 def __init__(self, results=None):
5369 '''
5370 results : typing.Sequence<+T_co>[~SSHAddressesResult]<~SSHAddressesResult>
5371 '''
5372 self.results = [SSHAddressesResult.from_json(o) for o in results or []]
5373
5374
5375 class SSHProxyResult(Type):
5376 _toSchema = {'use_proxy': 'use-proxy'}
5377 _toPy = {'use-proxy': 'use_proxy'}
5378 def __init__(self, use_proxy=None):
5379 '''
5380 use_proxy : bool
5381 '''
5382 self.use_proxy = use_proxy
5383
5384
5385 class SSHPublicKeysResult(Type):
5386 _toSchema = {'error': 'error', 'public_keys': 'public-keys'}
5387 _toPy = {'error': 'error', 'public-keys': 'public_keys'}
5388 def __init__(self, error=None, public_keys=None):
5389 '''
5390 error : Error
5391 public_keys : typing.Sequence<+T_co>[str]
5392 '''
5393 self.error = Error.from_json(error) if error else None
5394 self.public_keys = public_keys
5395
5396
5397 class SSHPublicKeysResults(Type):
5398 _toSchema = {'results': 'results'}
5399 _toPy = {'results': 'results'}
5400 def __init__(self, results=None):
5401 '''
5402 results : typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
5403 '''
5404 self.results = [SSHPublicKeysResult.from_json(o) for o in results or []]
5405
5406
5407 class SingularClaim(Type):
5408 _toSchema = {'controller_tag': 'controller-tag', 'duration': 'duration', 'model_tag': 'model-tag'}
5409 _toPy = {'controller-tag': 'controller_tag', 'duration': 'duration', 'model-tag': 'model_tag'}
5410 def __init__(self, controller_tag=None, duration=None, model_tag=None):
5411 '''
5412 controller_tag : str
5413 duration : int
5414 model_tag : str
5415 '''
5416 self.controller_tag = controller_tag
5417 self.duration = duration
5418 self.model_tag = model_tag
5419
5420
5421 class SingularClaims(Type):
5422 _toSchema = {'claims': 'claims'}
5423 _toPy = {'claims': 'claims'}
5424 def __init__(self, claims=None):
5425 '''
5426 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
5427 '''
5428 self.claims = [SingularClaim.from_json(o) for o in claims or []]
5429
5430
5431 class ListSpacesResults(Type):
5432 _toSchema = {'results': 'results'}
5433 _toPy = {'results': 'results'}
5434 def __init__(self, results=None):
5435 '''
5436 results : typing.Sequence<+T_co>[~Space]<~Space>
5437 '''
5438 self.results = [Space.from_json(o) for o in results or []]
5439
5440
5441 class Space(Type):
5442 _toSchema = {'error': 'error', 'name': 'name', 'subnets': 'subnets'}
5443 _toPy = {'error': 'error', 'name': 'name', 'subnets': 'subnets'}
5444 def __init__(self, error=None, name=None, subnets=None):
5445 '''
5446 error : Error
5447 name : str
5448 subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet>
5449 '''
5450 self.error = Error.from_json(error) if error else None
5451 self.name = name
5452 self.subnets = [Subnet.from_json(o) for o in subnets or []]
5453
5454
5455 class StatusHistoryPruneArgs(Type):
5456 _toSchema = {'max_history_mb': 'max-history-mb', 'max_history_time': 'max-history-time'}
5457 _toPy = {'max-history-mb': 'max_history_mb', 'max-history-time': 'max_history_time'}
5458 def __init__(self, max_history_mb=None, max_history_time=None):
5459 '''
5460 max_history_mb : int
5461 max_history_time : int
5462 '''
5463 self.max_history_mb = max_history_mb
5464 self.max_history_time = max_history_time
5465
5466
5467 class FilesystemAttachmentInfo(Type):
5468 _toSchema = {'mount_point': 'mount-point', 'read_only': 'read-only'}
5469 _toPy = {'mount-point': 'mount_point', 'read-only': 'read_only'}
5470 def __init__(self, mount_point=None, read_only=None):
5471 '''
5472 mount_point : str
5473 read_only : bool
5474 '''
5475 self.mount_point = mount_point
5476 self.read_only = read_only
5477
5478
5479 class FilesystemDetails(Type):
5480 _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'machine_attachments': 'machine-attachments', 'status': 'status', 'storage': 'storage', 'volume_tag': 'volume-tag'}
5481 _toPy = {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'machine-attachments': 'machine_attachments', 'status': 'status', 'storage': 'storage', 'volume-tag': 'volume_tag'}
5482 def __init__(self, filesystem_tag=None, info=None, machine_attachments=None, status=None, storage=None, volume_tag=None):
5483 '''
5484 filesystem_tag : str
5485 info : FilesystemInfo
5486 machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~FilesystemAttachmentInfo]<~FilesystemAttachmentInfo>
5487 status : EntityStatus
5488 storage : StorageDetails
5489 volume_tag : str
5490 '''
5491 self.filesystem_tag = filesystem_tag
5492 self.info = FilesystemInfo.from_json(info) if info else None
5493 self.machine_attachments = machine_attachments
5494 self.status = EntityStatus.from_json(status) if status else None
5495 self.storage = StorageDetails.from_json(storage) if storage else None
5496 self.volume_tag = volume_tag
5497
5498
5499 class FilesystemDetailsListResult(Type):
5500 _toSchema = {'error': 'error', 'result': 'result'}
5501 _toPy = {'error': 'error', 'result': 'result'}
5502 def __init__(self, error=None, result=None):
5503 '''
5504 error : Error
5505 result : typing.Sequence<+T_co>[~FilesystemDetails]<~FilesystemDetails>
5506 '''
5507 self.error = Error.from_json(error) if error else None
5508 self.result = [FilesystemDetails.from_json(o) for o in result or []]
5509
5510
5511 class FilesystemDetailsListResults(Type):
5512 _toSchema = {'results': 'results'}
5513 _toPy = {'results': 'results'}
5514 def __init__(self, results=None):
5515 '''
5516 results : typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
5517 '''
5518 self.results = [FilesystemDetailsListResult.from_json(o) for o in results or []]
5519
5520
5521 class FilesystemFilter(Type):
5522 _toSchema = {'machines': 'machines'}
5523 _toPy = {'machines': 'machines'}
5524 def __init__(self, machines=None):
5525 '''
5526 machines : typing.Sequence<+T_co>[str]
5527 '''
5528 self.machines = machines
5529
5530
5531 class FilesystemFilters(Type):
5532 _toSchema = {'filters': 'filters'}
5533 _toPy = {'filters': 'filters'}
5534 def __init__(self, filters=None):
5535 '''
5536 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
5537 '''
5538 self.filters = [FilesystemFilter.from_json(o) for o in filters or []]
5539
5540
5541 class FilesystemInfo(Type):
5542 _toSchema = {'filesystem_id': 'filesystem-id', 'size': 'size'}
5543 _toPy = {'filesystem-id': 'filesystem_id', 'size': 'size'}
5544 def __init__(self, filesystem_id=None, size=None):
5545 '''
5546 filesystem_id : str
5547 size : int
5548 '''
5549 self.filesystem_id = filesystem_id
5550 self.size = size
5551
5552
5553 class StorageAddParams(Type):
5554 _toSchema = {'name': 'name', 'storage': 'storage', 'unit': 'unit'}
5555 _toPy = {'name': 'name', 'storage': 'storage', 'unit': 'unit'}
5556 def __init__(self, name=None, storage=None, unit=None):
5557 '''
5558 name : str
5559 storage : StorageConstraints
5560 unit : str
5561 '''
5562 self.name = name
5563 self.storage = StorageConstraints.from_json(storage) if storage else None
5564 self.unit = unit
5565
5566
5567 class StorageAttachmentDetails(Type):
5568 _toSchema = {'location': 'location', 'machine_tag': 'machine-tag', 'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
5569 _toPy = {'location': 'location', 'machine-tag': 'machine_tag', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'}
5570 def __init__(self, location=None, machine_tag=None, storage_tag=None, unit_tag=None):
5571 '''
5572 location : str
5573 machine_tag : str
5574 storage_tag : str
5575 unit_tag : str
5576 '''
5577 self.location = location
5578 self.machine_tag = machine_tag
5579 self.storage_tag = storage_tag
5580 self.unit_tag = unit_tag
5581
5582
5583 class StorageDetails(Type):
5584 _toSchema = {'attachments': 'attachments', 'kind': 'kind', 'owner_tag': 'owner-tag', 'persistent': 'persistent', 'status': 'status', 'storage_tag': 'storage-tag'}
5585 _toPy = {'attachments': 'attachments', 'kind': 'kind', 'owner-tag': 'owner_tag', 'persistent': 'persistent', 'status': 'status', 'storage-tag': 'storage_tag'}
5586 def __init__(self, attachments=None, kind=None, owner_tag=None, persistent=None, status=None, storage_tag=None):
5587 '''
5588 attachments : typing.Mapping<~KT, +VT_co>[str, ~StorageAttachmentDetails]<~StorageAttachmentDetails>
5589 kind : int
5590 owner_tag : str
5591 persistent : bool
5592 status : EntityStatus
5593 storage_tag : str
5594 '''
5595 self.attachments = attachments
5596 self.kind = kind
5597 self.owner_tag = owner_tag
5598 self.persistent = persistent
5599 self.status = EntityStatus.from_json(status) if status else None
5600 self.storage_tag = storage_tag
5601
5602
5603 class StorageDetailsListResult(Type):
5604 _toSchema = {'error': 'error', 'result': 'result'}
5605 _toPy = {'error': 'error', 'result': 'result'}
5606 def __init__(self, error=None, result=None):
5607 '''
5608 error : Error
5609 result : typing.Sequence<+T_co>[~StorageDetails]<~StorageDetails>
5610 '''
5611 self.error = Error.from_json(error) if error else None
5612 self.result = [StorageDetails.from_json(o) for o in result or []]
5613
5614
5615 class StorageDetailsListResults(Type):
5616 _toSchema = {'results': 'results'}
5617 _toPy = {'results': 'results'}
5618 def __init__(self, results=None):
5619 '''
5620 results : typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
5621 '''
5622 self.results = [StorageDetailsListResult.from_json(o) for o in results or []]
5623
5624
5625 class StorageDetailsResult(Type):
5626 _toSchema = {'error': 'error', 'result': 'result'}
5627 _toPy = {'error': 'error', 'result': 'result'}
5628 def __init__(self, error=None, result=None):
5629 '''
5630 error : Error
5631 result : StorageDetails
5632 '''
5633 self.error = Error.from_json(error) if error else None
5634 self.result = StorageDetails.from_json(result) if result else None
5635
5636
5637 class StorageDetailsResults(Type):
5638 _toSchema = {'results': 'results'}
5639 _toPy = {'results': 'results'}
5640 def __init__(self, results=None):
5641 '''
5642 results : typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
5643 '''
5644 self.results = [StorageDetailsResult.from_json(o) for o in results or []]
5645
5646
5647 class StorageFilter(Type):
5648 _toSchema = {}
5649 _toPy = {}
5650 def __init__(self):
5651 '''
5652
5653 '''
5654 pass
5655
5656
5657 class StorageFilters(Type):
5658 _toSchema = {'filters': 'filters'}
5659 _toPy = {'filters': 'filters'}
5660 def __init__(self, filters=None):
5661 '''
5662 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
5663 '''
5664 self.filters = [StorageFilter.from_json(o) for o in filters or []]
5665
5666
5667 class StoragePool(Type):
5668 _toSchema = {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'}
5669 _toPy = {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'}
5670 def __init__(self, attrs=None, name=None, provider=None):
5671 '''
5672 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5673 name : str
5674 provider : str
5675 '''
5676 self.attrs = attrs
5677 self.name = name
5678 self.provider = provider
5679
5680
5681 class StoragePoolFilter(Type):
5682 _toSchema = {'names': 'names', 'providers': 'providers'}
5683 _toPy = {'names': 'names', 'providers': 'providers'}
5684 def __init__(self, names=None, providers=None):
5685 '''
5686 names : typing.Sequence<+T_co>[str]
5687 providers : typing.Sequence<+T_co>[str]
5688 '''
5689 self.names = names
5690 self.providers = providers
5691
5692
5693 class StoragePoolFilters(Type):
5694 _toSchema = {'filters': 'filters'}
5695 _toPy = {'filters': 'filters'}
5696 def __init__(self, filters=None):
5697 '''
5698 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
5699 '''
5700 self.filters = [StoragePoolFilter.from_json(o) for o in filters or []]
5701
5702
5703 class StoragePoolsResult(Type):
5704 _toSchema = {'error': 'error', 'storage_pools': 'storage-pools'}
5705 _toPy = {'error': 'error', 'storage-pools': 'storage_pools'}
5706 def __init__(self, error=None, storage_pools=None):
5707 '''
5708 error : Error
5709 storage_pools : typing.Sequence<+T_co>[~StoragePool]<~StoragePool>
5710 '''
5711 self.error = Error.from_json(error) if error else None
5712 self.storage_pools = [StoragePool.from_json(o) for o in storage_pools or []]
5713
5714
5715 class StoragePoolsResults(Type):
5716 _toSchema = {'results': 'results'}
5717 _toPy = {'results': 'results'}
5718 def __init__(self, results=None):
5719 '''
5720 results : typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
5721 '''
5722 self.results = [StoragePoolsResult.from_json(o) for o in results or []]
5723
5724
5725 class StoragesAddParams(Type):
5726 _toSchema = {'storages': 'storages'}
5727 _toPy = {'storages': 'storages'}
5728 def __init__(self, storages=None):
5729 '''
5730 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
5731 '''
5732 self.storages = [StorageAddParams.from_json(o) for o in storages or []]
5733
5734
5735 class VolumeDetails(Type):
5736 _toSchema = {'info': 'info', 'machine_attachments': 'machine-attachments', 'status': 'status', 'storage': 'storage', 'volume_tag': 'volume-tag'}
5737 _toPy = {'info': 'info', 'machine-attachments': 'machine_attachments', 'status': 'status', 'storage': 'storage', 'volume-tag': 'volume_tag'}
5738 def __init__(self, info=None, machine_attachments=None, status=None, storage=None, volume_tag=None):
5739 '''
5740 info : VolumeInfo
5741 machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo>
5742 status : EntityStatus
5743 storage : StorageDetails
5744 volume_tag : str
5745 '''
5746 self.info = VolumeInfo.from_json(info) if info else None
5747 self.machine_attachments = machine_attachments
5748 self.status = EntityStatus.from_json(status) if status else None
5749 self.storage = StorageDetails.from_json(storage) if storage else None
5750 self.volume_tag = volume_tag
5751
5752
5753 class VolumeDetailsListResult(Type):
5754 _toSchema = {'error': 'error', 'result': 'result'}
5755 _toPy = {'error': 'error', 'result': 'result'}
5756 def __init__(self, error=None, result=None):
5757 '''
5758 error : Error
5759 result : typing.Sequence<+T_co>[~VolumeDetails]<~VolumeDetails>
5760 '''
5761 self.error = Error.from_json(error) if error else None
5762 self.result = [VolumeDetails.from_json(o) for o in result or []]
5763
5764
5765 class VolumeDetailsListResults(Type):
5766 _toSchema = {'results': 'results'}
5767 _toPy = {'results': 'results'}
5768 def __init__(self, results=None):
5769 '''
5770 results : typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
5771 '''
5772 self.results = [VolumeDetailsListResult.from_json(o) for o in results or []]
5773
5774
5775 class VolumeFilter(Type):
5776 _toSchema = {'machines': 'machines'}
5777 _toPy = {'machines': 'machines'}
5778 def __init__(self, machines=None):
5779 '''
5780 machines : typing.Sequence<+T_co>[str]
5781 '''
5782 self.machines = machines
5783
5784
5785 class VolumeFilters(Type):
5786 _toSchema = {'filters': 'filters'}
5787 _toPy = {'filters': 'filters'}
5788 def __init__(self, filters=None):
5789 '''
5790 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
5791 '''
5792 self.filters = [VolumeFilter.from_json(o) for o in filters or []]
5793
5794
5795 class BlockDeviceResult(Type):
5796 _toSchema = {'error': 'error', 'result': 'result'}
5797 _toPy = {'error': 'error', 'result': 'result'}
5798 def __init__(self, error=None, result=None):
5799 '''
5800 error : Error
5801 result : BlockDevice
5802 '''
5803 self.error = Error.from_json(error) if error else None
5804 self.result = BlockDevice.from_json(result) if result else None
5805
5806
5807 class BlockDeviceResults(Type):
5808 _toSchema = {'results': 'results'}
5809 _toPy = {'results': 'results'}
5810 def __init__(self, results=None):
5811 '''
5812 results : typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
5813 '''
5814 self.results = [BlockDeviceResult.from_json(o) for o in results or []]
5815
5816
5817 class Filesystem(Type):
5818 _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'volume_tag': 'volume-tag'}
5819 _toPy = {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'volume-tag': 'volume_tag'}
5820 def __init__(self, filesystem_tag=None, info=None, volume_tag=None):
5821 '''
5822 filesystem_tag : str
5823 info : FilesystemInfo
5824 volume_tag : str
5825 '''
5826 self.filesystem_tag = filesystem_tag
5827 self.info = FilesystemInfo.from_json(info) if info else None
5828 self.volume_tag = volume_tag
5829
5830
5831 class FilesystemAttachment(Type):
5832 _toSchema = {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'machine_tag': 'machine-tag'}
5833 _toPy = {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'machine-tag': 'machine_tag'}
5834 def __init__(self, filesystem_tag=None, info=None, machine_tag=None):
5835 '''
5836 filesystem_tag : str
5837 info : FilesystemAttachmentInfo
5838 machine_tag : str
5839 '''
5840 self.filesystem_tag = filesystem_tag
5841 self.info = FilesystemAttachmentInfo.from_json(info) if info else None
5842 self.machine_tag = machine_tag
5843
5844
5845 class FilesystemAttachmentParams(Type):
5846 _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'}
5847 _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'}
5848 def __init__(self, filesystem_id=None, filesystem_tag=None, instance_id=None, machine_tag=None, mount_point=None, provider=None, read_only=None):
5849 '''
5850 filesystem_id : str
5851 filesystem_tag : str
5852 instance_id : str
5853 machine_tag : str
5854 mount_point : str
5855 provider : str
5856 read_only : bool
5857 '''
5858 self.filesystem_id = filesystem_id
5859 self.filesystem_tag = filesystem_tag
5860 self.instance_id = instance_id
5861 self.machine_tag = machine_tag
5862 self.mount_point = mount_point
5863 self.provider = provider
5864 self.read_only = read_only
5865
5866
5867 class FilesystemAttachmentParamsResult(Type):
5868 _toSchema = {'error': 'error', 'result': 'result'}
5869 _toPy = {'error': 'error', 'result': 'result'}
5870 def __init__(self, error=None, result=None):
5871 '''
5872 error : Error
5873 result : FilesystemAttachmentParams
5874 '''
5875 self.error = Error.from_json(error) if error else None
5876 self.result = FilesystemAttachmentParams.from_json(result) if result else None
5877
5878
5879 class FilesystemAttachmentParamsResults(Type):
5880 _toSchema = {'results': 'results'}
5881 _toPy = {'results': 'results'}
5882 def __init__(self, results=None):
5883 '''
5884 results : typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
5885 '''
5886 self.results = [FilesystemAttachmentParamsResult.from_json(o) for o in results or []]
5887
5888
5889 class FilesystemAttachmentResult(Type):
5890 _toSchema = {'error': 'error', 'result': 'result'}
5891 _toPy = {'error': 'error', 'result': 'result'}
5892 def __init__(self, error=None, result=None):
5893 '''
5894 error : Error
5895 result : FilesystemAttachment
5896 '''
5897 self.error = Error.from_json(error) if error else None
5898 self.result = FilesystemAttachment.from_json(result) if result else None
5899
5900
5901 class FilesystemAttachmentResults(Type):
5902 _toSchema = {'results': 'results'}
5903 _toPy = {'results': 'results'}
5904 def __init__(self, results=None):
5905 '''
5906 results : typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
5907 '''
5908 self.results = [FilesystemAttachmentResult.from_json(o) for o in results or []]
5909
5910
5911 class FilesystemAttachments(Type):
5912 _toSchema = {'filesystem_attachments': 'filesystem-attachments'}
5913 _toPy = {'filesystem-attachments': 'filesystem_attachments'}
5914 def __init__(self, filesystem_attachments=None):
5915 '''
5916 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
5917 '''
5918 self.filesystem_attachments = [FilesystemAttachment.from_json(o) for o in filesystem_attachments or []]
5919
5920
5921 class FilesystemParams(Type):
5922 _toSchema = {'attachment': 'attachment', 'attributes': 'attributes', 'filesystem_tag': 'filesystem-tag', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume_tag': 'volume-tag'}
5923 _toPy = {'attachment': 'attachment', 'attributes': 'attributes', 'filesystem-tag': 'filesystem_tag', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume-tag': 'volume_tag'}
5924 def __init__(self, attachment=None, attributes=None, filesystem_tag=None, provider=None, size=None, tags=None, volume_tag=None):
5925 '''
5926 attachment : FilesystemAttachmentParams
5927 attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5928 filesystem_tag : str
5929 provider : str
5930 size : int
5931 tags : typing.Mapping<~KT, +VT_co>[str, str]
5932 volume_tag : str
5933 '''
5934 self.attachment = FilesystemAttachmentParams.from_json(attachment) if attachment else None
5935 self.attributes = attributes
5936 self.filesystem_tag = filesystem_tag
5937 self.provider = provider
5938 self.size = size
5939 self.tags = tags
5940 self.volume_tag = volume_tag
5941
5942
5943 class FilesystemParamsResult(Type):
5944 _toSchema = {'error': 'error', 'result': 'result'}
5945 _toPy = {'error': 'error', 'result': 'result'}
5946 def __init__(self, error=None, result=None):
5947 '''
5948 error : Error
5949 result : FilesystemParams
5950 '''
5951 self.error = Error.from_json(error) if error else None
5952 self.result = FilesystemParams.from_json(result) if result else None
5953
5954
5955 class FilesystemParamsResults(Type):
5956 _toSchema = {'results': 'results'}
5957 _toPy = {'results': 'results'}
5958 def __init__(self, results=None):
5959 '''
5960 results : typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
5961 '''
5962 self.results = [FilesystemParamsResult.from_json(o) for o in results or []]
5963
5964
5965 class FilesystemResult(Type):
5966 _toSchema = {'error': 'error', 'result': 'result'}
5967 _toPy = {'error': 'error', 'result': 'result'}
5968 def __init__(self, error=None, result=None):
5969 '''
5970 error : Error
5971 result : Filesystem
5972 '''
5973 self.error = Error.from_json(error) if error else None
5974 self.result = Filesystem.from_json(result) if result else None
5975
5976
5977 class FilesystemResults(Type):
5978 _toSchema = {'results': 'results'}
5979 _toPy = {'results': 'results'}
5980 def __init__(self, results=None):
5981 '''
5982 results : typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
5983 '''
5984 self.results = [FilesystemResult.from_json(o) for o in results or []]
5985
5986
5987 class Filesystems(Type):
5988 _toSchema = {'filesystems': 'filesystems'}
5989 _toPy = {'filesystems': 'filesystems'}
5990 def __init__(self, filesystems=None):
5991 '''
5992 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
5993 '''
5994 self.filesystems = [Filesystem.from_json(o) for o in filesystems or []]
5995
5996
5997 class MachineStorageIds(Type):
5998 _toSchema = {'ids': 'ids'}
5999 _toPy = {'ids': 'ids'}
6000 def __init__(self, ids=None):
6001 '''
6002 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
6003 '''
6004 self.ids = [MachineStorageId.from_json(o) for o in ids or []]
6005
6006
6007 class MachineStorageIdsWatchResults(Type):
6008 _toSchema = {'results': 'results'}
6009 _toPy = {'results': 'results'}
6010 def __init__(self, results=None):
6011 '''
6012 results : typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
6013 '''
6014 self.results = [MachineStorageIdsWatchResult.from_json(o) for o in results or []]
6015
6016
6017 class VolumeAttachment(Type):
6018 _toSchema = {'info': 'info', 'machine_tag': 'machine-tag', 'volume_tag': 'volume-tag'}
6019 _toPy = {'info': 'info', 'machine-tag': 'machine_tag', 'volume-tag': 'volume_tag'}
6020 def __init__(self, info=None, machine_tag=None, volume_tag=None):
6021 '''
6022 info : VolumeAttachmentInfo
6023 machine_tag : str
6024 volume_tag : str
6025 '''
6026 self.info = VolumeAttachmentInfo.from_json(info) if info else None
6027 self.machine_tag = machine_tag
6028 self.volume_tag = volume_tag
6029
6030
6031 class VolumeAttachmentParamsResult(Type):
6032 _toSchema = {'error': 'error', 'result': 'result'}
6033 _toPy = {'error': 'error', 'result': 'result'}
6034 def __init__(self, error=None, result=None):
6035 '''
6036 error : Error
6037 result : VolumeAttachmentParams
6038 '''
6039 self.error = Error.from_json(error) if error else None
6040 self.result = VolumeAttachmentParams.from_json(result) if result else None
6041
6042
6043 class VolumeAttachmentParamsResults(Type):
6044 _toSchema = {'results': 'results'}
6045 _toPy = {'results': 'results'}
6046 def __init__(self, results=None):
6047 '''
6048 results : typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
6049 '''
6050 self.results = [VolumeAttachmentParamsResult.from_json(o) for o in results or []]
6051
6052
6053 class VolumeAttachmentResult(Type):
6054 _toSchema = {'error': 'error', 'result': 'result'}
6055 _toPy = {'error': 'error', 'result': 'result'}
6056 def __init__(self, error=None, result=None):
6057 '''
6058 error : Error
6059 result : VolumeAttachment
6060 '''
6061 self.error = Error.from_json(error) if error else None
6062 self.result = VolumeAttachment.from_json(result) if result else None
6063
6064
6065 class VolumeAttachmentResults(Type):
6066 _toSchema = {'results': 'results'}
6067 _toPy = {'results': 'results'}
6068 def __init__(self, results=None):
6069 '''
6070 results : typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
6071 '''
6072 self.results = [VolumeAttachmentResult.from_json(o) for o in results or []]
6073
6074
6075 class VolumeAttachments(Type):
6076 _toSchema = {'volume_attachments': 'volume-attachments'}
6077 _toPy = {'volume-attachments': 'volume_attachments'}
6078 def __init__(self, volume_attachments=None):
6079 '''
6080 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
6081 '''
6082 self.volume_attachments = [VolumeAttachment.from_json(o) for o in volume_attachments or []]
6083
6084
6085 class VolumeParamsResult(Type):
6086 _toSchema = {'error': 'error', 'result': 'result'}
6087 _toPy = {'error': 'error', 'result': 'result'}
6088 def __init__(self, error=None, result=None):
6089 '''
6090 error : Error
6091 result : VolumeParams
6092 '''
6093 self.error = Error.from_json(error) if error else None
6094 self.result = VolumeParams.from_json(result) if result else None
6095
6096
6097 class VolumeParamsResults(Type):
6098 _toSchema = {'results': 'results'}
6099 _toPy = {'results': 'results'}
6100 def __init__(self, results=None):
6101 '''
6102 results : typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
6103 '''
6104 self.results = [VolumeParamsResult.from_json(o) for o in results or []]
6105
6106
6107 class VolumeResult(Type):
6108 _toSchema = {'error': 'error', 'result': 'result'}
6109 _toPy = {'error': 'error', 'result': 'result'}
6110 def __init__(self, error=None, result=None):
6111 '''
6112 error : Error
6113 result : Volume
6114 '''
6115 self.error = Error.from_json(error) if error else None
6116 self.result = Volume.from_json(result) if result else None
6117
6118
6119 class VolumeResults(Type):
6120 _toSchema = {'results': 'results'}
6121 _toPy = {'results': 'results'}
6122 def __init__(self, results=None):
6123 '''
6124 results : typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
6125 '''
6126 self.results = [VolumeResult.from_json(o) for o in results or []]
6127
6128
6129 class Volumes(Type):
6130 _toSchema = {'volumes': 'volumes'}
6131 _toPy = {'volumes': 'volumes'}
6132 def __init__(self, volumes=None):
6133 '''
6134 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
6135 '''
6136 self.volumes = [Volume.from_json(o) for o in volumes or []]
6137
6138
6139 class SpaceResult(Type):
6140 _toSchema = {'error': 'error', 'tag': 'tag'}
6141 _toPy = {'error': 'error', 'tag': 'tag'}
6142 def __init__(self, error=None, tag=None):
6143 '''
6144 error : Error
6145 tag : str
6146 '''
6147 self.error = Error.from_json(error) if error else None
6148 self.tag = tag
6149
6150
6151 class SpaceResults(Type):
6152 _toSchema = {'results': 'results'}
6153 _toPy = {'results': 'results'}
6154 def __init__(self, results=None):
6155 '''
6156 results : typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
6157 '''
6158 self.results = [SpaceResult.from_json(o) for o in results or []]
6159
6160
6161 class ZoneResult(Type):
6162 _toSchema = {'available': 'available', 'error': 'error', 'name': 'name'}
6163 _toPy = {'available': 'available', 'error': 'error', 'name': 'name'}
6164 def __init__(self, available=None, error=None, name=None):
6165 '''
6166 available : bool
6167 error : Error
6168 name : str
6169 '''
6170 self.available = available
6171 self.error = Error.from_json(error) if error else None
6172 self.name = name
6173
6174
6175 class ZoneResults(Type):
6176 _toSchema = {'results': 'results'}
6177 _toPy = {'results': 'results'}
6178 def __init__(self, results=None):
6179 '''
6180 results : typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
6181 '''
6182 self.results = [ZoneResult.from_json(o) for o in results or []]
6183
6184
6185 class UndertakerModelInfo(Type):
6186 _toSchema = {'global_name': 'global-name', 'is_system': 'is-system', 'life': 'life', 'name': 'name', 'uuid': 'uuid'}
6187 _toPy = {'global-name': 'global_name', 'is-system': 'is_system', 'life': 'life', 'name': 'name', 'uuid': 'uuid'}
6188 def __init__(self, global_name=None, is_system=None, life=None, name=None, uuid=None):
6189 '''
6190 global_name : str
6191 is_system : bool
6192 life : str
6193 name : str
6194 uuid : str
6195 '''
6196 self.global_name = global_name
6197 self.is_system = is_system
6198 self.life = life
6199 self.name = name
6200 self.uuid = uuid
6201
6202
6203 class UndertakerModelInfoResult(Type):
6204 _toSchema = {'error': 'error', 'result': 'result'}
6205 _toPy = {'error': 'error', 'result': 'result'}
6206 def __init__(self, error=None, result=None):
6207 '''
6208 error : Error
6209 result : UndertakerModelInfo
6210 '''
6211 self.error = Error.from_json(error) if error else None
6212 self.result = UndertakerModelInfo.from_json(result) if result else None
6213
6214
6215 class ApplicationStatusResult(Type):
6216 _toSchema = {'application': 'application', 'error': 'error', 'units': 'units'}
6217 _toPy = {'application': 'application', 'error': 'error', 'units': 'units'}
6218 def __init__(self, application=None, error=None, units=None):
6219 '''
6220 application : StatusResult
6221 error : Error
6222 units : typing.Mapping<~KT, +VT_co>[str, ~StatusResult]<~StatusResult>
6223 '''
6224 self.application = StatusResult.from_json(application) if application else None
6225 self.error = Error.from_json(error) if error else None
6226 self.units = units
6227
6228
6229 class ApplicationStatusResults(Type):
6230 _toSchema = {'results': 'results'}
6231 _toPy = {'results': 'results'}
6232 def __init__(self, results=None):
6233 '''
6234 results : typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult>
6235 '''
6236 self.results = [ApplicationStatusResult.from_json(o) for o in results or []]
6237
6238
6239 class CharmURLs(Type):
6240 _toSchema = {'urls': 'urls'}
6241 _toPy = {'urls': 'urls'}
6242 def __init__(self, urls=None):
6243 '''
6244 urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL>
6245 '''
6246 self.urls = [CharmURL.from_json(o) for o in urls or []]
6247
6248
6249 class ConfigSettingsResult(Type):
6250 _toSchema = {'error': 'error', 'settings': 'settings'}
6251 _toPy = {'error': 'error', 'settings': 'settings'}
6252 def __init__(self, error=None, settings=None):
6253 '''
6254 error : Error
6255 settings : typing.Mapping<~KT, +VT_co>[str, typing.Any]
6256 '''
6257 self.error = Error.from_json(error) if error else None
6258 self.settings = settings
6259
6260
6261 class ConfigSettingsResults(Type):
6262 _toSchema = {'results': 'results'}
6263 _toPy = {'results': 'results'}
6264 def __init__(self, results=None):
6265 '''
6266 results : typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult>
6267 '''
6268 self.results = [ConfigSettingsResult.from_json(o) for o in results or []]
6269
6270
6271 class Endpoint(Type):
6272 _toSchema = {'application_name': 'application-name', 'relation': 'relation'}
6273 _toPy = {'application-name': 'application_name', 'relation': 'relation'}
6274 def __init__(self, application_name=None, relation=None):
6275 '''
6276 application_name : str
6277 relation : CharmRelation
6278 '''
6279 self.application_name = application_name
6280 self.relation = CharmRelation.from_json(relation) if relation else None
6281
6282
6283 class EntitiesCharmURL(Type):
6284 _toSchema = {'entities': 'entities'}
6285 _toPy = {'entities': 'entities'}
6286 def __init__(self, entities=None):
6287 '''
6288 entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL>
6289 '''
6290 self.entities = [EntityCharmURL.from_json(o) for o in entities or []]
6291
6292
6293 class EntitiesPortRanges(Type):
6294 _toSchema = {'entities': 'entities'}
6295 _toPy = {'entities': 'entities'}
6296 def __init__(self, entities=None):
6297 '''
6298 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
6299 '''
6300 self.entities = [EntityPortRange.from_json(o) for o in entities or []]
6301
6302
6303 class EntityCharmURL(Type):
6304 _toSchema = {'charm_url': 'charm-url', 'tag': 'tag'}
6305 _toPy = {'charm-url': 'charm_url', 'tag': 'tag'}
6306 def __init__(self, charm_url=None, tag=None):
6307 '''
6308 charm_url : str
6309 tag : str
6310 '''
6311 self.charm_url = charm_url
6312 self.tag = tag
6313
6314
6315 class EntityPortRange(Type):
6316 _toSchema = {'from_port': 'from-port', 'protocol': 'protocol', 'tag': 'tag', 'to_port': 'to-port'}
6317 _toPy = {'from-port': 'from_port', 'protocol': 'protocol', 'tag': 'tag', 'to-port': 'to_port'}
6318 def __init__(self, from_port=None, protocol=None, tag=None, to_port=None):
6319 '''
6320 from_port : int
6321 protocol : str
6322 tag : str
6323 to_port : int
6324 '''
6325 self.from_port = from_port
6326 self.protocol = protocol
6327 self.tag = tag
6328 self.to_port = to_port
6329
6330
6331 class EntityWorkloadVersion(Type):
6332 _toSchema = {'tag': 'tag', 'workload_version': 'workload-version'}
6333 _toPy = {'tag': 'tag', 'workload-version': 'workload_version'}
6334 def __init__(self, tag=None, workload_version=None):
6335 '''
6336 tag : str
6337 workload_version : str
6338 '''
6339 self.tag = tag
6340 self.workload_version = workload_version
6341
6342
6343 class EntityWorkloadVersions(Type):
6344 _toSchema = {'entities': 'entities'}
6345 _toPy = {'entities': 'entities'}
6346 def __init__(self, entities=None):
6347 '''
6348 entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion>
6349 '''
6350 self.entities = [EntityWorkloadVersion.from_json(o) for o in entities or []]
6351
6352
6353 class GetLeadershipSettingsBulkResults(Type):
6354 _toSchema = {'results': 'results'}
6355 _toPy = {'results': 'results'}
6356 def __init__(self, results=None):
6357 '''
6358 results : typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult>
6359 '''
6360 self.results = [GetLeadershipSettingsResult.from_json(o) for o in results or []]
6361
6362
6363 class GetLeadershipSettingsResult(Type):
6364 _toSchema = {'error': 'error', 'settings': 'settings'}
6365 _toPy = {'error': 'error', 'settings': 'settings'}
6366 def __init__(self, error=None, settings=None):
6367 '''
6368 error : Error
6369 settings : typing.Mapping<~KT, +VT_co>[str, str]
6370 '''
6371 self.error = Error.from_json(error) if error else None
6372 self.settings = settings
6373
6374
6375 class IntResult(Type):
6376 _toSchema = {'error': 'error', 'result': 'result'}
6377 _toPy = {'error': 'error', 'result': 'result'}
6378 def __init__(self, error=None, result=None):
6379 '''
6380 error : Error
6381 result : int
6382 '''
6383 self.error = Error.from_json(error) if error else None
6384 self.result = result
6385
6386
6387 class IntResults(Type):
6388 _toSchema = {'results': 'results'}
6389 _toPy = {'results': 'results'}
6390 def __init__(self, results=None):
6391 '''
6392 results : typing.Sequence<+T_co>[~IntResult]<~IntResult>
6393 '''
6394 self.results = [IntResult.from_json(o) for o in results or []]
6395
6396
6397 class MergeLeadershipSettingsBulkParams(Type):
6398 _toSchema = {'params': 'params'}
6399 _toPy = {'params': 'params'}
6400 def __init__(self, params=None):
6401 '''
6402 params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam>
6403 '''
6404 self.params = [MergeLeadershipSettingsParam.from_json(o) for o in params or []]
6405
6406
6407 class MergeLeadershipSettingsParam(Type):
6408 _toSchema = {'application_tag': 'application-tag', 'settings': 'settings'}
6409 _toPy = {'application-tag': 'application_tag', 'settings': 'settings'}
6410 def __init__(self, application_tag=None, settings=None):
6411 '''
6412 application_tag : str
6413 settings : typing.Mapping<~KT, +VT_co>[str, str]
6414 '''
6415 self.application_tag = application_tag
6416 self.settings = settings
6417
6418
6419 class ModelResult(Type):
6420 _toSchema = {'error': 'error', 'name': 'name', 'uuid': 'uuid'}
6421 _toPy = {'error': 'error', 'name': 'name', 'uuid': 'uuid'}
6422 def __init__(self, error=None, name=None, uuid=None):
6423 '''
6424 error : Error
6425 name : str
6426 uuid : str
6427 '''
6428 self.error = Error.from_json(error) if error else None
6429 self.name = name
6430 self.uuid = uuid
6431
6432
6433 class RelationIds(Type):
6434 _toSchema = {'relation_ids': 'relation-ids'}
6435 _toPy = {'relation-ids': 'relation_ids'}
6436 def __init__(self, relation_ids=None):
6437 '''
6438 relation_ids : typing.Sequence<+T_co>[int]
6439 '''
6440 self.relation_ids = relation_ids
6441
6442
6443 class RelationResult(Type):
6444 _toSchema = {'endpoint': 'endpoint', 'error': 'error', 'id_': 'id', 'key': 'key', 'life': 'life'}
6445 _toPy = {'endpoint': 'endpoint', 'error': 'error', 'id': 'id_', 'key': 'key', 'life': 'life'}
6446 def __init__(self, endpoint=None, error=None, id_=None, key=None, life=None):
6447 '''
6448 endpoint : Endpoint
6449 error : Error
6450 id_ : int
6451 key : str
6452 life : str
6453 '''
6454 self.endpoint = Endpoint.from_json(endpoint) if endpoint else None
6455 self.error = Error.from_json(error) if error else None
6456 self.id_ = id_
6457 self.key = key
6458 self.life = life
6459
6460
6461 class RelationResults(Type):
6462 _toSchema = {'results': 'results'}
6463 _toPy = {'results': 'results'}
6464 def __init__(self, results=None):
6465 '''
6466 results : typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
6467 '''
6468 self.results = [RelationResult.from_json(o) for o in results or []]
6469
6470
6471 class RelationUnit(Type):
6472 _toSchema = {'relation': 'relation', 'unit': 'unit'}
6473 _toPy = {'relation': 'relation', 'unit': 'unit'}
6474 def __init__(self, relation=None, unit=None):
6475 '''
6476 relation : str
6477 unit : str
6478 '''
6479 self.relation = relation
6480 self.unit = unit
6481
6482
6483 class RelationUnitPair(Type):
6484 _toSchema = {'local_unit': 'local-unit', 'relation': 'relation', 'remote_unit': 'remote-unit'}
6485 _toPy = {'local-unit': 'local_unit', 'relation': 'relation', 'remote-unit': 'remote_unit'}
6486 def __init__(self, local_unit=None, relation=None, remote_unit=None):
6487 '''
6488 local_unit : str
6489 relation : str
6490 remote_unit : str
6491 '''
6492 self.local_unit = local_unit
6493 self.relation = relation
6494 self.remote_unit = remote_unit
6495
6496
6497 class RelationUnitPairs(Type):
6498 _toSchema = {'relation_unit_pairs': 'relation-unit-pairs'}
6499 _toPy = {'relation-unit-pairs': 'relation_unit_pairs'}
6500 def __init__(self, relation_unit_pairs=None):
6501 '''
6502 relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair>
6503 '''
6504 self.relation_unit_pairs = [RelationUnitPair.from_json(o) for o in relation_unit_pairs or []]
6505
6506
6507 class RelationUnitSettings(Type):
6508 _toSchema = {'relation': 'relation', 'settings': 'settings', 'unit': 'unit'}
6509 _toPy = {'relation': 'relation', 'settings': 'settings', 'unit': 'unit'}
6510 def __init__(self, relation=None, settings=None, unit=None):
6511 '''
6512 relation : str
6513 settings : typing.Mapping<~KT, +VT_co>[str, str]
6514 unit : str
6515 '''
6516 self.relation = relation
6517 self.settings = settings
6518 self.unit = unit
6519
6520
6521 class RelationUnits(Type):
6522 _toSchema = {'relation_units': 'relation-units'}
6523 _toPy = {'relation-units': 'relation_units'}
6524 def __init__(self, relation_units=None):
6525 '''
6526 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
6527 '''
6528 self.relation_units = [RelationUnit.from_json(o) for o in relation_units or []]
6529
6530
6531 class RelationUnitsSettings(Type):
6532 _toSchema = {'relation_units': 'relation-units'}
6533 _toPy = {'relation-units': 'relation_units'}
6534 def __init__(self, relation_units=None):
6535 '''
6536 relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings>
6537 '''
6538 self.relation_units = [RelationUnitSettings.from_json(o) for o in relation_units or []]
6539
6540
6541 class RelationUnitsWatchResults(Type):
6542 _toSchema = {'results': 'results'}
6543 _toPy = {'results': 'results'}
6544 def __init__(self, results=None):
6545 '''
6546 results : typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult>
6547 '''
6548 self.results = [RelationUnitsWatchResult.from_json(o) for o in results or []]
6549
6550
6551 class ResolvedModeResult(Type):
6552 _toSchema = {'error': 'error', 'mode': 'mode'}
6553 _toPy = {'error': 'error', 'mode': 'mode'}
6554 def __init__(self, error=None, mode=None):
6555 '''
6556 error : Error
6557 mode : str
6558 '''
6559 self.error = Error.from_json(error) if error else None
6560 self.mode = mode
6561
6562
6563 class ResolvedModeResults(Type):
6564 _toSchema = {'results': 'results'}
6565 _toPy = {'results': 'results'}
6566 def __init__(self, results=None):
6567 '''
6568 results : typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult>
6569 '''
6570 self.results = [ResolvedModeResult.from_json(o) for o in results or []]
6571
6572
6573 class SettingsResult(Type):
6574 _toSchema = {'error': 'error', 'settings': 'settings'}
6575 _toPy = {'error': 'error', 'settings': 'settings'}
6576 def __init__(self, error=None, settings=None):
6577 '''
6578 error : Error
6579 settings : typing.Mapping<~KT, +VT_co>[str, str]
6580 '''
6581 self.error = Error.from_json(error) if error else None
6582 self.settings = settings
6583
6584
6585 class SettingsResults(Type):
6586 _toSchema = {'results': 'results'}
6587 _toPy = {'results': 'results'}
6588 def __init__(self, results=None):
6589 '''
6590 results : typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
6591 '''
6592 self.results = [SettingsResult.from_json(o) for o in results or []]
6593
6594
6595 class StorageAttachment(Type):
6596 _toSchema = {'kind': 'kind', 'life': 'life', 'location': 'location', 'owner_tag': 'owner-tag', 'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
6597 _toPy = {'kind': 'kind', 'life': 'life', 'location': 'location', 'owner-tag': 'owner_tag', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'}
6598 def __init__(self, kind=None, life=None, location=None, owner_tag=None, storage_tag=None, unit_tag=None):
6599 '''
6600 kind : int
6601 life : str
6602 location : str
6603 owner_tag : str
6604 storage_tag : str
6605 unit_tag : str
6606 '''
6607 self.kind = kind
6608 self.life = life
6609 self.location = location
6610 self.owner_tag = owner_tag
6611 self.storage_tag = storage_tag
6612 self.unit_tag = unit_tag
6613
6614
6615 class StorageAttachmentId(Type):
6616 _toSchema = {'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
6617 _toPy = {'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'}
6618 def __init__(self, storage_tag=None, unit_tag=None):
6619 '''
6620 storage_tag : str
6621 unit_tag : str
6622 '''
6623 self.storage_tag = storage_tag
6624 self.unit_tag = unit_tag
6625
6626
6627 class StorageAttachmentIds(Type):
6628 _toSchema = {'ids': 'ids'}
6629 _toPy = {'ids': 'ids'}
6630 def __init__(self, ids=None):
6631 '''
6632 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
6633 '''
6634 self.ids = [StorageAttachmentId.from_json(o) for o in ids or []]
6635
6636
6637 class StorageAttachmentIdsResult(Type):
6638 _toSchema = {'error': 'error', 'result': 'result'}
6639 _toPy = {'error': 'error', 'result': 'result'}
6640 def __init__(self, error=None, result=None):
6641 '''
6642 error : Error
6643 result : StorageAttachmentIds
6644 '''
6645 self.error = Error.from_json(error) if error else None
6646 self.result = StorageAttachmentIds.from_json(result) if result else None
6647
6648
6649 class StorageAttachmentIdsResults(Type):
6650 _toSchema = {'results': 'results'}
6651 _toPy = {'results': 'results'}
6652 def __init__(self, results=None):
6653 '''
6654 results : typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult>
6655 '''
6656 self.results = [StorageAttachmentIdsResult.from_json(o) for o in results or []]
6657
6658
6659 class StorageAttachmentResult(Type):
6660 _toSchema = {'error': 'error', 'result': 'result'}
6661 _toPy = {'error': 'error', 'result': 'result'}
6662 def __init__(self, error=None, result=None):
6663 '''
6664 error : Error
6665 result : StorageAttachment
6666 '''
6667 self.error = Error.from_json(error) if error else None
6668 self.result = StorageAttachment.from_json(result) if result else None
6669
6670
6671 class StorageAttachmentResults(Type):
6672 _toSchema = {'results': 'results'}
6673 _toPy = {'results': 'results'}
6674 def __init__(self, results=None):
6675 '''
6676 results : typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult>
6677 '''
6678 self.results = [StorageAttachmentResult.from_json(o) for o in results or []]
6679
6680
6681 class StringBoolResult(Type):
6682 _toSchema = {'error': 'error', 'ok': 'ok', 'result': 'result'}
6683 _toPy = {'error': 'error', 'ok': 'ok', 'result': 'result'}
6684 def __init__(self, error=None, ok=None, result=None):
6685 '''
6686 error : Error
6687 ok : bool
6688 result : str
6689 '''
6690 self.error = Error.from_json(error) if error else None
6691 self.ok = ok
6692 self.result = result
6693
6694
6695 class StringBoolResults(Type):
6696 _toSchema = {'results': 'results'}
6697 _toPy = {'results': 'results'}
6698 def __init__(self, results=None):
6699 '''
6700 results : typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
6701 '''
6702 self.results = [StringBoolResult.from_json(o) for o in results or []]
6703
6704
6705 class UnitNetworkConfig(Type):
6706 _toSchema = {'binding_name': 'binding-name', 'unit_tag': 'unit-tag'}
6707 _toPy = {'binding-name': 'binding_name', 'unit-tag': 'unit_tag'}
6708 def __init__(self, binding_name=None, unit_tag=None):
6709 '''
6710 binding_name : str
6711 unit_tag : str
6712 '''
6713 self.binding_name = binding_name
6714 self.unit_tag = unit_tag
6715
6716
6717 class UnitNetworkConfigResult(Type):
6718 _toSchema = {'error': 'error', 'info': 'info'}
6719 _toPy = {'error': 'error', 'info': 'info'}
6720 def __init__(self, error=None, info=None):
6721 '''
6722 error : Error
6723 info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
6724 '''
6725 self.error = Error.from_json(error) if error else None
6726 self.info = [NetworkConfig.from_json(o) for o in info or []]
6727
6728
6729 class UnitNetworkConfigResults(Type):
6730 _toSchema = {'results': 'results'}
6731 _toPy = {'results': 'results'}
6732 def __init__(self, results=None):
6733 '''
6734 results : typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult>
6735 '''
6736 self.results = [UnitNetworkConfigResult.from_json(o) for o in results or []]
6737
6738
6739 class UnitsNetworkConfig(Type):
6740 _toSchema = {'args': 'args'}
6741 _toPy = {'args': 'args'}
6742 def __init__(self, args=None):
6743 '''
6744 args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig>
6745 '''
6746 self.args = [UnitNetworkConfig.from_json(o) for o in args or []]
6747
6748
6749 class EntitiesVersion(Type):
6750 _toSchema = {'agent_tools': 'agent-tools'}
6751 _toPy = {'agent-tools': 'agent_tools'}
6752 def __init__(self, agent_tools=None):
6753 '''
6754 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
6755 '''
6756 self.agent_tools = [EntityVersion.from_json(o) for o in agent_tools or []]
6757
6758
6759 class EntityVersion(Type):
6760 _toSchema = {'tag': 'tag', 'tools': 'tools'}
6761 _toPy = {'tag': 'tag', 'tools': 'tools'}
6762 def __init__(self, tag=None, tools=None):
6763 '''
6764 tag : str
6765 tools : Version
6766 '''
6767 self.tag = tag
6768 self.tools = Version.from_json(tools) if tools else None
6769
6770
6771 class Version(Type):
6772 _toSchema = {'version': 'version'}
6773 _toPy = {'version': 'version'}
6774 def __init__(self, version=None):
6775 '''
6776 version : Binary
6777 '''
6778 self.version = Binary.from_json(version) if version else None
6779
6780
6781 class VersionResult(Type):
6782 _toSchema = {'error': 'error', 'version': 'version'}
6783 _toPy = {'error': 'error', 'version': 'version'}
6784 def __init__(self, error=None, version=None):
6785 '''
6786 error : Error
6787 version : Number
6788 '''
6789 self.error = Error.from_json(error) if error else None
6790 self.version = Number.from_json(version) if version else None
6791
6792
6793 class VersionResults(Type):
6794 _toSchema = {'results': 'results'}
6795 _toPy = {'results': 'results'}
6796 def __init__(self, results=None):
6797 '''
6798 results : typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
6799 '''
6800 self.results = [VersionResult.from_json(o) for o in results or []]
6801
6802
6803 class AddUser(Type):
6804 _toSchema = {'display_name': 'display-name', 'password': 'password', 'username': 'username'}
6805 _toPy = {'display-name': 'display_name', 'password': 'password', 'username': 'username'}
6806 def __init__(self, display_name=None, password=None, username=None):
6807 '''
6808 display_name : str
6809 password : str
6810 username : str
6811 '''
6812 self.display_name = display_name
6813 self.password = password
6814 self.username = username
6815
6816
6817 class AddUserResult(Type):
6818 _toSchema = {'error': 'error', 'secret_key': 'secret-key', 'tag': 'tag'}
6819 _toPy = {'error': 'error', 'secret-key': 'secret_key', 'tag': 'tag'}
6820 def __init__(self, error=None, secret_key=None, tag=None):
6821 '''
6822 error : Error
6823 secret_key : typing.Sequence<+T_co>[int]
6824 tag : str
6825 '''
6826 self.error = Error.from_json(error) if error else None
6827 self.secret_key = secret_key
6828 self.tag = tag
6829
6830
6831 class AddUserResults(Type):
6832 _toSchema = {'results': 'results'}
6833 _toPy = {'results': 'results'}
6834 def __init__(self, results=None):
6835 '''
6836 results : typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
6837 '''
6838 self.results = [AddUserResult.from_json(o) for o in results or []]
6839
6840
6841 class AddUsers(Type):
6842 _toSchema = {'users': 'users'}
6843 _toPy = {'users': 'users'}
6844 def __init__(self, users=None):
6845 '''
6846 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
6847 '''
6848 self.users = [AddUser.from_json(o) for o in users or []]
6849
6850
6851 class UserInfo(Type):
6852 _toSchema = {'access': 'access', 'created_by': 'created-by', 'date_created': 'date-created', 'disabled': 'disabled', 'display_name': 'display-name', 'last_connection': 'last-connection', 'username': 'username'}
6853 _toPy = {'access': 'access', 'created-by': 'created_by', 'date-created': 'date_created', 'disabled': 'disabled', 'display-name': 'display_name', 'last-connection': 'last_connection', 'username': 'username'}
6854 def __init__(self, access=None, created_by=None, date_created=None, disabled=None, display_name=None, last_connection=None, username=None):
6855 '''
6856 access : str
6857 created_by : str
6858 date_created : str
6859 disabled : bool
6860 display_name : str
6861 last_connection : str
6862 username : str
6863 '''
6864 self.access = access
6865 self.created_by = created_by
6866 self.date_created = date_created
6867 self.disabled = disabled
6868 self.display_name = display_name
6869 self.last_connection = last_connection
6870 self.username = username
6871
6872
6873 class UserInfoRequest(Type):
6874 _toSchema = {'entities': 'entities', 'include_disabled': 'include-disabled'}
6875 _toPy = {'entities': 'entities', 'include-disabled': 'include_disabled'}
6876 def __init__(self, entities=None, include_disabled=None):
6877 '''
6878 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6879 include_disabled : bool
6880 '''
6881 self.entities = [Entity.from_json(o) for o in entities or []]
6882 self.include_disabled = include_disabled
6883
6884
6885 class UserInfoResult(Type):
6886 _toSchema = {'error': 'error', 'result': 'result'}
6887 _toPy = {'error': 'error', 'result': 'result'}
6888 def __init__(self, error=None, result=None):
6889 '''
6890 error : Error
6891 result : UserInfo
6892 '''
6893 self.error = Error.from_json(error) if error else None
6894 self.result = UserInfo.from_json(result) if result else None
6895
6896
6897 class UserInfoResults(Type):
6898 _toSchema = {'results': 'results'}
6899 _toPy = {'results': 'results'}
6900 def __init__(self, results=None):
6901 '''
6902 results : typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
6903 '''
6904 self.results = [UserInfoResult.from_json(o) for o in results or []]
6905
6906
6907 class ActionFacade(Type):
6908 name = 'Action'
6909 version = 2
6910 schema = {'definitions': {'Action': {'additionalProperties': False,
6911 'properties': {'name': {'type': 'string'},
6912 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
6913 'type': 'object'}},
6914 'type': 'object'},
6915 'receiver': {'type': 'string'},
6916 'tag': {'type': 'string'}},
6917 'required': ['tag', 'receiver', 'name'],
6918 'type': 'object'},
6919 'ActionResult': {'additionalProperties': False,
6920 'properties': {'action': {'$ref': '#/definitions/Action'},
6921 'completed': {'format': 'date-time',
6922 'type': 'string'},
6923 'enqueued': {'format': 'date-time',
6924 'type': 'string'},
6925 'error': {'$ref': '#/definitions/Error'},
6926 'message': {'type': 'string'},
6927 'output': {'patternProperties': {'.*': {'additionalProperties': True,
6928 'type': 'object'}},
6929 'type': 'object'},
6930 'started': {'format': 'date-time',
6931 'type': 'string'},
6932 'status': {'type': 'string'}},
6933 'type': 'object'},
6934 'ActionResults': {'additionalProperties': False,
6935 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
6936 'type': 'array'}},
6937 'type': 'object'},
6938 'ActionSpec': {'additionalProperties': False,
6939 'properties': {'description': {'type': 'string'},
6940 'params': {'patternProperties': {'.*': {'additionalProperties': True,
6941 'type': 'object'}},
6942 'type': 'object'}},
6943 'required': ['description', 'params'],
6944 'type': 'object'},
6945 'Actions': {'additionalProperties': False,
6946 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
6947 'type': 'array'}},
6948 'type': 'object'},
6949 'ActionsByName': {'additionalProperties': False,
6950 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
6951 'type': 'array'},
6952 'error': {'$ref': '#/definitions/Error'},
6953 'name': {'type': 'string'}},
6954 'type': 'object'},
6955 'ActionsByNames': {'additionalProperties': False,
6956 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
6957 'type': 'array'}},
6958 'type': 'object'},
6959 'ActionsByReceiver': {'additionalProperties': False,
6960 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
6961 'type': 'array'},
6962 'error': {'$ref': '#/definitions/Error'},
6963 'receiver': {'type': 'string'}},
6964 'type': 'object'},
6965 'ActionsByReceivers': {'additionalProperties': False,
6966 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
6967 'type': 'array'}},
6968 'type': 'object'},
6969 'ApplicationCharmActionsResult': {'additionalProperties': False,
6970 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
6971 'type': 'object'},
6972 'application-tag': {'type': 'string'},
6973 'error': {'$ref': '#/definitions/Error'}},
6974 'type': 'object'},
6975 'ApplicationsCharmActionsResults': {'additionalProperties': False,
6976 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
6977 'type': 'array'}},
6978 'type': 'object'},
6979 'Entities': {'additionalProperties': False,
6980 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6981 'type': 'array'}},
6982 'required': ['entities'],
6983 'type': 'object'},
6984 'Entity': {'additionalProperties': False,
6985 'properties': {'tag': {'type': 'string'}},
6986 'required': ['tag'],
6987 'type': 'object'},
6988 'Error': {'additionalProperties': False,
6989 'properties': {'code': {'type': 'string'},
6990 'info': {'$ref': '#/definitions/ErrorInfo'},
6991 'message': {'type': 'string'}},
6992 'required': ['message', 'code'],
6993 'type': 'object'},
6994 'ErrorInfo': {'additionalProperties': False,
6995 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6996 'macaroon-path': {'type': 'string'}},
6997 'type': 'object'},
6998 'FindActionsByNames': {'additionalProperties': False,
6999 'properties': {'names': {'items': {'type': 'string'},
7000 'type': 'array'}},
7001 'type': 'object'},
7002 'FindTags': {'additionalProperties': False,
7003 'properties': {'prefixes': {'items': {'type': 'string'},
7004 'type': 'array'}},
7005 'required': ['prefixes'],
7006 'type': 'object'},
7007 'FindTagsResults': {'additionalProperties': False,
7008 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
7009 'type': 'array'}},
7010 'type': 'object'}},
7011 'required': ['matches'],
7012 'type': 'object'},
7013 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7014 'RunParams': {'additionalProperties': False,
7015 'properties': {'applications': {'items': {'type': 'string'},
7016 'type': 'array'},
7017 'commands': {'type': 'string'},
7018 'machines': {'items': {'type': 'string'},
7019 'type': 'array'},
7020 'timeout': {'type': 'integer'},
7021 'units': {'items': {'type': 'string'},
7022 'type': 'array'}},
7023 'required': ['commands', 'timeout'],
7024 'type': 'object'}},
7025 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7026 'Result': {'$ref': '#/definitions/ActionResults'}},
7027 'type': 'object'},
7028 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7029 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
7030 'type': 'object'},
7031 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7032 'Result': {'$ref': '#/definitions/ActionResults'}},
7033 'type': 'object'},
7034 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
7035 'Result': {'$ref': '#/definitions/ActionResults'}},
7036 'type': 'object'},
7037 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
7038 'Result': {'$ref': '#/definitions/FindTagsResults'}},
7039 'type': 'object'},
7040 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
7041 'Result': {'$ref': '#/definitions/ActionsByNames'}},
7042 'type': 'object'},
7043 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7044 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
7045 'type': 'object'},
7046 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7047 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
7048 'type': 'object'},
7049 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7050 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
7051 'type': 'object'},
7052 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7053 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
7054 'type': 'object'},
7055 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
7056 'Result': {'$ref': '#/definitions/ActionResults'}},
7057 'type': 'object'},
7058 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
7059 'Result': {'$ref': '#/definitions/ActionResults'}},
7060 'type': 'object'}},
7061 'type': 'object'}
7062
7063
7064 @ReturnMapping(ActionResults)
7065 async def Actions(self, entities):
7066 '''
7067 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7068 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
7069 '''
7070 # map input types to rpc msg
7071 _params = dict()
7072 msg = dict(type='Action', request='Actions', version=2, params=_params)
7073 _params['entities'] = entities
7074 reply = await self.rpc(msg)
7075 return reply
7076
7077
7078
7079 @ReturnMapping(ApplicationsCharmActionsResults)
7080 async def ApplicationsCharmsActions(self, entities):
7081 '''
7082 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7083 Returns -> typing.Sequence<+T_co>[~ApplicationCharmActionsResult]<~ApplicationCharmActionsResult>
7084 '''
7085 # map input types to rpc msg
7086 _params = dict()
7087 msg = dict(type='Action', request='ApplicationsCharmsActions', version=2, params=_params)
7088 _params['entities'] = entities
7089 reply = await self.rpc(msg)
7090 return reply
7091
7092
7093
7094 @ReturnMapping(ActionResults)
7095 async def Cancel(self, entities):
7096 '''
7097 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7098 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
7099 '''
7100 # map input types to rpc msg
7101 _params = dict()
7102 msg = dict(type='Action', request='Cancel', version=2, params=_params)
7103 _params['entities'] = entities
7104 reply = await self.rpc(msg)
7105 return reply
7106
7107
7108
7109 @ReturnMapping(ActionResults)
7110 async def Enqueue(self, actions):
7111 '''
7112 actions : typing.Sequence<+T_co>[~Action]<~Action>
7113 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
7114 '''
7115 # map input types to rpc msg
7116 _params = dict()
7117 msg = dict(type='Action', request='Enqueue', version=2, params=_params)
7118 _params['actions'] = actions
7119 reply = await self.rpc(msg)
7120 return reply
7121
7122
7123
7124 @ReturnMapping(FindTagsResults)
7125 async def FindActionTagsByPrefix(self, prefixes):
7126 '''
7127 prefixes : typing.Sequence<+T_co>[str]
7128 Returns -> typing.Sequence<+T_co>[~Entity]<~Entity>
7129 '''
7130 # map input types to rpc msg
7131 _params = dict()
7132 msg = dict(type='Action', request='FindActionTagsByPrefix', version=2, params=_params)
7133 _params['prefixes'] = prefixes
7134 reply = await self.rpc(msg)
7135 return reply
7136
7137
7138
7139 @ReturnMapping(ActionsByNames)
7140 async def FindActionsByNames(self, names):
7141 '''
7142 names : typing.Sequence<+T_co>[str]
7143 Returns -> typing.Sequence<+T_co>[~ActionsByName]<~ActionsByName>
7144 '''
7145 # map input types to rpc msg
7146 _params = dict()
7147 msg = dict(type='Action', request='FindActionsByNames', version=2, params=_params)
7148 _params['names'] = names
7149 reply = await self.rpc(msg)
7150 return reply
7151
7152
7153
7154 @ReturnMapping(ActionsByReceivers)
7155 async def ListAll(self, entities):
7156 '''
7157 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7158 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
7159 '''
7160 # map input types to rpc msg
7161 _params = dict()
7162 msg = dict(type='Action', request='ListAll', version=2, params=_params)
7163 _params['entities'] = entities
7164 reply = await self.rpc(msg)
7165 return reply
7166
7167
7168
7169 @ReturnMapping(ActionsByReceivers)
7170 async def ListCompleted(self, entities):
7171 '''
7172 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7173 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
7174 '''
7175 # map input types to rpc msg
7176 _params = dict()
7177 msg = dict(type='Action', request='ListCompleted', version=2, params=_params)
7178 _params['entities'] = entities
7179 reply = await self.rpc(msg)
7180 return reply
7181
7182
7183
7184 @ReturnMapping(ActionsByReceivers)
7185 async def ListPending(self, entities):
7186 '''
7187 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7188 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
7189 '''
7190 # map input types to rpc msg
7191 _params = dict()
7192 msg = dict(type='Action', request='ListPending', version=2, params=_params)
7193 _params['entities'] = entities
7194 reply = await self.rpc(msg)
7195 return reply
7196
7197
7198
7199 @ReturnMapping(ActionsByReceivers)
7200 async def ListRunning(self, entities):
7201 '''
7202 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7203 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
7204 '''
7205 # map input types to rpc msg
7206 _params = dict()
7207 msg = dict(type='Action', request='ListRunning', version=2, params=_params)
7208 _params['entities'] = entities
7209 reply = await self.rpc(msg)
7210 return reply
7211
7212
7213
7214 @ReturnMapping(ActionResults)
7215 async def Run(self, applications, commands, machines, timeout, units):
7216 '''
7217 applications : typing.Sequence<+T_co>[str]
7218 commands : str
7219 machines : typing.Sequence<+T_co>[str]
7220 timeout : int
7221 units : typing.Sequence<+T_co>[str]
7222 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
7223 '''
7224 # map input types to rpc msg
7225 _params = dict()
7226 msg = dict(type='Action', request='Run', version=2, params=_params)
7227 _params['applications'] = applications
7228 _params['commands'] = commands
7229 _params['machines'] = machines
7230 _params['timeout'] = timeout
7231 _params['units'] = units
7232 reply = await self.rpc(msg)
7233 return reply
7234
7235
7236
7237 @ReturnMapping(ActionResults)
7238 async def RunOnAllMachines(self, applications, commands, machines, timeout, units):
7239 '''
7240 applications : typing.Sequence<+T_co>[str]
7241 commands : str
7242 machines : typing.Sequence<+T_co>[str]
7243 timeout : int
7244 units : typing.Sequence<+T_co>[str]
7245 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
7246 '''
7247 # map input types to rpc msg
7248 _params = dict()
7249 msg = dict(type='Action', request='RunOnAllMachines', version=2, params=_params)
7250 _params['applications'] = applications
7251 _params['commands'] = commands
7252 _params['machines'] = machines
7253 _params['timeout'] = timeout
7254 _params['units'] = units
7255 reply = await self.rpc(msg)
7256 return reply
7257
7258
7259 class AgentFacade(Type):
7260 name = 'Agent'
7261 version = 2
7262 schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
7263 'properties': {'container-type': {'type': 'string'},
7264 'error': {'$ref': '#/definitions/Error'},
7265 'jobs': {'items': {'type': 'string'},
7266 'type': 'array'},
7267 'life': {'type': 'string'}},
7268 'required': ['life',
7269 'jobs',
7270 'container-type'],
7271 'type': 'object'},
7272 'AgentGetEntitiesResults': {'additionalProperties': False,
7273 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
7274 'type': 'array'}},
7275 'required': ['entities'],
7276 'type': 'object'},
7277 'CloudCredential': {'additionalProperties': False,
7278 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
7279 'type': 'object'},
7280 'auth-type': {'type': 'string'},
7281 'redacted': {'items': {'type': 'string'},
7282 'type': 'array'}},
7283 'required': ['auth-type'],
7284 'type': 'object'},
7285 'CloudSpec': {'additionalProperties': False,
7286 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
7287 'endpoint': {'type': 'string'},
7288 'identity-endpoint': {'type': 'string'},
7289 'name': {'type': 'string'},
7290 'region': {'type': 'string'},
7291 'storage-endpoint': {'type': 'string'},
7292 'type': {'type': 'string'}},
7293 'required': ['type', 'name'],
7294 'type': 'object'},
7295 'CloudSpecResult': {'additionalProperties': False,
7296 'properties': {'error': {'$ref': '#/definitions/Error'},
7297 'result': {'$ref': '#/definitions/CloudSpec'}},
7298 'type': 'object'},
7299 'CloudSpecResults': {'additionalProperties': False,
7300 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
7301 'type': 'array'}},
7302 'type': 'object'},
7303 'ControllerConfigResult': {'additionalProperties': False,
7304 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
7305 'type': 'object'}},
7306 'type': 'object'}},
7307 'required': ['config'],
7308 'type': 'object'},
7309 'Entities': {'additionalProperties': False,
7310 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7311 'type': 'array'}},
7312 'required': ['entities'],
7313 'type': 'object'},
7314 'Entity': {'additionalProperties': False,
7315 'properties': {'tag': {'type': 'string'}},
7316 'required': ['tag'],
7317 'type': 'object'},
7318 'EntityPassword': {'additionalProperties': False,
7319 'properties': {'password': {'type': 'string'},
7320 'tag': {'type': 'string'}},
7321 'required': ['tag', 'password'],
7322 'type': 'object'},
7323 'EntityPasswords': {'additionalProperties': False,
7324 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
7325 'type': 'array'}},
7326 'required': ['changes'],
7327 'type': 'object'},
7328 'Error': {'additionalProperties': False,
7329 'properties': {'code': {'type': 'string'},
7330 'info': {'$ref': '#/definitions/ErrorInfo'},
7331 'message': {'type': 'string'}},
7332 'required': ['message', 'code'],
7333 'type': 'object'},
7334 'ErrorInfo': {'additionalProperties': False,
7335 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7336 'macaroon-path': {'type': 'string'}},
7337 'type': 'object'},
7338 'ErrorResult': {'additionalProperties': False,
7339 'properties': {'error': {'$ref': '#/definitions/Error'}},
7340 'type': 'object'},
7341 'ErrorResults': {'additionalProperties': False,
7342 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7343 'type': 'array'}},
7344 'required': ['results'],
7345 'type': 'object'},
7346 'IsMasterResult': {'additionalProperties': False,
7347 'properties': {'master': {'type': 'boolean'}},
7348 'required': ['master'],
7349 'type': 'object'},
7350 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7351 'ModelConfigResult': {'additionalProperties': False,
7352 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
7353 'type': 'object'}},
7354 'type': 'object'}},
7355 'required': ['config'],
7356 'type': 'object'},
7357 'ModelTag': {'additionalProperties': False, 'type': 'object'},
7358 'NotifyWatchResult': {'additionalProperties': False,
7359 'properties': {'NotifyWatcherId': {'type': 'string'},
7360 'error': {'$ref': '#/definitions/Error'}},
7361 'required': ['NotifyWatcherId'],
7362 'type': 'object'},
7363 'NotifyWatchResults': {'additionalProperties': False,
7364 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
7365 'type': 'array'}},
7366 'required': ['results'],
7367 'type': 'object'},
7368 'StateServingInfo': {'additionalProperties': False,
7369 'properties': {'api-port': {'type': 'integer'},
7370 'ca-private-key': {'type': 'string'},
7371 'cert': {'type': 'string'},
7372 'private-key': {'type': 'string'},
7373 'shared-secret': {'type': 'string'},
7374 'state-port': {'type': 'integer'},
7375 'system-identity': {'type': 'string'}},
7376 'required': ['api-port',
7377 'state-port',
7378 'cert',
7379 'private-key',
7380 'ca-private-key',
7381 'shared-secret',
7382 'system-identity'],
7383 'type': 'object'}},
7384 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7385 'Result': {'$ref': '#/definitions/ErrorResults'}},
7386 'type': 'object'},
7387 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7388 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
7389 'type': 'object'},
7390 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
7391 'type': 'object'},
7392 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
7393 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
7394 'type': 'object'},
7395 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7396 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
7397 'type': 'object'},
7398 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
7399 'type': 'object'},
7400 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
7401 'type': 'object'},
7402 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
7403 'Result': {'$ref': '#/definitions/ErrorResults'}},
7404 'type': 'object'},
7405 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
7406 'type': 'object'},
7407 'WatchCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7408 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
7409 'type': 'object'},
7410 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
7411 'type': 'object'}},
7412 'type': 'object'}
7413
7414
7415 @ReturnMapping(ErrorResults)
7416 async def ClearReboot(self, entities):
7417 '''
7418 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7419 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7420 '''
7421 # map input types to rpc msg
7422 _params = dict()
7423 msg = dict(type='Agent', request='ClearReboot', version=2, params=_params)
7424 _params['entities'] = entities
7425 reply = await self.rpc(msg)
7426 return reply
7427
7428
7429
7430 @ReturnMapping(CloudSpecResults)
7431 async def CloudSpec(self, entities):
7432 '''
7433 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7434 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
7435 '''
7436 # map input types to rpc msg
7437 _params = dict()
7438 msg = dict(type='Agent', request='CloudSpec', version=2, params=_params)
7439 _params['entities'] = entities
7440 reply = await self.rpc(msg)
7441 return reply
7442
7443
7444
7445 @ReturnMapping(ControllerConfigResult)
7446 async def ControllerConfig(self):
7447 '''
7448
7449 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
7450 '''
7451 # map input types to rpc msg
7452 _params = dict()
7453 msg = dict(type='Agent', request='ControllerConfig', version=2, params=_params)
7454
7455 reply = await self.rpc(msg)
7456 return reply
7457
7458
7459
7460 @ReturnMapping(CloudSpecResult)
7461 async def GetCloudSpec(self):
7462 '''
7463
7464 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
7465 '''
7466 # map input types to rpc msg
7467 _params = dict()
7468 msg = dict(type='Agent', request='GetCloudSpec', version=2, params=_params)
7469
7470 reply = await self.rpc(msg)
7471 return reply
7472
7473
7474
7475 @ReturnMapping(AgentGetEntitiesResults)
7476 async def GetEntities(self, entities):
7477 '''
7478 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7479 Returns -> typing.Sequence<+T_co>[~AgentGetEntitiesResult]<~AgentGetEntitiesResult>
7480 '''
7481 # map input types to rpc msg
7482 _params = dict()
7483 msg = dict(type='Agent', request='GetEntities', version=2, params=_params)
7484 _params['entities'] = entities
7485 reply = await self.rpc(msg)
7486 return reply
7487
7488
7489
7490 @ReturnMapping(IsMasterResult)
7491 async def IsMaster(self):
7492 '''
7493
7494 Returns -> bool
7495 '''
7496 # map input types to rpc msg
7497 _params = dict()
7498 msg = dict(type='Agent', request='IsMaster', version=2, params=_params)
7499
7500 reply = await self.rpc(msg)
7501 return reply
7502
7503
7504
7505 @ReturnMapping(ModelConfigResult)
7506 async def ModelConfig(self):
7507 '''
7508
7509 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
7510 '''
7511 # map input types to rpc msg
7512 _params = dict()
7513 msg = dict(type='Agent', request='ModelConfig', version=2, params=_params)
7514
7515 reply = await self.rpc(msg)
7516 return reply
7517
7518
7519
7520 @ReturnMapping(ErrorResults)
7521 async def SetPasswords(self, changes):
7522 '''
7523 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
7524 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7525 '''
7526 # map input types to rpc msg
7527 _params = dict()
7528 msg = dict(type='Agent', request='SetPasswords', version=2, params=_params)
7529 _params['changes'] = changes
7530 reply = await self.rpc(msg)
7531 return reply
7532
7533
7534
7535 @ReturnMapping(StateServingInfo)
7536 async def StateServingInfo(self):
7537 '''
7538
7539 Returns -> typing.Union[int, str]
7540 '''
7541 # map input types to rpc msg
7542 _params = dict()
7543 msg = dict(type='Agent', request='StateServingInfo', version=2, params=_params)
7544
7545 reply = await self.rpc(msg)
7546 return reply
7547
7548
7549
7550 @ReturnMapping(NotifyWatchResults)
7551 async def WatchCredentials(self, entities):
7552 '''
7553 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7554 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
7555 '''
7556 # map input types to rpc msg
7557 _params = dict()
7558 msg = dict(type='Agent', request='WatchCredentials', version=2, params=_params)
7559 _params['entities'] = entities
7560 reply = await self.rpc(msg)
7561 return reply
7562
7563
7564
7565 @ReturnMapping(NotifyWatchResult)
7566 async def WatchForModelConfigChanges(self):
7567 '''
7568
7569 Returns -> typing.Union[str, _ForwardRef('Error')]
7570 '''
7571 # map input types to rpc msg
7572 _params = dict()
7573 msg = dict(type='Agent', request='WatchForModelConfigChanges', version=2, params=_params)
7574
7575 reply = await self.rpc(msg)
7576 return reply
7577
7578
7579 class AgentToolsFacade(Type):
7580 name = 'AgentTools'
7581 version = 1
7582 schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
7583
7584
7585 @ReturnMapping(None)
7586 async def UpdateToolsAvailable(self):
7587 '''
7588
7589 Returns -> None
7590 '''
7591 # map input types to rpc msg
7592 _params = dict()
7593 msg = dict(type='AgentTools', request='UpdateToolsAvailable', version=1, params=_params)
7594
7595 reply = await self.rpc(msg)
7596 return reply
7597
7598
7599 class AllModelWatcherFacade(Type):
7600 name = 'AllModelWatcher'
7601 version = 2
7602 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
7603 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
7604 'type': 'array'}},
7605 'required': ['deltas'],
7606 'type': 'object'},
7607 'Delta': {'additionalProperties': False,
7608 'properties': {'entity': {'additionalProperties': True,
7609 'type': 'object'},
7610 'removed': {'type': 'boolean'}},
7611 'required': ['removed', 'entity'],
7612 'type': 'object'}},
7613 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
7614 'type': 'object'},
7615 'Stop': {'type': 'object'}},
7616 'type': 'object'}
7617
7618
7619 @ReturnMapping(AllWatcherNextResults)
7620 async def Next(self):
7621 '''
7622
7623 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
7624 '''
7625 # map input types to rpc msg
7626 _params = dict()
7627 msg = dict(type='AllModelWatcher', request='Next', version=2, params=_params)
7628
7629 reply = await self.rpc(msg)
7630 return reply
7631
7632
7633
7634 @ReturnMapping(None)
7635 async def Stop(self):
7636 '''
7637
7638 Returns -> None
7639 '''
7640 # map input types to rpc msg
7641 _params = dict()
7642 msg = dict(type='AllModelWatcher', request='Stop', version=2, params=_params)
7643
7644 reply = await self.rpc(msg)
7645 return reply
7646
7647
7648 class AllWatcherFacade(Type):
7649 name = 'AllWatcher'
7650 version = 1
7651 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
7652 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
7653 'type': 'array'}},
7654 'required': ['deltas'],
7655 'type': 'object'},
7656 'Delta': {'additionalProperties': False,
7657 'properties': {'entity': {'additionalProperties': True,
7658 'type': 'object'},
7659 'removed': {'type': 'boolean'}},
7660 'required': ['removed', 'entity'],
7661 'type': 'object'}},
7662 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
7663 'type': 'object'},
7664 'Stop': {'type': 'object'}},
7665 'type': 'object'}
7666
7667
7668 @ReturnMapping(AllWatcherNextResults)
7669 async def Next(self):
7670 '''
7671
7672 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
7673 '''
7674 # map input types to rpc msg
7675 _params = dict()
7676 msg = dict(type='AllWatcher', request='Next', version=1, params=_params)
7677
7678 reply = await self.rpc(msg)
7679 return reply
7680
7681
7682
7683 @ReturnMapping(None)
7684 async def Stop(self):
7685 '''
7686
7687 Returns -> None
7688 '''
7689 # map input types to rpc msg
7690 _params = dict()
7691 msg = dict(type='AllWatcher', request='Stop', version=1, params=_params)
7692
7693 reply = await self.rpc(msg)
7694 return reply
7695
7696
7697 class AnnotationsFacade(Type):
7698 name = 'Annotations'
7699 version = 2
7700 schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
7701 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
7702 'type': 'object'},
7703 'entity': {'type': 'string'},
7704 'error': {'$ref': '#/definitions/ErrorResult'}},
7705 'required': ['entity', 'annotations'],
7706 'type': 'object'},
7707 'AnnotationsGetResults': {'additionalProperties': False,
7708 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
7709 'type': 'array'}},
7710 'required': ['results'],
7711 'type': 'object'},
7712 'AnnotationsSet': {'additionalProperties': False,
7713 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
7714 'type': 'array'}},
7715 'required': ['annotations'],
7716 'type': 'object'},
7717 'Entities': {'additionalProperties': False,
7718 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7719 'type': 'array'}},
7720 'required': ['entities'],
7721 'type': 'object'},
7722 'Entity': {'additionalProperties': False,
7723 'properties': {'tag': {'type': 'string'}},
7724 'required': ['tag'],
7725 'type': 'object'},
7726 'EntityAnnotations': {'additionalProperties': False,
7727 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
7728 'type': 'object'},
7729 'entity': {'type': 'string'}},
7730 'required': ['entity', 'annotations'],
7731 'type': 'object'},
7732 'Error': {'additionalProperties': False,
7733 'properties': {'code': {'type': 'string'},
7734 'info': {'$ref': '#/definitions/ErrorInfo'},
7735 'message': {'type': 'string'}},
7736 'required': ['message', 'code'],
7737 'type': 'object'},
7738 'ErrorInfo': {'additionalProperties': False,
7739 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7740 'macaroon-path': {'type': 'string'}},
7741 'type': 'object'},
7742 'ErrorResult': {'additionalProperties': False,
7743 'properties': {'error': {'$ref': '#/definitions/Error'}},
7744 'type': 'object'},
7745 'ErrorResults': {'additionalProperties': False,
7746 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7747 'type': 'array'}},
7748 'required': ['results'],
7749 'type': 'object'},
7750 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
7751 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7752 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
7753 'type': 'object'},
7754 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
7755 'Result': {'$ref': '#/definitions/ErrorResults'}},
7756 'type': 'object'}},
7757 'type': 'object'}
7758
7759
7760 @ReturnMapping(AnnotationsGetResults)
7761 async def Get(self, entities):
7762 '''
7763 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7764 Returns -> typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult>
7765 '''
7766 # map input types to rpc msg
7767 _params = dict()
7768 msg = dict(type='Annotations', request='Get', version=2, params=_params)
7769 _params['entities'] = entities
7770 reply = await self.rpc(msg)
7771 return reply
7772
7773
7774
7775 @ReturnMapping(ErrorResults)
7776 async def Set(self, annotations):
7777 '''
7778 annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations>
7779 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7780 '''
7781 # map input types to rpc msg
7782 _params = dict()
7783 msg = dict(type='Annotations', request='Set', version=2, params=_params)
7784 _params['annotations'] = annotations
7785 reply = await self.rpc(msg)
7786 return reply
7787
7788
7789 class ApplicationFacade(Type):
7790 name = 'Application'
7791 version = 3
7792 schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
7793 'properties': {'application': {'type': 'string'},
7794 'num-units': {'type': 'integer'},
7795 'placement': {'items': {'$ref': '#/definitions/Placement'},
7796 'type': 'array'}},
7797 'required': ['application',
7798 'num-units',
7799 'placement'],
7800 'type': 'object'},
7801 'AddApplicationUnitsResults': {'additionalProperties': False,
7802 'properties': {'units': {'items': {'type': 'string'},
7803 'type': 'array'}},
7804 'required': ['units'],
7805 'type': 'object'},
7806 'AddRelation': {'additionalProperties': False,
7807 'properties': {'endpoints': {'items': {'type': 'string'},
7808 'type': 'array'}},
7809 'required': ['endpoints'],
7810 'type': 'object'},
7811 'AddRelationResults': {'additionalProperties': False,
7812 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
7813 'type': 'object'}},
7814 'required': ['endpoints'],
7815 'type': 'object'},
7816 'ApplicationCharmRelations': {'additionalProperties': False,
7817 'properties': {'application': {'type': 'string'}},
7818 'required': ['application'],
7819 'type': 'object'},
7820 'ApplicationCharmRelationsResults': {'additionalProperties': False,
7821 'properties': {'charm-relations': {'items': {'type': 'string'},
7822 'type': 'array'}},
7823 'required': ['charm-relations'],
7824 'type': 'object'},
7825 'ApplicationDeploy': {'additionalProperties': False,
7826 'properties': {'application': {'type': 'string'},
7827 'channel': {'type': 'string'},
7828 'charm-url': {'type': 'string'},
7829 'config': {'patternProperties': {'.*': {'type': 'string'}},
7830 'type': 'object'},
7831 'config-yaml': {'type': 'string'},
7832 'constraints': {'$ref': '#/definitions/Value'},
7833 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
7834 'type': 'object'},
7835 'num-units': {'type': 'integer'},
7836 'placement': {'items': {'$ref': '#/definitions/Placement'},
7837 'type': 'array'},
7838 'resources': {'patternProperties': {'.*': {'type': 'string'}},
7839 'type': 'object'},
7840 'series': {'type': 'string'},
7841 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
7842 'type': 'object'}},
7843 'required': ['application',
7844 'series',
7845 'charm-url',
7846 'channel',
7847 'num-units',
7848 'config-yaml',
7849 'constraints'],
7850 'type': 'object'},
7851 'ApplicationDestroy': {'additionalProperties': False,
7852 'properties': {'application': {'type': 'string'}},
7853 'required': ['application'],
7854 'type': 'object'},
7855 'ApplicationExpose': {'additionalProperties': False,
7856 'properties': {'application': {'type': 'string'}},
7857 'required': ['application'],
7858 'type': 'object'},
7859 'ApplicationGet': {'additionalProperties': False,
7860 'properties': {'application': {'type': 'string'}},
7861 'required': ['application'],
7862 'type': 'object'},
7863 'ApplicationGetResults': {'additionalProperties': False,
7864 'properties': {'application': {'type': 'string'},
7865 'charm': {'type': 'string'},
7866 'config': {'patternProperties': {'.*': {'additionalProperties': True,
7867 'type': 'object'}},
7868 'type': 'object'},
7869 'constraints': {'$ref': '#/definitions/Value'},
7870 'series': {'type': 'string'}},
7871 'required': ['application',
7872 'charm',
7873 'config',
7874 'constraints',
7875 'series'],
7876 'type': 'object'},
7877 'ApplicationMetricCredential': {'additionalProperties': False,
7878 'properties': {'application': {'type': 'string'},
7879 'metrics-credentials': {'items': {'type': 'integer'},
7880 'type': 'array'}},
7881 'required': ['application',
7882 'metrics-credentials'],
7883 'type': 'object'},
7884 'ApplicationMetricCredentials': {'additionalProperties': False,
7885 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
7886 'type': 'array'}},
7887 'required': ['creds'],
7888 'type': 'object'},
7889 'ApplicationSet': {'additionalProperties': False,
7890 'properties': {'application': {'type': 'string'},
7891 'options': {'patternProperties': {'.*': {'type': 'string'}},
7892 'type': 'object'}},
7893 'required': ['application', 'options'],
7894 'type': 'object'},
7895 'ApplicationSetCharm': {'additionalProperties': False,
7896 'properties': {'application': {'type': 'string'},
7897 'channel': {'type': 'string'},
7898 'charm-url': {'type': 'string'},
7899 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
7900 'type': 'object'},
7901 'config-settings-yaml': {'type': 'string'},
7902 'force-series': {'type': 'boolean'},
7903 'force-units': {'type': 'boolean'},
7904 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
7905 'type': 'object'},
7906 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
7907 'type': 'object'}},
7908 'required': ['application',
7909 'charm-url',
7910 'channel',
7911 'force-units',
7912 'force-series'],
7913 'type': 'object'},
7914 'ApplicationUnexpose': {'additionalProperties': False,
7915 'properties': {'application': {'type': 'string'}},
7916 'required': ['application'],
7917 'type': 'object'},
7918 'ApplicationUnset': {'additionalProperties': False,
7919 'properties': {'application': {'type': 'string'},
7920 'options': {'items': {'type': 'string'},
7921 'type': 'array'}},
7922 'required': ['application', 'options'],
7923 'type': 'object'},
7924 'ApplicationUpdate': {'additionalProperties': False,
7925 'properties': {'application': {'type': 'string'},
7926 'charm-url': {'type': 'string'},
7927 'constraints': {'$ref': '#/definitions/Value'},
7928 'force-charm-url': {'type': 'boolean'},
7929 'force-series': {'type': 'boolean'},
7930 'min-units': {'type': 'integer'},
7931 'settings': {'patternProperties': {'.*': {'type': 'string'}},
7932 'type': 'object'},
7933 'settings-yaml': {'type': 'string'}},
7934 'required': ['application',
7935 'charm-url',
7936 'force-charm-url',
7937 'force-series',
7938 'settings-yaml'],
7939 'type': 'object'},
7940 'ApplicationsDeploy': {'additionalProperties': False,
7941 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
7942 'type': 'array'}},
7943 'required': ['applications'],
7944 'type': 'object'},
7945 'CharmRelation': {'additionalProperties': False,
7946 'properties': {'interface': {'type': 'string'},
7947 'limit': {'type': 'integer'},
7948 'name': {'type': 'string'},
7949 'optional': {'type': 'boolean'},
7950 'role': {'type': 'string'},
7951 'scope': {'type': 'string'}},
7952 'required': ['name',
7953 'role',
7954 'interface',
7955 'optional',
7956 'limit',
7957 'scope'],
7958 'type': 'object'},
7959 'Constraints': {'additionalProperties': False,
7960 'properties': {'Count': {'type': 'integer'},
7961 'Pool': {'type': 'string'},
7962 'Size': {'type': 'integer'}},
7963 'required': ['Pool', 'Size', 'Count'],
7964 'type': 'object'},
7965 'DestroyApplicationUnits': {'additionalProperties': False,
7966 'properties': {'unit-names': {'items': {'type': 'string'},
7967 'type': 'array'}},
7968 'required': ['unit-names'],
7969 'type': 'object'},
7970 'DestroyRelation': {'additionalProperties': False,
7971 'properties': {'endpoints': {'items': {'type': 'string'},
7972 'type': 'array'}},
7973 'required': ['endpoints'],
7974 'type': 'object'},
7975 'Error': {'additionalProperties': False,
7976 'properties': {'code': {'type': 'string'},
7977 'info': {'$ref': '#/definitions/ErrorInfo'},
7978 'message': {'type': 'string'}},
7979 'required': ['message', 'code'],
7980 'type': 'object'},
7981 'ErrorInfo': {'additionalProperties': False,
7982 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7983 'macaroon-path': {'type': 'string'}},
7984 'type': 'object'},
7985 'ErrorResult': {'additionalProperties': False,
7986 'properties': {'error': {'$ref': '#/definitions/Error'}},
7987 'type': 'object'},
7988 'ErrorResults': {'additionalProperties': False,
7989 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7990 'type': 'array'}},
7991 'required': ['results'],
7992 'type': 'object'},
7993 'GetApplicationConstraints': {'additionalProperties': False,
7994 'properties': {'application': {'type': 'string'}},
7995 'required': ['application'],
7996 'type': 'object'},
7997 'GetConstraintsResults': {'additionalProperties': False,
7998 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
7999 'required': ['constraints'],
8000 'type': 'object'},
8001 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8002 'Placement': {'additionalProperties': False,
8003 'properties': {'directive': {'type': 'string'},
8004 'scope': {'type': 'string'}},
8005 'required': ['scope', 'directive'],
8006 'type': 'object'},
8007 'SetConstraints': {'additionalProperties': False,
8008 'properties': {'application': {'type': 'string'},
8009 'constraints': {'$ref': '#/definitions/Value'}},
8010 'required': ['application', 'constraints'],
8011 'type': 'object'},
8012 'StorageConstraints': {'additionalProperties': False,
8013 'properties': {'count': {'type': 'integer'},
8014 'pool': {'type': 'string'},
8015 'size': {'type': 'integer'}},
8016 'type': 'object'},
8017 'StringResult': {'additionalProperties': False,
8018 'properties': {'error': {'$ref': '#/definitions/Error'},
8019 'result': {'type': 'string'}},
8020 'required': ['result'],
8021 'type': 'object'},
8022 'Value': {'additionalProperties': False,
8023 'properties': {'arch': {'type': 'string'},
8024 'container': {'type': 'string'},
8025 'cores': {'type': 'integer'},
8026 'cpu-power': {'type': 'integer'},
8027 'instance-type': {'type': 'string'},
8028 'mem': {'type': 'integer'},
8029 'root-disk': {'type': 'integer'},
8030 'spaces': {'items': {'type': 'string'},
8031 'type': 'array'},
8032 'tags': {'items': {'type': 'string'},
8033 'type': 'array'},
8034 'virt-type': {'type': 'string'}},
8035 'type': 'object'}},
8036 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
8037 'Result': {'$ref': '#/definitions/AddRelationResults'}},
8038 'type': 'object'},
8039 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
8040 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
8041 'type': 'object'},
8042 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
8043 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
8044 'type': 'object'},
8045 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
8046 'Result': {'$ref': '#/definitions/ErrorResults'}},
8047 'type': 'object'},
8048 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
8049 'type': 'object'},
8050 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
8051 'type': 'object'},
8052 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
8053 'type': 'object'},
8054 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
8055 'type': 'object'},
8056 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
8057 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
8058 'type': 'object'},
8059 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
8060 'Result': {'$ref': '#/definitions/StringResult'}},
8061 'type': 'object'},
8062 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
8063 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
8064 'type': 'object'},
8065 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
8066 'type': 'object'},
8067 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
8068 'type': 'object'},
8069 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
8070 'type': 'object'},
8071 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
8072 'Result': {'$ref': '#/definitions/ErrorResults'}},
8073 'type': 'object'},
8074 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
8075 'type': 'object'},
8076 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
8077 'type': 'object'},
8078 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
8079 'type': 'object'}},
8080 'type': 'object'}
8081
8082
8083 @ReturnMapping(AddRelationResults)
8084 async def AddRelation(self, endpoints):
8085 '''
8086 endpoints : typing.Sequence<+T_co>[str]
8087 Returns -> typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
8088 '''
8089 # map input types to rpc msg
8090 _params = dict()
8091 msg = dict(type='Application', request='AddRelation', version=3, params=_params)
8092 _params['endpoints'] = endpoints
8093 reply = await self.rpc(msg)
8094 return reply
8095
8096
8097
8098 @ReturnMapping(AddApplicationUnitsResults)
8099 async def AddUnits(self, application, num_units, placement):
8100 '''
8101 application : str
8102 num_units : int
8103 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
8104 Returns -> typing.Sequence<+T_co>[str]
8105 '''
8106 # map input types to rpc msg
8107 _params = dict()
8108 msg = dict(type='Application', request='AddUnits', version=3, params=_params)
8109 _params['application'] = application
8110 _params['num-units'] = num_units
8111 _params['placement'] = placement
8112 reply = await self.rpc(msg)
8113 return reply
8114
8115
8116
8117 @ReturnMapping(ApplicationCharmRelationsResults)
8118 async def CharmRelations(self, application):
8119 '''
8120 application : str
8121 Returns -> typing.Sequence<+T_co>[str]
8122 '''
8123 # map input types to rpc msg
8124 _params = dict()
8125 msg = dict(type='Application', request='CharmRelations', version=3, params=_params)
8126 _params['application'] = application
8127 reply = await self.rpc(msg)
8128 return reply
8129
8130
8131
8132 @ReturnMapping(ErrorResults)
8133 async def Deploy(self, applications):
8134 '''
8135 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
8136 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
8137 '''
8138 # map input types to rpc msg
8139 _params = dict()
8140 msg = dict(type='Application', request='Deploy', version=3, params=_params)
8141 _params['applications'] = applications
8142 reply = await self.rpc(msg)
8143 return reply
8144
8145
8146
8147 @ReturnMapping(None)
8148 async def Destroy(self, application):
8149 '''
8150 application : str
8151 Returns -> None
8152 '''
8153 # map input types to rpc msg
8154 _params = dict()
8155 msg = dict(type='Application', request='Destroy', version=3, params=_params)
8156 _params['application'] = application
8157 reply = await self.rpc(msg)
8158 return reply
8159
8160
8161
8162 @ReturnMapping(None)
8163 async def DestroyRelation(self, endpoints):
8164 '''
8165 endpoints : typing.Sequence<+T_co>[str]
8166 Returns -> None
8167 '''
8168 # map input types to rpc msg
8169 _params = dict()
8170 msg = dict(type='Application', request='DestroyRelation', version=3, params=_params)
8171 _params['endpoints'] = endpoints
8172 reply = await self.rpc(msg)
8173 return reply
8174
8175
8176
8177 @ReturnMapping(None)
8178 async def DestroyUnits(self, unit_names):
8179 '''
8180 unit_names : typing.Sequence<+T_co>[str]
8181 Returns -> None
8182 '''
8183 # map input types to rpc msg
8184 _params = dict()
8185 msg = dict(type='Application', request='DestroyUnits', version=3, params=_params)
8186 _params['unit-names'] = unit_names
8187 reply = await self.rpc(msg)
8188 return reply
8189
8190
8191
8192 @ReturnMapping(None)
8193 async def Expose(self, application):
8194 '''
8195 application : str
8196 Returns -> None
8197 '''
8198 # map input types to rpc msg
8199 _params = dict()
8200 msg = dict(type='Application', request='Expose', version=3, params=_params)
8201 _params['application'] = application
8202 reply = await self.rpc(msg)
8203 return reply
8204
8205
8206
8207 @ReturnMapping(ApplicationGetResults)
8208 async def Get(self, application):
8209 '''
8210 application : str
8211 Returns -> typing.Union[str, typing.Mapping<~KT, +VT_co>[str, typing.Any], _ForwardRef('Value')]
8212 '''
8213 # map input types to rpc msg
8214 _params = dict()
8215 msg = dict(type='Application', request='Get', version=3, params=_params)
8216 _params['application'] = application
8217 reply = await self.rpc(msg)
8218 return reply
8219
8220
8221
8222 @ReturnMapping(StringResult)
8223 async def GetCharmURL(self, application):
8224 '''
8225 application : str
8226 Returns -> typing.Union[_ForwardRef('Error'), str]
8227 '''
8228 # map input types to rpc msg
8229 _params = dict()
8230 msg = dict(type='Application', request='GetCharmURL', version=3, params=_params)
8231 _params['application'] = application
8232 reply = await self.rpc(msg)
8233 return reply
8234
8235
8236
8237 @ReturnMapping(GetConstraintsResults)
8238 async def GetConstraints(self, application):
8239 '''
8240 application : str
8241 Returns -> Value
8242 '''
8243 # map input types to rpc msg
8244 _params = dict()
8245 msg = dict(type='Application', request='GetConstraints', version=3, params=_params)
8246 _params['application'] = application
8247 reply = await self.rpc(msg)
8248 return reply
8249
8250
8251
8252 @ReturnMapping(None)
8253 async def Set(self, application, options):
8254 '''
8255 application : str
8256 options : typing.Mapping<~KT, +VT_co>[str, str]
8257 Returns -> None
8258 '''
8259 # map input types to rpc msg
8260 _params = dict()
8261 msg = dict(type='Application', request='Set', version=3, params=_params)
8262 _params['application'] = application
8263 _params['options'] = options
8264 reply = await self.rpc(msg)
8265 return reply
8266
8267
8268
8269 @ReturnMapping(None)
8270 async def SetCharm(self, application, channel, charm_url, config_settings, config_settings_yaml, force_series, force_units, resource_ids, storage_constraints):
8271 '''
8272 application : str
8273 channel : str
8274 charm_url : str
8275 config_settings : typing.Mapping<~KT, +VT_co>[str, str]
8276 config_settings_yaml : str
8277 force_series : bool
8278 force_units : bool
8279 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
8280 storage_constraints : typing.Mapping<~KT, +VT_co>[str, ~StorageConstraints]<~StorageConstraints>
8281 Returns -> None
8282 '''
8283 # map input types to rpc msg
8284 _params = dict()
8285 msg = dict(type='Application', request='SetCharm', version=3, params=_params)
8286 _params['application'] = application
8287 _params['channel'] = channel
8288 _params['charm-url'] = charm_url
8289 _params['config-settings'] = config_settings
8290 _params['config-settings-yaml'] = config_settings_yaml
8291 _params['force-series'] = force_series
8292 _params['force-units'] = force_units
8293 _params['resource-ids'] = resource_ids
8294 _params['storage-constraints'] = storage_constraints
8295 reply = await self.rpc(msg)
8296 return reply
8297
8298
8299
8300 @ReturnMapping(None)
8301 async def SetConstraints(self, application, constraints):
8302 '''
8303 application : str
8304 constraints : Value
8305 Returns -> None
8306 '''
8307 # map input types to rpc msg
8308 _params = dict()
8309 msg = dict(type='Application', request='SetConstraints', version=3, params=_params)
8310 _params['application'] = application
8311 _params['constraints'] = constraints
8312 reply = await self.rpc(msg)
8313 return reply
8314
8315
8316
8317 @ReturnMapping(ErrorResults)
8318 async def SetMetricCredentials(self, creds):
8319 '''
8320 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
8321 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
8322 '''
8323 # map input types to rpc msg
8324 _params = dict()
8325 msg = dict(type='Application', request='SetMetricCredentials', version=3, params=_params)
8326 _params['creds'] = creds
8327 reply = await self.rpc(msg)
8328 return reply
8329
8330
8331
8332 @ReturnMapping(None)
8333 async def Unexpose(self, application):
8334 '''
8335 application : str
8336 Returns -> None
8337 '''
8338 # map input types to rpc msg
8339 _params = dict()
8340 msg = dict(type='Application', request='Unexpose', version=3, params=_params)
8341 _params['application'] = application
8342 reply = await self.rpc(msg)
8343 return reply
8344
8345
8346
8347 @ReturnMapping(None)
8348 async def Unset(self, application, options):
8349 '''
8350 application : str
8351 options : typing.Sequence<+T_co>[str]
8352 Returns -> None
8353 '''
8354 # map input types to rpc msg
8355 _params = dict()
8356 msg = dict(type='Application', request='Unset', version=3, params=_params)
8357 _params['application'] = application
8358 _params['options'] = options
8359 reply = await self.rpc(msg)
8360 return reply
8361
8362
8363
8364 @ReturnMapping(None)
8365 async def Update(self, application, charm_url, constraints, force_charm_url, force_series, min_units, settings, settings_yaml):
8366 '''
8367 application : str
8368 charm_url : str
8369 constraints : Value
8370 force_charm_url : bool
8371 force_series : bool
8372 min_units : int
8373 settings : typing.Mapping<~KT, +VT_co>[str, str]
8374 settings_yaml : str
8375 Returns -> None
8376 '''
8377 # map input types to rpc msg
8378 _params = dict()
8379 msg = dict(type='Application', request='Update', version=3, params=_params)
8380 _params['application'] = application
8381 _params['charm-url'] = charm_url
8382 _params['constraints'] = constraints
8383 _params['force-charm-url'] = force_charm_url
8384 _params['force-series'] = force_series
8385 _params['min-units'] = min_units
8386 _params['settings'] = settings
8387 _params['settings-yaml'] = settings_yaml
8388 reply = await self.rpc(msg)
8389 return reply
8390
8391
8392 class ApplicationScalerFacade(Type):
8393 name = 'ApplicationScaler'
8394 version = 1
8395 schema = {'definitions': {'Entities': {'additionalProperties': False,
8396 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
8397 'type': 'array'}},
8398 'required': ['entities'],
8399 'type': 'object'},
8400 'Entity': {'additionalProperties': False,
8401 'properties': {'tag': {'type': 'string'}},
8402 'required': ['tag'],
8403 'type': 'object'},
8404 'Error': {'additionalProperties': False,
8405 'properties': {'code': {'type': 'string'},
8406 'info': {'$ref': '#/definitions/ErrorInfo'},
8407 'message': {'type': 'string'}},
8408 'required': ['message', 'code'],
8409 'type': 'object'},
8410 'ErrorInfo': {'additionalProperties': False,
8411 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8412 'macaroon-path': {'type': 'string'}},
8413 'type': 'object'},
8414 'ErrorResult': {'additionalProperties': False,
8415 'properties': {'error': {'$ref': '#/definitions/Error'}},
8416 'type': 'object'},
8417 'ErrorResults': {'additionalProperties': False,
8418 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
8419 'type': 'array'}},
8420 'required': ['results'],
8421 'type': 'object'},
8422 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8423 'StringsWatchResult': {'additionalProperties': False,
8424 'properties': {'changes': {'items': {'type': 'string'},
8425 'type': 'array'},
8426 'error': {'$ref': '#/definitions/Error'},
8427 'watcher-id': {'type': 'string'}},
8428 'required': ['watcher-id'],
8429 'type': 'object'}},
8430 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8431 'Result': {'$ref': '#/definitions/ErrorResults'}},
8432 'type': 'object'},
8433 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
8434 'type': 'object'}},
8435 'type': 'object'}
8436
8437
8438 @ReturnMapping(ErrorResults)
8439 async def Rescale(self, entities):
8440 '''
8441 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
8442 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
8443 '''
8444 # map input types to rpc msg
8445 _params = dict()
8446 msg = dict(type='ApplicationScaler', request='Rescale', version=1, params=_params)
8447 _params['entities'] = entities
8448 reply = await self.rpc(msg)
8449 return reply
8450
8451
8452
8453 @ReturnMapping(StringsWatchResult)
8454 async def Watch(self):
8455 '''
8456
8457 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
8458 '''
8459 # map input types to rpc msg
8460 _params = dict()
8461 msg = dict(type='ApplicationScaler', request='Watch', version=1, params=_params)
8462
8463 reply = await self.rpc(msg)
8464 return reply
8465
8466
8467 class BackupsFacade(Type):
8468 name = 'Backups'
8469 version = 1
8470 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
8471 'properties': {'notes': {'type': 'string'}},
8472 'required': ['notes'],
8473 'type': 'object'},
8474 'BackupsInfoArgs': {'additionalProperties': False,
8475 'properties': {'id': {'type': 'string'}},
8476 'required': ['id'],
8477 'type': 'object'},
8478 'BackupsListArgs': {'additionalProperties': False,
8479 'type': 'object'},
8480 'BackupsListResult': {'additionalProperties': False,
8481 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
8482 'type': 'array'}},
8483 'required': ['list'],
8484 'type': 'object'},
8485 'BackupsMetadataResult': {'additionalProperties': False,
8486 'properties': {'ca-cert': {'type': 'string'},
8487 'ca-private-key': {'type': 'string'},
8488 'checksum': {'type': 'string'},
8489 'checksum-format': {'type': 'string'},
8490 'finished': {'format': 'date-time',
8491 'type': 'string'},
8492 'hostname': {'type': 'string'},
8493 'id': {'type': 'string'},
8494 'machine': {'type': 'string'},
8495 'model': {'type': 'string'},
8496 'notes': {'type': 'string'},
8497 'series': {'type': 'string'},
8498 'size': {'type': 'integer'},
8499 'started': {'format': 'date-time',
8500 'type': 'string'},
8501 'stored': {'format': 'date-time',
8502 'type': 'string'},
8503 'version': {'$ref': '#/definitions/Number'}},
8504 'required': ['id',
8505 'checksum',
8506 'checksum-format',
8507 'size',
8508 'stored',
8509 'started',
8510 'finished',
8511 'notes',
8512 'model',
8513 'machine',
8514 'hostname',
8515 'version',
8516 'series',
8517 'ca-cert',
8518 'ca-private-key'],
8519 'type': 'object'},
8520 'BackupsRemoveArgs': {'additionalProperties': False,
8521 'properties': {'id': {'type': 'string'}},
8522 'required': ['id'],
8523 'type': 'object'},
8524 'Number': {'additionalProperties': False,
8525 'properties': {'Build': {'type': 'integer'},
8526 'Major': {'type': 'integer'},
8527 'Minor': {'type': 'integer'},
8528 'Patch': {'type': 'integer'},
8529 'Tag': {'type': 'string'}},
8530 'required': ['Major',
8531 'Minor',
8532 'Tag',
8533 'Patch',
8534 'Build'],
8535 'type': 'object'},
8536 'RestoreArgs': {'additionalProperties': False,
8537 'properties': {'backup-id': {'type': 'string'}},
8538 'required': ['backup-id'],
8539 'type': 'object'}},
8540 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
8541 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
8542 'type': 'object'},
8543 'FinishRestore': {'type': 'object'},
8544 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
8545 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
8546 'type': 'object'},
8547 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
8548 'Result': {'$ref': '#/definitions/BackupsListResult'}},
8549 'type': 'object'},
8550 'PrepareRestore': {'type': 'object'},
8551 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
8552 'type': 'object'},
8553 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
8554 'type': 'object'}},
8555 'type': 'object'}
8556
8557
8558 @ReturnMapping(BackupsMetadataResult)
8559 async def Create(self, notes):
8560 '''
8561 notes : str
8562 Returns -> typing.Union[str, int, _ForwardRef('Number')]
8563 '''
8564 # map input types to rpc msg
8565 _params = dict()
8566 msg = dict(type='Backups', request='Create', version=1, params=_params)
8567 _params['notes'] = notes
8568 reply = await self.rpc(msg)
8569 return reply
8570
8571
8572
8573 @ReturnMapping(None)
8574 async def FinishRestore(self):
8575 '''
8576
8577 Returns -> None
8578 '''
8579 # map input types to rpc msg
8580 _params = dict()
8581 msg = dict(type='Backups', request='FinishRestore', version=1, params=_params)
8582
8583 reply = await self.rpc(msg)
8584 return reply
8585
8586
8587
8588 @ReturnMapping(BackupsMetadataResult)
8589 async def Info(self, id_):
8590 '''
8591 id_ : str
8592 Returns -> typing.Union[str, int, _ForwardRef('Number')]
8593 '''
8594 # map input types to rpc msg
8595 _params = dict()
8596 msg = dict(type='Backups', request='Info', version=1, params=_params)
8597 _params['id'] = id_
8598 reply = await self.rpc(msg)
8599 return reply
8600
8601
8602
8603 @ReturnMapping(BackupsListResult)
8604 async def List(self):
8605 '''
8606
8607 Returns -> typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
8608 '''
8609 # map input types to rpc msg
8610 _params = dict()
8611 msg = dict(type='Backups', request='List', version=1, params=_params)
8612
8613 reply = await self.rpc(msg)
8614 return reply
8615
8616
8617
8618 @ReturnMapping(None)
8619 async def PrepareRestore(self):
8620 '''
8621
8622 Returns -> None
8623 '''
8624 # map input types to rpc msg
8625 _params = dict()
8626 msg = dict(type='Backups', request='PrepareRestore', version=1, params=_params)
8627
8628 reply = await self.rpc(msg)
8629 return reply
8630
8631
8632
8633 @ReturnMapping(None)
8634 async def Remove(self, id_):
8635 '''
8636 id_ : str
8637 Returns -> None
8638 '''
8639 # map input types to rpc msg
8640 _params = dict()
8641 msg = dict(type='Backups', request='Remove', version=1, params=_params)
8642 _params['id'] = id_
8643 reply = await self.rpc(msg)
8644 return reply
8645
8646
8647
8648 @ReturnMapping(None)
8649 async def Restore(self, backup_id):
8650 '''
8651 backup_id : str
8652 Returns -> None
8653 '''
8654 # map input types to rpc msg
8655 _params = dict()
8656 msg = dict(type='Backups', request='Restore', version=1, params=_params)
8657 _params['backup-id'] = backup_id
8658 reply = await self.rpc(msg)
8659 return reply
8660
8661
8662 class BlockFacade(Type):
8663 name = 'Block'
8664 version = 2
8665 schema = {'definitions': {'Block': {'additionalProperties': False,
8666 'properties': {'id': {'type': 'string'},
8667 'message': {'type': 'string'},
8668 'tag': {'type': 'string'},
8669 'type': {'type': 'string'}},
8670 'required': ['id', 'tag', 'type'],
8671 'type': 'object'},
8672 'BlockResult': {'additionalProperties': False,
8673 'properties': {'error': {'$ref': '#/definitions/Error'},
8674 'result': {'$ref': '#/definitions/Block'}},
8675 'required': ['result'],
8676 'type': 'object'},
8677 'BlockResults': {'additionalProperties': False,
8678 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
8679 'type': 'array'}},
8680 'type': 'object'},
8681 'BlockSwitchParams': {'additionalProperties': False,
8682 'properties': {'message': {'type': 'string'},
8683 'type': {'type': 'string'}},
8684 'required': ['type'],
8685 'type': 'object'},
8686 'Error': {'additionalProperties': False,
8687 'properties': {'code': {'type': 'string'},
8688 'info': {'$ref': '#/definitions/ErrorInfo'},
8689 'message': {'type': 'string'}},
8690 'required': ['message', 'code'],
8691 'type': 'object'},
8692 'ErrorInfo': {'additionalProperties': False,
8693 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8694 'macaroon-path': {'type': 'string'}},
8695 'type': 'object'},
8696 'ErrorResult': {'additionalProperties': False,
8697 'properties': {'error': {'$ref': '#/definitions/Error'}},
8698 'type': 'object'},
8699 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
8700 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
8701 'type': 'object'},
8702 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
8703 'Result': {'$ref': '#/definitions/ErrorResult'}},
8704 'type': 'object'},
8705 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
8706 'Result': {'$ref': '#/definitions/ErrorResult'}},
8707 'type': 'object'}},
8708 'type': 'object'}
8709
8710
8711 @ReturnMapping(BlockResults)
8712 async def List(self):
8713 '''
8714
8715 Returns -> typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
8716 '''
8717 # map input types to rpc msg
8718 _params = dict()
8719 msg = dict(type='Block', request='List', version=2, params=_params)
8720
8721 reply = await self.rpc(msg)
8722 return reply
8723
8724
8725
8726 @ReturnMapping(ErrorResult)
8727 async def SwitchBlockOff(self, message, type_):
8728 '''
8729 message : str
8730 type_ : str
8731 Returns -> Error
8732 '''
8733 # map input types to rpc msg
8734 _params = dict()
8735 msg = dict(type='Block', request='SwitchBlockOff', version=2, params=_params)
8736 _params['message'] = message
8737 _params['type'] = type_
8738 reply = await self.rpc(msg)
8739 return reply
8740
8741
8742
8743 @ReturnMapping(ErrorResult)
8744 async def SwitchBlockOn(self, message, type_):
8745 '''
8746 message : str
8747 type_ : str
8748 Returns -> Error
8749 '''
8750 # map input types to rpc msg
8751 _params = dict()
8752 msg = dict(type='Block', request='SwitchBlockOn', version=2, params=_params)
8753 _params['message'] = message
8754 _params['type'] = type_
8755 reply = await self.rpc(msg)
8756 return reply
8757
8758
8759 class BundleFacade(Type):
8760 name = 'Bundle'
8761 version = 1
8762 schema = {'definitions': {'BundleChange': {'additionalProperties': False,
8763 'properties': {'args': {'items': {'additionalProperties': True,
8764 'type': 'object'},
8765 'type': 'array'},
8766 'id': {'type': 'string'},
8767 'method': {'type': 'string'},
8768 'requires': {'items': {'type': 'string'},
8769 'type': 'array'}},
8770 'required': ['id',
8771 'method',
8772 'args',
8773 'requires'],
8774 'type': 'object'},
8775 'BundleChangesParams': {'additionalProperties': False,
8776 'properties': {'yaml': {'type': 'string'}},
8777 'required': ['yaml'],
8778 'type': 'object'},
8779 'BundleChangesResults': {'additionalProperties': False,
8780 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
8781 'type': 'array'},
8782 'errors': {'items': {'type': 'string'},
8783 'type': 'array'}},
8784 'type': 'object'}},
8785 'properties': {'GetChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
8786 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
8787 'type': 'object'}},
8788 'type': 'object'}
8789
8790
8791 @ReturnMapping(BundleChangesResults)
8792 async def GetChanges(self, yaml):
8793 '''
8794 yaml : str
8795 Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
8796 '''
8797 # map input types to rpc msg
8798 _params = dict()
8799 msg = dict(type='Bundle', request='GetChanges', version=1, params=_params)
8800 _params['yaml'] = yaml
8801 reply = await self.rpc(msg)
8802 return reply
8803
8804
8805 class CharmRevisionUpdaterFacade(Type):
8806 name = 'CharmRevisionUpdater'
8807 version = 2
8808 schema = {'definitions': {'Error': {'additionalProperties': False,
8809 'properties': {'code': {'type': 'string'},
8810 'info': {'$ref': '#/definitions/ErrorInfo'},
8811 'message': {'type': 'string'}},
8812 'required': ['message', 'code'],
8813 'type': 'object'},
8814 'ErrorInfo': {'additionalProperties': False,
8815 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8816 'macaroon-path': {'type': 'string'}},
8817 'type': 'object'},
8818 'ErrorResult': {'additionalProperties': False,
8819 'properties': {'error': {'$ref': '#/definitions/Error'}},
8820 'type': 'object'},
8821 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
8822 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
8823 'type': 'object'}},
8824 'type': 'object'}
8825
8826
8827 @ReturnMapping(ErrorResult)
8828 async def UpdateLatestRevisions(self):
8829 '''
8830
8831 Returns -> Error
8832 '''
8833 # map input types to rpc msg
8834 _params = dict()
8835 msg = dict(type='CharmRevisionUpdater', request='UpdateLatestRevisions', version=2, params=_params)
8836
8837 reply = await self.rpc(msg)
8838 return reply
8839
8840
8841 class CharmsFacade(Type):
8842 name = 'Charms'
8843 version = 2
8844 schema = {'definitions': {'CharmActionSpec': {'additionalProperties': False,
8845 'properties': {'description': {'type': 'string'},
8846 'params': {'patternProperties': {'.*': {'additionalProperties': True,
8847 'type': 'object'}},
8848 'type': 'object'}},
8849 'required': ['description', 'params'],
8850 'type': 'object'},
8851 'CharmActions': {'additionalProperties': False,
8852 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}},
8853 'type': 'object'}},
8854 'type': 'object'},
8855 'CharmInfo': {'additionalProperties': False,
8856 'properties': {'actions': {'$ref': '#/definitions/CharmActions'},
8857 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}},
8858 'type': 'object'},
8859 'meta': {'$ref': '#/definitions/CharmMeta'},
8860 'metrics': {'$ref': '#/definitions/CharmMetrics'},
8861 'revision': {'type': 'integer'},
8862 'url': {'type': 'string'}},
8863 'required': ['revision', 'url', 'config'],
8864 'type': 'object'},
8865 'CharmMeta': {'additionalProperties': False,
8866 'properties': {'categories': {'items': {'type': 'string'},
8867 'type': 'array'},
8868 'description': {'type': 'string'},
8869 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}},
8870 'type': 'object'},
8871 'min-juju-version': {'type': 'string'},
8872 'name': {'type': 'string'},
8873 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}},
8874 'type': 'object'},
8875 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8876 'type': 'object'},
8877 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8878 'type': 'object'},
8879 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8880 'type': 'object'},
8881 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}},
8882 'type': 'object'},
8883 'series': {'items': {'type': 'string'},
8884 'type': 'array'},
8885 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}},
8886 'type': 'object'},
8887 'subordinate': {'type': 'boolean'},
8888 'summary': {'type': 'string'},
8889 'tags': {'items': {'type': 'string'},
8890 'type': 'array'},
8891 'terms': {'items': {'type': 'string'},
8892 'type': 'array'}},
8893 'required': ['name',
8894 'summary',
8895 'description',
8896 'subordinate'],
8897 'type': 'object'},
8898 'CharmMetric': {'additionalProperties': False,
8899 'properties': {'description': {'type': 'string'},
8900 'type': {'type': 'string'}},
8901 'required': ['type', 'description'],
8902 'type': 'object'},
8903 'CharmMetrics': {'additionalProperties': False,
8904 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}},
8905 'type': 'object'},
8906 'plan': {'$ref': '#/definitions/CharmPlan'}},
8907 'required': ['metrics', 'plan'],
8908 'type': 'object'},
8909 'CharmOption': {'additionalProperties': False,
8910 'properties': {'default': {'additionalProperties': True,
8911 'type': 'object'},
8912 'description': {'type': 'string'},
8913 'type': {'type': 'string'}},
8914 'required': ['type'],
8915 'type': 'object'},
8916 'CharmPayloadClass': {'additionalProperties': False,
8917 'properties': {'name': {'type': 'string'},
8918 'type': {'type': 'string'}},
8919 'required': ['name', 'type'],
8920 'type': 'object'},
8921 'CharmPlan': {'additionalProperties': False,
8922 'properties': {'required': {'type': 'boolean'}},
8923 'required': ['required'],
8924 'type': 'object'},
8925 'CharmRelation': {'additionalProperties': False,
8926 'properties': {'interface': {'type': 'string'},
8927 'limit': {'type': 'integer'},
8928 'name': {'type': 'string'},
8929 'optional': {'type': 'boolean'},
8930 'role': {'type': 'string'},
8931 'scope': {'type': 'string'}},
8932 'required': ['name',
8933 'role',
8934 'interface',
8935 'optional',
8936 'limit',
8937 'scope'],
8938 'type': 'object'},
8939 'CharmResourceMeta': {'additionalProperties': False,
8940 'properties': {'description': {'type': 'string'},
8941 'name': {'type': 'string'},
8942 'path': {'type': 'string'},
8943 'type': {'type': 'string'}},
8944 'required': ['name',
8945 'type',
8946 'path',
8947 'description'],
8948 'type': 'object'},
8949 'CharmStorage': {'additionalProperties': False,
8950 'properties': {'count-max': {'type': 'integer'},
8951 'count-min': {'type': 'integer'},
8952 'description': {'type': 'string'},
8953 'location': {'type': 'string'},
8954 'minimum-size': {'type': 'integer'},
8955 'name': {'type': 'string'},
8956 'properties': {'items': {'type': 'string'},
8957 'type': 'array'},
8958 'read-only': {'type': 'boolean'},
8959 'shared': {'type': 'boolean'},
8960 'type': {'type': 'string'}},
8961 'required': ['name',
8962 'description',
8963 'type',
8964 'shared',
8965 'read-only',
8966 'count-min',
8967 'count-max',
8968 'minimum-size'],
8969 'type': 'object'},
8970 'CharmURL': {'additionalProperties': False,
8971 'properties': {'url': {'type': 'string'}},
8972 'required': ['url'],
8973 'type': 'object'},
8974 'CharmsList': {'additionalProperties': False,
8975 'properties': {'names': {'items': {'type': 'string'},
8976 'type': 'array'}},
8977 'required': ['names'],
8978 'type': 'object'},
8979 'CharmsListResult': {'additionalProperties': False,
8980 'properties': {'charm-urls': {'items': {'type': 'string'},
8981 'type': 'array'}},
8982 'required': ['charm-urls'],
8983 'type': 'object'},
8984 'IsMeteredResult': {'additionalProperties': False,
8985 'properties': {'metered': {'type': 'boolean'}},
8986 'required': ['metered'],
8987 'type': 'object'}},
8988 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
8989 'Result': {'$ref': '#/definitions/CharmInfo'}},
8990 'type': 'object'},
8991 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
8992 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
8993 'type': 'object'},
8994 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
8995 'Result': {'$ref': '#/definitions/CharmsListResult'}},
8996 'type': 'object'}},
8997 'type': 'object'}
8998
8999
9000 @ReturnMapping(CharmInfo)
9001 async def CharmInfo(self, url):
9002 '''
9003 url : str
9004 Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>, _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str]
9005 '''
9006 # map input types to rpc msg
9007 _params = dict()
9008 msg = dict(type='Charms', request='CharmInfo', version=2, params=_params)
9009 _params['url'] = url
9010 reply = await self.rpc(msg)
9011 return reply
9012
9013
9014
9015 @ReturnMapping(IsMeteredResult)
9016 async def IsMetered(self, url):
9017 '''
9018 url : str
9019 Returns -> bool
9020 '''
9021 # map input types to rpc msg
9022 _params = dict()
9023 msg = dict(type='Charms', request='IsMetered', version=2, params=_params)
9024 _params['url'] = url
9025 reply = await self.rpc(msg)
9026 return reply
9027
9028
9029
9030 @ReturnMapping(CharmsListResult)
9031 async def List(self, names):
9032 '''
9033 names : typing.Sequence<+T_co>[str]
9034 Returns -> typing.Sequence<+T_co>[str]
9035 '''
9036 # map input types to rpc msg
9037 _params = dict()
9038 msg = dict(type='Charms', request='List', version=2, params=_params)
9039 _params['names'] = names
9040 reply = await self.rpc(msg)
9041 return reply
9042
9043
9044 class CleanerFacade(Type):
9045 name = 'Cleaner'
9046 version = 2
9047 schema = {'definitions': {'Error': {'additionalProperties': False,
9048 'properties': {'code': {'type': 'string'},
9049 'info': {'$ref': '#/definitions/ErrorInfo'},
9050 'message': {'type': 'string'}},
9051 'required': ['message', 'code'],
9052 'type': 'object'},
9053 'ErrorInfo': {'additionalProperties': False,
9054 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9055 'macaroon-path': {'type': 'string'}},
9056 'type': 'object'},
9057 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9058 'NotifyWatchResult': {'additionalProperties': False,
9059 'properties': {'NotifyWatcherId': {'type': 'string'},
9060 'error': {'$ref': '#/definitions/Error'}},
9061 'required': ['NotifyWatcherId'],
9062 'type': 'object'}},
9063 'properties': {'Cleanup': {'type': 'object'},
9064 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
9065 'type': 'object'}},
9066 'type': 'object'}
9067
9068
9069 @ReturnMapping(None)
9070 async def Cleanup(self):
9071 '''
9072
9073 Returns -> None
9074 '''
9075 # map input types to rpc msg
9076 _params = dict()
9077 msg = dict(type='Cleaner', request='Cleanup', version=2, params=_params)
9078
9079 reply = await self.rpc(msg)
9080 return reply
9081
9082
9083
9084 @ReturnMapping(NotifyWatchResult)
9085 async def WatchCleanups(self):
9086 '''
9087
9088 Returns -> typing.Union[str, _ForwardRef('Error')]
9089 '''
9090 # map input types to rpc msg
9091 _params = dict()
9092 msg = dict(type='Cleaner', request='WatchCleanups', version=2, params=_params)
9093
9094 reply = await self.rpc(msg)
9095 return reply
9096
9097
9098 class ClientFacade(Type):
9099 name = 'Client'
9100 version = 1
9101 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
9102 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
9103 'type': 'array'},
9104 'type': 'array'}},
9105 'required': ['servers'],
9106 'type': 'object'},
9107 'AddCharm': {'additionalProperties': False,
9108 'properties': {'channel': {'type': 'string'},
9109 'url': {'type': 'string'}},
9110 'required': ['url', 'channel'],
9111 'type': 'object'},
9112 'AddCharmWithAuthorization': {'additionalProperties': False,
9113 'properties': {'channel': {'type': 'string'},
9114 'macaroon': {'$ref': '#/definitions/Macaroon'},
9115 'url': {'type': 'string'}},
9116 'required': ['url',
9117 'channel',
9118 'macaroon'],
9119 'type': 'object'},
9120 'AddMachineParams': {'additionalProperties': False,
9121 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
9122 'type': 'array'},
9123 'constraints': {'$ref': '#/definitions/Value'},
9124 'container-type': {'type': 'string'},
9125 'disks': {'items': {'$ref': '#/definitions/Constraints'},
9126 'type': 'array'},
9127 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
9128 'instance-id': {'type': 'string'},
9129 'jobs': {'items': {'type': 'string'},
9130 'type': 'array'},
9131 'nonce': {'type': 'string'},
9132 'parent-id': {'type': 'string'},
9133 'placement': {'$ref': '#/definitions/Placement'},
9134 'series': {'type': 'string'}},
9135 'required': ['series',
9136 'constraints',
9137 'jobs',
9138 'parent-id',
9139 'container-type',
9140 'instance-id',
9141 'nonce',
9142 'hardware-characteristics',
9143 'addresses'],
9144 'type': 'object'},
9145 'AddMachines': {'additionalProperties': False,
9146 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
9147 'type': 'array'}},
9148 'required': ['params'],
9149 'type': 'object'},
9150 'AddMachinesResult': {'additionalProperties': False,
9151 'properties': {'error': {'$ref': '#/definitions/Error'},
9152 'machine': {'type': 'string'}},
9153 'required': ['machine'],
9154 'type': 'object'},
9155 'AddMachinesResults': {'additionalProperties': False,
9156 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
9157 'type': 'array'}},
9158 'required': ['machines'],
9159 'type': 'object'},
9160 'Address': {'additionalProperties': False,
9161 'properties': {'scope': {'type': 'string'},
9162 'space-name': {'type': 'string'},
9163 'type': {'type': 'string'},
9164 'value': {'type': 'string'}},
9165 'required': ['value', 'type', 'scope'],
9166 'type': 'object'},
9167 'AgentVersionResult': {'additionalProperties': False,
9168 'properties': {'version': {'$ref': '#/definitions/Number'}},
9169 'required': ['version'],
9170 'type': 'object'},
9171 'AllWatcherId': {'additionalProperties': False,
9172 'properties': {'watcher-id': {'type': 'string'}},
9173 'required': ['watcher-id'],
9174 'type': 'object'},
9175 'ApplicationStatus': {'additionalProperties': False,
9176 'properties': {'can-upgrade-to': {'type': 'string'},
9177 'charm': {'type': 'string'},
9178 'err': {'additionalProperties': True,
9179 'type': 'object'},
9180 'exposed': {'type': 'boolean'},
9181 'life': {'type': 'string'},
9182 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
9183 'type': 'object'},
9184 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
9185 'type': 'array'}},
9186 'type': 'object'},
9187 'series': {'type': 'string'},
9188 'status': {'$ref': '#/definitions/DetailedStatus'},
9189 'subordinate-to': {'items': {'type': 'string'},
9190 'type': 'array'},
9191 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
9192 'type': 'object'},
9193 'workload-version': {'type': 'string'}},
9194 'required': ['charm',
9195 'series',
9196 'exposed',
9197 'life',
9198 'relations',
9199 'can-upgrade-to',
9200 'subordinate-to',
9201 'units',
9202 'meter-statuses',
9203 'status',
9204 'workload-version'],
9205 'type': 'object'},
9206 'Binary': {'additionalProperties': False,
9207 'properties': {'Arch': {'type': 'string'},
9208 'Number': {'$ref': '#/definitions/Number'},
9209 'Series': {'type': 'string'}},
9210 'required': ['Number', 'Series', 'Arch'],
9211 'type': 'object'},
9212 'BundleChange': {'additionalProperties': False,
9213 'properties': {'args': {'items': {'additionalProperties': True,
9214 'type': 'object'},
9215 'type': 'array'},
9216 'id': {'type': 'string'},
9217 'method': {'type': 'string'},
9218 'requires': {'items': {'type': 'string'},
9219 'type': 'array'}},
9220 'required': ['id',
9221 'method',
9222 'args',
9223 'requires'],
9224 'type': 'object'},
9225 'BundleChangesParams': {'additionalProperties': False,
9226 'properties': {'yaml': {'type': 'string'}},
9227 'required': ['yaml'],
9228 'type': 'object'},
9229 'BundleChangesResults': {'additionalProperties': False,
9230 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
9231 'type': 'array'},
9232 'errors': {'items': {'type': 'string'},
9233 'type': 'array'}},
9234 'type': 'object'},
9235 'ConfigValue': {'additionalProperties': False,
9236 'properties': {'source': {'type': 'string'},
9237 'value': {'additionalProperties': True,
9238 'type': 'object'}},
9239 'required': ['value', 'source'],
9240 'type': 'object'},
9241 'Constraints': {'additionalProperties': False,
9242 'properties': {'Count': {'type': 'integer'},
9243 'Pool': {'type': 'string'},
9244 'Size': {'type': 'integer'}},
9245 'required': ['Pool', 'Size', 'Count'],
9246 'type': 'object'},
9247 'DestroyMachines': {'additionalProperties': False,
9248 'properties': {'force': {'type': 'boolean'},
9249 'machine-names': {'items': {'type': 'string'},
9250 'type': 'array'}},
9251 'required': ['machine-names', 'force'],
9252 'type': 'object'},
9253 'DetailedStatus': {'additionalProperties': False,
9254 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
9255 'type': 'object'}},
9256 'type': 'object'},
9257 'err': {'additionalProperties': True,
9258 'type': 'object'},
9259 'info': {'type': 'string'},
9260 'kind': {'type': 'string'},
9261 'life': {'type': 'string'},
9262 'since': {'format': 'date-time',
9263 'type': 'string'},
9264 'status': {'type': 'string'},
9265 'version': {'type': 'string'}},
9266 'required': ['status',
9267 'info',
9268 'data',
9269 'since',
9270 'kind',
9271 'version',
9272 'life'],
9273 'type': 'object'},
9274 'EndpointStatus': {'additionalProperties': False,
9275 'properties': {'application': {'type': 'string'},
9276 'name': {'type': 'string'},
9277 'role': {'type': 'string'},
9278 'subordinate': {'type': 'boolean'}},
9279 'required': ['application',
9280 'name',
9281 'role',
9282 'subordinate'],
9283 'type': 'object'},
9284 'Entities': {'additionalProperties': False,
9285 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9286 'type': 'array'}},
9287 'required': ['entities'],
9288 'type': 'object'},
9289 'Entity': {'additionalProperties': False,
9290 'properties': {'tag': {'type': 'string'}},
9291 'required': ['tag'],
9292 'type': 'object'},
9293 'EntityStatus': {'additionalProperties': False,
9294 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
9295 'type': 'object'}},
9296 'type': 'object'},
9297 'info': {'type': 'string'},
9298 'since': {'format': 'date-time',
9299 'type': 'string'},
9300 'status': {'type': 'string'}},
9301 'required': ['status', 'info', 'since'],
9302 'type': 'object'},
9303 'Error': {'additionalProperties': False,
9304 'properties': {'code': {'type': 'string'},
9305 'info': {'$ref': '#/definitions/ErrorInfo'},
9306 'message': {'type': 'string'}},
9307 'required': ['message', 'code'],
9308 'type': 'object'},
9309 'ErrorInfo': {'additionalProperties': False,
9310 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9311 'macaroon-path': {'type': 'string'}},
9312 'type': 'object'},
9313 'ErrorResult': {'additionalProperties': False,
9314 'properties': {'error': {'$ref': '#/definitions/Error'}},
9315 'type': 'object'},
9316 'ErrorResults': {'additionalProperties': False,
9317 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9318 'type': 'array'}},
9319 'required': ['results'],
9320 'type': 'object'},
9321 'FindToolsParams': {'additionalProperties': False,
9322 'properties': {'arch': {'type': 'string'},
9323 'major': {'type': 'integer'},
9324 'minor': {'type': 'integer'},
9325 'number': {'$ref': '#/definitions/Number'},
9326 'series': {'type': 'string'}},
9327 'required': ['number',
9328 'major',
9329 'minor',
9330 'arch',
9331 'series'],
9332 'type': 'object'},
9333 'FindToolsResult': {'additionalProperties': False,
9334 'properties': {'error': {'$ref': '#/definitions/Error'},
9335 'list': {'items': {'$ref': '#/definitions/Tools'},
9336 'type': 'array'}},
9337 'required': ['list'],
9338 'type': 'object'},
9339 'FullStatus': {'additionalProperties': False,
9340 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
9341 'type': 'object'},
9342 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
9343 'type': 'object'},
9344 'model': {'$ref': '#/definitions/ModelStatusInfo'},
9345 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
9346 'type': 'array'},
9347 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}},
9348 'type': 'object'}},
9349 'required': ['model',
9350 'machines',
9351 'applications',
9352 'remote-applications',
9353 'relations'],
9354 'type': 'object'},
9355 'GetConstraintsResults': {'additionalProperties': False,
9356 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
9357 'required': ['constraints'],
9358 'type': 'object'},
9359 'HardwareCharacteristics': {'additionalProperties': False,
9360 'properties': {'arch': {'type': 'string'},
9361 'availability-zone': {'type': 'string'},
9362 'cpu-cores': {'type': 'integer'},
9363 'cpu-power': {'type': 'integer'},
9364 'mem': {'type': 'integer'},
9365 'root-disk': {'type': 'integer'},
9366 'tags': {'items': {'type': 'string'},
9367 'type': 'array'}},
9368 'type': 'object'},
9369 'History': {'additionalProperties': False,
9370 'properties': {'error': {'$ref': '#/definitions/Error'},
9371 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
9372 'type': 'array'}},
9373 'required': ['statuses'],
9374 'type': 'object'},
9375 'HostPort': {'additionalProperties': False,
9376 'properties': {'Address': {'$ref': '#/definitions/Address'},
9377 'port': {'type': 'integer'}},
9378 'required': ['Address', 'port'],
9379 'type': 'object'},
9380 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9381 'MachineHardware': {'additionalProperties': False,
9382 'properties': {'arch': {'type': 'string'},
9383 'availability-zone': {'type': 'string'},
9384 'cores': {'type': 'integer'},
9385 'cpu-power': {'type': 'integer'},
9386 'mem': {'type': 'integer'},
9387 'root-disk': {'type': 'integer'},
9388 'tags': {'items': {'type': 'string'},
9389 'type': 'array'}},
9390 'type': 'object'},
9391 'MachineStatus': {'additionalProperties': False,
9392 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
9393 'constraints': {'type': 'string'},
9394 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
9395 'type': 'object'},
9396 'dns-name': {'type': 'string'},
9397 'hardware': {'type': 'string'},
9398 'has-vote': {'type': 'boolean'},
9399 'id': {'type': 'string'},
9400 'instance-id': {'type': 'string'},
9401 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
9402 'ip-addresses': {'items': {'type': 'string'},
9403 'type': 'array'},
9404 'jobs': {'items': {'type': 'string'},
9405 'type': 'array'},
9406 'series': {'type': 'string'},
9407 'wants-vote': {'type': 'boolean'}},
9408 'required': ['agent-status',
9409 'instance-status',
9410 'dns-name',
9411 'ip-addresses',
9412 'instance-id',
9413 'series',
9414 'id',
9415 'containers',
9416 'constraints',
9417 'hardware',
9418 'jobs',
9419 'has-vote',
9420 'wants-vote'],
9421 'type': 'object'},
9422 'MeterStatus': {'additionalProperties': False,
9423 'properties': {'color': {'type': 'string'},
9424 'message': {'type': 'string'}},
9425 'required': ['color', 'message'],
9426 'type': 'object'},
9427 'ModelConfigResults': {'additionalProperties': False,
9428 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
9429 'type': 'object'}},
9430 'required': ['config'],
9431 'type': 'object'},
9432 'ModelInfo': {'additionalProperties': False,
9433 'properties': {'cloud-credential-tag': {'type': 'string'},
9434 'cloud-region': {'type': 'string'},
9435 'cloud-tag': {'type': 'string'},
9436 'controller-uuid': {'type': 'string'},
9437 'default-series': {'type': 'string'},
9438 'life': {'type': 'string'},
9439 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
9440 'type': 'array'},
9441 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
9442 'name': {'type': 'string'},
9443 'owner-tag': {'type': 'string'},
9444 'provider-type': {'type': 'string'},
9445 'status': {'$ref': '#/definitions/EntityStatus'},
9446 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
9447 'type': 'array'},
9448 'uuid': {'type': 'string'}},
9449 'required': ['name',
9450 'uuid',
9451 'controller-uuid',
9452 'provider-type',
9453 'default-series',
9454 'cloud-tag',
9455 'owner-tag',
9456 'life',
9457 'status',
9458 'users',
9459 'machines'],
9460 'type': 'object'},
9461 'ModelMachineInfo': {'additionalProperties': False,
9462 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
9463 'has-vote': {'type': 'boolean'},
9464 'id': {'type': 'string'},
9465 'instance-id': {'type': 'string'},
9466 'status': {'type': 'string'},
9467 'wants-vote': {'type': 'boolean'}},
9468 'required': ['id'],
9469 'type': 'object'},
9470 'ModelMigrationStatus': {'additionalProperties': False,
9471 'properties': {'end': {'format': 'date-time',
9472 'type': 'string'},
9473 'start': {'format': 'date-time',
9474 'type': 'string'},
9475 'status': {'type': 'string'}},
9476 'required': ['status', 'start'],
9477 'type': 'object'},
9478 'ModelSet': {'additionalProperties': False,
9479 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
9480 'type': 'object'}},
9481 'type': 'object'}},
9482 'required': ['config'],
9483 'type': 'object'},
9484 'ModelStatusInfo': {'additionalProperties': False,
9485 'properties': {'available-version': {'type': 'string'},
9486 'cloud-tag': {'type': 'string'},
9487 'migration': {'type': 'string'},
9488 'name': {'type': 'string'},
9489 'region': {'type': 'string'},
9490 'version': {'type': 'string'}},
9491 'required': ['name',
9492 'cloud-tag',
9493 'version',
9494 'available-version'],
9495 'type': 'object'},
9496 'ModelUnset': {'additionalProperties': False,
9497 'properties': {'keys': {'items': {'type': 'string'},
9498 'type': 'array'}},
9499 'required': ['keys'],
9500 'type': 'object'},
9501 'ModelUserInfo': {'additionalProperties': False,
9502 'properties': {'access': {'type': 'string'},
9503 'display-name': {'type': 'string'},
9504 'last-connection': {'format': 'date-time',
9505 'type': 'string'},
9506 'user': {'type': 'string'}},
9507 'required': ['user',
9508 'display-name',
9509 'last-connection',
9510 'access'],
9511 'type': 'object'},
9512 'ModelUserInfoResult': {'additionalProperties': False,
9513 'properties': {'error': {'$ref': '#/definitions/Error'},
9514 'result': {'$ref': '#/definitions/ModelUserInfo'}},
9515 'type': 'object'},
9516 'ModelUserInfoResults': {'additionalProperties': False,
9517 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
9518 'type': 'array'}},
9519 'required': ['results'],
9520 'type': 'object'},
9521 'Number': {'additionalProperties': False,
9522 'properties': {'Build': {'type': 'integer'},
9523 'Major': {'type': 'integer'},
9524 'Minor': {'type': 'integer'},
9525 'Patch': {'type': 'integer'},
9526 'Tag': {'type': 'string'}},
9527 'required': ['Major',
9528 'Minor',
9529 'Tag',
9530 'Patch',
9531 'Build'],
9532 'type': 'object'},
9533 'Placement': {'additionalProperties': False,
9534 'properties': {'directive': {'type': 'string'},
9535 'scope': {'type': 'string'}},
9536 'required': ['scope', 'directive'],
9537 'type': 'object'},
9538 'PrivateAddress': {'additionalProperties': False,
9539 'properties': {'target': {'type': 'string'}},
9540 'required': ['target'],
9541 'type': 'object'},
9542 'PrivateAddressResults': {'additionalProperties': False,
9543 'properties': {'private-address': {'type': 'string'}},
9544 'required': ['private-address'],
9545 'type': 'object'},
9546 'ProvisioningScriptParams': {'additionalProperties': False,
9547 'properties': {'data-dir': {'type': 'string'},
9548 'disable-package-commands': {'type': 'boolean'},
9549 'machine-id': {'type': 'string'},
9550 'nonce': {'type': 'string'}},
9551 'required': ['machine-id',
9552 'nonce',
9553 'data-dir',
9554 'disable-package-commands'],
9555 'type': 'object'},
9556 'ProvisioningScriptResult': {'additionalProperties': False,
9557 'properties': {'script': {'type': 'string'}},
9558 'required': ['script'],
9559 'type': 'object'},
9560 'PublicAddress': {'additionalProperties': False,
9561 'properties': {'target': {'type': 'string'}},
9562 'required': ['target'],
9563 'type': 'object'},
9564 'PublicAddressResults': {'additionalProperties': False,
9565 'properties': {'public-address': {'type': 'string'}},
9566 'required': ['public-address'],
9567 'type': 'object'},
9568 'RelationStatus': {'additionalProperties': False,
9569 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
9570 'type': 'array'},
9571 'id': {'type': 'integer'},
9572 'interface': {'type': 'string'},
9573 'key': {'type': 'string'},
9574 'scope': {'type': 'string'}},
9575 'required': ['id',
9576 'key',
9577 'interface',
9578 'scope',
9579 'endpoints'],
9580 'type': 'object'},
9581 'RemoteApplicationStatus': {'additionalProperties': False,
9582 'properties': {'application-name': {'type': 'string'},
9583 'application-url': {'type': 'string'},
9584 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
9585 'type': 'array'},
9586 'err': {'additionalProperties': True,
9587 'type': 'object'},
9588 'life': {'type': 'string'},
9589 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
9590 'type': 'array'}},
9591 'type': 'object'},
9592 'status': {'$ref': '#/definitions/DetailedStatus'}},
9593 'required': ['application-url',
9594 'application-name',
9595 'endpoints',
9596 'life',
9597 'relations',
9598 'status'],
9599 'type': 'object'},
9600 'RemoteEndpoint': {'additionalProperties': False,
9601 'properties': {'interface': {'type': 'string'},
9602 'limit': {'type': 'integer'},
9603 'name': {'type': 'string'},
9604 'role': {'type': 'string'},
9605 'scope': {'type': 'string'}},
9606 'required': ['name',
9607 'role',
9608 'interface',
9609 'limit',
9610 'scope'],
9611 'type': 'object'},
9612 'ResolveCharmResult': {'additionalProperties': False,
9613 'properties': {'error': {'type': 'string'},
9614 'url': {'type': 'string'}},
9615 'type': 'object'},
9616 'ResolveCharmResults': {'additionalProperties': False,
9617 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
9618 'type': 'array'}},
9619 'required': ['urls'],
9620 'type': 'object'},
9621 'ResolveCharms': {'additionalProperties': False,
9622 'properties': {'references': {'items': {'type': 'string'},
9623 'type': 'array'}},
9624 'required': ['references'],
9625 'type': 'object'},
9626 'Resolved': {'additionalProperties': False,
9627 'properties': {'retry': {'type': 'boolean'},
9628 'unit-name': {'type': 'string'}},
9629 'required': ['unit-name', 'retry'],
9630 'type': 'object'},
9631 'SetConstraints': {'additionalProperties': False,
9632 'properties': {'application': {'type': 'string'},
9633 'constraints': {'$ref': '#/definitions/Value'}},
9634 'required': ['application', 'constraints'],
9635 'type': 'object'},
9636 'SetModelAgentVersion': {'additionalProperties': False,
9637 'properties': {'version': {'$ref': '#/definitions/Number'}},
9638 'required': ['version'],
9639 'type': 'object'},
9640 'StatusHistoryFilter': {'additionalProperties': False,
9641 'properties': {'date': {'format': 'date-time',
9642 'type': 'string'},
9643 'delta': {'type': 'integer'},
9644 'size': {'type': 'integer'}},
9645 'required': ['size', 'date', 'delta'],
9646 'type': 'object'},
9647 'StatusHistoryRequest': {'additionalProperties': False,
9648 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
9649 'historyKind': {'type': 'string'},
9650 'size': {'type': 'integer'},
9651 'tag': {'type': 'string'}},
9652 'required': ['historyKind',
9653 'size',
9654 'filter',
9655 'tag'],
9656 'type': 'object'},
9657 'StatusHistoryRequests': {'additionalProperties': False,
9658 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
9659 'type': 'array'}},
9660 'required': ['requests'],
9661 'type': 'object'},
9662 'StatusHistoryResult': {'additionalProperties': False,
9663 'properties': {'error': {'$ref': '#/definitions/Error'},
9664 'history': {'$ref': '#/definitions/History'}},
9665 'required': ['history'],
9666 'type': 'object'},
9667 'StatusHistoryResults': {'additionalProperties': False,
9668 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
9669 'type': 'array'}},
9670 'required': ['results'],
9671 'type': 'object'},
9672 'StatusParams': {'additionalProperties': False,
9673 'properties': {'patterns': {'items': {'type': 'string'},
9674 'type': 'array'}},
9675 'required': ['patterns'],
9676 'type': 'object'},
9677 'Tools': {'additionalProperties': False,
9678 'properties': {'sha256': {'type': 'string'},
9679 'size': {'type': 'integer'},
9680 'url': {'type': 'string'},
9681 'version': {'$ref': '#/definitions/Binary'}},
9682 'required': ['version', 'url', 'size'],
9683 'type': 'object'},
9684 'UnitStatus': {'additionalProperties': False,
9685 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
9686 'charm': {'type': 'string'},
9687 'leader': {'type': 'boolean'},
9688 'machine': {'type': 'string'},
9689 'opened-ports': {'items': {'type': 'string'},
9690 'type': 'array'},
9691 'public-address': {'type': 'string'},
9692 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
9693 'type': 'object'},
9694 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
9695 'workload-version': {'type': 'string'}},
9696 'required': ['agent-status',
9697 'workload-status',
9698 'workload-version',
9699 'machine',
9700 'opened-ports',
9701 'public-address',
9702 'charm',
9703 'subordinates'],
9704 'type': 'object'},
9705 'Value': {'additionalProperties': False,
9706 'properties': {'arch': {'type': 'string'},
9707 'container': {'type': 'string'},
9708 'cores': {'type': 'integer'},
9709 'cpu-power': {'type': 'integer'},
9710 'instance-type': {'type': 'string'},
9711 'mem': {'type': 'integer'},
9712 'root-disk': {'type': 'integer'},
9713 'spaces': {'items': {'type': 'string'},
9714 'type': 'array'},
9715 'tags': {'items': {'type': 'string'},
9716 'type': 'array'},
9717 'virt-type': {'type': 'string'}},
9718 'type': 'object'}},
9719 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
9720 'type': 'object'},
9721 'AbortCurrentUpgrade': {'type': 'object'},
9722 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
9723 'type': 'object'},
9724 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
9725 'type': 'object'},
9726 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
9727 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
9728 'type': 'object'},
9729 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
9730 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
9731 'type': 'object'},
9732 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
9733 'type': 'object'},
9734 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
9735 'type': 'object'},
9736 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
9737 'Result': {'$ref': '#/definitions/FindToolsResult'}},
9738 'type': 'object'},
9739 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
9740 'Result': {'$ref': '#/definitions/FullStatus'}},
9741 'type': 'object'},
9742 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
9743 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
9744 'type': 'object'},
9745 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
9746 'type': 'object'},
9747 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
9748 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
9749 'type': 'object'},
9750 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
9751 'type': 'object'},
9752 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
9753 'type': 'object'},
9754 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
9755 'type': 'object'},
9756 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
9757 'type': 'object'},
9758 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
9759 'type': 'object'},
9760 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
9761 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
9762 'type': 'object'},
9763 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
9764 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
9765 'type': 'object'},
9766 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
9767 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
9768 'type': 'object'},
9769 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
9770 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
9771 'type': 'object'},
9772 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
9773 'type': 'object'},
9774 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9775 'Result': {'$ref': '#/definitions/ErrorResults'}},
9776 'type': 'object'},
9777 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
9778 'type': 'object'},
9779 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
9780 'type': 'object'},
9781 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
9782 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
9783 'type': 'object'},
9784 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
9785 'type': 'object'}},
9786 'type': 'object'}
9787
9788
9789 @ReturnMapping(APIHostPortsResult)
9790 async def APIHostPorts(self):
9791 '''
9792
9793 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
9794 '''
9795 # map input types to rpc msg
9796 _params = dict()
9797 msg = dict(type='Client', request='APIHostPorts', version=1, params=_params)
9798
9799 reply = await self.rpc(msg)
9800 return reply
9801
9802
9803
9804 @ReturnMapping(None)
9805 async def AbortCurrentUpgrade(self):
9806 '''
9807
9808 Returns -> None
9809 '''
9810 # map input types to rpc msg
9811 _params = dict()
9812 msg = dict(type='Client', request='AbortCurrentUpgrade', version=1, params=_params)
9813
9814 reply = await self.rpc(msg)
9815 return reply
9816
9817
9818
9819 @ReturnMapping(None)
9820 async def AddCharm(self, channel, url):
9821 '''
9822 channel : str
9823 url : str
9824 Returns -> None
9825 '''
9826 # map input types to rpc msg
9827 _params = dict()
9828 msg = dict(type='Client', request='AddCharm', version=1, params=_params)
9829 _params['channel'] = channel
9830 _params['url'] = url
9831 reply = await self.rpc(msg)
9832 return reply
9833
9834
9835
9836 @ReturnMapping(None)
9837 async def AddCharmWithAuthorization(self, channel, macaroon, url):
9838 '''
9839 channel : str
9840 macaroon : Macaroon
9841 url : str
9842 Returns -> None
9843 '''
9844 # map input types to rpc msg
9845 _params = dict()
9846 msg = dict(type='Client', request='AddCharmWithAuthorization', version=1, params=_params)
9847 _params['channel'] = channel
9848 _params['macaroon'] = macaroon
9849 _params['url'] = url
9850 reply = await self.rpc(msg)
9851 return reply
9852
9853
9854
9855 @ReturnMapping(AddMachinesResults)
9856 async def AddMachines(self, params):
9857 '''
9858 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9859 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9860 '''
9861 # map input types to rpc msg
9862 _params = dict()
9863 msg = dict(type='Client', request='AddMachines', version=1, params=_params)
9864 _params['params'] = params
9865 reply = await self.rpc(msg)
9866 return reply
9867
9868
9869
9870 @ReturnMapping(AddMachinesResults)
9871 async def AddMachinesV2(self, params):
9872 '''
9873 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9874 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9875 '''
9876 # map input types to rpc msg
9877 _params = dict()
9878 msg = dict(type='Client', request='AddMachinesV2', version=1, params=_params)
9879 _params['params'] = params
9880 reply = await self.rpc(msg)
9881 return reply
9882
9883
9884
9885 @ReturnMapping(AgentVersionResult)
9886 async def AgentVersion(self):
9887 '''
9888
9889 Returns -> Number
9890 '''
9891 # map input types to rpc msg
9892 _params = dict()
9893 msg = dict(type='Client', request='AgentVersion', version=1, params=_params)
9894
9895 reply = await self.rpc(msg)
9896 return reply
9897
9898
9899
9900 @ReturnMapping(None)
9901 async def DestroyMachines(self, force, machine_names):
9902 '''
9903 force : bool
9904 machine_names : typing.Sequence<+T_co>[str]
9905 Returns -> None
9906 '''
9907 # map input types to rpc msg
9908 _params = dict()
9909 msg = dict(type='Client', request='DestroyMachines', version=1, params=_params)
9910 _params['force'] = force
9911 _params['machine-names'] = machine_names
9912 reply = await self.rpc(msg)
9913 return reply
9914
9915
9916
9917 @ReturnMapping(FindToolsResult)
9918 async def FindTools(self, arch, major, minor, number, series):
9919 '''
9920 arch : str
9921 major : int
9922 minor : int
9923 number : Number
9924 series : str
9925 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
9926 '''
9927 # map input types to rpc msg
9928 _params = dict()
9929 msg = dict(type='Client', request='FindTools', version=1, params=_params)
9930 _params['arch'] = arch
9931 _params['major'] = major
9932 _params['minor'] = minor
9933 _params['number'] = number
9934 _params['series'] = series
9935 reply = await self.rpc(msg)
9936 return reply
9937
9938
9939
9940 @ReturnMapping(FullStatus)
9941 async def FullStatus(self, patterns):
9942 '''
9943 patterns : typing.Sequence<+T_co>[str]
9944 Returns -> typing.Union[_ForwardRef('ModelStatusInfo'), typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>, typing.Mapping<~KT, +VT_co>[str, ~RemoteApplicationStatus]<~RemoteApplicationStatus>]
9945 '''
9946 # map input types to rpc msg
9947 _params = dict()
9948 msg = dict(type='Client', request='FullStatus', version=1, params=_params)
9949 _params['patterns'] = patterns
9950 reply = await self.rpc(msg)
9951 return reply
9952
9953
9954
9955 @ReturnMapping(BundleChangesResults)
9956 async def GetBundleChanges(self, yaml):
9957 '''
9958 yaml : str
9959 Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
9960 '''
9961 # map input types to rpc msg
9962 _params = dict()
9963 msg = dict(type='Client', request='GetBundleChanges', version=1, params=_params)
9964 _params['yaml'] = yaml
9965 reply = await self.rpc(msg)
9966 return reply
9967
9968
9969
9970 @ReturnMapping(GetConstraintsResults)
9971 async def GetModelConstraints(self):
9972 '''
9973
9974 Returns -> Value
9975 '''
9976 # map input types to rpc msg
9977 _params = dict()
9978 msg = dict(type='Client', request='GetModelConstraints', version=1, params=_params)
9979
9980 reply = await self.rpc(msg)
9981 return reply
9982
9983
9984
9985 @ReturnMapping(AddMachinesResults)
9986 async def InjectMachines(self, params):
9987 '''
9988 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9989 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9990 '''
9991 # map input types to rpc msg
9992 _params = dict()
9993 msg = dict(type='Client', request='InjectMachines', version=1, params=_params)
9994 _params['params'] = params
9995 reply = await self.rpc(msg)
9996 return reply
9997
9998
9999
10000 @ReturnMapping(ModelConfigResults)
10001 async def ModelGet(self):
10002 '''
10003
10004 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
10005 '''
10006 # map input types to rpc msg
10007 _params = dict()
10008 msg = dict(type='Client', request='ModelGet', version=1, params=_params)
10009
10010 reply = await self.rpc(msg)
10011 return reply
10012
10013
10014
10015 @ReturnMapping(ModelInfo)
10016 async def ModelInfo(self):
10017 '''
10018
10019 Returns -> typing.Union[_ForwardRef('ModelMigrationStatus'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
10020 '''
10021 # map input types to rpc msg
10022 _params = dict()
10023 msg = dict(type='Client', request='ModelInfo', version=1, params=_params)
10024
10025 reply = await self.rpc(msg)
10026 return reply
10027
10028
10029
10030 @ReturnMapping(None)
10031 async def ModelSet(self, config):
10032 '''
10033 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
10034 Returns -> None
10035 '''
10036 # map input types to rpc msg
10037 _params = dict()
10038 msg = dict(type='Client', request='ModelSet', version=1, params=_params)
10039 _params['config'] = config
10040 reply = await self.rpc(msg)
10041 return reply
10042
10043
10044
10045 @ReturnMapping(None)
10046 async def ModelUnset(self, keys):
10047 '''
10048 keys : typing.Sequence<+T_co>[str]
10049 Returns -> None
10050 '''
10051 # map input types to rpc msg
10052 _params = dict()
10053 msg = dict(type='Client', request='ModelUnset', version=1, params=_params)
10054 _params['keys'] = keys
10055 reply = await self.rpc(msg)
10056 return reply
10057
10058
10059
10060 @ReturnMapping(ModelUserInfoResults)
10061 async def ModelUserInfo(self):
10062 '''
10063
10064 Returns -> typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
10065 '''
10066 # map input types to rpc msg
10067 _params = dict()
10068 msg = dict(type='Client', request='ModelUserInfo', version=1, params=_params)
10069
10070 reply = await self.rpc(msg)
10071 return reply
10072
10073
10074
10075 @ReturnMapping(PrivateAddressResults)
10076 async def PrivateAddress(self, target):
10077 '''
10078 target : str
10079 Returns -> str
10080 '''
10081 # map input types to rpc msg
10082 _params = dict()
10083 msg = dict(type='Client', request='PrivateAddress', version=1, params=_params)
10084 _params['target'] = target
10085 reply = await self.rpc(msg)
10086 return reply
10087
10088
10089
10090 @ReturnMapping(ProvisioningScriptResult)
10091 async def ProvisioningScript(self, data_dir, disable_package_commands, machine_id, nonce):
10092 '''
10093 data_dir : str
10094 disable_package_commands : bool
10095 machine_id : str
10096 nonce : str
10097 Returns -> str
10098 '''
10099 # map input types to rpc msg
10100 _params = dict()
10101 msg = dict(type='Client', request='ProvisioningScript', version=1, params=_params)
10102 _params['data-dir'] = data_dir
10103 _params['disable-package-commands'] = disable_package_commands
10104 _params['machine-id'] = machine_id
10105 _params['nonce'] = nonce
10106 reply = await self.rpc(msg)
10107 return reply
10108
10109
10110
10111 @ReturnMapping(PublicAddressResults)
10112 async def PublicAddress(self, target):
10113 '''
10114 target : str
10115 Returns -> str
10116 '''
10117 # map input types to rpc msg
10118 _params = dict()
10119 msg = dict(type='Client', request='PublicAddress', version=1, params=_params)
10120 _params['target'] = target
10121 reply = await self.rpc(msg)
10122 return reply
10123
10124
10125
10126 @ReturnMapping(ResolveCharmResults)
10127 async def ResolveCharms(self, references):
10128 '''
10129 references : typing.Sequence<+T_co>[str]
10130 Returns -> typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
10131 '''
10132 # map input types to rpc msg
10133 _params = dict()
10134 msg = dict(type='Client', request='ResolveCharms', version=1, params=_params)
10135 _params['references'] = references
10136 reply = await self.rpc(msg)
10137 return reply
10138
10139
10140
10141 @ReturnMapping(None)
10142 async def Resolved(self, retry, unit_name):
10143 '''
10144 retry : bool
10145 unit_name : str
10146 Returns -> None
10147 '''
10148 # map input types to rpc msg
10149 _params = dict()
10150 msg = dict(type='Client', request='Resolved', version=1, params=_params)
10151 _params['retry'] = retry
10152 _params['unit-name'] = unit_name
10153 reply = await self.rpc(msg)
10154 return reply
10155
10156
10157
10158 @ReturnMapping(ErrorResults)
10159 async def RetryProvisioning(self, entities):
10160 '''
10161 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10162 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10163 '''
10164 # map input types to rpc msg
10165 _params = dict()
10166 msg = dict(type='Client', request='RetryProvisioning', version=1, params=_params)
10167 _params['entities'] = entities
10168 reply = await self.rpc(msg)
10169 return reply
10170
10171
10172
10173 @ReturnMapping(None)
10174 async def SetModelAgentVersion(self, version):
10175 '''
10176 version : Number
10177 Returns -> None
10178 '''
10179 # map input types to rpc msg
10180 _params = dict()
10181 msg = dict(type='Client', request='SetModelAgentVersion', version=1, params=_params)
10182 _params['version'] = version
10183 reply = await self.rpc(msg)
10184 return reply
10185
10186
10187
10188 @ReturnMapping(None)
10189 async def SetModelConstraints(self, application, constraints):
10190 '''
10191 application : str
10192 constraints : Value
10193 Returns -> None
10194 '''
10195 # map input types to rpc msg
10196 _params = dict()
10197 msg = dict(type='Client', request='SetModelConstraints', version=1, params=_params)
10198 _params['application'] = application
10199 _params['constraints'] = constraints
10200 reply = await self.rpc(msg)
10201 return reply
10202
10203
10204
10205 @ReturnMapping(StatusHistoryResults)
10206 async def StatusHistory(self, requests):
10207 '''
10208 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
10209 Returns -> typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
10210 '''
10211 # map input types to rpc msg
10212 _params = dict()
10213 msg = dict(type='Client', request='StatusHistory', version=1, params=_params)
10214 _params['requests'] = requests
10215 reply = await self.rpc(msg)
10216 return reply
10217
10218
10219
10220 @ReturnMapping(AllWatcherId)
10221 async def WatchAll(self):
10222 '''
10223
10224 Returns -> str
10225 '''
10226 # map input types to rpc msg
10227 _params = dict()
10228 msg = dict(type='Client', request='WatchAll', version=1, params=_params)
10229
10230 reply = await self.rpc(msg)
10231 return reply
10232
10233
10234 class CloudFacade(Type):
10235 name = 'Cloud'
10236 version = 1
10237 schema = {'definitions': {'Cloud': {'additionalProperties': False,
10238 'properties': {'auth-types': {'items': {'type': 'string'},
10239 'type': 'array'},
10240 'endpoint': {'type': 'string'},
10241 'identity-endpoint': {'type': 'string'},
10242 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
10243 'type': 'array'},
10244 'storage-endpoint': {'type': 'string'},
10245 'type': {'type': 'string'}},
10246 'required': ['type'],
10247 'type': 'object'},
10248 'CloudCredential': {'additionalProperties': False,
10249 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
10250 'type': 'object'},
10251 'auth-type': {'type': 'string'},
10252 'redacted': {'items': {'type': 'string'},
10253 'type': 'array'}},
10254 'required': ['auth-type'],
10255 'type': 'object'},
10256 'CloudCredentialResult': {'additionalProperties': False,
10257 'properties': {'error': {'$ref': '#/definitions/Error'},
10258 'result': {'$ref': '#/definitions/CloudCredential'}},
10259 'type': 'object'},
10260 'CloudCredentialResults': {'additionalProperties': False,
10261 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
10262 'type': 'array'}},
10263 'type': 'object'},
10264 'CloudInstanceTypesConstraint': {'additionalProperties': False,
10265 'properties': {'cloud-tag': {'type': 'string'},
10266 'constraints': {'$ref': '#/definitions/Value'},
10267 'region': {'type': 'string'}},
10268 'required': ['cloud-tag',
10269 'region'],
10270 'type': 'object'},
10271 'CloudInstanceTypesConstraints': {'additionalProperties': False,
10272 'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'},
10273 'type': 'array'}},
10274 'required': ['constraints'],
10275 'type': 'object'},
10276 'CloudRegion': {'additionalProperties': False,
10277 'properties': {'endpoint': {'type': 'string'},
10278 'identity-endpoint': {'type': 'string'},
10279 'name': {'type': 'string'},
10280 'storage-endpoint': {'type': 'string'}},
10281 'required': ['name'],
10282 'type': 'object'},
10283 'CloudResult': {'additionalProperties': False,
10284 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
10285 'error': {'$ref': '#/definitions/Error'}},
10286 'type': 'object'},
10287 'CloudResults': {'additionalProperties': False,
10288 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
10289 'type': 'array'}},
10290 'type': 'object'},
10291 'CloudsResult': {'additionalProperties': False,
10292 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
10293 'type': 'object'}},
10294 'type': 'object'},
10295 'Entities': {'additionalProperties': False,
10296 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10297 'type': 'array'}},
10298 'required': ['entities'],
10299 'type': 'object'},
10300 'Entity': {'additionalProperties': False,
10301 'properties': {'tag': {'type': 'string'}},
10302 'required': ['tag'],
10303 'type': 'object'},
10304 'Error': {'additionalProperties': False,
10305 'properties': {'code': {'type': 'string'},
10306 'info': {'$ref': '#/definitions/ErrorInfo'},
10307 'message': {'type': 'string'}},
10308 'required': ['message', 'code'],
10309 'type': 'object'},
10310 'ErrorInfo': {'additionalProperties': False,
10311 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10312 'macaroon-path': {'type': 'string'}},
10313 'type': 'object'},
10314 'ErrorResult': {'additionalProperties': False,
10315 'properties': {'error': {'$ref': '#/definitions/Error'}},
10316 'type': 'object'},
10317 'ErrorResults': {'additionalProperties': False,
10318 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10319 'type': 'array'}},
10320 'required': ['results'],
10321 'type': 'object'},
10322 'InstanceType': {'additionalProperties': False,
10323 'properties': {'arches': {'items': {'type': 'string'},
10324 'type': 'array'},
10325 'cost': {'type': 'integer'},
10326 'cpu-cores': {'type': 'integer'},
10327 'deprecated': {'type': 'boolean'},
10328 'memory': {'type': 'integer'},
10329 'name': {'type': 'string'},
10330 'root-disk': {'type': 'integer'},
10331 'virt-type': {'type': 'string'}},
10332 'required': ['arches', 'cpu-cores', 'memory'],
10333 'type': 'object'},
10334 'InstanceTypesResult': {'additionalProperties': False,
10335 'properties': {'cost-currency': {'type': 'string'},
10336 'cost-divisor': {'type': 'integer'},
10337 'cost-unit': {'type': 'string'},
10338 'error': {'$ref': '#/definitions/Error'},
10339 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
10340 'type': 'array'}},
10341 'type': 'object'},
10342 'InstanceTypesResults': {'additionalProperties': False,
10343 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
10344 'type': 'array'}},
10345 'required': ['results'],
10346 'type': 'object'},
10347 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10348 'StringResult': {'additionalProperties': False,
10349 'properties': {'error': {'$ref': '#/definitions/Error'},
10350 'result': {'type': 'string'}},
10351 'required': ['result'],
10352 'type': 'object'},
10353 'StringsResult': {'additionalProperties': False,
10354 'properties': {'error': {'$ref': '#/definitions/Error'},
10355 'result': {'items': {'type': 'string'},
10356 'type': 'array'}},
10357 'type': 'object'},
10358 'StringsResults': {'additionalProperties': False,
10359 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
10360 'type': 'array'}},
10361 'required': ['results'],
10362 'type': 'object'},
10363 'UpdateCloudCredential': {'additionalProperties': False,
10364 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
10365 'tag': {'type': 'string'}},
10366 'required': ['tag', 'credential'],
10367 'type': 'object'},
10368 'UpdateCloudCredentials': {'additionalProperties': False,
10369 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'},
10370 'type': 'array'}},
10371 'type': 'object'},
10372 'UserCloud': {'additionalProperties': False,
10373 'properties': {'cloud-tag': {'type': 'string'},
10374 'user-tag': {'type': 'string'}},
10375 'required': ['user-tag', 'cloud-tag'],
10376 'type': 'object'},
10377 'UserClouds': {'additionalProperties': False,
10378 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
10379 'type': 'array'}},
10380 'type': 'object'},
10381 'Value': {'additionalProperties': False,
10382 'properties': {'arch': {'type': 'string'},
10383 'container': {'type': 'string'},
10384 'cores': {'type': 'integer'},
10385 'cpu-power': {'type': 'integer'},
10386 'instance-type': {'type': 'string'},
10387 'mem': {'type': 'integer'},
10388 'root-disk': {'type': 'integer'},
10389 'spaces': {'items': {'type': 'string'},
10390 'type': 'array'},
10391 'tags': {'items': {'type': 'string'},
10392 'type': 'array'},
10393 'virt-type': {'type': 'string'}},
10394 'type': 'object'}},
10395 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10396 'Result': {'$ref': '#/definitions/CloudResults'}},
10397 'type': 'object'},
10398 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
10399 'type': 'object'},
10400 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10401 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
10402 'type': 'object'},
10403 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
10404 'type': 'object'},
10405 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
10406 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
10407 'type': 'object'},
10408 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10409 'Result': {'$ref': '#/definitions/ErrorResults'}},
10410 'type': 'object'},
10411 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'},
10412 'Result': {'$ref': '#/definitions/ErrorResults'}},
10413 'type': 'object'},
10414 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
10415 'Result': {'$ref': '#/definitions/StringsResults'}},
10416 'type': 'object'}},
10417 'type': 'object'}
10418
10419
10420 @ReturnMapping(CloudResults)
10421 async def Cloud(self, entities):
10422 '''
10423 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10424 Returns -> typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
10425 '''
10426 # map input types to rpc msg
10427 _params = dict()
10428 msg = dict(type='Cloud', request='Cloud', version=1, params=_params)
10429 _params['entities'] = entities
10430 reply = await self.rpc(msg)
10431 return reply
10432
10433
10434
10435 @ReturnMapping(CloudsResult)
10436 async def Clouds(self):
10437 '''
10438
10439 Returns -> typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
10440 '''
10441 # map input types to rpc msg
10442 _params = dict()
10443 msg = dict(type='Cloud', request='Clouds', version=1, params=_params)
10444
10445 reply = await self.rpc(msg)
10446 return reply
10447
10448
10449
10450 @ReturnMapping(CloudCredentialResults)
10451 async def Credential(self, entities):
10452 '''
10453 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10454 Returns -> typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
10455 '''
10456 # map input types to rpc msg
10457 _params = dict()
10458 msg = dict(type='Cloud', request='Credential', version=1, params=_params)
10459 _params['entities'] = entities
10460 reply = await self.rpc(msg)
10461 return reply
10462
10463
10464
10465 @ReturnMapping(StringResult)
10466 async def DefaultCloud(self):
10467 '''
10468
10469 Returns -> typing.Union[_ForwardRef('Error'), str]
10470 '''
10471 # map input types to rpc msg
10472 _params = dict()
10473 msg = dict(type='Cloud', request='DefaultCloud', version=1, params=_params)
10474
10475 reply = await self.rpc(msg)
10476 return reply
10477
10478
10479
10480 @ReturnMapping(InstanceTypesResults)
10481 async def InstanceTypes(self, constraints):
10482 '''
10483 constraints : typing.Sequence<+T_co>[~CloudInstanceTypesConstraint]<~CloudInstanceTypesConstraint>
10484 Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
10485 '''
10486 # map input types to rpc msg
10487 _params = dict()
10488 msg = dict(type='Cloud', request='InstanceTypes', version=1, params=_params)
10489 _params['constraints'] = constraints
10490 reply = await self.rpc(msg)
10491 return reply
10492
10493
10494
10495 @ReturnMapping(ErrorResults)
10496 async def RevokeCredentials(self, entities):
10497 '''
10498 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10499 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10500 '''
10501 # map input types to rpc msg
10502 _params = dict()
10503 msg = dict(type='Cloud', request='RevokeCredentials', version=1, params=_params)
10504 _params['entities'] = entities
10505 reply = await self.rpc(msg)
10506 return reply
10507
10508
10509
10510 @ReturnMapping(ErrorResults)
10511 async def UpdateCredentials(self, credentials):
10512 '''
10513 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
10514 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10515 '''
10516 # map input types to rpc msg
10517 _params = dict()
10518 msg = dict(type='Cloud', request='UpdateCredentials', version=1, params=_params)
10519 _params['credentials'] = credentials
10520 reply = await self.rpc(msg)
10521 return reply
10522
10523
10524
10525 @ReturnMapping(StringsResults)
10526 async def UserCredentials(self, user_clouds):
10527 '''
10528 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
10529 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
10530 '''
10531 # map input types to rpc msg
10532 _params = dict()
10533 msg = dict(type='Cloud', request='UserCredentials', version=1, params=_params)
10534 _params['user-clouds'] = user_clouds
10535 reply = await self.rpc(msg)
10536 return reply
10537
10538
10539 class ControllerFacade(Type):
10540 name = 'Controller'
10541 version = 3
10542 schema = {'definitions': {'AllWatcherId': {'additionalProperties': False,
10543 'properties': {'watcher-id': {'type': 'string'}},
10544 'required': ['watcher-id'],
10545 'type': 'object'},
10546 'CloudCredential': {'additionalProperties': False,
10547 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
10548 'type': 'object'},
10549 'auth-type': {'type': 'string'},
10550 'redacted': {'items': {'type': 'string'},
10551 'type': 'array'}},
10552 'required': ['auth-type'],
10553 'type': 'object'},
10554 'CloudSpec': {'additionalProperties': False,
10555 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
10556 'endpoint': {'type': 'string'},
10557 'identity-endpoint': {'type': 'string'},
10558 'name': {'type': 'string'},
10559 'region': {'type': 'string'},
10560 'storage-endpoint': {'type': 'string'},
10561 'type': {'type': 'string'}},
10562 'required': ['type', 'name'],
10563 'type': 'object'},
10564 'CloudSpecResult': {'additionalProperties': False,
10565 'properties': {'error': {'$ref': '#/definitions/Error'},
10566 'result': {'$ref': '#/definitions/CloudSpec'}},
10567 'type': 'object'},
10568 'CloudSpecResults': {'additionalProperties': False,
10569 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
10570 'type': 'array'}},
10571 'type': 'object'},
10572 'ConfigValue': {'additionalProperties': False,
10573 'properties': {'source': {'type': 'string'},
10574 'value': {'additionalProperties': True,
10575 'type': 'object'}},
10576 'required': ['value', 'source'],
10577 'type': 'object'},
10578 'ControllerConfigResult': {'additionalProperties': False,
10579 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
10580 'type': 'object'}},
10581 'type': 'object'}},
10582 'required': ['config'],
10583 'type': 'object'},
10584 'DestroyControllerArgs': {'additionalProperties': False,
10585 'properties': {'destroy-models': {'type': 'boolean'}},
10586 'required': ['destroy-models'],
10587 'type': 'object'},
10588 'Entities': {'additionalProperties': False,
10589 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10590 'type': 'array'}},
10591 'required': ['entities'],
10592 'type': 'object'},
10593 'Entity': {'additionalProperties': False,
10594 'properties': {'tag': {'type': 'string'}},
10595 'required': ['tag'],
10596 'type': 'object'},
10597 'Error': {'additionalProperties': False,
10598 'properties': {'code': {'type': 'string'},
10599 'info': {'$ref': '#/definitions/ErrorInfo'},
10600 'message': {'type': 'string'}},
10601 'required': ['message', 'code'],
10602 'type': 'object'},
10603 'ErrorInfo': {'additionalProperties': False,
10604 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10605 'macaroon-path': {'type': 'string'}},
10606 'type': 'object'},
10607 'ErrorResult': {'additionalProperties': False,
10608 'properties': {'error': {'$ref': '#/definitions/Error'}},
10609 'type': 'object'},
10610 'ErrorResults': {'additionalProperties': False,
10611 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10612 'type': 'array'}},
10613 'required': ['results'],
10614 'type': 'object'},
10615 'HostedModelConfig': {'additionalProperties': False,
10616 'properties': {'cloud-spec': {'$ref': '#/definitions/CloudSpec'},
10617 'config': {'patternProperties': {'.*': {'additionalProperties': True,
10618 'type': 'object'}},
10619 'type': 'object'},
10620 'error': {'$ref': '#/definitions/Error'},
10621 'name': {'type': 'string'},
10622 'owner': {'type': 'string'}},
10623 'required': ['name', 'owner'],
10624 'type': 'object'},
10625 'HostedModelConfigsResults': {'additionalProperties': False,
10626 'properties': {'models': {'items': {'$ref': '#/definitions/HostedModelConfig'},
10627 'type': 'array'}},
10628 'required': ['models'],
10629 'type': 'object'},
10630 'InitiateMigrationArgs': {'additionalProperties': False,
10631 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
10632 'type': 'array'}},
10633 'required': ['specs'],
10634 'type': 'object'},
10635 'InitiateMigrationResult': {'additionalProperties': False,
10636 'properties': {'error': {'$ref': '#/definitions/Error'},
10637 'migration-id': {'type': 'string'},
10638 'model-tag': {'type': 'string'}},
10639 'required': ['model-tag',
10640 'migration-id'],
10641 'type': 'object'},
10642 'InitiateMigrationResults': {'additionalProperties': False,
10643 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
10644 'type': 'array'}},
10645 'required': ['results'],
10646 'type': 'object'},
10647 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10648 'MachineHardware': {'additionalProperties': False,
10649 'properties': {'arch': {'type': 'string'},
10650 'availability-zone': {'type': 'string'},
10651 'cores': {'type': 'integer'},
10652 'cpu-power': {'type': 'integer'},
10653 'mem': {'type': 'integer'},
10654 'root-disk': {'type': 'integer'},
10655 'tags': {'items': {'type': 'string'},
10656 'type': 'array'}},
10657 'type': 'object'},
10658 'MigrationSpec': {'additionalProperties': False,
10659 'properties': {'external-control': {'type': 'boolean'},
10660 'model-tag': {'type': 'string'},
10661 'skip-initial-prechecks': {'type': 'boolean'},
10662 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
10663 'required': ['model-tag',
10664 'target-info',
10665 'external-control',
10666 'skip-initial-prechecks'],
10667 'type': 'object'},
10668 'MigrationTargetInfo': {'additionalProperties': False,
10669 'properties': {'addrs': {'items': {'type': 'string'},
10670 'type': 'array'},
10671 'auth-tag': {'type': 'string'},
10672 'ca-cert': {'type': 'string'},
10673 'controller-tag': {'type': 'string'},
10674 'macaroons': {'type': 'string'},
10675 'password': {'type': 'string'}},
10676 'required': ['controller-tag',
10677 'addrs',
10678 'ca-cert',
10679 'auth-tag'],
10680 'type': 'object'},
10681 'Model': {'additionalProperties': False,
10682 'properties': {'name': {'type': 'string'},
10683 'owner-tag': {'type': 'string'},
10684 'uuid': {'type': 'string'}},
10685 'required': ['name', 'uuid', 'owner-tag'],
10686 'type': 'object'},
10687 'ModelBlockInfo': {'additionalProperties': False,
10688 'properties': {'blocks': {'items': {'type': 'string'},
10689 'type': 'array'},
10690 'model-uuid': {'type': 'string'},
10691 'name': {'type': 'string'},
10692 'owner-tag': {'type': 'string'}},
10693 'required': ['name',
10694 'model-uuid',
10695 'owner-tag',
10696 'blocks'],
10697 'type': 'object'},
10698 'ModelBlockInfoList': {'additionalProperties': False,
10699 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
10700 'type': 'array'}},
10701 'type': 'object'},
10702 'ModelConfigResults': {'additionalProperties': False,
10703 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
10704 'type': 'object'}},
10705 'required': ['config'],
10706 'type': 'object'},
10707 'ModelMachineInfo': {'additionalProperties': False,
10708 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
10709 'has-vote': {'type': 'boolean'},
10710 'id': {'type': 'string'},
10711 'instance-id': {'type': 'string'},
10712 'status': {'type': 'string'},
10713 'wants-vote': {'type': 'boolean'}},
10714 'required': ['id'],
10715 'type': 'object'},
10716 'ModelStatus': {'additionalProperties': False,
10717 'properties': {'application-count': {'type': 'integer'},
10718 'hosted-machine-count': {'type': 'integer'},
10719 'life': {'type': 'string'},
10720 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
10721 'type': 'array'},
10722 'model-tag': {'type': 'string'},
10723 'owner-tag': {'type': 'string'}},
10724 'required': ['model-tag',
10725 'life',
10726 'hosted-machine-count',
10727 'application-count',
10728 'owner-tag'],
10729 'type': 'object'},
10730 'ModelStatusResults': {'additionalProperties': False,
10731 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
10732 'type': 'array'}},
10733 'required': ['models'],
10734 'type': 'object'},
10735 'ModelTag': {'additionalProperties': False, 'type': 'object'},
10736 'ModifyControllerAccess': {'additionalProperties': False,
10737 'properties': {'access': {'type': 'string'},
10738 'action': {'type': 'string'},
10739 'user-tag': {'type': 'string'}},
10740 'required': ['user-tag',
10741 'action',
10742 'access'],
10743 'type': 'object'},
10744 'ModifyControllerAccessRequest': {'additionalProperties': False,
10745 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
10746 'type': 'array'}},
10747 'required': ['changes'],
10748 'type': 'object'},
10749 'RemoveBlocksArgs': {'additionalProperties': False,
10750 'properties': {'all': {'type': 'boolean'}},
10751 'required': ['all'],
10752 'type': 'object'},
10753 'UserAccess': {'additionalProperties': False,
10754 'properties': {'access': {'type': 'string'},
10755 'user-tag': {'type': 'string'}},
10756 'required': ['user-tag', 'access'],
10757 'type': 'object'},
10758 'UserAccessResult': {'additionalProperties': False,
10759 'properties': {'error': {'$ref': '#/definitions/Error'},
10760 'result': {'$ref': '#/definitions/UserAccess'}},
10761 'type': 'object'},
10762 'UserAccessResults': {'additionalProperties': False,
10763 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
10764 'type': 'array'}},
10765 'type': 'object'},
10766 'UserModel': {'additionalProperties': False,
10767 'properties': {'last-connection': {'format': 'date-time',
10768 'type': 'string'},
10769 'model': {'$ref': '#/definitions/Model'}},
10770 'required': ['model', 'last-connection'],
10771 'type': 'object'},
10772 'UserModelList': {'additionalProperties': False,
10773 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
10774 'type': 'array'}},
10775 'required': ['user-models'],
10776 'type': 'object'}},
10777 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
10778 'type': 'object'},
10779 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10780 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
10781 'type': 'object'},
10782 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
10783 'type': 'object'},
10784 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
10785 'type': 'object'},
10786 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
10787 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
10788 'type': 'object'},
10789 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10790 'Result': {'$ref': '#/definitions/UserAccessResults'}},
10791 'type': 'object'},
10792 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}},
10793 'type': 'object'},
10794 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
10795 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
10796 'type': 'object'},
10797 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
10798 'type': 'object'},
10799 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
10800 'type': 'object'},
10801 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10802 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
10803 'type': 'object'},
10804 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
10805 'Result': {'$ref': '#/definitions/ErrorResults'}},
10806 'type': 'object'},
10807 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
10808 'type': 'object'},
10809 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
10810 'type': 'object'}},
10811 'type': 'object'}
10812
10813
10814 @ReturnMapping(UserModelList)
10815 async def AllModels(self):
10816 '''
10817
10818 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
10819 '''
10820 # map input types to rpc msg
10821 _params = dict()
10822 msg = dict(type='Controller', request='AllModels', version=3, params=_params)
10823
10824 reply = await self.rpc(msg)
10825 return reply
10826
10827
10828
10829 @ReturnMapping(CloudSpecResults)
10830 async def CloudSpec(self, entities):
10831 '''
10832 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10833 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
10834 '''
10835 # map input types to rpc msg
10836 _params = dict()
10837 msg = dict(type='Controller', request='CloudSpec', version=3, params=_params)
10838 _params['entities'] = entities
10839 reply = await self.rpc(msg)
10840 return reply
10841
10842
10843
10844 @ReturnMapping(ControllerConfigResult)
10845 async def ControllerConfig(self):
10846 '''
10847
10848 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
10849 '''
10850 # map input types to rpc msg
10851 _params = dict()
10852 msg = dict(type='Controller', request='ControllerConfig', version=3, params=_params)
10853
10854 reply = await self.rpc(msg)
10855 return reply
10856
10857
10858
10859 @ReturnMapping(None)
10860 async def DestroyController(self, destroy_models):
10861 '''
10862 destroy_models : bool
10863 Returns -> None
10864 '''
10865 # map input types to rpc msg
10866 _params = dict()
10867 msg = dict(type='Controller', request='DestroyController', version=3, params=_params)
10868 _params['destroy-models'] = destroy_models
10869 reply = await self.rpc(msg)
10870 return reply
10871
10872
10873
10874 @ReturnMapping(CloudSpecResult)
10875 async def GetCloudSpec(self):
10876 '''
10877
10878 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
10879 '''
10880 # map input types to rpc msg
10881 _params = dict()
10882 msg = dict(type='Controller', request='GetCloudSpec', version=3, params=_params)
10883
10884 reply = await self.rpc(msg)
10885 return reply
10886
10887
10888
10889 @ReturnMapping(UserAccessResults)
10890 async def GetControllerAccess(self, entities):
10891 '''
10892 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10893 Returns -> typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
10894 '''
10895 # map input types to rpc msg
10896 _params = dict()
10897 msg = dict(type='Controller', request='GetControllerAccess', version=3, params=_params)
10898 _params['entities'] = entities
10899 reply = await self.rpc(msg)
10900 return reply
10901
10902
10903
10904 @ReturnMapping(HostedModelConfigsResults)
10905 async def HostedModelConfigs(self):
10906 '''
10907
10908 Returns -> typing.Sequence<+T_co>[~HostedModelConfig]<~HostedModelConfig>
10909 '''
10910 # map input types to rpc msg
10911 _params = dict()
10912 msg = dict(type='Controller', request='HostedModelConfigs', version=3, params=_params)
10913
10914 reply = await self.rpc(msg)
10915 return reply
10916
10917
10918
10919 @ReturnMapping(InitiateMigrationResults)
10920 async def InitiateMigration(self, specs):
10921 '''
10922 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
10923 Returns -> typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
10924 '''
10925 # map input types to rpc msg
10926 _params = dict()
10927 msg = dict(type='Controller', request='InitiateMigration', version=3, params=_params)
10928 _params['specs'] = specs
10929 reply = await self.rpc(msg)
10930 return reply
10931
10932
10933
10934 @ReturnMapping(ModelBlockInfoList)
10935 async def ListBlockedModels(self):
10936 '''
10937
10938 Returns -> typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
10939 '''
10940 # map input types to rpc msg
10941 _params = dict()
10942 msg = dict(type='Controller', request='ListBlockedModels', version=3, params=_params)
10943
10944 reply = await self.rpc(msg)
10945 return reply
10946
10947
10948
10949 @ReturnMapping(ModelConfigResults)
10950 async def ModelConfig(self):
10951 '''
10952
10953 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
10954 '''
10955 # map input types to rpc msg
10956 _params = dict()
10957 msg = dict(type='Controller', request='ModelConfig', version=3, params=_params)
10958
10959 reply = await self.rpc(msg)
10960 return reply
10961
10962
10963
10964 @ReturnMapping(ModelStatusResults)
10965 async def ModelStatus(self, entities):
10966 '''
10967 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10968 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
10969 '''
10970 # map input types to rpc msg
10971 _params = dict()
10972 msg = dict(type='Controller', request='ModelStatus', version=3, params=_params)
10973 _params['entities'] = entities
10974 reply = await self.rpc(msg)
10975 return reply
10976
10977
10978
10979 @ReturnMapping(ErrorResults)
10980 async def ModifyControllerAccess(self, changes):
10981 '''
10982 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
10983 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10984 '''
10985 # map input types to rpc msg
10986 _params = dict()
10987 msg = dict(type='Controller', request='ModifyControllerAccess', version=3, params=_params)
10988 _params['changes'] = changes
10989 reply = await self.rpc(msg)
10990 return reply
10991
10992
10993
10994 @ReturnMapping(None)
10995 async def RemoveBlocks(self, all_):
10996 '''
10997 all_ : bool
10998 Returns -> None
10999 '''
11000 # map input types to rpc msg
11001 _params = dict()
11002 msg = dict(type='Controller', request='RemoveBlocks', version=3, params=_params)
11003 _params['all'] = all_
11004 reply = await self.rpc(msg)
11005 return reply
11006
11007
11008
11009 @ReturnMapping(AllWatcherId)
11010 async def WatchAllModels(self):
11011 '''
11012
11013 Returns -> str
11014 '''
11015 # map input types to rpc msg
11016 _params = dict()
11017 msg = dict(type='Controller', request='WatchAllModels', version=3, params=_params)
11018
11019 reply = await self.rpc(msg)
11020 return reply
11021
11022
11023 class DeployerFacade(Type):
11024 name = 'Deployer'
11025 version = 1
11026 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
11027 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
11028 'type': 'array'},
11029 'type': 'array'}},
11030 'required': ['servers'],
11031 'type': 'object'},
11032 'Address': {'additionalProperties': False,
11033 'properties': {'scope': {'type': 'string'},
11034 'space-name': {'type': 'string'},
11035 'type': {'type': 'string'},
11036 'value': {'type': 'string'}},
11037 'required': ['value', 'type', 'scope'],
11038 'type': 'object'},
11039 'BytesResult': {'additionalProperties': False,
11040 'properties': {'result': {'items': {'type': 'integer'},
11041 'type': 'array'}},
11042 'required': ['result'],
11043 'type': 'object'},
11044 'DeployerConnectionValues': {'additionalProperties': False,
11045 'properties': {'api-addresses': {'items': {'type': 'string'},
11046 'type': 'array'},
11047 'state-addresses': {'items': {'type': 'string'},
11048 'type': 'array'}},
11049 'required': ['state-addresses',
11050 'api-addresses'],
11051 'type': 'object'},
11052 'Entities': {'additionalProperties': False,
11053 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11054 'type': 'array'}},
11055 'required': ['entities'],
11056 'type': 'object'},
11057 'Entity': {'additionalProperties': False,
11058 'properties': {'tag': {'type': 'string'}},
11059 'required': ['tag'],
11060 'type': 'object'},
11061 'EntityPassword': {'additionalProperties': False,
11062 'properties': {'password': {'type': 'string'},
11063 'tag': {'type': 'string'}},
11064 'required': ['tag', 'password'],
11065 'type': 'object'},
11066 'EntityPasswords': {'additionalProperties': False,
11067 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
11068 'type': 'array'}},
11069 'required': ['changes'],
11070 'type': 'object'},
11071 'EntityStatusArgs': {'additionalProperties': False,
11072 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
11073 'type': 'object'}},
11074 'type': 'object'},
11075 'info': {'type': 'string'},
11076 'status': {'type': 'string'},
11077 'tag': {'type': 'string'}},
11078 'required': ['tag',
11079 'status',
11080 'info',
11081 'data'],
11082 'type': 'object'},
11083 'Error': {'additionalProperties': False,
11084 'properties': {'code': {'type': 'string'},
11085 'info': {'$ref': '#/definitions/ErrorInfo'},
11086 'message': {'type': 'string'}},
11087 'required': ['message', 'code'],
11088 'type': 'object'},
11089 'ErrorInfo': {'additionalProperties': False,
11090 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11091 'macaroon-path': {'type': 'string'}},
11092 'type': 'object'},
11093 'ErrorResult': {'additionalProperties': False,
11094 'properties': {'error': {'$ref': '#/definitions/Error'}},
11095 'type': 'object'},
11096 'ErrorResults': {'additionalProperties': False,
11097 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11098 'type': 'array'}},
11099 'required': ['results'],
11100 'type': 'object'},
11101 'HostPort': {'additionalProperties': False,
11102 'properties': {'Address': {'$ref': '#/definitions/Address'},
11103 'port': {'type': 'integer'}},
11104 'required': ['Address', 'port'],
11105 'type': 'object'},
11106 'LifeResult': {'additionalProperties': False,
11107 'properties': {'error': {'$ref': '#/definitions/Error'},
11108 'life': {'type': 'string'}},
11109 'required': ['life'],
11110 'type': 'object'},
11111 'LifeResults': {'additionalProperties': False,
11112 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
11113 'type': 'array'}},
11114 'required': ['results'],
11115 'type': 'object'},
11116 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11117 'NotifyWatchResult': {'additionalProperties': False,
11118 'properties': {'NotifyWatcherId': {'type': 'string'},
11119 'error': {'$ref': '#/definitions/Error'}},
11120 'required': ['NotifyWatcherId'],
11121 'type': 'object'},
11122 'SetStatus': {'additionalProperties': False,
11123 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
11124 'type': 'array'}},
11125 'required': ['entities'],
11126 'type': 'object'},
11127 'StringResult': {'additionalProperties': False,
11128 'properties': {'error': {'$ref': '#/definitions/Error'},
11129 'result': {'type': 'string'}},
11130 'required': ['result'],
11131 'type': 'object'},
11132 'StringsResult': {'additionalProperties': False,
11133 'properties': {'error': {'$ref': '#/definitions/Error'},
11134 'result': {'items': {'type': 'string'},
11135 'type': 'array'}},
11136 'type': 'object'},
11137 'StringsWatchResult': {'additionalProperties': False,
11138 'properties': {'changes': {'items': {'type': 'string'},
11139 'type': 'array'},
11140 'error': {'$ref': '#/definitions/Error'},
11141 'watcher-id': {'type': 'string'}},
11142 'required': ['watcher-id'],
11143 'type': 'object'},
11144 'StringsWatchResults': {'additionalProperties': False,
11145 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
11146 'type': 'array'}},
11147 'required': ['results'],
11148 'type': 'object'}},
11149 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
11150 'type': 'object'},
11151 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
11152 'type': 'object'},
11153 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
11154 'type': 'object'},
11155 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
11156 'type': 'object'},
11157 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11158 'Result': {'$ref': '#/definitions/LifeResults'}},
11159 'type': 'object'},
11160 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
11161 'type': 'object'},
11162 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11163 'Result': {'$ref': '#/definitions/ErrorResults'}},
11164 'type': 'object'},
11165 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
11166 'Result': {'$ref': '#/definitions/ErrorResults'}},
11167 'type': 'object'},
11168 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11169 'Result': {'$ref': '#/definitions/ErrorResults'}},
11170 'type': 'object'},
11171 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
11172 'type': 'object'},
11173 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11174 'Result': {'$ref': '#/definitions/ErrorResults'}},
11175 'type': 'object'},
11176 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11177 'type': 'object'},
11178 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11179 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11180 'type': 'object'}},
11181 'type': 'object'}
11182
11183
11184 @ReturnMapping(StringsResult)
11185 async def APIAddresses(self):
11186 '''
11187
11188 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
11189 '''
11190 # map input types to rpc msg
11191 _params = dict()
11192 msg = dict(type='Deployer', request='APIAddresses', version=1, params=_params)
11193
11194 reply = await self.rpc(msg)
11195 return reply
11196
11197
11198
11199 @ReturnMapping(APIHostPortsResult)
11200 async def APIHostPorts(self):
11201 '''
11202
11203 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
11204 '''
11205 # map input types to rpc msg
11206 _params = dict()
11207 msg = dict(type='Deployer', request='APIHostPorts', version=1, params=_params)
11208
11209 reply = await self.rpc(msg)
11210 return reply
11211
11212
11213
11214 @ReturnMapping(BytesResult)
11215 async def CACert(self):
11216 '''
11217
11218 Returns -> typing.Sequence<+T_co>[int]
11219 '''
11220 # map input types to rpc msg
11221 _params = dict()
11222 msg = dict(type='Deployer', request='CACert', version=1, params=_params)
11223
11224 reply = await self.rpc(msg)
11225 return reply
11226
11227
11228
11229 @ReturnMapping(DeployerConnectionValues)
11230 async def ConnectionInfo(self):
11231 '''
11232
11233 Returns -> typing.Sequence<+T_co>[str]
11234 '''
11235 # map input types to rpc msg
11236 _params = dict()
11237 msg = dict(type='Deployer', request='ConnectionInfo', version=1, params=_params)
11238
11239 reply = await self.rpc(msg)
11240 return reply
11241
11242
11243
11244 @ReturnMapping(LifeResults)
11245 async def Life(self, entities):
11246 '''
11247 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11248 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
11249 '''
11250 # map input types to rpc msg
11251 _params = dict()
11252 msg = dict(type='Deployer', request='Life', version=1, params=_params)
11253 _params['entities'] = entities
11254 reply = await self.rpc(msg)
11255 return reply
11256
11257
11258
11259 @ReturnMapping(StringResult)
11260 async def ModelUUID(self):
11261 '''
11262
11263 Returns -> typing.Union[_ForwardRef('Error'), str]
11264 '''
11265 # map input types to rpc msg
11266 _params = dict()
11267 msg = dict(type='Deployer', request='ModelUUID', version=1, params=_params)
11268
11269 reply = await self.rpc(msg)
11270 return reply
11271
11272
11273
11274 @ReturnMapping(ErrorResults)
11275 async def Remove(self, entities):
11276 '''
11277 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11278 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11279 '''
11280 # map input types to rpc msg
11281 _params = dict()
11282 msg = dict(type='Deployer', request='Remove', version=1, params=_params)
11283 _params['entities'] = entities
11284 reply = await self.rpc(msg)
11285 return reply
11286
11287
11288
11289 @ReturnMapping(ErrorResults)
11290 async def SetPasswords(self, changes):
11291 '''
11292 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
11293 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11294 '''
11295 # map input types to rpc msg
11296 _params = dict()
11297 msg = dict(type='Deployer', request='SetPasswords', version=1, params=_params)
11298 _params['changes'] = changes
11299 reply = await self.rpc(msg)
11300 return reply
11301
11302
11303
11304 @ReturnMapping(ErrorResults)
11305 async def SetStatus(self, entities):
11306 '''
11307 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
11308 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11309 '''
11310 # map input types to rpc msg
11311 _params = dict()
11312 msg = dict(type='Deployer', request='SetStatus', version=1, params=_params)
11313 _params['entities'] = entities
11314 reply = await self.rpc(msg)
11315 return reply
11316
11317
11318
11319 @ReturnMapping(StringsResult)
11320 async def StateAddresses(self):
11321 '''
11322
11323 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
11324 '''
11325 # map input types to rpc msg
11326 _params = dict()
11327 msg = dict(type='Deployer', request='StateAddresses', version=1, params=_params)
11328
11329 reply = await self.rpc(msg)
11330 return reply
11331
11332
11333
11334 @ReturnMapping(ErrorResults)
11335 async def UpdateStatus(self, entities):
11336 '''
11337 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
11338 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11339 '''
11340 # map input types to rpc msg
11341 _params = dict()
11342 msg = dict(type='Deployer', request='UpdateStatus', version=1, params=_params)
11343 _params['entities'] = entities
11344 reply = await self.rpc(msg)
11345 return reply
11346
11347
11348
11349 @ReturnMapping(NotifyWatchResult)
11350 async def WatchAPIHostPorts(self):
11351 '''
11352
11353 Returns -> typing.Union[str, _ForwardRef('Error')]
11354 '''
11355 # map input types to rpc msg
11356 _params = dict()
11357 msg = dict(type='Deployer', request='WatchAPIHostPorts', version=1, params=_params)
11358
11359 reply = await self.rpc(msg)
11360 return reply
11361
11362
11363
11364 @ReturnMapping(StringsWatchResults)
11365 async def WatchUnits(self, entities):
11366 '''
11367 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11368 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
11369 '''
11370 # map input types to rpc msg
11371 _params = dict()
11372 msg = dict(type='Deployer', request='WatchUnits', version=1, params=_params)
11373 _params['entities'] = entities
11374 reply = await self.rpc(msg)
11375 return reply
11376
11377
11378 class DiscoverSpacesFacade(Type):
11379 name = 'DiscoverSpaces'
11380 version = 2
11381 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
11382 'properties': {'space-tag': {'type': 'string'},
11383 'subnet-provider-id': {'type': 'string'},
11384 'subnet-tag': {'type': 'string'},
11385 'zones': {'items': {'type': 'string'},
11386 'type': 'array'}},
11387 'required': ['space-tag'],
11388 'type': 'object'},
11389 'AddSubnetsParams': {'additionalProperties': False,
11390 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
11391 'type': 'array'}},
11392 'required': ['subnets'],
11393 'type': 'object'},
11394 'CreateSpaceParams': {'additionalProperties': False,
11395 'properties': {'provider-id': {'type': 'string'},
11396 'public': {'type': 'boolean'},
11397 'space-tag': {'type': 'string'},
11398 'subnet-tags': {'items': {'type': 'string'},
11399 'type': 'array'}},
11400 'required': ['subnet-tags',
11401 'space-tag',
11402 'public'],
11403 'type': 'object'},
11404 'CreateSpacesParams': {'additionalProperties': False,
11405 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
11406 'type': 'array'}},
11407 'required': ['spaces'],
11408 'type': 'object'},
11409 'DiscoverSpacesResults': {'additionalProperties': False,
11410 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'},
11411 'type': 'array'}},
11412 'required': ['results'],
11413 'type': 'object'},
11414 'Error': {'additionalProperties': False,
11415 'properties': {'code': {'type': 'string'},
11416 'info': {'$ref': '#/definitions/ErrorInfo'},
11417 'message': {'type': 'string'}},
11418 'required': ['message', 'code'],
11419 'type': 'object'},
11420 'ErrorInfo': {'additionalProperties': False,
11421 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11422 'macaroon-path': {'type': 'string'}},
11423 'type': 'object'},
11424 'ErrorResult': {'additionalProperties': False,
11425 'properties': {'error': {'$ref': '#/definitions/Error'}},
11426 'type': 'object'},
11427 'ErrorResults': {'additionalProperties': False,
11428 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11429 'type': 'array'}},
11430 'required': ['results'],
11431 'type': 'object'},
11432 'ListSubnetsResults': {'additionalProperties': False,
11433 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
11434 'type': 'array'}},
11435 'required': ['results'],
11436 'type': 'object'},
11437 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11438 'ModelConfigResult': {'additionalProperties': False,
11439 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
11440 'type': 'object'}},
11441 'type': 'object'}},
11442 'required': ['config'],
11443 'type': 'object'},
11444 'ProviderSpace': {'additionalProperties': False,
11445 'properties': {'error': {'$ref': '#/definitions/Error'},
11446 'name': {'type': 'string'},
11447 'provider-id': {'type': 'string'},
11448 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
11449 'type': 'array'}},
11450 'required': ['name',
11451 'provider-id',
11452 'subnets'],
11453 'type': 'object'},
11454 'Subnet': {'additionalProperties': False,
11455 'properties': {'cidr': {'type': 'string'},
11456 'life': {'type': 'string'},
11457 'provider-id': {'type': 'string'},
11458 'space-tag': {'type': 'string'},
11459 'status': {'type': 'string'},
11460 'vlan-tag': {'type': 'integer'},
11461 'zones': {'items': {'type': 'string'},
11462 'type': 'array'}},
11463 'required': ['cidr',
11464 'vlan-tag',
11465 'life',
11466 'space-tag',
11467 'zones'],
11468 'type': 'object'},
11469 'SubnetsFilters': {'additionalProperties': False,
11470 'properties': {'space-tag': {'type': 'string'},
11471 'zone': {'type': 'string'}},
11472 'type': 'object'}},
11473 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
11474 'Result': {'$ref': '#/definitions/ErrorResults'}},
11475 'type': 'object'},
11476 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
11477 'Result': {'$ref': '#/definitions/ErrorResults'}},
11478 'type': 'object'},
11479 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
11480 'type': 'object'},
11481 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
11482 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
11483 'type': 'object'},
11484 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11485 'type': 'object'}},
11486 'type': 'object'}
11487
11488
11489 @ReturnMapping(ErrorResults)
11490 async def AddSubnets(self, subnets):
11491 '''
11492 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
11493 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11494 '''
11495 # map input types to rpc msg
11496 _params = dict()
11497 msg = dict(type='DiscoverSpaces', request='AddSubnets', version=2, params=_params)
11498 _params['subnets'] = subnets
11499 reply = await self.rpc(msg)
11500 return reply
11501
11502
11503
11504 @ReturnMapping(ErrorResults)
11505 async def CreateSpaces(self, spaces):
11506 '''
11507 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
11508 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11509 '''
11510 # map input types to rpc msg
11511 _params = dict()
11512 msg = dict(type='DiscoverSpaces', request='CreateSpaces', version=2, params=_params)
11513 _params['spaces'] = spaces
11514 reply = await self.rpc(msg)
11515 return reply
11516
11517
11518
11519 @ReturnMapping(DiscoverSpacesResults)
11520 async def ListSpaces(self):
11521 '''
11522
11523 Returns -> typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
11524 '''
11525 # map input types to rpc msg
11526 _params = dict()
11527 msg = dict(type='DiscoverSpaces', request='ListSpaces', version=2, params=_params)
11528
11529 reply = await self.rpc(msg)
11530 return reply
11531
11532
11533
11534 @ReturnMapping(ListSubnetsResults)
11535 async def ListSubnets(self, space_tag, zone):
11536 '''
11537 space_tag : str
11538 zone : str
11539 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
11540 '''
11541 # map input types to rpc msg
11542 _params = dict()
11543 msg = dict(type='DiscoverSpaces', request='ListSubnets', version=2, params=_params)
11544 _params['space-tag'] = space_tag
11545 _params['zone'] = zone
11546 reply = await self.rpc(msg)
11547 return reply
11548
11549
11550
11551 @ReturnMapping(ModelConfigResult)
11552 async def ModelConfig(self):
11553 '''
11554
11555 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
11556 '''
11557 # map input types to rpc msg
11558 _params = dict()
11559 msg = dict(type='DiscoverSpaces', request='ModelConfig', version=2, params=_params)
11560
11561 reply = await self.rpc(msg)
11562 return reply
11563
11564
11565 class DiskManagerFacade(Type):
11566 name = 'DiskManager'
11567 version = 2
11568 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
11569 'properties': {'BusAddress': {'type': 'string'},
11570 'DeviceLinks': {'items': {'type': 'string'},
11571 'type': 'array'},
11572 'DeviceName': {'type': 'string'},
11573 'FilesystemType': {'type': 'string'},
11574 'HardwareId': {'type': 'string'},
11575 'InUse': {'type': 'boolean'},
11576 'Label': {'type': 'string'},
11577 'MountPoint': {'type': 'string'},
11578 'Size': {'type': 'integer'},
11579 'UUID': {'type': 'string'}},
11580 'required': ['DeviceName',
11581 'DeviceLinks',
11582 'Label',
11583 'UUID',
11584 'HardwareId',
11585 'BusAddress',
11586 'Size',
11587 'FilesystemType',
11588 'InUse',
11589 'MountPoint'],
11590 'type': 'object'},
11591 'Error': {'additionalProperties': False,
11592 'properties': {'code': {'type': 'string'},
11593 'info': {'$ref': '#/definitions/ErrorInfo'},
11594 'message': {'type': 'string'}},
11595 'required': ['message', 'code'],
11596 'type': 'object'},
11597 'ErrorInfo': {'additionalProperties': False,
11598 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11599 'macaroon-path': {'type': 'string'}},
11600 'type': 'object'},
11601 'ErrorResult': {'additionalProperties': False,
11602 'properties': {'error': {'$ref': '#/definitions/Error'}},
11603 'type': 'object'},
11604 'ErrorResults': {'additionalProperties': False,
11605 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11606 'type': 'array'}},
11607 'required': ['results'],
11608 'type': 'object'},
11609 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11610 'MachineBlockDevices': {'additionalProperties': False,
11611 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
11612 'type': 'array'},
11613 'machine': {'type': 'string'}},
11614 'required': ['machine'],
11615 'type': 'object'},
11616 'SetMachineBlockDevices': {'additionalProperties': False,
11617 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
11618 'type': 'array'}},
11619 'required': ['machine-block-devices'],
11620 'type': 'object'}},
11621 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
11622 'Result': {'$ref': '#/definitions/ErrorResults'}},
11623 'type': 'object'}},
11624 'type': 'object'}
11625
11626
11627 @ReturnMapping(ErrorResults)
11628 async def SetMachineBlockDevices(self, machine_block_devices):
11629 '''
11630 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
11631 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11632 '''
11633 # map input types to rpc msg
11634 _params = dict()
11635 msg = dict(type='DiskManager', request='SetMachineBlockDevices', version=2, params=_params)
11636 _params['machine-block-devices'] = machine_block_devices
11637 reply = await self.rpc(msg)
11638 return reply
11639
11640
11641 class EntityWatcherFacade(Type):
11642 name = 'EntityWatcher'
11643 version = 2
11644 schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
11645 'properties': {'changes': {'items': {'type': 'string'},
11646 'type': 'array'},
11647 'error': {'$ref': '#/definitions/Error'},
11648 'watcher-id': {'type': 'string'}},
11649 'required': ['watcher-id'],
11650 'type': 'object'},
11651 'Error': {'additionalProperties': False,
11652 'properties': {'code': {'type': 'string'},
11653 'info': {'$ref': '#/definitions/ErrorInfo'},
11654 'message': {'type': 'string'}},
11655 'required': ['message', 'code'],
11656 'type': 'object'},
11657 'ErrorInfo': {'additionalProperties': False,
11658 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11659 'macaroon-path': {'type': 'string'}},
11660 'type': 'object'},
11661 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
11662 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
11663 'type': 'object'},
11664 'Stop': {'type': 'object'}},
11665 'type': 'object'}
11666
11667
11668 @ReturnMapping(EntitiesWatchResult)
11669 async def Next(self):
11670 '''
11671
11672 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
11673 '''
11674 # map input types to rpc msg
11675 _params = dict()
11676 msg = dict(type='EntityWatcher', request='Next', version=2, params=_params)
11677
11678 reply = await self.rpc(msg)
11679 return reply
11680
11681
11682
11683 @ReturnMapping(None)
11684 async def Stop(self):
11685 '''
11686
11687 Returns -> None
11688 '''
11689 # map input types to rpc msg
11690 _params = dict()
11691 msg = dict(type='EntityWatcher', request='Stop', version=2, params=_params)
11692
11693 reply = await self.rpc(msg)
11694 return reply
11695
11696
11697 class FilesystemAttachmentsWatcherFacade(Type):
11698 name = 'FilesystemAttachmentsWatcher'
11699 version = 2
11700 schema = {'definitions': {'Error': {'additionalProperties': False,
11701 'properties': {'code': {'type': 'string'},
11702 'info': {'$ref': '#/definitions/ErrorInfo'},
11703 'message': {'type': 'string'}},
11704 'required': ['message', 'code'],
11705 'type': 'object'},
11706 'ErrorInfo': {'additionalProperties': False,
11707 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11708 'macaroon-path': {'type': 'string'}},
11709 'type': 'object'},
11710 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11711 'MachineStorageId': {'additionalProperties': False,
11712 'properties': {'attachment-tag': {'type': 'string'},
11713 'machine-tag': {'type': 'string'}},
11714 'required': ['machine-tag',
11715 'attachment-tag'],
11716 'type': 'object'},
11717 'MachineStorageIdsWatchResult': {'additionalProperties': False,
11718 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
11719 'type': 'array'},
11720 'error': {'$ref': '#/definitions/Error'},
11721 'watcher-id': {'type': 'string'}},
11722 'required': ['watcher-id',
11723 'changes'],
11724 'type': 'object'}},
11725 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
11726 'type': 'object'},
11727 'Stop': {'type': 'object'}},
11728 'type': 'object'}
11729
11730
11731 @ReturnMapping(MachineStorageIdsWatchResult)
11732 async def Next(self):
11733 '''
11734
11735 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
11736 '''
11737 # map input types to rpc msg
11738 _params = dict()
11739 msg = dict(type='FilesystemAttachmentsWatcher', request='Next', version=2, params=_params)
11740
11741 reply = await self.rpc(msg)
11742 return reply
11743
11744
11745
11746 @ReturnMapping(None)
11747 async def Stop(self):
11748 '''
11749
11750 Returns -> None
11751 '''
11752 # map input types to rpc msg
11753 _params = dict()
11754 msg = dict(type='FilesystemAttachmentsWatcher', request='Stop', version=2, params=_params)
11755
11756 reply = await self.rpc(msg)
11757 return reply
11758
11759
11760 class FirewallerFacade(Type):
11761 name = 'Firewaller'
11762 version = 3
11763 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
11764 'properties': {'error': {'$ref': '#/definitions/Error'},
11765 'result': {'type': 'boolean'}},
11766 'required': ['result'],
11767 'type': 'object'},
11768 'BoolResults': {'additionalProperties': False,
11769 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
11770 'type': 'array'}},
11771 'required': ['results'],
11772 'type': 'object'},
11773 'CloudCredential': {'additionalProperties': False,
11774 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
11775 'type': 'object'},
11776 'auth-type': {'type': 'string'},
11777 'redacted': {'items': {'type': 'string'},
11778 'type': 'array'}},
11779 'required': ['auth-type'],
11780 'type': 'object'},
11781 'CloudSpec': {'additionalProperties': False,
11782 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
11783 'endpoint': {'type': 'string'},
11784 'identity-endpoint': {'type': 'string'},
11785 'name': {'type': 'string'},
11786 'region': {'type': 'string'},
11787 'storage-endpoint': {'type': 'string'},
11788 'type': {'type': 'string'}},
11789 'required': ['type', 'name'],
11790 'type': 'object'},
11791 'CloudSpecResult': {'additionalProperties': False,
11792 'properties': {'error': {'$ref': '#/definitions/Error'},
11793 'result': {'$ref': '#/definitions/CloudSpec'}},
11794 'type': 'object'},
11795 'CloudSpecResults': {'additionalProperties': False,
11796 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
11797 'type': 'array'}},
11798 'type': 'object'},
11799 'Entities': {'additionalProperties': False,
11800 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11801 'type': 'array'}},
11802 'required': ['entities'],
11803 'type': 'object'},
11804 'Entity': {'additionalProperties': False,
11805 'properties': {'tag': {'type': 'string'}},
11806 'required': ['tag'],
11807 'type': 'object'},
11808 'Error': {'additionalProperties': False,
11809 'properties': {'code': {'type': 'string'},
11810 'info': {'$ref': '#/definitions/ErrorInfo'},
11811 'message': {'type': 'string'}},
11812 'required': ['message', 'code'],
11813 'type': 'object'},
11814 'ErrorInfo': {'additionalProperties': False,
11815 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11816 'macaroon-path': {'type': 'string'}},
11817 'type': 'object'},
11818 'LifeResult': {'additionalProperties': False,
11819 'properties': {'error': {'$ref': '#/definitions/Error'},
11820 'life': {'type': 'string'}},
11821 'required': ['life'],
11822 'type': 'object'},
11823 'LifeResults': {'additionalProperties': False,
11824 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
11825 'type': 'array'}},
11826 'required': ['results'],
11827 'type': 'object'},
11828 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11829 'MachinePortRange': {'additionalProperties': False,
11830 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
11831 'relation-tag': {'type': 'string'},
11832 'unit-tag': {'type': 'string'}},
11833 'required': ['unit-tag',
11834 'relation-tag',
11835 'port-range'],
11836 'type': 'object'},
11837 'MachinePorts': {'additionalProperties': False,
11838 'properties': {'machine-tag': {'type': 'string'},
11839 'subnet-tag': {'type': 'string'}},
11840 'required': ['machine-tag', 'subnet-tag'],
11841 'type': 'object'},
11842 'MachinePortsParams': {'additionalProperties': False,
11843 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
11844 'type': 'array'}},
11845 'required': ['params'],
11846 'type': 'object'},
11847 'MachinePortsResult': {'additionalProperties': False,
11848 'properties': {'error': {'$ref': '#/definitions/Error'},
11849 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
11850 'type': 'array'}},
11851 'required': ['ports'],
11852 'type': 'object'},
11853 'MachinePortsResults': {'additionalProperties': False,
11854 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
11855 'type': 'array'}},
11856 'required': ['results'],
11857 'type': 'object'},
11858 'ModelConfigResult': {'additionalProperties': False,
11859 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
11860 'type': 'object'}},
11861 'type': 'object'}},
11862 'required': ['config'],
11863 'type': 'object'},
11864 'ModelTag': {'additionalProperties': False, 'type': 'object'},
11865 'NotifyWatchResult': {'additionalProperties': False,
11866 'properties': {'NotifyWatcherId': {'type': 'string'},
11867 'error': {'$ref': '#/definitions/Error'}},
11868 'required': ['NotifyWatcherId'],
11869 'type': 'object'},
11870 'NotifyWatchResults': {'additionalProperties': False,
11871 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11872 'type': 'array'}},
11873 'required': ['results'],
11874 'type': 'object'},
11875 'PortRange': {'additionalProperties': False,
11876 'properties': {'from-port': {'type': 'integer'},
11877 'protocol': {'type': 'string'},
11878 'to-port': {'type': 'integer'}},
11879 'required': ['from-port', 'to-port', 'protocol'],
11880 'type': 'object'},
11881 'StringResult': {'additionalProperties': False,
11882 'properties': {'error': {'$ref': '#/definitions/Error'},
11883 'result': {'type': 'string'}},
11884 'required': ['result'],
11885 'type': 'object'},
11886 'StringResults': {'additionalProperties': False,
11887 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
11888 'type': 'array'}},
11889 'required': ['results'],
11890 'type': 'object'},
11891 'StringsResult': {'additionalProperties': False,
11892 'properties': {'error': {'$ref': '#/definitions/Error'},
11893 'result': {'items': {'type': 'string'},
11894 'type': 'array'}},
11895 'type': 'object'},
11896 'StringsResults': {'additionalProperties': False,
11897 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
11898 'type': 'array'}},
11899 'required': ['results'],
11900 'type': 'object'},
11901 'StringsWatchResult': {'additionalProperties': False,
11902 'properties': {'changes': {'items': {'type': 'string'},
11903 'type': 'array'},
11904 'error': {'$ref': '#/definitions/Error'},
11905 'watcher-id': {'type': 'string'}},
11906 'required': ['watcher-id'],
11907 'type': 'object'},
11908 'StringsWatchResults': {'additionalProperties': False,
11909 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
11910 'type': 'array'}},
11911 'required': ['results'],
11912 'type': 'object'}},
11913 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11914 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
11915 'type': 'object'},
11916 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11917 'Result': {'$ref': '#/definitions/StringResults'}},
11918 'type': 'object'},
11919 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
11920 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
11921 'type': 'object'},
11922 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11923 'Result': {'$ref': '#/definitions/BoolResults'}},
11924 'type': 'object'},
11925 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11926 'Result': {'$ref': '#/definitions/StringsResults'}},
11927 'type': 'object'},
11928 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
11929 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
11930 'type': 'object'},
11931 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11932 'Result': {'$ref': '#/definitions/StringResults'}},
11933 'type': 'object'},
11934 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11935 'Result': {'$ref': '#/definitions/LifeResults'}},
11936 'type': 'object'},
11937 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11938 'type': 'object'},
11939 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11940 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11941 'type': 'object'},
11942 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11943 'type': 'object'},
11944 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11945 'type': 'object'},
11946 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11947 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11948 'type': 'object'},
11949 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11950 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11951 'type': 'object'}},
11952 'type': 'object'}
11953
11954
11955 @ReturnMapping(CloudSpecResults)
11956 async def CloudSpec(self, entities):
11957 '''
11958 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11959 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
11960 '''
11961 # map input types to rpc msg
11962 _params = dict()
11963 msg = dict(type='Firewaller', request='CloudSpec', version=3, params=_params)
11964 _params['entities'] = entities
11965 reply = await self.rpc(msg)
11966 return reply
11967
11968
11969
11970 @ReturnMapping(StringResults)
11971 async def GetAssignedMachine(self, entities):
11972 '''
11973 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11974 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
11975 '''
11976 # map input types to rpc msg
11977 _params = dict()
11978 msg = dict(type='Firewaller', request='GetAssignedMachine', version=3, params=_params)
11979 _params['entities'] = entities
11980 reply = await self.rpc(msg)
11981 return reply
11982
11983
11984
11985 @ReturnMapping(CloudSpecResult)
11986 async def GetCloudSpec(self):
11987 '''
11988
11989 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
11990 '''
11991 # map input types to rpc msg
11992 _params = dict()
11993 msg = dict(type='Firewaller', request='GetCloudSpec', version=3, params=_params)
11994
11995 reply = await self.rpc(msg)
11996 return reply
11997
11998
11999
12000 @ReturnMapping(BoolResults)
12001 async def GetExposed(self, entities):
12002 '''
12003 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12004 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
12005 '''
12006 # map input types to rpc msg
12007 _params = dict()
12008 msg = dict(type='Firewaller', request='GetExposed', version=3, params=_params)
12009 _params['entities'] = entities
12010 reply = await self.rpc(msg)
12011 return reply
12012
12013
12014
12015 @ReturnMapping(StringsResults)
12016 async def GetMachineActiveSubnets(self, entities):
12017 '''
12018 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12019 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
12020 '''
12021 # map input types to rpc msg
12022 _params = dict()
12023 msg = dict(type='Firewaller', request='GetMachineActiveSubnets', version=3, params=_params)
12024 _params['entities'] = entities
12025 reply = await self.rpc(msg)
12026 return reply
12027
12028
12029
12030 @ReturnMapping(MachinePortsResults)
12031 async def GetMachinePorts(self, params):
12032 '''
12033 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
12034 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
12035 '''
12036 # map input types to rpc msg
12037 _params = dict()
12038 msg = dict(type='Firewaller', request='GetMachinePorts', version=3, params=_params)
12039 _params['params'] = params
12040 reply = await self.rpc(msg)
12041 return reply
12042
12043
12044
12045 @ReturnMapping(StringResults)
12046 async def InstanceId(self, entities):
12047 '''
12048 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12049 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
12050 '''
12051 # map input types to rpc msg
12052 _params = dict()
12053 msg = dict(type='Firewaller', request='InstanceId', version=3, params=_params)
12054 _params['entities'] = entities
12055 reply = await self.rpc(msg)
12056 return reply
12057
12058
12059
12060 @ReturnMapping(LifeResults)
12061 async def Life(self, entities):
12062 '''
12063 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12064 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
12065 '''
12066 # map input types to rpc msg
12067 _params = dict()
12068 msg = dict(type='Firewaller', request='Life', version=3, params=_params)
12069 _params['entities'] = entities
12070 reply = await self.rpc(msg)
12071 return reply
12072
12073
12074
12075 @ReturnMapping(ModelConfigResult)
12076 async def ModelConfig(self):
12077 '''
12078
12079 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
12080 '''
12081 # map input types to rpc msg
12082 _params = dict()
12083 msg = dict(type='Firewaller', request='ModelConfig', version=3, params=_params)
12084
12085 reply = await self.rpc(msg)
12086 return reply
12087
12088
12089
12090 @ReturnMapping(NotifyWatchResults)
12091 async def Watch(self, entities):
12092 '''
12093 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12094 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
12095 '''
12096 # map input types to rpc msg
12097 _params = dict()
12098 msg = dict(type='Firewaller', request='Watch', version=3, params=_params)
12099 _params['entities'] = entities
12100 reply = await self.rpc(msg)
12101 return reply
12102
12103
12104
12105 @ReturnMapping(NotifyWatchResult)
12106 async def WatchForModelConfigChanges(self):
12107 '''
12108
12109 Returns -> typing.Union[str, _ForwardRef('Error')]
12110 '''
12111 # map input types to rpc msg
12112 _params = dict()
12113 msg = dict(type='Firewaller', request='WatchForModelConfigChanges', version=3, params=_params)
12114
12115 reply = await self.rpc(msg)
12116 return reply
12117
12118
12119
12120 @ReturnMapping(StringsWatchResult)
12121 async def WatchModelMachines(self):
12122 '''
12123
12124 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
12125 '''
12126 # map input types to rpc msg
12127 _params = dict()
12128 msg = dict(type='Firewaller', request='WatchModelMachines', version=3, params=_params)
12129
12130 reply = await self.rpc(msg)
12131 return reply
12132
12133
12134
12135 @ReturnMapping(StringsWatchResults)
12136 async def WatchOpenedPorts(self, entities):
12137 '''
12138 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12139 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
12140 '''
12141 # map input types to rpc msg
12142 _params = dict()
12143 msg = dict(type='Firewaller', request='WatchOpenedPorts', version=3, params=_params)
12144 _params['entities'] = entities
12145 reply = await self.rpc(msg)
12146 return reply
12147
12148
12149
12150 @ReturnMapping(StringsWatchResults)
12151 async def WatchUnits(self, entities):
12152 '''
12153 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12154 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
12155 '''
12156 # map input types to rpc msg
12157 _params = dict()
12158 msg = dict(type='Firewaller', request='WatchUnits', version=3, params=_params)
12159 _params['entities'] = entities
12160 reply = await self.rpc(msg)
12161 return reply
12162
12163
12164 class HighAvailabilityFacade(Type):
12165 name = 'HighAvailability'
12166 version = 2
12167 schema = {'definitions': {'Address': {'additionalProperties': False,
12168 'properties': {'Scope': {'type': 'string'},
12169 'SpaceName': {'type': 'string'},
12170 'SpaceProviderId': {'type': 'string'},
12171 'Type': {'type': 'string'},
12172 'Value': {'type': 'string'}},
12173 'required': ['Value',
12174 'Type',
12175 'Scope',
12176 'SpaceName',
12177 'SpaceProviderId'],
12178 'type': 'object'},
12179 'ControllersChangeResult': {'additionalProperties': False,
12180 'properties': {'error': {'$ref': '#/definitions/Error'},
12181 'result': {'$ref': '#/definitions/ControllersChanges'}},
12182 'required': ['result'],
12183 'type': 'object'},
12184 'ControllersChangeResults': {'additionalProperties': False,
12185 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
12186 'type': 'array'}},
12187 'required': ['results'],
12188 'type': 'object'},
12189 'ControllersChanges': {'additionalProperties': False,
12190 'properties': {'added': {'items': {'type': 'string'},
12191 'type': 'array'},
12192 'converted': {'items': {'type': 'string'},
12193 'type': 'array'},
12194 'demoted': {'items': {'type': 'string'},
12195 'type': 'array'},
12196 'maintained': {'items': {'type': 'string'},
12197 'type': 'array'},
12198 'promoted': {'items': {'type': 'string'},
12199 'type': 'array'},
12200 'removed': {'items': {'type': 'string'},
12201 'type': 'array'}},
12202 'type': 'object'},
12203 'ControllersSpec': {'additionalProperties': False,
12204 'properties': {'constraints': {'$ref': '#/definitions/Value'},
12205 'num-controllers': {'type': 'integer'},
12206 'placement': {'items': {'type': 'string'},
12207 'type': 'array'},
12208 'series': {'type': 'string'}},
12209 'required': ['num-controllers'],
12210 'type': 'object'},
12211 'ControllersSpecs': {'additionalProperties': False,
12212 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
12213 'type': 'array'}},
12214 'required': ['specs'],
12215 'type': 'object'},
12216 'Error': {'additionalProperties': False,
12217 'properties': {'code': {'type': 'string'},
12218 'info': {'$ref': '#/definitions/ErrorInfo'},
12219 'message': {'type': 'string'}},
12220 'required': ['message', 'code'],
12221 'type': 'object'},
12222 'ErrorInfo': {'additionalProperties': False,
12223 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12224 'macaroon-path': {'type': 'string'}},
12225 'type': 'object'},
12226 'HAMember': {'additionalProperties': False,
12227 'properties': {'public-address': {'$ref': '#/definitions/Address'},
12228 'series': {'type': 'string'},
12229 'tag': {'type': 'string'}},
12230 'required': ['tag', 'public-address', 'series'],
12231 'type': 'object'},
12232 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12233 'Member': {'additionalProperties': False,
12234 'properties': {'Address': {'type': 'string'},
12235 'Arbiter': {'type': 'boolean'},
12236 'BuildIndexes': {'type': 'boolean'},
12237 'Hidden': {'type': 'boolean'},
12238 'Id': {'type': 'integer'},
12239 'Priority': {'type': 'number'},
12240 'SlaveDelay': {'type': 'integer'},
12241 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
12242 'type': 'object'},
12243 'Votes': {'type': 'integer'}},
12244 'required': ['Id',
12245 'Address',
12246 'Arbiter',
12247 'BuildIndexes',
12248 'Hidden',
12249 'Priority',
12250 'Tags',
12251 'SlaveDelay',
12252 'Votes'],
12253 'type': 'object'},
12254 'MongoUpgradeResults': {'additionalProperties': False,
12255 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
12256 'type': 'array'},
12257 'master': {'$ref': '#/definitions/HAMember'},
12258 'rs-members': {'items': {'$ref': '#/definitions/Member'},
12259 'type': 'array'}},
12260 'required': ['rs-members',
12261 'master',
12262 'ha-members'],
12263 'type': 'object'},
12264 'MongoVersion': {'additionalProperties': False,
12265 'properties': {'engine': {'type': 'string'},
12266 'major': {'type': 'integer'},
12267 'minor': {'type': 'integer'},
12268 'patch': {'type': 'string'}},
12269 'required': ['major',
12270 'minor',
12271 'patch',
12272 'engine'],
12273 'type': 'object'},
12274 'ResumeReplicationParams': {'additionalProperties': False,
12275 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
12276 'type': 'array'}},
12277 'required': ['members'],
12278 'type': 'object'},
12279 'UpgradeMongoParams': {'additionalProperties': False,
12280 'properties': {'target': {'$ref': '#/definitions/MongoVersion'}},
12281 'required': ['target'],
12282 'type': 'object'},
12283 'Value': {'additionalProperties': False,
12284 'properties': {'arch': {'type': 'string'},
12285 'container': {'type': 'string'},
12286 'cores': {'type': 'integer'},
12287 'cpu-power': {'type': 'integer'},
12288 'instance-type': {'type': 'string'},
12289 'mem': {'type': 'integer'},
12290 'root-disk': {'type': 'integer'},
12291 'spaces': {'items': {'type': 'string'},
12292 'type': 'array'},
12293 'tags': {'items': {'type': 'string'},
12294 'type': 'array'},
12295 'virt-type': {'type': 'string'}},
12296 'type': 'object'}},
12297 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
12298 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
12299 'type': 'object'},
12300 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
12301 'type': 'object'},
12302 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
12303 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
12304 'type': 'object'}},
12305 'type': 'object'}
12306
12307
12308 @ReturnMapping(ControllersChangeResults)
12309 async def EnableHA(self, specs):
12310 '''
12311 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
12312 Returns -> typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
12313 '''
12314 # map input types to rpc msg
12315 _params = dict()
12316 msg = dict(type='HighAvailability', request='EnableHA', version=2, params=_params)
12317 _params['specs'] = specs
12318 reply = await self.rpc(msg)
12319 return reply
12320
12321
12322
12323 @ReturnMapping(None)
12324 async def ResumeHAReplicationAfterUpgrade(self, members):
12325 '''
12326 members : typing.Sequence<+T_co>[~Member]<~Member>
12327 Returns -> None
12328 '''
12329 # map input types to rpc msg
12330 _params = dict()
12331 msg = dict(type='HighAvailability', request='ResumeHAReplicationAfterUpgrade', version=2, params=_params)
12332 _params['members'] = members
12333 reply = await self.rpc(msg)
12334 return reply
12335
12336
12337
12338 @ReturnMapping(MongoUpgradeResults)
12339 async def StopHAReplicationForUpgrade(self, target):
12340 '''
12341 target : MongoVersion
12342 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence<+T_co>[~Member]<~Member>]
12343 '''
12344 # map input types to rpc msg
12345 _params = dict()
12346 msg = dict(type='HighAvailability', request='StopHAReplicationForUpgrade', version=2, params=_params)
12347 _params['target'] = target
12348 reply = await self.rpc(msg)
12349 return reply
12350
12351
12352 class HostKeyReporterFacade(Type):
12353 name = 'HostKeyReporter'
12354 version = 1
12355 schema = {'definitions': {'Error': {'additionalProperties': False,
12356 'properties': {'code': {'type': 'string'},
12357 'info': {'$ref': '#/definitions/ErrorInfo'},
12358 'message': {'type': 'string'}},
12359 'required': ['message', 'code'],
12360 'type': 'object'},
12361 'ErrorInfo': {'additionalProperties': False,
12362 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12363 'macaroon-path': {'type': 'string'}},
12364 'type': 'object'},
12365 'ErrorResult': {'additionalProperties': False,
12366 'properties': {'error': {'$ref': '#/definitions/Error'}},
12367 'type': 'object'},
12368 'ErrorResults': {'additionalProperties': False,
12369 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12370 'type': 'array'}},
12371 'required': ['results'],
12372 'type': 'object'},
12373 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12374 'SSHHostKeySet': {'additionalProperties': False,
12375 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
12376 'type': 'array'}},
12377 'required': ['entity-keys'],
12378 'type': 'object'},
12379 'SSHHostKeys': {'additionalProperties': False,
12380 'properties': {'public-keys': {'items': {'type': 'string'},
12381 'type': 'array'},
12382 'tag': {'type': 'string'}},
12383 'required': ['tag', 'public-keys'],
12384 'type': 'object'}},
12385 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
12386 'Result': {'$ref': '#/definitions/ErrorResults'}},
12387 'type': 'object'}},
12388 'type': 'object'}
12389
12390
12391 @ReturnMapping(ErrorResults)
12392 async def ReportKeys(self, entity_keys):
12393 '''
12394 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
12395 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12396 '''
12397 # map input types to rpc msg
12398 _params = dict()
12399 msg = dict(type='HostKeyReporter', request='ReportKeys', version=1, params=_params)
12400 _params['entity-keys'] = entity_keys
12401 reply = await self.rpc(msg)
12402 return reply
12403
12404
12405 class ImageManagerFacade(Type):
12406 name = 'ImageManager'
12407 version = 2
12408 schema = {'definitions': {'Error': {'additionalProperties': False,
12409 'properties': {'code': {'type': 'string'},
12410 'info': {'$ref': '#/definitions/ErrorInfo'},
12411 'message': {'type': 'string'}},
12412 'required': ['message', 'code'],
12413 'type': 'object'},
12414 'ErrorInfo': {'additionalProperties': False,
12415 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12416 'macaroon-path': {'type': 'string'}},
12417 'type': 'object'},
12418 'ErrorResult': {'additionalProperties': False,
12419 'properties': {'error': {'$ref': '#/definitions/Error'}},
12420 'type': 'object'},
12421 'ErrorResults': {'additionalProperties': False,
12422 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12423 'type': 'array'}},
12424 'required': ['results'],
12425 'type': 'object'},
12426 'ImageFilterParams': {'additionalProperties': False,
12427 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
12428 'type': 'array'}},
12429 'required': ['images'],
12430 'type': 'object'},
12431 'ImageMetadata': {'additionalProperties': False,
12432 'properties': {'arch': {'type': 'string'},
12433 'created': {'format': 'date-time',
12434 'type': 'string'},
12435 'kind': {'type': 'string'},
12436 'series': {'type': 'string'},
12437 'url': {'type': 'string'}},
12438 'required': ['kind',
12439 'arch',
12440 'series',
12441 'url',
12442 'created'],
12443 'type': 'object'},
12444 'ImageSpec': {'additionalProperties': False,
12445 'properties': {'arch': {'type': 'string'},
12446 'kind': {'type': 'string'},
12447 'series': {'type': 'string'}},
12448 'required': ['kind', 'arch', 'series'],
12449 'type': 'object'},
12450 'ListImageResult': {'additionalProperties': False,
12451 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
12452 'type': 'array'}},
12453 'required': ['result'],
12454 'type': 'object'},
12455 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
12456 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
12457 'Result': {'$ref': '#/definitions/ErrorResults'}},
12458 'type': 'object'},
12459 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
12460 'Result': {'$ref': '#/definitions/ListImageResult'}},
12461 'type': 'object'}},
12462 'type': 'object'}
12463
12464
12465 @ReturnMapping(ErrorResults)
12466 async def DeleteImages(self, images):
12467 '''
12468 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
12469 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12470 '''
12471 # map input types to rpc msg
12472 _params = dict()
12473 msg = dict(type='ImageManager', request='DeleteImages', version=2, params=_params)
12474 _params['images'] = images
12475 reply = await self.rpc(msg)
12476 return reply
12477
12478
12479
12480 @ReturnMapping(ListImageResult)
12481 async def ListImages(self, images):
12482 '''
12483 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
12484 Returns -> typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
12485 '''
12486 # map input types to rpc msg
12487 _params = dict()
12488 msg = dict(type='ImageManager', request='ListImages', version=2, params=_params)
12489 _params['images'] = images
12490 reply = await self.rpc(msg)
12491 return reply
12492
12493
12494 class ImageMetadataFacade(Type):
12495 name = 'ImageMetadata'
12496 version = 2
12497 schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
12498 'properties': {'arch': {'type': 'string'},
12499 'image-id': {'type': 'string'},
12500 'priority': {'type': 'integer'},
12501 'region': {'type': 'string'},
12502 'root-storage-size': {'type': 'integer'},
12503 'root-storage-type': {'type': 'string'},
12504 'series': {'type': 'string'},
12505 'source': {'type': 'string'},
12506 'stream': {'type': 'string'},
12507 'version': {'type': 'string'},
12508 'virt-type': {'type': 'string'}},
12509 'required': ['image-id',
12510 'region',
12511 'version',
12512 'series',
12513 'arch',
12514 'source',
12515 'priority'],
12516 'type': 'object'},
12517 'CloudImageMetadataList': {'additionalProperties': False,
12518 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
12519 'type': 'array'}},
12520 'type': 'object'},
12521 'Error': {'additionalProperties': False,
12522 'properties': {'code': {'type': 'string'},
12523 'info': {'$ref': '#/definitions/ErrorInfo'},
12524 'message': {'type': 'string'}},
12525 'required': ['message', 'code'],
12526 'type': 'object'},
12527 'ErrorInfo': {'additionalProperties': False,
12528 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12529 'macaroon-path': {'type': 'string'}},
12530 'type': 'object'},
12531 'ErrorResult': {'additionalProperties': False,
12532 'properties': {'error': {'$ref': '#/definitions/Error'}},
12533 'type': 'object'},
12534 'ErrorResults': {'additionalProperties': False,
12535 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12536 'type': 'array'}},
12537 'required': ['results'],
12538 'type': 'object'},
12539 'ImageMetadataFilter': {'additionalProperties': False,
12540 'properties': {'arches': {'items': {'type': 'string'},
12541 'type': 'array'},
12542 'region': {'type': 'string'},
12543 'root-storage-type': {'type': 'string'},
12544 'series': {'items': {'type': 'string'},
12545 'type': 'array'},
12546 'stream': {'type': 'string'},
12547 'virt-type': {'type': 'string'}},
12548 'type': 'object'},
12549 'ListCloudImageMetadataResult': {'additionalProperties': False,
12550 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
12551 'type': 'array'}},
12552 'required': ['result'],
12553 'type': 'object'},
12554 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12555 'MetadataImageIds': {'additionalProperties': False,
12556 'properties': {'image-ids': {'items': {'type': 'string'},
12557 'type': 'array'}},
12558 'required': ['image-ids'],
12559 'type': 'object'},
12560 'MetadataSaveParams': {'additionalProperties': False,
12561 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
12562 'type': 'array'}},
12563 'type': 'object'}},
12564 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
12565 'Result': {'$ref': '#/definitions/ErrorResults'}},
12566 'type': 'object'},
12567 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
12568 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
12569 'type': 'object'},
12570 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
12571 'Result': {'$ref': '#/definitions/ErrorResults'}},
12572 'type': 'object'},
12573 'UpdateFromPublishedImages': {'type': 'object'}},
12574 'type': 'object'}
12575
12576
12577 @ReturnMapping(ErrorResults)
12578 async def Delete(self, image_ids):
12579 '''
12580 image_ids : typing.Sequence<+T_co>[str]
12581 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12582 '''
12583 # map input types to rpc msg
12584 _params = dict()
12585 msg = dict(type='ImageMetadata', request='Delete', version=2, params=_params)
12586 _params['image-ids'] = image_ids
12587 reply = await self.rpc(msg)
12588 return reply
12589
12590
12591
12592 @ReturnMapping(ListCloudImageMetadataResult)
12593 async def List(self, arches, region, root_storage_type, series, stream, virt_type):
12594 '''
12595 arches : typing.Sequence<+T_co>[str]
12596 region : str
12597 root_storage_type : str
12598 series : typing.Sequence<+T_co>[str]
12599 stream : str
12600 virt_type : str
12601 Returns -> typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
12602 '''
12603 # map input types to rpc msg
12604 _params = dict()
12605 msg = dict(type='ImageMetadata', request='List', version=2, params=_params)
12606 _params['arches'] = arches
12607 _params['region'] = region
12608 _params['root-storage-type'] = root_storage_type
12609 _params['series'] = series
12610 _params['stream'] = stream
12611 _params['virt-type'] = virt_type
12612 reply = await self.rpc(msg)
12613 return reply
12614
12615
12616
12617 @ReturnMapping(ErrorResults)
12618 async def Save(self, metadata):
12619 '''
12620 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
12621 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12622 '''
12623 # map input types to rpc msg
12624 _params = dict()
12625 msg = dict(type='ImageMetadata', request='Save', version=2, params=_params)
12626 _params['metadata'] = metadata
12627 reply = await self.rpc(msg)
12628 return reply
12629
12630
12631
12632 @ReturnMapping(None)
12633 async def UpdateFromPublishedImages(self):
12634 '''
12635
12636 Returns -> None
12637 '''
12638 # map input types to rpc msg
12639 _params = dict()
12640 msg = dict(type='ImageMetadata', request='UpdateFromPublishedImages', version=2, params=_params)
12641
12642 reply = await self.rpc(msg)
12643 return reply
12644
12645
12646 class InstancePollerFacade(Type):
12647 name = 'InstancePoller'
12648 version = 3
12649 schema = {'definitions': {'Address': {'additionalProperties': False,
12650 'properties': {'scope': {'type': 'string'},
12651 'space-name': {'type': 'string'},
12652 'type': {'type': 'string'},
12653 'value': {'type': 'string'}},
12654 'required': ['value', 'type', 'scope'],
12655 'type': 'object'},
12656 'BoolResult': {'additionalProperties': False,
12657 'properties': {'error': {'$ref': '#/definitions/Error'},
12658 'result': {'type': 'boolean'}},
12659 'required': ['result'],
12660 'type': 'object'},
12661 'BoolResults': {'additionalProperties': False,
12662 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
12663 'type': 'array'}},
12664 'required': ['results'],
12665 'type': 'object'},
12666 'Entities': {'additionalProperties': False,
12667 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12668 'type': 'array'}},
12669 'required': ['entities'],
12670 'type': 'object'},
12671 'Entity': {'additionalProperties': False,
12672 'properties': {'tag': {'type': 'string'}},
12673 'required': ['tag'],
12674 'type': 'object'},
12675 'EntityStatusArgs': {'additionalProperties': False,
12676 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
12677 'type': 'object'}},
12678 'type': 'object'},
12679 'info': {'type': 'string'},
12680 'status': {'type': 'string'},
12681 'tag': {'type': 'string'}},
12682 'required': ['tag',
12683 'status',
12684 'info',
12685 'data'],
12686 'type': 'object'},
12687 'Error': {'additionalProperties': False,
12688 'properties': {'code': {'type': 'string'},
12689 'info': {'$ref': '#/definitions/ErrorInfo'},
12690 'message': {'type': 'string'}},
12691 'required': ['message', 'code'],
12692 'type': 'object'},
12693 'ErrorInfo': {'additionalProperties': False,
12694 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12695 'macaroon-path': {'type': 'string'}},
12696 'type': 'object'},
12697 'ErrorResult': {'additionalProperties': False,
12698 'properties': {'error': {'$ref': '#/definitions/Error'}},
12699 'type': 'object'},
12700 'ErrorResults': {'additionalProperties': False,
12701 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12702 'type': 'array'}},
12703 'required': ['results'],
12704 'type': 'object'},
12705 'LifeResult': {'additionalProperties': False,
12706 'properties': {'error': {'$ref': '#/definitions/Error'},
12707 'life': {'type': 'string'}},
12708 'required': ['life'],
12709 'type': 'object'},
12710 'LifeResults': {'additionalProperties': False,
12711 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
12712 'type': 'array'}},
12713 'required': ['results'],
12714 'type': 'object'},
12715 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12716 'MachineAddresses': {'additionalProperties': False,
12717 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12718 'type': 'array'},
12719 'tag': {'type': 'string'}},
12720 'required': ['tag', 'addresses'],
12721 'type': 'object'},
12722 'MachineAddressesResult': {'additionalProperties': False,
12723 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12724 'type': 'array'},
12725 'error': {'$ref': '#/definitions/Error'}},
12726 'required': ['addresses'],
12727 'type': 'object'},
12728 'MachineAddressesResults': {'additionalProperties': False,
12729 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
12730 'type': 'array'}},
12731 'required': ['results'],
12732 'type': 'object'},
12733 'ModelConfigResult': {'additionalProperties': False,
12734 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
12735 'type': 'object'}},
12736 'type': 'object'}},
12737 'required': ['config'],
12738 'type': 'object'},
12739 'NotifyWatchResult': {'additionalProperties': False,
12740 'properties': {'NotifyWatcherId': {'type': 'string'},
12741 'error': {'$ref': '#/definitions/Error'}},
12742 'required': ['NotifyWatcherId'],
12743 'type': 'object'},
12744 'SetMachinesAddresses': {'additionalProperties': False,
12745 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
12746 'type': 'array'}},
12747 'required': ['machine-addresses'],
12748 'type': 'object'},
12749 'SetStatus': {'additionalProperties': False,
12750 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
12751 'type': 'array'}},
12752 'required': ['entities'],
12753 'type': 'object'},
12754 'StatusResult': {'additionalProperties': False,
12755 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
12756 'type': 'object'}},
12757 'type': 'object'},
12758 'error': {'$ref': '#/definitions/Error'},
12759 'id': {'type': 'string'},
12760 'info': {'type': 'string'},
12761 'life': {'type': 'string'},
12762 'since': {'format': 'date-time',
12763 'type': 'string'},
12764 'status': {'type': 'string'}},
12765 'required': ['id',
12766 'life',
12767 'status',
12768 'info',
12769 'data',
12770 'since'],
12771 'type': 'object'},
12772 'StatusResults': {'additionalProperties': False,
12773 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
12774 'type': 'array'}},
12775 'required': ['results'],
12776 'type': 'object'},
12777 'StringResult': {'additionalProperties': False,
12778 'properties': {'error': {'$ref': '#/definitions/Error'},
12779 'result': {'type': 'string'}},
12780 'required': ['result'],
12781 'type': 'object'},
12782 'StringResults': {'additionalProperties': False,
12783 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
12784 'type': 'array'}},
12785 'required': ['results'],
12786 'type': 'object'},
12787 'StringsWatchResult': {'additionalProperties': False,
12788 'properties': {'changes': {'items': {'type': 'string'},
12789 'type': 'array'},
12790 'error': {'$ref': '#/definitions/Error'},
12791 'watcher-id': {'type': 'string'}},
12792 'required': ['watcher-id'],
12793 'type': 'object'}},
12794 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12795 'Result': {'$ref': '#/definitions/BoolResults'}},
12796 'type': 'object'},
12797 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12798 'Result': {'$ref': '#/definitions/StringResults'}},
12799 'type': 'object'},
12800 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12801 'Result': {'$ref': '#/definitions/StatusResults'}},
12802 'type': 'object'},
12803 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12804 'Result': {'$ref': '#/definitions/LifeResults'}},
12805 'type': 'object'},
12806 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
12807 'type': 'object'},
12808 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12809 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
12810 'type': 'object'},
12811 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
12812 'Result': {'$ref': '#/definitions/ErrorResults'}},
12813 'type': 'object'},
12814 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
12815 'Result': {'$ref': '#/definitions/ErrorResults'}},
12816 'type': 'object'},
12817 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12818 'Result': {'$ref': '#/definitions/StatusResults'}},
12819 'type': 'object'},
12820 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12821 'type': 'object'},
12822 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
12823 'type': 'object'}},
12824 'type': 'object'}
12825
12826
12827 @ReturnMapping(BoolResults)
12828 async def AreManuallyProvisioned(self, entities):
12829 '''
12830 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12831 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
12832 '''
12833 # map input types to rpc msg
12834 _params = dict()
12835 msg = dict(type='InstancePoller', request='AreManuallyProvisioned', version=3, params=_params)
12836 _params['entities'] = entities
12837 reply = await self.rpc(msg)
12838 return reply
12839
12840
12841
12842 @ReturnMapping(StringResults)
12843 async def InstanceId(self, entities):
12844 '''
12845 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12846 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
12847 '''
12848 # map input types to rpc msg
12849 _params = dict()
12850 msg = dict(type='InstancePoller', request='InstanceId', version=3, params=_params)
12851 _params['entities'] = entities
12852 reply = await self.rpc(msg)
12853 return reply
12854
12855
12856
12857 @ReturnMapping(StatusResults)
12858 async def InstanceStatus(self, entities):
12859 '''
12860 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12861 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
12862 '''
12863 # map input types to rpc msg
12864 _params = dict()
12865 msg = dict(type='InstancePoller', request='InstanceStatus', version=3, params=_params)
12866 _params['entities'] = entities
12867 reply = await self.rpc(msg)
12868 return reply
12869
12870
12871
12872 @ReturnMapping(LifeResults)
12873 async def Life(self, entities):
12874 '''
12875 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12876 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
12877 '''
12878 # map input types to rpc msg
12879 _params = dict()
12880 msg = dict(type='InstancePoller', request='Life', version=3, params=_params)
12881 _params['entities'] = entities
12882 reply = await self.rpc(msg)
12883 return reply
12884
12885
12886
12887 @ReturnMapping(ModelConfigResult)
12888 async def ModelConfig(self):
12889 '''
12890
12891 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
12892 '''
12893 # map input types to rpc msg
12894 _params = dict()
12895 msg = dict(type='InstancePoller', request='ModelConfig', version=3, params=_params)
12896
12897 reply = await self.rpc(msg)
12898 return reply
12899
12900
12901
12902 @ReturnMapping(MachineAddressesResults)
12903 async def ProviderAddresses(self, entities):
12904 '''
12905 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12906 Returns -> typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
12907 '''
12908 # map input types to rpc msg
12909 _params = dict()
12910 msg = dict(type='InstancePoller', request='ProviderAddresses', version=3, params=_params)
12911 _params['entities'] = entities
12912 reply = await self.rpc(msg)
12913 return reply
12914
12915
12916
12917 @ReturnMapping(ErrorResults)
12918 async def SetInstanceStatus(self, entities):
12919 '''
12920 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
12921 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12922 '''
12923 # map input types to rpc msg
12924 _params = dict()
12925 msg = dict(type='InstancePoller', request='SetInstanceStatus', version=3, params=_params)
12926 _params['entities'] = entities
12927 reply = await self.rpc(msg)
12928 return reply
12929
12930
12931
12932 @ReturnMapping(ErrorResults)
12933 async def SetProviderAddresses(self, machine_addresses):
12934 '''
12935 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
12936 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12937 '''
12938 # map input types to rpc msg
12939 _params = dict()
12940 msg = dict(type='InstancePoller', request='SetProviderAddresses', version=3, params=_params)
12941 _params['machine-addresses'] = machine_addresses
12942 reply = await self.rpc(msg)
12943 return reply
12944
12945
12946
12947 @ReturnMapping(StatusResults)
12948 async def Status(self, entities):
12949 '''
12950 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12951 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
12952 '''
12953 # map input types to rpc msg
12954 _params = dict()
12955 msg = dict(type='InstancePoller', request='Status', version=3, params=_params)
12956 _params['entities'] = entities
12957 reply = await self.rpc(msg)
12958 return reply
12959
12960
12961
12962 @ReturnMapping(NotifyWatchResult)
12963 async def WatchForModelConfigChanges(self):
12964 '''
12965
12966 Returns -> typing.Union[str, _ForwardRef('Error')]
12967 '''
12968 # map input types to rpc msg
12969 _params = dict()
12970 msg = dict(type='InstancePoller', request='WatchForModelConfigChanges', version=3, params=_params)
12971
12972 reply = await self.rpc(msg)
12973 return reply
12974
12975
12976
12977 @ReturnMapping(StringsWatchResult)
12978 async def WatchModelMachines(self):
12979 '''
12980
12981 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
12982 '''
12983 # map input types to rpc msg
12984 _params = dict()
12985 msg = dict(type='InstancePoller', request='WatchModelMachines', version=3, params=_params)
12986
12987 reply = await self.rpc(msg)
12988 return reply
12989
12990
12991 class KeyManagerFacade(Type):
12992 name = 'KeyManager'
12993 version = 1
12994 schema = {'definitions': {'Entities': {'additionalProperties': False,
12995 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12996 'type': 'array'}},
12997 'required': ['entities'],
12998 'type': 'object'},
12999 'Entity': {'additionalProperties': False,
13000 'properties': {'tag': {'type': 'string'}},
13001 'required': ['tag'],
13002 'type': 'object'},
13003 'Error': {'additionalProperties': False,
13004 'properties': {'code': {'type': 'string'},
13005 'info': {'$ref': '#/definitions/ErrorInfo'},
13006 'message': {'type': 'string'}},
13007 'required': ['message', 'code'],
13008 'type': 'object'},
13009 'ErrorInfo': {'additionalProperties': False,
13010 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13011 'macaroon-path': {'type': 'string'}},
13012 'type': 'object'},
13013 'ErrorResult': {'additionalProperties': False,
13014 'properties': {'error': {'$ref': '#/definitions/Error'}},
13015 'type': 'object'},
13016 'ErrorResults': {'additionalProperties': False,
13017 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13018 'type': 'array'}},
13019 'required': ['results'],
13020 'type': 'object'},
13021 'ListSSHKeys': {'additionalProperties': False,
13022 'properties': {'entities': {'$ref': '#/definitions/Entities'},
13023 'mode': {'type': 'boolean'}},
13024 'required': ['entities', 'mode'],
13025 'type': 'object'},
13026 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13027 'ModifyUserSSHKeys': {'additionalProperties': False,
13028 'properties': {'ssh-keys': {'items': {'type': 'string'},
13029 'type': 'array'},
13030 'user': {'type': 'string'}},
13031 'required': ['user', 'ssh-keys'],
13032 'type': 'object'},
13033 'StringsResult': {'additionalProperties': False,
13034 'properties': {'error': {'$ref': '#/definitions/Error'},
13035 'result': {'items': {'type': 'string'},
13036 'type': 'array'}},
13037 'type': 'object'},
13038 'StringsResults': {'additionalProperties': False,
13039 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
13040 'type': 'array'}},
13041 'required': ['results'],
13042 'type': 'object'}},
13043 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
13044 'Result': {'$ref': '#/definitions/ErrorResults'}},
13045 'type': 'object'},
13046 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
13047 'Result': {'$ref': '#/definitions/ErrorResults'}},
13048 'type': 'object'},
13049 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
13050 'Result': {'$ref': '#/definitions/ErrorResults'}},
13051 'type': 'object'},
13052 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
13053 'Result': {'$ref': '#/definitions/StringsResults'}},
13054 'type': 'object'}},
13055 'type': 'object'}
13056
13057
13058 @ReturnMapping(ErrorResults)
13059 async def AddKeys(self, ssh_keys, user):
13060 '''
13061 ssh_keys : typing.Sequence<+T_co>[str]
13062 user : str
13063 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13064 '''
13065 # map input types to rpc msg
13066 _params = dict()
13067 msg = dict(type='KeyManager', request='AddKeys', version=1, params=_params)
13068 _params['ssh-keys'] = ssh_keys
13069 _params['user'] = user
13070 reply = await self.rpc(msg)
13071 return reply
13072
13073
13074
13075 @ReturnMapping(ErrorResults)
13076 async def DeleteKeys(self, ssh_keys, user):
13077 '''
13078 ssh_keys : typing.Sequence<+T_co>[str]
13079 user : str
13080 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13081 '''
13082 # map input types to rpc msg
13083 _params = dict()
13084 msg = dict(type='KeyManager', request='DeleteKeys', version=1, params=_params)
13085 _params['ssh-keys'] = ssh_keys
13086 _params['user'] = user
13087 reply = await self.rpc(msg)
13088 return reply
13089
13090
13091
13092 @ReturnMapping(ErrorResults)
13093 async def ImportKeys(self, ssh_keys, user):
13094 '''
13095 ssh_keys : typing.Sequence<+T_co>[str]
13096 user : str
13097 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13098 '''
13099 # map input types to rpc msg
13100 _params = dict()
13101 msg = dict(type='KeyManager', request='ImportKeys', version=1, params=_params)
13102 _params['ssh-keys'] = ssh_keys
13103 _params['user'] = user
13104 reply = await self.rpc(msg)
13105 return reply
13106
13107
13108
13109 @ReturnMapping(StringsResults)
13110 async def ListKeys(self, entities, mode):
13111 '''
13112 entities : Entities
13113 mode : bool
13114 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
13115 '''
13116 # map input types to rpc msg
13117 _params = dict()
13118 msg = dict(type='KeyManager', request='ListKeys', version=1, params=_params)
13119 _params['entities'] = entities
13120 _params['mode'] = mode
13121 reply = await self.rpc(msg)
13122 return reply
13123
13124
13125 class KeyUpdaterFacade(Type):
13126 name = 'KeyUpdater'
13127 version = 1
13128 schema = {'definitions': {'Entities': {'additionalProperties': False,
13129 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13130 'type': 'array'}},
13131 'required': ['entities'],
13132 'type': 'object'},
13133 'Entity': {'additionalProperties': False,
13134 'properties': {'tag': {'type': 'string'}},
13135 'required': ['tag'],
13136 'type': 'object'},
13137 'Error': {'additionalProperties': False,
13138 'properties': {'code': {'type': 'string'},
13139 'info': {'$ref': '#/definitions/ErrorInfo'},
13140 'message': {'type': 'string'}},
13141 'required': ['message', 'code'],
13142 'type': 'object'},
13143 'ErrorInfo': {'additionalProperties': False,
13144 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13145 'macaroon-path': {'type': 'string'}},
13146 'type': 'object'},
13147 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13148 'NotifyWatchResult': {'additionalProperties': False,
13149 'properties': {'NotifyWatcherId': {'type': 'string'},
13150 'error': {'$ref': '#/definitions/Error'}},
13151 'required': ['NotifyWatcherId'],
13152 'type': 'object'},
13153 'NotifyWatchResults': {'additionalProperties': False,
13154 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13155 'type': 'array'}},
13156 'required': ['results'],
13157 'type': 'object'},
13158 'StringsResult': {'additionalProperties': False,
13159 'properties': {'error': {'$ref': '#/definitions/Error'},
13160 'result': {'items': {'type': 'string'},
13161 'type': 'array'}},
13162 'type': 'object'},
13163 'StringsResults': {'additionalProperties': False,
13164 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
13165 'type': 'array'}},
13166 'required': ['results'],
13167 'type': 'object'}},
13168 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13169 'Result': {'$ref': '#/definitions/StringsResults'}},
13170 'type': 'object'},
13171 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13172 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13173 'type': 'object'}},
13174 'type': 'object'}
13175
13176
13177 @ReturnMapping(StringsResults)
13178 async def AuthorisedKeys(self, entities):
13179 '''
13180 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13181 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
13182 '''
13183 # map input types to rpc msg
13184 _params = dict()
13185 msg = dict(type='KeyUpdater', request='AuthorisedKeys', version=1, params=_params)
13186 _params['entities'] = entities
13187 reply = await self.rpc(msg)
13188 return reply
13189
13190
13191
13192 @ReturnMapping(NotifyWatchResults)
13193 async def WatchAuthorisedKeys(self, entities):
13194 '''
13195 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13196 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13197 '''
13198 # map input types to rpc msg
13199 _params = dict()
13200 msg = dict(type='KeyUpdater', request='WatchAuthorisedKeys', version=1, params=_params)
13201 _params['entities'] = entities
13202 reply = await self.rpc(msg)
13203 return reply
13204
13205
13206 class LeadershipServiceFacade(Type):
13207 name = 'LeadershipService'
13208 version = 2
13209 schema = {'definitions': {'ApplicationTag': {'additionalProperties': False,
13210 'properties': {'Name': {'type': 'string'}},
13211 'required': ['Name'],
13212 'type': 'object'},
13213 'ClaimLeadershipBulkParams': {'additionalProperties': False,
13214 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
13215 'type': 'array'}},
13216 'required': ['params'],
13217 'type': 'object'},
13218 'ClaimLeadershipBulkResults': {'additionalProperties': False,
13219 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13220 'type': 'array'}},
13221 'required': ['results'],
13222 'type': 'object'},
13223 'ClaimLeadershipParams': {'additionalProperties': False,
13224 'properties': {'application-tag': {'type': 'string'},
13225 'duration': {'type': 'number'},
13226 'unit-tag': {'type': 'string'}},
13227 'required': ['application-tag',
13228 'unit-tag',
13229 'duration'],
13230 'type': 'object'},
13231 'Error': {'additionalProperties': False,
13232 'properties': {'code': {'type': 'string'},
13233 'info': {'$ref': '#/definitions/ErrorInfo'},
13234 'message': {'type': 'string'}},
13235 'required': ['message', 'code'],
13236 'type': 'object'},
13237 'ErrorInfo': {'additionalProperties': False,
13238 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13239 'macaroon-path': {'type': 'string'}},
13240 'type': 'object'},
13241 'ErrorResult': {'additionalProperties': False,
13242 'properties': {'error': {'$ref': '#/definitions/Error'}},
13243 'type': 'object'},
13244 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
13245 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
13246 'Result': {'$ref': '#/definitions/ErrorResult'}},
13247 'type': 'object'},
13248 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
13249 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
13250 'type': 'object'}},
13251 'type': 'object'}
13252
13253
13254 @ReturnMapping(ErrorResult)
13255 async def BlockUntilLeadershipReleased(self, name):
13256 '''
13257 name : str
13258 Returns -> Error
13259 '''
13260 # map input types to rpc msg
13261 _params = dict()
13262 msg = dict(type='LeadershipService', request='BlockUntilLeadershipReleased', version=2, params=_params)
13263 _params['Name'] = name
13264 reply = await self.rpc(msg)
13265 return reply
13266
13267
13268
13269 @ReturnMapping(ClaimLeadershipBulkResults)
13270 async def ClaimLeadership(self, params):
13271 '''
13272 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
13273 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13274 '''
13275 # map input types to rpc msg
13276 _params = dict()
13277 msg = dict(type='LeadershipService', request='ClaimLeadership', version=2, params=_params)
13278 _params['params'] = params
13279 reply = await self.rpc(msg)
13280 return reply
13281
13282
13283 class LifeFlagFacade(Type):
13284 name = 'LifeFlag'
13285 version = 1
13286 schema = {'definitions': {'Entities': {'additionalProperties': False,
13287 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13288 'type': 'array'}},
13289 'required': ['entities'],
13290 'type': 'object'},
13291 'Entity': {'additionalProperties': False,
13292 'properties': {'tag': {'type': 'string'}},
13293 'required': ['tag'],
13294 'type': 'object'},
13295 'Error': {'additionalProperties': False,
13296 'properties': {'code': {'type': 'string'},
13297 'info': {'$ref': '#/definitions/ErrorInfo'},
13298 'message': {'type': 'string'}},
13299 'required': ['message', 'code'],
13300 'type': 'object'},
13301 'ErrorInfo': {'additionalProperties': False,
13302 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13303 'macaroon-path': {'type': 'string'}},
13304 'type': 'object'},
13305 'LifeResult': {'additionalProperties': False,
13306 'properties': {'error': {'$ref': '#/definitions/Error'},
13307 'life': {'type': 'string'}},
13308 'required': ['life'],
13309 'type': 'object'},
13310 'LifeResults': {'additionalProperties': False,
13311 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
13312 'type': 'array'}},
13313 'required': ['results'],
13314 'type': 'object'},
13315 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13316 'NotifyWatchResult': {'additionalProperties': False,
13317 'properties': {'NotifyWatcherId': {'type': 'string'},
13318 'error': {'$ref': '#/definitions/Error'}},
13319 'required': ['NotifyWatcherId'],
13320 'type': 'object'},
13321 'NotifyWatchResults': {'additionalProperties': False,
13322 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13323 'type': 'array'}},
13324 'required': ['results'],
13325 'type': 'object'}},
13326 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13327 'Result': {'$ref': '#/definitions/LifeResults'}},
13328 'type': 'object'},
13329 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13330 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13331 'type': 'object'}},
13332 'type': 'object'}
13333
13334
13335 @ReturnMapping(LifeResults)
13336 async def Life(self, entities):
13337 '''
13338 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13339 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
13340 '''
13341 # map input types to rpc msg
13342 _params = dict()
13343 msg = dict(type='LifeFlag', request='Life', version=1, params=_params)
13344 _params['entities'] = entities
13345 reply = await self.rpc(msg)
13346 return reply
13347
13348
13349
13350 @ReturnMapping(NotifyWatchResults)
13351 async def Watch(self, entities):
13352 '''
13353 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13354 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13355 '''
13356 # map input types to rpc msg
13357 _params = dict()
13358 msg = dict(type='LifeFlag', request='Watch', version=1, params=_params)
13359 _params['entities'] = entities
13360 reply = await self.rpc(msg)
13361 return reply
13362
13363
13364 class LogForwardingFacade(Type):
13365 name = 'LogForwarding'
13366 version = 1
13367 schema = {'definitions': {'Error': {'additionalProperties': False,
13368 'properties': {'code': {'type': 'string'},
13369 'info': {'$ref': '#/definitions/ErrorInfo'},
13370 'message': {'type': 'string'}},
13371 'required': ['message', 'code'],
13372 'type': 'object'},
13373 'ErrorInfo': {'additionalProperties': False,
13374 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13375 'macaroon-path': {'type': 'string'}},
13376 'type': 'object'},
13377 'ErrorResult': {'additionalProperties': False,
13378 'properties': {'error': {'$ref': '#/definitions/Error'}},
13379 'type': 'object'},
13380 'ErrorResults': {'additionalProperties': False,
13381 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13382 'type': 'array'}},
13383 'required': ['results'],
13384 'type': 'object'},
13385 'LogForwardingGetLastSentParams': {'additionalProperties': False,
13386 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
13387 'type': 'array'}},
13388 'required': ['ids'],
13389 'type': 'object'},
13390 'LogForwardingGetLastSentResult': {'additionalProperties': False,
13391 'properties': {'err': {'$ref': '#/definitions/Error'},
13392 'record-id': {'type': 'integer'},
13393 'record-timestamp': {'type': 'integer'}},
13394 'required': ['record-id',
13395 'record-timestamp',
13396 'err'],
13397 'type': 'object'},
13398 'LogForwardingGetLastSentResults': {'additionalProperties': False,
13399 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
13400 'type': 'array'}},
13401 'required': ['results'],
13402 'type': 'object'},
13403 'LogForwardingID': {'additionalProperties': False,
13404 'properties': {'model': {'type': 'string'},
13405 'sink': {'type': 'string'}},
13406 'required': ['model', 'sink'],
13407 'type': 'object'},
13408 'LogForwardingSetLastSentParam': {'additionalProperties': False,
13409 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
13410 'record-id': {'type': 'integer'},
13411 'record-timestamp': {'type': 'integer'}},
13412 'required': ['LogForwardingID',
13413 'record-id',
13414 'record-timestamp'],
13415 'type': 'object'},
13416 'LogForwardingSetLastSentParams': {'additionalProperties': False,
13417 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
13418 'type': 'array'}},
13419 'required': ['params'],
13420 'type': 'object'},
13421 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
13422 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
13423 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
13424 'type': 'object'},
13425 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
13426 'Result': {'$ref': '#/definitions/ErrorResults'}},
13427 'type': 'object'}},
13428 'type': 'object'}
13429
13430
13431 @ReturnMapping(LogForwardingGetLastSentResults)
13432 async def GetLastSent(self, ids):
13433 '''
13434 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
13435 Returns -> typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
13436 '''
13437 # map input types to rpc msg
13438 _params = dict()
13439 msg = dict(type='LogForwarding', request='GetLastSent', version=1, params=_params)
13440 _params['ids'] = ids
13441 reply = await self.rpc(msg)
13442 return reply
13443
13444
13445
13446 @ReturnMapping(ErrorResults)
13447 async def SetLastSent(self, params):
13448 '''
13449 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
13450 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13451 '''
13452 # map input types to rpc msg
13453 _params = dict()
13454 msg = dict(type='LogForwarding', request='SetLastSent', version=1, params=_params)
13455 _params['params'] = params
13456 reply = await self.rpc(msg)
13457 return reply
13458
13459
13460 class LoggerFacade(Type):
13461 name = 'Logger'
13462 version = 1
13463 schema = {'definitions': {'Entities': {'additionalProperties': False,
13464 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13465 'type': 'array'}},
13466 'required': ['entities'],
13467 'type': 'object'},
13468 'Entity': {'additionalProperties': False,
13469 'properties': {'tag': {'type': 'string'}},
13470 'required': ['tag'],
13471 'type': 'object'},
13472 'Error': {'additionalProperties': False,
13473 'properties': {'code': {'type': 'string'},
13474 'info': {'$ref': '#/definitions/ErrorInfo'},
13475 'message': {'type': 'string'}},
13476 'required': ['message', 'code'],
13477 'type': 'object'},
13478 'ErrorInfo': {'additionalProperties': False,
13479 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13480 'macaroon-path': {'type': 'string'}},
13481 'type': 'object'},
13482 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13483 'NotifyWatchResult': {'additionalProperties': False,
13484 'properties': {'NotifyWatcherId': {'type': 'string'},
13485 'error': {'$ref': '#/definitions/Error'}},
13486 'required': ['NotifyWatcherId'],
13487 'type': 'object'},
13488 'NotifyWatchResults': {'additionalProperties': False,
13489 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13490 'type': 'array'}},
13491 'required': ['results'],
13492 'type': 'object'},
13493 'StringResult': {'additionalProperties': False,
13494 'properties': {'error': {'$ref': '#/definitions/Error'},
13495 'result': {'type': 'string'}},
13496 'required': ['result'],
13497 'type': 'object'},
13498 'StringResults': {'additionalProperties': False,
13499 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
13500 'type': 'array'}},
13501 'required': ['results'],
13502 'type': 'object'}},
13503 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13504 'Result': {'$ref': '#/definitions/StringResults'}},
13505 'type': 'object'},
13506 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13507 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13508 'type': 'object'}},
13509 'type': 'object'}
13510
13511
13512 @ReturnMapping(StringResults)
13513 async def LoggingConfig(self, entities):
13514 '''
13515 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13516 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
13517 '''
13518 # map input types to rpc msg
13519 _params = dict()
13520 msg = dict(type='Logger', request='LoggingConfig', version=1, params=_params)
13521 _params['entities'] = entities
13522 reply = await self.rpc(msg)
13523 return reply
13524
13525
13526
13527 @ReturnMapping(NotifyWatchResults)
13528 async def WatchLoggingConfig(self, entities):
13529 '''
13530 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13531 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13532 '''
13533 # map input types to rpc msg
13534 _params = dict()
13535 msg = dict(type='Logger', request='WatchLoggingConfig', version=1, params=_params)
13536 _params['entities'] = entities
13537 reply = await self.rpc(msg)
13538 return reply
13539
13540
13541 class MachineActionsFacade(Type):
13542 name = 'MachineActions'
13543 version = 1
13544 schema = {'definitions': {'Action': {'additionalProperties': False,
13545 'properties': {'name': {'type': 'string'},
13546 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
13547 'type': 'object'}},
13548 'type': 'object'},
13549 'receiver': {'type': 'string'},
13550 'tag': {'type': 'string'}},
13551 'required': ['tag', 'receiver', 'name'],
13552 'type': 'object'},
13553 'ActionExecutionResult': {'additionalProperties': False,
13554 'properties': {'action-tag': {'type': 'string'},
13555 'message': {'type': 'string'},
13556 'results': {'patternProperties': {'.*': {'additionalProperties': True,
13557 'type': 'object'}},
13558 'type': 'object'},
13559 'status': {'type': 'string'}},
13560 'required': ['action-tag', 'status'],
13561 'type': 'object'},
13562 'ActionExecutionResults': {'additionalProperties': False,
13563 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
13564 'type': 'array'}},
13565 'type': 'object'},
13566 'ActionResult': {'additionalProperties': False,
13567 'properties': {'action': {'$ref': '#/definitions/Action'},
13568 'completed': {'format': 'date-time',
13569 'type': 'string'},
13570 'enqueued': {'format': 'date-time',
13571 'type': 'string'},
13572 'error': {'$ref': '#/definitions/Error'},
13573 'message': {'type': 'string'},
13574 'output': {'patternProperties': {'.*': {'additionalProperties': True,
13575 'type': 'object'}},
13576 'type': 'object'},
13577 'started': {'format': 'date-time',
13578 'type': 'string'},
13579 'status': {'type': 'string'}},
13580 'type': 'object'},
13581 'ActionResults': {'additionalProperties': False,
13582 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
13583 'type': 'array'}},
13584 'type': 'object'},
13585 'ActionsByReceiver': {'additionalProperties': False,
13586 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
13587 'type': 'array'},
13588 'error': {'$ref': '#/definitions/Error'},
13589 'receiver': {'type': 'string'}},
13590 'type': 'object'},
13591 'ActionsByReceivers': {'additionalProperties': False,
13592 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
13593 'type': 'array'}},
13594 'type': 'object'},
13595 'Entities': {'additionalProperties': False,
13596 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13597 'type': 'array'}},
13598 'required': ['entities'],
13599 'type': 'object'},
13600 'Entity': {'additionalProperties': False,
13601 'properties': {'tag': {'type': 'string'}},
13602 'required': ['tag'],
13603 'type': 'object'},
13604 'Error': {'additionalProperties': False,
13605 'properties': {'code': {'type': 'string'},
13606 'info': {'$ref': '#/definitions/ErrorInfo'},
13607 'message': {'type': 'string'}},
13608 'required': ['message', 'code'],
13609 'type': 'object'},
13610 'ErrorInfo': {'additionalProperties': False,
13611 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13612 'macaroon-path': {'type': 'string'}},
13613 'type': 'object'},
13614 'ErrorResult': {'additionalProperties': False,
13615 'properties': {'error': {'$ref': '#/definitions/Error'}},
13616 'type': 'object'},
13617 'ErrorResults': {'additionalProperties': False,
13618 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13619 'type': 'array'}},
13620 'required': ['results'],
13621 'type': 'object'},
13622 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13623 'StringsWatchResult': {'additionalProperties': False,
13624 'properties': {'changes': {'items': {'type': 'string'},
13625 'type': 'array'},
13626 'error': {'$ref': '#/definitions/Error'},
13627 'watcher-id': {'type': 'string'}},
13628 'required': ['watcher-id'],
13629 'type': 'object'},
13630 'StringsWatchResults': {'additionalProperties': False,
13631 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
13632 'type': 'array'}},
13633 'required': ['results'],
13634 'type': 'object'}},
13635 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13636 'Result': {'$ref': '#/definitions/ActionResults'}},
13637 'type': 'object'},
13638 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13639 'Result': {'$ref': '#/definitions/ErrorResults'}},
13640 'type': 'object'},
13641 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
13642 'Result': {'$ref': '#/definitions/ErrorResults'}},
13643 'type': 'object'},
13644 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13645 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
13646 'type': 'object'},
13647 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13648 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
13649 'type': 'object'}},
13650 'type': 'object'}
13651
13652
13653 @ReturnMapping(ActionResults)
13654 async def Actions(self, entities):
13655 '''
13656 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13657 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
13658 '''
13659 # map input types to rpc msg
13660 _params = dict()
13661 msg = dict(type='MachineActions', request='Actions', version=1, params=_params)
13662 _params['entities'] = entities
13663 reply = await self.rpc(msg)
13664 return reply
13665
13666
13667
13668 @ReturnMapping(ErrorResults)
13669 async def BeginActions(self, entities):
13670 '''
13671 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13672 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13673 '''
13674 # map input types to rpc msg
13675 _params = dict()
13676 msg = dict(type='MachineActions', request='BeginActions', version=1, params=_params)
13677 _params['entities'] = entities
13678 reply = await self.rpc(msg)
13679 return reply
13680
13681
13682
13683 @ReturnMapping(ErrorResults)
13684 async def FinishActions(self, results):
13685 '''
13686 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
13687 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13688 '''
13689 # map input types to rpc msg
13690 _params = dict()
13691 msg = dict(type='MachineActions', request='FinishActions', version=1, params=_params)
13692 _params['results'] = results
13693 reply = await self.rpc(msg)
13694 return reply
13695
13696
13697
13698 @ReturnMapping(ActionsByReceivers)
13699 async def RunningActions(self, entities):
13700 '''
13701 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13702 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
13703 '''
13704 # map input types to rpc msg
13705 _params = dict()
13706 msg = dict(type='MachineActions', request='RunningActions', version=1, params=_params)
13707 _params['entities'] = entities
13708 reply = await self.rpc(msg)
13709 return reply
13710
13711
13712
13713 @ReturnMapping(StringsWatchResults)
13714 async def WatchActionNotifications(self, entities):
13715 '''
13716 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13717 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
13718 '''
13719 # map input types to rpc msg
13720 _params = dict()
13721 msg = dict(type='MachineActions', request='WatchActionNotifications', version=1, params=_params)
13722 _params['entities'] = entities
13723 reply = await self.rpc(msg)
13724 return reply
13725
13726
13727 class MachineManagerFacade(Type):
13728 name = 'MachineManager'
13729 version = 2
13730 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
13731 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
13732 'type': 'array'},
13733 'constraints': {'$ref': '#/definitions/Value'},
13734 'container-type': {'type': 'string'},
13735 'disks': {'items': {'$ref': '#/definitions/Constraints'},
13736 'type': 'array'},
13737 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
13738 'instance-id': {'type': 'string'},
13739 'jobs': {'items': {'type': 'string'},
13740 'type': 'array'},
13741 'nonce': {'type': 'string'},
13742 'parent-id': {'type': 'string'},
13743 'placement': {'$ref': '#/definitions/Placement'},
13744 'series': {'type': 'string'}},
13745 'required': ['series',
13746 'constraints',
13747 'jobs',
13748 'parent-id',
13749 'container-type',
13750 'instance-id',
13751 'nonce',
13752 'hardware-characteristics',
13753 'addresses'],
13754 'type': 'object'},
13755 'AddMachines': {'additionalProperties': False,
13756 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
13757 'type': 'array'}},
13758 'required': ['params'],
13759 'type': 'object'},
13760 'AddMachinesResult': {'additionalProperties': False,
13761 'properties': {'error': {'$ref': '#/definitions/Error'},
13762 'machine': {'type': 'string'}},
13763 'required': ['machine'],
13764 'type': 'object'},
13765 'AddMachinesResults': {'additionalProperties': False,
13766 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
13767 'type': 'array'}},
13768 'required': ['machines'],
13769 'type': 'object'},
13770 'Address': {'additionalProperties': False,
13771 'properties': {'scope': {'type': 'string'},
13772 'space-name': {'type': 'string'},
13773 'type': {'type': 'string'},
13774 'value': {'type': 'string'}},
13775 'required': ['value', 'type', 'scope'],
13776 'type': 'object'},
13777 'Constraints': {'additionalProperties': False,
13778 'properties': {'Count': {'type': 'integer'},
13779 'Pool': {'type': 'string'},
13780 'Size': {'type': 'integer'}},
13781 'required': ['Pool', 'Size', 'Count'],
13782 'type': 'object'},
13783 'Error': {'additionalProperties': False,
13784 'properties': {'code': {'type': 'string'},
13785 'info': {'$ref': '#/definitions/ErrorInfo'},
13786 'message': {'type': 'string'}},
13787 'required': ['message', 'code'],
13788 'type': 'object'},
13789 'ErrorInfo': {'additionalProperties': False,
13790 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13791 'macaroon-path': {'type': 'string'}},
13792 'type': 'object'},
13793 'HardwareCharacteristics': {'additionalProperties': False,
13794 'properties': {'arch': {'type': 'string'},
13795 'availability-zone': {'type': 'string'},
13796 'cpu-cores': {'type': 'integer'},
13797 'cpu-power': {'type': 'integer'},
13798 'mem': {'type': 'integer'},
13799 'root-disk': {'type': 'integer'},
13800 'tags': {'items': {'type': 'string'},
13801 'type': 'array'}},
13802 'type': 'object'},
13803 'InstanceType': {'additionalProperties': False,
13804 'properties': {'arches': {'items': {'type': 'string'},
13805 'type': 'array'},
13806 'cost': {'type': 'integer'},
13807 'cpu-cores': {'type': 'integer'},
13808 'deprecated': {'type': 'boolean'},
13809 'memory': {'type': 'integer'},
13810 'name': {'type': 'string'},
13811 'root-disk': {'type': 'integer'},
13812 'virt-type': {'type': 'string'}},
13813 'required': ['arches', 'cpu-cores', 'memory'],
13814 'type': 'object'},
13815 'InstanceTypesResult': {'additionalProperties': False,
13816 'properties': {'cost-currency': {'type': 'string'},
13817 'cost-divisor': {'type': 'integer'},
13818 'cost-unit': {'type': 'string'},
13819 'error': {'$ref': '#/definitions/Error'},
13820 'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
13821 'type': 'array'}},
13822 'type': 'object'},
13823 'InstanceTypesResults': {'additionalProperties': False,
13824 'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
13825 'type': 'array'}},
13826 'required': ['results'],
13827 'type': 'object'},
13828 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13829 'ModelInstanceTypesConstraint': {'additionalProperties': False,
13830 'properties': {'value': {'$ref': '#/definitions/Value'}},
13831 'type': 'object'},
13832 'ModelInstanceTypesConstraints': {'additionalProperties': False,
13833 'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
13834 'type': 'array'}},
13835 'required': ['constraints'],
13836 'type': 'object'},
13837 'Placement': {'additionalProperties': False,
13838 'properties': {'directive': {'type': 'string'},
13839 'scope': {'type': 'string'}},
13840 'required': ['scope', 'directive'],
13841 'type': 'object'},
13842 'Value': {'additionalProperties': False,
13843 'properties': {'arch': {'type': 'string'},
13844 'container': {'type': 'string'},
13845 'cores': {'type': 'integer'},
13846 'cpu-power': {'type': 'integer'},
13847 'instance-type': {'type': 'string'},
13848 'mem': {'type': 'integer'},
13849 'root-disk': {'type': 'integer'},
13850 'spaces': {'items': {'type': 'string'},
13851 'type': 'array'},
13852 'tags': {'items': {'type': 'string'},
13853 'type': 'array'},
13854 'virt-type': {'type': 'string'}},
13855 'type': 'object'}},
13856 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
13857 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
13858 'type': 'object'},
13859 'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
13860 'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
13861 'type': 'object'}},
13862 'type': 'object'}
13863
13864
13865 @ReturnMapping(AddMachinesResults)
13866 async def AddMachines(self, params):
13867 '''
13868 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
13869 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
13870 '''
13871 # map input types to rpc msg
13872 _params = dict()
13873 msg = dict(type='MachineManager', request='AddMachines', version=2, params=_params)
13874 _params['params'] = params
13875 reply = await self.rpc(msg)
13876 return reply
13877
13878
13879
13880 @ReturnMapping(InstanceTypesResults)
13881 async def InstanceTypes(self, constraints):
13882 '''
13883 constraints : typing.Sequence<+T_co>[~ModelInstanceTypesConstraint]<~ModelInstanceTypesConstraint>
13884 Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
13885 '''
13886 # map input types to rpc msg
13887 _params = dict()
13888 msg = dict(type='MachineManager', request='InstanceTypes', version=2, params=_params)
13889 _params['constraints'] = constraints
13890 reply = await self.rpc(msg)
13891 return reply
13892
13893
13894 class MachineUndertakerFacade(Type):
13895 name = 'MachineUndertaker'
13896 version = 1
13897 schema = {'definitions': {'Entities': {'additionalProperties': False,
13898 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13899 'type': 'array'}},
13900 'required': ['entities'],
13901 'type': 'object'},
13902 'EntitiesResult': {'additionalProperties': False,
13903 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13904 'type': 'array'},
13905 'error': {'$ref': '#/definitions/Error'}},
13906 'required': ['entities'],
13907 'type': 'object'},
13908 'EntitiesResults': {'additionalProperties': False,
13909 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
13910 'type': 'array'}},
13911 'required': ['results'],
13912 'type': 'object'},
13913 'Entity': {'additionalProperties': False,
13914 'properties': {'tag': {'type': 'string'}},
13915 'required': ['tag'],
13916 'type': 'object'},
13917 'Error': {'additionalProperties': False,
13918 'properties': {'code': {'type': 'string'},
13919 'info': {'$ref': '#/definitions/ErrorInfo'},
13920 'message': {'type': 'string'}},
13921 'required': ['message', 'code'],
13922 'type': 'object'},
13923 'ErrorInfo': {'additionalProperties': False,
13924 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13925 'macaroon-path': {'type': 'string'}},
13926 'type': 'object'},
13927 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13928 'NotifyWatchResult': {'additionalProperties': False,
13929 'properties': {'NotifyWatcherId': {'type': 'string'},
13930 'error': {'$ref': '#/definitions/Error'}},
13931 'required': ['NotifyWatcherId'],
13932 'type': 'object'},
13933 'NotifyWatchResults': {'additionalProperties': False,
13934 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13935 'type': 'array'}},
13936 'required': ['results'],
13937 'type': 'object'},
13938 'ProviderInterfaceInfo': {'additionalProperties': False,
13939 'properties': {'interface-name': {'type': 'string'},
13940 'mac-address': {'type': 'string'},
13941 'provider-id': {'type': 'string'}},
13942 'required': ['interface-name',
13943 'mac-address',
13944 'provider-id'],
13945 'type': 'object'},
13946 'ProviderInterfaceInfoResult': {'additionalProperties': False,
13947 'properties': {'error': {'$ref': '#/definitions/Error'},
13948 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'},
13949 'type': 'array'},
13950 'machine-tag': {'type': 'string'}},
13951 'required': ['machine-tag',
13952 'interfaces'],
13953 'type': 'object'},
13954 'ProviderInterfaceInfoResults': {'additionalProperties': False,
13955 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'},
13956 'type': 'array'}},
13957 'required': ['results'],
13958 'type': 'object'}},
13959 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13960 'Result': {'$ref': '#/definitions/EntitiesResults'}},
13961 'type': 'object'},
13962 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}},
13963 'type': 'object'},
13964 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13965 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}},
13966 'type': 'object'},
13967 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13968 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13969 'type': 'object'}},
13970 'type': 'object'}
13971
13972
13973 @ReturnMapping(EntitiesResults)
13974 async def AllMachineRemovals(self, entities):
13975 '''
13976 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13977 Returns -> typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
13978 '''
13979 # map input types to rpc msg
13980 _params = dict()
13981 msg = dict(type='MachineUndertaker', request='AllMachineRemovals', version=1, params=_params)
13982 _params['entities'] = entities
13983 reply = await self.rpc(msg)
13984 return reply
13985
13986
13987
13988 @ReturnMapping(None)
13989 async def CompleteMachineRemovals(self, entities):
13990 '''
13991 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13992 Returns -> None
13993 '''
13994 # map input types to rpc msg
13995 _params = dict()
13996 msg = dict(type='MachineUndertaker', request='CompleteMachineRemovals', version=1, params=_params)
13997 _params['entities'] = entities
13998 reply = await self.rpc(msg)
13999 return reply
14000
14001
14002
14003 @ReturnMapping(ProviderInterfaceInfoResults)
14004 async def GetMachineProviderInterfaceInfo(self, entities):
14005 '''
14006 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14007 Returns -> typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
14008 '''
14009 # map input types to rpc msg
14010 _params = dict()
14011 msg = dict(type='MachineUndertaker', request='GetMachineProviderInterfaceInfo', version=1, params=_params)
14012 _params['entities'] = entities
14013 reply = await self.rpc(msg)
14014 return reply
14015
14016
14017
14018 @ReturnMapping(NotifyWatchResults)
14019 async def WatchMachineRemovals(self, entities):
14020 '''
14021 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14022 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
14023 '''
14024 # map input types to rpc msg
14025 _params = dict()
14026 msg = dict(type='MachineUndertaker', request='WatchMachineRemovals', version=1, params=_params)
14027 _params['entities'] = entities
14028 reply = await self.rpc(msg)
14029 return reply
14030
14031
14032 class MachinerFacade(Type):
14033 name = 'Machiner'
14034 version = 1
14035 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
14036 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
14037 'type': 'array'},
14038 'type': 'array'}},
14039 'required': ['servers'],
14040 'type': 'object'},
14041 'Address': {'additionalProperties': False,
14042 'properties': {'scope': {'type': 'string'},
14043 'space-name': {'type': 'string'},
14044 'type': {'type': 'string'},
14045 'value': {'type': 'string'}},
14046 'required': ['value', 'type', 'scope'],
14047 'type': 'object'},
14048 'BytesResult': {'additionalProperties': False,
14049 'properties': {'result': {'items': {'type': 'integer'},
14050 'type': 'array'}},
14051 'required': ['result'],
14052 'type': 'object'},
14053 'Entities': {'additionalProperties': False,
14054 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14055 'type': 'array'}},
14056 'required': ['entities'],
14057 'type': 'object'},
14058 'Entity': {'additionalProperties': False,
14059 'properties': {'tag': {'type': 'string'}},
14060 'required': ['tag'],
14061 'type': 'object'},
14062 'EntityStatusArgs': {'additionalProperties': False,
14063 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
14064 'type': 'object'}},
14065 'type': 'object'},
14066 'info': {'type': 'string'},
14067 'status': {'type': 'string'},
14068 'tag': {'type': 'string'}},
14069 'required': ['tag',
14070 'status',
14071 'info',
14072 'data'],
14073 'type': 'object'},
14074 'Error': {'additionalProperties': False,
14075 'properties': {'code': {'type': 'string'},
14076 'info': {'$ref': '#/definitions/ErrorInfo'},
14077 'message': {'type': 'string'}},
14078 'required': ['message', 'code'],
14079 'type': 'object'},
14080 'ErrorInfo': {'additionalProperties': False,
14081 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14082 'macaroon-path': {'type': 'string'}},
14083 'type': 'object'},
14084 'ErrorResult': {'additionalProperties': False,
14085 'properties': {'error': {'$ref': '#/definitions/Error'}},
14086 'type': 'object'},
14087 'ErrorResults': {'additionalProperties': False,
14088 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14089 'type': 'array'}},
14090 'required': ['results'],
14091 'type': 'object'},
14092 'HostPort': {'additionalProperties': False,
14093 'properties': {'Address': {'$ref': '#/definitions/Address'},
14094 'port': {'type': 'integer'}},
14095 'required': ['Address', 'port'],
14096 'type': 'object'},
14097 'JobsResult': {'additionalProperties': False,
14098 'properties': {'error': {'$ref': '#/definitions/Error'},
14099 'jobs': {'items': {'type': 'string'},
14100 'type': 'array'}},
14101 'required': ['jobs'],
14102 'type': 'object'},
14103 'JobsResults': {'additionalProperties': False,
14104 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
14105 'type': 'array'}},
14106 'required': ['results'],
14107 'type': 'object'},
14108 'LifeResult': {'additionalProperties': False,
14109 'properties': {'error': {'$ref': '#/definitions/Error'},
14110 'life': {'type': 'string'}},
14111 'required': ['life'],
14112 'type': 'object'},
14113 'LifeResults': {'additionalProperties': False,
14114 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
14115 'type': 'array'}},
14116 'required': ['results'],
14117 'type': 'object'},
14118 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14119 'MachineAddresses': {'additionalProperties': False,
14120 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
14121 'type': 'array'},
14122 'tag': {'type': 'string'}},
14123 'required': ['tag', 'addresses'],
14124 'type': 'object'},
14125 'NetworkConfig': {'additionalProperties': False,
14126 'properties': {'address': {'type': 'string'},
14127 'cidr': {'type': 'string'},
14128 'config-type': {'type': 'string'},
14129 'device-index': {'type': 'integer'},
14130 'disabled': {'type': 'boolean'},
14131 'dns-search-domains': {'items': {'type': 'string'},
14132 'type': 'array'},
14133 'dns-servers': {'items': {'type': 'string'},
14134 'type': 'array'},
14135 'gateway-address': {'type': 'string'},
14136 'interface-name': {'type': 'string'},
14137 'interface-type': {'type': 'string'},
14138 'mac-address': {'type': 'string'},
14139 'mtu': {'type': 'integer'},
14140 'no-auto-start': {'type': 'boolean'},
14141 'parent-interface-name': {'type': 'string'},
14142 'provider-address-id': {'type': 'string'},
14143 'provider-id': {'type': 'string'},
14144 'provider-space-id': {'type': 'string'},
14145 'provider-subnet-id': {'type': 'string'},
14146 'provider-vlan-id': {'type': 'string'},
14147 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
14148 'type': 'array'},
14149 'vlan-tag': {'type': 'integer'}},
14150 'required': ['device-index',
14151 'mac-address',
14152 'cidr',
14153 'mtu',
14154 'provider-id',
14155 'provider-subnet-id',
14156 'provider-space-id',
14157 'provider-address-id',
14158 'provider-vlan-id',
14159 'vlan-tag',
14160 'interface-name',
14161 'parent-interface-name',
14162 'interface-type',
14163 'disabled'],
14164 'type': 'object'},
14165 'NetworkRoute': {'additionalProperties': False,
14166 'properties': {'destination-cidr': {'type': 'string'},
14167 'gateway-ip': {'type': 'string'},
14168 'metric': {'type': 'integer'}},
14169 'required': ['destination-cidr',
14170 'gateway-ip',
14171 'metric'],
14172 'type': 'object'},
14173 'NotifyWatchResult': {'additionalProperties': False,
14174 'properties': {'NotifyWatcherId': {'type': 'string'},
14175 'error': {'$ref': '#/definitions/Error'}},
14176 'required': ['NotifyWatcherId'],
14177 'type': 'object'},
14178 'NotifyWatchResults': {'additionalProperties': False,
14179 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14180 'type': 'array'}},
14181 'required': ['results'],
14182 'type': 'object'},
14183 'SetMachineNetworkConfig': {'additionalProperties': False,
14184 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
14185 'type': 'array'},
14186 'tag': {'type': 'string'}},
14187 'required': ['tag', 'config'],
14188 'type': 'object'},
14189 'SetMachinesAddresses': {'additionalProperties': False,
14190 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
14191 'type': 'array'}},
14192 'required': ['machine-addresses'],
14193 'type': 'object'},
14194 'SetStatus': {'additionalProperties': False,
14195 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
14196 'type': 'array'}},
14197 'required': ['entities'],
14198 'type': 'object'},
14199 'StringResult': {'additionalProperties': False,
14200 'properties': {'error': {'$ref': '#/definitions/Error'},
14201 'result': {'type': 'string'}},
14202 'required': ['result'],
14203 'type': 'object'},
14204 'StringsResult': {'additionalProperties': False,
14205 'properties': {'error': {'$ref': '#/definitions/Error'},
14206 'result': {'items': {'type': 'string'},
14207 'type': 'array'}},
14208 'type': 'object'}},
14209 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
14210 'type': 'object'},
14211 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
14212 'type': 'object'},
14213 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
14214 'type': 'object'},
14215 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14216 'Result': {'$ref': '#/definitions/ErrorResults'}},
14217 'type': 'object'},
14218 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14219 'Result': {'$ref': '#/definitions/JobsResults'}},
14220 'type': 'object'},
14221 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14222 'Result': {'$ref': '#/definitions/LifeResults'}},
14223 'type': 'object'},
14224 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
14225 'type': 'object'},
14226 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
14227 'Result': {'$ref': '#/definitions/ErrorResults'}},
14228 'type': 'object'},
14229 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
14230 'type': 'object'},
14231 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14232 'Result': {'$ref': '#/definitions/ErrorResults'}},
14233 'type': 'object'},
14234 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14235 'Result': {'$ref': '#/definitions/ErrorResults'}},
14236 'type': 'object'},
14237 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14238 'Result': {'$ref': '#/definitions/ErrorResults'}},
14239 'type': 'object'},
14240 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14241 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14242 'type': 'object'},
14243 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14244 'type': 'object'}},
14245 'type': 'object'}
14246
14247
14248 @ReturnMapping(StringsResult)
14249 async def APIAddresses(self):
14250 '''
14251
14252 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
14253 '''
14254 # map input types to rpc msg
14255 _params = dict()
14256 msg = dict(type='Machiner', request='APIAddresses', version=1, params=_params)
14257
14258 reply = await self.rpc(msg)
14259 return reply
14260
14261
14262
14263 @ReturnMapping(APIHostPortsResult)
14264 async def APIHostPorts(self):
14265 '''
14266
14267 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
14268 '''
14269 # map input types to rpc msg
14270 _params = dict()
14271 msg = dict(type='Machiner', request='APIHostPorts', version=1, params=_params)
14272
14273 reply = await self.rpc(msg)
14274 return reply
14275
14276
14277
14278 @ReturnMapping(BytesResult)
14279 async def CACert(self):
14280 '''
14281
14282 Returns -> typing.Sequence<+T_co>[int]
14283 '''
14284 # map input types to rpc msg
14285 _params = dict()
14286 msg = dict(type='Machiner', request='CACert', version=1, params=_params)
14287
14288 reply = await self.rpc(msg)
14289 return reply
14290
14291
14292
14293 @ReturnMapping(ErrorResults)
14294 async def EnsureDead(self, entities):
14295 '''
14296 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14297 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14298 '''
14299 # map input types to rpc msg
14300 _params = dict()
14301 msg = dict(type='Machiner', request='EnsureDead', version=1, params=_params)
14302 _params['entities'] = entities
14303 reply = await self.rpc(msg)
14304 return reply
14305
14306
14307
14308 @ReturnMapping(JobsResults)
14309 async def Jobs(self, entities):
14310 '''
14311 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14312 Returns -> typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
14313 '''
14314 # map input types to rpc msg
14315 _params = dict()
14316 msg = dict(type='Machiner', request='Jobs', version=1, params=_params)
14317 _params['entities'] = entities
14318 reply = await self.rpc(msg)
14319 return reply
14320
14321
14322
14323 @ReturnMapping(LifeResults)
14324 async def Life(self, entities):
14325 '''
14326 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14327 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
14328 '''
14329 # map input types to rpc msg
14330 _params = dict()
14331 msg = dict(type='Machiner', request='Life', version=1, params=_params)
14332 _params['entities'] = entities
14333 reply = await self.rpc(msg)
14334 return reply
14335
14336
14337
14338 @ReturnMapping(StringResult)
14339 async def ModelUUID(self):
14340 '''
14341
14342 Returns -> typing.Union[_ForwardRef('Error'), str]
14343 '''
14344 # map input types to rpc msg
14345 _params = dict()
14346 msg = dict(type='Machiner', request='ModelUUID', version=1, params=_params)
14347
14348 reply = await self.rpc(msg)
14349 return reply
14350
14351
14352
14353 @ReturnMapping(ErrorResults)
14354 async def SetMachineAddresses(self, machine_addresses):
14355 '''
14356 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
14357 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14358 '''
14359 # map input types to rpc msg
14360 _params = dict()
14361 msg = dict(type='Machiner', request='SetMachineAddresses', version=1, params=_params)
14362 _params['machine-addresses'] = machine_addresses
14363 reply = await self.rpc(msg)
14364 return reply
14365
14366
14367
14368 @ReturnMapping(None)
14369 async def SetObservedNetworkConfig(self, config, tag):
14370 '''
14371 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
14372 tag : str
14373 Returns -> None
14374 '''
14375 # map input types to rpc msg
14376 _params = dict()
14377 msg = dict(type='Machiner', request='SetObservedNetworkConfig', version=1, params=_params)
14378 _params['config'] = config
14379 _params['tag'] = tag
14380 reply = await self.rpc(msg)
14381 return reply
14382
14383
14384
14385 @ReturnMapping(ErrorResults)
14386 async def SetProviderNetworkConfig(self, entities):
14387 '''
14388 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14389 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14390 '''
14391 # map input types to rpc msg
14392 _params = dict()
14393 msg = dict(type='Machiner', request='SetProviderNetworkConfig', version=1, params=_params)
14394 _params['entities'] = entities
14395 reply = await self.rpc(msg)
14396 return reply
14397
14398
14399
14400 @ReturnMapping(ErrorResults)
14401 async def SetStatus(self, entities):
14402 '''
14403 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
14404 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14405 '''
14406 # map input types to rpc msg
14407 _params = dict()
14408 msg = dict(type='Machiner', request='SetStatus', version=1, params=_params)
14409 _params['entities'] = entities
14410 reply = await self.rpc(msg)
14411 return reply
14412
14413
14414
14415 @ReturnMapping(ErrorResults)
14416 async def UpdateStatus(self, entities):
14417 '''
14418 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
14419 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14420 '''
14421 # map input types to rpc msg
14422 _params = dict()
14423 msg = dict(type='Machiner', request='UpdateStatus', version=1, params=_params)
14424 _params['entities'] = entities
14425 reply = await self.rpc(msg)
14426 return reply
14427
14428
14429
14430 @ReturnMapping(NotifyWatchResults)
14431 async def Watch(self, entities):
14432 '''
14433 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14434 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
14435 '''
14436 # map input types to rpc msg
14437 _params = dict()
14438 msg = dict(type='Machiner', request='Watch', version=1, params=_params)
14439 _params['entities'] = entities
14440 reply = await self.rpc(msg)
14441 return reply
14442
14443
14444
14445 @ReturnMapping(NotifyWatchResult)
14446 async def WatchAPIHostPorts(self):
14447 '''
14448
14449 Returns -> typing.Union[str, _ForwardRef('Error')]
14450 '''
14451 # map input types to rpc msg
14452 _params = dict()
14453 msg = dict(type='Machiner', request='WatchAPIHostPorts', version=1, params=_params)
14454
14455 reply = await self.rpc(msg)
14456 return reply
14457
14458
14459 class MeterStatusFacade(Type):
14460 name = 'MeterStatus'
14461 version = 1
14462 schema = {'definitions': {'Entities': {'additionalProperties': False,
14463 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14464 'type': 'array'}},
14465 'required': ['entities'],
14466 'type': 'object'},
14467 'Entity': {'additionalProperties': False,
14468 'properties': {'tag': {'type': 'string'}},
14469 'required': ['tag'],
14470 'type': 'object'},
14471 'Error': {'additionalProperties': False,
14472 'properties': {'code': {'type': 'string'},
14473 'info': {'$ref': '#/definitions/ErrorInfo'},
14474 'message': {'type': 'string'}},
14475 'required': ['message', 'code'],
14476 'type': 'object'},
14477 'ErrorInfo': {'additionalProperties': False,
14478 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14479 'macaroon-path': {'type': 'string'}},
14480 'type': 'object'},
14481 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14482 'MeterStatusResult': {'additionalProperties': False,
14483 'properties': {'code': {'type': 'string'},
14484 'error': {'$ref': '#/definitions/Error'},
14485 'info': {'type': 'string'}},
14486 'required': ['code', 'info'],
14487 'type': 'object'},
14488 'MeterStatusResults': {'additionalProperties': False,
14489 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
14490 'type': 'array'}},
14491 'required': ['results'],
14492 'type': 'object'},
14493 'NotifyWatchResult': {'additionalProperties': False,
14494 'properties': {'NotifyWatcherId': {'type': 'string'},
14495 'error': {'$ref': '#/definitions/Error'}},
14496 'required': ['NotifyWatcherId'],
14497 'type': 'object'},
14498 'NotifyWatchResults': {'additionalProperties': False,
14499 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14500 'type': 'array'}},
14501 'required': ['results'],
14502 'type': 'object'}},
14503 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14504 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
14505 'type': 'object'},
14506 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14507 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14508 'type': 'object'}},
14509 'type': 'object'}
14510
14511
14512 @ReturnMapping(MeterStatusResults)
14513 async def GetMeterStatus(self, entities):
14514 '''
14515 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14516 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
14517 '''
14518 # map input types to rpc msg
14519 _params = dict()
14520 msg = dict(type='MeterStatus', request='GetMeterStatus', version=1, params=_params)
14521 _params['entities'] = entities
14522 reply = await self.rpc(msg)
14523 return reply
14524
14525
14526
14527 @ReturnMapping(NotifyWatchResults)
14528 async def WatchMeterStatus(self, entities):
14529 '''
14530 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14531 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
14532 '''
14533 # map input types to rpc msg
14534 _params = dict()
14535 msg = dict(type='MeterStatus', request='WatchMeterStatus', version=1, params=_params)
14536 _params['entities'] = entities
14537 reply = await self.rpc(msg)
14538 return reply
14539
14540
14541 class MetricsAdderFacade(Type):
14542 name = 'MetricsAdder'
14543 version = 2
14544 schema = {'definitions': {'Error': {'additionalProperties': False,
14545 'properties': {'code': {'type': 'string'},
14546 'info': {'$ref': '#/definitions/ErrorInfo'},
14547 'message': {'type': 'string'}},
14548 'required': ['message', 'code'],
14549 'type': 'object'},
14550 'ErrorInfo': {'additionalProperties': False,
14551 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14552 'macaroon-path': {'type': 'string'}},
14553 'type': 'object'},
14554 'ErrorResult': {'additionalProperties': False,
14555 'properties': {'error': {'$ref': '#/definitions/Error'}},
14556 'type': 'object'},
14557 'ErrorResults': {'additionalProperties': False,
14558 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14559 'type': 'array'}},
14560 'required': ['results'],
14561 'type': 'object'},
14562 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14563 'Metric': {'additionalProperties': False,
14564 'properties': {'key': {'type': 'string'},
14565 'time': {'format': 'date-time',
14566 'type': 'string'},
14567 'value': {'type': 'string'}},
14568 'required': ['key', 'value', 'time'],
14569 'type': 'object'},
14570 'MetricBatch': {'additionalProperties': False,
14571 'properties': {'charm-url': {'type': 'string'},
14572 'created': {'format': 'date-time',
14573 'type': 'string'},
14574 'metrics': {'items': {'$ref': '#/definitions/Metric'},
14575 'type': 'array'},
14576 'uuid': {'type': 'string'}},
14577 'required': ['uuid',
14578 'charm-url',
14579 'created',
14580 'metrics'],
14581 'type': 'object'},
14582 'MetricBatchParam': {'additionalProperties': False,
14583 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
14584 'tag': {'type': 'string'}},
14585 'required': ['tag', 'batch'],
14586 'type': 'object'},
14587 'MetricBatchParams': {'additionalProperties': False,
14588 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
14589 'type': 'array'}},
14590 'required': ['batches'],
14591 'type': 'object'}},
14592 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
14593 'Result': {'$ref': '#/definitions/ErrorResults'}},
14594 'type': 'object'}},
14595 'type': 'object'}
14596
14597
14598 @ReturnMapping(ErrorResults)
14599 async def AddMetricBatches(self, batches):
14600 '''
14601 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
14602 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14603 '''
14604 # map input types to rpc msg
14605 _params = dict()
14606 msg = dict(type='MetricsAdder', request='AddMetricBatches', version=2, params=_params)
14607 _params['batches'] = batches
14608 reply = await self.rpc(msg)
14609 return reply
14610
14611
14612 class MetricsDebugFacade(Type):
14613 name = 'MetricsDebug'
14614 version = 2
14615 schema = {'definitions': {'Entities': {'additionalProperties': False,
14616 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14617 'type': 'array'}},
14618 'required': ['entities'],
14619 'type': 'object'},
14620 'Entity': {'additionalProperties': False,
14621 'properties': {'tag': {'type': 'string'}},
14622 'required': ['tag'],
14623 'type': 'object'},
14624 'EntityMetrics': {'additionalProperties': False,
14625 'properties': {'error': {'$ref': '#/definitions/Error'},
14626 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
14627 'type': 'array'}},
14628 'type': 'object'},
14629 'Error': {'additionalProperties': False,
14630 'properties': {'code': {'type': 'string'},
14631 'info': {'$ref': '#/definitions/ErrorInfo'},
14632 'message': {'type': 'string'}},
14633 'required': ['message', 'code'],
14634 'type': 'object'},
14635 'ErrorInfo': {'additionalProperties': False,
14636 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14637 'macaroon-path': {'type': 'string'}},
14638 'type': 'object'},
14639 'ErrorResult': {'additionalProperties': False,
14640 'properties': {'error': {'$ref': '#/definitions/Error'}},
14641 'type': 'object'},
14642 'ErrorResults': {'additionalProperties': False,
14643 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14644 'type': 'array'}},
14645 'required': ['results'],
14646 'type': 'object'},
14647 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14648 'MeterStatusParam': {'additionalProperties': False,
14649 'properties': {'code': {'type': 'string'},
14650 'info': {'type': 'string'},
14651 'tag': {'type': 'string'}},
14652 'required': ['tag', 'code', 'info'],
14653 'type': 'object'},
14654 'MeterStatusParams': {'additionalProperties': False,
14655 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
14656 'type': 'array'}},
14657 'required': ['statues'],
14658 'type': 'object'},
14659 'MetricResult': {'additionalProperties': False,
14660 'properties': {'key': {'type': 'string'},
14661 'time': {'format': 'date-time',
14662 'type': 'string'},
14663 'unit': {'type': 'string'},
14664 'value': {'type': 'string'}},
14665 'required': ['time', 'key', 'value', 'unit'],
14666 'type': 'object'},
14667 'MetricResults': {'additionalProperties': False,
14668 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
14669 'type': 'array'}},
14670 'required': ['results'],
14671 'type': 'object'}},
14672 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14673 'Result': {'$ref': '#/definitions/MetricResults'}},
14674 'type': 'object'},
14675 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
14676 'Result': {'$ref': '#/definitions/ErrorResults'}},
14677 'type': 'object'}},
14678 'type': 'object'}
14679
14680
14681 @ReturnMapping(MetricResults)
14682 async def GetMetrics(self, entities):
14683 '''
14684 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14685 Returns -> typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
14686 '''
14687 # map input types to rpc msg
14688 _params = dict()
14689 msg = dict(type='MetricsDebug', request='GetMetrics', version=2, params=_params)
14690 _params['entities'] = entities
14691 reply = await self.rpc(msg)
14692 return reply
14693
14694
14695
14696 @ReturnMapping(ErrorResults)
14697 async def SetMeterStatus(self, statues):
14698 '''
14699 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
14700 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14701 '''
14702 # map input types to rpc msg
14703 _params = dict()
14704 msg = dict(type='MetricsDebug', request='SetMeterStatus', version=2, params=_params)
14705 _params['statues'] = statues
14706 reply = await self.rpc(msg)
14707 return reply
14708
14709
14710 class MetricsManagerFacade(Type):
14711 name = 'MetricsManager'
14712 version = 1
14713 schema = {'definitions': {'Entities': {'additionalProperties': False,
14714 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14715 'type': 'array'}},
14716 'required': ['entities'],
14717 'type': 'object'},
14718 'Entity': {'additionalProperties': False,
14719 'properties': {'tag': {'type': 'string'}},
14720 'required': ['tag'],
14721 'type': 'object'},
14722 'Error': {'additionalProperties': False,
14723 'properties': {'code': {'type': 'string'},
14724 'info': {'$ref': '#/definitions/ErrorInfo'},
14725 'message': {'type': 'string'}},
14726 'required': ['message', 'code'],
14727 'type': 'object'},
14728 'ErrorInfo': {'additionalProperties': False,
14729 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14730 'macaroon-path': {'type': 'string'}},
14731 'type': 'object'},
14732 'ErrorResult': {'additionalProperties': False,
14733 'properties': {'error': {'$ref': '#/definitions/Error'}},
14734 'type': 'object'},
14735 'ErrorResults': {'additionalProperties': False,
14736 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14737 'type': 'array'}},
14738 'required': ['results'],
14739 'type': 'object'},
14740 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
14741 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14742 'Result': {'$ref': '#/definitions/ErrorResults'}},
14743 'type': 'object'},
14744 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14745 'Result': {'$ref': '#/definitions/ErrorResults'}},
14746 'type': 'object'}},
14747 'type': 'object'}
14748
14749
14750 @ReturnMapping(ErrorResults)
14751 async def CleanupOldMetrics(self, entities):
14752 '''
14753 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14754 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14755 '''
14756 # map input types to rpc msg
14757 _params = dict()
14758 msg = dict(type='MetricsManager', request='CleanupOldMetrics', version=1, params=_params)
14759 _params['entities'] = entities
14760 reply = await self.rpc(msg)
14761 return reply
14762
14763
14764
14765 @ReturnMapping(ErrorResults)
14766 async def SendMetrics(self, entities):
14767 '''
14768 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14769 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14770 '''
14771 # map input types to rpc msg
14772 _params = dict()
14773 msg = dict(type='MetricsManager', request='SendMetrics', version=1, params=_params)
14774 _params['entities'] = entities
14775 reply = await self.rpc(msg)
14776 return reply
14777
14778
14779 class MigrationFlagFacade(Type):
14780 name = 'MigrationFlag'
14781 version = 1
14782 schema = {'definitions': {'Entities': {'additionalProperties': False,
14783 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14784 'type': 'array'}},
14785 'required': ['entities'],
14786 'type': 'object'},
14787 'Entity': {'additionalProperties': False,
14788 'properties': {'tag': {'type': 'string'}},
14789 'required': ['tag'],
14790 'type': 'object'},
14791 'Error': {'additionalProperties': False,
14792 'properties': {'code': {'type': 'string'},
14793 'info': {'$ref': '#/definitions/ErrorInfo'},
14794 'message': {'type': 'string'}},
14795 'required': ['message', 'code'],
14796 'type': 'object'},
14797 'ErrorInfo': {'additionalProperties': False,
14798 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14799 'macaroon-path': {'type': 'string'}},
14800 'type': 'object'},
14801 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14802 'NotifyWatchResult': {'additionalProperties': False,
14803 'properties': {'NotifyWatcherId': {'type': 'string'},
14804 'error': {'$ref': '#/definitions/Error'}},
14805 'required': ['NotifyWatcherId'],
14806 'type': 'object'},
14807 'NotifyWatchResults': {'additionalProperties': False,
14808 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14809 'type': 'array'}},
14810 'required': ['results'],
14811 'type': 'object'},
14812 'PhaseResult': {'additionalProperties': False,
14813 'properties': {'error': {'$ref': '#/definitions/Error'},
14814 'phase': {'type': 'string'}},
14815 'type': 'object'},
14816 'PhaseResults': {'additionalProperties': False,
14817 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
14818 'type': 'array'}},
14819 'required': ['results'],
14820 'type': 'object'}},
14821 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14822 'Result': {'$ref': '#/definitions/PhaseResults'}},
14823 'type': 'object'},
14824 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14825 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14826 'type': 'object'}},
14827 'type': 'object'}
14828
14829
14830 @ReturnMapping(PhaseResults)
14831 async def Phase(self, entities):
14832 '''
14833 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14834 Returns -> typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
14835 '''
14836 # map input types to rpc msg
14837 _params = dict()
14838 msg = dict(type='MigrationFlag', request='Phase', version=1, params=_params)
14839 _params['entities'] = entities
14840 reply = await self.rpc(msg)
14841 return reply
14842
14843
14844
14845 @ReturnMapping(NotifyWatchResults)
14846 async def Watch(self, entities):
14847 '''
14848 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14849 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
14850 '''
14851 # map input types to rpc msg
14852 _params = dict()
14853 msg = dict(type='MigrationFlag', request='Watch', version=1, params=_params)
14854 _params['entities'] = entities
14855 reply = await self.rpc(msg)
14856 return reply
14857
14858
14859 class MigrationMasterFacade(Type):
14860 name = 'MigrationMaster'
14861 version = 1
14862 schema = {'definitions': {'Error': {'additionalProperties': False,
14863 'properties': {'code': {'type': 'string'},
14864 'info': {'$ref': '#/definitions/ErrorInfo'},
14865 'message': {'type': 'string'}},
14866 'required': ['message', 'code'],
14867 'type': 'object'},
14868 'ErrorInfo': {'additionalProperties': False,
14869 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14870 'macaroon-path': {'type': 'string'}},
14871 'type': 'object'},
14872 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14873 'MasterMigrationStatus': {'additionalProperties': False,
14874 'properties': {'migration-id': {'type': 'string'},
14875 'phase': {'type': 'string'},
14876 'phase-changed-time': {'format': 'date-time',
14877 'type': 'string'},
14878 'spec': {'$ref': '#/definitions/MigrationSpec'}},
14879 'required': ['spec',
14880 'migration-id',
14881 'phase',
14882 'phase-changed-time'],
14883 'type': 'object'},
14884 'MigrationModelInfo': {'additionalProperties': False,
14885 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
14886 'controller-agent-version': {'$ref': '#/definitions/Number'},
14887 'name': {'type': 'string'},
14888 'owner-tag': {'type': 'string'},
14889 'uuid': {'type': 'string'}},
14890 'required': ['uuid',
14891 'name',
14892 'owner-tag',
14893 'agent-version',
14894 'controller-agent-version'],
14895 'type': 'object'},
14896 'MigrationSpec': {'additionalProperties': False,
14897 'properties': {'external-control': {'type': 'boolean'},
14898 'model-tag': {'type': 'string'},
14899 'skip-initial-prechecks': {'type': 'boolean'},
14900 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
14901 'required': ['model-tag',
14902 'target-info',
14903 'external-control',
14904 'skip-initial-prechecks'],
14905 'type': 'object'},
14906 'MigrationTargetInfo': {'additionalProperties': False,
14907 'properties': {'addrs': {'items': {'type': 'string'},
14908 'type': 'array'},
14909 'auth-tag': {'type': 'string'},
14910 'ca-cert': {'type': 'string'},
14911 'controller-tag': {'type': 'string'},
14912 'macaroons': {'type': 'string'},
14913 'password': {'type': 'string'}},
14914 'required': ['controller-tag',
14915 'addrs',
14916 'ca-cert',
14917 'auth-tag'],
14918 'type': 'object'},
14919 'MinionReports': {'additionalProperties': False,
14920 'properties': {'failed': {'items': {'type': 'string'},
14921 'type': 'array'},
14922 'migration-id': {'type': 'string'},
14923 'phase': {'type': 'string'},
14924 'success-count': {'type': 'integer'},
14925 'unknown-count': {'type': 'integer'},
14926 'unknown-sample': {'items': {'type': 'string'},
14927 'type': 'array'}},
14928 'required': ['migration-id',
14929 'phase',
14930 'success-count',
14931 'unknown-count',
14932 'unknown-sample',
14933 'failed'],
14934 'type': 'object'},
14935 'NotifyWatchResult': {'additionalProperties': False,
14936 'properties': {'NotifyWatcherId': {'type': 'string'},
14937 'error': {'$ref': '#/definitions/Error'}},
14938 'required': ['NotifyWatcherId'],
14939 'type': 'object'},
14940 'Number': {'additionalProperties': False,
14941 'properties': {'Build': {'type': 'integer'},
14942 'Major': {'type': 'integer'},
14943 'Minor': {'type': 'integer'},
14944 'Patch': {'type': 'integer'},
14945 'Tag': {'type': 'string'}},
14946 'required': ['Major',
14947 'Minor',
14948 'Tag',
14949 'Patch',
14950 'Build'],
14951 'type': 'object'},
14952 'SerializedModel': {'additionalProperties': False,
14953 'properties': {'bytes': {'items': {'type': 'integer'},
14954 'type': 'array'},
14955 'charms': {'items': {'type': 'string'},
14956 'type': 'array'},
14957 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
14958 'type': 'array'},
14959 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
14960 'type': 'array'}},
14961 'required': ['bytes',
14962 'charms',
14963 'tools',
14964 'resources'],
14965 'type': 'object'},
14966 'SerializedModelResource': {'additionalProperties': False,
14967 'properties': {'application': {'type': 'string'},
14968 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
14969 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
14970 'name': {'type': 'string'},
14971 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}},
14972 'type': 'object'}},
14973 'required': ['application',
14974 'name',
14975 'application-revision',
14976 'charmstore-revision',
14977 'unit-revisions'],
14978 'type': 'object'},
14979 'SerializedModelResourceRevision': {'additionalProperties': False,
14980 'properties': {'description': {'type': 'string'},
14981 'fingerprint': {'type': 'string'},
14982 'origin': {'type': 'string'},
14983 'path': {'type': 'string'},
14984 'revision': {'type': 'integer'},
14985 'size': {'type': 'integer'},
14986 'timestamp': {'format': 'date-time',
14987 'type': 'string'},
14988 'type': {'type': 'string'},
14989 'username': {'type': 'string'}},
14990 'required': ['revision',
14991 'type',
14992 'path',
14993 'description',
14994 'origin',
14995 'fingerprint',
14996 'size',
14997 'timestamp'],
14998 'type': 'object'},
14999 'SerializedModelTools': {'additionalProperties': False,
15000 'properties': {'uri': {'type': 'string'},
15001 'version': {'type': 'string'}},
15002 'required': ['version', 'uri'],
15003 'type': 'object'},
15004 'SetMigrationPhaseArgs': {'additionalProperties': False,
15005 'properties': {'phase': {'type': 'string'}},
15006 'required': ['phase'],
15007 'type': 'object'},
15008 'SetMigrationStatusMessageArgs': {'additionalProperties': False,
15009 'properties': {'message': {'type': 'string'}},
15010 'required': ['message'],
15011 'type': 'object'}},
15012 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
15013 'type': 'object'},
15014 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}},
15015 'type': 'object'},
15016 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}},
15017 'type': 'object'},
15018 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}},
15019 'type': 'object'},
15020 'Prechecks': {'type': 'object'},
15021 'Reap': {'type': 'object'},
15022 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
15023 'type': 'object'},
15024 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
15025 'type': 'object'},
15026 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15027 'type': 'object'},
15028 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15029 'type': 'object'}},
15030 'type': 'object'}
15031
15032
15033 @ReturnMapping(SerializedModel)
15034 async def Export(self):
15035 '''
15036
15037 Returns -> typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
15038 '''
15039 # map input types to rpc msg
15040 _params = dict()
15041 msg = dict(type='MigrationMaster', request='Export', version=1, params=_params)
15042
15043 reply = await self.rpc(msg)
15044 return reply
15045
15046
15047
15048 @ReturnMapping(MasterMigrationStatus)
15049 async def MigrationStatus(self):
15050 '''
15051
15052 Returns -> typing.Union[str, _ForwardRef('MigrationSpec')]
15053 '''
15054 # map input types to rpc msg
15055 _params = dict()
15056 msg = dict(type='MigrationMaster', request='MigrationStatus', version=1, params=_params)
15057
15058 reply = await self.rpc(msg)
15059 return reply
15060
15061
15062
15063 @ReturnMapping(MinionReports)
15064 async def MinionReports(self):
15065 '''
15066
15067 Returns -> typing.Union[typing.Sequence<+T_co>[str], int]
15068 '''
15069 # map input types to rpc msg
15070 _params = dict()
15071 msg = dict(type='MigrationMaster', request='MinionReports', version=1, params=_params)
15072
15073 reply = await self.rpc(msg)
15074 return reply
15075
15076
15077
15078 @ReturnMapping(MigrationModelInfo)
15079 async def ModelInfo(self):
15080 '''
15081
15082 Returns -> typing.Union[_ForwardRef('Number'), _ForwardRef('Number'), str]
15083 '''
15084 # map input types to rpc msg
15085 _params = dict()
15086 msg = dict(type='MigrationMaster', request='ModelInfo', version=1, params=_params)
15087
15088 reply = await self.rpc(msg)
15089 return reply
15090
15091
15092
15093 @ReturnMapping(None)
15094 async def Prechecks(self):
15095 '''
15096
15097 Returns -> None
15098 '''
15099 # map input types to rpc msg
15100 _params = dict()
15101 msg = dict(type='MigrationMaster', request='Prechecks', version=1, params=_params)
15102
15103 reply = await self.rpc(msg)
15104 return reply
15105
15106
15107
15108 @ReturnMapping(None)
15109 async def Reap(self):
15110 '''
15111
15112 Returns -> None
15113 '''
15114 # map input types to rpc msg
15115 _params = dict()
15116 msg = dict(type='MigrationMaster', request='Reap', version=1, params=_params)
15117
15118 reply = await self.rpc(msg)
15119 return reply
15120
15121
15122
15123 @ReturnMapping(None)
15124 async def SetPhase(self, phase):
15125 '''
15126 phase : str
15127 Returns -> None
15128 '''
15129 # map input types to rpc msg
15130 _params = dict()
15131 msg = dict(type='MigrationMaster', request='SetPhase', version=1, params=_params)
15132 _params['phase'] = phase
15133 reply = await self.rpc(msg)
15134 return reply
15135
15136
15137
15138 @ReturnMapping(None)
15139 async def SetStatusMessage(self, message):
15140 '''
15141 message : str
15142 Returns -> None
15143 '''
15144 # map input types to rpc msg
15145 _params = dict()
15146 msg = dict(type='MigrationMaster', request='SetStatusMessage', version=1, params=_params)
15147 _params['message'] = message
15148 reply = await self.rpc(msg)
15149 return reply
15150
15151
15152
15153 @ReturnMapping(NotifyWatchResult)
15154 async def Watch(self):
15155 '''
15156
15157 Returns -> typing.Union[str, _ForwardRef('Error')]
15158 '''
15159 # map input types to rpc msg
15160 _params = dict()
15161 msg = dict(type='MigrationMaster', request='Watch', version=1, params=_params)
15162
15163 reply = await self.rpc(msg)
15164 return reply
15165
15166
15167
15168 @ReturnMapping(NotifyWatchResult)
15169 async def WatchMinionReports(self):
15170 '''
15171
15172 Returns -> typing.Union[str, _ForwardRef('Error')]
15173 '''
15174 # map input types to rpc msg
15175 _params = dict()
15176 msg = dict(type='MigrationMaster', request='WatchMinionReports', version=1, params=_params)
15177
15178 reply = await self.rpc(msg)
15179 return reply
15180
15181
15182 class MigrationMinionFacade(Type):
15183 name = 'MigrationMinion'
15184 version = 1
15185 schema = {'definitions': {'Error': {'additionalProperties': False,
15186 'properties': {'code': {'type': 'string'},
15187 'info': {'$ref': '#/definitions/ErrorInfo'},
15188 'message': {'type': 'string'}},
15189 'required': ['message', 'code'],
15190 'type': 'object'},
15191 'ErrorInfo': {'additionalProperties': False,
15192 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15193 'macaroon-path': {'type': 'string'}},
15194 'type': 'object'},
15195 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15196 'MinionReport': {'additionalProperties': False,
15197 'properties': {'migration-id': {'type': 'string'},
15198 'phase': {'type': 'string'},
15199 'success': {'type': 'boolean'}},
15200 'required': ['migration-id',
15201 'phase',
15202 'success'],
15203 'type': 'object'},
15204 'NotifyWatchResult': {'additionalProperties': False,
15205 'properties': {'NotifyWatcherId': {'type': 'string'},
15206 'error': {'$ref': '#/definitions/Error'}},
15207 'required': ['NotifyWatcherId'],
15208 'type': 'object'}},
15209 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}},
15210 'type': 'object'},
15211 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15212 'type': 'object'}},
15213 'type': 'object'}
15214
15215
15216 @ReturnMapping(None)
15217 async def Report(self, migration_id, phase, success):
15218 '''
15219 migration_id : str
15220 phase : str
15221 success : bool
15222 Returns -> None
15223 '''
15224 # map input types to rpc msg
15225 _params = dict()
15226 msg = dict(type='MigrationMinion', request='Report', version=1, params=_params)
15227 _params['migration-id'] = migration_id
15228 _params['phase'] = phase
15229 _params['success'] = success
15230 reply = await self.rpc(msg)
15231 return reply
15232
15233
15234
15235 @ReturnMapping(NotifyWatchResult)
15236 async def Watch(self):
15237 '''
15238
15239 Returns -> typing.Union[str, _ForwardRef('Error')]
15240 '''
15241 # map input types to rpc msg
15242 _params = dict()
15243 msg = dict(type='MigrationMinion', request='Watch', version=1, params=_params)
15244
15245 reply = await self.rpc(msg)
15246 return reply
15247
15248
15249 class MigrationStatusWatcherFacade(Type):
15250 name = 'MigrationStatusWatcher'
15251 version = 1
15252 schema = {'definitions': {'MigrationStatus': {'additionalProperties': False,
15253 'properties': {'attempt': {'type': 'integer'},
15254 'external-control': {'type': 'boolean'},
15255 'migration-id': {'type': 'string'},
15256 'phase': {'type': 'string'},
15257 'source-api-addrs': {'items': {'type': 'string'},
15258 'type': 'array'},
15259 'source-ca-cert': {'type': 'string'},
15260 'target-api-addrs': {'items': {'type': 'string'},
15261 'type': 'array'},
15262 'target-ca-cert': {'type': 'string'}},
15263 'required': ['migration-id',
15264 'attempt',
15265 'phase',
15266 'external-control',
15267 'source-api-addrs',
15268 'source-ca-cert',
15269 'target-api-addrs',
15270 'target-ca-cert'],
15271 'type': 'object'}},
15272 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
15273 'type': 'object'},
15274 'Stop': {'type': 'object'}},
15275 'type': 'object'}
15276
15277
15278 @ReturnMapping(MigrationStatus)
15279 async def Next(self):
15280 '''
15281
15282 Returns -> typing.Union[int, typing.Sequence<+T_co>[str]]
15283 '''
15284 # map input types to rpc msg
15285 _params = dict()
15286 msg = dict(type='MigrationStatusWatcher', request='Next', version=1, params=_params)
15287
15288 reply = await self.rpc(msg)
15289 return reply
15290
15291
15292
15293 @ReturnMapping(None)
15294 async def Stop(self):
15295 '''
15296
15297 Returns -> None
15298 '''
15299 # map input types to rpc msg
15300 _params = dict()
15301 msg = dict(type='MigrationStatusWatcher', request='Stop', version=1, params=_params)
15302
15303 reply = await self.rpc(msg)
15304 return reply
15305
15306
15307 class MigrationTargetFacade(Type):
15308 name = 'MigrationTarget'
15309 version = 1
15310 schema = {'definitions': {'AdoptResourcesArgs': {'additionalProperties': False,
15311 'properties': {'model-tag': {'type': 'string'},
15312 'source-controller-version': {'$ref': '#/definitions/Number'}},
15313 'required': ['model-tag',
15314 'source-controller-version'],
15315 'type': 'object'},
15316 'MigrationModelInfo': {'additionalProperties': False,
15317 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
15318 'controller-agent-version': {'$ref': '#/definitions/Number'},
15319 'name': {'type': 'string'},
15320 'owner-tag': {'type': 'string'},
15321 'uuid': {'type': 'string'}},
15322 'required': ['uuid',
15323 'name',
15324 'owner-tag',
15325 'agent-version',
15326 'controller-agent-version'],
15327 'type': 'object'},
15328 'ModelArgs': {'additionalProperties': False,
15329 'properties': {'model-tag': {'type': 'string'}},
15330 'required': ['model-tag'],
15331 'type': 'object'},
15332 'Number': {'additionalProperties': False,
15333 'properties': {'Build': {'type': 'integer'},
15334 'Major': {'type': 'integer'},
15335 'Minor': {'type': 'integer'},
15336 'Patch': {'type': 'integer'},
15337 'Tag': {'type': 'string'}},
15338 'required': ['Major',
15339 'Minor',
15340 'Tag',
15341 'Patch',
15342 'Build'],
15343 'type': 'object'},
15344 'SerializedModel': {'additionalProperties': False,
15345 'properties': {'bytes': {'items': {'type': 'integer'},
15346 'type': 'array'},
15347 'charms': {'items': {'type': 'string'},
15348 'type': 'array'},
15349 'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
15350 'type': 'array'},
15351 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
15352 'type': 'array'}},
15353 'required': ['bytes',
15354 'charms',
15355 'tools',
15356 'resources'],
15357 'type': 'object'},
15358 'SerializedModelResource': {'additionalProperties': False,
15359 'properties': {'application': {'type': 'string'},
15360 'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
15361 'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
15362 'name': {'type': 'string'},
15363 'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}},
15364 'type': 'object'}},
15365 'required': ['application',
15366 'name',
15367 'application-revision',
15368 'charmstore-revision',
15369 'unit-revisions'],
15370 'type': 'object'},
15371 'SerializedModelResourceRevision': {'additionalProperties': False,
15372 'properties': {'description': {'type': 'string'},
15373 'fingerprint': {'type': 'string'},
15374 'origin': {'type': 'string'},
15375 'path': {'type': 'string'},
15376 'revision': {'type': 'integer'},
15377 'size': {'type': 'integer'},
15378 'timestamp': {'format': 'date-time',
15379 'type': 'string'},
15380 'type': {'type': 'string'},
15381 'username': {'type': 'string'}},
15382 'required': ['revision',
15383 'type',
15384 'path',
15385 'description',
15386 'origin',
15387 'fingerprint',
15388 'size',
15389 'timestamp'],
15390 'type': 'object'},
15391 'SerializedModelTools': {'additionalProperties': False,
15392 'properties': {'uri': {'type': 'string'},
15393 'version': {'type': 'string'}},
15394 'required': ['version', 'uri'],
15395 'type': 'object'}},
15396 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
15397 'type': 'object'},
15398 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
15399 'type': 'object'},
15400 'AdoptResources': {'properties': {'Params': {'$ref': '#/definitions/AdoptResourcesArgs'}},
15401 'type': 'object'},
15402 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
15403 'type': 'object'},
15404 'LatestLogTime': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'},
15405 'Result': {'format': 'date-time',
15406 'type': 'string'}},
15407 'type': 'object'},
15408 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}},
15409 'type': 'object'}},
15410 'type': 'object'}
15411
15412
15413 @ReturnMapping(None)
15414 async def Abort(self, model_tag):
15415 '''
15416 model_tag : str
15417 Returns -> None
15418 '''
15419 # map input types to rpc msg
15420 _params = dict()
15421 msg = dict(type='MigrationTarget', request='Abort', version=1, params=_params)
15422 _params['model-tag'] = model_tag
15423 reply = await self.rpc(msg)
15424 return reply
15425
15426
15427
15428 @ReturnMapping(None)
15429 async def Activate(self, model_tag):
15430 '''
15431 model_tag : str
15432 Returns -> None
15433 '''
15434 # map input types to rpc msg
15435 _params = dict()
15436 msg = dict(type='MigrationTarget', request='Activate', version=1, params=_params)
15437 _params['model-tag'] = model_tag
15438 reply = await self.rpc(msg)
15439 return reply
15440
15441
15442
15443 @ReturnMapping(None)
15444 async def AdoptResources(self, model_tag, source_controller_version):
15445 '''
15446 model_tag : str
15447 source_controller_version : Number
15448 Returns -> None
15449 '''
15450 # map input types to rpc msg
15451 _params = dict()
15452 msg = dict(type='MigrationTarget', request='AdoptResources', version=1, params=_params)
15453 _params['model-tag'] = model_tag
15454 _params['source-controller-version'] = source_controller_version
15455 reply = await self.rpc(msg)
15456 return reply
15457
15458
15459
15460 @ReturnMapping(None)
15461 async def Import(self, bytes_, charms, resources, tools):
15462 '''
15463 bytes_ : typing.Sequence<+T_co>[int]
15464 charms : typing.Sequence<+T_co>[str]
15465 resources : typing.Sequence<+T_co>[~SerializedModelResource]<~SerializedModelResource>
15466 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
15467 Returns -> None
15468 '''
15469 # map input types to rpc msg
15470 _params = dict()
15471 msg = dict(type='MigrationTarget', request='Import', version=1, params=_params)
15472 _params['bytes'] = bytes_
15473 _params['charms'] = charms
15474 _params['resources'] = resources
15475 _params['tools'] = tools
15476 reply = await self.rpc(msg)
15477 return reply
15478
15479
15480
15481 @ReturnMapping(str)
15482 async def LatestLogTime(self, model_tag):
15483 '''
15484 model_tag : str
15485 Returns -> str
15486 '''
15487 # map input types to rpc msg
15488 _params = dict()
15489 msg = dict(type='MigrationTarget', request='LatestLogTime', version=1, params=_params)
15490 _params['model-tag'] = model_tag
15491 reply = await self.rpc(msg)
15492 return reply
15493
15494
15495
15496 @ReturnMapping(None)
15497 async def Prechecks(self, agent_version, controller_agent_version, name, owner_tag, uuid):
15498 '''
15499 agent_version : Number
15500 controller_agent_version : Number
15501 name : str
15502 owner_tag : str
15503 uuid : str
15504 Returns -> None
15505 '''
15506 # map input types to rpc msg
15507 _params = dict()
15508 msg = dict(type='MigrationTarget', request='Prechecks', version=1, params=_params)
15509 _params['agent-version'] = agent_version
15510 _params['controller-agent-version'] = controller_agent_version
15511 _params['name'] = name
15512 _params['owner-tag'] = owner_tag
15513 _params['uuid'] = uuid
15514 reply = await self.rpc(msg)
15515 return reply
15516
15517
15518 class ModelConfigFacade(Type):
15519 name = 'ModelConfig'
15520 version = 1
15521 schema = {'definitions': {'ConfigValue': {'additionalProperties': False,
15522 'properties': {'source': {'type': 'string'},
15523 'value': {'additionalProperties': True,
15524 'type': 'object'}},
15525 'required': ['value', 'source'],
15526 'type': 'object'},
15527 'ModelConfigResults': {'additionalProperties': False,
15528 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
15529 'type': 'object'}},
15530 'required': ['config'],
15531 'type': 'object'},
15532 'ModelSet': {'additionalProperties': False,
15533 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
15534 'type': 'object'}},
15535 'type': 'object'}},
15536 'required': ['config'],
15537 'type': 'object'},
15538 'ModelUnset': {'additionalProperties': False,
15539 'properties': {'keys': {'items': {'type': 'string'},
15540 'type': 'array'}},
15541 'required': ['keys'],
15542 'type': 'object'}},
15543 'properties': {'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
15544 'type': 'object'},
15545 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
15546 'type': 'object'},
15547 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
15548 'type': 'object'}},
15549 'type': 'object'}
15550
15551
15552 @ReturnMapping(ModelConfigResults)
15553 async def ModelGet(self):
15554 '''
15555
15556 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
15557 '''
15558 # map input types to rpc msg
15559 _params = dict()
15560 msg = dict(type='ModelConfig', request='ModelGet', version=1, params=_params)
15561
15562 reply = await self.rpc(msg)
15563 return reply
15564
15565
15566
15567 @ReturnMapping(None)
15568 async def ModelSet(self, config):
15569 '''
15570 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
15571 Returns -> None
15572 '''
15573 # map input types to rpc msg
15574 _params = dict()
15575 msg = dict(type='ModelConfig', request='ModelSet', version=1, params=_params)
15576 _params['config'] = config
15577 reply = await self.rpc(msg)
15578 return reply
15579
15580
15581
15582 @ReturnMapping(None)
15583 async def ModelUnset(self, keys):
15584 '''
15585 keys : typing.Sequence<+T_co>[str]
15586 Returns -> None
15587 '''
15588 # map input types to rpc msg
15589 _params = dict()
15590 msg = dict(type='ModelConfig', request='ModelUnset', version=1, params=_params)
15591 _params['keys'] = keys
15592 reply = await self.rpc(msg)
15593 return reply
15594
15595
15596 class ModelManagerFacade(Type):
15597 name = 'ModelManager'
15598 version = 2
15599 schema = {'definitions': {'Entities': {'additionalProperties': False,
15600 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15601 'type': 'array'}},
15602 'required': ['entities'],
15603 'type': 'object'},
15604 'Entity': {'additionalProperties': False,
15605 'properties': {'tag': {'type': 'string'}},
15606 'required': ['tag'],
15607 'type': 'object'},
15608 'EntityStatus': {'additionalProperties': False,
15609 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15610 'type': 'object'}},
15611 'type': 'object'},
15612 'info': {'type': 'string'},
15613 'since': {'format': 'date-time',
15614 'type': 'string'},
15615 'status': {'type': 'string'}},
15616 'required': ['status', 'info', 'since'],
15617 'type': 'object'},
15618 'Error': {'additionalProperties': False,
15619 'properties': {'code': {'type': 'string'},
15620 'info': {'$ref': '#/definitions/ErrorInfo'},
15621 'message': {'type': 'string'}},
15622 'required': ['message', 'code'],
15623 'type': 'object'},
15624 'ErrorInfo': {'additionalProperties': False,
15625 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15626 'macaroon-path': {'type': 'string'}},
15627 'type': 'object'},
15628 'ErrorResult': {'additionalProperties': False,
15629 'properties': {'error': {'$ref': '#/definitions/Error'}},
15630 'type': 'object'},
15631 'ErrorResults': {'additionalProperties': False,
15632 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15633 'type': 'array'}},
15634 'required': ['results'],
15635 'type': 'object'},
15636 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15637 'MachineHardware': {'additionalProperties': False,
15638 'properties': {'arch': {'type': 'string'},
15639 'availability-zone': {'type': 'string'},
15640 'cores': {'type': 'integer'},
15641 'cpu-power': {'type': 'integer'},
15642 'mem': {'type': 'integer'},
15643 'root-disk': {'type': 'integer'},
15644 'tags': {'items': {'type': 'string'},
15645 'type': 'array'}},
15646 'type': 'object'},
15647 'MapResult': {'additionalProperties': False,
15648 'properties': {'error': {'$ref': '#/definitions/Error'},
15649 'result': {'patternProperties': {'.*': {'additionalProperties': True,
15650 'type': 'object'}},
15651 'type': 'object'}},
15652 'required': ['result'],
15653 'type': 'object'},
15654 'MapResults': {'additionalProperties': False,
15655 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
15656 'type': 'array'}},
15657 'required': ['results'],
15658 'type': 'object'},
15659 'Model': {'additionalProperties': False,
15660 'properties': {'name': {'type': 'string'},
15661 'owner-tag': {'type': 'string'},
15662 'uuid': {'type': 'string'}},
15663 'required': ['name', 'uuid', 'owner-tag'],
15664 'type': 'object'},
15665 'ModelCreateArgs': {'additionalProperties': False,
15666 'properties': {'cloud-tag': {'type': 'string'},
15667 'config': {'patternProperties': {'.*': {'additionalProperties': True,
15668 'type': 'object'}},
15669 'type': 'object'},
15670 'credential': {'type': 'string'},
15671 'name': {'type': 'string'},
15672 'owner-tag': {'type': 'string'},
15673 'region': {'type': 'string'}},
15674 'required': ['name', 'owner-tag'],
15675 'type': 'object'},
15676 'ModelDefaultValues': {'additionalProperties': False,
15677 'properties': {'cloud-region': {'type': 'string'},
15678 'cloud-tag': {'type': 'string'},
15679 'config': {'patternProperties': {'.*': {'additionalProperties': True,
15680 'type': 'object'}},
15681 'type': 'object'}},
15682 'required': ['config'],
15683 'type': 'object'},
15684 'ModelDefaults': {'additionalProperties': False,
15685 'properties': {'controller': {'additionalProperties': True,
15686 'type': 'object'},
15687 'default': {'additionalProperties': True,
15688 'type': 'object'},
15689 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
15690 'type': 'array'}},
15691 'type': 'object'},
15692 'ModelDefaultsResult': {'additionalProperties': False,
15693 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
15694 'type': 'object'}},
15695 'required': ['config'],
15696 'type': 'object'},
15697 'ModelInfo': {'additionalProperties': False,
15698 'properties': {'cloud-credential-tag': {'type': 'string'},
15699 'cloud-region': {'type': 'string'},
15700 'cloud-tag': {'type': 'string'},
15701 'controller-uuid': {'type': 'string'},
15702 'default-series': {'type': 'string'},
15703 'life': {'type': 'string'},
15704 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
15705 'type': 'array'},
15706 'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
15707 'name': {'type': 'string'},
15708 'owner-tag': {'type': 'string'},
15709 'provider-type': {'type': 'string'},
15710 'status': {'$ref': '#/definitions/EntityStatus'},
15711 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
15712 'type': 'array'},
15713 'uuid': {'type': 'string'}},
15714 'required': ['name',
15715 'uuid',
15716 'controller-uuid',
15717 'provider-type',
15718 'default-series',
15719 'cloud-tag',
15720 'owner-tag',
15721 'life',
15722 'status',
15723 'users',
15724 'machines'],
15725 'type': 'object'},
15726 'ModelInfoResult': {'additionalProperties': False,
15727 'properties': {'error': {'$ref': '#/definitions/Error'},
15728 'result': {'$ref': '#/definitions/ModelInfo'}},
15729 'type': 'object'},
15730 'ModelInfoResults': {'additionalProperties': False,
15731 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
15732 'type': 'array'}},
15733 'required': ['results'],
15734 'type': 'object'},
15735 'ModelMachineInfo': {'additionalProperties': False,
15736 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
15737 'has-vote': {'type': 'boolean'},
15738 'id': {'type': 'string'},
15739 'instance-id': {'type': 'string'},
15740 'status': {'type': 'string'},
15741 'wants-vote': {'type': 'boolean'}},
15742 'required': ['id'],
15743 'type': 'object'},
15744 'ModelMigrationStatus': {'additionalProperties': False,
15745 'properties': {'end': {'format': 'date-time',
15746 'type': 'string'},
15747 'start': {'format': 'date-time',
15748 'type': 'string'},
15749 'status': {'type': 'string'}},
15750 'required': ['status', 'start'],
15751 'type': 'object'},
15752 'ModelStatus': {'additionalProperties': False,
15753 'properties': {'application-count': {'type': 'integer'},
15754 'hosted-machine-count': {'type': 'integer'},
15755 'life': {'type': 'string'},
15756 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
15757 'type': 'array'},
15758 'model-tag': {'type': 'string'},
15759 'owner-tag': {'type': 'string'}},
15760 'required': ['model-tag',
15761 'life',
15762 'hosted-machine-count',
15763 'application-count',
15764 'owner-tag'],
15765 'type': 'object'},
15766 'ModelStatusResults': {'additionalProperties': False,
15767 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
15768 'type': 'array'}},
15769 'required': ['models'],
15770 'type': 'object'},
15771 'ModelUnsetKeys': {'additionalProperties': False,
15772 'properties': {'cloud-region': {'type': 'string'},
15773 'cloud-tag': {'type': 'string'},
15774 'keys': {'items': {'type': 'string'},
15775 'type': 'array'}},
15776 'required': ['keys'],
15777 'type': 'object'},
15778 'ModelUserInfo': {'additionalProperties': False,
15779 'properties': {'access': {'type': 'string'},
15780 'display-name': {'type': 'string'},
15781 'last-connection': {'format': 'date-time',
15782 'type': 'string'},
15783 'user': {'type': 'string'}},
15784 'required': ['user',
15785 'display-name',
15786 'last-connection',
15787 'access'],
15788 'type': 'object'},
15789 'ModifyModelAccess': {'additionalProperties': False,
15790 'properties': {'access': {'type': 'string'},
15791 'action': {'type': 'string'},
15792 'model-tag': {'type': 'string'},
15793 'user-tag': {'type': 'string'}},
15794 'required': ['user-tag',
15795 'action',
15796 'access',
15797 'model-tag'],
15798 'type': 'object'},
15799 'ModifyModelAccessRequest': {'additionalProperties': False,
15800 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
15801 'type': 'array'}},
15802 'required': ['changes'],
15803 'type': 'object'},
15804 'RegionDefaults': {'additionalProperties': False,
15805 'properties': {'region-name': {'type': 'string'},
15806 'value': {'additionalProperties': True,
15807 'type': 'object'}},
15808 'required': ['region-name', 'value'],
15809 'type': 'object'},
15810 'SetModelDefaults': {'additionalProperties': False,
15811 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
15812 'type': 'array'}},
15813 'required': ['config'],
15814 'type': 'object'},
15815 'UnsetModelDefaults': {'additionalProperties': False,
15816 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
15817 'type': 'array'}},
15818 'required': ['keys'],
15819 'type': 'object'},
15820 'UserModel': {'additionalProperties': False,
15821 'properties': {'last-connection': {'format': 'date-time',
15822 'type': 'string'},
15823 'model': {'$ref': '#/definitions/Model'}},
15824 'required': ['model', 'last-connection'],
15825 'type': 'object'},
15826 'UserModelList': {'additionalProperties': False,
15827 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
15828 'type': 'array'}},
15829 'required': ['user-models'],
15830 'type': 'object'}},
15831 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
15832 'Result': {'$ref': '#/definitions/ModelInfo'}},
15833 'type': 'object'},
15834 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15835 'Result': {'$ref': '#/definitions/ErrorResults'}},
15836 'type': 'object'},
15837 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15838 'Result': {'$ref': '#/definitions/MapResults'}},
15839 'type': 'object'},
15840 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15841 'Result': {'$ref': '#/definitions/MapResults'}},
15842 'type': 'object'},
15843 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
15844 'Result': {'$ref': '#/definitions/UserModelList'}},
15845 'type': 'object'},
15846 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
15847 'type': 'object'},
15848 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15849 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
15850 'type': 'object'},
15851 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15852 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
15853 'type': 'object'},
15854 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
15855 'Result': {'$ref': '#/definitions/ErrorResults'}},
15856 'type': 'object'},
15857 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
15858 'Result': {'$ref': '#/definitions/ErrorResults'}},
15859 'type': 'object'},
15860 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
15861 'Result': {'$ref': '#/definitions/ErrorResults'}},
15862 'type': 'object'}},
15863 'type': 'object'}
15864
15865
15866 @ReturnMapping(ModelInfo)
15867 async def CreateModel(self, cloud_tag, config, credential, name, owner_tag, region):
15868 '''
15869 cloud_tag : str
15870 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
15871 credential : str
15872 name : str
15873 owner_tag : str
15874 region : str
15875 Returns -> typing.Union[_ForwardRef('ModelMigrationStatus'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
15876 '''
15877 # map input types to rpc msg
15878 _params = dict()
15879 msg = dict(type='ModelManager', request='CreateModel', version=2, params=_params)
15880 _params['cloud-tag'] = cloud_tag
15881 _params['config'] = config
15882 _params['credential'] = credential
15883 _params['name'] = name
15884 _params['owner-tag'] = owner_tag
15885 _params['region'] = region
15886 reply = await self.rpc(msg)
15887 return reply
15888
15889
15890
15891 @ReturnMapping(ErrorResults)
15892 async def DestroyModels(self, entities):
15893 '''
15894 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15895 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15896 '''
15897 # map input types to rpc msg
15898 _params = dict()
15899 msg = dict(type='ModelManager', request='DestroyModels', version=2, params=_params)
15900 _params['entities'] = entities
15901 reply = await self.rpc(msg)
15902 return reply
15903
15904
15905
15906 @ReturnMapping(MapResults)
15907 async def DumpModels(self, entities):
15908 '''
15909 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15910 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
15911 '''
15912 # map input types to rpc msg
15913 _params = dict()
15914 msg = dict(type='ModelManager', request='DumpModels', version=2, params=_params)
15915 _params['entities'] = entities
15916 reply = await self.rpc(msg)
15917 return reply
15918
15919
15920
15921 @ReturnMapping(MapResults)
15922 async def DumpModelsDB(self, entities):
15923 '''
15924 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15925 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
15926 '''
15927 # map input types to rpc msg
15928 _params = dict()
15929 msg = dict(type='ModelManager', request='DumpModelsDB', version=2, params=_params)
15930 _params['entities'] = entities
15931 reply = await self.rpc(msg)
15932 return reply
15933
15934
15935
15936 @ReturnMapping(UserModelList)
15937 async def ListModels(self, tag):
15938 '''
15939 tag : str
15940 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
15941 '''
15942 # map input types to rpc msg
15943 _params = dict()
15944 msg = dict(type='ModelManager', request='ListModels', version=2, params=_params)
15945 _params['tag'] = tag
15946 reply = await self.rpc(msg)
15947 return reply
15948
15949
15950
15951 @ReturnMapping(ModelDefaultsResult)
15952 async def ModelDefaults(self):
15953 '''
15954
15955 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
15956 '''
15957 # map input types to rpc msg
15958 _params = dict()
15959 msg = dict(type='ModelManager', request='ModelDefaults', version=2, params=_params)
15960
15961 reply = await self.rpc(msg)
15962 return reply
15963
15964
15965
15966 @ReturnMapping(ModelInfoResults)
15967 async def ModelInfo(self, entities):
15968 '''
15969 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15970 Returns -> typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
15971 '''
15972 # map input types to rpc msg
15973 _params = dict()
15974 msg = dict(type='ModelManager', request='ModelInfo', version=2, params=_params)
15975 _params['entities'] = entities
15976 reply = await self.rpc(msg)
15977 return reply
15978
15979
15980
15981 @ReturnMapping(ModelStatusResults)
15982 async def ModelStatus(self, entities):
15983 '''
15984 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15985 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
15986 '''
15987 # map input types to rpc msg
15988 _params = dict()
15989 msg = dict(type='ModelManager', request='ModelStatus', version=2, params=_params)
15990 _params['entities'] = entities
15991 reply = await self.rpc(msg)
15992 return reply
15993
15994
15995
15996 @ReturnMapping(ErrorResults)
15997 async def ModifyModelAccess(self, changes):
15998 '''
15999 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
16000 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16001 '''
16002 # map input types to rpc msg
16003 _params = dict()
16004 msg = dict(type='ModelManager', request='ModifyModelAccess', version=2, params=_params)
16005 _params['changes'] = changes
16006 reply = await self.rpc(msg)
16007 return reply
16008
16009
16010
16011 @ReturnMapping(ErrorResults)
16012 async def SetModelDefaults(self, config):
16013 '''
16014 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
16015 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16016 '''
16017 # map input types to rpc msg
16018 _params = dict()
16019 msg = dict(type='ModelManager', request='SetModelDefaults', version=2, params=_params)
16020 _params['config'] = config
16021 reply = await self.rpc(msg)
16022 return reply
16023
16024
16025
16026 @ReturnMapping(ErrorResults)
16027 async def UnsetModelDefaults(self, keys):
16028 '''
16029 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
16030 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16031 '''
16032 # map input types to rpc msg
16033 _params = dict()
16034 msg = dict(type='ModelManager', request='UnsetModelDefaults', version=2, params=_params)
16035 _params['keys'] = keys
16036 reply = await self.rpc(msg)
16037 return reply
16038
16039
16040 class NotifyWatcherFacade(Type):
16041 name = 'NotifyWatcher'
16042 version = 1
16043 schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
16044 'type': 'object'}
16045
16046
16047 @ReturnMapping(None)
16048 async def Next(self):
16049 '''
16050
16051 Returns -> None
16052 '''
16053 # map input types to rpc msg
16054 _params = dict()
16055 msg = dict(type='NotifyWatcher', request='Next', version=1, params=_params)
16056
16057 reply = await self.rpc(msg)
16058 return reply
16059
16060
16061
16062 @ReturnMapping(None)
16063 async def Stop(self):
16064 '''
16065
16066 Returns -> None
16067 '''
16068 # map input types to rpc msg
16069 _params = dict()
16070 msg = dict(type='NotifyWatcher', request='Stop', version=1, params=_params)
16071
16072 reply = await self.rpc(msg)
16073 return reply
16074
16075
16076 class PayloadsFacade(Type):
16077 name = 'Payloads'
16078 version = 1
16079 schema = {'definitions': {'EnvListArgs': {'additionalProperties': False,
16080 'properties': {'patterns': {'items': {'type': 'string'},
16081 'type': 'array'}},
16082 'required': ['patterns'],
16083 'type': 'object'},
16084 'EnvListResults': {'additionalProperties': False,
16085 'properties': {'results': {'items': {'$ref': '#/definitions/Payload'},
16086 'type': 'array'}},
16087 'required': ['results'],
16088 'type': 'object'},
16089 'Payload': {'additionalProperties': False,
16090 'properties': {'class': {'type': 'string'},
16091 'id': {'type': 'string'},
16092 'labels': {'items': {'type': 'string'},
16093 'type': 'array'},
16094 'machine': {'type': 'string'},
16095 'status': {'type': 'string'},
16096 'type': {'type': 'string'},
16097 'unit': {'type': 'string'}},
16098 'required': ['class',
16099 'type',
16100 'id',
16101 'status',
16102 'labels',
16103 'unit',
16104 'machine'],
16105 'type': 'object'}},
16106 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/EnvListArgs'},
16107 'Result': {'$ref': '#/definitions/EnvListResults'}},
16108 'type': 'object'}},
16109 'type': 'object'}
16110
16111
16112 @ReturnMapping(EnvListResults)
16113 async def List(self, patterns):
16114 '''
16115 patterns : typing.Sequence<+T_co>[str]
16116 Returns -> typing.Sequence<+T_co>[~Payload]<~Payload>
16117 '''
16118 # map input types to rpc msg
16119 _params = dict()
16120 msg = dict(type='Payloads', request='List', version=1, params=_params)
16121 _params['patterns'] = patterns
16122 reply = await self.rpc(msg)
16123 return reply
16124
16125
16126 class PayloadsHookContextFacade(Type):
16127 name = 'PayloadsHookContext'
16128 version = 1
16129 schema = {'definitions': {'Entities': {'additionalProperties': False,
16130 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16131 'type': 'array'}},
16132 'required': ['entities'],
16133 'type': 'object'},
16134 'Entity': {'additionalProperties': False,
16135 'properties': {'tag': {'type': 'string'}},
16136 'required': ['tag'],
16137 'type': 'object'},
16138 'Error': {'additionalProperties': False,
16139 'properties': {'code': {'type': 'string'},
16140 'info': {'$ref': '#/definitions/ErrorInfo'},
16141 'message': {'type': 'string'}},
16142 'required': ['message', 'code'],
16143 'type': 'object'},
16144 'ErrorInfo': {'additionalProperties': False,
16145 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16146 'macaroon-path': {'type': 'string'}},
16147 'type': 'object'},
16148 'LookUpArg': {'additionalProperties': False,
16149 'properties': {'id': {'type': 'string'},
16150 'name': {'type': 'string'}},
16151 'required': ['name', 'id'],
16152 'type': 'object'},
16153 'LookUpArgs': {'additionalProperties': False,
16154 'properties': {'args': {'items': {'$ref': '#/definitions/LookUpArg'},
16155 'type': 'array'}},
16156 'required': ['args'],
16157 'type': 'object'},
16158 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16159 'Payload': {'additionalProperties': False,
16160 'properties': {'class': {'type': 'string'},
16161 'id': {'type': 'string'},
16162 'labels': {'items': {'type': 'string'},
16163 'type': 'array'},
16164 'machine': {'type': 'string'},
16165 'status': {'type': 'string'},
16166 'type': {'type': 'string'},
16167 'unit': {'type': 'string'}},
16168 'required': ['class',
16169 'type',
16170 'id',
16171 'status',
16172 'labels',
16173 'unit',
16174 'machine'],
16175 'type': 'object'},
16176 'PayloadResult': {'additionalProperties': False,
16177 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
16178 'error': {'$ref': '#/definitions/Error'},
16179 'not-found': {'type': 'boolean'},
16180 'payload': {'$ref': '#/definitions/Payload'}},
16181 'required': ['Entity',
16182 'payload',
16183 'not-found'],
16184 'type': 'object'},
16185 'PayloadResults': {'additionalProperties': False,
16186 'properties': {'results': {'items': {'$ref': '#/definitions/PayloadResult'},
16187 'type': 'array'}},
16188 'required': ['results'],
16189 'type': 'object'},
16190 'SetStatusArg': {'additionalProperties': False,
16191 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
16192 'status': {'type': 'string'}},
16193 'required': ['Entity', 'status'],
16194 'type': 'object'},
16195 'SetStatusArgs': {'additionalProperties': False,
16196 'properties': {'args': {'items': {'$ref': '#/definitions/SetStatusArg'},
16197 'type': 'array'}},
16198 'required': ['args'],
16199 'type': 'object'},
16200 'TrackArgs': {'additionalProperties': False,
16201 'properties': {'payloads': {'items': {'$ref': '#/definitions/Payload'},
16202 'type': 'array'}},
16203 'required': ['payloads'],
16204 'type': 'object'}},
16205 'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16206 'Result': {'$ref': '#/definitions/PayloadResults'}},
16207 'type': 'object'},
16208 'LookUp': {'properties': {'Params': {'$ref': '#/definitions/LookUpArgs'},
16209 'Result': {'$ref': '#/definitions/PayloadResults'}},
16210 'type': 'object'},
16211 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatusArgs'},
16212 'Result': {'$ref': '#/definitions/PayloadResults'}},
16213 'type': 'object'},
16214 'Track': {'properties': {'Params': {'$ref': '#/definitions/TrackArgs'},
16215 'Result': {'$ref': '#/definitions/PayloadResults'}},
16216 'type': 'object'},
16217 'Untrack': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16218 'Result': {'$ref': '#/definitions/PayloadResults'}},
16219 'type': 'object'}},
16220 'type': 'object'}
16221
16222
16223 @ReturnMapping(PayloadResults)
16224 async def List(self, entities):
16225 '''
16226 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16227 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
16228 '''
16229 # map input types to rpc msg
16230 _params = dict()
16231 msg = dict(type='PayloadsHookContext', request='List', version=1, params=_params)
16232 _params['entities'] = entities
16233 reply = await self.rpc(msg)
16234 return reply
16235
16236
16237
16238 @ReturnMapping(PayloadResults)
16239 async def LookUp(self, args):
16240 '''
16241 args : typing.Sequence<+T_co>[~LookUpArg]<~LookUpArg>
16242 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
16243 '''
16244 # map input types to rpc msg
16245 _params = dict()
16246 msg = dict(type='PayloadsHookContext', request='LookUp', version=1, params=_params)
16247 _params['args'] = args
16248 reply = await self.rpc(msg)
16249 return reply
16250
16251
16252
16253 @ReturnMapping(PayloadResults)
16254 async def SetStatus(self, args):
16255 '''
16256 args : typing.Sequence<+T_co>[~SetStatusArg]<~SetStatusArg>
16257 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
16258 '''
16259 # map input types to rpc msg
16260 _params = dict()
16261 msg = dict(type='PayloadsHookContext', request='SetStatus', version=1, params=_params)
16262 _params['args'] = args
16263 reply = await self.rpc(msg)
16264 return reply
16265
16266
16267
16268 @ReturnMapping(PayloadResults)
16269 async def Track(self, payloads):
16270 '''
16271 payloads : typing.Sequence<+T_co>[~Payload]<~Payload>
16272 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
16273 '''
16274 # map input types to rpc msg
16275 _params = dict()
16276 msg = dict(type='PayloadsHookContext', request='Track', version=1, params=_params)
16277 _params['payloads'] = payloads
16278 reply = await self.rpc(msg)
16279 return reply
16280
16281
16282
16283 @ReturnMapping(PayloadResults)
16284 async def Untrack(self, entities):
16285 '''
16286 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16287 Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
16288 '''
16289 # map input types to rpc msg
16290 _params = dict()
16291 msg = dict(type='PayloadsHookContext', request='Untrack', version=1, params=_params)
16292 _params['entities'] = entities
16293 reply = await self.rpc(msg)
16294 return reply
16295
16296
16297 class PingerFacade(Type):
16298 name = 'Pinger'
16299 version = 1
16300 schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
16301 'type': 'object'}
16302
16303
16304 @ReturnMapping(None)
16305 async def Ping(self):
16306 '''
16307
16308 Returns -> None
16309 '''
16310 # map input types to rpc msg
16311 _params = dict()
16312 msg = dict(type='Pinger', request='Ping', version=1, params=_params)
16313
16314 reply = await self.rpc(msg)
16315 return reply
16316
16317
16318
16319 @ReturnMapping(None)
16320 async def Stop(self):
16321 '''
16322
16323 Returns -> None
16324 '''
16325 # map input types to rpc msg
16326 _params = dict()
16327 msg = dict(type='Pinger', request='Stop', version=1, params=_params)
16328
16329 reply = await self.rpc(msg)
16330 return reply
16331
16332
16333 class ProvisionerFacade(Type):
16334 name = 'Provisioner'
16335 version = 3
16336 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
16337 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
16338 'type': 'array'},
16339 'type': 'array'}},
16340 'required': ['servers'],
16341 'type': 'object'},
16342 'Address': {'additionalProperties': False,
16343 'properties': {'scope': {'type': 'string'},
16344 'space-name': {'type': 'string'},
16345 'type': {'type': 'string'},
16346 'value': {'type': 'string'}},
16347 'required': ['value', 'type', 'scope'],
16348 'type': 'object'},
16349 'Binary': {'additionalProperties': False,
16350 'properties': {'Arch': {'type': 'string'},
16351 'Number': {'$ref': '#/definitions/Number'},
16352 'Series': {'type': 'string'}},
16353 'required': ['Number', 'Series', 'Arch'],
16354 'type': 'object'},
16355 'BytesResult': {'additionalProperties': False,
16356 'properties': {'result': {'items': {'type': 'integer'},
16357 'type': 'array'}},
16358 'required': ['result'],
16359 'type': 'object'},
16360 'CloudImageMetadata': {'additionalProperties': False,
16361 'properties': {'arch': {'type': 'string'},
16362 'image-id': {'type': 'string'},
16363 'priority': {'type': 'integer'},
16364 'region': {'type': 'string'},
16365 'root-storage-size': {'type': 'integer'},
16366 'root-storage-type': {'type': 'string'},
16367 'series': {'type': 'string'},
16368 'source': {'type': 'string'},
16369 'stream': {'type': 'string'},
16370 'version': {'type': 'string'},
16371 'virt-type': {'type': 'string'}},
16372 'required': ['image-id',
16373 'region',
16374 'version',
16375 'series',
16376 'arch',
16377 'source',
16378 'priority'],
16379 'type': 'object'},
16380 'ConstraintsResult': {'additionalProperties': False,
16381 'properties': {'constraints': {'$ref': '#/definitions/Value'},
16382 'error': {'$ref': '#/definitions/Error'}},
16383 'required': ['constraints'],
16384 'type': 'object'},
16385 'ConstraintsResults': {'additionalProperties': False,
16386 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
16387 'type': 'array'}},
16388 'required': ['results'],
16389 'type': 'object'},
16390 'ContainerConfig': {'additionalProperties': False,
16391 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
16392 'apt-mirror': {'type': 'string'},
16393 'apt-proxy': {'$ref': '#/definitions/Settings'},
16394 'authorized-keys': {'type': 'string'},
16395 'provider-type': {'type': 'string'},
16396 'proxy': {'$ref': '#/definitions/Settings'},
16397 'ssl-hostname-verification': {'type': 'boolean'}},
16398 'required': ['provider-type',
16399 'authorized-keys',
16400 'ssl-hostname-verification',
16401 'proxy',
16402 'apt-proxy',
16403 'apt-mirror',
16404 'UpdateBehavior'],
16405 'type': 'object'},
16406 'ContainerManagerConfig': {'additionalProperties': False,
16407 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
16408 'type': 'object'}},
16409 'required': ['config'],
16410 'type': 'object'},
16411 'ContainerManagerConfigParams': {'additionalProperties': False,
16412 'properties': {'type': {'type': 'string'}},
16413 'required': ['type'],
16414 'type': 'object'},
16415 'ControllerConfigResult': {'additionalProperties': False,
16416 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
16417 'type': 'object'}},
16418 'type': 'object'}},
16419 'required': ['config'],
16420 'type': 'object'},
16421 'DeviceBridgeInfo': {'additionalProperties': False,
16422 'properties': {'bridge-name': {'type': 'string'},
16423 'host-device-name': {'type': 'string'}},
16424 'required': ['host-device-name',
16425 'bridge-name'],
16426 'type': 'object'},
16427 'DistributionGroupResult': {'additionalProperties': False,
16428 'properties': {'error': {'$ref': '#/definitions/Error'},
16429 'result': {'items': {'type': 'string'},
16430 'type': 'array'}},
16431 'required': ['result'],
16432 'type': 'object'},
16433 'DistributionGroupResults': {'additionalProperties': False,
16434 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
16435 'type': 'array'}},
16436 'required': ['results'],
16437 'type': 'object'},
16438 'Entities': {'additionalProperties': False,
16439 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16440 'type': 'array'}},
16441 'required': ['entities'],
16442 'type': 'object'},
16443 'Entity': {'additionalProperties': False,
16444 'properties': {'tag': {'type': 'string'}},
16445 'required': ['tag'],
16446 'type': 'object'},
16447 'EntityPassword': {'additionalProperties': False,
16448 'properties': {'password': {'type': 'string'},
16449 'tag': {'type': 'string'}},
16450 'required': ['tag', 'password'],
16451 'type': 'object'},
16452 'EntityPasswords': {'additionalProperties': False,
16453 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
16454 'type': 'array'}},
16455 'required': ['changes'],
16456 'type': 'object'},
16457 'EntityStatusArgs': {'additionalProperties': False,
16458 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
16459 'type': 'object'}},
16460 'type': 'object'},
16461 'info': {'type': 'string'},
16462 'status': {'type': 'string'},
16463 'tag': {'type': 'string'}},
16464 'required': ['tag',
16465 'status',
16466 'info',
16467 'data'],
16468 'type': 'object'},
16469 'Error': {'additionalProperties': False,
16470 'properties': {'code': {'type': 'string'},
16471 'info': {'$ref': '#/definitions/ErrorInfo'},
16472 'message': {'type': 'string'}},
16473 'required': ['message', 'code'],
16474 'type': 'object'},
16475 'ErrorInfo': {'additionalProperties': False,
16476 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16477 'macaroon-path': {'type': 'string'}},
16478 'type': 'object'},
16479 'ErrorResult': {'additionalProperties': False,
16480 'properties': {'error': {'$ref': '#/definitions/Error'}},
16481 'type': 'object'},
16482 'ErrorResults': {'additionalProperties': False,
16483 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16484 'type': 'array'}},
16485 'required': ['results'],
16486 'type': 'object'},
16487 'FindToolsParams': {'additionalProperties': False,
16488 'properties': {'arch': {'type': 'string'},
16489 'major': {'type': 'integer'},
16490 'minor': {'type': 'integer'},
16491 'number': {'$ref': '#/definitions/Number'},
16492 'series': {'type': 'string'}},
16493 'required': ['number',
16494 'major',
16495 'minor',
16496 'arch',
16497 'series'],
16498 'type': 'object'},
16499 'FindToolsResult': {'additionalProperties': False,
16500 'properties': {'error': {'$ref': '#/definitions/Error'},
16501 'list': {'items': {'$ref': '#/definitions/Tools'},
16502 'type': 'array'}},
16503 'required': ['list'],
16504 'type': 'object'},
16505 'HardwareCharacteristics': {'additionalProperties': False,
16506 'properties': {'arch': {'type': 'string'},
16507 'availability-zone': {'type': 'string'},
16508 'cpu-cores': {'type': 'integer'},
16509 'cpu-power': {'type': 'integer'},
16510 'mem': {'type': 'integer'},
16511 'root-disk': {'type': 'integer'},
16512 'tags': {'items': {'type': 'string'},
16513 'type': 'array'}},
16514 'type': 'object'},
16515 'HostNetworkChange': {'additionalProperties': False,
16516 'properties': {'error': {'$ref': '#/definitions/Error'},
16517 'new-bridges': {'items': {'$ref': '#/definitions/DeviceBridgeInfo'},
16518 'type': 'array'},
16519 'reconfigure-delay': {'type': 'integer'}},
16520 'required': ['new-bridges',
16521 'reconfigure-delay'],
16522 'type': 'object'},
16523 'HostNetworkChangeResults': {'additionalProperties': False,
16524 'properties': {'results': {'items': {'$ref': '#/definitions/HostNetworkChange'},
16525 'type': 'array'}},
16526 'required': ['results'],
16527 'type': 'object'},
16528 'HostPort': {'additionalProperties': False,
16529 'properties': {'Address': {'$ref': '#/definitions/Address'},
16530 'port': {'type': 'integer'}},
16531 'required': ['Address', 'port'],
16532 'type': 'object'},
16533 'InstanceInfo': {'additionalProperties': False,
16534 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
16535 'instance-id': {'type': 'string'},
16536 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
16537 'type': 'array'},
16538 'nonce': {'type': 'string'},
16539 'tag': {'type': 'string'},
16540 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
16541 'type': 'object'},
16542 'volumes': {'items': {'$ref': '#/definitions/Volume'},
16543 'type': 'array'}},
16544 'required': ['tag',
16545 'instance-id',
16546 'nonce',
16547 'characteristics',
16548 'volumes',
16549 'volume-attachments',
16550 'network-config'],
16551 'type': 'object'},
16552 'InstancesInfo': {'additionalProperties': False,
16553 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
16554 'type': 'array'}},
16555 'required': ['machines'],
16556 'type': 'object'},
16557 'LifeResult': {'additionalProperties': False,
16558 'properties': {'error': {'$ref': '#/definitions/Error'},
16559 'life': {'type': 'string'}},
16560 'required': ['life'],
16561 'type': 'object'},
16562 'LifeResults': {'additionalProperties': False,
16563 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
16564 'type': 'array'}},
16565 'required': ['results'],
16566 'type': 'object'},
16567 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16568 'MachineContainers': {'additionalProperties': False,
16569 'properties': {'container-types': {'items': {'type': 'string'},
16570 'type': 'array'},
16571 'machine-tag': {'type': 'string'}},
16572 'required': ['machine-tag',
16573 'container-types'],
16574 'type': 'object'},
16575 'MachineContainersParams': {'additionalProperties': False,
16576 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
16577 'type': 'array'}},
16578 'required': ['params'],
16579 'type': 'object'},
16580 'MachineNetworkConfigResult': {'additionalProperties': False,
16581 'properties': {'error': {'$ref': '#/definitions/Error'},
16582 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
16583 'type': 'array'}},
16584 'required': ['info'],
16585 'type': 'object'},
16586 'MachineNetworkConfigResults': {'additionalProperties': False,
16587 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
16588 'type': 'array'}},
16589 'required': ['results'],
16590 'type': 'object'},
16591 'ModelConfigResult': {'additionalProperties': False,
16592 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
16593 'type': 'object'}},
16594 'type': 'object'}},
16595 'required': ['config'],
16596 'type': 'object'},
16597 'NetworkConfig': {'additionalProperties': False,
16598 'properties': {'address': {'type': 'string'},
16599 'cidr': {'type': 'string'},
16600 'config-type': {'type': 'string'},
16601 'device-index': {'type': 'integer'},
16602 'disabled': {'type': 'boolean'},
16603 'dns-search-domains': {'items': {'type': 'string'},
16604 'type': 'array'},
16605 'dns-servers': {'items': {'type': 'string'},
16606 'type': 'array'},
16607 'gateway-address': {'type': 'string'},
16608 'interface-name': {'type': 'string'},
16609 'interface-type': {'type': 'string'},
16610 'mac-address': {'type': 'string'},
16611 'mtu': {'type': 'integer'},
16612 'no-auto-start': {'type': 'boolean'},
16613 'parent-interface-name': {'type': 'string'},
16614 'provider-address-id': {'type': 'string'},
16615 'provider-id': {'type': 'string'},
16616 'provider-space-id': {'type': 'string'},
16617 'provider-subnet-id': {'type': 'string'},
16618 'provider-vlan-id': {'type': 'string'},
16619 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
16620 'type': 'array'},
16621 'vlan-tag': {'type': 'integer'}},
16622 'required': ['device-index',
16623 'mac-address',
16624 'cidr',
16625 'mtu',
16626 'provider-id',
16627 'provider-subnet-id',
16628 'provider-space-id',
16629 'provider-address-id',
16630 'provider-vlan-id',
16631 'vlan-tag',
16632 'interface-name',
16633 'parent-interface-name',
16634 'interface-type',
16635 'disabled'],
16636 'type': 'object'},
16637 'NetworkRoute': {'additionalProperties': False,
16638 'properties': {'destination-cidr': {'type': 'string'},
16639 'gateway-ip': {'type': 'string'},
16640 'metric': {'type': 'integer'}},
16641 'required': ['destination-cidr',
16642 'gateway-ip',
16643 'metric'],
16644 'type': 'object'},
16645 'NotifyWatchResult': {'additionalProperties': False,
16646 'properties': {'NotifyWatcherId': {'type': 'string'},
16647 'error': {'$ref': '#/definitions/Error'}},
16648 'required': ['NotifyWatcherId'],
16649 'type': 'object'},
16650 'Number': {'additionalProperties': False,
16651 'properties': {'Build': {'type': 'integer'},
16652 'Major': {'type': 'integer'},
16653 'Minor': {'type': 'integer'},
16654 'Patch': {'type': 'integer'},
16655 'Tag': {'type': 'string'}},
16656 'required': ['Major',
16657 'Minor',
16658 'Tag',
16659 'Patch',
16660 'Build'],
16661 'type': 'object'},
16662 'ProvisioningInfo': {'additionalProperties': False,
16663 'properties': {'constraints': {'$ref': '#/definitions/Value'},
16664 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
16665 'type': 'object'}},
16666 'type': 'object'},
16667 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
16668 'type': 'object'},
16669 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
16670 'type': 'array'},
16671 'jobs': {'items': {'type': 'string'},
16672 'type': 'array'},
16673 'placement': {'type': 'string'},
16674 'series': {'type': 'string'},
16675 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
16676 'type': 'array'}},
16677 'type': 'object'},
16678 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16679 'type': 'object'},
16680 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
16681 'type': 'array'}},
16682 'required': ['constraints',
16683 'series',
16684 'placement',
16685 'jobs'],
16686 'type': 'object'},
16687 'ProvisioningInfoResult': {'additionalProperties': False,
16688 'properties': {'error': {'$ref': '#/definitions/Error'},
16689 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
16690 'required': ['result'],
16691 'type': 'object'},
16692 'ProvisioningInfoResults': {'additionalProperties': False,
16693 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
16694 'type': 'array'}},
16695 'required': ['results'],
16696 'type': 'object'},
16697 'SetMachineNetworkConfig': {'additionalProperties': False,
16698 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
16699 'type': 'array'},
16700 'tag': {'type': 'string'}},
16701 'required': ['tag', 'config'],
16702 'type': 'object'},
16703 'SetStatus': {'additionalProperties': False,
16704 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
16705 'type': 'array'}},
16706 'required': ['entities'],
16707 'type': 'object'},
16708 'Settings': {'additionalProperties': False,
16709 'properties': {'Ftp': {'type': 'string'},
16710 'Http': {'type': 'string'},
16711 'Https': {'type': 'string'},
16712 'NoProxy': {'type': 'string'}},
16713 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
16714 'type': 'object'},
16715 'StatusResult': {'additionalProperties': False,
16716 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
16717 'type': 'object'}},
16718 'type': 'object'},
16719 'error': {'$ref': '#/definitions/Error'},
16720 'id': {'type': 'string'},
16721 'info': {'type': 'string'},
16722 'life': {'type': 'string'},
16723 'since': {'format': 'date-time',
16724 'type': 'string'},
16725 'status': {'type': 'string'}},
16726 'required': ['id',
16727 'life',
16728 'status',
16729 'info',
16730 'data',
16731 'since'],
16732 'type': 'object'},
16733 'StatusResults': {'additionalProperties': False,
16734 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
16735 'type': 'array'}},
16736 'required': ['results'],
16737 'type': 'object'},
16738 'StringResult': {'additionalProperties': False,
16739 'properties': {'error': {'$ref': '#/definitions/Error'},
16740 'result': {'type': 'string'}},
16741 'required': ['result'],
16742 'type': 'object'},
16743 'StringResults': {'additionalProperties': False,
16744 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
16745 'type': 'array'}},
16746 'required': ['results'],
16747 'type': 'object'},
16748 'StringsResult': {'additionalProperties': False,
16749 'properties': {'error': {'$ref': '#/definitions/Error'},
16750 'result': {'items': {'type': 'string'},
16751 'type': 'array'}},
16752 'type': 'object'},
16753 'StringsWatchResult': {'additionalProperties': False,
16754 'properties': {'changes': {'items': {'type': 'string'},
16755 'type': 'array'},
16756 'error': {'$ref': '#/definitions/Error'},
16757 'watcher-id': {'type': 'string'}},
16758 'required': ['watcher-id'],
16759 'type': 'object'},
16760 'StringsWatchResults': {'additionalProperties': False,
16761 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
16762 'type': 'array'}},
16763 'required': ['results'],
16764 'type': 'object'},
16765 'Tools': {'additionalProperties': False,
16766 'properties': {'sha256': {'type': 'string'},
16767 'size': {'type': 'integer'},
16768 'url': {'type': 'string'},
16769 'version': {'$ref': '#/definitions/Binary'}},
16770 'required': ['version', 'url', 'size'],
16771 'type': 'object'},
16772 'ToolsResult': {'additionalProperties': False,
16773 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
16774 'error': {'$ref': '#/definitions/Error'},
16775 'tools': {'items': {'$ref': '#/definitions/Tools'},
16776 'type': 'array'}},
16777 'required': ['tools',
16778 'disable-ssl-hostname-verification'],
16779 'type': 'object'},
16780 'ToolsResults': {'additionalProperties': False,
16781 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
16782 'type': 'array'}},
16783 'required': ['results'],
16784 'type': 'object'},
16785 'UpdateBehavior': {'additionalProperties': False,
16786 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
16787 'enable-os-upgrade': {'type': 'boolean'}},
16788 'required': ['enable-os-refresh-update',
16789 'enable-os-upgrade'],
16790 'type': 'object'},
16791 'Value': {'additionalProperties': False,
16792 'properties': {'arch': {'type': 'string'},
16793 'container': {'type': 'string'},
16794 'cores': {'type': 'integer'},
16795 'cpu-power': {'type': 'integer'},
16796 'instance-type': {'type': 'string'},
16797 'mem': {'type': 'integer'},
16798 'root-disk': {'type': 'integer'},
16799 'spaces': {'items': {'type': 'string'},
16800 'type': 'array'},
16801 'tags': {'items': {'type': 'string'},
16802 'type': 'array'},
16803 'virt-type': {'type': 'string'}},
16804 'type': 'object'},
16805 'Volume': {'additionalProperties': False,
16806 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16807 'volume-tag': {'type': 'string'}},
16808 'required': ['volume-tag', 'info'],
16809 'type': 'object'},
16810 'VolumeAttachmentInfo': {'additionalProperties': False,
16811 'properties': {'bus-address': {'type': 'string'},
16812 'device-link': {'type': 'string'},
16813 'device-name': {'type': 'string'},
16814 'read-only': {'type': 'boolean'}},
16815 'type': 'object'},
16816 'VolumeAttachmentParams': {'additionalProperties': False,
16817 'properties': {'instance-id': {'type': 'string'},
16818 'machine-tag': {'type': 'string'},
16819 'provider': {'type': 'string'},
16820 'read-only': {'type': 'boolean'},
16821 'volume-id': {'type': 'string'},
16822 'volume-tag': {'type': 'string'}},
16823 'required': ['volume-tag',
16824 'machine-tag',
16825 'provider'],
16826 'type': 'object'},
16827 'VolumeInfo': {'additionalProperties': False,
16828 'properties': {'hardware-id': {'type': 'string'},
16829 'persistent': {'type': 'boolean'},
16830 'size': {'type': 'integer'},
16831 'volume-id': {'type': 'string'}},
16832 'required': ['volume-id', 'size', 'persistent'],
16833 'type': 'object'},
16834 'VolumeParams': {'additionalProperties': False,
16835 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
16836 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
16837 'type': 'object'}},
16838 'type': 'object'},
16839 'provider': {'type': 'string'},
16840 'size': {'type': 'integer'},
16841 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16842 'type': 'object'},
16843 'volume-tag': {'type': 'string'}},
16844 'required': ['volume-tag',
16845 'size',
16846 'provider'],
16847 'type': 'object'},
16848 'WatchContainer': {'additionalProperties': False,
16849 'properties': {'container-type': {'type': 'string'},
16850 'machine-tag': {'type': 'string'}},
16851 'required': ['machine-tag',
16852 'container-type'],
16853 'type': 'object'},
16854 'WatchContainers': {'additionalProperties': False,
16855 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
16856 'type': 'array'}},
16857 'required': ['params'],
16858 'type': 'object'}},
16859 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
16860 'type': 'object'},
16861 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
16862 'type': 'object'},
16863 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
16864 'type': 'object'},
16865 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16866 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
16867 'type': 'object'},
16868 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
16869 'type': 'object'},
16870 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
16871 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
16872 'type': 'object'},
16873 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
16874 'type': 'object'},
16875 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16876 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
16877 'type': 'object'},
16878 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16879 'Result': {'$ref': '#/definitions/ErrorResults'}},
16880 'type': 'object'},
16881 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
16882 'Result': {'$ref': '#/definitions/FindToolsResult'}},
16883 'type': 'object'},
16884 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16885 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
16886 'type': 'object'},
16887 'HostChangesForContainers': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16888 'Result': {'$ref': '#/definitions/HostNetworkChangeResults'}},
16889 'type': 'object'},
16890 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16891 'Result': {'$ref': '#/definitions/StringResults'}},
16892 'type': 'object'},
16893 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16894 'Result': {'$ref': '#/definitions/StatusResults'}},
16895 'type': 'object'},
16896 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16897 'Result': {'$ref': '#/definitions/LifeResults'}},
16898 'type': 'object'},
16899 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
16900 'type': 'object'},
16901 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16902 'Result': {'$ref': '#/definitions/ErrorResults'}},
16903 'type': 'object'},
16904 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
16905 'type': 'object'},
16906 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
16907 'type': 'object'},
16908 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16909 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
16910 'type': 'object'},
16911 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16912 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
16913 'type': 'object'},
16914 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16915 'Result': {'$ref': '#/definitions/ErrorResults'}},
16916 'type': 'object'},
16917 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16918 'Result': {'$ref': '#/definitions/ErrorResults'}},
16919 'type': 'object'},
16920 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16921 'Result': {'$ref': '#/definitions/StringResults'}},
16922 'type': 'object'},
16923 'SetHostMachineNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
16924 'type': 'object'},
16925 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
16926 'Result': {'$ref': '#/definitions/ErrorResults'}},
16927 'type': 'object'},
16928 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16929 'Result': {'$ref': '#/definitions/ErrorResults'}},
16930 'type': 'object'},
16931 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
16932 'type': 'object'},
16933 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
16934 'Result': {'$ref': '#/definitions/ErrorResults'}},
16935 'type': 'object'},
16936 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16937 'Result': {'$ref': '#/definitions/ErrorResults'}},
16938 'type': 'object'},
16939 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
16940 'Result': {'$ref': '#/definitions/ErrorResults'}},
16941 'type': 'object'},
16942 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
16943 'type': 'object'},
16944 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16945 'Result': {'$ref': '#/definitions/StatusResults'}},
16946 'type': 'object'},
16947 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16948 'Result': {'$ref': '#/definitions/ToolsResults'}},
16949 'type': 'object'},
16950 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16951 'Result': {'$ref': '#/definitions/ErrorResults'}},
16952 'type': 'object'},
16953 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16954 'type': 'object'},
16955 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
16956 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16957 'type': 'object'},
16958 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
16959 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16960 'type': 'object'},
16961 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16962 'type': 'object'},
16963 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16964 'type': 'object'},
16965 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
16966 'type': 'object'}},
16967 'type': 'object'}
16968
16969
16970 @ReturnMapping(StringsResult)
16971 async def APIAddresses(self):
16972 '''
16973
16974 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
16975 '''
16976 # map input types to rpc msg
16977 _params = dict()
16978 msg = dict(type='Provisioner', request='APIAddresses', version=3, params=_params)
16979
16980 reply = await self.rpc(msg)
16981 return reply
16982
16983
16984
16985 @ReturnMapping(APIHostPortsResult)
16986 async def APIHostPorts(self):
16987 '''
16988
16989 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
16990 '''
16991 # map input types to rpc msg
16992 _params = dict()
16993 msg = dict(type='Provisioner', request='APIHostPorts', version=3, params=_params)
16994
16995 reply = await self.rpc(msg)
16996 return reply
16997
16998
16999
17000 @ReturnMapping(BytesResult)
17001 async def CACert(self):
17002 '''
17003
17004 Returns -> typing.Sequence<+T_co>[int]
17005 '''
17006 # map input types to rpc msg
17007 _params = dict()
17008 msg = dict(type='Provisioner', request='CACert', version=3, params=_params)
17009
17010 reply = await self.rpc(msg)
17011 return reply
17012
17013
17014
17015 @ReturnMapping(ConstraintsResults)
17016 async def Constraints(self, entities):
17017 '''
17018 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17019 Returns -> typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
17020 '''
17021 # map input types to rpc msg
17022 _params = dict()
17023 msg = dict(type='Provisioner', request='Constraints', version=3, params=_params)
17024 _params['entities'] = entities
17025 reply = await self.rpc(msg)
17026 return reply
17027
17028
17029
17030 @ReturnMapping(ContainerConfig)
17031 async def ContainerConfig(self):
17032 '''
17033
17034 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool]
17035 '''
17036 # map input types to rpc msg
17037 _params = dict()
17038 msg = dict(type='Provisioner', request='ContainerConfig', version=3, params=_params)
17039
17040 reply = await self.rpc(msg)
17041 return reply
17042
17043
17044
17045 @ReturnMapping(ContainerManagerConfig)
17046 async def ContainerManagerConfig(self, type_):
17047 '''
17048 type_ : str
17049 Returns -> typing.Mapping<~KT, +VT_co>[str, str]
17050 '''
17051 # map input types to rpc msg
17052 _params = dict()
17053 msg = dict(type='Provisioner', request='ContainerManagerConfig', version=3, params=_params)
17054 _params['type'] = type_
17055 reply = await self.rpc(msg)
17056 return reply
17057
17058
17059
17060 @ReturnMapping(ControllerConfigResult)
17061 async def ControllerConfig(self):
17062 '''
17063
17064 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
17065 '''
17066 # map input types to rpc msg
17067 _params = dict()
17068 msg = dict(type='Provisioner', request='ControllerConfig', version=3, params=_params)
17069
17070 reply = await self.rpc(msg)
17071 return reply
17072
17073
17074
17075 @ReturnMapping(DistributionGroupResults)
17076 async def DistributionGroup(self, entities):
17077 '''
17078 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17079 Returns -> typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
17080 '''
17081 # map input types to rpc msg
17082 _params = dict()
17083 msg = dict(type='Provisioner', request='DistributionGroup', version=3, params=_params)
17084 _params['entities'] = entities
17085 reply = await self.rpc(msg)
17086 return reply
17087
17088
17089
17090 @ReturnMapping(ErrorResults)
17091 async def EnsureDead(self, entities):
17092 '''
17093 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17094 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17095 '''
17096 # map input types to rpc msg
17097 _params = dict()
17098 msg = dict(type='Provisioner', request='EnsureDead', version=3, params=_params)
17099 _params['entities'] = entities
17100 reply = await self.rpc(msg)
17101 return reply
17102
17103
17104
17105 @ReturnMapping(FindToolsResult)
17106 async def FindTools(self, arch, major, minor, number, series):
17107 '''
17108 arch : str
17109 major : int
17110 minor : int
17111 number : Number
17112 series : str
17113 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
17114 '''
17115 # map input types to rpc msg
17116 _params = dict()
17117 msg = dict(type='Provisioner', request='FindTools', version=3, params=_params)
17118 _params['arch'] = arch
17119 _params['major'] = major
17120 _params['minor'] = minor
17121 _params['number'] = number
17122 _params['series'] = series
17123 reply = await self.rpc(msg)
17124 return reply
17125
17126
17127
17128 @ReturnMapping(MachineNetworkConfigResults)
17129 async def GetContainerInterfaceInfo(self, entities):
17130 '''
17131 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17132 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
17133 '''
17134 # map input types to rpc msg
17135 _params = dict()
17136 msg = dict(type='Provisioner', request='GetContainerInterfaceInfo', version=3, params=_params)
17137 _params['entities'] = entities
17138 reply = await self.rpc(msg)
17139 return reply
17140
17141
17142
17143 @ReturnMapping(HostNetworkChangeResults)
17144 async def HostChangesForContainers(self, entities):
17145 '''
17146 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17147 Returns -> typing.Sequence<+T_co>[~HostNetworkChange]<~HostNetworkChange>
17148 '''
17149 # map input types to rpc msg
17150 _params = dict()
17151 msg = dict(type='Provisioner', request='HostChangesForContainers', version=3, params=_params)
17152 _params['entities'] = entities
17153 reply = await self.rpc(msg)
17154 return reply
17155
17156
17157
17158 @ReturnMapping(StringResults)
17159 async def InstanceId(self, entities):
17160 '''
17161 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17162 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
17163 '''
17164 # map input types to rpc msg
17165 _params = dict()
17166 msg = dict(type='Provisioner', request='InstanceId', version=3, params=_params)
17167 _params['entities'] = entities
17168 reply = await self.rpc(msg)
17169 return reply
17170
17171
17172
17173 @ReturnMapping(StatusResults)
17174 async def InstanceStatus(self, entities):
17175 '''
17176 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17177 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
17178 '''
17179 # map input types to rpc msg
17180 _params = dict()
17181 msg = dict(type='Provisioner', request='InstanceStatus', version=3, params=_params)
17182 _params['entities'] = entities
17183 reply = await self.rpc(msg)
17184 return reply
17185
17186
17187
17188 @ReturnMapping(LifeResults)
17189 async def Life(self, entities):
17190 '''
17191 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17192 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
17193 '''
17194 # map input types to rpc msg
17195 _params = dict()
17196 msg = dict(type='Provisioner', request='Life', version=3, params=_params)
17197 _params['entities'] = entities
17198 reply = await self.rpc(msg)
17199 return reply
17200
17201
17202
17203 @ReturnMapping(StatusResults)
17204 async def MachinesWithTransientErrors(self):
17205 '''
17206
17207 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
17208 '''
17209 # map input types to rpc msg
17210 _params = dict()
17211 msg = dict(type='Provisioner', request='MachinesWithTransientErrors', version=3, params=_params)
17212
17213 reply = await self.rpc(msg)
17214 return reply
17215
17216
17217
17218 @ReturnMapping(ErrorResults)
17219 async def MarkMachinesForRemoval(self, entities):
17220 '''
17221 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17222 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17223 '''
17224 # map input types to rpc msg
17225 _params = dict()
17226 msg = dict(type='Provisioner', request='MarkMachinesForRemoval', version=3, params=_params)
17227 _params['entities'] = entities
17228 reply = await self.rpc(msg)
17229 return reply
17230
17231
17232
17233 @ReturnMapping(ModelConfigResult)
17234 async def ModelConfig(self):
17235 '''
17236
17237 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
17238 '''
17239 # map input types to rpc msg
17240 _params = dict()
17241 msg = dict(type='Provisioner', request='ModelConfig', version=3, params=_params)
17242
17243 reply = await self.rpc(msg)
17244 return reply
17245
17246
17247
17248 @ReturnMapping(StringResult)
17249 async def ModelUUID(self):
17250 '''
17251
17252 Returns -> typing.Union[_ForwardRef('Error'), str]
17253 '''
17254 # map input types to rpc msg
17255 _params = dict()
17256 msg = dict(type='Provisioner', request='ModelUUID', version=3, params=_params)
17257
17258 reply = await self.rpc(msg)
17259 return reply
17260
17261
17262
17263 @ReturnMapping(MachineNetworkConfigResults)
17264 async def PrepareContainerInterfaceInfo(self, entities):
17265 '''
17266 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17267 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
17268 '''
17269 # map input types to rpc msg
17270 _params = dict()
17271 msg = dict(type='Provisioner', request='PrepareContainerInterfaceInfo', version=3, params=_params)
17272 _params['entities'] = entities
17273 reply = await self.rpc(msg)
17274 return reply
17275
17276
17277
17278 @ReturnMapping(ProvisioningInfoResults)
17279 async def ProvisioningInfo(self, entities):
17280 '''
17281 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17282 Returns -> typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
17283 '''
17284 # map input types to rpc msg
17285 _params = dict()
17286 msg = dict(type='Provisioner', request='ProvisioningInfo', version=3, params=_params)
17287 _params['entities'] = entities
17288 reply = await self.rpc(msg)
17289 return reply
17290
17291
17292
17293 @ReturnMapping(ErrorResults)
17294 async def ReleaseContainerAddresses(self, entities):
17295 '''
17296 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17297 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17298 '''
17299 # map input types to rpc msg
17300 _params = dict()
17301 msg = dict(type='Provisioner', request='ReleaseContainerAddresses', version=3, params=_params)
17302 _params['entities'] = entities
17303 reply = await self.rpc(msg)
17304 return reply
17305
17306
17307
17308 @ReturnMapping(ErrorResults)
17309 async def Remove(self, entities):
17310 '''
17311 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17312 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17313 '''
17314 # map input types to rpc msg
17315 _params = dict()
17316 msg = dict(type='Provisioner', request='Remove', version=3, params=_params)
17317 _params['entities'] = entities
17318 reply = await self.rpc(msg)
17319 return reply
17320
17321
17322
17323 @ReturnMapping(StringResults)
17324 async def Series(self, entities):
17325 '''
17326 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17327 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
17328 '''
17329 # map input types to rpc msg
17330 _params = dict()
17331 msg = dict(type='Provisioner', request='Series', version=3, params=_params)
17332 _params['entities'] = entities
17333 reply = await self.rpc(msg)
17334 return reply
17335
17336
17337
17338 @ReturnMapping(None)
17339 async def SetHostMachineNetworkConfig(self, config, tag):
17340 '''
17341 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
17342 tag : str
17343 Returns -> None
17344 '''
17345 # map input types to rpc msg
17346 _params = dict()
17347 msg = dict(type='Provisioner', request='SetHostMachineNetworkConfig', version=3, params=_params)
17348 _params['config'] = config
17349 _params['tag'] = tag
17350 reply = await self.rpc(msg)
17351 return reply
17352
17353
17354
17355 @ReturnMapping(ErrorResults)
17356 async def SetInstanceInfo(self, machines):
17357 '''
17358 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
17359 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17360 '''
17361 # map input types to rpc msg
17362 _params = dict()
17363 msg = dict(type='Provisioner', request='SetInstanceInfo', version=3, params=_params)
17364 _params['machines'] = machines
17365 reply = await self.rpc(msg)
17366 return reply
17367
17368
17369
17370 @ReturnMapping(ErrorResults)
17371 async def SetInstanceStatus(self, entities):
17372 '''
17373 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
17374 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17375 '''
17376 # map input types to rpc msg
17377 _params = dict()
17378 msg = dict(type='Provisioner', request='SetInstanceStatus', version=3, params=_params)
17379 _params['entities'] = entities
17380 reply = await self.rpc(msg)
17381 return reply
17382
17383
17384
17385 @ReturnMapping(None)
17386 async def SetObservedNetworkConfig(self, config, tag):
17387 '''
17388 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
17389 tag : str
17390 Returns -> None
17391 '''
17392 # map input types to rpc msg
17393 _params = dict()
17394 msg = dict(type='Provisioner', request='SetObservedNetworkConfig', version=3, params=_params)
17395 _params['config'] = config
17396 _params['tag'] = tag
17397 reply = await self.rpc(msg)
17398 return reply
17399
17400
17401
17402 @ReturnMapping(ErrorResults)
17403 async def SetPasswords(self, changes):
17404 '''
17405 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
17406 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17407 '''
17408 # map input types to rpc msg
17409 _params = dict()
17410 msg = dict(type='Provisioner', request='SetPasswords', version=3, params=_params)
17411 _params['changes'] = changes
17412 reply = await self.rpc(msg)
17413 return reply
17414
17415
17416
17417 @ReturnMapping(ErrorResults)
17418 async def SetStatus(self, entities):
17419 '''
17420 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
17421 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17422 '''
17423 # map input types to rpc msg
17424 _params = dict()
17425 msg = dict(type='Provisioner', request='SetStatus', version=3, params=_params)
17426 _params['entities'] = entities
17427 reply = await self.rpc(msg)
17428 return reply
17429
17430
17431
17432 @ReturnMapping(ErrorResults)
17433 async def SetSupportedContainers(self, params):
17434 '''
17435 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
17436 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17437 '''
17438 # map input types to rpc msg
17439 _params = dict()
17440 msg = dict(type='Provisioner', request='SetSupportedContainers', version=3, params=_params)
17441 _params['params'] = params
17442 reply = await self.rpc(msg)
17443 return reply
17444
17445
17446
17447 @ReturnMapping(StringsResult)
17448 async def StateAddresses(self):
17449 '''
17450
17451 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
17452 '''
17453 # map input types to rpc msg
17454 _params = dict()
17455 msg = dict(type='Provisioner', request='StateAddresses', version=3, params=_params)
17456
17457 reply = await self.rpc(msg)
17458 return reply
17459
17460
17461
17462 @ReturnMapping(StatusResults)
17463 async def Status(self, entities):
17464 '''
17465 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17466 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
17467 '''
17468 # map input types to rpc msg
17469 _params = dict()
17470 msg = dict(type='Provisioner', request='Status', version=3, params=_params)
17471 _params['entities'] = entities
17472 reply = await self.rpc(msg)
17473 return reply
17474
17475
17476
17477 @ReturnMapping(ToolsResults)
17478 async def Tools(self, entities):
17479 '''
17480 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17481 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
17482 '''
17483 # map input types to rpc msg
17484 _params = dict()
17485 msg = dict(type='Provisioner', request='Tools', version=3, params=_params)
17486 _params['entities'] = entities
17487 reply = await self.rpc(msg)
17488 return reply
17489
17490
17491
17492 @ReturnMapping(ErrorResults)
17493 async def UpdateStatus(self, entities):
17494 '''
17495 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
17496 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17497 '''
17498 # map input types to rpc msg
17499 _params = dict()
17500 msg = dict(type='Provisioner', request='UpdateStatus', version=3, params=_params)
17501 _params['entities'] = entities
17502 reply = await self.rpc(msg)
17503 return reply
17504
17505
17506
17507 @ReturnMapping(NotifyWatchResult)
17508 async def WatchAPIHostPorts(self):
17509 '''
17510
17511 Returns -> typing.Union[str, _ForwardRef('Error')]
17512 '''
17513 # map input types to rpc msg
17514 _params = dict()
17515 msg = dict(type='Provisioner', request='WatchAPIHostPorts', version=3, params=_params)
17516
17517 reply = await self.rpc(msg)
17518 return reply
17519
17520
17521
17522 @ReturnMapping(StringsWatchResults)
17523 async def WatchAllContainers(self, params):
17524 '''
17525 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
17526 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
17527 '''
17528 # map input types to rpc msg
17529 _params = dict()
17530 msg = dict(type='Provisioner', request='WatchAllContainers', version=3, params=_params)
17531 _params['params'] = params
17532 reply = await self.rpc(msg)
17533 return reply
17534
17535
17536
17537 @ReturnMapping(StringsWatchResults)
17538 async def WatchContainers(self, params):
17539 '''
17540 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
17541 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
17542 '''
17543 # map input types to rpc msg
17544 _params = dict()
17545 msg = dict(type='Provisioner', request='WatchContainers', version=3, params=_params)
17546 _params['params'] = params
17547 reply = await self.rpc(msg)
17548 return reply
17549
17550
17551
17552 @ReturnMapping(NotifyWatchResult)
17553 async def WatchForModelConfigChanges(self):
17554 '''
17555
17556 Returns -> typing.Union[str, _ForwardRef('Error')]
17557 '''
17558 # map input types to rpc msg
17559 _params = dict()
17560 msg = dict(type='Provisioner', request='WatchForModelConfigChanges', version=3, params=_params)
17561
17562 reply = await self.rpc(msg)
17563 return reply
17564
17565
17566
17567 @ReturnMapping(NotifyWatchResult)
17568 async def WatchMachineErrorRetry(self):
17569 '''
17570
17571 Returns -> typing.Union[str, _ForwardRef('Error')]
17572 '''
17573 # map input types to rpc msg
17574 _params = dict()
17575 msg = dict(type='Provisioner', request='WatchMachineErrorRetry', version=3, params=_params)
17576
17577 reply = await self.rpc(msg)
17578 return reply
17579
17580
17581
17582 @ReturnMapping(StringsWatchResult)
17583 async def WatchModelMachines(self):
17584 '''
17585
17586 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
17587 '''
17588 # map input types to rpc msg
17589 _params = dict()
17590 msg = dict(type='Provisioner', request='WatchModelMachines', version=3, params=_params)
17591
17592 reply = await self.rpc(msg)
17593 return reply
17594
17595
17596 class ProxyUpdaterFacade(Type):
17597 name = 'ProxyUpdater'
17598 version = 1
17599 schema = {'definitions': {'Entities': {'additionalProperties': False,
17600 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17601 'type': 'array'}},
17602 'required': ['entities'],
17603 'type': 'object'},
17604 'Entity': {'additionalProperties': False,
17605 'properties': {'tag': {'type': 'string'}},
17606 'required': ['tag'],
17607 'type': 'object'},
17608 'Error': {'additionalProperties': False,
17609 'properties': {'code': {'type': 'string'},
17610 'info': {'$ref': '#/definitions/ErrorInfo'},
17611 'message': {'type': 'string'}},
17612 'required': ['message', 'code'],
17613 'type': 'object'},
17614 'ErrorInfo': {'additionalProperties': False,
17615 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17616 'macaroon-path': {'type': 'string'}},
17617 'type': 'object'},
17618 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17619 'NotifyWatchResult': {'additionalProperties': False,
17620 'properties': {'NotifyWatcherId': {'type': 'string'},
17621 'error': {'$ref': '#/definitions/Error'}},
17622 'required': ['NotifyWatcherId'],
17623 'type': 'object'},
17624 'NotifyWatchResults': {'additionalProperties': False,
17625 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17626 'type': 'array'}},
17627 'required': ['results'],
17628 'type': 'object'},
17629 'ProxyConfig': {'additionalProperties': False,
17630 'properties': {'ftp': {'type': 'string'},
17631 'http': {'type': 'string'},
17632 'https': {'type': 'string'},
17633 'no-proxy': {'type': 'string'}},
17634 'required': ['http',
17635 'https',
17636 'ftp',
17637 'no-proxy'],
17638 'type': 'object'},
17639 'ProxyConfigResult': {'additionalProperties': False,
17640 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
17641 'error': {'$ref': '#/definitions/Error'},
17642 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}},
17643 'required': ['proxy-settings',
17644 'apt-proxy-settings'],
17645 'type': 'object'},
17646 'ProxyConfigResults': {'additionalProperties': False,
17647 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
17648 'type': 'array'}},
17649 'required': ['results'],
17650 'type': 'object'}},
17651 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17652 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
17653 'type': 'object'},
17654 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17655 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17656 'type': 'object'}},
17657 'type': 'object'}
17658
17659
17660 @ReturnMapping(ProxyConfigResults)
17661 async def ProxyConfig(self, entities):
17662 '''
17663 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17664 Returns -> typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
17665 '''
17666 # map input types to rpc msg
17667 _params = dict()
17668 msg = dict(type='ProxyUpdater', request='ProxyConfig', version=1, params=_params)
17669 _params['entities'] = entities
17670 reply = await self.rpc(msg)
17671 return reply
17672
17673
17674
17675 @ReturnMapping(NotifyWatchResults)
17676 async def WatchForProxyConfigAndAPIHostPortChanges(self, entities):
17677 '''
17678 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17679 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
17680 '''
17681 # map input types to rpc msg
17682 _params = dict()
17683 msg = dict(type='ProxyUpdater', request='WatchForProxyConfigAndAPIHostPortChanges', version=1, params=_params)
17684 _params['entities'] = entities
17685 reply = await self.rpc(msg)
17686 return reply
17687
17688
17689 class RebootFacade(Type):
17690 name = 'Reboot'
17691 version = 2
17692 schema = {'definitions': {'Entities': {'additionalProperties': False,
17693 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17694 'type': 'array'}},
17695 'required': ['entities'],
17696 'type': 'object'},
17697 'Entity': {'additionalProperties': False,
17698 'properties': {'tag': {'type': 'string'}},
17699 'required': ['tag'],
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 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17720 'NotifyWatchResult': {'additionalProperties': False,
17721 'properties': {'NotifyWatcherId': {'type': 'string'},
17722 'error': {'$ref': '#/definitions/Error'}},
17723 'required': ['NotifyWatcherId'],
17724 'type': 'object'},
17725 'RebootActionResult': {'additionalProperties': False,
17726 'properties': {'error': {'$ref': '#/definitions/Error'},
17727 'result': {'type': 'string'}},
17728 'type': 'object'},
17729 'RebootActionResults': {'additionalProperties': False,
17730 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
17731 'type': 'array'}},
17732 'type': 'object'}},
17733 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17734 'Result': {'$ref': '#/definitions/ErrorResults'}},
17735 'type': 'object'},
17736 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17737 'Result': {'$ref': '#/definitions/RebootActionResults'}},
17738 'type': 'object'},
17739 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17740 'Result': {'$ref': '#/definitions/ErrorResults'}},
17741 'type': 'object'},
17742 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
17743 'type': 'object'}},
17744 'type': 'object'}
17745
17746
17747 @ReturnMapping(ErrorResults)
17748 async def ClearReboot(self, entities):
17749 '''
17750 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17751 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17752 '''
17753 # map input types to rpc msg
17754 _params = dict()
17755 msg = dict(type='Reboot', request='ClearReboot', version=2, params=_params)
17756 _params['entities'] = entities
17757 reply = await self.rpc(msg)
17758 return reply
17759
17760
17761
17762 @ReturnMapping(RebootActionResults)
17763 async def GetRebootAction(self, entities):
17764 '''
17765 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17766 Returns -> typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
17767 '''
17768 # map input types to rpc msg
17769 _params = dict()
17770 msg = dict(type='Reboot', request='GetRebootAction', version=2, params=_params)
17771 _params['entities'] = entities
17772 reply = await self.rpc(msg)
17773 return reply
17774
17775
17776
17777 @ReturnMapping(ErrorResults)
17778 async def RequestReboot(self, entities):
17779 '''
17780 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17781 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17782 '''
17783 # map input types to rpc msg
17784 _params = dict()
17785 msg = dict(type='Reboot', request='RequestReboot', version=2, params=_params)
17786 _params['entities'] = entities
17787 reply = await self.rpc(msg)
17788 return reply
17789
17790
17791
17792 @ReturnMapping(NotifyWatchResult)
17793 async def WatchForRebootEvent(self):
17794 '''
17795
17796 Returns -> typing.Union[str, _ForwardRef('Error')]
17797 '''
17798 # map input types to rpc msg
17799 _params = dict()
17800 msg = dict(type='Reboot', request='WatchForRebootEvent', version=2, params=_params)
17801
17802 reply = await self.rpc(msg)
17803 return reply
17804
17805
17806 class RelationUnitsWatcherFacade(Type):
17807 name = 'RelationUnitsWatcher'
17808 version = 1
17809 schema = {'definitions': {'Error': {'additionalProperties': False,
17810 'properties': {'code': {'type': 'string'},
17811 'info': {'$ref': '#/definitions/ErrorInfo'},
17812 'message': {'type': 'string'}},
17813 'required': ['message', 'code'],
17814 'type': 'object'},
17815 'ErrorInfo': {'additionalProperties': False,
17816 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17817 'macaroon-path': {'type': 'string'}},
17818 'type': 'object'},
17819 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17820 'RelationUnitsChange': {'additionalProperties': False,
17821 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
17822 'type': 'object'},
17823 'departed': {'items': {'type': 'string'},
17824 'type': 'array'}},
17825 'required': ['changed'],
17826 'type': 'object'},
17827 'RelationUnitsWatchResult': {'additionalProperties': False,
17828 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
17829 'error': {'$ref': '#/definitions/Error'},
17830 'watcher-id': {'type': 'string'}},
17831 'required': ['watcher-id',
17832 'changes'],
17833 'type': 'object'},
17834 'UnitSettings': {'additionalProperties': False,
17835 'properties': {'version': {'type': 'integer'}},
17836 'required': ['version'],
17837 'type': 'object'}},
17838 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
17839 'type': 'object'},
17840 'Stop': {'type': 'object'}},
17841 'type': 'object'}
17842
17843
17844 @ReturnMapping(RelationUnitsWatchResult)
17845 async def Next(self):
17846 '''
17847
17848 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
17849 '''
17850 # map input types to rpc msg
17851 _params = dict()
17852 msg = dict(type='RelationUnitsWatcher', request='Next', version=1, params=_params)
17853
17854 reply = await self.rpc(msg)
17855 return reply
17856
17857
17858
17859 @ReturnMapping(None)
17860 async def Stop(self):
17861 '''
17862
17863 Returns -> None
17864 '''
17865 # map input types to rpc msg
17866 _params = dict()
17867 msg = dict(type='RelationUnitsWatcher', request='Stop', version=1, params=_params)
17868
17869 reply = await self.rpc(msg)
17870 return reply
17871
17872
17873 class RemoteApplicationWatcherFacade(Type):
17874 name = 'RemoteApplicationWatcher'
17875 version = 1
17876 schema = {'definitions': {'Error': {'additionalProperties': False,
17877 'properties': {'code': {'type': 'string'},
17878 'info': {'$ref': '#/definitions/ErrorInfo'},
17879 'message': {'type': 'string'}},
17880 'required': ['message', 'code'],
17881 'type': 'object'},
17882 'ErrorInfo': {'additionalProperties': False,
17883 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17884 'macaroon-path': {'type': 'string'}},
17885 'type': 'object'},
17886 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17887 'RemoteApplicationChange': {'additionalProperties': False,
17888 'properties': {'application-tag': {'type': 'string'},
17889 'life': {'type': 'string'},
17890 'relations': {'$ref': '#/definitions/RemoteRelationsChange'}},
17891 'required': ['application-tag',
17892 'life',
17893 'relations'],
17894 'type': 'object'},
17895 'RemoteApplicationWatchResult': {'additionalProperties': False,
17896 'properties': {'change': {'$ref': '#/definitions/RemoteApplicationChange'},
17897 'error': {'$ref': '#/definitions/Error'},
17898 'id': {'type': 'string'}},
17899 'required': ['id'],
17900 'type': 'object'},
17901 'RemoteEntityId': {'additionalProperties': False,
17902 'properties': {'model-uuid': {'type': 'string'},
17903 'token': {'type': 'string'}},
17904 'required': ['model-uuid', 'token'],
17905 'type': 'object'},
17906 'RemoteRelationChange': {'additionalProperties': False,
17907 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
17908 'type': 'object'},
17909 'departed-units': {'items': {'type': 'string'},
17910 'type': 'array'},
17911 'id': {'type': 'integer'},
17912 'life': {'type': 'string'}},
17913 'required': ['id', 'life'],
17914 'type': 'object'},
17915 'RemoteRelationUnitChange': {'additionalProperties': False,
17916 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
17917 'type': 'object'}},
17918 'type': 'object'},
17919 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
17920 'required': ['unit-id'],
17921 'type': 'object'},
17922 'RemoteRelationsChange': {'additionalProperties': False,
17923 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
17924 'type': 'array'},
17925 'initial': {'type': 'boolean'},
17926 'removed': {'items': {'type': 'integer'},
17927 'type': 'array'}},
17928 'required': ['initial'],
17929 'type': 'object'}},
17930 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteApplicationWatchResult'}},
17931 'type': 'object'},
17932 'Stop': {'type': 'object'}},
17933 'type': 'object'}
17934
17935
17936 @ReturnMapping(RemoteApplicationWatchResult)
17937 async def Next(self):
17938 '''
17939
17940 Returns -> typing.Union[_ForwardRef('RemoteApplicationChange'), _ForwardRef('Error'), str]
17941 '''
17942 # map input types to rpc msg
17943 _params = dict()
17944 msg = dict(type='RemoteApplicationWatcher', request='Next', version=1, params=_params)
17945
17946 reply = await self.rpc(msg)
17947 return reply
17948
17949
17950
17951 @ReturnMapping(None)
17952 async def Stop(self):
17953 '''
17954
17955 Returns -> None
17956 '''
17957 # map input types to rpc msg
17958 _params = dict()
17959 msg = dict(type='RemoteApplicationWatcher', request='Stop', version=1, params=_params)
17960
17961 reply = await self.rpc(msg)
17962 return reply
17963
17964
17965 class RemoteRelationsWatcherFacade(Type):
17966 name = 'RemoteRelationsWatcher'
17967 version = 1
17968 schema = {'definitions': {'Error': {'additionalProperties': False,
17969 'properties': {'code': {'type': 'string'},
17970 'info': {'$ref': '#/definitions/ErrorInfo'},
17971 'message': {'type': 'string'}},
17972 'required': ['message', 'code'],
17973 'type': 'object'},
17974 'ErrorInfo': {'additionalProperties': False,
17975 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17976 'macaroon-path': {'type': 'string'}},
17977 'type': 'object'},
17978 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17979 'RemoteEntityId': {'additionalProperties': False,
17980 'properties': {'model-uuid': {'type': 'string'},
17981 'token': {'type': 'string'}},
17982 'required': ['model-uuid', 'token'],
17983 'type': 'object'},
17984 'RemoteRelationChange': {'additionalProperties': False,
17985 'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
17986 'type': 'object'},
17987 'departed-units': {'items': {'type': 'string'},
17988 'type': 'array'},
17989 'id': {'type': 'integer'},
17990 'life': {'type': 'string'}},
17991 'required': ['id', 'life'],
17992 'type': 'object'},
17993 'RemoteRelationUnitChange': {'additionalProperties': False,
17994 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
17995 'type': 'object'}},
17996 'type': 'object'},
17997 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
17998 'required': ['unit-id'],
17999 'type': 'object'},
18000 'RemoteRelationsChange': {'additionalProperties': False,
18001 'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
18002 'type': 'array'},
18003 'initial': {'type': 'boolean'},
18004 'removed': {'items': {'type': 'integer'},
18005 'type': 'array'}},
18006 'required': ['initial'],
18007 'type': 'object'},
18008 'RemoteRelationsWatchResult': {'additionalProperties': False,
18009 'properties': {'RemoteRelationsWatcherId': {'type': 'string'},
18010 'change': {'$ref': '#/definitions/RemoteRelationsChange'},
18011 'error': {'$ref': '#/definitions/Error'}},
18012 'required': ['RemoteRelationsWatcherId'],
18013 'type': 'object'}},
18014 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteRelationsWatchResult'}},
18015 'type': 'object'},
18016 'Stop': {'type': 'object'}},
18017 'type': 'object'}
18018
18019
18020 @ReturnMapping(RemoteRelationsWatchResult)
18021 async def Next(self):
18022 '''
18023
18024 Returns -> typing.Union[str, _ForwardRef('RemoteRelationsChange'), _ForwardRef('Error')]
18025 '''
18026 # map input types to rpc msg
18027 _params = dict()
18028 msg = dict(type='RemoteRelationsWatcher', request='Next', version=1, params=_params)
18029
18030 reply = await self.rpc(msg)
18031 return reply
18032
18033
18034
18035 @ReturnMapping(None)
18036 async def Stop(self):
18037 '''
18038
18039 Returns -> None
18040 '''
18041 # map input types to rpc msg
18042 _params = dict()
18043 msg = dict(type='RemoteRelationsWatcher', request='Stop', version=1, params=_params)
18044
18045 reply = await self.rpc(msg)
18046 return reply
18047
18048
18049 class ResourcesFacade(Type):
18050 name = 'Resources'
18051 version = 1
18052 schema = {'definitions': {'AddCharmWithAuthorization': {'additionalProperties': False,
18053 'properties': {'channel': {'type': 'string'},
18054 'macaroon': {'$ref': '#/definitions/Macaroon'},
18055 'url': {'type': 'string'}},
18056 'required': ['url',
18057 'channel',
18058 'macaroon'],
18059 'type': 'object'},
18060 'AddPendingResourcesArgs': {'additionalProperties': False,
18061 'properties': {'AddCharmWithAuthorization': {'$ref': '#/definitions/AddCharmWithAuthorization'},
18062 'Entity': {'$ref': '#/definitions/Entity'},
18063 'Resources': {'items': {'$ref': '#/definitions/CharmResource'},
18064 'type': 'array'}},
18065 'required': ['Entity',
18066 'AddCharmWithAuthorization',
18067 'Resources'],
18068 'type': 'object'},
18069 'AddPendingResourcesResult': {'additionalProperties': False,
18070 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
18071 'pending-ids': {'items': {'type': 'string'},
18072 'type': 'array'}},
18073 'required': ['ErrorResult',
18074 'pending-ids'],
18075 'type': 'object'},
18076 'CharmResource': {'additionalProperties': False,
18077 'properties': {'description': {'type': 'string'},
18078 'fingerprint': {'items': {'type': 'integer'},
18079 'type': 'array'},
18080 'name': {'type': 'string'},
18081 'origin': {'type': 'string'},
18082 'path': {'type': 'string'},
18083 'revision': {'type': 'integer'},
18084 'size': {'type': 'integer'},
18085 'type': {'type': 'string'}},
18086 'required': ['name',
18087 'type',
18088 'path',
18089 'origin',
18090 'revision',
18091 'fingerprint',
18092 'size'],
18093 'type': 'object'},
18094 'Entity': {'additionalProperties': False,
18095 'properties': {'tag': {'type': 'string'}},
18096 'required': ['tag'],
18097 'type': 'object'},
18098 'Error': {'additionalProperties': False,
18099 'properties': {'code': {'type': 'string'},
18100 'info': {'$ref': '#/definitions/ErrorInfo'},
18101 'message': {'type': 'string'}},
18102 'required': ['message', 'code'],
18103 'type': 'object'},
18104 'ErrorInfo': {'additionalProperties': False,
18105 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18106 'macaroon-path': {'type': 'string'}},
18107 'type': 'object'},
18108 'ErrorResult': {'additionalProperties': False,
18109 'properties': {'error': {'$ref': '#/definitions/Error'}},
18110 'type': 'object'},
18111 'ListResourcesArgs': {'additionalProperties': False,
18112 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
18113 'type': 'array'}},
18114 'required': ['entities'],
18115 'type': 'object'},
18116 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18117 'Resource': {'additionalProperties': False,
18118 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'},
18119 'application': {'type': 'string'},
18120 'id': {'type': 'string'},
18121 'pending-id': {'type': 'string'},
18122 'timestamp': {'format': 'date-time',
18123 'type': 'string'},
18124 'username': {'type': 'string'}},
18125 'required': ['CharmResource',
18126 'id',
18127 'pending-id',
18128 'application',
18129 'username',
18130 'timestamp'],
18131 'type': 'object'},
18132 'ResourcesResult': {'additionalProperties': False,
18133 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
18134 'charm-store-resources': {'items': {'$ref': '#/definitions/CharmResource'},
18135 'type': 'array'},
18136 'resources': {'items': {'$ref': '#/definitions/Resource'},
18137 'type': 'array'},
18138 'unit-resources': {'items': {'$ref': '#/definitions/UnitResources'},
18139 'type': 'array'}},
18140 'required': ['ErrorResult',
18141 'resources',
18142 'charm-store-resources',
18143 'unit-resources'],
18144 'type': 'object'},
18145 'ResourcesResults': {'additionalProperties': False,
18146 'properties': {'results': {'items': {'$ref': '#/definitions/ResourcesResult'},
18147 'type': 'array'}},
18148 'required': ['results'],
18149 'type': 'object'},
18150 'UnitResources': {'additionalProperties': False,
18151 'properties': {'Entity': {'$ref': '#/definitions/Entity'},
18152 'download-progress': {'patternProperties': {'.*': {'type': 'integer'}},
18153 'type': 'object'},
18154 'resources': {'items': {'$ref': '#/definitions/Resource'},
18155 'type': 'array'}},
18156 'required': ['Entity',
18157 'resources',
18158 'download-progress'],
18159 'type': 'object'}},
18160 'properties': {'AddPendingResources': {'properties': {'Params': {'$ref': '#/definitions/AddPendingResourcesArgs'},
18161 'Result': {'$ref': '#/definitions/AddPendingResourcesResult'}},
18162 'type': 'object'},
18163 'ListResources': {'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'},
18164 'Result': {'$ref': '#/definitions/ResourcesResults'}},
18165 'type': 'object'}},
18166 'type': 'object'}
18167
18168
18169 @ReturnMapping(AddPendingResourcesResult)
18170 async def AddPendingResources(self, addcharmwithauthorization, entity, resources):
18171 '''
18172 addcharmwithauthorization : AddCharmWithAuthorization
18173 entity : Entity
18174 resources : typing.Sequence<+T_co>[~CharmResource]<~CharmResource>
18175 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[str]]
18176 '''
18177 # map input types to rpc msg
18178 _params = dict()
18179 msg = dict(type='Resources', request='AddPendingResources', version=1, params=_params)
18180 _params['AddCharmWithAuthorization'] = addcharmwithauthorization
18181 _params['Entity'] = entity
18182 _params['Resources'] = resources
18183 reply = await self.rpc(msg)
18184 return reply
18185
18186
18187
18188 @ReturnMapping(ResourcesResults)
18189 async def ListResources(self, entities):
18190 '''
18191 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18192 Returns -> typing.Sequence<+T_co>[~ResourcesResult]<~ResourcesResult>
18193 '''
18194 # map input types to rpc msg
18195 _params = dict()
18196 msg = dict(type='Resources', request='ListResources', version=1, params=_params)
18197 _params['entities'] = entities
18198 reply = await self.rpc(msg)
18199 return reply
18200
18201
18202 class ResourcesHookContextFacade(Type):
18203 name = 'ResourcesHookContext'
18204 version = 1
18205 schema = {'definitions': {'CharmResource': {'additionalProperties': False,
18206 'properties': {'description': {'type': 'string'},
18207 'fingerprint': {'items': {'type': 'integer'},
18208 'type': 'array'},
18209 'name': {'type': 'string'},
18210 'origin': {'type': 'string'},
18211 'path': {'type': 'string'},
18212 'revision': {'type': 'integer'},
18213 'size': {'type': 'integer'},
18214 'type': {'type': 'string'}},
18215 'required': ['name',
18216 'type',
18217 'path',
18218 'origin',
18219 'revision',
18220 'fingerprint',
18221 'size'],
18222 'type': 'object'},
18223 'Error': {'additionalProperties': False,
18224 'properties': {'code': {'type': 'string'},
18225 'info': {'$ref': '#/definitions/ErrorInfo'},
18226 'message': {'type': 'string'}},
18227 'required': ['message', 'code'],
18228 'type': 'object'},
18229 'ErrorInfo': {'additionalProperties': False,
18230 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18231 'macaroon-path': {'type': 'string'}},
18232 'type': 'object'},
18233 'ErrorResult': {'additionalProperties': False,
18234 'properties': {'error': {'$ref': '#/definitions/Error'}},
18235 'type': 'object'},
18236 'ListResourcesArgs': {'additionalProperties': False,
18237 'properties': {'resource-names': {'items': {'type': 'string'},
18238 'type': 'array'}},
18239 'required': ['resource-names'],
18240 'type': 'object'},
18241 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18242 'Resource': {'additionalProperties': False,
18243 'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'},
18244 'application': {'type': 'string'},
18245 'id': {'type': 'string'},
18246 'pending-id': {'type': 'string'},
18247 'timestamp': {'format': 'date-time',
18248 'type': 'string'},
18249 'username': {'type': 'string'}},
18250 'required': ['CharmResource',
18251 'id',
18252 'pending-id',
18253 'application',
18254 'username',
18255 'timestamp'],
18256 'type': 'object'},
18257 'ResourceResult': {'additionalProperties': False,
18258 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
18259 'resource': {'$ref': '#/definitions/Resource'}},
18260 'required': ['ErrorResult', 'resource'],
18261 'type': 'object'},
18262 'ResourcesResult': {'additionalProperties': False,
18263 'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
18264 'resources': {'items': {'$ref': '#/definitions/ResourceResult'},
18265 'type': 'array'}},
18266 'required': ['ErrorResult', 'resources'],
18267 'type': 'object'}},
18268 'properties': {'GetResourceInfo': {'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'},
18269 'Result': {'$ref': '#/definitions/ResourcesResult'}},
18270 'type': 'object'}},
18271 'type': 'object'}
18272
18273
18274 @ReturnMapping(ResourcesResult)
18275 async def GetResourceInfo(self, entities):
18276 '''
18277 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18278 Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[~UnitResources]<~UnitResources>]
18279 '''
18280 # map input types to rpc msg
18281 _params = dict()
18282 msg = dict(type='ResourcesHookContext', request='GetResourceInfo', version=1, params=_params)
18283 _params['entities'] = entities
18284 reply = await self.rpc(msg)
18285 return reply
18286
18287
18288 class ResumerFacade(Type):
18289 name = 'Resumer'
18290 version = 2
18291 schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
18292
18293
18294 @ReturnMapping(None)
18295 async def ResumeTransactions(self):
18296 '''
18297
18298 Returns -> None
18299 '''
18300 # map input types to rpc msg
18301 _params = dict()
18302 msg = dict(type='Resumer', request='ResumeTransactions', version=2, params=_params)
18303
18304 reply = await self.rpc(msg)
18305 return reply
18306
18307
18308 class RetryStrategyFacade(Type):
18309 name = 'RetryStrategy'
18310 version = 1
18311 schema = {'definitions': {'Entities': {'additionalProperties': False,
18312 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
18313 'type': 'array'}},
18314 'required': ['entities'],
18315 'type': 'object'},
18316 'Entity': {'additionalProperties': False,
18317 'properties': {'tag': {'type': 'string'}},
18318 'required': ['tag'],
18319 'type': 'object'},
18320 'Error': {'additionalProperties': False,
18321 'properties': {'code': {'type': 'string'},
18322 'info': {'$ref': '#/definitions/ErrorInfo'},
18323 'message': {'type': 'string'}},
18324 'required': ['message', 'code'],
18325 'type': 'object'},
18326 'ErrorInfo': {'additionalProperties': False,
18327 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18328 'macaroon-path': {'type': 'string'}},
18329 'type': 'object'},
18330 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18331 'NotifyWatchResult': {'additionalProperties': False,
18332 'properties': {'NotifyWatcherId': {'type': 'string'},
18333 'error': {'$ref': '#/definitions/Error'}},
18334 'required': ['NotifyWatcherId'],
18335 'type': 'object'},
18336 'NotifyWatchResults': {'additionalProperties': False,
18337 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
18338 'type': 'array'}},
18339 'required': ['results'],
18340 'type': 'object'},
18341 'RetryStrategy': {'additionalProperties': False,
18342 'properties': {'jitter-retry-time': {'type': 'boolean'},
18343 'max-retry-time': {'type': 'integer'},
18344 'min-retry-time': {'type': 'integer'},
18345 'retry-time-factor': {'type': 'integer'},
18346 'should-retry': {'type': 'boolean'}},
18347 'required': ['should-retry',
18348 'min-retry-time',
18349 'max-retry-time',
18350 'jitter-retry-time',
18351 'retry-time-factor'],
18352 'type': 'object'},
18353 'RetryStrategyResult': {'additionalProperties': False,
18354 'properties': {'error': {'$ref': '#/definitions/Error'},
18355 'result': {'$ref': '#/definitions/RetryStrategy'}},
18356 'type': 'object'},
18357 'RetryStrategyResults': {'additionalProperties': False,
18358 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
18359 'type': 'array'}},
18360 'required': ['results'],
18361 'type': 'object'}},
18362 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18363 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
18364 'type': 'object'},
18365 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18366 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18367 'type': 'object'}},
18368 'type': 'object'}
18369
18370
18371 @ReturnMapping(RetryStrategyResults)
18372 async def RetryStrategy(self, entities):
18373 '''
18374 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18375 Returns -> typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
18376 '''
18377 # map input types to rpc msg
18378 _params = dict()
18379 msg = dict(type='RetryStrategy', request='RetryStrategy', version=1, params=_params)
18380 _params['entities'] = entities
18381 reply = await self.rpc(msg)
18382 return reply
18383
18384
18385
18386 @ReturnMapping(NotifyWatchResults)
18387 async def WatchRetryStrategy(self, entities):
18388 '''
18389 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18390 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
18391 '''
18392 # map input types to rpc msg
18393 _params = dict()
18394 msg = dict(type='RetryStrategy', request='WatchRetryStrategy', version=1, params=_params)
18395 _params['entities'] = entities
18396 reply = await self.rpc(msg)
18397 return reply
18398
18399
18400 class SSHClientFacade(Type):
18401 name = 'SSHClient'
18402 version = 2
18403 schema = {'definitions': {'Entities': {'additionalProperties': False,
18404 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
18405 'type': 'array'}},
18406 'required': ['entities'],
18407 'type': 'object'},
18408 'Entity': {'additionalProperties': False,
18409 'properties': {'tag': {'type': 'string'}},
18410 'required': ['tag'],
18411 'type': 'object'},
18412 'Error': {'additionalProperties': False,
18413 'properties': {'code': {'type': 'string'},
18414 'info': {'$ref': '#/definitions/ErrorInfo'},
18415 'message': {'type': 'string'}},
18416 'required': ['message', 'code'],
18417 'type': 'object'},
18418 'ErrorInfo': {'additionalProperties': False,
18419 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18420 'macaroon-path': {'type': 'string'}},
18421 'type': 'object'},
18422 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18423 'SSHAddressResult': {'additionalProperties': False,
18424 'properties': {'address': {'type': 'string'},
18425 'error': {'$ref': '#/definitions/Error'}},
18426 'type': 'object'},
18427 'SSHAddressResults': {'additionalProperties': False,
18428 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
18429 'type': 'array'}},
18430 'required': ['results'],
18431 'type': 'object'},
18432 'SSHAddressesResult': {'additionalProperties': False,
18433 'properties': {'addresses': {'items': {'type': 'string'},
18434 'type': 'array'},
18435 'error': {'$ref': '#/definitions/Error'}},
18436 'required': ['addresses'],
18437 'type': 'object'},
18438 'SSHAddressesResults': {'additionalProperties': False,
18439 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressesResult'},
18440 'type': 'array'}},
18441 'required': ['results'],
18442 'type': 'object'},
18443 'SSHProxyResult': {'additionalProperties': False,
18444 'properties': {'use-proxy': {'type': 'boolean'}},
18445 'required': ['use-proxy'],
18446 'type': 'object'},
18447 'SSHPublicKeysResult': {'additionalProperties': False,
18448 'properties': {'error': {'$ref': '#/definitions/Error'},
18449 'public-keys': {'items': {'type': 'string'},
18450 'type': 'array'}},
18451 'type': 'object'},
18452 'SSHPublicKeysResults': {'additionalProperties': False,
18453 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
18454 'type': 'array'}},
18455 'required': ['results'],
18456 'type': 'object'}},
18457 'properties': {'AllAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18458 'Result': {'$ref': '#/definitions/SSHAddressesResults'}},
18459 'type': 'object'},
18460 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18461 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
18462 'type': 'object'},
18463 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
18464 'type': 'object'},
18465 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18466 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
18467 'type': 'object'},
18468 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18469 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
18470 'type': 'object'}},
18471 'type': 'object'}
18472
18473
18474 @ReturnMapping(SSHAddressesResults)
18475 async def AllAddresses(self, entities):
18476 '''
18477 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18478 Returns -> typing.Sequence<+T_co>[~SSHAddressesResult]<~SSHAddressesResult>
18479 '''
18480 # map input types to rpc msg
18481 _params = dict()
18482 msg = dict(type='SSHClient', request='AllAddresses', version=2, params=_params)
18483 _params['entities'] = entities
18484 reply = await self.rpc(msg)
18485 return reply
18486
18487
18488
18489 @ReturnMapping(SSHAddressResults)
18490 async def PrivateAddress(self, entities):
18491 '''
18492 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18493 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
18494 '''
18495 # map input types to rpc msg
18496 _params = dict()
18497 msg = dict(type='SSHClient', request='PrivateAddress', version=2, params=_params)
18498 _params['entities'] = entities
18499 reply = await self.rpc(msg)
18500 return reply
18501
18502
18503
18504 @ReturnMapping(SSHProxyResult)
18505 async def Proxy(self):
18506 '''
18507
18508 Returns -> bool
18509 '''
18510 # map input types to rpc msg
18511 _params = dict()
18512 msg = dict(type='SSHClient', request='Proxy', version=2, params=_params)
18513
18514 reply = await self.rpc(msg)
18515 return reply
18516
18517
18518
18519 @ReturnMapping(SSHAddressResults)
18520 async def PublicAddress(self, entities):
18521 '''
18522 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18523 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
18524 '''
18525 # map input types to rpc msg
18526 _params = dict()
18527 msg = dict(type='SSHClient', request='PublicAddress', version=2, params=_params)
18528 _params['entities'] = entities
18529 reply = await self.rpc(msg)
18530 return reply
18531
18532
18533
18534 @ReturnMapping(SSHPublicKeysResults)
18535 async def PublicKeys(self, entities):
18536 '''
18537 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18538 Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
18539 '''
18540 # map input types to rpc msg
18541 _params = dict()
18542 msg = dict(type='SSHClient', request='PublicKeys', version=2, params=_params)
18543 _params['entities'] = entities
18544 reply = await self.rpc(msg)
18545 return reply
18546
18547
18548 class SingularFacade(Type):
18549 name = 'Singular'
18550 version = 1
18551 schema = {'definitions': {'Entities': {'additionalProperties': False,
18552 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
18553 'type': 'array'}},
18554 'required': ['entities'],
18555 'type': 'object'},
18556 'Entity': {'additionalProperties': False,
18557 'properties': {'tag': {'type': 'string'}},
18558 'required': ['tag'],
18559 'type': 'object'},
18560 'Error': {'additionalProperties': False,
18561 'properties': {'code': {'type': 'string'},
18562 'info': {'$ref': '#/definitions/ErrorInfo'},
18563 'message': {'type': 'string'}},
18564 'required': ['message', 'code'],
18565 'type': 'object'},
18566 'ErrorInfo': {'additionalProperties': False,
18567 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18568 'macaroon-path': {'type': 'string'}},
18569 'type': 'object'},
18570 'ErrorResult': {'additionalProperties': False,
18571 'properties': {'error': {'$ref': '#/definitions/Error'}},
18572 'type': 'object'},
18573 'ErrorResults': {'additionalProperties': False,
18574 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18575 'type': 'array'}},
18576 'required': ['results'],
18577 'type': 'object'},
18578 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18579 'SingularClaim': {'additionalProperties': False,
18580 'properties': {'controller-tag': {'type': 'string'},
18581 'duration': {'type': 'integer'},
18582 'model-tag': {'type': 'string'}},
18583 'required': ['model-tag',
18584 'controller-tag',
18585 'duration'],
18586 'type': 'object'},
18587 'SingularClaims': {'additionalProperties': False,
18588 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
18589 'type': 'array'}},
18590 'required': ['claims'],
18591 'type': 'object'}},
18592 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
18593 'Result': {'$ref': '#/definitions/ErrorResults'}},
18594 'type': 'object'},
18595 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18596 'Result': {'$ref': '#/definitions/ErrorResults'}},
18597 'type': 'object'}},
18598 'type': 'object'}
18599
18600
18601 @ReturnMapping(ErrorResults)
18602 async def Claim(self, claims):
18603 '''
18604 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
18605 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18606 '''
18607 # map input types to rpc msg
18608 _params = dict()
18609 msg = dict(type='Singular', request='Claim', version=1, params=_params)
18610 _params['claims'] = claims
18611 reply = await self.rpc(msg)
18612 return reply
18613
18614
18615
18616 @ReturnMapping(ErrorResults)
18617 async def Wait(self, entities):
18618 '''
18619 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18620 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18621 '''
18622 # map input types to rpc msg
18623 _params = dict()
18624 msg = dict(type='Singular', request='Wait', version=1, params=_params)
18625 _params['entities'] = entities
18626 reply = await self.rpc(msg)
18627 return reply
18628
18629
18630 class SpacesFacade(Type):
18631 name = 'Spaces'
18632 version = 2
18633 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
18634 'properties': {'provider-id': {'type': 'string'},
18635 'public': {'type': 'boolean'},
18636 'space-tag': {'type': 'string'},
18637 'subnet-tags': {'items': {'type': 'string'},
18638 'type': 'array'}},
18639 'required': ['subnet-tags',
18640 'space-tag',
18641 'public'],
18642 'type': 'object'},
18643 'CreateSpacesParams': {'additionalProperties': False,
18644 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
18645 'type': 'array'}},
18646 'required': ['spaces'],
18647 'type': 'object'},
18648 'Error': {'additionalProperties': False,
18649 'properties': {'code': {'type': 'string'},
18650 'info': {'$ref': '#/definitions/ErrorInfo'},
18651 'message': {'type': 'string'}},
18652 'required': ['message', 'code'],
18653 'type': 'object'},
18654 'ErrorInfo': {'additionalProperties': False,
18655 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18656 'macaroon-path': {'type': 'string'}},
18657 'type': 'object'},
18658 'ErrorResult': {'additionalProperties': False,
18659 'properties': {'error': {'$ref': '#/definitions/Error'}},
18660 'type': 'object'},
18661 'ErrorResults': {'additionalProperties': False,
18662 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18663 'type': 'array'}},
18664 'required': ['results'],
18665 'type': 'object'},
18666 'ListSpacesResults': {'additionalProperties': False,
18667 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
18668 'type': 'array'}},
18669 'required': ['results'],
18670 'type': 'object'},
18671 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18672 'Space': {'additionalProperties': False,
18673 'properties': {'error': {'$ref': '#/definitions/Error'},
18674 'name': {'type': 'string'},
18675 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
18676 'type': 'array'}},
18677 'required': ['name', 'subnets'],
18678 'type': 'object'},
18679 'Subnet': {'additionalProperties': False,
18680 'properties': {'cidr': {'type': 'string'},
18681 'life': {'type': 'string'},
18682 'provider-id': {'type': 'string'},
18683 'space-tag': {'type': 'string'},
18684 'status': {'type': 'string'},
18685 'vlan-tag': {'type': 'integer'},
18686 'zones': {'items': {'type': 'string'},
18687 'type': 'array'}},
18688 'required': ['cidr',
18689 'vlan-tag',
18690 'life',
18691 'space-tag',
18692 'zones'],
18693 'type': 'object'}},
18694 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
18695 'Result': {'$ref': '#/definitions/ErrorResults'}},
18696 'type': 'object'},
18697 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
18698 'type': 'object'}},
18699 'type': 'object'}
18700
18701
18702 @ReturnMapping(ErrorResults)
18703 async def CreateSpaces(self, spaces):
18704 '''
18705 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
18706 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18707 '''
18708 # map input types to rpc msg
18709 _params = dict()
18710 msg = dict(type='Spaces', request='CreateSpaces', version=2, params=_params)
18711 _params['spaces'] = spaces
18712 reply = await self.rpc(msg)
18713 return reply
18714
18715
18716
18717 @ReturnMapping(ListSpacesResults)
18718 async def ListSpaces(self):
18719 '''
18720
18721 Returns -> typing.Sequence<+T_co>[~Space]<~Space>
18722 '''
18723 # map input types to rpc msg
18724 _params = dict()
18725 msg = dict(type='Spaces', request='ListSpaces', version=2, params=_params)
18726
18727 reply = await self.rpc(msg)
18728 return reply
18729
18730
18731 class StatusHistoryFacade(Type):
18732 name = 'StatusHistory'
18733 version = 2
18734 schema = {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
18735 'properties': {'max-history-mb': {'type': 'integer'},
18736 'max-history-time': {'type': 'integer'}},
18737 'required': ['max-history-time',
18738 'max-history-mb'],
18739 'type': 'object'}},
18740 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
18741 'type': 'object'}},
18742 'type': 'object'}
18743
18744
18745 @ReturnMapping(None)
18746 async def Prune(self, max_history_mb, max_history_time):
18747 '''
18748 max_history_mb : int
18749 max_history_time : int
18750 Returns -> None
18751 '''
18752 # map input types to rpc msg
18753 _params = dict()
18754 msg = dict(type='StatusHistory', request='Prune', version=2, params=_params)
18755 _params['max-history-mb'] = max_history_mb
18756 _params['max-history-time'] = max_history_time
18757 reply = await self.rpc(msg)
18758 return reply
18759
18760
18761 class StorageFacade(Type):
18762 name = 'Storage'
18763 version = 3
18764 schema = {'definitions': {'Entities': {'additionalProperties': False,
18765 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
18766 'type': 'array'}},
18767 'required': ['entities'],
18768 'type': 'object'},
18769 'Entity': {'additionalProperties': False,
18770 'properties': {'tag': {'type': 'string'}},
18771 'required': ['tag'],
18772 'type': 'object'},
18773 'EntityStatus': {'additionalProperties': False,
18774 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18775 'type': 'object'}},
18776 'type': 'object'},
18777 'info': {'type': 'string'},
18778 'since': {'format': 'date-time',
18779 'type': 'string'},
18780 'status': {'type': 'string'}},
18781 'required': ['status', 'info', 'since'],
18782 'type': 'object'},
18783 'Error': {'additionalProperties': False,
18784 'properties': {'code': {'type': 'string'},
18785 'info': {'$ref': '#/definitions/ErrorInfo'},
18786 'message': {'type': 'string'}},
18787 'required': ['message', 'code'],
18788 'type': 'object'},
18789 'ErrorInfo': {'additionalProperties': False,
18790 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18791 'macaroon-path': {'type': 'string'}},
18792 'type': 'object'},
18793 'ErrorResult': {'additionalProperties': False,
18794 'properties': {'error': {'$ref': '#/definitions/Error'}},
18795 'type': 'object'},
18796 'ErrorResults': {'additionalProperties': False,
18797 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18798 'type': 'array'}},
18799 'required': ['results'],
18800 'type': 'object'},
18801 'FilesystemAttachmentInfo': {'additionalProperties': False,
18802 'properties': {'mount-point': {'type': 'string'},
18803 'read-only': {'type': 'boolean'}},
18804 'type': 'object'},
18805 'FilesystemDetails': {'additionalProperties': False,
18806 'properties': {'filesystem-tag': {'type': 'string'},
18807 'info': {'$ref': '#/definitions/FilesystemInfo'},
18808 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
18809 'type': 'object'},
18810 'status': {'$ref': '#/definitions/EntityStatus'},
18811 'storage': {'$ref': '#/definitions/StorageDetails'},
18812 'volume-tag': {'type': 'string'}},
18813 'required': ['filesystem-tag',
18814 'info',
18815 'status'],
18816 'type': 'object'},
18817 'FilesystemDetailsListResult': {'additionalProperties': False,
18818 'properties': {'error': {'$ref': '#/definitions/Error'},
18819 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
18820 'type': 'array'}},
18821 'type': 'object'},
18822 'FilesystemDetailsListResults': {'additionalProperties': False,
18823 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
18824 'type': 'array'}},
18825 'type': 'object'},
18826 'FilesystemFilter': {'additionalProperties': False,
18827 'properties': {'machines': {'items': {'type': 'string'},
18828 'type': 'array'}},
18829 'type': 'object'},
18830 'FilesystemFilters': {'additionalProperties': False,
18831 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
18832 'type': 'array'}},
18833 'type': 'object'},
18834 'FilesystemInfo': {'additionalProperties': False,
18835 'properties': {'filesystem-id': {'type': 'string'},
18836 'size': {'type': 'integer'}},
18837 'required': ['filesystem-id', 'size'],
18838 'type': 'object'},
18839 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18840 'StorageAddParams': {'additionalProperties': False,
18841 'properties': {'name': {'type': 'string'},
18842 'storage': {'$ref': '#/definitions/StorageConstraints'},
18843 'unit': {'type': 'string'}},
18844 'required': ['unit', 'name', 'storage'],
18845 'type': 'object'},
18846 'StorageAttachmentDetails': {'additionalProperties': False,
18847 'properties': {'location': {'type': 'string'},
18848 'machine-tag': {'type': 'string'},
18849 'storage-tag': {'type': 'string'},
18850 'unit-tag': {'type': 'string'}},
18851 'required': ['storage-tag',
18852 'unit-tag',
18853 'machine-tag'],
18854 'type': 'object'},
18855 'StorageConstraints': {'additionalProperties': False,
18856 'properties': {'count': {'type': 'integer'},
18857 'pool': {'type': 'string'},
18858 'size': {'type': 'integer'}},
18859 'type': 'object'},
18860 'StorageDetails': {'additionalProperties': False,
18861 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
18862 'type': 'object'},
18863 'kind': {'type': 'integer'},
18864 'owner-tag': {'type': 'string'},
18865 'persistent': {'type': 'boolean'},
18866 'status': {'$ref': '#/definitions/EntityStatus'},
18867 'storage-tag': {'type': 'string'}},
18868 'required': ['storage-tag',
18869 'owner-tag',
18870 'kind',
18871 'status',
18872 'persistent'],
18873 'type': 'object'},
18874 'StorageDetailsListResult': {'additionalProperties': False,
18875 'properties': {'error': {'$ref': '#/definitions/Error'},
18876 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
18877 'type': 'array'}},
18878 'type': 'object'},
18879 'StorageDetailsListResults': {'additionalProperties': False,
18880 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
18881 'type': 'array'}},
18882 'type': 'object'},
18883 'StorageDetailsResult': {'additionalProperties': False,
18884 'properties': {'error': {'$ref': '#/definitions/Error'},
18885 'result': {'$ref': '#/definitions/StorageDetails'}},
18886 'type': 'object'},
18887 'StorageDetailsResults': {'additionalProperties': False,
18888 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
18889 'type': 'array'}},
18890 'type': 'object'},
18891 'StorageFilter': {'additionalProperties': False,
18892 'type': 'object'},
18893 'StorageFilters': {'additionalProperties': False,
18894 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
18895 'type': 'array'}},
18896 'type': 'object'},
18897 'StoragePool': {'additionalProperties': False,
18898 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
18899 'type': 'object'}},
18900 'type': 'object'},
18901 'name': {'type': 'string'},
18902 'provider': {'type': 'string'}},
18903 'required': ['name', 'provider', 'attrs'],
18904 'type': 'object'},
18905 'StoragePoolFilter': {'additionalProperties': False,
18906 'properties': {'names': {'items': {'type': 'string'},
18907 'type': 'array'},
18908 'providers': {'items': {'type': 'string'},
18909 'type': 'array'}},
18910 'type': 'object'},
18911 'StoragePoolFilters': {'additionalProperties': False,
18912 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
18913 'type': 'array'}},
18914 'type': 'object'},
18915 'StoragePoolsResult': {'additionalProperties': False,
18916 'properties': {'error': {'$ref': '#/definitions/Error'},
18917 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
18918 'type': 'array'}},
18919 'type': 'object'},
18920 'StoragePoolsResults': {'additionalProperties': False,
18921 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
18922 'type': 'array'}},
18923 'type': 'object'},
18924 'StoragesAddParams': {'additionalProperties': False,
18925 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
18926 'type': 'array'}},
18927 'required': ['storages'],
18928 'type': 'object'},
18929 'VolumeAttachmentInfo': {'additionalProperties': False,
18930 'properties': {'bus-address': {'type': 'string'},
18931 'device-link': {'type': 'string'},
18932 'device-name': {'type': 'string'},
18933 'read-only': {'type': 'boolean'}},
18934 'type': 'object'},
18935 'VolumeDetails': {'additionalProperties': False,
18936 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
18937 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
18938 'type': 'object'},
18939 'status': {'$ref': '#/definitions/EntityStatus'},
18940 'storage': {'$ref': '#/definitions/StorageDetails'},
18941 'volume-tag': {'type': 'string'}},
18942 'required': ['volume-tag', 'info', 'status'],
18943 'type': 'object'},
18944 'VolumeDetailsListResult': {'additionalProperties': False,
18945 'properties': {'error': {'$ref': '#/definitions/Error'},
18946 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
18947 'type': 'array'}},
18948 'type': 'object'},
18949 'VolumeDetailsListResults': {'additionalProperties': False,
18950 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
18951 'type': 'array'}},
18952 'type': 'object'},
18953 'VolumeFilter': {'additionalProperties': False,
18954 'properties': {'machines': {'items': {'type': 'string'},
18955 'type': 'array'}},
18956 'type': 'object'},
18957 'VolumeFilters': {'additionalProperties': False,
18958 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
18959 'type': 'array'}},
18960 'type': 'object'},
18961 'VolumeInfo': {'additionalProperties': False,
18962 'properties': {'hardware-id': {'type': 'string'},
18963 'persistent': {'type': 'boolean'},
18964 'size': {'type': 'integer'},
18965 'volume-id': {'type': 'string'}},
18966 'required': ['volume-id', 'size', 'persistent'],
18967 'type': 'object'}},
18968 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
18969 'Result': {'$ref': '#/definitions/ErrorResults'}},
18970 'type': 'object'},
18971 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
18972 'type': 'object'},
18973 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
18974 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
18975 'type': 'object'},
18976 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
18977 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
18978 'type': 'object'},
18979 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
18980 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
18981 'type': 'object'},
18982 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
18983 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
18984 'type': 'object'},
18985 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18986 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
18987 'type': 'object'}},
18988 'type': 'object'}
18989
18990
18991 @ReturnMapping(ErrorResults)
18992 async def AddToUnit(self, storages):
18993 '''
18994 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
18995 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18996 '''
18997 # map input types to rpc msg
18998 _params = dict()
18999 msg = dict(type='Storage', request='AddToUnit', version=3, params=_params)
19000 _params['storages'] = storages
19001 reply = await self.rpc(msg)
19002 return reply
19003
19004
19005
19006 @ReturnMapping(None)
19007 async def CreatePool(self, attrs, name, provider):
19008 '''
19009 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
19010 name : str
19011 provider : str
19012 Returns -> None
19013 '''
19014 # map input types to rpc msg
19015 _params = dict()
19016 msg = dict(type='Storage', request='CreatePool', version=3, params=_params)
19017 _params['attrs'] = attrs
19018 _params['name'] = name
19019 _params['provider'] = provider
19020 reply = await self.rpc(msg)
19021 return reply
19022
19023
19024
19025 @ReturnMapping(FilesystemDetailsListResults)
19026 async def ListFilesystems(self, filters):
19027 '''
19028 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
19029 Returns -> typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
19030 '''
19031 # map input types to rpc msg
19032 _params = dict()
19033 msg = dict(type='Storage', request='ListFilesystems', version=3, params=_params)
19034 _params['filters'] = filters
19035 reply = await self.rpc(msg)
19036 return reply
19037
19038
19039
19040 @ReturnMapping(StoragePoolsResults)
19041 async def ListPools(self, filters):
19042 '''
19043 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
19044 Returns -> typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
19045 '''
19046 # map input types to rpc msg
19047 _params = dict()
19048 msg = dict(type='Storage', request='ListPools', version=3, params=_params)
19049 _params['filters'] = filters
19050 reply = await self.rpc(msg)
19051 return reply
19052
19053
19054
19055 @ReturnMapping(StorageDetailsListResults)
19056 async def ListStorageDetails(self, filters):
19057 '''
19058 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
19059 Returns -> typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
19060 '''
19061 # map input types to rpc msg
19062 _params = dict()
19063 msg = dict(type='Storage', request='ListStorageDetails', version=3, params=_params)
19064 _params['filters'] = filters
19065 reply = await self.rpc(msg)
19066 return reply
19067
19068
19069
19070 @ReturnMapping(VolumeDetailsListResults)
19071 async def ListVolumes(self, filters):
19072 '''
19073 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
19074 Returns -> typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
19075 '''
19076 # map input types to rpc msg
19077 _params = dict()
19078 msg = dict(type='Storage', request='ListVolumes', version=3, params=_params)
19079 _params['filters'] = filters
19080 reply = await self.rpc(msg)
19081 return reply
19082
19083
19084
19085 @ReturnMapping(StorageDetailsResults)
19086 async def StorageDetails(self, entities):
19087 '''
19088 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19089 Returns -> typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
19090 '''
19091 # map input types to rpc msg
19092 _params = dict()
19093 msg = dict(type='Storage', request='StorageDetails', version=3, params=_params)
19094 _params['entities'] = entities
19095 reply = await self.rpc(msg)
19096 return reply
19097
19098
19099 class StorageProvisionerFacade(Type):
19100 name = 'StorageProvisioner'
19101 version = 3
19102 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
19103 'properties': {'BusAddress': {'type': 'string'},
19104 'DeviceLinks': {'items': {'type': 'string'},
19105 'type': 'array'},
19106 'DeviceName': {'type': 'string'},
19107 'FilesystemType': {'type': 'string'},
19108 'HardwareId': {'type': 'string'},
19109 'InUse': {'type': 'boolean'},
19110 'Label': {'type': 'string'},
19111 'MountPoint': {'type': 'string'},
19112 'Size': {'type': 'integer'},
19113 'UUID': {'type': 'string'}},
19114 'required': ['DeviceName',
19115 'DeviceLinks',
19116 'Label',
19117 'UUID',
19118 'HardwareId',
19119 'BusAddress',
19120 'Size',
19121 'FilesystemType',
19122 'InUse',
19123 'MountPoint'],
19124 'type': 'object'},
19125 'BlockDeviceResult': {'additionalProperties': False,
19126 'properties': {'error': {'$ref': '#/definitions/Error'},
19127 'result': {'$ref': '#/definitions/BlockDevice'}},
19128 'required': ['result'],
19129 'type': 'object'},
19130 'BlockDeviceResults': {'additionalProperties': False,
19131 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
19132 'type': 'array'}},
19133 'type': 'object'},
19134 'Entities': {'additionalProperties': False,
19135 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
19136 'type': 'array'}},
19137 'required': ['entities'],
19138 'type': 'object'},
19139 'Entity': {'additionalProperties': False,
19140 'properties': {'tag': {'type': 'string'}},
19141 'required': ['tag'],
19142 'type': 'object'},
19143 'EntityStatusArgs': {'additionalProperties': False,
19144 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
19145 'type': 'object'}},
19146 'type': 'object'},
19147 'info': {'type': 'string'},
19148 'status': {'type': 'string'},
19149 'tag': {'type': 'string'}},
19150 'required': ['tag',
19151 'status',
19152 'info',
19153 'data'],
19154 'type': 'object'},
19155 'Error': {'additionalProperties': False,
19156 'properties': {'code': {'type': 'string'},
19157 'info': {'$ref': '#/definitions/ErrorInfo'},
19158 'message': {'type': 'string'}},
19159 'required': ['message', 'code'],
19160 'type': 'object'},
19161 'ErrorInfo': {'additionalProperties': False,
19162 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
19163 'macaroon-path': {'type': 'string'}},
19164 'type': 'object'},
19165 'ErrorResult': {'additionalProperties': False,
19166 'properties': {'error': {'$ref': '#/definitions/Error'}},
19167 'type': 'object'},
19168 'ErrorResults': {'additionalProperties': False,
19169 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
19170 'type': 'array'}},
19171 'required': ['results'],
19172 'type': 'object'},
19173 'Filesystem': {'additionalProperties': False,
19174 'properties': {'filesystem-tag': {'type': 'string'},
19175 'info': {'$ref': '#/definitions/FilesystemInfo'},
19176 'volume-tag': {'type': 'string'}},
19177 'required': ['filesystem-tag', 'info'],
19178 'type': 'object'},
19179 'FilesystemAttachment': {'additionalProperties': False,
19180 'properties': {'filesystem-tag': {'type': 'string'},
19181 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
19182 'machine-tag': {'type': 'string'}},
19183 'required': ['filesystem-tag',
19184 'machine-tag',
19185 'info'],
19186 'type': 'object'},
19187 'FilesystemAttachmentInfo': {'additionalProperties': False,
19188 'properties': {'mount-point': {'type': 'string'},
19189 'read-only': {'type': 'boolean'}},
19190 'type': 'object'},
19191 'FilesystemAttachmentParams': {'additionalProperties': False,
19192 'properties': {'filesystem-id': {'type': 'string'},
19193 'filesystem-tag': {'type': 'string'},
19194 'instance-id': {'type': 'string'},
19195 'machine-tag': {'type': 'string'},
19196 'mount-point': {'type': 'string'},
19197 'provider': {'type': 'string'},
19198 'read-only': {'type': 'boolean'}},
19199 'required': ['filesystem-tag',
19200 'machine-tag',
19201 'provider'],
19202 'type': 'object'},
19203 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
19204 'properties': {'error': {'$ref': '#/definitions/Error'},
19205 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
19206 'required': ['result'],
19207 'type': 'object'},
19208 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
19209 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
19210 'type': 'array'}},
19211 'type': 'object'},
19212 'FilesystemAttachmentResult': {'additionalProperties': False,
19213 'properties': {'error': {'$ref': '#/definitions/Error'},
19214 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
19215 'required': ['result'],
19216 'type': 'object'},
19217 'FilesystemAttachmentResults': {'additionalProperties': False,
19218 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
19219 'type': 'array'}},
19220 'type': 'object'},
19221 'FilesystemAttachments': {'additionalProperties': False,
19222 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
19223 'type': 'array'}},
19224 'required': ['filesystem-attachments'],
19225 'type': 'object'},
19226 'FilesystemInfo': {'additionalProperties': False,
19227 'properties': {'filesystem-id': {'type': 'string'},
19228 'size': {'type': 'integer'}},
19229 'required': ['filesystem-id', 'size'],
19230 'type': 'object'},
19231 'FilesystemParams': {'additionalProperties': False,
19232 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
19233 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
19234 'type': 'object'}},
19235 'type': 'object'},
19236 'filesystem-tag': {'type': 'string'},
19237 'provider': {'type': 'string'},
19238 'size': {'type': 'integer'},
19239 'tags': {'patternProperties': {'.*': {'type': 'string'}},
19240 'type': 'object'},
19241 'volume-tag': {'type': 'string'}},
19242 'required': ['filesystem-tag',
19243 'size',
19244 'provider'],
19245 'type': 'object'},
19246 'FilesystemParamsResult': {'additionalProperties': False,
19247 'properties': {'error': {'$ref': '#/definitions/Error'},
19248 'result': {'$ref': '#/definitions/FilesystemParams'}},
19249 'required': ['result'],
19250 'type': 'object'},
19251 'FilesystemParamsResults': {'additionalProperties': False,
19252 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
19253 'type': 'array'}},
19254 'type': 'object'},
19255 'FilesystemResult': {'additionalProperties': False,
19256 'properties': {'error': {'$ref': '#/definitions/Error'},
19257 'result': {'$ref': '#/definitions/Filesystem'}},
19258 'required': ['result'],
19259 'type': 'object'},
19260 'FilesystemResults': {'additionalProperties': False,
19261 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
19262 'type': 'array'}},
19263 'type': 'object'},
19264 'Filesystems': {'additionalProperties': False,
19265 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
19266 'type': 'array'}},
19267 'required': ['filesystems'],
19268 'type': 'object'},
19269 'LifeResult': {'additionalProperties': False,
19270 'properties': {'error': {'$ref': '#/definitions/Error'},
19271 'life': {'type': 'string'}},
19272 'required': ['life'],
19273 'type': 'object'},
19274 'LifeResults': {'additionalProperties': False,
19275 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
19276 'type': 'array'}},
19277 'required': ['results'],
19278 'type': 'object'},
19279 'Macaroon': {'additionalProperties': False, 'type': 'object'},
19280 'MachineStorageId': {'additionalProperties': False,
19281 'properties': {'attachment-tag': {'type': 'string'},
19282 'machine-tag': {'type': 'string'}},
19283 'required': ['machine-tag',
19284 'attachment-tag'],
19285 'type': 'object'},
19286 'MachineStorageIds': {'additionalProperties': False,
19287 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
19288 'type': 'array'}},
19289 'required': ['ids'],
19290 'type': 'object'},
19291 'MachineStorageIdsWatchResult': {'additionalProperties': False,
19292 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
19293 'type': 'array'},
19294 'error': {'$ref': '#/definitions/Error'},
19295 'watcher-id': {'type': 'string'}},
19296 'required': ['watcher-id',
19297 'changes'],
19298 'type': 'object'},
19299 'MachineStorageIdsWatchResults': {'additionalProperties': False,
19300 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
19301 'type': 'array'}},
19302 'required': ['results'],
19303 'type': 'object'},
19304 'NotifyWatchResult': {'additionalProperties': False,
19305 'properties': {'NotifyWatcherId': {'type': 'string'},
19306 'error': {'$ref': '#/definitions/Error'}},
19307 'required': ['NotifyWatcherId'],
19308 'type': 'object'},
19309 'NotifyWatchResults': {'additionalProperties': False,
19310 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
19311 'type': 'array'}},
19312 'required': ['results'],
19313 'type': 'object'},
19314 'SetStatus': {'additionalProperties': False,
19315 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
19316 'type': 'array'}},
19317 'required': ['entities'],
19318 'type': 'object'},
19319 'StringResult': {'additionalProperties': False,
19320 'properties': {'error': {'$ref': '#/definitions/Error'},
19321 'result': {'type': 'string'}},
19322 'required': ['result'],
19323 'type': 'object'},
19324 'StringResults': {'additionalProperties': False,
19325 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
19326 'type': 'array'}},
19327 'required': ['results'],
19328 'type': 'object'},
19329 'StringsWatchResult': {'additionalProperties': False,
19330 'properties': {'changes': {'items': {'type': 'string'},
19331 'type': 'array'},
19332 'error': {'$ref': '#/definitions/Error'},
19333 'watcher-id': {'type': 'string'}},
19334 'required': ['watcher-id'],
19335 'type': 'object'},
19336 'StringsWatchResults': {'additionalProperties': False,
19337 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
19338 'type': 'array'}},
19339 'required': ['results'],
19340 'type': 'object'},
19341 'Volume': {'additionalProperties': False,
19342 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
19343 'volume-tag': {'type': 'string'}},
19344 'required': ['volume-tag', 'info'],
19345 'type': 'object'},
19346 'VolumeAttachment': {'additionalProperties': False,
19347 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
19348 'machine-tag': {'type': 'string'},
19349 'volume-tag': {'type': 'string'}},
19350 'required': ['volume-tag',
19351 'machine-tag',
19352 'info'],
19353 'type': 'object'},
19354 'VolumeAttachmentInfo': {'additionalProperties': False,
19355 'properties': {'bus-address': {'type': 'string'},
19356 'device-link': {'type': 'string'},
19357 'device-name': {'type': 'string'},
19358 'read-only': {'type': 'boolean'}},
19359 'type': 'object'},
19360 'VolumeAttachmentParams': {'additionalProperties': False,
19361 'properties': {'instance-id': {'type': 'string'},
19362 'machine-tag': {'type': 'string'},
19363 'provider': {'type': 'string'},
19364 'read-only': {'type': 'boolean'},
19365 'volume-id': {'type': 'string'},
19366 'volume-tag': {'type': 'string'}},
19367 'required': ['volume-tag',
19368 'machine-tag',
19369 'provider'],
19370 'type': 'object'},
19371 'VolumeAttachmentParamsResult': {'additionalProperties': False,
19372 'properties': {'error': {'$ref': '#/definitions/Error'},
19373 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
19374 'required': ['result'],
19375 'type': 'object'},
19376 'VolumeAttachmentParamsResults': {'additionalProperties': False,
19377 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
19378 'type': 'array'}},
19379 'type': 'object'},
19380 'VolumeAttachmentResult': {'additionalProperties': False,
19381 'properties': {'error': {'$ref': '#/definitions/Error'},
19382 'result': {'$ref': '#/definitions/VolumeAttachment'}},
19383 'required': ['result'],
19384 'type': 'object'},
19385 'VolumeAttachmentResults': {'additionalProperties': False,
19386 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
19387 'type': 'array'}},
19388 'type': 'object'},
19389 'VolumeAttachments': {'additionalProperties': False,
19390 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
19391 'type': 'array'}},
19392 'required': ['volume-attachments'],
19393 'type': 'object'},
19394 'VolumeInfo': {'additionalProperties': False,
19395 'properties': {'hardware-id': {'type': 'string'},
19396 'persistent': {'type': 'boolean'},
19397 'size': {'type': 'integer'},
19398 'volume-id': {'type': 'string'}},
19399 'required': ['volume-id', 'size', 'persistent'],
19400 'type': 'object'},
19401 'VolumeParams': {'additionalProperties': False,
19402 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
19403 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
19404 'type': 'object'}},
19405 'type': 'object'},
19406 'provider': {'type': 'string'},
19407 'size': {'type': 'integer'},
19408 'tags': {'patternProperties': {'.*': {'type': 'string'}},
19409 'type': 'object'},
19410 'volume-tag': {'type': 'string'}},
19411 'required': ['volume-tag',
19412 'size',
19413 'provider'],
19414 'type': 'object'},
19415 'VolumeParamsResult': {'additionalProperties': False,
19416 'properties': {'error': {'$ref': '#/definitions/Error'},
19417 'result': {'$ref': '#/definitions/VolumeParams'}},
19418 'required': ['result'],
19419 'type': 'object'},
19420 'VolumeParamsResults': {'additionalProperties': False,
19421 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
19422 'type': 'array'}},
19423 'type': 'object'},
19424 'VolumeResult': {'additionalProperties': False,
19425 'properties': {'error': {'$ref': '#/definitions/Error'},
19426 'result': {'$ref': '#/definitions/Volume'}},
19427 'required': ['result'],
19428 'type': 'object'},
19429 'VolumeResults': {'additionalProperties': False,
19430 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
19431 'type': 'array'}},
19432 'type': 'object'},
19433 'Volumes': {'additionalProperties': False,
19434 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
19435 'type': 'array'}},
19436 'required': ['volumes'],
19437 'type': 'object'}},
19438 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
19439 'Result': {'$ref': '#/definitions/LifeResults'}},
19440 'type': 'object'},
19441 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19442 'Result': {'$ref': '#/definitions/ErrorResults'}},
19443 'type': 'object'},
19444 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
19445 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
19446 'type': 'object'},
19447 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
19448 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
19449 'type': 'object'},
19450 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19451 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
19452 'type': 'object'},
19453 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19454 'Result': {'$ref': '#/definitions/FilesystemResults'}},
19455 'type': 'object'},
19456 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19457 'Result': {'$ref': '#/definitions/StringResults'}},
19458 'type': 'object'},
19459 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19460 'Result': {'$ref': '#/definitions/LifeResults'}},
19461 'type': 'object'},
19462 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19463 'Result': {'$ref': '#/definitions/ErrorResults'}},
19464 'type': 'object'},
19465 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
19466 'Result': {'$ref': '#/definitions/ErrorResults'}},
19467 'type': 'object'},
19468 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
19469 'Result': {'$ref': '#/definitions/ErrorResults'}},
19470 'type': 'object'},
19471 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
19472 'Result': {'$ref': '#/definitions/ErrorResults'}},
19473 'type': 'object'},
19474 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19475 'Result': {'$ref': '#/definitions/ErrorResults'}},
19476 'type': 'object'},
19477 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
19478 'Result': {'$ref': '#/definitions/ErrorResults'}},
19479 'type': 'object'},
19480 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
19481 'Result': {'$ref': '#/definitions/ErrorResults'}},
19482 'type': 'object'},
19483 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19484 'Result': {'$ref': '#/definitions/ErrorResults'}},
19485 'type': 'object'},
19486 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
19487 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
19488 'type': 'object'},
19489 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
19490 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
19491 'type': 'object'},
19492 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
19493 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
19494 'type': 'object'},
19495 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19496 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
19497 'type': 'object'},
19498 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19499 'Result': {'$ref': '#/definitions/VolumeResults'}},
19500 'type': 'object'},
19501 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19502 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19503 'type': 'object'},
19504 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19505 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
19506 'type': 'object'},
19507 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19508 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19509 'type': 'object'},
19510 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19511 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19512 'type': 'object'},
19513 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19514 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
19515 'type': 'object'},
19516 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19517 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19518 'type': 'object'}},
19519 'type': 'object'}
19520
19521
19522 @ReturnMapping(LifeResults)
19523 async def AttachmentLife(self, ids):
19524 '''
19525 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
19526 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
19527 '''
19528 # map input types to rpc msg
19529 _params = dict()
19530 msg = dict(type='StorageProvisioner', request='AttachmentLife', version=3, params=_params)
19531 _params['ids'] = ids
19532 reply = await self.rpc(msg)
19533 return reply
19534
19535
19536
19537 @ReturnMapping(ErrorResults)
19538 async def EnsureDead(self, entities):
19539 '''
19540 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19541 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19542 '''
19543 # map input types to rpc msg
19544 _params = dict()
19545 msg = dict(type='StorageProvisioner', request='EnsureDead', version=3, params=_params)
19546 _params['entities'] = entities
19547 reply = await self.rpc(msg)
19548 return reply
19549
19550
19551
19552 @ReturnMapping(FilesystemAttachmentParamsResults)
19553 async def FilesystemAttachmentParams(self, ids):
19554 '''
19555 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
19556 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
19557 '''
19558 # map input types to rpc msg
19559 _params = dict()
19560 msg = dict(type='StorageProvisioner', request='FilesystemAttachmentParams', version=3, params=_params)
19561 _params['ids'] = ids
19562 reply = await self.rpc(msg)
19563 return reply
19564
19565
19566
19567 @ReturnMapping(FilesystemAttachmentResults)
19568 async def FilesystemAttachments(self, ids):
19569 '''
19570 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
19571 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
19572 '''
19573 # map input types to rpc msg
19574 _params = dict()
19575 msg = dict(type='StorageProvisioner', request='FilesystemAttachments', version=3, params=_params)
19576 _params['ids'] = ids
19577 reply = await self.rpc(msg)
19578 return reply
19579
19580
19581
19582 @ReturnMapping(FilesystemParamsResults)
19583 async def FilesystemParams(self, entities):
19584 '''
19585 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19586 Returns -> typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
19587 '''
19588 # map input types to rpc msg
19589 _params = dict()
19590 msg = dict(type='StorageProvisioner', request='FilesystemParams', version=3, params=_params)
19591 _params['entities'] = entities
19592 reply = await self.rpc(msg)
19593 return reply
19594
19595
19596
19597 @ReturnMapping(FilesystemResults)
19598 async def Filesystems(self, entities):
19599 '''
19600 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19601 Returns -> typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
19602 '''
19603 # map input types to rpc msg
19604 _params = dict()
19605 msg = dict(type='StorageProvisioner', request='Filesystems', version=3, params=_params)
19606 _params['entities'] = entities
19607 reply = await self.rpc(msg)
19608 return reply
19609
19610
19611
19612 @ReturnMapping(StringResults)
19613 async def InstanceId(self, entities):
19614 '''
19615 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19616 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19617 '''
19618 # map input types to rpc msg
19619 _params = dict()
19620 msg = dict(type='StorageProvisioner', request='InstanceId', version=3, params=_params)
19621 _params['entities'] = entities
19622 reply = await self.rpc(msg)
19623 return reply
19624
19625
19626
19627 @ReturnMapping(LifeResults)
19628 async def Life(self, entities):
19629 '''
19630 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19631 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
19632 '''
19633 # map input types to rpc msg
19634 _params = dict()
19635 msg = dict(type='StorageProvisioner', request='Life', version=3, params=_params)
19636 _params['entities'] = entities
19637 reply = await self.rpc(msg)
19638 return reply
19639
19640
19641
19642 @ReturnMapping(ErrorResults)
19643 async def Remove(self, entities):
19644 '''
19645 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19646 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19647 '''
19648 # map input types to rpc msg
19649 _params = dict()
19650 msg = dict(type='StorageProvisioner', request='Remove', version=3, params=_params)
19651 _params['entities'] = entities
19652 reply = await self.rpc(msg)
19653 return reply
19654
19655
19656
19657 @ReturnMapping(ErrorResults)
19658 async def RemoveAttachment(self, ids):
19659 '''
19660 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
19661 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19662 '''
19663 # map input types to rpc msg
19664 _params = dict()
19665 msg = dict(type='StorageProvisioner', request='RemoveAttachment', version=3, params=_params)
19666 _params['ids'] = ids
19667 reply = await self.rpc(msg)
19668 return reply
19669
19670
19671
19672 @ReturnMapping(ErrorResults)
19673 async def SetFilesystemAttachmentInfo(self, filesystem_attachments):
19674 '''
19675 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
19676 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19677 '''
19678 # map input types to rpc msg
19679 _params = dict()
19680 msg = dict(type='StorageProvisioner', request='SetFilesystemAttachmentInfo', version=3, params=_params)
19681 _params['filesystem-attachments'] = filesystem_attachments
19682 reply = await self.rpc(msg)
19683 return reply
19684
19685
19686
19687 @ReturnMapping(ErrorResults)
19688 async def SetFilesystemInfo(self, filesystems):
19689 '''
19690 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
19691 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19692 '''
19693 # map input types to rpc msg
19694 _params = dict()
19695 msg = dict(type='StorageProvisioner', request='SetFilesystemInfo', version=3, params=_params)
19696 _params['filesystems'] = filesystems
19697 reply = await self.rpc(msg)
19698 return reply
19699
19700
19701
19702 @ReturnMapping(ErrorResults)
19703 async def SetStatus(self, entities):
19704 '''
19705 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
19706 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19707 '''
19708 # map input types to rpc msg
19709 _params = dict()
19710 msg = dict(type='StorageProvisioner', request='SetStatus', version=3, params=_params)
19711 _params['entities'] = entities
19712 reply = await self.rpc(msg)
19713 return reply
19714
19715
19716
19717 @ReturnMapping(ErrorResults)
19718 async def SetVolumeAttachmentInfo(self, volume_attachments):
19719 '''
19720 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
19721 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19722 '''
19723 # map input types to rpc msg
19724 _params = dict()
19725 msg = dict(type='StorageProvisioner', request='SetVolumeAttachmentInfo', version=3, params=_params)
19726 _params['volume-attachments'] = volume_attachments
19727 reply = await self.rpc(msg)
19728 return reply
19729
19730
19731
19732 @ReturnMapping(ErrorResults)
19733 async def SetVolumeInfo(self, volumes):
19734 '''
19735 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
19736 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19737 '''
19738 # map input types to rpc msg
19739 _params = dict()
19740 msg = dict(type='StorageProvisioner', request='SetVolumeInfo', version=3, params=_params)
19741 _params['volumes'] = volumes
19742 reply = await self.rpc(msg)
19743 return reply
19744
19745
19746
19747 @ReturnMapping(ErrorResults)
19748 async def UpdateStatus(self, entities):
19749 '''
19750 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
19751 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19752 '''
19753 # map input types to rpc msg
19754 _params = dict()
19755 msg = dict(type='StorageProvisioner', request='UpdateStatus', version=3, params=_params)
19756 _params['entities'] = entities
19757 reply = await self.rpc(msg)
19758 return reply
19759
19760
19761
19762 @ReturnMapping(VolumeAttachmentParamsResults)
19763 async def VolumeAttachmentParams(self, ids):
19764 '''
19765 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
19766 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
19767 '''
19768 # map input types to rpc msg
19769 _params = dict()
19770 msg = dict(type='StorageProvisioner', request='VolumeAttachmentParams', version=3, params=_params)
19771 _params['ids'] = ids
19772 reply = await self.rpc(msg)
19773 return reply
19774
19775
19776
19777 @ReturnMapping(VolumeAttachmentResults)
19778 async def VolumeAttachments(self, ids):
19779 '''
19780 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
19781 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
19782 '''
19783 # map input types to rpc msg
19784 _params = dict()
19785 msg = dict(type='StorageProvisioner', request='VolumeAttachments', version=3, params=_params)
19786 _params['ids'] = ids
19787 reply = await self.rpc(msg)
19788 return reply
19789
19790
19791
19792 @ReturnMapping(BlockDeviceResults)
19793 async def VolumeBlockDevices(self, ids):
19794 '''
19795 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
19796 Returns -> typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
19797 '''
19798 # map input types to rpc msg
19799 _params = dict()
19800 msg = dict(type='StorageProvisioner', request='VolumeBlockDevices', version=3, params=_params)
19801 _params['ids'] = ids
19802 reply = await self.rpc(msg)
19803 return reply
19804
19805
19806
19807 @ReturnMapping(VolumeParamsResults)
19808 async def VolumeParams(self, entities):
19809 '''
19810 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19811 Returns -> typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
19812 '''
19813 # map input types to rpc msg
19814 _params = dict()
19815 msg = dict(type='StorageProvisioner', request='VolumeParams', version=3, params=_params)
19816 _params['entities'] = entities
19817 reply = await self.rpc(msg)
19818 return reply
19819
19820
19821
19822 @ReturnMapping(VolumeResults)
19823 async def Volumes(self, entities):
19824 '''
19825 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19826 Returns -> typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
19827 '''
19828 # map input types to rpc msg
19829 _params = dict()
19830 msg = dict(type='StorageProvisioner', request='Volumes', version=3, params=_params)
19831 _params['entities'] = entities
19832 reply = await self.rpc(msg)
19833 return reply
19834
19835
19836
19837 @ReturnMapping(NotifyWatchResults)
19838 async def WatchBlockDevices(self, entities):
19839 '''
19840 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19841 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
19842 '''
19843 # map input types to rpc msg
19844 _params = dict()
19845 msg = dict(type='StorageProvisioner', request='WatchBlockDevices', version=3, params=_params)
19846 _params['entities'] = entities
19847 reply = await self.rpc(msg)
19848 return reply
19849
19850
19851
19852 @ReturnMapping(MachineStorageIdsWatchResults)
19853 async def WatchFilesystemAttachments(self, entities):
19854 '''
19855 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19856 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
19857 '''
19858 # map input types to rpc msg
19859 _params = dict()
19860 msg = dict(type='StorageProvisioner', request='WatchFilesystemAttachments', version=3, params=_params)
19861 _params['entities'] = entities
19862 reply = await self.rpc(msg)
19863 return reply
19864
19865
19866
19867 @ReturnMapping(StringsWatchResults)
19868 async def WatchFilesystems(self, entities):
19869 '''
19870 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19871 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
19872 '''
19873 # map input types to rpc msg
19874 _params = dict()
19875 msg = dict(type='StorageProvisioner', request='WatchFilesystems', version=3, params=_params)
19876 _params['entities'] = entities
19877 reply = await self.rpc(msg)
19878 return reply
19879
19880
19881
19882 @ReturnMapping(NotifyWatchResults)
19883 async def WatchMachines(self, entities):
19884 '''
19885 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19886 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
19887 '''
19888 # map input types to rpc msg
19889 _params = dict()
19890 msg = dict(type='StorageProvisioner', request='WatchMachines', version=3, params=_params)
19891 _params['entities'] = entities
19892 reply = await self.rpc(msg)
19893 return reply
19894
19895
19896
19897 @ReturnMapping(MachineStorageIdsWatchResults)
19898 async def WatchVolumeAttachments(self, entities):
19899 '''
19900 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19901 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
19902 '''
19903 # map input types to rpc msg
19904 _params = dict()
19905 msg = dict(type='StorageProvisioner', request='WatchVolumeAttachments', version=3, params=_params)
19906 _params['entities'] = entities
19907 reply = await self.rpc(msg)
19908 return reply
19909
19910
19911
19912 @ReturnMapping(StringsWatchResults)
19913 async def WatchVolumes(self, entities):
19914 '''
19915 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19916 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
19917 '''
19918 # map input types to rpc msg
19919 _params = dict()
19920 msg = dict(type='StorageProvisioner', request='WatchVolumes', version=3, params=_params)
19921 _params['entities'] = entities
19922 reply = await self.rpc(msg)
19923 return reply
19924
19925
19926 class StringsWatcherFacade(Type):
19927 name = 'StringsWatcher'
19928 version = 1
19929 schema = {'definitions': {'Error': {'additionalProperties': False,
19930 'properties': {'code': {'type': 'string'},
19931 'info': {'$ref': '#/definitions/ErrorInfo'},
19932 'message': {'type': 'string'}},
19933 'required': ['message', 'code'],
19934 'type': 'object'},
19935 'ErrorInfo': {'additionalProperties': False,
19936 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
19937 'macaroon-path': {'type': 'string'}},
19938 'type': 'object'},
19939 'Macaroon': {'additionalProperties': False, 'type': 'object'},
19940 'StringsWatchResult': {'additionalProperties': False,
19941 'properties': {'changes': {'items': {'type': 'string'},
19942 'type': 'array'},
19943 'error': {'$ref': '#/definitions/Error'},
19944 'watcher-id': {'type': 'string'}},
19945 'required': ['watcher-id'],
19946 'type': 'object'}},
19947 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
19948 'type': 'object'},
19949 'Stop': {'type': 'object'}},
19950 'type': 'object'}
19951
19952
19953 @ReturnMapping(StringsWatchResult)
19954 async def Next(self):
19955 '''
19956
19957 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
19958 '''
19959 # map input types to rpc msg
19960 _params = dict()
19961 msg = dict(type='StringsWatcher', request='Next', version=1, params=_params)
19962
19963 reply = await self.rpc(msg)
19964 return reply
19965
19966
19967
19968 @ReturnMapping(None)
19969 async def Stop(self):
19970 '''
19971
19972 Returns -> None
19973 '''
19974 # map input types to rpc msg
19975 _params = dict()
19976 msg = dict(type='StringsWatcher', request='Stop', version=1, params=_params)
19977
19978 reply = await self.rpc(msg)
19979 return reply
19980
19981
19982 class SubnetsFacade(Type):
19983 name = 'Subnets'
19984 version = 2
19985 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
19986 'properties': {'space-tag': {'type': 'string'},
19987 'subnet-provider-id': {'type': 'string'},
19988 'subnet-tag': {'type': 'string'},
19989 'zones': {'items': {'type': 'string'},
19990 'type': 'array'}},
19991 'required': ['space-tag'],
19992 'type': 'object'},
19993 'AddSubnetsParams': {'additionalProperties': False,
19994 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
19995 'type': 'array'}},
19996 'required': ['subnets'],
19997 'type': 'object'},
19998 'Error': {'additionalProperties': False,
19999 'properties': {'code': {'type': 'string'},
20000 'info': {'$ref': '#/definitions/ErrorInfo'},
20001 'message': {'type': 'string'}},
20002 'required': ['message', 'code'],
20003 'type': 'object'},
20004 'ErrorInfo': {'additionalProperties': False,
20005 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20006 'macaroon-path': {'type': 'string'}},
20007 'type': 'object'},
20008 'ErrorResult': {'additionalProperties': False,
20009 'properties': {'error': {'$ref': '#/definitions/Error'}},
20010 'type': 'object'},
20011 'ErrorResults': {'additionalProperties': False,
20012 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
20013 'type': 'array'}},
20014 'required': ['results'],
20015 'type': 'object'},
20016 'ListSubnetsResults': {'additionalProperties': False,
20017 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
20018 'type': 'array'}},
20019 'required': ['results'],
20020 'type': 'object'},
20021 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20022 'SpaceResult': {'additionalProperties': False,
20023 'properties': {'error': {'$ref': '#/definitions/Error'},
20024 'tag': {'type': 'string'}},
20025 'required': ['tag'],
20026 'type': 'object'},
20027 'SpaceResults': {'additionalProperties': False,
20028 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'},
20029 'type': 'array'}},
20030 'required': ['results'],
20031 'type': 'object'},
20032 'Subnet': {'additionalProperties': False,
20033 'properties': {'cidr': {'type': 'string'},
20034 'life': {'type': 'string'},
20035 'provider-id': {'type': 'string'},
20036 'space-tag': {'type': 'string'},
20037 'status': {'type': 'string'},
20038 'vlan-tag': {'type': 'integer'},
20039 'zones': {'items': {'type': 'string'},
20040 'type': 'array'}},
20041 'required': ['cidr',
20042 'vlan-tag',
20043 'life',
20044 'space-tag',
20045 'zones'],
20046 'type': 'object'},
20047 'SubnetsFilters': {'additionalProperties': False,
20048 'properties': {'space-tag': {'type': 'string'},
20049 'zone': {'type': 'string'}},
20050 'type': 'object'},
20051 'ZoneResult': {'additionalProperties': False,
20052 'properties': {'available': {'type': 'boolean'},
20053 'error': {'$ref': '#/definitions/Error'},
20054 'name': {'type': 'string'}},
20055 'required': ['name', 'available'],
20056 'type': 'object'},
20057 'ZoneResults': {'additionalProperties': False,
20058 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'},
20059 'type': 'array'}},
20060 'required': ['results'],
20061 'type': 'object'}},
20062 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
20063 'Result': {'$ref': '#/definitions/ErrorResults'}},
20064 'type': 'object'},
20065 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
20066 'type': 'object'},
20067 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
20068 'type': 'object'},
20069 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
20070 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
20071 'type': 'object'}},
20072 'type': 'object'}
20073
20074
20075 @ReturnMapping(ErrorResults)
20076 async def AddSubnets(self, subnets):
20077 '''
20078 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
20079 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20080 '''
20081 # map input types to rpc msg
20082 _params = dict()
20083 msg = dict(type='Subnets', request='AddSubnets', version=2, params=_params)
20084 _params['subnets'] = subnets
20085 reply = await self.rpc(msg)
20086 return reply
20087
20088
20089
20090 @ReturnMapping(SpaceResults)
20091 async def AllSpaces(self):
20092 '''
20093
20094 Returns -> typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
20095 '''
20096 # map input types to rpc msg
20097 _params = dict()
20098 msg = dict(type='Subnets', request='AllSpaces', version=2, params=_params)
20099
20100 reply = await self.rpc(msg)
20101 return reply
20102
20103
20104
20105 @ReturnMapping(ZoneResults)
20106 async def AllZones(self):
20107 '''
20108
20109 Returns -> typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
20110 '''
20111 # map input types to rpc msg
20112 _params = dict()
20113 msg = dict(type='Subnets', request='AllZones', version=2, params=_params)
20114
20115 reply = await self.rpc(msg)
20116 return reply
20117
20118
20119
20120 @ReturnMapping(ListSubnetsResults)
20121 async def ListSubnets(self, space_tag, zone):
20122 '''
20123 space_tag : str
20124 zone : str
20125 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
20126 '''
20127 # map input types to rpc msg
20128 _params = dict()
20129 msg = dict(type='Subnets', request='ListSubnets', version=2, params=_params)
20130 _params['space-tag'] = space_tag
20131 _params['zone'] = zone
20132 reply = await self.rpc(msg)
20133 return reply
20134
20135
20136 class UndertakerFacade(Type):
20137 name = 'Undertaker'
20138 version = 1
20139 schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
20140 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
20141 'type': 'object'}},
20142 'type': 'object'},
20143 'info': {'type': 'string'},
20144 'status': {'type': 'string'},
20145 'tag': {'type': 'string'}},
20146 'required': ['tag',
20147 'status',
20148 'info',
20149 'data'],
20150 'type': 'object'},
20151 'Error': {'additionalProperties': False,
20152 'properties': {'code': {'type': 'string'},
20153 'info': {'$ref': '#/definitions/ErrorInfo'},
20154 'message': {'type': 'string'}},
20155 'required': ['message', 'code'],
20156 'type': 'object'},
20157 'ErrorInfo': {'additionalProperties': False,
20158 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20159 'macaroon-path': {'type': 'string'}},
20160 'type': 'object'},
20161 'ErrorResult': {'additionalProperties': False,
20162 'properties': {'error': {'$ref': '#/definitions/Error'}},
20163 'type': 'object'},
20164 'ErrorResults': {'additionalProperties': False,
20165 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
20166 'type': 'array'}},
20167 'required': ['results'],
20168 'type': 'object'},
20169 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20170 'ModelConfigResult': {'additionalProperties': False,
20171 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
20172 'type': 'object'}},
20173 'type': 'object'}},
20174 'required': ['config'],
20175 'type': 'object'},
20176 'NotifyWatchResult': {'additionalProperties': False,
20177 'properties': {'NotifyWatcherId': {'type': 'string'},
20178 'error': {'$ref': '#/definitions/Error'}},
20179 'required': ['NotifyWatcherId'],
20180 'type': 'object'},
20181 'NotifyWatchResults': {'additionalProperties': False,
20182 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
20183 'type': 'array'}},
20184 'required': ['results'],
20185 'type': 'object'},
20186 'SetStatus': {'additionalProperties': False,
20187 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
20188 'type': 'array'}},
20189 'required': ['entities'],
20190 'type': 'object'},
20191 'UndertakerModelInfo': {'additionalProperties': False,
20192 'properties': {'global-name': {'type': 'string'},
20193 'is-system': {'type': 'boolean'},
20194 'life': {'type': 'string'},
20195 'name': {'type': 'string'},
20196 'uuid': {'type': 'string'}},
20197 'required': ['uuid',
20198 'name',
20199 'global-name',
20200 'is-system',
20201 'life'],
20202 'type': 'object'},
20203 'UndertakerModelInfoResult': {'additionalProperties': False,
20204 'properties': {'error': {'$ref': '#/definitions/Error'},
20205 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
20206 'required': ['result'],
20207 'type': 'object'}},
20208 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
20209 'type': 'object'},
20210 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
20211 'type': 'object'},
20212 'ProcessDyingModel': {'type': 'object'},
20213 'RemoveModel': {'type': 'object'},
20214 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
20215 'Result': {'$ref': '#/definitions/ErrorResults'}},
20216 'type': 'object'},
20217 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
20218 'Result': {'$ref': '#/definitions/ErrorResults'}},
20219 'type': 'object'},
20220 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
20221 'type': 'object'}},
20222 'type': 'object'}
20223
20224
20225 @ReturnMapping(ModelConfigResult)
20226 async def ModelConfig(self):
20227 '''
20228
20229 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
20230 '''
20231 # map input types to rpc msg
20232 _params = dict()
20233 msg = dict(type='Undertaker', request='ModelConfig', version=1, params=_params)
20234
20235 reply = await self.rpc(msg)
20236 return reply
20237
20238
20239
20240 @ReturnMapping(UndertakerModelInfoResult)
20241 async def ModelInfo(self):
20242 '''
20243
20244 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
20245 '''
20246 # map input types to rpc msg
20247 _params = dict()
20248 msg = dict(type='Undertaker', request='ModelInfo', version=1, params=_params)
20249
20250 reply = await self.rpc(msg)
20251 return reply
20252
20253
20254
20255 @ReturnMapping(None)
20256 async def ProcessDyingModel(self):
20257 '''
20258
20259 Returns -> None
20260 '''
20261 # map input types to rpc msg
20262 _params = dict()
20263 msg = dict(type='Undertaker', request='ProcessDyingModel', version=1, params=_params)
20264
20265 reply = await self.rpc(msg)
20266 return reply
20267
20268
20269
20270 @ReturnMapping(None)
20271 async def RemoveModel(self):
20272 '''
20273
20274 Returns -> None
20275 '''
20276 # map input types to rpc msg
20277 _params = dict()
20278 msg = dict(type='Undertaker', request='RemoveModel', version=1, params=_params)
20279
20280 reply = await self.rpc(msg)
20281 return reply
20282
20283
20284
20285 @ReturnMapping(ErrorResults)
20286 async def SetStatus(self, entities):
20287 '''
20288 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20289 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20290 '''
20291 # map input types to rpc msg
20292 _params = dict()
20293 msg = dict(type='Undertaker', request='SetStatus', version=1, params=_params)
20294 _params['entities'] = entities
20295 reply = await self.rpc(msg)
20296 return reply
20297
20298
20299
20300 @ReturnMapping(ErrorResults)
20301 async def UpdateStatus(self, entities):
20302 '''
20303 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20304 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20305 '''
20306 # map input types to rpc msg
20307 _params = dict()
20308 msg = dict(type='Undertaker', request='UpdateStatus', version=1, params=_params)
20309 _params['entities'] = entities
20310 reply = await self.rpc(msg)
20311 return reply
20312
20313
20314
20315 @ReturnMapping(NotifyWatchResults)
20316 async def WatchModelResources(self):
20317 '''
20318
20319 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20320 '''
20321 # map input types to rpc msg
20322 _params = dict()
20323 msg = dict(type='Undertaker', request='WatchModelResources', version=1, params=_params)
20324
20325 reply = await self.rpc(msg)
20326 return reply
20327
20328
20329 class UnitAssignerFacade(Type):
20330 name = 'UnitAssigner'
20331 version = 1
20332 schema = {'definitions': {'Entities': {'additionalProperties': False,
20333 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20334 'type': 'array'}},
20335 'required': ['entities'],
20336 'type': 'object'},
20337 'Entity': {'additionalProperties': False,
20338 'properties': {'tag': {'type': 'string'}},
20339 'required': ['tag'],
20340 'type': 'object'},
20341 'EntityStatusArgs': {'additionalProperties': False,
20342 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
20343 'type': 'object'}},
20344 'type': 'object'},
20345 'info': {'type': 'string'},
20346 'status': {'type': 'string'},
20347 'tag': {'type': 'string'}},
20348 'required': ['tag',
20349 'status',
20350 'info',
20351 'data'],
20352 'type': 'object'},
20353 'Error': {'additionalProperties': False,
20354 'properties': {'code': {'type': 'string'},
20355 'info': {'$ref': '#/definitions/ErrorInfo'},
20356 'message': {'type': 'string'}},
20357 'required': ['message', 'code'],
20358 'type': 'object'},
20359 'ErrorInfo': {'additionalProperties': False,
20360 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20361 'macaroon-path': {'type': 'string'}},
20362 'type': 'object'},
20363 'ErrorResult': {'additionalProperties': False,
20364 'properties': {'error': {'$ref': '#/definitions/Error'}},
20365 'type': 'object'},
20366 'ErrorResults': {'additionalProperties': False,
20367 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
20368 'type': 'array'}},
20369 'required': ['results'],
20370 'type': 'object'},
20371 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20372 'SetStatus': {'additionalProperties': False,
20373 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
20374 'type': 'array'}},
20375 'required': ['entities'],
20376 'type': 'object'},
20377 'StringsWatchResult': {'additionalProperties': False,
20378 'properties': {'changes': {'items': {'type': 'string'},
20379 'type': 'array'},
20380 'error': {'$ref': '#/definitions/Error'},
20381 'watcher-id': {'type': 'string'}},
20382 'required': ['watcher-id'],
20383 'type': 'object'}},
20384 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20385 'Result': {'$ref': '#/definitions/ErrorResults'}},
20386 'type': 'object'},
20387 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
20388 'Result': {'$ref': '#/definitions/ErrorResults'}},
20389 'type': 'object'},
20390 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
20391 'type': 'object'}},
20392 'type': 'object'}
20393
20394
20395 @ReturnMapping(ErrorResults)
20396 async def AssignUnits(self, entities):
20397 '''
20398 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20399 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20400 '''
20401 # map input types to rpc msg
20402 _params = dict()
20403 msg = dict(type='UnitAssigner', request='AssignUnits', version=1, params=_params)
20404 _params['entities'] = entities
20405 reply = await self.rpc(msg)
20406 return reply
20407
20408
20409
20410 @ReturnMapping(ErrorResults)
20411 async def SetAgentStatus(self, entities):
20412 '''
20413 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20414 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20415 '''
20416 # map input types to rpc msg
20417 _params = dict()
20418 msg = dict(type='UnitAssigner', request='SetAgentStatus', version=1, params=_params)
20419 _params['entities'] = entities
20420 reply = await self.rpc(msg)
20421 return reply
20422
20423
20424
20425 @ReturnMapping(StringsWatchResult)
20426 async def WatchUnitAssignments(self):
20427 '''
20428
20429 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
20430 '''
20431 # map input types to rpc msg
20432 _params = dict()
20433 msg = dict(type='UnitAssigner', request='WatchUnitAssignments', version=1, params=_params)
20434
20435 reply = await self.rpc(msg)
20436 return reply
20437
20438
20439 class UniterFacade(Type):
20440 name = 'Uniter'
20441 version = 4
20442 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
20443 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
20444 'type': 'array'},
20445 'type': 'array'}},
20446 'required': ['servers'],
20447 'type': 'object'},
20448 'Action': {'additionalProperties': False,
20449 'properties': {'name': {'type': 'string'},
20450 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
20451 'type': 'object'}},
20452 'type': 'object'},
20453 'receiver': {'type': 'string'},
20454 'tag': {'type': 'string'}},
20455 'required': ['tag', 'receiver', 'name'],
20456 'type': 'object'},
20457 'ActionExecutionResult': {'additionalProperties': False,
20458 'properties': {'action-tag': {'type': 'string'},
20459 'message': {'type': 'string'},
20460 'results': {'patternProperties': {'.*': {'additionalProperties': True,
20461 'type': 'object'}},
20462 'type': 'object'},
20463 'status': {'type': 'string'}},
20464 'required': ['action-tag', 'status'],
20465 'type': 'object'},
20466 'ActionExecutionResults': {'additionalProperties': False,
20467 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
20468 'type': 'array'}},
20469 'type': 'object'},
20470 'ActionResult': {'additionalProperties': False,
20471 'properties': {'action': {'$ref': '#/definitions/Action'},
20472 'completed': {'format': 'date-time',
20473 'type': 'string'},
20474 'enqueued': {'format': 'date-time',
20475 'type': 'string'},
20476 'error': {'$ref': '#/definitions/Error'},
20477 'message': {'type': 'string'},
20478 'output': {'patternProperties': {'.*': {'additionalProperties': True,
20479 'type': 'object'}},
20480 'type': 'object'},
20481 'started': {'format': 'date-time',
20482 'type': 'string'},
20483 'status': {'type': 'string'}},
20484 'type': 'object'},
20485 'ActionResults': {'additionalProperties': False,
20486 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
20487 'type': 'array'}},
20488 'type': 'object'},
20489 'Address': {'additionalProperties': False,
20490 'properties': {'scope': {'type': 'string'},
20491 'space-name': {'type': 'string'},
20492 'type': {'type': 'string'},
20493 'value': {'type': 'string'}},
20494 'required': ['value', 'type', 'scope'],
20495 'type': 'object'},
20496 'ApplicationStatusResult': {'additionalProperties': False,
20497 'properties': {'application': {'$ref': '#/definitions/StatusResult'},
20498 'error': {'$ref': '#/definitions/Error'},
20499 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
20500 'type': 'object'}},
20501 'required': ['application',
20502 'units'],
20503 'type': 'object'},
20504 'ApplicationStatusResults': {'additionalProperties': False,
20505 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
20506 'type': 'array'}},
20507 'required': ['results'],
20508 'type': 'object'},
20509 'BoolResult': {'additionalProperties': False,
20510 'properties': {'error': {'$ref': '#/definitions/Error'},
20511 'result': {'type': 'boolean'}},
20512 'required': ['result'],
20513 'type': 'object'},
20514 'BoolResults': {'additionalProperties': False,
20515 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
20516 'type': 'array'}},
20517 'required': ['results'],
20518 'type': 'object'},
20519 'BytesResult': {'additionalProperties': False,
20520 'properties': {'result': {'items': {'type': 'integer'},
20521 'type': 'array'}},
20522 'required': ['result'],
20523 'type': 'object'},
20524 'CharmRelation': {'additionalProperties': False,
20525 'properties': {'interface': {'type': 'string'},
20526 'limit': {'type': 'integer'},
20527 'name': {'type': 'string'},
20528 'optional': {'type': 'boolean'},
20529 'role': {'type': 'string'},
20530 'scope': {'type': 'string'}},
20531 'required': ['name',
20532 'role',
20533 'interface',
20534 'optional',
20535 'limit',
20536 'scope'],
20537 'type': 'object'},
20538 'CharmURL': {'additionalProperties': False,
20539 'properties': {'url': {'type': 'string'}},
20540 'required': ['url'],
20541 'type': 'object'},
20542 'CharmURLs': {'additionalProperties': False,
20543 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'},
20544 'type': 'array'}},
20545 'required': ['urls'],
20546 'type': 'object'},
20547 'ConfigSettingsResult': {'additionalProperties': False,
20548 'properties': {'error': {'$ref': '#/definitions/Error'},
20549 'settings': {'patternProperties': {'.*': {'additionalProperties': True,
20550 'type': 'object'}},
20551 'type': 'object'}},
20552 'required': ['settings'],
20553 'type': 'object'},
20554 'ConfigSettingsResults': {'additionalProperties': False,
20555 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
20556 'type': 'array'}},
20557 'required': ['results'],
20558 'type': 'object'},
20559 'Endpoint': {'additionalProperties': False,
20560 'properties': {'application-name': {'type': 'string'},
20561 'relation': {'$ref': '#/definitions/CharmRelation'}},
20562 'required': ['application-name', 'relation'],
20563 'type': 'object'},
20564 'Entities': {'additionalProperties': False,
20565 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20566 'type': 'array'}},
20567 'required': ['entities'],
20568 'type': 'object'},
20569 'EntitiesCharmURL': {'additionalProperties': False,
20570 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
20571 'type': 'array'}},
20572 'required': ['entities'],
20573 'type': 'object'},
20574 'EntitiesPortRanges': {'additionalProperties': False,
20575 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
20576 'type': 'array'}},
20577 'required': ['entities'],
20578 'type': 'object'},
20579 'Entity': {'additionalProperties': False,
20580 'properties': {'tag': {'type': 'string'}},
20581 'required': ['tag'],
20582 'type': 'object'},
20583 'EntityCharmURL': {'additionalProperties': False,
20584 'properties': {'charm-url': {'type': 'string'},
20585 'tag': {'type': 'string'}},
20586 'required': ['tag', 'charm-url'],
20587 'type': 'object'},
20588 'EntityPortRange': {'additionalProperties': False,
20589 'properties': {'from-port': {'type': 'integer'},
20590 'protocol': {'type': 'string'},
20591 'tag': {'type': 'string'},
20592 'to-port': {'type': 'integer'}},
20593 'required': ['tag',
20594 'protocol',
20595 'from-port',
20596 'to-port'],
20597 'type': 'object'},
20598 'EntityStatusArgs': {'additionalProperties': False,
20599 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
20600 'type': 'object'}},
20601 'type': 'object'},
20602 'info': {'type': 'string'},
20603 'status': {'type': 'string'},
20604 'tag': {'type': 'string'}},
20605 'required': ['tag',
20606 'status',
20607 'info',
20608 'data'],
20609 'type': 'object'},
20610 'EntityWorkloadVersion': {'additionalProperties': False,
20611 'properties': {'tag': {'type': 'string'},
20612 'workload-version': {'type': 'string'}},
20613 'required': ['tag',
20614 'workload-version'],
20615 'type': 'object'},
20616 'EntityWorkloadVersions': {'additionalProperties': False,
20617 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'},
20618 'type': 'array'}},
20619 'required': ['entities'],
20620 'type': 'object'},
20621 'Error': {'additionalProperties': False,
20622 'properties': {'code': {'type': 'string'},
20623 'info': {'$ref': '#/definitions/ErrorInfo'},
20624 'message': {'type': 'string'}},
20625 'required': ['message', 'code'],
20626 'type': 'object'},
20627 'ErrorInfo': {'additionalProperties': False,
20628 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20629 'macaroon-path': {'type': 'string'}},
20630 'type': 'object'},
20631 'ErrorResult': {'additionalProperties': False,
20632 'properties': {'error': {'$ref': '#/definitions/Error'}},
20633 'type': 'object'},
20634 'ErrorResults': {'additionalProperties': False,
20635 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
20636 'type': 'array'}},
20637 'required': ['results'],
20638 'type': 'object'},
20639 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
20640 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
20641 'type': 'array'}},
20642 'required': ['results'],
20643 'type': 'object'},
20644 'GetLeadershipSettingsResult': {'additionalProperties': False,
20645 'properties': {'error': {'$ref': '#/definitions/Error'},
20646 'settings': {'patternProperties': {'.*': {'type': 'string'}},
20647 'type': 'object'}},
20648 'required': ['settings'],
20649 'type': 'object'},
20650 'HostPort': {'additionalProperties': False,
20651 'properties': {'Address': {'$ref': '#/definitions/Address'},
20652 'port': {'type': 'integer'}},
20653 'required': ['Address', 'port'],
20654 'type': 'object'},
20655 'IntResult': {'additionalProperties': False,
20656 'properties': {'error': {'$ref': '#/definitions/Error'},
20657 'result': {'type': 'integer'}},
20658 'required': ['result'],
20659 'type': 'object'},
20660 'IntResults': {'additionalProperties': False,
20661 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
20662 'type': 'array'}},
20663 'required': ['results'],
20664 'type': 'object'},
20665 'LifeResult': {'additionalProperties': False,
20666 'properties': {'error': {'$ref': '#/definitions/Error'},
20667 'life': {'type': 'string'}},
20668 'required': ['life'],
20669 'type': 'object'},
20670 'LifeResults': {'additionalProperties': False,
20671 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
20672 'type': 'array'}},
20673 'required': ['results'],
20674 'type': 'object'},
20675 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20676 'MachinePortRange': {'additionalProperties': False,
20677 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
20678 'relation-tag': {'type': 'string'},
20679 'unit-tag': {'type': 'string'}},
20680 'required': ['unit-tag',
20681 'relation-tag',
20682 'port-range'],
20683 'type': 'object'},
20684 'MachinePortsResult': {'additionalProperties': False,
20685 'properties': {'error': {'$ref': '#/definitions/Error'},
20686 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
20687 'type': 'array'}},
20688 'required': ['ports'],
20689 'type': 'object'},
20690 'MachinePortsResults': {'additionalProperties': False,
20691 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
20692 'type': 'array'}},
20693 'required': ['results'],
20694 'type': 'object'},
20695 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
20696 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
20697 'type': 'array'}},
20698 'required': ['params'],
20699 'type': 'object'},
20700 'MergeLeadershipSettingsParam': {'additionalProperties': False,
20701 'properties': {'application-tag': {'type': 'string'},
20702 'settings': {'patternProperties': {'.*': {'type': 'string'}},
20703 'type': 'object'}},
20704 'required': ['application-tag',
20705 'settings'],
20706 'type': 'object'},
20707 'MeterStatusResult': {'additionalProperties': False,
20708 'properties': {'code': {'type': 'string'},
20709 'error': {'$ref': '#/definitions/Error'},
20710 'info': {'type': 'string'}},
20711 'required': ['code', 'info'],
20712 'type': 'object'},
20713 'MeterStatusResults': {'additionalProperties': False,
20714 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
20715 'type': 'array'}},
20716 'required': ['results'],
20717 'type': 'object'},
20718 'Metric': {'additionalProperties': False,
20719 'properties': {'key': {'type': 'string'},
20720 'time': {'format': 'date-time',
20721 'type': 'string'},
20722 'value': {'type': 'string'}},
20723 'required': ['key', 'value', 'time'],
20724 'type': 'object'},
20725 'MetricBatch': {'additionalProperties': False,
20726 'properties': {'charm-url': {'type': 'string'},
20727 'created': {'format': 'date-time',
20728 'type': 'string'},
20729 'metrics': {'items': {'$ref': '#/definitions/Metric'},
20730 'type': 'array'},
20731 'uuid': {'type': 'string'}},
20732 'required': ['uuid',
20733 'charm-url',
20734 'created',
20735 'metrics'],
20736 'type': 'object'},
20737 'MetricBatchParam': {'additionalProperties': False,
20738 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
20739 'tag': {'type': 'string'}},
20740 'required': ['tag', 'batch'],
20741 'type': 'object'},
20742 'MetricBatchParams': {'additionalProperties': False,
20743 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
20744 'type': 'array'}},
20745 'required': ['batches'],
20746 'type': 'object'},
20747 'ModelConfigResult': {'additionalProperties': False,
20748 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
20749 'type': 'object'}},
20750 'type': 'object'}},
20751 'required': ['config'],
20752 'type': 'object'},
20753 'ModelResult': {'additionalProperties': False,
20754 'properties': {'error': {'$ref': '#/definitions/Error'},
20755 'name': {'type': 'string'},
20756 'uuid': {'type': 'string'}},
20757 'required': ['name', 'uuid'],
20758 'type': 'object'},
20759 'NetworkConfig': {'additionalProperties': False,
20760 'properties': {'address': {'type': 'string'},
20761 'cidr': {'type': 'string'},
20762 'config-type': {'type': 'string'},
20763 'device-index': {'type': 'integer'},
20764 'disabled': {'type': 'boolean'},
20765 'dns-search-domains': {'items': {'type': 'string'},
20766 'type': 'array'},
20767 'dns-servers': {'items': {'type': 'string'},
20768 'type': 'array'},
20769 'gateway-address': {'type': 'string'},
20770 'interface-name': {'type': 'string'},
20771 'interface-type': {'type': 'string'},
20772 'mac-address': {'type': 'string'},
20773 'mtu': {'type': 'integer'},
20774 'no-auto-start': {'type': 'boolean'},
20775 'parent-interface-name': {'type': 'string'},
20776 'provider-address-id': {'type': 'string'},
20777 'provider-id': {'type': 'string'},
20778 'provider-space-id': {'type': 'string'},
20779 'provider-subnet-id': {'type': 'string'},
20780 'provider-vlan-id': {'type': 'string'},
20781 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
20782 'type': 'array'},
20783 'vlan-tag': {'type': 'integer'}},
20784 'required': ['device-index',
20785 'mac-address',
20786 'cidr',
20787 'mtu',
20788 'provider-id',
20789 'provider-subnet-id',
20790 'provider-space-id',
20791 'provider-address-id',
20792 'provider-vlan-id',
20793 'vlan-tag',
20794 'interface-name',
20795 'parent-interface-name',
20796 'interface-type',
20797 'disabled'],
20798 'type': 'object'},
20799 'NetworkRoute': {'additionalProperties': False,
20800 'properties': {'destination-cidr': {'type': 'string'},
20801 'gateway-ip': {'type': 'string'},
20802 'metric': {'type': 'integer'}},
20803 'required': ['destination-cidr',
20804 'gateway-ip',
20805 'metric'],
20806 'type': 'object'},
20807 'NotifyWatchResult': {'additionalProperties': False,
20808 'properties': {'NotifyWatcherId': {'type': 'string'},
20809 'error': {'$ref': '#/definitions/Error'}},
20810 'required': ['NotifyWatcherId'],
20811 'type': 'object'},
20812 'NotifyWatchResults': {'additionalProperties': False,
20813 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
20814 'type': 'array'}},
20815 'required': ['results'],
20816 'type': 'object'},
20817 'PortRange': {'additionalProperties': False,
20818 'properties': {'from-port': {'type': 'integer'},
20819 'protocol': {'type': 'string'},
20820 'to-port': {'type': 'integer'}},
20821 'required': ['from-port', 'to-port', 'protocol'],
20822 'type': 'object'},
20823 'RelationIds': {'additionalProperties': False,
20824 'properties': {'relation-ids': {'items': {'type': 'integer'},
20825 'type': 'array'}},
20826 'required': ['relation-ids'],
20827 'type': 'object'},
20828 'RelationResult': {'additionalProperties': False,
20829 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'},
20830 'error': {'$ref': '#/definitions/Error'},
20831 'id': {'type': 'integer'},
20832 'key': {'type': 'string'},
20833 'life': {'type': 'string'}},
20834 'required': ['life',
20835 'id',
20836 'key',
20837 'endpoint'],
20838 'type': 'object'},
20839 'RelationResults': {'additionalProperties': False,
20840 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'},
20841 'type': 'array'}},
20842 'required': ['results'],
20843 'type': 'object'},
20844 'RelationUnit': {'additionalProperties': False,
20845 'properties': {'relation': {'type': 'string'},
20846 'unit': {'type': 'string'}},
20847 'required': ['relation', 'unit'],
20848 'type': 'object'},
20849 'RelationUnitPair': {'additionalProperties': False,
20850 'properties': {'local-unit': {'type': 'string'},
20851 'relation': {'type': 'string'},
20852 'remote-unit': {'type': 'string'}},
20853 'required': ['relation',
20854 'local-unit',
20855 'remote-unit'],
20856 'type': 'object'},
20857 'RelationUnitPairs': {'additionalProperties': False,
20858 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
20859 'type': 'array'}},
20860 'required': ['relation-unit-pairs'],
20861 'type': 'object'},
20862 'RelationUnitSettings': {'additionalProperties': False,
20863 'properties': {'relation': {'type': 'string'},
20864 'settings': {'patternProperties': {'.*': {'type': 'string'}},
20865 'type': 'object'},
20866 'unit': {'type': 'string'}},
20867 'required': ['relation',
20868 'unit',
20869 'settings'],
20870 'type': 'object'},
20871 'RelationUnits': {'additionalProperties': False,
20872 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
20873 'type': 'array'}},
20874 'required': ['relation-units'],
20875 'type': 'object'},
20876 'RelationUnitsChange': {'additionalProperties': False,
20877 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
20878 'type': 'object'},
20879 'departed': {'items': {'type': 'string'},
20880 'type': 'array'}},
20881 'required': ['changed'],
20882 'type': 'object'},
20883 'RelationUnitsSettings': {'additionalProperties': False,
20884 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
20885 'type': 'array'}},
20886 'required': ['relation-units'],
20887 'type': 'object'},
20888 'RelationUnitsWatchResult': {'additionalProperties': False,
20889 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
20890 'error': {'$ref': '#/definitions/Error'},
20891 'watcher-id': {'type': 'string'}},
20892 'required': ['watcher-id',
20893 'changes'],
20894 'type': 'object'},
20895 'RelationUnitsWatchResults': {'additionalProperties': False,
20896 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
20897 'type': 'array'}},
20898 'required': ['results'],
20899 'type': 'object'},
20900 'ResolvedModeResult': {'additionalProperties': False,
20901 'properties': {'error': {'$ref': '#/definitions/Error'},
20902 'mode': {'type': 'string'}},
20903 'required': ['mode'],
20904 'type': 'object'},
20905 'ResolvedModeResults': {'additionalProperties': False,
20906 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
20907 'type': 'array'}},
20908 'required': ['results'],
20909 'type': 'object'},
20910 'SetStatus': {'additionalProperties': False,
20911 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
20912 'type': 'array'}},
20913 'required': ['entities'],
20914 'type': 'object'},
20915 'SettingsResult': {'additionalProperties': False,
20916 'properties': {'error': {'$ref': '#/definitions/Error'},
20917 'settings': {'patternProperties': {'.*': {'type': 'string'}},
20918 'type': 'object'}},
20919 'required': ['settings'],
20920 'type': 'object'},
20921 'SettingsResults': {'additionalProperties': False,
20922 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
20923 'type': 'array'}},
20924 'required': ['results'],
20925 'type': 'object'},
20926 'StatusResult': {'additionalProperties': False,
20927 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
20928 'type': 'object'}},
20929 'type': 'object'},
20930 'error': {'$ref': '#/definitions/Error'},
20931 'id': {'type': 'string'},
20932 'info': {'type': 'string'},
20933 'life': {'type': 'string'},
20934 'since': {'format': 'date-time',
20935 'type': 'string'},
20936 'status': {'type': 'string'}},
20937 'required': ['id',
20938 'life',
20939 'status',
20940 'info',
20941 'data',
20942 'since'],
20943 'type': 'object'},
20944 'StatusResults': {'additionalProperties': False,
20945 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
20946 'type': 'array'}},
20947 'required': ['results'],
20948 'type': 'object'},
20949 'StorageAddParams': {'additionalProperties': False,
20950 'properties': {'name': {'type': 'string'},
20951 'storage': {'$ref': '#/definitions/StorageConstraints'},
20952 'unit': {'type': 'string'}},
20953 'required': ['unit', 'name', 'storage'],
20954 'type': 'object'},
20955 'StorageAttachment': {'additionalProperties': False,
20956 'properties': {'kind': {'type': 'integer'},
20957 'life': {'type': 'string'},
20958 'location': {'type': 'string'},
20959 'owner-tag': {'type': 'string'},
20960 'storage-tag': {'type': 'string'},
20961 'unit-tag': {'type': 'string'}},
20962 'required': ['storage-tag',
20963 'owner-tag',
20964 'unit-tag',
20965 'kind',
20966 'location',
20967 'life'],
20968 'type': 'object'},
20969 'StorageAttachmentId': {'additionalProperties': False,
20970 'properties': {'storage-tag': {'type': 'string'},
20971 'unit-tag': {'type': 'string'}},
20972 'required': ['storage-tag',
20973 'unit-tag'],
20974 'type': 'object'},
20975 'StorageAttachmentIds': {'additionalProperties': False,
20976 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
20977 'type': 'array'}},
20978 'required': ['ids'],
20979 'type': 'object'},
20980 'StorageAttachmentIdsResult': {'additionalProperties': False,
20981 'properties': {'error': {'$ref': '#/definitions/Error'},
20982 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
20983 'required': ['result'],
20984 'type': 'object'},
20985 'StorageAttachmentIdsResults': {'additionalProperties': False,
20986 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
20987 'type': 'array'}},
20988 'type': 'object'},
20989 'StorageAttachmentResult': {'additionalProperties': False,
20990 'properties': {'error': {'$ref': '#/definitions/Error'},
20991 'result': {'$ref': '#/definitions/StorageAttachment'}},
20992 'required': ['result'],
20993 'type': 'object'},
20994 'StorageAttachmentResults': {'additionalProperties': False,
20995 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
20996 'type': 'array'}},
20997 'type': 'object'},
20998 'StorageConstraints': {'additionalProperties': False,
20999 'properties': {'count': {'type': 'integer'},
21000 'pool': {'type': 'string'},
21001 'size': {'type': 'integer'}},
21002 'type': 'object'},
21003 'StoragesAddParams': {'additionalProperties': False,
21004 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
21005 'type': 'array'}},
21006 'required': ['storages'],
21007 'type': 'object'},
21008 'StringBoolResult': {'additionalProperties': False,
21009 'properties': {'error': {'$ref': '#/definitions/Error'},
21010 'ok': {'type': 'boolean'},
21011 'result': {'type': 'string'}},
21012 'required': ['result', 'ok'],
21013 'type': 'object'},
21014 'StringBoolResults': {'additionalProperties': False,
21015 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'},
21016 'type': 'array'}},
21017 'required': ['results'],
21018 'type': 'object'},
21019 'StringResult': {'additionalProperties': False,
21020 'properties': {'error': {'$ref': '#/definitions/Error'},
21021 'result': {'type': 'string'}},
21022 'required': ['result'],
21023 'type': 'object'},
21024 'StringResults': {'additionalProperties': False,
21025 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
21026 'type': 'array'}},
21027 'required': ['results'],
21028 'type': 'object'},
21029 'StringsResult': {'additionalProperties': False,
21030 'properties': {'error': {'$ref': '#/definitions/Error'},
21031 'result': {'items': {'type': 'string'},
21032 'type': 'array'}},
21033 'type': 'object'},
21034 'StringsResults': {'additionalProperties': False,
21035 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
21036 'type': 'array'}},
21037 'required': ['results'],
21038 'type': 'object'},
21039 'StringsWatchResult': {'additionalProperties': False,
21040 'properties': {'changes': {'items': {'type': 'string'},
21041 'type': 'array'},
21042 'error': {'$ref': '#/definitions/Error'},
21043 'watcher-id': {'type': 'string'}},
21044 'required': ['watcher-id'],
21045 'type': 'object'},
21046 'StringsWatchResults': {'additionalProperties': False,
21047 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
21048 'type': 'array'}},
21049 'required': ['results'],
21050 'type': 'object'},
21051 'UnitNetworkConfig': {'additionalProperties': False,
21052 'properties': {'binding-name': {'type': 'string'},
21053 'unit-tag': {'type': 'string'}},
21054 'required': ['unit-tag', 'binding-name'],
21055 'type': 'object'},
21056 'UnitNetworkConfigResult': {'additionalProperties': False,
21057 'properties': {'error': {'$ref': '#/definitions/Error'},
21058 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
21059 'type': 'array'}},
21060 'required': ['info'],
21061 'type': 'object'},
21062 'UnitNetworkConfigResults': {'additionalProperties': False,
21063 'properties': {'results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
21064 'type': 'array'}},
21065 'required': ['results'],
21066 'type': 'object'},
21067 'UnitSettings': {'additionalProperties': False,
21068 'properties': {'version': {'type': 'integer'}},
21069 'required': ['version'],
21070 'type': 'object'},
21071 'UnitsNetworkConfig': {'additionalProperties': False,
21072 'properties': {'args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
21073 'type': 'array'}},
21074 'required': ['args'],
21075 'type': 'object'}},
21076 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
21077 'type': 'object'},
21078 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
21079 'type': 'object'},
21080 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21081 'Result': {'$ref': '#/definitions/ActionResults'}},
21082 'type': 'object'},
21083 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
21084 'Result': {'$ref': '#/definitions/ErrorResults'}},
21085 'type': 'object'},
21086 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
21087 'Result': {'$ref': '#/definitions/ErrorResults'}},
21088 'type': 'object'},
21089 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21090 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
21091 'type': 'object'},
21092 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21093 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
21094 'type': 'object'},
21095 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21096 'Result': {'$ref': '#/definitions/StringResults'}},
21097 'type': 'object'},
21098 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21099 'Result': {'$ref': '#/definitions/StringResults'}},
21100 'type': 'object'},
21101 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21102 'Result': {'$ref': '#/definitions/ErrorResults'}},
21103 'type': 'object'},
21104 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
21105 'type': 'object'},
21106 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
21107 'Result': {'$ref': '#/definitions/StringResults'}},
21108 'type': 'object'},
21109 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21110 'Result': {'$ref': '#/definitions/IntResults'}},
21111 'type': 'object'},
21112 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21113 'Result': {'$ref': '#/definitions/StringBoolResults'}},
21114 'type': 'object'},
21115 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21116 'Result': {'$ref': '#/definitions/ErrorResults'}},
21117 'type': 'object'},
21118 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
21119 'Result': {'$ref': '#/definitions/ErrorResults'}},
21120 'type': 'object'},
21121 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21122 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
21123 'type': 'object'},
21124 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
21125 'type': 'object'},
21126 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21127 'Result': {'$ref': '#/definitions/ErrorResults'}},
21128 'type': 'object'},
21129 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21130 'Result': {'$ref': '#/definitions/ErrorResults'}},
21131 'type': 'object'},
21132 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21133 'Result': {'$ref': '#/definitions/ErrorResults'}},
21134 'type': 'object'},
21135 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21136 'Result': {'$ref': '#/definitions/ErrorResults'}},
21137 'type': 'object'},
21138 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
21139 'Result': {'$ref': '#/definitions/ErrorResults'}},
21140 'type': 'object'},
21141 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
21142 'Result': {'$ref': '#/definitions/ErrorResults'}},
21143 'type': 'object'},
21144 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21145 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
21146 'type': 'object'},
21147 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21148 'Result': {'$ref': '#/definitions/StringBoolResults'}},
21149 'type': 'object'},
21150 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21151 'Result': {'$ref': '#/definitions/BoolResults'}},
21152 'type': 'object'},
21153 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21154 'Result': {'$ref': '#/definitions/StringsResults'}},
21155 'type': 'object'},
21156 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
21157 'Result': {'$ref': '#/definitions/ErrorResults'}},
21158 'type': 'object'},
21159 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21160 'Result': {'$ref': '#/definitions/LifeResults'}},
21161 'type': 'object'},
21162 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
21163 'Result': {'$ref': '#/definitions/ErrorResults'}},
21164 'type': 'object'},
21165 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
21166 'type': 'object'},
21167 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
21168 'type': 'object'},
21169 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
21170 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
21171 'type': 'object'},
21172 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
21173 'Result': {'$ref': '#/definitions/ErrorResults'}},
21174 'type': 'object'},
21175 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21176 'Result': {'$ref': '#/definitions/StringResults'}},
21177 'type': 'object'},
21178 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
21179 'type': 'object'},
21180 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21181 'Result': {'$ref': '#/definitions/StringResults'}},
21182 'type': 'object'},
21183 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21184 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
21185 'type': 'object'},
21186 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
21187 'Result': {'$ref': '#/definitions/SettingsResults'}},
21188 'type': 'object'},
21189 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
21190 'Result': {'$ref': '#/definitions/SettingsResults'}},
21191 'type': 'object'},
21192 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
21193 'Result': {'$ref': '#/definitions/RelationResults'}},
21194 'type': 'object'},
21195 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
21196 'Result': {'$ref': '#/definitions/RelationResults'}},
21197 'type': 'object'},
21198 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
21199 'Result': {'$ref': '#/definitions/ErrorResults'}},
21200 'type': 'object'},
21201 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21202 'Result': {'$ref': '#/definitions/ErrorResults'}},
21203 'type': 'object'},
21204 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21205 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
21206 'type': 'object'},
21207 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
21208 'Result': {'$ref': '#/definitions/ErrorResults'}},
21209 'type': 'object'},
21210 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
21211 'Result': {'$ref': '#/definitions/ErrorResults'}},
21212 'type': 'object'},
21213 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
21214 'Result': {'$ref': '#/definitions/ErrorResults'}},
21215 'type': 'object'},
21216 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
21217 'Result': {'$ref': '#/definitions/ErrorResults'}},
21218 'type': 'object'},
21219 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
21220 'Result': {'$ref': '#/definitions/ErrorResults'}},
21221 'type': 'object'},
21222 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'},
21223 'Result': {'$ref': '#/definitions/ErrorResults'}},
21224 'type': 'object'},
21225 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
21226 'Result': {'$ref': '#/definitions/LifeResults'}},
21227 'type': 'object'},
21228 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
21229 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
21230 'type': 'object'},
21231 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21232 'Result': {'$ref': '#/definitions/StatusResults'}},
21233 'type': 'object'},
21234 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21235 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
21236 'type': 'object'},
21237 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
21238 'Result': {'$ref': '#/definitions/ErrorResults'}},
21239 'type': 'object'},
21240 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21241 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
21242 'type': 'object'},
21243 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
21244 'type': 'object'},
21245 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21246 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
21247 'type': 'object'},
21248 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21249 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
21250 'type': 'object'},
21251 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21252 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
21253 'type': 'object'},
21254 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
21255 'type': 'object'},
21256 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21257 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
21258 'type': 'object'},
21259 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21260 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
21261 'type': 'object'},
21262 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
21263 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
21264 'type': 'object'},
21265 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
21266 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
21267 'type': 'object'},
21268 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21269 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
21270 'type': 'object'},
21271 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21272 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
21273 'type': 'object'},
21274 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21275 'Result': {'$ref': '#/definitions/StringResults'}},
21276 'type': 'object'}},
21277 'type': 'object'}
21278
21279
21280 @ReturnMapping(StringsResult)
21281 async def APIAddresses(self):
21282 '''
21283
21284 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
21285 '''
21286 # map input types to rpc msg
21287 _params = dict()
21288 msg = dict(type='Uniter', request='APIAddresses', version=4, params=_params)
21289
21290 reply = await self.rpc(msg)
21291 return reply
21292
21293
21294
21295 @ReturnMapping(APIHostPortsResult)
21296 async def APIHostPorts(self):
21297 '''
21298
21299 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
21300 '''
21301 # map input types to rpc msg
21302 _params = dict()
21303 msg = dict(type='Uniter', request='APIHostPorts', version=4, params=_params)
21304
21305 reply = await self.rpc(msg)
21306 return reply
21307
21308
21309
21310 @ReturnMapping(ActionResults)
21311 async def Actions(self, entities):
21312 '''
21313 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21314 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
21315 '''
21316 # map input types to rpc msg
21317 _params = dict()
21318 msg = dict(type='Uniter', request='Actions', version=4, params=_params)
21319 _params['entities'] = entities
21320 reply = await self.rpc(msg)
21321 return reply
21322
21323
21324
21325 @ReturnMapping(ErrorResults)
21326 async def AddMetricBatches(self, batches):
21327 '''
21328 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
21329 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21330 '''
21331 # map input types to rpc msg
21332 _params = dict()
21333 msg = dict(type='Uniter', request='AddMetricBatches', version=4, params=_params)
21334 _params['batches'] = batches
21335 reply = await self.rpc(msg)
21336 return reply
21337
21338
21339
21340 @ReturnMapping(ErrorResults)
21341 async def AddUnitStorage(self, storages):
21342 '''
21343 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
21344 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21345 '''
21346 # map input types to rpc msg
21347 _params = dict()
21348 msg = dict(type='Uniter', request='AddUnitStorage', version=4, params=_params)
21349 _params['storages'] = storages
21350 reply = await self.rpc(msg)
21351 return reply
21352
21353
21354
21355 @ReturnMapping(MachinePortsResults)
21356 async def AllMachinePorts(self, entities):
21357 '''
21358 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21359 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
21360 '''
21361 # map input types to rpc msg
21362 _params = dict()
21363 msg = dict(type='Uniter', request='AllMachinePorts', version=4, params=_params)
21364 _params['entities'] = entities
21365 reply = await self.rpc(msg)
21366 return reply
21367
21368
21369
21370 @ReturnMapping(ApplicationStatusResults)
21371 async def ApplicationStatus(self, entities):
21372 '''
21373 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21374 Returns -> typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult>
21375 '''
21376 # map input types to rpc msg
21377 _params = dict()
21378 msg = dict(type='Uniter', request='ApplicationStatus', version=4, params=_params)
21379 _params['entities'] = entities
21380 reply = await self.rpc(msg)
21381 return reply
21382
21383
21384
21385 @ReturnMapping(StringResults)
21386 async def AssignedMachine(self, entities):
21387 '''
21388 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21389 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
21390 '''
21391 # map input types to rpc msg
21392 _params = dict()
21393 msg = dict(type='Uniter', request='AssignedMachine', version=4, params=_params)
21394 _params['entities'] = entities
21395 reply = await self.rpc(msg)
21396 return reply
21397
21398
21399
21400 @ReturnMapping(StringResults)
21401 async def AvailabilityZone(self, entities):
21402 '''
21403 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21404 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
21405 '''
21406 # map input types to rpc msg
21407 _params = dict()
21408 msg = dict(type='Uniter', request='AvailabilityZone', version=4, params=_params)
21409 _params['entities'] = entities
21410 reply = await self.rpc(msg)
21411 return reply
21412
21413
21414
21415 @ReturnMapping(ErrorResults)
21416 async def BeginActions(self, entities):
21417 '''
21418 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21419 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21420 '''
21421 # map input types to rpc msg
21422 _params = dict()
21423 msg = dict(type='Uniter', request='BeginActions', version=4, params=_params)
21424 _params['entities'] = entities
21425 reply = await self.rpc(msg)
21426 return reply
21427
21428
21429
21430 @ReturnMapping(BytesResult)
21431 async def CACert(self):
21432 '''
21433
21434 Returns -> typing.Sequence<+T_co>[int]
21435 '''
21436 # map input types to rpc msg
21437 _params = dict()
21438 msg = dict(type='Uniter', request='CACert', version=4, params=_params)
21439
21440 reply = await self.rpc(msg)
21441 return reply
21442
21443
21444
21445 @ReturnMapping(StringResults)
21446 async def CharmArchiveSha256(self, urls):
21447 '''
21448 urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL>
21449 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
21450 '''
21451 # map input types to rpc msg
21452 _params = dict()
21453 msg = dict(type='Uniter', request='CharmArchiveSha256', version=4, params=_params)
21454 _params['urls'] = urls
21455 reply = await self.rpc(msg)
21456 return reply
21457
21458
21459
21460 @ReturnMapping(IntResults)
21461 async def CharmModifiedVersion(self, entities):
21462 '''
21463 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21464 Returns -> typing.Sequence<+T_co>[~IntResult]<~IntResult>
21465 '''
21466 # map input types to rpc msg
21467 _params = dict()
21468 msg = dict(type='Uniter', request='CharmModifiedVersion', version=4, params=_params)
21469 _params['entities'] = entities
21470 reply = await self.rpc(msg)
21471 return reply
21472
21473
21474
21475 @ReturnMapping(StringBoolResults)
21476 async def CharmURL(self, entities):
21477 '''
21478 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21479 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
21480 '''
21481 # map input types to rpc msg
21482 _params = dict()
21483 msg = dict(type='Uniter', request='CharmURL', version=4, params=_params)
21484 _params['entities'] = entities
21485 reply = await self.rpc(msg)
21486 return reply
21487
21488
21489
21490 @ReturnMapping(ErrorResults)
21491 async def ClearResolved(self, entities):
21492 '''
21493 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21494 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21495 '''
21496 # map input types to rpc msg
21497 _params = dict()
21498 msg = dict(type='Uniter', request='ClearResolved', version=4, params=_params)
21499 _params['entities'] = entities
21500 reply = await self.rpc(msg)
21501 return reply
21502
21503
21504
21505 @ReturnMapping(ErrorResults)
21506 async def ClosePorts(self, entities):
21507 '''
21508 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
21509 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21510 '''
21511 # map input types to rpc msg
21512 _params = dict()
21513 msg = dict(type='Uniter', request='ClosePorts', version=4, params=_params)
21514 _params['entities'] = entities
21515 reply = await self.rpc(msg)
21516 return reply
21517
21518
21519
21520 @ReturnMapping(ConfigSettingsResults)
21521 async def ConfigSettings(self, entities):
21522 '''
21523 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21524 Returns -> typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult>
21525 '''
21526 # map input types to rpc msg
21527 _params = dict()
21528 msg = dict(type='Uniter', request='ConfigSettings', version=4, params=_params)
21529 _params['entities'] = entities
21530 reply = await self.rpc(msg)
21531 return reply
21532
21533
21534
21535 @ReturnMapping(ModelResult)
21536 async def CurrentModel(self):
21537 '''
21538
21539 Returns -> typing.Union[_ForwardRef('Error'), str]
21540 '''
21541 # map input types to rpc msg
21542 _params = dict()
21543 msg = dict(type='Uniter', request='CurrentModel', version=4, params=_params)
21544
21545 reply = await self.rpc(msg)
21546 return reply
21547
21548
21549
21550 @ReturnMapping(ErrorResults)
21551 async def Destroy(self, entities):
21552 '''
21553 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21554 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21555 '''
21556 # map input types to rpc msg
21557 _params = dict()
21558 msg = dict(type='Uniter', request='Destroy', version=4, params=_params)
21559 _params['entities'] = entities
21560 reply = await self.rpc(msg)
21561 return reply
21562
21563
21564
21565 @ReturnMapping(ErrorResults)
21566 async def DestroyAllSubordinates(self, entities):
21567 '''
21568 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21569 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21570 '''
21571 # map input types to rpc msg
21572 _params = dict()
21573 msg = dict(type='Uniter', request='DestroyAllSubordinates', version=4, params=_params)
21574 _params['entities'] = entities
21575 reply = await self.rpc(msg)
21576 return reply
21577
21578
21579
21580 @ReturnMapping(ErrorResults)
21581 async def DestroyUnitStorageAttachments(self, entities):
21582 '''
21583 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21584 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21585 '''
21586 # map input types to rpc msg
21587 _params = dict()
21588 msg = dict(type='Uniter', request='DestroyUnitStorageAttachments', version=4, params=_params)
21589 _params['entities'] = entities
21590 reply = await self.rpc(msg)
21591 return reply
21592
21593
21594
21595 @ReturnMapping(ErrorResults)
21596 async def EnsureDead(self, entities):
21597 '''
21598 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21599 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21600 '''
21601 # map input types to rpc msg
21602 _params = dict()
21603 msg = dict(type='Uniter', request='EnsureDead', version=4, params=_params)
21604 _params['entities'] = entities
21605 reply = await self.rpc(msg)
21606 return reply
21607
21608
21609
21610 @ReturnMapping(ErrorResults)
21611 async def EnterScope(self, relation_units):
21612 '''
21613 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
21614 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21615 '''
21616 # map input types to rpc msg
21617 _params = dict()
21618 msg = dict(type='Uniter', request='EnterScope', version=4, params=_params)
21619 _params['relation-units'] = relation_units
21620 reply = await self.rpc(msg)
21621 return reply
21622
21623
21624
21625 @ReturnMapping(ErrorResults)
21626 async def FinishActions(self, results):
21627 '''
21628 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
21629 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21630 '''
21631 # map input types to rpc msg
21632 _params = dict()
21633 msg = dict(type='Uniter', request='FinishActions', version=4, params=_params)
21634 _params['results'] = results
21635 reply = await self.rpc(msg)
21636 return reply
21637
21638
21639
21640 @ReturnMapping(MeterStatusResults)
21641 async def GetMeterStatus(self, entities):
21642 '''
21643 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21644 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
21645 '''
21646 # map input types to rpc msg
21647 _params = dict()
21648 msg = dict(type='Uniter', request='GetMeterStatus', version=4, params=_params)
21649 _params['entities'] = entities
21650 reply = await self.rpc(msg)
21651 return reply
21652
21653
21654
21655 @ReturnMapping(StringBoolResults)
21656 async def GetPrincipal(self, entities):
21657 '''
21658 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21659 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
21660 '''
21661 # map input types to rpc msg
21662 _params = dict()
21663 msg = dict(type='Uniter', request='GetPrincipal', version=4, params=_params)
21664 _params['entities'] = entities
21665 reply = await self.rpc(msg)
21666 return reply
21667
21668
21669
21670 @ReturnMapping(BoolResults)
21671 async def HasSubordinates(self, entities):
21672 '''
21673 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21674 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
21675 '''
21676 # map input types to rpc msg
21677 _params = dict()
21678 msg = dict(type='Uniter', request='HasSubordinates', version=4, params=_params)
21679 _params['entities'] = entities
21680 reply = await self.rpc(msg)
21681 return reply
21682
21683
21684
21685 @ReturnMapping(StringsResults)
21686 async def JoinedRelations(self, entities):
21687 '''
21688 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21689 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
21690 '''
21691 # map input types to rpc msg
21692 _params = dict()
21693 msg = dict(type='Uniter', request='JoinedRelations', version=4, params=_params)
21694 _params['entities'] = entities
21695 reply = await self.rpc(msg)
21696 return reply
21697
21698
21699
21700 @ReturnMapping(ErrorResults)
21701 async def LeaveScope(self, relation_units):
21702 '''
21703 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
21704 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21705 '''
21706 # map input types to rpc msg
21707 _params = dict()
21708 msg = dict(type='Uniter', request='LeaveScope', version=4, params=_params)
21709 _params['relation-units'] = relation_units
21710 reply = await self.rpc(msg)
21711 return reply
21712
21713
21714
21715 @ReturnMapping(LifeResults)
21716 async def Life(self, entities):
21717 '''
21718 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21719 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
21720 '''
21721 # map input types to rpc msg
21722 _params = dict()
21723 msg = dict(type='Uniter', request='Life', version=4, params=_params)
21724 _params['entities'] = entities
21725 reply = await self.rpc(msg)
21726 return reply
21727
21728
21729
21730 @ReturnMapping(ErrorResults)
21731 async def Merge(self, params):
21732 '''
21733 params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam>
21734 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21735 '''
21736 # map input types to rpc msg
21737 _params = dict()
21738 msg = dict(type='Uniter', request='Merge', version=4, params=_params)
21739 _params['params'] = params
21740 reply = await self.rpc(msg)
21741 return reply
21742
21743
21744
21745 @ReturnMapping(ModelConfigResult)
21746 async def ModelConfig(self):
21747 '''
21748
21749 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
21750 '''
21751 # map input types to rpc msg
21752 _params = dict()
21753 msg = dict(type='Uniter', request='ModelConfig', version=4, params=_params)
21754
21755 reply = await self.rpc(msg)
21756 return reply
21757
21758
21759
21760 @ReturnMapping(StringResult)
21761 async def ModelUUID(self):
21762 '''
21763
21764 Returns -> typing.Union[_ForwardRef('Error'), str]
21765 '''
21766 # map input types to rpc msg
21767 _params = dict()
21768 msg = dict(type='Uniter', request='ModelUUID', version=4, params=_params)
21769
21770 reply = await self.rpc(msg)
21771 return reply
21772
21773
21774
21775 @ReturnMapping(UnitNetworkConfigResults)
21776 async def NetworkConfig(self, args):
21777 '''
21778 args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig>
21779 Returns -> typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult>
21780 '''
21781 # map input types to rpc msg
21782 _params = dict()
21783 msg = dict(type='Uniter', request='NetworkConfig', version=4, params=_params)
21784 _params['args'] = args
21785 reply = await self.rpc(msg)
21786 return reply
21787
21788
21789
21790 @ReturnMapping(ErrorResults)
21791 async def OpenPorts(self, entities):
21792 '''
21793 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
21794 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21795 '''
21796 # map input types to rpc msg
21797 _params = dict()
21798 msg = dict(type='Uniter', request='OpenPorts', version=4, params=_params)
21799 _params['entities'] = entities
21800 reply = await self.rpc(msg)
21801 return reply
21802
21803
21804
21805 @ReturnMapping(StringResults)
21806 async def PrivateAddress(self, entities):
21807 '''
21808 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21809 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
21810 '''
21811 # map input types to rpc msg
21812 _params = dict()
21813 msg = dict(type='Uniter', request='PrivateAddress', version=4, params=_params)
21814 _params['entities'] = entities
21815 reply = await self.rpc(msg)
21816 return reply
21817
21818
21819
21820 @ReturnMapping(StringResult)
21821 async def ProviderType(self):
21822 '''
21823
21824 Returns -> typing.Union[_ForwardRef('Error'), str]
21825 '''
21826 # map input types to rpc msg
21827 _params = dict()
21828 msg = dict(type='Uniter', request='ProviderType', version=4, params=_params)
21829
21830 reply = await self.rpc(msg)
21831 return reply
21832
21833
21834
21835 @ReturnMapping(StringResults)
21836 async def PublicAddress(self, entities):
21837 '''
21838 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21839 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
21840 '''
21841 # map input types to rpc msg
21842 _params = dict()
21843 msg = dict(type='Uniter', request='PublicAddress', version=4, params=_params)
21844 _params['entities'] = entities
21845 reply = await self.rpc(msg)
21846 return reply
21847
21848
21849
21850 @ReturnMapping(GetLeadershipSettingsBulkResults)
21851 async def Read(self, entities):
21852 '''
21853 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21854 Returns -> typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult>
21855 '''
21856 # map input types to rpc msg
21857 _params = dict()
21858 msg = dict(type='Uniter', request='Read', version=4, params=_params)
21859 _params['entities'] = entities
21860 reply = await self.rpc(msg)
21861 return reply
21862
21863
21864
21865 @ReturnMapping(SettingsResults)
21866 async def ReadRemoteSettings(self, relation_unit_pairs):
21867 '''
21868 relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair>
21869 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
21870 '''
21871 # map input types to rpc msg
21872 _params = dict()
21873 msg = dict(type='Uniter', request='ReadRemoteSettings', version=4, params=_params)
21874 _params['relation-unit-pairs'] = relation_unit_pairs
21875 reply = await self.rpc(msg)
21876 return reply
21877
21878
21879
21880 @ReturnMapping(SettingsResults)
21881 async def ReadSettings(self, relation_units):
21882 '''
21883 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
21884 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
21885 '''
21886 # map input types to rpc msg
21887 _params = dict()
21888 msg = dict(type='Uniter', request='ReadSettings', version=4, params=_params)
21889 _params['relation-units'] = relation_units
21890 reply = await self.rpc(msg)
21891 return reply
21892
21893
21894
21895 @ReturnMapping(RelationResults)
21896 async def Relation(self, relation_units):
21897 '''
21898 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
21899 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
21900 '''
21901 # map input types to rpc msg
21902 _params = dict()
21903 msg = dict(type='Uniter', request='Relation', version=4, params=_params)
21904 _params['relation-units'] = relation_units
21905 reply = await self.rpc(msg)
21906 return reply
21907
21908
21909
21910 @ReturnMapping(RelationResults)
21911 async def RelationById(self, relation_ids):
21912 '''
21913 relation_ids : typing.Sequence<+T_co>[int]
21914 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
21915 '''
21916 # map input types to rpc msg
21917 _params = dict()
21918 msg = dict(type='Uniter', request='RelationById', version=4, params=_params)
21919 _params['relation-ids'] = relation_ids
21920 reply = await self.rpc(msg)
21921 return reply
21922
21923
21924
21925 @ReturnMapping(ErrorResults)
21926 async def RemoveStorageAttachments(self, ids):
21927 '''
21928 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
21929 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21930 '''
21931 # map input types to rpc msg
21932 _params = dict()
21933 msg = dict(type='Uniter', request='RemoveStorageAttachments', version=4, params=_params)
21934 _params['ids'] = ids
21935 reply = await self.rpc(msg)
21936 return reply
21937
21938
21939
21940 @ReturnMapping(ErrorResults)
21941 async def RequestReboot(self, entities):
21942 '''
21943 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21944 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21945 '''
21946 # map input types to rpc msg
21947 _params = dict()
21948 msg = dict(type='Uniter', request='RequestReboot', version=4, params=_params)
21949 _params['entities'] = entities
21950 reply = await self.rpc(msg)
21951 return reply
21952
21953
21954
21955 @ReturnMapping(ResolvedModeResults)
21956 async def Resolved(self, entities):
21957 '''
21958 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21959 Returns -> typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult>
21960 '''
21961 # map input types to rpc msg
21962 _params = dict()
21963 msg = dict(type='Uniter', request='Resolved', version=4, params=_params)
21964 _params['entities'] = entities
21965 reply = await self.rpc(msg)
21966 return reply
21967
21968
21969
21970 @ReturnMapping(ErrorResults)
21971 async def SetAgentStatus(self, entities):
21972 '''
21973 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
21974 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21975 '''
21976 # map input types to rpc msg
21977 _params = dict()
21978 msg = dict(type='Uniter', request='SetAgentStatus', version=4, params=_params)
21979 _params['entities'] = entities
21980 reply = await self.rpc(msg)
21981 return reply
21982
21983
21984
21985 @ReturnMapping(ErrorResults)
21986 async def SetApplicationStatus(self, entities):
21987 '''
21988 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
21989 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21990 '''
21991 # map input types to rpc msg
21992 _params = dict()
21993 msg = dict(type='Uniter', request='SetApplicationStatus', version=4, params=_params)
21994 _params['entities'] = entities
21995 reply = await self.rpc(msg)
21996 return reply
21997
21998
21999
22000 @ReturnMapping(ErrorResults)
22001 async def SetCharmURL(self, entities):
22002 '''
22003 entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL>
22004 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
22005 '''
22006 # map input types to rpc msg
22007 _params = dict()
22008 msg = dict(type='Uniter', request='SetCharmURL', version=4, params=_params)
22009 _params['entities'] = entities
22010 reply = await self.rpc(msg)
22011 return reply
22012
22013
22014
22015 @ReturnMapping(ErrorResults)
22016 async def SetStatus(self, entities):
22017 '''
22018 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
22019 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
22020 '''
22021 # map input types to rpc msg
22022 _params = dict()
22023 msg = dict(type='Uniter', request='SetStatus', version=4, params=_params)
22024 _params['entities'] = entities
22025 reply = await self.rpc(msg)
22026 return reply
22027
22028
22029
22030 @ReturnMapping(ErrorResults)
22031 async def SetUnitStatus(self, entities):
22032 '''
22033 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
22034 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
22035 '''
22036 # map input types to rpc msg
22037 _params = dict()
22038 msg = dict(type='Uniter', request='SetUnitStatus', version=4, params=_params)
22039 _params['entities'] = entities
22040 reply = await self.rpc(msg)
22041 return reply
22042
22043
22044
22045 @ReturnMapping(ErrorResults)
22046 async def SetWorkloadVersion(self, entities):
22047 '''
22048 entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion>
22049 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
22050 '''
22051 # map input types to rpc msg
22052 _params = dict()
22053 msg = dict(type='Uniter', request='SetWorkloadVersion', version=4, params=_params)
22054 _params['entities'] = entities
22055 reply = await self.rpc(msg)
22056 return reply
22057
22058
22059
22060 @ReturnMapping(LifeResults)
22061 async def StorageAttachmentLife(self, ids):
22062 '''
22063 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
22064 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
22065 '''
22066 # map input types to rpc msg
22067 _params = dict()
22068 msg = dict(type='Uniter', request='StorageAttachmentLife', version=4, params=_params)
22069 _params['ids'] = ids
22070 reply = await self.rpc(msg)
22071 return reply
22072
22073
22074
22075 @ReturnMapping(StorageAttachmentResults)
22076 async def StorageAttachments(self, ids):
22077 '''
22078 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
22079 Returns -> typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult>
22080 '''
22081 # map input types to rpc msg
22082 _params = dict()
22083 msg = dict(type='Uniter', request='StorageAttachments', version=4, params=_params)
22084 _params['ids'] = ids
22085 reply = await self.rpc(msg)
22086 return reply
22087
22088
22089
22090 @ReturnMapping(StatusResults)
22091 async def UnitStatus(self, entities):
22092 '''
22093 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22094 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
22095 '''
22096 # map input types to rpc msg
22097 _params = dict()
22098 msg = dict(type='Uniter', request='UnitStatus', version=4, params=_params)
22099 _params['entities'] = entities
22100 reply = await self.rpc(msg)
22101 return reply
22102
22103
22104
22105 @ReturnMapping(StorageAttachmentIdsResults)
22106 async def UnitStorageAttachments(self, entities):
22107 '''
22108 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22109 Returns -> typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult>
22110 '''
22111 # map input types to rpc msg
22112 _params = dict()
22113 msg = dict(type='Uniter', request='UnitStorageAttachments', version=4, params=_params)
22114 _params['entities'] = entities
22115 reply = await self.rpc(msg)
22116 return reply
22117
22118
22119
22120 @ReturnMapping(ErrorResults)
22121 async def UpdateSettings(self, relation_units):
22122 '''
22123 relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings>
22124 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
22125 '''
22126 # map input types to rpc msg
22127 _params = dict()
22128 msg = dict(type='Uniter', request='UpdateSettings', version=4, params=_params)
22129 _params['relation-units'] = relation_units
22130 reply = await self.rpc(msg)
22131 return reply
22132
22133
22134
22135 @ReturnMapping(NotifyWatchResults)
22136 async def Watch(self, entities):
22137 '''
22138 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22139 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
22140 '''
22141 # map input types to rpc msg
22142 _params = dict()
22143 msg = dict(type='Uniter', request='Watch', version=4, params=_params)
22144 _params['entities'] = entities
22145 reply = await self.rpc(msg)
22146 return reply
22147
22148
22149
22150 @ReturnMapping(NotifyWatchResult)
22151 async def WatchAPIHostPorts(self):
22152 '''
22153
22154 Returns -> typing.Union[str, _ForwardRef('Error')]
22155 '''
22156 # map input types to rpc msg
22157 _params = dict()
22158 msg = dict(type='Uniter', request='WatchAPIHostPorts', version=4, params=_params)
22159
22160 reply = await self.rpc(msg)
22161 return reply
22162
22163
22164
22165 @ReturnMapping(StringsWatchResults)
22166 async def WatchActionNotifications(self, entities):
22167 '''
22168 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22169 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
22170 '''
22171 # map input types to rpc msg
22172 _params = dict()
22173 msg = dict(type='Uniter', request='WatchActionNotifications', version=4, params=_params)
22174 _params['entities'] = entities
22175 reply = await self.rpc(msg)
22176 return reply
22177
22178
22179
22180 @ReturnMapping(StringsWatchResults)
22181 async def WatchApplicationRelations(self, entities):
22182 '''
22183 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22184 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
22185 '''
22186 # map input types to rpc msg
22187 _params = dict()
22188 msg = dict(type='Uniter', request='WatchApplicationRelations', version=4, params=_params)
22189 _params['entities'] = entities
22190 reply = await self.rpc(msg)
22191 return reply
22192
22193
22194
22195 @ReturnMapping(NotifyWatchResults)
22196 async def WatchConfigSettings(self, entities):
22197 '''
22198 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22199 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
22200 '''
22201 # map input types to rpc msg
22202 _params = dict()
22203 msg = dict(type='Uniter', request='WatchConfigSettings', version=4, params=_params)
22204 _params['entities'] = entities
22205 reply = await self.rpc(msg)
22206 return reply
22207
22208
22209
22210 @ReturnMapping(NotifyWatchResult)
22211 async def WatchForModelConfigChanges(self):
22212 '''
22213
22214 Returns -> typing.Union[str, _ForwardRef('Error')]
22215 '''
22216 # map input types to rpc msg
22217 _params = dict()
22218 msg = dict(type='Uniter', request='WatchForModelConfigChanges', version=4, params=_params)
22219
22220 reply = await self.rpc(msg)
22221 return reply
22222
22223
22224
22225 @ReturnMapping(NotifyWatchResults)
22226 async def WatchLeadershipSettings(self, entities):
22227 '''
22228 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22229 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
22230 '''
22231 # map input types to rpc msg
22232 _params = dict()
22233 msg = dict(type='Uniter', request='WatchLeadershipSettings', version=4, params=_params)
22234 _params['entities'] = entities
22235 reply = await self.rpc(msg)
22236 return reply
22237
22238
22239
22240 @ReturnMapping(NotifyWatchResults)
22241 async def WatchMeterStatus(self, entities):
22242 '''
22243 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22244 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
22245 '''
22246 # map input types to rpc msg
22247 _params = dict()
22248 msg = dict(type='Uniter', request='WatchMeterStatus', version=4, params=_params)
22249 _params['entities'] = entities
22250 reply = await self.rpc(msg)
22251 return reply
22252
22253
22254
22255 @ReturnMapping(RelationUnitsWatchResults)
22256 async def WatchRelationUnits(self, relation_units):
22257 '''
22258 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
22259 Returns -> typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult>
22260 '''
22261 # map input types to rpc msg
22262 _params = dict()
22263 msg = dict(type='Uniter', request='WatchRelationUnits', version=4, params=_params)
22264 _params['relation-units'] = relation_units
22265 reply = await self.rpc(msg)
22266 return reply
22267
22268
22269
22270 @ReturnMapping(NotifyWatchResults)
22271 async def WatchStorageAttachments(self, ids):
22272 '''
22273 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
22274 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
22275 '''
22276 # map input types to rpc msg
22277 _params = dict()
22278 msg = dict(type='Uniter', request='WatchStorageAttachments', version=4, params=_params)
22279 _params['ids'] = ids
22280 reply = await self.rpc(msg)
22281 return reply
22282
22283
22284
22285 @ReturnMapping(NotifyWatchResults)
22286 async def WatchUnitAddresses(self, entities):
22287 '''
22288 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22289 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
22290 '''
22291 # map input types to rpc msg
22292 _params = dict()
22293 msg = dict(type='Uniter', request='WatchUnitAddresses', version=4, params=_params)
22294 _params['entities'] = entities
22295 reply = await self.rpc(msg)
22296 return reply
22297
22298
22299
22300 @ReturnMapping(StringsWatchResults)
22301 async def WatchUnitStorageAttachments(self, entities):
22302 '''
22303 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22304 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
22305 '''
22306 # map input types to rpc msg
22307 _params = dict()
22308 msg = dict(type='Uniter', request='WatchUnitStorageAttachments', version=4, params=_params)
22309 _params['entities'] = entities
22310 reply = await self.rpc(msg)
22311 return reply
22312
22313
22314
22315 @ReturnMapping(StringResults)
22316 async def WorkloadVersion(self, entities):
22317 '''
22318 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22319 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
22320 '''
22321 # map input types to rpc msg
22322 _params = dict()
22323 msg = dict(type='Uniter', request='WorkloadVersion', version=4, params=_params)
22324 _params['entities'] = entities
22325 reply = await self.rpc(msg)
22326 return reply
22327
22328
22329 class UpgraderFacade(Type):
22330 name = 'Upgrader'
22331 version = 1
22332 schema = {'definitions': {'Binary': {'additionalProperties': False,
22333 'properties': {'Arch': {'type': 'string'},
22334 'Number': {'$ref': '#/definitions/Number'},
22335 'Series': {'type': 'string'}},
22336 'required': ['Number', 'Series', 'Arch'],
22337 'type': 'object'},
22338 'Entities': {'additionalProperties': False,
22339 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
22340 'type': 'array'}},
22341 'required': ['entities'],
22342 'type': 'object'},
22343 'EntitiesVersion': {'additionalProperties': False,
22344 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
22345 'type': 'array'}},
22346 'required': ['agent-tools'],
22347 'type': 'object'},
22348 'Entity': {'additionalProperties': False,
22349 'properties': {'tag': {'type': 'string'}},
22350 'required': ['tag'],
22351 'type': 'object'},
22352 'EntityVersion': {'additionalProperties': False,
22353 'properties': {'tag': {'type': 'string'},
22354 'tools': {'$ref': '#/definitions/Version'}},
22355 'required': ['tag', 'tools'],
22356 'type': 'object'},
22357 'Error': {'additionalProperties': False,
22358 'properties': {'code': {'type': 'string'},
22359 'info': {'$ref': '#/definitions/ErrorInfo'},
22360 'message': {'type': 'string'}},
22361 'required': ['message', 'code'],
22362 'type': 'object'},
22363 'ErrorInfo': {'additionalProperties': False,
22364 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
22365 'macaroon-path': {'type': 'string'}},
22366 'type': 'object'},
22367 'ErrorResult': {'additionalProperties': False,
22368 'properties': {'error': {'$ref': '#/definitions/Error'}},
22369 'type': 'object'},
22370 'ErrorResults': {'additionalProperties': False,
22371 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
22372 'type': 'array'}},
22373 'required': ['results'],
22374 'type': 'object'},
22375 'Macaroon': {'additionalProperties': False, 'type': 'object'},
22376 'NotifyWatchResult': {'additionalProperties': False,
22377 'properties': {'NotifyWatcherId': {'type': 'string'},
22378 'error': {'$ref': '#/definitions/Error'}},
22379 'required': ['NotifyWatcherId'],
22380 'type': 'object'},
22381 'NotifyWatchResults': {'additionalProperties': False,
22382 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
22383 'type': 'array'}},
22384 'required': ['results'],
22385 'type': 'object'},
22386 'Number': {'additionalProperties': False,
22387 'properties': {'Build': {'type': 'integer'},
22388 'Major': {'type': 'integer'},
22389 'Minor': {'type': 'integer'},
22390 'Patch': {'type': 'integer'},
22391 'Tag': {'type': 'string'}},
22392 'required': ['Major',
22393 'Minor',
22394 'Tag',
22395 'Patch',
22396 'Build'],
22397 'type': 'object'},
22398 'Tools': {'additionalProperties': False,
22399 'properties': {'sha256': {'type': 'string'},
22400 'size': {'type': 'integer'},
22401 'url': {'type': 'string'},
22402 'version': {'$ref': '#/definitions/Binary'}},
22403 'required': ['version', 'url', 'size'],
22404 'type': 'object'},
22405 'ToolsResult': {'additionalProperties': False,
22406 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
22407 'error': {'$ref': '#/definitions/Error'},
22408 'tools': {'items': {'$ref': '#/definitions/Tools'},
22409 'type': 'array'}},
22410 'required': ['tools',
22411 'disable-ssl-hostname-verification'],
22412 'type': 'object'},
22413 'ToolsResults': {'additionalProperties': False,
22414 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
22415 'type': 'array'}},
22416 'required': ['results'],
22417 'type': 'object'},
22418 'Version': {'additionalProperties': False,
22419 'properties': {'version': {'$ref': '#/definitions/Binary'}},
22420 'required': ['version'],
22421 'type': 'object'},
22422 'VersionResult': {'additionalProperties': False,
22423 'properties': {'error': {'$ref': '#/definitions/Error'},
22424 'version': {'$ref': '#/definitions/Number'}},
22425 'type': 'object'},
22426 'VersionResults': {'additionalProperties': False,
22427 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
22428 'type': 'array'}},
22429 'required': ['results'],
22430 'type': 'object'}},
22431 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
22432 'Result': {'$ref': '#/definitions/VersionResults'}},
22433 'type': 'object'},
22434 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
22435 'Result': {'$ref': '#/definitions/ErrorResults'}},
22436 'type': 'object'},
22437 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
22438 'Result': {'$ref': '#/definitions/ToolsResults'}},
22439 'type': 'object'},
22440 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
22441 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
22442 'type': 'object'}},
22443 'type': 'object'}
22444
22445
22446 @ReturnMapping(VersionResults)
22447 async def DesiredVersion(self, entities):
22448 '''
22449 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22450 Returns -> typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
22451 '''
22452 # map input types to rpc msg
22453 _params = dict()
22454 msg = dict(type='Upgrader', request='DesiredVersion', version=1, params=_params)
22455 _params['entities'] = entities
22456 reply = await self.rpc(msg)
22457 return reply
22458
22459
22460
22461 @ReturnMapping(ErrorResults)
22462 async def SetTools(self, agent_tools):
22463 '''
22464 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
22465 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
22466 '''
22467 # map input types to rpc msg
22468 _params = dict()
22469 msg = dict(type='Upgrader', request='SetTools', version=1, params=_params)
22470 _params['agent-tools'] = agent_tools
22471 reply = await self.rpc(msg)
22472 return reply
22473
22474
22475
22476 @ReturnMapping(ToolsResults)
22477 async def Tools(self, entities):
22478 '''
22479 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22480 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
22481 '''
22482 # map input types to rpc msg
22483 _params = dict()
22484 msg = dict(type='Upgrader', request='Tools', version=1, params=_params)
22485 _params['entities'] = entities
22486 reply = await self.rpc(msg)
22487 return reply
22488
22489
22490
22491 @ReturnMapping(NotifyWatchResults)
22492 async def WatchAPIVersion(self, entities):
22493 '''
22494 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22495 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
22496 '''
22497 # map input types to rpc msg
22498 _params = dict()
22499 msg = dict(type='Upgrader', request='WatchAPIVersion', version=1, params=_params)
22500 _params['entities'] = entities
22501 reply = await self.rpc(msg)
22502 return reply
22503
22504
22505 class UserManagerFacade(Type):
22506 name = 'UserManager'
22507 version = 1
22508 schema = {'definitions': {'AddUser': {'additionalProperties': False,
22509 'properties': {'display-name': {'type': 'string'},
22510 'password': {'type': 'string'},
22511 'username': {'type': 'string'}},
22512 'required': ['username', 'display-name'],
22513 'type': 'object'},
22514 'AddUserResult': {'additionalProperties': False,
22515 'properties': {'error': {'$ref': '#/definitions/Error'},
22516 'secret-key': {'items': {'type': 'integer'},
22517 'type': 'array'},
22518 'tag': {'type': 'string'}},
22519 'type': 'object'},
22520 'AddUserResults': {'additionalProperties': False,
22521 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
22522 'type': 'array'}},
22523 'required': ['results'],
22524 'type': 'object'},
22525 'AddUsers': {'additionalProperties': False,
22526 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
22527 'type': 'array'}},
22528 'required': ['users'],
22529 'type': 'object'},
22530 'Entities': {'additionalProperties': False,
22531 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
22532 'type': 'array'}},
22533 'required': ['entities'],
22534 'type': 'object'},
22535 'Entity': {'additionalProperties': False,
22536 'properties': {'tag': {'type': 'string'}},
22537 'required': ['tag'],
22538 'type': 'object'},
22539 'EntityPassword': {'additionalProperties': False,
22540 'properties': {'password': {'type': 'string'},
22541 'tag': {'type': 'string'}},
22542 'required': ['tag', 'password'],
22543 'type': 'object'},
22544 'EntityPasswords': {'additionalProperties': False,
22545 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
22546 'type': 'array'}},
22547 'required': ['changes'],
22548 'type': 'object'},
22549 'Error': {'additionalProperties': False,
22550 'properties': {'code': {'type': 'string'},
22551 'info': {'$ref': '#/definitions/ErrorInfo'},
22552 'message': {'type': 'string'}},
22553 'required': ['message', 'code'],
22554 'type': 'object'},
22555 'ErrorInfo': {'additionalProperties': False,
22556 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
22557 'macaroon-path': {'type': 'string'}},
22558 'type': 'object'},
22559 'ErrorResult': {'additionalProperties': False,
22560 'properties': {'error': {'$ref': '#/definitions/Error'}},
22561 'type': 'object'},
22562 'ErrorResults': {'additionalProperties': False,
22563 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
22564 'type': 'array'}},
22565 'required': ['results'],
22566 'type': 'object'},
22567 'Macaroon': {'additionalProperties': False, 'type': 'object'},
22568 'UserInfo': {'additionalProperties': False,
22569 'properties': {'access': {'type': 'string'},
22570 'created-by': {'type': 'string'},
22571 'date-created': {'format': 'date-time',
22572 'type': 'string'},
22573 'disabled': {'type': 'boolean'},
22574 'display-name': {'type': 'string'},
22575 'last-connection': {'format': 'date-time',
22576 'type': 'string'},
22577 'username': {'type': 'string'}},
22578 'required': ['username',
22579 'display-name',
22580 'access',
22581 'created-by',
22582 'date-created',
22583 'disabled'],
22584 'type': 'object'},
22585 'UserInfoRequest': {'additionalProperties': False,
22586 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
22587 'type': 'array'},
22588 'include-disabled': {'type': 'boolean'}},
22589 'required': ['entities',
22590 'include-disabled'],
22591 'type': 'object'},
22592 'UserInfoResult': {'additionalProperties': False,
22593 'properties': {'error': {'$ref': '#/definitions/Error'},
22594 'result': {'$ref': '#/definitions/UserInfo'}},
22595 'type': 'object'},
22596 'UserInfoResults': {'additionalProperties': False,
22597 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
22598 'type': 'array'}},
22599 'required': ['results'],
22600 'type': 'object'}},
22601 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
22602 'Result': {'$ref': '#/definitions/AddUserResults'}},
22603 'type': 'object'},
22604 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
22605 'Result': {'$ref': '#/definitions/ErrorResults'}},
22606 'type': 'object'},
22607 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
22608 'Result': {'$ref': '#/definitions/ErrorResults'}},
22609 'type': 'object'},
22610 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
22611 'Result': {'$ref': '#/definitions/ErrorResults'}},
22612 'type': 'object'},
22613 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
22614 'Result': {'$ref': '#/definitions/ErrorResults'}},
22615 'type': 'object'},
22616 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
22617 'Result': {'$ref': '#/definitions/UserInfoResults'}},
22618 'type': 'object'}},
22619 'type': 'object'}
22620
22621
22622 @ReturnMapping(AddUserResults)
22623 async def AddUser(self, users):
22624 '''
22625 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
22626 Returns -> typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
22627 '''
22628 # map input types to rpc msg
22629 _params = dict()
22630 msg = dict(type='UserManager', request='AddUser', version=1, params=_params)
22631 _params['users'] = users
22632 reply = await self.rpc(msg)
22633 return reply
22634
22635
22636
22637 @ReturnMapping(ErrorResults)
22638 async def DisableUser(self, entities):
22639 '''
22640 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22641 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
22642 '''
22643 # map input types to rpc msg
22644 _params = dict()
22645 msg = dict(type='UserManager', request='DisableUser', version=1, params=_params)
22646 _params['entities'] = entities
22647 reply = await self.rpc(msg)
22648 return reply
22649
22650
22651
22652 @ReturnMapping(ErrorResults)
22653 async def EnableUser(self, entities):
22654 '''
22655 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22656 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
22657 '''
22658 # map input types to rpc msg
22659 _params = dict()
22660 msg = dict(type='UserManager', request='EnableUser', version=1, params=_params)
22661 _params['entities'] = entities
22662 reply = await self.rpc(msg)
22663 return reply
22664
22665
22666
22667 @ReturnMapping(ErrorResults)
22668 async def RemoveUser(self, entities):
22669 '''
22670 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22671 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
22672 '''
22673 # map input types to rpc msg
22674 _params = dict()
22675 msg = dict(type='UserManager', request='RemoveUser', version=1, params=_params)
22676 _params['entities'] = entities
22677 reply = await self.rpc(msg)
22678 return reply
22679
22680
22681
22682 @ReturnMapping(ErrorResults)
22683 async def SetPassword(self, changes):
22684 '''
22685 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
22686 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
22687 '''
22688 # map input types to rpc msg
22689 _params = dict()
22690 msg = dict(type='UserManager', request='SetPassword', version=1, params=_params)
22691 _params['changes'] = changes
22692 reply = await self.rpc(msg)
22693 return reply
22694
22695
22696
22697 @ReturnMapping(UserInfoResults)
22698 async def UserInfo(self, entities, include_disabled):
22699 '''
22700 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
22701 include_disabled : bool
22702 Returns -> typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
22703 '''
22704 # map input types to rpc msg
22705 _params = dict()
22706 msg = dict(type='UserManager', request='UserInfo', version=1, params=_params)
22707 _params['entities'] = entities
22708 _params['include-disabled'] = include_disabled
22709 reply = await self.rpc(msg)
22710 return reply
22711
22712
22713 class VolumeAttachmentsWatcherFacade(Type):
22714 name = 'VolumeAttachmentsWatcher'
22715 version = 2
22716 schema = {'definitions': {'Error': {'additionalProperties': False,
22717 'properties': {'code': {'type': 'string'},
22718 'info': {'$ref': '#/definitions/ErrorInfo'},
22719 'message': {'type': 'string'}},
22720 'required': ['message', 'code'],
22721 'type': 'object'},
22722 'ErrorInfo': {'additionalProperties': False,
22723 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
22724 'macaroon-path': {'type': 'string'}},
22725 'type': 'object'},
22726 'Macaroon': {'additionalProperties': False, 'type': 'object'},
22727 'MachineStorageId': {'additionalProperties': False,
22728 'properties': {'attachment-tag': {'type': 'string'},
22729 'machine-tag': {'type': 'string'}},
22730 'required': ['machine-tag',
22731 'attachment-tag'],
22732 'type': 'object'},
22733 'MachineStorageIdsWatchResult': {'additionalProperties': False,
22734 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
22735 'type': 'array'},
22736 'error': {'$ref': '#/definitions/Error'},
22737 'watcher-id': {'type': 'string'}},
22738 'required': ['watcher-id',
22739 'changes'],
22740 'type': 'object'}},
22741 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
22742 'type': 'object'},
22743 'Stop': {'type': 'object'}},
22744 'type': 'object'}
22745
22746
22747 @ReturnMapping(MachineStorageIdsWatchResult)
22748 async def Next(self):
22749 '''
22750
22751 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
22752 '''
22753 # map input types to rpc msg
22754 _params = dict()
22755 msg = dict(type='VolumeAttachmentsWatcher', request='Next', version=2, params=_params)
22756
22757 reply = await self.rpc(msg)
22758 return reply
22759
22760
22761
22762 @ReturnMapping(None)
22763 async def Stop(self):
22764 '''
22765
22766 Returns -> None
22767 '''
22768 # map input types to rpc msg
22769 _params = dict()
22770 msg = dict(type='VolumeAttachmentsWatcher', request='Stop', version=2, params=_params)
22771
22772 reply = await self.rpc(msg)
22773 return reply
22774
22775