Working async AllWatcher example
[osm/N2VC.git] / juju / client / _client.py
1
2 from juju.client.facade import Type, ReturnMapping
3
4 class Action(Type):
5 _toSchema = {'name': 'name', 'tag': 'tag', 'receiver': 'receiver', 'parameters': 'parameters'}
6 _toPy = {'name': 'name', 'tag': 'tag', 'receiver': 'receiver', 'parameters': 'parameters'}
7 def __init__(self, name=None, parameters=None, receiver=None, tag=None):
8 '''
9 name : str
10 parameters : typing.Mapping[str, typing.Any]
11 receiver : str
12 tag : str
13 '''
14 self.name = name
15 self.parameters = parameters
16 self.receiver = receiver
17 self.tag = tag
18
19
20 class ActionResult(Type):
21 _toSchema = {'message': 'message', 'status': 'status', 'enqueued': 'enqueued', 'action': 'action', 'output': 'output', 'completed': 'completed', 'started': 'started', 'error': 'error'}
22 _toPy = {'message': 'message', 'status': 'status', 'enqueued': 'enqueued', 'action': 'action', 'output': 'output', 'completed': 'completed', 'started': 'started', 'error': 'error'}
23 def __init__(self, action=None, completed=None, enqueued=None, error=None, message=None, output=None, started=None, status=None):
24 '''
25 action : Action
26 completed : str
27 enqueued : str
28 error : Error
29 message : str
30 output : typing.Mapping[str, typing.Any]
31 started : str
32 status : str
33 '''
34 self.action = Action.from_json(action) if action else None
35 self.completed = completed
36 self.enqueued = enqueued
37 self.error = Error.from_json(error) if error else None
38 self.message = message
39 self.output = output
40 self.started = started
41 self.status = status
42
43
44 class ActionResults(Type):
45 _toSchema = {'results': 'results'}
46 _toPy = {'results': 'results'}
47 def __init__(self, results=None):
48 '''
49 results : typing.Sequence[~ActionResult]
50 '''
51 self.results = [ActionResult.from_json(o) for o in results or []]
52
53
54 class ActionSpec(Type):
55 _toSchema = {'params': 'Params', 'description': 'Description'}
56 _toPy = {'Params': 'params', 'Description': 'description'}
57 def __init__(self, description=None, params=None):
58 '''
59 description : str
60 params : typing.Mapping[str, typing.Any]
61 '''
62 self.description = description
63 self.params = params
64
65
66 class Actions(Type):
67 _toSchema = {'actionspecs': 'ActionSpecs'}
68 _toPy = {'ActionSpecs': 'actionspecs'}
69 def __init__(self, actionspecs=None):
70 '''
71 actionspecs : typing.Mapping[str, ~ActionSpec]
72 '''
73 self.actionspecs = {k: ActionSpec.from_json(v) for k, v in (actionspecs or dict()).items()}
74
75
76 class ActionsByName(Type):
77 _toSchema = {'name': 'name', 'actions': 'actions', 'error': 'error'}
78 _toPy = {'name': 'name', 'actions': 'actions', 'error': 'error'}
79 def __init__(self, actions=None, error=None, name=None):
80 '''
81 actions : typing.Sequence[~ActionResult]
82 error : Error
83 name : str
84 '''
85 self.actions = [ActionResult.from_json(o) for o in actions or []]
86 self.error = Error.from_json(error) if error else None
87 self.name = name
88
89
90 class ActionsByNames(Type):
91 _toSchema = {'actions': 'actions'}
92 _toPy = {'actions': 'actions'}
93 def __init__(self, actions=None):
94 '''
95 actions : typing.Sequence[~ActionsByName]
96 '''
97 self.actions = [ActionsByName.from_json(o) for o in actions or []]
98
99
100 class ActionsByReceiver(Type):
101 _toSchema = {'receiver': 'receiver', 'actions': 'actions', 'error': 'error'}
102 _toPy = {'receiver': 'receiver', 'actions': 'actions', 'error': 'error'}
103 def __init__(self, actions=None, error=None, receiver=None):
104 '''
105 actions : typing.Sequence[~ActionResult]
106 error : Error
107 receiver : str
108 '''
109 self.actions = [ActionResult.from_json(o) for o in actions or []]
110 self.error = Error.from_json(error) if error else None
111 self.receiver = receiver
112
113
114 class ActionsByReceivers(Type):
115 _toSchema = {'actions': 'actions'}
116 _toPy = {'actions': 'actions'}
117 def __init__(self, actions=None):
118 '''
119 actions : typing.Sequence[~ActionsByReceiver]
120 '''
121 self.actions = [ActionsByReceiver.from_json(o) for o in actions or []]
122
123
124 class ApplicationCharmActionsResult(Type):
125 _toSchema = {'applicationtag': 'ApplicationTag', 'actions': 'actions', 'error': 'error'}
126 _toPy = {'actions': 'actions', 'ApplicationTag': 'applicationtag', 'error': 'error'}
127 def __init__(self, applicationtag=None, actions=None, error=None):
128 '''
129 applicationtag : str
130 actions : Actions
131 error : Error
132 '''
133 self.applicationtag = applicationtag
134 self.actions = Actions.from_json(actions) if actions else None
135 self.error = Error.from_json(error) if error else None
136
137
138 class ApplicationsCharmActionsResults(Type):
139 _toSchema = {'results': 'results'}
140 _toPy = {'results': 'results'}
141 def __init__(self, results=None):
142 '''
143 results : typing.Sequence[~ApplicationCharmActionsResult]
144 '''
145 self.results = [ApplicationCharmActionsResult.from_json(o) for o in results or []]
146
147
148 class Entities(Type):
149 _toSchema = {'entities': 'Entities'}
150 _toPy = {'Entities': 'entities'}
151 def __init__(self, entities=None):
152 '''
153 entities : typing.Sequence[~Entity]
154 '''
155 self.entities = [Entity.from_json(o) for o in entities or []]
156
157
158 class Entity(Type):
159 _toSchema = {'tag': 'Tag'}
160 _toPy = {'Tag': 'tag'}
161 def __init__(self, tag=None):
162 '''
163 tag : str
164 '''
165 self.tag = tag
166
167
168 class Error(Type):
169 _toSchema = {'code': 'Code', 'message': 'Message', 'info': 'Info'}
170 _toPy = {'Code': 'code', 'Message': 'message', 'Info': 'info'}
171 def __init__(self, code=None, info=None, message=None):
172 '''
173 code : str
174 info : ErrorInfo
175 message : str
176 '''
177 self.code = code
178 self.info = ErrorInfo.from_json(info) if info else None
179 self.message = message
180
181
182 class ErrorInfo(Type):
183 _toSchema = {'macaroon': 'Macaroon', 'macaroonpath': 'MacaroonPath'}
184 _toPy = {'Macaroon': 'macaroon', 'MacaroonPath': 'macaroonpath'}
185 def __init__(self, macaroon=None, macaroonpath=None):
186 '''
187 macaroon : Macaroon
188 macaroonpath : str
189 '''
190 self.macaroon = Macaroon.from_json(macaroon) if macaroon else None
191 self.macaroonpath = macaroonpath
192
193
194 class FindActionsByNames(Type):
195 _toSchema = {'names': 'names'}
196 _toPy = {'names': 'names'}
197 def __init__(self, names=None):
198 '''
199 names : typing.Sequence[str]
200 '''
201 self.names = names
202
203
204 class FindTags(Type):
205 _toSchema = {'prefixes': 'prefixes'}
206 _toPy = {'prefixes': 'prefixes'}
207 def __init__(self, prefixes=None):
208 '''
209 prefixes : typing.Sequence[str]
210 '''
211 self.prefixes = prefixes
212
213
214 class FindTagsResults(Type):
215 _toSchema = {'matches': 'matches'}
216 _toPy = {'matches': 'matches'}
217 def __init__(self, matches=None):
218 '''
219 matches : typing.Sequence[~Entity]
220 '''
221 self.matches = [Entity.from_json(o) for o in matches or []]
222
223
224 class Macaroon(Type):
225 _toSchema = {'sig': 'sig', 'caveats': 'caveats', 'location': 'location', 'id_': 'id', 'data': 'data'}
226 _toPy = {'caveats': 'caveats', 'id': 'id_', 'sig': 'sig', 'location': 'location', 'data': 'data'}
227 def __init__(self, caveats=None, data=None, id_=None, location=None, sig=None):
228 '''
229 caveats : typing.Sequence[~caveat]
230 data : typing.Sequence[int]
231 id_ : packet
232 location : packet
233 sig : typing.Sequence[int]
234 '''
235 self.caveats = [caveat.from_json(o) for o in caveats or []]
236 self.data = data
237 self.id_ = packet.from_json(id_) if id_ else None
238 self.location = packet.from_json(location) if location else None
239 self.sig = sig
240
241
242 class RunParams(Type):
243 _toSchema = {'timeout': 'Timeout', 'commands': 'Commands', 'units': 'Units', 'machines': 'Machines', 'applications': 'Applications'}
244 _toPy = {'Commands': 'commands', 'Timeout': 'timeout', 'Machines': 'machines', 'Applications': 'applications', 'Units': 'units'}
245 def __init__(self, applications=None, commands=None, machines=None, timeout=None, units=None):
246 '''
247 applications : typing.Sequence[str]
248 commands : str
249 machines : typing.Sequence[str]
250 timeout : int
251 units : typing.Sequence[str]
252 '''
253 self.applications = applications
254 self.commands = commands
255 self.machines = machines
256 self.timeout = timeout
257 self.units = units
258
259
260 class caveat(Type):
261 _toSchema = {'caveatid': 'caveatId', 'verificationid': 'verificationId', 'location': 'location'}
262 _toPy = {'verificationId': 'verificationid', 'location': 'location', 'caveatId': 'caveatid'}
263 def __init__(self, caveatid=None, location=None, verificationid=None):
264 '''
265 caveatid : packet
266 location : packet
267 verificationid : packet
268 '''
269 self.caveatid = packet.from_json(caveatid) if caveatid else None
270 self.location = packet.from_json(location) if location else None
271 self.verificationid = packet.from_json(verificationid) if verificationid else None
272
273
274 class packet(Type):
275 _toSchema = {'headerlen': 'headerLen', 'start': 'start', 'totallen': 'totalLen'}
276 _toPy = {'totalLen': 'totallen', 'start': 'start', 'headerLen': 'headerlen'}
277 def __init__(self, headerlen=None, start=None, totallen=None):
278 '''
279 headerlen : int
280 start : int
281 totallen : int
282 '''
283 self.headerlen = headerlen
284 self.start = start
285 self.totallen = totallen
286
287
288 class BoolResult(Type):
289 _toSchema = {'result': 'Result', 'error': 'Error'}
290 _toPy = {'Result': 'result', 'Error': 'error'}
291 def __init__(self, error=None, result=None):
292 '''
293 error : Error
294 result : bool
295 '''
296 self.error = Error.from_json(error) if error else None
297 self.result = result
298
299
300 class EntitiesWatchResult(Type):
301 _toSchema = {'changes': 'Changes', 'entitywatcherid': 'EntityWatcherId', 'error': 'Error'}
302 _toPy = {'Changes': 'changes', 'EntityWatcherId': 'entitywatcherid', 'Error': 'error'}
303 def __init__(self, changes=None, entitywatcherid=None, error=None):
304 '''
305 changes : typing.Sequence[str]
306 entitywatcherid : str
307 error : Error
308 '''
309 self.changes = changes
310 self.entitywatcherid = entitywatcherid
311 self.error = Error.from_json(error) if error else None
312
313
314 class ErrorResult(Type):
315 _toSchema = {'code': 'Code', 'message': 'Message', 'info': 'Info'}
316 _toPy = {'Code': 'code', 'Message': 'message', 'Info': 'info'}
317 def __init__(self, code=None, info=None, message=None):
318 '''
319 code : str
320 info : ErrorInfo
321 message : str
322 '''
323 self.code = code
324 self.info = ErrorInfo.from_json(info) if info else None
325 self.message = message
326
327
328 class AgentGetEntitiesResult(Type):
329 _toSchema = {'jobs': 'Jobs', 'containertype': 'ContainerType', 'life': 'Life', 'error': 'Error'}
330 _toPy = {'Life': 'life', 'ContainerType': 'containertype', 'Jobs': 'jobs', 'Error': 'error'}
331 def __init__(self, containertype=None, error=None, jobs=None, life=None):
332 '''
333 containertype : str
334 error : Error
335 jobs : typing.Sequence[str]
336 life : str
337 '''
338 self.containertype = containertype
339 self.error = Error.from_json(error) if error else None
340 self.jobs = jobs
341 self.life = life
342
343
344 class AgentGetEntitiesResults(Type):
345 _toSchema = {'entities': 'Entities'}
346 _toPy = {'Entities': 'entities'}
347 def __init__(self, entities=None):
348 '''
349 entities : typing.Sequence[~AgentGetEntitiesResult]
350 '''
351 self.entities = [AgentGetEntitiesResult.from_json(o) for o in entities or []]
352
353
354 class EntityPassword(Type):
355 _toSchema = {'password': 'Password', 'tag': 'Tag'}
356 _toPy = {'Password': 'password', 'Tag': 'tag'}
357 def __init__(self, password=None, tag=None):
358 '''
359 password : str
360 tag : str
361 '''
362 self.password = password
363 self.tag = tag
364
365
366 class EntityPasswords(Type):
367 _toSchema = {'changes': 'Changes'}
368 _toPy = {'Changes': 'changes'}
369 def __init__(self, changes=None):
370 '''
371 changes : typing.Sequence[~EntityPassword]
372 '''
373 self.changes = [EntityPassword.from_json(o) for o in changes or []]
374
375
376 class ErrorResults(Type):
377 _toSchema = {'results': 'Results'}
378 _toPy = {'Results': 'results'}
379 def __init__(self, results=None):
380 '''
381 results : typing.Sequence[~ErrorResult]
382 '''
383 self.results = [ErrorResult.from_json(o) for o in results or []]
384
385
386 class IsMasterResult(Type):
387 _toSchema = {'master': 'Master'}
388 _toPy = {'Master': 'master'}
389 def __init__(self, master=None):
390 '''
391 master : bool
392 '''
393 self.master = master
394
395
396 class ModelConfigResult(Type):
397 _toSchema = {'config': 'Config'}
398 _toPy = {'Config': 'config'}
399 def __init__(self, config=None):
400 '''
401 config : typing.Mapping[str, typing.Any]
402 '''
403 self.config = config
404
405
406 class NotifyWatchResult(Type):
407 _toSchema = {'notifywatcherid': 'NotifyWatcherId', 'error': 'Error'}
408 _toPy = {'NotifyWatcherId': 'notifywatcherid', 'Error': 'error'}
409 def __init__(self, error=None, notifywatcherid=None):
410 '''
411 error : Error
412 notifywatcherid : str
413 '''
414 self.error = Error.from_json(error) if error else None
415 self.notifywatcherid = notifywatcherid
416
417
418 class StateServingInfo(Type):
419 _toSchema = {'caprivatekey': 'CAPrivateKey', 'systemidentity': 'SystemIdentity', 'cert': 'Cert', 'apiport': 'APIPort', 'privatekey': 'PrivateKey', 'stateport': 'StatePort', 'sharedsecret': 'SharedSecret'}
420 _toPy = {'Cert': 'cert', 'CAPrivateKey': 'caprivatekey', 'APIPort': 'apiport', 'PrivateKey': 'privatekey', 'SystemIdentity': 'systemidentity', 'StatePort': 'stateport', 'SharedSecret': 'sharedsecret'}
421 def __init__(self, apiport=None, caprivatekey=None, cert=None, privatekey=None, sharedsecret=None, stateport=None, systemidentity=None):
422 '''
423 apiport : int
424 caprivatekey : str
425 cert : str
426 privatekey : str
427 sharedsecret : str
428 stateport : int
429 systemidentity : str
430 '''
431 self.apiport = apiport
432 self.caprivatekey = caprivatekey
433 self.cert = cert
434 self.privatekey = privatekey
435 self.sharedsecret = sharedsecret
436 self.stateport = stateport
437 self.systemidentity = systemidentity
438
439
440 class AllWatcherNextResults(Type):
441 _toSchema = {'deltas': 'Deltas'}
442 _toPy = {'Deltas': 'deltas'}
443 def __init__(self, deltas=None):
444 '''
445 deltas : typing.Sequence[~Delta]
446 '''
447 self.deltas = [Delta.from_json(o) for o in deltas or []]
448
449
450 class Delta(Type):
451 _toSchema = {'removed': 'Removed'}
452 _toPy = {'Removed': 'removed'}
453 def __init__(self, removed=None):
454 '''
455 removed : bool
456 '''
457 self.removed = removed
458
459
460 class AnnotationsGetResult(Type):
461 _toSchema = {'entitytag': 'EntityTag', 'annotations': 'Annotations', 'error': 'Error'}
462 _toPy = {'Annotations': 'annotations', 'EntityTag': 'entitytag', 'Error': 'error'}
463 def __init__(self, annotations=None, entitytag=None, error=None):
464 '''
465 annotations : typing.Mapping[str, str]
466 entitytag : str
467 error : ErrorResult
468 '''
469 self.annotations = annotations
470 self.entitytag = entitytag
471 self.error = ErrorResult.from_json(error) if error else None
472
473
474 class AnnotationsGetResults(Type):
475 _toSchema = {'results': 'Results'}
476 _toPy = {'Results': 'results'}
477 def __init__(self, results=None):
478 '''
479 results : typing.Sequence[~AnnotationsGetResult]
480 '''
481 self.results = [AnnotationsGetResult.from_json(o) for o in results or []]
482
483
484 class AnnotationsSet(Type):
485 _toSchema = {'annotations': 'Annotations'}
486 _toPy = {'Annotations': 'annotations'}
487 def __init__(self, annotations=None):
488 '''
489 annotations : typing.Sequence[~EntityAnnotations]
490 '''
491 self.annotations = [EntityAnnotations.from_json(o) for o in annotations or []]
492
493
494 class EntityAnnotations(Type):
495 _toSchema = {'entitytag': 'EntityTag', 'annotations': 'Annotations'}
496 _toPy = {'Annotations': 'annotations', 'EntityTag': 'entitytag'}
497 def __init__(self, annotations=None, entitytag=None):
498 '''
499 annotations : typing.Mapping[str, str]
500 entitytag : str
501 '''
502 self.annotations = annotations
503 self.entitytag = entitytag
504
505
506 class AddApplicationUnits(Type):
507 _toSchema = {'placement': 'Placement', 'numunits': 'NumUnits', 'applicationname': 'ApplicationName'}
508 _toPy = {'NumUnits': 'numunits', 'ApplicationName': 'applicationname', 'Placement': 'placement'}
509 def __init__(self, applicationname=None, numunits=None, placement=None):
510 '''
511 applicationname : str
512 numunits : int
513 placement : typing.Sequence[~Placement]
514 '''
515 self.applicationname = applicationname
516 self.numunits = numunits
517 self.placement = [Placement.from_json(o) for o in placement or []]
518
519
520 class AddApplicationUnitsResults(Type):
521 _toSchema = {'units': 'Units'}
522 _toPy = {'Units': 'units'}
523 def __init__(self, units=None):
524 '''
525 units : typing.Sequence[str]
526 '''
527 self.units = units
528
529
530 class AddRelation(Type):
531 _toSchema = {'endpoints': 'Endpoints'}
532 _toPy = {'Endpoints': 'endpoints'}
533 def __init__(self, endpoints=None):
534 '''
535 endpoints : typing.Sequence[str]
536 '''
537 self.endpoints = endpoints
538
539
540 class AddRelationResults(Type):
541 _toSchema = {'endpoints': 'Endpoints'}
542 _toPy = {'Endpoints': 'endpoints'}
543 def __init__(self, endpoints=None):
544 '''
545 endpoints : typing.Mapping[str, ~Relation]
546 '''
547 self.endpoints = {k: Relation.from_json(v) for k, v in (endpoints or dict()).items()}
548
549
550 class ApplicationCharmRelations(Type):
551 _toSchema = {'applicationname': 'ApplicationName'}
552 _toPy = {'ApplicationName': 'applicationname'}
553 def __init__(self, applicationname=None):
554 '''
555 applicationname : str
556 '''
557 self.applicationname = applicationname
558
559
560 class ApplicationCharmRelationsResults(Type):
561 _toSchema = {'charmrelations': 'CharmRelations'}
562 _toPy = {'CharmRelations': 'charmrelations'}
563 def __init__(self, charmrelations=None):
564 '''
565 charmrelations : typing.Sequence[str]
566 '''
567 self.charmrelations = charmrelations
568
569
570 class ApplicationDeploy(Type):
571 _toSchema = {'channel': 'Channel', 'resources': 'Resources', 'storage': 'Storage', 'placement': 'Placement', 'series': 'Series', 'applicationname': 'ApplicationName', 'config': 'Config', 'endpointbindings': 'EndpointBindings', 'numunits': 'NumUnits', 'constraints': 'Constraints', 'charmurl': 'CharmUrl', 'configyaml': 'ConfigYAML'}
572 _toPy = {'CharmUrl': 'charmurl', 'ApplicationName': 'applicationname', 'Channel': 'channel', 'Placement': 'placement', 'ConfigYAML': 'configyaml', 'EndpointBindings': 'endpointbindings', 'Storage': 'storage', 'Series': 'series', 'Resources': 'resources', 'NumUnits': 'numunits', 'Constraints': 'constraints', 'Config': 'config'}
573 def __init__(self, applicationname=None, channel=None, charmurl=None, config=None, configyaml=None, constraints=None, endpointbindings=None, numunits=None, placement=None, resources=None, series=None, storage=None):
574 '''
575 applicationname : str
576 channel : str
577 charmurl : str
578 config : typing.Mapping[str, str]
579 configyaml : str
580 constraints : Value
581 endpointbindings : typing.Mapping[str, str]
582 numunits : int
583 placement : typing.Sequence[~Placement]
584 resources : typing.Mapping[str, str]
585 series : str
586 storage : typing.Mapping[str, ~Constraints]
587 '''
588 self.applicationname = applicationname
589 self.channel = channel
590 self.charmurl = charmurl
591 self.config = config
592 self.configyaml = configyaml
593 self.constraints = Value.from_json(constraints) if constraints else None
594 self.endpointbindings = endpointbindings
595 self.numunits = numunits
596 self.placement = [Placement.from_json(o) for o in placement or []]
597 self.resources = resources
598 self.series = series
599 self.storage = {k: Constraints.from_json(v) for k, v in (storage or dict()).items()}
600
601
602 class ApplicationDestroy(Type):
603 _toSchema = {'applicationname': 'ApplicationName'}
604 _toPy = {'ApplicationName': 'applicationname'}
605 def __init__(self, applicationname=None):
606 '''
607 applicationname : str
608 '''
609 self.applicationname = applicationname
610
611
612 class ApplicationExpose(Type):
613 _toSchema = {'applicationname': 'ApplicationName'}
614 _toPy = {'ApplicationName': 'applicationname'}
615 def __init__(self, applicationname=None):
616 '''
617 applicationname : str
618 '''
619 self.applicationname = applicationname
620
621
622 class ApplicationGet(Type):
623 _toSchema = {'applicationname': 'ApplicationName'}
624 _toPy = {'ApplicationName': 'applicationname'}
625 def __init__(self, applicationname=None):
626 '''
627 applicationname : str
628 '''
629 self.applicationname = applicationname
630
631
632 class ApplicationGetResults(Type):
633 _toSchema = {'charm': 'Charm', 'config': 'Config', 'application': 'Application', 'constraints': 'Constraints'}
634 _toPy = {'Application': 'application', 'Charm': 'charm', 'Constraints': 'constraints', 'Config': 'config'}
635 def __init__(self, application=None, charm=None, config=None, constraints=None):
636 '''
637 application : str
638 charm : str
639 config : typing.Mapping[str, typing.Any]
640 constraints : Value
641 '''
642 self.application = application
643 self.charm = charm
644 self.config = config
645 self.constraints = Value.from_json(constraints) if constraints else None
646
647
648 class ApplicationMetricCredential(Type):
649 _toSchema = {'metriccredentials': 'MetricCredentials', 'applicationname': 'ApplicationName'}
650 _toPy = {'MetricCredentials': 'metriccredentials', 'ApplicationName': 'applicationname'}
651 def __init__(self, applicationname=None, metriccredentials=None):
652 '''
653 applicationname : str
654 metriccredentials : typing.Sequence[int]
655 '''
656 self.applicationname = applicationname
657 self.metriccredentials = metriccredentials
658
659
660 class ApplicationMetricCredentials(Type):
661 _toSchema = {'creds': 'Creds'}
662 _toPy = {'Creds': 'creds'}
663 def __init__(self, creds=None):
664 '''
665 creds : typing.Sequence[~ApplicationMetricCredential]
666 '''
667 self.creds = [ApplicationMetricCredential.from_json(o) for o in creds or []]
668
669
670 class ApplicationSet(Type):
671 _toSchema = {'applicationname': 'ApplicationName', 'options': 'Options'}
672 _toPy = {'ApplicationName': 'applicationname', 'Options': 'options'}
673 def __init__(self, applicationname=None, options=None):
674 '''
675 applicationname : str
676 options : typing.Mapping[str, str]
677 '''
678 self.applicationname = applicationname
679 self.options = options
680
681
682 class ApplicationSetCharm(Type):
683 _toSchema = {'cs_channel': 'cs-channel', 'forceunits': 'forceunits', 'resourceids': 'resourceids', 'charmurl': 'charmurl', 'forceseries': 'forceseries', 'applicationname': 'applicationname'}
684 _toPy = {'cs-channel': 'cs_channel', 'forceunits': 'forceunits', 'resourceids': 'resourceids', 'charmurl': 'charmurl', 'forceseries': 'forceseries', 'applicationname': 'applicationname'}
685 def __init__(self, applicationname=None, charmurl=None, cs_channel=None, forceseries=None, forceunits=None, resourceids=None):
686 '''
687 applicationname : str
688 charmurl : str
689 cs_channel : str
690 forceseries : bool
691 forceunits : bool
692 resourceids : typing.Mapping[str, str]
693 '''
694 self.applicationname = applicationname
695 self.charmurl = charmurl
696 self.cs_channel = cs_channel
697 self.forceseries = forceseries
698 self.forceunits = forceunits
699 self.resourceids = resourceids
700
701
702 class ApplicationUnexpose(Type):
703 _toSchema = {'applicationname': 'ApplicationName'}
704 _toPy = {'ApplicationName': 'applicationname'}
705 def __init__(self, applicationname=None):
706 '''
707 applicationname : str
708 '''
709 self.applicationname = applicationname
710
711
712 class ApplicationUnset(Type):
713 _toSchema = {'applicationname': 'ApplicationName', 'options': 'Options'}
714 _toPy = {'ApplicationName': 'applicationname', 'Options': 'options'}
715 def __init__(self, applicationname=None, options=None):
716 '''
717 applicationname : str
718 options : typing.Sequence[str]
719 '''
720 self.applicationname = applicationname
721 self.options = options
722
723
724 class ApplicationUpdate(Type):
725 _toSchema = {'settingsstrings': 'SettingsStrings', 'settingsyaml': 'SettingsYAML', 'constraints': 'Constraints', 'charmurl': 'CharmUrl', 'forcecharmurl': 'ForceCharmUrl', 'forceseries': 'ForceSeries', 'minunits': 'MinUnits', 'applicationname': 'ApplicationName'}
726 _toPy = {'ForceCharmUrl': 'forcecharmurl', 'CharmUrl': 'charmurl', 'ApplicationName': 'applicationname', 'MinUnits': 'minunits', 'SettingsYAML': 'settingsyaml', 'ForceSeries': 'forceseries', 'SettingsStrings': 'settingsstrings', 'Constraints': 'constraints'}
727 def __init__(self, applicationname=None, charmurl=None, constraints=None, forcecharmurl=None, forceseries=None, minunits=None, settingsstrings=None, settingsyaml=None):
728 '''
729 applicationname : str
730 charmurl : str
731 constraints : Value
732 forcecharmurl : bool
733 forceseries : bool
734 minunits : int
735 settingsstrings : typing.Mapping[str, str]
736 settingsyaml : str
737 '''
738 self.applicationname = applicationname
739 self.charmurl = charmurl
740 self.constraints = Value.from_json(constraints) if constraints else None
741 self.forcecharmurl = forcecharmurl
742 self.forceseries = forceseries
743 self.minunits = minunits
744 self.settingsstrings = settingsstrings
745 self.settingsyaml = settingsyaml
746
747
748 class ApplicationsDeploy(Type):
749 _toSchema = {'applications': 'Applications'}
750 _toPy = {'Applications': 'applications'}
751 def __init__(self, applications=None):
752 '''
753 applications : typing.Sequence[~ApplicationDeploy]
754 '''
755 self.applications = [ApplicationDeploy.from_json(o) for o in applications or []]
756
757
758 class Constraints(Type):
759 _toSchema = {'size': 'Size', 'pool': 'Pool', 'count': 'Count'}
760 _toPy = {'Size': 'size', 'Count': 'count', 'Pool': 'pool'}
761 def __init__(self, count=None, pool=None, size=None):
762 '''
763 count : int
764 pool : str
765 size : int
766 '''
767 self.count = count
768 self.pool = pool
769 self.size = size
770
771
772 class DestroyApplicationUnits(Type):
773 _toSchema = {'unitnames': 'UnitNames'}
774 _toPy = {'UnitNames': 'unitnames'}
775 def __init__(self, unitnames=None):
776 '''
777 unitnames : typing.Sequence[str]
778 '''
779 self.unitnames = unitnames
780
781
782 class DestroyRelation(Type):
783 _toSchema = {'endpoints': 'Endpoints'}
784 _toPy = {'Endpoints': 'endpoints'}
785 def __init__(self, endpoints=None):
786 '''
787 endpoints : typing.Sequence[str]
788 '''
789 self.endpoints = endpoints
790
791
792 class GetApplicationConstraints(Type):
793 _toSchema = {'applicationname': 'ApplicationName'}
794 _toPy = {'ApplicationName': 'applicationname'}
795 def __init__(self, applicationname=None):
796 '''
797 applicationname : str
798 '''
799 self.applicationname = applicationname
800
801
802 class GetConstraintsResults(Type):
803 _toSchema = {'cpu_cores': 'cpu-cores', 'container': 'container', 'spaces': 'spaces', 'mem': 'mem', 'arch': 'arch', 'tags': 'tags', 'cpu_power': 'cpu-power', 'virt_type': 'virt-type', 'instance_type': 'instance-type', 'root_disk': 'root-disk'}
804 _toPy = {'tags': 'tags', 'container': 'container', 'spaces': 'spaces', 'instance-type': 'instance_type', 'arch': 'arch', 'cpu-cores': 'cpu_cores', 'virt-type': 'virt_type', 'root-disk': 'root_disk', 'mem': 'mem', 'cpu-power': 'cpu_power'}
805 def __init__(self, arch=None, container=None, cpu_cores=None, cpu_power=None, instance_type=None, mem=None, root_disk=None, spaces=None, tags=None, virt_type=None):
806 '''
807 arch : str
808 container : str
809 cpu_cores : int
810 cpu_power : int
811 instance_type : str
812 mem : int
813 root_disk : int
814 spaces : typing.Sequence[str]
815 tags : typing.Sequence[str]
816 virt_type : str
817 '''
818 self.arch = arch
819 self.container = container
820 self.cpu_cores = cpu_cores
821 self.cpu_power = cpu_power
822 self.instance_type = instance_type
823 self.mem = mem
824 self.root_disk = root_disk
825 self.spaces = spaces
826 self.tags = tags
827 self.virt_type = virt_type
828
829
830 class Placement(Type):
831 _toSchema = {'scope': 'Scope', 'directive': 'Directive'}
832 _toPy = {'Directive': 'directive', 'Scope': 'scope'}
833 def __init__(self, directive=None, scope=None):
834 '''
835 directive : str
836 scope : str
837 '''
838 self.directive = directive
839 self.scope = scope
840
841
842 class Relation(Type):
843 _toSchema = {'name': 'Name', 'role': 'Role', 'scope': 'Scope', 'limit': 'Limit', 'interface': 'Interface', 'optional': 'Optional'}
844 _toPy = {'Scope': 'scope', 'Interface': 'interface', 'Optional': 'optional', 'Role': 'role', 'Limit': 'limit', 'Name': 'name'}
845 def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None):
846 '''
847 interface : str
848 limit : int
849 name : str
850 optional : bool
851 role : str
852 scope : str
853 '''
854 self.interface = interface
855 self.limit = limit
856 self.name = name
857 self.optional = optional
858 self.role = role
859 self.scope = scope
860
861
862 class SetConstraints(Type):
863 _toSchema = {'constraints': 'Constraints', 'applicationname': 'ApplicationName'}
864 _toPy = {'ApplicationName': 'applicationname', 'Constraints': 'constraints'}
865 def __init__(self, applicationname=None, constraints=None):
866 '''
867 applicationname : str
868 constraints : Value
869 '''
870 self.applicationname = applicationname
871 self.constraints = Value.from_json(constraints) if constraints else None
872
873
874 class StringResult(Type):
875 _toSchema = {'result': 'Result', 'error': 'Error'}
876 _toPy = {'Result': 'result', 'Error': 'error'}
877 def __init__(self, error=None, result=None):
878 '''
879 error : Error
880 result : str
881 '''
882 self.error = Error.from_json(error) if error else None
883 self.result = result
884
885
886 class Value(Type):
887 _toSchema = {'cpu_cores': 'cpu-cores', 'container': 'container', 'spaces': 'spaces', 'mem': 'mem', 'arch': 'arch', 'tags': 'tags', 'cpu_power': 'cpu-power', 'virt_type': 'virt-type', 'instance_type': 'instance-type', 'root_disk': 'root-disk'}
888 _toPy = {'tags': 'tags', 'container': 'container', 'spaces': 'spaces', 'instance-type': 'instance_type', 'arch': 'arch', 'cpu-cores': 'cpu_cores', 'virt-type': 'virt_type', 'root-disk': 'root_disk', 'mem': 'mem', 'cpu-power': 'cpu_power'}
889 def __init__(self, arch=None, container=None, cpu_cores=None, cpu_power=None, instance_type=None, mem=None, root_disk=None, spaces=None, tags=None, virt_type=None):
890 '''
891 arch : str
892 container : str
893 cpu_cores : int
894 cpu_power : int
895 instance_type : str
896 mem : int
897 root_disk : int
898 spaces : typing.Sequence[str]
899 tags : typing.Sequence[str]
900 virt_type : str
901 '''
902 self.arch = arch
903 self.container = container
904 self.cpu_cores = cpu_cores
905 self.cpu_power = cpu_power
906 self.instance_type = instance_type
907 self.mem = mem
908 self.root_disk = root_disk
909 self.spaces = spaces
910 self.tags = tags
911 self.virt_type = virt_type
912
913
914 class StringsWatchResult(Type):
915 _toSchema = {'changes': 'Changes', 'stringswatcherid': 'StringsWatcherId', 'error': 'Error'}
916 _toPy = {'Changes': 'changes', 'StringsWatcherId': 'stringswatcherid', 'Error': 'error'}
917 def __init__(self, changes=None, error=None, stringswatcherid=None):
918 '''
919 changes : typing.Sequence[str]
920 error : Error
921 stringswatcherid : str
922 '''
923 self.changes = changes
924 self.error = Error.from_json(error) if error else None
925 self.stringswatcherid = stringswatcherid
926
927
928 class BackupsCreateArgs(Type):
929 _toSchema = {'notes': 'Notes'}
930 _toPy = {'Notes': 'notes'}
931 def __init__(self, notes=None):
932 '''
933 notes : str
934 '''
935 self.notes = notes
936
937
938 class BackupsInfoArgs(Type):
939 _toSchema = {'id_': 'ID'}
940 _toPy = {'ID': 'id_'}
941 def __init__(self, id_=None):
942 '''
943 id_ : str
944 '''
945 self.id_ = id_
946
947
948 class BackupsListArgs(Type):
949 _toSchema = {}
950 _toPy = {}
951 def __init__(self):
952 '''
953
954 '''
955 pass
956
957
958 class BackupsListResult(Type):
959 _toSchema = {'list_': 'List'}
960 _toPy = {'List': 'list_'}
961 def __init__(self, list_=None):
962 '''
963 list_ : typing.Sequence[~BackupsMetadataResult]
964 '''
965 self.list_ = [BackupsMetadataResult.from_json(o) for o in list_ or []]
966
967
968 class BackupsMetadataResult(Type):
969 _toSchema = {'stored': 'Stored', 'caprivatekey': 'CAPrivateKey', 'series': 'Series', 'notes': 'Notes', 'id_': 'ID', 'finished': 'Finished', 'model': 'Model', 'machine': 'Machine', 'checksumformat': 'ChecksumFormat', 'checksum': 'Checksum', 'size': 'Size', 'version': 'Version', 'cacert': 'CACert', 'started': 'Started', 'hostname': 'Hostname'}
970 _toPy = {'Notes': 'notes', 'ID': 'id_', 'Started': 'started', 'Version': 'version', 'Series': 'series', 'Machine': 'machine', 'ChecksumFormat': 'checksumformat', 'Finished': 'finished', 'CAPrivateKey': 'caprivatekey', 'Hostname': 'hostname', 'Model': 'model', 'CACert': 'cacert', 'Size': 'size', 'Checksum': 'checksum', 'Stored': 'stored'}
971 def __init__(self, cacert=None, caprivatekey=None, checksum=None, checksumformat=None, finished=None, hostname=None, id_=None, machine=None, model=None, notes=None, series=None, size=None, started=None, stored=None, version=None):
972 '''
973 cacert : str
974 caprivatekey : str
975 checksum : str
976 checksumformat : str
977 finished : str
978 hostname : str
979 id_ : str
980 machine : str
981 model : str
982 notes : str
983 series : str
984 size : int
985 started : str
986 stored : str
987 version : Number
988 '''
989 self.cacert = cacert
990 self.caprivatekey = caprivatekey
991 self.checksum = checksum
992 self.checksumformat = checksumformat
993 self.finished = finished
994 self.hostname = hostname
995 self.id_ = id_
996 self.machine = machine
997 self.model = model
998 self.notes = notes
999 self.series = series
1000 self.size = size
1001 self.started = started
1002 self.stored = stored
1003 self.version = Number.from_json(version) if version else None
1004
1005
1006 class BackupsRemoveArgs(Type):
1007 _toSchema = {'id_': 'ID'}
1008 _toPy = {'ID': 'id_'}
1009 def __init__(self, id_=None):
1010 '''
1011 id_ : str
1012 '''
1013 self.id_ = id_
1014
1015
1016 class Number(Type):
1017 _toSchema = {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'}
1018 _toPy = {'Patch': 'patch', 'Major': 'major', 'Build': 'build', 'Minor': 'minor', 'Tag': 'tag'}
1019 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
1020 '''
1021 build : int
1022 major : int
1023 minor : int
1024 patch : int
1025 tag : str
1026 '''
1027 self.build = build
1028 self.major = major
1029 self.minor = minor
1030 self.patch = patch
1031 self.tag = tag
1032
1033
1034 class RestoreArgs(Type):
1035 _toSchema = {'backupid': 'BackupId'}
1036 _toPy = {'BackupId': 'backupid'}
1037 def __init__(self, backupid=None):
1038 '''
1039 backupid : str
1040 '''
1041 self.backupid = backupid
1042
1043
1044 class Block(Type):
1045 _toSchema = {'tag': 'tag', 'message': 'message', 'type_': 'type', 'id_': 'id'}
1046 _toPy = {'id': 'id_', 'message': 'message', 'type': 'type_', 'tag': 'tag'}
1047 def __init__(self, id_=None, message=None, tag=None, type_=None):
1048 '''
1049 id_ : str
1050 message : str
1051 tag : str
1052 type_ : str
1053 '''
1054 self.id_ = id_
1055 self.message = message
1056 self.tag = tag
1057 self.type_ = type_
1058
1059
1060 class BlockResult(Type):
1061 _toSchema = {'result': 'result', 'error': 'error'}
1062 _toPy = {'result': 'result', 'error': 'error'}
1063 def __init__(self, error=None, result=None):
1064 '''
1065 error : Error
1066 result : Block
1067 '''
1068 self.error = Error.from_json(error) if error else None
1069 self.result = Block.from_json(result) if result else None
1070
1071
1072 class BlockResults(Type):
1073 _toSchema = {'results': 'results'}
1074 _toPy = {'results': 'results'}
1075 def __init__(self, results=None):
1076 '''
1077 results : typing.Sequence[~BlockResult]
1078 '''
1079 self.results = [BlockResult.from_json(o) for o in results or []]
1080
1081
1082 class BlockSwitchParams(Type):
1083 _toSchema = {'message': 'message', 'type_': 'type'}
1084 _toPy = {'message': 'message', 'type': 'type_'}
1085 def __init__(self, message=None, type_=None):
1086 '''
1087 message : str
1088 type_ : str
1089 '''
1090 self.message = message
1091 self.type_ = type_
1092
1093
1094 class CharmInfo(Type):
1095 _toSchema = {'charmurl': 'CharmURL'}
1096 _toPy = {'CharmURL': 'charmurl'}
1097 def __init__(self, charmurl=None):
1098 '''
1099 charmurl : str
1100 '''
1101 self.charmurl = charmurl
1102
1103
1104 class CharmsList(Type):
1105 _toSchema = {'names': 'Names'}
1106 _toPy = {'Names': 'names'}
1107 def __init__(self, names=None):
1108 '''
1109 names : typing.Sequence[str]
1110 '''
1111 self.names = names
1112
1113
1114 class CharmsListResult(Type):
1115 _toSchema = {'charmurls': 'CharmURLs'}
1116 _toPy = {'CharmURLs': 'charmurls'}
1117 def __init__(self, charmurls=None):
1118 '''
1119 charmurls : typing.Sequence[str]
1120 '''
1121 self.charmurls = charmurls
1122
1123
1124 class IsMeteredResult(Type):
1125 _toSchema = {'metered': 'Metered'}
1126 _toPy = {'Metered': 'metered'}
1127 def __init__(self, metered=None):
1128 '''
1129 metered : bool
1130 '''
1131 self.metered = metered
1132
1133
1134 class APIHostPortsResult(Type):
1135 _toSchema = {'servers': 'Servers'}
1136 _toPy = {'Servers': 'servers'}
1137 def __init__(self, servers=None):
1138 '''
1139 servers : typing.Sequence[~HostPort]
1140 '''
1141 self.servers = [HostPort.from_json(o) for o in servers or []]
1142
1143
1144 class AddCharm(Type):
1145 _toSchema = {'channel': 'Channel', 'url': 'URL'}
1146 _toPy = {'URL': 'url', 'Channel': 'channel'}
1147 def __init__(self, channel=None, url=None):
1148 '''
1149 channel : str
1150 url : str
1151 '''
1152 self.channel = channel
1153 self.url = url
1154
1155
1156 class AddCharmWithAuthorization(Type):
1157 _toSchema = {'charmstoremacaroon': 'CharmStoreMacaroon', 'channel': 'Channel', 'url': 'URL'}
1158 _toPy = {'CharmStoreMacaroon': 'charmstoremacaroon', 'URL': 'url', 'Channel': 'channel'}
1159 def __init__(self, channel=None, charmstoremacaroon=None, url=None):
1160 '''
1161 channel : str
1162 charmstoremacaroon : Macaroon
1163 url : str
1164 '''
1165 self.channel = channel
1166 self.charmstoremacaroon = Macaroon.from_json(charmstoremacaroon) if charmstoremacaroon else None
1167 self.url = url
1168
1169
1170 class AddMachineParams(Type):
1171 _toSchema = {'hardwarecharacteristics': 'HardwareCharacteristics', 'instanceid': 'InstanceId', 'parentid': 'ParentId', 'disks': 'Disks', 'constraints': 'Constraints', 'placement': 'Placement', 'containertype': 'ContainerType', 'addrs': 'Addrs', 'jobs': 'Jobs', 'nonce': 'Nonce', 'series': 'Series'}
1172 _toPy = {'Placement': 'placement', 'ContainerType': 'containertype', 'InstanceId': 'instanceid', 'HardwareCharacteristics': 'hardwarecharacteristics', 'ParentId': 'parentid', 'Nonce': 'nonce', 'Series': 'series', 'Addrs': 'addrs', 'Disks': 'disks', 'Constraints': 'constraints', 'Jobs': 'jobs'}
1173 def __init__(self, addrs=None, constraints=None, containertype=None, disks=None, hardwarecharacteristics=None, instanceid=None, jobs=None, nonce=None, parentid=None, placement=None, series=None):
1174 '''
1175 addrs : typing.Sequence[~Address]
1176 constraints : Value
1177 containertype : str
1178 disks : typing.Sequence[~Constraints]
1179 hardwarecharacteristics : HardwareCharacteristics
1180 instanceid : str
1181 jobs : typing.Sequence[str]
1182 nonce : str
1183 parentid : str
1184 placement : Placement
1185 series : str
1186 '''
1187 self.addrs = [Address.from_json(o) for o in addrs or []]
1188 self.constraints = Value.from_json(constraints) if constraints else None
1189 self.containertype = containertype
1190 self.disks = [Constraints.from_json(o) for o in disks or []]
1191 self.hardwarecharacteristics = HardwareCharacteristics.from_json(hardwarecharacteristics) if hardwarecharacteristics else None
1192 self.instanceid = instanceid
1193 self.jobs = jobs
1194 self.nonce = nonce
1195 self.parentid = parentid
1196 self.placement = Placement.from_json(placement) if placement else None
1197 self.series = series
1198
1199
1200 class AddMachines(Type):
1201 _toSchema = {'machineparams': 'MachineParams'}
1202 _toPy = {'MachineParams': 'machineparams'}
1203 def __init__(self, machineparams=None):
1204 '''
1205 machineparams : typing.Sequence[~AddMachineParams]
1206 '''
1207 self.machineparams = [AddMachineParams.from_json(o) for o in machineparams or []]
1208
1209
1210 class AddMachinesResult(Type):
1211 _toSchema = {'machine': 'Machine', 'error': 'Error'}
1212 _toPy = {'Machine': 'machine', 'Error': 'error'}
1213 def __init__(self, error=None, machine=None):
1214 '''
1215 error : Error
1216 machine : str
1217 '''
1218 self.error = Error.from_json(error) if error else None
1219 self.machine = machine
1220
1221
1222 class AddMachinesResults(Type):
1223 _toSchema = {'machines': 'Machines'}
1224 _toPy = {'Machines': 'machines'}
1225 def __init__(self, machines=None):
1226 '''
1227 machines : typing.Sequence[~AddMachinesResult]
1228 '''
1229 self.machines = [AddMachinesResult.from_json(o) for o in machines or []]
1230
1231
1232 class Address(Type):
1233 _toSchema = {'value': 'Value', 'spacename': 'SpaceName', 'scope': 'Scope', 'type_': 'Type'}
1234 _toPy = {'Scope': 'scope', 'SpaceName': 'spacename', 'Value': 'value', 'Type': 'type_'}
1235 def __init__(self, scope=None, spacename=None, type_=None, value=None):
1236 '''
1237 scope : str
1238 spacename : str
1239 type_ : str
1240 value : str
1241 '''
1242 self.scope = scope
1243 self.spacename = spacename
1244 self.type_ = type_
1245 self.value = value
1246
1247
1248 class AgentVersionResult(Type):
1249 _toSchema = {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'}
1250 _toPy = {'Patch': 'patch', 'Major': 'major', 'Build': 'build', 'Minor': 'minor', 'Tag': 'tag'}
1251 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
1252 '''
1253 build : int
1254 major : int
1255 minor : int
1256 patch : int
1257 tag : str
1258 '''
1259 self.build = build
1260 self.major = major
1261 self.minor = minor
1262 self.patch = patch
1263 self.tag = tag
1264
1265
1266 class AllWatcherId(Type):
1267 _toSchema = {'allwatcherid': 'AllWatcherId'}
1268 _toPy = {'AllWatcherId': 'allwatcherid'}
1269 def __init__(self, allwatcherid=None):
1270 '''
1271 allwatcherid : str
1272 '''
1273 self.allwatcherid = allwatcherid
1274
1275
1276 class ApplicationStatus(Type):
1277 _toSchema = {'meterstatuses': 'MeterStatuses', 'relations': 'Relations', 'units': 'Units', 'exposed': 'Exposed', 'life': 'Life', 'charm': 'Charm', 'status': 'Status', 'canupgradeto': 'CanUpgradeTo', 'subordinateto': 'SubordinateTo'}
1278 _toPy = {'Status': 'status', 'SubordinateTo': 'subordinateto', 'CanUpgradeTo': 'canupgradeto', 'Relations': 'relations', 'Life': 'life', 'MeterStatuses': 'meterstatuses', 'Exposed': 'exposed', 'Charm': 'charm', 'Units': 'units'}
1279 def __init__(self, canupgradeto=None, charm=None, exposed=None, life=None, meterstatuses=None, relations=None, status=None, subordinateto=None, units=None):
1280 '''
1281 canupgradeto : str
1282 charm : str
1283 exposed : bool
1284 life : str
1285 meterstatuses : typing.Mapping[str, ~MeterStatus]
1286 relations : typing.Sequence[str]
1287 status : DetailedStatus
1288 subordinateto : typing.Sequence[str]
1289 units : typing.Mapping[str, ~UnitStatus]
1290 '''
1291 self.canupgradeto = canupgradeto
1292 self.charm = charm
1293 self.exposed = exposed
1294 self.life = life
1295 self.meterstatuses = {k: MeterStatus.from_json(v) for k, v in (meterstatuses or dict()).items()}
1296 self.relations = relations
1297 self.status = DetailedStatus.from_json(status) if status else None
1298 self.subordinateto = subordinateto
1299 self.units = {k: UnitStatus.from_json(v) for k, v in (units or dict()).items()}
1300
1301
1302 class Binary(Type):
1303 _toSchema = {'series': 'Series', 'number': 'Number', 'arch': 'Arch'}
1304 _toPy = {'Arch': 'arch', 'Number': 'number', 'Series': 'series'}
1305 def __init__(self, arch=None, number=None, series=None):
1306 '''
1307 arch : str
1308 number : Number
1309 series : str
1310 '''
1311 self.arch = arch
1312 self.number = Number.from_json(number) if number else None
1313 self.series = series
1314
1315
1316 class BundleChangesChange(Type):
1317 _toSchema = {'method': 'method', 'requires': 'requires', 'args': 'args', 'id_': 'id'}
1318 _toPy = {'method': 'method', 'id': 'id_', 'args': 'args', 'requires': 'requires'}
1319 def __init__(self, args=None, id_=None, method=None, requires=None):
1320 '''
1321 args : typing.Sequence[typing.Any]
1322 id_ : str
1323 method : str
1324 requires : typing.Sequence[str]
1325 '''
1326 self.args = args
1327 self.id_ = id_
1328 self.method = method
1329 self.requires = requires
1330
1331
1332 class DestroyMachines(Type):
1333 _toSchema = {'force': 'Force', 'machinenames': 'MachineNames'}
1334 _toPy = {'MachineNames': 'machinenames', 'Force': 'force'}
1335 def __init__(self, force=None, machinenames=None):
1336 '''
1337 force : bool
1338 machinenames : typing.Sequence[str]
1339 '''
1340 self.force = force
1341 self.machinenames = machinenames
1342
1343
1344 class DetailedStatus(Type):
1345 _toSchema = {'status': 'Status', 'version': 'Version', 'kind': 'Kind', 'life': 'Life', 'data': 'Data', 'since': 'Since', 'info': 'Info'}
1346 _toPy = {'Life': 'life', 'Version': 'version', 'Data': 'data', 'Since': 'since', 'Status': 'status', 'Kind': 'kind', 'Info': 'info'}
1347 def __init__(self, data=None, info=None, kind=None, life=None, since=None, status=None, version=None):
1348 '''
1349 data : typing.Mapping[str, typing.Any]
1350 info : str
1351 kind : str
1352 life : str
1353 since : str
1354 status : str
1355 version : str
1356 '''
1357 self.data = data
1358 self.info = info
1359 self.kind = kind
1360 self.life = life
1361 self.since = since
1362 self.status = status
1363 self.version = version
1364
1365
1366 class EndpointStatus(Type):
1367 _toSchema = {'name': 'Name', 'role': 'Role', 'subordinate': 'Subordinate', 'applicationname': 'ApplicationName'}
1368 _toPy = {'Role': 'role', 'ApplicationName': 'applicationname', 'Subordinate': 'subordinate', 'Name': 'name'}
1369 def __init__(self, applicationname=None, name=None, role=None, subordinate=None):
1370 '''
1371 applicationname : str
1372 name : str
1373 role : str
1374 subordinate : bool
1375 '''
1376 self.applicationname = applicationname
1377 self.name = name
1378 self.role = role
1379 self.subordinate = subordinate
1380
1381
1382 class EntityStatus(Type):
1383 _toSchema = {'data': 'Data', 'since': 'Since', 'status': 'Status', 'info': 'Info'}
1384 _toPy = {'Data': 'data', 'Since': 'since', 'Status': 'status', 'Info': 'info'}
1385 def __init__(self, data=None, info=None, since=None, status=None):
1386 '''
1387 data : typing.Mapping[str, typing.Any]
1388 info : str
1389 since : str
1390 status : str
1391 '''
1392 self.data = data
1393 self.info = info
1394 self.since = since
1395 self.status = status
1396
1397
1398 class FindToolsParams(Type):
1399 _toSchema = {'series': 'Series', 'minorversion': 'MinorVersion', 'majorversion': 'MajorVersion', 'number': 'Number', 'arch': 'Arch'}
1400 _toPy = {'MajorVersion': 'majorversion', 'Arch': 'arch', 'Number': 'number', 'Series': 'series', 'MinorVersion': 'minorversion'}
1401 def __init__(self, arch=None, majorversion=None, minorversion=None, number=None, series=None):
1402 '''
1403 arch : str
1404 majorversion : int
1405 minorversion : int
1406 number : Number
1407 series : str
1408 '''
1409 self.arch = arch
1410 self.majorversion = majorversion
1411 self.minorversion = minorversion
1412 self.number = Number.from_json(number) if number else None
1413 self.series = series
1414
1415
1416 class FindToolsResult(Type):
1417 _toSchema = {'list_': 'List', 'error': 'Error'}
1418 _toPy = {'List': 'list_', 'Error': 'error'}
1419 def __init__(self, error=None, list_=None):
1420 '''
1421 error : Error
1422 list_ : typing.Sequence[~Tools]
1423 '''
1424 self.error = Error.from_json(error) if error else None
1425 self.list_ = [Tools.from_json(o) for o in list_ or []]
1426
1427
1428 class FullStatus(Type):
1429 _toSchema = {'relations': 'Relations', 'modelname': 'ModelName', 'machines': 'Machines', 'availableversion': 'AvailableVersion', 'applications': 'Applications'}
1430 _toPy = {'Relations': 'relations', 'Machines': 'machines', 'Applications': 'applications', 'AvailableVersion': 'availableversion', 'ModelName': 'modelname'}
1431 def __init__(self, applications=None, availableversion=None, machines=None, modelname=None, relations=None):
1432 '''
1433 applications : typing.Mapping[str, ~ApplicationStatus]
1434 availableversion : str
1435 machines : typing.Mapping[str, ~MachineStatus]
1436 modelname : str
1437 relations : typing.Sequence[~RelationStatus]
1438 '''
1439 self.applications = {k: ApplicationStatus.from_json(v) for k, v in (applications or dict()).items()}
1440 self.availableversion = availableversion
1441 self.machines = {k: MachineStatus.from_json(v) for k, v in (machines or dict()).items()}
1442 self.modelname = modelname
1443 self.relations = [RelationStatus.from_json(o) for o in relations or []]
1444
1445
1446 class GetBundleChangesParams(Type):
1447 _toSchema = {'yaml': 'yaml'}
1448 _toPy = {'yaml': 'yaml'}
1449 def __init__(self, yaml=None):
1450 '''
1451 yaml : str
1452 '''
1453 self.yaml = yaml
1454
1455
1456 class GetBundleChangesResults(Type):
1457 _toSchema = {'changes': 'changes', 'errors': 'errors'}
1458 _toPy = {'changes': 'changes', 'errors': 'errors'}
1459 def __init__(self, changes=None, errors=None):
1460 '''
1461 changes : typing.Sequence[~BundleChangesChange]
1462 errors : typing.Sequence[str]
1463 '''
1464 self.changes = [BundleChangesChange.from_json(o) for o in changes or []]
1465 self.errors = errors
1466
1467
1468 class HardwareCharacteristics(Type):
1469 _toSchema = {'tags': 'Tags', 'cpupower': 'CpuPower', 'availabilityzone': 'AvailabilityZone', 'rootdisk': 'RootDisk', 'arch': 'Arch', 'cpucores': 'CpuCores', 'mem': 'Mem'}
1470 _toPy = {'RootDisk': 'rootdisk', 'Arch': 'arch', 'Tags': 'tags', 'CpuPower': 'cpupower', 'CpuCores': 'cpucores', 'Mem': 'mem', 'AvailabilityZone': 'availabilityzone'}
1471 def __init__(self, arch=None, availabilityzone=None, cpucores=None, cpupower=None, mem=None, rootdisk=None, tags=None):
1472 '''
1473 arch : str
1474 availabilityzone : str
1475 cpucores : int
1476 cpupower : int
1477 mem : int
1478 rootdisk : int
1479 tags : typing.Sequence[str]
1480 '''
1481 self.arch = arch
1482 self.availabilityzone = availabilityzone
1483 self.cpucores = cpucores
1484 self.cpupower = cpupower
1485 self.mem = mem
1486 self.rootdisk = rootdisk
1487 self.tags = tags
1488
1489
1490 class History(Type):
1491 _toSchema = {'statuses': 'Statuses', 'error': 'Error'}
1492 _toPy = {'Statuses': 'statuses', 'Error': 'error'}
1493 def __init__(self, error=None, statuses=None):
1494 '''
1495 error : Error
1496 statuses : typing.Sequence[~DetailedStatus]
1497 '''
1498 self.error = Error.from_json(error) if error else None
1499 self.statuses = [DetailedStatus.from_json(o) for o in statuses or []]
1500
1501
1502 class HostPort(Type):
1503 _toSchema = {'address': 'Address', 'port': 'Port'}
1504 _toPy = {'Address': 'address', 'Port': 'port'}
1505 def __init__(self, address=None, port=None):
1506 '''
1507 address : Address
1508 port : int
1509 '''
1510 self.address = Address.from_json(address) if address else None
1511 self.port = port
1512
1513
1514 class MachineStatus(Type):
1515 _toSchema = {'jobs': 'Jobs', 'instanceid': 'InstanceId', 'series': 'Series', 'dnsname': 'DNSName', 'hasvote': 'HasVote', 'id_': 'Id', 'wantsvote': 'WantsVote', 'hardware': 'Hardware', 'agentstatus': 'AgentStatus', 'containers': 'Containers', 'instancestatus': 'InstanceStatus'}
1516 _toPy = {'WantsVote': 'wantsvote', 'Containers': 'containers', 'HasVote': 'hasvote', 'InstanceStatus': 'instancestatus', 'Hardware': 'hardware', 'DNSName': 'dnsname', 'Jobs': 'jobs', 'Series': 'series', 'Id': 'id_', 'InstanceId': 'instanceid', 'AgentStatus': 'agentstatus'}
1517 def __init__(self, agentstatus=None, containers=None, dnsname=None, hardware=None, hasvote=None, id_=None, instanceid=None, instancestatus=None, jobs=None, series=None, wantsvote=None):
1518 '''
1519 agentstatus : DetailedStatus
1520 containers : typing.Mapping[str, ~MachineStatus]
1521 dnsname : str
1522 hardware : str
1523 hasvote : bool
1524 id_ : str
1525 instanceid : str
1526 instancestatus : DetailedStatus
1527 jobs : typing.Sequence[str]
1528 series : str
1529 wantsvote : bool
1530 '''
1531 self.agentstatus = DetailedStatus.from_json(agentstatus) if agentstatus else None
1532 self.containers = {k: MachineStatus.from_json(v) for k, v in (containers or dict()).items()}
1533 self.dnsname = dnsname
1534 self.hardware = hardware
1535 self.hasvote = hasvote
1536 self.id_ = id_
1537 self.instanceid = instanceid
1538 self.instancestatus = DetailedStatus.from_json(instancestatus) if instancestatus else None
1539 self.jobs = jobs
1540 self.series = series
1541 self.wantsvote = wantsvote
1542
1543
1544 class MeterStatus(Type):
1545 _toSchema = {'color': 'Color', 'message': 'Message'}
1546 _toPy = {'Message': 'message', 'Color': 'color'}
1547 def __init__(self, color=None, message=None):
1548 '''
1549 color : str
1550 message : str
1551 '''
1552 self.color = color
1553 self.message = message
1554
1555
1556 class ModelConfigResults(Type):
1557 _toSchema = {'config': 'Config'}
1558 _toPy = {'Config': 'config'}
1559 def __init__(self, config=None):
1560 '''
1561 config : typing.Mapping[str, typing.Any]
1562 '''
1563 self.config = config
1564
1565
1566 class ModelInfo(Type):
1567 _toSchema = {'name': 'Name', 'providertype': 'ProviderType', 'ownertag': 'OwnerTag', 'uuid': 'UUID', 'life': 'Life', 'status': 'Status', 'users': 'Users', 'defaultseries': 'DefaultSeries', 'serveruuid': 'ServerUUID', 'cloud': 'Cloud'}
1568 _toPy = {'ServerUUID': 'serveruuid', 'Users': 'users', 'UUID': 'uuid', 'ProviderType': 'providertype', 'OwnerTag': 'ownertag', 'DefaultSeries': 'defaultseries', 'Status': 'status', 'Life': 'life', 'Cloud': 'cloud', 'Name': 'name'}
1569 def __init__(self, cloud=None, defaultseries=None, life=None, name=None, ownertag=None, providertype=None, serveruuid=None, status=None, uuid=None, users=None):
1570 '''
1571 cloud : str
1572 defaultseries : str
1573 life : str
1574 name : str
1575 ownertag : str
1576 providertype : str
1577 serveruuid : str
1578 status : EntityStatus
1579 uuid : str
1580 users : typing.Sequence[~ModelUserInfo]
1581 '''
1582 self.cloud = cloud
1583 self.defaultseries = defaultseries
1584 self.life = life
1585 self.name = name
1586 self.ownertag = ownertag
1587 self.providertype = providertype
1588 self.serveruuid = serveruuid
1589 self.status = EntityStatus.from_json(status) if status else None
1590 self.uuid = uuid
1591 self.users = [ModelUserInfo.from_json(o) for o in users or []]
1592
1593
1594 class ModelSet(Type):
1595 _toSchema = {'config': 'Config'}
1596 _toPy = {'Config': 'config'}
1597 def __init__(self, config=None):
1598 '''
1599 config : typing.Mapping[str, typing.Any]
1600 '''
1601 self.config = config
1602
1603
1604 class ModelUnset(Type):
1605 _toSchema = {'keys': 'Keys'}
1606 _toPy = {'Keys': 'keys'}
1607 def __init__(self, keys=None):
1608 '''
1609 keys : typing.Sequence[str]
1610 '''
1611 self.keys = keys
1612
1613
1614 class ModelUserInfo(Type):
1615 _toSchema = {'user': 'user', 'displayname': 'displayname', 'lastconnection': 'lastconnection', 'access': 'access'}
1616 _toPy = {'user': 'user', 'displayname': 'displayname', 'lastconnection': 'lastconnection', 'access': 'access'}
1617 def __init__(self, access=None, displayname=None, lastconnection=None, user=None):
1618 '''
1619 access : str
1620 displayname : str
1621 lastconnection : str
1622 user : str
1623 '''
1624 self.access = access
1625 self.displayname = displayname
1626 self.lastconnection = lastconnection
1627 self.user = user
1628
1629
1630 class ModelUserInfoResult(Type):
1631 _toSchema = {'result': 'result', 'error': 'error'}
1632 _toPy = {'result': 'result', 'error': 'error'}
1633 def __init__(self, error=None, result=None):
1634 '''
1635 error : Error
1636 result : ModelUserInfo
1637 '''
1638 self.error = Error.from_json(error) if error else None
1639 self.result = ModelUserInfo.from_json(result) if result else None
1640
1641
1642 class ModelUserInfoResults(Type):
1643 _toSchema = {'results': 'results'}
1644 _toPy = {'results': 'results'}
1645 def __init__(self, results=None):
1646 '''
1647 results : typing.Sequence[~ModelUserInfoResult]
1648 '''
1649 self.results = [ModelUserInfoResult.from_json(o) for o in results or []]
1650
1651
1652 class PrivateAddress(Type):
1653 _toSchema = {'target': 'Target'}
1654 _toPy = {'Target': 'target'}
1655 def __init__(self, target=None):
1656 '''
1657 target : str
1658 '''
1659 self.target = target
1660
1661
1662 class PrivateAddressResults(Type):
1663 _toSchema = {'privateaddress': 'PrivateAddress'}
1664 _toPy = {'PrivateAddress': 'privateaddress'}
1665 def __init__(self, privateaddress=None):
1666 '''
1667 privateaddress : str
1668 '''
1669 self.privateaddress = privateaddress
1670
1671
1672 class ProvisioningScriptParams(Type):
1673 _toSchema = {'datadir': 'DataDir', 'disablepackagecommands': 'DisablePackageCommands', 'machineid': 'MachineId', 'nonce': 'Nonce'}
1674 _toPy = {'MachineId': 'machineid', 'DisablePackageCommands': 'disablepackagecommands', 'DataDir': 'datadir', 'Nonce': 'nonce'}
1675 def __init__(self, datadir=None, disablepackagecommands=None, machineid=None, nonce=None):
1676 '''
1677 datadir : str
1678 disablepackagecommands : bool
1679 machineid : str
1680 nonce : str
1681 '''
1682 self.datadir = datadir
1683 self.disablepackagecommands = disablepackagecommands
1684 self.machineid = machineid
1685 self.nonce = nonce
1686
1687
1688 class ProvisioningScriptResult(Type):
1689 _toSchema = {'script': 'Script'}
1690 _toPy = {'Script': 'script'}
1691 def __init__(self, script=None):
1692 '''
1693 script : str
1694 '''
1695 self.script = script
1696
1697
1698 class PublicAddress(Type):
1699 _toSchema = {'target': 'Target'}
1700 _toPy = {'Target': 'target'}
1701 def __init__(self, target=None):
1702 '''
1703 target : str
1704 '''
1705 self.target = target
1706
1707
1708 class PublicAddressResults(Type):
1709 _toSchema = {'publicaddress': 'PublicAddress'}
1710 _toPy = {'PublicAddress': 'publicaddress'}
1711 def __init__(self, publicaddress=None):
1712 '''
1713 publicaddress : str
1714 '''
1715 self.publicaddress = publicaddress
1716
1717
1718 class RelationStatus(Type):
1719 _toSchema = {'scope': 'Scope', 'interface': 'Interface', 'endpoints': 'Endpoints', 'id_': 'Id', 'key': 'Key'}
1720 _toPy = {'Scope': 'scope', 'Id': 'id_', 'Endpoints': 'endpoints', 'Key': 'key', 'Interface': 'interface'}
1721 def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None):
1722 '''
1723 endpoints : typing.Sequence[~EndpointStatus]
1724 id_ : int
1725 interface : str
1726 key : str
1727 scope : str
1728 '''
1729 self.endpoints = [EndpointStatus.from_json(o) for o in endpoints or []]
1730 self.id_ = id_
1731 self.interface = interface
1732 self.key = key
1733 self.scope = scope
1734
1735
1736 class ResolveCharmResult(Type):
1737 _toSchema = {'url': 'URL', 'error': 'Error'}
1738 _toPy = {'URL': 'url', 'Error': 'error'}
1739 def __init__(self, error=None, url=None):
1740 '''
1741 error : str
1742 url : URL
1743 '''
1744 self.error = error
1745 self.url = URL.from_json(url) if url else None
1746
1747
1748 class ResolveCharmResults(Type):
1749 _toSchema = {'urls': 'URLs'}
1750 _toPy = {'URLs': 'urls'}
1751 def __init__(self, urls=None):
1752 '''
1753 urls : typing.Sequence[~ResolveCharmResult]
1754 '''
1755 self.urls = [ResolveCharmResult.from_json(o) for o in urls or []]
1756
1757
1758 class ResolveCharms(Type):
1759 _toSchema = {'references': 'References'}
1760 _toPy = {'References': 'references'}
1761 def __init__(self, references=None):
1762 '''
1763 references : typing.Sequence[~URL]
1764 '''
1765 self.references = [URL.from_json(o) for o in references or []]
1766
1767
1768 class Resolved(Type):
1769 _toSchema = {'unitname': 'UnitName', 'retry': 'Retry'}
1770 _toPy = {'UnitName': 'unitname', 'Retry': 'retry'}
1771 def __init__(self, retry=None, unitname=None):
1772 '''
1773 retry : bool
1774 unitname : str
1775 '''
1776 self.retry = retry
1777 self.unitname = unitname
1778
1779
1780 class SetModelAgentVersion(Type):
1781 _toSchema = {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'}
1782 _toPy = {'Patch': 'patch', 'Major': 'major', 'Build': 'build', 'Minor': 'minor', 'Tag': 'tag'}
1783 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
1784 '''
1785 build : int
1786 major : int
1787 minor : int
1788 patch : int
1789 tag : str
1790 '''
1791 self.build = build
1792 self.major = major
1793 self.minor = minor
1794 self.patch = patch
1795 self.tag = tag
1796
1797
1798 class StatusHistoryFilter(Type):
1799 _toSchema = {'delta': 'Delta', 'date': 'Date', 'size': 'Size'}
1800 _toPy = {'Size': 'size', 'Delta': 'delta', 'Date': 'date'}
1801 def __init__(self, date=None, delta=None, size=None):
1802 '''
1803 date : str
1804 delta : int
1805 size : int
1806 '''
1807 self.date = date
1808 self.delta = delta
1809 self.size = size
1810
1811
1812 class StatusHistoryRequest(Type):
1813 _toSchema = {'tag': 'Tag', 'filter_': 'Filter', 'historykind': 'HistoryKind', 'size': 'Size'}
1814 _toPy = {'Size': 'size', 'Filter': 'filter_', 'HistoryKind': 'historykind', 'Tag': 'tag'}
1815 def __init__(self, filter_=None, historykind=None, size=None, tag=None):
1816 '''
1817 filter_ : StatusHistoryFilter
1818 historykind : str
1819 size : int
1820 tag : str
1821 '''
1822 self.filter_ = StatusHistoryFilter.from_json(filter_) if filter_ else None
1823 self.historykind = historykind
1824 self.size = size
1825 self.tag = tag
1826
1827
1828 class StatusHistoryRequests(Type):
1829 _toSchema = {'requests': 'Requests'}
1830 _toPy = {'Requests': 'requests'}
1831 def __init__(self, requests=None):
1832 '''
1833 requests : typing.Sequence[~StatusHistoryRequest]
1834 '''
1835 self.requests = [StatusHistoryRequest.from_json(o) for o in requests or []]
1836
1837
1838 class StatusHistoryResult(Type):
1839 _toSchema = {'history': 'History', 'error': 'Error'}
1840 _toPy = {'History': 'history', 'Error': 'error'}
1841 def __init__(self, error=None, history=None):
1842 '''
1843 error : Error
1844 history : History
1845 '''
1846 self.error = Error.from_json(error) if error else None
1847 self.history = History.from_json(history) if history else None
1848
1849
1850 class StatusHistoryResults(Type):
1851 _toSchema = {'results': 'Results'}
1852 _toPy = {'Results': 'results'}
1853 def __init__(self, results=None):
1854 '''
1855 results : typing.Sequence[~StatusHistoryResult]
1856 '''
1857 self.results = [StatusHistoryResult.from_json(o) for o in results or []]
1858
1859
1860 class StatusParams(Type):
1861 _toSchema = {'patterns': 'Patterns'}
1862 _toPy = {'Patterns': 'patterns'}
1863 def __init__(self, patterns=None):
1864 '''
1865 patterns : typing.Sequence[str]
1866 '''
1867 self.patterns = patterns
1868
1869
1870 class Tools(Type):
1871 _toSchema = {'url': 'url', 'size': 'size', 'version': 'version', 'sha256': 'sha256'}
1872 _toPy = {'url': 'url', 'size': 'size', 'version': 'version', 'sha256': 'sha256'}
1873 def __init__(self, sha256=None, size=None, url=None, version=None):
1874 '''
1875 sha256 : str
1876 size : int
1877 url : str
1878 version : Binary
1879 '''
1880 self.sha256 = sha256
1881 self.size = size
1882 self.url = url
1883 self.version = Binary.from_json(version) if version else None
1884
1885
1886 class URL(Type):
1887 _toSchema = {'name': 'Name', 'channel': 'Channel', 'schema': 'Schema', 'user': 'User', 'series': 'Series', 'revision': 'Revision'}
1888 _toPy = {'Channel': 'channel', 'User': 'user', 'Name': 'name', 'Series': 'series', 'Revision': 'revision', 'Schema': 'schema'}
1889 def __init__(self, channel=None, name=None, revision=None, schema=None, series=None, user=None):
1890 '''
1891 channel : str
1892 name : str
1893 revision : int
1894 schema : str
1895 series : str
1896 user : str
1897 '''
1898 self.channel = channel
1899 self.name = name
1900 self.revision = revision
1901 self.schema = schema
1902 self.series = series
1903 self.user = user
1904
1905
1906 class UnitStatus(Type):
1907 _toSchema = {'publicaddress': 'PublicAddress', 'charm': 'Charm', 'agentstatus': 'AgentStatus', 'subordinates': 'Subordinates', 'machine': 'Machine', 'workloadstatus': 'WorkloadStatus', 'openedports': 'OpenedPorts'}
1908 _toPy = {'WorkloadStatus': 'workloadstatus', 'OpenedPorts': 'openedports', 'PublicAddress': 'publicaddress', 'Subordinates': 'subordinates', 'AgentStatus': 'agentstatus', 'Machine': 'machine', 'Charm': 'charm'}
1909 def __init__(self, agentstatus=None, charm=None, machine=None, openedports=None, publicaddress=None, subordinates=None, workloadstatus=None):
1910 '''
1911 agentstatus : DetailedStatus
1912 charm : str
1913 machine : str
1914 openedports : typing.Sequence[str]
1915 publicaddress : str
1916 subordinates : typing.Mapping[str, ~UnitStatus]
1917 workloadstatus : DetailedStatus
1918 '''
1919 self.agentstatus = DetailedStatus.from_json(agentstatus) if agentstatus else None
1920 self.charm = charm
1921 self.machine = machine
1922 self.openedports = openedports
1923 self.publicaddress = publicaddress
1924 self.subordinates = {k: UnitStatus.from_json(v) for k, v in (subordinates or dict()).items()}
1925 self.workloadstatus = DetailedStatus.from_json(workloadstatus) if workloadstatus else None
1926
1927
1928 class DestroyControllerArgs(Type):
1929 _toSchema = {'destroy_models': 'destroy-models'}
1930 _toPy = {'destroy-models': 'destroy_models'}
1931 def __init__(self, destroy_models=None):
1932 '''
1933 destroy_models : bool
1934 '''
1935 self.destroy_models = destroy_models
1936
1937
1938 class InitiateModelMigrationArgs(Type):
1939 _toSchema = {'specs': 'specs'}
1940 _toPy = {'specs': 'specs'}
1941 def __init__(self, specs=None):
1942 '''
1943 specs : typing.Sequence[~ModelMigrationSpec]
1944 '''
1945 self.specs = [ModelMigrationSpec.from_json(o) for o in specs or []]
1946
1947
1948 class InitiateModelMigrationResult(Type):
1949 _toSchema = {'model_tag': 'model-tag', 'id_': 'id', 'error': 'error'}
1950 _toPy = {'id': 'id_', 'model-tag': 'model_tag', 'error': 'error'}
1951 def __init__(self, error=None, id_=None, model_tag=None):
1952 '''
1953 error : Error
1954 id_ : str
1955 model_tag : str
1956 '''
1957 self.error = Error.from_json(error) if error else None
1958 self.id_ = id_
1959 self.model_tag = model_tag
1960
1961
1962 class InitiateModelMigrationResults(Type):
1963 _toSchema = {'results': 'results'}
1964 _toPy = {'results': 'results'}
1965 def __init__(self, results=None):
1966 '''
1967 results : typing.Sequence[~InitiateModelMigrationResult]
1968 '''
1969 self.results = [InitiateModelMigrationResult.from_json(o) for o in results or []]
1970
1971
1972 class Model(Type):
1973 _toSchema = {'name': 'Name', 'ownertag': 'OwnerTag', 'uuid': 'UUID'}
1974 _toPy = {'OwnerTag': 'ownertag', 'UUID': 'uuid', 'Name': 'name'}
1975 def __init__(self, name=None, ownertag=None, uuid=None):
1976 '''
1977 name : str
1978 ownertag : str
1979 uuid : str
1980 '''
1981 self.name = name
1982 self.ownertag = ownertag
1983 self.uuid = uuid
1984
1985
1986 class ModelBlockInfo(Type):
1987 _toSchema = {'blocks': 'blocks', 'model_uuid': 'model-uuid', 'owner_tag': 'owner-tag', 'name': 'name'}
1988 _toPy = {'blocks': 'blocks', 'model-uuid': 'model_uuid', 'owner-tag': 'owner_tag', 'name': 'name'}
1989 def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None):
1990 '''
1991 blocks : typing.Sequence[str]
1992 model_uuid : str
1993 name : str
1994 owner_tag : str
1995 '''
1996 self.blocks = blocks
1997 self.model_uuid = model_uuid
1998 self.name = name
1999 self.owner_tag = owner_tag
2000
2001
2002 class ModelBlockInfoList(Type):
2003 _toSchema = {'models': 'models'}
2004 _toPy = {'models': 'models'}
2005 def __init__(self, models=None):
2006 '''
2007 models : typing.Sequence[~ModelBlockInfo]
2008 '''
2009 self.models = [ModelBlockInfo.from_json(o) for o in models or []]
2010
2011
2012 class ModelMigrationSpec(Type):
2013 _toSchema = {'model_tag': 'model-tag', 'target_info': 'target-info'}
2014 _toPy = {'target-info': 'target_info', 'model-tag': 'model_tag'}
2015 def __init__(self, model_tag=None, target_info=None):
2016 '''
2017 model_tag : str
2018 target_info : ModelMigrationTargetInfo
2019 '''
2020 self.model_tag = model_tag
2021 self.target_info = ModelMigrationTargetInfo.from_json(target_info) if target_info else None
2022
2023
2024 class ModelMigrationTargetInfo(Type):
2025 _toSchema = {'password': 'password', 'addrs': 'addrs', 'auth_tag': 'auth-tag', 'controller_tag': 'controller-tag', 'ca_cert': 'ca-cert'}
2026 _toPy = {'password': 'password', 'ca-cert': 'ca_cert', 'addrs': 'addrs', 'controller-tag': 'controller_tag', 'auth-tag': 'auth_tag'}
2027 def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_tag=None, password=None):
2028 '''
2029 addrs : typing.Sequence[str]
2030 auth_tag : str
2031 ca_cert : str
2032 controller_tag : str
2033 password : str
2034 '''
2035 self.addrs = addrs
2036 self.auth_tag = auth_tag
2037 self.ca_cert = ca_cert
2038 self.controller_tag = controller_tag
2039 self.password = password
2040
2041
2042 class ModelStatus(Type):
2043 _toSchema = {'model_tag': 'model-tag', 'owner_tag': 'owner-tag', 'application_count': 'application-count', 'hosted_machine_count': 'hosted-machine-count', 'life': 'life'}
2044 _toPy = {'application-count': 'application_count', 'hosted-machine-count': 'hosted_machine_count', 'owner-tag': 'owner_tag', 'model-tag': 'model_tag', 'life': 'life'}
2045 def __init__(self, application_count=None, hosted_machine_count=None, life=None, model_tag=None, owner_tag=None):
2046 '''
2047 application_count : int
2048 hosted_machine_count : int
2049 life : str
2050 model_tag : str
2051 owner_tag : str
2052 '''
2053 self.application_count = application_count
2054 self.hosted_machine_count = hosted_machine_count
2055 self.life = life
2056 self.model_tag = model_tag
2057 self.owner_tag = owner_tag
2058
2059
2060 class ModelStatusResults(Type):
2061 _toSchema = {'models': 'models'}
2062 _toPy = {'models': 'models'}
2063 def __init__(self, models=None):
2064 '''
2065 models : typing.Sequence[~ModelStatus]
2066 '''
2067 self.models = [ModelStatus.from_json(o) for o in models or []]
2068
2069
2070 class RemoveBlocksArgs(Type):
2071 _toSchema = {'all_': 'all'}
2072 _toPy = {'all': 'all_'}
2073 def __init__(self, all_=None):
2074 '''
2075 all_ : bool
2076 '''
2077 self.all_ = all_
2078
2079
2080 class UserModel(Type):
2081 _toSchema = {'model': 'Model', 'lastconnection': 'LastConnection'}
2082 _toPy = {'LastConnection': 'lastconnection', 'Model': 'model'}
2083 def __init__(self, lastconnection=None, model=None):
2084 '''
2085 lastconnection : str
2086 model : Model
2087 '''
2088 self.lastconnection = lastconnection
2089 self.model = Model.from_json(model) if model else None
2090
2091
2092 class UserModelList(Type):
2093 _toSchema = {'usermodels': 'UserModels'}
2094 _toPy = {'UserModels': 'usermodels'}
2095 def __init__(self, usermodels=None):
2096 '''
2097 usermodels : typing.Sequence[~UserModel]
2098 '''
2099 self.usermodels = [UserModel.from_json(o) for o in usermodels or []]
2100
2101
2102 class BytesResult(Type):
2103 _toSchema = {'result': 'Result'}
2104 _toPy = {'Result': 'result'}
2105 def __init__(self, result=None):
2106 '''
2107 result : typing.Sequence[int]
2108 '''
2109 self.result = result
2110
2111
2112 class DeployerConnectionValues(Type):
2113 _toSchema = {'stateaddresses': 'StateAddresses', 'apiaddresses': 'APIAddresses'}
2114 _toPy = {'APIAddresses': 'apiaddresses', 'StateAddresses': 'stateaddresses'}
2115 def __init__(self, apiaddresses=None, stateaddresses=None):
2116 '''
2117 apiaddresses : typing.Sequence[str]
2118 stateaddresses : typing.Sequence[str]
2119 '''
2120 self.apiaddresses = apiaddresses
2121 self.stateaddresses = stateaddresses
2122
2123
2124 class LifeResult(Type):
2125 _toSchema = {'life': 'Life', 'error': 'Error'}
2126 _toPy = {'Life': 'life', 'Error': 'error'}
2127 def __init__(self, error=None, life=None):
2128 '''
2129 error : Error
2130 life : str
2131 '''
2132 self.error = Error.from_json(error) if error else None
2133 self.life = life
2134
2135
2136 class LifeResults(Type):
2137 _toSchema = {'results': 'Results'}
2138 _toPy = {'Results': 'results'}
2139 def __init__(self, results=None):
2140 '''
2141 results : typing.Sequence[~LifeResult]
2142 '''
2143 self.results = [LifeResult.from_json(o) for o in results or []]
2144
2145
2146 class StringsResult(Type):
2147 _toSchema = {'result': 'Result', 'error': 'Error'}
2148 _toPy = {'Result': 'result', 'Error': 'error'}
2149 def __init__(self, error=None, result=None):
2150 '''
2151 error : Error
2152 result : typing.Sequence[str]
2153 '''
2154 self.error = Error.from_json(error) if error else None
2155 self.result = result
2156
2157
2158 class StringsWatchResults(Type):
2159 _toSchema = {'results': 'Results'}
2160 _toPy = {'Results': 'results'}
2161 def __init__(self, results=None):
2162 '''
2163 results : typing.Sequence[~StringsWatchResult]
2164 '''
2165 self.results = [StringsWatchResult.from_json(o) for o in results or []]
2166
2167
2168 class AddSubnetParams(Type):
2169 _toSchema = {'zones': 'Zones', 'spacetag': 'SpaceTag', 'subnetproviderid': 'SubnetProviderId', 'subnettag': 'SubnetTag'}
2170 _toPy = {'Zones': 'zones', 'SubnetProviderId': 'subnetproviderid', 'SpaceTag': 'spacetag', 'SubnetTag': 'subnettag'}
2171 def __init__(self, spacetag=None, subnetproviderid=None, subnettag=None, zones=None):
2172 '''
2173 spacetag : str
2174 subnetproviderid : str
2175 subnettag : str
2176 zones : typing.Sequence[str]
2177 '''
2178 self.spacetag = spacetag
2179 self.subnetproviderid = subnetproviderid
2180 self.subnettag = subnettag
2181 self.zones = zones
2182
2183
2184 class AddSubnetsParams(Type):
2185 _toSchema = {'subnets': 'Subnets'}
2186 _toPy = {'Subnets': 'subnets'}
2187 def __init__(self, subnets=None):
2188 '''
2189 subnets : typing.Sequence[~AddSubnetParams]
2190 '''
2191 self.subnets = [AddSubnetParams.from_json(o) for o in subnets or []]
2192
2193
2194 class CreateSpaceParams(Type):
2195 _toSchema = {'subnettags': 'SubnetTags', 'providerid': 'ProviderId', 'spacetag': 'SpaceTag', 'public': 'Public'}
2196 _toPy = {'Public': 'public', 'ProviderId': 'providerid', 'SpaceTag': 'spacetag', 'SubnetTags': 'subnettags'}
2197 def __init__(self, providerid=None, public=None, spacetag=None, subnettags=None):
2198 '''
2199 providerid : str
2200 public : bool
2201 spacetag : str
2202 subnettags : typing.Sequence[str]
2203 '''
2204 self.providerid = providerid
2205 self.public = public
2206 self.spacetag = spacetag
2207 self.subnettags = subnettags
2208
2209
2210 class CreateSpacesParams(Type):
2211 _toSchema = {'spaces': 'Spaces'}
2212 _toPy = {'Spaces': 'spaces'}
2213 def __init__(self, spaces=None):
2214 '''
2215 spaces : typing.Sequence[~CreateSpaceParams]
2216 '''
2217 self.spaces = [CreateSpaceParams.from_json(o) for o in spaces or []]
2218
2219
2220 class DiscoverSpacesResults(Type):
2221 _toSchema = {'results': 'Results'}
2222 _toPy = {'Results': 'results'}
2223 def __init__(self, results=None):
2224 '''
2225 results : typing.Sequence[~ProviderSpace]
2226 '''
2227 self.results = [ProviderSpace.from_json(o) for o in results or []]
2228
2229
2230 class ListSubnetsResults(Type):
2231 _toSchema = {'results': 'Results'}
2232 _toPy = {'Results': 'results'}
2233 def __init__(self, results=None):
2234 '''
2235 results : typing.Sequence[~Subnet]
2236 '''
2237 self.results = [Subnet.from_json(o) for o in results or []]
2238
2239
2240 class ProviderSpace(Type):
2241 _toSchema = {'name': 'Name', 'subnets': 'Subnets', 'providerid': 'ProviderId', 'error': 'Error'}
2242 _toPy = {'Subnets': 'subnets', 'ProviderId': 'providerid', 'Name': 'name', 'Error': 'error'}
2243 def __init__(self, error=None, name=None, providerid=None, subnets=None):
2244 '''
2245 error : Error
2246 name : str
2247 providerid : str
2248 subnets : typing.Sequence[~Subnet]
2249 '''
2250 self.error = Error.from_json(error) if error else None
2251 self.name = name
2252 self.providerid = providerid
2253 self.subnets = [Subnet.from_json(o) for o in subnets or []]
2254
2255
2256 class Subnet(Type):
2257 _toSchema = {'vlantag': 'VLANTag', 'staticrangelowip': 'StaticRangeLowIP', 'spacetag': 'SpaceTag', 'status': 'Status', 'life': 'Life', 'zones': 'Zones', 'cidr': 'CIDR', 'providerid': 'ProviderId', 'staticrangehighip': 'StaticRangeHighIP'}
2258 _toPy = {'Zones': 'zones', 'CIDR': 'cidr', 'StaticRangeLowIP': 'staticrangelowip', 'StaticRangeHighIP': 'staticrangehighip', 'VLANTag': 'vlantag', 'Life': 'life', 'Status': 'status', 'ProviderId': 'providerid', 'SpaceTag': 'spacetag'}
2259 def __init__(self, cidr=None, life=None, providerid=None, spacetag=None, staticrangehighip=None, staticrangelowip=None, status=None, vlantag=None, zones=None):
2260 '''
2261 cidr : str
2262 life : str
2263 providerid : str
2264 spacetag : str
2265 staticrangehighip : typing.Sequence[int]
2266 staticrangelowip : typing.Sequence[int]
2267 status : str
2268 vlantag : int
2269 zones : typing.Sequence[str]
2270 '''
2271 self.cidr = cidr
2272 self.life = life
2273 self.providerid = providerid
2274 self.spacetag = spacetag
2275 self.staticrangehighip = staticrangehighip
2276 self.staticrangelowip = staticrangelowip
2277 self.status = status
2278 self.vlantag = vlantag
2279 self.zones = zones
2280
2281
2282 class SubnetsFilters(Type):
2283 _toSchema = {'zone': 'Zone', 'spacetag': 'SpaceTag'}
2284 _toPy = {'Zone': 'zone', 'SpaceTag': 'spacetag'}
2285 def __init__(self, spacetag=None, zone=None):
2286 '''
2287 spacetag : str
2288 zone : str
2289 '''
2290 self.spacetag = spacetag
2291 self.zone = zone
2292
2293
2294 class BlockDevice(Type):
2295 _toSchema = {'uuid': 'UUID', 'label': 'Label', 'size': 'Size', 'hardwareid': 'HardwareId', 'mountpoint': 'MountPoint', 'inuse': 'InUse', 'devicename': 'DeviceName', 'devicelinks': 'DeviceLinks', 'busaddress': 'BusAddress', 'filesystemtype': 'FilesystemType'}
2296 _toPy = {'Label': 'label', 'DeviceLinks': 'devicelinks', 'UUID': 'uuid', 'BusAddress': 'busaddress', 'HardwareId': 'hardwareid', 'Size': 'size', 'InUse': 'inuse', 'FilesystemType': 'filesystemtype', 'DeviceName': 'devicename', 'MountPoint': 'mountpoint'}
2297 def __init__(self, busaddress=None, devicelinks=None, devicename=None, filesystemtype=None, hardwareid=None, inuse=None, label=None, mountpoint=None, size=None, uuid=None):
2298 '''
2299 busaddress : str
2300 devicelinks : typing.Sequence[str]
2301 devicename : str
2302 filesystemtype : str
2303 hardwareid : str
2304 inuse : bool
2305 label : str
2306 mountpoint : str
2307 size : int
2308 uuid : str
2309 '''
2310 self.busaddress = busaddress
2311 self.devicelinks = devicelinks
2312 self.devicename = devicename
2313 self.filesystemtype = filesystemtype
2314 self.hardwareid = hardwareid
2315 self.inuse = inuse
2316 self.label = label
2317 self.mountpoint = mountpoint
2318 self.size = size
2319 self.uuid = uuid
2320
2321
2322 class MachineBlockDevices(Type):
2323 _toSchema = {'blockdevices': 'blockdevices', 'machine': 'machine'}
2324 _toPy = {'blockdevices': 'blockdevices', 'machine': 'machine'}
2325 def __init__(self, blockdevices=None, machine=None):
2326 '''
2327 blockdevices : typing.Sequence[~BlockDevice]
2328 machine : str
2329 '''
2330 self.blockdevices = [BlockDevice.from_json(o) for o in blockdevices or []]
2331 self.machine = machine
2332
2333
2334 class SetMachineBlockDevices(Type):
2335 _toSchema = {'machineblockdevices': 'machineblockdevices'}
2336 _toPy = {'machineblockdevices': 'machineblockdevices'}
2337 def __init__(self, machineblockdevices=None):
2338 '''
2339 machineblockdevices : typing.Sequence[~MachineBlockDevices]
2340 '''
2341 self.machineblockdevices = [MachineBlockDevices.from_json(o) for o in machineblockdevices or []]
2342
2343
2344 class MachineStorageId(Type):
2345 _toSchema = {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'}
2346 _toPy = {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'}
2347 def __init__(self, attachmenttag=None, machinetag=None):
2348 '''
2349 attachmenttag : str
2350 machinetag : str
2351 '''
2352 self.attachmenttag = attachmenttag
2353 self.machinetag = machinetag
2354
2355
2356 class MachineStorageIdsWatchResult(Type):
2357 _toSchema = {'changes': 'Changes', 'machinestorageidswatcherid': 'MachineStorageIdsWatcherId', 'error': 'Error'}
2358 _toPy = {'Changes': 'changes', 'MachineStorageIdsWatcherId': 'machinestorageidswatcherid', 'Error': 'error'}
2359 def __init__(self, changes=None, error=None, machinestorageidswatcherid=None):
2360 '''
2361 changes : typing.Sequence[~MachineStorageId]
2362 error : Error
2363 machinestorageidswatcherid : str
2364 '''
2365 self.changes = [MachineStorageId.from_json(o) for o in changes or []]
2366 self.error = Error.from_json(error) if error else None
2367 self.machinestorageidswatcherid = machinestorageidswatcherid
2368
2369
2370 class BoolResults(Type):
2371 _toSchema = {'results': 'Results'}
2372 _toPy = {'Results': 'results'}
2373 def __init__(self, results=None):
2374 '''
2375 results : typing.Sequence[~BoolResult]
2376 '''
2377 self.results = [BoolResult.from_json(o) for o in results or []]
2378
2379
2380 class MachinePortRange(Type):
2381 _toSchema = {'portrange': 'PortRange', 'relationtag': 'RelationTag', 'unittag': 'UnitTag'}
2382 _toPy = {'RelationTag': 'relationtag', 'PortRange': 'portrange', 'UnitTag': 'unittag'}
2383 def __init__(self, portrange=None, relationtag=None, unittag=None):
2384 '''
2385 portrange : PortRange
2386 relationtag : str
2387 unittag : str
2388 '''
2389 self.portrange = PortRange.from_json(portrange) if portrange else None
2390 self.relationtag = relationtag
2391 self.unittag = unittag
2392
2393
2394 class MachinePorts(Type):
2395 _toSchema = {'machinetag': 'MachineTag', 'subnettag': 'SubnetTag'}
2396 _toPy = {'MachineTag': 'machinetag', 'SubnetTag': 'subnettag'}
2397 def __init__(self, machinetag=None, subnettag=None):
2398 '''
2399 machinetag : str
2400 subnettag : str
2401 '''
2402 self.machinetag = machinetag
2403 self.subnettag = subnettag
2404
2405
2406 class MachinePortsParams(Type):
2407 _toSchema = {'params': 'Params'}
2408 _toPy = {'Params': 'params'}
2409 def __init__(self, params=None):
2410 '''
2411 params : typing.Sequence[~MachinePorts]
2412 '''
2413 self.params = [MachinePorts.from_json(o) for o in params or []]
2414
2415
2416 class MachinePortsResult(Type):
2417 _toSchema = {'ports': 'Ports', 'error': 'Error'}
2418 _toPy = {'Ports': 'ports', 'Error': 'error'}
2419 def __init__(self, error=None, ports=None):
2420 '''
2421 error : Error
2422 ports : typing.Sequence[~MachinePortRange]
2423 '''
2424 self.error = Error.from_json(error) if error else None
2425 self.ports = [MachinePortRange.from_json(o) for o in ports or []]
2426
2427
2428 class MachinePortsResults(Type):
2429 _toSchema = {'results': 'Results'}
2430 _toPy = {'Results': 'results'}
2431 def __init__(self, results=None):
2432 '''
2433 results : typing.Sequence[~MachinePortsResult]
2434 '''
2435 self.results = [MachinePortsResult.from_json(o) for o in results or []]
2436
2437
2438 class NotifyWatchResults(Type):
2439 _toSchema = {'results': 'Results'}
2440 _toPy = {'Results': 'results'}
2441 def __init__(self, results=None):
2442 '''
2443 results : typing.Sequence[~NotifyWatchResult]
2444 '''
2445 self.results = [NotifyWatchResult.from_json(o) for o in results or []]
2446
2447
2448 class PortRange(Type):
2449 _toSchema = {'toport': 'ToPort', 'protocol': 'Protocol', 'fromport': 'FromPort'}
2450 _toPy = {'ToPort': 'toport', 'Protocol': 'protocol', 'FromPort': 'fromport'}
2451 def __init__(self, fromport=None, protocol=None, toport=None):
2452 '''
2453 fromport : int
2454 protocol : str
2455 toport : int
2456 '''
2457 self.fromport = fromport
2458 self.protocol = protocol
2459 self.toport = toport
2460
2461
2462 class StringResults(Type):
2463 _toSchema = {'results': 'Results'}
2464 _toPy = {'Results': 'results'}
2465 def __init__(self, results=None):
2466 '''
2467 results : typing.Sequence[~StringResult]
2468 '''
2469 self.results = [StringResult.from_json(o) for o in results or []]
2470
2471
2472 class StringsResults(Type):
2473 _toSchema = {'results': 'Results'}
2474 _toPy = {'Results': 'results'}
2475 def __init__(self, results=None):
2476 '''
2477 results : typing.Sequence[~StringsResult]
2478 '''
2479 self.results = [StringsResult.from_json(o) for o in results or []]
2480
2481
2482 class ControllersChangeResult(Type):
2483 _toSchema = {'result': 'Result', 'error': 'Error'}
2484 _toPy = {'Result': 'result', 'Error': 'error'}
2485 def __init__(self, error=None, result=None):
2486 '''
2487 error : Error
2488 result : ControllersChanges
2489 '''
2490 self.error = Error.from_json(error) if error else None
2491 self.result = ControllersChanges.from_json(result) if result else None
2492
2493
2494 class ControllersChangeResults(Type):
2495 _toSchema = {'results': 'Results'}
2496 _toPy = {'Results': 'results'}
2497 def __init__(self, results=None):
2498 '''
2499 results : typing.Sequence[~ControllersChangeResult]
2500 '''
2501 self.results = [ControllersChangeResult.from_json(o) for o in results or []]
2502
2503
2504 class ControllersChanges(Type):
2505 _toSchema = {'added': 'added', 'promoted': 'promoted', 'converted': 'converted', 'maintained': 'maintained', 'removed': 'removed', 'demoted': 'demoted'}
2506 _toPy = {'added': 'added', 'promoted': 'promoted', 'converted': 'converted', 'maintained': 'maintained', 'removed': 'removed', 'demoted': 'demoted'}
2507 def __init__(self, added=None, converted=None, demoted=None, maintained=None, promoted=None, removed=None):
2508 '''
2509 added : typing.Sequence[str]
2510 converted : typing.Sequence[str]
2511 demoted : typing.Sequence[str]
2512 maintained : typing.Sequence[str]
2513 promoted : typing.Sequence[str]
2514 removed : typing.Sequence[str]
2515 '''
2516 self.added = added
2517 self.converted = converted
2518 self.demoted = demoted
2519 self.maintained = maintained
2520 self.promoted = promoted
2521 self.removed = removed
2522
2523
2524 class ControllersSpec(Type):
2525 _toSchema = {'num_controllers': 'num-controllers', 'placement': 'placement', 'series': 'series', 'constraints': 'constraints', 'modeltag': 'ModelTag'}
2526 _toPy = {'placement': 'placement', 'num-controllers': 'num_controllers', 'ModelTag': 'modeltag', 'series': 'series', 'constraints': 'constraints'}
2527 def __init__(self, modeltag=None, constraints=None, num_controllers=None, placement=None, series=None):
2528 '''
2529 modeltag : str
2530 constraints : Value
2531 num_controllers : int
2532 placement : typing.Sequence[str]
2533 series : str
2534 '''
2535 self.modeltag = modeltag
2536 self.constraints = Value.from_json(constraints) if constraints else None
2537 self.num_controllers = num_controllers
2538 self.placement = placement
2539 self.series = series
2540
2541
2542 class ControllersSpecs(Type):
2543 _toSchema = {'specs': 'Specs'}
2544 _toPy = {'Specs': 'specs'}
2545 def __init__(self, specs=None):
2546 '''
2547 specs : typing.Sequence[~ControllersSpec]
2548 '''
2549 self.specs = [ControllersSpec.from_json(o) for o in specs or []]
2550
2551
2552 class HAMember(Type):
2553 _toSchema = {'publicaddress': 'PublicAddress', 'series': 'Series', 'tag': 'Tag'}
2554 _toPy = {'PublicAddress': 'publicaddress', 'Series': 'series', 'Tag': 'tag'}
2555 def __init__(self, publicaddress=None, series=None, tag=None):
2556 '''
2557 publicaddress : Address
2558 series : str
2559 tag : str
2560 '''
2561 self.publicaddress = Address.from_json(publicaddress) if publicaddress else None
2562 self.series = series
2563 self.tag = tag
2564
2565
2566 class Member(Type):
2567 _toSchema = {'hidden': 'Hidden', 'slavedelay': 'SlaveDelay', 'votes': 'Votes', 'priority': 'Priority', 'id_': 'Id', 'buildindexes': 'BuildIndexes', 'tags': 'Tags', 'address': 'Address', 'arbiter': 'Arbiter'}
2568 _toPy = {'BuildIndexes': 'buildindexes', 'Arbiter': 'arbiter', 'Votes': 'votes', 'Hidden': 'hidden', 'Id': 'id_', 'Priority': 'priority', 'Tags': 'tags', 'Address': 'address', 'SlaveDelay': 'slavedelay'}
2569 def __init__(self, address=None, arbiter=None, buildindexes=None, hidden=None, id_=None, priority=None, slavedelay=None, tags=None, votes=None):
2570 '''
2571 address : str
2572 arbiter : bool
2573 buildindexes : bool
2574 hidden : bool
2575 id_ : int
2576 priority : float
2577 slavedelay : int
2578 tags : typing.Mapping[str, str]
2579 votes : int
2580 '''
2581 self.address = address
2582 self.arbiter = arbiter
2583 self.buildindexes = buildindexes
2584 self.hidden = hidden
2585 self.id_ = id_
2586 self.priority = priority
2587 self.slavedelay = slavedelay
2588 self.tags = tags
2589 self.votes = votes
2590
2591
2592 class MongoUpgradeResults(Type):
2593 _toSchema = {'rsmembers': 'RsMembers', 'master': 'Master', 'members': 'Members'}
2594 _toPy = {'Members': 'members', 'RsMembers': 'rsmembers', 'Master': 'master'}
2595 def __init__(self, master=None, members=None, rsmembers=None):
2596 '''
2597 master : HAMember
2598 members : typing.Sequence[~HAMember]
2599 rsmembers : typing.Sequence[~Member]
2600 '''
2601 self.master = HAMember.from_json(master) if master else None
2602 self.members = [HAMember.from_json(o) for o in members or []]
2603 self.rsmembers = [Member.from_json(o) for o in rsmembers or []]
2604
2605
2606 class ResumeReplicationParams(Type):
2607 _toSchema = {'members': 'Members'}
2608 _toPy = {'Members': 'members'}
2609 def __init__(self, members=None):
2610 '''
2611 members : typing.Sequence[~Member]
2612 '''
2613 self.members = [Member.from_json(o) for o in members or []]
2614
2615
2616 class UpgradeMongoParams(Type):
2617 _toSchema = {'storageengine': 'StorageEngine', 'major': 'Major', 'minor': 'Minor', 'patch': 'Patch'}
2618 _toPy = {'StorageEngine': 'storageengine', 'Patch': 'patch', 'Major': 'major', 'Minor': 'minor'}
2619 def __init__(self, major=None, minor=None, patch=None, storageengine=None):
2620 '''
2621 major : int
2622 minor : int
2623 patch : str
2624 storageengine : str
2625 '''
2626 self.major = major
2627 self.minor = minor
2628 self.patch = patch
2629 self.storageengine = storageengine
2630
2631
2632 class Version(Type):
2633 _toSchema = {'storageengine': 'StorageEngine', 'major': 'Major', 'minor': 'Minor', 'patch': 'Patch'}
2634 _toPy = {'StorageEngine': 'storageengine', 'Patch': 'patch', 'Major': 'major', 'Minor': 'minor'}
2635 def __init__(self, major=None, minor=None, patch=None, storageengine=None):
2636 '''
2637 major : int
2638 minor : int
2639 patch : str
2640 storageengine : str
2641 '''
2642 self.major = major
2643 self.minor = minor
2644 self.patch = patch
2645 self.storageengine = storageengine
2646
2647
2648 class SSHHostKeySet(Type):
2649 _toSchema = {'entity_keys': 'entity-keys'}
2650 _toPy = {'entity-keys': 'entity_keys'}
2651 def __init__(self, entity_keys=None):
2652 '''
2653 entity_keys : typing.Sequence[~SSHHostKeys]
2654 '''
2655 self.entity_keys = [SSHHostKeys.from_json(o) for o in entity_keys or []]
2656
2657
2658 class SSHHostKeys(Type):
2659 _toSchema = {'public_keys': 'public-keys', 'tag': 'tag'}
2660 _toPy = {'tag': 'tag', 'public-keys': 'public_keys'}
2661 def __init__(self, public_keys=None, tag=None):
2662 '''
2663 public_keys : typing.Sequence[str]
2664 tag : str
2665 '''
2666 self.public_keys = public_keys
2667 self.tag = tag
2668
2669
2670 class ImageFilterParams(Type):
2671 _toSchema = {'images': 'images'}
2672 _toPy = {'images': 'images'}
2673 def __init__(self, images=None):
2674 '''
2675 images : typing.Sequence[~ImageSpec]
2676 '''
2677 self.images = [ImageSpec.from_json(o) for o in images or []]
2678
2679
2680 class ImageMetadata(Type):
2681 _toSchema = {'series': 'series', 'url': 'url', 'created': 'created', 'kind': 'kind', 'arch': 'arch'}
2682 _toPy = {'series': 'series', 'url': 'url', 'created': 'created', 'kind': 'kind', 'arch': 'arch'}
2683 def __init__(self, arch=None, created=None, kind=None, series=None, url=None):
2684 '''
2685 arch : str
2686 created : str
2687 kind : str
2688 series : str
2689 url : str
2690 '''
2691 self.arch = arch
2692 self.created = created
2693 self.kind = kind
2694 self.series = series
2695 self.url = url
2696
2697
2698 class ImageSpec(Type):
2699 _toSchema = {'series': 'series', 'kind': 'kind', 'arch': 'arch'}
2700 _toPy = {'series': 'series', 'kind': 'kind', 'arch': 'arch'}
2701 def __init__(self, arch=None, kind=None, series=None):
2702 '''
2703 arch : str
2704 kind : str
2705 series : str
2706 '''
2707 self.arch = arch
2708 self.kind = kind
2709 self.series = series
2710
2711
2712 class ListImageResult(Type):
2713 _toSchema = {'result': 'result'}
2714 _toPy = {'result': 'result'}
2715 def __init__(self, result=None):
2716 '''
2717 result : typing.Sequence[~ImageMetadata]
2718 '''
2719 self.result = [ImageMetadata.from_json(o) for o in result or []]
2720
2721
2722 class CloudImageMetadata(Type):
2723 _toSchema = {'series': 'series', 'priority': 'priority', 'source': 'source', 'root_storage_size': 'root_storage_size', 'arch': 'arch', 'image_id': 'image_id', 'root_storage_type': 'root_storage_type', 'virt_type': 'virt_type', 'version': 'version', 'region': 'region', 'stream': 'stream'}
2724 _toPy = {'series': 'series', 'priority': 'priority', 'source': 'source', 'root_storage_size': 'root_storage_size', 'arch': 'arch', 'image_id': 'image_id', 'root_storage_type': 'root_storage_type', 'virt_type': 'virt_type', 'version': 'version', 'region': 'region', 'stream': 'stream'}
2725 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):
2726 '''
2727 arch : str
2728 image_id : str
2729 priority : int
2730 region : str
2731 root_storage_size : int
2732 root_storage_type : str
2733 series : str
2734 source : str
2735 stream : str
2736 version : str
2737 virt_type : str
2738 '''
2739 self.arch = arch
2740 self.image_id = image_id
2741 self.priority = priority
2742 self.region = region
2743 self.root_storage_size = root_storage_size
2744 self.root_storage_type = root_storage_type
2745 self.series = series
2746 self.source = source
2747 self.stream = stream
2748 self.version = version
2749 self.virt_type = virt_type
2750
2751
2752 class CloudImageMetadataList(Type):
2753 _toSchema = {'metadata': 'metadata'}
2754 _toPy = {'metadata': 'metadata'}
2755 def __init__(self, metadata=None):
2756 '''
2757 metadata : typing.Sequence[~CloudImageMetadata]
2758 '''
2759 self.metadata = [CloudImageMetadata.from_json(o) for o in metadata or []]
2760
2761
2762 class ImageMetadataFilter(Type):
2763 _toSchema = {'series': 'series', 'root_storage_type': 'root-storage-type', 'arches': 'arches', 'virt_type': 'virt_type', 'region': 'region', 'stream': 'stream'}
2764 _toPy = {'series': 'series', 'arches': 'arches', 'root-storage-type': 'root_storage_type', 'virt_type': 'virt_type', 'region': 'region', 'stream': 'stream'}
2765 def __init__(self, arches=None, region=None, root_storage_type=None, series=None, stream=None, virt_type=None):
2766 '''
2767 arches : typing.Sequence[str]
2768 region : str
2769 root_storage_type : str
2770 series : typing.Sequence[str]
2771 stream : str
2772 virt_type : str
2773 '''
2774 self.arches = arches
2775 self.region = region
2776 self.root_storage_type = root_storage_type
2777 self.series = series
2778 self.stream = stream
2779 self.virt_type = virt_type
2780
2781
2782 class ListCloudImageMetadataResult(Type):
2783 _toSchema = {'result': 'result'}
2784 _toPy = {'result': 'result'}
2785 def __init__(self, result=None):
2786 '''
2787 result : typing.Sequence[~CloudImageMetadata]
2788 '''
2789 self.result = [CloudImageMetadata.from_json(o) for o in result or []]
2790
2791
2792 class MetadataImageIds(Type):
2793 _toSchema = {'image_ids': 'image_ids'}
2794 _toPy = {'image_ids': 'image_ids'}
2795 def __init__(self, image_ids=None):
2796 '''
2797 image_ids : typing.Sequence[str]
2798 '''
2799 self.image_ids = image_ids
2800
2801
2802 class MetadataSaveParams(Type):
2803 _toSchema = {'metadata': 'metadata'}
2804 _toPy = {'metadata': 'metadata'}
2805 def __init__(self, metadata=None):
2806 '''
2807 metadata : typing.Sequence[~CloudImageMetadataList]
2808 '''
2809 self.metadata = [CloudImageMetadataList.from_json(o) for o in metadata or []]
2810
2811
2812 class EntityStatusArgs(Type):
2813 _toSchema = {'data': 'Data', 'tag': 'Tag', 'status': 'Status', 'info': 'Info'}
2814 _toPy = {'Data': 'data', 'Status': 'status', 'Info': 'info', 'Tag': 'tag'}
2815 def __init__(self, data=None, info=None, status=None, tag=None):
2816 '''
2817 data : typing.Mapping[str, typing.Any]
2818 info : str
2819 status : str
2820 tag : str
2821 '''
2822 self.data = data
2823 self.info = info
2824 self.status = status
2825 self.tag = tag
2826
2827
2828 class MachineAddresses(Type):
2829 _toSchema = {'addresses': 'Addresses', 'tag': 'Tag'}
2830 _toPy = {'Addresses': 'addresses', 'Tag': 'tag'}
2831 def __init__(self, addresses=None, tag=None):
2832 '''
2833 addresses : typing.Sequence[~Address]
2834 tag : str
2835 '''
2836 self.addresses = [Address.from_json(o) for o in addresses or []]
2837 self.tag = tag
2838
2839
2840 class MachineAddressesResult(Type):
2841 _toSchema = {'addresses': 'Addresses', 'error': 'Error'}
2842 _toPy = {'Addresses': 'addresses', 'Error': 'error'}
2843 def __init__(self, addresses=None, error=None):
2844 '''
2845 addresses : typing.Sequence[~Address]
2846 error : Error
2847 '''
2848 self.addresses = [Address.from_json(o) for o in addresses or []]
2849 self.error = Error.from_json(error) if error else None
2850
2851
2852 class MachineAddressesResults(Type):
2853 _toSchema = {'results': 'Results'}
2854 _toPy = {'Results': 'results'}
2855 def __init__(self, results=None):
2856 '''
2857 results : typing.Sequence[~MachineAddressesResult]
2858 '''
2859 self.results = [MachineAddressesResult.from_json(o) for o in results or []]
2860
2861
2862 class SetMachinesAddresses(Type):
2863 _toSchema = {'machineaddresses': 'MachineAddresses'}
2864 _toPy = {'MachineAddresses': 'machineaddresses'}
2865 def __init__(self, machineaddresses=None):
2866 '''
2867 machineaddresses : typing.Sequence[~MachineAddresses]
2868 '''
2869 self.machineaddresses = [MachineAddresses.from_json(o) for o in machineaddresses or []]
2870
2871
2872 class SetStatus(Type):
2873 _toSchema = {'entities': 'Entities'}
2874 _toPy = {'Entities': 'entities'}
2875 def __init__(self, entities=None):
2876 '''
2877 entities : typing.Sequence[~EntityStatusArgs]
2878 '''
2879 self.entities = [EntityStatusArgs.from_json(o) for o in entities or []]
2880
2881
2882 class StatusResult(Type):
2883 _toSchema = {'status': 'Status', 'id_': 'Id', 'life': 'Life', 'data': 'Data', 'since': 'Since', 'error': 'Error', 'info': 'Info'}
2884 _toPy = {'Since': 'since', 'Error': 'error', 'Data': 'data', 'Id': 'id_', 'Status': 'status', 'Life': 'life', 'Info': 'info'}
2885 def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None):
2886 '''
2887 data : typing.Mapping[str, typing.Any]
2888 error : Error
2889 id_ : str
2890 info : str
2891 life : str
2892 since : str
2893 status : str
2894 '''
2895 self.data = data
2896 self.error = Error.from_json(error) if error else None
2897 self.id_ = id_
2898 self.info = info
2899 self.life = life
2900 self.since = since
2901 self.status = status
2902
2903
2904 class StatusResults(Type):
2905 _toSchema = {'results': 'Results'}
2906 _toPy = {'Results': 'results'}
2907 def __init__(self, results=None):
2908 '''
2909 results : typing.Sequence[~StatusResult]
2910 '''
2911 self.results = [StatusResult.from_json(o) for o in results or []]
2912
2913
2914 class ListSSHKeys(Type):
2915 _toSchema = {'entities': 'Entities', 'mode': 'Mode'}
2916 _toPy = {'Mode': 'mode', 'Entities': 'entities'}
2917 def __init__(self, entities=None, mode=None):
2918 '''
2919 entities : Entities
2920 mode : bool
2921 '''
2922 self.entities = Entities.from_json(entities) if entities else None
2923 self.mode = mode
2924
2925
2926 class ModifyUserSSHKeys(Type):
2927 _toSchema = {'keys': 'Keys', 'user': 'User'}
2928 _toPy = {'User': 'user', 'Keys': 'keys'}
2929 def __init__(self, keys=None, user=None):
2930 '''
2931 keys : typing.Sequence[str]
2932 user : str
2933 '''
2934 self.keys = keys
2935 self.user = user
2936
2937
2938 class ApplicationTag(Type):
2939 _toSchema = {'name': 'Name'}
2940 _toPy = {'Name': 'name'}
2941 def __init__(self, name=None):
2942 '''
2943 name : str
2944 '''
2945 self.name = name
2946
2947
2948 class ClaimLeadershipBulkParams(Type):
2949 _toSchema = {'params': 'Params'}
2950 _toPy = {'Params': 'params'}
2951 def __init__(self, params=None):
2952 '''
2953 params : typing.Sequence[~ClaimLeadershipParams]
2954 '''
2955 self.params = [ClaimLeadershipParams.from_json(o) for o in params or []]
2956
2957
2958 class ClaimLeadershipBulkResults(Type):
2959 _toSchema = {'results': 'Results'}
2960 _toPy = {'Results': 'results'}
2961 def __init__(self, results=None):
2962 '''
2963 results : typing.Sequence[~ErrorResult]
2964 '''
2965 self.results = [ErrorResult.from_json(o) for o in results or []]
2966
2967
2968 class ClaimLeadershipParams(Type):
2969 _toSchema = {'applicationtag': 'ApplicationTag', 'durationseconds': 'DurationSeconds', 'unittag': 'UnitTag'}
2970 _toPy = {'UnitTag': 'unittag', 'ApplicationTag': 'applicationtag', 'DurationSeconds': 'durationseconds'}
2971 def __init__(self, applicationtag=None, durationseconds=None, unittag=None):
2972 '''
2973 applicationtag : str
2974 durationseconds : float
2975 unittag : str
2976 '''
2977 self.applicationtag = applicationtag
2978 self.durationseconds = durationseconds
2979 self.unittag = unittag
2980
2981
2982 class ActionExecutionResult(Type):
2983 _toSchema = {'actiontag': 'actiontag', 'message': 'message', 'status': 'status', 'results': 'results'}
2984 _toPy = {'actiontag': 'actiontag', 'message': 'message', 'status': 'status', 'results': 'results'}
2985 def __init__(self, actiontag=None, message=None, results=None, status=None):
2986 '''
2987 actiontag : str
2988 message : str
2989 results : typing.Mapping[str, typing.Any]
2990 status : str
2991 '''
2992 self.actiontag = actiontag
2993 self.message = message
2994 self.results = results
2995 self.status = status
2996
2997
2998 class ActionExecutionResults(Type):
2999 _toSchema = {'results': 'results'}
3000 _toPy = {'results': 'results'}
3001 def __init__(self, results=None):
3002 '''
3003 results : typing.Sequence[~ActionExecutionResult]
3004 '''
3005 self.results = [ActionExecutionResult.from_json(o) for o in results or []]
3006
3007
3008 class JobsResult(Type):
3009 _toSchema = {'jobs': 'Jobs', 'error': 'Error'}
3010 _toPy = {'Jobs': 'jobs', 'Error': 'error'}
3011 def __init__(self, error=None, jobs=None):
3012 '''
3013 error : Error
3014 jobs : typing.Sequence[str]
3015 '''
3016 self.error = Error.from_json(error) if error else None
3017 self.jobs = jobs
3018
3019
3020 class JobsResults(Type):
3021 _toSchema = {'results': 'Results'}
3022 _toPy = {'Results': 'results'}
3023 def __init__(self, results=None):
3024 '''
3025 results : typing.Sequence[~JobsResult]
3026 '''
3027 self.results = [JobsResult.from_json(o) for o in results or []]
3028
3029
3030 class NetworkConfig(Type):
3031 _toSchema = {'providerspaceid': 'ProviderSpaceId', 'vlantag': 'VLANTag', 'configtype': 'ConfigType', 'mtu': 'MTU', 'provideraddressid': 'ProviderAddressId', 'gatewayaddress': 'GatewayAddress', 'providersubnetid': 'ProviderSubnetId', 'interfacetype': 'InterfaceType', 'providervlanid': 'ProviderVLANId', 'dnsservers': 'DNSServers', 'disabled': 'Disabled', 'providerid': 'ProviderId', 'parentinterfacename': 'ParentInterfaceName', 'cidr': 'CIDR', 'dnssearchdomains': 'DNSSearchDomains', 'deviceindex': 'DeviceIndex', 'noautostart': 'NoAutoStart', 'interfacename': 'InterfaceName', 'address': 'Address', 'macaddress': 'MACAddress'}
3032 _toPy = {'ProviderSpaceId': 'providerspaceid', 'ProviderAddressId': 'provideraddressid', 'DeviceIndex': 'deviceindex', 'GatewayAddress': 'gatewayaddress', 'ConfigType': 'configtype', 'Disabled': 'disabled', 'ProviderSubnetId': 'providersubnetid', 'VLANTag': 'vlantag', 'NoAutoStart': 'noautostart', 'MTU': 'mtu', 'InterfaceType': 'interfacetype', 'InterfaceName': 'interfacename', 'Address': 'address', 'CIDR': 'cidr', 'DNSSearchDomains': 'dnssearchdomains', 'MACAddress': 'macaddress', 'DNSServers': 'dnsservers', 'ProviderId': 'providerid', 'ParentInterfaceName': 'parentinterfacename', 'ProviderVLANId': 'providervlanid'}
3033 def __init__(self, address=None, cidr=None, configtype=None, dnssearchdomains=None, dnsservers=None, deviceindex=None, disabled=None, gatewayaddress=None, interfacename=None, interfacetype=None, macaddress=None, mtu=None, noautostart=None, parentinterfacename=None, provideraddressid=None, providerid=None, providerspaceid=None, providersubnetid=None, providervlanid=None, vlantag=None):
3034 '''
3035 address : str
3036 cidr : str
3037 configtype : str
3038 dnssearchdomains : typing.Sequence[str]
3039 dnsservers : typing.Sequence[str]
3040 deviceindex : int
3041 disabled : bool
3042 gatewayaddress : str
3043 interfacename : str
3044 interfacetype : str
3045 macaddress : str
3046 mtu : int
3047 noautostart : bool
3048 parentinterfacename : str
3049 provideraddressid : str
3050 providerid : str
3051 providerspaceid : str
3052 providersubnetid : str
3053 providervlanid : str
3054 vlantag : int
3055 '''
3056 self.address = address
3057 self.cidr = cidr
3058 self.configtype = configtype
3059 self.dnssearchdomains = dnssearchdomains
3060 self.dnsservers = dnsservers
3061 self.deviceindex = deviceindex
3062 self.disabled = disabled
3063 self.gatewayaddress = gatewayaddress
3064 self.interfacename = interfacename
3065 self.interfacetype = interfacetype
3066 self.macaddress = macaddress
3067 self.mtu = mtu
3068 self.noautostart = noautostart
3069 self.parentinterfacename = parentinterfacename
3070 self.provideraddressid = provideraddressid
3071 self.providerid = providerid
3072 self.providerspaceid = providerspaceid
3073 self.providersubnetid = providersubnetid
3074 self.providervlanid = providervlanid
3075 self.vlantag = vlantag
3076
3077
3078 class SetMachineNetworkConfig(Type):
3079 _toSchema = {'tag': 'Tag', 'config': 'Config'}
3080 _toPy = {'Tag': 'tag', 'Config': 'config'}
3081 def __init__(self, config=None, tag=None):
3082 '''
3083 config : typing.Sequence[~NetworkConfig]
3084 tag : str
3085 '''
3086 self.config = [NetworkConfig.from_json(o) for o in config or []]
3087 self.tag = tag
3088
3089
3090 class MeterStatusResult(Type):
3091 _toSchema = {'code': 'Code', 'info': 'Info', 'error': 'Error'}
3092 _toPy = {'Code': 'code', 'Info': 'info', 'Error': 'error'}
3093 def __init__(self, code=None, error=None, info=None):
3094 '''
3095 code : str
3096 error : Error
3097 info : str
3098 '''
3099 self.code = code
3100 self.error = Error.from_json(error) if error else None
3101 self.info = info
3102
3103
3104 class MeterStatusResults(Type):
3105 _toSchema = {'results': 'Results'}
3106 _toPy = {'Results': 'results'}
3107 def __init__(self, results=None):
3108 '''
3109 results : typing.Sequence[~MeterStatusResult]
3110 '''
3111 self.results = [MeterStatusResult.from_json(o) for o in results or []]
3112
3113
3114 class Metric(Type):
3115 _toSchema = {'value': 'Value', 'time': 'Time', 'key': 'Key'}
3116 _toPy = {'Key': 'key', 'Time': 'time', 'Value': 'value'}
3117 def __init__(self, key=None, time=None, value=None):
3118 '''
3119 key : str
3120 time : str
3121 value : str
3122 '''
3123 self.key = key
3124 self.time = time
3125 self.value = value
3126
3127
3128 class MetricBatch(Type):
3129 _toSchema = {'charmurl': 'CharmURL', 'metrics': 'Metrics', 'created': 'Created', 'uuid': 'UUID'}
3130 _toPy = {'CharmURL': 'charmurl', 'Created': 'created', 'Metrics': 'metrics', 'UUID': 'uuid'}
3131 def __init__(self, charmurl=None, created=None, metrics=None, uuid=None):
3132 '''
3133 charmurl : str
3134 created : str
3135 metrics : typing.Sequence[~Metric]
3136 uuid : str
3137 '''
3138 self.charmurl = charmurl
3139 self.created = created
3140 self.metrics = [Metric.from_json(o) for o in metrics or []]
3141 self.uuid = uuid
3142
3143
3144 class MetricBatchParam(Type):
3145 _toSchema = {'tag': 'Tag', 'batch': 'Batch'}
3146 _toPy = {'Batch': 'batch', 'Tag': 'tag'}
3147 def __init__(self, batch=None, tag=None):
3148 '''
3149 batch : MetricBatch
3150 tag : str
3151 '''
3152 self.batch = MetricBatch.from_json(batch) if batch else None
3153 self.tag = tag
3154
3155
3156 class MetricBatchParams(Type):
3157 _toSchema = {'batches': 'Batches'}
3158 _toPy = {'Batches': 'batches'}
3159 def __init__(self, batches=None):
3160 '''
3161 batches : typing.Sequence[~MetricBatchParam]
3162 '''
3163 self.batches = [MetricBatchParam.from_json(o) for o in batches or []]
3164
3165
3166 class EntityMetrics(Type):
3167 _toSchema = {'metrics': 'metrics', 'error': 'error'}
3168 _toPy = {'metrics': 'metrics', 'error': 'error'}
3169 def __init__(self, error=None, metrics=None):
3170 '''
3171 error : Error
3172 metrics : typing.Sequence[~MetricResult]
3173 '''
3174 self.error = Error.from_json(error) if error else None
3175 self.metrics = [MetricResult.from_json(o) for o in metrics or []]
3176
3177
3178 class MeterStatusParam(Type):
3179 _toSchema = {'code': 'code', 'tag': 'tag', 'info': 'info'}
3180 _toPy = {'code': 'code', 'tag': 'tag', 'info': 'info'}
3181 def __init__(self, code=None, info=None, tag=None):
3182 '''
3183 code : str
3184 info : str
3185 tag : str
3186 '''
3187 self.code = code
3188 self.info = info
3189 self.tag = tag
3190
3191
3192 class MeterStatusParams(Type):
3193 _toSchema = {'statues': 'statues'}
3194 _toPy = {'statues': 'statues'}
3195 def __init__(self, statues=None):
3196 '''
3197 statues : typing.Sequence[~MeterStatusParam]
3198 '''
3199 self.statues = [MeterStatusParam.from_json(o) for o in statues or []]
3200
3201
3202 class MetricResult(Type):
3203 _toSchema = {'value': 'value', 'time': 'time', 'key': 'key'}
3204 _toPy = {'value': 'value', 'time': 'time', 'key': 'key'}
3205 def __init__(self, key=None, time=None, value=None):
3206 '''
3207 key : str
3208 time : str
3209 value : str
3210 '''
3211 self.key = key
3212 self.time = time
3213 self.value = value
3214
3215
3216 class MetricResults(Type):
3217 _toSchema = {'results': 'results'}
3218 _toPy = {'results': 'results'}
3219 def __init__(self, results=None):
3220 '''
3221 results : typing.Sequence[~EntityMetrics]
3222 '''
3223 self.results = [EntityMetrics.from_json(o) for o in results or []]
3224
3225
3226 class PhaseResult(Type):
3227 _toSchema = {'phase': 'phase', 'error': 'Error'}
3228 _toPy = {'phase': 'phase', 'Error': 'error'}
3229 def __init__(self, error=None, phase=None):
3230 '''
3231 error : Error
3232 phase : str
3233 '''
3234 self.error = Error.from_json(error) if error else None
3235 self.phase = phase
3236
3237
3238 class PhaseResults(Type):
3239 _toSchema = {'results': 'Results'}
3240 _toPy = {'Results': 'results'}
3241 def __init__(self, results=None):
3242 '''
3243 results : typing.Sequence[~PhaseResult]
3244 '''
3245 self.results = [PhaseResult.from_json(o) for o in results or []]
3246
3247
3248 class FullMigrationStatus(Type):
3249 _toSchema = {'phase': 'phase', 'spec': 'spec', 'attempt': 'attempt'}
3250 _toPy = {'phase': 'phase', 'spec': 'spec', 'attempt': 'attempt'}
3251 def __init__(self, attempt=None, phase=None, spec=None):
3252 '''
3253 attempt : int
3254 phase : str
3255 spec : ModelMigrationSpec
3256 '''
3257 self.attempt = attempt
3258 self.phase = phase
3259 self.spec = ModelMigrationSpec.from_json(spec) if spec else None
3260
3261
3262 class SerializedModel(Type):
3263 _toSchema = {'bytes_': 'bytes'}
3264 _toPy = {'bytes': 'bytes_'}
3265 def __init__(self, bytes_=None):
3266 '''
3267 bytes_ : typing.Sequence[int]
3268 '''
3269 self.bytes_ = bytes_
3270
3271
3272 class SetMigrationPhaseArgs(Type):
3273 _toSchema = {'phase': 'phase'}
3274 _toPy = {'phase': 'phase'}
3275 def __init__(self, phase=None):
3276 '''
3277 phase : str
3278 '''
3279 self.phase = phase
3280
3281
3282 class MigrationStatus(Type):
3283 _toSchema = {'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', 'attempt': 'attempt'}
3284 _toPy = {'phase': 'phase', 'source-api-addrs': 'source_api_addrs', 'attempt': 'attempt', 'target-api-addrs': 'target_api_addrs', 'source-ca-cert': 'source_ca_cert', 'target-ca-cert': 'target_ca_cert'}
3285 def __init__(self, attempt=None, phase=None, source_api_addrs=None, source_ca_cert=None, target_api_addrs=None, target_ca_cert=None):
3286 '''
3287 attempt : int
3288 phase : str
3289 source_api_addrs : typing.Sequence[str]
3290 source_ca_cert : str
3291 target_api_addrs : typing.Sequence[str]
3292 target_ca_cert : str
3293 '''
3294 self.attempt = attempt
3295 self.phase = phase
3296 self.source_api_addrs = source_api_addrs
3297 self.source_ca_cert = source_ca_cert
3298 self.target_api_addrs = target_api_addrs
3299 self.target_ca_cert = target_ca_cert
3300
3301
3302 class ModelArgs(Type):
3303 _toSchema = {'model_tag': 'model-tag'}
3304 _toPy = {'model-tag': 'model_tag'}
3305 def __init__(self, model_tag=None):
3306 '''
3307 model_tag : str
3308 '''
3309 self.model_tag = model_tag
3310
3311
3312 class ModelCreateArgs(Type):
3313 _toSchema = {'account': 'Account', 'ownertag': 'OwnerTag', 'config': 'Config'}
3314 _toPy = {'Config': 'config', 'OwnerTag': 'ownertag', 'Account': 'account'}
3315 def __init__(self, account=None, config=None, ownertag=None):
3316 '''
3317 account : typing.Mapping[str, typing.Any]
3318 config : typing.Mapping[str, typing.Any]
3319 ownertag : str
3320 '''
3321 self.account = account
3322 self.config = config
3323 self.ownertag = ownertag
3324
3325
3326 class ModelInfoResult(Type):
3327 _toSchema = {'result': 'result', 'error': 'error'}
3328 _toPy = {'result': 'result', 'error': 'error'}
3329 def __init__(self, error=None, result=None):
3330 '''
3331 error : Error
3332 result : ModelInfo
3333 '''
3334 self.error = Error.from_json(error) if error else None
3335 self.result = ModelInfo.from_json(result) if result else None
3336
3337
3338 class ModelInfoResults(Type):
3339 _toSchema = {'results': 'results'}
3340 _toPy = {'results': 'results'}
3341 def __init__(self, results=None):
3342 '''
3343 results : typing.Sequence[~ModelInfoResult]
3344 '''
3345 self.results = [ModelInfoResult.from_json(o) for o in results or []]
3346
3347
3348 class ModelSkeletonConfigArgs(Type):
3349 _toSchema = {'provider': 'Provider', 'region': 'Region'}
3350 _toPy = {'Provider': 'provider', 'Region': 'region'}
3351 def __init__(self, provider=None, region=None):
3352 '''
3353 provider : str
3354 region : str
3355 '''
3356 self.provider = provider
3357 self.region = region
3358
3359
3360 class ModifyModelAccess(Type):
3361 _toSchema = {'action': 'action', 'model_tag': 'model-tag', 'user_tag': 'user-tag', 'access': 'access'}
3362 _toPy = {'action': 'action', 'user-tag': 'user_tag', 'access': 'access', 'model-tag': 'model_tag'}
3363 def __init__(self, access=None, action=None, model_tag=None, user_tag=None):
3364 '''
3365 access : str
3366 action : str
3367 model_tag : str
3368 user_tag : str
3369 '''
3370 self.access = access
3371 self.action = action
3372 self.model_tag = model_tag
3373 self.user_tag = user_tag
3374
3375
3376 class ModifyModelAccessRequest(Type):
3377 _toSchema = {'changes': 'changes'}
3378 _toPy = {'changes': 'changes'}
3379 def __init__(self, changes=None):
3380 '''
3381 changes : typing.Sequence[~ModifyModelAccess]
3382 '''
3383 self.changes = [ModifyModelAccess.from_json(o) for o in changes or []]
3384
3385
3386 class ConstraintsResult(Type):
3387 _toSchema = {'constraints': 'Constraints', 'error': 'Error'}
3388 _toPy = {'Constraints': 'constraints', 'Error': 'error'}
3389 def __init__(self, constraints=None, error=None):
3390 '''
3391 constraints : Value
3392 error : Error
3393 '''
3394 self.constraints = Value.from_json(constraints) if constraints else None
3395 self.error = Error.from_json(error) if error else None
3396
3397
3398 class ConstraintsResults(Type):
3399 _toSchema = {'results': 'Results'}
3400 _toPy = {'Results': 'results'}
3401 def __init__(self, results=None):
3402 '''
3403 results : typing.Sequence[~ConstraintsResult]
3404 '''
3405 self.results = [ConstraintsResult.from_json(o) for o in results or []]
3406
3407
3408 class ContainerConfig(Type):
3409 _toSchema = {'sslhostnameverification': 'SSLHostnameVerification', 'aptproxy': 'AptProxy', 'providertype': 'ProviderType', 'proxy': 'Proxy', 'updatebehavior': 'UpdateBehavior', 'authorizedkeys': 'AuthorizedKeys', 'aptmirror': 'AptMirror', 'allowlxcloopmounts': 'AllowLXCLoopMounts'}
3410 _toPy = {'AuthorizedKeys': 'authorizedkeys', 'Proxy': 'proxy', 'UpdateBehavior': 'updatebehavior', 'SSLHostnameVerification': 'sslhostnameverification', 'AptMirror': 'aptmirror', 'AllowLXCLoopMounts': 'allowlxcloopmounts', 'ProviderType': 'providertype', 'AptProxy': 'aptproxy'}
3411 def __init__(self, allowlxcloopmounts=None, aptmirror=None, aptproxy=None, authorizedkeys=None, providertype=None, proxy=None, sslhostnameverification=None, updatebehavior=None):
3412 '''
3413 allowlxcloopmounts : bool
3414 aptmirror : str
3415 aptproxy : Settings
3416 authorizedkeys : str
3417 providertype : str
3418 proxy : Settings
3419 sslhostnameverification : bool
3420 updatebehavior : UpdateBehavior
3421 '''
3422 self.allowlxcloopmounts = allowlxcloopmounts
3423 self.aptmirror = aptmirror
3424 self.aptproxy = Settings.from_json(aptproxy) if aptproxy else None
3425 self.authorizedkeys = authorizedkeys
3426 self.providertype = providertype
3427 self.proxy = Settings.from_json(proxy) if proxy else None
3428 self.sslhostnameverification = sslhostnameverification
3429 self.updatebehavior = UpdateBehavior.from_json(updatebehavior) if updatebehavior else None
3430
3431
3432 class ContainerManagerConfig(Type):
3433 _toSchema = {'managerconfig': 'ManagerConfig'}
3434 _toPy = {'ManagerConfig': 'managerconfig'}
3435 def __init__(self, managerconfig=None):
3436 '''
3437 managerconfig : typing.Mapping[str, str]
3438 '''
3439 self.managerconfig = managerconfig
3440
3441
3442 class ContainerManagerConfigParams(Type):
3443 _toSchema = {'type_': 'Type'}
3444 _toPy = {'Type': 'type_'}
3445 def __init__(self, type_=None):
3446 '''
3447 type_ : str
3448 '''
3449 self.type_ = type_
3450
3451
3452 class DistributionGroupResult(Type):
3453 _toSchema = {'result': 'Result', 'error': 'Error'}
3454 _toPy = {'Result': 'result', 'Error': 'error'}
3455 def __init__(self, error=None, result=None):
3456 '''
3457 error : Error
3458 result : typing.Sequence[str]
3459 '''
3460 self.error = Error.from_json(error) if error else None
3461 self.result = result
3462
3463
3464 class DistributionGroupResults(Type):
3465 _toSchema = {'results': 'Results'}
3466 _toPy = {'Results': 'results'}
3467 def __init__(self, results=None):
3468 '''
3469 results : typing.Sequence[~DistributionGroupResult]
3470 '''
3471 self.results = [DistributionGroupResult.from_json(o) for o in results or []]
3472
3473
3474 class InstanceInfo(Type):
3475 _toSchema = {'instanceid': 'InstanceId', 'tag': 'Tag', 'networkconfig': 'NetworkConfig', 'volumes': 'Volumes', 'nonce': 'Nonce', 'characteristics': 'Characteristics', 'volumeattachments': 'VolumeAttachments'}
3476 _toPy = {'InstanceId': 'instanceid', 'Characteristics': 'characteristics', 'Nonce': 'nonce', 'VolumeAttachments': 'volumeattachments', 'NetworkConfig': 'networkconfig', 'Tag': 'tag', 'Volumes': 'volumes'}
3477 def __init__(self, characteristics=None, instanceid=None, networkconfig=None, nonce=None, tag=None, volumeattachments=None, volumes=None):
3478 '''
3479 characteristics : HardwareCharacteristics
3480 instanceid : str
3481 networkconfig : typing.Sequence[~NetworkConfig]
3482 nonce : str
3483 tag : str
3484 volumeattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
3485 volumes : typing.Sequence[~Volume]
3486 '''
3487 self.characteristics = HardwareCharacteristics.from_json(characteristics) if characteristics else None
3488 self.instanceid = instanceid
3489 self.networkconfig = [NetworkConfig.from_json(o) for o in networkconfig or []]
3490 self.nonce = nonce
3491 self.tag = tag
3492 self.volumeattachments = {k: VolumeAttachmentInfo.from_json(v) for k, v in (volumeattachments or dict()).items()}
3493 self.volumes = [Volume.from_json(o) for o in volumes or []]
3494
3495
3496 class InstancesInfo(Type):
3497 _toSchema = {'machines': 'Machines'}
3498 _toPy = {'Machines': 'machines'}
3499 def __init__(self, machines=None):
3500 '''
3501 machines : typing.Sequence[~InstanceInfo]
3502 '''
3503 self.machines = [InstanceInfo.from_json(o) for o in machines or []]
3504
3505
3506 class MachineContainers(Type):
3507 _toSchema = {'machinetag': 'MachineTag', 'containertypes': 'ContainerTypes'}
3508 _toPy = {'MachineTag': 'machinetag', 'ContainerTypes': 'containertypes'}
3509 def __init__(self, containertypes=None, machinetag=None):
3510 '''
3511 containertypes : typing.Sequence[str]
3512 machinetag : str
3513 '''
3514 self.containertypes = containertypes
3515 self.machinetag = machinetag
3516
3517
3518 class MachineContainersParams(Type):
3519 _toSchema = {'params': 'Params'}
3520 _toPy = {'Params': 'params'}
3521 def __init__(self, params=None):
3522 '''
3523 params : typing.Sequence[~MachineContainers]
3524 '''
3525 self.params = [MachineContainers.from_json(o) for o in params or []]
3526
3527
3528 class MachineNetworkConfigResult(Type):
3529 _toSchema = {'info': 'Info', 'error': 'Error'}
3530 _toPy = {'Info': 'info', 'Error': 'error'}
3531 def __init__(self, error=None, info=None):
3532 '''
3533 error : Error
3534 info : typing.Sequence[~NetworkConfig]
3535 '''
3536 self.error = Error.from_json(error) if error else None
3537 self.info = [NetworkConfig.from_json(o) for o in info or []]
3538
3539
3540 class MachineNetworkConfigResults(Type):
3541 _toSchema = {'results': 'Results'}
3542 _toPy = {'Results': 'results'}
3543 def __init__(self, results=None):
3544 '''
3545 results : typing.Sequence[~MachineNetworkConfigResult]
3546 '''
3547 self.results = [MachineNetworkConfigResult.from_json(o) for o in results or []]
3548
3549
3550 class ProvisioningInfo(Type):
3551 _toSchema = {'jobs': 'Jobs', 'volumes': 'Volumes', 'endpointbindings': 'EndpointBindings', 'constraints': 'Constraints', 'tags': 'Tags', 'placement': 'Placement', 'imagemetadata': 'ImageMetadata', 'series': 'Series', 'subnetstozones': 'SubnetsToZones'}
3552 _toPy = {'Volumes': 'volumes', 'Tags': 'tags', 'Placement': 'placement', 'EndpointBindings': 'endpointbindings', 'ImageMetadata': 'imagemetadata', 'Series': 'series', 'SubnetsToZones': 'subnetstozones', 'Constraints': 'constraints', 'Jobs': 'jobs'}
3553 def __init__(self, constraints=None, endpointbindings=None, imagemetadata=None, jobs=None, placement=None, series=None, subnetstozones=None, tags=None, volumes=None):
3554 '''
3555 constraints : Value
3556 endpointbindings : typing.Mapping[str, str]
3557 imagemetadata : typing.Sequence[~CloudImageMetadata]
3558 jobs : typing.Sequence[str]
3559 placement : str
3560 series : str
3561 subnetstozones : typing.Sequence[str]
3562 tags : typing.Mapping[str, str]
3563 volumes : typing.Sequence[~VolumeParams]
3564 '''
3565 self.constraints = Value.from_json(constraints) if constraints else None
3566 self.endpointbindings = endpointbindings
3567 self.imagemetadata = [CloudImageMetadata.from_json(o) for o in imagemetadata or []]
3568 self.jobs = jobs
3569 self.placement = placement
3570 self.series = series
3571 self.subnetstozones = subnetstozones
3572 self.tags = tags
3573 self.volumes = [VolumeParams.from_json(o) for o in volumes or []]
3574
3575
3576 class ProvisioningInfoResult(Type):
3577 _toSchema = {'result': 'Result', 'error': 'Error'}
3578 _toPy = {'Result': 'result', 'Error': 'error'}
3579 def __init__(self, error=None, result=None):
3580 '''
3581 error : Error
3582 result : ProvisioningInfo
3583 '''
3584 self.error = Error.from_json(error) if error else None
3585 self.result = ProvisioningInfo.from_json(result) if result else None
3586
3587
3588 class ProvisioningInfoResults(Type):
3589 _toSchema = {'results': 'Results'}
3590 _toPy = {'Results': 'results'}
3591 def __init__(self, results=None):
3592 '''
3593 results : typing.Sequence[~ProvisioningInfoResult]
3594 '''
3595 self.results = [ProvisioningInfoResult.from_json(o) for o in results or []]
3596
3597
3598 class Settings(Type):
3599 _toSchema = {'noproxy': 'NoProxy', 'https': 'Https', 'ftp': 'Ftp', 'http': 'Http'}
3600 _toPy = {'Https': 'https', 'NoProxy': 'noproxy', 'Http': 'http', 'Ftp': 'ftp'}
3601 def __init__(self, ftp=None, http=None, https=None, noproxy=None):
3602 '''
3603 ftp : str
3604 http : str
3605 https : str
3606 noproxy : str
3607 '''
3608 self.ftp = ftp
3609 self.http = http
3610 self.https = https
3611 self.noproxy = noproxy
3612
3613
3614 class ToolsResult(Type):
3615 _toSchema = {'disablesslhostnameverification': 'DisableSSLHostnameVerification', 'toolslist': 'ToolsList', 'error': 'Error'}
3616 _toPy = {'ToolsList': 'toolslist', 'DisableSSLHostnameVerification': 'disablesslhostnameverification', 'Error': 'error'}
3617 def __init__(self, disablesslhostnameverification=None, error=None, toolslist=None):
3618 '''
3619 disablesslhostnameverification : bool
3620 error : Error
3621 toolslist : typing.Sequence[~Tools]
3622 '''
3623 self.disablesslhostnameverification = disablesslhostnameverification
3624 self.error = Error.from_json(error) if error else None
3625 self.toolslist = [Tools.from_json(o) for o in toolslist or []]
3626
3627
3628 class ToolsResults(Type):
3629 _toSchema = {'results': 'Results'}
3630 _toPy = {'Results': 'results'}
3631 def __init__(self, results=None):
3632 '''
3633 results : typing.Sequence[~ToolsResult]
3634 '''
3635 self.results = [ToolsResult.from_json(o) for o in results or []]
3636
3637
3638 class UpdateBehavior(Type):
3639 _toSchema = {'enableosrefreshupdate': 'EnableOSRefreshUpdate', 'enableosupgrade': 'EnableOSUpgrade'}
3640 _toPy = {'EnableOSRefreshUpdate': 'enableosrefreshupdate', 'EnableOSUpgrade': 'enableosupgrade'}
3641 def __init__(self, enableosrefreshupdate=None, enableosupgrade=None):
3642 '''
3643 enableosrefreshupdate : bool
3644 enableosupgrade : bool
3645 '''
3646 self.enableosrefreshupdate = enableosrefreshupdate
3647 self.enableosupgrade = enableosupgrade
3648
3649
3650 class Volume(Type):
3651 _toSchema = {'volumetag': 'volumetag', 'info': 'info'}
3652 _toPy = {'volumetag': 'volumetag', 'info': 'info'}
3653 def __init__(self, info=None, volumetag=None):
3654 '''
3655 info : VolumeInfo
3656 volumetag : str
3657 '''
3658 self.info = VolumeInfo.from_json(info) if info else None
3659 self.volumetag = volumetag
3660
3661
3662 class VolumeAttachmentInfo(Type):
3663 _toSchema = {'read_only': 'read-only', 'devicename': 'devicename', 'devicelink': 'devicelink', 'busaddress': 'busaddress'}
3664 _toPy = {'devicename': 'devicename', 'devicelink': 'devicelink', 'busaddress': 'busaddress', 'read-only': 'read_only'}
3665 def __init__(self, busaddress=None, devicelink=None, devicename=None, read_only=None):
3666 '''
3667 busaddress : str
3668 devicelink : str
3669 devicename : str
3670 read_only : bool
3671 '''
3672 self.busaddress = busaddress
3673 self.devicelink = devicelink
3674 self.devicename = devicename
3675 self.read_only = read_only
3676
3677
3678 class VolumeAttachmentParams(Type):
3679 _toSchema = {'instanceid': 'instanceid', 'read_only': 'read-only', 'volumeid': 'volumeid', 'machinetag': 'machinetag', 'provider': 'provider', 'volumetag': 'volumetag'}
3680 _toPy = {'read-only': 'read_only', 'instanceid': 'instanceid', 'volumeid': 'volumeid', 'machinetag': 'machinetag', 'provider': 'provider', 'volumetag': 'volumetag'}
3681 def __init__(self, instanceid=None, machinetag=None, provider=None, read_only=None, volumeid=None, volumetag=None):
3682 '''
3683 instanceid : str
3684 machinetag : str
3685 provider : str
3686 read_only : bool
3687 volumeid : str
3688 volumetag : str
3689 '''
3690 self.instanceid = instanceid
3691 self.machinetag = machinetag
3692 self.provider = provider
3693 self.read_only = read_only
3694 self.volumeid = volumeid
3695 self.volumetag = volumetag
3696
3697
3698 class VolumeInfo(Type):
3699 _toSchema = {'volumeid': 'volumeid', 'persistent': 'persistent', 'size': 'size', 'hardwareid': 'hardwareid'}
3700 _toPy = {'volumeid': 'volumeid', 'persistent': 'persistent', 'size': 'size', 'hardwareid': 'hardwareid'}
3701 def __init__(self, hardwareid=None, persistent=None, size=None, volumeid=None):
3702 '''
3703 hardwareid : str
3704 persistent : bool
3705 size : int
3706 volumeid : str
3707 '''
3708 self.hardwareid = hardwareid
3709 self.persistent = persistent
3710 self.size = size
3711 self.volumeid = volumeid
3712
3713
3714 class VolumeParams(Type):
3715 _toSchema = {'size': 'size', 'attributes': 'attributes', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider'}
3716 _toPy = {'size': 'size', 'attributes': 'attributes', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider'}
3717 def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volumetag=None):
3718 '''
3719 attachment : VolumeAttachmentParams
3720 attributes : typing.Mapping[str, typing.Any]
3721 provider : str
3722 size : int
3723 tags : typing.Mapping[str, str]
3724 volumetag : str
3725 '''
3726 self.attachment = VolumeAttachmentParams.from_json(attachment) if attachment else None
3727 self.attributes = attributes
3728 self.provider = provider
3729 self.size = size
3730 self.tags = tags
3731 self.volumetag = volumetag
3732
3733
3734 class WatchContainer(Type):
3735 _toSchema = {'machinetag': 'MachineTag', 'containertype': 'ContainerType'}
3736 _toPy = {'MachineTag': 'machinetag', 'ContainerType': 'containertype'}
3737 def __init__(self, containertype=None, machinetag=None):
3738 '''
3739 containertype : str
3740 machinetag : str
3741 '''
3742 self.containertype = containertype
3743 self.machinetag = machinetag
3744
3745
3746 class WatchContainers(Type):
3747 _toSchema = {'params': 'Params'}
3748 _toPy = {'Params': 'params'}
3749 def __init__(self, params=None):
3750 '''
3751 params : typing.Sequence[~WatchContainer]
3752 '''
3753 self.params = [WatchContainer.from_json(o) for o in params or []]
3754
3755
3756 class ProxyConfig(Type):
3757 _toSchema = {'noproxy': 'NoProxy', 'https': 'HTTPS', 'ftp': 'FTP', 'http': 'HTTP'}
3758 _toPy = {'NoProxy': 'noproxy', 'HTTP': 'http', 'HTTPS': 'https', 'FTP': 'ftp'}
3759 def __init__(self, ftp=None, http=None, https=None, noproxy=None):
3760 '''
3761 ftp : str
3762 http : str
3763 https : str
3764 noproxy : str
3765 '''
3766 self.ftp = ftp
3767 self.http = http
3768 self.https = https
3769 self.noproxy = noproxy
3770
3771
3772 class ProxyConfigResult(Type):
3773 _toSchema = {'proxysettings': 'ProxySettings', 'aptproxysettings': 'APTProxySettings', 'error': 'Error'}
3774 _toPy = {'APTProxySettings': 'aptproxysettings', 'ProxySettings': 'proxysettings', 'Error': 'error'}
3775 def __init__(self, aptproxysettings=None, error=None, proxysettings=None):
3776 '''
3777 aptproxysettings : ProxyConfig
3778 error : Error
3779 proxysettings : ProxyConfig
3780 '''
3781 self.aptproxysettings = ProxyConfig.from_json(aptproxysettings) if aptproxysettings else None
3782 self.error = Error.from_json(error) if error else None
3783 self.proxysettings = ProxyConfig.from_json(proxysettings) if proxysettings else None
3784
3785
3786 class ProxyConfigResults(Type):
3787 _toSchema = {'results': 'Results'}
3788 _toPy = {'Results': 'results'}
3789 def __init__(self, results=None):
3790 '''
3791 results : typing.Sequence[~ProxyConfigResult]
3792 '''
3793 self.results = [ProxyConfigResult.from_json(o) for o in results or []]
3794
3795
3796 class RebootActionResult(Type):
3797 _toSchema = {'result': 'result', 'error': 'error'}
3798 _toPy = {'result': 'result', 'error': 'error'}
3799 def __init__(self, error=None, result=None):
3800 '''
3801 error : Error
3802 result : str
3803 '''
3804 self.error = Error.from_json(error) if error else None
3805 self.result = result
3806
3807
3808 class RebootActionResults(Type):
3809 _toSchema = {'results': 'results'}
3810 _toPy = {'results': 'results'}
3811 def __init__(self, results=None):
3812 '''
3813 results : typing.Sequence[~RebootActionResult]
3814 '''
3815 self.results = [RebootActionResult.from_json(o) for o in results or []]
3816
3817
3818 class RelationUnitsChange(Type):
3819 _toSchema = {'changed': 'Changed', 'departed': 'Departed'}
3820 _toPy = {'Departed': 'departed', 'Changed': 'changed'}
3821 def __init__(self, changed=None, departed=None):
3822 '''
3823 changed : typing.Mapping[str, ~UnitSettings]
3824 departed : typing.Sequence[str]
3825 '''
3826 self.changed = {k: UnitSettings.from_json(v) for k, v in (changed or dict()).items()}
3827 self.departed = departed
3828
3829
3830 class RelationUnitsWatchResult(Type):
3831 _toSchema = {'changes': 'Changes', 'relationunitswatcherid': 'RelationUnitsWatcherId', 'error': 'Error'}
3832 _toPy = {'Changes': 'changes', 'RelationUnitsWatcherId': 'relationunitswatcherid', 'Error': 'error'}
3833 def __init__(self, changes=None, error=None, relationunitswatcherid=None):
3834 '''
3835 changes : RelationUnitsChange
3836 error : Error
3837 relationunitswatcherid : str
3838 '''
3839 self.changes = RelationUnitsChange.from_json(changes) if changes else None
3840 self.error = Error.from_json(error) if error else None
3841 self.relationunitswatcherid = relationunitswatcherid
3842
3843
3844 class UnitSettings(Type):
3845 _toSchema = {'version': 'Version'}
3846 _toPy = {'Version': 'version'}
3847 def __init__(self, version=None):
3848 '''
3849 version : int
3850 '''
3851 self.version = version
3852
3853
3854 class RetryStrategy(Type):
3855 _toSchema = {'shouldretry': 'ShouldRetry', 'jitterretrytime': 'JitterRetryTime', 'minretrytime': 'MinRetryTime', 'retrytimefactor': 'RetryTimeFactor', 'maxretrytime': 'MaxRetryTime'}
3856 _toPy = {'RetryTimeFactor': 'retrytimefactor', 'MaxRetryTime': 'maxretrytime', 'ShouldRetry': 'shouldretry', 'MinRetryTime': 'minretrytime', 'JitterRetryTime': 'jitterretrytime'}
3857 def __init__(self, jitterretrytime=None, maxretrytime=None, minretrytime=None, retrytimefactor=None, shouldretry=None):
3858 '''
3859 jitterretrytime : bool
3860 maxretrytime : int
3861 minretrytime : int
3862 retrytimefactor : int
3863 shouldretry : bool
3864 '''
3865 self.jitterretrytime = jitterretrytime
3866 self.maxretrytime = maxretrytime
3867 self.minretrytime = minretrytime
3868 self.retrytimefactor = retrytimefactor
3869 self.shouldretry = shouldretry
3870
3871
3872 class RetryStrategyResult(Type):
3873 _toSchema = {'result': 'Result', 'error': 'Error'}
3874 _toPy = {'Result': 'result', 'Error': 'error'}
3875 def __init__(self, error=None, result=None):
3876 '''
3877 error : Error
3878 result : RetryStrategy
3879 '''
3880 self.error = Error.from_json(error) if error else None
3881 self.result = RetryStrategy.from_json(result) if result else None
3882
3883
3884 class RetryStrategyResults(Type):
3885 _toSchema = {'results': 'Results'}
3886 _toPy = {'Results': 'results'}
3887 def __init__(self, results=None):
3888 '''
3889 results : typing.Sequence[~RetryStrategyResult]
3890 '''
3891 self.results = [RetryStrategyResult.from_json(o) for o in results or []]
3892
3893
3894 class SSHAddressResult(Type):
3895 _toSchema = {'address': 'address', 'error': 'error'}
3896 _toPy = {'address': 'address', 'error': 'error'}
3897 def __init__(self, address=None, error=None):
3898 '''
3899 address : str
3900 error : Error
3901 '''
3902 self.address = address
3903 self.error = Error.from_json(error) if error else None
3904
3905
3906 class SSHAddressResults(Type):
3907 _toSchema = {'results': 'results'}
3908 _toPy = {'results': 'results'}
3909 def __init__(self, results=None):
3910 '''
3911 results : typing.Sequence[~SSHAddressResult]
3912 '''
3913 self.results = [SSHAddressResult.from_json(o) for o in results or []]
3914
3915
3916 class SSHProxyResult(Type):
3917 _toSchema = {'use_proxy': 'use-proxy'}
3918 _toPy = {'use-proxy': 'use_proxy'}
3919 def __init__(self, use_proxy=None):
3920 '''
3921 use_proxy : bool
3922 '''
3923 self.use_proxy = use_proxy
3924
3925
3926 class SSHPublicKeysResult(Type):
3927 _toSchema = {'public_keys': 'public-keys', 'error': 'error'}
3928 _toPy = {'public-keys': 'public_keys', 'error': 'error'}
3929 def __init__(self, error=None, public_keys=None):
3930 '''
3931 error : Error
3932 public_keys : typing.Sequence[str]
3933 '''
3934 self.error = Error.from_json(error) if error else None
3935 self.public_keys = public_keys
3936
3937
3938 class SSHPublicKeysResults(Type):
3939 _toSchema = {'results': 'results'}
3940 _toPy = {'results': 'results'}
3941 def __init__(self, results=None):
3942 '''
3943 results : typing.Sequence[~SSHPublicKeysResult]
3944 '''
3945 self.results = [SSHPublicKeysResult.from_json(o) for o in results or []]
3946
3947
3948 class SingularClaim(Type):
3949 _toSchema = {'controllertag': 'ControllerTag', 'duration': 'Duration', 'modeltag': 'ModelTag'}
3950 _toPy = {'Duration': 'duration', 'ModelTag': 'modeltag', 'ControllerTag': 'controllertag'}
3951 def __init__(self, controllertag=None, duration=None, modeltag=None):
3952 '''
3953 controllertag : str
3954 duration : int
3955 modeltag : str
3956 '''
3957 self.controllertag = controllertag
3958 self.duration = duration
3959 self.modeltag = modeltag
3960
3961
3962 class SingularClaims(Type):
3963 _toSchema = {'claims': 'Claims'}
3964 _toPy = {'Claims': 'claims'}
3965 def __init__(self, claims=None):
3966 '''
3967 claims : typing.Sequence[~SingularClaim]
3968 '''
3969 self.claims = [SingularClaim.from_json(o) for o in claims or []]
3970
3971
3972 class ListSpacesResults(Type):
3973 _toSchema = {'results': 'Results'}
3974 _toPy = {'Results': 'results'}
3975 def __init__(self, results=None):
3976 '''
3977 results : typing.Sequence[~Space]
3978 '''
3979 self.results = [Space.from_json(o) for o in results or []]
3980
3981
3982 class Space(Type):
3983 _toSchema = {'name': 'Name', 'subnets': 'Subnets', 'error': 'Error'}
3984 _toPy = {'Subnets': 'subnets', 'Name': 'name', 'Error': 'error'}
3985 def __init__(self, error=None, name=None, subnets=None):
3986 '''
3987 error : Error
3988 name : str
3989 subnets : typing.Sequence[~Subnet]
3990 '''
3991 self.error = Error.from_json(error) if error else None
3992 self.name = name
3993 self.subnets = [Subnet.from_json(o) for o in subnets or []]
3994
3995
3996 class StatusHistoryPruneArgs(Type):
3997 _toSchema = {'maxhistorytime': 'MaxHistoryTime', 'maxhistorymb': 'MaxHistoryMB'}
3998 _toPy = {'MaxHistoryTime': 'maxhistorytime', 'MaxHistoryMB': 'maxhistorymb'}
3999 def __init__(self, maxhistorymb=None, maxhistorytime=None):
4000 '''
4001 maxhistorymb : int
4002 maxhistorytime : int
4003 '''
4004 self.maxhistorymb = maxhistorymb
4005 self.maxhistorytime = maxhistorytime
4006
4007
4008 class FilesystemAttachmentInfo(Type):
4009 _toSchema = {'read_only': 'read-only', 'mountpoint': 'mountpoint'}
4010 _toPy = {'read-only': 'read_only', 'mountpoint': 'mountpoint'}
4011 def __init__(self, mountpoint=None, read_only=None):
4012 '''
4013 mountpoint : str
4014 read_only : bool
4015 '''
4016 self.mountpoint = mountpoint
4017 self.read_only = read_only
4018
4019
4020 class FilesystemDetails(Type):
4021 _toSchema = {'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'status': 'status', 'storage': 'storage', 'filesystemtag': 'filesystemtag', 'info': 'info'}
4022 _toPy = {'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'status': 'status', 'storage': 'storage', 'filesystemtag': 'filesystemtag', 'info': 'info'}
4023 def __init__(self, filesystemtag=None, info=None, machineattachments=None, status=None, storage=None, volumetag=None):
4024 '''
4025 filesystemtag : str
4026 info : FilesystemInfo
4027 machineattachments : typing.Mapping[str, ~FilesystemAttachmentInfo]
4028 status : EntityStatus
4029 storage : StorageDetails
4030 volumetag : str
4031 '''
4032 self.filesystemtag = filesystemtag
4033 self.info = FilesystemInfo.from_json(info) if info else None
4034 self.machineattachments = {k: FilesystemAttachmentInfo.from_json(v) for k, v in (machineattachments or dict()).items()}
4035 self.status = EntityStatus.from_json(status) if status else None
4036 self.storage = StorageDetails.from_json(storage) if storage else None
4037 self.volumetag = volumetag
4038
4039
4040 class FilesystemDetailsListResult(Type):
4041 _toSchema = {'result': 'result', 'error': 'error'}
4042 _toPy = {'result': 'result', 'error': 'error'}
4043 def __init__(self, error=None, result=None):
4044 '''
4045 error : Error
4046 result : typing.Sequence[~FilesystemDetails]
4047 '''
4048 self.error = Error.from_json(error) if error else None
4049 self.result = [FilesystemDetails.from_json(o) for o in result or []]
4050
4051
4052 class FilesystemDetailsListResults(Type):
4053 _toSchema = {'results': 'results'}
4054 _toPy = {'results': 'results'}
4055 def __init__(self, results=None):
4056 '''
4057 results : typing.Sequence[~FilesystemDetailsListResult]
4058 '''
4059 self.results = [FilesystemDetailsListResult.from_json(o) for o in results or []]
4060
4061
4062 class FilesystemFilter(Type):
4063 _toSchema = {'machines': 'machines'}
4064 _toPy = {'machines': 'machines'}
4065 def __init__(self, machines=None):
4066 '''
4067 machines : typing.Sequence[str]
4068 '''
4069 self.machines = machines
4070
4071
4072 class FilesystemFilters(Type):
4073 _toSchema = {'filters': 'filters'}
4074 _toPy = {'filters': 'filters'}
4075 def __init__(self, filters=None):
4076 '''
4077 filters : typing.Sequence[~FilesystemFilter]
4078 '''
4079 self.filters = [FilesystemFilter.from_json(o) for o in filters or []]
4080
4081
4082 class FilesystemInfo(Type):
4083 _toSchema = {'filesystemid': 'filesystemid', 'size': 'size'}
4084 _toPy = {'filesystemid': 'filesystemid', 'size': 'size'}
4085 def __init__(self, filesystemid=None, size=None):
4086 '''
4087 filesystemid : str
4088 size : int
4089 '''
4090 self.filesystemid = filesystemid
4091 self.size = size
4092
4093
4094 class StorageAddParams(Type):
4095 _toSchema = {'storage': 'storage', 'unit': 'unit', 'storagename': 'StorageName'}
4096 _toPy = {'storage': 'storage', 'unit': 'unit', 'StorageName': 'storagename'}
4097 def __init__(self, storagename=None, storage=None, unit=None):
4098 '''
4099 storagename : str
4100 storage : StorageConstraints
4101 unit : str
4102 '''
4103 self.storagename = storagename
4104 self.storage = StorageConstraints.from_json(storage) if storage else None
4105 self.unit = unit
4106
4107
4108 class StorageAttachmentDetails(Type):
4109 _toSchema = {'machinetag': 'machinetag', 'storagetag': 'storagetag', 'location': 'location', 'unittag': 'unittag'}
4110 _toPy = {'machinetag': 'machinetag', 'storagetag': 'storagetag', 'location': 'location', 'unittag': 'unittag'}
4111 def __init__(self, location=None, machinetag=None, storagetag=None, unittag=None):
4112 '''
4113 location : str
4114 machinetag : str
4115 storagetag : str
4116 unittag : str
4117 '''
4118 self.location = location
4119 self.machinetag = machinetag
4120 self.storagetag = storagetag
4121 self.unittag = unittag
4122
4123
4124 class StorageConstraints(Type):
4125 _toSchema = {'size': 'Size', 'pool': 'Pool', 'count': 'Count'}
4126 _toPy = {'Size': 'size', 'Count': 'count', 'Pool': 'pool'}
4127 def __init__(self, count=None, pool=None, size=None):
4128 '''
4129 count : int
4130 pool : str
4131 size : int
4132 '''
4133 self.count = count
4134 self.pool = pool
4135 self.size = size
4136
4137
4138 class StorageDetails(Type):
4139 _toSchema = {'attachments': 'attachments', 'ownertag': 'ownertag', 'kind': 'kind', 'status': 'status', 'persistent': 'Persistent', 'storagetag': 'storagetag'}
4140 _toPy = {'attachments': 'attachments', 'ownertag': 'ownertag', 'kind': 'kind', 'status': 'status', 'storagetag': 'storagetag', 'Persistent': 'persistent'}
4141 def __init__(self, persistent=None, attachments=None, kind=None, ownertag=None, status=None, storagetag=None):
4142 '''
4143 persistent : bool
4144 attachments : typing.Mapping[str, ~StorageAttachmentDetails]
4145 kind : int
4146 ownertag : str
4147 status : EntityStatus
4148 storagetag : str
4149 '''
4150 self.persistent = persistent
4151 self.attachments = {k: StorageAttachmentDetails.from_json(v) for k, v in (attachments or dict()).items()}
4152 self.kind = kind
4153 self.ownertag = ownertag
4154 self.status = EntityStatus.from_json(status) if status else None
4155 self.storagetag = storagetag
4156
4157
4158 class StorageDetailsListResult(Type):
4159 _toSchema = {'result': 'result', 'error': 'error'}
4160 _toPy = {'result': 'result', 'error': 'error'}
4161 def __init__(self, error=None, result=None):
4162 '''
4163 error : Error
4164 result : typing.Sequence[~StorageDetails]
4165 '''
4166 self.error = Error.from_json(error) if error else None
4167 self.result = [StorageDetails.from_json(o) for o in result or []]
4168
4169
4170 class StorageDetailsListResults(Type):
4171 _toSchema = {'results': 'results'}
4172 _toPy = {'results': 'results'}
4173 def __init__(self, results=None):
4174 '''
4175 results : typing.Sequence[~StorageDetailsListResult]
4176 '''
4177 self.results = [StorageDetailsListResult.from_json(o) for o in results or []]
4178
4179
4180 class StorageDetailsResult(Type):
4181 _toSchema = {'result': 'result', 'error': 'error'}
4182 _toPy = {'result': 'result', 'error': 'error'}
4183 def __init__(self, error=None, result=None):
4184 '''
4185 error : Error
4186 result : StorageDetails
4187 '''
4188 self.error = Error.from_json(error) if error else None
4189 self.result = StorageDetails.from_json(result) if result else None
4190
4191
4192 class StorageDetailsResults(Type):
4193 _toSchema = {'results': 'results'}
4194 _toPy = {'results': 'results'}
4195 def __init__(self, results=None):
4196 '''
4197 results : typing.Sequence[~StorageDetailsResult]
4198 '''
4199 self.results = [StorageDetailsResult.from_json(o) for o in results or []]
4200
4201
4202 class StorageFilter(Type):
4203 _toSchema = {}
4204 _toPy = {}
4205 def __init__(self):
4206 '''
4207
4208 '''
4209 pass
4210
4211
4212 class StorageFilters(Type):
4213 _toSchema = {'filters': 'filters'}
4214 _toPy = {'filters': 'filters'}
4215 def __init__(self, filters=None):
4216 '''
4217 filters : typing.Sequence[~StorageFilter]
4218 '''
4219 self.filters = [StorageFilter.from_json(o) for o in filters or []]
4220
4221
4222 class StoragePool(Type):
4223 _toSchema = {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'}
4224 _toPy = {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'}
4225 def __init__(self, attrs=None, name=None, provider=None):
4226 '''
4227 attrs : typing.Mapping[str, typing.Any]
4228 name : str
4229 provider : str
4230 '''
4231 self.attrs = attrs
4232 self.name = name
4233 self.provider = provider
4234
4235
4236 class StoragePoolFilter(Type):
4237 _toSchema = {'providers': 'providers', 'names': 'names'}
4238 _toPy = {'providers': 'providers', 'names': 'names'}
4239 def __init__(self, names=None, providers=None):
4240 '''
4241 names : typing.Sequence[str]
4242 providers : typing.Sequence[str]
4243 '''
4244 self.names = names
4245 self.providers = providers
4246
4247
4248 class StoragePoolFilters(Type):
4249 _toSchema = {'filters': 'filters'}
4250 _toPy = {'filters': 'filters'}
4251 def __init__(self, filters=None):
4252 '''
4253 filters : typing.Sequence[~StoragePoolFilter]
4254 '''
4255 self.filters = [StoragePoolFilter.from_json(o) for o in filters or []]
4256
4257
4258 class StoragePoolsResult(Type):
4259 _toSchema = {'storagepools': 'storagepools', 'error': 'error'}
4260 _toPy = {'storagepools': 'storagepools', 'error': 'error'}
4261 def __init__(self, error=None, storagepools=None):
4262 '''
4263 error : Error
4264 storagepools : typing.Sequence[~StoragePool]
4265 '''
4266 self.error = Error.from_json(error) if error else None
4267 self.storagepools = [StoragePool.from_json(o) for o in storagepools or []]
4268
4269
4270 class StoragePoolsResults(Type):
4271 _toSchema = {'results': 'results'}
4272 _toPy = {'results': 'results'}
4273 def __init__(self, results=None):
4274 '''
4275 results : typing.Sequence[~StoragePoolsResult]
4276 '''
4277 self.results = [StoragePoolsResult.from_json(o) for o in results or []]
4278
4279
4280 class StoragesAddParams(Type):
4281 _toSchema = {'storages': 'storages'}
4282 _toPy = {'storages': 'storages'}
4283 def __init__(self, storages=None):
4284 '''
4285 storages : typing.Sequence[~StorageAddParams]
4286 '''
4287 self.storages = [StorageAddParams.from_json(o) for o in storages or []]
4288
4289
4290 class VolumeDetails(Type):
4291 _toSchema = {'storage': 'storage', 'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'status': 'status', 'info': 'info'}
4292 _toPy = {'storage': 'storage', 'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'status': 'status', 'info': 'info'}
4293 def __init__(self, info=None, machineattachments=None, status=None, storage=None, volumetag=None):
4294 '''
4295 info : VolumeInfo
4296 machineattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
4297 status : EntityStatus
4298 storage : StorageDetails
4299 volumetag : str
4300 '''
4301 self.info = VolumeInfo.from_json(info) if info else None
4302 self.machineattachments = {k: VolumeAttachmentInfo.from_json(v) for k, v in (machineattachments or dict()).items()}
4303 self.status = EntityStatus.from_json(status) if status else None
4304 self.storage = StorageDetails.from_json(storage) if storage else None
4305 self.volumetag = volumetag
4306
4307
4308 class VolumeDetailsListResult(Type):
4309 _toSchema = {'result': 'result', 'error': 'error'}
4310 _toPy = {'result': 'result', 'error': 'error'}
4311 def __init__(self, error=None, result=None):
4312 '''
4313 error : Error
4314 result : typing.Sequence[~VolumeDetails]
4315 '''
4316 self.error = Error.from_json(error) if error else None
4317 self.result = [VolumeDetails.from_json(o) for o in result or []]
4318
4319
4320 class VolumeDetailsListResults(Type):
4321 _toSchema = {'results': 'results'}
4322 _toPy = {'results': 'results'}
4323 def __init__(self, results=None):
4324 '''
4325 results : typing.Sequence[~VolumeDetailsListResult]
4326 '''
4327 self.results = [VolumeDetailsListResult.from_json(o) for o in results or []]
4328
4329
4330 class VolumeFilter(Type):
4331 _toSchema = {'machines': 'machines'}
4332 _toPy = {'machines': 'machines'}
4333 def __init__(self, machines=None):
4334 '''
4335 machines : typing.Sequence[str]
4336 '''
4337 self.machines = machines
4338
4339
4340 class VolumeFilters(Type):
4341 _toSchema = {'filters': 'filters'}
4342 _toPy = {'filters': 'filters'}
4343 def __init__(self, filters=None):
4344 '''
4345 filters : typing.Sequence[~VolumeFilter]
4346 '''
4347 self.filters = [VolumeFilter.from_json(o) for o in filters or []]
4348
4349
4350 class BlockDeviceResult(Type):
4351 _toSchema = {'result': 'result', 'error': 'error'}
4352 _toPy = {'result': 'result', 'error': 'error'}
4353 def __init__(self, error=None, result=None):
4354 '''
4355 error : Error
4356 result : BlockDevice
4357 '''
4358 self.error = Error.from_json(error) if error else None
4359 self.result = BlockDevice.from_json(result) if result else None
4360
4361
4362 class BlockDeviceResults(Type):
4363 _toSchema = {'results': 'results'}
4364 _toPy = {'results': 'results'}
4365 def __init__(self, results=None):
4366 '''
4367 results : typing.Sequence[~BlockDeviceResult]
4368 '''
4369 self.results = [BlockDeviceResult.from_json(o) for o in results or []]
4370
4371
4372 class Filesystem(Type):
4373 _toSchema = {'volumetag': 'volumetag', 'info': 'info', 'filesystemtag': 'filesystemtag'}
4374 _toPy = {'volumetag': 'volumetag', 'info': 'info', 'filesystemtag': 'filesystemtag'}
4375 def __init__(self, filesystemtag=None, info=None, volumetag=None):
4376 '''
4377 filesystemtag : str
4378 info : FilesystemInfo
4379 volumetag : str
4380 '''
4381 self.filesystemtag = filesystemtag
4382 self.info = FilesystemInfo.from_json(info) if info else None
4383 self.volumetag = volumetag
4384
4385
4386 class FilesystemAttachment(Type):
4387 _toSchema = {'machinetag': 'machinetag', 'info': 'info', 'filesystemtag': 'filesystemtag'}
4388 _toPy = {'machinetag': 'machinetag', 'info': 'info', 'filesystemtag': 'filesystemtag'}
4389 def __init__(self, filesystemtag=None, info=None, machinetag=None):
4390 '''
4391 filesystemtag : str
4392 info : FilesystemAttachmentInfo
4393 machinetag : str
4394 '''
4395 self.filesystemtag = filesystemtag
4396 self.info = FilesystemAttachmentInfo.from_json(info) if info else None
4397 self.machinetag = machinetag
4398
4399
4400 class FilesystemAttachmentParams(Type):
4401 _toSchema = {'instanceid': 'instanceid', 'filesystemid': 'filesystemid', 'read_only': 'read-only', 'machinetag': 'machinetag', 'provider': 'provider', 'mountpoint': 'mountpoint', 'filesystemtag': 'filesystemtag'}
4402 _toPy = {'instanceid': 'instanceid', 'filesystemid': 'filesystemid', 'read-only': 'read_only', 'machinetag': 'machinetag', 'provider': 'provider', 'mountpoint': 'mountpoint', 'filesystemtag': 'filesystemtag'}
4403 def __init__(self, filesystemid=None, filesystemtag=None, instanceid=None, machinetag=None, mountpoint=None, provider=None, read_only=None):
4404 '''
4405 filesystemid : str
4406 filesystemtag : str
4407 instanceid : str
4408 machinetag : str
4409 mountpoint : str
4410 provider : str
4411 read_only : bool
4412 '''
4413 self.filesystemid = filesystemid
4414 self.filesystemtag = filesystemtag
4415 self.instanceid = instanceid
4416 self.machinetag = machinetag
4417 self.mountpoint = mountpoint
4418 self.provider = provider
4419 self.read_only = read_only
4420
4421
4422 class FilesystemAttachmentParamsResult(Type):
4423 _toSchema = {'result': 'result', 'error': 'error'}
4424 _toPy = {'result': 'result', 'error': 'error'}
4425 def __init__(self, error=None, result=None):
4426 '''
4427 error : Error
4428 result : FilesystemAttachmentParams
4429 '''
4430 self.error = Error.from_json(error) if error else None
4431 self.result = FilesystemAttachmentParams.from_json(result) if result else None
4432
4433
4434 class FilesystemAttachmentParamsResults(Type):
4435 _toSchema = {'results': 'results'}
4436 _toPy = {'results': 'results'}
4437 def __init__(self, results=None):
4438 '''
4439 results : typing.Sequence[~FilesystemAttachmentParamsResult]
4440 '''
4441 self.results = [FilesystemAttachmentParamsResult.from_json(o) for o in results or []]
4442
4443
4444 class FilesystemAttachmentResult(Type):
4445 _toSchema = {'result': 'result', 'error': 'error'}
4446 _toPy = {'result': 'result', 'error': 'error'}
4447 def __init__(self, error=None, result=None):
4448 '''
4449 error : Error
4450 result : FilesystemAttachment
4451 '''
4452 self.error = Error.from_json(error) if error else None
4453 self.result = FilesystemAttachment.from_json(result) if result else None
4454
4455
4456 class FilesystemAttachmentResults(Type):
4457 _toSchema = {'results': 'results'}
4458 _toPy = {'results': 'results'}
4459 def __init__(self, results=None):
4460 '''
4461 results : typing.Sequence[~FilesystemAttachmentResult]
4462 '''
4463 self.results = [FilesystemAttachmentResult.from_json(o) for o in results or []]
4464
4465
4466 class FilesystemAttachments(Type):
4467 _toSchema = {'filesystemattachments': 'filesystemattachments'}
4468 _toPy = {'filesystemattachments': 'filesystemattachments'}
4469 def __init__(self, filesystemattachments=None):
4470 '''
4471 filesystemattachments : typing.Sequence[~FilesystemAttachment]
4472 '''
4473 self.filesystemattachments = [FilesystemAttachment.from_json(o) for o in filesystemattachments or []]
4474
4475
4476 class FilesystemParams(Type):
4477 _toSchema = {'size': 'size', 'attributes': 'attributes', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'filesystemtag': 'filesystemtag'}
4478 _toPy = {'size': 'size', 'attributes': 'attributes', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'filesystemtag': 'filesystemtag'}
4479 def __init__(self, attachment=None, attributes=None, filesystemtag=None, provider=None, size=None, tags=None, volumetag=None):
4480 '''
4481 attachment : FilesystemAttachmentParams
4482 attributes : typing.Mapping[str, typing.Any]
4483 filesystemtag : str
4484 provider : str
4485 size : int
4486 tags : typing.Mapping[str, str]
4487 volumetag : str
4488 '''
4489 self.attachment = FilesystemAttachmentParams.from_json(attachment) if attachment else None
4490 self.attributes = attributes
4491 self.filesystemtag = filesystemtag
4492 self.provider = provider
4493 self.size = size
4494 self.tags = tags
4495 self.volumetag = volumetag
4496
4497
4498 class FilesystemParamsResult(Type):
4499 _toSchema = {'result': 'result', 'error': 'error'}
4500 _toPy = {'result': 'result', 'error': 'error'}
4501 def __init__(self, error=None, result=None):
4502 '''
4503 error : Error
4504 result : FilesystemParams
4505 '''
4506 self.error = Error.from_json(error) if error else None
4507 self.result = FilesystemParams.from_json(result) if result else None
4508
4509
4510 class FilesystemParamsResults(Type):
4511 _toSchema = {'results': 'results'}
4512 _toPy = {'results': 'results'}
4513 def __init__(self, results=None):
4514 '''
4515 results : typing.Sequence[~FilesystemParamsResult]
4516 '''
4517 self.results = [FilesystemParamsResult.from_json(o) for o in results or []]
4518
4519
4520 class FilesystemResult(Type):
4521 _toSchema = {'result': 'result', 'error': 'error'}
4522 _toPy = {'result': 'result', 'error': 'error'}
4523 def __init__(self, error=None, result=None):
4524 '''
4525 error : Error
4526 result : Filesystem
4527 '''
4528 self.error = Error.from_json(error) if error else None
4529 self.result = Filesystem.from_json(result) if result else None
4530
4531
4532 class FilesystemResults(Type):
4533 _toSchema = {'results': 'results'}
4534 _toPy = {'results': 'results'}
4535 def __init__(self, results=None):
4536 '''
4537 results : typing.Sequence[~FilesystemResult]
4538 '''
4539 self.results = [FilesystemResult.from_json(o) for o in results or []]
4540
4541
4542 class Filesystems(Type):
4543 _toSchema = {'filesystems': 'filesystems'}
4544 _toPy = {'filesystems': 'filesystems'}
4545 def __init__(self, filesystems=None):
4546 '''
4547 filesystems : typing.Sequence[~Filesystem]
4548 '''
4549 self.filesystems = [Filesystem.from_json(o) for o in filesystems or []]
4550
4551
4552 class MachineStorageIds(Type):
4553 _toSchema = {'ids': 'ids'}
4554 _toPy = {'ids': 'ids'}
4555 def __init__(self, ids=None):
4556 '''
4557 ids : typing.Sequence[~MachineStorageId]
4558 '''
4559 self.ids = [MachineStorageId.from_json(o) for o in ids or []]
4560
4561
4562 class MachineStorageIdsWatchResults(Type):
4563 _toSchema = {'results': 'Results'}
4564 _toPy = {'Results': 'results'}
4565 def __init__(self, results=None):
4566 '''
4567 results : typing.Sequence[~MachineStorageIdsWatchResult]
4568 '''
4569 self.results = [MachineStorageIdsWatchResult.from_json(o) for o in results or []]
4570
4571
4572 class VolumeAttachment(Type):
4573 _toSchema = {'volumetag': 'volumetag', 'machinetag': 'machinetag', 'info': 'info'}
4574 _toPy = {'volumetag': 'volumetag', 'machinetag': 'machinetag', 'info': 'info'}
4575 def __init__(self, info=None, machinetag=None, volumetag=None):
4576 '''
4577 info : VolumeAttachmentInfo
4578 machinetag : str
4579 volumetag : str
4580 '''
4581 self.info = VolumeAttachmentInfo.from_json(info) if info else None
4582 self.machinetag = machinetag
4583 self.volumetag = volumetag
4584
4585
4586 class VolumeAttachmentParamsResult(Type):
4587 _toSchema = {'result': 'result', 'error': 'error'}
4588 _toPy = {'result': 'result', 'error': 'error'}
4589 def __init__(self, error=None, result=None):
4590 '''
4591 error : Error
4592 result : VolumeAttachmentParams
4593 '''
4594 self.error = Error.from_json(error) if error else None
4595 self.result = VolumeAttachmentParams.from_json(result) if result else None
4596
4597
4598 class VolumeAttachmentParamsResults(Type):
4599 _toSchema = {'results': 'results'}
4600 _toPy = {'results': 'results'}
4601 def __init__(self, results=None):
4602 '''
4603 results : typing.Sequence[~VolumeAttachmentParamsResult]
4604 '''
4605 self.results = [VolumeAttachmentParamsResult.from_json(o) for o in results or []]
4606
4607
4608 class VolumeAttachmentResult(Type):
4609 _toSchema = {'result': 'result', 'error': 'error'}
4610 _toPy = {'result': 'result', 'error': 'error'}
4611 def __init__(self, error=None, result=None):
4612 '''
4613 error : Error
4614 result : VolumeAttachment
4615 '''
4616 self.error = Error.from_json(error) if error else None
4617 self.result = VolumeAttachment.from_json(result) if result else None
4618
4619
4620 class VolumeAttachmentResults(Type):
4621 _toSchema = {'results': 'results'}
4622 _toPy = {'results': 'results'}
4623 def __init__(self, results=None):
4624 '''
4625 results : typing.Sequence[~VolumeAttachmentResult]
4626 '''
4627 self.results = [VolumeAttachmentResult.from_json(o) for o in results or []]
4628
4629
4630 class VolumeAttachments(Type):
4631 _toSchema = {'volumeattachments': 'volumeattachments'}
4632 _toPy = {'volumeattachments': 'volumeattachments'}
4633 def __init__(self, volumeattachments=None):
4634 '''
4635 volumeattachments : typing.Sequence[~VolumeAttachment]
4636 '''
4637 self.volumeattachments = [VolumeAttachment.from_json(o) for o in volumeattachments or []]
4638
4639
4640 class VolumeParamsResult(Type):
4641 _toSchema = {'result': 'result', 'error': 'error'}
4642 _toPy = {'result': 'result', 'error': 'error'}
4643 def __init__(self, error=None, result=None):
4644 '''
4645 error : Error
4646 result : VolumeParams
4647 '''
4648 self.error = Error.from_json(error) if error else None
4649 self.result = VolumeParams.from_json(result) if result else None
4650
4651
4652 class VolumeParamsResults(Type):
4653 _toSchema = {'results': 'results'}
4654 _toPy = {'results': 'results'}
4655 def __init__(self, results=None):
4656 '''
4657 results : typing.Sequence[~VolumeParamsResult]
4658 '''
4659 self.results = [VolumeParamsResult.from_json(o) for o in results or []]
4660
4661
4662 class VolumeResult(Type):
4663 _toSchema = {'result': 'result', 'error': 'error'}
4664 _toPy = {'result': 'result', 'error': 'error'}
4665 def __init__(self, error=None, result=None):
4666 '''
4667 error : Error
4668 result : Volume
4669 '''
4670 self.error = Error.from_json(error) if error else None
4671 self.result = Volume.from_json(result) if result else None
4672
4673
4674 class VolumeResults(Type):
4675 _toSchema = {'results': 'results'}
4676 _toPy = {'results': 'results'}
4677 def __init__(self, results=None):
4678 '''
4679 results : typing.Sequence[~VolumeResult]
4680 '''
4681 self.results = [VolumeResult.from_json(o) for o in results or []]
4682
4683
4684 class Volumes(Type):
4685 _toSchema = {'volumes': 'volumes'}
4686 _toPy = {'volumes': 'volumes'}
4687 def __init__(self, volumes=None):
4688 '''
4689 volumes : typing.Sequence[~Volume]
4690 '''
4691 self.volumes = [Volume.from_json(o) for o in volumes or []]
4692
4693
4694 class SpaceResult(Type):
4695 _toSchema = {'tag': 'Tag', 'error': 'Error'}
4696 _toPy = {'Tag': 'tag', 'Error': 'error'}
4697 def __init__(self, error=None, tag=None):
4698 '''
4699 error : Error
4700 tag : str
4701 '''
4702 self.error = Error.from_json(error) if error else None
4703 self.tag = tag
4704
4705
4706 class SpaceResults(Type):
4707 _toSchema = {'results': 'Results'}
4708 _toPy = {'Results': 'results'}
4709 def __init__(self, results=None):
4710 '''
4711 results : typing.Sequence[~SpaceResult]
4712 '''
4713 self.results = [SpaceResult.from_json(o) for o in results or []]
4714
4715
4716 class ZoneResult(Type):
4717 _toSchema = {'name': 'Name', 'error': 'Error', 'available': 'Available'}
4718 _toPy = {'Error': 'error', 'Name': 'name', 'Available': 'available'}
4719 def __init__(self, available=None, error=None, name=None):
4720 '''
4721 available : bool
4722 error : Error
4723 name : str
4724 '''
4725 self.available = available
4726 self.error = Error.from_json(error) if error else None
4727 self.name = name
4728
4729
4730 class ZoneResults(Type):
4731 _toSchema = {'results': 'Results'}
4732 _toPy = {'Results': 'results'}
4733 def __init__(self, results=None):
4734 '''
4735 results : typing.Sequence[~ZoneResult]
4736 '''
4737 self.results = [ZoneResult.from_json(o) for o in results or []]
4738
4739
4740 class UndertakerModelInfo(Type):
4741 _toSchema = {'life': 'Life', 'name': 'Name', 'globalname': 'GlobalName', 'uuid': 'UUID', 'issystem': 'IsSystem'}
4742 _toPy = {'GlobalName': 'globalname', 'Name': 'name', 'UUID': 'uuid', 'Life': 'life', 'IsSystem': 'issystem'}
4743 def __init__(self, globalname=None, issystem=None, life=None, name=None, uuid=None):
4744 '''
4745 globalname : str
4746 issystem : bool
4747 life : str
4748 name : str
4749 uuid : str
4750 '''
4751 self.globalname = globalname
4752 self.issystem = issystem
4753 self.life = life
4754 self.name = name
4755 self.uuid = uuid
4756
4757
4758 class UndertakerModelInfoResult(Type):
4759 _toSchema = {'result': 'Result', 'error': 'Error'}
4760 _toPy = {'Result': 'result', 'Error': 'error'}
4761 def __init__(self, error=None, result=None):
4762 '''
4763 error : Error
4764 result : UndertakerModelInfo
4765 '''
4766 self.error = Error.from_json(error) if error else None
4767 self.result = UndertakerModelInfo.from_json(result) if result else None
4768
4769
4770 class ApplicationStatusResult(Type):
4771 _toSchema = {'units': 'Units', 'application': 'Application', 'error': 'Error'}
4772 _toPy = {'Application': 'application', 'Units': 'units', 'Error': 'error'}
4773 def __init__(self, application=None, error=None, units=None):
4774 '''
4775 application : StatusResult
4776 error : Error
4777 units : typing.Mapping[str, ~StatusResult]
4778 '''
4779 self.application = StatusResult.from_json(application) if application else None
4780 self.error = Error.from_json(error) if error else None
4781 self.units = {k: StatusResult.from_json(v) for k, v in (units or dict()).items()}
4782
4783
4784 class ApplicationStatusResults(Type):
4785 _toSchema = {'results': 'Results'}
4786 _toPy = {'Results': 'results'}
4787 def __init__(self, results=None):
4788 '''
4789 results : typing.Sequence[~ApplicationStatusResult]
4790 '''
4791 self.results = [ApplicationStatusResult.from_json(o) for o in results or []]
4792
4793
4794 class CharmURL(Type):
4795 _toSchema = {'url': 'URL'}
4796 _toPy = {'URL': 'url'}
4797 def __init__(self, url=None):
4798 '''
4799 url : str
4800 '''
4801 self.url = url
4802
4803
4804 class CharmURLs(Type):
4805 _toSchema = {'urls': 'URLs'}
4806 _toPy = {'URLs': 'urls'}
4807 def __init__(self, urls=None):
4808 '''
4809 urls : typing.Sequence[~CharmURL]
4810 '''
4811 self.urls = [CharmURL.from_json(o) for o in urls or []]
4812
4813
4814 class ConfigSettingsResult(Type):
4815 _toSchema = {'settings': 'Settings', 'error': 'Error'}
4816 _toPy = {'Settings': 'settings', 'Error': 'error'}
4817 def __init__(self, error=None, settings=None):
4818 '''
4819 error : Error
4820 settings : typing.Mapping[str, typing.Any]
4821 '''
4822 self.error = Error.from_json(error) if error else None
4823 self.settings = settings
4824
4825
4826 class ConfigSettingsResults(Type):
4827 _toSchema = {'results': 'Results'}
4828 _toPy = {'Results': 'results'}
4829 def __init__(self, results=None):
4830 '''
4831 results : typing.Sequence[~ConfigSettingsResult]
4832 '''
4833 self.results = [ConfigSettingsResult.from_json(o) for o in results or []]
4834
4835
4836 class Endpoint(Type):
4837 _toSchema = {'relation': 'Relation', 'applicationname': 'ApplicationName'}
4838 _toPy = {'Relation': 'relation', 'ApplicationName': 'applicationname'}
4839 def __init__(self, applicationname=None, relation=None):
4840 '''
4841 applicationname : str
4842 relation : Relation
4843 '''
4844 self.applicationname = applicationname
4845 self.relation = Relation.from_json(relation) if relation else None
4846
4847
4848 class EntitiesCharmURL(Type):
4849 _toSchema = {'entities': 'Entities'}
4850 _toPy = {'Entities': 'entities'}
4851 def __init__(self, entities=None):
4852 '''
4853 entities : typing.Sequence[~EntityCharmURL]
4854 '''
4855 self.entities = [EntityCharmURL.from_json(o) for o in entities or []]
4856
4857
4858 class EntitiesPortRanges(Type):
4859 _toSchema = {'entities': 'Entities'}
4860 _toPy = {'Entities': 'entities'}
4861 def __init__(self, entities=None):
4862 '''
4863 entities : typing.Sequence[~EntityPortRange]
4864 '''
4865 self.entities = [EntityPortRange.from_json(o) for o in entities or []]
4866
4867
4868 class EntityCharmURL(Type):
4869 _toSchema = {'charmurl': 'CharmURL', 'tag': 'Tag'}
4870 _toPy = {'CharmURL': 'charmurl', 'Tag': 'tag'}
4871 def __init__(self, charmurl=None, tag=None):
4872 '''
4873 charmurl : str
4874 tag : str
4875 '''
4876 self.charmurl = charmurl
4877 self.tag = tag
4878
4879
4880 class EntityPortRange(Type):
4881 _toSchema = {'tag': 'Tag', 'toport': 'ToPort', 'protocol': 'Protocol', 'fromport': 'FromPort'}
4882 _toPy = {'ToPort': 'toport', 'Protocol': 'protocol', 'Tag': 'tag', 'FromPort': 'fromport'}
4883 def __init__(self, fromport=None, protocol=None, tag=None, toport=None):
4884 '''
4885 fromport : int
4886 protocol : str
4887 tag : str
4888 toport : int
4889 '''
4890 self.fromport = fromport
4891 self.protocol = protocol
4892 self.tag = tag
4893 self.toport = toport
4894
4895
4896 class GetLeadershipSettingsBulkResults(Type):
4897 _toSchema = {'results': 'Results'}
4898 _toPy = {'Results': 'results'}
4899 def __init__(self, results=None):
4900 '''
4901 results : typing.Sequence[~GetLeadershipSettingsResult]
4902 '''
4903 self.results = [GetLeadershipSettingsResult.from_json(o) for o in results or []]
4904
4905
4906 class GetLeadershipSettingsResult(Type):
4907 _toSchema = {'settings': 'Settings', 'error': 'Error'}
4908 _toPy = {'Settings': 'settings', 'Error': 'error'}
4909 def __init__(self, error=None, settings=None):
4910 '''
4911 error : Error
4912 settings : typing.Mapping[str, str]
4913 '''
4914 self.error = Error.from_json(error) if error else None
4915 self.settings = settings
4916
4917
4918 class IntResult(Type):
4919 _toSchema = {'result': 'Result', 'error': 'Error'}
4920 _toPy = {'Result': 'result', 'Error': 'error'}
4921 def __init__(self, error=None, result=None):
4922 '''
4923 error : Error
4924 result : int
4925 '''
4926 self.error = Error.from_json(error) if error else None
4927 self.result = result
4928
4929
4930 class IntResults(Type):
4931 _toSchema = {'results': 'Results'}
4932 _toPy = {'Results': 'results'}
4933 def __init__(self, results=None):
4934 '''
4935 results : typing.Sequence[~IntResult]
4936 '''
4937 self.results = [IntResult.from_json(o) for o in results or []]
4938
4939
4940 class MergeLeadershipSettingsBulkParams(Type):
4941 _toSchema = {'params': 'Params'}
4942 _toPy = {'Params': 'params'}
4943 def __init__(self, params=None):
4944 '''
4945 params : typing.Sequence[~MergeLeadershipSettingsParam]
4946 '''
4947 self.params = [MergeLeadershipSettingsParam.from_json(o) for o in params or []]
4948
4949
4950 class MergeLeadershipSettingsParam(Type):
4951 _toSchema = {'applicationtag': 'ApplicationTag', 'settings': 'Settings'}
4952 _toPy = {'Settings': 'settings', 'ApplicationTag': 'applicationtag'}
4953 def __init__(self, applicationtag=None, settings=None):
4954 '''
4955 applicationtag : str
4956 settings : typing.Mapping[str, str]
4957 '''
4958 self.applicationtag = applicationtag
4959 self.settings = settings
4960
4961
4962 class ModelResult(Type):
4963 _toSchema = {'name': 'Name', 'uuid': 'UUID', 'error': 'Error'}
4964 _toPy = {'Name': 'name', 'UUID': 'uuid', 'Error': 'error'}
4965 def __init__(self, error=None, name=None, uuid=None):
4966 '''
4967 error : Error
4968 name : str
4969 uuid : str
4970 '''
4971 self.error = Error.from_json(error) if error else None
4972 self.name = name
4973 self.uuid = uuid
4974
4975
4976 class RelationIds(Type):
4977 _toSchema = {'relationids': 'RelationIds'}
4978 _toPy = {'RelationIds': 'relationids'}
4979 def __init__(self, relationids=None):
4980 '''
4981 relationids : typing.Sequence[int]
4982 '''
4983 self.relationids = relationids
4984
4985
4986 class RelationResult(Type):
4987 _toSchema = {'life': 'Life', 'key': 'Key', 'endpoint': 'Endpoint', 'id_': 'Id', 'error': 'Error'}
4988 _toPy = {'Key': 'key', 'Id': 'id_', 'Life': 'life', 'Endpoint': 'endpoint', 'Error': 'error'}
4989 def __init__(self, endpoint=None, error=None, id_=None, key=None, life=None):
4990 '''
4991 endpoint : Endpoint
4992 error : Error
4993 id_ : int
4994 key : str
4995 life : str
4996 '''
4997 self.endpoint = Endpoint.from_json(endpoint) if endpoint else None
4998 self.error = Error.from_json(error) if error else None
4999 self.id_ = id_
5000 self.key = key
5001 self.life = life
5002
5003
5004 class RelationResults(Type):
5005 _toSchema = {'results': 'Results'}
5006 _toPy = {'Results': 'results'}
5007 def __init__(self, results=None):
5008 '''
5009 results : typing.Sequence[~RelationResult]
5010 '''
5011 self.results = [RelationResult.from_json(o) for o in results or []]
5012
5013
5014 class RelationUnit(Type):
5015 _toSchema = {'relation': 'Relation', 'unit': 'Unit'}
5016 _toPy = {'Unit': 'unit', 'Relation': 'relation'}
5017 def __init__(self, relation=None, unit=None):
5018 '''
5019 relation : str
5020 unit : str
5021 '''
5022 self.relation = relation
5023 self.unit = unit
5024
5025
5026 class RelationUnitPair(Type):
5027 _toSchema = {'relation': 'Relation', 'remoteunit': 'RemoteUnit', 'localunit': 'LocalUnit'}
5028 _toPy = {'LocalUnit': 'localunit', 'Relation': 'relation', 'RemoteUnit': 'remoteunit'}
5029 def __init__(self, localunit=None, relation=None, remoteunit=None):
5030 '''
5031 localunit : str
5032 relation : str
5033 remoteunit : str
5034 '''
5035 self.localunit = localunit
5036 self.relation = relation
5037 self.remoteunit = remoteunit
5038
5039
5040 class RelationUnitPairs(Type):
5041 _toSchema = {'relationunitpairs': 'RelationUnitPairs'}
5042 _toPy = {'RelationUnitPairs': 'relationunitpairs'}
5043 def __init__(self, relationunitpairs=None):
5044 '''
5045 relationunitpairs : typing.Sequence[~RelationUnitPair]
5046 '''
5047 self.relationunitpairs = [RelationUnitPair.from_json(o) for o in relationunitpairs or []]
5048
5049
5050 class RelationUnitSettings(Type):
5051 _toSchema = {'settings': 'Settings', 'relation': 'Relation', 'unit': 'Unit'}
5052 _toPy = {'Settings': 'settings', 'Unit': 'unit', 'Relation': 'relation'}
5053 def __init__(self, relation=None, settings=None, unit=None):
5054 '''
5055 relation : str
5056 settings : typing.Mapping[str, str]
5057 unit : str
5058 '''
5059 self.relation = relation
5060 self.settings = settings
5061 self.unit = unit
5062
5063
5064 class RelationUnits(Type):
5065 _toSchema = {'relationunits': 'RelationUnits'}
5066 _toPy = {'RelationUnits': 'relationunits'}
5067 def __init__(self, relationunits=None):
5068 '''
5069 relationunits : typing.Sequence[~RelationUnit]
5070 '''
5071 self.relationunits = [RelationUnit.from_json(o) for o in relationunits or []]
5072
5073
5074 class RelationUnitsSettings(Type):
5075 _toSchema = {'relationunits': 'RelationUnits'}
5076 _toPy = {'RelationUnits': 'relationunits'}
5077 def __init__(self, relationunits=None):
5078 '''
5079 relationunits : typing.Sequence[~RelationUnitSettings]
5080 '''
5081 self.relationunits = [RelationUnitSettings.from_json(o) for o in relationunits or []]
5082
5083
5084 class RelationUnitsWatchResults(Type):
5085 _toSchema = {'results': 'Results'}
5086 _toPy = {'Results': 'results'}
5087 def __init__(self, results=None):
5088 '''
5089 results : typing.Sequence[~RelationUnitsWatchResult]
5090 '''
5091 self.results = [RelationUnitsWatchResult.from_json(o) for o in results or []]
5092
5093
5094 class ResolvedModeResult(Type):
5095 _toSchema = {'mode': 'Mode', 'error': 'Error'}
5096 _toPy = {'Mode': 'mode', 'Error': 'error'}
5097 def __init__(self, error=None, mode=None):
5098 '''
5099 error : Error
5100 mode : str
5101 '''
5102 self.error = Error.from_json(error) if error else None
5103 self.mode = mode
5104
5105
5106 class ResolvedModeResults(Type):
5107 _toSchema = {'results': 'Results'}
5108 _toPy = {'Results': 'results'}
5109 def __init__(self, results=None):
5110 '''
5111 results : typing.Sequence[~ResolvedModeResult]
5112 '''
5113 self.results = [ResolvedModeResult.from_json(o) for o in results or []]
5114
5115
5116 class SettingsResult(Type):
5117 _toSchema = {'settings': 'Settings', 'error': 'Error'}
5118 _toPy = {'Settings': 'settings', 'Error': 'error'}
5119 def __init__(self, error=None, settings=None):
5120 '''
5121 error : Error
5122 settings : typing.Mapping[str, str]
5123 '''
5124 self.error = Error.from_json(error) if error else None
5125 self.settings = settings
5126
5127
5128 class SettingsResults(Type):
5129 _toSchema = {'results': 'Results'}
5130 _toPy = {'Results': 'results'}
5131 def __init__(self, results=None):
5132 '''
5133 results : typing.Sequence[~SettingsResult]
5134 '''
5135 self.results = [SettingsResult.from_json(o) for o in results or []]
5136
5137
5138 class StorageAttachment(Type):
5139 _toSchema = {'storagetag': 'StorageTag', 'kind': 'Kind', 'location': 'Location', 'life': 'Life', 'ownertag': 'OwnerTag', 'unittag': 'UnitTag'}
5140 _toPy = {'UnitTag': 'unittag', 'StorageTag': 'storagetag', 'Kind': 'kind', 'OwnerTag': 'ownertag', 'Life': 'life', 'Location': 'location'}
5141 def __init__(self, kind=None, life=None, location=None, ownertag=None, storagetag=None, unittag=None):
5142 '''
5143 kind : int
5144 life : str
5145 location : str
5146 ownertag : str
5147 storagetag : str
5148 unittag : str
5149 '''
5150 self.kind = kind
5151 self.life = life
5152 self.location = location
5153 self.ownertag = ownertag
5154 self.storagetag = storagetag
5155 self.unittag = unittag
5156
5157
5158 class StorageAttachmentId(Type):
5159 _toSchema = {'storagetag': 'storagetag', 'unittag': 'unittag'}
5160 _toPy = {'storagetag': 'storagetag', 'unittag': 'unittag'}
5161 def __init__(self, storagetag=None, unittag=None):
5162 '''
5163 storagetag : str
5164 unittag : str
5165 '''
5166 self.storagetag = storagetag
5167 self.unittag = unittag
5168
5169
5170 class StorageAttachmentIds(Type):
5171 _toSchema = {'ids': 'ids'}
5172 _toPy = {'ids': 'ids'}
5173 def __init__(self, ids=None):
5174 '''
5175 ids : typing.Sequence[~StorageAttachmentId]
5176 '''
5177 self.ids = [StorageAttachmentId.from_json(o) for o in ids or []]
5178
5179
5180 class StorageAttachmentIdsResult(Type):
5181 _toSchema = {'result': 'result', 'error': 'error'}
5182 _toPy = {'result': 'result', 'error': 'error'}
5183 def __init__(self, error=None, result=None):
5184 '''
5185 error : Error
5186 result : StorageAttachmentIds
5187 '''
5188 self.error = Error.from_json(error) if error else None
5189 self.result = StorageAttachmentIds.from_json(result) if result else None
5190
5191
5192 class StorageAttachmentIdsResults(Type):
5193 _toSchema = {'results': 'results'}
5194 _toPy = {'results': 'results'}
5195 def __init__(self, results=None):
5196 '''
5197 results : typing.Sequence[~StorageAttachmentIdsResult]
5198 '''
5199 self.results = [StorageAttachmentIdsResult.from_json(o) for o in results or []]
5200
5201
5202 class StorageAttachmentResult(Type):
5203 _toSchema = {'result': 'result', 'error': 'error'}
5204 _toPy = {'result': 'result', 'error': 'error'}
5205 def __init__(self, error=None, result=None):
5206 '''
5207 error : Error
5208 result : StorageAttachment
5209 '''
5210 self.error = Error.from_json(error) if error else None
5211 self.result = StorageAttachment.from_json(result) if result else None
5212
5213
5214 class StorageAttachmentResults(Type):
5215 _toSchema = {'results': 'results'}
5216 _toPy = {'results': 'results'}
5217 def __init__(self, results=None):
5218 '''
5219 results : typing.Sequence[~StorageAttachmentResult]
5220 '''
5221 self.results = [StorageAttachmentResult.from_json(o) for o in results or []]
5222
5223
5224 class StringBoolResult(Type):
5225 _toSchema = {'result': 'Result', 'ok': 'Ok', 'error': 'Error'}
5226 _toPy = {'Ok': 'ok', 'Result': 'result', 'Error': 'error'}
5227 def __init__(self, error=None, ok=None, result=None):
5228 '''
5229 error : Error
5230 ok : bool
5231 result : str
5232 '''
5233 self.error = Error.from_json(error) if error else None
5234 self.ok = ok
5235 self.result = result
5236
5237
5238 class StringBoolResults(Type):
5239 _toSchema = {'results': 'Results'}
5240 _toPy = {'Results': 'results'}
5241 def __init__(self, results=None):
5242 '''
5243 results : typing.Sequence[~StringBoolResult]
5244 '''
5245 self.results = [StringBoolResult.from_json(o) for o in results or []]
5246
5247
5248 class UnitNetworkConfig(Type):
5249 _toSchema = {'bindingname': 'BindingName', 'unittag': 'UnitTag'}
5250 _toPy = {'BindingName': 'bindingname', 'UnitTag': 'unittag'}
5251 def __init__(self, bindingname=None, unittag=None):
5252 '''
5253 bindingname : str
5254 unittag : str
5255 '''
5256 self.bindingname = bindingname
5257 self.unittag = unittag
5258
5259
5260 class UnitNetworkConfigResult(Type):
5261 _toSchema = {'info': 'Info', 'error': 'Error'}
5262 _toPy = {'Info': 'info', 'Error': 'error'}
5263 def __init__(self, error=None, info=None):
5264 '''
5265 error : Error
5266 info : typing.Sequence[~NetworkConfig]
5267 '''
5268 self.error = Error.from_json(error) if error else None
5269 self.info = [NetworkConfig.from_json(o) for o in info or []]
5270
5271
5272 class UnitNetworkConfigResults(Type):
5273 _toSchema = {'results': 'Results'}
5274 _toPy = {'Results': 'results'}
5275 def __init__(self, results=None):
5276 '''
5277 results : typing.Sequence[~UnitNetworkConfigResult]
5278 '''
5279 self.results = [UnitNetworkConfigResult.from_json(o) for o in results or []]
5280
5281
5282 class UnitsNetworkConfig(Type):
5283 _toSchema = {'args': 'Args'}
5284 _toPy = {'Args': 'args'}
5285 def __init__(self, args=None):
5286 '''
5287 args : typing.Sequence[~UnitNetworkConfig]
5288 '''
5289 self.args = [UnitNetworkConfig.from_json(o) for o in args or []]
5290
5291
5292 class EntitiesVersion(Type):
5293 _toSchema = {'agenttools': 'AgentTools'}
5294 _toPy = {'AgentTools': 'agenttools'}
5295 def __init__(self, agenttools=None):
5296 '''
5297 agenttools : typing.Sequence[~EntityVersion]
5298 '''
5299 self.agenttools = [EntityVersion.from_json(o) for o in agenttools or []]
5300
5301
5302 class EntityVersion(Type):
5303 _toSchema = {'tag': 'Tag', 'tools': 'Tools'}
5304 _toPy = {'Tag': 'tag', 'Tools': 'tools'}
5305 def __init__(self, tag=None, tools=None):
5306 '''
5307 tag : str
5308 tools : Version
5309 '''
5310 self.tag = tag
5311 self.tools = Version.from_json(tools) if tools else None
5312
5313
5314 class VersionResult(Type):
5315 _toSchema = {'version': 'Version', 'error': 'Error'}
5316 _toPy = {'Version': 'version', 'Error': 'error'}
5317 def __init__(self, error=None, version=None):
5318 '''
5319 error : Error
5320 version : Number
5321 '''
5322 self.error = Error.from_json(error) if error else None
5323 self.version = Number.from_json(version) if version else None
5324
5325
5326 class VersionResults(Type):
5327 _toSchema = {'results': 'Results'}
5328 _toPy = {'Results': 'results'}
5329 def __init__(self, results=None):
5330 '''
5331 results : typing.Sequence[~VersionResult]
5332 '''
5333 self.results = [VersionResult.from_json(o) for o in results or []]
5334
5335
5336 class AddUser(Type):
5337 _toSchema = {'password': 'password', 'shared_model_tags': 'shared-model-tags', 'model_access_permission': 'model-access-permission', 'username': 'username', 'display_name': 'display-name'}
5338 _toPy = {'password': 'password', 'display-name': 'display_name', 'shared-model-tags': 'shared_model_tags', 'username': 'username', 'model-access-permission': 'model_access_permission'}
5339 def __init__(self, display_name=None, model_access_permission=None, password=None, shared_model_tags=None, username=None):
5340 '''
5341 display_name : str
5342 model_access_permission : str
5343 password : str
5344 shared_model_tags : typing.Sequence[str]
5345 username : str
5346 '''
5347 self.display_name = display_name
5348 self.model_access_permission = model_access_permission
5349 self.password = password
5350 self.shared_model_tags = shared_model_tags
5351 self.username = username
5352
5353
5354 class AddUserResult(Type):
5355 _toSchema = {'tag': 'tag', 'secret_key': 'secret-key', 'error': 'error'}
5356 _toPy = {'secret-key': 'secret_key', 'tag': 'tag', 'error': 'error'}
5357 def __init__(self, error=None, secret_key=None, tag=None):
5358 '''
5359 error : Error
5360 secret_key : typing.Sequence[int]
5361 tag : str
5362 '''
5363 self.error = Error.from_json(error) if error else None
5364 self.secret_key = secret_key
5365 self.tag = tag
5366
5367
5368 class AddUserResults(Type):
5369 _toSchema = {'results': 'results'}
5370 _toPy = {'results': 'results'}
5371 def __init__(self, results=None):
5372 '''
5373 results : typing.Sequence[~AddUserResult]
5374 '''
5375 self.results = [AddUserResult.from_json(o) for o in results or []]
5376
5377
5378 class AddUsers(Type):
5379 _toSchema = {'users': 'users'}
5380 _toPy = {'users': 'users'}
5381 def __init__(self, users=None):
5382 '''
5383 users : typing.Sequence[~AddUser]
5384 '''
5385 self.users = [AddUser.from_json(o) for o in users or []]
5386
5387
5388 class MacaroonResult(Type):
5389 _toSchema = {'result': 'result', 'error': 'error'}
5390 _toPy = {'result': 'result', 'error': 'error'}
5391 def __init__(self, error=None, result=None):
5392 '''
5393 error : Error
5394 result : Macaroon
5395 '''
5396 self.error = Error.from_json(error) if error else None
5397 self.result = Macaroon.from_json(result) if result else None
5398
5399
5400 class MacaroonResults(Type):
5401 _toSchema = {'results': 'results'}
5402 _toPy = {'results': 'results'}
5403 def __init__(self, results=None):
5404 '''
5405 results : typing.Sequence[~MacaroonResult]
5406 '''
5407 self.results = [MacaroonResult.from_json(o) for o in results or []]
5408
5409
5410 class UserInfo(Type):
5411 _toSchema = {'username': 'username', 'disabled': 'disabled', 'date_created': 'date-created', 'created_by': 'created-by', 'last_connection': 'last-connection', 'display_name': 'display-name'}
5412 _toPy = {'username': 'username', 'display-name': 'display_name', 'disabled': 'disabled', 'last-connection': 'last_connection', 'date-created': 'date_created', 'created-by': 'created_by'}
5413 def __init__(self, created_by=None, date_created=None, disabled=None, display_name=None, last_connection=None, username=None):
5414 '''
5415 created_by : str
5416 date_created : str
5417 disabled : bool
5418 display_name : str
5419 last_connection : str
5420 username : str
5421 '''
5422 self.created_by = created_by
5423 self.date_created = date_created
5424 self.disabled = disabled
5425 self.display_name = display_name
5426 self.last_connection = last_connection
5427 self.username = username
5428
5429
5430 class UserInfoRequest(Type):
5431 _toSchema = {'entities': 'entities', 'include_disabled': 'include-disabled'}
5432 _toPy = {'entities': 'entities', 'include-disabled': 'include_disabled'}
5433 def __init__(self, entities=None, include_disabled=None):
5434 '''
5435 entities : typing.Sequence[~Entity]
5436 include_disabled : bool
5437 '''
5438 self.entities = [Entity.from_json(o) for o in entities or []]
5439 self.include_disabled = include_disabled
5440
5441
5442 class UserInfoResult(Type):
5443 _toSchema = {'result': 'result', 'error': 'error'}
5444 _toPy = {'result': 'result', 'error': 'error'}
5445 def __init__(self, error=None, result=None):
5446 '''
5447 error : Error
5448 result : UserInfo
5449 '''
5450 self.error = Error.from_json(error) if error else None
5451 self.result = UserInfo.from_json(result) if result else None
5452
5453
5454 class UserInfoResults(Type):
5455 _toSchema = {'results': 'results'}
5456 _toPy = {'results': 'results'}
5457 def __init__(self, results=None):
5458 '''
5459 results : typing.Sequence[~UserInfoResult]
5460 '''
5461 self.results = [UserInfoResult.from_json(o) for o in results or []]
5462
5463
5464 class Action(Type):
5465 name = 'Action'
5466 version = 2
5467 schema = {'definitions': {'Action': {'additionalProperties': False,
5468 'properties': {'name': {'type': 'string'},
5469 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
5470 'type': 'object'}},
5471 'type': 'object'},
5472 'receiver': {'type': 'string'},
5473 'tag': {'type': 'string'}},
5474 'required': ['tag', 'receiver', 'name'],
5475 'type': 'object'},
5476 'ActionResult': {'additionalProperties': False,
5477 'properties': {'action': {'$ref': '#/definitions/Action'},
5478 'completed': {'format': 'date-time',
5479 'type': 'string'},
5480 'enqueued': {'format': 'date-time',
5481 'type': 'string'},
5482 'error': {'$ref': '#/definitions/Error'},
5483 'message': {'type': 'string'},
5484 'output': {'patternProperties': {'.*': {'additionalProperties': True,
5485 'type': 'object'}},
5486 'type': 'object'},
5487 'started': {'format': 'date-time',
5488 'type': 'string'},
5489 'status': {'type': 'string'}},
5490 'type': 'object'},
5491 'ActionResults': {'additionalProperties': False,
5492 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
5493 'type': 'array'}},
5494 'type': 'object'},
5495 'ActionSpec': {'additionalProperties': False,
5496 'properties': {'Description': {'type': 'string'},
5497 'Params': {'patternProperties': {'.*': {'additionalProperties': True,
5498 'type': 'object'}},
5499 'type': 'object'}},
5500 'required': ['Description', 'Params'],
5501 'type': 'object'},
5502 'Actions': {'additionalProperties': False,
5503 'properties': {'ActionSpecs': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
5504 'type': 'object'}},
5505 'required': ['ActionSpecs'],
5506 'type': 'object'},
5507 'ActionsByName': {'additionalProperties': False,
5508 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5509 'type': 'array'},
5510 'error': {'$ref': '#/definitions/Error'},
5511 'name': {'type': 'string'}},
5512 'type': 'object'},
5513 'ActionsByNames': {'additionalProperties': False,
5514 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
5515 'type': 'array'}},
5516 'type': 'object'},
5517 'ActionsByReceiver': {'additionalProperties': False,
5518 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5519 'type': 'array'},
5520 'error': {'$ref': '#/definitions/Error'},
5521 'receiver': {'type': 'string'}},
5522 'type': 'object'},
5523 'ActionsByReceivers': {'additionalProperties': False,
5524 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
5525 'type': 'array'}},
5526 'type': 'object'},
5527 'ApplicationCharmActionsResult': {'additionalProperties': False,
5528 'properties': {'ApplicationTag': {'type': 'string'},
5529 'actions': {'$ref': '#/definitions/Actions'},
5530 'error': {'$ref': '#/definitions/Error'}},
5531 'type': 'object'},
5532 'ApplicationsCharmActionsResults': {'additionalProperties': False,
5533 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
5534 'type': 'array'}},
5535 'type': 'object'},
5536 'Entities': {'additionalProperties': False,
5537 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5538 'type': 'array'}},
5539 'required': ['Entities'],
5540 'type': 'object'},
5541 'Entity': {'additionalProperties': False,
5542 'properties': {'Tag': {'type': 'string'}},
5543 'required': ['Tag'],
5544 'type': 'object'},
5545 'Error': {'additionalProperties': False,
5546 'properties': {'Code': {'type': 'string'},
5547 'Info': {'$ref': '#/definitions/ErrorInfo'},
5548 'Message': {'type': 'string'}},
5549 'required': ['Message', 'Code'],
5550 'type': 'object'},
5551 'ErrorInfo': {'additionalProperties': False,
5552 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5553 'MacaroonPath': {'type': 'string'}},
5554 'type': 'object'},
5555 'FindActionsByNames': {'additionalProperties': False,
5556 'properties': {'names': {'items': {'type': 'string'},
5557 'type': 'array'}},
5558 'type': 'object'},
5559 'FindTags': {'additionalProperties': False,
5560 'properties': {'prefixes': {'items': {'type': 'string'},
5561 'type': 'array'}},
5562 'required': ['prefixes'],
5563 'type': 'object'},
5564 'FindTagsResults': {'additionalProperties': False,
5565 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
5566 'type': 'array'}},
5567 'type': 'object'}},
5568 'required': ['matches'],
5569 'type': 'object'},
5570 'Macaroon': {'additionalProperties': False,
5571 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5572 'type': 'array'},
5573 'data': {'items': {'type': 'integer'},
5574 'type': 'array'},
5575 'id': {'$ref': '#/definitions/packet'},
5576 'location': {'$ref': '#/definitions/packet'},
5577 'sig': {'items': {'type': 'integer'},
5578 'type': 'array'}},
5579 'required': ['data',
5580 'location',
5581 'id',
5582 'caveats',
5583 'sig'],
5584 'type': 'object'},
5585 'RunParams': {'additionalProperties': False,
5586 'properties': {'Applications': {'items': {'type': 'string'},
5587 'type': 'array'},
5588 'Commands': {'type': 'string'},
5589 'Machines': {'items': {'type': 'string'},
5590 'type': 'array'},
5591 'Timeout': {'type': 'integer'},
5592 'Units': {'items': {'type': 'string'},
5593 'type': 'array'}},
5594 'required': ['Commands',
5595 'Timeout',
5596 'Machines',
5597 'Applications',
5598 'Units'],
5599 'type': 'object'},
5600 'caveat': {'additionalProperties': False,
5601 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5602 'location': {'$ref': '#/definitions/packet'},
5603 'verificationId': {'$ref': '#/definitions/packet'}},
5604 'required': ['location',
5605 'caveatId',
5606 'verificationId'],
5607 'type': 'object'},
5608 'packet': {'additionalProperties': False,
5609 'properties': {'headerLen': {'type': 'integer'},
5610 'start': {'type': 'integer'},
5611 'totalLen': {'type': 'integer'}},
5612 'required': ['start', 'totalLen', 'headerLen'],
5613 'type': 'object'}},
5614 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5615 'Result': {'$ref': '#/definitions/ActionResults'}},
5616 'type': 'object'},
5617 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5618 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
5619 'type': 'object'},
5620 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5621 'Result': {'$ref': '#/definitions/ActionResults'}},
5622 'type': 'object'},
5623 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
5624 'Result': {'$ref': '#/definitions/ActionResults'}},
5625 'type': 'object'},
5626 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
5627 'Result': {'$ref': '#/definitions/FindTagsResults'}},
5628 'type': 'object'},
5629 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
5630 'Result': {'$ref': '#/definitions/ActionsByNames'}},
5631 'type': 'object'},
5632 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5633 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5634 'type': 'object'},
5635 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5636 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5637 'type': 'object'},
5638 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5639 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5640 'type': 'object'},
5641 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5642 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5643 'type': 'object'},
5644 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
5645 'Result': {'$ref': '#/definitions/ActionResults'}},
5646 'type': 'object'},
5647 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
5648 'Result': {'$ref': '#/definitions/ActionResults'}},
5649 'type': 'object'}},
5650 'type': 'object'}
5651
5652
5653 @ReturnMapping(ActionResults)
5654 async def Actions(self, entities):
5655 '''
5656 entities : typing.Sequence[~Entity]
5657 Returns -> typing.Sequence[~ActionResult]
5658 '''
5659 # map input types to rpc msg
5660 params = dict()
5661 msg = dict(Type='Action', Request='Actions', Version=2, Params=params)
5662 params['Entities'] = entities
5663 reply = await self.rpc(msg)
5664 return reply
5665
5666
5667
5668 @ReturnMapping(ApplicationsCharmActionsResults)
5669 async def ApplicationsCharmsActions(self, entities):
5670 '''
5671 entities : typing.Sequence[~Entity]
5672 Returns -> typing.Sequence[~ApplicationCharmActionsResult]
5673 '''
5674 # map input types to rpc msg
5675 params = dict()
5676 msg = dict(Type='Action', Request='ApplicationsCharmsActions', Version=2, Params=params)
5677 params['Entities'] = entities
5678 reply = await self.rpc(msg)
5679 return reply
5680
5681
5682
5683 @ReturnMapping(ActionResults)
5684 async def Cancel(self, entities):
5685 '''
5686 entities : typing.Sequence[~Entity]
5687 Returns -> typing.Sequence[~ActionResult]
5688 '''
5689 # map input types to rpc msg
5690 params = dict()
5691 msg = dict(Type='Action', Request='Cancel', Version=2, Params=params)
5692 params['Entities'] = entities
5693 reply = await self.rpc(msg)
5694 return reply
5695
5696
5697
5698 @ReturnMapping(ActionResults)
5699 async def Enqueue(self, actionspecs):
5700 '''
5701 actionspecs : typing.Mapping[str, ~ActionSpec]
5702 Returns -> typing.Sequence[~ActionResult]
5703 '''
5704 # map input types to rpc msg
5705 params = dict()
5706 msg = dict(Type='Action', Request='Enqueue', Version=2, Params=params)
5707 params['ActionSpecs'] = actionspecs
5708 reply = await self.rpc(msg)
5709 return reply
5710
5711
5712
5713 @ReturnMapping(FindTagsResults)
5714 async def FindActionTagsByPrefix(self, prefixes):
5715 '''
5716 prefixes : typing.Sequence[str]
5717 Returns -> typing.Sequence[~Entity]
5718 '''
5719 # map input types to rpc msg
5720 params = dict()
5721 msg = dict(Type='Action', Request='FindActionTagsByPrefix', Version=2, Params=params)
5722 params['prefixes'] = prefixes
5723 reply = await self.rpc(msg)
5724 return reply
5725
5726
5727
5728 @ReturnMapping(ActionsByNames)
5729 async def FindActionsByNames(self, names):
5730 '''
5731 names : typing.Sequence[str]
5732 Returns -> typing.Sequence[~ActionsByName]
5733 '''
5734 # map input types to rpc msg
5735 params = dict()
5736 msg = dict(Type='Action', Request='FindActionsByNames', Version=2, Params=params)
5737 params['names'] = names
5738 reply = await self.rpc(msg)
5739 return reply
5740
5741
5742
5743 @ReturnMapping(ActionsByReceivers)
5744 async def ListAll(self, entities):
5745 '''
5746 entities : typing.Sequence[~Entity]
5747 Returns -> typing.Sequence[~ActionsByReceiver]
5748 '''
5749 # map input types to rpc msg
5750 params = dict()
5751 msg = dict(Type='Action', Request='ListAll', Version=2, Params=params)
5752 params['Entities'] = entities
5753 reply = await self.rpc(msg)
5754 return reply
5755
5756
5757
5758 @ReturnMapping(ActionsByReceivers)
5759 async def ListCompleted(self, entities):
5760 '''
5761 entities : typing.Sequence[~Entity]
5762 Returns -> typing.Sequence[~ActionsByReceiver]
5763 '''
5764 # map input types to rpc msg
5765 params = dict()
5766 msg = dict(Type='Action', Request='ListCompleted', Version=2, Params=params)
5767 params['Entities'] = entities
5768 reply = await self.rpc(msg)
5769 return reply
5770
5771
5772
5773 @ReturnMapping(ActionsByReceivers)
5774 async def ListPending(self, entities):
5775 '''
5776 entities : typing.Sequence[~Entity]
5777 Returns -> typing.Sequence[~ActionsByReceiver]
5778 '''
5779 # map input types to rpc msg
5780 params = dict()
5781 msg = dict(Type='Action', Request='ListPending', Version=2, Params=params)
5782 params['Entities'] = entities
5783 reply = await self.rpc(msg)
5784 return reply
5785
5786
5787
5788 @ReturnMapping(ActionsByReceivers)
5789 async def ListRunning(self, entities):
5790 '''
5791 entities : typing.Sequence[~Entity]
5792 Returns -> typing.Sequence[~ActionsByReceiver]
5793 '''
5794 # map input types to rpc msg
5795 params = dict()
5796 msg = dict(Type='Action', Request='ListRunning', Version=2, Params=params)
5797 params['Entities'] = entities
5798 reply = await self.rpc(msg)
5799 return reply
5800
5801
5802
5803 @ReturnMapping(ActionResults)
5804 async def Run(self, applications, commands, machines, timeout, units):
5805 '''
5806 applications : typing.Sequence[str]
5807 commands : str
5808 machines : typing.Sequence[str]
5809 timeout : int
5810 units : typing.Sequence[str]
5811 Returns -> typing.Sequence[~ActionResult]
5812 '''
5813 # map input types to rpc msg
5814 params = dict()
5815 msg = dict(Type='Action', Request='Run', Version=2, Params=params)
5816 params['Applications'] = applications
5817 params['Commands'] = commands
5818 params['Machines'] = machines
5819 params['Timeout'] = timeout
5820 params['Units'] = units
5821 reply = await self.rpc(msg)
5822 return reply
5823
5824
5825
5826 @ReturnMapping(ActionResults)
5827 async def RunOnAllMachines(self, applications, commands, machines, timeout, units):
5828 '''
5829 applications : typing.Sequence[str]
5830 commands : str
5831 machines : typing.Sequence[str]
5832 timeout : int
5833 units : typing.Sequence[str]
5834 Returns -> typing.Sequence[~ActionResult]
5835 '''
5836 # map input types to rpc msg
5837 params = dict()
5838 msg = dict(Type='Action', Request='RunOnAllMachines', Version=2, Params=params)
5839 params['Applications'] = applications
5840 params['Commands'] = commands
5841 params['Machines'] = machines
5842 params['Timeout'] = timeout
5843 params['Units'] = units
5844 reply = await self.rpc(msg)
5845 return reply
5846
5847
5848 class Addresser(Type):
5849 name = 'Addresser'
5850 version = 2
5851 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
5852 'properties': {'Error': {'$ref': '#/definitions/Error'},
5853 'Result': {'type': 'boolean'}},
5854 'required': ['Error', 'Result'],
5855 'type': 'object'},
5856 'EntitiesWatchResult': {'additionalProperties': False,
5857 'properties': {'Changes': {'items': {'type': 'string'},
5858 'type': 'array'},
5859 'EntityWatcherId': {'type': 'string'},
5860 'Error': {'$ref': '#/definitions/Error'}},
5861 'required': ['EntityWatcherId',
5862 'Changes',
5863 'Error'],
5864 'type': 'object'},
5865 'Error': {'additionalProperties': False,
5866 'properties': {'Code': {'type': 'string'},
5867 'Info': {'$ref': '#/definitions/ErrorInfo'},
5868 'Message': {'type': 'string'}},
5869 'required': ['Message', 'Code'],
5870 'type': 'object'},
5871 'ErrorInfo': {'additionalProperties': False,
5872 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5873 'MacaroonPath': {'type': 'string'}},
5874 'type': 'object'},
5875 'ErrorResult': {'additionalProperties': False,
5876 'properties': {'Error': {'$ref': '#/definitions/Error'}},
5877 'required': ['Error'],
5878 'type': 'object'},
5879 'Macaroon': {'additionalProperties': False,
5880 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5881 'type': 'array'},
5882 'data': {'items': {'type': 'integer'},
5883 'type': 'array'},
5884 'id': {'$ref': '#/definitions/packet'},
5885 'location': {'$ref': '#/definitions/packet'},
5886 'sig': {'items': {'type': 'integer'},
5887 'type': 'array'}},
5888 'required': ['data',
5889 'location',
5890 'id',
5891 'caveats',
5892 'sig'],
5893 'type': 'object'},
5894 'caveat': {'additionalProperties': False,
5895 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5896 'location': {'$ref': '#/definitions/packet'},
5897 'verificationId': {'$ref': '#/definitions/packet'}},
5898 'required': ['location',
5899 'caveatId',
5900 'verificationId'],
5901 'type': 'object'},
5902 'packet': {'additionalProperties': False,
5903 'properties': {'headerLen': {'type': 'integer'},
5904 'start': {'type': 'integer'},
5905 'totalLen': {'type': 'integer'}},
5906 'required': ['start', 'totalLen', 'headerLen'],
5907 'type': 'object'}},
5908 'properties': {'CanDeallocateAddresses': {'properties': {'Result': {'$ref': '#/definitions/BoolResult'}},
5909 'type': 'object'},
5910 'CleanupIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
5911 'type': 'object'},
5912 'WatchIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
5913 'type': 'object'}},
5914 'type': 'object'}
5915
5916
5917 @ReturnMapping(BoolResult)
5918 async def CanDeallocateAddresses(self):
5919 '''
5920
5921 Returns -> typing.Union[_ForwardRef('Error'), bool]
5922 '''
5923 # map input types to rpc msg
5924 params = dict()
5925 msg = dict(Type='Addresser', Request='CanDeallocateAddresses', Version=2, Params=params)
5926
5927 reply = await self.rpc(msg)
5928 return reply
5929
5930
5931
5932 @ReturnMapping(ErrorResult)
5933 async def CleanupIPAddresses(self):
5934 '''
5935
5936 Returns -> Error
5937 '''
5938 # map input types to rpc msg
5939 params = dict()
5940 msg = dict(Type='Addresser', Request='CleanupIPAddresses', Version=2, Params=params)
5941
5942 reply = await self.rpc(msg)
5943 return reply
5944
5945
5946
5947 @ReturnMapping(EntitiesWatchResult)
5948 async def WatchIPAddresses(self):
5949 '''
5950
5951 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
5952 '''
5953 # map input types to rpc msg
5954 params = dict()
5955 msg = dict(Type='Addresser', Request='WatchIPAddresses', Version=2, Params=params)
5956
5957 reply = await self.rpc(msg)
5958 return reply
5959
5960
5961 class Agent(Type):
5962 name = 'Agent'
5963 version = 2
5964 schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
5965 'properties': {'ContainerType': {'type': 'string'},
5966 'Error': {'$ref': '#/definitions/Error'},
5967 'Jobs': {'items': {'type': 'string'},
5968 'type': 'array'},
5969 'Life': {'type': 'string'}},
5970 'required': ['Life',
5971 'Jobs',
5972 'ContainerType',
5973 'Error'],
5974 'type': 'object'},
5975 'AgentGetEntitiesResults': {'additionalProperties': False,
5976 'properties': {'Entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
5977 'type': 'array'}},
5978 'required': ['Entities'],
5979 'type': 'object'},
5980 'Entities': {'additionalProperties': False,
5981 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5982 'type': 'array'}},
5983 'required': ['Entities'],
5984 'type': 'object'},
5985 'Entity': {'additionalProperties': False,
5986 'properties': {'Tag': {'type': 'string'}},
5987 'required': ['Tag'],
5988 'type': 'object'},
5989 'EntityPassword': {'additionalProperties': False,
5990 'properties': {'Password': {'type': 'string'},
5991 'Tag': {'type': 'string'}},
5992 'required': ['Tag', 'Password'],
5993 'type': 'object'},
5994 'EntityPasswords': {'additionalProperties': False,
5995 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
5996 'type': 'array'}},
5997 'required': ['Changes'],
5998 'type': 'object'},
5999 'Error': {'additionalProperties': False,
6000 'properties': {'Code': {'type': 'string'},
6001 'Info': {'$ref': '#/definitions/ErrorInfo'},
6002 'Message': {'type': 'string'}},
6003 'required': ['Message', 'Code'],
6004 'type': 'object'},
6005 'ErrorInfo': {'additionalProperties': False,
6006 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6007 'MacaroonPath': {'type': 'string'}},
6008 'type': 'object'},
6009 'ErrorResult': {'additionalProperties': False,
6010 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6011 'required': ['Error'],
6012 'type': 'object'},
6013 'ErrorResults': {'additionalProperties': False,
6014 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6015 'type': 'array'}},
6016 'required': ['Results'],
6017 'type': 'object'},
6018 'IsMasterResult': {'additionalProperties': False,
6019 'properties': {'Master': {'type': 'boolean'}},
6020 'required': ['Master'],
6021 'type': 'object'},
6022 'Macaroon': {'additionalProperties': False,
6023 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6024 'type': 'array'},
6025 'data': {'items': {'type': 'integer'},
6026 'type': 'array'},
6027 'id': {'$ref': '#/definitions/packet'},
6028 'location': {'$ref': '#/definitions/packet'},
6029 'sig': {'items': {'type': 'integer'},
6030 'type': 'array'}},
6031 'required': ['data',
6032 'location',
6033 'id',
6034 'caveats',
6035 'sig'],
6036 'type': 'object'},
6037 'ModelConfigResult': {'additionalProperties': False,
6038 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
6039 'type': 'object'}},
6040 'type': 'object'}},
6041 'required': ['Config'],
6042 'type': 'object'},
6043 'NotifyWatchResult': {'additionalProperties': False,
6044 'properties': {'Error': {'$ref': '#/definitions/Error'},
6045 'NotifyWatcherId': {'type': 'string'}},
6046 'required': ['NotifyWatcherId', 'Error'],
6047 'type': 'object'},
6048 'StateServingInfo': {'additionalProperties': False,
6049 'properties': {'APIPort': {'type': 'integer'},
6050 'CAPrivateKey': {'type': 'string'},
6051 'Cert': {'type': 'string'},
6052 'PrivateKey': {'type': 'string'},
6053 'SharedSecret': {'type': 'string'},
6054 'StatePort': {'type': 'integer'},
6055 'SystemIdentity': {'type': 'string'}},
6056 'required': ['APIPort',
6057 'StatePort',
6058 'Cert',
6059 'PrivateKey',
6060 'CAPrivateKey',
6061 'SharedSecret',
6062 'SystemIdentity'],
6063 'type': 'object'},
6064 'caveat': {'additionalProperties': False,
6065 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6066 'location': {'$ref': '#/definitions/packet'},
6067 'verificationId': {'$ref': '#/definitions/packet'}},
6068 'required': ['location',
6069 'caveatId',
6070 'verificationId'],
6071 'type': 'object'},
6072 'packet': {'additionalProperties': False,
6073 'properties': {'headerLen': {'type': 'integer'},
6074 'start': {'type': 'integer'},
6075 'totalLen': {'type': 'integer'}},
6076 'required': ['start', 'totalLen', 'headerLen'],
6077 'type': 'object'}},
6078 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6079 'Result': {'$ref': '#/definitions/ErrorResults'}},
6080 'type': 'object'},
6081 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6082 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
6083 'type': 'object'},
6084 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
6085 'type': 'object'},
6086 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6087 'type': 'object'},
6088 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6089 'Result': {'$ref': '#/definitions/ErrorResults'}},
6090 'type': 'object'},
6091 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
6092 'type': 'object'},
6093 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6094 'type': 'object'}},
6095 'type': 'object'}
6096
6097
6098 @ReturnMapping(ErrorResults)
6099 async def ClearReboot(self, entities):
6100 '''
6101 entities : typing.Sequence[~Entity]
6102 Returns -> typing.Sequence[~ErrorResult]
6103 '''
6104 # map input types to rpc msg
6105 params = dict()
6106 msg = dict(Type='Agent', Request='ClearReboot', Version=2, Params=params)
6107 params['Entities'] = entities
6108 reply = await self.rpc(msg)
6109 return reply
6110
6111
6112
6113 @ReturnMapping(AgentGetEntitiesResults)
6114 async def GetEntities(self, entities):
6115 '''
6116 entities : typing.Sequence[~Entity]
6117 Returns -> typing.Sequence[~AgentGetEntitiesResult]
6118 '''
6119 # map input types to rpc msg
6120 params = dict()
6121 msg = dict(Type='Agent', Request='GetEntities', Version=2, Params=params)
6122 params['Entities'] = entities
6123 reply = await self.rpc(msg)
6124 return reply
6125
6126
6127
6128 @ReturnMapping(IsMasterResult)
6129 async def IsMaster(self):
6130 '''
6131
6132 Returns -> bool
6133 '''
6134 # map input types to rpc msg
6135 params = dict()
6136 msg = dict(Type='Agent', Request='IsMaster', Version=2, Params=params)
6137
6138 reply = await self.rpc(msg)
6139 return reply
6140
6141
6142
6143 @ReturnMapping(ModelConfigResult)
6144 async def ModelConfig(self):
6145 '''
6146
6147 Returns -> typing.Mapping[str, typing.Any]
6148 '''
6149 # map input types to rpc msg
6150 params = dict()
6151 msg = dict(Type='Agent', Request='ModelConfig', Version=2, Params=params)
6152
6153 reply = await self.rpc(msg)
6154 return reply
6155
6156
6157
6158 @ReturnMapping(ErrorResults)
6159 async def SetPasswords(self, changes):
6160 '''
6161 changes : typing.Sequence[~EntityPassword]
6162 Returns -> typing.Sequence[~ErrorResult]
6163 '''
6164 # map input types to rpc msg
6165 params = dict()
6166 msg = dict(Type='Agent', Request='SetPasswords', Version=2, Params=params)
6167 params['Changes'] = changes
6168 reply = await self.rpc(msg)
6169 return reply
6170
6171
6172
6173 @ReturnMapping(StateServingInfo)
6174 async def StateServingInfo(self):
6175 '''
6176
6177 Returns -> typing.Union[int, str]
6178 '''
6179 # map input types to rpc msg
6180 params = dict()
6181 msg = dict(Type='Agent', Request='StateServingInfo', Version=2, Params=params)
6182
6183 reply = await self.rpc(msg)
6184 return reply
6185
6186
6187
6188 @ReturnMapping(NotifyWatchResult)
6189 async def WatchForModelConfigChanges(self):
6190 '''
6191
6192 Returns -> typing.Union[_ForwardRef('Error'), str]
6193 '''
6194 # map input types to rpc msg
6195 params = dict()
6196 msg = dict(Type='Agent', Request='WatchForModelConfigChanges', Version=2, Params=params)
6197
6198 reply = await self.rpc(msg)
6199 return reply
6200
6201
6202 class AgentTools(Type):
6203 name = 'AgentTools'
6204 version = 1
6205 schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
6206
6207
6208 @ReturnMapping(None)
6209 async def UpdateToolsAvailable(self):
6210 '''
6211
6212 Returns -> None
6213 '''
6214 # map input types to rpc msg
6215 params = dict()
6216 msg = dict(Type='AgentTools', Request='UpdateToolsAvailable', Version=1, Params=params)
6217
6218 reply = await self.rpc(msg)
6219 return reply
6220
6221
6222 class AllModelWatcher(Type):
6223 name = 'AllModelWatcher'
6224 version = 2
6225 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6226 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
6227 'type': 'array'}},
6228 'required': ['Deltas'],
6229 'type': 'object'},
6230 'Delta': {'additionalProperties': False,
6231 'properties': {'Entity': {'additionalProperties': True,
6232 'type': 'object'},
6233 'Removed': {'type': 'boolean'}},
6234 'required': ['Removed', 'Entity'],
6235 'type': 'object'}},
6236 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6237 'type': 'object'},
6238 'Stop': {'type': 'object'}},
6239 'type': 'object'}
6240
6241
6242 @ReturnMapping(AllWatcherNextResults)
6243 async def Next(self):
6244 '''
6245
6246 Returns -> typing.Sequence[~Delta]
6247 '''
6248 # map input types to rpc msg
6249 params = dict()
6250 msg = dict(Type='AllModelWatcher', Request='Next', Version=2, Params=params)
6251
6252 reply = await self.rpc(msg)
6253 return reply
6254
6255
6256
6257 @ReturnMapping(None)
6258 async def Stop(self):
6259 '''
6260
6261 Returns -> None
6262 '''
6263 # map input types to rpc msg
6264 params = dict()
6265 msg = dict(Type='AllModelWatcher', Request='Stop', Version=2, Params=params)
6266
6267 reply = await self.rpc(msg)
6268 return reply
6269
6270
6271 class AllWatcher(Type):
6272 name = 'AllWatcher'
6273 version = 1
6274 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6275 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
6276 'type': 'array'}},
6277 'required': ['Deltas'],
6278 'type': 'object'},
6279 'Delta': {'additionalProperties': False,
6280 'properties': {'Entity': {'additionalProperties': True,
6281 'type': 'object'},
6282 'Removed': {'type': 'boolean'}},
6283 'required': ['Removed', 'Entity'],
6284 'type': 'object'}},
6285 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6286 'type': 'object'},
6287 'Stop': {'type': 'object'}},
6288 'type': 'object'}
6289
6290
6291 @ReturnMapping(AllWatcherNextResults)
6292 async def Next(self):
6293 '''
6294
6295 Returns -> typing.Sequence[~Delta]
6296 '''
6297 # map input types to rpc msg
6298 params = dict()
6299 msg = dict(Type='AllWatcher', Request='Next', Version=1, Params=params)
6300
6301 reply = await self.rpc(msg)
6302 return reply
6303
6304
6305
6306 @ReturnMapping(None)
6307 async def Stop(self):
6308 '''
6309
6310 Returns -> None
6311 '''
6312 # map input types to rpc msg
6313 params = dict()
6314 msg = dict(Type='AllWatcher', Request='Stop', Version=1, Params=params)
6315
6316 reply = await self.rpc(msg)
6317 return reply
6318
6319
6320 class Annotations(Type):
6321 name = 'Annotations'
6322 version = 2
6323 schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
6324 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
6325 'type': 'object'},
6326 'EntityTag': {'type': 'string'},
6327 'Error': {'$ref': '#/definitions/ErrorResult'}},
6328 'required': ['EntityTag',
6329 'Annotations',
6330 'Error'],
6331 'type': 'object'},
6332 'AnnotationsGetResults': {'additionalProperties': False,
6333 'properties': {'Results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
6334 'type': 'array'}},
6335 'required': ['Results'],
6336 'type': 'object'},
6337 'AnnotationsSet': {'additionalProperties': False,
6338 'properties': {'Annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
6339 'type': 'array'}},
6340 'required': ['Annotations'],
6341 'type': 'object'},
6342 'Entities': {'additionalProperties': False,
6343 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
6344 'type': 'array'}},
6345 'required': ['Entities'],
6346 'type': 'object'},
6347 'Entity': {'additionalProperties': False,
6348 'properties': {'Tag': {'type': 'string'}},
6349 'required': ['Tag'],
6350 'type': 'object'},
6351 'EntityAnnotations': {'additionalProperties': False,
6352 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
6353 'type': 'object'},
6354 'EntityTag': {'type': 'string'}},
6355 'required': ['EntityTag', 'Annotations'],
6356 'type': 'object'},
6357 'Error': {'additionalProperties': False,
6358 'properties': {'Code': {'type': 'string'},
6359 'Info': {'$ref': '#/definitions/ErrorInfo'},
6360 'Message': {'type': 'string'}},
6361 'required': ['Message', 'Code'],
6362 'type': 'object'},
6363 'ErrorInfo': {'additionalProperties': False,
6364 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6365 'MacaroonPath': {'type': 'string'}},
6366 'type': 'object'},
6367 'ErrorResult': {'additionalProperties': False,
6368 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6369 'required': ['Error'],
6370 'type': 'object'},
6371 'ErrorResults': {'additionalProperties': False,
6372 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6373 'type': 'array'}},
6374 'required': ['Results'],
6375 'type': 'object'},
6376 'Macaroon': {'additionalProperties': False,
6377 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6378 'type': 'array'},
6379 'data': {'items': {'type': 'integer'},
6380 'type': 'array'},
6381 'id': {'$ref': '#/definitions/packet'},
6382 'location': {'$ref': '#/definitions/packet'},
6383 'sig': {'items': {'type': 'integer'},
6384 'type': 'array'}},
6385 'required': ['data',
6386 'location',
6387 'id',
6388 'caveats',
6389 'sig'],
6390 'type': 'object'},
6391 'caveat': {'additionalProperties': False,
6392 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6393 'location': {'$ref': '#/definitions/packet'},
6394 'verificationId': {'$ref': '#/definitions/packet'}},
6395 'required': ['location',
6396 'caveatId',
6397 'verificationId'],
6398 'type': 'object'},
6399 'packet': {'additionalProperties': False,
6400 'properties': {'headerLen': {'type': 'integer'},
6401 'start': {'type': 'integer'},
6402 'totalLen': {'type': 'integer'}},
6403 'required': ['start', 'totalLen', 'headerLen'],
6404 'type': 'object'}},
6405 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6406 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
6407 'type': 'object'},
6408 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
6409 'Result': {'$ref': '#/definitions/ErrorResults'}},
6410 'type': 'object'}},
6411 'type': 'object'}
6412
6413
6414 @ReturnMapping(AnnotationsGetResults)
6415 async def Get(self, entities):
6416 '''
6417 entities : typing.Sequence[~Entity]
6418 Returns -> typing.Sequence[~AnnotationsGetResult]
6419 '''
6420 # map input types to rpc msg
6421 params = dict()
6422 msg = dict(Type='Annotations', Request='Get', Version=2, Params=params)
6423 params['Entities'] = entities
6424 reply = await self.rpc(msg)
6425 return reply
6426
6427
6428
6429 @ReturnMapping(ErrorResults)
6430 async def Set(self, annotations):
6431 '''
6432 annotations : typing.Sequence[~EntityAnnotations]
6433 Returns -> typing.Sequence[~ErrorResult]
6434 '''
6435 # map input types to rpc msg
6436 params = dict()
6437 msg = dict(Type='Annotations', Request='Set', Version=2, Params=params)
6438 params['Annotations'] = annotations
6439 reply = await self.rpc(msg)
6440 return reply
6441
6442
6443 class Application(Type):
6444 name = 'Application'
6445 version = 1
6446 schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
6447 'properties': {'ApplicationName': {'type': 'string'},
6448 'NumUnits': {'type': 'integer'},
6449 'Placement': {'items': {'$ref': '#/definitions/Placement'},
6450 'type': 'array'}},
6451 'required': ['ApplicationName',
6452 'NumUnits',
6453 'Placement'],
6454 'type': 'object'},
6455 'AddApplicationUnitsResults': {'additionalProperties': False,
6456 'properties': {'Units': {'items': {'type': 'string'},
6457 'type': 'array'}},
6458 'required': ['Units'],
6459 'type': 'object'},
6460 'AddRelation': {'additionalProperties': False,
6461 'properties': {'Endpoints': {'items': {'type': 'string'},
6462 'type': 'array'}},
6463 'required': ['Endpoints'],
6464 'type': 'object'},
6465 'AddRelationResults': {'additionalProperties': False,
6466 'properties': {'Endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/Relation'}},
6467 'type': 'object'}},
6468 'required': ['Endpoints'],
6469 'type': 'object'},
6470 'ApplicationCharmRelations': {'additionalProperties': False,
6471 'properties': {'ApplicationName': {'type': 'string'}},
6472 'required': ['ApplicationName'],
6473 'type': 'object'},
6474 'ApplicationCharmRelationsResults': {'additionalProperties': False,
6475 'properties': {'CharmRelations': {'items': {'type': 'string'},
6476 'type': 'array'}},
6477 'required': ['CharmRelations'],
6478 'type': 'object'},
6479 'ApplicationDeploy': {'additionalProperties': False,
6480 'properties': {'ApplicationName': {'type': 'string'},
6481 'Channel': {'type': 'string'},
6482 'CharmUrl': {'type': 'string'},
6483 'Config': {'patternProperties': {'.*': {'type': 'string'}},
6484 'type': 'object'},
6485 'ConfigYAML': {'type': 'string'},
6486 'Constraints': {'$ref': '#/definitions/Value'},
6487 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
6488 'type': 'object'},
6489 'NumUnits': {'type': 'integer'},
6490 'Placement': {'items': {'$ref': '#/definitions/Placement'},
6491 'type': 'array'},
6492 'Resources': {'patternProperties': {'.*': {'type': 'string'}},
6493 'type': 'object'},
6494 'Series': {'type': 'string'},
6495 'Storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
6496 'type': 'object'}},
6497 'required': ['ApplicationName',
6498 'Series',
6499 'CharmUrl',
6500 'Channel',
6501 'NumUnits',
6502 'Config',
6503 'ConfigYAML',
6504 'Constraints',
6505 'Placement',
6506 'Storage',
6507 'EndpointBindings',
6508 'Resources'],
6509 'type': 'object'},
6510 'ApplicationDestroy': {'additionalProperties': False,
6511 'properties': {'ApplicationName': {'type': 'string'}},
6512 'required': ['ApplicationName'],
6513 'type': 'object'},
6514 'ApplicationExpose': {'additionalProperties': False,
6515 'properties': {'ApplicationName': {'type': 'string'}},
6516 'required': ['ApplicationName'],
6517 'type': 'object'},
6518 'ApplicationGet': {'additionalProperties': False,
6519 'properties': {'ApplicationName': {'type': 'string'}},
6520 'required': ['ApplicationName'],
6521 'type': 'object'},
6522 'ApplicationGetResults': {'additionalProperties': False,
6523 'properties': {'Application': {'type': 'string'},
6524 'Charm': {'type': 'string'},
6525 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
6526 'type': 'object'}},
6527 'type': 'object'},
6528 'Constraints': {'$ref': '#/definitions/Value'}},
6529 'required': ['Application',
6530 'Charm',
6531 'Config',
6532 'Constraints'],
6533 'type': 'object'},
6534 'ApplicationMetricCredential': {'additionalProperties': False,
6535 'properties': {'ApplicationName': {'type': 'string'},
6536 'MetricCredentials': {'items': {'type': 'integer'},
6537 'type': 'array'}},
6538 'required': ['ApplicationName',
6539 'MetricCredentials'],
6540 'type': 'object'},
6541 'ApplicationMetricCredentials': {'additionalProperties': False,
6542 'properties': {'Creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
6543 'type': 'array'}},
6544 'required': ['Creds'],
6545 'type': 'object'},
6546 'ApplicationSet': {'additionalProperties': False,
6547 'properties': {'ApplicationName': {'type': 'string'},
6548 'Options': {'patternProperties': {'.*': {'type': 'string'}},
6549 'type': 'object'}},
6550 'required': ['ApplicationName', 'Options'],
6551 'type': 'object'},
6552 'ApplicationSetCharm': {'additionalProperties': False,
6553 'properties': {'applicationname': {'type': 'string'},
6554 'charmurl': {'type': 'string'},
6555 'cs-channel': {'type': 'string'},
6556 'forceseries': {'type': 'boolean'},
6557 'forceunits': {'type': 'boolean'},
6558 'resourceids': {'patternProperties': {'.*': {'type': 'string'}},
6559 'type': 'object'}},
6560 'required': ['applicationname',
6561 'charmurl',
6562 'cs-channel',
6563 'forceunits',
6564 'forceseries',
6565 'resourceids'],
6566 'type': 'object'},
6567 'ApplicationUnexpose': {'additionalProperties': False,
6568 'properties': {'ApplicationName': {'type': 'string'}},
6569 'required': ['ApplicationName'],
6570 'type': 'object'},
6571 'ApplicationUnset': {'additionalProperties': False,
6572 'properties': {'ApplicationName': {'type': 'string'},
6573 'Options': {'items': {'type': 'string'},
6574 'type': 'array'}},
6575 'required': ['ApplicationName',
6576 'Options'],
6577 'type': 'object'},
6578 'ApplicationUpdate': {'additionalProperties': False,
6579 'properties': {'ApplicationName': {'type': 'string'},
6580 'CharmUrl': {'type': 'string'},
6581 'Constraints': {'$ref': '#/definitions/Value'},
6582 'ForceCharmUrl': {'type': 'boolean'},
6583 'ForceSeries': {'type': 'boolean'},
6584 'MinUnits': {'type': 'integer'},
6585 'SettingsStrings': {'patternProperties': {'.*': {'type': 'string'}},
6586 'type': 'object'},
6587 'SettingsYAML': {'type': 'string'}},
6588 'required': ['ApplicationName',
6589 'CharmUrl',
6590 'ForceCharmUrl',
6591 'ForceSeries',
6592 'MinUnits',
6593 'SettingsStrings',
6594 'SettingsYAML',
6595 'Constraints'],
6596 'type': 'object'},
6597 'ApplicationsDeploy': {'additionalProperties': False,
6598 'properties': {'Applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
6599 'type': 'array'}},
6600 'required': ['Applications'],
6601 'type': 'object'},
6602 'Constraints': {'additionalProperties': False,
6603 'properties': {'Count': {'type': 'integer'},
6604 'Pool': {'type': 'string'},
6605 'Size': {'type': 'integer'}},
6606 'required': ['Pool', 'Size', 'Count'],
6607 'type': 'object'},
6608 'DestroyApplicationUnits': {'additionalProperties': False,
6609 'properties': {'UnitNames': {'items': {'type': 'string'},
6610 'type': 'array'}},
6611 'required': ['UnitNames'],
6612 'type': 'object'},
6613 'DestroyRelation': {'additionalProperties': False,
6614 'properties': {'Endpoints': {'items': {'type': 'string'},
6615 'type': 'array'}},
6616 'required': ['Endpoints'],
6617 'type': 'object'},
6618 'Error': {'additionalProperties': False,
6619 'properties': {'Code': {'type': 'string'},
6620 'Info': {'$ref': '#/definitions/ErrorInfo'},
6621 'Message': {'type': 'string'}},
6622 'required': ['Message', 'Code'],
6623 'type': 'object'},
6624 'ErrorInfo': {'additionalProperties': False,
6625 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6626 'MacaroonPath': {'type': 'string'}},
6627 'type': 'object'},
6628 'ErrorResult': {'additionalProperties': False,
6629 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6630 'required': ['Error'],
6631 'type': 'object'},
6632 'ErrorResults': {'additionalProperties': False,
6633 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6634 'type': 'array'}},
6635 'required': ['Results'],
6636 'type': 'object'},
6637 'GetApplicationConstraints': {'additionalProperties': False,
6638 'properties': {'ApplicationName': {'type': 'string'}},
6639 'required': ['ApplicationName'],
6640 'type': 'object'},
6641 'GetConstraintsResults': {'additionalProperties': False,
6642 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
6643 'required': ['Constraints'],
6644 'type': 'object'},
6645 'Macaroon': {'additionalProperties': False,
6646 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6647 'type': 'array'},
6648 'data': {'items': {'type': 'integer'},
6649 'type': 'array'},
6650 'id': {'$ref': '#/definitions/packet'},
6651 'location': {'$ref': '#/definitions/packet'},
6652 'sig': {'items': {'type': 'integer'},
6653 'type': 'array'}},
6654 'required': ['data',
6655 'location',
6656 'id',
6657 'caveats',
6658 'sig'],
6659 'type': 'object'},
6660 'Placement': {'additionalProperties': False,
6661 'properties': {'Directive': {'type': 'string'},
6662 'Scope': {'type': 'string'}},
6663 'required': ['Scope', 'Directive'],
6664 'type': 'object'},
6665 'Relation': {'additionalProperties': False,
6666 'properties': {'Interface': {'type': 'string'},
6667 'Limit': {'type': 'integer'},
6668 'Name': {'type': 'string'},
6669 'Optional': {'type': 'boolean'},
6670 'Role': {'type': 'string'},
6671 'Scope': {'type': 'string'}},
6672 'required': ['Name',
6673 'Role',
6674 'Interface',
6675 'Optional',
6676 'Limit',
6677 'Scope'],
6678 'type': 'object'},
6679 'SetConstraints': {'additionalProperties': False,
6680 'properties': {'ApplicationName': {'type': 'string'},
6681 'Constraints': {'$ref': '#/definitions/Value'}},
6682 'required': ['ApplicationName',
6683 'Constraints'],
6684 'type': 'object'},
6685 'StringResult': {'additionalProperties': False,
6686 'properties': {'Error': {'$ref': '#/definitions/Error'},
6687 'Result': {'type': 'string'}},
6688 'required': ['Error', 'Result'],
6689 'type': 'object'},
6690 'Value': {'additionalProperties': False,
6691 'properties': {'arch': {'type': 'string'},
6692 'container': {'type': 'string'},
6693 'cpu-cores': {'type': 'integer'},
6694 'cpu-power': {'type': 'integer'},
6695 'instance-type': {'type': 'string'},
6696 'mem': {'type': 'integer'},
6697 'root-disk': {'type': 'integer'},
6698 'spaces': {'items': {'type': 'string'},
6699 'type': 'array'},
6700 'tags': {'items': {'type': 'string'},
6701 'type': 'array'},
6702 'virt-type': {'type': 'string'}},
6703 'type': 'object'},
6704 'caveat': {'additionalProperties': False,
6705 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6706 'location': {'$ref': '#/definitions/packet'},
6707 'verificationId': {'$ref': '#/definitions/packet'}},
6708 'required': ['location',
6709 'caveatId',
6710 'verificationId'],
6711 'type': 'object'},
6712 'packet': {'additionalProperties': False,
6713 'properties': {'headerLen': {'type': 'integer'},
6714 'start': {'type': 'integer'},
6715 'totalLen': {'type': 'integer'}},
6716 'required': ['start', 'totalLen', 'headerLen'],
6717 'type': 'object'}},
6718 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
6719 'Result': {'$ref': '#/definitions/AddRelationResults'}},
6720 'type': 'object'},
6721 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
6722 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
6723 'type': 'object'},
6724 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
6725 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
6726 'type': 'object'},
6727 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
6728 'Result': {'$ref': '#/definitions/ErrorResults'}},
6729 'type': 'object'},
6730 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
6731 'type': 'object'},
6732 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
6733 'type': 'object'},
6734 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
6735 'type': 'object'},
6736 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
6737 'type': 'object'},
6738 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
6739 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
6740 'type': 'object'},
6741 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
6742 'Result': {'$ref': '#/definitions/StringResult'}},
6743 'type': 'object'},
6744 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
6745 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
6746 'type': 'object'},
6747 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
6748 'type': 'object'},
6749 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
6750 'type': 'object'},
6751 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
6752 'type': 'object'},
6753 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
6754 'Result': {'$ref': '#/definitions/ErrorResults'}},
6755 'type': 'object'},
6756 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
6757 'type': 'object'},
6758 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
6759 'type': 'object'},
6760 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
6761 'type': 'object'}},
6762 'type': 'object'}
6763
6764
6765 @ReturnMapping(AddRelationResults)
6766 async def AddRelation(self, endpoints):
6767 '''
6768 endpoints : typing.Sequence[str]
6769 Returns -> typing.Mapping[str, ~Relation]
6770 '''
6771 # map input types to rpc msg
6772 params = dict()
6773 msg = dict(Type='Application', Request='AddRelation', Version=1, Params=params)
6774 params['Endpoints'] = endpoints
6775 reply = await self.rpc(msg)
6776 return reply
6777
6778
6779
6780 @ReturnMapping(AddApplicationUnitsResults)
6781 async def AddUnits(self, applicationname, numunits, placement):
6782 '''
6783 applicationname : str
6784 numunits : int
6785 placement : typing.Sequence[~Placement]
6786 Returns -> typing.Sequence[str]
6787 '''
6788 # map input types to rpc msg
6789 params = dict()
6790 msg = dict(Type='Application', Request='AddUnits', Version=1, Params=params)
6791 params['ApplicationName'] = applicationname
6792 params['NumUnits'] = numunits
6793 params['Placement'] = placement
6794 reply = await self.rpc(msg)
6795 return reply
6796
6797
6798
6799 @ReturnMapping(ApplicationCharmRelationsResults)
6800 async def CharmRelations(self, applicationname):
6801 '''
6802 applicationname : str
6803 Returns -> typing.Sequence[str]
6804 '''
6805 # map input types to rpc msg
6806 params = dict()
6807 msg = dict(Type='Application', Request='CharmRelations', Version=1, Params=params)
6808 params['ApplicationName'] = applicationname
6809 reply = await self.rpc(msg)
6810 return reply
6811
6812
6813
6814 @ReturnMapping(ErrorResults)
6815 async def Deploy(self, applications):
6816 '''
6817 applications : typing.Sequence[~ApplicationDeploy]
6818 Returns -> typing.Sequence[~ErrorResult]
6819 '''
6820 # map input types to rpc msg
6821 params = dict()
6822 msg = dict(Type='Application', Request='Deploy', Version=1, Params=params)
6823 params['Applications'] = applications
6824 reply = await self.rpc(msg)
6825 return reply
6826
6827
6828
6829 @ReturnMapping(None)
6830 async def Destroy(self, applicationname):
6831 '''
6832 applicationname : str
6833 Returns -> None
6834 '''
6835 # map input types to rpc msg
6836 params = dict()
6837 msg = dict(Type='Application', Request='Destroy', Version=1, Params=params)
6838 params['ApplicationName'] = applicationname
6839 reply = await self.rpc(msg)
6840 return reply
6841
6842
6843
6844 @ReturnMapping(None)
6845 async def DestroyRelation(self, endpoints):
6846 '''
6847 endpoints : typing.Sequence[str]
6848 Returns -> None
6849 '''
6850 # map input types to rpc msg
6851 params = dict()
6852 msg = dict(Type='Application', Request='DestroyRelation', Version=1, Params=params)
6853 params['Endpoints'] = endpoints
6854 reply = await self.rpc(msg)
6855 return reply
6856
6857
6858
6859 @ReturnMapping(None)
6860 async def DestroyUnits(self, unitnames):
6861 '''
6862 unitnames : typing.Sequence[str]
6863 Returns -> None
6864 '''
6865 # map input types to rpc msg
6866 params = dict()
6867 msg = dict(Type='Application', Request='DestroyUnits', Version=1, Params=params)
6868 params['UnitNames'] = unitnames
6869 reply = await self.rpc(msg)
6870 return reply
6871
6872
6873
6874 @ReturnMapping(None)
6875 async def Expose(self, applicationname):
6876 '''
6877 applicationname : str
6878 Returns -> None
6879 '''
6880 # map input types to rpc msg
6881 params = dict()
6882 msg = dict(Type='Application', Request='Expose', Version=1, Params=params)
6883 params['ApplicationName'] = applicationname
6884 reply = await self.rpc(msg)
6885 return reply
6886
6887
6888
6889 @ReturnMapping(ApplicationGetResults)
6890 async def Get(self, applicationname):
6891 '''
6892 applicationname : str
6893 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
6894 '''
6895 # map input types to rpc msg
6896 params = dict()
6897 msg = dict(Type='Application', Request='Get', Version=1, Params=params)
6898 params['ApplicationName'] = applicationname
6899 reply = await self.rpc(msg)
6900 return reply
6901
6902
6903
6904 @ReturnMapping(StringResult)
6905 async def GetCharmURL(self, applicationname):
6906 '''
6907 applicationname : str
6908 Returns -> typing.Union[_ForwardRef('Error'), str]
6909 '''
6910 # map input types to rpc msg
6911 params = dict()
6912 msg = dict(Type='Application', Request='GetCharmURL', Version=1, Params=params)
6913 params['ApplicationName'] = applicationname
6914 reply = await self.rpc(msg)
6915 return reply
6916
6917
6918
6919 @ReturnMapping(GetConstraintsResults)
6920 async def GetConstraints(self, applicationname):
6921 '''
6922 applicationname : str
6923 Returns -> Value
6924 '''
6925 # map input types to rpc msg
6926 params = dict()
6927 msg = dict(Type='Application', Request='GetConstraints', Version=1, Params=params)
6928 params['ApplicationName'] = applicationname
6929 reply = await self.rpc(msg)
6930 return reply
6931
6932
6933
6934 @ReturnMapping(None)
6935 async def Set(self, applicationname, options):
6936 '''
6937 applicationname : str
6938 options : typing.Mapping[str, str]
6939 Returns -> None
6940 '''
6941 # map input types to rpc msg
6942 params = dict()
6943 msg = dict(Type='Application', Request='Set', Version=1, Params=params)
6944 params['ApplicationName'] = applicationname
6945 params['Options'] = options
6946 reply = await self.rpc(msg)
6947 return reply
6948
6949
6950
6951 @ReturnMapping(None)
6952 async def SetCharm(self, applicationname, charmurl, cs_channel, forceseries, forceunits, resourceids):
6953 '''
6954 applicationname : str
6955 charmurl : str
6956 cs_channel : str
6957 forceseries : bool
6958 forceunits : bool
6959 resourceids : typing.Mapping[str, str]
6960 Returns -> None
6961 '''
6962 # map input types to rpc msg
6963 params = dict()
6964 msg = dict(Type='Application', Request='SetCharm', Version=1, Params=params)
6965 params['applicationname'] = applicationname
6966 params['charmurl'] = charmurl
6967 params['cs-channel'] = cs_channel
6968 params['forceseries'] = forceseries
6969 params['forceunits'] = forceunits
6970 params['resourceids'] = resourceids
6971 reply = await self.rpc(msg)
6972 return reply
6973
6974
6975
6976 @ReturnMapping(None)
6977 async def SetConstraints(self, applicationname, constraints):
6978 '''
6979 applicationname : str
6980 constraints : Value
6981 Returns -> None
6982 '''
6983 # map input types to rpc msg
6984 params = dict()
6985 msg = dict(Type='Application', Request='SetConstraints', Version=1, Params=params)
6986 params['ApplicationName'] = applicationname
6987 params['Constraints'] = constraints
6988 reply = await self.rpc(msg)
6989 return reply
6990
6991
6992
6993 @ReturnMapping(ErrorResults)
6994 async def SetMetricCredentials(self, creds):
6995 '''
6996 creds : typing.Sequence[~ApplicationMetricCredential]
6997 Returns -> typing.Sequence[~ErrorResult]
6998 '''
6999 # map input types to rpc msg
7000 params = dict()
7001 msg = dict(Type='Application', Request='SetMetricCredentials', Version=1, Params=params)
7002 params['Creds'] = creds
7003 reply = await self.rpc(msg)
7004 return reply
7005
7006
7007
7008 @ReturnMapping(None)
7009 async def Unexpose(self, applicationname):
7010 '''
7011 applicationname : str
7012 Returns -> None
7013 '''
7014 # map input types to rpc msg
7015 params = dict()
7016 msg = dict(Type='Application', Request='Unexpose', Version=1, Params=params)
7017 params['ApplicationName'] = applicationname
7018 reply = await self.rpc(msg)
7019 return reply
7020
7021
7022
7023 @ReturnMapping(None)
7024 async def Unset(self, applicationname, options):
7025 '''
7026 applicationname : str
7027 options : typing.Sequence[str]
7028 Returns -> None
7029 '''
7030 # map input types to rpc msg
7031 params = dict()
7032 msg = dict(Type='Application', Request='Unset', Version=1, Params=params)
7033 params['ApplicationName'] = applicationname
7034 params['Options'] = options
7035 reply = await self.rpc(msg)
7036 return reply
7037
7038
7039
7040 @ReturnMapping(None)
7041 async def Update(self, applicationname, charmurl, constraints, forcecharmurl, forceseries, minunits, settingsstrings, settingsyaml):
7042 '''
7043 applicationname : str
7044 charmurl : str
7045 constraints : Value
7046 forcecharmurl : bool
7047 forceseries : bool
7048 minunits : int
7049 settingsstrings : typing.Mapping[str, str]
7050 settingsyaml : str
7051 Returns -> None
7052 '''
7053 # map input types to rpc msg
7054 params = dict()
7055 msg = dict(Type='Application', Request='Update', Version=1, Params=params)
7056 params['ApplicationName'] = applicationname
7057 params['CharmUrl'] = charmurl
7058 params['Constraints'] = constraints
7059 params['ForceCharmUrl'] = forcecharmurl
7060 params['ForceSeries'] = forceseries
7061 params['MinUnits'] = minunits
7062 params['SettingsStrings'] = settingsstrings
7063 params['SettingsYAML'] = settingsyaml
7064 reply = await self.rpc(msg)
7065 return reply
7066
7067
7068 class ApplicationScaler(Type):
7069 name = 'ApplicationScaler'
7070 version = 1
7071 schema = {'definitions': {'Entities': {'additionalProperties': False,
7072 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
7073 'type': 'array'}},
7074 'required': ['Entities'],
7075 'type': 'object'},
7076 'Entity': {'additionalProperties': False,
7077 'properties': {'Tag': {'type': 'string'}},
7078 'required': ['Tag'],
7079 'type': 'object'},
7080 'Error': {'additionalProperties': False,
7081 'properties': {'Code': {'type': 'string'},
7082 'Info': {'$ref': '#/definitions/ErrorInfo'},
7083 'Message': {'type': 'string'}},
7084 'required': ['Message', 'Code'],
7085 'type': 'object'},
7086 'ErrorInfo': {'additionalProperties': False,
7087 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7088 'MacaroonPath': {'type': 'string'}},
7089 'type': 'object'},
7090 'ErrorResult': {'additionalProperties': False,
7091 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7092 'required': ['Error'],
7093 'type': 'object'},
7094 'ErrorResults': {'additionalProperties': False,
7095 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7096 'type': 'array'}},
7097 'required': ['Results'],
7098 'type': 'object'},
7099 'Macaroon': {'additionalProperties': False,
7100 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7101 'type': 'array'},
7102 'data': {'items': {'type': 'integer'},
7103 'type': 'array'},
7104 'id': {'$ref': '#/definitions/packet'},
7105 'location': {'$ref': '#/definitions/packet'},
7106 'sig': {'items': {'type': 'integer'},
7107 'type': 'array'}},
7108 'required': ['data',
7109 'location',
7110 'id',
7111 'caveats',
7112 'sig'],
7113 'type': 'object'},
7114 'StringsWatchResult': {'additionalProperties': False,
7115 'properties': {'Changes': {'items': {'type': 'string'},
7116 'type': 'array'},
7117 'Error': {'$ref': '#/definitions/Error'},
7118 'StringsWatcherId': {'type': 'string'}},
7119 'required': ['StringsWatcherId',
7120 'Changes',
7121 'Error'],
7122 'type': 'object'},
7123 'caveat': {'additionalProperties': False,
7124 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7125 'location': {'$ref': '#/definitions/packet'},
7126 'verificationId': {'$ref': '#/definitions/packet'}},
7127 'required': ['location',
7128 'caveatId',
7129 'verificationId'],
7130 'type': 'object'},
7131 'packet': {'additionalProperties': False,
7132 'properties': {'headerLen': {'type': 'integer'},
7133 'start': {'type': 'integer'},
7134 'totalLen': {'type': 'integer'}},
7135 'required': ['start', 'totalLen', 'headerLen'],
7136 'type': 'object'}},
7137 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7138 'Result': {'$ref': '#/definitions/ErrorResults'}},
7139 'type': 'object'},
7140 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
7141 'type': 'object'}},
7142 'type': 'object'}
7143
7144
7145 @ReturnMapping(ErrorResults)
7146 async def Rescale(self, entities):
7147 '''
7148 entities : typing.Sequence[~Entity]
7149 Returns -> typing.Sequence[~ErrorResult]
7150 '''
7151 # map input types to rpc msg
7152 params = dict()
7153 msg = dict(Type='ApplicationScaler', Request='Rescale', Version=1, Params=params)
7154 params['Entities'] = entities
7155 reply = await self.rpc(msg)
7156 return reply
7157
7158
7159
7160 @ReturnMapping(StringsWatchResult)
7161 async def Watch(self):
7162 '''
7163
7164 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
7165 '''
7166 # map input types to rpc msg
7167 params = dict()
7168 msg = dict(Type='ApplicationScaler', Request='Watch', Version=1, Params=params)
7169
7170 reply = await self.rpc(msg)
7171 return reply
7172
7173
7174 class Backups(Type):
7175 name = 'Backups'
7176 version = 1
7177 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
7178 'properties': {'Notes': {'type': 'string'}},
7179 'required': ['Notes'],
7180 'type': 'object'},
7181 'BackupsInfoArgs': {'additionalProperties': False,
7182 'properties': {'ID': {'type': 'string'}},
7183 'required': ['ID'],
7184 'type': 'object'},
7185 'BackupsListArgs': {'additionalProperties': False,
7186 'type': 'object'},
7187 'BackupsListResult': {'additionalProperties': False,
7188 'properties': {'List': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
7189 'type': 'array'}},
7190 'required': ['List'],
7191 'type': 'object'},
7192 'BackupsMetadataResult': {'additionalProperties': False,
7193 'properties': {'CACert': {'type': 'string'},
7194 'CAPrivateKey': {'type': 'string'},
7195 'Checksum': {'type': 'string'},
7196 'ChecksumFormat': {'type': 'string'},
7197 'Finished': {'format': 'date-time',
7198 'type': 'string'},
7199 'Hostname': {'type': 'string'},
7200 'ID': {'type': 'string'},
7201 'Machine': {'type': 'string'},
7202 'Model': {'type': 'string'},
7203 'Notes': {'type': 'string'},
7204 'Series': {'type': 'string'},
7205 'Size': {'type': 'integer'},
7206 'Started': {'format': 'date-time',
7207 'type': 'string'},
7208 'Stored': {'format': 'date-time',
7209 'type': 'string'},
7210 'Version': {'$ref': '#/definitions/Number'}},
7211 'required': ['ID',
7212 'Checksum',
7213 'ChecksumFormat',
7214 'Size',
7215 'Stored',
7216 'Started',
7217 'Finished',
7218 'Notes',
7219 'Model',
7220 'Machine',
7221 'Hostname',
7222 'Version',
7223 'Series',
7224 'CACert',
7225 'CAPrivateKey'],
7226 'type': 'object'},
7227 'BackupsRemoveArgs': {'additionalProperties': False,
7228 'properties': {'ID': {'type': 'string'}},
7229 'required': ['ID'],
7230 'type': 'object'},
7231 'Number': {'additionalProperties': False,
7232 'properties': {'Build': {'type': 'integer'},
7233 'Major': {'type': 'integer'},
7234 'Minor': {'type': 'integer'},
7235 'Patch': {'type': 'integer'},
7236 'Tag': {'type': 'string'}},
7237 'required': ['Major',
7238 'Minor',
7239 'Tag',
7240 'Patch',
7241 'Build'],
7242 'type': 'object'},
7243 'RestoreArgs': {'additionalProperties': False,
7244 'properties': {'BackupId': {'type': 'string'}},
7245 'required': ['BackupId'],
7246 'type': 'object'}},
7247 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
7248 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7249 'type': 'object'},
7250 'FinishRestore': {'type': 'object'},
7251 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
7252 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7253 'type': 'object'},
7254 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
7255 'Result': {'$ref': '#/definitions/BackupsListResult'}},
7256 'type': 'object'},
7257 'PrepareRestore': {'type': 'object'},
7258 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
7259 'type': 'object'},
7260 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
7261 'type': 'object'}},
7262 'type': 'object'}
7263
7264
7265 @ReturnMapping(BackupsMetadataResult)
7266 async def Create(self, notes):
7267 '''
7268 notes : str
7269 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7270 '''
7271 # map input types to rpc msg
7272 params = dict()
7273 msg = dict(Type='Backups', Request='Create', Version=1, Params=params)
7274 params['Notes'] = notes
7275 reply = await self.rpc(msg)
7276 return reply
7277
7278
7279
7280 @ReturnMapping(None)
7281 async def FinishRestore(self):
7282 '''
7283
7284 Returns -> None
7285 '''
7286 # map input types to rpc msg
7287 params = dict()
7288 msg = dict(Type='Backups', Request='FinishRestore', Version=1, Params=params)
7289
7290 reply = await self.rpc(msg)
7291 return reply
7292
7293
7294
7295 @ReturnMapping(BackupsMetadataResult)
7296 async def Info(self, id_):
7297 '''
7298 id_ : str
7299 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7300 '''
7301 # map input types to rpc msg
7302 params = dict()
7303 msg = dict(Type='Backups', Request='Info', Version=1, Params=params)
7304 params['ID'] = id_
7305 reply = await self.rpc(msg)
7306 return reply
7307
7308
7309
7310 @ReturnMapping(BackupsListResult)
7311 async def List(self):
7312 '''
7313
7314 Returns -> typing.Sequence[~BackupsMetadataResult]
7315 '''
7316 # map input types to rpc msg
7317 params = dict()
7318 msg = dict(Type='Backups', Request='List', Version=1, Params=params)
7319
7320 reply = await self.rpc(msg)
7321 return reply
7322
7323
7324
7325 @ReturnMapping(None)
7326 async def PrepareRestore(self):
7327 '''
7328
7329 Returns -> None
7330 '''
7331 # map input types to rpc msg
7332 params = dict()
7333 msg = dict(Type='Backups', Request='PrepareRestore', Version=1, Params=params)
7334
7335 reply = await self.rpc(msg)
7336 return reply
7337
7338
7339
7340 @ReturnMapping(None)
7341 async def Remove(self, id_):
7342 '''
7343 id_ : str
7344 Returns -> None
7345 '''
7346 # map input types to rpc msg
7347 params = dict()
7348 msg = dict(Type='Backups', Request='Remove', Version=1, Params=params)
7349 params['ID'] = id_
7350 reply = await self.rpc(msg)
7351 return reply
7352
7353
7354
7355 @ReturnMapping(None)
7356 async def Restore(self, backupid):
7357 '''
7358 backupid : str
7359 Returns -> None
7360 '''
7361 # map input types to rpc msg
7362 params = dict()
7363 msg = dict(Type='Backups', Request='Restore', Version=1, Params=params)
7364 params['BackupId'] = backupid
7365 reply = await self.rpc(msg)
7366 return reply
7367
7368
7369 class Block(Type):
7370 name = 'Block'
7371 version = 2
7372 schema = {'definitions': {'Block': {'additionalProperties': False,
7373 'properties': {'id': {'type': 'string'},
7374 'message': {'type': 'string'},
7375 'tag': {'type': 'string'},
7376 'type': {'type': 'string'}},
7377 'required': ['id', 'tag', 'type'],
7378 'type': 'object'},
7379 'BlockResult': {'additionalProperties': False,
7380 'properties': {'error': {'$ref': '#/definitions/Error'},
7381 'result': {'$ref': '#/definitions/Block'}},
7382 'required': ['result'],
7383 'type': 'object'},
7384 'BlockResults': {'additionalProperties': False,
7385 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
7386 'type': 'array'}},
7387 'type': 'object'},
7388 'BlockSwitchParams': {'additionalProperties': False,
7389 'properties': {'message': {'type': 'string'},
7390 'type': {'type': 'string'}},
7391 'required': ['type'],
7392 'type': 'object'},
7393 'Error': {'additionalProperties': False,
7394 'properties': {'Code': {'type': 'string'},
7395 'Info': {'$ref': '#/definitions/ErrorInfo'},
7396 'Message': {'type': 'string'}},
7397 'required': ['Message', 'Code'],
7398 'type': 'object'},
7399 'ErrorInfo': {'additionalProperties': False,
7400 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7401 'MacaroonPath': {'type': 'string'}},
7402 'type': 'object'},
7403 'ErrorResult': {'additionalProperties': False,
7404 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7405 'required': ['Error'],
7406 'type': 'object'},
7407 'Macaroon': {'additionalProperties': False,
7408 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7409 'type': 'array'},
7410 'data': {'items': {'type': 'integer'},
7411 'type': 'array'},
7412 'id': {'$ref': '#/definitions/packet'},
7413 'location': {'$ref': '#/definitions/packet'},
7414 'sig': {'items': {'type': 'integer'},
7415 'type': 'array'}},
7416 'required': ['data',
7417 'location',
7418 'id',
7419 'caveats',
7420 'sig'],
7421 'type': 'object'},
7422 'caveat': {'additionalProperties': False,
7423 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7424 'location': {'$ref': '#/definitions/packet'},
7425 'verificationId': {'$ref': '#/definitions/packet'}},
7426 'required': ['location',
7427 'caveatId',
7428 'verificationId'],
7429 'type': 'object'},
7430 'packet': {'additionalProperties': False,
7431 'properties': {'headerLen': {'type': 'integer'},
7432 'start': {'type': 'integer'},
7433 'totalLen': {'type': 'integer'}},
7434 'required': ['start', 'totalLen', 'headerLen'],
7435 'type': 'object'}},
7436 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
7437 'type': 'object'},
7438 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7439 'Result': {'$ref': '#/definitions/ErrorResult'}},
7440 'type': 'object'},
7441 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7442 'Result': {'$ref': '#/definitions/ErrorResult'}},
7443 'type': 'object'}},
7444 'type': 'object'}
7445
7446
7447 @ReturnMapping(BlockResults)
7448 async def List(self):
7449 '''
7450
7451 Returns -> typing.Sequence[~BlockResult]
7452 '''
7453 # map input types to rpc msg
7454 params = dict()
7455 msg = dict(Type='Block', Request='List', Version=2, Params=params)
7456
7457 reply = await self.rpc(msg)
7458 return reply
7459
7460
7461
7462 @ReturnMapping(ErrorResult)
7463 async def SwitchBlockOff(self, message, type_):
7464 '''
7465 message : str
7466 type_ : str
7467 Returns -> Error
7468 '''
7469 # map input types to rpc msg
7470 params = dict()
7471 msg = dict(Type='Block', Request='SwitchBlockOff', Version=2, Params=params)
7472 params['message'] = message
7473 params['type'] = type_
7474 reply = await self.rpc(msg)
7475 return reply
7476
7477
7478
7479 @ReturnMapping(ErrorResult)
7480 async def SwitchBlockOn(self, message, type_):
7481 '''
7482 message : str
7483 type_ : str
7484 Returns -> Error
7485 '''
7486 # map input types to rpc msg
7487 params = dict()
7488 msg = dict(Type='Block', Request='SwitchBlockOn', Version=2, Params=params)
7489 params['message'] = message
7490 params['type'] = type_
7491 reply = await self.rpc(msg)
7492 return reply
7493
7494
7495 class CharmRevisionUpdater(Type):
7496 name = 'CharmRevisionUpdater'
7497 version = 2
7498 schema = {'definitions': {'Error': {'additionalProperties': False,
7499 'properties': {'Code': {'type': 'string'},
7500 'Info': {'$ref': '#/definitions/ErrorInfo'},
7501 'Message': {'type': 'string'}},
7502 'required': ['Message', 'Code'],
7503 'type': 'object'},
7504 'ErrorInfo': {'additionalProperties': False,
7505 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7506 'MacaroonPath': {'type': 'string'}},
7507 'type': 'object'},
7508 'ErrorResult': {'additionalProperties': False,
7509 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7510 'required': ['Error'],
7511 'type': 'object'},
7512 'Macaroon': {'additionalProperties': False,
7513 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7514 'type': 'array'},
7515 'data': {'items': {'type': 'integer'},
7516 'type': 'array'},
7517 'id': {'$ref': '#/definitions/packet'},
7518 'location': {'$ref': '#/definitions/packet'},
7519 'sig': {'items': {'type': 'integer'},
7520 'type': 'array'}},
7521 'required': ['data',
7522 'location',
7523 'id',
7524 'caveats',
7525 'sig'],
7526 'type': 'object'},
7527 'caveat': {'additionalProperties': False,
7528 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7529 'location': {'$ref': '#/definitions/packet'},
7530 'verificationId': {'$ref': '#/definitions/packet'}},
7531 'required': ['location',
7532 'caveatId',
7533 'verificationId'],
7534 'type': 'object'},
7535 'packet': {'additionalProperties': False,
7536 'properties': {'headerLen': {'type': 'integer'},
7537 'start': {'type': 'integer'},
7538 'totalLen': {'type': 'integer'}},
7539 'required': ['start', 'totalLen', 'headerLen'],
7540 'type': 'object'}},
7541 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
7542 'type': 'object'}},
7543 'type': 'object'}
7544
7545
7546 @ReturnMapping(ErrorResult)
7547 async def UpdateLatestRevisions(self):
7548 '''
7549
7550 Returns -> Error
7551 '''
7552 # map input types to rpc msg
7553 params = dict()
7554 msg = dict(Type='CharmRevisionUpdater', Request='UpdateLatestRevisions', Version=2, Params=params)
7555
7556 reply = await self.rpc(msg)
7557 return reply
7558
7559
7560 class Charms(Type):
7561 name = 'Charms'
7562 version = 2
7563 schema = {'definitions': {'CharmInfo': {'additionalProperties': False,
7564 'properties': {'CharmURL': {'type': 'string'}},
7565 'required': ['CharmURL'],
7566 'type': 'object'},
7567 'CharmsList': {'additionalProperties': False,
7568 'properties': {'Names': {'items': {'type': 'string'},
7569 'type': 'array'}},
7570 'required': ['Names'],
7571 'type': 'object'},
7572 'CharmsListResult': {'additionalProperties': False,
7573 'properties': {'CharmURLs': {'items': {'type': 'string'},
7574 'type': 'array'}},
7575 'required': ['CharmURLs'],
7576 'type': 'object'},
7577 'IsMeteredResult': {'additionalProperties': False,
7578 'properties': {'Metered': {'type': 'boolean'}},
7579 'required': ['Metered'],
7580 'type': 'object'}},
7581 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
7582 'Result': {'$ref': '#/definitions/CharmInfo'}},
7583 'type': 'object'},
7584 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
7585 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
7586 'type': 'object'},
7587 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
7588 'Result': {'$ref': '#/definitions/CharmsListResult'}},
7589 'type': 'object'}},
7590 'type': 'object'}
7591
7592
7593 @ReturnMapping(CharmInfo)
7594 async def CharmInfo(self, charmurl):
7595 '''
7596 charmurl : str
7597 Returns -> str
7598 '''
7599 # map input types to rpc msg
7600 params = dict()
7601 msg = dict(Type='Charms', Request='CharmInfo', Version=2, Params=params)
7602 params['CharmURL'] = charmurl
7603 reply = await self.rpc(msg)
7604 return reply
7605
7606
7607
7608 @ReturnMapping(IsMeteredResult)
7609 async def IsMetered(self, charmurl):
7610 '''
7611 charmurl : str
7612 Returns -> bool
7613 '''
7614 # map input types to rpc msg
7615 params = dict()
7616 msg = dict(Type='Charms', Request='IsMetered', Version=2, Params=params)
7617 params['CharmURL'] = charmurl
7618 reply = await self.rpc(msg)
7619 return reply
7620
7621
7622
7623 @ReturnMapping(CharmsListResult)
7624 async def List(self, names):
7625 '''
7626 names : typing.Sequence[str]
7627 Returns -> typing.Sequence[str]
7628 '''
7629 # map input types to rpc msg
7630 params = dict()
7631 msg = dict(Type='Charms', Request='List', Version=2, Params=params)
7632 params['Names'] = names
7633 reply = await self.rpc(msg)
7634 return reply
7635
7636
7637 class Cleaner(Type):
7638 name = 'Cleaner'
7639 version = 2
7640 schema = {'definitions': {'Error': {'additionalProperties': False,
7641 'properties': {'Code': {'type': 'string'},
7642 'Info': {'$ref': '#/definitions/ErrorInfo'},
7643 'Message': {'type': 'string'}},
7644 'required': ['Message', 'Code'],
7645 'type': 'object'},
7646 'ErrorInfo': {'additionalProperties': False,
7647 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7648 'MacaroonPath': {'type': 'string'}},
7649 'type': 'object'},
7650 'Macaroon': {'additionalProperties': False,
7651 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7652 'type': 'array'},
7653 'data': {'items': {'type': 'integer'},
7654 'type': 'array'},
7655 'id': {'$ref': '#/definitions/packet'},
7656 'location': {'$ref': '#/definitions/packet'},
7657 'sig': {'items': {'type': 'integer'},
7658 'type': 'array'}},
7659 'required': ['data',
7660 'location',
7661 'id',
7662 'caveats',
7663 'sig'],
7664 'type': 'object'},
7665 'NotifyWatchResult': {'additionalProperties': False,
7666 'properties': {'Error': {'$ref': '#/definitions/Error'},
7667 'NotifyWatcherId': {'type': 'string'}},
7668 'required': ['NotifyWatcherId', 'Error'],
7669 'type': 'object'},
7670 'caveat': {'additionalProperties': False,
7671 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7672 'location': {'$ref': '#/definitions/packet'},
7673 'verificationId': {'$ref': '#/definitions/packet'}},
7674 'required': ['location',
7675 'caveatId',
7676 'verificationId'],
7677 'type': 'object'},
7678 'packet': {'additionalProperties': False,
7679 'properties': {'headerLen': {'type': 'integer'},
7680 'start': {'type': 'integer'},
7681 'totalLen': {'type': 'integer'}},
7682 'required': ['start', 'totalLen', 'headerLen'],
7683 'type': 'object'}},
7684 'properties': {'Cleanup': {'type': 'object'},
7685 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
7686 'type': 'object'}},
7687 'type': 'object'}
7688
7689
7690 @ReturnMapping(None)
7691 async def Cleanup(self):
7692 '''
7693
7694 Returns -> None
7695 '''
7696 # map input types to rpc msg
7697 params = dict()
7698 msg = dict(Type='Cleaner', Request='Cleanup', Version=2, Params=params)
7699
7700 reply = await self.rpc(msg)
7701 return reply
7702
7703
7704
7705 @ReturnMapping(NotifyWatchResult)
7706 async def WatchCleanups(self):
7707 '''
7708
7709 Returns -> typing.Union[_ForwardRef('Error'), str]
7710 '''
7711 # map input types to rpc msg
7712 params = dict()
7713 msg = dict(Type='Cleaner', Request='WatchCleanups', Version=2, Params=params)
7714
7715 reply = await self.rpc(msg)
7716 return reply
7717
7718
7719 class Client(Type):
7720 name = 'Client'
7721 version = 1
7722 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
7723 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
7724 'type': 'array'},
7725 'type': 'array'}},
7726 'required': ['Servers'],
7727 'type': 'object'},
7728 'AddCharm': {'additionalProperties': False,
7729 'properties': {'Channel': {'type': 'string'},
7730 'URL': {'type': 'string'}},
7731 'required': ['URL', 'Channel'],
7732 'type': 'object'},
7733 'AddCharmWithAuthorization': {'additionalProperties': False,
7734 'properties': {'Channel': {'type': 'string'},
7735 'CharmStoreMacaroon': {'$ref': '#/definitions/Macaroon'},
7736 'URL': {'type': 'string'}},
7737 'required': ['URL',
7738 'Channel',
7739 'CharmStoreMacaroon'],
7740 'type': 'object'},
7741 'AddMachineParams': {'additionalProperties': False,
7742 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
7743 'type': 'array'},
7744 'Constraints': {'$ref': '#/definitions/Value'},
7745 'ContainerType': {'type': 'string'},
7746 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
7747 'type': 'array'},
7748 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
7749 'InstanceId': {'type': 'string'},
7750 'Jobs': {'items': {'type': 'string'},
7751 'type': 'array'},
7752 'Nonce': {'type': 'string'},
7753 'ParentId': {'type': 'string'},
7754 'Placement': {'$ref': '#/definitions/Placement'},
7755 'Series': {'type': 'string'}},
7756 'required': ['Series',
7757 'Constraints',
7758 'Jobs',
7759 'Disks',
7760 'Placement',
7761 'ParentId',
7762 'ContainerType',
7763 'InstanceId',
7764 'Nonce',
7765 'HardwareCharacteristics',
7766 'Addrs'],
7767 'type': 'object'},
7768 'AddMachines': {'additionalProperties': False,
7769 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
7770 'type': 'array'}},
7771 'required': ['MachineParams'],
7772 'type': 'object'},
7773 'AddMachinesResult': {'additionalProperties': False,
7774 'properties': {'Error': {'$ref': '#/definitions/Error'},
7775 'Machine': {'type': 'string'}},
7776 'required': ['Machine', 'Error'],
7777 'type': 'object'},
7778 'AddMachinesResults': {'additionalProperties': False,
7779 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
7780 'type': 'array'}},
7781 'required': ['Machines'],
7782 'type': 'object'},
7783 'Address': {'additionalProperties': False,
7784 'properties': {'Scope': {'type': 'string'},
7785 'SpaceName': {'type': 'string'},
7786 'Type': {'type': 'string'},
7787 'Value': {'type': 'string'}},
7788 'required': ['Value', 'Type', 'Scope'],
7789 'type': 'object'},
7790 'AgentVersionResult': {'additionalProperties': False,
7791 'properties': {'Version': {'$ref': '#/definitions/Number'}},
7792 'required': ['Version'],
7793 'type': 'object'},
7794 'AllWatcherId': {'additionalProperties': False,
7795 'properties': {'AllWatcherId': {'type': 'string'}},
7796 'required': ['AllWatcherId'],
7797 'type': 'object'},
7798 'ApplicationStatus': {'additionalProperties': False,
7799 'properties': {'CanUpgradeTo': {'type': 'string'},
7800 'Charm': {'type': 'string'},
7801 'Err': {'additionalProperties': True,
7802 'type': 'object'},
7803 'Exposed': {'type': 'boolean'},
7804 'Life': {'type': 'string'},
7805 'MeterStatuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
7806 'type': 'object'},
7807 'Relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
7808 'type': 'array'}},
7809 'type': 'object'},
7810 'Status': {'$ref': '#/definitions/DetailedStatus'},
7811 'SubordinateTo': {'items': {'type': 'string'},
7812 'type': 'array'},
7813 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
7814 'type': 'object'}},
7815 'required': ['Err',
7816 'Charm',
7817 'Exposed',
7818 'Life',
7819 'Relations',
7820 'CanUpgradeTo',
7821 'SubordinateTo',
7822 'Units',
7823 'MeterStatuses',
7824 'Status'],
7825 'type': 'object'},
7826 'Binary': {'additionalProperties': False,
7827 'properties': {'Arch': {'type': 'string'},
7828 'Number': {'$ref': '#/definitions/Number'},
7829 'Series': {'type': 'string'}},
7830 'required': ['Number', 'Series', 'Arch'],
7831 'type': 'object'},
7832 'BundleChangesChange': {'additionalProperties': False,
7833 'properties': {'args': {'items': {'additionalProperties': True,
7834 'type': 'object'},
7835 'type': 'array'},
7836 'id': {'type': 'string'},
7837 'method': {'type': 'string'},
7838 'requires': {'items': {'type': 'string'},
7839 'type': 'array'}},
7840 'required': ['id',
7841 'method',
7842 'args',
7843 'requires'],
7844 'type': 'object'},
7845 'CharmInfo': {'additionalProperties': False,
7846 'properties': {'CharmURL': {'type': 'string'}},
7847 'required': ['CharmURL'],
7848 'type': 'object'},
7849 'Constraints': {'additionalProperties': False,
7850 'properties': {'Count': {'type': 'integer'},
7851 'Pool': {'type': 'string'},
7852 'Size': {'type': 'integer'}},
7853 'required': ['Pool', 'Size', 'Count'],
7854 'type': 'object'},
7855 'DestroyMachines': {'additionalProperties': False,
7856 'properties': {'Force': {'type': 'boolean'},
7857 'MachineNames': {'items': {'type': 'string'},
7858 'type': 'array'}},
7859 'required': ['MachineNames', 'Force'],
7860 'type': 'object'},
7861 'DetailedStatus': {'additionalProperties': False,
7862 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7863 'type': 'object'}},
7864 'type': 'object'},
7865 'Err': {'additionalProperties': True,
7866 'type': 'object'},
7867 'Info': {'type': 'string'},
7868 'Kind': {'type': 'string'},
7869 'Life': {'type': 'string'},
7870 'Since': {'format': 'date-time',
7871 'type': 'string'},
7872 'Status': {'type': 'string'},
7873 'Version': {'type': 'string'}},
7874 'required': ['Status',
7875 'Info',
7876 'Data',
7877 'Since',
7878 'Kind',
7879 'Version',
7880 'Life',
7881 'Err'],
7882 'type': 'object'},
7883 'EndpointStatus': {'additionalProperties': False,
7884 'properties': {'ApplicationName': {'type': 'string'},
7885 'Name': {'type': 'string'},
7886 'Role': {'type': 'string'},
7887 'Subordinate': {'type': 'boolean'}},
7888 'required': ['ApplicationName',
7889 'Name',
7890 'Role',
7891 'Subordinate'],
7892 'type': 'object'},
7893 'Entities': {'additionalProperties': False,
7894 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
7895 'type': 'array'}},
7896 'required': ['Entities'],
7897 'type': 'object'},
7898 'Entity': {'additionalProperties': False,
7899 'properties': {'Tag': {'type': 'string'}},
7900 'required': ['Tag'],
7901 'type': 'object'},
7902 'EntityStatus': {'additionalProperties': False,
7903 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7904 'type': 'object'}},
7905 'type': 'object'},
7906 'Info': {'type': 'string'},
7907 'Since': {'format': 'date-time',
7908 'type': 'string'},
7909 'Status': {'type': 'string'}},
7910 'required': ['Status',
7911 'Info',
7912 'Data',
7913 'Since'],
7914 'type': 'object'},
7915 'Error': {'additionalProperties': False,
7916 'properties': {'Code': {'type': 'string'},
7917 'Info': {'$ref': '#/definitions/ErrorInfo'},
7918 'Message': {'type': 'string'}},
7919 'required': ['Message', 'Code'],
7920 'type': 'object'},
7921 'ErrorInfo': {'additionalProperties': False,
7922 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7923 'MacaroonPath': {'type': 'string'}},
7924 'type': 'object'},
7925 'ErrorResult': {'additionalProperties': False,
7926 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7927 'required': ['Error'],
7928 'type': 'object'},
7929 'ErrorResults': {'additionalProperties': False,
7930 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7931 'type': 'array'}},
7932 'required': ['Results'],
7933 'type': 'object'},
7934 'FindToolsParams': {'additionalProperties': False,
7935 'properties': {'Arch': {'type': 'string'},
7936 'MajorVersion': {'type': 'integer'},
7937 'MinorVersion': {'type': 'integer'},
7938 'Number': {'$ref': '#/definitions/Number'},
7939 'Series': {'type': 'string'}},
7940 'required': ['Number',
7941 'MajorVersion',
7942 'MinorVersion',
7943 'Arch',
7944 'Series'],
7945 'type': 'object'},
7946 'FindToolsResult': {'additionalProperties': False,
7947 'properties': {'Error': {'$ref': '#/definitions/Error'},
7948 'List': {'items': {'$ref': '#/definitions/Tools'},
7949 'type': 'array'}},
7950 'required': ['List', 'Error'],
7951 'type': 'object'},
7952 'FullStatus': {'additionalProperties': False,
7953 'properties': {'Applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
7954 'type': 'object'},
7955 'AvailableVersion': {'type': 'string'},
7956 'Machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
7957 'type': 'object'},
7958 'ModelName': {'type': 'string'},
7959 'Relations': {'items': {'$ref': '#/definitions/RelationStatus'},
7960 'type': 'array'}},
7961 'required': ['ModelName',
7962 'AvailableVersion',
7963 'Machines',
7964 'Applications',
7965 'Relations'],
7966 'type': 'object'},
7967 'GetBundleChangesParams': {'additionalProperties': False,
7968 'properties': {'yaml': {'type': 'string'}},
7969 'required': ['yaml'],
7970 'type': 'object'},
7971 'GetBundleChangesResults': {'additionalProperties': False,
7972 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'},
7973 'type': 'array'},
7974 'errors': {'items': {'type': 'string'},
7975 'type': 'array'}},
7976 'type': 'object'},
7977 'GetConstraintsResults': {'additionalProperties': False,
7978 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
7979 'required': ['Constraints'],
7980 'type': 'object'},
7981 'HardwareCharacteristics': {'additionalProperties': False,
7982 'properties': {'Arch': {'type': 'string'},
7983 'AvailabilityZone': {'type': 'string'},
7984 'CpuCores': {'type': 'integer'},
7985 'CpuPower': {'type': 'integer'},
7986 'Mem': {'type': 'integer'},
7987 'RootDisk': {'type': 'integer'},
7988 'Tags': {'items': {'type': 'string'},
7989 'type': 'array'}},
7990 'type': 'object'},
7991 'History': {'additionalProperties': False,
7992 'properties': {'Error': {'$ref': '#/definitions/Error'},
7993 'Statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
7994 'type': 'array'}},
7995 'required': ['Statuses'],
7996 'type': 'object'},
7997 'HostPort': {'additionalProperties': False,
7998 'properties': {'Address': {'$ref': '#/definitions/Address'},
7999 'Port': {'type': 'integer'}},
8000 'required': ['Address', 'Port'],
8001 'type': 'object'},
8002 'Macaroon': {'additionalProperties': False,
8003 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8004 'type': 'array'},
8005 'data': {'items': {'type': 'integer'},
8006 'type': 'array'},
8007 'id': {'$ref': '#/definitions/packet'},
8008 'location': {'$ref': '#/definitions/packet'},
8009 'sig': {'items': {'type': 'integer'},
8010 'type': 'array'}},
8011 'required': ['data',
8012 'location',
8013 'id',
8014 'caveats',
8015 'sig'],
8016 'type': 'object'},
8017 'MachineStatus': {'additionalProperties': False,
8018 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
8019 'Containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8020 'type': 'object'},
8021 'DNSName': {'type': 'string'},
8022 'Hardware': {'type': 'string'},
8023 'HasVote': {'type': 'boolean'},
8024 'Id': {'type': 'string'},
8025 'InstanceId': {'type': 'string'},
8026 'InstanceStatus': {'$ref': '#/definitions/DetailedStatus'},
8027 'Jobs': {'items': {'type': 'string'},
8028 'type': 'array'},
8029 'Series': {'type': 'string'},
8030 'WantsVote': {'type': 'boolean'}},
8031 'required': ['AgentStatus',
8032 'InstanceStatus',
8033 'DNSName',
8034 'InstanceId',
8035 'Series',
8036 'Id',
8037 'Containers',
8038 'Hardware',
8039 'Jobs',
8040 'HasVote',
8041 'WantsVote'],
8042 'type': 'object'},
8043 'MeterStatus': {'additionalProperties': False,
8044 'properties': {'Color': {'type': 'string'},
8045 'Message': {'type': 'string'}},
8046 'required': ['Color', 'Message'],
8047 'type': 'object'},
8048 'ModelConfigResults': {'additionalProperties': False,
8049 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
8050 'type': 'object'}},
8051 'type': 'object'}},
8052 'required': ['Config'],
8053 'type': 'object'},
8054 'ModelInfo': {'additionalProperties': False,
8055 'properties': {'Cloud': {'type': 'string'},
8056 'DefaultSeries': {'type': 'string'},
8057 'Life': {'type': 'string'},
8058 'Name': {'type': 'string'},
8059 'OwnerTag': {'type': 'string'},
8060 'ProviderType': {'type': 'string'},
8061 'ServerUUID': {'type': 'string'},
8062 'Status': {'$ref': '#/definitions/EntityStatus'},
8063 'UUID': {'type': 'string'},
8064 'Users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
8065 'type': 'array'}},
8066 'required': ['Name',
8067 'UUID',
8068 'ServerUUID',
8069 'ProviderType',
8070 'DefaultSeries',
8071 'Cloud',
8072 'OwnerTag',
8073 'Life',
8074 'Status',
8075 'Users'],
8076 'type': 'object'},
8077 'ModelSet': {'additionalProperties': False,
8078 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
8079 'type': 'object'}},
8080 'type': 'object'}},
8081 'required': ['Config'],
8082 'type': 'object'},
8083 'ModelUnset': {'additionalProperties': False,
8084 'properties': {'Keys': {'items': {'type': 'string'},
8085 'type': 'array'}},
8086 'required': ['Keys'],
8087 'type': 'object'},
8088 'ModelUserInfo': {'additionalProperties': False,
8089 'properties': {'access': {'type': 'string'},
8090 'displayname': {'type': 'string'},
8091 'lastconnection': {'format': 'date-time',
8092 'type': 'string'},
8093 'user': {'type': 'string'}},
8094 'required': ['user',
8095 'displayname',
8096 'lastconnection',
8097 'access'],
8098 'type': 'object'},
8099 'ModelUserInfoResult': {'additionalProperties': False,
8100 'properties': {'error': {'$ref': '#/definitions/Error'},
8101 'result': {'$ref': '#/definitions/ModelUserInfo'}},
8102 'type': 'object'},
8103 'ModelUserInfoResults': {'additionalProperties': False,
8104 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
8105 'type': 'array'}},
8106 'required': ['results'],
8107 'type': 'object'},
8108 'Number': {'additionalProperties': False,
8109 'properties': {'Build': {'type': 'integer'},
8110 'Major': {'type': 'integer'},
8111 'Minor': {'type': 'integer'},
8112 'Patch': {'type': 'integer'},
8113 'Tag': {'type': 'string'}},
8114 'required': ['Major',
8115 'Minor',
8116 'Tag',
8117 'Patch',
8118 'Build'],
8119 'type': 'object'},
8120 'Placement': {'additionalProperties': False,
8121 'properties': {'Directive': {'type': 'string'},
8122 'Scope': {'type': 'string'}},
8123 'required': ['Scope', 'Directive'],
8124 'type': 'object'},
8125 'PrivateAddress': {'additionalProperties': False,
8126 'properties': {'Target': {'type': 'string'}},
8127 'required': ['Target'],
8128 'type': 'object'},
8129 'PrivateAddressResults': {'additionalProperties': False,
8130 'properties': {'PrivateAddress': {'type': 'string'}},
8131 'required': ['PrivateAddress'],
8132 'type': 'object'},
8133 'ProvisioningScriptParams': {'additionalProperties': False,
8134 'properties': {'DataDir': {'type': 'string'},
8135 'DisablePackageCommands': {'type': 'boolean'},
8136 'MachineId': {'type': 'string'},
8137 'Nonce': {'type': 'string'}},
8138 'required': ['MachineId',
8139 'Nonce',
8140 'DataDir',
8141 'DisablePackageCommands'],
8142 'type': 'object'},
8143 'ProvisioningScriptResult': {'additionalProperties': False,
8144 'properties': {'Script': {'type': 'string'}},
8145 'required': ['Script'],
8146 'type': 'object'},
8147 'PublicAddress': {'additionalProperties': False,
8148 'properties': {'Target': {'type': 'string'}},
8149 'required': ['Target'],
8150 'type': 'object'},
8151 'PublicAddressResults': {'additionalProperties': False,
8152 'properties': {'PublicAddress': {'type': 'string'}},
8153 'required': ['PublicAddress'],
8154 'type': 'object'},
8155 'RelationStatus': {'additionalProperties': False,
8156 'properties': {'Endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
8157 'type': 'array'},
8158 'Id': {'type': 'integer'},
8159 'Interface': {'type': 'string'},
8160 'Key': {'type': 'string'},
8161 'Scope': {'type': 'string'}},
8162 'required': ['Id',
8163 'Key',
8164 'Interface',
8165 'Scope',
8166 'Endpoints'],
8167 'type': 'object'},
8168 'ResolveCharmResult': {'additionalProperties': False,
8169 'properties': {'Error': {'type': 'string'},
8170 'URL': {'$ref': '#/definitions/URL'}},
8171 'type': 'object'},
8172 'ResolveCharmResults': {'additionalProperties': False,
8173 'properties': {'URLs': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
8174 'type': 'array'}},
8175 'required': ['URLs'],
8176 'type': 'object'},
8177 'ResolveCharms': {'additionalProperties': False,
8178 'properties': {'References': {'items': {'$ref': '#/definitions/URL'},
8179 'type': 'array'}},
8180 'required': ['References'],
8181 'type': 'object'},
8182 'Resolved': {'additionalProperties': False,
8183 'properties': {'Retry': {'type': 'boolean'},
8184 'UnitName': {'type': 'string'}},
8185 'required': ['UnitName', 'Retry'],
8186 'type': 'object'},
8187 'SetConstraints': {'additionalProperties': False,
8188 'properties': {'ApplicationName': {'type': 'string'},
8189 'Constraints': {'$ref': '#/definitions/Value'}},
8190 'required': ['ApplicationName',
8191 'Constraints'],
8192 'type': 'object'},
8193 'SetModelAgentVersion': {'additionalProperties': False,
8194 'properties': {'Version': {'$ref': '#/definitions/Number'}},
8195 'required': ['Version'],
8196 'type': 'object'},
8197 'StatusHistoryFilter': {'additionalProperties': False,
8198 'properties': {'Date': {'format': 'date-time',
8199 'type': 'string'},
8200 'Delta': {'type': 'integer'},
8201 'Size': {'type': 'integer'}},
8202 'required': ['Size', 'Date', 'Delta'],
8203 'type': 'object'},
8204 'StatusHistoryRequest': {'additionalProperties': False,
8205 'properties': {'Filter': {'$ref': '#/definitions/StatusHistoryFilter'},
8206 'HistoryKind': {'type': 'string'},
8207 'Size': {'type': 'integer'},
8208 'Tag': {'type': 'string'}},
8209 'required': ['HistoryKind',
8210 'Size',
8211 'Filter',
8212 'Tag'],
8213 'type': 'object'},
8214 'StatusHistoryRequests': {'additionalProperties': False,
8215 'properties': {'Requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
8216 'type': 'array'}},
8217 'required': ['Requests'],
8218 'type': 'object'},
8219 'StatusHistoryResult': {'additionalProperties': False,
8220 'properties': {'Error': {'$ref': '#/definitions/Error'},
8221 'History': {'$ref': '#/definitions/History'}},
8222 'required': ['History'],
8223 'type': 'object'},
8224 'StatusHistoryResults': {'additionalProperties': False,
8225 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
8226 'type': 'array'}},
8227 'required': ['Results'],
8228 'type': 'object'},
8229 'StatusParams': {'additionalProperties': False,
8230 'properties': {'Patterns': {'items': {'type': 'string'},
8231 'type': 'array'}},
8232 'required': ['Patterns'],
8233 'type': 'object'},
8234 'Tools': {'additionalProperties': False,
8235 'properties': {'sha256': {'type': 'string'},
8236 'size': {'type': 'integer'},
8237 'url': {'type': 'string'},
8238 'version': {'$ref': '#/definitions/Binary'}},
8239 'required': ['version', 'url', 'size'],
8240 'type': 'object'},
8241 'URL': {'additionalProperties': False,
8242 'properties': {'Channel': {'type': 'string'},
8243 'Name': {'type': 'string'},
8244 'Revision': {'type': 'integer'},
8245 'Schema': {'type': 'string'},
8246 'Series': {'type': 'string'},
8247 'User': {'type': 'string'}},
8248 'required': ['Schema',
8249 'User',
8250 'Name',
8251 'Revision',
8252 'Series',
8253 'Channel'],
8254 'type': 'object'},
8255 'UnitStatus': {'additionalProperties': False,
8256 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
8257 'Charm': {'type': 'string'},
8258 'Machine': {'type': 'string'},
8259 'OpenedPorts': {'items': {'type': 'string'},
8260 'type': 'array'},
8261 'PublicAddress': {'type': 'string'},
8262 'Subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8263 'type': 'object'},
8264 'WorkloadStatus': {'$ref': '#/definitions/DetailedStatus'}},
8265 'required': ['AgentStatus',
8266 'WorkloadStatus',
8267 'Machine',
8268 'OpenedPorts',
8269 'PublicAddress',
8270 'Charm',
8271 'Subordinates'],
8272 'type': 'object'},
8273 'Value': {'additionalProperties': False,
8274 'properties': {'arch': {'type': 'string'},
8275 'container': {'type': 'string'},
8276 'cpu-cores': {'type': 'integer'},
8277 'cpu-power': {'type': 'integer'},
8278 'instance-type': {'type': 'string'},
8279 'mem': {'type': 'integer'},
8280 'root-disk': {'type': 'integer'},
8281 'spaces': {'items': {'type': 'string'},
8282 'type': 'array'},
8283 'tags': {'items': {'type': 'string'},
8284 'type': 'array'},
8285 'virt-type': {'type': 'string'}},
8286 'type': 'object'},
8287 'caveat': {'additionalProperties': False,
8288 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8289 'location': {'$ref': '#/definitions/packet'},
8290 'verificationId': {'$ref': '#/definitions/packet'}},
8291 'required': ['location',
8292 'caveatId',
8293 'verificationId'],
8294 'type': 'object'},
8295 'packet': {'additionalProperties': False,
8296 'properties': {'headerLen': {'type': 'integer'},
8297 'start': {'type': 'integer'},
8298 'totalLen': {'type': 'integer'}},
8299 'required': ['start', 'totalLen', 'headerLen'],
8300 'type': 'object'}},
8301 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
8302 'type': 'object'},
8303 'AbortCurrentUpgrade': {'type': 'object'},
8304 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
8305 'type': 'object'},
8306 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
8307 'type': 'object'},
8308 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8309 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8310 'type': 'object'},
8311 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8312 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8313 'type': 'object'},
8314 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
8315 'type': 'object'},
8316 'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
8317 'Result': {'$ref': '#/definitions/CharmInfo'}},
8318 'type': 'object'},
8319 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
8320 'type': 'object'},
8321 'DestroyModel': {'type': 'object'},
8322 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
8323 'Result': {'$ref': '#/definitions/FindToolsResult'}},
8324 'type': 'object'},
8325 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
8326 'Result': {'$ref': '#/definitions/FullStatus'}},
8327 'type': 'object'},
8328 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'},
8329 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}},
8330 'type': 'object'},
8331 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
8332 'type': 'object'},
8333 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8334 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8335 'type': 'object'},
8336 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
8337 'type': 'object'},
8338 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
8339 'type': 'object'},
8340 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
8341 'type': 'object'},
8342 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
8343 'type': 'object'},
8344 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
8345 'type': 'object'},
8346 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
8347 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
8348 'type': 'object'},
8349 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
8350 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
8351 'type': 'object'},
8352 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
8353 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
8354 'type': 'object'},
8355 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
8356 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
8357 'type': 'object'},
8358 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
8359 'type': 'object'},
8360 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8361 'Result': {'$ref': '#/definitions/ErrorResults'}},
8362 'type': 'object'},
8363 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
8364 'type': 'object'},
8365 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
8366 'type': 'object'},
8367 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
8368 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
8369 'type': 'object'},
8370 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
8371 'type': 'object'}},
8372 'type': 'object'}
8373
8374
8375 @ReturnMapping(APIHostPortsResult)
8376 async def APIHostPorts(self):
8377 '''
8378
8379 Returns -> typing.Sequence[~HostPort]
8380 '''
8381 # map input types to rpc msg
8382 params = dict()
8383 msg = dict(Type='Client', Request='APIHostPorts', Version=1, Params=params)
8384
8385 reply = await self.rpc(msg)
8386 return reply
8387
8388
8389
8390 @ReturnMapping(None)
8391 async def AbortCurrentUpgrade(self):
8392 '''
8393
8394 Returns -> None
8395 '''
8396 # map input types to rpc msg
8397 params = dict()
8398 msg = dict(Type='Client', Request='AbortCurrentUpgrade', Version=1, Params=params)
8399
8400 reply = await self.rpc(msg)
8401 return reply
8402
8403
8404
8405 @ReturnMapping(None)
8406 async def AddCharm(self, channel, url):
8407 '''
8408 channel : str
8409 url : str
8410 Returns -> None
8411 '''
8412 # map input types to rpc msg
8413 params = dict()
8414 msg = dict(Type='Client', Request='AddCharm', Version=1, Params=params)
8415 params['Channel'] = channel
8416 params['URL'] = url
8417 reply = await self.rpc(msg)
8418 return reply
8419
8420
8421
8422 @ReturnMapping(None)
8423 async def AddCharmWithAuthorization(self, channel, charmstoremacaroon, url):
8424 '''
8425 channel : str
8426 charmstoremacaroon : Macaroon
8427 url : str
8428 Returns -> None
8429 '''
8430 # map input types to rpc msg
8431 params = dict()
8432 msg = dict(Type='Client', Request='AddCharmWithAuthorization', Version=1, Params=params)
8433 params['Channel'] = channel
8434 params['CharmStoreMacaroon'] = charmstoremacaroon
8435 params['URL'] = url
8436 reply = await self.rpc(msg)
8437 return reply
8438
8439
8440
8441 @ReturnMapping(AddMachinesResults)
8442 async def AddMachines(self, machineparams):
8443 '''
8444 machineparams : typing.Sequence[~AddMachineParams]
8445 Returns -> typing.Sequence[~AddMachinesResult]
8446 '''
8447 # map input types to rpc msg
8448 params = dict()
8449 msg = dict(Type='Client', Request='AddMachines', Version=1, Params=params)
8450 params['MachineParams'] = machineparams
8451 reply = await self.rpc(msg)
8452 return reply
8453
8454
8455
8456 @ReturnMapping(AddMachinesResults)
8457 async def AddMachinesV2(self, machineparams):
8458 '''
8459 machineparams : typing.Sequence[~AddMachineParams]
8460 Returns -> typing.Sequence[~AddMachinesResult]
8461 '''
8462 # map input types to rpc msg
8463 params = dict()
8464 msg = dict(Type='Client', Request='AddMachinesV2', Version=1, Params=params)
8465 params['MachineParams'] = machineparams
8466 reply = await self.rpc(msg)
8467 return reply
8468
8469
8470
8471 @ReturnMapping(AgentVersionResult)
8472 async def AgentVersion(self):
8473 '''
8474
8475 Returns -> Number
8476 '''
8477 # map input types to rpc msg
8478 params = dict()
8479 msg = dict(Type='Client', Request='AgentVersion', Version=1, Params=params)
8480
8481 reply = await self.rpc(msg)
8482 return reply
8483
8484
8485
8486 @ReturnMapping(CharmInfo)
8487 async def CharmInfo(self, charmurl):
8488 '''
8489 charmurl : str
8490 Returns -> str
8491 '''
8492 # map input types to rpc msg
8493 params = dict()
8494 msg = dict(Type='Client', Request='CharmInfo', Version=1, Params=params)
8495 params['CharmURL'] = charmurl
8496 reply = await self.rpc(msg)
8497 return reply
8498
8499
8500
8501 @ReturnMapping(None)
8502 async def DestroyMachines(self, force, machinenames):
8503 '''
8504 force : bool
8505 machinenames : typing.Sequence[str]
8506 Returns -> None
8507 '''
8508 # map input types to rpc msg
8509 params = dict()
8510 msg = dict(Type='Client', Request='DestroyMachines', Version=1, Params=params)
8511 params['Force'] = force
8512 params['MachineNames'] = machinenames
8513 reply = await self.rpc(msg)
8514 return reply
8515
8516
8517
8518 @ReturnMapping(None)
8519 async def DestroyModel(self):
8520 '''
8521
8522 Returns -> None
8523 '''
8524 # map input types to rpc msg
8525 params = dict()
8526 msg = dict(Type='Client', Request='DestroyModel', Version=1, Params=params)
8527
8528 reply = await self.rpc(msg)
8529 return reply
8530
8531
8532
8533 @ReturnMapping(FindToolsResult)
8534 async def FindTools(self, arch, majorversion, minorversion, number, series):
8535 '''
8536 arch : str
8537 majorversion : int
8538 minorversion : int
8539 number : Number
8540 series : str
8541 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
8542 '''
8543 # map input types to rpc msg
8544 params = dict()
8545 msg = dict(Type='Client', Request='FindTools', Version=1, Params=params)
8546 params['Arch'] = arch
8547 params['MajorVersion'] = majorversion
8548 params['MinorVersion'] = minorversion
8549 params['Number'] = number
8550 params['Series'] = series
8551 reply = await self.rpc(msg)
8552 return reply
8553
8554
8555
8556 @ReturnMapping(FullStatus)
8557 async def FullStatus(self, patterns):
8558 '''
8559 patterns : typing.Sequence[str]
8560 Returns -> typing.Union[typing.Mapping[str, ~MachineStatus], typing.Sequence[~RelationStatus]]
8561 '''
8562 # map input types to rpc msg
8563 params = dict()
8564 msg = dict(Type='Client', Request='FullStatus', Version=1, Params=params)
8565 params['Patterns'] = patterns
8566 reply = await self.rpc(msg)
8567 return reply
8568
8569
8570
8571 @ReturnMapping(GetBundleChangesResults)
8572 async def GetBundleChanges(self, yaml):
8573 '''
8574 yaml : str
8575 Returns -> typing.Sequence[~BundleChangesChange]
8576 '''
8577 # map input types to rpc msg
8578 params = dict()
8579 msg = dict(Type='Client', Request='GetBundleChanges', Version=1, Params=params)
8580 params['yaml'] = yaml
8581 reply = await self.rpc(msg)
8582 return reply
8583
8584
8585
8586 @ReturnMapping(GetConstraintsResults)
8587 async def GetModelConstraints(self):
8588 '''
8589
8590 Returns -> Value
8591 '''
8592 # map input types to rpc msg
8593 params = dict()
8594 msg = dict(Type='Client', Request='GetModelConstraints', Version=1, Params=params)
8595
8596 reply = await self.rpc(msg)
8597 return reply
8598
8599
8600
8601 @ReturnMapping(AddMachinesResults)
8602 async def InjectMachines(self, machineparams):
8603 '''
8604 machineparams : typing.Sequence[~AddMachineParams]
8605 Returns -> typing.Sequence[~AddMachinesResult]
8606 '''
8607 # map input types to rpc msg
8608 params = dict()
8609 msg = dict(Type='Client', Request='InjectMachines', Version=1, Params=params)
8610 params['MachineParams'] = machineparams
8611 reply = await self.rpc(msg)
8612 return reply
8613
8614
8615
8616 @ReturnMapping(ModelConfigResults)
8617 async def ModelGet(self):
8618 '''
8619
8620 Returns -> typing.Mapping[str, typing.Any]
8621 '''
8622 # map input types to rpc msg
8623 params = dict()
8624 msg = dict(Type='Client', Request='ModelGet', Version=1, Params=params)
8625
8626 reply = await self.rpc(msg)
8627 return reply
8628
8629
8630
8631 @ReturnMapping(ModelInfo)
8632 async def ModelInfo(self):
8633 '''
8634
8635 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
8636 '''
8637 # map input types to rpc msg
8638 params = dict()
8639 msg = dict(Type='Client', Request='ModelInfo', Version=1, Params=params)
8640
8641 reply = await self.rpc(msg)
8642 return reply
8643
8644
8645
8646 @ReturnMapping(None)
8647 async def ModelSet(self, config):
8648 '''
8649 config : typing.Mapping[str, typing.Any]
8650 Returns -> None
8651 '''
8652 # map input types to rpc msg
8653 params = dict()
8654 msg = dict(Type='Client', Request='ModelSet', Version=1, Params=params)
8655 params['Config'] = config
8656 reply = await self.rpc(msg)
8657 return reply
8658
8659
8660
8661 @ReturnMapping(None)
8662 async def ModelUnset(self, keys):
8663 '''
8664 keys : typing.Sequence[str]
8665 Returns -> None
8666 '''
8667 # map input types to rpc msg
8668 params = dict()
8669 msg = dict(Type='Client', Request='ModelUnset', Version=1, Params=params)
8670 params['Keys'] = keys
8671 reply = await self.rpc(msg)
8672 return reply
8673
8674
8675
8676 @ReturnMapping(ModelUserInfoResults)
8677 async def ModelUserInfo(self):
8678 '''
8679
8680 Returns -> typing.Sequence[~ModelUserInfoResult]
8681 '''
8682 # map input types to rpc msg
8683 params = dict()
8684 msg = dict(Type='Client', Request='ModelUserInfo', Version=1, Params=params)
8685
8686 reply = await self.rpc(msg)
8687 return reply
8688
8689
8690
8691 @ReturnMapping(PrivateAddressResults)
8692 async def PrivateAddress(self, target):
8693 '''
8694 target : str
8695 Returns -> str
8696 '''
8697 # map input types to rpc msg
8698 params = dict()
8699 msg = dict(Type='Client', Request='PrivateAddress', Version=1, Params=params)
8700 params['Target'] = target
8701 reply = await self.rpc(msg)
8702 return reply
8703
8704
8705
8706 @ReturnMapping(ProvisioningScriptResult)
8707 async def ProvisioningScript(self, datadir, disablepackagecommands, machineid, nonce):
8708 '''
8709 datadir : str
8710 disablepackagecommands : bool
8711 machineid : str
8712 nonce : str
8713 Returns -> str
8714 '''
8715 # map input types to rpc msg
8716 params = dict()
8717 msg = dict(Type='Client', Request='ProvisioningScript', Version=1, Params=params)
8718 params['DataDir'] = datadir
8719 params['DisablePackageCommands'] = disablepackagecommands
8720 params['MachineId'] = machineid
8721 params['Nonce'] = nonce
8722 reply = await self.rpc(msg)
8723 return reply
8724
8725
8726
8727 @ReturnMapping(PublicAddressResults)
8728 async def PublicAddress(self, target):
8729 '''
8730 target : str
8731 Returns -> str
8732 '''
8733 # map input types to rpc msg
8734 params = dict()
8735 msg = dict(Type='Client', Request='PublicAddress', Version=1, Params=params)
8736 params['Target'] = target
8737 reply = await self.rpc(msg)
8738 return reply
8739
8740
8741
8742 @ReturnMapping(ResolveCharmResults)
8743 async def ResolveCharms(self, references):
8744 '''
8745 references : typing.Sequence[~URL]
8746 Returns -> typing.Sequence[~ResolveCharmResult]
8747 '''
8748 # map input types to rpc msg
8749 params = dict()
8750 msg = dict(Type='Client', Request='ResolveCharms', Version=1, Params=params)
8751 params['References'] = references
8752 reply = await self.rpc(msg)
8753 return reply
8754
8755
8756
8757 @ReturnMapping(None)
8758 async def Resolved(self, retry, unitname):
8759 '''
8760 retry : bool
8761 unitname : str
8762 Returns -> None
8763 '''
8764 # map input types to rpc msg
8765 params = dict()
8766 msg = dict(Type='Client', Request='Resolved', Version=1, Params=params)
8767 params['Retry'] = retry
8768 params['UnitName'] = unitname
8769 reply = await self.rpc(msg)
8770 return reply
8771
8772
8773
8774 @ReturnMapping(ErrorResults)
8775 async def RetryProvisioning(self, entities):
8776 '''
8777 entities : typing.Sequence[~Entity]
8778 Returns -> typing.Sequence[~ErrorResult]
8779 '''
8780 # map input types to rpc msg
8781 params = dict()
8782 msg = dict(Type='Client', Request='RetryProvisioning', Version=1, Params=params)
8783 params['Entities'] = entities
8784 reply = await self.rpc(msg)
8785 return reply
8786
8787
8788
8789 @ReturnMapping(None)
8790 async def SetModelAgentVersion(self, build, major, minor, patch, tag):
8791 '''
8792 build : int
8793 major : int
8794 minor : int
8795 patch : int
8796 tag : str
8797 Returns -> None
8798 '''
8799 # map input types to rpc msg
8800 params = dict()
8801 msg = dict(Type='Client', Request='SetModelAgentVersion', Version=1, Params=params)
8802 params['Build'] = build
8803 params['Major'] = major
8804 params['Minor'] = minor
8805 params['Patch'] = patch
8806 params['Tag'] = tag
8807 reply = await self.rpc(msg)
8808 return reply
8809
8810
8811
8812 @ReturnMapping(None)
8813 async def SetModelConstraints(self, applicationname, constraints):
8814 '''
8815 applicationname : str
8816 constraints : Value
8817 Returns -> None
8818 '''
8819 # map input types to rpc msg
8820 params = dict()
8821 msg = dict(Type='Client', Request='SetModelConstraints', Version=1, Params=params)
8822 params['ApplicationName'] = applicationname
8823 params['Constraints'] = constraints
8824 reply = await self.rpc(msg)
8825 return reply
8826
8827
8828
8829 @ReturnMapping(StatusHistoryResults)
8830 async def StatusHistory(self, requests):
8831 '''
8832 requests : typing.Sequence[~StatusHistoryRequest]
8833 Returns -> typing.Sequence[~StatusHistoryResult]
8834 '''
8835 # map input types to rpc msg
8836 params = dict()
8837 msg = dict(Type='Client', Request='StatusHistory', Version=1, Params=params)
8838 params['Requests'] = requests
8839 reply = await self.rpc(msg)
8840 return reply
8841
8842
8843
8844 @ReturnMapping(AllWatcherId)
8845 async def WatchAll(self):
8846 '''
8847
8848 Returns -> str
8849 '''
8850 # map input types to rpc msg
8851 params = dict()
8852 msg = dict(Type='Client', Request='WatchAll', Version=1, Params=params)
8853
8854 reply = await self.rpc(msg)
8855 return reply
8856
8857
8858 class Controller(Type):
8859 name = 'Controller'
8860 version = 3
8861 schema = {'definitions': {'AllWatcherId': {'additionalProperties': False,
8862 'properties': {'AllWatcherId': {'type': 'string'}},
8863 'required': ['AllWatcherId'],
8864 'type': 'object'},
8865 'DestroyControllerArgs': {'additionalProperties': False,
8866 'properties': {'destroy-models': {'type': 'boolean'}},
8867 'required': ['destroy-models'],
8868 'type': 'object'},
8869 'Entities': {'additionalProperties': False,
8870 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8871 'type': 'array'}},
8872 'required': ['Entities'],
8873 'type': 'object'},
8874 'Entity': {'additionalProperties': False,
8875 'properties': {'Tag': {'type': 'string'}},
8876 'required': ['Tag'],
8877 'type': 'object'},
8878 'Error': {'additionalProperties': False,
8879 'properties': {'Code': {'type': 'string'},
8880 'Info': {'$ref': '#/definitions/ErrorInfo'},
8881 'Message': {'type': 'string'}},
8882 'required': ['Message', 'Code'],
8883 'type': 'object'},
8884 'ErrorInfo': {'additionalProperties': False,
8885 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8886 'MacaroonPath': {'type': 'string'}},
8887 'type': 'object'},
8888 'InitiateModelMigrationArgs': {'additionalProperties': False,
8889 'properties': {'specs': {'items': {'$ref': '#/definitions/ModelMigrationSpec'},
8890 'type': 'array'}},
8891 'required': ['specs'],
8892 'type': 'object'},
8893 'InitiateModelMigrationResult': {'additionalProperties': False,
8894 'properties': {'error': {'$ref': '#/definitions/Error'},
8895 'id': {'type': 'string'},
8896 'model-tag': {'type': 'string'}},
8897 'required': ['model-tag',
8898 'error',
8899 'id'],
8900 'type': 'object'},
8901 'InitiateModelMigrationResults': {'additionalProperties': False,
8902 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateModelMigrationResult'},
8903 'type': 'array'}},
8904 'required': ['results'],
8905 'type': 'object'},
8906 'Macaroon': {'additionalProperties': False,
8907 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8908 'type': 'array'},
8909 'data': {'items': {'type': 'integer'},
8910 'type': 'array'},
8911 'id': {'$ref': '#/definitions/packet'},
8912 'location': {'$ref': '#/definitions/packet'},
8913 'sig': {'items': {'type': 'integer'},
8914 'type': 'array'}},
8915 'required': ['data',
8916 'location',
8917 'id',
8918 'caveats',
8919 'sig'],
8920 'type': 'object'},
8921 'Model': {'additionalProperties': False,
8922 'properties': {'Name': {'type': 'string'},
8923 'OwnerTag': {'type': 'string'},
8924 'UUID': {'type': 'string'}},
8925 'required': ['Name', 'UUID', 'OwnerTag'],
8926 'type': 'object'},
8927 'ModelBlockInfo': {'additionalProperties': False,
8928 'properties': {'blocks': {'items': {'type': 'string'},
8929 'type': 'array'},
8930 'model-uuid': {'type': 'string'},
8931 'name': {'type': 'string'},
8932 'owner-tag': {'type': 'string'}},
8933 'required': ['name',
8934 'model-uuid',
8935 'owner-tag',
8936 'blocks'],
8937 'type': 'object'},
8938 'ModelBlockInfoList': {'additionalProperties': False,
8939 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
8940 'type': 'array'}},
8941 'type': 'object'},
8942 'ModelConfigResults': {'additionalProperties': False,
8943 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
8944 'type': 'object'}},
8945 'type': 'object'}},
8946 'required': ['Config'],
8947 'type': 'object'},
8948 'ModelMigrationSpec': {'additionalProperties': False,
8949 'properties': {'model-tag': {'type': 'string'},
8950 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
8951 'required': ['model-tag',
8952 'target-info'],
8953 'type': 'object'},
8954 'ModelMigrationTargetInfo': {'additionalProperties': False,
8955 'properties': {'addrs': {'items': {'type': 'string'},
8956 'type': 'array'},
8957 'auth-tag': {'type': 'string'},
8958 'ca-cert': {'type': 'string'},
8959 'controller-tag': {'type': 'string'},
8960 'password': {'type': 'string'}},
8961 'required': ['controller-tag',
8962 'addrs',
8963 'ca-cert',
8964 'auth-tag',
8965 'password'],
8966 'type': 'object'},
8967 'ModelStatus': {'additionalProperties': False,
8968 'properties': {'application-count': {'type': 'integer'},
8969 'hosted-machine-count': {'type': 'integer'},
8970 'life': {'type': 'string'},
8971 'model-tag': {'type': 'string'},
8972 'owner-tag': {'type': 'string'}},
8973 'required': ['model-tag',
8974 'life',
8975 'hosted-machine-count',
8976 'application-count',
8977 'owner-tag'],
8978 'type': 'object'},
8979 'ModelStatusResults': {'additionalProperties': False,
8980 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
8981 'type': 'array'}},
8982 'required': ['models'],
8983 'type': 'object'},
8984 'RemoveBlocksArgs': {'additionalProperties': False,
8985 'properties': {'all': {'type': 'boolean'}},
8986 'required': ['all'],
8987 'type': 'object'},
8988 'UserModel': {'additionalProperties': False,
8989 'properties': {'LastConnection': {'format': 'date-time',
8990 'type': 'string'},
8991 'Model': {'$ref': '#/definitions/Model'}},
8992 'required': ['Model', 'LastConnection'],
8993 'type': 'object'},
8994 'UserModelList': {'additionalProperties': False,
8995 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
8996 'type': 'array'}},
8997 'required': ['UserModels'],
8998 'type': 'object'},
8999 'caveat': {'additionalProperties': False,
9000 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9001 'location': {'$ref': '#/definitions/packet'},
9002 'verificationId': {'$ref': '#/definitions/packet'}},
9003 'required': ['location',
9004 'caveatId',
9005 'verificationId'],
9006 'type': 'object'},
9007 'packet': {'additionalProperties': False,
9008 'properties': {'headerLen': {'type': 'integer'},
9009 'start': {'type': 'integer'},
9010 'totalLen': {'type': 'integer'}},
9011 'required': ['start', 'totalLen', 'headerLen'],
9012 'type': 'object'}},
9013 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
9014 'type': 'object'},
9015 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
9016 'type': 'object'},
9017 'InitiateModelMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateModelMigrationArgs'},
9018 'Result': {'$ref': '#/definitions/InitiateModelMigrationResults'}},
9019 'type': 'object'},
9020 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
9021 'type': 'object'},
9022 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
9023 'type': 'object'},
9024 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9025 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
9026 'type': 'object'},
9027 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
9028 'type': 'object'},
9029 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
9030 'type': 'object'}},
9031 'type': 'object'}
9032
9033
9034 @ReturnMapping(UserModelList)
9035 async def AllModels(self):
9036 '''
9037
9038 Returns -> typing.Sequence[~UserModel]
9039 '''
9040 # map input types to rpc msg
9041 params = dict()
9042 msg = dict(Type='Controller', Request='AllModels', Version=3, Params=params)
9043
9044 reply = await self.rpc(msg)
9045 return reply
9046
9047
9048
9049 @ReturnMapping(None)
9050 async def DestroyController(self, destroy_models):
9051 '''
9052 destroy_models : bool
9053 Returns -> None
9054 '''
9055 # map input types to rpc msg
9056 params = dict()
9057 msg = dict(Type='Controller', Request='DestroyController', Version=3, Params=params)
9058 params['destroy-models'] = destroy_models
9059 reply = await self.rpc(msg)
9060 return reply
9061
9062
9063
9064 @ReturnMapping(InitiateModelMigrationResults)
9065 async def InitiateModelMigration(self, specs):
9066 '''
9067 specs : typing.Sequence[~ModelMigrationSpec]
9068 Returns -> typing.Sequence[~InitiateModelMigrationResult]
9069 '''
9070 # map input types to rpc msg
9071 params = dict()
9072 msg = dict(Type='Controller', Request='InitiateModelMigration', Version=3, Params=params)
9073 params['specs'] = specs
9074 reply = await self.rpc(msg)
9075 return reply
9076
9077
9078
9079 @ReturnMapping(ModelBlockInfoList)
9080 async def ListBlockedModels(self):
9081 '''
9082
9083 Returns -> typing.Sequence[~ModelBlockInfo]
9084 '''
9085 # map input types to rpc msg
9086 params = dict()
9087 msg = dict(Type='Controller', Request='ListBlockedModels', Version=3, Params=params)
9088
9089 reply = await self.rpc(msg)
9090 return reply
9091
9092
9093
9094 @ReturnMapping(ModelConfigResults)
9095 async def ModelConfig(self):
9096 '''
9097
9098 Returns -> typing.Mapping[str, typing.Any]
9099 '''
9100 # map input types to rpc msg
9101 params = dict()
9102 msg = dict(Type='Controller', Request='ModelConfig', Version=3, Params=params)
9103
9104 reply = await self.rpc(msg)
9105 return reply
9106
9107
9108
9109 @ReturnMapping(ModelStatusResults)
9110 async def ModelStatus(self, entities):
9111 '''
9112 entities : typing.Sequence[~Entity]
9113 Returns -> typing.Sequence[~ModelStatus]
9114 '''
9115 # map input types to rpc msg
9116 params = dict()
9117 msg = dict(Type='Controller', Request='ModelStatus', Version=3, Params=params)
9118 params['Entities'] = entities
9119 reply = await self.rpc(msg)
9120 return reply
9121
9122
9123
9124 @ReturnMapping(None)
9125 async def RemoveBlocks(self, all_):
9126 '''
9127 all_ : bool
9128 Returns -> None
9129 '''
9130 # map input types to rpc msg
9131 params = dict()
9132 msg = dict(Type='Controller', Request='RemoveBlocks', Version=3, Params=params)
9133 params['all'] = all_
9134 reply = await self.rpc(msg)
9135 return reply
9136
9137
9138
9139 @ReturnMapping(AllWatcherId)
9140 async def WatchAllModels(self):
9141 '''
9142
9143 Returns -> str
9144 '''
9145 # map input types to rpc msg
9146 params = dict()
9147 msg = dict(Type='Controller', Request='WatchAllModels', Version=3, Params=params)
9148
9149 reply = await self.rpc(msg)
9150 return reply
9151
9152
9153 class Deployer(Type):
9154 name = 'Deployer'
9155 version = 1
9156 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
9157 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
9158 'type': 'array'},
9159 'type': 'array'}},
9160 'required': ['Servers'],
9161 'type': 'object'},
9162 'Address': {'additionalProperties': False,
9163 'properties': {'Scope': {'type': 'string'},
9164 'SpaceName': {'type': 'string'},
9165 'Type': {'type': 'string'},
9166 'Value': {'type': 'string'}},
9167 'required': ['Value', 'Type', 'Scope'],
9168 'type': 'object'},
9169 'BytesResult': {'additionalProperties': False,
9170 'properties': {'Result': {'items': {'type': 'integer'},
9171 'type': 'array'}},
9172 'required': ['Result'],
9173 'type': 'object'},
9174 'DeployerConnectionValues': {'additionalProperties': False,
9175 'properties': {'APIAddresses': {'items': {'type': 'string'},
9176 'type': 'array'},
9177 'StateAddresses': {'items': {'type': 'string'},
9178 'type': 'array'}},
9179 'required': ['StateAddresses',
9180 'APIAddresses'],
9181 'type': 'object'},
9182 'Entities': {'additionalProperties': False,
9183 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9184 'type': 'array'}},
9185 'required': ['Entities'],
9186 'type': 'object'},
9187 'Entity': {'additionalProperties': False,
9188 'properties': {'Tag': {'type': 'string'}},
9189 'required': ['Tag'],
9190 'type': 'object'},
9191 'EntityPassword': {'additionalProperties': False,
9192 'properties': {'Password': {'type': 'string'},
9193 'Tag': {'type': 'string'}},
9194 'required': ['Tag', 'Password'],
9195 'type': 'object'},
9196 'EntityPasswords': {'additionalProperties': False,
9197 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
9198 'type': 'array'}},
9199 'required': ['Changes'],
9200 'type': 'object'},
9201 'Error': {'additionalProperties': False,
9202 'properties': {'Code': {'type': 'string'},
9203 'Info': {'$ref': '#/definitions/ErrorInfo'},
9204 'Message': {'type': 'string'}},
9205 'required': ['Message', 'Code'],
9206 'type': 'object'},
9207 'ErrorInfo': {'additionalProperties': False,
9208 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9209 'MacaroonPath': {'type': 'string'}},
9210 'type': 'object'},
9211 'ErrorResult': {'additionalProperties': False,
9212 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9213 'required': ['Error'],
9214 'type': 'object'},
9215 'ErrorResults': {'additionalProperties': False,
9216 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9217 'type': 'array'}},
9218 'required': ['Results'],
9219 'type': 'object'},
9220 'HostPort': {'additionalProperties': False,
9221 'properties': {'Address': {'$ref': '#/definitions/Address'},
9222 'Port': {'type': 'integer'}},
9223 'required': ['Address', 'Port'],
9224 'type': 'object'},
9225 'LifeResult': {'additionalProperties': False,
9226 'properties': {'Error': {'$ref': '#/definitions/Error'},
9227 'Life': {'type': 'string'}},
9228 'required': ['Life', 'Error'],
9229 'type': 'object'},
9230 'LifeResults': {'additionalProperties': False,
9231 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
9232 'type': 'array'}},
9233 'required': ['Results'],
9234 'type': 'object'},
9235 'Macaroon': {'additionalProperties': False,
9236 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9237 'type': 'array'},
9238 'data': {'items': {'type': 'integer'},
9239 'type': 'array'},
9240 'id': {'$ref': '#/definitions/packet'},
9241 'location': {'$ref': '#/definitions/packet'},
9242 'sig': {'items': {'type': 'integer'},
9243 'type': 'array'}},
9244 'required': ['data',
9245 'location',
9246 'id',
9247 'caveats',
9248 'sig'],
9249 'type': 'object'},
9250 'NotifyWatchResult': {'additionalProperties': False,
9251 'properties': {'Error': {'$ref': '#/definitions/Error'},
9252 'NotifyWatcherId': {'type': 'string'}},
9253 'required': ['NotifyWatcherId', 'Error'],
9254 'type': 'object'},
9255 'StringResult': {'additionalProperties': False,
9256 'properties': {'Error': {'$ref': '#/definitions/Error'},
9257 'Result': {'type': 'string'}},
9258 'required': ['Error', 'Result'],
9259 'type': 'object'},
9260 'StringsResult': {'additionalProperties': False,
9261 'properties': {'Error': {'$ref': '#/definitions/Error'},
9262 'Result': {'items': {'type': 'string'},
9263 'type': 'array'}},
9264 'required': ['Error', 'Result'],
9265 'type': 'object'},
9266 'StringsWatchResult': {'additionalProperties': False,
9267 'properties': {'Changes': {'items': {'type': 'string'},
9268 'type': 'array'},
9269 'Error': {'$ref': '#/definitions/Error'},
9270 'StringsWatcherId': {'type': 'string'}},
9271 'required': ['StringsWatcherId',
9272 'Changes',
9273 'Error'],
9274 'type': 'object'},
9275 'StringsWatchResults': {'additionalProperties': False,
9276 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
9277 'type': 'array'}},
9278 'required': ['Results'],
9279 'type': 'object'},
9280 'caveat': {'additionalProperties': False,
9281 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9282 'location': {'$ref': '#/definitions/packet'},
9283 'verificationId': {'$ref': '#/definitions/packet'}},
9284 'required': ['location',
9285 'caveatId',
9286 'verificationId'],
9287 'type': 'object'},
9288 'packet': {'additionalProperties': False,
9289 'properties': {'headerLen': {'type': 'integer'},
9290 'start': {'type': 'integer'},
9291 'totalLen': {'type': 'integer'}},
9292 'required': ['start', 'totalLen', 'headerLen'],
9293 'type': 'object'}},
9294 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
9295 'type': 'object'},
9296 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
9297 'type': 'object'},
9298 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
9299 'type': 'object'},
9300 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
9301 'type': 'object'},
9302 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9303 'Result': {'$ref': '#/definitions/LifeResults'}},
9304 'type': 'object'},
9305 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
9306 'type': 'object'},
9307 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9308 'Result': {'$ref': '#/definitions/ErrorResults'}},
9309 'type': 'object'},
9310 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
9311 'Result': {'$ref': '#/definitions/ErrorResults'}},
9312 'type': 'object'},
9313 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
9314 'type': 'object'},
9315 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
9316 'type': 'object'},
9317 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9318 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
9319 'type': 'object'}},
9320 'type': 'object'}
9321
9322
9323 @ReturnMapping(StringsResult)
9324 async def APIAddresses(self):
9325 '''
9326
9327 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
9328 '''
9329 # map input types to rpc msg
9330 params = dict()
9331 msg = dict(Type='Deployer', Request='APIAddresses', Version=1, Params=params)
9332
9333 reply = await self.rpc(msg)
9334 return reply
9335
9336
9337
9338 @ReturnMapping(APIHostPortsResult)
9339 async def APIHostPorts(self):
9340 '''
9341
9342 Returns -> typing.Sequence[~HostPort]
9343 '''
9344 # map input types to rpc msg
9345 params = dict()
9346 msg = dict(Type='Deployer', Request='APIHostPorts', Version=1, Params=params)
9347
9348 reply = await self.rpc(msg)
9349 return reply
9350
9351
9352
9353 @ReturnMapping(BytesResult)
9354 async def CACert(self):
9355 '''
9356
9357 Returns -> typing.Sequence[int]
9358 '''
9359 # map input types to rpc msg
9360 params = dict()
9361 msg = dict(Type='Deployer', Request='CACert', Version=1, Params=params)
9362
9363 reply = await self.rpc(msg)
9364 return reply
9365
9366
9367
9368 @ReturnMapping(DeployerConnectionValues)
9369 async def ConnectionInfo(self):
9370 '''
9371
9372 Returns -> typing.Sequence[str]
9373 '''
9374 # map input types to rpc msg
9375 params = dict()
9376 msg = dict(Type='Deployer', Request='ConnectionInfo', Version=1, Params=params)
9377
9378 reply = await self.rpc(msg)
9379 return reply
9380
9381
9382
9383 @ReturnMapping(LifeResults)
9384 async def Life(self, entities):
9385 '''
9386 entities : typing.Sequence[~Entity]
9387 Returns -> typing.Sequence[~LifeResult]
9388 '''
9389 # map input types to rpc msg
9390 params = dict()
9391 msg = dict(Type='Deployer', Request='Life', Version=1, Params=params)
9392 params['Entities'] = entities
9393 reply = await self.rpc(msg)
9394 return reply
9395
9396
9397
9398 @ReturnMapping(StringResult)
9399 async def ModelUUID(self):
9400 '''
9401
9402 Returns -> typing.Union[_ForwardRef('Error'), str]
9403 '''
9404 # map input types to rpc msg
9405 params = dict()
9406 msg = dict(Type='Deployer', Request='ModelUUID', Version=1, Params=params)
9407
9408 reply = await self.rpc(msg)
9409 return reply
9410
9411
9412
9413 @ReturnMapping(ErrorResults)
9414 async def Remove(self, entities):
9415 '''
9416 entities : typing.Sequence[~Entity]
9417 Returns -> typing.Sequence[~ErrorResult]
9418 '''
9419 # map input types to rpc msg
9420 params = dict()
9421 msg = dict(Type='Deployer', Request='Remove', Version=1, Params=params)
9422 params['Entities'] = entities
9423 reply = await self.rpc(msg)
9424 return reply
9425
9426
9427
9428 @ReturnMapping(ErrorResults)
9429 async def SetPasswords(self, changes):
9430 '''
9431 changes : typing.Sequence[~EntityPassword]
9432 Returns -> typing.Sequence[~ErrorResult]
9433 '''
9434 # map input types to rpc msg
9435 params = dict()
9436 msg = dict(Type='Deployer', Request='SetPasswords', Version=1, Params=params)
9437 params['Changes'] = changes
9438 reply = await self.rpc(msg)
9439 return reply
9440
9441
9442
9443 @ReturnMapping(StringsResult)
9444 async def StateAddresses(self):
9445 '''
9446
9447 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
9448 '''
9449 # map input types to rpc msg
9450 params = dict()
9451 msg = dict(Type='Deployer', Request='StateAddresses', Version=1, Params=params)
9452
9453 reply = await self.rpc(msg)
9454 return reply
9455
9456
9457
9458 @ReturnMapping(NotifyWatchResult)
9459 async def WatchAPIHostPorts(self):
9460 '''
9461
9462 Returns -> typing.Union[_ForwardRef('Error'), str]
9463 '''
9464 # map input types to rpc msg
9465 params = dict()
9466 msg = dict(Type='Deployer', Request='WatchAPIHostPorts', Version=1, Params=params)
9467
9468 reply = await self.rpc(msg)
9469 return reply
9470
9471
9472
9473 @ReturnMapping(StringsWatchResults)
9474 async def WatchUnits(self, entities):
9475 '''
9476 entities : typing.Sequence[~Entity]
9477 Returns -> typing.Sequence[~StringsWatchResult]
9478 '''
9479 # map input types to rpc msg
9480 params = dict()
9481 msg = dict(Type='Deployer', Request='WatchUnits', Version=1, Params=params)
9482 params['Entities'] = entities
9483 reply = await self.rpc(msg)
9484 return reply
9485
9486
9487 class DiscoverSpaces(Type):
9488 name = 'DiscoverSpaces'
9489 version = 2
9490 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
9491 'properties': {'SpaceTag': {'type': 'string'},
9492 'SubnetProviderId': {'type': 'string'},
9493 'SubnetTag': {'type': 'string'},
9494 'Zones': {'items': {'type': 'string'},
9495 'type': 'array'}},
9496 'required': ['SpaceTag'],
9497 'type': 'object'},
9498 'AddSubnetsParams': {'additionalProperties': False,
9499 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
9500 'type': 'array'}},
9501 'required': ['Subnets'],
9502 'type': 'object'},
9503 'CreateSpaceParams': {'additionalProperties': False,
9504 'properties': {'ProviderId': {'type': 'string'},
9505 'Public': {'type': 'boolean'},
9506 'SpaceTag': {'type': 'string'},
9507 'SubnetTags': {'items': {'type': 'string'},
9508 'type': 'array'}},
9509 'required': ['SubnetTags',
9510 'SpaceTag',
9511 'Public'],
9512 'type': 'object'},
9513 'CreateSpacesParams': {'additionalProperties': False,
9514 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
9515 'type': 'array'}},
9516 'required': ['Spaces'],
9517 'type': 'object'},
9518 'DiscoverSpacesResults': {'additionalProperties': False,
9519 'properties': {'Results': {'items': {'$ref': '#/definitions/ProviderSpace'},
9520 'type': 'array'}},
9521 'required': ['Results'],
9522 'type': 'object'},
9523 'Error': {'additionalProperties': False,
9524 'properties': {'Code': {'type': 'string'},
9525 'Info': {'$ref': '#/definitions/ErrorInfo'},
9526 'Message': {'type': 'string'}},
9527 'required': ['Message', 'Code'],
9528 'type': 'object'},
9529 'ErrorInfo': {'additionalProperties': False,
9530 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9531 'MacaroonPath': {'type': 'string'}},
9532 'type': 'object'},
9533 'ErrorResult': {'additionalProperties': False,
9534 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9535 'required': ['Error'],
9536 'type': 'object'},
9537 'ErrorResults': {'additionalProperties': False,
9538 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9539 'type': 'array'}},
9540 'required': ['Results'],
9541 'type': 'object'},
9542 'ListSubnetsResults': {'additionalProperties': False,
9543 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
9544 'type': 'array'}},
9545 'required': ['Results'],
9546 'type': 'object'},
9547 'Macaroon': {'additionalProperties': False,
9548 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9549 'type': 'array'},
9550 'data': {'items': {'type': 'integer'},
9551 'type': 'array'},
9552 'id': {'$ref': '#/definitions/packet'},
9553 'location': {'$ref': '#/definitions/packet'},
9554 'sig': {'items': {'type': 'integer'},
9555 'type': 'array'}},
9556 'required': ['data',
9557 'location',
9558 'id',
9559 'caveats',
9560 'sig'],
9561 'type': 'object'},
9562 'ModelConfigResult': {'additionalProperties': False,
9563 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
9564 'type': 'object'}},
9565 'type': 'object'}},
9566 'required': ['Config'],
9567 'type': 'object'},
9568 'ProviderSpace': {'additionalProperties': False,
9569 'properties': {'Error': {'$ref': '#/definitions/Error'},
9570 'Name': {'type': 'string'},
9571 'ProviderId': {'type': 'string'},
9572 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
9573 'type': 'array'}},
9574 'required': ['Name',
9575 'ProviderId',
9576 'Subnets'],
9577 'type': 'object'},
9578 'Subnet': {'additionalProperties': False,
9579 'properties': {'CIDR': {'type': 'string'},
9580 'Life': {'type': 'string'},
9581 'ProviderId': {'type': 'string'},
9582 'SpaceTag': {'type': 'string'},
9583 'StaticRangeHighIP': {'items': {'type': 'integer'},
9584 'type': 'array'},
9585 'StaticRangeLowIP': {'items': {'type': 'integer'},
9586 'type': 'array'},
9587 'Status': {'type': 'string'},
9588 'VLANTag': {'type': 'integer'},
9589 'Zones': {'items': {'type': 'string'},
9590 'type': 'array'}},
9591 'required': ['CIDR',
9592 'VLANTag',
9593 'Life',
9594 'SpaceTag',
9595 'Zones'],
9596 'type': 'object'},
9597 'SubnetsFilters': {'additionalProperties': False,
9598 'properties': {'SpaceTag': {'type': 'string'},
9599 'Zone': {'type': 'string'}},
9600 'type': 'object'},
9601 'caveat': {'additionalProperties': False,
9602 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9603 'location': {'$ref': '#/definitions/packet'},
9604 'verificationId': {'$ref': '#/definitions/packet'}},
9605 'required': ['location',
9606 'caveatId',
9607 'verificationId'],
9608 'type': 'object'},
9609 'packet': {'additionalProperties': False,
9610 'properties': {'headerLen': {'type': 'integer'},
9611 'start': {'type': 'integer'},
9612 'totalLen': {'type': 'integer'}},
9613 'required': ['start', 'totalLen', 'headerLen'],
9614 'type': 'object'}},
9615 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
9616 'Result': {'$ref': '#/definitions/ErrorResults'}},
9617 'type': 'object'},
9618 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
9619 'Result': {'$ref': '#/definitions/ErrorResults'}},
9620 'type': 'object'},
9621 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
9622 'type': 'object'},
9623 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
9624 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
9625 'type': 'object'},
9626 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
9627 'type': 'object'}},
9628 'type': 'object'}
9629
9630
9631 @ReturnMapping(ErrorResults)
9632 async def AddSubnets(self, subnets):
9633 '''
9634 subnets : typing.Sequence[~AddSubnetParams]
9635 Returns -> typing.Sequence[~ErrorResult]
9636 '''
9637 # map input types to rpc msg
9638 params = dict()
9639 msg = dict(Type='DiscoverSpaces', Request='AddSubnets', Version=2, Params=params)
9640 params['Subnets'] = subnets
9641 reply = await self.rpc(msg)
9642 return reply
9643
9644
9645
9646 @ReturnMapping(ErrorResults)
9647 async def CreateSpaces(self, spaces):
9648 '''
9649 spaces : typing.Sequence[~CreateSpaceParams]
9650 Returns -> typing.Sequence[~ErrorResult]
9651 '''
9652 # map input types to rpc msg
9653 params = dict()
9654 msg = dict(Type='DiscoverSpaces', Request='CreateSpaces', Version=2, Params=params)
9655 params['Spaces'] = spaces
9656 reply = await self.rpc(msg)
9657 return reply
9658
9659
9660
9661 @ReturnMapping(DiscoverSpacesResults)
9662 async def ListSpaces(self):
9663 '''
9664
9665 Returns -> typing.Sequence[~ProviderSpace]
9666 '''
9667 # map input types to rpc msg
9668 params = dict()
9669 msg = dict(Type='DiscoverSpaces', Request='ListSpaces', Version=2, Params=params)
9670
9671 reply = await self.rpc(msg)
9672 return reply
9673
9674
9675
9676 @ReturnMapping(ListSubnetsResults)
9677 async def ListSubnets(self, spacetag, zone):
9678 '''
9679 spacetag : str
9680 zone : str
9681 Returns -> typing.Sequence[~Subnet]
9682 '''
9683 # map input types to rpc msg
9684 params = dict()
9685 msg = dict(Type='DiscoverSpaces', Request='ListSubnets', Version=2, Params=params)
9686 params['SpaceTag'] = spacetag
9687 params['Zone'] = zone
9688 reply = await self.rpc(msg)
9689 return reply
9690
9691
9692
9693 @ReturnMapping(ModelConfigResult)
9694 async def ModelConfig(self):
9695 '''
9696
9697 Returns -> typing.Mapping[str, typing.Any]
9698 '''
9699 # map input types to rpc msg
9700 params = dict()
9701 msg = dict(Type='DiscoverSpaces', Request='ModelConfig', Version=2, Params=params)
9702
9703 reply = await self.rpc(msg)
9704 return reply
9705
9706
9707 class DiskManager(Type):
9708 name = 'DiskManager'
9709 version = 2
9710 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
9711 'properties': {'BusAddress': {'type': 'string'},
9712 'DeviceLinks': {'items': {'type': 'string'},
9713 'type': 'array'},
9714 'DeviceName': {'type': 'string'},
9715 'FilesystemType': {'type': 'string'},
9716 'HardwareId': {'type': 'string'},
9717 'InUse': {'type': 'boolean'},
9718 'Label': {'type': 'string'},
9719 'MountPoint': {'type': 'string'},
9720 'Size': {'type': 'integer'},
9721 'UUID': {'type': 'string'}},
9722 'required': ['DeviceName',
9723 'DeviceLinks',
9724 'Label',
9725 'UUID',
9726 'HardwareId',
9727 'BusAddress',
9728 'Size',
9729 'FilesystemType',
9730 'InUse',
9731 'MountPoint'],
9732 'type': 'object'},
9733 'Error': {'additionalProperties': False,
9734 'properties': {'Code': {'type': 'string'},
9735 'Info': {'$ref': '#/definitions/ErrorInfo'},
9736 'Message': {'type': 'string'}},
9737 'required': ['Message', 'Code'],
9738 'type': 'object'},
9739 'ErrorInfo': {'additionalProperties': False,
9740 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9741 'MacaroonPath': {'type': 'string'}},
9742 'type': 'object'},
9743 'ErrorResult': {'additionalProperties': False,
9744 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9745 'required': ['Error'],
9746 'type': 'object'},
9747 'ErrorResults': {'additionalProperties': False,
9748 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9749 'type': 'array'}},
9750 'required': ['Results'],
9751 'type': 'object'},
9752 'Macaroon': {'additionalProperties': False,
9753 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9754 'type': 'array'},
9755 'data': {'items': {'type': 'integer'},
9756 'type': 'array'},
9757 'id': {'$ref': '#/definitions/packet'},
9758 'location': {'$ref': '#/definitions/packet'},
9759 'sig': {'items': {'type': 'integer'},
9760 'type': 'array'}},
9761 'required': ['data',
9762 'location',
9763 'id',
9764 'caveats',
9765 'sig'],
9766 'type': 'object'},
9767 'MachineBlockDevices': {'additionalProperties': False,
9768 'properties': {'blockdevices': {'items': {'$ref': '#/definitions/BlockDevice'},
9769 'type': 'array'},
9770 'machine': {'type': 'string'}},
9771 'required': ['machine'],
9772 'type': 'object'},
9773 'SetMachineBlockDevices': {'additionalProperties': False,
9774 'properties': {'machineblockdevices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
9775 'type': 'array'}},
9776 'required': ['machineblockdevices'],
9777 'type': 'object'},
9778 'caveat': {'additionalProperties': False,
9779 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9780 'location': {'$ref': '#/definitions/packet'},
9781 'verificationId': {'$ref': '#/definitions/packet'}},
9782 'required': ['location',
9783 'caveatId',
9784 'verificationId'],
9785 'type': 'object'},
9786 'packet': {'additionalProperties': False,
9787 'properties': {'headerLen': {'type': 'integer'},
9788 'start': {'type': 'integer'},
9789 'totalLen': {'type': 'integer'}},
9790 'required': ['start', 'totalLen', 'headerLen'],
9791 'type': 'object'}},
9792 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
9793 'Result': {'$ref': '#/definitions/ErrorResults'}},
9794 'type': 'object'}},
9795 'type': 'object'}
9796
9797
9798 @ReturnMapping(ErrorResults)
9799 async def SetMachineBlockDevices(self, machineblockdevices):
9800 '''
9801 machineblockdevices : typing.Sequence[~MachineBlockDevices]
9802 Returns -> typing.Sequence[~ErrorResult]
9803 '''
9804 # map input types to rpc msg
9805 params = dict()
9806 msg = dict(Type='DiskManager', Request='SetMachineBlockDevices', Version=2, Params=params)
9807 params['machineblockdevices'] = machineblockdevices
9808 reply = await self.rpc(msg)
9809 return reply
9810
9811
9812 class EntityWatcher(Type):
9813 name = 'EntityWatcher'
9814 version = 2
9815 schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
9816 'properties': {'Changes': {'items': {'type': 'string'},
9817 'type': 'array'},
9818 'EntityWatcherId': {'type': 'string'},
9819 'Error': {'$ref': '#/definitions/Error'}},
9820 'required': ['EntityWatcherId',
9821 'Changes',
9822 'Error'],
9823 'type': 'object'},
9824 'Error': {'additionalProperties': False,
9825 'properties': {'Code': {'type': 'string'},
9826 'Info': {'$ref': '#/definitions/ErrorInfo'},
9827 'Message': {'type': 'string'}},
9828 'required': ['Message', 'Code'],
9829 'type': 'object'},
9830 'ErrorInfo': {'additionalProperties': False,
9831 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9832 'MacaroonPath': {'type': 'string'}},
9833 'type': 'object'},
9834 'Macaroon': {'additionalProperties': False,
9835 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9836 'type': 'array'},
9837 'data': {'items': {'type': 'integer'},
9838 'type': 'array'},
9839 'id': {'$ref': '#/definitions/packet'},
9840 'location': {'$ref': '#/definitions/packet'},
9841 'sig': {'items': {'type': 'integer'},
9842 'type': 'array'}},
9843 'required': ['data',
9844 'location',
9845 'id',
9846 'caveats',
9847 'sig'],
9848 'type': 'object'},
9849 'caveat': {'additionalProperties': False,
9850 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9851 'location': {'$ref': '#/definitions/packet'},
9852 'verificationId': {'$ref': '#/definitions/packet'}},
9853 'required': ['location',
9854 'caveatId',
9855 'verificationId'],
9856 'type': 'object'},
9857 'packet': {'additionalProperties': False,
9858 'properties': {'headerLen': {'type': 'integer'},
9859 'start': {'type': 'integer'},
9860 'totalLen': {'type': 'integer'}},
9861 'required': ['start', 'totalLen', 'headerLen'],
9862 'type': 'object'}},
9863 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
9864 'type': 'object'},
9865 'Stop': {'type': 'object'}},
9866 'type': 'object'}
9867
9868
9869 @ReturnMapping(EntitiesWatchResult)
9870 async def Next(self):
9871 '''
9872
9873 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
9874 '''
9875 # map input types to rpc msg
9876 params = dict()
9877 msg = dict(Type='EntityWatcher', Request='Next', Version=2, Params=params)
9878
9879 reply = await self.rpc(msg)
9880 return reply
9881
9882
9883
9884 @ReturnMapping(None)
9885 async def Stop(self):
9886 '''
9887
9888 Returns -> None
9889 '''
9890 # map input types to rpc msg
9891 params = dict()
9892 msg = dict(Type='EntityWatcher', Request='Stop', Version=2, Params=params)
9893
9894 reply = await self.rpc(msg)
9895 return reply
9896
9897
9898 class FilesystemAttachmentsWatcher(Type):
9899 name = 'FilesystemAttachmentsWatcher'
9900 version = 2
9901 schema = {'definitions': {'Error': {'additionalProperties': False,
9902 'properties': {'Code': {'type': 'string'},
9903 'Info': {'$ref': '#/definitions/ErrorInfo'},
9904 'Message': {'type': 'string'}},
9905 'required': ['Message', 'Code'],
9906 'type': 'object'},
9907 'ErrorInfo': {'additionalProperties': False,
9908 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9909 'MacaroonPath': {'type': 'string'}},
9910 'type': 'object'},
9911 'Macaroon': {'additionalProperties': False,
9912 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9913 'type': 'array'},
9914 'data': {'items': {'type': 'integer'},
9915 'type': 'array'},
9916 'id': {'$ref': '#/definitions/packet'},
9917 'location': {'$ref': '#/definitions/packet'},
9918 'sig': {'items': {'type': 'integer'},
9919 'type': 'array'}},
9920 'required': ['data',
9921 'location',
9922 'id',
9923 'caveats',
9924 'sig'],
9925 'type': 'object'},
9926 'MachineStorageId': {'additionalProperties': False,
9927 'properties': {'attachmenttag': {'type': 'string'},
9928 'machinetag': {'type': 'string'}},
9929 'required': ['machinetag',
9930 'attachmenttag'],
9931 'type': 'object'},
9932 'MachineStorageIdsWatchResult': {'additionalProperties': False,
9933 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
9934 'type': 'array'},
9935 'Error': {'$ref': '#/definitions/Error'},
9936 'MachineStorageIdsWatcherId': {'type': 'string'}},
9937 'required': ['MachineStorageIdsWatcherId',
9938 'Changes',
9939 'Error'],
9940 'type': 'object'},
9941 'caveat': {'additionalProperties': False,
9942 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9943 'location': {'$ref': '#/definitions/packet'},
9944 'verificationId': {'$ref': '#/definitions/packet'}},
9945 'required': ['location',
9946 'caveatId',
9947 'verificationId'],
9948 'type': 'object'},
9949 'packet': {'additionalProperties': False,
9950 'properties': {'headerLen': {'type': 'integer'},
9951 'start': {'type': 'integer'},
9952 'totalLen': {'type': 'integer'}},
9953 'required': ['start', 'totalLen', 'headerLen'],
9954 'type': 'object'}},
9955 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
9956 'type': 'object'},
9957 'Stop': {'type': 'object'}},
9958 'type': 'object'}
9959
9960
9961 @ReturnMapping(MachineStorageIdsWatchResult)
9962 async def Next(self):
9963 '''
9964
9965 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
9966 '''
9967 # map input types to rpc msg
9968 params = dict()
9969 msg = dict(Type='FilesystemAttachmentsWatcher', Request='Next', Version=2, Params=params)
9970
9971 reply = await self.rpc(msg)
9972 return reply
9973
9974
9975
9976 @ReturnMapping(None)
9977 async def Stop(self):
9978 '''
9979
9980 Returns -> None
9981 '''
9982 # map input types to rpc msg
9983 params = dict()
9984 msg = dict(Type='FilesystemAttachmentsWatcher', Request='Stop', Version=2, Params=params)
9985
9986 reply = await self.rpc(msg)
9987 return reply
9988
9989
9990 class Firewaller(Type):
9991 name = 'Firewaller'
9992 version = 3
9993 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
9994 'properties': {'Error': {'$ref': '#/definitions/Error'},
9995 'Result': {'type': 'boolean'}},
9996 'required': ['Error', 'Result'],
9997 'type': 'object'},
9998 'BoolResults': {'additionalProperties': False,
9999 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
10000 'type': 'array'}},
10001 'required': ['Results'],
10002 'type': 'object'},
10003 'Entities': {'additionalProperties': False,
10004 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10005 'type': 'array'}},
10006 'required': ['Entities'],
10007 'type': 'object'},
10008 'Entity': {'additionalProperties': False,
10009 'properties': {'Tag': {'type': 'string'}},
10010 'required': ['Tag'],
10011 'type': 'object'},
10012 'Error': {'additionalProperties': False,
10013 'properties': {'Code': {'type': 'string'},
10014 'Info': {'$ref': '#/definitions/ErrorInfo'},
10015 'Message': {'type': 'string'}},
10016 'required': ['Message', 'Code'],
10017 'type': 'object'},
10018 'ErrorInfo': {'additionalProperties': False,
10019 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10020 'MacaroonPath': {'type': 'string'}},
10021 'type': 'object'},
10022 'LifeResult': {'additionalProperties': False,
10023 'properties': {'Error': {'$ref': '#/definitions/Error'},
10024 'Life': {'type': 'string'}},
10025 'required': ['Life', 'Error'],
10026 'type': 'object'},
10027 'LifeResults': {'additionalProperties': False,
10028 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
10029 'type': 'array'}},
10030 'required': ['Results'],
10031 'type': 'object'},
10032 'Macaroon': {'additionalProperties': False,
10033 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10034 'type': 'array'},
10035 'data': {'items': {'type': 'integer'},
10036 'type': 'array'},
10037 'id': {'$ref': '#/definitions/packet'},
10038 'location': {'$ref': '#/definitions/packet'},
10039 'sig': {'items': {'type': 'integer'},
10040 'type': 'array'}},
10041 'required': ['data',
10042 'location',
10043 'id',
10044 'caveats',
10045 'sig'],
10046 'type': 'object'},
10047 'MachinePortRange': {'additionalProperties': False,
10048 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
10049 'RelationTag': {'type': 'string'},
10050 'UnitTag': {'type': 'string'}},
10051 'required': ['UnitTag',
10052 'RelationTag',
10053 'PortRange'],
10054 'type': 'object'},
10055 'MachinePorts': {'additionalProperties': False,
10056 'properties': {'MachineTag': {'type': 'string'},
10057 'SubnetTag': {'type': 'string'}},
10058 'required': ['MachineTag', 'SubnetTag'],
10059 'type': 'object'},
10060 'MachinePortsParams': {'additionalProperties': False,
10061 'properties': {'Params': {'items': {'$ref': '#/definitions/MachinePorts'},
10062 'type': 'array'}},
10063 'required': ['Params'],
10064 'type': 'object'},
10065 'MachinePortsResult': {'additionalProperties': False,
10066 'properties': {'Error': {'$ref': '#/definitions/Error'},
10067 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
10068 'type': 'array'}},
10069 'required': ['Error', 'Ports'],
10070 'type': 'object'},
10071 'MachinePortsResults': {'additionalProperties': False,
10072 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
10073 'type': 'array'}},
10074 'required': ['Results'],
10075 'type': 'object'},
10076 'ModelConfigResult': {'additionalProperties': False,
10077 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
10078 'type': 'object'}},
10079 'type': 'object'}},
10080 'required': ['Config'],
10081 'type': 'object'},
10082 'NotifyWatchResult': {'additionalProperties': False,
10083 'properties': {'Error': {'$ref': '#/definitions/Error'},
10084 'NotifyWatcherId': {'type': 'string'}},
10085 'required': ['NotifyWatcherId', 'Error'],
10086 'type': 'object'},
10087 'NotifyWatchResults': {'additionalProperties': False,
10088 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10089 'type': 'array'}},
10090 'required': ['Results'],
10091 'type': 'object'},
10092 'PortRange': {'additionalProperties': False,
10093 'properties': {'FromPort': {'type': 'integer'},
10094 'Protocol': {'type': 'string'},
10095 'ToPort': {'type': 'integer'}},
10096 'required': ['FromPort', 'ToPort', 'Protocol'],
10097 'type': 'object'},
10098 'StringResult': {'additionalProperties': False,
10099 'properties': {'Error': {'$ref': '#/definitions/Error'},
10100 'Result': {'type': 'string'}},
10101 'required': ['Error', 'Result'],
10102 'type': 'object'},
10103 'StringResults': {'additionalProperties': False,
10104 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
10105 'type': 'array'}},
10106 'required': ['Results'],
10107 'type': 'object'},
10108 'StringsResult': {'additionalProperties': False,
10109 'properties': {'Error': {'$ref': '#/definitions/Error'},
10110 'Result': {'items': {'type': 'string'},
10111 'type': 'array'}},
10112 'required': ['Error', 'Result'],
10113 'type': 'object'},
10114 'StringsResults': {'additionalProperties': False,
10115 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
10116 'type': 'array'}},
10117 'required': ['Results'],
10118 'type': 'object'},
10119 'StringsWatchResult': {'additionalProperties': False,
10120 'properties': {'Changes': {'items': {'type': 'string'},
10121 'type': 'array'},
10122 'Error': {'$ref': '#/definitions/Error'},
10123 'StringsWatcherId': {'type': 'string'}},
10124 'required': ['StringsWatcherId',
10125 'Changes',
10126 'Error'],
10127 'type': 'object'},
10128 'StringsWatchResults': {'additionalProperties': False,
10129 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
10130 'type': 'array'}},
10131 'required': ['Results'],
10132 'type': 'object'},
10133 'caveat': {'additionalProperties': False,
10134 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10135 'location': {'$ref': '#/definitions/packet'},
10136 'verificationId': {'$ref': '#/definitions/packet'}},
10137 'required': ['location',
10138 'caveatId',
10139 'verificationId'],
10140 'type': 'object'},
10141 'packet': {'additionalProperties': False,
10142 'properties': {'headerLen': {'type': 'integer'},
10143 'start': {'type': 'integer'},
10144 'totalLen': {'type': 'integer'}},
10145 'required': ['start', 'totalLen', 'headerLen'],
10146 'type': 'object'}},
10147 'properties': {'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10148 'Result': {'$ref': '#/definitions/StringResults'}},
10149 'type': 'object'},
10150 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10151 'Result': {'$ref': '#/definitions/BoolResults'}},
10152 'type': 'object'},
10153 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10154 'Result': {'$ref': '#/definitions/StringsResults'}},
10155 'type': 'object'},
10156 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
10157 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
10158 'type': 'object'},
10159 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10160 'Result': {'$ref': '#/definitions/StringResults'}},
10161 'type': 'object'},
10162 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10163 'Result': {'$ref': '#/definitions/LifeResults'}},
10164 'type': 'object'},
10165 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10166 'type': 'object'},
10167 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10168 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10169 'type': 'object'},
10170 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10171 'type': 'object'},
10172 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
10173 'type': 'object'},
10174 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10175 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10176 'type': 'object'},
10177 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10178 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10179 'type': 'object'}},
10180 'type': 'object'}
10181
10182
10183 @ReturnMapping(StringResults)
10184 async def GetAssignedMachine(self, entities):
10185 '''
10186 entities : typing.Sequence[~Entity]
10187 Returns -> typing.Sequence[~StringResult]
10188 '''
10189 # map input types to rpc msg
10190 params = dict()
10191 msg = dict(Type='Firewaller', Request='GetAssignedMachine', Version=3, Params=params)
10192 params['Entities'] = entities
10193 reply = await self.rpc(msg)
10194 return reply
10195
10196
10197
10198 @ReturnMapping(BoolResults)
10199 async def GetExposed(self, entities):
10200 '''
10201 entities : typing.Sequence[~Entity]
10202 Returns -> typing.Sequence[~BoolResult]
10203 '''
10204 # map input types to rpc msg
10205 params = dict()
10206 msg = dict(Type='Firewaller', Request='GetExposed', Version=3, Params=params)
10207 params['Entities'] = entities
10208 reply = await self.rpc(msg)
10209 return reply
10210
10211
10212
10213 @ReturnMapping(StringsResults)
10214 async def GetMachineActiveSubnets(self, entities):
10215 '''
10216 entities : typing.Sequence[~Entity]
10217 Returns -> typing.Sequence[~StringsResult]
10218 '''
10219 # map input types to rpc msg
10220 params = dict()
10221 msg = dict(Type='Firewaller', Request='GetMachineActiveSubnets', Version=3, Params=params)
10222 params['Entities'] = entities
10223 reply = await self.rpc(msg)
10224 return reply
10225
10226
10227
10228 @ReturnMapping(MachinePortsResults)
10229 async def GetMachinePorts(self, params):
10230 '''
10231 params : typing.Sequence[~MachinePorts]
10232 Returns -> typing.Sequence[~MachinePortsResult]
10233 '''
10234 # map input types to rpc msg
10235 params = dict()
10236 msg = dict(Type='Firewaller', Request='GetMachinePorts', Version=3, Params=params)
10237 params['Params'] = params
10238 reply = await self.rpc(msg)
10239 return reply
10240
10241
10242
10243 @ReturnMapping(StringResults)
10244 async def InstanceId(self, entities):
10245 '''
10246 entities : typing.Sequence[~Entity]
10247 Returns -> typing.Sequence[~StringResult]
10248 '''
10249 # map input types to rpc msg
10250 params = dict()
10251 msg = dict(Type='Firewaller', Request='InstanceId', Version=3, Params=params)
10252 params['Entities'] = entities
10253 reply = await self.rpc(msg)
10254 return reply
10255
10256
10257
10258 @ReturnMapping(LifeResults)
10259 async def Life(self, entities):
10260 '''
10261 entities : typing.Sequence[~Entity]
10262 Returns -> typing.Sequence[~LifeResult]
10263 '''
10264 # map input types to rpc msg
10265 params = dict()
10266 msg = dict(Type='Firewaller', Request='Life', Version=3, Params=params)
10267 params['Entities'] = entities
10268 reply = await self.rpc(msg)
10269 return reply
10270
10271
10272
10273 @ReturnMapping(ModelConfigResult)
10274 async def ModelConfig(self):
10275 '''
10276
10277 Returns -> typing.Mapping[str, typing.Any]
10278 '''
10279 # map input types to rpc msg
10280 params = dict()
10281 msg = dict(Type='Firewaller', Request='ModelConfig', Version=3, Params=params)
10282
10283 reply = await self.rpc(msg)
10284 return reply
10285
10286
10287
10288 @ReturnMapping(NotifyWatchResults)
10289 async def Watch(self, entities):
10290 '''
10291 entities : typing.Sequence[~Entity]
10292 Returns -> typing.Sequence[~NotifyWatchResult]
10293 '''
10294 # map input types to rpc msg
10295 params = dict()
10296 msg = dict(Type='Firewaller', Request='Watch', Version=3, Params=params)
10297 params['Entities'] = entities
10298 reply = await self.rpc(msg)
10299 return reply
10300
10301
10302
10303 @ReturnMapping(NotifyWatchResult)
10304 async def WatchForModelConfigChanges(self):
10305 '''
10306
10307 Returns -> typing.Union[_ForwardRef('Error'), str]
10308 '''
10309 # map input types to rpc msg
10310 params = dict()
10311 msg = dict(Type='Firewaller', Request='WatchForModelConfigChanges', Version=3, Params=params)
10312
10313 reply = await self.rpc(msg)
10314 return reply
10315
10316
10317
10318 @ReturnMapping(StringsWatchResult)
10319 async def WatchModelMachines(self):
10320 '''
10321
10322 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
10323 '''
10324 # map input types to rpc msg
10325 params = dict()
10326 msg = dict(Type='Firewaller', Request='WatchModelMachines', Version=3, Params=params)
10327
10328 reply = await self.rpc(msg)
10329 return reply
10330
10331
10332
10333 @ReturnMapping(StringsWatchResults)
10334 async def WatchOpenedPorts(self, entities):
10335 '''
10336 entities : typing.Sequence[~Entity]
10337 Returns -> typing.Sequence[~StringsWatchResult]
10338 '''
10339 # map input types to rpc msg
10340 params = dict()
10341 msg = dict(Type='Firewaller', Request='WatchOpenedPorts', Version=3, Params=params)
10342 params['Entities'] = entities
10343 reply = await self.rpc(msg)
10344 return reply
10345
10346
10347
10348 @ReturnMapping(StringsWatchResults)
10349 async def WatchUnits(self, entities):
10350 '''
10351 entities : typing.Sequence[~Entity]
10352 Returns -> typing.Sequence[~StringsWatchResult]
10353 '''
10354 # map input types to rpc msg
10355 params = dict()
10356 msg = dict(Type='Firewaller', Request='WatchUnits', Version=3, Params=params)
10357 params['Entities'] = entities
10358 reply = await self.rpc(msg)
10359 return reply
10360
10361
10362 class HighAvailability(Type):
10363 name = 'HighAvailability'
10364 version = 2
10365 schema = {'definitions': {'Address': {'additionalProperties': False,
10366 'properties': {'Scope': {'type': 'string'},
10367 'SpaceName': {'type': 'string'},
10368 'SpaceProviderId': {'type': 'string'},
10369 'Type': {'type': 'string'},
10370 'Value': {'type': 'string'}},
10371 'required': ['Value',
10372 'Type',
10373 'Scope',
10374 'SpaceName',
10375 'SpaceProviderId'],
10376 'type': 'object'},
10377 'ControllersChangeResult': {'additionalProperties': False,
10378 'properties': {'Error': {'$ref': '#/definitions/Error'},
10379 'Result': {'$ref': '#/definitions/ControllersChanges'}},
10380 'required': ['Result', 'Error'],
10381 'type': 'object'},
10382 'ControllersChangeResults': {'additionalProperties': False,
10383 'properties': {'Results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
10384 'type': 'array'}},
10385 'required': ['Results'],
10386 'type': 'object'},
10387 'ControllersChanges': {'additionalProperties': False,
10388 'properties': {'added': {'items': {'type': 'string'},
10389 'type': 'array'},
10390 'converted': {'items': {'type': 'string'},
10391 'type': 'array'},
10392 'demoted': {'items': {'type': 'string'},
10393 'type': 'array'},
10394 'maintained': {'items': {'type': 'string'},
10395 'type': 'array'},
10396 'promoted': {'items': {'type': 'string'},
10397 'type': 'array'},
10398 'removed': {'items': {'type': 'string'},
10399 'type': 'array'}},
10400 'type': 'object'},
10401 'ControllersSpec': {'additionalProperties': False,
10402 'properties': {'ModelTag': {'type': 'string'},
10403 'constraints': {'$ref': '#/definitions/Value'},
10404 'num-controllers': {'type': 'integer'},
10405 'placement': {'items': {'type': 'string'},
10406 'type': 'array'},
10407 'series': {'type': 'string'}},
10408 'required': ['ModelTag',
10409 'num-controllers'],
10410 'type': 'object'},
10411 'ControllersSpecs': {'additionalProperties': False,
10412 'properties': {'Specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
10413 'type': 'array'}},
10414 'required': ['Specs'],
10415 'type': 'object'},
10416 'Error': {'additionalProperties': False,
10417 'properties': {'Code': {'type': 'string'},
10418 'Info': {'$ref': '#/definitions/ErrorInfo'},
10419 'Message': {'type': 'string'}},
10420 'required': ['Message', 'Code'],
10421 'type': 'object'},
10422 'ErrorInfo': {'additionalProperties': False,
10423 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10424 'MacaroonPath': {'type': 'string'}},
10425 'type': 'object'},
10426 'HAMember': {'additionalProperties': False,
10427 'properties': {'PublicAddress': {'$ref': '#/definitions/Address'},
10428 'Series': {'type': 'string'},
10429 'Tag': {'type': 'string'}},
10430 'required': ['Tag', 'PublicAddress', 'Series'],
10431 'type': 'object'},
10432 'Macaroon': {'additionalProperties': False,
10433 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10434 'type': 'array'},
10435 'data': {'items': {'type': 'integer'},
10436 'type': 'array'},
10437 'id': {'$ref': '#/definitions/packet'},
10438 'location': {'$ref': '#/definitions/packet'},
10439 'sig': {'items': {'type': 'integer'},
10440 'type': 'array'}},
10441 'required': ['data',
10442 'location',
10443 'id',
10444 'caveats',
10445 'sig'],
10446 'type': 'object'},
10447 'Member': {'additionalProperties': False,
10448 'properties': {'Address': {'type': 'string'},
10449 'Arbiter': {'type': 'boolean'},
10450 'BuildIndexes': {'type': 'boolean'},
10451 'Hidden': {'type': 'boolean'},
10452 'Id': {'type': 'integer'},
10453 'Priority': {'type': 'number'},
10454 'SlaveDelay': {'type': 'integer'},
10455 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
10456 'type': 'object'},
10457 'Votes': {'type': 'integer'}},
10458 'required': ['Id',
10459 'Address',
10460 'Arbiter',
10461 'BuildIndexes',
10462 'Hidden',
10463 'Priority',
10464 'Tags',
10465 'SlaveDelay',
10466 'Votes'],
10467 'type': 'object'},
10468 'MongoUpgradeResults': {'additionalProperties': False,
10469 'properties': {'Master': {'$ref': '#/definitions/HAMember'},
10470 'Members': {'items': {'$ref': '#/definitions/HAMember'},
10471 'type': 'array'},
10472 'RsMembers': {'items': {'$ref': '#/definitions/Member'},
10473 'type': 'array'}},
10474 'required': ['RsMembers',
10475 'Master',
10476 'Members'],
10477 'type': 'object'},
10478 'ResumeReplicationParams': {'additionalProperties': False,
10479 'properties': {'Members': {'items': {'$ref': '#/definitions/Member'},
10480 'type': 'array'}},
10481 'required': ['Members'],
10482 'type': 'object'},
10483 'UpgradeMongoParams': {'additionalProperties': False,
10484 'properties': {'Target': {'$ref': '#/definitions/Version'}},
10485 'required': ['Target'],
10486 'type': 'object'},
10487 'Value': {'additionalProperties': False,
10488 'properties': {'arch': {'type': 'string'},
10489 'container': {'type': 'string'},
10490 'cpu-cores': {'type': 'integer'},
10491 'cpu-power': {'type': 'integer'},
10492 'instance-type': {'type': 'string'},
10493 'mem': {'type': 'integer'},
10494 'root-disk': {'type': 'integer'},
10495 'spaces': {'items': {'type': 'string'},
10496 'type': 'array'},
10497 'tags': {'items': {'type': 'string'},
10498 'type': 'array'},
10499 'virt-type': {'type': 'string'}},
10500 'type': 'object'},
10501 'Version': {'additionalProperties': False,
10502 'properties': {'Major': {'type': 'integer'},
10503 'Minor': {'type': 'integer'},
10504 'Patch': {'type': 'string'},
10505 'StorageEngine': {'type': 'string'}},
10506 'required': ['Major',
10507 'Minor',
10508 'Patch',
10509 'StorageEngine'],
10510 'type': 'object'},
10511 'caveat': {'additionalProperties': False,
10512 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10513 'location': {'$ref': '#/definitions/packet'},
10514 'verificationId': {'$ref': '#/definitions/packet'}},
10515 'required': ['location',
10516 'caveatId',
10517 'verificationId'],
10518 'type': 'object'},
10519 'packet': {'additionalProperties': False,
10520 'properties': {'headerLen': {'type': 'integer'},
10521 'start': {'type': 'integer'},
10522 'totalLen': {'type': 'integer'}},
10523 'required': ['start', 'totalLen', 'headerLen'],
10524 'type': 'object'}},
10525 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
10526 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
10527 'type': 'object'},
10528 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
10529 'type': 'object'},
10530 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
10531 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
10532 'type': 'object'}},
10533 'type': 'object'}
10534
10535
10536 @ReturnMapping(ControllersChangeResults)
10537 async def EnableHA(self, specs):
10538 '''
10539 specs : typing.Sequence[~ControllersSpec]
10540 Returns -> typing.Sequence[~ControllersChangeResult]
10541 '''
10542 # map input types to rpc msg
10543 params = dict()
10544 msg = dict(Type='HighAvailability', Request='EnableHA', Version=2, Params=params)
10545 params['Specs'] = specs
10546 reply = await self.rpc(msg)
10547 return reply
10548
10549
10550
10551 @ReturnMapping(None)
10552 async def ResumeHAReplicationAfterUpgrade(self, members):
10553 '''
10554 members : typing.Sequence[~Member]
10555 Returns -> None
10556 '''
10557 # map input types to rpc msg
10558 params = dict()
10559 msg = dict(Type='HighAvailability', Request='ResumeHAReplicationAfterUpgrade', Version=2, Params=params)
10560 params['Members'] = members
10561 reply = await self.rpc(msg)
10562 return reply
10563
10564
10565
10566 @ReturnMapping(MongoUpgradeResults)
10567 async def StopHAReplicationForUpgrade(self, major, minor, patch, storageengine):
10568 '''
10569 major : int
10570 minor : int
10571 patch : str
10572 storageengine : str
10573 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence[~Member]]
10574 '''
10575 # map input types to rpc msg
10576 params = dict()
10577 msg = dict(Type='HighAvailability', Request='StopHAReplicationForUpgrade', Version=2, Params=params)
10578 params['Major'] = major
10579 params['Minor'] = minor
10580 params['Patch'] = patch
10581 params['StorageEngine'] = storageengine
10582 reply = await self.rpc(msg)
10583 return reply
10584
10585
10586 class HostKeyReporter(Type):
10587 name = 'HostKeyReporter'
10588 version = 1
10589 schema = {'definitions': {'Error': {'additionalProperties': False,
10590 'properties': {'Code': {'type': 'string'},
10591 'Info': {'$ref': '#/definitions/ErrorInfo'},
10592 'Message': {'type': 'string'}},
10593 'required': ['Message', 'Code'],
10594 'type': 'object'},
10595 'ErrorInfo': {'additionalProperties': False,
10596 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10597 'MacaroonPath': {'type': 'string'}},
10598 'type': 'object'},
10599 'ErrorResult': {'additionalProperties': False,
10600 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10601 'required': ['Error'],
10602 'type': 'object'},
10603 'ErrorResults': {'additionalProperties': False,
10604 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10605 'type': 'array'}},
10606 'required': ['Results'],
10607 'type': 'object'},
10608 'Macaroon': {'additionalProperties': False,
10609 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10610 'type': 'array'},
10611 'data': {'items': {'type': 'integer'},
10612 'type': 'array'},
10613 'id': {'$ref': '#/definitions/packet'},
10614 'location': {'$ref': '#/definitions/packet'},
10615 'sig': {'items': {'type': 'integer'},
10616 'type': 'array'}},
10617 'required': ['data',
10618 'location',
10619 'id',
10620 'caveats',
10621 'sig'],
10622 'type': 'object'},
10623 'SSHHostKeySet': {'additionalProperties': False,
10624 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
10625 'type': 'array'}},
10626 'required': ['entity-keys'],
10627 'type': 'object'},
10628 'SSHHostKeys': {'additionalProperties': False,
10629 'properties': {'public-keys': {'items': {'type': 'string'},
10630 'type': 'array'},
10631 'tag': {'type': 'string'}},
10632 'required': ['tag', 'public-keys'],
10633 'type': 'object'},
10634 'caveat': {'additionalProperties': False,
10635 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10636 'location': {'$ref': '#/definitions/packet'},
10637 'verificationId': {'$ref': '#/definitions/packet'}},
10638 'required': ['location',
10639 'caveatId',
10640 'verificationId'],
10641 'type': 'object'},
10642 'packet': {'additionalProperties': False,
10643 'properties': {'headerLen': {'type': 'integer'},
10644 'start': {'type': 'integer'},
10645 'totalLen': {'type': 'integer'}},
10646 'required': ['start', 'totalLen', 'headerLen'],
10647 'type': 'object'}},
10648 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
10649 'Result': {'$ref': '#/definitions/ErrorResults'}},
10650 'type': 'object'}},
10651 'type': 'object'}
10652
10653
10654 @ReturnMapping(ErrorResults)
10655 async def ReportKeys(self, entity_keys):
10656 '''
10657 entity_keys : typing.Sequence[~SSHHostKeys]
10658 Returns -> typing.Sequence[~ErrorResult]
10659 '''
10660 # map input types to rpc msg
10661 params = dict()
10662 msg = dict(Type='HostKeyReporter', Request='ReportKeys', Version=1, Params=params)
10663 params['entity-keys'] = entity_keys
10664 reply = await self.rpc(msg)
10665 return reply
10666
10667
10668 class ImageManager(Type):
10669 name = 'ImageManager'
10670 version = 2
10671 schema = {'definitions': {'Error': {'additionalProperties': False,
10672 'properties': {'Code': {'type': 'string'},
10673 'Info': {'$ref': '#/definitions/ErrorInfo'},
10674 'Message': {'type': 'string'}},
10675 'required': ['Message', 'Code'],
10676 'type': 'object'},
10677 'ErrorInfo': {'additionalProperties': False,
10678 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10679 'MacaroonPath': {'type': 'string'}},
10680 'type': 'object'},
10681 'ErrorResult': {'additionalProperties': False,
10682 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10683 'required': ['Error'],
10684 'type': 'object'},
10685 'ErrorResults': {'additionalProperties': False,
10686 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10687 'type': 'array'}},
10688 'required': ['Results'],
10689 'type': 'object'},
10690 'ImageFilterParams': {'additionalProperties': False,
10691 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
10692 'type': 'array'}},
10693 'required': ['images'],
10694 'type': 'object'},
10695 'ImageMetadata': {'additionalProperties': False,
10696 'properties': {'arch': {'type': 'string'},
10697 'created': {'format': 'date-time',
10698 'type': 'string'},
10699 'kind': {'type': 'string'},
10700 'series': {'type': 'string'},
10701 'url': {'type': 'string'}},
10702 'required': ['kind',
10703 'arch',
10704 'series',
10705 'url',
10706 'created'],
10707 'type': 'object'},
10708 'ImageSpec': {'additionalProperties': False,
10709 'properties': {'arch': {'type': 'string'},
10710 'kind': {'type': 'string'},
10711 'series': {'type': 'string'}},
10712 'required': ['kind', 'arch', 'series'],
10713 'type': 'object'},
10714 'ListImageResult': {'additionalProperties': False,
10715 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
10716 'type': 'array'}},
10717 'required': ['result'],
10718 'type': 'object'},
10719 'Macaroon': {'additionalProperties': False,
10720 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10721 'type': 'array'},
10722 'data': {'items': {'type': 'integer'},
10723 'type': 'array'},
10724 'id': {'$ref': '#/definitions/packet'},
10725 'location': {'$ref': '#/definitions/packet'},
10726 'sig': {'items': {'type': 'integer'},
10727 'type': 'array'}},
10728 'required': ['data',
10729 'location',
10730 'id',
10731 'caveats',
10732 'sig'],
10733 'type': 'object'},
10734 'caveat': {'additionalProperties': False,
10735 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10736 'location': {'$ref': '#/definitions/packet'},
10737 'verificationId': {'$ref': '#/definitions/packet'}},
10738 'required': ['location',
10739 'caveatId',
10740 'verificationId'],
10741 'type': 'object'},
10742 'packet': {'additionalProperties': False,
10743 'properties': {'headerLen': {'type': 'integer'},
10744 'start': {'type': 'integer'},
10745 'totalLen': {'type': 'integer'}},
10746 'required': ['start', 'totalLen', 'headerLen'],
10747 'type': 'object'}},
10748 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
10749 'Result': {'$ref': '#/definitions/ErrorResults'}},
10750 'type': 'object'},
10751 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
10752 'Result': {'$ref': '#/definitions/ListImageResult'}},
10753 'type': 'object'}},
10754 'type': 'object'}
10755
10756
10757 @ReturnMapping(ErrorResults)
10758 async def DeleteImages(self, images):
10759 '''
10760 images : typing.Sequence[~ImageSpec]
10761 Returns -> typing.Sequence[~ErrorResult]
10762 '''
10763 # map input types to rpc msg
10764 params = dict()
10765 msg = dict(Type='ImageManager', Request='DeleteImages', Version=2, Params=params)
10766 params['images'] = images
10767 reply = await self.rpc(msg)
10768 return reply
10769
10770
10771
10772 @ReturnMapping(ListImageResult)
10773 async def ListImages(self, images):
10774 '''
10775 images : typing.Sequence[~ImageSpec]
10776 Returns -> typing.Sequence[~ImageMetadata]
10777 '''
10778 # map input types to rpc msg
10779 params = dict()
10780 msg = dict(Type='ImageManager', Request='ListImages', Version=2, Params=params)
10781 params['images'] = images
10782 reply = await self.rpc(msg)
10783 return reply
10784
10785
10786 class ImageMetadata(Type):
10787 name = 'ImageMetadata'
10788 version = 2
10789 schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
10790 'properties': {'arch': {'type': 'string'},
10791 'image_id': {'type': 'string'},
10792 'priority': {'type': 'integer'},
10793 'region': {'type': 'string'},
10794 'root_storage_size': {'type': 'integer'},
10795 'root_storage_type': {'type': 'string'},
10796 'series': {'type': 'string'},
10797 'source': {'type': 'string'},
10798 'stream': {'type': 'string'},
10799 'version': {'type': 'string'},
10800 'virt_type': {'type': 'string'}},
10801 'required': ['image_id',
10802 'region',
10803 'version',
10804 'series',
10805 'arch',
10806 'source',
10807 'priority'],
10808 'type': 'object'},
10809 'CloudImageMetadataList': {'additionalProperties': False,
10810 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
10811 'type': 'array'}},
10812 'type': 'object'},
10813 'Error': {'additionalProperties': False,
10814 'properties': {'Code': {'type': 'string'},
10815 'Info': {'$ref': '#/definitions/ErrorInfo'},
10816 'Message': {'type': 'string'}},
10817 'required': ['Message', 'Code'],
10818 'type': 'object'},
10819 'ErrorInfo': {'additionalProperties': False,
10820 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10821 'MacaroonPath': {'type': 'string'}},
10822 'type': 'object'},
10823 'ErrorResult': {'additionalProperties': False,
10824 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10825 'required': ['Error'],
10826 'type': 'object'},
10827 'ErrorResults': {'additionalProperties': False,
10828 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10829 'type': 'array'}},
10830 'required': ['Results'],
10831 'type': 'object'},
10832 'ImageMetadataFilter': {'additionalProperties': False,
10833 'properties': {'arches': {'items': {'type': 'string'},
10834 'type': 'array'},
10835 'region': {'type': 'string'},
10836 'root-storage-type': {'type': 'string'},
10837 'series': {'items': {'type': 'string'},
10838 'type': 'array'},
10839 'stream': {'type': 'string'},
10840 'virt_type': {'type': 'string'}},
10841 'type': 'object'},
10842 'ListCloudImageMetadataResult': {'additionalProperties': False,
10843 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
10844 'type': 'array'}},
10845 'required': ['result'],
10846 'type': 'object'},
10847 'Macaroon': {'additionalProperties': False,
10848 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10849 'type': 'array'},
10850 'data': {'items': {'type': 'integer'},
10851 'type': 'array'},
10852 'id': {'$ref': '#/definitions/packet'},
10853 'location': {'$ref': '#/definitions/packet'},
10854 'sig': {'items': {'type': 'integer'},
10855 'type': 'array'}},
10856 'required': ['data',
10857 'location',
10858 'id',
10859 'caveats',
10860 'sig'],
10861 'type': 'object'},
10862 'MetadataImageIds': {'additionalProperties': False,
10863 'properties': {'image_ids': {'items': {'type': 'string'},
10864 'type': 'array'}},
10865 'required': ['image_ids'],
10866 'type': 'object'},
10867 'MetadataSaveParams': {'additionalProperties': False,
10868 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
10869 'type': 'array'}},
10870 'type': 'object'},
10871 'caveat': {'additionalProperties': False,
10872 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10873 'location': {'$ref': '#/definitions/packet'},
10874 'verificationId': {'$ref': '#/definitions/packet'}},
10875 'required': ['location',
10876 'caveatId',
10877 'verificationId'],
10878 'type': 'object'},
10879 'packet': {'additionalProperties': False,
10880 'properties': {'headerLen': {'type': 'integer'},
10881 'start': {'type': 'integer'},
10882 'totalLen': {'type': 'integer'}},
10883 'required': ['start', 'totalLen', 'headerLen'],
10884 'type': 'object'}},
10885 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
10886 'Result': {'$ref': '#/definitions/ErrorResults'}},
10887 'type': 'object'},
10888 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
10889 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
10890 'type': 'object'},
10891 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
10892 'Result': {'$ref': '#/definitions/ErrorResults'}},
10893 'type': 'object'},
10894 'UpdateFromPublishedImages': {'type': 'object'}},
10895 'type': 'object'}
10896
10897
10898 @ReturnMapping(ErrorResults)
10899 async def Delete(self, image_ids):
10900 '''
10901 image_ids : typing.Sequence[str]
10902 Returns -> typing.Sequence[~ErrorResult]
10903 '''
10904 # map input types to rpc msg
10905 params = dict()
10906 msg = dict(Type='ImageMetadata', Request='Delete', Version=2, Params=params)
10907 params['image_ids'] = image_ids
10908 reply = await self.rpc(msg)
10909 return reply
10910
10911
10912
10913 @ReturnMapping(ListCloudImageMetadataResult)
10914 async def List(self, arches, region, root_storage_type, series, stream, virt_type):
10915 '''
10916 arches : typing.Sequence[str]
10917 region : str
10918 root_storage_type : str
10919 series : typing.Sequence[str]
10920 stream : str
10921 virt_type : str
10922 Returns -> typing.Sequence[~CloudImageMetadata]
10923 '''
10924 # map input types to rpc msg
10925 params = dict()
10926 msg = dict(Type='ImageMetadata', Request='List', Version=2, Params=params)
10927 params['arches'] = arches
10928 params['region'] = region
10929 params['root-storage-type'] = root_storage_type
10930 params['series'] = series
10931 params['stream'] = stream
10932 params['virt_type'] = virt_type
10933 reply = await self.rpc(msg)
10934 return reply
10935
10936
10937
10938 @ReturnMapping(ErrorResults)
10939 async def Save(self, metadata):
10940 '''
10941 metadata : typing.Sequence[~CloudImageMetadataList]
10942 Returns -> typing.Sequence[~ErrorResult]
10943 '''
10944 # map input types to rpc msg
10945 params = dict()
10946 msg = dict(Type='ImageMetadata', Request='Save', Version=2, Params=params)
10947 params['metadata'] = metadata
10948 reply = await self.rpc(msg)
10949 return reply
10950
10951
10952
10953 @ReturnMapping(None)
10954 async def UpdateFromPublishedImages(self):
10955 '''
10956
10957 Returns -> None
10958 '''
10959 # map input types to rpc msg
10960 params = dict()
10961 msg = dict(Type='ImageMetadata', Request='UpdateFromPublishedImages', Version=2, Params=params)
10962
10963 reply = await self.rpc(msg)
10964 return reply
10965
10966
10967 class InstancePoller(Type):
10968 name = 'InstancePoller'
10969 version = 3
10970 schema = {'definitions': {'Address': {'additionalProperties': False,
10971 'properties': {'Scope': {'type': 'string'},
10972 'SpaceName': {'type': 'string'},
10973 'Type': {'type': 'string'},
10974 'Value': {'type': 'string'}},
10975 'required': ['Value', 'Type', 'Scope'],
10976 'type': 'object'},
10977 'BoolResult': {'additionalProperties': False,
10978 'properties': {'Error': {'$ref': '#/definitions/Error'},
10979 'Result': {'type': 'boolean'}},
10980 'required': ['Error', 'Result'],
10981 'type': 'object'},
10982 'BoolResults': {'additionalProperties': False,
10983 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
10984 'type': 'array'}},
10985 'required': ['Results'],
10986 'type': 'object'},
10987 'Entities': {'additionalProperties': False,
10988 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10989 'type': 'array'}},
10990 'required': ['Entities'],
10991 'type': 'object'},
10992 'Entity': {'additionalProperties': False,
10993 'properties': {'Tag': {'type': 'string'}},
10994 'required': ['Tag'],
10995 'type': 'object'},
10996 'EntityStatusArgs': {'additionalProperties': False,
10997 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
10998 'type': 'object'}},
10999 'type': 'object'},
11000 'Info': {'type': 'string'},
11001 'Status': {'type': 'string'},
11002 'Tag': {'type': 'string'}},
11003 'required': ['Tag',
11004 'Status',
11005 'Info',
11006 'Data'],
11007 'type': 'object'},
11008 'Error': {'additionalProperties': False,
11009 'properties': {'Code': {'type': 'string'},
11010 'Info': {'$ref': '#/definitions/ErrorInfo'},
11011 'Message': {'type': 'string'}},
11012 'required': ['Message', 'Code'],
11013 'type': 'object'},
11014 'ErrorInfo': {'additionalProperties': False,
11015 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11016 'MacaroonPath': {'type': 'string'}},
11017 'type': 'object'},
11018 'ErrorResult': {'additionalProperties': False,
11019 'properties': {'Error': {'$ref': '#/definitions/Error'}},
11020 'required': ['Error'],
11021 'type': 'object'},
11022 'ErrorResults': {'additionalProperties': False,
11023 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
11024 'type': 'array'}},
11025 'required': ['Results'],
11026 'type': 'object'},
11027 'LifeResult': {'additionalProperties': False,
11028 'properties': {'Error': {'$ref': '#/definitions/Error'},
11029 'Life': {'type': 'string'}},
11030 'required': ['Life', 'Error'],
11031 'type': 'object'},
11032 'LifeResults': {'additionalProperties': False,
11033 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
11034 'type': 'array'}},
11035 'required': ['Results'],
11036 'type': 'object'},
11037 'Macaroon': {'additionalProperties': False,
11038 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11039 'type': 'array'},
11040 'data': {'items': {'type': 'integer'},
11041 'type': 'array'},
11042 'id': {'$ref': '#/definitions/packet'},
11043 'location': {'$ref': '#/definitions/packet'},
11044 'sig': {'items': {'type': 'integer'},
11045 'type': 'array'}},
11046 'required': ['data',
11047 'location',
11048 'id',
11049 'caveats',
11050 'sig'],
11051 'type': 'object'},
11052 'MachineAddresses': {'additionalProperties': False,
11053 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
11054 'type': 'array'},
11055 'Tag': {'type': 'string'}},
11056 'required': ['Tag', 'Addresses'],
11057 'type': 'object'},
11058 'MachineAddressesResult': {'additionalProperties': False,
11059 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
11060 'type': 'array'},
11061 'Error': {'$ref': '#/definitions/Error'}},
11062 'required': ['Error', 'Addresses'],
11063 'type': 'object'},
11064 'MachineAddressesResults': {'additionalProperties': False,
11065 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
11066 'type': 'array'}},
11067 'required': ['Results'],
11068 'type': 'object'},
11069 'ModelConfigResult': {'additionalProperties': False,
11070 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
11071 'type': 'object'}},
11072 'type': 'object'}},
11073 'required': ['Config'],
11074 'type': 'object'},
11075 'NotifyWatchResult': {'additionalProperties': False,
11076 'properties': {'Error': {'$ref': '#/definitions/Error'},
11077 'NotifyWatcherId': {'type': 'string'}},
11078 'required': ['NotifyWatcherId', 'Error'],
11079 'type': 'object'},
11080 'SetMachinesAddresses': {'additionalProperties': False,
11081 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
11082 'type': 'array'}},
11083 'required': ['MachineAddresses'],
11084 'type': 'object'},
11085 'SetStatus': {'additionalProperties': False,
11086 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
11087 'type': 'array'}},
11088 'required': ['Entities'],
11089 'type': 'object'},
11090 'StatusResult': {'additionalProperties': False,
11091 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
11092 'type': 'object'}},
11093 'type': 'object'},
11094 'Error': {'$ref': '#/definitions/Error'},
11095 'Id': {'type': 'string'},
11096 'Info': {'type': 'string'},
11097 'Life': {'type': 'string'},
11098 'Since': {'format': 'date-time',
11099 'type': 'string'},
11100 'Status': {'type': 'string'}},
11101 'required': ['Error',
11102 'Id',
11103 'Life',
11104 'Status',
11105 'Info',
11106 'Data',
11107 'Since'],
11108 'type': 'object'},
11109 'StatusResults': {'additionalProperties': False,
11110 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
11111 'type': 'array'}},
11112 'required': ['Results'],
11113 'type': 'object'},
11114 'StringResult': {'additionalProperties': False,
11115 'properties': {'Error': {'$ref': '#/definitions/Error'},
11116 'Result': {'type': 'string'}},
11117 'required': ['Error', 'Result'],
11118 'type': 'object'},
11119 'StringResults': {'additionalProperties': False,
11120 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
11121 'type': 'array'}},
11122 'required': ['Results'],
11123 'type': 'object'},
11124 'StringsWatchResult': {'additionalProperties': False,
11125 'properties': {'Changes': {'items': {'type': 'string'},
11126 'type': 'array'},
11127 'Error': {'$ref': '#/definitions/Error'},
11128 'StringsWatcherId': {'type': 'string'}},
11129 'required': ['StringsWatcherId',
11130 'Changes',
11131 'Error'],
11132 'type': 'object'},
11133 'caveat': {'additionalProperties': False,
11134 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11135 'location': {'$ref': '#/definitions/packet'},
11136 'verificationId': {'$ref': '#/definitions/packet'}},
11137 'required': ['location',
11138 'caveatId',
11139 'verificationId'],
11140 'type': 'object'},
11141 'packet': {'additionalProperties': False,
11142 'properties': {'headerLen': {'type': 'integer'},
11143 'start': {'type': 'integer'},
11144 'totalLen': {'type': 'integer'}},
11145 'required': ['start', 'totalLen', 'headerLen'],
11146 'type': 'object'}},
11147 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11148 'Result': {'$ref': '#/definitions/BoolResults'}},
11149 'type': 'object'},
11150 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11151 'Result': {'$ref': '#/definitions/StringResults'}},
11152 'type': 'object'},
11153 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11154 'Result': {'$ref': '#/definitions/StatusResults'}},
11155 'type': 'object'},
11156 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11157 'Result': {'$ref': '#/definitions/LifeResults'}},
11158 'type': 'object'},
11159 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11160 'type': 'object'},
11161 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11162 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
11163 'type': 'object'},
11164 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11165 'Result': {'$ref': '#/definitions/ErrorResults'}},
11166 'type': 'object'},
11167 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
11168 'Result': {'$ref': '#/definitions/ErrorResults'}},
11169 'type': 'object'},
11170 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11171 'Result': {'$ref': '#/definitions/StatusResults'}},
11172 'type': 'object'},
11173 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11174 'type': 'object'},
11175 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11176 'type': 'object'}},
11177 'type': 'object'}
11178
11179
11180 @ReturnMapping(BoolResults)
11181 async def AreManuallyProvisioned(self, entities):
11182 '''
11183 entities : typing.Sequence[~Entity]
11184 Returns -> typing.Sequence[~BoolResult]
11185 '''
11186 # map input types to rpc msg
11187 params = dict()
11188 msg = dict(Type='InstancePoller', Request='AreManuallyProvisioned', Version=3, Params=params)
11189 params['Entities'] = entities
11190 reply = await self.rpc(msg)
11191 return reply
11192
11193
11194
11195 @ReturnMapping(StringResults)
11196 async def InstanceId(self, entities):
11197 '''
11198 entities : typing.Sequence[~Entity]
11199 Returns -> typing.Sequence[~StringResult]
11200 '''
11201 # map input types to rpc msg
11202 params = dict()
11203 msg = dict(Type='InstancePoller', Request='InstanceId', Version=3, Params=params)
11204 params['Entities'] = entities
11205 reply = await self.rpc(msg)
11206 return reply
11207
11208
11209
11210 @ReturnMapping(StatusResults)
11211 async def InstanceStatus(self, entities):
11212 '''
11213 entities : typing.Sequence[~Entity]
11214 Returns -> typing.Sequence[~StatusResult]
11215 '''
11216 # map input types to rpc msg
11217 params = dict()
11218 msg = dict(Type='InstancePoller', Request='InstanceStatus', Version=3, Params=params)
11219 params['Entities'] = entities
11220 reply = await self.rpc(msg)
11221 return reply
11222
11223
11224
11225 @ReturnMapping(LifeResults)
11226 async def Life(self, entities):
11227 '''
11228 entities : typing.Sequence[~Entity]
11229 Returns -> typing.Sequence[~LifeResult]
11230 '''
11231 # map input types to rpc msg
11232 params = dict()
11233 msg = dict(Type='InstancePoller', Request='Life', Version=3, Params=params)
11234 params['Entities'] = entities
11235 reply = await self.rpc(msg)
11236 return reply
11237
11238
11239
11240 @ReturnMapping(ModelConfigResult)
11241 async def ModelConfig(self):
11242 '''
11243
11244 Returns -> typing.Mapping[str, typing.Any]
11245 '''
11246 # map input types to rpc msg
11247 params = dict()
11248 msg = dict(Type='InstancePoller', Request='ModelConfig', Version=3, Params=params)
11249
11250 reply = await self.rpc(msg)
11251 return reply
11252
11253
11254
11255 @ReturnMapping(MachineAddressesResults)
11256 async def ProviderAddresses(self, entities):
11257 '''
11258 entities : typing.Sequence[~Entity]
11259 Returns -> typing.Sequence[~MachineAddressesResult]
11260 '''
11261 # map input types to rpc msg
11262 params = dict()
11263 msg = dict(Type='InstancePoller', Request='ProviderAddresses', Version=3, Params=params)
11264 params['Entities'] = entities
11265 reply = await self.rpc(msg)
11266 return reply
11267
11268
11269
11270 @ReturnMapping(ErrorResults)
11271 async def SetInstanceStatus(self, entities):
11272 '''
11273 entities : typing.Sequence[~EntityStatusArgs]
11274 Returns -> typing.Sequence[~ErrorResult]
11275 '''
11276 # map input types to rpc msg
11277 params = dict()
11278 msg = dict(Type='InstancePoller', Request='SetInstanceStatus', Version=3, Params=params)
11279 params['Entities'] = entities
11280 reply = await self.rpc(msg)
11281 return reply
11282
11283
11284
11285 @ReturnMapping(ErrorResults)
11286 async def SetProviderAddresses(self, machineaddresses):
11287 '''
11288 machineaddresses : typing.Sequence[~MachineAddresses]
11289 Returns -> typing.Sequence[~ErrorResult]
11290 '''
11291 # map input types to rpc msg
11292 params = dict()
11293 msg = dict(Type='InstancePoller', Request='SetProviderAddresses', Version=3, Params=params)
11294 params['MachineAddresses'] = machineaddresses
11295 reply = await self.rpc(msg)
11296 return reply
11297
11298
11299
11300 @ReturnMapping(StatusResults)
11301 async def Status(self, entities):
11302 '''
11303 entities : typing.Sequence[~Entity]
11304 Returns -> typing.Sequence[~StatusResult]
11305 '''
11306 # map input types to rpc msg
11307 params = dict()
11308 msg = dict(Type='InstancePoller', Request='Status', Version=3, Params=params)
11309 params['Entities'] = entities
11310 reply = await self.rpc(msg)
11311 return reply
11312
11313
11314
11315 @ReturnMapping(NotifyWatchResult)
11316 async def WatchForModelConfigChanges(self):
11317 '''
11318
11319 Returns -> typing.Union[_ForwardRef('Error'), str]
11320 '''
11321 # map input types to rpc msg
11322 params = dict()
11323 msg = dict(Type='InstancePoller', Request='WatchForModelConfigChanges', Version=3, Params=params)
11324
11325 reply = await self.rpc(msg)
11326 return reply
11327
11328
11329
11330 @ReturnMapping(StringsWatchResult)
11331 async def WatchModelMachines(self):
11332 '''
11333
11334 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
11335 '''
11336 # map input types to rpc msg
11337 params = dict()
11338 msg = dict(Type='InstancePoller', Request='WatchModelMachines', Version=3, Params=params)
11339
11340 reply = await self.rpc(msg)
11341 return reply
11342
11343
11344 class KeyManager(Type):
11345 name = 'KeyManager'
11346 version = 1
11347 schema = {'definitions': {'Entities': {'additionalProperties': False,
11348 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11349 'type': 'array'}},
11350 'required': ['Entities'],
11351 'type': 'object'},
11352 'Entity': {'additionalProperties': False,
11353 'properties': {'Tag': {'type': 'string'}},
11354 'required': ['Tag'],
11355 'type': 'object'},
11356 'Error': {'additionalProperties': False,
11357 'properties': {'Code': {'type': 'string'},
11358 'Info': {'$ref': '#/definitions/ErrorInfo'},
11359 'Message': {'type': 'string'}},
11360 'required': ['Message', 'Code'],
11361 'type': 'object'},
11362 'ErrorInfo': {'additionalProperties': False,
11363 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11364 'MacaroonPath': {'type': 'string'}},
11365 'type': 'object'},
11366 'ErrorResult': {'additionalProperties': False,
11367 'properties': {'Error': {'$ref': '#/definitions/Error'}},
11368 'required': ['Error'],
11369 'type': 'object'},
11370 'ErrorResults': {'additionalProperties': False,
11371 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
11372 'type': 'array'}},
11373 'required': ['Results'],
11374 'type': 'object'},
11375 'ListSSHKeys': {'additionalProperties': False,
11376 'properties': {'Entities': {'$ref': '#/definitions/Entities'},
11377 'Mode': {'type': 'boolean'}},
11378 'required': ['Entities', 'Mode'],
11379 'type': 'object'},
11380 'Macaroon': {'additionalProperties': False,
11381 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11382 'type': 'array'},
11383 'data': {'items': {'type': 'integer'},
11384 'type': 'array'},
11385 'id': {'$ref': '#/definitions/packet'},
11386 'location': {'$ref': '#/definitions/packet'},
11387 'sig': {'items': {'type': 'integer'},
11388 'type': 'array'}},
11389 'required': ['data',
11390 'location',
11391 'id',
11392 'caveats',
11393 'sig'],
11394 'type': 'object'},
11395 'ModifyUserSSHKeys': {'additionalProperties': False,
11396 'properties': {'Keys': {'items': {'type': 'string'},
11397 'type': 'array'},
11398 'User': {'type': 'string'}},
11399 'required': ['User', 'Keys'],
11400 'type': 'object'},
11401 'StringsResult': {'additionalProperties': False,
11402 'properties': {'Error': {'$ref': '#/definitions/Error'},
11403 'Result': {'items': {'type': 'string'},
11404 'type': 'array'}},
11405 'required': ['Error', 'Result'],
11406 'type': 'object'},
11407 'StringsResults': {'additionalProperties': False,
11408 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
11409 'type': 'array'}},
11410 'required': ['Results'],
11411 'type': 'object'},
11412 'caveat': {'additionalProperties': False,
11413 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11414 'location': {'$ref': '#/definitions/packet'},
11415 'verificationId': {'$ref': '#/definitions/packet'}},
11416 'required': ['location',
11417 'caveatId',
11418 'verificationId'],
11419 'type': 'object'},
11420 'packet': {'additionalProperties': False,
11421 'properties': {'headerLen': {'type': 'integer'},
11422 'start': {'type': 'integer'},
11423 'totalLen': {'type': 'integer'}},
11424 'required': ['start', 'totalLen', 'headerLen'],
11425 'type': 'object'}},
11426 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
11427 'Result': {'$ref': '#/definitions/ErrorResults'}},
11428 'type': 'object'},
11429 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
11430 'Result': {'$ref': '#/definitions/ErrorResults'}},
11431 'type': 'object'},
11432 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
11433 'Result': {'$ref': '#/definitions/ErrorResults'}},
11434 'type': 'object'},
11435 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
11436 'Result': {'$ref': '#/definitions/StringsResults'}},
11437 'type': 'object'}},
11438 'type': 'object'}
11439
11440
11441 @ReturnMapping(ErrorResults)
11442 async def AddKeys(self, keys, user):
11443 '''
11444 keys : typing.Sequence[str]
11445 user : str
11446 Returns -> typing.Sequence[~ErrorResult]
11447 '''
11448 # map input types to rpc msg
11449 params = dict()
11450 msg = dict(Type='KeyManager', Request='AddKeys', Version=1, Params=params)
11451 params['Keys'] = keys
11452 params['User'] = user
11453 reply = await self.rpc(msg)
11454 return reply
11455
11456
11457
11458 @ReturnMapping(ErrorResults)
11459 async def DeleteKeys(self, keys, user):
11460 '''
11461 keys : typing.Sequence[str]
11462 user : str
11463 Returns -> typing.Sequence[~ErrorResult]
11464 '''
11465 # map input types to rpc msg
11466 params = dict()
11467 msg = dict(Type='KeyManager', Request='DeleteKeys', Version=1, Params=params)
11468 params['Keys'] = keys
11469 params['User'] = user
11470 reply = await self.rpc(msg)
11471 return reply
11472
11473
11474
11475 @ReturnMapping(ErrorResults)
11476 async def ImportKeys(self, keys, user):
11477 '''
11478 keys : typing.Sequence[str]
11479 user : str
11480 Returns -> typing.Sequence[~ErrorResult]
11481 '''
11482 # map input types to rpc msg
11483 params = dict()
11484 msg = dict(Type='KeyManager', Request='ImportKeys', Version=1, Params=params)
11485 params['Keys'] = keys
11486 params['User'] = user
11487 reply = await self.rpc(msg)
11488 return reply
11489
11490
11491
11492 @ReturnMapping(StringsResults)
11493 async def ListKeys(self, entities, mode):
11494 '''
11495 entities : Entities
11496 mode : bool
11497 Returns -> typing.Sequence[~StringsResult]
11498 '''
11499 # map input types to rpc msg
11500 params = dict()
11501 msg = dict(Type='KeyManager', Request='ListKeys', Version=1, Params=params)
11502 params['Entities'] = entities
11503 params['Mode'] = mode
11504 reply = await self.rpc(msg)
11505 return reply
11506
11507
11508 class KeyUpdater(Type):
11509 name = 'KeyUpdater'
11510 version = 1
11511 schema = {'definitions': {'Entities': {'additionalProperties': False,
11512 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11513 'type': 'array'}},
11514 'required': ['Entities'],
11515 'type': 'object'},
11516 'Entity': {'additionalProperties': False,
11517 'properties': {'Tag': {'type': 'string'}},
11518 'required': ['Tag'],
11519 'type': 'object'},
11520 'Error': {'additionalProperties': False,
11521 'properties': {'Code': {'type': 'string'},
11522 'Info': {'$ref': '#/definitions/ErrorInfo'},
11523 'Message': {'type': 'string'}},
11524 'required': ['Message', 'Code'],
11525 'type': 'object'},
11526 'ErrorInfo': {'additionalProperties': False,
11527 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11528 'MacaroonPath': {'type': 'string'}},
11529 'type': 'object'},
11530 'Macaroon': {'additionalProperties': False,
11531 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11532 'type': 'array'},
11533 'data': {'items': {'type': 'integer'},
11534 'type': 'array'},
11535 'id': {'$ref': '#/definitions/packet'},
11536 'location': {'$ref': '#/definitions/packet'},
11537 'sig': {'items': {'type': 'integer'},
11538 'type': 'array'}},
11539 'required': ['data',
11540 'location',
11541 'id',
11542 'caveats',
11543 'sig'],
11544 'type': 'object'},
11545 'NotifyWatchResult': {'additionalProperties': False,
11546 'properties': {'Error': {'$ref': '#/definitions/Error'},
11547 'NotifyWatcherId': {'type': 'string'}},
11548 'required': ['NotifyWatcherId', 'Error'],
11549 'type': 'object'},
11550 'NotifyWatchResults': {'additionalProperties': False,
11551 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11552 'type': 'array'}},
11553 'required': ['Results'],
11554 'type': 'object'},
11555 'StringsResult': {'additionalProperties': False,
11556 'properties': {'Error': {'$ref': '#/definitions/Error'},
11557 'Result': {'items': {'type': 'string'},
11558 'type': 'array'}},
11559 'required': ['Error', 'Result'],
11560 'type': 'object'},
11561 'StringsResults': {'additionalProperties': False,
11562 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
11563 'type': 'array'}},
11564 'required': ['Results'],
11565 'type': 'object'},
11566 'caveat': {'additionalProperties': False,
11567 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11568 'location': {'$ref': '#/definitions/packet'},
11569 'verificationId': {'$ref': '#/definitions/packet'}},
11570 'required': ['location',
11571 'caveatId',
11572 'verificationId'],
11573 'type': 'object'},
11574 'packet': {'additionalProperties': False,
11575 'properties': {'headerLen': {'type': 'integer'},
11576 'start': {'type': 'integer'},
11577 'totalLen': {'type': 'integer'}},
11578 'required': ['start', 'totalLen', 'headerLen'],
11579 'type': 'object'}},
11580 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11581 'Result': {'$ref': '#/definitions/StringsResults'}},
11582 'type': 'object'},
11583 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11584 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11585 'type': 'object'}},
11586 'type': 'object'}
11587
11588
11589 @ReturnMapping(StringsResults)
11590 async def AuthorisedKeys(self, entities):
11591 '''
11592 entities : typing.Sequence[~Entity]
11593 Returns -> typing.Sequence[~StringsResult]
11594 '''
11595 # map input types to rpc msg
11596 params = dict()
11597 msg = dict(Type='KeyUpdater', Request='AuthorisedKeys', Version=1, Params=params)
11598 params['Entities'] = entities
11599 reply = await self.rpc(msg)
11600 return reply
11601
11602
11603
11604 @ReturnMapping(NotifyWatchResults)
11605 async def WatchAuthorisedKeys(self, entities):
11606 '''
11607 entities : typing.Sequence[~Entity]
11608 Returns -> typing.Sequence[~NotifyWatchResult]
11609 '''
11610 # map input types to rpc msg
11611 params = dict()
11612 msg = dict(Type='KeyUpdater', Request='WatchAuthorisedKeys', Version=1, Params=params)
11613 params['Entities'] = entities
11614 reply = await self.rpc(msg)
11615 return reply
11616
11617
11618 class LeadershipService(Type):
11619 name = 'LeadershipService'
11620 version = 2
11621 schema = {'definitions': {'ApplicationTag': {'additionalProperties': False,
11622 'properties': {'Name': {'type': 'string'}},
11623 'required': ['Name'],
11624 'type': 'object'},
11625 'ClaimLeadershipBulkParams': {'additionalProperties': False,
11626 'properties': {'Params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
11627 'type': 'array'}},
11628 'required': ['Params'],
11629 'type': 'object'},
11630 'ClaimLeadershipBulkResults': {'additionalProperties': False,
11631 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
11632 'type': 'array'}},
11633 'required': ['Results'],
11634 'type': 'object'},
11635 'ClaimLeadershipParams': {'additionalProperties': False,
11636 'properties': {'ApplicationTag': {'type': 'string'},
11637 'DurationSeconds': {'type': 'number'},
11638 'UnitTag': {'type': 'string'}},
11639 'required': ['ApplicationTag',
11640 'UnitTag',
11641 'DurationSeconds'],
11642 'type': 'object'},
11643 'Error': {'additionalProperties': False,
11644 'properties': {'Code': {'type': 'string'},
11645 'Info': {'$ref': '#/definitions/ErrorInfo'},
11646 'Message': {'type': 'string'}},
11647 'required': ['Message', 'Code'],
11648 'type': 'object'},
11649 'ErrorInfo': {'additionalProperties': False,
11650 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11651 'MacaroonPath': {'type': 'string'}},
11652 'type': 'object'},
11653 'ErrorResult': {'additionalProperties': False,
11654 'properties': {'Error': {'$ref': '#/definitions/Error'}},
11655 'required': ['Error'],
11656 'type': 'object'},
11657 'Macaroon': {'additionalProperties': False,
11658 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11659 'type': 'array'},
11660 'data': {'items': {'type': 'integer'},
11661 'type': 'array'},
11662 'id': {'$ref': '#/definitions/packet'},
11663 'location': {'$ref': '#/definitions/packet'},
11664 'sig': {'items': {'type': 'integer'},
11665 'type': 'array'}},
11666 'required': ['data',
11667 'location',
11668 'id',
11669 'caveats',
11670 'sig'],
11671 'type': 'object'},
11672 'caveat': {'additionalProperties': False,
11673 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11674 'location': {'$ref': '#/definitions/packet'},
11675 'verificationId': {'$ref': '#/definitions/packet'}},
11676 'required': ['location',
11677 'caveatId',
11678 'verificationId'],
11679 'type': 'object'},
11680 'packet': {'additionalProperties': False,
11681 'properties': {'headerLen': {'type': 'integer'},
11682 'start': {'type': 'integer'},
11683 'totalLen': {'type': 'integer'}},
11684 'required': ['start', 'totalLen', 'headerLen'],
11685 'type': 'object'}},
11686 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
11687 'Result': {'$ref': '#/definitions/ErrorResult'}},
11688 'type': 'object'},
11689 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
11690 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
11691 'type': 'object'}},
11692 'type': 'object'}
11693
11694
11695 @ReturnMapping(ErrorResult)
11696 async def BlockUntilLeadershipReleased(self, name):
11697 '''
11698 name : str
11699 Returns -> Error
11700 '''
11701 # map input types to rpc msg
11702 params = dict()
11703 msg = dict(Type='LeadershipService', Request='BlockUntilLeadershipReleased', Version=2, Params=params)
11704 params['Name'] = name
11705 reply = await self.rpc(msg)
11706 return reply
11707
11708
11709
11710 @ReturnMapping(ClaimLeadershipBulkResults)
11711 async def ClaimLeadership(self, params):
11712 '''
11713 params : typing.Sequence[~ClaimLeadershipParams]
11714 Returns -> typing.Sequence[~ErrorResult]
11715 '''
11716 # map input types to rpc msg
11717 params = dict()
11718 msg = dict(Type='LeadershipService', Request='ClaimLeadership', Version=2, Params=params)
11719 params['Params'] = params
11720 reply = await self.rpc(msg)
11721 return reply
11722
11723
11724 class LifeFlag(Type):
11725 name = 'LifeFlag'
11726 version = 1
11727 schema = {'definitions': {'Entities': {'additionalProperties': False,
11728 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11729 'type': 'array'}},
11730 'required': ['Entities'],
11731 'type': 'object'},
11732 'Entity': {'additionalProperties': False,
11733 'properties': {'Tag': {'type': 'string'}},
11734 'required': ['Tag'],
11735 'type': 'object'},
11736 'Error': {'additionalProperties': False,
11737 'properties': {'Code': {'type': 'string'},
11738 'Info': {'$ref': '#/definitions/ErrorInfo'},
11739 'Message': {'type': 'string'}},
11740 'required': ['Message', 'Code'],
11741 'type': 'object'},
11742 'ErrorInfo': {'additionalProperties': False,
11743 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11744 'MacaroonPath': {'type': 'string'}},
11745 'type': 'object'},
11746 'LifeResult': {'additionalProperties': False,
11747 'properties': {'Error': {'$ref': '#/definitions/Error'},
11748 'Life': {'type': 'string'}},
11749 'required': ['Life', 'Error'],
11750 'type': 'object'},
11751 'LifeResults': {'additionalProperties': False,
11752 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
11753 'type': 'array'}},
11754 'required': ['Results'],
11755 'type': 'object'},
11756 'Macaroon': {'additionalProperties': False,
11757 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11758 'type': 'array'},
11759 'data': {'items': {'type': 'integer'},
11760 'type': 'array'},
11761 'id': {'$ref': '#/definitions/packet'},
11762 'location': {'$ref': '#/definitions/packet'},
11763 'sig': {'items': {'type': 'integer'},
11764 'type': 'array'}},
11765 'required': ['data',
11766 'location',
11767 'id',
11768 'caveats',
11769 'sig'],
11770 'type': 'object'},
11771 'NotifyWatchResult': {'additionalProperties': False,
11772 'properties': {'Error': {'$ref': '#/definitions/Error'},
11773 'NotifyWatcherId': {'type': 'string'}},
11774 'required': ['NotifyWatcherId', 'Error'],
11775 'type': 'object'},
11776 'NotifyWatchResults': {'additionalProperties': False,
11777 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11778 'type': 'array'}},
11779 'required': ['Results'],
11780 'type': 'object'},
11781 'caveat': {'additionalProperties': False,
11782 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11783 'location': {'$ref': '#/definitions/packet'},
11784 'verificationId': {'$ref': '#/definitions/packet'}},
11785 'required': ['location',
11786 'caveatId',
11787 'verificationId'],
11788 'type': 'object'},
11789 'packet': {'additionalProperties': False,
11790 'properties': {'headerLen': {'type': 'integer'},
11791 'start': {'type': 'integer'},
11792 'totalLen': {'type': 'integer'}},
11793 'required': ['start', 'totalLen', 'headerLen'],
11794 'type': 'object'}},
11795 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11796 'Result': {'$ref': '#/definitions/LifeResults'}},
11797 'type': 'object'},
11798 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11799 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11800 'type': 'object'}},
11801 'type': 'object'}
11802
11803
11804 @ReturnMapping(LifeResults)
11805 async def Life(self, entities):
11806 '''
11807 entities : typing.Sequence[~Entity]
11808 Returns -> typing.Sequence[~LifeResult]
11809 '''
11810 # map input types to rpc msg
11811 params = dict()
11812 msg = dict(Type='LifeFlag', Request='Life', Version=1, Params=params)
11813 params['Entities'] = entities
11814 reply = await self.rpc(msg)
11815 return reply
11816
11817
11818
11819 @ReturnMapping(NotifyWatchResults)
11820 async def Watch(self, entities):
11821 '''
11822 entities : typing.Sequence[~Entity]
11823 Returns -> typing.Sequence[~NotifyWatchResult]
11824 '''
11825 # map input types to rpc msg
11826 params = dict()
11827 msg = dict(Type='LifeFlag', Request='Watch', Version=1, Params=params)
11828 params['Entities'] = entities
11829 reply = await self.rpc(msg)
11830 return reply
11831
11832
11833 class Logger(Type):
11834 name = 'Logger'
11835 version = 1
11836 schema = {'definitions': {'Entities': {'additionalProperties': False,
11837 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11838 'type': 'array'}},
11839 'required': ['Entities'],
11840 'type': 'object'},
11841 'Entity': {'additionalProperties': False,
11842 'properties': {'Tag': {'type': 'string'}},
11843 'required': ['Tag'],
11844 'type': 'object'},
11845 'Error': {'additionalProperties': False,
11846 'properties': {'Code': {'type': 'string'},
11847 'Info': {'$ref': '#/definitions/ErrorInfo'},
11848 'Message': {'type': 'string'}},
11849 'required': ['Message', 'Code'],
11850 'type': 'object'},
11851 'ErrorInfo': {'additionalProperties': False,
11852 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11853 'MacaroonPath': {'type': 'string'}},
11854 'type': 'object'},
11855 'Macaroon': {'additionalProperties': False,
11856 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11857 'type': 'array'},
11858 'data': {'items': {'type': 'integer'},
11859 'type': 'array'},
11860 'id': {'$ref': '#/definitions/packet'},
11861 'location': {'$ref': '#/definitions/packet'},
11862 'sig': {'items': {'type': 'integer'},
11863 'type': 'array'}},
11864 'required': ['data',
11865 'location',
11866 'id',
11867 'caveats',
11868 'sig'],
11869 'type': 'object'},
11870 'NotifyWatchResult': {'additionalProperties': False,
11871 'properties': {'Error': {'$ref': '#/definitions/Error'},
11872 'NotifyWatcherId': {'type': 'string'}},
11873 'required': ['NotifyWatcherId', 'Error'],
11874 'type': 'object'},
11875 'NotifyWatchResults': {'additionalProperties': False,
11876 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11877 'type': 'array'}},
11878 'required': ['Results'],
11879 'type': 'object'},
11880 'StringResult': {'additionalProperties': False,
11881 'properties': {'Error': {'$ref': '#/definitions/Error'},
11882 'Result': {'type': 'string'}},
11883 'required': ['Error', 'Result'],
11884 'type': 'object'},
11885 'StringResults': {'additionalProperties': False,
11886 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
11887 'type': 'array'}},
11888 'required': ['Results'],
11889 'type': 'object'},
11890 'caveat': {'additionalProperties': False,
11891 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11892 'location': {'$ref': '#/definitions/packet'},
11893 'verificationId': {'$ref': '#/definitions/packet'}},
11894 'required': ['location',
11895 'caveatId',
11896 'verificationId'],
11897 'type': 'object'},
11898 'packet': {'additionalProperties': False,
11899 'properties': {'headerLen': {'type': 'integer'},
11900 'start': {'type': 'integer'},
11901 'totalLen': {'type': 'integer'}},
11902 'required': ['start', 'totalLen', 'headerLen'],
11903 'type': 'object'}},
11904 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11905 'Result': {'$ref': '#/definitions/StringResults'}},
11906 'type': 'object'},
11907 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11908 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11909 'type': 'object'}},
11910 'type': 'object'}
11911
11912
11913 @ReturnMapping(StringResults)
11914 async def LoggingConfig(self, entities):
11915 '''
11916 entities : typing.Sequence[~Entity]
11917 Returns -> typing.Sequence[~StringResult]
11918 '''
11919 # map input types to rpc msg
11920 params = dict()
11921 msg = dict(Type='Logger', Request='LoggingConfig', Version=1, Params=params)
11922 params['Entities'] = entities
11923 reply = await self.rpc(msg)
11924 return reply
11925
11926
11927
11928 @ReturnMapping(NotifyWatchResults)
11929 async def WatchLoggingConfig(self, entities):
11930 '''
11931 entities : typing.Sequence[~Entity]
11932 Returns -> typing.Sequence[~NotifyWatchResult]
11933 '''
11934 # map input types to rpc msg
11935 params = dict()
11936 msg = dict(Type='Logger', Request='WatchLoggingConfig', Version=1, Params=params)
11937 params['Entities'] = entities
11938 reply = await self.rpc(msg)
11939 return reply
11940
11941
11942 class MachineActions(Type):
11943 name = 'MachineActions'
11944 version = 1
11945 schema = {'definitions': {'Action': {'additionalProperties': False,
11946 'properties': {'name': {'type': 'string'},
11947 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
11948 'type': 'object'}},
11949 'type': 'object'},
11950 'receiver': {'type': 'string'},
11951 'tag': {'type': 'string'}},
11952 'required': ['tag', 'receiver', 'name'],
11953 'type': 'object'},
11954 'ActionExecutionResult': {'additionalProperties': False,
11955 'properties': {'actiontag': {'type': 'string'},
11956 'message': {'type': 'string'},
11957 'results': {'patternProperties': {'.*': {'additionalProperties': True,
11958 'type': 'object'}},
11959 'type': 'object'},
11960 'status': {'type': 'string'}},
11961 'required': ['actiontag', 'status'],
11962 'type': 'object'},
11963 'ActionExecutionResults': {'additionalProperties': False,
11964 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
11965 'type': 'array'}},
11966 'type': 'object'},
11967 'ActionResult': {'additionalProperties': False,
11968 'properties': {'action': {'$ref': '#/definitions/Action'},
11969 'completed': {'format': 'date-time',
11970 'type': 'string'},
11971 'enqueued': {'format': 'date-time',
11972 'type': 'string'},
11973 'error': {'$ref': '#/definitions/Error'},
11974 'message': {'type': 'string'},
11975 'output': {'patternProperties': {'.*': {'additionalProperties': True,
11976 'type': 'object'}},
11977 'type': 'object'},
11978 'started': {'format': 'date-time',
11979 'type': 'string'},
11980 'status': {'type': 'string'}},
11981 'type': 'object'},
11982 'ActionResults': {'additionalProperties': False,
11983 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
11984 'type': 'array'}},
11985 'type': 'object'},
11986 'ActionsByReceiver': {'additionalProperties': False,
11987 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
11988 'type': 'array'},
11989 'error': {'$ref': '#/definitions/Error'},
11990 'receiver': {'type': 'string'}},
11991 'type': 'object'},
11992 'ActionsByReceivers': {'additionalProperties': False,
11993 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
11994 'type': 'array'}},
11995 'type': 'object'},
11996 'Entities': {'additionalProperties': False,
11997 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11998 'type': 'array'}},
11999 'required': ['Entities'],
12000 'type': 'object'},
12001 'Entity': {'additionalProperties': False,
12002 'properties': {'Tag': {'type': 'string'}},
12003 'required': ['Tag'],
12004 'type': 'object'},
12005 'Error': {'additionalProperties': False,
12006 'properties': {'Code': {'type': 'string'},
12007 'Info': {'$ref': '#/definitions/ErrorInfo'},
12008 'Message': {'type': 'string'}},
12009 'required': ['Message', 'Code'],
12010 'type': 'object'},
12011 'ErrorInfo': {'additionalProperties': False,
12012 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12013 'MacaroonPath': {'type': 'string'}},
12014 'type': 'object'},
12015 'ErrorResult': {'additionalProperties': False,
12016 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12017 'required': ['Error'],
12018 'type': 'object'},
12019 'ErrorResults': {'additionalProperties': False,
12020 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12021 'type': 'array'}},
12022 'required': ['Results'],
12023 'type': 'object'},
12024 'Macaroon': {'additionalProperties': False,
12025 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12026 'type': 'array'},
12027 'data': {'items': {'type': 'integer'},
12028 'type': 'array'},
12029 'id': {'$ref': '#/definitions/packet'},
12030 'location': {'$ref': '#/definitions/packet'},
12031 'sig': {'items': {'type': 'integer'},
12032 'type': 'array'}},
12033 'required': ['data',
12034 'location',
12035 'id',
12036 'caveats',
12037 'sig'],
12038 'type': 'object'},
12039 'StringsWatchResult': {'additionalProperties': False,
12040 'properties': {'Changes': {'items': {'type': 'string'},
12041 'type': 'array'},
12042 'Error': {'$ref': '#/definitions/Error'},
12043 'StringsWatcherId': {'type': 'string'}},
12044 'required': ['StringsWatcherId',
12045 'Changes',
12046 'Error'],
12047 'type': 'object'},
12048 'StringsWatchResults': {'additionalProperties': False,
12049 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
12050 'type': 'array'}},
12051 'required': ['Results'],
12052 'type': 'object'},
12053 'caveat': {'additionalProperties': False,
12054 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12055 'location': {'$ref': '#/definitions/packet'},
12056 'verificationId': {'$ref': '#/definitions/packet'}},
12057 'required': ['location',
12058 'caveatId',
12059 'verificationId'],
12060 'type': 'object'},
12061 'packet': {'additionalProperties': False,
12062 'properties': {'headerLen': {'type': 'integer'},
12063 'start': {'type': 'integer'},
12064 'totalLen': {'type': 'integer'}},
12065 'required': ['start', 'totalLen', 'headerLen'],
12066 'type': 'object'}},
12067 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12068 'Result': {'$ref': '#/definitions/ActionResults'}},
12069 'type': 'object'},
12070 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12071 'Result': {'$ref': '#/definitions/ErrorResults'}},
12072 'type': 'object'},
12073 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
12074 'Result': {'$ref': '#/definitions/ErrorResults'}},
12075 'type': 'object'},
12076 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12077 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
12078 'type': 'object'},
12079 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12080 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
12081 'type': 'object'}},
12082 'type': 'object'}
12083
12084
12085 @ReturnMapping(ActionResults)
12086 async def Actions(self, entities):
12087 '''
12088 entities : typing.Sequence[~Entity]
12089 Returns -> typing.Sequence[~ActionResult]
12090 '''
12091 # map input types to rpc msg
12092 params = dict()
12093 msg = dict(Type='MachineActions', Request='Actions', Version=1, Params=params)
12094 params['Entities'] = entities
12095 reply = await self.rpc(msg)
12096 return reply
12097
12098
12099
12100 @ReturnMapping(ErrorResults)
12101 async def BeginActions(self, entities):
12102 '''
12103 entities : typing.Sequence[~Entity]
12104 Returns -> typing.Sequence[~ErrorResult]
12105 '''
12106 # map input types to rpc msg
12107 params = dict()
12108 msg = dict(Type='MachineActions', Request='BeginActions', Version=1, Params=params)
12109 params['Entities'] = entities
12110 reply = await self.rpc(msg)
12111 return reply
12112
12113
12114
12115 @ReturnMapping(ErrorResults)
12116 async def FinishActions(self, results):
12117 '''
12118 results : typing.Sequence[~ActionExecutionResult]
12119 Returns -> typing.Sequence[~ErrorResult]
12120 '''
12121 # map input types to rpc msg
12122 params = dict()
12123 msg = dict(Type='MachineActions', Request='FinishActions', Version=1, Params=params)
12124 params['results'] = results
12125 reply = await self.rpc(msg)
12126 return reply
12127
12128
12129
12130 @ReturnMapping(ActionsByReceivers)
12131 async def RunningActions(self, entities):
12132 '''
12133 entities : typing.Sequence[~Entity]
12134 Returns -> typing.Sequence[~ActionsByReceiver]
12135 '''
12136 # map input types to rpc msg
12137 params = dict()
12138 msg = dict(Type='MachineActions', Request='RunningActions', Version=1, Params=params)
12139 params['Entities'] = entities
12140 reply = await self.rpc(msg)
12141 return reply
12142
12143
12144
12145 @ReturnMapping(StringsWatchResults)
12146 async def WatchActionNotifications(self, entities):
12147 '''
12148 entities : typing.Sequence[~Entity]
12149 Returns -> typing.Sequence[~StringsWatchResult]
12150 '''
12151 # map input types to rpc msg
12152 params = dict()
12153 msg = dict(Type='MachineActions', Request='WatchActionNotifications', Version=1, Params=params)
12154 params['Entities'] = entities
12155 reply = await self.rpc(msg)
12156 return reply
12157
12158
12159 class MachineManager(Type):
12160 name = 'MachineManager'
12161 version = 2
12162 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
12163 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
12164 'type': 'array'},
12165 'Constraints': {'$ref': '#/definitions/Value'},
12166 'ContainerType': {'type': 'string'},
12167 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
12168 'type': 'array'},
12169 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
12170 'InstanceId': {'type': 'string'},
12171 'Jobs': {'items': {'type': 'string'},
12172 'type': 'array'},
12173 'Nonce': {'type': 'string'},
12174 'ParentId': {'type': 'string'},
12175 'Placement': {'$ref': '#/definitions/Placement'},
12176 'Series': {'type': 'string'}},
12177 'required': ['Series',
12178 'Constraints',
12179 'Jobs',
12180 'Disks',
12181 'Placement',
12182 'ParentId',
12183 'ContainerType',
12184 'InstanceId',
12185 'Nonce',
12186 'HardwareCharacteristics',
12187 'Addrs'],
12188 'type': 'object'},
12189 'AddMachines': {'additionalProperties': False,
12190 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
12191 'type': 'array'}},
12192 'required': ['MachineParams'],
12193 'type': 'object'},
12194 'AddMachinesResult': {'additionalProperties': False,
12195 'properties': {'Error': {'$ref': '#/definitions/Error'},
12196 'Machine': {'type': 'string'}},
12197 'required': ['Machine', 'Error'],
12198 'type': 'object'},
12199 'AddMachinesResults': {'additionalProperties': False,
12200 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
12201 'type': 'array'}},
12202 'required': ['Machines'],
12203 'type': 'object'},
12204 'Address': {'additionalProperties': False,
12205 'properties': {'Scope': {'type': 'string'},
12206 'SpaceName': {'type': 'string'},
12207 'Type': {'type': 'string'},
12208 'Value': {'type': 'string'}},
12209 'required': ['Value', 'Type', 'Scope'],
12210 'type': 'object'},
12211 'Constraints': {'additionalProperties': False,
12212 'properties': {'Count': {'type': 'integer'},
12213 'Pool': {'type': 'string'},
12214 'Size': {'type': 'integer'}},
12215 'required': ['Pool', 'Size', 'Count'],
12216 'type': 'object'},
12217 'Error': {'additionalProperties': False,
12218 'properties': {'Code': {'type': 'string'},
12219 'Info': {'$ref': '#/definitions/ErrorInfo'},
12220 'Message': {'type': 'string'}},
12221 'required': ['Message', 'Code'],
12222 'type': 'object'},
12223 'ErrorInfo': {'additionalProperties': False,
12224 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12225 'MacaroonPath': {'type': 'string'}},
12226 'type': 'object'},
12227 'HardwareCharacteristics': {'additionalProperties': False,
12228 'properties': {'Arch': {'type': 'string'},
12229 'AvailabilityZone': {'type': 'string'},
12230 'CpuCores': {'type': 'integer'},
12231 'CpuPower': {'type': 'integer'},
12232 'Mem': {'type': 'integer'},
12233 'RootDisk': {'type': 'integer'},
12234 'Tags': {'items': {'type': 'string'},
12235 'type': 'array'}},
12236 'type': 'object'},
12237 'Macaroon': {'additionalProperties': False,
12238 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12239 'type': 'array'},
12240 'data': {'items': {'type': 'integer'},
12241 'type': 'array'},
12242 'id': {'$ref': '#/definitions/packet'},
12243 'location': {'$ref': '#/definitions/packet'},
12244 'sig': {'items': {'type': 'integer'},
12245 'type': 'array'}},
12246 'required': ['data',
12247 'location',
12248 'id',
12249 'caveats',
12250 'sig'],
12251 'type': 'object'},
12252 'Placement': {'additionalProperties': False,
12253 'properties': {'Directive': {'type': 'string'},
12254 'Scope': {'type': 'string'}},
12255 'required': ['Scope', 'Directive'],
12256 'type': 'object'},
12257 'Value': {'additionalProperties': False,
12258 'properties': {'arch': {'type': 'string'},
12259 'container': {'type': 'string'},
12260 'cpu-cores': {'type': 'integer'},
12261 'cpu-power': {'type': 'integer'},
12262 'instance-type': {'type': 'string'},
12263 'mem': {'type': 'integer'},
12264 'root-disk': {'type': 'integer'},
12265 'spaces': {'items': {'type': 'string'},
12266 'type': 'array'},
12267 'tags': {'items': {'type': 'string'},
12268 'type': 'array'},
12269 'virt-type': {'type': 'string'}},
12270 'type': 'object'},
12271 'caveat': {'additionalProperties': False,
12272 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12273 'location': {'$ref': '#/definitions/packet'},
12274 'verificationId': {'$ref': '#/definitions/packet'}},
12275 'required': ['location',
12276 'caveatId',
12277 'verificationId'],
12278 'type': 'object'},
12279 'packet': {'additionalProperties': False,
12280 'properties': {'headerLen': {'type': 'integer'},
12281 'start': {'type': 'integer'},
12282 'totalLen': {'type': 'integer'}},
12283 'required': ['start', 'totalLen', 'headerLen'],
12284 'type': 'object'}},
12285 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
12286 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
12287 'type': 'object'}},
12288 'type': 'object'}
12289
12290
12291 @ReturnMapping(AddMachinesResults)
12292 async def AddMachines(self, machineparams):
12293 '''
12294 machineparams : typing.Sequence[~AddMachineParams]
12295 Returns -> typing.Sequence[~AddMachinesResult]
12296 '''
12297 # map input types to rpc msg
12298 params = dict()
12299 msg = dict(Type='MachineManager', Request='AddMachines', Version=2, Params=params)
12300 params['MachineParams'] = machineparams
12301 reply = await self.rpc(msg)
12302 return reply
12303
12304
12305 class Machiner(Type):
12306 name = 'Machiner'
12307 version = 1
12308 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
12309 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
12310 'type': 'array'},
12311 'type': 'array'}},
12312 'required': ['Servers'],
12313 'type': 'object'},
12314 'Address': {'additionalProperties': False,
12315 'properties': {'Scope': {'type': 'string'},
12316 'SpaceName': {'type': 'string'},
12317 'Type': {'type': 'string'},
12318 'Value': {'type': 'string'}},
12319 'required': ['Value', 'Type', 'Scope'],
12320 'type': 'object'},
12321 'BytesResult': {'additionalProperties': False,
12322 'properties': {'Result': {'items': {'type': 'integer'},
12323 'type': 'array'}},
12324 'required': ['Result'],
12325 'type': 'object'},
12326 'Entities': {'additionalProperties': False,
12327 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12328 'type': 'array'}},
12329 'required': ['Entities'],
12330 'type': 'object'},
12331 'Entity': {'additionalProperties': False,
12332 'properties': {'Tag': {'type': 'string'}},
12333 'required': ['Tag'],
12334 'type': 'object'},
12335 'EntityStatusArgs': {'additionalProperties': False,
12336 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
12337 'type': 'object'}},
12338 'type': 'object'},
12339 'Info': {'type': 'string'},
12340 'Status': {'type': 'string'},
12341 'Tag': {'type': 'string'}},
12342 'required': ['Tag',
12343 'Status',
12344 'Info',
12345 'Data'],
12346 'type': 'object'},
12347 'Error': {'additionalProperties': False,
12348 'properties': {'Code': {'type': 'string'},
12349 'Info': {'$ref': '#/definitions/ErrorInfo'},
12350 'Message': {'type': 'string'}},
12351 'required': ['Message', 'Code'],
12352 'type': 'object'},
12353 'ErrorInfo': {'additionalProperties': False,
12354 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12355 'MacaroonPath': {'type': 'string'}},
12356 'type': 'object'},
12357 'ErrorResult': {'additionalProperties': False,
12358 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12359 'required': ['Error'],
12360 'type': 'object'},
12361 'ErrorResults': {'additionalProperties': False,
12362 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12363 'type': 'array'}},
12364 'required': ['Results'],
12365 'type': 'object'},
12366 'HostPort': {'additionalProperties': False,
12367 'properties': {'Address': {'$ref': '#/definitions/Address'},
12368 'Port': {'type': 'integer'}},
12369 'required': ['Address', 'Port'],
12370 'type': 'object'},
12371 'JobsResult': {'additionalProperties': False,
12372 'properties': {'Error': {'$ref': '#/definitions/Error'},
12373 'Jobs': {'items': {'type': 'string'},
12374 'type': 'array'}},
12375 'required': ['Jobs', 'Error'],
12376 'type': 'object'},
12377 'JobsResults': {'additionalProperties': False,
12378 'properties': {'Results': {'items': {'$ref': '#/definitions/JobsResult'},
12379 'type': 'array'}},
12380 'required': ['Results'],
12381 'type': 'object'},
12382 'LifeResult': {'additionalProperties': False,
12383 'properties': {'Error': {'$ref': '#/definitions/Error'},
12384 'Life': {'type': 'string'}},
12385 'required': ['Life', 'Error'],
12386 'type': 'object'},
12387 'LifeResults': {'additionalProperties': False,
12388 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
12389 'type': 'array'}},
12390 'required': ['Results'],
12391 'type': 'object'},
12392 'Macaroon': {'additionalProperties': False,
12393 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12394 'type': 'array'},
12395 'data': {'items': {'type': 'integer'},
12396 'type': 'array'},
12397 'id': {'$ref': '#/definitions/packet'},
12398 'location': {'$ref': '#/definitions/packet'},
12399 'sig': {'items': {'type': 'integer'},
12400 'type': 'array'}},
12401 'required': ['data',
12402 'location',
12403 'id',
12404 'caveats',
12405 'sig'],
12406 'type': 'object'},
12407 'MachineAddresses': {'additionalProperties': False,
12408 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
12409 'type': 'array'},
12410 'Tag': {'type': 'string'}},
12411 'required': ['Tag', 'Addresses'],
12412 'type': 'object'},
12413 'NetworkConfig': {'additionalProperties': False,
12414 'properties': {'Address': {'type': 'string'},
12415 'CIDR': {'type': 'string'},
12416 'ConfigType': {'type': 'string'},
12417 'DNSSearchDomains': {'items': {'type': 'string'},
12418 'type': 'array'},
12419 'DNSServers': {'items': {'type': 'string'},
12420 'type': 'array'},
12421 'DeviceIndex': {'type': 'integer'},
12422 'Disabled': {'type': 'boolean'},
12423 'GatewayAddress': {'type': 'string'},
12424 'InterfaceName': {'type': 'string'},
12425 'InterfaceType': {'type': 'string'},
12426 'MACAddress': {'type': 'string'},
12427 'MTU': {'type': 'integer'},
12428 'NoAutoStart': {'type': 'boolean'},
12429 'ParentInterfaceName': {'type': 'string'},
12430 'ProviderAddressId': {'type': 'string'},
12431 'ProviderId': {'type': 'string'},
12432 'ProviderSpaceId': {'type': 'string'},
12433 'ProviderSubnetId': {'type': 'string'},
12434 'ProviderVLANId': {'type': 'string'},
12435 'VLANTag': {'type': 'integer'}},
12436 'required': ['DeviceIndex',
12437 'MACAddress',
12438 'CIDR',
12439 'MTU',
12440 'ProviderId',
12441 'ProviderSubnetId',
12442 'ProviderSpaceId',
12443 'ProviderAddressId',
12444 'ProviderVLANId',
12445 'VLANTag',
12446 'InterfaceName',
12447 'ParentInterfaceName',
12448 'InterfaceType',
12449 'Disabled'],
12450 'type': 'object'},
12451 'NotifyWatchResult': {'additionalProperties': False,
12452 'properties': {'Error': {'$ref': '#/definitions/Error'},
12453 'NotifyWatcherId': {'type': 'string'}},
12454 'required': ['NotifyWatcherId', 'Error'],
12455 'type': 'object'},
12456 'NotifyWatchResults': {'additionalProperties': False,
12457 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12458 'type': 'array'}},
12459 'required': ['Results'],
12460 'type': 'object'},
12461 'SetMachineNetworkConfig': {'additionalProperties': False,
12462 'properties': {'Config': {'items': {'$ref': '#/definitions/NetworkConfig'},
12463 'type': 'array'},
12464 'Tag': {'type': 'string'}},
12465 'required': ['Tag', 'Config'],
12466 'type': 'object'},
12467 'SetMachinesAddresses': {'additionalProperties': False,
12468 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
12469 'type': 'array'}},
12470 'required': ['MachineAddresses'],
12471 'type': 'object'},
12472 'SetStatus': {'additionalProperties': False,
12473 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
12474 'type': 'array'}},
12475 'required': ['Entities'],
12476 'type': 'object'},
12477 'StringResult': {'additionalProperties': False,
12478 'properties': {'Error': {'$ref': '#/definitions/Error'},
12479 'Result': {'type': 'string'}},
12480 'required': ['Error', 'Result'],
12481 'type': 'object'},
12482 'StringsResult': {'additionalProperties': False,
12483 'properties': {'Error': {'$ref': '#/definitions/Error'},
12484 'Result': {'items': {'type': 'string'},
12485 'type': 'array'}},
12486 'required': ['Error', 'Result'],
12487 'type': 'object'},
12488 'caveat': {'additionalProperties': False,
12489 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12490 'location': {'$ref': '#/definitions/packet'},
12491 'verificationId': {'$ref': '#/definitions/packet'}},
12492 'required': ['location',
12493 'caveatId',
12494 'verificationId'],
12495 'type': 'object'},
12496 'packet': {'additionalProperties': False,
12497 'properties': {'headerLen': {'type': 'integer'},
12498 'start': {'type': 'integer'},
12499 'totalLen': {'type': 'integer'}},
12500 'required': ['start', 'totalLen', 'headerLen'],
12501 'type': 'object'}},
12502 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
12503 'type': 'object'},
12504 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
12505 'type': 'object'},
12506 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
12507 'type': 'object'},
12508 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12509 'Result': {'$ref': '#/definitions/ErrorResults'}},
12510 'type': 'object'},
12511 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12512 'Result': {'$ref': '#/definitions/JobsResults'}},
12513 'type': 'object'},
12514 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12515 'Result': {'$ref': '#/definitions/LifeResults'}},
12516 'type': 'object'},
12517 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
12518 'type': 'object'},
12519 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
12520 'Result': {'$ref': '#/definitions/ErrorResults'}},
12521 'type': 'object'},
12522 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
12523 'type': 'object'},
12524 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12525 'Result': {'$ref': '#/definitions/ErrorResults'}},
12526 'type': 'object'},
12527 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
12528 'Result': {'$ref': '#/definitions/ErrorResults'}},
12529 'type': 'object'},
12530 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
12531 'Result': {'$ref': '#/definitions/ErrorResults'}},
12532 'type': 'object'},
12533 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12534 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12535 'type': 'object'},
12536 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12537 'type': 'object'}},
12538 'type': 'object'}
12539
12540
12541 @ReturnMapping(StringsResult)
12542 async def APIAddresses(self):
12543 '''
12544
12545 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
12546 '''
12547 # map input types to rpc msg
12548 params = dict()
12549 msg = dict(Type='Machiner', Request='APIAddresses', Version=1, Params=params)
12550
12551 reply = await self.rpc(msg)
12552 return reply
12553
12554
12555
12556 @ReturnMapping(APIHostPortsResult)
12557 async def APIHostPorts(self):
12558 '''
12559
12560 Returns -> typing.Sequence[~HostPort]
12561 '''
12562 # map input types to rpc msg
12563 params = dict()
12564 msg = dict(Type='Machiner', Request='APIHostPorts', Version=1, Params=params)
12565
12566 reply = await self.rpc(msg)
12567 return reply
12568
12569
12570
12571 @ReturnMapping(BytesResult)
12572 async def CACert(self):
12573 '''
12574
12575 Returns -> typing.Sequence[int]
12576 '''
12577 # map input types to rpc msg
12578 params = dict()
12579 msg = dict(Type='Machiner', Request='CACert', Version=1, Params=params)
12580
12581 reply = await self.rpc(msg)
12582 return reply
12583
12584
12585
12586 @ReturnMapping(ErrorResults)
12587 async def EnsureDead(self, entities):
12588 '''
12589 entities : typing.Sequence[~Entity]
12590 Returns -> typing.Sequence[~ErrorResult]
12591 '''
12592 # map input types to rpc msg
12593 params = dict()
12594 msg = dict(Type='Machiner', Request='EnsureDead', Version=1, Params=params)
12595 params['Entities'] = entities
12596 reply = await self.rpc(msg)
12597 return reply
12598
12599
12600
12601 @ReturnMapping(JobsResults)
12602 async def Jobs(self, entities):
12603 '''
12604 entities : typing.Sequence[~Entity]
12605 Returns -> typing.Sequence[~JobsResult]
12606 '''
12607 # map input types to rpc msg
12608 params = dict()
12609 msg = dict(Type='Machiner', Request='Jobs', Version=1, Params=params)
12610 params['Entities'] = entities
12611 reply = await self.rpc(msg)
12612 return reply
12613
12614
12615
12616 @ReturnMapping(LifeResults)
12617 async def Life(self, entities):
12618 '''
12619 entities : typing.Sequence[~Entity]
12620 Returns -> typing.Sequence[~LifeResult]
12621 '''
12622 # map input types to rpc msg
12623 params = dict()
12624 msg = dict(Type='Machiner', Request='Life', Version=1, Params=params)
12625 params['Entities'] = entities
12626 reply = await self.rpc(msg)
12627 return reply
12628
12629
12630
12631 @ReturnMapping(StringResult)
12632 async def ModelUUID(self):
12633 '''
12634
12635 Returns -> typing.Union[_ForwardRef('Error'), str]
12636 '''
12637 # map input types to rpc msg
12638 params = dict()
12639 msg = dict(Type='Machiner', Request='ModelUUID', Version=1, Params=params)
12640
12641 reply = await self.rpc(msg)
12642 return reply
12643
12644
12645
12646 @ReturnMapping(ErrorResults)
12647 async def SetMachineAddresses(self, machineaddresses):
12648 '''
12649 machineaddresses : typing.Sequence[~MachineAddresses]
12650 Returns -> typing.Sequence[~ErrorResult]
12651 '''
12652 # map input types to rpc msg
12653 params = dict()
12654 msg = dict(Type='Machiner', Request='SetMachineAddresses', Version=1, Params=params)
12655 params['MachineAddresses'] = machineaddresses
12656 reply = await self.rpc(msg)
12657 return reply
12658
12659
12660
12661 @ReturnMapping(None)
12662 async def SetObservedNetworkConfig(self, config, tag):
12663 '''
12664 config : typing.Sequence[~NetworkConfig]
12665 tag : str
12666 Returns -> None
12667 '''
12668 # map input types to rpc msg
12669 params = dict()
12670 msg = dict(Type='Machiner', Request='SetObservedNetworkConfig', Version=1, Params=params)
12671 params['Config'] = config
12672 params['Tag'] = tag
12673 reply = await self.rpc(msg)
12674 return reply
12675
12676
12677
12678 @ReturnMapping(ErrorResults)
12679 async def SetProviderNetworkConfig(self, entities):
12680 '''
12681 entities : typing.Sequence[~Entity]
12682 Returns -> typing.Sequence[~ErrorResult]
12683 '''
12684 # map input types to rpc msg
12685 params = dict()
12686 msg = dict(Type='Machiner', Request='SetProviderNetworkConfig', Version=1, Params=params)
12687 params['Entities'] = entities
12688 reply = await self.rpc(msg)
12689 return reply
12690
12691
12692
12693 @ReturnMapping(ErrorResults)
12694 async def SetStatus(self, entities):
12695 '''
12696 entities : typing.Sequence[~EntityStatusArgs]
12697 Returns -> typing.Sequence[~ErrorResult]
12698 '''
12699 # map input types to rpc msg
12700 params = dict()
12701 msg = dict(Type='Machiner', Request='SetStatus', Version=1, Params=params)
12702 params['Entities'] = entities
12703 reply = await self.rpc(msg)
12704 return reply
12705
12706
12707
12708 @ReturnMapping(ErrorResults)
12709 async def UpdateStatus(self, entities):
12710 '''
12711 entities : typing.Sequence[~EntityStatusArgs]
12712 Returns -> typing.Sequence[~ErrorResult]
12713 '''
12714 # map input types to rpc msg
12715 params = dict()
12716 msg = dict(Type='Machiner', Request='UpdateStatus', Version=1, Params=params)
12717 params['Entities'] = entities
12718 reply = await self.rpc(msg)
12719 return reply
12720
12721
12722
12723 @ReturnMapping(NotifyWatchResults)
12724 async def Watch(self, entities):
12725 '''
12726 entities : typing.Sequence[~Entity]
12727 Returns -> typing.Sequence[~NotifyWatchResult]
12728 '''
12729 # map input types to rpc msg
12730 params = dict()
12731 msg = dict(Type='Machiner', Request='Watch', Version=1, Params=params)
12732 params['Entities'] = entities
12733 reply = await self.rpc(msg)
12734 return reply
12735
12736
12737
12738 @ReturnMapping(NotifyWatchResult)
12739 async def WatchAPIHostPorts(self):
12740 '''
12741
12742 Returns -> typing.Union[_ForwardRef('Error'), str]
12743 '''
12744 # map input types to rpc msg
12745 params = dict()
12746 msg = dict(Type='Machiner', Request='WatchAPIHostPorts', Version=1, Params=params)
12747
12748 reply = await self.rpc(msg)
12749 return reply
12750
12751
12752 class MeterStatus(Type):
12753 name = 'MeterStatus'
12754 version = 1
12755 schema = {'definitions': {'Entities': {'additionalProperties': False,
12756 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12757 'type': 'array'}},
12758 'required': ['Entities'],
12759 'type': 'object'},
12760 'Entity': {'additionalProperties': False,
12761 'properties': {'Tag': {'type': 'string'}},
12762 'required': ['Tag'],
12763 'type': 'object'},
12764 'Error': {'additionalProperties': False,
12765 'properties': {'Code': {'type': 'string'},
12766 'Info': {'$ref': '#/definitions/ErrorInfo'},
12767 'Message': {'type': 'string'}},
12768 'required': ['Message', 'Code'],
12769 'type': 'object'},
12770 'ErrorInfo': {'additionalProperties': False,
12771 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12772 'MacaroonPath': {'type': 'string'}},
12773 'type': 'object'},
12774 'Macaroon': {'additionalProperties': False,
12775 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12776 'type': 'array'},
12777 'data': {'items': {'type': 'integer'},
12778 'type': 'array'},
12779 'id': {'$ref': '#/definitions/packet'},
12780 'location': {'$ref': '#/definitions/packet'},
12781 'sig': {'items': {'type': 'integer'},
12782 'type': 'array'}},
12783 'required': ['data',
12784 'location',
12785 'id',
12786 'caveats',
12787 'sig'],
12788 'type': 'object'},
12789 'MeterStatusResult': {'additionalProperties': False,
12790 'properties': {'Code': {'type': 'string'},
12791 'Error': {'$ref': '#/definitions/Error'},
12792 'Info': {'type': 'string'}},
12793 'required': ['Code', 'Info', 'Error'],
12794 'type': 'object'},
12795 'MeterStatusResults': {'additionalProperties': False,
12796 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
12797 'type': 'array'}},
12798 'required': ['Results'],
12799 'type': 'object'},
12800 'NotifyWatchResult': {'additionalProperties': False,
12801 'properties': {'Error': {'$ref': '#/definitions/Error'},
12802 'NotifyWatcherId': {'type': 'string'}},
12803 'required': ['NotifyWatcherId', 'Error'],
12804 'type': 'object'},
12805 'NotifyWatchResults': {'additionalProperties': False,
12806 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12807 'type': 'array'}},
12808 'required': ['Results'],
12809 'type': 'object'},
12810 'caveat': {'additionalProperties': False,
12811 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12812 'location': {'$ref': '#/definitions/packet'},
12813 'verificationId': {'$ref': '#/definitions/packet'}},
12814 'required': ['location',
12815 'caveatId',
12816 'verificationId'],
12817 'type': 'object'},
12818 'packet': {'additionalProperties': False,
12819 'properties': {'headerLen': {'type': 'integer'},
12820 'start': {'type': 'integer'},
12821 'totalLen': {'type': 'integer'}},
12822 'required': ['start', 'totalLen', 'headerLen'],
12823 'type': 'object'}},
12824 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12825 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
12826 'type': 'object'},
12827 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12828 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12829 'type': 'object'}},
12830 'type': 'object'}
12831
12832
12833 @ReturnMapping(MeterStatusResults)
12834 async def GetMeterStatus(self, entities):
12835 '''
12836 entities : typing.Sequence[~Entity]
12837 Returns -> typing.Sequence[~MeterStatusResult]
12838 '''
12839 # map input types to rpc msg
12840 params = dict()
12841 msg = dict(Type='MeterStatus', Request='GetMeterStatus', Version=1, Params=params)
12842 params['Entities'] = entities
12843 reply = await self.rpc(msg)
12844 return reply
12845
12846
12847
12848 @ReturnMapping(NotifyWatchResults)
12849 async def WatchMeterStatus(self, entities):
12850 '''
12851 entities : typing.Sequence[~Entity]
12852 Returns -> typing.Sequence[~NotifyWatchResult]
12853 '''
12854 # map input types to rpc msg
12855 params = dict()
12856 msg = dict(Type='MeterStatus', Request='WatchMeterStatus', Version=1, Params=params)
12857 params['Entities'] = entities
12858 reply = await self.rpc(msg)
12859 return reply
12860
12861
12862 class MetricsAdder(Type):
12863 name = 'MetricsAdder'
12864 version = 2
12865 schema = {'definitions': {'Error': {'additionalProperties': False,
12866 'properties': {'Code': {'type': 'string'},
12867 'Info': {'$ref': '#/definitions/ErrorInfo'},
12868 'Message': {'type': 'string'}},
12869 'required': ['Message', 'Code'],
12870 'type': 'object'},
12871 'ErrorInfo': {'additionalProperties': False,
12872 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12873 'MacaroonPath': {'type': 'string'}},
12874 'type': 'object'},
12875 'ErrorResult': {'additionalProperties': False,
12876 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12877 'required': ['Error'],
12878 'type': 'object'},
12879 'ErrorResults': {'additionalProperties': False,
12880 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12881 'type': 'array'}},
12882 'required': ['Results'],
12883 'type': 'object'},
12884 'Macaroon': {'additionalProperties': False,
12885 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12886 'type': 'array'},
12887 'data': {'items': {'type': 'integer'},
12888 'type': 'array'},
12889 'id': {'$ref': '#/definitions/packet'},
12890 'location': {'$ref': '#/definitions/packet'},
12891 'sig': {'items': {'type': 'integer'},
12892 'type': 'array'}},
12893 'required': ['data',
12894 'location',
12895 'id',
12896 'caveats',
12897 'sig'],
12898 'type': 'object'},
12899 'Metric': {'additionalProperties': False,
12900 'properties': {'Key': {'type': 'string'},
12901 'Time': {'format': 'date-time',
12902 'type': 'string'},
12903 'Value': {'type': 'string'}},
12904 'required': ['Key', 'Value', 'Time'],
12905 'type': 'object'},
12906 'MetricBatch': {'additionalProperties': False,
12907 'properties': {'CharmURL': {'type': 'string'},
12908 'Created': {'format': 'date-time',
12909 'type': 'string'},
12910 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
12911 'type': 'array'},
12912 'UUID': {'type': 'string'}},
12913 'required': ['UUID',
12914 'CharmURL',
12915 'Created',
12916 'Metrics'],
12917 'type': 'object'},
12918 'MetricBatchParam': {'additionalProperties': False,
12919 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
12920 'Tag': {'type': 'string'}},
12921 'required': ['Tag', 'Batch'],
12922 'type': 'object'},
12923 'MetricBatchParams': {'additionalProperties': False,
12924 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
12925 'type': 'array'}},
12926 'required': ['Batches'],
12927 'type': 'object'},
12928 'caveat': {'additionalProperties': False,
12929 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12930 'location': {'$ref': '#/definitions/packet'},
12931 'verificationId': {'$ref': '#/definitions/packet'}},
12932 'required': ['location',
12933 'caveatId',
12934 'verificationId'],
12935 'type': 'object'},
12936 'packet': {'additionalProperties': False,
12937 'properties': {'headerLen': {'type': 'integer'},
12938 'start': {'type': 'integer'},
12939 'totalLen': {'type': 'integer'}},
12940 'required': ['start', 'totalLen', 'headerLen'],
12941 'type': 'object'}},
12942 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
12943 'Result': {'$ref': '#/definitions/ErrorResults'}},
12944 'type': 'object'}},
12945 'type': 'object'}
12946
12947
12948 @ReturnMapping(ErrorResults)
12949 async def AddMetricBatches(self, batches):
12950 '''
12951 batches : typing.Sequence[~MetricBatchParam]
12952 Returns -> typing.Sequence[~ErrorResult]
12953 '''
12954 # map input types to rpc msg
12955 params = dict()
12956 msg = dict(Type='MetricsAdder', Request='AddMetricBatches', Version=2, Params=params)
12957 params['Batches'] = batches
12958 reply = await self.rpc(msg)
12959 return reply
12960
12961
12962 class MetricsDebug(Type):
12963 name = 'MetricsDebug'
12964 version = 2
12965 schema = {'definitions': {'Entities': {'additionalProperties': False,
12966 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12967 'type': 'array'}},
12968 'required': ['Entities'],
12969 'type': 'object'},
12970 'Entity': {'additionalProperties': False,
12971 'properties': {'Tag': {'type': 'string'}},
12972 'required': ['Tag'],
12973 'type': 'object'},
12974 'EntityMetrics': {'additionalProperties': False,
12975 'properties': {'error': {'$ref': '#/definitions/Error'},
12976 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
12977 'type': 'array'}},
12978 'type': 'object'},
12979 'Error': {'additionalProperties': False,
12980 'properties': {'Code': {'type': 'string'},
12981 'Info': {'$ref': '#/definitions/ErrorInfo'},
12982 'Message': {'type': 'string'}},
12983 'required': ['Message', 'Code'],
12984 'type': 'object'},
12985 'ErrorInfo': {'additionalProperties': False,
12986 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12987 'MacaroonPath': {'type': 'string'}},
12988 'type': 'object'},
12989 'ErrorResult': {'additionalProperties': False,
12990 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12991 'required': ['Error'],
12992 'type': 'object'},
12993 'ErrorResults': {'additionalProperties': False,
12994 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12995 'type': 'array'}},
12996 'required': ['Results'],
12997 'type': 'object'},
12998 'Macaroon': {'additionalProperties': False,
12999 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13000 'type': 'array'},
13001 'data': {'items': {'type': 'integer'},
13002 'type': 'array'},
13003 'id': {'$ref': '#/definitions/packet'},
13004 'location': {'$ref': '#/definitions/packet'},
13005 'sig': {'items': {'type': 'integer'},
13006 'type': 'array'}},
13007 'required': ['data',
13008 'location',
13009 'id',
13010 'caveats',
13011 'sig'],
13012 'type': 'object'},
13013 'MeterStatusParam': {'additionalProperties': False,
13014 'properties': {'code': {'type': 'string'},
13015 'info': {'type': 'string'},
13016 'tag': {'type': 'string'}},
13017 'required': ['tag', 'code', 'info'],
13018 'type': 'object'},
13019 'MeterStatusParams': {'additionalProperties': False,
13020 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
13021 'type': 'array'}},
13022 'required': ['statues'],
13023 'type': 'object'},
13024 'MetricResult': {'additionalProperties': False,
13025 'properties': {'key': {'type': 'string'},
13026 'time': {'format': 'date-time',
13027 'type': 'string'},
13028 'value': {'type': 'string'}},
13029 'required': ['time', 'key', 'value'],
13030 'type': 'object'},
13031 'MetricResults': {'additionalProperties': False,
13032 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
13033 'type': 'array'}},
13034 'required': ['results'],
13035 'type': 'object'},
13036 'caveat': {'additionalProperties': False,
13037 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13038 'location': {'$ref': '#/definitions/packet'},
13039 'verificationId': {'$ref': '#/definitions/packet'}},
13040 'required': ['location',
13041 'caveatId',
13042 'verificationId'],
13043 'type': 'object'},
13044 'packet': {'additionalProperties': False,
13045 'properties': {'headerLen': {'type': 'integer'},
13046 'start': {'type': 'integer'},
13047 'totalLen': {'type': 'integer'}},
13048 'required': ['start', 'totalLen', 'headerLen'],
13049 'type': 'object'}},
13050 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13051 'Result': {'$ref': '#/definitions/MetricResults'}},
13052 'type': 'object'},
13053 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
13054 'Result': {'$ref': '#/definitions/ErrorResults'}},
13055 'type': 'object'}},
13056 'type': 'object'}
13057
13058
13059 @ReturnMapping(MetricResults)
13060 async def GetMetrics(self, entities):
13061 '''
13062 entities : typing.Sequence[~Entity]
13063 Returns -> typing.Sequence[~EntityMetrics]
13064 '''
13065 # map input types to rpc msg
13066 params = dict()
13067 msg = dict(Type='MetricsDebug', Request='GetMetrics', Version=2, Params=params)
13068 params['Entities'] = entities
13069 reply = await self.rpc(msg)
13070 return reply
13071
13072
13073
13074 @ReturnMapping(ErrorResults)
13075 async def SetMeterStatus(self, statues):
13076 '''
13077 statues : typing.Sequence[~MeterStatusParam]
13078 Returns -> typing.Sequence[~ErrorResult]
13079 '''
13080 # map input types to rpc msg
13081 params = dict()
13082 msg = dict(Type='MetricsDebug', Request='SetMeterStatus', Version=2, Params=params)
13083 params['statues'] = statues
13084 reply = await self.rpc(msg)
13085 return reply
13086
13087
13088 class MetricsManager(Type):
13089 name = 'MetricsManager'
13090 version = 1
13091 schema = {'definitions': {'Entities': {'additionalProperties': False,
13092 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13093 'type': 'array'}},
13094 'required': ['Entities'],
13095 'type': 'object'},
13096 'Entity': {'additionalProperties': False,
13097 'properties': {'Tag': {'type': 'string'}},
13098 'required': ['Tag'],
13099 'type': 'object'},
13100 'Error': {'additionalProperties': False,
13101 'properties': {'Code': {'type': 'string'},
13102 'Info': {'$ref': '#/definitions/ErrorInfo'},
13103 'Message': {'type': 'string'}},
13104 'required': ['Message', 'Code'],
13105 'type': 'object'},
13106 'ErrorInfo': {'additionalProperties': False,
13107 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13108 'MacaroonPath': {'type': 'string'}},
13109 'type': 'object'},
13110 'ErrorResult': {'additionalProperties': False,
13111 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13112 'required': ['Error'],
13113 'type': 'object'},
13114 'ErrorResults': {'additionalProperties': False,
13115 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13116 'type': 'array'}},
13117 'required': ['Results'],
13118 'type': 'object'},
13119 'Macaroon': {'additionalProperties': False,
13120 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13121 'type': 'array'},
13122 'data': {'items': {'type': 'integer'},
13123 'type': 'array'},
13124 'id': {'$ref': '#/definitions/packet'},
13125 'location': {'$ref': '#/definitions/packet'},
13126 'sig': {'items': {'type': 'integer'},
13127 'type': 'array'}},
13128 'required': ['data',
13129 'location',
13130 'id',
13131 'caveats',
13132 'sig'],
13133 'type': 'object'},
13134 'caveat': {'additionalProperties': False,
13135 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13136 'location': {'$ref': '#/definitions/packet'},
13137 'verificationId': {'$ref': '#/definitions/packet'}},
13138 'required': ['location',
13139 'caveatId',
13140 'verificationId'],
13141 'type': 'object'},
13142 'packet': {'additionalProperties': False,
13143 'properties': {'headerLen': {'type': 'integer'},
13144 'start': {'type': 'integer'},
13145 'totalLen': {'type': 'integer'}},
13146 'required': ['start', 'totalLen', 'headerLen'],
13147 'type': 'object'}},
13148 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13149 'Result': {'$ref': '#/definitions/ErrorResults'}},
13150 'type': 'object'},
13151 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13152 'Result': {'$ref': '#/definitions/ErrorResults'}},
13153 'type': 'object'}},
13154 'type': 'object'}
13155
13156
13157 @ReturnMapping(ErrorResults)
13158 async def CleanupOldMetrics(self, entities):
13159 '''
13160 entities : typing.Sequence[~Entity]
13161 Returns -> typing.Sequence[~ErrorResult]
13162 '''
13163 # map input types to rpc msg
13164 params = dict()
13165 msg = dict(Type='MetricsManager', Request='CleanupOldMetrics', Version=1, Params=params)
13166 params['Entities'] = entities
13167 reply = await self.rpc(msg)
13168 return reply
13169
13170
13171
13172 @ReturnMapping(ErrorResults)
13173 async def SendMetrics(self, entities):
13174 '''
13175 entities : typing.Sequence[~Entity]
13176 Returns -> typing.Sequence[~ErrorResult]
13177 '''
13178 # map input types to rpc msg
13179 params = dict()
13180 msg = dict(Type='MetricsManager', Request='SendMetrics', Version=1, Params=params)
13181 params['Entities'] = entities
13182 reply = await self.rpc(msg)
13183 return reply
13184
13185
13186 class MigrationFlag(Type):
13187 name = 'MigrationFlag'
13188 version = 1
13189 schema = {'definitions': {'Entities': {'additionalProperties': False,
13190 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13191 'type': 'array'}},
13192 'required': ['Entities'],
13193 'type': 'object'},
13194 'Entity': {'additionalProperties': False,
13195 'properties': {'Tag': {'type': 'string'}},
13196 'required': ['Tag'],
13197 'type': 'object'},
13198 'Error': {'additionalProperties': False,
13199 'properties': {'Code': {'type': 'string'},
13200 'Info': {'$ref': '#/definitions/ErrorInfo'},
13201 'Message': {'type': 'string'}},
13202 'required': ['Message', 'Code'],
13203 'type': 'object'},
13204 'ErrorInfo': {'additionalProperties': False,
13205 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13206 'MacaroonPath': {'type': 'string'}},
13207 'type': 'object'},
13208 'Macaroon': {'additionalProperties': False,
13209 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13210 'type': 'array'},
13211 'data': {'items': {'type': 'integer'},
13212 'type': 'array'},
13213 'id': {'$ref': '#/definitions/packet'},
13214 'location': {'$ref': '#/definitions/packet'},
13215 'sig': {'items': {'type': 'integer'},
13216 'type': 'array'}},
13217 'required': ['data',
13218 'location',
13219 'id',
13220 'caveats',
13221 'sig'],
13222 'type': 'object'},
13223 'NotifyWatchResult': {'additionalProperties': False,
13224 'properties': {'Error': {'$ref': '#/definitions/Error'},
13225 'NotifyWatcherId': {'type': 'string'}},
13226 'required': ['NotifyWatcherId', 'Error'],
13227 'type': 'object'},
13228 'NotifyWatchResults': {'additionalProperties': False,
13229 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13230 'type': 'array'}},
13231 'required': ['Results'],
13232 'type': 'object'},
13233 'PhaseResult': {'additionalProperties': False,
13234 'properties': {'Error': {'$ref': '#/definitions/Error'},
13235 'phase': {'type': 'string'}},
13236 'required': ['phase', 'Error'],
13237 'type': 'object'},
13238 'PhaseResults': {'additionalProperties': False,
13239 'properties': {'Results': {'items': {'$ref': '#/definitions/PhaseResult'},
13240 'type': 'array'}},
13241 'required': ['Results'],
13242 'type': 'object'},
13243 'caveat': {'additionalProperties': False,
13244 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13245 'location': {'$ref': '#/definitions/packet'},
13246 'verificationId': {'$ref': '#/definitions/packet'}},
13247 'required': ['location',
13248 'caveatId',
13249 'verificationId'],
13250 'type': 'object'},
13251 'packet': {'additionalProperties': False,
13252 'properties': {'headerLen': {'type': 'integer'},
13253 'start': {'type': 'integer'},
13254 'totalLen': {'type': 'integer'}},
13255 'required': ['start', 'totalLen', 'headerLen'],
13256 'type': 'object'}},
13257 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13258 'Result': {'$ref': '#/definitions/PhaseResults'}},
13259 'type': 'object'},
13260 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13261 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13262 'type': 'object'}},
13263 'type': 'object'}
13264
13265
13266 @ReturnMapping(PhaseResults)
13267 async def Phase(self, entities):
13268 '''
13269 entities : typing.Sequence[~Entity]
13270 Returns -> typing.Sequence[~PhaseResult]
13271 '''
13272 # map input types to rpc msg
13273 params = dict()
13274 msg = dict(Type='MigrationFlag', Request='Phase', Version=1, Params=params)
13275 params['Entities'] = entities
13276 reply = await self.rpc(msg)
13277 return reply
13278
13279
13280
13281 @ReturnMapping(NotifyWatchResults)
13282 async def Watch(self, entities):
13283 '''
13284 entities : typing.Sequence[~Entity]
13285 Returns -> typing.Sequence[~NotifyWatchResult]
13286 '''
13287 # map input types to rpc msg
13288 params = dict()
13289 msg = dict(Type='MigrationFlag', Request='Watch', Version=1, Params=params)
13290 params['Entities'] = entities
13291 reply = await self.rpc(msg)
13292 return reply
13293
13294
13295 class MigrationMaster(Type):
13296 name = 'MigrationMaster'
13297 version = 1
13298 schema = {'definitions': {'Error': {'additionalProperties': False,
13299 'properties': {'Code': {'type': 'string'},
13300 'Info': {'$ref': '#/definitions/ErrorInfo'},
13301 'Message': {'type': 'string'}},
13302 'required': ['Message', 'Code'],
13303 'type': 'object'},
13304 'ErrorInfo': {'additionalProperties': False,
13305 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13306 'MacaroonPath': {'type': 'string'}},
13307 'type': 'object'},
13308 'FullMigrationStatus': {'additionalProperties': False,
13309 'properties': {'attempt': {'type': 'integer'},
13310 'phase': {'type': 'string'},
13311 'spec': {'$ref': '#/definitions/ModelMigrationSpec'}},
13312 'required': ['spec',
13313 'attempt',
13314 'phase'],
13315 'type': 'object'},
13316 'Macaroon': {'additionalProperties': False,
13317 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13318 'type': 'array'},
13319 'data': {'items': {'type': 'integer'},
13320 'type': 'array'},
13321 'id': {'$ref': '#/definitions/packet'},
13322 'location': {'$ref': '#/definitions/packet'},
13323 'sig': {'items': {'type': 'integer'},
13324 'type': 'array'}},
13325 'required': ['data',
13326 'location',
13327 'id',
13328 'caveats',
13329 'sig'],
13330 'type': 'object'},
13331 'ModelMigrationSpec': {'additionalProperties': False,
13332 'properties': {'model-tag': {'type': 'string'},
13333 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
13334 'required': ['model-tag',
13335 'target-info'],
13336 'type': 'object'},
13337 'ModelMigrationTargetInfo': {'additionalProperties': False,
13338 'properties': {'addrs': {'items': {'type': 'string'},
13339 'type': 'array'},
13340 'auth-tag': {'type': 'string'},
13341 'ca-cert': {'type': 'string'},
13342 'controller-tag': {'type': 'string'},
13343 'password': {'type': 'string'}},
13344 'required': ['controller-tag',
13345 'addrs',
13346 'ca-cert',
13347 'auth-tag',
13348 'password'],
13349 'type': 'object'},
13350 'NotifyWatchResult': {'additionalProperties': False,
13351 'properties': {'Error': {'$ref': '#/definitions/Error'},
13352 'NotifyWatcherId': {'type': 'string'}},
13353 'required': ['NotifyWatcherId', 'Error'],
13354 'type': 'object'},
13355 'SerializedModel': {'additionalProperties': False,
13356 'properties': {'bytes': {'items': {'type': 'integer'},
13357 'type': 'array'}},
13358 'required': ['bytes'],
13359 'type': 'object'},
13360 'SetMigrationPhaseArgs': {'additionalProperties': False,
13361 'properties': {'phase': {'type': 'string'}},
13362 'required': ['phase'],
13363 'type': 'object'},
13364 'caveat': {'additionalProperties': False,
13365 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13366 'location': {'$ref': '#/definitions/packet'},
13367 'verificationId': {'$ref': '#/definitions/packet'}},
13368 'required': ['location',
13369 'caveatId',
13370 'verificationId'],
13371 'type': 'object'},
13372 'packet': {'additionalProperties': False,
13373 'properties': {'headerLen': {'type': 'integer'},
13374 'start': {'type': 'integer'},
13375 'totalLen': {'type': 'integer'}},
13376 'required': ['start', 'totalLen', 'headerLen'],
13377 'type': 'object'}},
13378 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
13379 'type': 'object'},
13380 'GetMigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/FullMigrationStatus'}},
13381 'type': 'object'},
13382 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
13383 'type': 'object'},
13384 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13385 'type': 'object'}},
13386 'type': 'object'}
13387
13388
13389 @ReturnMapping(SerializedModel)
13390 async def Export(self):
13391 '''
13392
13393 Returns -> typing.Sequence[int]
13394 '''
13395 # map input types to rpc msg
13396 params = dict()
13397 msg = dict(Type='MigrationMaster', Request='Export', Version=1, Params=params)
13398
13399 reply = await self.rpc(msg)
13400 return reply
13401
13402
13403
13404 @ReturnMapping(FullMigrationStatus)
13405 async def GetMigrationStatus(self):
13406 '''
13407
13408 Returns -> typing.Union[int, str, _ForwardRef('ModelMigrationSpec')]
13409 '''
13410 # map input types to rpc msg
13411 params = dict()
13412 msg = dict(Type='MigrationMaster', Request='GetMigrationStatus', Version=1, Params=params)
13413
13414 reply = await self.rpc(msg)
13415 return reply
13416
13417
13418
13419 @ReturnMapping(None)
13420 async def SetPhase(self, phase):
13421 '''
13422 phase : str
13423 Returns -> None
13424 '''
13425 # map input types to rpc msg
13426 params = dict()
13427 msg = dict(Type='MigrationMaster', Request='SetPhase', Version=1, Params=params)
13428 params['phase'] = phase
13429 reply = await self.rpc(msg)
13430 return reply
13431
13432
13433
13434 @ReturnMapping(NotifyWatchResult)
13435 async def Watch(self):
13436 '''
13437
13438 Returns -> typing.Union[_ForwardRef('Error'), str]
13439 '''
13440 # map input types to rpc msg
13441 params = dict()
13442 msg = dict(Type='MigrationMaster', Request='Watch', Version=1, Params=params)
13443
13444 reply = await self.rpc(msg)
13445 return reply
13446
13447
13448 class MigrationMinion(Type):
13449 name = 'MigrationMinion'
13450 version = 1
13451 schema = {'definitions': {'Error': {'additionalProperties': False,
13452 'properties': {'Code': {'type': 'string'},
13453 'Info': {'$ref': '#/definitions/ErrorInfo'},
13454 'Message': {'type': 'string'}},
13455 'required': ['Message', 'Code'],
13456 'type': 'object'},
13457 'ErrorInfo': {'additionalProperties': False,
13458 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13459 'MacaroonPath': {'type': 'string'}},
13460 'type': 'object'},
13461 'Macaroon': {'additionalProperties': False,
13462 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13463 'type': 'array'},
13464 'data': {'items': {'type': 'integer'},
13465 'type': 'array'},
13466 'id': {'$ref': '#/definitions/packet'},
13467 'location': {'$ref': '#/definitions/packet'},
13468 'sig': {'items': {'type': 'integer'},
13469 'type': 'array'}},
13470 'required': ['data',
13471 'location',
13472 'id',
13473 'caveats',
13474 'sig'],
13475 'type': 'object'},
13476 'NotifyWatchResult': {'additionalProperties': False,
13477 'properties': {'Error': {'$ref': '#/definitions/Error'},
13478 'NotifyWatcherId': {'type': 'string'}},
13479 'required': ['NotifyWatcherId', 'Error'],
13480 'type': 'object'},
13481 'caveat': {'additionalProperties': False,
13482 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13483 'location': {'$ref': '#/definitions/packet'},
13484 'verificationId': {'$ref': '#/definitions/packet'}},
13485 'required': ['location',
13486 'caveatId',
13487 'verificationId'],
13488 'type': 'object'},
13489 'packet': {'additionalProperties': False,
13490 'properties': {'headerLen': {'type': 'integer'},
13491 'start': {'type': 'integer'},
13492 'totalLen': {'type': 'integer'}},
13493 'required': ['start', 'totalLen', 'headerLen'],
13494 'type': 'object'}},
13495 'properties': {'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13496 'type': 'object'}},
13497 'type': 'object'}
13498
13499
13500 @ReturnMapping(NotifyWatchResult)
13501 async def Watch(self):
13502 '''
13503
13504 Returns -> typing.Union[_ForwardRef('Error'), str]
13505 '''
13506 # map input types to rpc msg
13507 params = dict()
13508 msg = dict(Type='MigrationMinion', Request='Watch', Version=1, Params=params)
13509
13510 reply = await self.rpc(msg)
13511 return reply
13512
13513
13514 class MigrationStatusWatcher(Type):
13515 name = 'MigrationStatusWatcher'
13516 version = 1
13517 schema = {'definitions': {'MigrationStatus': {'additionalProperties': False,
13518 'properties': {'attempt': {'type': 'integer'},
13519 'phase': {'type': 'string'},
13520 'source-api-addrs': {'items': {'type': 'string'},
13521 'type': 'array'},
13522 'source-ca-cert': {'type': 'string'},
13523 'target-api-addrs': {'items': {'type': 'string'},
13524 'type': 'array'},
13525 'target-ca-cert': {'type': 'string'}},
13526 'required': ['attempt',
13527 'phase',
13528 'source-api-addrs',
13529 'source-ca-cert',
13530 'target-api-addrs',
13531 'target-ca-cert'],
13532 'type': 'object'}},
13533 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
13534 'type': 'object'},
13535 'Stop': {'type': 'object'}},
13536 'type': 'object'}
13537
13538
13539 @ReturnMapping(MigrationStatus)
13540 async def Next(self):
13541 '''
13542
13543 Returns -> typing.Union[int, typing.Sequence[str]]
13544 '''
13545 # map input types to rpc msg
13546 params = dict()
13547 msg = dict(Type='MigrationStatusWatcher', Request='Next', Version=1, Params=params)
13548
13549 reply = await self.rpc(msg)
13550 return reply
13551
13552
13553
13554 @ReturnMapping(None)
13555 async def Stop(self):
13556 '''
13557
13558 Returns -> None
13559 '''
13560 # map input types to rpc msg
13561 params = dict()
13562 msg = dict(Type='MigrationStatusWatcher', Request='Stop', Version=1, Params=params)
13563
13564 reply = await self.rpc(msg)
13565 return reply
13566
13567
13568 class MigrationTarget(Type):
13569 name = 'MigrationTarget'
13570 version = 1
13571 schema = {'definitions': {'ModelArgs': {'additionalProperties': False,
13572 'properties': {'model-tag': {'type': 'string'}},
13573 'required': ['model-tag'],
13574 'type': 'object'},
13575 'SerializedModel': {'additionalProperties': False,
13576 'properties': {'bytes': {'items': {'type': 'integer'},
13577 'type': 'array'}},
13578 'required': ['bytes'],
13579 'type': 'object'}},
13580 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
13581 'type': 'object'},
13582 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
13583 'type': 'object'},
13584 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
13585 'type': 'object'}},
13586 'type': 'object'}
13587
13588
13589 @ReturnMapping(None)
13590 async def Abort(self, model_tag):
13591 '''
13592 model_tag : str
13593 Returns -> None
13594 '''
13595 # map input types to rpc msg
13596 params = dict()
13597 msg = dict(Type='MigrationTarget', Request='Abort', Version=1, Params=params)
13598 params['model-tag'] = model_tag
13599 reply = await self.rpc(msg)
13600 return reply
13601
13602
13603
13604 @ReturnMapping(None)
13605 async def Activate(self, model_tag):
13606 '''
13607 model_tag : str
13608 Returns -> None
13609 '''
13610 # map input types to rpc msg
13611 params = dict()
13612 msg = dict(Type='MigrationTarget', Request='Activate', Version=1, Params=params)
13613 params['model-tag'] = model_tag
13614 reply = await self.rpc(msg)
13615 return reply
13616
13617
13618
13619 @ReturnMapping(None)
13620 async def Import(self, bytes_):
13621 '''
13622 bytes_ : typing.Sequence[int]
13623 Returns -> None
13624 '''
13625 # map input types to rpc msg
13626 params = dict()
13627 msg = dict(Type='MigrationTarget', Request='Import', Version=1, Params=params)
13628 params['bytes'] = bytes_
13629 reply = await self.rpc(msg)
13630 return reply
13631
13632
13633 class ModelManager(Type):
13634 name = 'ModelManager'
13635 version = 2
13636 schema = {'definitions': {'Entities': {'additionalProperties': False,
13637 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13638 'type': 'array'}},
13639 'required': ['Entities'],
13640 'type': 'object'},
13641 'Entity': {'additionalProperties': False,
13642 'properties': {'Tag': {'type': 'string'}},
13643 'required': ['Tag'],
13644 'type': 'object'},
13645 'EntityStatus': {'additionalProperties': False,
13646 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
13647 'type': 'object'}},
13648 'type': 'object'},
13649 'Info': {'type': 'string'},
13650 'Since': {'format': 'date-time',
13651 'type': 'string'},
13652 'Status': {'type': 'string'}},
13653 'required': ['Status',
13654 'Info',
13655 'Data',
13656 'Since'],
13657 'type': 'object'},
13658 'Error': {'additionalProperties': False,
13659 'properties': {'Code': {'type': 'string'},
13660 'Info': {'$ref': '#/definitions/ErrorInfo'},
13661 'Message': {'type': 'string'}},
13662 'required': ['Message', 'Code'],
13663 'type': 'object'},
13664 'ErrorInfo': {'additionalProperties': False,
13665 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13666 'MacaroonPath': {'type': 'string'}},
13667 'type': 'object'},
13668 'ErrorResult': {'additionalProperties': False,
13669 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13670 'required': ['Error'],
13671 'type': 'object'},
13672 'ErrorResults': {'additionalProperties': False,
13673 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13674 'type': 'array'}},
13675 'required': ['Results'],
13676 'type': 'object'},
13677 'Macaroon': {'additionalProperties': False,
13678 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13679 'type': 'array'},
13680 'data': {'items': {'type': 'integer'},
13681 'type': 'array'},
13682 'id': {'$ref': '#/definitions/packet'},
13683 'location': {'$ref': '#/definitions/packet'},
13684 'sig': {'items': {'type': 'integer'},
13685 'type': 'array'}},
13686 'required': ['data',
13687 'location',
13688 'id',
13689 'caveats',
13690 'sig'],
13691 'type': 'object'},
13692 'Model': {'additionalProperties': False,
13693 'properties': {'Name': {'type': 'string'},
13694 'OwnerTag': {'type': 'string'},
13695 'UUID': {'type': 'string'}},
13696 'required': ['Name', 'UUID', 'OwnerTag'],
13697 'type': 'object'},
13698 'ModelConfigResult': {'additionalProperties': False,
13699 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
13700 'type': 'object'}},
13701 'type': 'object'}},
13702 'required': ['Config'],
13703 'type': 'object'},
13704 'ModelCreateArgs': {'additionalProperties': False,
13705 'properties': {'Account': {'patternProperties': {'.*': {'additionalProperties': True,
13706 'type': 'object'}},
13707 'type': 'object'},
13708 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
13709 'type': 'object'}},
13710 'type': 'object'},
13711 'OwnerTag': {'type': 'string'}},
13712 'required': ['OwnerTag',
13713 'Account',
13714 'Config'],
13715 'type': 'object'},
13716 'ModelInfo': {'additionalProperties': False,
13717 'properties': {'Cloud': {'type': 'string'},
13718 'DefaultSeries': {'type': 'string'},
13719 'Life': {'type': 'string'},
13720 'Name': {'type': 'string'},
13721 'OwnerTag': {'type': 'string'},
13722 'ProviderType': {'type': 'string'},
13723 'ServerUUID': {'type': 'string'},
13724 'Status': {'$ref': '#/definitions/EntityStatus'},
13725 'UUID': {'type': 'string'},
13726 'Users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
13727 'type': 'array'}},
13728 'required': ['Name',
13729 'UUID',
13730 'ServerUUID',
13731 'ProviderType',
13732 'DefaultSeries',
13733 'Cloud',
13734 'OwnerTag',
13735 'Life',
13736 'Status',
13737 'Users'],
13738 'type': 'object'},
13739 'ModelInfoResult': {'additionalProperties': False,
13740 'properties': {'error': {'$ref': '#/definitions/Error'},
13741 'result': {'$ref': '#/definitions/ModelInfo'}},
13742 'type': 'object'},
13743 'ModelInfoResults': {'additionalProperties': False,
13744 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
13745 'type': 'array'}},
13746 'required': ['results'],
13747 'type': 'object'},
13748 'ModelSkeletonConfigArgs': {'additionalProperties': False,
13749 'properties': {'Provider': {'type': 'string'},
13750 'Region': {'type': 'string'}},
13751 'required': ['Provider', 'Region'],
13752 'type': 'object'},
13753 'ModelUserInfo': {'additionalProperties': False,
13754 'properties': {'access': {'type': 'string'},
13755 'displayname': {'type': 'string'},
13756 'lastconnection': {'format': 'date-time',
13757 'type': 'string'},
13758 'user': {'type': 'string'}},
13759 'required': ['user',
13760 'displayname',
13761 'lastconnection',
13762 'access'],
13763 'type': 'object'},
13764 'ModifyModelAccess': {'additionalProperties': False,
13765 'properties': {'access': {'type': 'string'},
13766 'action': {'type': 'string'},
13767 'model-tag': {'type': 'string'},
13768 'user-tag': {'type': 'string'}},
13769 'required': ['user-tag',
13770 'action',
13771 'access',
13772 'model-tag'],
13773 'type': 'object'},
13774 'ModifyModelAccessRequest': {'additionalProperties': False,
13775 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
13776 'type': 'array'}},
13777 'required': ['changes'],
13778 'type': 'object'},
13779 'UserModel': {'additionalProperties': False,
13780 'properties': {'LastConnection': {'format': 'date-time',
13781 'type': 'string'},
13782 'Model': {'$ref': '#/definitions/Model'}},
13783 'required': ['Model', 'LastConnection'],
13784 'type': 'object'},
13785 'UserModelList': {'additionalProperties': False,
13786 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
13787 'type': 'array'}},
13788 'required': ['UserModels'],
13789 'type': 'object'},
13790 'caveat': {'additionalProperties': False,
13791 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13792 'location': {'$ref': '#/definitions/packet'},
13793 'verificationId': {'$ref': '#/definitions/packet'}},
13794 'required': ['location',
13795 'caveatId',
13796 'verificationId'],
13797 'type': 'object'},
13798 'packet': {'additionalProperties': False,
13799 'properties': {'headerLen': {'type': 'integer'},
13800 'start': {'type': 'integer'},
13801 'totalLen': {'type': 'integer'}},
13802 'required': ['start', 'totalLen', 'headerLen'],
13803 'type': 'object'}},
13804 'properties': {'ConfigSkeleton': {'properties': {'Params': {'$ref': '#/definitions/ModelSkeletonConfigArgs'},
13805 'Result': {'$ref': '#/definitions/ModelConfigResult'}},
13806 'type': 'object'},
13807 'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
13808 'Result': {'$ref': '#/definitions/Model'}},
13809 'type': 'object'},
13810 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
13811 'Result': {'$ref': '#/definitions/UserModelList'}},
13812 'type': 'object'},
13813 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13814 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
13815 'type': 'object'},
13816 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
13817 'Result': {'$ref': '#/definitions/ErrorResults'}},
13818 'type': 'object'}},
13819 'type': 'object'}
13820
13821
13822 @ReturnMapping(ModelConfigResult)
13823 async def ConfigSkeleton(self, provider, region):
13824 '''
13825 provider : str
13826 region : str
13827 Returns -> typing.Mapping[str, typing.Any]
13828 '''
13829 # map input types to rpc msg
13830 params = dict()
13831 msg = dict(Type='ModelManager', Request='ConfigSkeleton', Version=2, Params=params)
13832 params['Provider'] = provider
13833 params['Region'] = region
13834 reply = await self.rpc(msg)
13835 return reply
13836
13837
13838
13839 @ReturnMapping(Model)
13840 async def CreateModel(self, account, config, ownertag):
13841 '''
13842 account : typing.Mapping[str, typing.Any]
13843 config : typing.Mapping[str, typing.Any]
13844 ownertag : str
13845 Returns -> <class 'str'>
13846 '''
13847 # map input types to rpc msg
13848 params = dict()
13849 msg = dict(Type='ModelManager', Request='CreateModel', Version=2, Params=params)
13850 params['Account'] = account
13851 params['Config'] = config
13852 params['OwnerTag'] = ownertag
13853 reply = await self.rpc(msg)
13854 return reply
13855
13856
13857
13858 @ReturnMapping(UserModelList)
13859 async def ListModels(self, tag):
13860 '''
13861 tag : str
13862 Returns -> typing.Sequence[~UserModel]
13863 '''
13864 # map input types to rpc msg
13865 params = dict()
13866 msg = dict(Type='ModelManager', Request='ListModels', Version=2, Params=params)
13867 params['Tag'] = tag
13868 reply = await self.rpc(msg)
13869 return reply
13870
13871
13872
13873 @ReturnMapping(ModelInfoResults)
13874 async def ModelInfo(self, entities):
13875 '''
13876 entities : typing.Sequence[~Entity]
13877 Returns -> typing.Sequence[~ModelInfoResult]
13878 '''
13879 # map input types to rpc msg
13880 params = dict()
13881 msg = dict(Type='ModelManager', Request='ModelInfo', Version=2, Params=params)
13882 params['Entities'] = entities
13883 reply = await self.rpc(msg)
13884 return reply
13885
13886
13887
13888 @ReturnMapping(ErrorResults)
13889 async def ModifyModelAccess(self, changes):
13890 '''
13891 changes : typing.Sequence[~ModifyModelAccess]
13892 Returns -> typing.Sequence[~ErrorResult]
13893 '''
13894 # map input types to rpc msg
13895 params = dict()
13896 msg = dict(Type='ModelManager', Request='ModifyModelAccess', Version=2, Params=params)
13897 params['changes'] = changes
13898 reply = await self.rpc(msg)
13899 return reply
13900
13901
13902 class NotifyWatcher(Type):
13903 name = 'NotifyWatcher'
13904 version = 1
13905 schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
13906 'type': 'object'}
13907
13908
13909 @ReturnMapping(None)
13910 async def Next(self):
13911 '''
13912
13913 Returns -> None
13914 '''
13915 # map input types to rpc msg
13916 params = dict()
13917 msg = dict(Type='NotifyWatcher', Request='Next', Version=1, Params=params)
13918
13919 reply = await self.rpc(msg)
13920 return reply
13921
13922
13923
13924 @ReturnMapping(None)
13925 async def Stop(self):
13926 '''
13927
13928 Returns -> None
13929 '''
13930 # map input types to rpc msg
13931 params = dict()
13932 msg = dict(Type='NotifyWatcher', Request='Stop', Version=1, Params=params)
13933
13934 reply = await self.rpc(msg)
13935 return reply
13936
13937
13938 class Pinger(Type):
13939 name = 'Pinger'
13940 version = 1
13941 schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
13942 'type': 'object'}
13943
13944
13945 @ReturnMapping(None)
13946 async def Ping(self):
13947 '''
13948
13949 Returns -> None
13950 '''
13951 # map input types to rpc msg
13952 params = dict()
13953 msg = dict(Type='Pinger', Request='Ping', Version=1, Params=params)
13954
13955 reply = await self.rpc(msg)
13956 return reply
13957
13958
13959
13960 @ReturnMapping(None)
13961 async def Stop(self):
13962 '''
13963
13964 Returns -> None
13965 '''
13966 # map input types to rpc msg
13967 params = dict()
13968 msg = dict(Type='Pinger', Request='Stop', Version=1, Params=params)
13969
13970 reply = await self.rpc(msg)
13971 return reply
13972
13973
13974 class Provisioner(Type):
13975 name = 'Provisioner'
13976 version = 3
13977 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
13978 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
13979 'type': 'array'},
13980 'type': 'array'}},
13981 'required': ['Servers'],
13982 'type': 'object'},
13983 'Address': {'additionalProperties': False,
13984 'properties': {'Scope': {'type': 'string'},
13985 'SpaceName': {'type': 'string'},
13986 'Type': {'type': 'string'},
13987 'Value': {'type': 'string'}},
13988 'required': ['Value', 'Type', 'Scope'],
13989 'type': 'object'},
13990 'Binary': {'additionalProperties': False,
13991 'properties': {'Arch': {'type': 'string'},
13992 'Number': {'$ref': '#/definitions/Number'},
13993 'Series': {'type': 'string'}},
13994 'required': ['Number', 'Series', 'Arch'],
13995 'type': 'object'},
13996 'BytesResult': {'additionalProperties': False,
13997 'properties': {'Result': {'items': {'type': 'integer'},
13998 'type': 'array'}},
13999 'required': ['Result'],
14000 'type': 'object'},
14001 'CloudImageMetadata': {'additionalProperties': False,
14002 'properties': {'arch': {'type': 'string'},
14003 'image_id': {'type': 'string'},
14004 'priority': {'type': 'integer'},
14005 'region': {'type': 'string'},
14006 'root_storage_size': {'type': 'integer'},
14007 'root_storage_type': {'type': 'string'},
14008 'series': {'type': 'string'},
14009 'source': {'type': 'string'},
14010 'stream': {'type': 'string'},
14011 'version': {'type': 'string'},
14012 'virt_type': {'type': 'string'}},
14013 'required': ['image_id',
14014 'region',
14015 'version',
14016 'series',
14017 'arch',
14018 'source',
14019 'priority'],
14020 'type': 'object'},
14021 'ConstraintsResult': {'additionalProperties': False,
14022 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
14023 'Error': {'$ref': '#/definitions/Error'}},
14024 'required': ['Error', 'Constraints'],
14025 'type': 'object'},
14026 'ConstraintsResults': {'additionalProperties': False,
14027 'properties': {'Results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
14028 'type': 'array'}},
14029 'required': ['Results'],
14030 'type': 'object'},
14031 'ContainerConfig': {'additionalProperties': False,
14032 'properties': {'AllowLXCLoopMounts': {'type': 'boolean'},
14033 'AptMirror': {'type': 'string'},
14034 'AptProxy': {'$ref': '#/definitions/Settings'},
14035 'AuthorizedKeys': {'type': 'string'},
14036 'ProviderType': {'type': 'string'},
14037 'Proxy': {'$ref': '#/definitions/Settings'},
14038 'SSLHostnameVerification': {'type': 'boolean'},
14039 'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'}},
14040 'required': ['ProviderType',
14041 'AuthorizedKeys',
14042 'SSLHostnameVerification',
14043 'Proxy',
14044 'AptProxy',
14045 'AptMirror',
14046 'AllowLXCLoopMounts',
14047 'UpdateBehavior'],
14048 'type': 'object'},
14049 'ContainerManagerConfig': {'additionalProperties': False,
14050 'properties': {'ManagerConfig': {'patternProperties': {'.*': {'type': 'string'}},
14051 'type': 'object'}},
14052 'required': ['ManagerConfig'],
14053 'type': 'object'},
14054 'ContainerManagerConfigParams': {'additionalProperties': False,
14055 'properties': {'Type': {'type': 'string'}},
14056 'required': ['Type'],
14057 'type': 'object'},
14058 'DistributionGroupResult': {'additionalProperties': False,
14059 'properties': {'Error': {'$ref': '#/definitions/Error'},
14060 'Result': {'items': {'type': 'string'},
14061 'type': 'array'}},
14062 'required': ['Error', 'Result'],
14063 'type': 'object'},
14064 'DistributionGroupResults': {'additionalProperties': False,
14065 'properties': {'Results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
14066 'type': 'array'}},
14067 'required': ['Results'],
14068 'type': 'object'},
14069 'Entities': {'additionalProperties': False,
14070 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
14071 'type': 'array'}},
14072 'required': ['Entities'],
14073 'type': 'object'},
14074 'Entity': {'additionalProperties': False,
14075 'properties': {'Tag': {'type': 'string'}},
14076 'required': ['Tag'],
14077 'type': 'object'},
14078 'EntityPassword': {'additionalProperties': False,
14079 'properties': {'Password': {'type': 'string'},
14080 'Tag': {'type': 'string'}},
14081 'required': ['Tag', 'Password'],
14082 'type': 'object'},
14083 'EntityPasswords': {'additionalProperties': False,
14084 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
14085 'type': 'array'}},
14086 'required': ['Changes'],
14087 'type': 'object'},
14088 'EntityStatusArgs': {'additionalProperties': False,
14089 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
14090 'type': 'object'}},
14091 'type': 'object'},
14092 'Info': {'type': 'string'},
14093 'Status': {'type': 'string'},
14094 'Tag': {'type': 'string'}},
14095 'required': ['Tag',
14096 'Status',
14097 'Info',
14098 'Data'],
14099 'type': 'object'},
14100 'Error': {'additionalProperties': False,
14101 'properties': {'Code': {'type': 'string'},
14102 'Info': {'$ref': '#/definitions/ErrorInfo'},
14103 'Message': {'type': 'string'}},
14104 'required': ['Message', 'Code'],
14105 'type': 'object'},
14106 'ErrorInfo': {'additionalProperties': False,
14107 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14108 'MacaroonPath': {'type': 'string'}},
14109 'type': 'object'},
14110 'ErrorResult': {'additionalProperties': False,
14111 'properties': {'Error': {'$ref': '#/definitions/Error'}},
14112 'required': ['Error'],
14113 'type': 'object'},
14114 'ErrorResults': {'additionalProperties': False,
14115 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
14116 'type': 'array'}},
14117 'required': ['Results'],
14118 'type': 'object'},
14119 'FindToolsParams': {'additionalProperties': False,
14120 'properties': {'Arch': {'type': 'string'},
14121 'MajorVersion': {'type': 'integer'},
14122 'MinorVersion': {'type': 'integer'},
14123 'Number': {'$ref': '#/definitions/Number'},
14124 'Series': {'type': 'string'}},
14125 'required': ['Number',
14126 'MajorVersion',
14127 'MinorVersion',
14128 'Arch',
14129 'Series'],
14130 'type': 'object'},
14131 'FindToolsResult': {'additionalProperties': False,
14132 'properties': {'Error': {'$ref': '#/definitions/Error'},
14133 'List': {'items': {'$ref': '#/definitions/Tools'},
14134 'type': 'array'}},
14135 'required': ['List', 'Error'],
14136 'type': 'object'},
14137 'HardwareCharacteristics': {'additionalProperties': False,
14138 'properties': {'Arch': {'type': 'string'},
14139 'AvailabilityZone': {'type': 'string'},
14140 'CpuCores': {'type': 'integer'},
14141 'CpuPower': {'type': 'integer'},
14142 'Mem': {'type': 'integer'},
14143 'RootDisk': {'type': 'integer'},
14144 'Tags': {'items': {'type': 'string'},
14145 'type': 'array'}},
14146 'type': 'object'},
14147 'HostPort': {'additionalProperties': False,
14148 'properties': {'Address': {'$ref': '#/definitions/Address'},
14149 'Port': {'type': 'integer'}},
14150 'required': ['Address', 'Port'],
14151 'type': 'object'},
14152 'InstanceInfo': {'additionalProperties': False,
14153 'properties': {'Characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
14154 'InstanceId': {'type': 'string'},
14155 'NetworkConfig': {'items': {'$ref': '#/definitions/NetworkConfig'},
14156 'type': 'array'},
14157 'Nonce': {'type': 'string'},
14158 'Tag': {'type': 'string'},
14159 'VolumeAttachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
14160 'type': 'object'},
14161 'Volumes': {'items': {'$ref': '#/definitions/Volume'},
14162 'type': 'array'}},
14163 'required': ['Tag',
14164 'InstanceId',
14165 'Nonce',
14166 'Characteristics',
14167 'Volumes',
14168 'VolumeAttachments',
14169 'NetworkConfig'],
14170 'type': 'object'},
14171 'InstancesInfo': {'additionalProperties': False,
14172 'properties': {'Machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
14173 'type': 'array'}},
14174 'required': ['Machines'],
14175 'type': 'object'},
14176 'LifeResult': {'additionalProperties': False,
14177 'properties': {'Error': {'$ref': '#/definitions/Error'},
14178 'Life': {'type': 'string'}},
14179 'required': ['Life', 'Error'],
14180 'type': 'object'},
14181 'LifeResults': {'additionalProperties': False,
14182 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
14183 'type': 'array'}},
14184 'required': ['Results'],
14185 'type': 'object'},
14186 'Macaroon': {'additionalProperties': False,
14187 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14188 'type': 'array'},
14189 'data': {'items': {'type': 'integer'},
14190 'type': 'array'},
14191 'id': {'$ref': '#/definitions/packet'},
14192 'location': {'$ref': '#/definitions/packet'},
14193 'sig': {'items': {'type': 'integer'},
14194 'type': 'array'}},
14195 'required': ['data',
14196 'location',
14197 'id',
14198 'caveats',
14199 'sig'],
14200 'type': 'object'},
14201 'MachineContainers': {'additionalProperties': False,
14202 'properties': {'ContainerTypes': {'items': {'type': 'string'},
14203 'type': 'array'},
14204 'MachineTag': {'type': 'string'}},
14205 'required': ['MachineTag',
14206 'ContainerTypes'],
14207 'type': 'object'},
14208 'MachineContainersParams': {'additionalProperties': False,
14209 'properties': {'Params': {'items': {'$ref': '#/definitions/MachineContainers'},
14210 'type': 'array'}},
14211 'required': ['Params'],
14212 'type': 'object'},
14213 'MachineNetworkConfigResult': {'additionalProperties': False,
14214 'properties': {'Error': {'$ref': '#/definitions/Error'},
14215 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
14216 'type': 'array'}},
14217 'required': ['Error', 'Info'],
14218 'type': 'object'},
14219 'MachineNetworkConfigResults': {'additionalProperties': False,
14220 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
14221 'type': 'array'}},
14222 'required': ['Results'],
14223 'type': 'object'},
14224 'ModelConfigResult': {'additionalProperties': False,
14225 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
14226 'type': 'object'}},
14227 'type': 'object'}},
14228 'required': ['Config'],
14229 'type': 'object'},
14230 'NetworkConfig': {'additionalProperties': False,
14231 'properties': {'Address': {'type': 'string'},
14232 'CIDR': {'type': 'string'},
14233 'ConfigType': {'type': 'string'},
14234 'DNSSearchDomains': {'items': {'type': 'string'},
14235 'type': 'array'},
14236 'DNSServers': {'items': {'type': 'string'},
14237 'type': 'array'},
14238 'DeviceIndex': {'type': 'integer'},
14239 'Disabled': {'type': 'boolean'},
14240 'GatewayAddress': {'type': 'string'},
14241 'InterfaceName': {'type': 'string'},
14242 'InterfaceType': {'type': 'string'},
14243 'MACAddress': {'type': 'string'},
14244 'MTU': {'type': 'integer'},
14245 'NoAutoStart': {'type': 'boolean'},
14246 'ParentInterfaceName': {'type': 'string'},
14247 'ProviderAddressId': {'type': 'string'},
14248 'ProviderId': {'type': 'string'},
14249 'ProviderSpaceId': {'type': 'string'},
14250 'ProviderSubnetId': {'type': 'string'},
14251 'ProviderVLANId': {'type': 'string'},
14252 'VLANTag': {'type': 'integer'}},
14253 'required': ['DeviceIndex',
14254 'MACAddress',
14255 'CIDR',
14256 'MTU',
14257 'ProviderId',
14258 'ProviderSubnetId',
14259 'ProviderSpaceId',
14260 'ProviderAddressId',
14261 'ProviderVLANId',
14262 'VLANTag',
14263 'InterfaceName',
14264 'ParentInterfaceName',
14265 'InterfaceType',
14266 'Disabled'],
14267 'type': 'object'},
14268 'NotifyWatchResult': {'additionalProperties': False,
14269 'properties': {'Error': {'$ref': '#/definitions/Error'},
14270 'NotifyWatcherId': {'type': 'string'}},
14271 'required': ['NotifyWatcherId', 'Error'],
14272 'type': 'object'},
14273 'Number': {'additionalProperties': False,
14274 'properties': {'Build': {'type': 'integer'},
14275 'Major': {'type': 'integer'},
14276 'Minor': {'type': 'integer'},
14277 'Patch': {'type': 'integer'},
14278 'Tag': {'type': 'string'}},
14279 'required': ['Major',
14280 'Minor',
14281 'Tag',
14282 'Patch',
14283 'Build'],
14284 'type': 'object'},
14285 'ProvisioningInfo': {'additionalProperties': False,
14286 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
14287 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
14288 'type': 'object'},
14289 'ImageMetadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
14290 'type': 'array'},
14291 'Jobs': {'items': {'type': 'string'},
14292 'type': 'array'},
14293 'Placement': {'type': 'string'},
14294 'Series': {'type': 'string'},
14295 'SubnetsToZones': {'patternProperties': {'.*': {'items': {'type': 'string'},
14296 'type': 'array'}},
14297 'type': 'object'},
14298 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
14299 'type': 'object'},
14300 'Volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
14301 'type': 'array'}},
14302 'required': ['Constraints',
14303 'Series',
14304 'Placement',
14305 'Jobs',
14306 'Volumes',
14307 'Tags',
14308 'SubnetsToZones',
14309 'ImageMetadata',
14310 'EndpointBindings'],
14311 'type': 'object'},
14312 'ProvisioningInfoResult': {'additionalProperties': False,
14313 'properties': {'Error': {'$ref': '#/definitions/Error'},
14314 'Result': {'$ref': '#/definitions/ProvisioningInfo'}},
14315 'required': ['Error', 'Result'],
14316 'type': 'object'},
14317 'ProvisioningInfoResults': {'additionalProperties': False,
14318 'properties': {'Results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
14319 'type': 'array'}},
14320 'required': ['Results'],
14321 'type': 'object'},
14322 'SetStatus': {'additionalProperties': False,
14323 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
14324 'type': 'array'}},
14325 'required': ['Entities'],
14326 'type': 'object'},
14327 'Settings': {'additionalProperties': False,
14328 'properties': {'Ftp': {'type': 'string'},
14329 'Http': {'type': 'string'},
14330 'Https': {'type': 'string'},
14331 'NoProxy': {'type': 'string'}},
14332 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
14333 'type': 'object'},
14334 'StatusResult': {'additionalProperties': False,
14335 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
14336 'type': 'object'}},
14337 'type': 'object'},
14338 'Error': {'$ref': '#/definitions/Error'},
14339 'Id': {'type': 'string'},
14340 'Info': {'type': 'string'},
14341 'Life': {'type': 'string'},
14342 'Since': {'format': 'date-time',
14343 'type': 'string'},
14344 'Status': {'type': 'string'}},
14345 'required': ['Error',
14346 'Id',
14347 'Life',
14348 'Status',
14349 'Info',
14350 'Data',
14351 'Since'],
14352 'type': 'object'},
14353 'StatusResults': {'additionalProperties': False,
14354 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
14355 'type': 'array'}},
14356 'required': ['Results'],
14357 'type': 'object'},
14358 'StringResult': {'additionalProperties': False,
14359 'properties': {'Error': {'$ref': '#/definitions/Error'},
14360 'Result': {'type': 'string'}},
14361 'required': ['Error', 'Result'],
14362 'type': 'object'},
14363 'StringResults': {'additionalProperties': False,
14364 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
14365 'type': 'array'}},
14366 'required': ['Results'],
14367 'type': 'object'},
14368 'StringsResult': {'additionalProperties': False,
14369 'properties': {'Error': {'$ref': '#/definitions/Error'},
14370 'Result': {'items': {'type': 'string'},
14371 'type': 'array'}},
14372 'required': ['Error', 'Result'],
14373 'type': 'object'},
14374 'StringsWatchResult': {'additionalProperties': False,
14375 'properties': {'Changes': {'items': {'type': 'string'},
14376 'type': 'array'},
14377 'Error': {'$ref': '#/definitions/Error'},
14378 'StringsWatcherId': {'type': 'string'}},
14379 'required': ['StringsWatcherId',
14380 'Changes',
14381 'Error'],
14382 'type': 'object'},
14383 'StringsWatchResults': {'additionalProperties': False,
14384 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
14385 'type': 'array'}},
14386 'required': ['Results'],
14387 'type': 'object'},
14388 'Tools': {'additionalProperties': False,
14389 'properties': {'sha256': {'type': 'string'},
14390 'size': {'type': 'integer'},
14391 'url': {'type': 'string'},
14392 'version': {'$ref': '#/definitions/Binary'}},
14393 'required': ['version', 'url', 'size'],
14394 'type': 'object'},
14395 'ToolsResult': {'additionalProperties': False,
14396 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
14397 'Error': {'$ref': '#/definitions/Error'},
14398 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
14399 'type': 'array'}},
14400 'required': ['ToolsList',
14401 'DisableSSLHostnameVerification',
14402 'Error'],
14403 'type': 'object'},
14404 'ToolsResults': {'additionalProperties': False,
14405 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
14406 'type': 'array'}},
14407 'required': ['Results'],
14408 'type': 'object'},
14409 'UpdateBehavior': {'additionalProperties': False,
14410 'properties': {'EnableOSRefreshUpdate': {'type': 'boolean'},
14411 'EnableOSUpgrade': {'type': 'boolean'}},
14412 'required': ['EnableOSRefreshUpdate',
14413 'EnableOSUpgrade'],
14414 'type': 'object'},
14415 'Value': {'additionalProperties': False,
14416 'properties': {'arch': {'type': 'string'},
14417 'container': {'type': 'string'},
14418 'cpu-cores': {'type': 'integer'},
14419 'cpu-power': {'type': 'integer'},
14420 'instance-type': {'type': 'string'},
14421 'mem': {'type': 'integer'},
14422 'root-disk': {'type': 'integer'},
14423 'spaces': {'items': {'type': 'string'},
14424 'type': 'array'},
14425 'tags': {'items': {'type': 'string'},
14426 'type': 'array'},
14427 'virt-type': {'type': 'string'}},
14428 'type': 'object'},
14429 'Volume': {'additionalProperties': False,
14430 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
14431 'volumetag': {'type': 'string'}},
14432 'required': ['volumetag', 'info'],
14433 'type': 'object'},
14434 'VolumeAttachmentInfo': {'additionalProperties': False,
14435 'properties': {'busaddress': {'type': 'string'},
14436 'devicelink': {'type': 'string'},
14437 'devicename': {'type': 'string'},
14438 'read-only': {'type': 'boolean'}},
14439 'type': 'object'},
14440 'VolumeAttachmentParams': {'additionalProperties': False,
14441 'properties': {'instanceid': {'type': 'string'},
14442 'machinetag': {'type': 'string'},
14443 'provider': {'type': 'string'},
14444 'read-only': {'type': 'boolean'},
14445 'volumeid': {'type': 'string'},
14446 'volumetag': {'type': 'string'}},
14447 'required': ['volumetag',
14448 'machinetag',
14449 'provider'],
14450 'type': 'object'},
14451 'VolumeInfo': {'additionalProperties': False,
14452 'properties': {'hardwareid': {'type': 'string'},
14453 'persistent': {'type': 'boolean'},
14454 'size': {'type': 'integer'},
14455 'volumeid': {'type': 'string'}},
14456 'required': ['volumeid', 'size', 'persistent'],
14457 'type': 'object'},
14458 'VolumeParams': {'additionalProperties': False,
14459 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
14460 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
14461 'type': 'object'}},
14462 'type': 'object'},
14463 'provider': {'type': 'string'},
14464 'size': {'type': 'integer'},
14465 'tags': {'patternProperties': {'.*': {'type': 'string'}},
14466 'type': 'object'},
14467 'volumetag': {'type': 'string'}},
14468 'required': ['volumetag', 'size', 'provider'],
14469 'type': 'object'},
14470 'WatchContainer': {'additionalProperties': False,
14471 'properties': {'ContainerType': {'type': 'string'},
14472 'MachineTag': {'type': 'string'}},
14473 'required': ['MachineTag', 'ContainerType'],
14474 'type': 'object'},
14475 'WatchContainers': {'additionalProperties': False,
14476 'properties': {'Params': {'items': {'$ref': '#/definitions/WatchContainer'},
14477 'type': 'array'}},
14478 'required': ['Params'],
14479 'type': 'object'},
14480 'caveat': {'additionalProperties': False,
14481 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14482 'location': {'$ref': '#/definitions/packet'},
14483 'verificationId': {'$ref': '#/definitions/packet'}},
14484 'required': ['location',
14485 'caveatId',
14486 'verificationId'],
14487 'type': 'object'},
14488 'packet': {'additionalProperties': False,
14489 'properties': {'headerLen': {'type': 'integer'},
14490 'start': {'type': 'integer'},
14491 'totalLen': {'type': 'integer'}},
14492 'required': ['start', 'totalLen', 'headerLen'],
14493 'type': 'object'}},
14494 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
14495 'type': 'object'},
14496 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
14497 'type': 'object'},
14498 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
14499 'type': 'object'},
14500 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14501 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
14502 'type': 'object'},
14503 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
14504 'type': 'object'},
14505 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
14506 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
14507 'type': 'object'},
14508 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14509 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
14510 'type': 'object'},
14511 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14512 'Result': {'$ref': '#/definitions/ErrorResults'}},
14513 'type': 'object'},
14514 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
14515 'Result': {'$ref': '#/definitions/FindToolsResult'}},
14516 'type': 'object'},
14517 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14518 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
14519 'type': 'object'},
14520 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14521 'Result': {'$ref': '#/definitions/StringResults'}},
14522 'type': 'object'},
14523 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14524 'Result': {'$ref': '#/definitions/StatusResults'}},
14525 'type': 'object'},
14526 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14527 'Result': {'$ref': '#/definitions/LifeResults'}},
14528 'type': 'object'},
14529 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
14530 'type': 'object'},
14531 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
14532 'type': 'object'},
14533 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
14534 'type': 'object'},
14535 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14536 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
14537 'type': 'object'},
14538 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14539 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
14540 'type': 'object'},
14541 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14542 'Result': {'$ref': '#/definitions/ErrorResults'}},
14543 'type': 'object'},
14544 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14545 'Result': {'$ref': '#/definitions/ErrorResults'}},
14546 'type': 'object'},
14547 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14548 'Result': {'$ref': '#/definitions/StringResults'}},
14549 'type': 'object'},
14550 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
14551 'Result': {'$ref': '#/definitions/ErrorResults'}},
14552 'type': 'object'},
14553 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14554 'Result': {'$ref': '#/definitions/ErrorResults'}},
14555 'type': 'object'},
14556 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
14557 'Result': {'$ref': '#/definitions/ErrorResults'}},
14558 'type': 'object'},
14559 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14560 'Result': {'$ref': '#/definitions/ErrorResults'}},
14561 'type': 'object'},
14562 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
14563 'Result': {'$ref': '#/definitions/ErrorResults'}},
14564 'type': 'object'},
14565 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
14566 'type': 'object'},
14567 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14568 'Result': {'$ref': '#/definitions/StatusResults'}},
14569 'type': 'object'},
14570 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14571 'Result': {'$ref': '#/definitions/ToolsResults'}},
14572 'type': 'object'},
14573 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14574 'Result': {'$ref': '#/definitions/ErrorResults'}},
14575 'type': 'object'},
14576 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14577 'type': 'object'},
14578 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
14579 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14580 'type': 'object'},
14581 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
14582 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14583 'type': 'object'},
14584 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14585 'type': 'object'},
14586 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14587 'type': 'object'},
14588 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
14589 'type': 'object'}},
14590 'type': 'object'}
14591
14592
14593 @ReturnMapping(StringsResult)
14594 async def APIAddresses(self):
14595 '''
14596
14597 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
14598 '''
14599 # map input types to rpc msg
14600 params = dict()
14601 msg = dict(Type='Provisioner', Request='APIAddresses', Version=3, Params=params)
14602
14603 reply = await self.rpc(msg)
14604 return reply
14605
14606
14607
14608 @ReturnMapping(APIHostPortsResult)
14609 async def APIHostPorts(self):
14610 '''
14611
14612 Returns -> typing.Sequence[~HostPort]
14613 '''
14614 # map input types to rpc msg
14615 params = dict()
14616 msg = dict(Type='Provisioner', Request='APIHostPorts', Version=3, Params=params)
14617
14618 reply = await self.rpc(msg)
14619 return reply
14620
14621
14622
14623 @ReturnMapping(BytesResult)
14624 async def CACert(self):
14625 '''
14626
14627 Returns -> typing.Sequence[int]
14628 '''
14629 # map input types to rpc msg
14630 params = dict()
14631 msg = dict(Type='Provisioner', Request='CACert', Version=3, Params=params)
14632
14633 reply = await self.rpc(msg)
14634 return reply
14635
14636
14637
14638 @ReturnMapping(ConstraintsResults)
14639 async def Constraints(self, entities):
14640 '''
14641 entities : typing.Sequence[~Entity]
14642 Returns -> typing.Sequence[~ConstraintsResult]
14643 '''
14644 # map input types to rpc msg
14645 params = dict()
14646 msg = dict(Type='Provisioner', Request='Constraints', Version=3, Params=params)
14647 params['Entities'] = entities
14648 reply = await self.rpc(msg)
14649 return reply
14650
14651
14652
14653 @ReturnMapping(ContainerConfig)
14654 async def ContainerConfig(self):
14655 '''
14656
14657 Returns -> typing.Union[bool, str, _ForwardRef('Settings'), _ForwardRef('Settings'), _ForwardRef('UpdateBehavior')]
14658 '''
14659 # map input types to rpc msg
14660 params = dict()
14661 msg = dict(Type='Provisioner', Request='ContainerConfig', Version=3, Params=params)
14662
14663 reply = await self.rpc(msg)
14664 return reply
14665
14666
14667
14668 @ReturnMapping(ContainerManagerConfig)
14669 async def ContainerManagerConfig(self, type_):
14670 '''
14671 type_ : str
14672 Returns -> typing.Mapping[str, str]
14673 '''
14674 # map input types to rpc msg
14675 params = dict()
14676 msg = dict(Type='Provisioner', Request='ContainerManagerConfig', Version=3, Params=params)
14677 params['Type'] = type_
14678 reply = await self.rpc(msg)
14679 return reply
14680
14681
14682
14683 @ReturnMapping(DistributionGroupResults)
14684 async def DistributionGroup(self, entities):
14685 '''
14686 entities : typing.Sequence[~Entity]
14687 Returns -> typing.Sequence[~DistributionGroupResult]
14688 '''
14689 # map input types to rpc msg
14690 params = dict()
14691 msg = dict(Type='Provisioner', Request='DistributionGroup', Version=3, Params=params)
14692 params['Entities'] = entities
14693 reply = await self.rpc(msg)
14694 return reply
14695
14696
14697
14698 @ReturnMapping(ErrorResults)
14699 async def EnsureDead(self, entities):
14700 '''
14701 entities : typing.Sequence[~Entity]
14702 Returns -> typing.Sequence[~ErrorResult]
14703 '''
14704 # map input types to rpc msg
14705 params = dict()
14706 msg = dict(Type='Provisioner', Request='EnsureDead', Version=3, Params=params)
14707 params['Entities'] = entities
14708 reply = await self.rpc(msg)
14709 return reply
14710
14711
14712
14713 @ReturnMapping(FindToolsResult)
14714 async def FindTools(self, arch, majorversion, minorversion, number, series):
14715 '''
14716 arch : str
14717 majorversion : int
14718 minorversion : int
14719 number : Number
14720 series : str
14721 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
14722 '''
14723 # map input types to rpc msg
14724 params = dict()
14725 msg = dict(Type='Provisioner', Request='FindTools', Version=3, Params=params)
14726 params['Arch'] = arch
14727 params['MajorVersion'] = majorversion
14728 params['MinorVersion'] = minorversion
14729 params['Number'] = number
14730 params['Series'] = series
14731 reply = await self.rpc(msg)
14732 return reply
14733
14734
14735
14736 @ReturnMapping(MachineNetworkConfigResults)
14737 async def GetContainerInterfaceInfo(self, entities):
14738 '''
14739 entities : typing.Sequence[~Entity]
14740 Returns -> typing.Sequence[~MachineNetworkConfigResult]
14741 '''
14742 # map input types to rpc msg
14743 params = dict()
14744 msg = dict(Type='Provisioner', Request='GetContainerInterfaceInfo', Version=3, Params=params)
14745 params['Entities'] = entities
14746 reply = await self.rpc(msg)
14747 return reply
14748
14749
14750
14751 @ReturnMapping(StringResults)
14752 async def InstanceId(self, entities):
14753 '''
14754 entities : typing.Sequence[~Entity]
14755 Returns -> typing.Sequence[~StringResult]
14756 '''
14757 # map input types to rpc msg
14758 params = dict()
14759 msg = dict(Type='Provisioner', Request='InstanceId', Version=3, Params=params)
14760 params['Entities'] = entities
14761 reply = await self.rpc(msg)
14762 return reply
14763
14764
14765
14766 @ReturnMapping(StatusResults)
14767 async def InstanceStatus(self, entities):
14768 '''
14769 entities : typing.Sequence[~Entity]
14770 Returns -> typing.Sequence[~StatusResult]
14771 '''
14772 # map input types to rpc msg
14773 params = dict()
14774 msg = dict(Type='Provisioner', Request='InstanceStatus', Version=3, Params=params)
14775 params['Entities'] = entities
14776 reply = await self.rpc(msg)
14777 return reply
14778
14779
14780
14781 @ReturnMapping(LifeResults)
14782 async def Life(self, entities):
14783 '''
14784 entities : typing.Sequence[~Entity]
14785 Returns -> typing.Sequence[~LifeResult]
14786 '''
14787 # map input types to rpc msg
14788 params = dict()
14789 msg = dict(Type='Provisioner', Request='Life', Version=3, Params=params)
14790 params['Entities'] = entities
14791 reply = await self.rpc(msg)
14792 return reply
14793
14794
14795
14796 @ReturnMapping(StatusResults)
14797 async def MachinesWithTransientErrors(self):
14798 '''
14799
14800 Returns -> typing.Sequence[~StatusResult]
14801 '''
14802 # map input types to rpc msg
14803 params = dict()
14804 msg = dict(Type='Provisioner', Request='MachinesWithTransientErrors', Version=3, Params=params)
14805
14806 reply = await self.rpc(msg)
14807 return reply
14808
14809
14810
14811 @ReturnMapping(ModelConfigResult)
14812 async def ModelConfig(self):
14813 '''
14814
14815 Returns -> typing.Mapping[str, typing.Any]
14816 '''
14817 # map input types to rpc msg
14818 params = dict()
14819 msg = dict(Type='Provisioner', Request='ModelConfig', Version=3, Params=params)
14820
14821 reply = await self.rpc(msg)
14822 return reply
14823
14824
14825
14826 @ReturnMapping(StringResult)
14827 async def ModelUUID(self):
14828 '''
14829
14830 Returns -> typing.Union[_ForwardRef('Error'), str]
14831 '''
14832 # map input types to rpc msg
14833 params = dict()
14834 msg = dict(Type='Provisioner', Request='ModelUUID', Version=3, Params=params)
14835
14836 reply = await self.rpc(msg)
14837 return reply
14838
14839
14840
14841 @ReturnMapping(MachineNetworkConfigResults)
14842 async def PrepareContainerInterfaceInfo(self, entities):
14843 '''
14844 entities : typing.Sequence[~Entity]
14845 Returns -> typing.Sequence[~MachineNetworkConfigResult]
14846 '''
14847 # map input types to rpc msg
14848 params = dict()
14849 msg = dict(Type='Provisioner', Request='PrepareContainerInterfaceInfo', Version=3, Params=params)
14850 params['Entities'] = entities
14851 reply = await self.rpc(msg)
14852 return reply
14853
14854
14855
14856 @ReturnMapping(ProvisioningInfoResults)
14857 async def ProvisioningInfo(self, entities):
14858 '''
14859 entities : typing.Sequence[~Entity]
14860 Returns -> typing.Sequence[~ProvisioningInfoResult]
14861 '''
14862 # map input types to rpc msg
14863 params = dict()
14864 msg = dict(Type='Provisioner', Request='ProvisioningInfo', Version=3, Params=params)
14865 params['Entities'] = entities
14866 reply = await self.rpc(msg)
14867 return reply
14868
14869
14870
14871 @ReturnMapping(ErrorResults)
14872 async def ReleaseContainerAddresses(self, entities):
14873 '''
14874 entities : typing.Sequence[~Entity]
14875 Returns -> typing.Sequence[~ErrorResult]
14876 '''
14877 # map input types to rpc msg
14878 params = dict()
14879 msg = dict(Type='Provisioner', Request='ReleaseContainerAddresses', Version=3, Params=params)
14880 params['Entities'] = entities
14881 reply = await self.rpc(msg)
14882 return reply
14883
14884
14885
14886 @ReturnMapping(ErrorResults)
14887 async def Remove(self, entities):
14888 '''
14889 entities : typing.Sequence[~Entity]
14890 Returns -> typing.Sequence[~ErrorResult]
14891 '''
14892 # map input types to rpc msg
14893 params = dict()
14894 msg = dict(Type='Provisioner', Request='Remove', Version=3, Params=params)
14895 params['Entities'] = entities
14896 reply = await self.rpc(msg)
14897 return reply
14898
14899
14900
14901 @ReturnMapping(StringResults)
14902 async def Series(self, entities):
14903 '''
14904 entities : typing.Sequence[~Entity]
14905 Returns -> typing.Sequence[~StringResult]
14906 '''
14907 # map input types to rpc msg
14908 params = dict()
14909 msg = dict(Type='Provisioner', Request='Series', Version=3, Params=params)
14910 params['Entities'] = entities
14911 reply = await self.rpc(msg)
14912 return reply
14913
14914
14915
14916 @ReturnMapping(ErrorResults)
14917 async def SetInstanceInfo(self, machines):
14918 '''
14919 machines : typing.Sequence[~InstanceInfo]
14920 Returns -> typing.Sequence[~ErrorResult]
14921 '''
14922 # map input types to rpc msg
14923 params = dict()
14924 msg = dict(Type='Provisioner', Request='SetInstanceInfo', Version=3, Params=params)
14925 params['Machines'] = machines
14926 reply = await self.rpc(msg)
14927 return reply
14928
14929
14930
14931 @ReturnMapping(ErrorResults)
14932 async def SetInstanceStatus(self, entities):
14933 '''
14934 entities : typing.Sequence[~EntityStatusArgs]
14935 Returns -> typing.Sequence[~ErrorResult]
14936 '''
14937 # map input types to rpc msg
14938 params = dict()
14939 msg = dict(Type='Provisioner', Request='SetInstanceStatus', Version=3, Params=params)
14940 params['Entities'] = entities
14941 reply = await self.rpc(msg)
14942 return reply
14943
14944
14945
14946 @ReturnMapping(ErrorResults)
14947 async def SetPasswords(self, changes):
14948 '''
14949 changes : typing.Sequence[~EntityPassword]
14950 Returns -> typing.Sequence[~ErrorResult]
14951 '''
14952 # map input types to rpc msg
14953 params = dict()
14954 msg = dict(Type='Provisioner', Request='SetPasswords', Version=3, Params=params)
14955 params['Changes'] = changes
14956 reply = await self.rpc(msg)
14957 return reply
14958
14959
14960
14961 @ReturnMapping(ErrorResults)
14962 async def SetStatus(self, entities):
14963 '''
14964 entities : typing.Sequence[~EntityStatusArgs]
14965 Returns -> typing.Sequence[~ErrorResult]
14966 '''
14967 # map input types to rpc msg
14968 params = dict()
14969 msg = dict(Type='Provisioner', Request='SetStatus', Version=3, Params=params)
14970 params['Entities'] = entities
14971 reply = await self.rpc(msg)
14972 return reply
14973
14974
14975
14976 @ReturnMapping(ErrorResults)
14977 async def SetSupportedContainers(self, params):
14978 '''
14979 params : typing.Sequence[~MachineContainers]
14980 Returns -> typing.Sequence[~ErrorResult]
14981 '''
14982 # map input types to rpc msg
14983 params = dict()
14984 msg = dict(Type='Provisioner', Request='SetSupportedContainers', Version=3, Params=params)
14985 params['Params'] = params
14986 reply = await self.rpc(msg)
14987 return reply
14988
14989
14990
14991 @ReturnMapping(StringsResult)
14992 async def StateAddresses(self):
14993 '''
14994
14995 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
14996 '''
14997 # map input types to rpc msg
14998 params = dict()
14999 msg = dict(Type='Provisioner', Request='StateAddresses', Version=3, Params=params)
15000
15001 reply = await self.rpc(msg)
15002 return reply
15003
15004
15005
15006 @ReturnMapping(StatusResults)
15007 async def Status(self, entities):
15008 '''
15009 entities : typing.Sequence[~Entity]
15010 Returns -> typing.Sequence[~StatusResult]
15011 '''
15012 # map input types to rpc msg
15013 params = dict()
15014 msg = dict(Type='Provisioner', Request='Status', Version=3, Params=params)
15015 params['Entities'] = entities
15016 reply = await self.rpc(msg)
15017 return reply
15018
15019
15020
15021 @ReturnMapping(ToolsResults)
15022 async def Tools(self, entities):
15023 '''
15024 entities : typing.Sequence[~Entity]
15025 Returns -> typing.Sequence[~ToolsResult]
15026 '''
15027 # map input types to rpc msg
15028 params = dict()
15029 msg = dict(Type='Provisioner', Request='Tools', Version=3, Params=params)
15030 params['Entities'] = entities
15031 reply = await self.rpc(msg)
15032 return reply
15033
15034
15035
15036 @ReturnMapping(ErrorResults)
15037 async def UpdateStatus(self, entities):
15038 '''
15039 entities : typing.Sequence[~EntityStatusArgs]
15040 Returns -> typing.Sequence[~ErrorResult]
15041 '''
15042 # map input types to rpc msg
15043 params = dict()
15044 msg = dict(Type='Provisioner', Request='UpdateStatus', Version=3, Params=params)
15045 params['Entities'] = entities
15046 reply = await self.rpc(msg)
15047 return reply
15048
15049
15050
15051 @ReturnMapping(NotifyWatchResult)
15052 async def WatchAPIHostPorts(self):
15053 '''
15054
15055 Returns -> typing.Union[_ForwardRef('Error'), str]
15056 '''
15057 # map input types to rpc msg
15058 params = dict()
15059 msg = dict(Type='Provisioner', Request='WatchAPIHostPorts', Version=3, Params=params)
15060
15061 reply = await self.rpc(msg)
15062 return reply
15063
15064
15065
15066 @ReturnMapping(StringsWatchResults)
15067 async def WatchAllContainers(self, params):
15068 '''
15069 params : typing.Sequence[~WatchContainer]
15070 Returns -> typing.Sequence[~StringsWatchResult]
15071 '''
15072 # map input types to rpc msg
15073 params = dict()
15074 msg = dict(Type='Provisioner', Request='WatchAllContainers', Version=3, Params=params)
15075 params['Params'] = params
15076 reply = await self.rpc(msg)
15077 return reply
15078
15079
15080
15081 @ReturnMapping(StringsWatchResults)
15082 async def WatchContainers(self, params):
15083 '''
15084 params : typing.Sequence[~WatchContainer]
15085 Returns -> typing.Sequence[~StringsWatchResult]
15086 '''
15087 # map input types to rpc msg
15088 params = dict()
15089 msg = dict(Type='Provisioner', Request='WatchContainers', Version=3, Params=params)
15090 params['Params'] = params
15091 reply = await self.rpc(msg)
15092 return reply
15093
15094
15095
15096 @ReturnMapping(NotifyWatchResult)
15097 async def WatchForModelConfigChanges(self):
15098 '''
15099
15100 Returns -> typing.Union[_ForwardRef('Error'), str]
15101 '''
15102 # map input types to rpc msg
15103 params = dict()
15104 msg = dict(Type='Provisioner', Request='WatchForModelConfigChanges', Version=3, Params=params)
15105
15106 reply = await self.rpc(msg)
15107 return reply
15108
15109
15110
15111 @ReturnMapping(NotifyWatchResult)
15112 async def WatchMachineErrorRetry(self):
15113 '''
15114
15115 Returns -> typing.Union[_ForwardRef('Error'), str]
15116 '''
15117 # map input types to rpc msg
15118 params = dict()
15119 msg = dict(Type='Provisioner', Request='WatchMachineErrorRetry', Version=3, Params=params)
15120
15121 reply = await self.rpc(msg)
15122 return reply
15123
15124
15125
15126 @ReturnMapping(StringsWatchResult)
15127 async def WatchModelMachines(self):
15128 '''
15129
15130 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
15131 '''
15132 # map input types to rpc msg
15133 params = dict()
15134 msg = dict(Type='Provisioner', Request='WatchModelMachines', Version=3, Params=params)
15135
15136 reply = await self.rpc(msg)
15137 return reply
15138
15139
15140 class ProxyUpdater(Type):
15141 name = 'ProxyUpdater'
15142 version = 1
15143 schema = {'definitions': {'Entities': {'additionalProperties': False,
15144 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15145 'type': 'array'}},
15146 'required': ['Entities'],
15147 'type': 'object'},
15148 'Entity': {'additionalProperties': False,
15149 'properties': {'Tag': {'type': 'string'}},
15150 'required': ['Tag'],
15151 'type': 'object'},
15152 'Error': {'additionalProperties': False,
15153 'properties': {'Code': {'type': 'string'},
15154 'Info': {'$ref': '#/definitions/ErrorInfo'},
15155 'Message': {'type': 'string'}},
15156 'required': ['Message', 'Code'],
15157 'type': 'object'},
15158 'ErrorInfo': {'additionalProperties': False,
15159 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15160 'MacaroonPath': {'type': 'string'}},
15161 'type': 'object'},
15162 'Macaroon': {'additionalProperties': False,
15163 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15164 'type': 'array'},
15165 'data': {'items': {'type': 'integer'},
15166 'type': 'array'},
15167 'id': {'$ref': '#/definitions/packet'},
15168 'location': {'$ref': '#/definitions/packet'},
15169 'sig': {'items': {'type': 'integer'},
15170 'type': 'array'}},
15171 'required': ['data',
15172 'location',
15173 'id',
15174 'caveats',
15175 'sig'],
15176 'type': 'object'},
15177 'NotifyWatchResult': {'additionalProperties': False,
15178 'properties': {'Error': {'$ref': '#/definitions/Error'},
15179 'NotifyWatcherId': {'type': 'string'}},
15180 'required': ['NotifyWatcherId', 'Error'],
15181 'type': 'object'},
15182 'NotifyWatchResults': {'additionalProperties': False,
15183 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15184 'type': 'array'}},
15185 'required': ['Results'],
15186 'type': 'object'},
15187 'ProxyConfig': {'additionalProperties': False,
15188 'properties': {'FTP': {'type': 'string'},
15189 'HTTP': {'type': 'string'},
15190 'HTTPS': {'type': 'string'},
15191 'NoProxy': {'type': 'string'}},
15192 'required': ['HTTP',
15193 'HTTPS',
15194 'FTP',
15195 'NoProxy'],
15196 'type': 'object'},
15197 'ProxyConfigResult': {'additionalProperties': False,
15198 'properties': {'APTProxySettings': {'$ref': '#/definitions/ProxyConfig'},
15199 'Error': {'$ref': '#/definitions/Error'},
15200 'ProxySettings': {'$ref': '#/definitions/ProxyConfig'}},
15201 'required': ['ProxySettings',
15202 'APTProxySettings'],
15203 'type': 'object'},
15204 'ProxyConfigResults': {'additionalProperties': False,
15205 'properties': {'Results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
15206 'type': 'array'}},
15207 'required': ['Results'],
15208 'type': 'object'},
15209 'caveat': {'additionalProperties': False,
15210 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15211 'location': {'$ref': '#/definitions/packet'},
15212 'verificationId': {'$ref': '#/definitions/packet'}},
15213 'required': ['location',
15214 'caveatId',
15215 'verificationId'],
15216 'type': 'object'},
15217 'packet': {'additionalProperties': False,
15218 'properties': {'headerLen': {'type': 'integer'},
15219 'start': {'type': 'integer'},
15220 'totalLen': {'type': 'integer'}},
15221 'required': ['start', 'totalLen', 'headerLen'],
15222 'type': 'object'}},
15223 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15224 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
15225 'type': 'object'},
15226 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15227 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
15228 'type': 'object'}},
15229 'type': 'object'}
15230
15231
15232 @ReturnMapping(ProxyConfigResults)
15233 async def ProxyConfig(self, entities):
15234 '''
15235 entities : typing.Sequence[~Entity]
15236 Returns -> typing.Sequence[~ProxyConfigResult]
15237 '''
15238 # map input types to rpc msg
15239 params = dict()
15240 msg = dict(Type='ProxyUpdater', Request='ProxyConfig', Version=1, Params=params)
15241 params['Entities'] = entities
15242 reply = await self.rpc(msg)
15243 return reply
15244
15245
15246
15247 @ReturnMapping(NotifyWatchResults)
15248 async def WatchForProxyConfigAndAPIHostPortChanges(self, entities):
15249 '''
15250 entities : typing.Sequence[~Entity]
15251 Returns -> typing.Sequence[~NotifyWatchResult]
15252 '''
15253 # map input types to rpc msg
15254 params = dict()
15255 msg = dict(Type='ProxyUpdater', Request='WatchForProxyConfigAndAPIHostPortChanges', Version=1, Params=params)
15256 params['Entities'] = entities
15257 reply = await self.rpc(msg)
15258 return reply
15259
15260
15261 class Reboot(Type):
15262 name = 'Reboot'
15263 version = 2
15264 schema = {'definitions': {'Entities': {'additionalProperties': False,
15265 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15266 'type': 'array'}},
15267 'required': ['Entities'],
15268 'type': 'object'},
15269 'Entity': {'additionalProperties': False,
15270 'properties': {'Tag': {'type': 'string'}},
15271 'required': ['Tag'],
15272 'type': 'object'},
15273 'Error': {'additionalProperties': False,
15274 'properties': {'Code': {'type': 'string'},
15275 'Info': {'$ref': '#/definitions/ErrorInfo'},
15276 'Message': {'type': 'string'}},
15277 'required': ['Message', 'Code'],
15278 'type': 'object'},
15279 'ErrorInfo': {'additionalProperties': False,
15280 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15281 'MacaroonPath': {'type': 'string'}},
15282 'type': 'object'},
15283 'ErrorResult': {'additionalProperties': False,
15284 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15285 'required': ['Error'],
15286 'type': 'object'},
15287 'ErrorResults': {'additionalProperties': False,
15288 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15289 'type': 'array'}},
15290 'required': ['Results'],
15291 'type': 'object'},
15292 'Macaroon': {'additionalProperties': False,
15293 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15294 'type': 'array'},
15295 'data': {'items': {'type': 'integer'},
15296 'type': 'array'},
15297 'id': {'$ref': '#/definitions/packet'},
15298 'location': {'$ref': '#/definitions/packet'},
15299 'sig': {'items': {'type': 'integer'},
15300 'type': 'array'}},
15301 'required': ['data',
15302 'location',
15303 'id',
15304 'caveats',
15305 'sig'],
15306 'type': 'object'},
15307 'NotifyWatchResult': {'additionalProperties': False,
15308 'properties': {'Error': {'$ref': '#/definitions/Error'},
15309 'NotifyWatcherId': {'type': 'string'}},
15310 'required': ['NotifyWatcherId', 'Error'],
15311 'type': 'object'},
15312 'RebootActionResult': {'additionalProperties': False,
15313 'properties': {'error': {'$ref': '#/definitions/Error'},
15314 'result': {'type': 'string'}},
15315 'type': 'object'},
15316 'RebootActionResults': {'additionalProperties': False,
15317 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
15318 'type': 'array'}},
15319 'type': 'object'},
15320 'caveat': {'additionalProperties': False,
15321 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15322 'location': {'$ref': '#/definitions/packet'},
15323 'verificationId': {'$ref': '#/definitions/packet'}},
15324 'required': ['location',
15325 'caveatId',
15326 'verificationId'],
15327 'type': 'object'},
15328 'packet': {'additionalProperties': False,
15329 'properties': {'headerLen': {'type': 'integer'},
15330 'start': {'type': 'integer'},
15331 'totalLen': {'type': 'integer'}},
15332 'required': ['start', 'totalLen', 'headerLen'],
15333 'type': 'object'}},
15334 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15335 'Result': {'$ref': '#/definitions/ErrorResults'}},
15336 'type': 'object'},
15337 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15338 'Result': {'$ref': '#/definitions/RebootActionResults'}},
15339 'type': 'object'},
15340 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15341 'Result': {'$ref': '#/definitions/ErrorResults'}},
15342 'type': 'object'},
15343 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15344 'type': 'object'}},
15345 'type': 'object'}
15346
15347
15348 @ReturnMapping(ErrorResults)
15349 async def ClearReboot(self, entities):
15350 '''
15351 entities : typing.Sequence[~Entity]
15352 Returns -> typing.Sequence[~ErrorResult]
15353 '''
15354 # map input types to rpc msg
15355 params = dict()
15356 msg = dict(Type='Reboot', Request='ClearReboot', Version=2, Params=params)
15357 params['Entities'] = entities
15358 reply = await self.rpc(msg)
15359 return reply
15360
15361
15362
15363 @ReturnMapping(RebootActionResults)
15364 async def GetRebootAction(self, entities):
15365 '''
15366 entities : typing.Sequence[~Entity]
15367 Returns -> typing.Sequence[~RebootActionResult]
15368 '''
15369 # map input types to rpc msg
15370 params = dict()
15371 msg = dict(Type='Reboot', Request='GetRebootAction', Version=2, Params=params)
15372 params['Entities'] = entities
15373 reply = await self.rpc(msg)
15374 return reply
15375
15376
15377
15378 @ReturnMapping(ErrorResults)
15379 async def RequestReboot(self, entities):
15380 '''
15381 entities : typing.Sequence[~Entity]
15382 Returns -> typing.Sequence[~ErrorResult]
15383 '''
15384 # map input types to rpc msg
15385 params = dict()
15386 msg = dict(Type='Reboot', Request='RequestReboot', Version=2, Params=params)
15387 params['Entities'] = entities
15388 reply = await self.rpc(msg)
15389 return reply
15390
15391
15392
15393 @ReturnMapping(NotifyWatchResult)
15394 async def WatchForRebootEvent(self):
15395 '''
15396
15397 Returns -> typing.Union[_ForwardRef('Error'), str]
15398 '''
15399 # map input types to rpc msg
15400 params = dict()
15401 msg = dict(Type='Reboot', Request='WatchForRebootEvent', Version=2, Params=params)
15402
15403 reply = await self.rpc(msg)
15404 return reply
15405
15406
15407 class RelationUnitsWatcher(Type):
15408 name = 'RelationUnitsWatcher'
15409 version = 1
15410 schema = {'definitions': {'Error': {'additionalProperties': False,
15411 'properties': {'Code': {'type': 'string'},
15412 'Info': {'$ref': '#/definitions/ErrorInfo'},
15413 'Message': {'type': 'string'}},
15414 'required': ['Message', 'Code'],
15415 'type': 'object'},
15416 'ErrorInfo': {'additionalProperties': False,
15417 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15418 'MacaroonPath': {'type': 'string'}},
15419 'type': 'object'},
15420 'Macaroon': {'additionalProperties': False,
15421 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15422 'type': 'array'},
15423 'data': {'items': {'type': 'integer'},
15424 'type': 'array'},
15425 'id': {'$ref': '#/definitions/packet'},
15426 'location': {'$ref': '#/definitions/packet'},
15427 'sig': {'items': {'type': 'integer'},
15428 'type': 'array'}},
15429 'required': ['data',
15430 'location',
15431 'id',
15432 'caveats',
15433 'sig'],
15434 'type': 'object'},
15435 'RelationUnitsChange': {'additionalProperties': False,
15436 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
15437 'type': 'object'},
15438 'Departed': {'items': {'type': 'string'},
15439 'type': 'array'}},
15440 'required': ['Changed', 'Departed'],
15441 'type': 'object'},
15442 'RelationUnitsWatchResult': {'additionalProperties': False,
15443 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
15444 'Error': {'$ref': '#/definitions/Error'},
15445 'RelationUnitsWatcherId': {'type': 'string'}},
15446 'required': ['RelationUnitsWatcherId',
15447 'Changes',
15448 'Error'],
15449 'type': 'object'},
15450 'UnitSettings': {'additionalProperties': False,
15451 'properties': {'Version': {'type': 'integer'}},
15452 'required': ['Version'],
15453 'type': 'object'},
15454 'caveat': {'additionalProperties': False,
15455 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15456 'location': {'$ref': '#/definitions/packet'},
15457 'verificationId': {'$ref': '#/definitions/packet'}},
15458 'required': ['location',
15459 'caveatId',
15460 'verificationId'],
15461 'type': 'object'},
15462 'packet': {'additionalProperties': False,
15463 'properties': {'headerLen': {'type': 'integer'},
15464 'start': {'type': 'integer'},
15465 'totalLen': {'type': 'integer'}},
15466 'required': ['start', 'totalLen', 'headerLen'],
15467 'type': 'object'}},
15468 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
15469 'type': 'object'},
15470 'Stop': {'type': 'object'}},
15471 'type': 'object'}
15472
15473
15474 @ReturnMapping(RelationUnitsWatchResult)
15475 async def Next(self):
15476 '''
15477
15478 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
15479 '''
15480 # map input types to rpc msg
15481 params = dict()
15482 msg = dict(Type='RelationUnitsWatcher', Request='Next', Version=1, Params=params)
15483
15484 reply = await self.rpc(msg)
15485 return reply
15486
15487
15488
15489 @ReturnMapping(None)
15490 async def Stop(self):
15491 '''
15492
15493 Returns -> None
15494 '''
15495 # map input types to rpc msg
15496 params = dict()
15497 msg = dict(Type='RelationUnitsWatcher', Request='Stop', Version=1, Params=params)
15498
15499 reply = await self.rpc(msg)
15500 return reply
15501
15502
15503 class Resumer(Type):
15504 name = 'Resumer'
15505 version = 2
15506 schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
15507
15508
15509 @ReturnMapping(None)
15510 async def ResumeTransactions(self):
15511 '''
15512
15513 Returns -> None
15514 '''
15515 # map input types to rpc msg
15516 params = dict()
15517 msg = dict(Type='Resumer', Request='ResumeTransactions', Version=2, Params=params)
15518
15519 reply = await self.rpc(msg)
15520 return reply
15521
15522
15523 class RetryStrategy(Type):
15524 name = 'RetryStrategy'
15525 version = 1
15526 schema = {'definitions': {'Entities': {'additionalProperties': False,
15527 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15528 'type': 'array'}},
15529 'required': ['Entities'],
15530 'type': 'object'},
15531 'Entity': {'additionalProperties': False,
15532 'properties': {'Tag': {'type': 'string'}},
15533 'required': ['Tag'],
15534 'type': 'object'},
15535 'Error': {'additionalProperties': False,
15536 'properties': {'Code': {'type': 'string'},
15537 'Info': {'$ref': '#/definitions/ErrorInfo'},
15538 'Message': {'type': 'string'}},
15539 'required': ['Message', 'Code'],
15540 'type': 'object'},
15541 'ErrorInfo': {'additionalProperties': False,
15542 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15543 'MacaroonPath': {'type': 'string'}},
15544 'type': 'object'},
15545 'Macaroon': {'additionalProperties': False,
15546 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15547 'type': 'array'},
15548 'data': {'items': {'type': 'integer'},
15549 'type': 'array'},
15550 'id': {'$ref': '#/definitions/packet'},
15551 'location': {'$ref': '#/definitions/packet'},
15552 'sig': {'items': {'type': 'integer'},
15553 'type': 'array'}},
15554 'required': ['data',
15555 'location',
15556 'id',
15557 'caveats',
15558 'sig'],
15559 'type': 'object'},
15560 'NotifyWatchResult': {'additionalProperties': False,
15561 'properties': {'Error': {'$ref': '#/definitions/Error'},
15562 'NotifyWatcherId': {'type': 'string'}},
15563 'required': ['NotifyWatcherId', 'Error'],
15564 'type': 'object'},
15565 'NotifyWatchResults': {'additionalProperties': False,
15566 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15567 'type': 'array'}},
15568 'required': ['Results'],
15569 'type': 'object'},
15570 'RetryStrategy': {'additionalProperties': False,
15571 'properties': {'JitterRetryTime': {'type': 'boolean'},
15572 'MaxRetryTime': {'type': 'integer'},
15573 'MinRetryTime': {'type': 'integer'},
15574 'RetryTimeFactor': {'type': 'integer'},
15575 'ShouldRetry': {'type': 'boolean'}},
15576 'required': ['ShouldRetry',
15577 'MinRetryTime',
15578 'MaxRetryTime',
15579 'JitterRetryTime',
15580 'RetryTimeFactor'],
15581 'type': 'object'},
15582 'RetryStrategyResult': {'additionalProperties': False,
15583 'properties': {'Error': {'$ref': '#/definitions/Error'},
15584 'Result': {'$ref': '#/definitions/RetryStrategy'}},
15585 'required': ['Error', 'Result'],
15586 'type': 'object'},
15587 'RetryStrategyResults': {'additionalProperties': False,
15588 'properties': {'Results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
15589 'type': 'array'}},
15590 'required': ['Results'],
15591 'type': 'object'},
15592 'caveat': {'additionalProperties': False,
15593 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15594 'location': {'$ref': '#/definitions/packet'},
15595 'verificationId': {'$ref': '#/definitions/packet'}},
15596 'required': ['location',
15597 'caveatId',
15598 'verificationId'],
15599 'type': 'object'},
15600 'packet': {'additionalProperties': False,
15601 'properties': {'headerLen': {'type': 'integer'},
15602 'start': {'type': 'integer'},
15603 'totalLen': {'type': 'integer'}},
15604 'required': ['start', 'totalLen', 'headerLen'],
15605 'type': 'object'}},
15606 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15607 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
15608 'type': 'object'},
15609 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15610 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
15611 'type': 'object'}},
15612 'type': 'object'}
15613
15614
15615 @ReturnMapping(RetryStrategyResults)
15616 async def RetryStrategy(self, entities):
15617 '''
15618 entities : typing.Sequence[~Entity]
15619 Returns -> typing.Sequence[~RetryStrategyResult]
15620 '''
15621 # map input types to rpc msg
15622 params = dict()
15623 msg = dict(Type='RetryStrategy', Request='RetryStrategy', Version=1, Params=params)
15624 params['Entities'] = entities
15625 reply = await self.rpc(msg)
15626 return reply
15627
15628
15629
15630 @ReturnMapping(NotifyWatchResults)
15631 async def WatchRetryStrategy(self, entities):
15632 '''
15633 entities : typing.Sequence[~Entity]
15634 Returns -> typing.Sequence[~NotifyWatchResult]
15635 '''
15636 # map input types to rpc msg
15637 params = dict()
15638 msg = dict(Type='RetryStrategy', Request='WatchRetryStrategy', Version=1, Params=params)
15639 params['Entities'] = entities
15640 reply = await self.rpc(msg)
15641 return reply
15642
15643
15644 class SSHClient(Type):
15645 name = 'SSHClient'
15646 version = 1
15647 schema = {'definitions': {'Entities': {'additionalProperties': False,
15648 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15649 'type': 'array'}},
15650 'required': ['Entities'],
15651 'type': 'object'},
15652 'Entity': {'additionalProperties': False,
15653 'properties': {'Tag': {'type': 'string'}},
15654 'required': ['Tag'],
15655 'type': 'object'},
15656 'Error': {'additionalProperties': False,
15657 'properties': {'Code': {'type': 'string'},
15658 'Info': {'$ref': '#/definitions/ErrorInfo'},
15659 'Message': {'type': 'string'}},
15660 'required': ['Message', 'Code'],
15661 'type': 'object'},
15662 'ErrorInfo': {'additionalProperties': False,
15663 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15664 'MacaroonPath': {'type': 'string'}},
15665 'type': 'object'},
15666 'Macaroon': {'additionalProperties': False,
15667 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15668 'type': 'array'},
15669 'data': {'items': {'type': 'integer'},
15670 'type': 'array'},
15671 'id': {'$ref': '#/definitions/packet'},
15672 'location': {'$ref': '#/definitions/packet'},
15673 'sig': {'items': {'type': 'integer'},
15674 'type': 'array'}},
15675 'required': ['data',
15676 'location',
15677 'id',
15678 'caveats',
15679 'sig'],
15680 'type': 'object'},
15681 'SSHAddressResult': {'additionalProperties': False,
15682 'properties': {'address': {'type': 'string'},
15683 'error': {'$ref': '#/definitions/Error'}},
15684 'type': 'object'},
15685 'SSHAddressResults': {'additionalProperties': False,
15686 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
15687 'type': 'array'}},
15688 'required': ['results'],
15689 'type': 'object'},
15690 'SSHProxyResult': {'additionalProperties': False,
15691 'properties': {'use-proxy': {'type': 'boolean'}},
15692 'required': ['use-proxy'],
15693 'type': 'object'},
15694 'SSHPublicKeysResult': {'additionalProperties': False,
15695 'properties': {'error': {'$ref': '#/definitions/Error'},
15696 'public-keys': {'items': {'type': 'string'},
15697 'type': 'array'}},
15698 'type': 'object'},
15699 'SSHPublicKeysResults': {'additionalProperties': False,
15700 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
15701 'type': 'array'}},
15702 'required': ['results'],
15703 'type': 'object'},
15704 'caveat': {'additionalProperties': False,
15705 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15706 'location': {'$ref': '#/definitions/packet'},
15707 'verificationId': {'$ref': '#/definitions/packet'}},
15708 'required': ['location',
15709 'caveatId',
15710 'verificationId'],
15711 'type': 'object'},
15712 'packet': {'additionalProperties': False,
15713 'properties': {'headerLen': {'type': 'integer'},
15714 'start': {'type': 'integer'},
15715 'totalLen': {'type': 'integer'}},
15716 'required': ['start', 'totalLen', 'headerLen'],
15717 'type': 'object'}},
15718 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15719 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
15720 'type': 'object'},
15721 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
15722 'type': 'object'},
15723 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15724 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
15725 'type': 'object'},
15726 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15727 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
15728 'type': 'object'}},
15729 'type': 'object'}
15730
15731
15732 @ReturnMapping(SSHAddressResults)
15733 async def PrivateAddress(self, entities):
15734 '''
15735 entities : typing.Sequence[~Entity]
15736 Returns -> typing.Sequence[~SSHAddressResult]
15737 '''
15738 # map input types to rpc msg
15739 params = dict()
15740 msg = dict(Type='SSHClient', Request='PrivateAddress', Version=1, Params=params)
15741 params['Entities'] = entities
15742 reply = await self.rpc(msg)
15743 return reply
15744
15745
15746
15747 @ReturnMapping(SSHProxyResult)
15748 async def Proxy(self):
15749 '''
15750
15751 Returns -> bool
15752 '''
15753 # map input types to rpc msg
15754 params = dict()
15755 msg = dict(Type='SSHClient', Request='Proxy', Version=1, Params=params)
15756
15757 reply = await self.rpc(msg)
15758 return reply
15759
15760
15761
15762 @ReturnMapping(SSHAddressResults)
15763 async def PublicAddress(self, entities):
15764 '''
15765 entities : typing.Sequence[~Entity]
15766 Returns -> typing.Sequence[~SSHAddressResult]
15767 '''
15768 # map input types to rpc msg
15769 params = dict()
15770 msg = dict(Type='SSHClient', Request='PublicAddress', Version=1, Params=params)
15771 params['Entities'] = entities
15772 reply = await self.rpc(msg)
15773 return reply
15774
15775
15776
15777 @ReturnMapping(SSHPublicKeysResults)
15778 async def PublicKeys(self, entities):
15779 '''
15780 entities : typing.Sequence[~Entity]
15781 Returns -> typing.Sequence[~SSHPublicKeysResult]
15782 '''
15783 # map input types to rpc msg
15784 params = dict()
15785 msg = dict(Type='SSHClient', Request='PublicKeys', Version=1, Params=params)
15786 params['Entities'] = entities
15787 reply = await self.rpc(msg)
15788 return reply
15789
15790
15791 class Singular(Type):
15792 name = 'Singular'
15793 version = 1
15794 schema = {'definitions': {'Entities': {'additionalProperties': False,
15795 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15796 'type': 'array'}},
15797 'required': ['Entities'],
15798 'type': 'object'},
15799 'Entity': {'additionalProperties': False,
15800 'properties': {'Tag': {'type': 'string'}},
15801 'required': ['Tag'],
15802 'type': 'object'},
15803 'Error': {'additionalProperties': False,
15804 'properties': {'Code': {'type': 'string'},
15805 'Info': {'$ref': '#/definitions/ErrorInfo'},
15806 'Message': {'type': 'string'}},
15807 'required': ['Message', 'Code'],
15808 'type': 'object'},
15809 'ErrorInfo': {'additionalProperties': False,
15810 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15811 'MacaroonPath': {'type': 'string'}},
15812 'type': 'object'},
15813 'ErrorResult': {'additionalProperties': False,
15814 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15815 'required': ['Error'],
15816 'type': 'object'},
15817 'ErrorResults': {'additionalProperties': False,
15818 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15819 'type': 'array'}},
15820 'required': ['Results'],
15821 'type': 'object'},
15822 'Macaroon': {'additionalProperties': False,
15823 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15824 'type': 'array'},
15825 'data': {'items': {'type': 'integer'},
15826 'type': 'array'},
15827 'id': {'$ref': '#/definitions/packet'},
15828 'location': {'$ref': '#/definitions/packet'},
15829 'sig': {'items': {'type': 'integer'},
15830 'type': 'array'}},
15831 'required': ['data',
15832 'location',
15833 'id',
15834 'caveats',
15835 'sig'],
15836 'type': 'object'},
15837 'SingularClaim': {'additionalProperties': False,
15838 'properties': {'ControllerTag': {'type': 'string'},
15839 'Duration': {'type': 'integer'},
15840 'ModelTag': {'type': 'string'}},
15841 'required': ['ModelTag',
15842 'ControllerTag',
15843 'Duration'],
15844 'type': 'object'},
15845 'SingularClaims': {'additionalProperties': False,
15846 'properties': {'Claims': {'items': {'$ref': '#/definitions/SingularClaim'},
15847 'type': 'array'}},
15848 'required': ['Claims'],
15849 'type': 'object'},
15850 'caveat': {'additionalProperties': False,
15851 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15852 'location': {'$ref': '#/definitions/packet'},
15853 'verificationId': {'$ref': '#/definitions/packet'}},
15854 'required': ['location',
15855 'caveatId',
15856 'verificationId'],
15857 'type': 'object'},
15858 'packet': {'additionalProperties': False,
15859 'properties': {'headerLen': {'type': 'integer'},
15860 'start': {'type': 'integer'},
15861 'totalLen': {'type': 'integer'}},
15862 'required': ['start', 'totalLen', 'headerLen'],
15863 'type': 'object'}},
15864 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
15865 'Result': {'$ref': '#/definitions/ErrorResults'}},
15866 'type': 'object'},
15867 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15868 'Result': {'$ref': '#/definitions/ErrorResults'}},
15869 'type': 'object'}},
15870 'type': 'object'}
15871
15872
15873 @ReturnMapping(ErrorResults)
15874 async def Claim(self, claims):
15875 '''
15876 claims : typing.Sequence[~SingularClaim]
15877 Returns -> typing.Sequence[~ErrorResult]
15878 '''
15879 # map input types to rpc msg
15880 params = dict()
15881 msg = dict(Type='Singular', Request='Claim', Version=1, Params=params)
15882 params['Claims'] = claims
15883 reply = await self.rpc(msg)
15884 return reply
15885
15886
15887
15888 @ReturnMapping(ErrorResults)
15889 async def Wait(self, entities):
15890 '''
15891 entities : typing.Sequence[~Entity]
15892 Returns -> typing.Sequence[~ErrorResult]
15893 '''
15894 # map input types to rpc msg
15895 params = dict()
15896 msg = dict(Type='Singular', Request='Wait', Version=1, Params=params)
15897 params['Entities'] = entities
15898 reply = await self.rpc(msg)
15899 return reply
15900
15901
15902 class Spaces(Type):
15903 name = 'Spaces'
15904 version = 2
15905 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
15906 'properties': {'ProviderId': {'type': 'string'},
15907 'Public': {'type': 'boolean'},
15908 'SpaceTag': {'type': 'string'},
15909 'SubnetTags': {'items': {'type': 'string'},
15910 'type': 'array'}},
15911 'required': ['SubnetTags',
15912 'SpaceTag',
15913 'Public'],
15914 'type': 'object'},
15915 'CreateSpacesParams': {'additionalProperties': False,
15916 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
15917 'type': 'array'}},
15918 'required': ['Spaces'],
15919 'type': 'object'},
15920 'Error': {'additionalProperties': False,
15921 'properties': {'Code': {'type': 'string'},
15922 'Info': {'$ref': '#/definitions/ErrorInfo'},
15923 'Message': {'type': 'string'}},
15924 'required': ['Message', 'Code'],
15925 'type': 'object'},
15926 'ErrorInfo': {'additionalProperties': False,
15927 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15928 'MacaroonPath': {'type': 'string'}},
15929 'type': 'object'},
15930 'ErrorResult': {'additionalProperties': False,
15931 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15932 'required': ['Error'],
15933 'type': 'object'},
15934 'ErrorResults': {'additionalProperties': False,
15935 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15936 'type': 'array'}},
15937 'required': ['Results'],
15938 'type': 'object'},
15939 'ListSpacesResults': {'additionalProperties': False,
15940 'properties': {'Results': {'items': {'$ref': '#/definitions/Space'},
15941 'type': 'array'}},
15942 'required': ['Results'],
15943 'type': 'object'},
15944 'Macaroon': {'additionalProperties': False,
15945 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15946 'type': 'array'},
15947 'data': {'items': {'type': 'integer'},
15948 'type': 'array'},
15949 'id': {'$ref': '#/definitions/packet'},
15950 'location': {'$ref': '#/definitions/packet'},
15951 'sig': {'items': {'type': 'integer'},
15952 'type': 'array'}},
15953 'required': ['data',
15954 'location',
15955 'id',
15956 'caveats',
15957 'sig'],
15958 'type': 'object'},
15959 'Space': {'additionalProperties': False,
15960 'properties': {'Error': {'$ref': '#/definitions/Error'},
15961 'Name': {'type': 'string'},
15962 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
15963 'type': 'array'}},
15964 'required': ['Name', 'Subnets'],
15965 'type': 'object'},
15966 'Subnet': {'additionalProperties': False,
15967 'properties': {'CIDR': {'type': 'string'},
15968 'Life': {'type': 'string'},
15969 'ProviderId': {'type': 'string'},
15970 'SpaceTag': {'type': 'string'},
15971 'StaticRangeHighIP': {'items': {'type': 'integer'},
15972 'type': 'array'},
15973 'StaticRangeLowIP': {'items': {'type': 'integer'},
15974 'type': 'array'},
15975 'Status': {'type': 'string'},
15976 'VLANTag': {'type': 'integer'},
15977 'Zones': {'items': {'type': 'string'},
15978 'type': 'array'}},
15979 'required': ['CIDR',
15980 'VLANTag',
15981 'Life',
15982 'SpaceTag',
15983 'Zones'],
15984 'type': 'object'},
15985 'caveat': {'additionalProperties': False,
15986 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15987 'location': {'$ref': '#/definitions/packet'},
15988 'verificationId': {'$ref': '#/definitions/packet'}},
15989 'required': ['location',
15990 'caveatId',
15991 'verificationId'],
15992 'type': 'object'},
15993 'packet': {'additionalProperties': False,
15994 'properties': {'headerLen': {'type': 'integer'},
15995 'start': {'type': 'integer'},
15996 'totalLen': {'type': 'integer'}},
15997 'required': ['start', 'totalLen', 'headerLen'],
15998 'type': 'object'}},
15999 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
16000 'Result': {'$ref': '#/definitions/ErrorResults'}},
16001 'type': 'object'},
16002 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
16003 'type': 'object'}},
16004 'type': 'object'}
16005
16006
16007 @ReturnMapping(ErrorResults)
16008 async def CreateSpaces(self, spaces):
16009 '''
16010 spaces : typing.Sequence[~CreateSpaceParams]
16011 Returns -> typing.Sequence[~ErrorResult]
16012 '''
16013 # map input types to rpc msg
16014 params = dict()
16015 msg = dict(Type='Spaces', Request='CreateSpaces', Version=2, Params=params)
16016 params['Spaces'] = spaces
16017 reply = await self.rpc(msg)
16018 return reply
16019
16020
16021
16022 @ReturnMapping(ListSpacesResults)
16023 async def ListSpaces(self):
16024 '''
16025
16026 Returns -> typing.Sequence[~Space]
16027 '''
16028 # map input types to rpc msg
16029 params = dict()
16030 msg = dict(Type='Spaces', Request='ListSpaces', Version=2, Params=params)
16031
16032 reply = await self.rpc(msg)
16033 return reply
16034
16035
16036 class StatusHistory(Type):
16037 name = 'StatusHistory'
16038 version = 2
16039 schema = {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
16040 'properties': {'MaxHistoryMB': {'type': 'integer'},
16041 'MaxHistoryTime': {'type': 'integer'}},
16042 'required': ['MaxHistoryTime',
16043 'MaxHistoryMB'],
16044 'type': 'object'}},
16045 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
16046 'type': 'object'}},
16047 'type': 'object'}
16048
16049
16050 @ReturnMapping(None)
16051 async def Prune(self, maxhistorymb, maxhistorytime):
16052 '''
16053 maxhistorymb : int
16054 maxhistorytime : int
16055 Returns -> None
16056 '''
16057 # map input types to rpc msg
16058 params = dict()
16059 msg = dict(Type='StatusHistory', Request='Prune', Version=2, Params=params)
16060 params['MaxHistoryMB'] = maxhistorymb
16061 params['MaxHistoryTime'] = maxhistorytime
16062 reply = await self.rpc(msg)
16063 return reply
16064
16065
16066 class Storage(Type):
16067 name = 'Storage'
16068 version = 2
16069 schema = {'definitions': {'Entities': {'additionalProperties': False,
16070 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
16071 'type': 'array'}},
16072 'required': ['Entities'],
16073 'type': 'object'},
16074 'Entity': {'additionalProperties': False,
16075 'properties': {'Tag': {'type': 'string'}},
16076 'required': ['Tag'],
16077 'type': 'object'},
16078 'EntityStatus': {'additionalProperties': False,
16079 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
16080 'type': 'object'}},
16081 'type': 'object'},
16082 'Info': {'type': 'string'},
16083 'Since': {'format': 'date-time',
16084 'type': 'string'},
16085 'Status': {'type': 'string'}},
16086 'required': ['Status',
16087 'Info',
16088 'Data',
16089 'Since'],
16090 'type': 'object'},
16091 'Error': {'additionalProperties': False,
16092 'properties': {'Code': {'type': 'string'},
16093 'Info': {'$ref': '#/definitions/ErrorInfo'},
16094 'Message': {'type': 'string'}},
16095 'required': ['Message', 'Code'],
16096 'type': 'object'},
16097 'ErrorInfo': {'additionalProperties': False,
16098 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
16099 'MacaroonPath': {'type': 'string'}},
16100 'type': 'object'},
16101 'ErrorResult': {'additionalProperties': False,
16102 'properties': {'Error': {'$ref': '#/definitions/Error'}},
16103 'required': ['Error'],
16104 'type': 'object'},
16105 'ErrorResults': {'additionalProperties': False,
16106 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
16107 'type': 'array'}},
16108 'required': ['Results'],
16109 'type': 'object'},
16110 'FilesystemAttachmentInfo': {'additionalProperties': False,
16111 'properties': {'mountpoint': {'type': 'string'},
16112 'read-only': {'type': 'boolean'}},
16113 'type': 'object'},
16114 'FilesystemDetails': {'additionalProperties': False,
16115 'properties': {'filesystemtag': {'type': 'string'},
16116 'info': {'$ref': '#/definitions/FilesystemInfo'},
16117 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
16118 'type': 'object'},
16119 'status': {'$ref': '#/definitions/EntityStatus'},
16120 'storage': {'$ref': '#/definitions/StorageDetails'},
16121 'volumetag': {'type': 'string'}},
16122 'required': ['filesystemtag',
16123 'info',
16124 'status'],
16125 'type': 'object'},
16126 'FilesystemDetailsListResult': {'additionalProperties': False,
16127 'properties': {'error': {'$ref': '#/definitions/Error'},
16128 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
16129 'type': 'array'}},
16130 'type': 'object'},
16131 'FilesystemDetailsListResults': {'additionalProperties': False,
16132 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
16133 'type': 'array'}},
16134 'type': 'object'},
16135 'FilesystemFilter': {'additionalProperties': False,
16136 'properties': {'machines': {'items': {'type': 'string'},
16137 'type': 'array'}},
16138 'type': 'object'},
16139 'FilesystemFilters': {'additionalProperties': False,
16140 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
16141 'type': 'array'}},
16142 'type': 'object'},
16143 'FilesystemInfo': {'additionalProperties': False,
16144 'properties': {'filesystemid': {'type': 'string'},
16145 'size': {'type': 'integer'}},
16146 'required': ['filesystemid', 'size'],
16147 'type': 'object'},
16148 'Macaroon': {'additionalProperties': False,
16149 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
16150 'type': 'array'},
16151 'data': {'items': {'type': 'integer'},
16152 'type': 'array'},
16153 'id': {'$ref': '#/definitions/packet'},
16154 'location': {'$ref': '#/definitions/packet'},
16155 'sig': {'items': {'type': 'integer'},
16156 'type': 'array'}},
16157 'required': ['data',
16158 'location',
16159 'id',
16160 'caveats',
16161 'sig'],
16162 'type': 'object'},
16163 'StorageAddParams': {'additionalProperties': False,
16164 'properties': {'StorageName': {'type': 'string'},
16165 'storage': {'$ref': '#/definitions/StorageConstraints'},
16166 'unit': {'type': 'string'}},
16167 'required': ['unit',
16168 'StorageName',
16169 'storage'],
16170 'type': 'object'},
16171 'StorageAttachmentDetails': {'additionalProperties': False,
16172 'properties': {'location': {'type': 'string'},
16173 'machinetag': {'type': 'string'},
16174 'storagetag': {'type': 'string'},
16175 'unittag': {'type': 'string'}},
16176 'required': ['storagetag',
16177 'unittag',
16178 'machinetag'],
16179 'type': 'object'},
16180 'StorageConstraints': {'additionalProperties': False,
16181 'properties': {'Count': {'type': 'integer'},
16182 'Pool': {'type': 'string'},
16183 'Size': {'type': 'integer'}},
16184 'required': ['Pool', 'Size', 'Count'],
16185 'type': 'object'},
16186 'StorageDetails': {'additionalProperties': False,
16187 'properties': {'Persistent': {'type': 'boolean'},
16188 'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
16189 'type': 'object'},
16190 'kind': {'type': 'integer'},
16191 'ownertag': {'type': 'string'},
16192 'status': {'$ref': '#/definitions/EntityStatus'},
16193 'storagetag': {'type': 'string'}},
16194 'required': ['storagetag',
16195 'ownertag',
16196 'kind',
16197 'status',
16198 'Persistent'],
16199 'type': 'object'},
16200 'StorageDetailsListResult': {'additionalProperties': False,
16201 'properties': {'error': {'$ref': '#/definitions/Error'},
16202 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
16203 'type': 'array'}},
16204 'type': 'object'},
16205 'StorageDetailsListResults': {'additionalProperties': False,
16206 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
16207 'type': 'array'}},
16208 'type': 'object'},
16209 'StorageDetailsResult': {'additionalProperties': False,
16210 'properties': {'error': {'$ref': '#/definitions/Error'},
16211 'result': {'$ref': '#/definitions/StorageDetails'}},
16212 'type': 'object'},
16213 'StorageDetailsResults': {'additionalProperties': False,
16214 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
16215 'type': 'array'}},
16216 'type': 'object'},
16217 'StorageFilter': {'additionalProperties': False,
16218 'type': 'object'},
16219 'StorageFilters': {'additionalProperties': False,
16220 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
16221 'type': 'array'}},
16222 'type': 'object'},
16223 'StoragePool': {'additionalProperties': False,
16224 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
16225 'type': 'object'}},
16226 'type': 'object'},
16227 'name': {'type': 'string'},
16228 'provider': {'type': 'string'}},
16229 'required': ['name', 'provider', 'attrs'],
16230 'type': 'object'},
16231 'StoragePoolFilter': {'additionalProperties': False,
16232 'properties': {'names': {'items': {'type': 'string'},
16233 'type': 'array'},
16234 'providers': {'items': {'type': 'string'},
16235 'type': 'array'}},
16236 'type': 'object'},
16237 'StoragePoolFilters': {'additionalProperties': False,
16238 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
16239 'type': 'array'}},
16240 'type': 'object'},
16241 'StoragePoolsResult': {'additionalProperties': False,
16242 'properties': {'error': {'$ref': '#/definitions/Error'},
16243 'storagepools': {'items': {'$ref': '#/definitions/StoragePool'},
16244 'type': 'array'}},
16245 'type': 'object'},
16246 'StoragePoolsResults': {'additionalProperties': False,
16247 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
16248 'type': 'array'}},
16249 'type': 'object'},
16250 'StoragesAddParams': {'additionalProperties': False,
16251 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
16252 'type': 'array'}},
16253 'required': ['storages'],
16254 'type': 'object'},
16255 'VolumeAttachmentInfo': {'additionalProperties': False,
16256 'properties': {'busaddress': {'type': 'string'},
16257 'devicelink': {'type': 'string'},
16258 'devicename': {'type': 'string'},
16259 'read-only': {'type': 'boolean'}},
16260 'type': 'object'},
16261 'VolumeDetails': {'additionalProperties': False,
16262 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16263 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
16264 'type': 'object'},
16265 'status': {'$ref': '#/definitions/EntityStatus'},
16266 'storage': {'$ref': '#/definitions/StorageDetails'},
16267 'volumetag': {'type': 'string'}},
16268 'required': ['volumetag', 'info', 'status'],
16269 'type': 'object'},
16270 'VolumeDetailsListResult': {'additionalProperties': False,
16271 'properties': {'error': {'$ref': '#/definitions/Error'},
16272 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
16273 'type': 'array'}},
16274 'type': 'object'},
16275 'VolumeDetailsListResults': {'additionalProperties': False,
16276 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
16277 'type': 'array'}},
16278 'type': 'object'},
16279 'VolumeFilter': {'additionalProperties': False,
16280 'properties': {'machines': {'items': {'type': 'string'},
16281 'type': 'array'}},
16282 'type': 'object'},
16283 'VolumeFilters': {'additionalProperties': False,
16284 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
16285 'type': 'array'}},
16286 'type': 'object'},
16287 'VolumeInfo': {'additionalProperties': False,
16288 'properties': {'hardwareid': {'type': 'string'},
16289 'persistent': {'type': 'boolean'},
16290 'size': {'type': 'integer'},
16291 'volumeid': {'type': 'string'}},
16292 'required': ['volumeid', 'size', 'persistent'],
16293 'type': 'object'},
16294 'caveat': {'additionalProperties': False,
16295 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
16296 'location': {'$ref': '#/definitions/packet'},
16297 'verificationId': {'$ref': '#/definitions/packet'}},
16298 'required': ['location',
16299 'caveatId',
16300 'verificationId'],
16301 'type': 'object'},
16302 'packet': {'additionalProperties': False,
16303 'properties': {'headerLen': {'type': 'integer'},
16304 'start': {'type': 'integer'},
16305 'totalLen': {'type': 'integer'}},
16306 'required': ['start', 'totalLen', 'headerLen'],
16307 'type': 'object'}},
16308 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
16309 'Result': {'$ref': '#/definitions/ErrorResults'}},
16310 'type': 'object'},
16311 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
16312 'type': 'object'},
16313 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
16314 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
16315 'type': 'object'},
16316 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
16317 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
16318 'type': 'object'},
16319 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
16320 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
16321 'type': 'object'},
16322 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
16323 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
16324 'type': 'object'},
16325 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16326 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
16327 'type': 'object'}},
16328 'type': 'object'}
16329
16330
16331 @ReturnMapping(ErrorResults)
16332 async def AddToUnit(self, storages):
16333 '''
16334 storages : typing.Sequence[~StorageAddParams]
16335 Returns -> typing.Sequence[~ErrorResult]
16336 '''
16337 # map input types to rpc msg
16338 params = dict()
16339 msg = dict(Type='Storage', Request='AddToUnit', Version=2, Params=params)
16340 params['storages'] = storages
16341 reply = await self.rpc(msg)
16342 return reply
16343
16344
16345
16346 @ReturnMapping(None)
16347 async def CreatePool(self, attrs, name, provider):
16348 '''
16349 attrs : typing.Mapping[str, typing.Any]
16350 name : str
16351 provider : str
16352 Returns -> None
16353 '''
16354 # map input types to rpc msg
16355 params = dict()
16356 msg = dict(Type='Storage', Request='CreatePool', Version=2, Params=params)
16357 params['attrs'] = attrs
16358 params['name'] = name
16359 params['provider'] = provider
16360 reply = await self.rpc(msg)
16361 return reply
16362
16363
16364
16365 @ReturnMapping(FilesystemDetailsListResults)
16366 async def ListFilesystems(self, filters):
16367 '''
16368 filters : typing.Sequence[~FilesystemFilter]
16369 Returns -> typing.Sequence[~FilesystemDetailsListResult]
16370 '''
16371 # map input types to rpc msg
16372 params = dict()
16373 msg = dict(Type='Storage', Request='ListFilesystems', Version=2, Params=params)
16374 params['filters'] = filters
16375 reply = await self.rpc(msg)
16376 return reply
16377
16378
16379
16380 @ReturnMapping(StoragePoolsResults)
16381 async def ListPools(self, filters):
16382 '''
16383 filters : typing.Sequence[~StoragePoolFilter]
16384 Returns -> typing.Sequence[~StoragePoolsResult]
16385 '''
16386 # map input types to rpc msg
16387 params = dict()
16388 msg = dict(Type='Storage', Request='ListPools', Version=2, Params=params)
16389 params['filters'] = filters
16390 reply = await self.rpc(msg)
16391 return reply
16392
16393
16394
16395 @ReturnMapping(StorageDetailsListResults)
16396 async def ListStorageDetails(self, filters):
16397 '''
16398 filters : typing.Sequence[~StorageFilter]
16399 Returns -> typing.Sequence[~StorageDetailsListResult]
16400 '''
16401 # map input types to rpc msg
16402 params = dict()
16403 msg = dict(Type='Storage', Request='ListStorageDetails', Version=2, Params=params)
16404 params['filters'] = filters
16405 reply = await self.rpc(msg)
16406 return reply
16407
16408
16409
16410 @ReturnMapping(VolumeDetailsListResults)
16411 async def ListVolumes(self, filters):
16412 '''
16413 filters : typing.Sequence[~VolumeFilter]
16414 Returns -> typing.Sequence[~VolumeDetailsListResult]
16415 '''
16416 # map input types to rpc msg
16417 params = dict()
16418 msg = dict(Type='Storage', Request='ListVolumes', Version=2, Params=params)
16419 params['filters'] = filters
16420 reply = await self.rpc(msg)
16421 return reply
16422
16423
16424
16425 @ReturnMapping(StorageDetailsResults)
16426 async def StorageDetails(self, entities):
16427 '''
16428 entities : typing.Sequence[~Entity]
16429 Returns -> typing.Sequence[~StorageDetailsResult]
16430 '''
16431 # map input types to rpc msg
16432 params = dict()
16433 msg = dict(Type='Storage', Request='StorageDetails', Version=2, Params=params)
16434 params['Entities'] = entities
16435 reply = await self.rpc(msg)
16436 return reply
16437
16438
16439 class StorageProvisioner(Type):
16440 name = 'StorageProvisioner'
16441 version = 2
16442 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
16443 'properties': {'BusAddress': {'type': 'string'},
16444 'DeviceLinks': {'items': {'type': 'string'},
16445 'type': 'array'},
16446 'DeviceName': {'type': 'string'},
16447 'FilesystemType': {'type': 'string'},
16448 'HardwareId': {'type': 'string'},
16449 'InUse': {'type': 'boolean'},
16450 'Label': {'type': 'string'},
16451 'MountPoint': {'type': 'string'},
16452 'Size': {'type': 'integer'},
16453 'UUID': {'type': 'string'}},
16454 'required': ['DeviceName',
16455 'DeviceLinks',
16456 'Label',
16457 'UUID',
16458 'HardwareId',
16459 'BusAddress',
16460 'Size',
16461 'FilesystemType',
16462 'InUse',
16463 'MountPoint'],
16464 'type': 'object'},
16465 'BlockDeviceResult': {'additionalProperties': False,
16466 'properties': {'error': {'$ref': '#/definitions/Error'},
16467 'result': {'$ref': '#/definitions/BlockDevice'}},
16468 'required': ['result'],
16469 'type': 'object'},
16470 'BlockDeviceResults': {'additionalProperties': False,
16471 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
16472 'type': 'array'}},
16473 'type': 'object'},
16474 'Entities': {'additionalProperties': False,
16475 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
16476 'type': 'array'}},
16477 'required': ['Entities'],
16478 'type': 'object'},
16479 'Entity': {'additionalProperties': False,
16480 'properties': {'Tag': {'type': 'string'}},
16481 'required': ['Tag'],
16482 'type': 'object'},
16483 'EntityStatusArgs': {'additionalProperties': False,
16484 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
16485 'type': 'object'}},
16486 'type': 'object'},
16487 'Info': {'type': 'string'},
16488 'Status': {'type': 'string'},
16489 'Tag': {'type': 'string'}},
16490 'required': ['Tag',
16491 'Status',
16492 'Info',
16493 'Data'],
16494 'type': 'object'},
16495 'Error': {'additionalProperties': False,
16496 'properties': {'Code': {'type': 'string'},
16497 'Info': {'$ref': '#/definitions/ErrorInfo'},
16498 'Message': {'type': 'string'}},
16499 'required': ['Message', 'Code'],
16500 'type': 'object'},
16501 'ErrorInfo': {'additionalProperties': False,
16502 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
16503 'MacaroonPath': {'type': 'string'}},
16504 'type': 'object'},
16505 'ErrorResult': {'additionalProperties': False,
16506 'properties': {'Error': {'$ref': '#/definitions/Error'}},
16507 'required': ['Error'],
16508 'type': 'object'},
16509 'ErrorResults': {'additionalProperties': False,
16510 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
16511 'type': 'array'}},
16512 'required': ['Results'],
16513 'type': 'object'},
16514 'Filesystem': {'additionalProperties': False,
16515 'properties': {'filesystemtag': {'type': 'string'},
16516 'info': {'$ref': '#/definitions/FilesystemInfo'},
16517 'volumetag': {'type': 'string'}},
16518 'required': ['filesystemtag', 'info'],
16519 'type': 'object'},
16520 'FilesystemAttachment': {'additionalProperties': False,
16521 'properties': {'filesystemtag': {'type': 'string'},
16522 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
16523 'machinetag': {'type': 'string'}},
16524 'required': ['filesystemtag',
16525 'machinetag',
16526 'info'],
16527 'type': 'object'},
16528 'FilesystemAttachmentInfo': {'additionalProperties': False,
16529 'properties': {'mountpoint': {'type': 'string'},
16530 'read-only': {'type': 'boolean'}},
16531 'type': 'object'},
16532 'FilesystemAttachmentParams': {'additionalProperties': False,
16533 'properties': {'filesystemid': {'type': 'string'},
16534 'filesystemtag': {'type': 'string'},
16535 'instanceid': {'type': 'string'},
16536 'machinetag': {'type': 'string'},
16537 'mountpoint': {'type': 'string'},
16538 'provider': {'type': 'string'},
16539 'read-only': {'type': 'boolean'}},
16540 'required': ['filesystemtag',
16541 'machinetag',
16542 'provider'],
16543 'type': 'object'},
16544 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
16545 'properties': {'error': {'$ref': '#/definitions/Error'},
16546 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
16547 'required': ['result'],
16548 'type': 'object'},
16549 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
16550 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
16551 'type': 'array'}},
16552 'type': 'object'},
16553 'FilesystemAttachmentResult': {'additionalProperties': False,
16554 'properties': {'error': {'$ref': '#/definitions/Error'},
16555 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
16556 'required': ['result'],
16557 'type': 'object'},
16558 'FilesystemAttachmentResults': {'additionalProperties': False,
16559 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
16560 'type': 'array'}},
16561 'type': 'object'},
16562 'FilesystemAttachments': {'additionalProperties': False,
16563 'properties': {'filesystemattachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
16564 'type': 'array'}},
16565 'required': ['filesystemattachments'],
16566 'type': 'object'},
16567 'FilesystemInfo': {'additionalProperties': False,
16568 'properties': {'filesystemid': {'type': 'string'},
16569 'size': {'type': 'integer'}},
16570 'required': ['filesystemid', 'size'],
16571 'type': 'object'},
16572 'FilesystemParams': {'additionalProperties': False,
16573 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
16574 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
16575 'type': 'object'}},
16576 'type': 'object'},
16577 'filesystemtag': {'type': 'string'},
16578 'provider': {'type': 'string'},
16579 'size': {'type': 'integer'},
16580 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16581 'type': 'object'},
16582 'volumetag': {'type': 'string'}},
16583 'required': ['filesystemtag',
16584 'size',
16585 'provider'],
16586 'type': 'object'},
16587 'FilesystemParamsResult': {'additionalProperties': False,
16588 'properties': {'error': {'$ref': '#/definitions/Error'},
16589 'result': {'$ref': '#/definitions/FilesystemParams'}},
16590 'required': ['result'],
16591 'type': 'object'},
16592 'FilesystemParamsResults': {'additionalProperties': False,
16593 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
16594 'type': 'array'}},
16595 'type': 'object'},
16596 'FilesystemResult': {'additionalProperties': False,
16597 'properties': {'error': {'$ref': '#/definitions/Error'},
16598 'result': {'$ref': '#/definitions/Filesystem'}},
16599 'required': ['result'],
16600 'type': 'object'},
16601 'FilesystemResults': {'additionalProperties': False,
16602 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
16603 'type': 'array'}},
16604 'type': 'object'},
16605 'Filesystems': {'additionalProperties': False,
16606 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
16607 'type': 'array'}},
16608 'required': ['filesystems'],
16609 'type': 'object'},
16610 'LifeResult': {'additionalProperties': False,
16611 'properties': {'Error': {'$ref': '#/definitions/Error'},
16612 'Life': {'type': 'string'}},
16613 'required': ['Life', 'Error'],
16614 'type': 'object'},
16615 'LifeResults': {'additionalProperties': False,
16616 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
16617 'type': 'array'}},
16618 'required': ['Results'],
16619 'type': 'object'},
16620 'Macaroon': {'additionalProperties': False,
16621 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
16622 'type': 'array'},
16623 'data': {'items': {'type': 'integer'},
16624 'type': 'array'},
16625 'id': {'$ref': '#/definitions/packet'},
16626 'location': {'$ref': '#/definitions/packet'},
16627 'sig': {'items': {'type': 'integer'},
16628 'type': 'array'}},
16629 'required': ['data',
16630 'location',
16631 'id',
16632 'caveats',
16633 'sig'],
16634 'type': 'object'},
16635 'MachineStorageId': {'additionalProperties': False,
16636 'properties': {'attachmenttag': {'type': 'string'},
16637 'machinetag': {'type': 'string'}},
16638 'required': ['machinetag',
16639 'attachmenttag'],
16640 'type': 'object'},
16641 'MachineStorageIds': {'additionalProperties': False,
16642 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
16643 'type': 'array'}},
16644 'required': ['ids'],
16645 'type': 'object'},
16646 'MachineStorageIdsWatchResult': {'additionalProperties': False,
16647 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
16648 'type': 'array'},
16649 'Error': {'$ref': '#/definitions/Error'},
16650 'MachineStorageIdsWatcherId': {'type': 'string'}},
16651 'required': ['MachineStorageIdsWatcherId',
16652 'Changes',
16653 'Error'],
16654 'type': 'object'},
16655 'MachineStorageIdsWatchResults': {'additionalProperties': False,
16656 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
16657 'type': 'array'}},
16658 'required': ['Results'],
16659 'type': 'object'},
16660 'ModelConfigResult': {'additionalProperties': False,
16661 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
16662 'type': 'object'}},
16663 'type': 'object'}},
16664 'required': ['Config'],
16665 'type': 'object'},
16666 'NotifyWatchResult': {'additionalProperties': False,
16667 'properties': {'Error': {'$ref': '#/definitions/Error'},
16668 'NotifyWatcherId': {'type': 'string'}},
16669 'required': ['NotifyWatcherId', 'Error'],
16670 'type': 'object'},
16671 'NotifyWatchResults': {'additionalProperties': False,
16672 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16673 'type': 'array'}},
16674 'required': ['Results'],
16675 'type': 'object'},
16676 'SetStatus': {'additionalProperties': False,
16677 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
16678 'type': 'array'}},
16679 'required': ['Entities'],
16680 'type': 'object'},
16681 'StringResult': {'additionalProperties': False,
16682 'properties': {'Error': {'$ref': '#/definitions/Error'},
16683 'Result': {'type': 'string'}},
16684 'required': ['Error', 'Result'],
16685 'type': 'object'},
16686 'StringResults': {'additionalProperties': False,
16687 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
16688 'type': 'array'}},
16689 'required': ['Results'],
16690 'type': 'object'},
16691 'StringsWatchResult': {'additionalProperties': False,
16692 'properties': {'Changes': {'items': {'type': 'string'},
16693 'type': 'array'},
16694 'Error': {'$ref': '#/definitions/Error'},
16695 'StringsWatcherId': {'type': 'string'}},
16696 'required': ['StringsWatcherId',
16697 'Changes',
16698 'Error'],
16699 'type': 'object'},
16700 'StringsWatchResults': {'additionalProperties': False,
16701 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
16702 'type': 'array'}},
16703 'required': ['Results'],
16704 'type': 'object'},
16705 'Volume': {'additionalProperties': False,
16706 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16707 'volumetag': {'type': 'string'}},
16708 'required': ['volumetag', 'info'],
16709 'type': 'object'},
16710 'VolumeAttachment': {'additionalProperties': False,
16711 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
16712 'machinetag': {'type': 'string'},
16713 'volumetag': {'type': 'string'}},
16714 'required': ['volumetag',
16715 'machinetag',
16716 'info'],
16717 'type': 'object'},
16718 'VolumeAttachmentInfo': {'additionalProperties': False,
16719 'properties': {'busaddress': {'type': 'string'},
16720 'devicelink': {'type': 'string'},
16721 'devicename': {'type': 'string'},
16722 'read-only': {'type': 'boolean'}},
16723 'type': 'object'},
16724 'VolumeAttachmentParams': {'additionalProperties': False,
16725 'properties': {'instanceid': {'type': 'string'},
16726 'machinetag': {'type': 'string'},
16727 'provider': {'type': 'string'},
16728 'read-only': {'type': 'boolean'},
16729 'volumeid': {'type': 'string'},
16730 'volumetag': {'type': 'string'}},
16731 'required': ['volumetag',
16732 'machinetag',
16733 'provider'],
16734 'type': 'object'},
16735 'VolumeAttachmentParamsResult': {'additionalProperties': False,
16736 'properties': {'error': {'$ref': '#/definitions/Error'},
16737 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
16738 'required': ['result'],
16739 'type': 'object'},
16740 'VolumeAttachmentParamsResults': {'additionalProperties': False,
16741 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
16742 'type': 'array'}},
16743 'type': 'object'},
16744 'VolumeAttachmentResult': {'additionalProperties': False,
16745 'properties': {'error': {'$ref': '#/definitions/Error'},
16746 'result': {'$ref': '#/definitions/VolumeAttachment'}},
16747 'required': ['result'],
16748 'type': 'object'},
16749 'VolumeAttachmentResults': {'additionalProperties': False,
16750 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
16751 'type': 'array'}},
16752 'type': 'object'},
16753 'VolumeAttachments': {'additionalProperties': False,
16754 'properties': {'volumeattachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
16755 'type': 'array'}},
16756 'required': ['volumeattachments'],
16757 'type': 'object'},
16758 'VolumeInfo': {'additionalProperties': False,
16759 'properties': {'hardwareid': {'type': 'string'},
16760 'persistent': {'type': 'boolean'},
16761 'size': {'type': 'integer'},
16762 'volumeid': {'type': 'string'}},
16763 'required': ['volumeid', 'size', 'persistent'],
16764 'type': 'object'},
16765 'VolumeParams': {'additionalProperties': False,
16766 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
16767 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
16768 'type': 'object'}},
16769 'type': 'object'},
16770 'provider': {'type': 'string'},
16771 'size': {'type': 'integer'},
16772 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16773 'type': 'object'},
16774 'volumetag': {'type': 'string'}},
16775 'required': ['volumetag', 'size', 'provider'],
16776 'type': 'object'},
16777 'VolumeParamsResult': {'additionalProperties': False,
16778 'properties': {'error': {'$ref': '#/definitions/Error'},
16779 'result': {'$ref': '#/definitions/VolumeParams'}},
16780 'required': ['result'],
16781 'type': 'object'},
16782 'VolumeParamsResults': {'additionalProperties': False,
16783 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
16784 'type': 'array'}},
16785 'type': 'object'},
16786 'VolumeResult': {'additionalProperties': False,
16787 'properties': {'error': {'$ref': '#/definitions/Error'},
16788 'result': {'$ref': '#/definitions/Volume'}},
16789 'required': ['result'],
16790 'type': 'object'},
16791 'VolumeResults': {'additionalProperties': False,
16792 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
16793 'type': 'array'}},
16794 'type': 'object'},
16795 'Volumes': {'additionalProperties': False,
16796 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
16797 'type': 'array'}},
16798 'required': ['volumes'],
16799 'type': 'object'},
16800 'caveat': {'additionalProperties': False,
16801 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
16802 'location': {'$ref': '#/definitions/packet'},
16803 'verificationId': {'$ref': '#/definitions/packet'}},
16804 'required': ['location',
16805 'caveatId',
16806 'verificationId'],
16807 'type': 'object'},
16808 'packet': {'additionalProperties': False,
16809 'properties': {'headerLen': {'type': 'integer'},
16810 'start': {'type': 'integer'},
16811 'totalLen': {'type': 'integer'}},
16812 'required': ['start', 'totalLen', 'headerLen'],
16813 'type': 'object'}},
16814 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16815 'Result': {'$ref': '#/definitions/LifeResults'}},
16816 'type': 'object'},
16817 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16818 'Result': {'$ref': '#/definitions/ErrorResults'}},
16819 'type': 'object'},
16820 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16821 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
16822 'type': 'object'},
16823 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16824 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
16825 'type': 'object'},
16826 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16827 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
16828 'type': 'object'},
16829 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16830 'Result': {'$ref': '#/definitions/FilesystemResults'}},
16831 'type': 'object'},
16832 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16833 'Result': {'$ref': '#/definitions/StringResults'}},
16834 'type': 'object'},
16835 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16836 'Result': {'$ref': '#/definitions/LifeResults'}},
16837 'type': 'object'},
16838 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
16839 'type': 'object'},
16840 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16841 'Result': {'$ref': '#/definitions/ErrorResults'}},
16842 'type': 'object'},
16843 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16844 'Result': {'$ref': '#/definitions/ErrorResults'}},
16845 'type': 'object'},
16846 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
16847 'Result': {'$ref': '#/definitions/ErrorResults'}},
16848 'type': 'object'},
16849 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
16850 'Result': {'$ref': '#/definitions/ErrorResults'}},
16851 'type': 'object'},
16852 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16853 'Result': {'$ref': '#/definitions/ErrorResults'}},
16854 'type': 'object'},
16855 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
16856 'Result': {'$ref': '#/definitions/ErrorResults'}},
16857 'type': 'object'},
16858 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
16859 'Result': {'$ref': '#/definitions/ErrorResults'}},
16860 'type': 'object'},
16861 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16862 'Result': {'$ref': '#/definitions/ErrorResults'}},
16863 'type': 'object'},
16864 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16865 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
16866 'type': 'object'},
16867 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16868 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
16869 'type': 'object'},
16870 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16871 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
16872 'type': 'object'},
16873 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16874 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
16875 'type': 'object'},
16876 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16877 'Result': {'$ref': '#/definitions/VolumeResults'}},
16878 'type': 'object'},
16879 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16880 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16881 'type': 'object'},
16882 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16883 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16884 'type': 'object'},
16885 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16886 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16887 'type': 'object'},
16888 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16889 'type': 'object'},
16890 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16891 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16892 'type': 'object'},
16893 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16894 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16895 'type': 'object'},
16896 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16897 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16898 'type': 'object'}},
16899 'type': 'object'}
16900
16901
16902 @ReturnMapping(LifeResults)
16903 async def AttachmentLife(self, ids):
16904 '''
16905 ids : typing.Sequence[~MachineStorageId]
16906 Returns -> typing.Sequence[~LifeResult]
16907 '''
16908 # map input types to rpc msg
16909 params = dict()
16910 msg = dict(Type='StorageProvisioner', Request='AttachmentLife', Version=2, Params=params)
16911 params['ids'] = ids
16912 reply = await self.rpc(msg)
16913 return reply
16914
16915
16916
16917 @ReturnMapping(ErrorResults)
16918 async def EnsureDead(self, entities):
16919 '''
16920 entities : typing.Sequence[~Entity]
16921 Returns -> typing.Sequence[~ErrorResult]
16922 '''
16923 # map input types to rpc msg
16924 params = dict()
16925 msg = dict(Type='StorageProvisioner', Request='EnsureDead', Version=2, Params=params)
16926 params['Entities'] = entities
16927 reply = await self.rpc(msg)
16928 return reply
16929
16930
16931
16932 @ReturnMapping(FilesystemAttachmentParamsResults)
16933 async def FilesystemAttachmentParams(self, ids):
16934 '''
16935 ids : typing.Sequence[~MachineStorageId]
16936 Returns -> typing.Sequence[~FilesystemAttachmentParamsResult]
16937 '''
16938 # map input types to rpc msg
16939 params = dict()
16940 msg = dict(Type='StorageProvisioner', Request='FilesystemAttachmentParams', Version=2, Params=params)
16941 params['ids'] = ids
16942 reply = await self.rpc(msg)
16943 return reply
16944
16945
16946
16947 @ReturnMapping(FilesystemAttachmentResults)
16948 async def FilesystemAttachments(self, ids):
16949 '''
16950 ids : typing.Sequence[~MachineStorageId]
16951 Returns -> typing.Sequence[~FilesystemAttachmentResult]
16952 '''
16953 # map input types to rpc msg
16954 params = dict()
16955 msg = dict(Type='StorageProvisioner', Request='FilesystemAttachments', Version=2, Params=params)
16956 params['ids'] = ids
16957 reply = await self.rpc(msg)
16958 return reply
16959
16960
16961
16962 @ReturnMapping(FilesystemParamsResults)
16963 async def FilesystemParams(self, entities):
16964 '''
16965 entities : typing.Sequence[~Entity]
16966 Returns -> typing.Sequence[~FilesystemParamsResult]
16967 '''
16968 # map input types to rpc msg
16969 params = dict()
16970 msg = dict(Type='StorageProvisioner', Request='FilesystemParams', Version=2, Params=params)
16971 params['Entities'] = entities
16972 reply = await self.rpc(msg)
16973 return reply
16974
16975
16976
16977 @ReturnMapping(FilesystemResults)
16978 async def Filesystems(self, entities):
16979 '''
16980 entities : typing.Sequence[~Entity]
16981 Returns -> typing.Sequence[~FilesystemResult]
16982 '''
16983 # map input types to rpc msg
16984 params = dict()
16985 msg = dict(Type='StorageProvisioner', Request='Filesystems', Version=2, Params=params)
16986 params['Entities'] = entities
16987 reply = await self.rpc(msg)
16988 return reply
16989
16990
16991
16992 @ReturnMapping(StringResults)
16993 async def InstanceId(self, entities):
16994 '''
16995 entities : typing.Sequence[~Entity]
16996 Returns -> typing.Sequence[~StringResult]
16997 '''
16998 # map input types to rpc msg
16999 params = dict()
17000 msg = dict(Type='StorageProvisioner', Request='InstanceId', Version=2, Params=params)
17001 params['Entities'] = entities
17002 reply = await self.rpc(msg)
17003 return reply
17004
17005
17006
17007 @ReturnMapping(LifeResults)
17008 async def Life(self, entities):
17009 '''
17010 entities : typing.Sequence[~Entity]
17011 Returns -> typing.Sequence[~LifeResult]
17012 '''
17013 # map input types to rpc msg
17014 params = dict()
17015 msg = dict(Type='StorageProvisioner', Request='Life', Version=2, Params=params)
17016 params['Entities'] = entities
17017 reply = await self.rpc(msg)
17018 return reply
17019
17020
17021
17022 @ReturnMapping(ModelConfigResult)
17023 async def ModelConfig(self):
17024 '''
17025
17026 Returns -> typing.Mapping[str, typing.Any]
17027 '''
17028 # map input types to rpc msg
17029 params = dict()
17030 msg = dict(Type='StorageProvisioner', Request='ModelConfig', Version=2, Params=params)
17031
17032 reply = await self.rpc(msg)
17033 return reply
17034
17035
17036
17037 @ReturnMapping(ErrorResults)
17038 async def Remove(self, entities):
17039 '''
17040 entities : typing.Sequence[~Entity]
17041 Returns -> typing.Sequence[~ErrorResult]
17042 '''
17043 # map input types to rpc msg
17044 params = dict()
17045 msg = dict(Type='StorageProvisioner', Request='Remove', Version=2, Params=params)
17046 params['Entities'] = entities
17047 reply = await self.rpc(msg)
17048 return reply
17049
17050
17051
17052 @ReturnMapping(ErrorResults)
17053 async def RemoveAttachment(self, ids):
17054 '''
17055 ids : typing.Sequence[~MachineStorageId]
17056 Returns -> typing.Sequence[~ErrorResult]
17057 '''
17058 # map input types to rpc msg
17059 params = dict()
17060 msg = dict(Type='StorageProvisioner', Request='RemoveAttachment', Version=2, Params=params)
17061 params['ids'] = ids
17062 reply = await self.rpc(msg)
17063 return reply
17064
17065
17066
17067 @ReturnMapping(ErrorResults)
17068 async def SetFilesystemAttachmentInfo(self, filesystemattachments):
17069 '''
17070 filesystemattachments : typing.Sequence[~FilesystemAttachment]
17071 Returns -> typing.Sequence[~ErrorResult]
17072 '''
17073 # map input types to rpc msg
17074 params = dict()
17075 msg = dict(Type='StorageProvisioner', Request='SetFilesystemAttachmentInfo', Version=2, Params=params)
17076 params['filesystemattachments'] = filesystemattachments
17077 reply = await self.rpc(msg)
17078 return reply
17079
17080
17081
17082 @ReturnMapping(ErrorResults)
17083 async def SetFilesystemInfo(self, filesystems):
17084 '''
17085 filesystems : typing.Sequence[~Filesystem]
17086 Returns -> typing.Sequence[~ErrorResult]
17087 '''
17088 # map input types to rpc msg
17089 params = dict()
17090 msg = dict(Type='StorageProvisioner', Request='SetFilesystemInfo', Version=2, Params=params)
17091 params['filesystems'] = filesystems
17092 reply = await self.rpc(msg)
17093 return reply
17094
17095
17096
17097 @ReturnMapping(ErrorResults)
17098 async def SetStatus(self, entities):
17099 '''
17100 entities : typing.Sequence[~EntityStatusArgs]
17101 Returns -> typing.Sequence[~ErrorResult]
17102 '''
17103 # map input types to rpc msg
17104 params = dict()
17105 msg = dict(Type='StorageProvisioner', Request='SetStatus', Version=2, Params=params)
17106 params['Entities'] = entities
17107 reply = await self.rpc(msg)
17108 return reply
17109
17110
17111
17112 @ReturnMapping(ErrorResults)
17113 async def SetVolumeAttachmentInfo(self, volumeattachments):
17114 '''
17115 volumeattachments : typing.Sequence[~VolumeAttachment]
17116 Returns -> typing.Sequence[~ErrorResult]
17117 '''
17118 # map input types to rpc msg
17119 params = dict()
17120 msg = dict(Type='StorageProvisioner', Request='SetVolumeAttachmentInfo', Version=2, Params=params)
17121 params['volumeattachments'] = volumeattachments
17122 reply = await self.rpc(msg)
17123 return reply
17124
17125
17126
17127 @ReturnMapping(ErrorResults)
17128 async def SetVolumeInfo(self, volumes):
17129 '''
17130 volumes : typing.Sequence[~Volume]
17131 Returns -> typing.Sequence[~ErrorResult]
17132 '''
17133 # map input types to rpc msg
17134 params = dict()
17135 msg = dict(Type='StorageProvisioner', Request='SetVolumeInfo', Version=2, Params=params)
17136 params['volumes'] = volumes
17137 reply = await self.rpc(msg)
17138 return reply
17139
17140
17141
17142 @ReturnMapping(ErrorResults)
17143 async def UpdateStatus(self, entities):
17144 '''
17145 entities : typing.Sequence[~EntityStatusArgs]
17146 Returns -> typing.Sequence[~ErrorResult]
17147 '''
17148 # map input types to rpc msg
17149 params = dict()
17150 msg = dict(Type='StorageProvisioner', Request='UpdateStatus', Version=2, Params=params)
17151 params['Entities'] = entities
17152 reply = await self.rpc(msg)
17153 return reply
17154
17155
17156
17157 @ReturnMapping(VolumeAttachmentParamsResults)
17158 async def VolumeAttachmentParams(self, ids):
17159 '''
17160 ids : typing.Sequence[~MachineStorageId]
17161 Returns -> typing.Sequence[~VolumeAttachmentParamsResult]
17162 '''
17163 # map input types to rpc msg
17164 params = dict()
17165 msg = dict(Type='StorageProvisioner', Request='VolumeAttachmentParams', Version=2, Params=params)
17166 params['ids'] = ids
17167 reply = await self.rpc(msg)
17168 return reply
17169
17170
17171
17172 @ReturnMapping(VolumeAttachmentResults)
17173 async def VolumeAttachments(self, ids):
17174 '''
17175 ids : typing.Sequence[~MachineStorageId]
17176 Returns -> typing.Sequence[~VolumeAttachmentResult]
17177 '''
17178 # map input types to rpc msg
17179 params = dict()
17180 msg = dict(Type='StorageProvisioner', Request='VolumeAttachments', Version=2, Params=params)
17181 params['ids'] = ids
17182 reply = await self.rpc(msg)
17183 return reply
17184
17185
17186
17187 @ReturnMapping(BlockDeviceResults)
17188 async def VolumeBlockDevices(self, ids):
17189 '''
17190 ids : typing.Sequence[~MachineStorageId]
17191 Returns -> typing.Sequence[~BlockDeviceResult]
17192 '''
17193 # map input types to rpc msg
17194 params = dict()
17195 msg = dict(Type='StorageProvisioner', Request='VolumeBlockDevices', Version=2, Params=params)
17196 params['ids'] = ids
17197 reply = await self.rpc(msg)
17198 return reply
17199
17200
17201
17202 @ReturnMapping(VolumeParamsResults)
17203 async def VolumeParams(self, entities):
17204 '''
17205 entities : typing.Sequence[~Entity]
17206 Returns -> typing.Sequence[~VolumeParamsResult]
17207 '''
17208 # map input types to rpc msg
17209 params = dict()
17210 msg = dict(Type='StorageProvisioner', Request='VolumeParams', Version=2, Params=params)
17211 params['Entities'] = entities
17212 reply = await self.rpc(msg)
17213 return reply
17214
17215
17216
17217 @ReturnMapping(VolumeResults)
17218 async def Volumes(self, entities):
17219 '''
17220 entities : typing.Sequence[~Entity]
17221 Returns -> typing.Sequence[~VolumeResult]
17222 '''
17223 # map input types to rpc msg
17224 params = dict()
17225 msg = dict(Type='StorageProvisioner', Request='Volumes', Version=2, Params=params)
17226 params['Entities'] = entities
17227 reply = await self.rpc(msg)
17228 return reply
17229
17230
17231
17232 @ReturnMapping(NotifyWatchResults)
17233 async def WatchBlockDevices(self, entities):
17234 '''
17235 entities : typing.Sequence[~Entity]
17236 Returns -> typing.Sequence[~NotifyWatchResult]
17237 '''
17238 # map input types to rpc msg
17239 params = dict()
17240 msg = dict(Type='StorageProvisioner', Request='WatchBlockDevices', Version=2, Params=params)
17241 params['Entities'] = entities
17242 reply = await self.rpc(msg)
17243 return reply
17244
17245
17246
17247 @ReturnMapping(MachineStorageIdsWatchResults)
17248 async def WatchFilesystemAttachments(self, entities):
17249 '''
17250 entities : typing.Sequence[~Entity]
17251 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
17252 '''
17253 # map input types to rpc msg
17254 params = dict()
17255 msg = dict(Type='StorageProvisioner', Request='WatchFilesystemAttachments', Version=2, Params=params)
17256 params['Entities'] = entities
17257 reply = await self.rpc(msg)
17258 return reply
17259
17260
17261
17262 @ReturnMapping(StringsWatchResults)
17263 async def WatchFilesystems(self, entities):
17264 '''
17265 entities : typing.Sequence[~Entity]
17266 Returns -> typing.Sequence[~StringsWatchResult]
17267 '''
17268 # map input types to rpc msg
17269 params = dict()
17270 msg = dict(Type='StorageProvisioner', Request='WatchFilesystems', Version=2, Params=params)
17271 params['Entities'] = entities
17272 reply = await self.rpc(msg)
17273 return reply
17274
17275
17276
17277 @ReturnMapping(NotifyWatchResult)
17278 async def WatchForModelConfigChanges(self):
17279 '''
17280
17281 Returns -> typing.Union[_ForwardRef('Error'), str]
17282 '''
17283 # map input types to rpc msg
17284 params = dict()
17285 msg = dict(Type='StorageProvisioner', Request='WatchForModelConfigChanges', Version=2, Params=params)
17286
17287 reply = await self.rpc(msg)
17288 return reply
17289
17290
17291
17292 @ReturnMapping(NotifyWatchResults)
17293 async def WatchMachines(self, entities):
17294 '''
17295 entities : typing.Sequence[~Entity]
17296 Returns -> typing.Sequence[~NotifyWatchResult]
17297 '''
17298 # map input types to rpc msg
17299 params = dict()
17300 msg = dict(Type='StorageProvisioner', Request='WatchMachines', Version=2, Params=params)
17301 params['Entities'] = entities
17302 reply = await self.rpc(msg)
17303 return reply
17304
17305
17306
17307 @ReturnMapping(MachineStorageIdsWatchResults)
17308 async def WatchVolumeAttachments(self, entities):
17309 '''
17310 entities : typing.Sequence[~Entity]
17311 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
17312 '''
17313 # map input types to rpc msg
17314 params = dict()
17315 msg = dict(Type='StorageProvisioner', Request='WatchVolumeAttachments', Version=2, Params=params)
17316 params['Entities'] = entities
17317 reply = await self.rpc(msg)
17318 return reply
17319
17320
17321
17322 @ReturnMapping(StringsWatchResults)
17323 async def WatchVolumes(self, entities):
17324 '''
17325 entities : typing.Sequence[~Entity]
17326 Returns -> typing.Sequence[~StringsWatchResult]
17327 '''
17328 # map input types to rpc msg
17329 params = dict()
17330 msg = dict(Type='StorageProvisioner', Request='WatchVolumes', Version=2, Params=params)
17331 params['Entities'] = entities
17332 reply = await self.rpc(msg)
17333 return reply
17334
17335
17336 class StringsWatcher(Type):
17337 name = 'StringsWatcher'
17338 version = 1
17339 schema = {'definitions': {'Error': {'additionalProperties': False,
17340 'properties': {'Code': {'type': 'string'},
17341 'Info': {'$ref': '#/definitions/ErrorInfo'},
17342 'Message': {'type': 'string'}},
17343 'required': ['Message', 'Code'],
17344 'type': 'object'},
17345 'ErrorInfo': {'additionalProperties': False,
17346 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17347 'MacaroonPath': {'type': 'string'}},
17348 'type': 'object'},
17349 'Macaroon': {'additionalProperties': False,
17350 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17351 'type': 'array'},
17352 'data': {'items': {'type': 'integer'},
17353 'type': 'array'},
17354 'id': {'$ref': '#/definitions/packet'},
17355 'location': {'$ref': '#/definitions/packet'},
17356 'sig': {'items': {'type': 'integer'},
17357 'type': 'array'}},
17358 'required': ['data',
17359 'location',
17360 'id',
17361 'caveats',
17362 'sig'],
17363 'type': 'object'},
17364 'StringsWatchResult': {'additionalProperties': False,
17365 'properties': {'Changes': {'items': {'type': 'string'},
17366 'type': 'array'},
17367 'Error': {'$ref': '#/definitions/Error'},
17368 'StringsWatcherId': {'type': 'string'}},
17369 'required': ['StringsWatcherId',
17370 'Changes',
17371 'Error'],
17372 'type': 'object'},
17373 'caveat': {'additionalProperties': False,
17374 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17375 'location': {'$ref': '#/definitions/packet'},
17376 'verificationId': {'$ref': '#/definitions/packet'}},
17377 'required': ['location',
17378 'caveatId',
17379 'verificationId'],
17380 'type': 'object'},
17381 'packet': {'additionalProperties': False,
17382 'properties': {'headerLen': {'type': 'integer'},
17383 'start': {'type': 'integer'},
17384 'totalLen': {'type': 'integer'}},
17385 'required': ['start', 'totalLen', 'headerLen'],
17386 'type': 'object'}},
17387 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
17388 'type': 'object'},
17389 'Stop': {'type': 'object'}},
17390 'type': 'object'}
17391
17392
17393 @ReturnMapping(StringsWatchResult)
17394 async def Next(self):
17395 '''
17396
17397 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
17398 '''
17399 # map input types to rpc msg
17400 params = dict()
17401 msg = dict(Type='StringsWatcher', Request='Next', Version=1, Params=params)
17402
17403 reply = await self.rpc(msg)
17404 return reply
17405
17406
17407
17408 @ReturnMapping(None)
17409 async def Stop(self):
17410 '''
17411
17412 Returns -> None
17413 '''
17414 # map input types to rpc msg
17415 params = dict()
17416 msg = dict(Type='StringsWatcher', Request='Stop', Version=1, Params=params)
17417
17418 reply = await self.rpc(msg)
17419 return reply
17420
17421
17422 class Subnets(Type):
17423 name = 'Subnets'
17424 version = 2
17425 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
17426 'properties': {'SpaceTag': {'type': 'string'},
17427 'SubnetProviderId': {'type': 'string'},
17428 'SubnetTag': {'type': 'string'},
17429 'Zones': {'items': {'type': 'string'},
17430 'type': 'array'}},
17431 'required': ['SpaceTag'],
17432 'type': 'object'},
17433 'AddSubnetsParams': {'additionalProperties': False,
17434 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
17435 'type': 'array'}},
17436 'required': ['Subnets'],
17437 'type': 'object'},
17438 'Error': {'additionalProperties': False,
17439 'properties': {'Code': {'type': 'string'},
17440 'Info': {'$ref': '#/definitions/ErrorInfo'},
17441 'Message': {'type': 'string'}},
17442 'required': ['Message', 'Code'],
17443 'type': 'object'},
17444 'ErrorInfo': {'additionalProperties': False,
17445 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17446 'MacaroonPath': {'type': 'string'}},
17447 'type': 'object'},
17448 'ErrorResult': {'additionalProperties': False,
17449 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17450 'required': ['Error'],
17451 'type': 'object'},
17452 'ErrorResults': {'additionalProperties': False,
17453 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17454 'type': 'array'}},
17455 'required': ['Results'],
17456 'type': 'object'},
17457 'ListSubnetsResults': {'additionalProperties': False,
17458 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
17459 'type': 'array'}},
17460 'required': ['Results'],
17461 'type': 'object'},
17462 'Macaroon': {'additionalProperties': False,
17463 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17464 'type': 'array'},
17465 'data': {'items': {'type': 'integer'},
17466 'type': 'array'},
17467 'id': {'$ref': '#/definitions/packet'},
17468 'location': {'$ref': '#/definitions/packet'},
17469 'sig': {'items': {'type': 'integer'},
17470 'type': 'array'}},
17471 'required': ['data',
17472 'location',
17473 'id',
17474 'caveats',
17475 'sig'],
17476 'type': 'object'},
17477 'SpaceResult': {'additionalProperties': False,
17478 'properties': {'Error': {'$ref': '#/definitions/Error'},
17479 'Tag': {'type': 'string'}},
17480 'required': ['Error', 'Tag'],
17481 'type': 'object'},
17482 'SpaceResults': {'additionalProperties': False,
17483 'properties': {'Results': {'items': {'$ref': '#/definitions/SpaceResult'},
17484 'type': 'array'}},
17485 'required': ['Results'],
17486 'type': 'object'},
17487 'Subnet': {'additionalProperties': False,
17488 'properties': {'CIDR': {'type': 'string'},
17489 'Life': {'type': 'string'},
17490 'ProviderId': {'type': 'string'},
17491 'SpaceTag': {'type': 'string'},
17492 'StaticRangeHighIP': {'items': {'type': 'integer'},
17493 'type': 'array'},
17494 'StaticRangeLowIP': {'items': {'type': 'integer'},
17495 'type': 'array'},
17496 'Status': {'type': 'string'},
17497 'VLANTag': {'type': 'integer'},
17498 'Zones': {'items': {'type': 'string'},
17499 'type': 'array'}},
17500 'required': ['CIDR',
17501 'VLANTag',
17502 'Life',
17503 'SpaceTag',
17504 'Zones'],
17505 'type': 'object'},
17506 'SubnetsFilters': {'additionalProperties': False,
17507 'properties': {'SpaceTag': {'type': 'string'},
17508 'Zone': {'type': 'string'}},
17509 'type': 'object'},
17510 'ZoneResult': {'additionalProperties': False,
17511 'properties': {'Available': {'type': 'boolean'},
17512 'Error': {'$ref': '#/definitions/Error'},
17513 'Name': {'type': 'string'}},
17514 'required': ['Error', 'Name', 'Available'],
17515 'type': 'object'},
17516 'ZoneResults': {'additionalProperties': False,
17517 'properties': {'Results': {'items': {'$ref': '#/definitions/ZoneResult'},
17518 'type': 'array'}},
17519 'required': ['Results'],
17520 'type': 'object'},
17521 'caveat': {'additionalProperties': False,
17522 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17523 'location': {'$ref': '#/definitions/packet'},
17524 'verificationId': {'$ref': '#/definitions/packet'}},
17525 'required': ['location',
17526 'caveatId',
17527 'verificationId'],
17528 'type': 'object'},
17529 'packet': {'additionalProperties': False,
17530 'properties': {'headerLen': {'type': 'integer'},
17531 'start': {'type': 'integer'},
17532 'totalLen': {'type': 'integer'}},
17533 'required': ['start', 'totalLen', 'headerLen'],
17534 'type': 'object'}},
17535 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
17536 'Result': {'$ref': '#/definitions/ErrorResults'}},
17537 'type': 'object'},
17538 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
17539 'type': 'object'},
17540 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
17541 'type': 'object'},
17542 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
17543 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
17544 'type': 'object'}},
17545 'type': 'object'}
17546
17547
17548 @ReturnMapping(ErrorResults)
17549 async def AddSubnets(self, subnets):
17550 '''
17551 subnets : typing.Sequence[~AddSubnetParams]
17552 Returns -> typing.Sequence[~ErrorResult]
17553 '''
17554 # map input types to rpc msg
17555 params = dict()
17556 msg = dict(Type='Subnets', Request='AddSubnets', Version=2, Params=params)
17557 params['Subnets'] = subnets
17558 reply = await self.rpc(msg)
17559 return reply
17560
17561
17562
17563 @ReturnMapping(SpaceResults)
17564 async def AllSpaces(self):
17565 '''
17566
17567 Returns -> typing.Sequence[~SpaceResult]
17568 '''
17569 # map input types to rpc msg
17570 params = dict()
17571 msg = dict(Type='Subnets', Request='AllSpaces', Version=2, Params=params)
17572
17573 reply = await self.rpc(msg)
17574 return reply
17575
17576
17577
17578 @ReturnMapping(ZoneResults)
17579 async def AllZones(self):
17580 '''
17581
17582 Returns -> typing.Sequence[~ZoneResult]
17583 '''
17584 # map input types to rpc msg
17585 params = dict()
17586 msg = dict(Type='Subnets', Request='AllZones', Version=2, Params=params)
17587
17588 reply = await self.rpc(msg)
17589 return reply
17590
17591
17592
17593 @ReturnMapping(ListSubnetsResults)
17594 async def ListSubnets(self, spacetag, zone):
17595 '''
17596 spacetag : str
17597 zone : str
17598 Returns -> typing.Sequence[~Subnet]
17599 '''
17600 # map input types to rpc msg
17601 params = dict()
17602 msg = dict(Type='Subnets', Request='ListSubnets', Version=2, Params=params)
17603 params['SpaceTag'] = spacetag
17604 params['Zone'] = zone
17605 reply = await self.rpc(msg)
17606 return reply
17607
17608
17609 class Undertaker(Type):
17610 name = 'Undertaker'
17611 version = 1
17612 schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
17613 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
17614 'type': 'object'}},
17615 'type': 'object'},
17616 'Info': {'type': 'string'},
17617 'Status': {'type': 'string'},
17618 'Tag': {'type': 'string'}},
17619 'required': ['Tag',
17620 'Status',
17621 'Info',
17622 'Data'],
17623 'type': 'object'},
17624 'Error': {'additionalProperties': False,
17625 'properties': {'Code': {'type': 'string'},
17626 'Info': {'$ref': '#/definitions/ErrorInfo'},
17627 'Message': {'type': 'string'}},
17628 'required': ['Message', 'Code'],
17629 'type': 'object'},
17630 'ErrorInfo': {'additionalProperties': False,
17631 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17632 'MacaroonPath': {'type': 'string'}},
17633 'type': 'object'},
17634 'ErrorResult': {'additionalProperties': False,
17635 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17636 'required': ['Error'],
17637 'type': 'object'},
17638 'ErrorResults': {'additionalProperties': False,
17639 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17640 'type': 'array'}},
17641 'required': ['Results'],
17642 'type': 'object'},
17643 'Macaroon': {'additionalProperties': False,
17644 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17645 'type': 'array'},
17646 'data': {'items': {'type': 'integer'},
17647 'type': 'array'},
17648 'id': {'$ref': '#/definitions/packet'},
17649 'location': {'$ref': '#/definitions/packet'},
17650 'sig': {'items': {'type': 'integer'},
17651 'type': 'array'}},
17652 'required': ['data',
17653 'location',
17654 'id',
17655 'caveats',
17656 'sig'],
17657 'type': 'object'},
17658 'ModelConfigResult': {'additionalProperties': False,
17659 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
17660 'type': 'object'}},
17661 'type': 'object'}},
17662 'required': ['Config'],
17663 'type': 'object'},
17664 'NotifyWatchResult': {'additionalProperties': False,
17665 'properties': {'Error': {'$ref': '#/definitions/Error'},
17666 'NotifyWatcherId': {'type': 'string'}},
17667 'required': ['NotifyWatcherId', 'Error'],
17668 'type': 'object'},
17669 'NotifyWatchResults': {'additionalProperties': False,
17670 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17671 'type': 'array'}},
17672 'required': ['Results'],
17673 'type': 'object'},
17674 'SetStatus': {'additionalProperties': False,
17675 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17676 'type': 'array'}},
17677 'required': ['Entities'],
17678 'type': 'object'},
17679 'UndertakerModelInfo': {'additionalProperties': False,
17680 'properties': {'GlobalName': {'type': 'string'},
17681 'IsSystem': {'type': 'boolean'},
17682 'Life': {'type': 'string'},
17683 'Name': {'type': 'string'},
17684 'UUID': {'type': 'string'}},
17685 'required': ['UUID',
17686 'Name',
17687 'GlobalName',
17688 'IsSystem',
17689 'Life'],
17690 'type': 'object'},
17691 'UndertakerModelInfoResult': {'additionalProperties': False,
17692 'properties': {'Error': {'$ref': '#/definitions/Error'},
17693 'Result': {'$ref': '#/definitions/UndertakerModelInfo'}},
17694 'required': ['Error', 'Result'],
17695 'type': 'object'},
17696 'caveat': {'additionalProperties': False,
17697 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17698 'location': {'$ref': '#/definitions/packet'},
17699 'verificationId': {'$ref': '#/definitions/packet'}},
17700 'required': ['location',
17701 'caveatId',
17702 'verificationId'],
17703 'type': 'object'},
17704 'packet': {'additionalProperties': False,
17705 'properties': {'headerLen': {'type': 'integer'},
17706 'start': {'type': 'integer'},
17707 'totalLen': {'type': 'integer'}},
17708 'required': ['start', 'totalLen', 'headerLen'],
17709 'type': 'object'}},
17710 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
17711 'type': 'object'},
17712 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
17713 'type': 'object'},
17714 'ProcessDyingModel': {'type': 'object'},
17715 'RemoveModel': {'type': 'object'},
17716 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17717 'Result': {'$ref': '#/definitions/ErrorResults'}},
17718 'type': 'object'},
17719 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17720 'Result': {'$ref': '#/definitions/ErrorResults'}},
17721 'type': 'object'},
17722 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17723 'type': 'object'}},
17724 'type': 'object'}
17725
17726
17727 @ReturnMapping(ModelConfigResult)
17728 async def ModelConfig(self):
17729 '''
17730
17731 Returns -> typing.Mapping[str, typing.Any]
17732 '''
17733 # map input types to rpc msg
17734 params = dict()
17735 msg = dict(Type='Undertaker', Request='ModelConfig', Version=1, Params=params)
17736
17737 reply = await self.rpc(msg)
17738 return reply
17739
17740
17741
17742 @ReturnMapping(UndertakerModelInfoResult)
17743 async def ModelInfo(self):
17744 '''
17745
17746 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
17747 '''
17748 # map input types to rpc msg
17749 params = dict()
17750 msg = dict(Type='Undertaker', Request='ModelInfo', Version=1, Params=params)
17751
17752 reply = await self.rpc(msg)
17753 return reply
17754
17755
17756
17757 @ReturnMapping(None)
17758 async def ProcessDyingModel(self):
17759 '''
17760
17761 Returns -> None
17762 '''
17763 # map input types to rpc msg
17764 params = dict()
17765 msg = dict(Type='Undertaker', Request='ProcessDyingModel', Version=1, Params=params)
17766
17767 reply = await self.rpc(msg)
17768 return reply
17769
17770
17771
17772 @ReturnMapping(None)
17773 async def RemoveModel(self):
17774 '''
17775
17776 Returns -> None
17777 '''
17778 # map input types to rpc msg
17779 params = dict()
17780 msg = dict(Type='Undertaker', Request='RemoveModel', Version=1, Params=params)
17781
17782 reply = await self.rpc(msg)
17783 return reply
17784
17785
17786
17787 @ReturnMapping(ErrorResults)
17788 async def SetStatus(self, entities):
17789 '''
17790 entities : typing.Sequence[~EntityStatusArgs]
17791 Returns -> typing.Sequence[~ErrorResult]
17792 '''
17793 # map input types to rpc msg
17794 params = dict()
17795 msg = dict(Type='Undertaker', Request='SetStatus', Version=1, Params=params)
17796 params['Entities'] = entities
17797 reply = await self.rpc(msg)
17798 return reply
17799
17800
17801
17802 @ReturnMapping(ErrorResults)
17803 async def UpdateStatus(self, entities):
17804 '''
17805 entities : typing.Sequence[~EntityStatusArgs]
17806 Returns -> typing.Sequence[~ErrorResult]
17807 '''
17808 # map input types to rpc msg
17809 params = dict()
17810 msg = dict(Type='Undertaker', Request='UpdateStatus', Version=1, Params=params)
17811 params['Entities'] = entities
17812 reply = await self.rpc(msg)
17813 return reply
17814
17815
17816
17817 @ReturnMapping(NotifyWatchResults)
17818 async def WatchModelResources(self):
17819 '''
17820
17821 Returns -> typing.Sequence[~NotifyWatchResult]
17822 '''
17823 # map input types to rpc msg
17824 params = dict()
17825 msg = dict(Type='Undertaker', Request='WatchModelResources', Version=1, Params=params)
17826
17827 reply = await self.rpc(msg)
17828 return reply
17829
17830
17831 class UnitAssigner(Type):
17832 name = 'UnitAssigner'
17833 version = 1
17834 schema = {'definitions': {'Entities': {'additionalProperties': False,
17835 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
17836 'type': 'array'}},
17837 'required': ['Entities'],
17838 'type': 'object'},
17839 'Entity': {'additionalProperties': False,
17840 'properties': {'Tag': {'type': 'string'}},
17841 'required': ['Tag'],
17842 'type': 'object'},
17843 'EntityStatusArgs': {'additionalProperties': False,
17844 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
17845 'type': 'object'}},
17846 'type': 'object'},
17847 'Info': {'type': 'string'},
17848 'Status': {'type': 'string'},
17849 'Tag': {'type': 'string'}},
17850 'required': ['Tag',
17851 'Status',
17852 'Info',
17853 'Data'],
17854 'type': 'object'},
17855 'Error': {'additionalProperties': False,
17856 'properties': {'Code': {'type': 'string'},
17857 'Info': {'$ref': '#/definitions/ErrorInfo'},
17858 'Message': {'type': 'string'}},
17859 'required': ['Message', 'Code'],
17860 'type': 'object'},
17861 'ErrorInfo': {'additionalProperties': False,
17862 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17863 'MacaroonPath': {'type': 'string'}},
17864 'type': 'object'},
17865 'ErrorResult': {'additionalProperties': False,
17866 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17867 'required': ['Error'],
17868 'type': 'object'},
17869 'ErrorResults': {'additionalProperties': False,
17870 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17871 'type': 'array'}},
17872 'required': ['Results'],
17873 'type': 'object'},
17874 'Macaroon': {'additionalProperties': False,
17875 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17876 'type': 'array'},
17877 'data': {'items': {'type': 'integer'},
17878 'type': 'array'},
17879 'id': {'$ref': '#/definitions/packet'},
17880 'location': {'$ref': '#/definitions/packet'},
17881 'sig': {'items': {'type': 'integer'},
17882 'type': 'array'}},
17883 'required': ['data',
17884 'location',
17885 'id',
17886 'caveats',
17887 'sig'],
17888 'type': 'object'},
17889 'SetStatus': {'additionalProperties': False,
17890 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17891 'type': 'array'}},
17892 'required': ['Entities'],
17893 'type': 'object'},
17894 'StringsWatchResult': {'additionalProperties': False,
17895 'properties': {'Changes': {'items': {'type': 'string'},
17896 'type': 'array'},
17897 'Error': {'$ref': '#/definitions/Error'},
17898 'StringsWatcherId': {'type': 'string'}},
17899 'required': ['StringsWatcherId',
17900 'Changes',
17901 'Error'],
17902 'type': 'object'},
17903 'caveat': {'additionalProperties': False,
17904 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17905 'location': {'$ref': '#/definitions/packet'},
17906 'verificationId': {'$ref': '#/definitions/packet'}},
17907 'required': ['location',
17908 'caveatId',
17909 'verificationId'],
17910 'type': 'object'},
17911 'packet': {'additionalProperties': False,
17912 'properties': {'headerLen': {'type': 'integer'},
17913 'start': {'type': 'integer'},
17914 'totalLen': {'type': 'integer'}},
17915 'required': ['start', 'totalLen', 'headerLen'],
17916 'type': 'object'}},
17917 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17918 'Result': {'$ref': '#/definitions/ErrorResults'}},
17919 'type': 'object'},
17920 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17921 'Result': {'$ref': '#/definitions/ErrorResults'}},
17922 'type': 'object'},
17923 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
17924 'type': 'object'}},
17925 'type': 'object'}
17926
17927
17928 @ReturnMapping(ErrorResults)
17929 async def AssignUnits(self, entities):
17930 '''
17931 entities : typing.Sequence[~Entity]
17932 Returns -> typing.Sequence[~ErrorResult]
17933 '''
17934 # map input types to rpc msg
17935 params = dict()
17936 msg = dict(Type='UnitAssigner', Request='AssignUnits', Version=1, Params=params)
17937 params['Entities'] = entities
17938 reply = await self.rpc(msg)
17939 return reply
17940
17941
17942
17943 @ReturnMapping(ErrorResults)
17944 async def SetAgentStatus(self, entities):
17945 '''
17946 entities : typing.Sequence[~EntityStatusArgs]
17947 Returns -> typing.Sequence[~ErrorResult]
17948 '''
17949 # map input types to rpc msg
17950 params = dict()
17951 msg = dict(Type='UnitAssigner', Request='SetAgentStatus', Version=1, Params=params)
17952 params['Entities'] = entities
17953 reply = await self.rpc(msg)
17954 return reply
17955
17956
17957
17958 @ReturnMapping(StringsWatchResult)
17959 async def WatchUnitAssignments(self):
17960 '''
17961
17962 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
17963 '''
17964 # map input types to rpc msg
17965 params = dict()
17966 msg = dict(Type='UnitAssigner', Request='WatchUnitAssignments', Version=1, Params=params)
17967
17968 reply = await self.rpc(msg)
17969 return reply
17970
17971
17972 class Uniter(Type):
17973 name = 'Uniter'
17974 version = 4
17975 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
17976 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
17977 'type': 'array'},
17978 'type': 'array'}},
17979 'required': ['Servers'],
17980 'type': 'object'},
17981 'Action': {'additionalProperties': False,
17982 'properties': {'name': {'type': 'string'},
17983 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
17984 'type': 'object'}},
17985 'type': 'object'},
17986 'receiver': {'type': 'string'},
17987 'tag': {'type': 'string'}},
17988 'required': ['tag', 'receiver', 'name'],
17989 'type': 'object'},
17990 'ActionExecutionResult': {'additionalProperties': False,
17991 'properties': {'actiontag': {'type': 'string'},
17992 'message': {'type': 'string'},
17993 'results': {'patternProperties': {'.*': {'additionalProperties': True,
17994 'type': 'object'}},
17995 'type': 'object'},
17996 'status': {'type': 'string'}},
17997 'required': ['actiontag', 'status'],
17998 'type': 'object'},
17999 'ActionExecutionResults': {'additionalProperties': False,
18000 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
18001 'type': 'array'}},
18002 'type': 'object'},
18003 'ActionResult': {'additionalProperties': False,
18004 'properties': {'action': {'$ref': '#/definitions/Action'},
18005 'completed': {'format': 'date-time',
18006 'type': 'string'},
18007 'enqueued': {'format': 'date-time',
18008 'type': 'string'},
18009 'error': {'$ref': '#/definitions/Error'},
18010 'message': {'type': 'string'},
18011 'output': {'patternProperties': {'.*': {'additionalProperties': True,
18012 'type': 'object'}},
18013 'type': 'object'},
18014 'started': {'format': 'date-time',
18015 'type': 'string'},
18016 'status': {'type': 'string'}},
18017 'type': 'object'},
18018 'ActionResults': {'additionalProperties': False,
18019 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
18020 'type': 'array'}},
18021 'type': 'object'},
18022 'Address': {'additionalProperties': False,
18023 'properties': {'Scope': {'type': 'string'},
18024 'SpaceName': {'type': 'string'},
18025 'Type': {'type': 'string'},
18026 'Value': {'type': 'string'}},
18027 'required': ['Value', 'Type', 'Scope'],
18028 'type': 'object'},
18029 'ApplicationStatusResult': {'additionalProperties': False,
18030 'properties': {'Application': {'$ref': '#/definitions/StatusResult'},
18031 'Error': {'$ref': '#/definitions/Error'},
18032 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
18033 'type': 'object'}},
18034 'required': ['Application',
18035 'Units',
18036 'Error'],
18037 'type': 'object'},
18038 'ApplicationStatusResults': {'additionalProperties': False,
18039 'properties': {'Results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
18040 'type': 'array'}},
18041 'required': ['Results'],
18042 'type': 'object'},
18043 'BoolResult': {'additionalProperties': False,
18044 'properties': {'Error': {'$ref': '#/definitions/Error'},
18045 'Result': {'type': 'boolean'}},
18046 'required': ['Error', 'Result'],
18047 'type': 'object'},
18048 'BoolResults': {'additionalProperties': False,
18049 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
18050 'type': 'array'}},
18051 'required': ['Results'],
18052 'type': 'object'},
18053 'BytesResult': {'additionalProperties': False,
18054 'properties': {'Result': {'items': {'type': 'integer'},
18055 'type': 'array'}},
18056 'required': ['Result'],
18057 'type': 'object'},
18058 'CharmURL': {'additionalProperties': False,
18059 'properties': {'URL': {'type': 'string'}},
18060 'required': ['URL'],
18061 'type': 'object'},
18062 'CharmURLs': {'additionalProperties': False,
18063 'properties': {'URLs': {'items': {'$ref': '#/definitions/CharmURL'},
18064 'type': 'array'}},
18065 'required': ['URLs'],
18066 'type': 'object'},
18067 'ConfigSettingsResult': {'additionalProperties': False,
18068 'properties': {'Error': {'$ref': '#/definitions/Error'},
18069 'Settings': {'patternProperties': {'.*': {'additionalProperties': True,
18070 'type': 'object'}},
18071 'type': 'object'}},
18072 'required': ['Error', 'Settings'],
18073 'type': 'object'},
18074 'ConfigSettingsResults': {'additionalProperties': False,
18075 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
18076 'type': 'array'}},
18077 'required': ['Results'],
18078 'type': 'object'},
18079 'Endpoint': {'additionalProperties': False,
18080 'properties': {'ApplicationName': {'type': 'string'},
18081 'Relation': {'$ref': '#/definitions/Relation'}},
18082 'required': ['ApplicationName', 'Relation'],
18083 'type': 'object'},
18084 'Entities': {'additionalProperties': False,
18085 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
18086 'type': 'array'}},
18087 'required': ['Entities'],
18088 'type': 'object'},
18089 'EntitiesCharmURL': {'additionalProperties': False,
18090 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
18091 'type': 'array'}},
18092 'required': ['Entities'],
18093 'type': 'object'},
18094 'EntitiesPortRanges': {'additionalProperties': False,
18095 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
18096 'type': 'array'}},
18097 'required': ['Entities'],
18098 'type': 'object'},
18099 'Entity': {'additionalProperties': False,
18100 'properties': {'Tag': {'type': 'string'}},
18101 'required': ['Tag'],
18102 'type': 'object'},
18103 'EntityCharmURL': {'additionalProperties': False,
18104 'properties': {'CharmURL': {'type': 'string'},
18105 'Tag': {'type': 'string'}},
18106 'required': ['Tag', 'CharmURL'],
18107 'type': 'object'},
18108 'EntityPortRange': {'additionalProperties': False,
18109 'properties': {'FromPort': {'type': 'integer'},
18110 'Protocol': {'type': 'string'},
18111 'Tag': {'type': 'string'},
18112 'ToPort': {'type': 'integer'}},
18113 'required': ['Tag',
18114 'Protocol',
18115 'FromPort',
18116 'ToPort'],
18117 'type': 'object'},
18118 'EntityStatusArgs': {'additionalProperties': False,
18119 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
18120 'type': 'object'}},
18121 'type': 'object'},
18122 'Info': {'type': 'string'},
18123 'Status': {'type': 'string'},
18124 'Tag': {'type': 'string'}},
18125 'required': ['Tag',
18126 'Status',
18127 'Info',
18128 'Data'],
18129 'type': 'object'},
18130 'Error': {'additionalProperties': False,
18131 'properties': {'Code': {'type': 'string'},
18132 'Info': {'$ref': '#/definitions/ErrorInfo'},
18133 'Message': {'type': 'string'}},
18134 'required': ['Message', 'Code'],
18135 'type': 'object'},
18136 'ErrorInfo': {'additionalProperties': False,
18137 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
18138 'MacaroonPath': {'type': 'string'}},
18139 'type': 'object'},
18140 'ErrorResult': {'additionalProperties': False,
18141 'properties': {'Error': {'$ref': '#/definitions/Error'}},
18142 'required': ['Error'],
18143 'type': 'object'},
18144 'ErrorResults': {'additionalProperties': False,
18145 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
18146 'type': 'array'}},
18147 'required': ['Results'],
18148 'type': 'object'},
18149 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
18150 'properties': {'Results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
18151 'type': 'array'}},
18152 'required': ['Results'],
18153 'type': 'object'},
18154 'GetLeadershipSettingsResult': {'additionalProperties': False,
18155 'properties': {'Error': {'$ref': '#/definitions/Error'},
18156 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18157 'type': 'object'}},
18158 'required': ['Settings',
18159 'Error'],
18160 'type': 'object'},
18161 'HostPort': {'additionalProperties': False,
18162 'properties': {'Address': {'$ref': '#/definitions/Address'},
18163 'Port': {'type': 'integer'}},
18164 'required': ['Address', 'Port'],
18165 'type': 'object'},
18166 'IntResult': {'additionalProperties': False,
18167 'properties': {'Error': {'$ref': '#/definitions/Error'},
18168 'Result': {'type': 'integer'}},
18169 'required': ['Error', 'Result'],
18170 'type': 'object'},
18171 'IntResults': {'additionalProperties': False,
18172 'properties': {'Results': {'items': {'$ref': '#/definitions/IntResult'},
18173 'type': 'array'}},
18174 'required': ['Results'],
18175 'type': 'object'},
18176 'LifeResult': {'additionalProperties': False,
18177 'properties': {'Error': {'$ref': '#/definitions/Error'},
18178 'Life': {'type': 'string'}},
18179 'required': ['Life', 'Error'],
18180 'type': 'object'},
18181 'LifeResults': {'additionalProperties': False,
18182 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
18183 'type': 'array'}},
18184 'required': ['Results'],
18185 'type': 'object'},
18186 'Macaroon': {'additionalProperties': False,
18187 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
18188 'type': 'array'},
18189 'data': {'items': {'type': 'integer'},
18190 'type': 'array'},
18191 'id': {'$ref': '#/definitions/packet'},
18192 'location': {'$ref': '#/definitions/packet'},
18193 'sig': {'items': {'type': 'integer'},
18194 'type': 'array'}},
18195 'required': ['data',
18196 'location',
18197 'id',
18198 'caveats',
18199 'sig'],
18200 'type': 'object'},
18201 'MachinePortRange': {'additionalProperties': False,
18202 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
18203 'RelationTag': {'type': 'string'},
18204 'UnitTag': {'type': 'string'}},
18205 'required': ['UnitTag',
18206 'RelationTag',
18207 'PortRange'],
18208 'type': 'object'},
18209 'MachinePortsResult': {'additionalProperties': False,
18210 'properties': {'Error': {'$ref': '#/definitions/Error'},
18211 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
18212 'type': 'array'}},
18213 'required': ['Error', 'Ports'],
18214 'type': 'object'},
18215 'MachinePortsResults': {'additionalProperties': False,
18216 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
18217 'type': 'array'}},
18218 'required': ['Results'],
18219 'type': 'object'},
18220 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
18221 'properties': {'Params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
18222 'type': 'array'}},
18223 'required': ['Params'],
18224 'type': 'object'},
18225 'MergeLeadershipSettingsParam': {'additionalProperties': False,
18226 'properties': {'ApplicationTag': {'type': 'string'},
18227 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18228 'type': 'object'}},
18229 'required': ['ApplicationTag',
18230 'Settings'],
18231 'type': 'object'},
18232 'MeterStatusResult': {'additionalProperties': False,
18233 'properties': {'Code': {'type': 'string'},
18234 'Error': {'$ref': '#/definitions/Error'},
18235 'Info': {'type': 'string'}},
18236 'required': ['Code', 'Info', 'Error'],
18237 'type': 'object'},
18238 'MeterStatusResults': {'additionalProperties': False,
18239 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
18240 'type': 'array'}},
18241 'required': ['Results'],
18242 'type': 'object'},
18243 'Metric': {'additionalProperties': False,
18244 'properties': {'Key': {'type': 'string'},
18245 'Time': {'format': 'date-time',
18246 'type': 'string'},
18247 'Value': {'type': 'string'}},
18248 'required': ['Key', 'Value', 'Time'],
18249 'type': 'object'},
18250 'MetricBatch': {'additionalProperties': False,
18251 'properties': {'CharmURL': {'type': 'string'},
18252 'Created': {'format': 'date-time',
18253 'type': 'string'},
18254 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
18255 'type': 'array'},
18256 'UUID': {'type': 'string'}},
18257 'required': ['UUID',
18258 'CharmURL',
18259 'Created',
18260 'Metrics'],
18261 'type': 'object'},
18262 'MetricBatchParam': {'additionalProperties': False,
18263 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
18264 'Tag': {'type': 'string'}},
18265 'required': ['Tag', 'Batch'],
18266 'type': 'object'},
18267 'MetricBatchParams': {'additionalProperties': False,
18268 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
18269 'type': 'array'}},
18270 'required': ['Batches'],
18271 'type': 'object'},
18272 'ModelConfigResult': {'additionalProperties': False,
18273 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
18274 'type': 'object'}},
18275 'type': 'object'}},
18276 'required': ['Config'],
18277 'type': 'object'},
18278 'ModelResult': {'additionalProperties': False,
18279 'properties': {'Error': {'$ref': '#/definitions/Error'},
18280 'Name': {'type': 'string'},
18281 'UUID': {'type': 'string'}},
18282 'required': ['Error', 'Name', 'UUID'],
18283 'type': 'object'},
18284 'NetworkConfig': {'additionalProperties': False,
18285 'properties': {'Address': {'type': 'string'},
18286 'CIDR': {'type': 'string'},
18287 'ConfigType': {'type': 'string'},
18288 'DNSSearchDomains': {'items': {'type': 'string'},
18289 'type': 'array'},
18290 'DNSServers': {'items': {'type': 'string'},
18291 'type': 'array'},
18292 'DeviceIndex': {'type': 'integer'},
18293 'Disabled': {'type': 'boolean'},
18294 'GatewayAddress': {'type': 'string'},
18295 'InterfaceName': {'type': 'string'},
18296 'InterfaceType': {'type': 'string'},
18297 'MACAddress': {'type': 'string'},
18298 'MTU': {'type': 'integer'},
18299 'NoAutoStart': {'type': 'boolean'},
18300 'ParentInterfaceName': {'type': 'string'},
18301 'ProviderAddressId': {'type': 'string'},
18302 'ProviderId': {'type': 'string'},
18303 'ProviderSpaceId': {'type': 'string'},
18304 'ProviderSubnetId': {'type': 'string'},
18305 'ProviderVLANId': {'type': 'string'},
18306 'VLANTag': {'type': 'integer'}},
18307 'required': ['DeviceIndex',
18308 'MACAddress',
18309 'CIDR',
18310 'MTU',
18311 'ProviderId',
18312 'ProviderSubnetId',
18313 'ProviderSpaceId',
18314 'ProviderAddressId',
18315 'ProviderVLANId',
18316 'VLANTag',
18317 'InterfaceName',
18318 'ParentInterfaceName',
18319 'InterfaceType',
18320 'Disabled'],
18321 'type': 'object'},
18322 'NotifyWatchResult': {'additionalProperties': False,
18323 'properties': {'Error': {'$ref': '#/definitions/Error'},
18324 'NotifyWatcherId': {'type': 'string'}},
18325 'required': ['NotifyWatcherId', 'Error'],
18326 'type': 'object'},
18327 'NotifyWatchResults': {'additionalProperties': False,
18328 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
18329 'type': 'array'}},
18330 'required': ['Results'],
18331 'type': 'object'},
18332 'PortRange': {'additionalProperties': False,
18333 'properties': {'FromPort': {'type': 'integer'},
18334 'Protocol': {'type': 'string'},
18335 'ToPort': {'type': 'integer'}},
18336 'required': ['FromPort', 'ToPort', 'Protocol'],
18337 'type': 'object'},
18338 'Relation': {'additionalProperties': False,
18339 'properties': {'Interface': {'type': 'string'},
18340 'Limit': {'type': 'integer'},
18341 'Name': {'type': 'string'},
18342 'Optional': {'type': 'boolean'},
18343 'Role': {'type': 'string'},
18344 'Scope': {'type': 'string'}},
18345 'required': ['Name',
18346 'Role',
18347 'Interface',
18348 'Optional',
18349 'Limit',
18350 'Scope'],
18351 'type': 'object'},
18352 'RelationIds': {'additionalProperties': False,
18353 'properties': {'RelationIds': {'items': {'type': 'integer'},
18354 'type': 'array'}},
18355 'required': ['RelationIds'],
18356 'type': 'object'},
18357 'RelationResult': {'additionalProperties': False,
18358 'properties': {'Endpoint': {'$ref': '#/definitions/Endpoint'},
18359 'Error': {'$ref': '#/definitions/Error'},
18360 'Id': {'type': 'integer'},
18361 'Key': {'type': 'string'},
18362 'Life': {'type': 'string'}},
18363 'required': ['Error',
18364 'Life',
18365 'Id',
18366 'Key',
18367 'Endpoint'],
18368 'type': 'object'},
18369 'RelationResults': {'additionalProperties': False,
18370 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationResult'},
18371 'type': 'array'}},
18372 'required': ['Results'],
18373 'type': 'object'},
18374 'RelationUnit': {'additionalProperties': False,
18375 'properties': {'Relation': {'type': 'string'},
18376 'Unit': {'type': 'string'}},
18377 'required': ['Relation', 'Unit'],
18378 'type': 'object'},
18379 'RelationUnitPair': {'additionalProperties': False,
18380 'properties': {'LocalUnit': {'type': 'string'},
18381 'Relation': {'type': 'string'},
18382 'RemoteUnit': {'type': 'string'}},
18383 'required': ['Relation',
18384 'LocalUnit',
18385 'RemoteUnit'],
18386 'type': 'object'},
18387 'RelationUnitPairs': {'additionalProperties': False,
18388 'properties': {'RelationUnitPairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
18389 'type': 'array'}},
18390 'required': ['RelationUnitPairs'],
18391 'type': 'object'},
18392 'RelationUnitSettings': {'additionalProperties': False,
18393 'properties': {'Relation': {'type': 'string'},
18394 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18395 'type': 'object'},
18396 'Unit': {'type': 'string'}},
18397 'required': ['Relation',
18398 'Unit',
18399 'Settings'],
18400 'type': 'object'},
18401 'RelationUnits': {'additionalProperties': False,
18402 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnit'},
18403 'type': 'array'}},
18404 'required': ['RelationUnits'],
18405 'type': 'object'},
18406 'RelationUnitsChange': {'additionalProperties': False,
18407 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
18408 'type': 'object'},
18409 'Departed': {'items': {'type': 'string'},
18410 'type': 'array'}},
18411 'required': ['Changed', 'Departed'],
18412 'type': 'object'},
18413 'RelationUnitsSettings': {'additionalProperties': False,
18414 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
18415 'type': 'array'}},
18416 'required': ['RelationUnits'],
18417 'type': 'object'},
18418 'RelationUnitsWatchResult': {'additionalProperties': False,
18419 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
18420 'Error': {'$ref': '#/definitions/Error'},
18421 'RelationUnitsWatcherId': {'type': 'string'}},
18422 'required': ['RelationUnitsWatcherId',
18423 'Changes',
18424 'Error'],
18425 'type': 'object'},
18426 'RelationUnitsWatchResults': {'additionalProperties': False,
18427 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
18428 'type': 'array'}},
18429 'required': ['Results'],
18430 'type': 'object'},
18431 'ResolvedModeResult': {'additionalProperties': False,
18432 'properties': {'Error': {'$ref': '#/definitions/Error'},
18433 'Mode': {'type': 'string'}},
18434 'required': ['Error', 'Mode'],
18435 'type': 'object'},
18436 'ResolvedModeResults': {'additionalProperties': False,
18437 'properties': {'Results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
18438 'type': 'array'}},
18439 'required': ['Results'],
18440 'type': 'object'},
18441 'SetStatus': {'additionalProperties': False,
18442 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18443 'type': 'array'}},
18444 'required': ['Entities'],
18445 'type': 'object'},
18446 'SettingsResult': {'additionalProperties': False,
18447 'properties': {'Error': {'$ref': '#/definitions/Error'},
18448 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18449 'type': 'object'}},
18450 'required': ['Error', 'Settings'],
18451 'type': 'object'},
18452 'SettingsResults': {'additionalProperties': False,
18453 'properties': {'Results': {'items': {'$ref': '#/definitions/SettingsResult'},
18454 'type': 'array'}},
18455 'required': ['Results'],
18456 'type': 'object'},
18457 'StatusResult': {'additionalProperties': False,
18458 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
18459 'type': 'object'}},
18460 'type': 'object'},
18461 'Error': {'$ref': '#/definitions/Error'},
18462 'Id': {'type': 'string'},
18463 'Info': {'type': 'string'},
18464 'Life': {'type': 'string'},
18465 'Since': {'format': 'date-time',
18466 'type': 'string'},
18467 'Status': {'type': 'string'}},
18468 'required': ['Error',
18469 'Id',
18470 'Life',
18471 'Status',
18472 'Info',
18473 'Data',
18474 'Since'],
18475 'type': 'object'},
18476 'StatusResults': {'additionalProperties': False,
18477 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
18478 'type': 'array'}},
18479 'required': ['Results'],
18480 'type': 'object'},
18481 'StorageAddParams': {'additionalProperties': False,
18482 'properties': {'StorageName': {'type': 'string'},
18483 'storage': {'$ref': '#/definitions/StorageConstraints'},
18484 'unit': {'type': 'string'}},
18485 'required': ['unit',
18486 'StorageName',
18487 'storage'],
18488 'type': 'object'},
18489 'StorageAttachment': {'additionalProperties': False,
18490 'properties': {'Kind': {'type': 'integer'},
18491 'Life': {'type': 'string'},
18492 'Location': {'type': 'string'},
18493 'OwnerTag': {'type': 'string'},
18494 'StorageTag': {'type': 'string'},
18495 'UnitTag': {'type': 'string'}},
18496 'required': ['StorageTag',
18497 'OwnerTag',
18498 'UnitTag',
18499 'Kind',
18500 'Location',
18501 'Life'],
18502 'type': 'object'},
18503 'StorageAttachmentId': {'additionalProperties': False,
18504 'properties': {'storagetag': {'type': 'string'},
18505 'unittag': {'type': 'string'}},
18506 'required': ['storagetag', 'unittag'],
18507 'type': 'object'},
18508 'StorageAttachmentIds': {'additionalProperties': False,
18509 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
18510 'type': 'array'}},
18511 'required': ['ids'],
18512 'type': 'object'},
18513 'StorageAttachmentIdsResult': {'additionalProperties': False,
18514 'properties': {'error': {'$ref': '#/definitions/Error'},
18515 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
18516 'required': ['result'],
18517 'type': 'object'},
18518 'StorageAttachmentIdsResults': {'additionalProperties': False,
18519 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
18520 'type': 'array'}},
18521 'type': 'object'},
18522 'StorageAttachmentResult': {'additionalProperties': False,
18523 'properties': {'error': {'$ref': '#/definitions/Error'},
18524 'result': {'$ref': '#/definitions/StorageAttachment'}},
18525 'required': ['result'],
18526 'type': 'object'},
18527 'StorageAttachmentResults': {'additionalProperties': False,
18528 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
18529 'type': 'array'}},
18530 'type': 'object'},
18531 'StorageConstraints': {'additionalProperties': False,
18532 'properties': {'Count': {'type': 'integer'},
18533 'Pool': {'type': 'string'},
18534 'Size': {'type': 'integer'}},
18535 'required': ['Pool', 'Size', 'Count'],
18536 'type': 'object'},
18537 'StoragesAddParams': {'additionalProperties': False,
18538 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
18539 'type': 'array'}},
18540 'required': ['storages'],
18541 'type': 'object'},
18542 'StringBoolResult': {'additionalProperties': False,
18543 'properties': {'Error': {'$ref': '#/definitions/Error'},
18544 'Ok': {'type': 'boolean'},
18545 'Result': {'type': 'string'}},
18546 'required': ['Error', 'Result', 'Ok'],
18547 'type': 'object'},
18548 'StringBoolResults': {'additionalProperties': False,
18549 'properties': {'Results': {'items': {'$ref': '#/definitions/StringBoolResult'},
18550 'type': 'array'}},
18551 'required': ['Results'],
18552 'type': 'object'},
18553 'StringResult': {'additionalProperties': False,
18554 'properties': {'Error': {'$ref': '#/definitions/Error'},
18555 'Result': {'type': 'string'}},
18556 'required': ['Error', 'Result'],
18557 'type': 'object'},
18558 'StringResults': {'additionalProperties': False,
18559 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
18560 'type': 'array'}},
18561 'required': ['Results'],
18562 'type': 'object'},
18563 'StringsResult': {'additionalProperties': False,
18564 'properties': {'Error': {'$ref': '#/definitions/Error'},
18565 'Result': {'items': {'type': 'string'},
18566 'type': 'array'}},
18567 'required': ['Error', 'Result'],
18568 'type': 'object'},
18569 'StringsResults': {'additionalProperties': False,
18570 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
18571 'type': 'array'}},
18572 'required': ['Results'],
18573 'type': 'object'},
18574 'StringsWatchResult': {'additionalProperties': False,
18575 'properties': {'Changes': {'items': {'type': 'string'},
18576 'type': 'array'},
18577 'Error': {'$ref': '#/definitions/Error'},
18578 'StringsWatcherId': {'type': 'string'}},
18579 'required': ['StringsWatcherId',
18580 'Changes',
18581 'Error'],
18582 'type': 'object'},
18583 'StringsWatchResults': {'additionalProperties': False,
18584 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
18585 'type': 'array'}},
18586 'required': ['Results'],
18587 'type': 'object'},
18588 'UnitNetworkConfig': {'additionalProperties': False,
18589 'properties': {'BindingName': {'type': 'string'},
18590 'UnitTag': {'type': 'string'}},
18591 'required': ['UnitTag', 'BindingName'],
18592 'type': 'object'},
18593 'UnitNetworkConfigResult': {'additionalProperties': False,
18594 'properties': {'Error': {'$ref': '#/definitions/Error'},
18595 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
18596 'type': 'array'}},
18597 'required': ['Error', 'Info'],
18598 'type': 'object'},
18599 'UnitNetworkConfigResults': {'additionalProperties': False,
18600 'properties': {'Results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
18601 'type': 'array'}},
18602 'required': ['Results'],
18603 'type': 'object'},
18604 'UnitSettings': {'additionalProperties': False,
18605 'properties': {'Version': {'type': 'integer'}},
18606 'required': ['Version'],
18607 'type': 'object'},
18608 'UnitsNetworkConfig': {'additionalProperties': False,
18609 'properties': {'Args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
18610 'type': 'array'}},
18611 'required': ['Args'],
18612 'type': 'object'},
18613 'caveat': {'additionalProperties': False,
18614 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
18615 'location': {'$ref': '#/definitions/packet'},
18616 'verificationId': {'$ref': '#/definitions/packet'}},
18617 'required': ['location',
18618 'caveatId',
18619 'verificationId'],
18620 'type': 'object'},
18621 'packet': {'additionalProperties': False,
18622 'properties': {'headerLen': {'type': 'integer'},
18623 'start': {'type': 'integer'},
18624 'totalLen': {'type': 'integer'}},
18625 'required': ['start', 'totalLen', 'headerLen'],
18626 'type': 'object'}},
18627 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
18628 'type': 'object'},
18629 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
18630 'type': 'object'},
18631 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18632 'Result': {'$ref': '#/definitions/ActionResults'}},
18633 'type': 'object'},
18634 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
18635 'Result': {'$ref': '#/definitions/ErrorResults'}},
18636 'type': 'object'},
18637 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
18638 'Result': {'$ref': '#/definitions/ErrorResults'}},
18639 'type': 'object'},
18640 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18641 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
18642 'type': 'object'},
18643 'ApplicationOwner': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18644 'Result': {'$ref': '#/definitions/StringResults'}},
18645 'type': 'object'},
18646 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18647 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
18648 'type': 'object'},
18649 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18650 'Result': {'$ref': '#/definitions/StringResults'}},
18651 'type': 'object'},
18652 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18653 'Result': {'$ref': '#/definitions/StringResults'}},
18654 'type': 'object'},
18655 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18656 'Result': {'$ref': '#/definitions/ErrorResults'}},
18657 'type': 'object'},
18658 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
18659 'type': 'object'},
18660 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
18661 'Result': {'$ref': '#/definitions/StringResults'}},
18662 'type': 'object'},
18663 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18664 'Result': {'$ref': '#/definitions/IntResults'}},
18665 'type': 'object'},
18666 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18667 'Result': {'$ref': '#/definitions/StringBoolResults'}},
18668 'type': 'object'},
18669 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18670 'Result': {'$ref': '#/definitions/ErrorResults'}},
18671 'type': 'object'},
18672 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
18673 'Result': {'$ref': '#/definitions/ErrorResults'}},
18674 'type': 'object'},
18675 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18676 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
18677 'type': 'object'},
18678 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
18679 'type': 'object'},
18680 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18681 'Result': {'$ref': '#/definitions/ErrorResults'}},
18682 'type': 'object'},
18683 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18684 'Result': {'$ref': '#/definitions/ErrorResults'}},
18685 'type': 'object'},
18686 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18687 'Result': {'$ref': '#/definitions/ErrorResults'}},
18688 'type': 'object'},
18689 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18690 'Result': {'$ref': '#/definitions/ErrorResults'}},
18691 'type': 'object'},
18692 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18693 'Result': {'$ref': '#/definitions/ErrorResults'}},
18694 'type': 'object'},
18695 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
18696 'Result': {'$ref': '#/definitions/ErrorResults'}},
18697 'type': 'object'},
18698 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18699 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
18700 'type': 'object'},
18701 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18702 'Result': {'$ref': '#/definitions/StringBoolResults'}},
18703 'type': 'object'},
18704 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18705 'Result': {'$ref': '#/definitions/BoolResults'}},
18706 'type': 'object'},
18707 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18708 'Result': {'$ref': '#/definitions/StringsResults'}},
18709 'type': 'object'},
18710 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18711 'Result': {'$ref': '#/definitions/ErrorResults'}},
18712 'type': 'object'},
18713 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18714 'Result': {'$ref': '#/definitions/LifeResults'}},
18715 'type': 'object'},
18716 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
18717 'Result': {'$ref': '#/definitions/ErrorResults'}},
18718 'type': 'object'},
18719 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
18720 'type': 'object'},
18721 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
18722 'type': 'object'},
18723 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
18724 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
18725 'type': 'object'},
18726 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
18727 'Result': {'$ref': '#/definitions/ErrorResults'}},
18728 'type': 'object'},
18729 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18730 'Result': {'$ref': '#/definitions/StringResults'}},
18731 'type': 'object'},
18732 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
18733 'type': 'object'},
18734 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18735 'Result': {'$ref': '#/definitions/StringResults'}},
18736 'type': 'object'},
18737 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18738 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
18739 'type': 'object'},
18740 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
18741 'Result': {'$ref': '#/definitions/SettingsResults'}},
18742 'type': 'object'},
18743 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18744 'Result': {'$ref': '#/definitions/SettingsResults'}},
18745 'type': 'object'},
18746 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18747 'Result': {'$ref': '#/definitions/RelationResults'}},
18748 'type': 'object'},
18749 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
18750 'Result': {'$ref': '#/definitions/RelationResults'}},
18751 'type': 'object'},
18752 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18753 'Result': {'$ref': '#/definitions/ErrorResults'}},
18754 'type': 'object'},
18755 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18756 'Result': {'$ref': '#/definitions/ErrorResults'}},
18757 'type': 'object'},
18758 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18759 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
18760 'type': 'object'},
18761 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18762 'Result': {'$ref': '#/definitions/ErrorResults'}},
18763 'type': 'object'},
18764 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18765 'Result': {'$ref': '#/definitions/ErrorResults'}},
18766 'type': 'object'},
18767 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
18768 'Result': {'$ref': '#/definitions/ErrorResults'}},
18769 'type': 'object'},
18770 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18771 'Result': {'$ref': '#/definitions/ErrorResults'}},
18772 'type': 'object'},
18773 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18774 'Result': {'$ref': '#/definitions/ErrorResults'}},
18775 'type': 'object'},
18776 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18777 'Result': {'$ref': '#/definitions/LifeResults'}},
18778 'type': 'object'},
18779 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18780 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
18781 'type': 'object'},
18782 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18783 'Result': {'$ref': '#/definitions/StatusResults'}},
18784 'type': 'object'},
18785 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18786 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
18787 'type': 'object'},
18788 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
18789 'Result': {'$ref': '#/definitions/ErrorResults'}},
18790 'type': 'object'},
18791 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18792 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18793 'type': 'object'},
18794 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
18795 'type': 'object'},
18796 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18797 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18798 'type': 'object'},
18799 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18800 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18801 'type': 'object'},
18802 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18803 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18804 'type': 'object'},
18805 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
18806 'type': 'object'},
18807 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18808 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18809 'type': 'object'},
18810 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18811 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18812 'type': 'object'},
18813 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18814 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
18815 'type': 'object'},
18816 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18817 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18818 'type': 'object'},
18819 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18820 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18821 'type': 'object'},
18822 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18823 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18824 'type': 'object'}},
18825 'type': 'object'}
18826
18827
18828 @ReturnMapping(StringsResult)
18829 async def APIAddresses(self):
18830 '''
18831
18832 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
18833 '''
18834 # map input types to rpc msg
18835 params = dict()
18836 msg = dict(Type='Uniter', Request='APIAddresses', Version=4, Params=params)
18837
18838 reply = await self.rpc(msg)
18839 return reply
18840
18841
18842
18843 @ReturnMapping(APIHostPortsResult)
18844 async def APIHostPorts(self):
18845 '''
18846
18847 Returns -> typing.Sequence[~HostPort]
18848 '''
18849 # map input types to rpc msg
18850 params = dict()
18851 msg = dict(Type='Uniter', Request='APIHostPorts', Version=4, Params=params)
18852
18853 reply = await self.rpc(msg)
18854 return reply
18855
18856
18857
18858 @ReturnMapping(ActionResults)
18859 async def Actions(self, entities):
18860 '''
18861 entities : typing.Sequence[~Entity]
18862 Returns -> typing.Sequence[~ActionResult]
18863 '''
18864 # map input types to rpc msg
18865 params = dict()
18866 msg = dict(Type='Uniter', Request='Actions', Version=4, Params=params)
18867 params['Entities'] = entities
18868 reply = await self.rpc(msg)
18869 return reply
18870
18871
18872
18873 @ReturnMapping(ErrorResults)
18874 async def AddMetricBatches(self, batches):
18875 '''
18876 batches : typing.Sequence[~MetricBatchParam]
18877 Returns -> typing.Sequence[~ErrorResult]
18878 '''
18879 # map input types to rpc msg
18880 params = dict()
18881 msg = dict(Type='Uniter', Request='AddMetricBatches', Version=4, Params=params)
18882 params['Batches'] = batches
18883 reply = await self.rpc(msg)
18884 return reply
18885
18886
18887
18888 @ReturnMapping(ErrorResults)
18889 async def AddUnitStorage(self, storages):
18890 '''
18891 storages : typing.Sequence[~StorageAddParams]
18892 Returns -> typing.Sequence[~ErrorResult]
18893 '''
18894 # map input types to rpc msg
18895 params = dict()
18896 msg = dict(Type='Uniter', Request='AddUnitStorage', Version=4, Params=params)
18897 params['storages'] = storages
18898 reply = await self.rpc(msg)
18899 return reply
18900
18901
18902
18903 @ReturnMapping(MachinePortsResults)
18904 async def AllMachinePorts(self, entities):
18905 '''
18906 entities : typing.Sequence[~Entity]
18907 Returns -> typing.Sequence[~MachinePortsResult]
18908 '''
18909 # map input types to rpc msg
18910 params = dict()
18911 msg = dict(Type='Uniter', Request='AllMachinePorts', Version=4, Params=params)
18912 params['Entities'] = entities
18913 reply = await self.rpc(msg)
18914 return reply
18915
18916
18917
18918 @ReturnMapping(StringResults)
18919 async def ApplicationOwner(self, entities):
18920 '''
18921 entities : typing.Sequence[~Entity]
18922 Returns -> typing.Sequence[~StringResult]
18923 '''
18924 # map input types to rpc msg
18925 params = dict()
18926 msg = dict(Type='Uniter', Request='ApplicationOwner', Version=4, Params=params)
18927 params['Entities'] = entities
18928 reply = await self.rpc(msg)
18929 return reply
18930
18931
18932
18933 @ReturnMapping(ApplicationStatusResults)
18934 async def ApplicationStatus(self, entities):
18935 '''
18936 entities : typing.Sequence[~Entity]
18937 Returns -> typing.Sequence[~ApplicationStatusResult]
18938 '''
18939 # map input types to rpc msg
18940 params = dict()
18941 msg = dict(Type='Uniter', Request='ApplicationStatus', Version=4, Params=params)
18942 params['Entities'] = entities
18943 reply = await self.rpc(msg)
18944 return reply
18945
18946
18947
18948 @ReturnMapping(StringResults)
18949 async def AssignedMachine(self, entities):
18950 '''
18951 entities : typing.Sequence[~Entity]
18952 Returns -> typing.Sequence[~StringResult]
18953 '''
18954 # map input types to rpc msg
18955 params = dict()
18956 msg = dict(Type='Uniter', Request='AssignedMachine', Version=4, Params=params)
18957 params['Entities'] = entities
18958 reply = await self.rpc(msg)
18959 return reply
18960
18961
18962
18963 @ReturnMapping(StringResults)
18964 async def AvailabilityZone(self, entities):
18965 '''
18966 entities : typing.Sequence[~Entity]
18967 Returns -> typing.Sequence[~StringResult]
18968 '''
18969 # map input types to rpc msg
18970 params = dict()
18971 msg = dict(Type='Uniter', Request='AvailabilityZone', Version=4, Params=params)
18972 params['Entities'] = entities
18973 reply = await self.rpc(msg)
18974 return reply
18975
18976
18977
18978 @ReturnMapping(ErrorResults)
18979 async def BeginActions(self, entities):
18980 '''
18981 entities : typing.Sequence[~Entity]
18982 Returns -> typing.Sequence[~ErrorResult]
18983 '''
18984 # map input types to rpc msg
18985 params = dict()
18986 msg = dict(Type='Uniter', Request='BeginActions', Version=4, Params=params)
18987 params['Entities'] = entities
18988 reply = await self.rpc(msg)
18989 return reply
18990
18991
18992
18993 @ReturnMapping(BytesResult)
18994 async def CACert(self):
18995 '''
18996
18997 Returns -> typing.Sequence[int]
18998 '''
18999 # map input types to rpc msg
19000 params = dict()
19001 msg = dict(Type='Uniter', Request='CACert', Version=4, Params=params)
19002
19003 reply = await self.rpc(msg)
19004 return reply
19005
19006
19007
19008 @ReturnMapping(StringResults)
19009 async def CharmArchiveSha256(self, urls):
19010 '''
19011 urls : typing.Sequence[~CharmURL]
19012 Returns -> typing.Sequence[~StringResult]
19013 '''
19014 # map input types to rpc msg
19015 params = dict()
19016 msg = dict(Type='Uniter', Request='CharmArchiveSha256', Version=4, Params=params)
19017 params['URLs'] = urls
19018 reply = await self.rpc(msg)
19019 return reply
19020
19021
19022
19023 @ReturnMapping(IntResults)
19024 async def CharmModifiedVersion(self, entities):
19025 '''
19026 entities : typing.Sequence[~Entity]
19027 Returns -> typing.Sequence[~IntResult]
19028 '''
19029 # map input types to rpc msg
19030 params = dict()
19031 msg = dict(Type='Uniter', Request='CharmModifiedVersion', Version=4, Params=params)
19032 params['Entities'] = entities
19033 reply = await self.rpc(msg)
19034 return reply
19035
19036
19037
19038 @ReturnMapping(StringBoolResults)
19039 async def CharmURL(self, entities):
19040 '''
19041 entities : typing.Sequence[~Entity]
19042 Returns -> typing.Sequence[~StringBoolResult]
19043 '''
19044 # map input types to rpc msg
19045 params = dict()
19046 msg = dict(Type='Uniter', Request='CharmURL', Version=4, Params=params)
19047 params['Entities'] = entities
19048 reply = await self.rpc(msg)
19049 return reply
19050
19051
19052
19053 @ReturnMapping(ErrorResults)
19054 async def ClearResolved(self, entities):
19055 '''
19056 entities : typing.Sequence[~Entity]
19057 Returns -> typing.Sequence[~ErrorResult]
19058 '''
19059 # map input types to rpc msg
19060 params = dict()
19061 msg = dict(Type='Uniter', Request='ClearResolved', Version=4, Params=params)
19062 params['Entities'] = entities
19063 reply = await self.rpc(msg)
19064 return reply
19065
19066
19067
19068 @ReturnMapping(ErrorResults)
19069 async def ClosePorts(self, entities):
19070 '''
19071 entities : typing.Sequence[~EntityPortRange]
19072 Returns -> typing.Sequence[~ErrorResult]
19073 '''
19074 # map input types to rpc msg
19075 params = dict()
19076 msg = dict(Type='Uniter', Request='ClosePorts', Version=4, Params=params)
19077 params['Entities'] = entities
19078 reply = await self.rpc(msg)
19079 return reply
19080
19081
19082
19083 @ReturnMapping(ConfigSettingsResults)
19084 async def ConfigSettings(self, entities):
19085 '''
19086 entities : typing.Sequence[~Entity]
19087 Returns -> typing.Sequence[~ConfigSettingsResult]
19088 '''
19089 # map input types to rpc msg
19090 params = dict()
19091 msg = dict(Type='Uniter', Request='ConfigSettings', Version=4, Params=params)
19092 params['Entities'] = entities
19093 reply = await self.rpc(msg)
19094 return reply
19095
19096
19097
19098 @ReturnMapping(ModelResult)
19099 async def CurrentModel(self):
19100 '''
19101
19102 Returns -> typing.Union[_ForwardRef('Error'), str]
19103 '''
19104 # map input types to rpc msg
19105 params = dict()
19106 msg = dict(Type='Uniter', Request='CurrentModel', Version=4, Params=params)
19107
19108 reply = await self.rpc(msg)
19109 return reply
19110
19111
19112
19113 @ReturnMapping(ErrorResults)
19114 async def Destroy(self, entities):
19115 '''
19116 entities : typing.Sequence[~Entity]
19117 Returns -> typing.Sequence[~ErrorResult]
19118 '''
19119 # map input types to rpc msg
19120 params = dict()
19121 msg = dict(Type='Uniter', Request='Destroy', Version=4, Params=params)
19122 params['Entities'] = entities
19123 reply = await self.rpc(msg)
19124 return reply
19125
19126
19127
19128 @ReturnMapping(ErrorResults)
19129 async def DestroyAllSubordinates(self, entities):
19130 '''
19131 entities : typing.Sequence[~Entity]
19132 Returns -> typing.Sequence[~ErrorResult]
19133 '''
19134 # map input types to rpc msg
19135 params = dict()
19136 msg = dict(Type='Uniter', Request='DestroyAllSubordinates', Version=4, Params=params)
19137 params['Entities'] = entities
19138 reply = await self.rpc(msg)
19139 return reply
19140
19141
19142
19143 @ReturnMapping(ErrorResults)
19144 async def DestroyUnitStorageAttachments(self, entities):
19145 '''
19146 entities : typing.Sequence[~Entity]
19147 Returns -> typing.Sequence[~ErrorResult]
19148 '''
19149 # map input types to rpc msg
19150 params = dict()
19151 msg = dict(Type='Uniter', Request='DestroyUnitStorageAttachments', Version=4, Params=params)
19152 params['Entities'] = entities
19153 reply = await self.rpc(msg)
19154 return reply
19155
19156
19157
19158 @ReturnMapping(ErrorResults)
19159 async def EnsureDead(self, entities):
19160 '''
19161 entities : typing.Sequence[~Entity]
19162 Returns -> typing.Sequence[~ErrorResult]
19163 '''
19164 # map input types to rpc msg
19165 params = dict()
19166 msg = dict(Type='Uniter', Request='EnsureDead', Version=4, Params=params)
19167 params['Entities'] = entities
19168 reply = await self.rpc(msg)
19169 return reply
19170
19171
19172
19173 @ReturnMapping(ErrorResults)
19174 async def EnterScope(self, relationunits):
19175 '''
19176 relationunits : typing.Sequence[~RelationUnit]
19177 Returns -> typing.Sequence[~ErrorResult]
19178 '''
19179 # map input types to rpc msg
19180 params = dict()
19181 msg = dict(Type='Uniter', Request='EnterScope', Version=4, Params=params)
19182 params['RelationUnits'] = relationunits
19183 reply = await self.rpc(msg)
19184 return reply
19185
19186
19187
19188 @ReturnMapping(ErrorResults)
19189 async def FinishActions(self, results):
19190 '''
19191 results : typing.Sequence[~ActionExecutionResult]
19192 Returns -> typing.Sequence[~ErrorResult]
19193 '''
19194 # map input types to rpc msg
19195 params = dict()
19196 msg = dict(Type='Uniter', Request='FinishActions', Version=4, Params=params)
19197 params['results'] = results
19198 reply = await self.rpc(msg)
19199 return reply
19200
19201
19202
19203 @ReturnMapping(MeterStatusResults)
19204 async def GetMeterStatus(self, entities):
19205 '''
19206 entities : typing.Sequence[~Entity]
19207 Returns -> typing.Sequence[~MeterStatusResult]
19208 '''
19209 # map input types to rpc msg
19210 params = dict()
19211 msg = dict(Type='Uniter', Request='GetMeterStatus', Version=4, Params=params)
19212 params['Entities'] = entities
19213 reply = await self.rpc(msg)
19214 return reply
19215
19216
19217
19218 @ReturnMapping(StringBoolResults)
19219 async def GetPrincipal(self, entities):
19220 '''
19221 entities : typing.Sequence[~Entity]
19222 Returns -> typing.Sequence[~StringBoolResult]
19223 '''
19224 # map input types to rpc msg
19225 params = dict()
19226 msg = dict(Type='Uniter', Request='GetPrincipal', Version=4, Params=params)
19227 params['Entities'] = entities
19228 reply = await self.rpc(msg)
19229 return reply
19230
19231
19232
19233 @ReturnMapping(BoolResults)
19234 async def HasSubordinates(self, entities):
19235 '''
19236 entities : typing.Sequence[~Entity]
19237 Returns -> typing.Sequence[~BoolResult]
19238 '''
19239 # map input types to rpc msg
19240 params = dict()
19241 msg = dict(Type='Uniter', Request='HasSubordinates', Version=4, Params=params)
19242 params['Entities'] = entities
19243 reply = await self.rpc(msg)
19244 return reply
19245
19246
19247
19248 @ReturnMapping(StringsResults)
19249 async def JoinedRelations(self, entities):
19250 '''
19251 entities : typing.Sequence[~Entity]
19252 Returns -> typing.Sequence[~StringsResult]
19253 '''
19254 # map input types to rpc msg
19255 params = dict()
19256 msg = dict(Type='Uniter', Request='JoinedRelations', Version=4, Params=params)
19257 params['Entities'] = entities
19258 reply = await self.rpc(msg)
19259 return reply
19260
19261
19262
19263 @ReturnMapping(ErrorResults)
19264 async def LeaveScope(self, relationunits):
19265 '''
19266 relationunits : typing.Sequence[~RelationUnit]
19267 Returns -> typing.Sequence[~ErrorResult]
19268 '''
19269 # map input types to rpc msg
19270 params = dict()
19271 msg = dict(Type='Uniter', Request='LeaveScope', Version=4, Params=params)
19272 params['RelationUnits'] = relationunits
19273 reply = await self.rpc(msg)
19274 return reply
19275
19276
19277
19278 @ReturnMapping(LifeResults)
19279 async def Life(self, entities):
19280 '''
19281 entities : typing.Sequence[~Entity]
19282 Returns -> typing.Sequence[~LifeResult]
19283 '''
19284 # map input types to rpc msg
19285 params = dict()
19286 msg = dict(Type='Uniter', Request='Life', Version=4, Params=params)
19287 params['Entities'] = entities
19288 reply = await self.rpc(msg)
19289 return reply
19290
19291
19292
19293 @ReturnMapping(ErrorResults)
19294 async def Merge(self, params):
19295 '''
19296 params : typing.Sequence[~MergeLeadershipSettingsParam]
19297 Returns -> typing.Sequence[~ErrorResult]
19298 '''
19299 # map input types to rpc msg
19300 params = dict()
19301 msg = dict(Type='Uniter', Request='Merge', Version=4, Params=params)
19302 params['Params'] = params
19303 reply = await self.rpc(msg)
19304 return reply
19305
19306
19307
19308 @ReturnMapping(ModelConfigResult)
19309 async def ModelConfig(self):
19310 '''
19311
19312 Returns -> typing.Mapping[str, typing.Any]
19313 '''
19314 # map input types to rpc msg
19315 params = dict()
19316 msg = dict(Type='Uniter', Request='ModelConfig', Version=4, Params=params)
19317
19318 reply = await self.rpc(msg)
19319 return reply
19320
19321
19322
19323 @ReturnMapping(StringResult)
19324 async def ModelUUID(self):
19325 '''
19326
19327 Returns -> typing.Union[_ForwardRef('Error'), str]
19328 '''
19329 # map input types to rpc msg
19330 params = dict()
19331 msg = dict(Type='Uniter', Request='ModelUUID', Version=4, Params=params)
19332
19333 reply = await self.rpc(msg)
19334 return reply
19335
19336
19337
19338 @ReturnMapping(UnitNetworkConfigResults)
19339 async def NetworkConfig(self, args):
19340 '''
19341 args : typing.Sequence[~UnitNetworkConfig]
19342 Returns -> typing.Sequence[~UnitNetworkConfigResult]
19343 '''
19344 # map input types to rpc msg
19345 params = dict()
19346 msg = dict(Type='Uniter', Request='NetworkConfig', Version=4, Params=params)
19347 params['Args'] = args
19348 reply = await self.rpc(msg)
19349 return reply
19350
19351
19352
19353 @ReturnMapping(ErrorResults)
19354 async def OpenPorts(self, entities):
19355 '''
19356 entities : typing.Sequence[~EntityPortRange]
19357 Returns -> typing.Sequence[~ErrorResult]
19358 '''
19359 # map input types to rpc msg
19360 params = dict()
19361 msg = dict(Type='Uniter', Request='OpenPorts', Version=4, Params=params)
19362 params['Entities'] = entities
19363 reply = await self.rpc(msg)
19364 return reply
19365
19366
19367
19368 @ReturnMapping(StringResults)
19369 async def PrivateAddress(self, entities):
19370 '''
19371 entities : typing.Sequence[~Entity]
19372 Returns -> typing.Sequence[~StringResult]
19373 '''
19374 # map input types to rpc msg
19375 params = dict()
19376 msg = dict(Type='Uniter', Request='PrivateAddress', Version=4, Params=params)
19377 params['Entities'] = entities
19378 reply = await self.rpc(msg)
19379 return reply
19380
19381
19382
19383 @ReturnMapping(StringResult)
19384 async def ProviderType(self):
19385 '''
19386
19387 Returns -> typing.Union[_ForwardRef('Error'), str]
19388 '''
19389 # map input types to rpc msg
19390 params = dict()
19391 msg = dict(Type='Uniter', Request='ProviderType', Version=4, Params=params)
19392
19393 reply = await self.rpc(msg)
19394 return reply
19395
19396
19397
19398 @ReturnMapping(StringResults)
19399 async def PublicAddress(self, entities):
19400 '''
19401 entities : typing.Sequence[~Entity]
19402 Returns -> typing.Sequence[~StringResult]
19403 '''
19404 # map input types to rpc msg
19405 params = dict()
19406 msg = dict(Type='Uniter', Request='PublicAddress', Version=4, Params=params)
19407 params['Entities'] = entities
19408 reply = await self.rpc(msg)
19409 return reply
19410
19411
19412
19413 @ReturnMapping(GetLeadershipSettingsBulkResults)
19414 async def Read(self, entities):
19415 '''
19416 entities : typing.Sequence[~Entity]
19417 Returns -> typing.Sequence[~GetLeadershipSettingsResult]
19418 '''
19419 # map input types to rpc msg
19420 params = dict()
19421 msg = dict(Type='Uniter', Request='Read', Version=4, Params=params)
19422 params['Entities'] = entities
19423 reply = await self.rpc(msg)
19424 return reply
19425
19426
19427
19428 @ReturnMapping(SettingsResults)
19429 async def ReadRemoteSettings(self, relationunitpairs):
19430 '''
19431 relationunitpairs : typing.Sequence[~RelationUnitPair]
19432 Returns -> typing.Sequence[~SettingsResult]
19433 '''
19434 # map input types to rpc msg
19435 params = dict()
19436 msg = dict(Type='Uniter', Request='ReadRemoteSettings', Version=4, Params=params)
19437 params['RelationUnitPairs'] = relationunitpairs
19438 reply = await self.rpc(msg)
19439 return reply
19440
19441
19442
19443 @ReturnMapping(SettingsResults)
19444 async def ReadSettings(self, relationunits):
19445 '''
19446 relationunits : typing.Sequence[~RelationUnit]
19447 Returns -> typing.Sequence[~SettingsResult]
19448 '''
19449 # map input types to rpc msg
19450 params = dict()
19451 msg = dict(Type='Uniter', Request='ReadSettings', Version=4, Params=params)
19452 params['RelationUnits'] = relationunits
19453 reply = await self.rpc(msg)
19454 return reply
19455
19456
19457
19458 @ReturnMapping(RelationResults)
19459 async def Relation(self, relationunits):
19460 '''
19461 relationunits : typing.Sequence[~RelationUnit]
19462 Returns -> typing.Sequence[~RelationResult]
19463 '''
19464 # map input types to rpc msg
19465 params = dict()
19466 msg = dict(Type='Uniter', Request='Relation', Version=4, Params=params)
19467 params['RelationUnits'] = relationunits
19468 reply = await self.rpc(msg)
19469 return reply
19470
19471
19472
19473 @ReturnMapping(RelationResults)
19474 async def RelationById(self, relationids):
19475 '''
19476 relationids : typing.Sequence[int]
19477 Returns -> typing.Sequence[~RelationResult]
19478 '''
19479 # map input types to rpc msg
19480 params = dict()
19481 msg = dict(Type='Uniter', Request='RelationById', Version=4, Params=params)
19482 params['RelationIds'] = relationids
19483 reply = await self.rpc(msg)
19484 return reply
19485
19486
19487
19488 @ReturnMapping(ErrorResults)
19489 async def RemoveStorageAttachments(self, ids):
19490 '''
19491 ids : typing.Sequence[~StorageAttachmentId]
19492 Returns -> typing.Sequence[~ErrorResult]
19493 '''
19494 # map input types to rpc msg
19495 params = dict()
19496 msg = dict(Type='Uniter', Request='RemoveStorageAttachments', Version=4, Params=params)
19497 params['ids'] = ids
19498 reply = await self.rpc(msg)
19499 return reply
19500
19501
19502
19503 @ReturnMapping(ErrorResults)
19504 async def RequestReboot(self, entities):
19505 '''
19506 entities : typing.Sequence[~Entity]
19507 Returns -> typing.Sequence[~ErrorResult]
19508 '''
19509 # map input types to rpc msg
19510 params = dict()
19511 msg = dict(Type='Uniter', Request='RequestReboot', Version=4, Params=params)
19512 params['Entities'] = entities
19513 reply = await self.rpc(msg)
19514 return reply
19515
19516
19517
19518 @ReturnMapping(ResolvedModeResults)
19519 async def Resolved(self, entities):
19520 '''
19521 entities : typing.Sequence[~Entity]
19522 Returns -> typing.Sequence[~ResolvedModeResult]
19523 '''
19524 # map input types to rpc msg
19525 params = dict()
19526 msg = dict(Type='Uniter', Request='Resolved', Version=4, Params=params)
19527 params['Entities'] = entities
19528 reply = await self.rpc(msg)
19529 return reply
19530
19531
19532
19533 @ReturnMapping(ErrorResults)
19534 async def SetAgentStatus(self, entities):
19535 '''
19536 entities : typing.Sequence[~EntityStatusArgs]
19537 Returns -> typing.Sequence[~ErrorResult]
19538 '''
19539 # map input types to rpc msg
19540 params = dict()
19541 msg = dict(Type='Uniter', Request='SetAgentStatus', Version=4, Params=params)
19542 params['Entities'] = entities
19543 reply = await self.rpc(msg)
19544 return reply
19545
19546
19547
19548 @ReturnMapping(ErrorResults)
19549 async def SetApplicationStatus(self, entities):
19550 '''
19551 entities : typing.Sequence[~EntityStatusArgs]
19552 Returns -> typing.Sequence[~ErrorResult]
19553 '''
19554 # map input types to rpc msg
19555 params = dict()
19556 msg = dict(Type='Uniter', Request='SetApplicationStatus', Version=4, Params=params)
19557 params['Entities'] = entities
19558 reply = await self.rpc(msg)
19559 return reply
19560
19561
19562
19563 @ReturnMapping(ErrorResults)
19564 async def SetCharmURL(self, entities):
19565 '''
19566 entities : typing.Sequence[~EntityCharmURL]
19567 Returns -> typing.Sequence[~ErrorResult]
19568 '''
19569 # map input types to rpc msg
19570 params = dict()
19571 msg = dict(Type='Uniter', Request='SetCharmURL', Version=4, Params=params)
19572 params['Entities'] = entities
19573 reply = await self.rpc(msg)
19574 return reply
19575
19576
19577
19578 @ReturnMapping(ErrorResults)
19579 async def SetStatus(self, entities):
19580 '''
19581 entities : typing.Sequence[~EntityStatusArgs]
19582 Returns -> typing.Sequence[~ErrorResult]
19583 '''
19584 # map input types to rpc msg
19585 params = dict()
19586 msg = dict(Type='Uniter', Request='SetStatus', Version=4, Params=params)
19587 params['Entities'] = entities
19588 reply = await self.rpc(msg)
19589 return reply
19590
19591
19592
19593 @ReturnMapping(ErrorResults)
19594 async def SetUnitStatus(self, entities):
19595 '''
19596 entities : typing.Sequence[~EntityStatusArgs]
19597 Returns -> typing.Sequence[~ErrorResult]
19598 '''
19599 # map input types to rpc msg
19600 params = dict()
19601 msg = dict(Type='Uniter', Request='SetUnitStatus', Version=4, Params=params)
19602 params['Entities'] = entities
19603 reply = await self.rpc(msg)
19604 return reply
19605
19606
19607
19608 @ReturnMapping(LifeResults)
19609 async def StorageAttachmentLife(self, ids):
19610 '''
19611 ids : typing.Sequence[~StorageAttachmentId]
19612 Returns -> typing.Sequence[~LifeResult]
19613 '''
19614 # map input types to rpc msg
19615 params = dict()
19616 msg = dict(Type='Uniter', Request='StorageAttachmentLife', Version=4, Params=params)
19617 params['ids'] = ids
19618 reply = await self.rpc(msg)
19619 return reply
19620
19621
19622
19623 @ReturnMapping(StorageAttachmentResults)
19624 async def StorageAttachments(self, ids):
19625 '''
19626 ids : typing.Sequence[~StorageAttachmentId]
19627 Returns -> typing.Sequence[~StorageAttachmentResult]
19628 '''
19629 # map input types to rpc msg
19630 params = dict()
19631 msg = dict(Type='Uniter', Request='StorageAttachments', Version=4, Params=params)
19632 params['ids'] = ids
19633 reply = await self.rpc(msg)
19634 return reply
19635
19636
19637
19638 @ReturnMapping(StatusResults)
19639 async def UnitStatus(self, entities):
19640 '''
19641 entities : typing.Sequence[~Entity]
19642 Returns -> typing.Sequence[~StatusResult]
19643 '''
19644 # map input types to rpc msg
19645 params = dict()
19646 msg = dict(Type='Uniter', Request='UnitStatus', Version=4, Params=params)
19647 params['Entities'] = entities
19648 reply = await self.rpc(msg)
19649 return reply
19650
19651
19652
19653 @ReturnMapping(StorageAttachmentIdsResults)
19654 async def UnitStorageAttachments(self, entities):
19655 '''
19656 entities : typing.Sequence[~Entity]
19657 Returns -> typing.Sequence[~StorageAttachmentIdsResult]
19658 '''
19659 # map input types to rpc msg
19660 params = dict()
19661 msg = dict(Type='Uniter', Request='UnitStorageAttachments', Version=4, Params=params)
19662 params['Entities'] = entities
19663 reply = await self.rpc(msg)
19664 return reply
19665
19666
19667
19668 @ReturnMapping(ErrorResults)
19669 async def UpdateSettings(self, relationunits):
19670 '''
19671 relationunits : typing.Sequence[~RelationUnitSettings]
19672 Returns -> typing.Sequence[~ErrorResult]
19673 '''
19674 # map input types to rpc msg
19675 params = dict()
19676 msg = dict(Type='Uniter', Request='UpdateSettings', Version=4, Params=params)
19677 params['RelationUnits'] = relationunits
19678 reply = await self.rpc(msg)
19679 return reply
19680
19681
19682
19683 @ReturnMapping(NotifyWatchResults)
19684 async def Watch(self, entities):
19685 '''
19686 entities : typing.Sequence[~Entity]
19687 Returns -> typing.Sequence[~NotifyWatchResult]
19688 '''
19689 # map input types to rpc msg
19690 params = dict()
19691 msg = dict(Type='Uniter', Request='Watch', Version=4, Params=params)
19692 params['Entities'] = entities
19693 reply = await self.rpc(msg)
19694 return reply
19695
19696
19697
19698 @ReturnMapping(NotifyWatchResult)
19699 async def WatchAPIHostPorts(self):
19700 '''
19701
19702 Returns -> typing.Union[_ForwardRef('Error'), str]
19703 '''
19704 # map input types to rpc msg
19705 params = dict()
19706 msg = dict(Type='Uniter', Request='WatchAPIHostPorts', Version=4, Params=params)
19707
19708 reply = await self.rpc(msg)
19709 return reply
19710
19711
19712
19713 @ReturnMapping(StringsWatchResults)
19714 async def WatchActionNotifications(self, entities):
19715 '''
19716 entities : typing.Sequence[~Entity]
19717 Returns -> typing.Sequence[~StringsWatchResult]
19718 '''
19719 # map input types to rpc msg
19720 params = dict()
19721 msg = dict(Type='Uniter', Request='WatchActionNotifications', Version=4, Params=params)
19722 params['Entities'] = entities
19723 reply = await self.rpc(msg)
19724 return reply
19725
19726
19727
19728 @ReturnMapping(StringsWatchResults)
19729 async def WatchApplicationRelations(self, entities):
19730 '''
19731 entities : typing.Sequence[~Entity]
19732 Returns -> typing.Sequence[~StringsWatchResult]
19733 '''
19734 # map input types to rpc msg
19735 params = dict()
19736 msg = dict(Type='Uniter', Request='WatchApplicationRelations', Version=4, Params=params)
19737 params['Entities'] = entities
19738 reply = await self.rpc(msg)
19739 return reply
19740
19741
19742
19743 @ReturnMapping(NotifyWatchResults)
19744 async def WatchConfigSettings(self, entities):
19745 '''
19746 entities : typing.Sequence[~Entity]
19747 Returns -> typing.Sequence[~NotifyWatchResult]
19748 '''
19749 # map input types to rpc msg
19750 params = dict()
19751 msg = dict(Type='Uniter', Request='WatchConfigSettings', Version=4, Params=params)
19752 params['Entities'] = entities
19753 reply = await self.rpc(msg)
19754 return reply
19755
19756
19757
19758 @ReturnMapping(NotifyWatchResult)
19759 async def WatchForModelConfigChanges(self):
19760 '''
19761
19762 Returns -> typing.Union[_ForwardRef('Error'), str]
19763 '''
19764 # map input types to rpc msg
19765 params = dict()
19766 msg = dict(Type='Uniter', Request='WatchForModelConfigChanges', Version=4, Params=params)
19767
19768 reply = await self.rpc(msg)
19769 return reply
19770
19771
19772
19773 @ReturnMapping(NotifyWatchResults)
19774 async def WatchLeadershipSettings(self, entities):
19775 '''
19776 entities : typing.Sequence[~Entity]
19777 Returns -> typing.Sequence[~NotifyWatchResult]
19778 '''
19779 # map input types to rpc msg
19780 params = dict()
19781 msg = dict(Type='Uniter', Request='WatchLeadershipSettings', Version=4, Params=params)
19782 params['Entities'] = entities
19783 reply = await self.rpc(msg)
19784 return reply
19785
19786
19787
19788 @ReturnMapping(NotifyWatchResults)
19789 async def WatchMeterStatus(self, entities):
19790 '''
19791 entities : typing.Sequence[~Entity]
19792 Returns -> typing.Sequence[~NotifyWatchResult]
19793 '''
19794 # map input types to rpc msg
19795 params = dict()
19796 msg = dict(Type='Uniter', Request='WatchMeterStatus', Version=4, Params=params)
19797 params['Entities'] = entities
19798 reply = await self.rpc(msg)
19799 return reply
19800
19801
19802
19803 @ReturnMapping(RelationUnitsWatchResults)
19804 async def WatchRelationUnits(self, relationunits):
19805 '''
19806 relationunits : typing.Sequence[~RelationUnit]
19807 Returns -> typing.Sequence[~RelationUnitsWatchResult]
19808 '''
19809 # map input types to rpc msg
19810 params = dict()
19811 msg = dict(Type='Uniter', Request='WatchRelationUnits', Version=4, Params=params)
19812 params['RelationUnits'] = relationunits
19813 reply = await self.rpc(msg)
19814 return reply
19815
19816
19817
19818 @ReturnMapping(NotifyWatchResults)
19819 async def WatchStorageAttachments(self, ids):
19820 '''
19821 ids : typing.Sequence[~StorageAttachmentId]
19822 Returns -> typing.Sequence[~NotifyWatchResult]
19823 '''
19824 # map input types to rpc msg
19825 params = dict()
19826 msg = dict(Type='Uniter', Request='WatchStorageAttachments', Version=4, Params=params)
19827 params['ids'] = ids
19828 reply = await self.rpc(msg)
19829 return reply
19830
19831
19832
19833 @ReturnMapping(NotifyWatchResults)
19834 async def WatchUnitAddresses(self, entities):
19835 '''
19836 entities : typing.Sequence[~Entity]
19837 Returns -> typing.Sequence[~NotifyWatchResult]
19838 '''
19839 # map input types to rpc msg
19840 params = dict()
19841 msg = dict(Type='Uniter', Request='WatchUnitAddresses', Version=4, Params=params)
19842 params['Entities'] = entities
19843 reply = await self.rpc(msg)
19844 return reply
19845
19846
19847
19848 @ReturnMapping(StringsWatchResults)
19849 async def WatchUnitStorageAttachments(self, entities):
19850 '''
19851 entities : typing.Sequence[~Entity]
19852 Returns -> typing.Sequence[~StringsWatchResult]
19853 '''
19854 # map input types to rpc msg
19855 params = dict()
19856 msg = dict(Type='Uniter', Request='WatchUnitStorageAttachments', Version=4, Params=params)
19857 params['Entities'] = entities
19858 reply = await self.rpc(msg)
19859 return reply
19860
19861
19862 class Upgrader(Type):
19863 name = 'Upgrader'
19864 version = 1
19865 schema = {'definitions': {'Binary': {'additionalProperties': False,
19866 'properties': {'Arch': {'type': 'string'},
19867 'Number': {'$ref': '#/definitions/Number'},
19868 'Series': {'type': 'string'}},
19869 'required': ['Number', 'Series', 'Arch'],
19870 'type': 'object'},
19871 'Entities': {'additionalProperties': False,
19872 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
19873 'type': 'array'}},
19874 'required': ['Entities'],
19875 'type': 'object'},
19876 'EntitiesVersion': {'additionalProperties': False,
19877 'properties': {'AgentTools': {'items': {'$ref': '#/definitions/EntityVersion'},
19878 'type': 'array'}},
19879 'required': ['AgentTools'],
19880 'type': 'object'},
19881 'Entity': {'additionalProperties': False,
19882 'properties': {'Tag': {'type': 'string'}},
19883 'required': ['Tag'],
19884 'type': 'object'},
19885 'EntityVersion': {'additionalProperties': False,
19886 'properties': {'Tag': {'type': 'string'},
19887 'Tools': {'$ref': '#/definitions/Version'}},
19888 'required': ['Tag', 'Tools'],
19889 'type': 'object'},
19890 'Error': {'additionalProperties': False,
19891 'properties': {'Code': {'type': 'string'},
19892 'Info': {'$ref': '#/definitions/ErrorInfo'},
19893 'Message': {'type': 'string'}},
19894 'required': ['Message', 'Code'],
19895 'type': 'object'},
19896 'ErrorInfo': {'additionalProperties': False,
19897 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
19898 'MacaroonPath': {'type': 'string'}},
19899 'type': 'object'},
19900 'ErrorResult': {'additionalProperties': False,
19901 'properties': {'Error': {'$ref': '#/definitions/Error'}},
19902 'required': ['Error'],
19903 'type': 'object'},
19904 'ErrorResults': {'additionalProperties': False,
19905 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
19906 'type': 'array'}},
19907 'required': ['Results'],
19908 'type': 'object'},
19909 'Macaroon': {'additionalProperties': False,
19910 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
19911 'type': 'array'},
19912 'data': {'items': {'type': 'integer'},
19913 'type': 'array'},
19914 'id': {'$ref': '#/definitions/packet'},
19915 'location': {'$ref': '#/definitions/packet'},
19916 'sig': {'items': {'type': 'integer'},
19917 'type': 'array'}},
19918 'required': ['data',
19919 'location',
19920 'id',
19921 'caveats',
19922 'sig'],
19923 'type': 'object'},
19924 'NotifyWatchResult': {'additionalProperties': False,
19925 'properties': {'Error': {'$ref': '#/definitions/Error'},
19926 'NotifyWatcherId': {'type': 'string'}},
19927 'required': ['NotifyWatcherId', 'Error'],
19928 'type': 'object'},
19929 'NotifyWatchResults': {'additionalProperties': False,
19930 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
19931 'type': 'array'}},
19932 'required': ['Results'],
19933 'type': 'object'},
19934 'Number': {'additionalProperties': False,
19935 'properties': {'Build': {'type': 'integer'},
19936 'Major': {'type': 'integer'},
19937 'Minor': {'type': 'integer'},
19938 'Patch': {'type': 'integer'},
19939 'Tag': {'type': 'string'}},
19940 'required': ['Major',
19941 'Minor',
19942 'Tag',
19943 'Patch',
19944 'Build'],
19945 'type': 'object'},
19946 'Tools': {'additionalProperties': False,
19947 'properties': {'sha256': {'type': 'string'},
19948 'size': {'type': 'integer'},
19949 'url': {'type': 'string'},
19950 'version': {'$ref': '#/definitions/Binary'}},
19951 'required': ['version', 'url', 'size'],
19952 'type': 'object'},
19953 'ToolsResult': {'additionalProperties': False,
19954 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
19955 'Error': {'$ref': '#/definitions/Error'},
19956 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
19957 'type': 'array'}},
19958 'required': ['ToolsList',
19959 'DisableSSLHostnameVerification',
19960 'Error'],
19961 'type': 'object'},
19962 'ToolsResults': {'additionalProperties': False,
19963 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
19964 'type': 'array'}},
19965 'required': ['Results'],
19966 'type': 'object'},
19967 'Version': {'additionalProperties': False,
19968 'properties': {'Version': {'$ref': '#/definitions/Binary'}},
19969 'required': ['Version'],
19970 'type': 'object'},
19971 'VersionResult': {'additionalProperties': False,
19972 'properties': {'Error': {'$ref': '#/definitions/Error'},
19973 'Version': {'$ref': '#/definitions/Number'}},
19974 'required': ['Version', 'Error'],
19975 'type': 'object'},
19976 'VersionResults': {'additionalProperties': False,
19977 'properties': {'Results': {'items': {'$ref': '#/definitions/VersionResult'},
19978 'type': 'array'}},
19979 'required': ['Results'],
19980 'type': 'object'},
19981 'caveat': {'additionalProperties': False,
19982 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
19983 'location': {'$ref': '#/definitions/packet'},
19984 'verificationId': {'$ref': '#/definitions/packet'}},
19985 'required': ['location',
19986 'caveatId',
19987 'verificationId'],
19988 'type': 'object'},
19989 'packet': {'additionalProperties': False,
19990 'properties': {'headerLen': {'type': 'integer'},
19991 'start': {'type': 'integer'},
19992 'totalLen': {'type': 'integer'}},
19993 'required': ['start', 'totalLen', 'headerLen'],
19994 'type': 'object'}},
19995 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19996 'Result': {'$ref': '#/definitions/VersionResults'}},
19997 'type': 'object'},
19998 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
19999 'Result': {'$ref': '#/definitions/ErrorResults'}},
20000 'type': 'object'},
20001 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20002 'Result': {'$ref': '#/definitions/ToolsResults'}},
20003 'type': 'object'},
20004 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20005 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
20006 'type': 'object'}},
20007 'type': 'object'}
20008
20009
20010 @ReturnMapping(VersionResults)
20011 async def DesiredVersion(self, entities):
20012 '''
20013 entities : typing.Sequence[~Entity]
20014 Returns -> typing.Sequence[~VersionResult]
20015 '''
20016 # map input types to rpc msg
20017 params = dict()
20018 msg = dict(Type='Upgrader', Request='DesiredVersion', Version=1, Params=params)
20019 params['Entities'] = entities
20020 reply = await self.rpc(msg)
20021 return reply
20022
20023
20024
20025 @ReturnMapping(ErrorResults)
20026 async def SetTools(self, agenttools):
20027 '''
20028 agenttools : typing.Sequence[~EntityVersion]
20029 Returns -> typing.Sequence[~ErrorResult]
20030 '''
20031 # map input types to rpc msg
20032 params = dict()
20033 msg = dict(Type='Upgrader', Request='SetTools', Version=1, Params=params)
20034 params['AgentTools'] = agenttools
20035 reply = await self.rpc(msg)
20036 return reply
20037
20038
20039
20040 @ReturnMapping(ToolsResults)
20041 async def Tools(self, entities):
20042 '''
20043 entities : typing.Sequence[~Entity]
20044 Returns -> typing.Sequence[~ToolsResult]
20045 '''
20046 # map input types to rpc msg
20047 params = dict()
20048 msg = dict(Type='Upgrader', Request='Tools', Version=1, Params=params)
20049 params['Entities'] = entities
20050 reply = await self.rpc(msg)
20051 return reply
20052
20053
20054
20055 @ReturnMapping(NotifyWatchResults)
20056 async def WatchAPIVersion(self, entities):
20057 '''
20058 entities : typing.Sequence[~Entity]
20059 Returns -> typing.Sequence[~NotifyWatchResult]
20060 '''
20061 # map input types to rpc msg
20062 params = dict()
20063 msg = dict(Type='Upgrader', Request='WatchAPIVersion', Version=1, Params=params)
20064 params['Entities'] = entities
20065 reply = await self.rpc(msg)
20066 return reply
20067
20068
20069 class UserManager(Type):
20070 name = 'UserManager'
20071 version = 1
20072 schema = {'definitions': {'AddUser': {'additionalProperties': False,
20073 'properties': {'display-name': {'type': 'string'},
20074 'model-access-permission': {'type': 'string'},
20075 'password': {'type': 'string'},
20076 'shared-model-tags': {'items': {'type': 'string'},
20077 'type': 'array'},
20078 'username': {'type': 'string'}},
20079 'required': ['username',
20080 'display-name',
20081 'shared-model-tags'],
20082 'type': 'object'},
20083 'AddUserResult': {'additionalProperties': False,
20084 'properties': {'error': {'$ref': '#/definitions/Error'},
20085 'secret-key': {'items': {'type': 'integer'},
20086 'type': 'array'},
20087 'tag': {'type': 'string'}},
20088 'type': 'object'},
20089 'AddUserResults': {'additionalProperties': False,
20090 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
20091 'type': 'array'}},
20092 'required': ['results'],
20093 'type': 'object'},
20094 'AddUsers': {'additionalProperties': False,
20095 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
20096 'type': 'array'}},
20097 'required': ['users'],
20098 'type': 'object'},
20099 'Entities': {'additionalProperties': False,
20100 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
20101 'type': 'array'}},
20102 'required': ['Entities'],
20103 'type': 'object'},
20104 'Entity': {'additionalProperties': False,
20105 'properties': {'Tag': {'type': 'string'}},
20106 'required': ['Tag'],
20107 'type': 'object'},
20108 'EntityPassword': {'additionalProperties': False,
20109 'properties': {'Password': {'type': 'string'},
20110 'Tag': {'type': 'string'}},
20111 'required': ['Tag', 'Password'],
20112 'type': 'object'},
20113 'EntityPasswords': {'additionalProperties': False,
20114 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
20115 'type': 'array'}},
20116 'required': ['Changes'],
20117 'type': 'object'},
20118 'Error': {'additionalProperties': False,
20119 'properties': {'Code': {'type': 'string'},
20120 'Info': {'$ref': '#/definitions/ErrorInfo'},
20121 'Message': {'type': 'string'}},
20122 'required': ['Message', 'Code'],
20123 'type': 'object'},
20124 'ErrorInfo': {'additionalProperties': False,
20125 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
20126 'MacaroonPath': {'type': 'string'}},
20127 'type': 'object'},
20128 'ErrorResult': {'additionalProperties': False,
20129 'properties': {'Error': {'$ref': '#/definitions/Error'}},
20130 'required': ['Error'],
20131 'type': 'object'},
20132 'ErrorResults': {'additionalProperties': False,
20133 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
20134 'type': 'array'}},
20135 'required': ['Results'],
20136 'type': 'object'},
20137 'Macaroon': {'additionalProperties': False,
20138 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
20139 'type': 'array'},
20140 'data': {'items': {'type': 'integer'},
20141 'type': 'array'},
20142 'id': {'$ref': '#/definitions/packet'},
20143 'location': {'$ref': '#/definitions/packet'},
20144 'sig': {'items': {'type': 'integer'},
20145 'type': 'array'}},
20146 'required': ['data',
20147 'location',
20148 'id',
20149 'caveats',
20150 'sig'],
20151 'type': 'object'},
20152 'MacaroonResult': {'additionalProperties': False,
20153 'properties': {'error': {'$ref': '#/definitions/Error'},
20154 'result': {'$ref': '#/definitions/Macaroon'}},
20155 'type': 'object'},
20156 'MacaroonResults': {'additionalProperties': False,
20157 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
20158 'type': 'array'}},
20159 'required': ['results'],
20160 'type': 'object'},
20161 'UserInfo': {'additionalProperties': False,
20162 'properties': {'created-by': {'type': 'string'},
20163 'date-created': {'format': 'date-time',
20164 'type': 'string'},
20165 'disabled': {'type': 'boolean'},
20166 'display-name': {'type': 'string'},
20167 'last-connection': {'format': 'date-time',
20168 'type': 'string'},
20169 'username': {'type': 'string'}},
20170 'required': ['username',
20171 'display-name',
20172 'created-by',
20173 'date-created',
20174 'disabled'],
20175 'type': 'object'},
20176 'UserInfoRequest': {'additionalProperties': False,
20177 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20178 'type': 'array'},
20179 'include-disabled': {'type': 'boolean'}},
20180 'required': ['entities',
20181 'include-disabled'],
20182 'type': 'object'},
20183 'UserInfoResult': {'additionalProperties': False,
20184 'properties': {'error': {'$ref': '#/definitions/Error'},
20185 'result': {'$ref': '#/definitions/UserInfo'}},
20186 'type': 'object'},
20187 'UserInfoResults': {'additionalProperties': False,
20188 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
20189 'type': 'array'}},
20190 'required': ['results'],
20191 'type': 'object'},
20192 'caveat': {'additionalProperties': False,
20193 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
20194 'location': {'$ref': '#/definitions/packet'},
20195 'verificationId': {'$ref': '#/definitions/packet'}},
20196 'required': ['location',
20197 'caveatId',
20198 'verificationId'],
20199 'type': 'object'},
20200 'packet': {'additionalProperties': False,
20201 'properties': {'headerLen': {'type': 'integer'},
20202 'start': {'type': 'integer'},
20203 'totalLen': {'type': 'integer'}},
20204 'required': ['start', 'totalLen', 'headerLen'],
20205 'type': 'object'}},
20206 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
20207 'Result': {'$ref': '#/definitions/AddUserResults'}},
20208 'type': 'object'},
20209 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20210 'Result': {'$ref': '#/definitions/MacaroonResults'}},
20211 'type': 'object'},
20212 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20213 'Result': {'$ref': '#/definitions/ErrorResults'}},
20214 'type': 'object'},
20215 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20216 'Result': {'$ref': '#/definitions/ErrorResults'}},
20217 'type': 'object'},
20218 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
20219 'Result': {'$ref': '#/definitions/ErrorResults'}},
20220 'type': 'object'},
20221 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
20222 'Result': {'$ref': '#/definitions/UserInfoResults'}},
20223 'type': 'object'}},
20224 'type': 'object'}
20225
20226
20227 @ReturnMapping(AddUserResults)
20228 async def AddUser(self, users):
20229 '''
20230 users : typing.Sequence[~AddUser]
20231 Returns -> typing.Sequence[~AddUserResult]
20232 '''
20233 # map input types to rpc msg
20234 params = dict()
20235 msg = dict(Type='UserManager', Request='AddUser', Version=1, Params=params)
20236 params['users'] = users
20237 reply = await self.rpc(msg)
20238 return reply
20239
20240
20241
20242 @ReturnMapping(MacaroonResults)
20243 async def CreateLocalLoginMacaroon(self, entities):
20244 '''
20245 entities : typing.Sequence[~Entity]
20246 Returns -> typing.Sequence[~MacaroonResult]
20247 '''
20248 # map input types to rpc msg
20249 params = dict()
20250 msg = dict(Type='UserManager', Request='CreateLocalLoginMacaroon', Version=1, Params=params)
20251 params['Entities'] = entities
20252 reply = await self.rpc(msg)
20253 return reply
20254
20255
20256
20257 @ReturnMapping(ErrorResults)
20258 async def DisableUser(self, entities):
20259 '''
20260 entities : typing.Sequence[~Entity]
20261 Returns -> typing.Sequence[~ErrorResult]
20262 '''
20263 # map input types to rpc msg
20264 params = dict()
20265 msg = dict(Type='UserManager', Request='DisableUser', Version=1, Params=params)
20266 params['Entities'] = entities
20267 reply = await self.rpc(msg)
20268 return reply
20269
20270
20271
20272 @ReturnMapping(ErrorResults)
20273 async def EnableUser(self, entities):
20274 '''
20275 entities : typing.Sequence[~Entity]
20276 Returns -> typing.Sequence[~ErrorResult]
20277 '''
20278 # map input types to rpc msg
20279 params = dict()
20280 msg = dict(Type='UserManager', Request='EnableUser', Version=1, Params=params)
20281 params['Entities'] = entities
20282 reply = await self.rpc(msg)
20283 return reply
20284
20285
20286
20287 @ReturnMapping(ErrorResults)
20288 async def SetPassword(self, changes):
20289 '''
20290 changes : typing.Sequence[~EntityPassword]
20291 Returns -> typing.Sequence[~ErrorResult]
20292 '''
20293 # map input types to rpc msg
20294 params = dict()
20295 msg = dict(Type='UserManager', Request='SetPassword', Version=1, Params=params)
20296 params['Changes'] = changes
20297 reply = await self.rpc(msg)
20298 return reply
20299
20300
20301
20302 @ReturnMapping(UserInfoResults)
20303 async def UserInfo(self, entities, include_disabled):
20304 '''
20305 entities : typing.Sequence[~Entity]
20306 include_disabled : bool
20307 Returns -> typing.Sequence[~UserInfoResult]
20308 '''
20309 # map input types to rpc msg
20310 params = dict()
20311 msg = dict(Type='UserManager', Request='UserInfo', Version=1, Params=params)
20312 params['entities'] = entities
20313 params['include-disabled'] = include_disabled
20314 reply = await self.rpc(msg)
20315 return reply
20316
20317
20318 class VolumeAttachmentsWatcher(Type):
20319 name = 'VolumeAttachmentsWatcher'
20320 version = 2
20321 schema = {'definitions': {'Error': {'additionalProperties': False,
20322 'properties': {'Code': {'type': 'string'},
20323 'Info': {'$ref': '#/definitions/ErrorInfo'},
20324 'Message': {'type': 'string'}},
20325 'required': ['Message', 'Code'],
20326 'type': 'object'},
20327 'ErrorInfo': {'additionalProperties': False,
20328 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
20329 'MacaroonPath': {'type': 'string'}},
20330 'type': 'object'},
20331 'Macaroon': {'additionalProperties': False,
20332 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
20333 'type': 'array'},
20334 'data': {'items': {'type': 'integer'},
20335 'type': 'array'},
20336 'id': {'$ref': '#/definitions/packet'},
20337 'location': {'$ref': '#/definitions/packet'},
20338 'sig': {'items': {'type': 'integer'},
20339 'type': 'array'}},
20340 'required': ['data',
20341 'location',
20342 'id',
20343 'caveats',
20344 'sig'],
20345 'type': 'object'},
20346 'MachineStorageId': {'additionalProperties': False,
20347 'properties': {'attachmenttag': {'type': 'string'},
20348 'machinetag': {'type': 'string'}},
20349 'required': ['machinetag',
20350 'attachmenttag'],
20351 'type': 'object'},
20352 'MachineStorageIdsWatchResult': {'additionalProperties': False,
20353 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
20354 'type': 'array'},
20355 'Error': {'$ref': '#/definitions/Error'},
20356 'MachineStorageIdsWatcherId': {'type': 'string'}},
20357 'required': ['MachineStorageIdsWatcherId',
20358 'Changes',
20359 'Error'],
20360 'type': 'object'},
20361 'caveat': {'additionalProperties': False,
20362 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
20363 'location': {'$ref': '#/definitions/packet'},
20364 'verificationId': {'$ref': '#/definitions/packet'}},
20365 'required': ['location',
20366 'caveatId',
20367 'verificationId'],
20368 'type': 'object'},
20369 'packet': {'additionalProperties': False,
20370 'properties': {'headerLen': {'type': 'integer'},
20371 'start': {'type': 'integer'},
20372 'totalLen': {'type': 'integer'}},
20373 'required': ['start', 'totalLen', 'headerLen'],
20374 'type': 'object'}},
20375 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
20376 'type': 'object'},
20377 'Stop': {'type': 'object'}},
20378 'type': 'object'}
20379
20380
20381 @ReturnMapping(MachineStorageIdsWatchResult)
20382 async def Next(self):
20383 '''
20384
20385 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
20386 '''
20387 # map input types to rpc msg
20388 params = dict()
20389 msg = dict(Type='VolumeAttachmentsWatcher', Request='Next', Version=2, Params=params)
20390
20391 reply = await self.rpc(msg)
20392 return reply
20393
20394
20395
20396 @ReturnMapping(None)
20397 async def Stop(self):
20398 '''
20399
20400 Returns -> None
20401 '''
20402 # map input types to rpc msg
20403 params = dict()
20404 msg = dict(Type='VolumeAttachmentsWatcher', Request='Stop', Version=2, Params=params)
20405
20406 reply = await self.rpc(msg)
20407 return reply
20408
20409